Phase4
Some checks failed
CI / Node — lint, typecheck, test, build (push) Failing after 9s
CI / Go — node-agent tests (push) Failing after 9s
CI / Go — edge-gateway build (push) Successful in 13s

This commit is contained in:
smueller
2026-06-26 12:32:27 +02:00
parent 9b061c3ee7
commit 4262464cd5
101 changed files with 4024 additions and 74 deletions

View File

@@ -40,6 +40,10 @@ const (
TypeServerFilesWrite MessageType = "server.files.write"
TypeServerFilesUploadDone MessageType = "server.files.upload.complete"
TypeServerWorldValidate MessageType = "server.world.validate"
TypeServerWorldArchive MessageType = "server.world.archive"
TypeServerWorldReplace MessageType = "server.world.replace"
TypeServerStorageUpload MessageType = "server.storage.upload"
TypeServerStorageDownload MessageType = "server.storage.download"
TypeServerMetricsSub MessageType = "server.metrics.subscribe"
TypeServerLogsSubscribe MessageType = "server.logs.subscribe"
)
@@ -72,6 +76,10 @@ var controlToAgentTypes = map[MessageType]struct{}{
TypeServerFilesWrite: {},
TypeServerFilesUploadDone: {},
TypeServerWorldValidate: {},
TypeServerWorldArchive: {},
TypeServerWorldReplace: {},
TypeServerStorageUpload: {},
TypeServerStorageDownload: {},
TypeServerMetricsSub: {},
TypeServerLogsSubscribe: {},
}
@@ -178,6 +186,40 @@ type ServerFilesWritePayload struct {
Create bool `json:"create"`
}
// ServerWorldValidatePayload validates a Minecraft world directory.
type ServerWorldValidatePayload struct {
OperationMeta
WorldName string `json:"worldName"`
}
// ServerWorldArchivePayload archives a world directory.
type ServerWorldArchivePayload struct {
OperationMeta
WorldName string `json:"worldName"`
ArchiveID string `json:"archiveId"`
}
// ServerStorageUploadPayload uploads a local file to a presigned URL.
type ServerStorageUploadPayload struct {
OperationMeta
LocalPath string `json:"localPath"`
UploadURL string `json:"uploadUrl"`
}
// ServerStorageDownloadPayload downloads a remote file to a local path.
type ServerStorageDownloadPayload struct {
OperationMeta
DownloadURL string `json:"downloadUrl"`
LocalPath string `json:"localPath"`
}
// ServerWorldReplacePayload replaces a world from a local archive.
type ServerWorldReplacePayload struct {
OperationMeta
WorldName string `json:"worldName"`
ArchivePath string `json:"archivePath"`
}
// FileEntry describes a file or directory in a list response.
type FileEntry struct {
Name string `json:"name"`