diff --git a/plugins/examples/scum-server-plugin/actions/start.json b/plugins/examples/scum-server-plugin/actions/start.json index ba44163..241d4de 100644 --- a/plugins/examples/scum-server-plugin/actions/start.json +++ b/plugins/examples/scum-server-plugin/actions/start.json @@ -2,6 +2,7 @@ "version": 1, "action": "start", "mode": "supervised", + "outputMode": "console", "executableKey": "bin/scum-start.cmd", "arguments": [], "environment": { diff --git a/plugins/examples/scum-server-plugin/manifest.json b/plugins/examples/scum-server-plugin/manifest.json index 9906da3..8e15929 100644 --- a/plugins/examples/scum-server-plugin/manifest.json +++ b/plugins/examples/scum-server-plugin/manifest.json @@ -3,7 +3,7 @@ "id": "game.scum", "name": "SCUM Server", "description": "First-party SCUM game server operations plugin with platform-mediated lifecycle and companion bridge support.", - "version": "0.1.7", + "version": "0.1.8", "kind": "game-plugin", "tags": [ "scum", diff --git a/plugins/manifests/lifecycle-action.schema.json b/plugins/manifests/lifecycle-action.schema.json index 633b8ac..d097973 100644 --- a/plugins/manifests/lifecycle-action.schema.json +++ b/plugins/manifests/lifecycle-action.schema.json @@ -21,6 +21,7 @@ "additionalProperties": { "type": "string", "maxLength": 512 }, "maxProperties": 32 }, + "outputMode": { "enum": ["pipes", "console"] }, "timeoutMs": { "type": "integer", "minimum": 1, "maximum": 7200000 }, "stopTimeoutMs": { "type": "integer", "minimum": 1, "maximum": 60000 } } diff --git a/plugins/sdk/index.ts b/plugins/sdk/index.ts index 211817d..75b1dff 100644 --- a/plugins/sdk/index.ts +++ b/plugins/sdk/index.ts @@ -650,6 +650,7 @@ export interface PluginLifecycleActionDeclaration { executableKey?: string; arguments?: string[]; environment?: Record<`GAME_${string}` | `SERVER_${string}` | `RUN_${string}`, string>; + outputMode?: "pipes" | "console"; timeoutMs?: number; stopTimeoutMs?: number; } diff --git a/plugins/tests/manifest-validation.test.ts b/plugins/tests/manifest-validation.test.ts index 5eaeb22..be9a821 100644 --- a/plugins/tests/manifest-validation.test.ts +++ b/plugins/tests/manifest-validation.test.ts @@ -219,7 +219,7 @@ describe("plugin manifest validation", () => { expect(assetPaths).toEqual(expect.arrayContaining(["actions/install.json", "actions/start.json", "bin/scum-install-update.cmd", "bin/scum-start.cmd", "assets/map/scum-map-overview.jpg"])); expect(installAction).toMatchObject({ executableKey: "bin/scum-install-update.cmd", environment: { SERVER_STEAM_APP_ID: "3792580", SERVER_STEAMCMD_UPDATE_ARGS: "+login anonymous +app_update 3792580 +quit" } }); expect(installAction.timeoutMs).toBe(7200000); - expect(startAction).toMatchObject({ executableKey: "bin/scum-start.cmd", environment: { SERVER_LOG_FLAG: "-log" } }); + expect(startAction).toMatchObject({ executableKey: "bin/scum-start.cmd", outputMode: "console", environment: { SERVER_LOG_FLAG: "-log" } }); expect(installScript).not.toContain("taskkill /IM SCUMServer.exe /F"); expect(installScript).toContain("call :stop_matching_scum"); expect(installScript).toContain("Get-CimInstance Win32_Process"); @@ -482,7 +482,7 @@ describe("plugin manifest validation", () => { const serialized = JSON.stringify(manifest).toLowerCase(); expect(serialized).not.toContain("local-proof"); - expect(manifest.version).toBe("0.1.7"); + expect(manifest.version).toBe("0.1.8"); expect(installAction.environment?.SERVER_TEMPLATE).toBe("scum-server"); expect(manifest.permissions).toEqual(expect.arrayContaining(["server.game-client.read", "server.game-client.command", "server.game-client.maintenance"])); expect(manifest.gameClientBridge.commands.map((command) => command.type)).toEqual(expect.arrayContaining([