diff options
| author | Adam Malczewski <[email protected]> | 2026-06-10 17:03:23 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-06-10 17:03:23 +0900 |
| commit | f6b45507210e04e9884256b0132900640de4334b (patch) | |
| tree | 73c5779bf2eec5a1d03732be0f6a8b698b8a2c7f /packages/host-bin | |
| parent | bf862168f0fd7b10d02ae04a9d82f7c37b9d85e5 (diff) | |
| download | dispatch-f6b45507210e04e9884256b0132900640de4334b.tar.gz dispatch-f6b45507210e04e9884256b0132900640de4334b.zip | |
feat(skills): skill system + load_skill tool via per-turn tools filter
Skills are markdown in .skills/ dirs (~/.skills + <cwd>/.skills, cwd shadows home;
name = filename). Format: line1 summary, line2 ---, body line3+; load strips the
first two lines; malformed = no summary but still loadable.
Mechanism (first use of the context-assembly filter chain, §3.2):
- kernel: expose HostAPI.applyFilters (delegates to bus.applyFilters)
- session-orchestrator: define/export toolsFilter + ToolAssembly; apply once per turn
before runTurn (cache-stable across steps), threading cwd + conversationId
- skills (new ext): pure parse/merge/render + load_skill tool (live read, path-contained)
+ a toolsFilter filter rewriting load_skill's description + name enum per cwd
- host-bin: register skills in CORE_EXTENSIONS
- transport-http: fix HostAPI test stub for the new applyFilters method (fan-out)
734 vitest + 109 bun = 843 tests; tsc -b EXIT 0; biome clean; clean live boot.
Diffstat (limited to 'packages/host-bin')
| -rw-r--r-- | packages/host-bin/package.json | 1 | ||||
| -rw-r--r-- | packages/host-bin/src/main.ts | 2 | ||||
| -rw-r--r-- | packages/host-bin/tsconfig.json | 1 |
3 files changed, 4 insertions, 0 deletions
diff --git a/packages/host-bin/package.json b/packages/host-bin/package.json index 9d29e4d..6a1d24a 100644 --- a/packages/host-bin/package.json +++ b/packages/host-bin/package.json @@ -11,6 +11,7 @@ "@dispatch/credential-store": "workspace:*", "@dispatch/provider-openai-compat": "workspace:*", "@dispatch/session-orchestrator": "workspace:*", + "@dispatch/skills": "workspace:*", "@dispatch/throughput-store": "workspace:*", "@dispatch/transport-http": "workspace:*", "@dispatch/tool-read-file": "workspace:*", diff --git a/packages/host-bin/src/main.ts b/packages/host-bin/src/main.ts index 588dfb8..ef75f55 100644 --- a/packages/host-bin/src/main.ts +++ b/packages/host-bin/src/main.ts @@ -20,6 +20,7 @@ import { } from "@dispatch/kernel"; import { extension as providerOpenaiCompatExt } from "@dispatch/provider-openai-compat"; import { extension as sessionOrchestratorExt } from "@dispatch/session-orchestrator"; +import { extension as skillsExt } from "@dispatch/skills"; import { createSqliteStorage, extension as storageSqliteExt } from "@dispatch/storage-sqlite"; import { createLoadedExtensionsExtension } from "@dispatch/surface-loaded-extensions"; import { createSurfaceRegistryExtension } from "@dispatch/surface-registry"; @@ -71,6 +72,7 @@ const CORE_EXTENSIONS: readonly Extension[] = [ toolWriteFileExt, throughputStoreExt, sessionOrchestratorExt, + skillsExt, createTransportHttpExtension(), // Surface extensions — dependency order: surface-registry first, then consumers. createSurfaceRegistryExtension(), diff --git a/packages/host-bin/tsconfig.json b/packages/host-bin/tsconfig.json index 9fedaf9..b357c51 100644 --- a/packages/host-bin/tsconfig.json +++ b/packages/host-bin/tsconfig.json @@ -11,6 +11,7 @@ { "path": "../tool-shell" }, { "path": "../tool-edit-file" }, { "path": "../tool-write-file" }, + { "path": "../skills" }, { "path": "../throughput-store" }, { "path": "../transport-http" }, { "path": "../transport-ws" } |
