Move SCUM lifecycle ownership to plugin
This commit is contained in:
@@ -582,8 +582,8 @@ type RuntimeServerPrerequisite struct {
|
||||
Kind string
|
||||
}
|
||||
|
||||
// RuntimeServerDeploymentProfile is a frozen, game-specific deployment
|
||||
// template. It contains logical references only; Run resolves them locally.
|
||||
// RuntimeServerDeploymentProfile is a legacy game-specific deployment template
|
||||
// declaration kept for backward-compatible manifest decoding.
|
||||
type RuntimeServerDeploymentProfile struct {
|
||||
Key string
|
||||
Version string
|
||||
@@ -624,6 +624,7 @@ type GamePluginManifest struct {
|
||||
Capabilities []string
|
||||
Permissions []string
|
||||
Actions PluginLifecycleActions
|
||||
AssetFiles []PluginAssetFile
|
||||
Pages []GamePluginPage
|
||||
FileWorkspace PluginFileWorkspace
|
||||
AI GamePluginManifestAI
|
||||
@@ -637,6 +638,13 @@ type GamePluginManifest struct {
|
||||
type GamePluginManifestRegistration struct {
|
||||
ManifestRef string
|
||||
Manifest GamePluginManifest
|
||||
AssetFiles []PluginAssetFile
|
||||
}
|
||||
|
||||
type PluginAssetFile struct {
|
||||
Path string
|
||||
Content string
|
||||
Mode int
|
||||
}
|
||||
|
||||
type GamePlugin struct {
|
||||
@@ -654,6 +662,7 @@ type GamePlugin struct {
|
||||
DeclaredPermissions []string
|
||||
Permissions PluginPermissions
|
||||
LifecycleActions PluginLifecycleActions
|
||||
LifecycleAssets []PluginAssetFile
|
||||
BridgeActions []string
|
||||
Pages []GamePluginPage
|
||||
FileWorkspace PluginFileWorkspace
|
||||
@@ -1057,7 +1066,6 @@ const (
|
||||
// JobCapabilityDeploymentPlan gates Run implementations that understand
|
||||
// protected deployment definitions, absolute paths, and custom commands.
|
||||
JobCapabilityDeploymentPlan = "deployment.plan.v1"
|
||||
JobCapabilitySCUMDeploymentPlan = "deployment.scum.v1"
|
||||
JobCapabilityDeploymentShellPosix = "deployment.shell.posix-sh"
|
||||
JobCapabilityDeploymentShellPowerShell = "deployment.shell.powershell"
|
||||
JobCapabilityDeploymentShellCmd = "deployment.shell.cmd"
|
||||
@@ -1648,6 +1656,7 @@ func CopyGamePlugin(plugin GamePlugin) GamePlugin {
|
||||
plugin.DeclaredPermissions = CopyStringSlice(plugin.DeclaredPermissions)
|
||||
plugin.SupportedOS = CopyStringSlice(plugin.SupportedOS)
|
||||
plugin.CreateFields = CopyPluginCreateFields(plugin.CreateFields)
|
||||
plugin.LifecycleAssets = CopyPluginAssetFiles(plugin.LifecycleAssets)
|
||||
plugin.BridgeActions = CopyStringSlice(plugin.BridgeActions)
|
||||
plugin.Pages = CopyGamePluginPageSlice(plugin.Pages)
|
||||
plugin.FileWorkspace = CopyPluginFileWorkspace(plugin.FileWorkspace)
|
||||
@@ -1699,9 +1708,19 @@ func CopyPluginMarketplacePluginSlice(plugins []PluginMarketplacePlugin) []Plugi
|
||||
|
||||
func CopyGamePluginManifestRegistration(registration GamePluginManifestRegistration) GamePluginManifestRegistration {
|
||||
registration.Manifest = CopyGamePluginManifest(registration.Manifest)
|
||||
registration.AssetFiles = CopyPluginAssetFiles(registration.AssetFiles)
|
||||
return registration
|
||||
}
|
||||
|
||||
func CopyPluginAssetFiles(files []PluginAssetFile) []PluginAssetFile {
|
||||
if files == nil {
|
||||
return nil
|
||||
}
|
||||
out := make([]PluginAssetFile, len(files))
|
||||
copy(out, files)
|
||||
return out
|
||||
}
|
||||
|
||||
func CopyGamePluginManifest(manifest GamePluginManifest) GamePluginManifest {
|
||||
manifest.Tags = CopyStringSlice(manifest.Tags)
|
||||
manifest.Server.SupportedOS = CopyStringSlice(manifest.Server.SupportedOS)
|
||||
@@ -1709,6 +1728,7 @@ func CopyGamePluginManifest(manifest GamePluginManifest) GamePluginManifest {
|
||||
manifest.Bridge.Actions = CopyStringSlice(manifest.Bridge.Actions)
|
||||
manifest.Capabilities = CopyStringSlice(manifest.Capabilities)
|
||||
manifest.Permissions = CopyStringSlice(manifest.Permissions)
|
||||
manifest.AssetFiles = CopyPluginAssetFiles(manifest.AssetFiles)
|
||||
manifest.Pages = CopyGamePluginPageSlice(manifest.Pages)
|
||||
manifest.FileWorkspace = CopyPluginFileWorkspace(manifest.FileWorkspace)
|
||||
manifest.AI.Purposes = CopyStringSlice(manifest.AI.Purposes)
|
||||
|
||||
Reference in New Issue
Block a user