Files
browser/openspec/changes/implement-plugin-bridge-and-sdk/proposal.md
T
2026-07-11 14:56:10 +08:00

29 lines
1.6 KiB
Markdown

## Why
Validated plugin manifests can now register game management plugins, but plugin pages still lack a safe runtime bridge and authors lack a typed SDK for calling platform-mediated abilities. This change establishes the browser-side plugin boundary needed before the plugin marketplace and server workflows can host real plugin UI.
## What Changes
- Add a plugin page bridge contract that exposes only scoped platform abilities to plugin UI code.
- Add a TypeScript plugin SDK with bridge message types, permission checks, request/response helpers, and safe error handling.
- Add platform API support for validating plugin bridge sessions and evaluating requested actions against manifest permissions.
- Update the example development plugin to declare bridge requirements and exercise the SDK without direct run, host path, socket, credential, or raw AI key access.
- Add focused tests for bridge permission decisions, SDK type/runtime behavior, and platform validators.
## Capabilities
### New Capabilities
- `plugin-bridge-and-sdk`: Defines the platform-mediated plugin page bridge, SDK contract, permission enforcement, and safe capability surface for game management plugin pages.
### Modified Capabilities
- None.
## Impact
- `plugins/`: SDK source, bridge contracts, manifest/schema additions, example plugin declarations, and TypeScript tests.
- `platform/`: bridge session/action DTOs, domain types, validators, service logic, API route, and Go tests.
- `platform_web/`: bridge host contracts/utilities and tests that can later be used by plugin marketplace pages.
- OpenSpec artifacts and validation for the new `plugin-bridge-and-sdk` capability.