From d56fe9cf64719bb330c17b2daee58c0bafa057c9 Mon Sep 17 00:00:00 2001 From: Adam Malczewski Date: Sun, 21 Jun 2026 14:34:22 +0900 Subject: feat(todo): per-conversation task list tool + surface MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit New standard tool extension with a single todo_write tool (opencode todowrite pattern: full-list replace, returns JSON, no business-rule enforcement — the description guides the model). Per-conversation in-memory state + per-conversation surface (rendererId: todo, scope: conversation) via subscriber-notify (message-queue pattern). Wave 0 (kernel contract): added conversationId?: string to ToolExecuteContext (additive, backward-compatible). Wired in dispatch.ts — the kernel already had it but wasn't passing it through to tools. Wave 1 (todo extension): pure core (validateTodos — shape only; getTodos/ setTodos/clearTodos; buildTodoSpec; formatTodoResult). Shell: createTodoWriteTool + surface provider. Tool description matches opencode's todowrite.txt depth (when-to-use, examples, task states). Priority field removed (bloats the tool with little value). 25 tests. Wave 2 (host-bin): registered todo in CORE_EXTENSIONS + dep + root tsconfig ref. Verified: tsc EXIT 0, 1123 vitest, biome clean (314 files). Boot smoke clean. FE handoff: frontend-todo-handoff.md. --- packages/host-bin/package.json | 1 + packages/host-bin/src/main.ts | 2 ++ 2 files changed, 3 insertions(+) (limited to 'packages/host-bin') diff --git a/packages/host-bin/package.json b/packages/host-bin/package.json index 5f7d0e7..be530b5 100644 --- a/packages/host-bin/package.json +++ b/packages/host-bin/package.json @@ -16,6 +16,7 @@ "@dispatch/session-orchestrator": "workspace:*", "@dispatch/skills": "workspace:*", "@dispatch/throughput-store": "workspace:*", + "@dispatch/todo": "workspace:*", "@dispatch/transport-http": "workspace:*", "@dispatch/tool-read-file": "workspace:*", "@dispatch/tool-shell": "workspace:*", diff --git a/packages/host-bin/src/main.ts b/packages/host-bin/src/main.ts index 1c122de..5a7fcae 100644 --- a/packages/host-bin/src/main.ts +++ b/packages/host-bin/src/main.ts @@ -29,6 +29,7 @@ import { createSqliteStorage, extension as storageSqliteExt } from "@dispatch/st import { createLoadedExtensionsExtension } from "@dispatch/surface-loaded-extensions"; import { createSurfaceRegistryExtension } from "@dispatch/surface-registry"; import { extension as throughputStoreExt } from "@dispatch/throughput-store"; +import { extension as todoExt } from "@dispatch/todo"; import { extension as toolEditFileExt } from "@dispatch/tool-edit-file"; import { extension as toolReadFileExt } from "@dispatch/tool-read-file"; import { extension as toolShellExt } from "@dispatch/tool-shell"; @@ -78,6 +79,7 @@ const CORE_EXTENSIONS: readonly Extension[] = [ toolWriteFileExt, toolWebSearchExt, throughputStoreExt, + todoExt, messageQueueExt, sessionOrchestratorExt, skillsExt, -- cgit v1.2.3