stitchkit 0.127.0 → 0.129.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +194 -6
- package/dist/agent-executor/acp/v1-connect.d.ts +9 -1
- package/dist/agent-executor/acp/v1-connect.d.ts.map +1 -1
- package/dist/agent-executor/acp/v1-driver.d.ts +8 -2
- package/dist/agent-executor/acp/v1-driver.d.ts.map +1 -1
- package/dist/agent-executor/acp/v1-map.d.ts.map +1 -1
- package/dist/agent-executor/acp/v1-session.d.ts +8 -0
- package/dist/agent-executor/acp/v1-session.d.ts.map +1 -1
- package/dist/agent-executor/claude/cli-driver.d.ts +4 -0
- package/dist/agent-executor/claude/cli-driver.d.ts.map +1 -1
- package/dist/agent-executor/claude/protocol.d.ts +20 -2
- package/dist/agent-executor/claude/protocol.d.ts.map +1 -1
- package/dist/agent-executor/claude/session.d.ts +2 -1
- package/dist/agent-executor/claude/session.d.ts.map +1 -1
- package/dist/agent-executor/claude/transcript.d.ts +9 -6
- package/dist/agent-executor/claude/transcript.d.ts.map +1 -1
- package/dist/agent-executor/claude-sdk/controls.d.ts +19 -0
- package/dist/agent-executor/claude-sdk/controls.d.ts.map +1 -0
- package/dist/agent-executor/claude-sdk/driver.d.ts +118 -4
- package/dist/agent-executor/claude-sdk/driver.d.ts.map +1 -1
- package/dist/agent-executor/claude-sdk/query-loop.d.ts +46 -0
- package/dist/agent-executor/claude-sdk/query-loop.d.ts.map +1 -0
- package/dist/agent-executor/claude-sdk/query-options.d.ts +27 -0
- package/dist/agent-executor/claude-sdk/query-options.d.ts.map +1 -0
- package/dist/agent-executor/claude-sdk/session.d.ts +6 -5
- package/dist/agent-executor/claude-sdk/session.d.ts.map +1 -1
- package/dist/agent-executor/codex/classify.d.ts.map +1 -1
- package/dist/agent-executor/codex/connect.d.ts +45 -0
- package/dist/agent-executor/codex/connect.d.ts.map +1 -0
- package/dist/agent-executor/codex/driver.d.ts +55 -10
- package/dist/agent-executor/codex/driver.d.ts.map +1 -1
- package/dist/agent-executor/codex/limits.d.ts +11 -2
- package/dist/agent-executor/codex/limits.d.ts.map +1 -1
- package/dist/agent-executor/codex/protocol.d.ts +75 -6
- package/dist/agent-executor/codex/protocol.d.ts.map +1 -1
- package/dist/agent-executor/codex/session-controls.d.ts +155 -0
- package/dist/agent-executor/codex/session-controls.d.ts.map +1 -0
- package/dist/agent-executor/codex/session.d.ts +28 -30
- package/dist/agent-executor/codex/session.d.ts.map +1 -1
- package/dist/agent-executor/codex/unix-socket-target.d.ts +26 -0
- package/dist/agent-executor/codex/unix-socket-target.d.ts.map +1 -0
- package/dist/agent-executor/codex/unix-socket.d.ts +26 -0
- package/dist/agent-executor/codex/unix-socket.d.ts.map +1 -0
- package/dist/agent-executor/codex/ws-frame.d.ts +15 -0
- package/dist/agent-executor/codex/ws-frame.d.ts.map +1 -0
- package/dist/agent-executor/contract.d.ts +2 -0
- package/dist/agent-executor/contract.d.ts.map +1 -1
- package/dist/agent-executor/engine-process.d.ts +9 -0
- package/dist/agent-executor/engine-process.d.ts.map +1 -1
- package/dist/agent-executor/hello.d.ts +8 -0
- package/dist/agent-executor/hello.d.ts.map +1 -1
- package/dist/agent-executor/image-input.d.ts +71 -0
- package/dist/agent-executor/image-input.d.ts.map +1 -0
- package/dist/agent-executor/session-primitives.d.ts +0 -3
- package/dist/agent-executor/session-primitives.d.ts.map +1 -1
- package/dist/agent-runtime/agent-tool.d.ts +21 -7
- package/dist/agent-runtime/agent-tool.d.ts.map +1 -1
- package/dist/agent-runtime/branch-contract.d.ts +1 -0
- package/dist/agent-runtime/branch-contract.d.ts.map +1 -1
- package/dist/agent-runtime/branch-identities.d.ts +5 -2
- package/dist/agent-runtime/branch-identities.d.ts.map +1 -1
- package/dist/agent-runtime/branch-messages.d.ts +9 -9
- package/dist/agent-runtime/branch-messages.d.ts.map +1 -1
- package/dist/agent-runtime/branch-observations.d.ts +49 -36
- package/dist/agent-runtime/branch-observations.d.ts.map +1 -1
- package/dist/agent-runtime/branch-provider.d.ts +14 -8
- package/dist/agent-runtime/branch-provider.d.ts.map +1 -1
- package/dist/agent-runtime/branch-source.d.ts +13 -1
- package/dist/agent-runtime/branch-source.d.ts.map +1 -1
- package/dist/agent-runtime/child-tools.d.ts +64 -0
- package/dist/agent-runtime/child-tools.d.ts.map +1 -1
- package/dist/agent-runtime/event-search-tools.d.ts +82 -5
- package/dist/agent-runtime/event-search-tools.d.ts.map +1 -1
- package/dist/agent-runtime/invocation-attempt.d.ts +1 -1
- package/dist/agent-runtime/invocation-attempt.d.ts.map +1 -1
- package/dist/agent-runtime/invocation-payload.d.ts +12 -0
- package/dist/agent-runtime/invocation-payload.d.ts.map +1 -1
- package/dist/agent-runtime/invocation-read.d.ts +6 -3
- package/dist/agent-runtime/invocation-read.d.ts.map +1 -1
- package/dist/agent-runtime/invocation-schema.d.ts +50 -8
- package/dist/agent-runtime/invocation-schema.d.ts.map +1 -1
- package/dist/agent-runtime/invocations.d.ts +20 -9
- package/dist/agent-runtime/invocations.d.ts.map +1 -1
- package/dist/agent-runtime/postgres.d.ts.map +1 -1
- package/dist/agent-runtime/schedule-tools.d.ts +30 -0
- package/dist/agent-runtime/schedule-tools.d.ts.map +1 -1
- package/dist/agent-runtime/schemas-invocation-payload.d.ts +48 -0
- package/dist/agent-runtime/schemas-invocation-payload.d.ts.map +1 -0
- package/dist/agent-runtime/sql-events.d.ts.map +1 -1
- package/dist/agent-runtime/sql-rows.d.ts +10 -10
- package/dist/agent-runtime/sql-session.d.ts +11 -0
- package/dist/agent-runtime/sql-session.d.ts.map +1 -1
- package/dist/agent-runtime/sqlite-transactions.d.ts.map +1 -1
- package/dist/agent-runtime/state-tools.d.ts +55 -0
- package/dist/agent-runtime/state-tools.d.ts.map +1 -1
- package/dist/agent-runtime/store-branch.d.ts.map +1 -1
- package/dist/agent-runtime/store-conformance-lifecycle.d.ts +20 -20
- package/dist/agent-runtime/store-conformance-support.d.ts +10 -10
- package/dist/agent-runtime/store-create.d.ts.map +1 -1
- package/dist/agent-runtime/store-driver-contract.d.ts +12 -0
- package/dist/agent-runtime/store-driver-contract.d.ts.map +1 -1
- package/dist/agent-runtime/store-memory-events.d.ts.map +1 -1
- package/dist/agent-runtime/store.d.ts +7 -0
- package/dist/agent-runtime/store.d.ts.map +1 -1
- package/dist/agent-runtime/terminal-commit.d.ts +10 -10
- package/dist/declaration/declaration.d.ts +6 -3
- package/dist/declaration/declaration.d.ts.map +1 -1
- package/dist/entrypoints/agent-executor/acp.d.ts +1 -1
- package/dist/entrypoints/agent-executor/acp.d.ts.map +1 -1
- package/dist/entrypoints/agent-executor/acp.js +28 -17
- package/dist/entrypoints/agent-executor/claude-sdk.d.ts +1 -1
- package/dist/entrypoints/agent-executor/claude-sdk.d.ts.map +1 -1
- package/dist/entrypoints/agent-executor/claude-sdk.js +543 -96
- package/dist/entrypoints/agent-executor/claude.js +40 -21
- package/dist/entrypoints/agent-executor/codex.d.ts +4 -0
- package/dist/entrypoints/agent-executor/codex.d.ts.map +1 -1
- package/dist/entrypoints/agent-executor/codex.js +1530 -207
- package/dist/entrypoints/agent-executor.js +7 -7
- package/dist/entrypoints/agent-runtime/browser.js +1 -1
- package/dist/entrypoints/agent-runtime/coding-tools.js +3 -3
- package/dist/entrypoints/agent-runtime/harness.js +10 -11
- package/dist/entrypoints/agent-runtime/openrouter.js +4 -4
- package/dist/entrypoints/agent-runtime/postgres.js +12 -7
- package/dist/entrypoints/agent-runtime/realtime.js +4 -4
- package/dist/entrypoints/agent-runtime/sandbox.js +7 -7
- package/dist/entrypoints/agent-runtime/sqlite/bun.js +7 -7
- package/dist/entrypoints/agent-runtime/sqlite/node.js +7 -7
- package/dist/entrypoints/agent-runtime/testing.js +9 -9
- package/dist/entrypoints/agent-runtime.d.ts +9 -7
- package/dist/entrypoints/agent-runtime.d.ts.map +1 -1
- package/dist/entrypoints/agent-runtime.js +254 -207
- package/dist/entrypoints/application/diagnostic-journal.js +4 -4
- package/dist/entrypoints/application/directory-inbox.js +8 -8
- package/dist/entrypoints/application/opentelemetry.js +2 -2
- package/dist/entrypoints/application.js +2 -2
- package/dist/entrypoints/cli/publish.js +8 -8
- package/dist/entrypoints/cli.js +12 -11
- package/dist/entrypoints/contract.js +2 -2
- package/dist/entrypoints/declaration.js +0 -1
- package/dist/entrypoints/files/packaging.js +2 -2
- package/dist/entrypoints/files.js +42 -19
- package/dist/entrypoints/handler.js +4 -4
- package/dist/entrypoints/http.js +5 -5
- package/dist/entrypoints/index.js +7 -7
- package/dist/entrypoints/node.js +7 -7
- package/dist/entrypoints/observability.js +4 -4
- package/dist/entrypoints/primitives.js +2 -2
- package/dist/entrypoints/process.js +6 -6
- package/dist/entrypoints/react.js +1 -1
- package/dist/entrypoints/remote.js +2 -2
- package/dist/entrypoints/server.js +10 -10
- package/dist/entrypoints/service-host/macos.js +6 -6
- package/dist/entrypoints/service-host.d.ts +4 -1
- package/dist/entrypoints/service-host.d.ts.map +1 -1
- package/dist/entrypoints/service-host.js +835 -224
- package/dist/entrypoints/spend.js +1 -1
- package/dist/entrypoints/sync/postgres.js +1 -1
- package/dist/entrypoints/sync.js +2 -2
- package/dist/entrypoints/telegram.js +5 -5
- package/dist/entrypoints/testing.js +5 -5
- package/dist/entrypoints/tools/agent.js +5 -4
- package/dist/entrypoints/tools/connections.js +2 -2
- package/dist/entrypoints/tools/invoker.js +4 -3
- package/dist/entrypoints/tools/mcp.js +5 -4
- package/dist/entrypoints/tools/toolkit.js +8 -7
- package/dist/entrypoints/tools.d.ts +1 -1
- package/dist/entrypoints/tools.d.ts.map +1 -1
- package/dist/entrypoints/tools.js +15 -13
- package/dist/entrypoints/tracking/contract.js +1 -1
- package/dist/entrypoints/xlsx.js +1 -1
- package/dist/files/directory-appearance.d.ts +20 -9
- package/dist/files/directory-appearance.d.ts.map +1 -1
- package/dist/files/polled-json.d.ts.map +1 -1
- package/dist/files/regular-file.d.ts +15 -5
- package/dist/files/regular-file.d.ts.map +1 -1
- package/dist/{index-prf6ayhf.js → index-13wmzpa6.js} +1 -1
- package/dist/{index-qnzhmk2s.js → index-17qgm6xe.js} +91 -48
- package/dist/{index-wv8dqy7q.js → index-205456mf.js} +1 -1
- package/dist/{index-3gwp8ez6.js → index-21cfxc4z.js} +13 -18
- package/dist/{index-xtkw9866.js → index-2c5w2d1d.js} +1 -1
- package/dist/{index-g1q7fwn9.js → index-2nwvn7m2.js} +1 -1
- package/dist/{index-d4svrknj.js → index-39c2hj6h.js} +2 -2
- package/dist/{index-sfzfd2m2.js → index-39rmc00v.js} +1 -1
- package/dist/{index-ky3ardqn.js → index-3fym4j8n.js} +1 -1
- package/dist/{index-d96c1n1q.js → index-5tdc0q43.js} +20 -19
- package/dist/{index-3ypvpkwr.js → index-669374qc.js} +1 -1
- package/dist/{index-x90w78yz.js → index-673drwkn.js} +23 -8
- package/dist/{index-83n766x4.js → index-7jqn3b3g.js} +16 -10
- package/dist/{index-5jyjb4s0.js → index-80acsm27.js} +1 -1
- package/dist/{index-xmr47znh.js → index-827bgv33.js} +1 -1
- package/dist/{index-xypxnzhp.js → index-93n6jwy0.js} +4 -4
- package/dist/{index-wbnpa8z6.js → index-9kpxz49v.js} +5 -5
- package/dist/{index-fcw255hd.js → index-9sfhje6y.js} +3 -3
- package/dist/{index-bh4pmtr9.js → index-afb6z77w.js} +3 -1
- package/dist/{index-9y0afd5f.js → index-apf5g7y9.js} +1 -1
- package/dist/{index-4qvyhn23.js → index-bjmj2q1z.js} +1 -1
- package/dist/{index-bbzvrq66.js → index-dcsxj68j.js} +457 -204
- package/dist/{index-j516jaaz.js → index-dnzxxf8a.js} +49 -2
- package/dist/{index-kmbpej2y.js → index-emgrmavr.js} +102 -61
- package/dist/index-fgahdc7s.js +100 -0
- package/dist/{index-kzavdze2.js → index-gr0kxymw.js} +5 -1
- package/dist/{index-e06z0tkb.js → index-gya4hwh3.js} +2 -2
- package/dist/{index-3djgv3ch.js → index-hab790s6.js} +26 -11
- package/dist/{index-j13gzgdv.js → index-j0ef04jw.js} +9 -5
- package/dist/{index-rhb33thr.js → index-jcge9tx3.js} +1 -1
- package/dist/{index-dvd1qdwa.js → index-ke02kxsr.js} +3 -3
- package/dist/{index-3agqmmrg.js → index-mkfhpk11.js} +7 -9
- package/dist/{index-a725ayvz.js → index-mttkdm5a.js} +1 -1
- package/dist/{index-9wh98cpa.js → index-n3bm7zqq.js} +131 -91
- package/dist/{index-7xp05h20.js → index-p06z7g7w.js} +7 -7
- package/dist/{index-kt6dh1n6.js → index-p16q492v.js} +1 -1
- package/dist/{index-5zwac8ft.js → index-pp97q86a.js} +3 -3
- package/dist/{index-39n02e0q.js → index-psye60qn.js} +1 -1
- package/dist/{index-5ptwb6ka.js → index-pzhqydxb.js} +1 -1
- package/dist/{index-7kfcb576.js → index-qa2jjb65.js} +1 -1
- package/dist/{index-0djnptn8.js → index-qhjmmsm2.js} +10 -3
- package/dist/{index-7grgs8cx.js → index-qpzyahe3.js} +2 -2
- package/dist/{index-8xr2eq99.js → index-r97ppg0g.js} +4 -4
- package/dist/{index-bmaz3jzy.js → index-rjs94dny.js} +1 -1
- package/dist/{index-p1m9djt6.js → index-rxh3qy4x.js} +33 -6
- package/dist/{index-en8e5zsj.js → index-ryxb427v.js} +1 -1
- package/dist/{index-nbv44x0x.js → index-s2e3h616.js} +137 -36
- package/dist/{index-dwa6pskj.js → index-sd4e5x5j.js} +86 -47
- package/dist/{index-g56ht6qf.js → index-t3qcac2a.js} +1 -1
- package/dist/index-vgzhw2zk.js +304 -0
- package/dist/{index-jrka9029.js → index-vmbxj75t.js} +2 -2
- package/dist/{index-caywx1c0.js → index-wv2amqm4.js} +109 -12
- package/dist/{index-5e0zsbf7.js → index-x2fb37t0.js} +2 -2
- package/dist/{index-z4k0hqp9.js → index-y71zn1gw.js} +137 -27
- package/dist/{index-wavv538x.js → index-ybdq8kk2.js} +3 -3
- package/dist/{index-4gk6k3zc.js → index-ycr4pk0z.js} +1 -1
- package/dist/{index-0tyt97nk.js → index-yrr3n391.js} +1 -1
- package/dist/{index-v37b2cd6.js → index-z20pdxeb.js} +2 -2
- package/dist/{index-0hdm5sx6.js → index-z9d74jmb.js} +8 -4
- package/dist/{index-4s2w4g37.js → index-zhshhxew.js} +80 -2
- package/dist/{index-3b31z0pc.js → index-znd1b57f.js} +12 -6
- package/dist/internal/bounded-file-confirm.d.ts +32 -0
- package/dist/internal/bounded-file-confirm.d.ts.map +1 -0
- package/dist/internal/bounded-file-read.d.ts +10 -7
- package/dist/internal/bounded-file-read.d.ts.map +1 -1
- package/dist/internal/file-observation.d.ts +5 -1
- package/dist/internal/file-observation.d.ts.map +1 -1
- package/dist/internal/positive-integer.d.ts +2 -0
- package/dist/internal/positive-integer.d.ts.map +1 -1
- package/dist/internal/process-instance.d.ts +8 -0
- package/dist/internal/process-instance.d.ts.map +1 -1
- package/dist/internal/unix-socket.d.ts +10 -1
- package/dist/internal/unix-socket.d.ts.map +1 -1
- package/dist/server/unix-client.d.ts +7 -0
- package/dist/server/unix-client.d.ts.map +1 -1
- package/dist/service-host/systemd-inspect.d.ts +3 -1
- package/dist/service-host/systemd-inspect.d.ts.map +1 -1
- package/dist/service-host/systemd-render-shared.d.ts +64 -0
- package/dist/service-host/systemd-render-shared.d.ts.map +1 -0
- package/dist/service-host/systemd-render.d.ts +31 -26
- package/dist/service-host/systemd-render.d.ts.map +1 -1
- package/dist/service-host/systemd-timer-render.d.ts +31 -0
- package/dist/service-host/systemd-timer-render.d.ts.map +1 -0
- package/dist/service-host/systemd-timer-rollback.d.ts +26 -0
- package/dist/service-host/systemd-timer-rollback.d.ts.map +1 -0
- package/dist/service-host/systemd-timer.d.ts +82 -0
- package/dist/service-host/systemd-timer.d.ts.map +1 -0
- package/dist/service-host/systemd-unit-ops.d.ts +26 -0
- package/dist/service-host/systemd-unit-ops.d.ts.map +1 -0
- package/dist/service-host/systemd.d.ts +1 -1
- package/dist/service-host/systemd.d.ts.map +1 -1
- package/dist/tools/access.d.ts +30 -1
- package/dist/tools/access.d.ts.map +1 -1
- package/dist/tools/agent.d.ts +2 -2
- package/dist/tools/agent.d.ts.map +1 -1
- package/dist/tools/cli/args-scan.d.ts +5 -0
- package/dist/tools/cli/args-scan.d.ts.map +1 -1
- package/dist/tools/cli/args.d.ts +11 -5
- package/dist/tools/cli/args.d.ts.map +1 -1
- package/dist/tools/cli/invoke.d.ts +2 -1
- package/dist/tools/cli/invoke.d.ts.map +1 -1
- package/dist/tools/cli/notices.d.ts.map +1 -1
- package/dist/tools/cli/run-managed.d.ts.map +1 -1
- package/dist/tools/cli/session.d.ts.map +1 -1
- package/dist/tools/execute.d.ts.map +1 -1
- package/dist/tools/invoker.d.ts +2 -1
- package/dist/tools/invoker.d.ts.map +1 -1
- package/dist/tools/list-names.d.ts +2 -3
- package/dist/tools/list-names.d.ts.map +1 -1
- package/dist/tools/manifest.d.ts +2 -3
- package/dist/tools/manifest.d.ts.map +1 -1
- package/dist/tools/mcp/mount.d.ts +5 -5
- package/dist/tools/mcp/mount.d.ts.map +1 -1
- package/dist/tools/mcp/register.d.ts +2 -1
- package/dist/tools/mcp/register.d.ts.map +1 -1
- package/dist/tools/mcp/runtime-tools.d.ts.map +1 -1
- package/llms/agent-executor-acp.txt +10 -6
- package/llms/agent-executor-claude-sdk.txt +13 -10
- package/llms/agent-executor-claude.txt +2 -2
- package/llms/agent-executor-codex.txt +9 -3
- package/llms/agent-executor.txt +2 -2
- package/llms/agent-runtime.4.txt +21 -9
- package/llms/cli.3.txt +4 -4
- package/llms/cli.txt +1 -0
- package/llms/declaration.txt +2 -2
- package/llms/files.txt +1 -1
- package/llms/node.txt +2 -2
- package/llms/server.5.txt +2 -2
- package/llms/service-host.txt +5 -5
- package/llms/stitchkit.txt +81 -77
- package/llms/tools.3.txt +3 -2
- package/llms/upgrading-0.128.0-0.129.0.txt +175 -0
- package/llms/upgrading.txt +1 -0
- package/llms-full.txt +323 -127
- package/llms.txt +15 -14
- package/package.json +1 -1
- package/dist/index-ajmtxsky.js +0 -193
- package/dist/index-ax3wns1a.js +0 -93
package/CHANGELOG.md
CHANGED
|
@@ -15,6 +15,194 @@ additive**; the first breaking change landed in 0.10.0. Grep the file for
|
|
|
15
15
|
|
|
16
16
|
## [Unreleased]
|
|
17
17
|
|
|
18
|
+
## [0.129.0] - 2026-11-25
|
|
19
|
+
|
|
20
|
+
### ⚠️ Breaking changes
|
|
21
|
+
|
|
22
|
+
**Who must act:** every caller of `codexPlanWindows` or `createCodexDriver` (`status()`) from
|
|
23
|
+
`stitchkit/agent-executor/codex` that matches window names against `'primary'` or `'secondary'`
|
|
24
|
+
([migration](docs/guide/upgrading.md#codex-plan-window-keys)).
|
|
25
|
+
|
|
26
|
+
- `stitchkit/agent-executor/codex` `codexPlanWindows` and `createCodexDriver` (`status()`) now
|
|
27
|
+
unfold the full `account/rateLimits/read` envelope (including multi-bucket `rateLimitsByLimitId`)
|
|
28
|
+
and key windows as `<limitId|limit>:<windowDurationMins>m` (falling back to `:<slot>` when
|
|
29
|
+
duration is absent, or adding `:<slot>` when both slots share a duration) instead of bare
|
|
30
|
+
`'primary'` / `'secondary'`. Positional names dropped per-model quota buckets and allowed a
|
|
31
|
+
weekly-only window delivered in `primary` to overwrite a five-hour window. Each window also
|
|
32
|
+
carries optional `windowDurationMins` and `label` on `PlanWindowSchema`.
|
|
33
|
+
`windows.find(w => w.name === 'primary')` →
|
|
34
|
+
`windows.find(w => w.windowDurationMins === 300)` (or match `w.name` such as `'codex:300m'` / `'limit:10080m'`).
|
|
35
|
+
**Affects:** `stitchkit/agent-executor/codex` codexPlanWindows, createCodexDriver(status)
|
|
36
|
+
|
|
37
|
+
### Added
|
|
38
|
+
|
|
39
|
+
- `stitchkit/agent-executor/claude-sdk` — extended `createClaudeSdkDriver`, `ClaudeSdkDriver`, and
|
|
40
|
+
`ClaudeSdkSession` with host launch and delegation options (`pathToClaudeCodeExecutable`,
|
|
41
|
+
`systemPrompt`, `settingSources`, `enableFileCheckpointing`, `allowDangerouslySkipPermissions`,
|
|
42
|
+
`supportedDialogKinds`, `onUserDialog`, `hooks`, `tools`, `allowedTools`, `disallowedTools`,
|
|
43
|
+
`mcpServers`, `mcpServersDelivery`, `strictMcpConfig`, `plugins`, `agents`, `extraArgs`,
|
|
44
|
+
`stderr`, `spawnClaudeCodeProcess`), `providerPid` / `onProviderPid` observation with safe stderr
|
|
45
|
+
draining, fail-closed `verifyDelegation` (`requireHooksApplied`, `requireNoMcpServers`,
|
|
46
|
+
`timeoutMs`) at `open()` and every query restart, `driver.forkSession()`, and 12 live
|
|
47
|
+
`ClaudeSdkSession` controls (`setModel`, `setPermissionMode`, `applyFlagSettings`,
|
|
48
|
+
`initializationResult`, `supportedModels`, `supportedCommands`, `accountInfo`, `getContextUsage`,
|
|
49
|
+
`mcpServerStatus`, `toggleMcpServer`, `reconnectMcpServer`, `rewindFiles`) with live state
|
|
50
|
+
replayed across query restarts.
|
|
51
|
+
- `stitchkit/agent-executor/codex` — extended `createCodexDriver`, `CodexDriver`, and
|
|
52
|
+
`CodexSession` with RFC 6455 WebSocket-over-Unix-socket transport (`unix-listen` with
|
|
53
|
+
`--listen unix://<path>` and `unix-connect` against an existing server, plus typed
|
|
54
|
+
`CodexUnixSocketError`), `serverArgs`, `providerPid`, thread policy & delegation configuration
|
|
55
|
+
(`developerInstructions`, `modelProvider`, `runtimeWorkspaceRoots`, `config`, `prepareThread`,
|
|
56
|
+
`verifyThread`, and applied `threadContext`), per-turn overrides on `startTurn` (`model`,
|
|
57
|
+
fail-closed `modelProvider`, `reasoningEffort`, `collaborationMode`, `approvalPolicy`,
|
|
58
|
+
`sandboxPolicy`, `runtimeWorkspaceRoots`), and live `CodexSession` controls (`readConfig`,
|
|
59
|
+
`listMcpServerStatus`, `listSkills`, `listModels`, `readAccount`, `readRateLimits`, `steerTurn`,
|
|
60
|
+
non-mutating `forkThread`, `compactThread`).
|
|
61
|
+
- `stitchkit/agent-executor` — added optional `windowDurationMins` and `label` fields to
|
|
62
|
+
`PlanWindowSchema`, and optional `pid`, `pidReady`, and `stdoutMode` (`'lines' | 'drain'`) to
|
|
63
|
+
`EngineProcess` / `spawnEngineProcess`.
|
|
64
|
+
|
|
65
|
+
### Fixed
|
|
66
|
+
|
|
67
|
+
- `stitchkit/agent-executor/claude`, `stitchkit/agent-executor/claude-sdk` `claudeTranscriptPath`
|
|
68
|
+
now resolves the canonical `realpath` of `cwd` (or its nearest existing ancestor) before
|
|
69
|
+
computing the project transcript slug, so symlinked workspaces (such as `/var` → `/private/var`
|
|
70
|
+
or `/tmp` → `/private/tmp`) match the transcript written by Claude Code for both `findInput`
|
|
71
|
+
reconciliation and `open` resume detection, while failing closed on symlink loops or permission
|
|
72
|
+
errors.
|
|
73
|
+
**Affects:** `stitchkit/agent-executor/claude` claudeTranscriptPath, createClaudeCliDriver(findInput, open); `stitchkit/agent-executor/claude-sdk` createClaudeSdkDriver(findInput, open)
|
|
74
|
+
|
|
75
|
+
## [0.128.0] - 2026-11-25
|
|
76
|
+
|
|
77
|
+
### ⚠️ Breaking changes
|
|
78
|
+
|
|
79
|
+
**Who must act:** every caller of `createModelInvocationLedger` from `stitchkit/agent-runtime` that
|
|
80
|
+
reads `readPayload`, assumes `sent.artifactId` or a `provider/response` record's `artifactId` is
|
|
81
|
+
always present, switches exhaustively on `ModelInvocationConfig.authorize` actions, or relies on
|
|
82
|
+
`maxPayloadBytes` aborting the provider call
|
|
83
|
+
([migration](docs/guide/upgrading.md#invocation-payload-lifecycle)); every caller of
|
|
84
|
+
`extractCliGlobalOptions` or `scanCliInvocation` from `stitchkit/cli` that caught `CliArgumentError`
|
|
85
|
+
on call or on `.argv` access ([migration](docs/guide/upgrading.md#cli-option-projections-error-field));
|
|
86
|
+
and every repository with a `project.json` validated by `stitchkit/declaration` that still declares
|
|
87
|
+
`identity.version` ([migration](docs/guide/upgrading.md#declaration-single-version)).
|
|
88
|
+
|
|
89
|
+
- `stitchkit/agent-runtime` `createModelInvocationLedger` makes `maxPayloadBytes` non-fatal and adds
|
|
90
|
+
encrypted payload expiry redaction (`purgePayloads` / `store.purgeExpiredPayloads`). Exceeding
|
|
91
|
+
`maxPayloadBytes` previously failed the call before or after provider execution, and encrypted
|
|
92
|
+
payload artifacts had no retention purge path. Oversized request/response bodies now omit the
|
|
93
|
+
encrypted artifact with `payloadOmitted: 'max-payload-bytes'` (making `sent.artifactId` on
|
|
94
|
+
`provider/request` and top-level `artifactId` on `provider/response` optional while preserving
|
|
95
|
+
`payloadSha256`) and report `InvocationPayloadTooLargeError` via `complete().receiptError`;
|
|
96
|
+
`readPayload` now returns a discriminated `ModelInvocationPayloadRead`
|
|
97
|
+
(`{ status: 'available', payload, ... }` or `{ status: 'expired', expiredAt, ... }`); and
|
|
98
|
+
`ModelInvocationConfig.authorize` receives a fifth action `'purge-payloads'` alongside
|
|
99
|
+
`'complete'`, `'agent'`, `'read'`, and `'read-payload'` (`ModelInvocationAuthorizationInput`).
|
|
100
|
+
`const body = (await ledger.readPayload(in, ctx)).payload` →
|
|
101
|
+
`const res = await ledger.readPayload(in, ctx); if (res.status === 'available') { … }`.
|
|
102
|
+
**Affects:** `stitchkit/agent-runtime` createModelInvocationLedger, ModelInvocationLedger(readPayload, purgePayloads), ModelInvocationConfig(maxPayloadBytes, authorize), ModelInvocationRecordSchema, ModelInvocationRecord, ModelInvocationPayloadReadSchema, ModelInvocationPayloadRead, ModelInvocationAuthorizationInput, InvocationPayloadTooLargeError, createAgentRuntimeStore, createMemoryAgentRuntimeStore, AgentRuntimeStore(purgeExpiredPayloads)
|
|
103
|
+
- `stitchkit/cli` `extractCliGlobalOptions` and `scanCliInvocation` return malformed CLI flag
|
|
104
|
+
errors on an `error?: CliArgumentError` field instead of throwing on call or via a throwing
|
|
105
|
+
`.argv` getter. Dynamic-catalog entrypoints calling `extractCliGlobalOptions` before `createCli`
|
|
106
|
+
had to wrap the helper in `try/catch` and avoid spreading the returned object whenever a user
|
|
107
|
+
passed malformed flags. On error, `extractCliGlobalOptions` returns `argv: []` and
|
|
108
|
+
`scanCliInvocation` returns `command: undefined` and `commandTokens: []` alongside `error`, while
|
|
109
|
+
early notices suppress when `scan.error !== undefined || scan.framework.quiet`. `routeCliArgv`
|
|
110
|
+
preserves its `error?: string` field.
|
|
111
|
+
`try { const p = extractCliGlobalOptions(argv, g); void p.argv } catch (e) { … }` →
|
|
112
|
+
`const p = extractCliGlobalOptions(argv, g); if (p.error) { … }`. → ADR 0327
|
|
113
|
+
**Affects:** `stitchkit/cli` extractCliGlobalOptions, scanCliInvocation, CliGlobalOptionsParse(argv, error), CliInvocationScan(command, commandTokens, error)
|
|
114
|
+
- `stitchkit/declaration` `ProjectIdentitySchema` removes `identity.version` so the root
|
|
115
|
+
`package.json` is the single source of truth for a project's version (supporting both SemVer and
|
|
116
|
+
CalVer without a second copy in `project.json`). Because `ProjectIdentitySchema` is strict, a
|
|
117
|
+
`project.json` carrying `identity.version` is now refused. `starter.version` (the scaffolder
|
|
118
|
+
package version) is unchanged.
|
|
119
|
+
`{ "identity": { "slug": "app", "name": "App", "version": "0.1.0", "description": { "en": "…" } } }` →
|
|
120
|
+
`{ "identity": { "slug": "app", "name": "App", "description": { "en": "…" } } }`.
|
|
121
|
+
**Affects:** `stitchkit/declaration` ProjectIdentitySchema, ProjectIdentity, ProjectDeclarationSchema, ProjectDeclaration, parseProjectDeclaration, findProjectRole
|
|
122
|
+
|
|
123
|
+
### Added
|
|
124
|
+
|
|
125
|
+
- `stitchkit/agent-executor/claude`, `stitchkit/agent-executor/claude-sdk`, and
|
|
126
|
+
`stitchkit/agent-executor/codex`: turn-input image attachments via optional `resolveFile` and
|
|
127
|
+
`maxImageBytes` (default 5 MiB) on `ClaudeCliDriverConfig`, `ClaudeSdkDriverConfig`, and
|
|
128
|
+
`CodexDriverConfig`, encoding ordered text and base64 image blocks/data URLs and failing closed
|
|
129
|
+
before dispatch on unsupported media types, oversize payloads, or unresolved references.
|
|
130
|
+
- `stitchkit/agent-executor/acp`: `AcpApprovalEnforcement` (`'agent-initiated'`) on
|
|
131
|
+
`AcpDriver.approvalEnforcement` and `AcpSession.approvalEnforcement`, advertising that ACP
|
|
132
|
+
tool approvals are initiated by the agent and answered by the host without fabricating approval
|
|
133
|
+
prompts for unprompted tool calls.
|
|
134
|
+
- `stitchkit/files`: `match?: 'directory' | 'entry'` on `waitForDirectory` (`WaitForDirectoryOptions`),
|
|
135
|
+
allowing callers to wake when any filesystem entry (regular file, broken or cyclic symlink, or
|
|
136
|
+
directory) appears at the target path while still refusing intermediate non-directory components.
|
|
137
|
+
- `stitchkit/service-host`: extended `SystemdServiceUnitConfig` with `startLimitIntervalSec`,
|
|
138
|
+
`successExitStatus`, `timeoutStartSec`, `dynamicUser`, `nice`, `ioSchedulingClass`,
|
|
139
|
+
`privateNetwork`, `privateTmp`, `protectSystem`, `protectHome`, `restrictAddressFamilies`,
|
|
140
|
+
`bindReadOnlyPaths` (`SystemdBindReadOnlyPath`), `runtimeDirectoryMode`, `stateDirectory`, and
|
|
141
|
+
`stateDirectoryMode`, plus `.timer` rendering (`renderSystemdTimerUnit`, `SystemdTimerUnitConfig`,
|
|
142
|
+
`SystemdTimerUnitConfigSchema`) and rollback-guarded `.service` + `.timer` pair inspection and
|
|
143
|
+
installation (per-file atomic writes with rollback: `checkSystemdTimerPair`,
|
|
144
|
+
`installSystemdTimerPair`, `CheckSystemdTimerPairOptions`, `SystemdTimerPairCheckResult`,
|
|
145
|
+
`InstallSystemdTimerPairOptions`, `SystemdTimerPairInstallResult`).
|
|
146
|
+
- `stitchkit/agent-runtime`: `sourceIdentity: 'rekey-spill'` on `BranchAgentConversationInput.applicationKeys`,
|
|
147
|
+
rekeying declared application tool JSON fields that carry source spill references (live or
|
|
148
|
+
legitimately expired) while refusing foreign spills and all other source identities (→ ADR 0328).
|
|
149
|
+
- `stitchkit/agent-runtime`: `ModelInvocationLedger.purgePayloads` and
|
|
150
|
+
`AgentRuntimeStore.purgeExpiredPayloads` (`PurgeInvocationPayloadsInput`,
|
|
151
|
+
`PurgeInvocationPayloadsResult`) to redact expired encrypted invocation payloads in-place across
|
|
152
|
+
memory, SQLite (including `events_fts`), and Postgres (including `event_search`) in bounded pages
|
|
153
|
+
without losing receipt metadata or digests.
|
|
154
|
+
- `stitchkit/agent-runtime` and `stitchkit/tools`: deeply frozen non-executable static catalog
|
|
155
|
+
descriptors (`AgentToolDescriptor`, `AGENT_STATE_TOOL_DESCRIPTORS`,
|
|
156
|
+
`AGENT_SCHEDULE_TOOL_DESCRIPTORS`, `AGENT_CHILD_TOOL_DESCRIPTORS`,
|
|
157
|
+
`AGENT_EVENT_SEARCH_TOOL_DESCRIPTORS`) and widened `listToolNames`, `buildToolManifest`, and
|
|
158
|
+
`describeToolCatalog` to accept `SurfaceRuntimeToolDefinition` (exported from `stitchkit/tools`)
|
|
159
|
+
so hosts can inspect full tool catalogs without an active run.
|
|
160
|
+
- `stitchkit/tools`, `stitchkit/tools/agent`, `stitchkit/tools/mcp`, `stitchkit/tools/invoker`,
|
|
161
|
+
`stitchkit/cli`, and `stitchkit/agent-runtime`: `access: { inspect: true }` on `ToolAccess` for
|
|
162
|
+
read-only surface inspection (catalogs, schemas, `--help`, `--schema`, `commands`) that refuses
|
|
163
|
+
every tool invocation fail-closed with `FORBIDDEN` before extensions, hooks, durability,
|
|
164
|
+
multi-round handlers, or auth run.
|
|
165
|
+
|
|
166
|
+
### Fixed
|
|
167
|
+
|
|
168
|
+
- `stitchkit/agent-executor/claude` and `stitchkit/agent-executor/claude-sdk`: stream Claude Code
|
|
169
|
+
transcripts line-by-line during `findInput` instead of reading the whole file into a 64 MiB string
|
|
170
|
+
buffer, matching only `type === 'user'` records (never mistaking assistant UUIDs for accepted user
|
|
171
|
+
input) and failing closed on corrupt or overlong records while enforcing a 16 MiB per-record memory
|
|
172
|
+
ceiling.
|
|
173
|
+
**Affects:** `stitchkit/agent-executor/claude` createClaudeCliDriver; `stitchkit/agent-executor/claude-sdk` createClaudeSdkDriver
|
|
174
|
+
- `stitchkit/agent-executor/codex`: paginate `thread/turns/list` across all pages (up to 256 pages)
|
|
175
|
+
in `findInput` with cycle/cursor guards instead of stopping after the first page.
|
|
176
|
+
**Affects:** `stitchkit/agent-executor/codex` createCodexDriver
|
|
177
|
+
- `stitchkit/files`: confirm the current named path after `readRegularFile` / `readRegularFileSync`
|
|
178
|
+
accepts an opened descriptor, retrying once when the path was swapped concurrently (including to
|
|
179
|
+
a symlink under `noFollow`) instead of returning bytes from an unlinked or replaced target.
|
|
180
|
+
**Affects:** `stitchkit/files` readRegularFile, readRegularFileSync, readJsonFileSync, readJsonOnce, PolledJsonFile, PolledJsonFiles
|
|
181
|
+
- `stitchkit/server` and `stitchkit/node`: allow `createUnixClientTransport` to pin an explicit
|
|
182
|
+
POSIX owner UID (`expectedOwnerUid`) for cross-UID group-accessible local daemon sockets while
|
|
183
|
+
preserving parent-directory, symlink, and non-group/world-writable checks on both Bun and Node.
|
|
184
|
+
**Affects:** `stitchkit/server` createUnixClientTransport, UnixClientTransportConfig(expectedOwnerUid); `stitchkit/node` createUnixClientTransport, UnixClientTransportConfig(expectedOwnerUid)
|
|
185
|
+
- `stitchkit/agent-runtime`: allow `branchConversation` and `planConversationBranch` to branch
|
|
186
|
+
conversations whose spills legitimately expired via `spill/deleted` (including across
|
|
187
|
+
`throughRunId` cutoffs and multi-hop branches via inert `runtime/branch-observation` records),
|
|
188
|
+
while continuing to refuse corrupt, orphan, or unexplained missing spills with `integrity`
|
|
189
|
+
(→ ADR 0328).
|
|
190
|
+
**Affects:** `stitchkit/agent-runtime` createAgentRuntimeStore, createMemoryAgentRuntimeStore, AgentRuntimeStore(branchConversation, planConversationBranch)
|
|
191
|
+
- `stitchkit/process`: re-check PID liveness in `probeProcessOwner` and `probeProcessOwnerSync`
|
|
192
|
+
when process identity observation becomes unavailable after an initial `'alive'` liveness check,
|
|
193
|
+
reporting `{ liveness: 'gone', identity: 'pid-gone' }` when the process exited in the TOCTOU
|
|
194
|
+
window instead of `unavailable / not-probed`, while keeping live-process observation failures
|
|
195
|
+
(`EPERM`, foreign namespace, unreadable `/proc/self`) as `unavailable` with their original
|
|
196
|
+
`cause`.
|
|
197
|
+
**Affects:** `stitchkit/process` probeProcessOwner
|
|
198
|
+
- Upgrade scanner (`stitchkit upgrade`): backfilled missing producer exports (`listToolNames`,
|
|
199
|
+
`listContractToolNames`, `createRuntimeToolFactory`, `defineAsyncOperation`,
|
|
200
|
+
`RuntimeToolDefinition*`, `createAgentCodingTools`, and 10 other omitted producer functions) in
|
|
201
|
+
the `0.127.0` changelog `**Affects:**` lines and added a checked-in
|
|
202
|
+
`public-surface-producers.json` release gate (`assertAffectsProducersNamed`) that refuses any
|
|
203
|
+
future breaking, `Fixed`, or `Security` `**Affects:**` line naming a type-only export without its
|
|
204
|
+
producer functions.
|
|
205
|
+
|
|
18
206
|
## [0.127.0] - 2026-11-25
|
|
19
207
|
|
|
20
208
|
### ⚠️ Breaking changes
|
|
@@ -174,7 +362,7 @@ branches on the class of a SQLite store's transaction failure or of a failed
|
|
|
174
362
|
`createSqliteAgentEventSearch({ database: sqlite.database })` →
|
|
175
363
|
`createAgentEventSearch({ host: sqlite.host })`;
|
|
176
364
|
`manager.listChildren(parent)` → `await manager.listChildren(parent)`. → ADR 0314
|
|
177
|
-
**Affects:** `stitchkit/agent-runtime` createSqliteAgentChildManager, createSqliteAgentSpillStore, createSqliteAgentProjectionStore, createSqliteAgentEventSearch, SqliteAgentChildManagerConfig, AgentChildManager(listChildren), AgentScheduleService(start); `stitchkit/agent-runtime/sqlite/bun` SqliteAgentRuntimeStore(database, transaction), SqliteStoreTransaction; `stitchkit/agent-runtime/sqlite/node` SqliteAgentRuntimeStore(database, transaction), SqliteStoreTransaction
|
|
365
|
+
**Affects:** `stitchkit/agent-runtime` createSqliteAgentChildManager, createSqliteAgentSpillStore, createSqliteAgentProjectionStore, createSqliteAgentEventSearch, SqliteAgentChildManagerConfig, AgentChildManager(listChildren), createAgentChildManager(listChildren), AgentScheduleService(start), createAgentScheduleService(start); `stitchkit/agent-runtime/sqlite/bun` SqliteAgentRuntimeStore(database, transaction), createBunSqliteAgentRuntimeStore(database, transaction), createSqliteAgentRuntimeStore(database, transaction), SqliteStoreTransaction; `stitchkit/agent-runtime/sqlite/node` SqliteAgentRuntimeStore(database, transaction), createNodeSqliteAgentRuntimeStore(database, transaction), createSqliteAgentRuntimeStore(database, transaction), SqliteStoreTransaction
|
|
178
366
|
- `stitchkit/agent-runtime` `AgentChildManager.listChildBlocking` returns
|
|
179
367
|
`{ pending, unavailable }` instead of the bare pending list. Each live child is
|
|
180
368
|
asked for its blocking events within the stop bound; a child that did not answer
|
|
@@ -246,7 +434,7 @@ branches on the class of a SQLite store's transaction failure or of a failed
|
|
|
246
434
|
Bun, browsers and React Native / Hermes without `process.hrtime`.
|
|
247
435
|
`Number(process.hrtime.bigint() - ctx.startedAt) / 1e6` →
|
|
248
436
|
`performance.now() - ctx.startedAt`. → ADR 0307
|
|
249
|
-
**Affects:** `stitchkit/observability` RequestContext(startedAt); `stitchkit/server` behaviour; `stitchkit/node` behaviour
|
|
437
|
+
**Affects:** `stitchkit/observability` RequestContext(startedAt), getRequestContext(startedAt); `stitchkit/server` behaviour; `stitchkit/node` behaviour
|
|
250
438
|
- `stitchkit` Minimum supported runtimes rise from `node >=22` / `bun >=1.2.0`
|
|
251
439
|
to `node >=22.3.0` / `bun >=1.4.0` because `RequestContext` loads
|
|
252
440
|
`AsyncLocalStorage` lazily through `process.getBuiltinModule('async_hooks')`
|
|
@@ -466,7 +654,7 @@ branches on the class of a SQLite store's transaction failure or of a failed
|
|
|
466
654
|
`catch (error) { if (error instanceof X) … }`
|
|
467
655
|
→ `catch (error) { const first = error instanceof AggregateError ? error.cause : error; if (first instanceof X) … }`.
|
|
468
656
|
[migration](docs/guide/upgrading.md#double-failure-aggregate-error). → ADR 0326
|
|
469
|
-
**Affects:** `stitchkit` SessionCredentials(login); `stitchkit/agent-runtime/sqlite/bun` behaviour; `stitchkit/agent-runtime/sqlite/node` behaviour
|
|
657
|
+
**Affects:** `stitchkit` SessionCredentials(login), createSessionCredentials(login); `stitchkit/agent-runtime/sqlite/bun` behaviour; `stitchkit/agent-runtime/sqlite/node` behaviour
|
|
470
658
|
- `stitchkit/telegram` the operator channel waits Telegram's `retry_after` only up to
|
|
471
659
|
`maxRetryAfterMs` (new option, default 60 000 ms — the minute over which Telegram
|
|
472
660
|
counts a group's messages). A longer flood wait would hold every queued message
|
|
@@ -493,7 +681,7 @@ branches on the class of a SQLite store's transaction failure or of a failed
|
|
|
493
681
|
(`Promise<readonly AgentSchedule[]>`); `AgentStoreConformanceConfig` now requires
|
|
494
682
|
explicit `capabilities: { branch, planBranch }` and
|
|
495
683
|
`commitConflict: { arm() } | { impossible: 'single-writer' }`. → ADR 0311
|
|
496
|
-
**Affects:** `stitchkit/agent-runtime` AgentScheduleService(listSchedules), AgentRuntimeStoreDriver; `stitchkit/agent-runtime/testing` runAgentStoreConformance, AgentStoreConformanceConfig
|
|
684
|
+
**Affects:** `stitchkit/agent-runtime` AgentScheduleService(listSchedules), createAgentScheduleService(listSchedules), AgentRuntimeStoreDriver; `stitchkit/agent-runtime/testing` runAgentStoreConformance, AgentStoreConformanceConfig
|
|
497
685
|
- `stitchkit/agent-runtime` and `stitchkit/agent-runtime/testing` store driver
|
|
498
686
|
contract step 2: a store built by `createAgentRuntimeStore` reports
|
|
499
687
|
`store.capabilities` (`{ archive, historyRestore, purge }`, frozen) for its
|
|
@@ -523,7 +711,7 @@ branches on the class of a SQLite store's transaction failure or of a failed
|
|
|
523
711
|
factories, async-operation capability maps, `ToolNameEntry.expose`, coding tool
|
|
524
712
|
definitions, and MCP/OpenAPI client connection configs; passing the removed
|
|
525
713
|
`transports` key now throws a `TypeError` at definition/mount time. → ADR 0311
|
|
526
|
-
**Affects:** `stitchkit/tools` defineRuntimeTool, defineDownloadTool, defineUploadTool, defineWaitTool, defineViewFileTool, ToolNameEntry; `stitchkit/tools/connections` defineMcpClientConnection, defineOpenApiConnection, McpClientConnectionConfig, OpenApiConnectionConfig; `stitchkit/agent-runtime/coding-tools` AgentCodingToolDefinition
|
|
714
|
+
**Affects:** `stitchkit/tools` defineRuntimeTool, createRuntimeToolFactory, defineAsyncOperation, defineDownloadTool, defineUploadTool, defineWaitTool, defineViewFileTool, listToolNames, listContractToolNames, ToolNameEntry, RuntimeToolDefinition, RuntimeToolDefinitionWithOutput, RuntimeToolDefinitionWithoutOutput, RuntimeToolFactory, RuntimeAsyncOperationConfig; `stitchkit/cli` RuntimeToolDefinition, RuntimeToolDefinitionWithOutput, RuntimeToolDefinitionWithoutOutput; `stitchkit/tools/mcp` RuntimeToolDefinition, RuntimeToolDefinitionWithOutput, RuntimeToolDefinitionWithoutOutput; `stitchkit/tools/connections` defineMcpClientConnection, defineOpenApiConnection, McpClientConnectionConfig, OpenApiConnectionConfig; `stitchkit/agent-runtime/coding-tools` createAgentCodingTools, AgentCodingToolDefinition
|
|
527
715
|
- `stitchkit/cli` consolidated top-level `optionAliases`, `positionals`,
|
|
528
716
|
`results`, `passthrough`, and `wait` (and duplicate `lifecycle`) into one typed
|
|
529
717
|
`CliConfig.commandSettings` map (`CliCommandName`, `CliCommandSettings`),
|
|
@@ -1472,7 +1660,7 @@ branches on the class of a SQLite store's transaction failure or of a failed
|
|
|
1472
1660
|
the one archive spill schema instead of a looser copy, so a malformed stored
|
|
1473
1661
|
spill (an `authorization` of `false`) is refused instead of travelling into an
|
|
1474
1662
|
archive.
|
|
1475
|
-
**Affects:** `stitchkit/agent-runtime` AgentRuntimeStore(branchConversation), AgentRuntimeStore(planConversationBranch), createAgentSpillStore
|
|
1663
|
+
**Affects:** `stitchkit/agent-runtime` AgentRuntimeStore(branchConversation), AgentRuntimeStore(planConversationBranch), createAgentRuntimeStore(branchConversation), createMemoryAgentRuntimeStore(branchConversation), createAgentSpillStore
|
|
1476
1664
|
- `stitchkit/agent-runtime` `createAgentChildManager` no longer writes `stopped`
|
|
1477
1665
|
over a child that finished while it was being stopped. A host that answers a
|
|
1478
1666
|
stop by finishing the child resolved its result before the stop returned, and
|
|
@@ -11,7 +11,15 @@ export interface AcpDriverConfig {
|
|
|
11
11
|
model?: string;
|
|
12
12
|
/** Set at open through the option of category `thought_level`, after the model, which may narrow it. */
|
|
13
13
|
thoughtLevel?: string;
|
|
14
|
-
/**
|
|
14
|
+
/**
|
|
15
|
+
* Set at open through the option of category `mode`. Negotiates the agent's advertised mode
|
|
16
|
+
* value only; it does not enforce host-side pre-execution tool approval (`approvalEnforcement`
|
|
17
|
+
* is `'agent-initiated'`). Whether an agent sends `session/request_permission` before a tool
|
|
18
|
+
* runs depends on the agent's own permission policy (for example, `agy` requires an isolated
|
|
19
|
+
* `--cli_dir_name <subdir>` with `{"toolPermission":"strict","agentMode":""}` in
|
|
20
|
+
* `~/.gemini/antigravity-cli/<subdir>/settings.json`, which prompts before every tool action
|
|
21
|
+
* including reads).
|
|
22
|
+
*/
|
|
15
23
|
mode?: string;
|
|
16
24
|
/** MCP servers the agent connects to, passed on `session/new`, `session/load` and `session/resume`. */
|
|
17
25
|
mcpServers?: readonly AcpMcpServer[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v1-connect.d.ts","sourceRoot":"","sources":["../../../src/agent-executor/acp/v1-connect.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAoB,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,KAAK,qBAAqB,EAAqB,MAAM,YAAY,CAAC;AAE3E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAMlD,iDAAiD;AACjD,MAAM,WAAW,eAAe;IAC9B,yCAAyC;IACzC,UAAU,EAAE,MAAM,CAAC;IACnB,kFAAkF;IAClF,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACzB,8GAA8G;IAC9G,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wGAAwG;IACxG,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB
|
|
1
|
+
{"version":3,"file":"v1-connect.d.ts","sourceRoot":"","sources":["../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,WAAW,CAAC,CAAC;IACjE,cAAc,CAAC,EAAE,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC;IAC3E,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CAChC,CAAC;AAEF,iGAAiG;AACjG,wBAAsB,UAAU,CAC9B,MAAM,EAAE,eAAe,EACvB,OAAO,EAAE,qBAAqB,EAC9B,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,WAAW,EACnB,QAAQ,GAAE,WAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgE3B;AAED,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC,CAAC;AAEnE,0FAA0F;AAC1F,wBAAgB,MAAM,CACpB,UAAU,EAAE,aAAa,EACzB,UAAU,EAAE,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAC/C,OAAO,CAGT"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { AgentEngineDriver } from '../engine.js';
|
|
2
2
|
import { type ExecutorProfileConfig } from '../profile.js';
|
|
3
3
|
import { type AcpDriverConfig } from './v1-connect.js';
|
|
4
|
-
import { type AcpSession } from './v1-session.js';
|
|
4
|
+
import { type AcpApprovalEnforcement, type AcpSession } from './v1-session.js';
|
|
5
5
|
export type { AcpDriverConfig } from './v1-connect.js';
|
|
6
|
-
export type { AcpSession } from './v1-session.js';
|
|
6
|
+
export type { AcpApprovalEnforcement, AcpSession } from './v1-session.js';
|
|
7
7
|
/** A session the agent keeps, as `session/list` answers. */
|
|
8
8
|
export interface AcpSessionSummary {
|
|
9
9
|
sessionId: string;
|
|
@@ -13,6 +13,12 @@ export interface AcpSessionSummary {
|
|
|
13
13
|
}
|
|
14
14
|
/** An {@link AgentEngineDriver} speaking ACP v1, adding session listing and session config options. */
|
|
15
15
|
export interface AcpDriver extends AgentEngineDriver {
|
|
16
|
+
/**
|
|
17
|
+
* How tool approvals are enforced over ACP: always `'agent-initiated'`. The host answers
|
|
18
|
+
* `session/request_permission` requests only when the agent chooses to send them and never
|
|
19
|
+
* synthesizes approvals for unprompted tool calls.
|
|
20
|
+
*/
|
|
21
|
+
readonly approvalEnforcement: AcpApprovalEnforcement;
|
|
16
22
|
open(input: Parameters<AgentEngineDriver['open']>[0]): Promise<AcpSession>;
|
|
17
23
|
/** The sessions the agent keeps for a working directory; refused if it does not declare `list`. */
|
|
18
24
|
sessions(input: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v1-driver.d.ts","sourceRoot":"","sources":["../../../src/agent-executor/acp/v1-driver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAEnD,OAAO,EAAE,KAAK,qBAAqB,EAAiB,MAAM,YAAY,CAAC;AAEvE,OAAO,EAEL,KAAK,eAAe,EAKrB,MAAM,cAAc,CAAC;AAOtB,OAAO,EAAE,KAAK,UAAU,EAAkB,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"v1-driver.d.ts","sourceRoot":"","sources":["../../../src/agent-executor/acp/v1-driver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAEnD,OAAO,EAAE,KAAK,qBAAqB,EAAiB,MAAM,YAAY,CAAC;AAEvE,OAAO,EAEL,KAAK,eAAe,EAKrB,MAAM,cAAc,CAAC;AAOtB,OAAO,EAAE,KAAK,sBAAsB,EAAE,KAAK,UAAU,EAAkB,MAAM,cAAc,CAAC;AAE5F,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,YAAY,EAAE,sBAAsB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAEvE,4DAA4D;AAC5D,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,CAAC;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,MAAM,EAAE,MAAM,CAAC,CAAC;CAChC;AAcD;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,gBAAgB,EACxB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,EACb,KAAK,CAAC,EAAE,cAAc,GACrB,aAAa,EAAE,CA2FjB;AAED,gHAAgH;AAChH,wBAAgB,UAAU,CACxB,UAAU,EAAE,MAAM,EAClB,kBAAkB,EAAE,OAAO,GAC1B,WAAW,GAAG,aAAa,GAAG,QAAQ,CAGxC;AAED,MAAM,WAAW,eAAe;IAC9B,qDAAqD;IACrD,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;IACzD,aAAa,EAAE,MAAM,CAAC;CACvB;AAED;;;;;GAKG;AACH,wBAAsB,eAAe,CACnC,KAAK,EAAE,SAAS,gBAAgB,EAAE,EAClC,MAAM,EAAE,eAAe,GACtB,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,EAAE,CAAC,CAkCpD"}
|
|
@@ -2,8 +2,16 @@ import type { AgentEngineSession } from '../engine.js';
|
|
|
2
2
|
import type { ExecutorProfileConfig } from '../profile.js';
|
|
3
3
|
import { type AcpDriverConfig } from './v1-connect.js';
|
|
4
4
|
import { type AcpConfigOption } from './v1-protocol.js';
|
|
5
|
+
/**
|
|
6
|
+
* How tool approvals are enforced over ACP: `'agent-initiated'` means the driver answers
|
|
7
|
+
* `session/request_permission` requests when the agent sends them, but cannot compel an agent
|
|
8
|
+
* to ask before running tools and never synthesizes fake requests after `tool_call` updates.
|
|
9
|
+
*/
|
|
10
|
+
export type AcpApprovalEnforcement = 'agent-initiated';
|
|
5
11
|
/** A session with what ACP says about it besides turns: its settings, title and commands. */
|
|
6
12
|
export interface AcpSession extends AgentEngineSession {
|
|
13
|
+
/** Always `'agent-initiated'`: whether a tool pauses for host approval is decided by the agent. */
|
|
14
|
+
readonly approvalEnforcement: AcpApprovalEnforcement;
|
|
7
15
|
/** The agent's settings as last reported: on open, on a change, and on `config_option_update`. */
|
|
8
16
|
readonly configOptions: readonly AcpConfigOption[];
|
|
9
17
|
/** The title the agent gave the session, once it did. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v1-session.d.ts","sourceRoot":"","sources":["../../../src/agent-executor/acp/v1-session.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAmB,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"v1-session.d.ts","sourceRoot":"","sources":["../../../src/agent-executor/acp/v1-session.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAmB,MAAM,WAAW,CAAC;AASrE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAOxD,OAAO,EACL,KAAK,eAAe,EAKrB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,KAAK,eAAe,EAQrB,MAAM,eAAe,CAAC;AASvB;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,GAAG,iBAAiB,CAAC;AAEvD,6FAA6F;AAC7F,MAAM,WAAW,UAAW,SAAQ,kBAAkB;IACpD,mGAAmG;IACnG,QAAQ,CAAC,mBAAmB,EAAE,sBAAsB,CAAC;IACrD,kGAAkG;IAClG,QAAQ,CAAC,aAAa,EAAE,SAAS,eAAe,EAAE,CAAC;IACnD,yDAAyD;IACzD,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,oDAAoD;IACpD,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,wFAAwF;IACxF,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,eAAe,EAAE,CAAC,CAAC;CACvF;AAuID,wBAAsB,cAAc,CAClC,MAAM,EAAE,eAAe,EACvB,KAAK,EAAE;IACL,OAAO,EAAE,qBAAqB,CAAC;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB,GACA,OAAO,CAAC,UAAU,CAAC,CAwIrB"}
|
|
@@ -13,6 +13,10 @@ export interface ClaudeCliDriverConfig {
|
|
|
13
13
|
* profile's own setting (`auto`, `acceptEdits`) is not inherited by accident.
|
|
14
14
|
*/
|
|
15
15
|
permissionMode?: 'default' | 'acceptEdits' | 'plan' | 'bypassPermissions' | 'auto';
|
|
16
|
+
/** Read the bytes behind a `file` part's `reference`; without it a file part is refused. */
|
|
17
|
+
resolveFile?: (reference: string) => Promise<Uint8Array>;
|
|
18
|
+
/** Maximum decoded size of one image attachment in bytes. Default 5 MiB. */
|
|
19
|
+
maxImageBytes?: number;
|
|
16
20
|
/** The executor's own environment, read for the allowlist. Default `process.env`. */
|
|
17
21
|
ambient?: Readonly<Record<string, string | undefined>>;
|
|
18
22
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-driver.d.ts","sourceRoot":"","sources":["../../../src/agent-executor/claude/cli-driver.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"cli-driver.d.ts","sourceRoot":"","sources":["../../../src/agent-executor/claude/cli-driver.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAqCnD,uDAAuD;AACvD,MAAM,WAAW,qBAAqB;IACpC,sEAAsE;IACtE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,+FAA+F;IAC/F,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/B,oCAAoC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,cAAc,CAAC,EAAE,SAAS,GAAG,aAAa,GAAG,MAAM,GAAG,mBAAmB,GAAG,MAAM,CAAC;IACnF,4FAA4F;IAC5F,WAAW,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;IACzD,4EAA4E;IAC5E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,qFAAqF;IACrF,OAAO,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC;CACxD;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,GAAE,qBAA0B,GAAG,iBAAiB,CA0F3F"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { type InlinedPart, type SupportedImageMediaType } from '../image-input.js';
|
|
2
3
|
export declare const ClaudeContentBlockSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
3
4
|
type: z.ZodLiteral<"text">;
|
|
4
5
|
text: z.ZodString;
|
|
@@ -133,16 +134,33 @@ export type ClaudeRecord = z.infer<typeof ClaudeRecordSchema>;
|
|
|
133
134
|
export declare const ClaudeUnknownRecordSchema: z.ZodObject<{
|
|
134
135
|
type: z.ZodString;
|
|
135
136
|
}, z.core.$loose>;
|
|
137
|
+
/** One content block in a Claude CLI / Agent SDK user message. */
|
|
138
|
+
export type ClaudeUserContentBlock = {
|
|
139
|
+
readonly type: 'text';
|
|
140
|
+
readonly text: string;
|
|
141
|
+
} | {
|
|
142
|
+
readonly type: 'image';
|
|
143
|
+
readonly source: {
|
|
144
|
+
readonly type: 'base64';
|
|
145
|
+
readonly media_type: SupportedImageMediaType;
|
|
146
|
+
readonly data: string;
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
/**
|
|
150
|
+
* Encode validated turn parts into Claude's user `message.content`: plain text joins into a
|
|
151
|
+
* string (preserving wire compatibility), while inputs with images produce ordered blocks.
|
|
152
|
+
*/
|
|
153
|
+
export declare function claudeUserContent(parts: readonly InlinedPart[]): string | ClaudeUserContentBlock[];
|
|
136
154
|
/** What the executor writes: one user message under the id it chose. */
|
|
137
155
|
export declare function claudeUserMessage(input: {
|
|
138
156
|
clientId: string;
|
|
139
|
-
|
|
157
|
+
content: string | readonly ClaudeUserContentBlock[];
|
|
140
158
|
sessionId: string;
|
|
141
159
|
}): {
|
|
142
160
|
type: string;
|
|
143
161
|
message: {
|
|
144
162
|
role: string;
|
|
145
|
-
content: string;
|
|
163
|
+
content: string | readonly ClaudeUserContentBlock[];
|
|
146
164
|
};
|
|
147
165
|
uuid: string;
|
|
148
166
|
parent_tool_use_id: null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../../../src/agent-executor/claude/protocol.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA4BxB,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;mBAMnC,CAAC;AAQH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAsE7B,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,8FAA8F;AAC9F,eAAO,MAAM,yBAAyB;;iBAAsC,CAAC;AAE7E,wEAAwE;AACxE,wBAAgB,iBAAiB,CAAC,KAAK,EAAE;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,
|
|
1
|
+
{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../../../src/agent-executor/claude/protocol.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,KAAK,WAA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C,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE;IAAE,QAAQ,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE;IAGrF,IAAI;IACJ,QAAQ;QACN,OAAO;QACP,UAAU;QACV,QAAQ;;;;;;;;EAMb;AAED,kFAAkF;AAClF,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;;;;;;;EAKlE;AAED,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM;IACtC,IAAI;IAAqB,UAAU;IAAa,OAAO;QAAI,OAAO;;EAC5E"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import type { AgentEngineSession } from '../engine.js';
|
|
2
2
|
import type { PlanLimits } from '../hello.js';
|
|
3
|
+
import { type DriverImageOptions } from '../image-input.js';
|
|
3
4
|
import { type ExecutorProfileConfig } from '../profile.js';
|
|
4
5
|
/**
|
|
5
6
|
* One Claude Code process for one connection: spawned with the session's
|
|
6
7
|
* flags, read by one loop for its whole life, each turn's records routed to
|
|
7
8
|
* the turn running at the time.
|
|
8
9
|
*/
|
|
9
|
-
export declare function openClaudeSession(config: {
|
|
10
|
+
export declare function openClaudeSession(config: DriverImageOptions & {
|
|
10
11
|
executable: string;
|
|
11
12
|
prefix: readonly string[];
|
|
12
13
|
model?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../src/agent-executor/claude/session.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAmB,MAAM,WAAW,CAAC;AAWrE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../src/agent-executor/claude/session.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAmB,MAAM,WAAW,CAAC;AAWrE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAGL,KAAK,kBAAkB,EAExB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,KAAK,qBAAqB,EAAoC,MAAM,YAAY,CAAC;AA8D1F;;;;GAIG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,kBAAkB,GAAG;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC;IACtD,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;CACjC,EACD,KAAK,EAAE;IACL,OAAO,EAAE,qBAAqB,CAAC;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB,GACA,OAAO,CAAC,kBAAkB,CAAC,CA8K7B"}
|
|
@@ -2,8 +2,8 @@ import type { ExecutorEngine } from '../hello.js';
|
|
|
2
2
|
import { type ExecutorProfileConfig } from '../profile.js';
|
|
3
3
|
/**
|
|
4
4
|
* Where Claude Code keeps a session's transcript in a profile:
|
|
5
|
-
* `<home>/projects/<cwd with every character but letters,
|
|
6
|
-
* replaced by "-">/<sessionId>.jsonl`, as observed on the CLI.
|
|
5
|
+
* `<home>/projects/<canonical realpath(cwd) with every character but letters,
|
|
6
|
+
* digits and "-" replaced by "-">/<sessionId>.jsonl`, as observed on the CLI.
|
|
7
7
|
*/
|
|
8
8
|
export declare function claudeTranscriptPath(input: {
|
|
9
9
|
home: string;
|
|
@@ -11,10 +11,13 @@ export declare function claudeTranscriptPath(input: {
|
|
|
11
11
|
sessionId: string;
|
|
12
12
|
}): string;
|
|
13
13
|
/**
|
|
14
|
-
* Whether the transcript holds a record with this `uuid` — the id the
|
|
15
|
-
* executor gave the input.
|
|
16
|
-
*
|
|
17
|
-
*
|
|
14
|
+
* Whether the transcript holds a `user` record with this `uuid` — the id the
|
|
15
|
+
* executor gave the input. Streams the whole file with bounded memory:
|
|
16
|
+
* - Found (`true`): a top-level `type: 'user'` record carries `uuid`.
|
|
17
|
+
* - Not found (`false`): either the transcript does not exist (`ENOENT`) or every
|
|
18
|
+
* record in the complete file was decoded without finding a matching `user` record.
|
|
19
|
+
* - Unknown (throws): I/O failure, malformed/non-UTF-8 record, `user` record without a
|
|
20
|
+
* string `uuid`, or a record over the 16 MiB cap prevented proving absence.
|
|
18
21
|
*/
|
|
19
22
|
export declare function claudeTranscriptHasUuid(path: string, uuid: string): Promise<boolean>;
|
|
20
23
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transcript.d.ts","sourceRoot":"","sources":["../../../src/agent-executor/claude/transcript.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"transcript.d.ts","sourceRoot":"","sources":["../../../src/agent-executor/claude/transcript.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,KAAK,qBAAqB,EAAiB,MAAM,YAAY,CAAC;AAsCvE;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;CACnB,GAAG,MAAM,CAWT;AA+BD;;;;;;;;GAQG;AACH,wBAAsB,uBAAuB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CA6E1F;AAED;;;;GAIG;AACH,wBAAsB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAU3E;AAED,8FAA8F;AAC9F,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,OAAO,CAAC,cAAc,EAAE,YAAY,GAAG,YAAY,CAAC,EAC5D,KAAK,EAAE;IACL,OAAO,EAAE,qBAAqB,CAAC;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;CAClB,GACA,OAAO,CAAC,OAAO,CAAC,CAUlB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Options, Query } from '@anthropic-ai/claude-agent-sdk';
|
|
2
|
+
import type { ClaudeSdkRun, ClaudeSdkSession } from './driver.js';
|
|
3
|
+
export type ClaudeSdkFlagSettings = Parameters<Query['applyFlagSettings']>[0];
|
|
4
|
+
type LiveMethods = Omit<ClaudeSdkSession, 'nativeThreadId' | 'providerPid' | 'startTurn' | 'close'>;
|
|
5
|
+
/** Session state needed by live-control operations on an active Claude SDK query. */
|
|
6
|
+
export interface ClaudeSdkControlHost {
|
|
7
|
+
readonly signal: AbortSignal;
|
|
8
|
+
isClosed(): boolean;
|
|
9
|
+
ensureQuery(): Promise<{
|
|
10
|
+
readonly query: ClaudeSdkRun;
|
|
11
|
+
}>;
|
|
12
|
+
setActiveModel(model: string | undefined): void;
|
|
13
|
+
setActivePermissionMode(mode: NonNullable<Options['permissionMode']>): void;
|
|
14
|
+
recordFlagSettings(settings: ClaudeSdkFlagSettings): void;
|
|
15
|
+
}
|
|
16
|
+
/** Create the live-session control and inspection methods exposed on {@link ClaudeSdkSession}. */
|
|
17
|
+
export declare function createClaudeSdkControls(host: ClaudeSdkControlHost): LiveMethods;
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=controls.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"controls.d.ts","sourceRoot":"","sources":["../../../src/agent-executor/claude-sdk/controls.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AAErE,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE/D,MAAM,MAAM,qBAAqB,GAAG,UAAU,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAE9E,KAAK,WAAW,GAAG,IAAI,CACrB,gBAAgB,EAChB,gBAAgB,GAAG,aAAa,GAAG,WAAW,GAAG,OAAO,CACzD,CAAC;AAEF,qFAAqF;AACrF,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAC7B,QAAQ,IAAI,OAAO,CAAC;IACpB,WAAW,IAAI,OAAO,CAAC;QAAE,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAA;KAAE,CAAC,CAAC;IACzD,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;IAChD,uBAAuB,CAAC,IAAI,EAAE,WAAW,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,GAAG,IAAI,CAAC;IAC5E,kBAAkB,CAAC,QAAQ,EAAE,qBAAqB,GAAG,IAAI,CAAC;CAC3D;AAaD,kGAAkG;AAClG,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,oBAAoB,GAAG,WAAW,CA8D/E"}
|