Phase5
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 13:00:01 +02:00
parent 4262464cd5
commit d29a02f2a4
93 changed files with 1875 additions and 55 deletions

View File

@@ -44,6 +44,8 @@ const (
TypeServerWorldReplace MessageType = "server.world.replace"
TypeServerStorageUpload MessageType = "server.storage.upload"
TypeServerStorageDownload MessageType = "server.storage.download"
TypeServerAddonInstall MessageType = "server.addon.install"
TypeServerAddonRemove MessageType = "server.addon.remove"
TypeServerMetricsSub MessageType = "server.metrics.subscribe"
TypeServerLogsSubscribe MessageType = "server.logs.subscribe"
)
@@ -80,6 +82,8 @@ var controlToAgentTypes = map[MessageType]struct{}{
TypeServerWorldReplace: {},
TypeServerStorageUpload: {},
TypeServerStorageDownload: {},
TypeServerAddonInstall: {},
TypeServerAddonRemove: {},
TypeServerMetricsSub: {},
TypeServerLogsSubscribe: {},
}
@@ -220,6 +224,20 @@ type ServerWorldReplacePayload struct {
ArchivePath string `json:"archivePath"`
}
// ServerAddonInstallPayload downloads and installs an addon file.
type ServerAddonInstallPayload struct {
OperationMeta
DownloadURL string `json:"downloadUrl"`
RelativePath string `json:"relativePath"`
Sha512 string `json:"sha512,omitempty"`
}
// ServerAddonRemovePayload removes an installed addon file.
type ServerAddonRemovePayload struct {
OperationMeta
RelativePath string `json:"relativePath"`
}
// FileEntry describes a file or directory in a list response.
type FileEntry struct {
Name string `json:"name"`