diff options
| author | Adam Malczewski <[email protected]> | 2026-09-05 17:33:06 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-09-05 17:33:06 +0900 |
| commit | 254f90a4081a3f15dfe54277da922579dbaee254 (patch) | |
| tree | f5f4e409196109baf938cd9d557e244242df18ce /src/app/plugin-host.svelte.ts | |
| parent | 535215bfd1fee6087613108f42d28cd2807184d3 (diff) | |
| download | dispatch-web-254f90a4081a3f15dfe54277da922579dbaee254.tar.gz dispatch-web-254f90a4081a3f15dfe54277da922579dbaee254.zip | |
feat(layout): plan 04 — ABI layout.applyOps + reset affordance
Diffstat (limited to 'src/app/plugin-host.svelte.ts')
| -rw-r--r-- | src/app/plugin-host.svelte.ts | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/app/plugin-host.svelte.ts b/src/app/plugin-host.svelte.ts index 729a8aa..8054005 100644 --- a/src/app/plugin-host.svelte.ts +++ b/src/app/plugin-host.svelte.ts @@ -28,6 +28,7 @@ import { usablePluginIds, } from "../core/plugin-abi"; import { + type LayoutAbiPort, registerPluginView, unregisterViewsByPlugin, type ViewComponent, @@ -60,6 +61,12 @@ export interface PluginHostOptions { /** The ACTIVE workspace provider (read per sync — workspace.set trigger). */ readonly activeWorkspaceId: () => string; readonly surfaces: FrontendSurfacesPorts; + /** + * The layout port (plan 04 §4.5) — the ABI's `api.layout` (applyOps to the + * ACTIVE workspace's provider + getTree, null in no-provider mode). Built + * by the composition root over the layout store + ops HTTP edge. + */ + readonly layout: LayoutAbiPort; } export interface PluginHost { @@ -108,6 +115,10 @@ export function createPluginHost(opts: PluginHostOptions): PluginHost { info: (msg) => console.info(`[frontend-plugin:${pluginId}] ${msg}`), warn: (msg) => console.warn(`[frontend-plugin:${pluginId}] ${msg}`), }, + // plan 04 §4.5: the layout port — the composition-root-built adapter + // over the layout store + the ops HTTP edge (the plugin never sees + // either; only this typed port). + layout: opts.layout, }; } |
