Plugins that need their own UI and richer themes should not force breaking contract changes later, so the full shape is published now (uiApi 2.0, bridgeApi 1.0) and every entry is marked stable or experimental: - docs/plugin-architecture.md: plugin-owned views (sidebar, vm.tab, settings, dialog) and the bridge methods (§5.6), the finer theme contract with slot catalogue, layers, layout and icons (§5.1), and the contract evolution rules (§6.3). - ui-contract.ts and the new bridgeContract.ts list stable and experimental entries; the build fails if a stable entry is not emitted or an emitted entry is still experimental, and writes bridge-contract.json next to ui-contract.json. - internal/plugin/contract.go mirrors them as catalogs (contribution points, slots with accepted content, view locations, layers, layout, icons, bridge methods and events) and derives HostFeatures; tests keep Go and TypeScript identical and require every contributes field to be catalogued. - Manifests gain views, theme layout and engines.bridgeApi. Unknown slots, locations, layout values and icon names are rejected; experimental use, unknown fields and missing engines ranges are doctor warnings. Declared-but-unrendered entries (vmCards, statusItems, settingsPages, vmTemplates, runtimeSources, runtimes, uiScripts, diagnostics, theme icons and brandMark, panels outside settings.plugin) are now marked experimental. - The panel bridge resolves methods through the catalog, adds hello and refuses experimental methods; panels get theme.changed and locale.changed events; the Sidecar handshake and the Go SDK carry uiApi, bridgeApi and features. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
49 lines
872 B
JSON
49 lines
872 B
JSON
{
|
|
"bridgeApi": "1.0.0",
|
|
"methods": [
|
|
"hello",
|
|
"i18n.getBundle",
|
|
"ui.notify",
|
|
"vm.list",
|
|
"command.invoke"
|
|
],
|
|
"events": [
|
|
"theme.changed",
|
|
"locale.changed"
|
|
],
|
|
"experimental": {
|
|
"methods": [
|
|
"ui.confirm",
|
|
"ui.showForm",
|
|
"ui.setTitle",
|
|
"ui.setBadge",
|
|
"ui.openView",
|
|
"ui.close",
|
|
"ui.navigate",
|
|
"ui.openExternal",
|
|
"vm.get",
|
|
"settings.get",
|
|
"settings.set",
|
|
"storage.get",
|
|
"storage.set",
|
|
"storage.list",
|
|
"storage.delete",
|
|
"file.pick",
|
|
"file.save",
|
|
"file.read",
|
|
"file.write",
|
|
"task.start",
|
|
"task.update",
|
|
"task.finish",
|
|
"net.fetch",
|
|
"events.subscribe",
|
|
"events.unsubscribe"
|
|
],
|
|
"events": [
|
|
"vm.stateChanged",
|
|
"view.visibilityChanged",
|
|
"task.updated"
|
|
]
|
|
}
|
|
}
|