summaryrefslogtreecommitdiffhomepage
path: root/packages/host-bin
diff options
context:
space:
mode:
authorAdam Malczewski <[email protected]>2026-06-10 16:01:33 +0900
committerAdam Malczewski <[email protected]>2026-06-10 16:01:33 +0900
commitbf862168f0fd7b10d02ae04a9d82f7c37b9d85e5 (patch)
tree073048a5775c605d8c28862d0f8c83e63327a17e /packages/host-bin
parent9e7554cde98f45df30dad1f9d356b6954138685b (diff)
downloaddispatch-bf862168f0fd7b10d02ae04a9d82f7c37b9d85e5.tar.gz
dispatch-bf862168f0fd7b10d02ae04a9d82f7c37b9d85e5.zip
feat(tools): add run_shell, edit_file, write_file + read_file directory listing
Four standard-tier tool extensions (one tool per extension, zero ABI change): - tool-read-file: read_file now lists directory contents (sorted, /-suffixed subdirs) - tool-shell: run_shell (foreground, streamed, cancellable, cwd, timeout + output cap) - tool-edit-file: edit_file (oldString/newString/replaceAll; errors on absent/non-unique) - tool-write-file: write_file (explicit overwrite flag) Registered in host-bin CORE_EXTENSIONS. Live boot clean (shell capability accepted). 686 vitest + 89 bun = 775 tests; tsc -b EXIT 0; biome clean.
Diffstat (limited to 'packages/host-bin')
-rw-r--r--packages/host-bin/package.json3
-rw-r--r--packages/host-bin/src/main.ts6
-rw-r--r--packages/host-bin/tsconfig.json3
3 files changed, 12 insertions, 0 deletions
diff --git a/packages/host-bin/package.json b/packages/host-bin/package.json
index ccaddd2..9d29e4d 100644
--- a/packages/host-bin/package.json
+++ b/packages/host-bin/package.json
@@ -14,6 +14,9 @@
"@dispatch/throughput-store": "workspace:*",
"@dispatch/transport-http": "workspace:*",
"@dispatch/tool-read-file": "workspace:*",
+ "@dispatch/tool-shell": "workspace:*",
+ "@dispatch/tool-edit-file": "workspace:*",
+ "@dispatch/tool-write-file": "workspace:*",
"@dispatch/journal-sink": "workspace:*",
"@dispatch/surface-loaded-extensions": "workspace:*",
"@dispatch/surface-registry": "workspace:*",
diff --git a/packages/host-bin/src/main.ts b/packages/host-bin/src/main.ts
index 7f219d1..588dfb8 100644
--- a/packages/host-bin/src/main.ts
+++ b/packages/host-bin/src/main.ts
@@ -24,7 +24,10 @@ 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 toolEditFileExt } from "@dispatch/tool-edit-file";
import { extension as toolReadFileExt } from "@dispatch/tool-read-file";
+import { extension as toolShellExt } from "@dispatch/tool-shell";
+import { extension as toolWriteFileExt } from "@dispatch/tool-write-file";
import { createTransportHttpExtension } from "@dispatch/transport-http";
import { createTransportWsExtension } from "@dispatch/transport-ws";
import type { ChildHandle } from "./collector-supervisor.js";
@@ -62,7 +65,10 @@ const CORE_EXTENSIONS: readonly Extension[] = [
conversationStoreExt,
authApikeyExt,
providerOpenaiCompatExt,
+ toolEditFileExt,
toolReadFileExt,
+ toolShellExt,
+ toolWriteFileExt,
throughputStoreExt,
sessionOrchestratorExt,
createTransportHttpExtension(),
diff --git a/packages/host-bin/tsconfig.json b/packages/host-bin/tsconfig.json
index 53762c7..9fedaf9 100644
--- a/packages/host-bin/tsconfig.json
+++ b/packages/host-bin/tsconfig.json
@@ -8,6 +8,9 @@
{ "path": "../surface-loaded-extensions" },
{ "path": "../surface-registry" },
{ "path": "../tool-read-file" },
+ { "path": "../tool-shell" },
+ { "path": "../tool-edit-file" },
+ { "path": "../tool-write-file" },
{ "path": "../throughput-store" },
{ "path": "../transport-http" },
{ "path": "../transport-ws" }