diff options
| author | Adam Malczewski <[email protected]> | 2026-06-24 00:08:47 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-06-24 00:08:47 +0900 |
| commit | d225ea4bd5f95d39a910704fe45acdf847c953fa (patch) | |
| tree | ec0a33665087bb34844b19955ab6fa74c39e3656 /packages/transport-http/src/extension.ts | |
| parent | 674853d87d54dba1cd83c4e51fce5411602f4d5d (diff) | |
| download | dispatch-d225ea4bd5f95d39a910704fe45acdf847c953fa.tar.gz dispatch-d225ea4bd5f95d39a910704fe45acdf847c953fa.zip | |
feat(system-prompt): wire into turn flow + compaction + API routes
session-orchestrator:
- Wire systemPromptService as optional dep (lazy via host.getService)
- Regular turn: construct on first turn (new conversation), get on subsequent
turns, set on providerOpts.systemPrompt (cache-safe)
- Compaction: construct (fresh resolve) + append COMPACTION_SYSTEM_PROMPT
- 12 new tests (construct/get/service-unavailable/compaction)
transport-http:
- GET /system-prompt (returns template or DEFAULT_TEMPLATE)
- PUT /system-prompt (validate + setTemplate, 503 when unavailable)
- GET /system-prompt/variables (static catalog, always available)
- 6 new tests
system-prompt service: added getTemplate/setTemplate to interface + impl.
1396 vitest pass. typecheck + biome clean.
Diffstat (limited to 'packages/transport-http/src/extension.ts')
| -rw-r--r-- | packages/transport-http/src/extension.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/packages/transport-http/src/extension.ts b/packages/transport-http/src/extension.ts index 77738f8..ac6553c 100644 --- a/packages/transport-http/src/extension.ts +++ b/packages/transport-http/src/extension.ts @@ -7,6 +7,7 @@ import { credentialStoreHandle, lspServiceHandle, sessionOrchestratorHandle, + systemPromptHandle, throughputStoreHandle, } from "./seam.js"; @@ -39,11 +40,14 @@ export const manifest: Manifest = { "/conversations/:id/open", "/conversations/:id/queue", "/conversations/:id/reasoning-effort", + "/conversations/:id/status", "/conversations/:id/stop", "/conversations/:id/title", "/health", "/models", "/metrics/throughput", + "/system-prompt", + "/system-prompt/variables", "/workspaces", "/workspaces/:id", "/workspaces/:id/title", @@ -71,6 +75,7 @@ export function createTransportHttpExtension(): Extension & { const warmService = host.getService(cacheWarmHandle); const compactionService = host.getService(compactionHandle); const lspService = host.getService(lspServiceHandle); + const systemPromptService = host.getService(systemPromptHandle); const logger = host.logger; const app = createApp({ @@ -81,6 +86,7 @@ export function createTransportHttpExtension(): Extension & { warmService, compactionService, lspService, + systemPromptService, logger, emit: host.emit.bind(host), ...(process.env.DISPATCH_WEB_DIR !== undefined @@ -93,6 +99,7 @@ export function createTransportHttpExtension(): Extension & { server = Bun.serve({ port, fetch: app.fetch, + idleTimeout: 0, }); logger.info("transport-http: listening", { port }); |
