2.2 KiB
plugins
Game management plugin workspace.
A game management plugin defines how the platform creates and manages one type of game server. One installed plugin can create many server instances.
Plugin Responsibilities
- Manifest identity and server type declaration.
- Create-server form schema.
- Lifecycle action definitions.
- Required run capabilities.
- Optional plugin pages hosted by platform_web.
- AI/file/log permissions declared for platform authorization.
Required Directory Plan
Implementation should use dedicated directories for:
manifests/: plugin manifest examples or shared manifest schemas.schemas/: action, config, and create-form schemas.sdk/: plugin bridge SDK and shared contracts.examples/: example game management plugins.tests/: plugin contract tests and fixtures.
Plugins must use the platform bridge and must not connect directly to run, log storage, artifact storage internals, or AI provider endpoints.
Manifest validation is the plugin-side installability gate. The shared manifest schema defines identity, version, server type/display metadata, create form schema reference, lifecycle action references, required run capabilities, scoped permissions, optional pages, tags, and AI purposes. scripts/validate-manifest.ts also scans manifest and create-form content for unsafe raw host path, raw credential, direct run, and raw AI/provider key requests.
Validated manifests are registered through the platform registry API rather than by plugin code importing platform internals. Platform stores registry metadata only and repeats safety validation before a plugin becomes installable.
Development Baseline
Tooling:
- Node 22.17.0.
- npm 11.6.1.
- TypeScript 5.
Commands:
npm install
npm run typecheck
npm run test
npm run validate:manifest
Current plugin behavior includes SDK bridge contracts, manifest schema validation, the examples/dev-game-plugin fixture, platform registry metadata registration, marketplace projections, hosted plugin-page bridge execution, and platform-mediated lifecycle job dispatch. Marketplace package acquisition, remote plugin hosting policies, and external package distribution remain future OpenSpec work.