Fix local run freshness and plugin asset handling

This commit is contained in:
npc0-hue
2026-08-22 19:45:00 +08:00
parent bb5e48b29c
commit ebd616c549
23 changed files with 312 additions and 58 deletions
+2 -2
View File
@@ -86,7 +86,7 @@ func TestGamePluginManifestRegistrationToDomainCopiesSlices(t *testing.T) {
AI: GamePluginManifestAIBody{Purposes: []string{"logs.diagnose"}},
},
AssetFiles: []PluginAssetFileBody{
{Path: "actions/install.json", Content: "{}", Mode: 0o600},
{Path: "actions/install.json", Content: "{}", Encoding: "base64", Mode: 0o600},
},
}
@@ -98,7 +98,7 @@ func TestGamePluginManifestRegistrationToDomainCopiesSlices(t *testing.T) {
domainRegistration.Manifest.Pages[0].Permissions[0] = "ai.invoke"
domainRegistration.Manifest.AI.Purposes[0] = "config.suggest"
if request.Manifest.Tags[0] != "example" || request.Manifest.Server.SupportedOS[0] != "linux" || request.Manifest.AssetFiles[0].Path != "actions/install.json" || request.AssetFiles[0].Content != "{}" || request.Manifest.Pages[0].Permissions[0] != "server.logs.read" || request.Manifest.AI.Purposes[0] != "logs.diagnose" {
if request.Manifest.Tags[0] != "example" || request.Manifest.Server.SupportedOS[0] != "linux" || request.Manifest.AssetFiles[0].Path != "actions/install.json" || request.AssetFiles[0].Content != "{}" || request.AssetFiles[0].Encoding != "base64" || request.Manifest.Pages[0].Permissions[0] != "server.logs.read" || request.Manifest.AI.Purposes[0] != "logs.diagnose" {
t.Fatalf("expected manifest request slices to be copied, got %+v", request)
}
}