summaryrefslogtreecommitdiffhomepage
path: root/packages/host-bin
diff options
context:
space:
mode:
authorAdam Malczewski <[email protected]>2026-06-06 18:55:53 +0900
committerAdam Malczewski <[email protected]>2026-06-06 18:55:53 +0900
commit22936857685c318b71752d625808100b1a96e63e (patch)
tree5e10a73d616c206e3820a8d8568e5f3d4c8a302e /packages/host-bin
parent969afc45f895230fe3da1c737f18e64452efc8f2 (diff)
downloaddispatch-22936857685c318b71752d625808100b1a96e63e.tar.gz
dispatch-22936857685c318b71752d625808100b1a96e63e.zip
feat(frontend,wire): surface system (FE slice 1) + @dispatch/wire types-only split (B2)
FE slice 1 — backend-declared, frontend-agnostic surface system (verified live): new types-only @dispatch/ui-contract (SurfaceSpec / field kinds / region / ActionRef / catalog), surface-registry (typed service handle), transport-ws (Bun WS :24205, path-agnostic upgrade), surface-loaded-extensions (first real surface); kernel HostAPI.getExtensions; host-bin wiring; bin/up. Harness: retire AGENTS 'backend only', ORCHESTRATOR §3/§7/§8, frontend-design.md locked. B2 — wire-types split (chat-slice prerequisite): new types-only @dispatch/wire single-sources the wire ABI (AgentEvent + 11 variants; conversation model Chunk/ChatMessage/Role/TurnId/StepId + 6 chunk variants; Usage) with zero @dispatch/* deps. @dispatch/kernel re-exports via shims so its public surface is byte-identical (zero consumer blast radius). transport-contract re-exports AgentEvent from @dispatch/wire and drops its @dispatch/kernel dependency, so HTTP clients (the web frontend) consume the wire without the kernel runtime. tsc -b + biome clean; 460 vitest + 77 bun pass.
Diffstat (limited to 'packages/host-bin')
-rw-r--r--packages/host-bin/package.json5
-rw-r--r--packages/host-bin/src/main.ts7
-rw-r--r--packages/host-bin/tsconfig.json11
3 files changed, 16 insertions, 7 deletions
diff --git a/packages/host-bin/package.json b/packages/host-bin/package.json
index 4ce63a9..65e986d 100644
--- a/packages/host-bin/package.json
+++ b/packages/host-bin/package.json
@@ -13,6 +13,9 @@
"@dispatch/session-orchestrator": "workspace:*",
"@dispatch/transport-http": "workspace:*",
"@dispatch/tool-read-file": "workspace:*",
- "@dispatch/journal-sink": "workspace:*"
+ "@dispatch/journal-sink": "workspace:*",
+ "@dispatch/surface-loaded-extensions": "workspace:*",
+ "@dispatch/surface-registry": "workspace:*",
+ "@dispatch/transport-ws": "workspace:*"
}
}
diff --git a/packages/host-bin/src/main.ts b/packages/host-bin/src/main.ts
index d766e46..68cbbdd 100644
--- a/packages/host-bin/src/main.ts
+++ b/packages/host-bin/src/main.ts
@@ -21,8 +21,11 @@ import {
import { extension as providerOpenaiCompatExt } from "@dispatch/provider-openai-compat";
import { extension as sessionOrchestratorExt } from "@dispatch/session-orchestrator";
import { createSqliteStorage, extension as storageSqliteExt } from "@dispatch/storage-sqlite";
+import { createLoadedExtensionsExtension } from "@dispatch/surface-loaded-extensions";
+import { createSurfaceRegistryExtension } from "@dispatch/surface-registry";
import { extension as toolReadFileExt } from "@dispatch/tool-read-file";
import { createServer, extension as transportHttpExt } from "@dispatch/transport-http";
+import { createTransportWsExtension } from "@dispatch/transport-ws";
import type { ChildHandle } from "./collector-supervisor.js";
import { createCollectorSupervisor } from "./collector-supervisor.js";
import { configMapToAccess, envToConfigMap } from "./config.js";
@@ -61,6 +64,10 @@ const CORE_EXTENSIONS: readonly Extension[] = [
}),
sessionOrchestratorExt,
transportHttpExt,
+ // Surface extensions — dependency order: surface-registry first, then consumers.
+ createSurfaceRegistryExtension(),
+ createTransportWsExtension(),
+ createLoadedExtensionsExtension(),
];
async function boot(): Promise<void> {
diff --git a/packages/host-bin/tsconfig.json b/packages/host-bin/tsconfig.json
index 70ff95c..3630394 100644
--- a/packages/host-bin/tsconfig.json
+++ b/packages/host-bin/tsconfig.json
@@ -5,11 +5,10 @@
"references": [
{ "path": "../kernel" },
{ "path": "../storage-sqlite" },
- { "path": "../conversation-store" },
- { "path": "../auth-apikey" },
- { "path": "../credential-store" },
- { "path": "../provider-openai-compat" },
- { "path": "../session-orchestrator" },
- { "path": "../transport-http" }
+ { "path": "../surface-loaded-extensions" },
+ { "path": "../surface-registry" },
+ { "path": "../tool-read-file" },
+ { "path": "../transport-http" },
+ { "path": "../transport-ws" }
]
}