From 254f90a4081a3f15dfe54277da922579dbaee254 Mon Sep 17 00:00:00 2001 From: Adam Malczewski Date: Sat, 5 Sep 2026 17:33:06 +0900 Subject: feat(layout): plan 04 — ABI layout.applyOps + reset affordance MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/plugin-host.svelte.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/app/plugin-host.svelte.ts') 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, }; } -- cgit v1.2.3