stitchkit 0.88.0 → 0.90.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.
Files changed (184) hide show
  1. package/CHANGELOG.md +182 -0
  2. package/dist/agent-runtime/child-blocking.d.ts +17 -0
  3. package/dist/agent-runtime/child-blocking.d.ts.map +1 -0
  4. package/dist/agent-runtime/child-budget-policy.d.ts +23 -0
  5. package/dist/agent-runtime/child-budget-policy.d.ts.map +1 -0
  6. package/dist/agent-runtime/children-contract.d.ts +155 -0
  7. package/dist/agent-runtime/children-contract.d.ts.map +1 -0
  8. package/dist/agent-runtime/children.d.ts +4 -99
  9. package/dist/agent-runtime/children.d.ts.map +1 -1
  10. package/dist/agent-runtime/coding-shell-process.d.ts +33 -0
  11. package/dist/agent-runtime/coding-shell-process.d.ts.map +1 -0
  12. package/dist/agent-runtime/coding-tool-contract.d.ts +18 -0
  13. package/dist/agent-runtime/coding-tool-contract.d.ts.map +1 -1
  14. package/dist/agent-runtime/coding-tool-files.d.ts.map +1 -1
  15. package/dist/agent-runtime/coding-tool-listing.d.ts.map +1 -1
  16. package/dist/agent-runtime/coding-tool-search-patch.d.ts.map +1 -1
  17. package/dist/agent-runtime/coding-tool-shell.d.ts.map +1 -1
  18. package/dist/agent-runtime/coding-tool-utf8.d.ts +28 -0
  19. package/dist/agent-runtime/coding-tool-utf8.d.ts.map +1 -0
  20. package/dist/agent-runtime/contained-files.d.ts +20 -0
  21. package/dist/agent-runtime/contained-files.d.ts.map +1 -1
  22. package/dist/agent-runtime/durability-contract.d.ts +176 -0
  23. package/dist/agent-runtime/durability-contract.d.ts.map +1 -0
  24. package/dist/agent-runtime/durability-json.d.ts +3 -0
  25. package/dist/agent-runtime/durability-json.d.ts.map +1 -0
  26. package/dist/agent-runtime/durability-ledger.d.ts +16 -0
  27. package/dist/agent-runtime/durability-ledger.d.ts.map +1 -0
  28. package/dist/agent-runtime/durability-scheduler.d.ts +29 -0
  29. package/dist/agent-runtime/durability-scheduler.d.ts.map +1 -0
  30. package/dist/agent-runtime/durability.d.ts +14 -0
  31. package/dist/agent-runtime/durability.d.ts.map +1 -0
  32. package/dist/agent-runtime/event-search.d.ts.map +1 -1
  33. package/dist/agent-runtime/harness-contract.d.ts +37 -0
  34. package/dist/agent-runtime/harness-contract.d.ts.map +1 -1
  35. package/dist/agent-runtime/harness.d.ts +8 -0
  36. package/dist/agent-runtime/harness.d.ts.map +1 -1
  37. package/dist/agent-runtime/prompt.d.ts +23 -0
  38. package/dist/agent-runtime/prompt.d.ts.map +1 -1
  39. package/dist/agent-runtime/run-execution.d.ts.map +1 -1
  40. package/dist/agent-runtime/runtime-internals.d.ts +4 -0
  41. package/dist/agent-runtime/runtime-internals.d.ts.map +1 -1
  42. package/dist/agent-runtime/runtime.d.ts +13 -0
  43. package/dist/agent-runtime/runtime.d.ts.map +1 -1
  44. package/dist/agent-runtime/sandbox-broker.d.ts +7 -0
  45. package/dist/agent-runtime/sandbox-broker.d.ts.map +1 -0
  46. package/dist/agent-runtime/sandbox-bubblewrap-args.d.ts +9 -0
  47. package/dist/agent-runtime/sandbox-bubblewrap-args.d.ts.map +1 -0
  48. package/dist/agent-runtime/sandbox-bubblewrap-storage.d.ts +22 -0
  49. package/dist/agent-runtime/sandbox-bubblewrap-storage.d.ts.map +1 -0
  50. package/dist/agent-runtime/sandbox-bubblewrap.d.ts +14 -0
  51. package/dist/agent-runtime/sandbox-bubblewrap.d.ts.map +1 -0
  52. package/dist/agent-runtime/sandbox-coding-adapter.d.ts +15 -0
  53. package/dist/agent-runtime/sandbox-coding-adapter.d.ts.map +1 -0
  54. package/dist/agent-runtime/sandbox-coding.d.ts +15 -0
  55. package/dist/agent-runtime/sandbox-coding.d.ts.map +1 -0
  56. package/dist/agent-runtime/sandbox-contract.d.ts +93 -0
  57. package/dist/agent-runtime/sandbox-contract.d.ts.map +1 -0
  58. package/dist/agent-runtime/sandbox-process-owner.d.ts +11 -0
  59. package/dist/agent-runtime/sandbox-process-owner.d.ts.map +1 -0
  60. package/dist/agent-runtime/sandbox-process.d.ts +8 -0
  61. package/dist/agent-runtime/sandbox-process.d.ts.map +1 -0
  62. package/dist/agent-runtime/sandbox-session.d.ts +5 -0
  63. package/dist/agent-runtime/sandbox-session.d.ts.map +1 -0
  64. package/dist/agent-runtime/sandbox.d.ts +19 -0
  65. package/dist/agent-runtime/sandbox.d.ts.map +1 -1
  66. package/dist/agent-runtime/sqlite-purge.d.ts.map +1 -1
  67. package/dist/agent-runtime/sqlite.d.ts.map +1 -1
  68. package/dist/agent-runtime/store-driver.d.ts +127 -0
  69. package/dist/agent-runtime/store-driver.d.ts.map +1 -1
  70. package/dist/agent-runtime/store-events.d.ts +104 -0
  71. package/dist/agent-runtime/store-events.d.ts.map +1 -1
  72. package/dist/agent-runtime/store-migrations/v2-to-v3.d.ts +14 -0
  73. package/dist/agent-runtime/store-migrations/v2-to-v3.d.ts.map +1 -0
  74. package/dist/agent-runtime/store.d.ts +115 -0
  75. package/dist/agent-runtime/store.d.ts.map +1 -1
  76. package/dist/agent-runtime-coding-tools.js +11 -1247
  77. package/dist/agent-runtime-harness.d.ts +1 -1
  78. package/dist/agent-runtime-harness.d.ts.map +1 -1
  79. package/dist/agent-runtime-harness.js +65 -15
  80. package/dist/agent-runtime-openrouter.d.ts +3 -12
  81. package/dist/agent-runtime-openrouter.d.ts.map +1 -1
  82. package/dist/agent-runtime-openrouter.js +10 -7
  83. package/dist/agent-runtime-sandbox.d.ts +5 -0
  84. package/dist/agent-runtime-sandbox.d.ts.map +1 -0
  85. package/dist/agent-runtime-sandbox.js +797 -0
  86. package/dist/agent-runtime-sqlite-bun.js +3 -3
  87. package/dist/agent-runtime-sqlite-node.js +3 -3
  88. package/dist/agent-runtime.d.ts +5 -4
  89. package/dist/agent-runtime.d.ts.map +1 -1
  90. package/dist/agent-runtime.js +259 -65
  91. package/dist/application/watch-hub.d.ts +24 -2
  92. package/dist/application/watch-hub.d.ts.map +1 -1
  93. package/dist/application.js +127 -37
  94. package/dist/cli.js +8 -8
  95. package/dist/index-2na0qrfn.js +214 -0
  96. package/dist/{index-rcgsnrr6.js → index-31jw8fjq.js} +3 -3
  97. package/dist/{index-9hw9eq48.js → index-7601qfg1.js} +14 -14
  98. package/dist/{index-3xnq72rz.js → index-7rkhw9ec.js} +14 -1
  99. package/dist/{index-0vfdh685.js → index-8c3a7m4g.js} +1 -1
  100. package/dist/{index-t7gh5w3v.js → index-bn2cjajt.js} +27 -6
  101. package/dist/index-cp20z0n6.js +1351 -0
  102. package/dist/{index-qp3vshvc.js → index-fadnxwna.js} +87 -5
  103. package/dist/{index-v1qk37y9.js → index-hrbajay7.js} +106 -4
  104. package/dist/{index-p86mxmpp.js → index-hw2chdvy.js} +646 -43
  105. package/dist/{index-0ydchz76.js → index-mnm4qp0p.js} +5 -5
  106. package/dist/{index-1szetq6f.js → index-q3ve2d1k.js} +30 -8
  107. package/dist/{index-6krwcdcf.js → index-zwkgfq1s.js} +95 -85
  108. package/dist/{index-wn9cb82y.js → index-zyvby92n.js} +12 -9
  109. package/dist/index.js +13 -13
  110. package/dist/live/watch-client.d.ts +2 -1
  111. package/dist/live/watch-client.d.ts.map +1 -1
  112. package/dist/live/watch-contract.d.ts +70 -4
  113. package/dist/live/watch-contract.d.ts.map +1 -1
  114. package/dist/live/watch-delta.d.ts +110 -0
  115. package/dist/live/watch-delta.d.ts.map +1 -0
  116. package/dist/live.d.ts +2 -1
  117. package/dist/live.d.ts.map +1 -1
  118. package/dist/live.js +56 -4
  119. package/dist/observability/changes.d.ts +55 -0
  120. package/dist/observability/changes.d.ts.map +1 -0
  121. package/dist/observability/index.d.ts +2 -0
  122. package/dist/observability/index.d.ts.map +1 -1
  123. package/dist/observability/index.js +127 -0
  124. package/dist/observability/spool.d.ts +53 -0
  125. package/dist/observability/spool.d.ts.map +1 -0
  126. package/dist/server/index.js +9 -9
  127. package/dist/testing/agent-store-conformance.d.ts.map +1 -1
  128. package/dist/testing.js +57 -23
  129. package/dist/tool-invoker.js +6 -6
  130. package/dist/tools/agent.d.ts +6 -0
  131. package/dist/tools/agent.d.ts.map +1 -1
  132. package/dist/tools/connections/define.d.ts +6 -0
  133. package/dist/tools/connections/define.d.ts.map +1 -0
  134. package/dist/tools/connections/errors.d.ts +50 -0
  135. package/dist/tools/connections/errors.d.ts.map +1 -0
  136. package/dist/tools/connections/http.d.ts +3 -0
  137. package/dist/tools/connections/http.d.ts.map +1 -0
  138. package/dist/tools/connections/index.d.ts +19 -0
  139. package/dist/tools/connections/index.d.ts.map +1 -0
  140. package/dist/tools/connections/index.js +1047 -0
  141. package/dist/tools/connections/instance.d.ts +3 -0
  142. package/dist/tools/connections/instance.d.ts.map +1 -0
  143. package/dist/tools/connections/json-rpc.d.ts +8 -0
  144. package/dist/tools/connections/json-rpc.d.ts.map +1 -0
  145. package/dist/tools/connections/limits.d.ts +36 -0
  146. package/dist/tools/connections/limits.d.ts.map +1 -0
  147. package/dist/tools/connections/mcp-client.d.ts +44 -0
  148. package/dist/tools/connections/mcp-client.d.ts.map +1 -0
  149. package/dist/tools/connections/mcp.d.ts +5 -0
  150. package/dist/tools/connections/mcp.d.ts.map +1 -0
  151. package/dist/tools/connections/mount.d.ts +12 -0
  152. package/dist/tools/connections/mount.d.ts.map +1 -0
  153. package/dist/tools/connections/openapi-document.d.ts +4 -0
  154. package/dist/tools/connections/openapi-document.d.ts.map +1 -0
  155. package/dist/tools/connections/openapi.d.ts +5 -0
  156. package/dist/tools/connections/openapi.d.ts.map +1 -0
  157. package/dist/tools/connections/runtime.d.ts +29 -0
  158. package/dist/tools/connections/runtime.d.ts.map +1 -0
  159. package/dist/tools/connections/schema-budget.d.ts +8 -0
  160. package/dist/tools/connections/schema-budget.d.ts.map +1 -0
  161. package/dist/tools/connections/sse-frames.d.ts +7 -0
  162. package/dist/tools/connections/sse-frames.d.ts.map +1 -0
  163. package/dist/tools/connections/sse-session.d.ts +26 -0
  164. package/dist/tools/connections/sse-session.d.ts.map +1 -0
  165. package/dist/tools/connections/ssrf.d.ts +15 -0
  166. package/dist/tools/connections/ssrf.d.ts.map +1 -0
  167. package/dist/tools/connections/types.d.ts +60 -0
  168. package/dist/tools/connections/types.d.ts.map +1 -0
  169. package/dist/tools/durability-context.d.ts +7 -0
  170. package/dist/tools/durability-context.d.ts.map +1 -0
  171. package/dist/tools/execute.d.ts +2 -0
  172. package/dist/tools/execute.d.ts.map +1 -1
  173. package/dist/tools/registry.d.ts +38 -0
  174. package/dist/tools/registry.d.ts.map +1 -0
  175. package/dist/tools/runtime-tool.d.ts +4 -0
  176. package/dist/tools/runtime-tool.d.ts.map +1 -1
  177. package/dist/tools.d.ts +1 -0
  178. package/dist/tools.d.ts.map +1 -1
  179. package/dist/tools.js +83 -26
  180. package/llms-full.txt +386 -16
  181. package/llms.txt +1 -0
  182. package/package.json +9 -1
  183. package/dist/index-dre2ywck.js +0 -48
  184. package/dist/{index-evcnmsc3.js → index-t7fkyxcr.js} +3 -3
package/CHANGELOG.md CHANGED
@@ -15,6 +15,188 @@ additive**; the first breaking change landed in 0.10.0. Grep the file for
15
15
 
16
16
  ## [Unreleased]
17
17
 
18
+ ## [0.90.0] — 2026-09-15
19
+
20
+ ### ⚠️ Breaking changes
21
+
22
+ **Who must act:** applications that bind the watch protocol themselves or read
23
+ `WatchValueFrame.value` directly — a hand-written subscriber, a test double, a custom
24
+ server binding. Applications using `createWatchClient` and the starter's binding need
25
+ no code change. **Both ends must come from the same major:** a client older than 0.90.0
26
+ reads a `delta` frame as a value of `undefined`, silently.
27
+
28
+ - **`stitchkit.watch.value` is a discriminated union on `kind`.** `full` carries the value,
29
+ `delta` carries a structural difference against a `base` revision, `unchanged` says the
30
+ value held is still current. Every frame carries `fingerprint`, the order-independent
31
+ digest of the value the receiver holds after applying it.
32
+
33
+ ```ts
34
+ // before: frame.value
35
+ // after:
36
+ if (frame.kind === 'full') hold(frame.value);
37
+ else if (frame.kind === 'delta') hold(applyWatchDelta(held, frame.delta));
38
+ // 'unchanged' leaves what you hold standing
39
+ ```
40
+
41
+ - **`AttachedWatcher.open` takes an optional third argument, `have`.** A custom server
42
+ binding forwarding `stitchkit.watch.open` should pass the payload's `have` through;
43
+ omitting it costs a whole value on every reconnection and is otherwise harmless.
44
+
45
+ ### Added
46
+
47
+ - **Watched reads cross as differences.** The hub chooses per subscriber, from the revision
48
+ it last delivered to that subscriber, and sends a difference only when it is strictly
49
+ smaller than the value. Measured: a ~75 KB list answer with one field changed crosses as a
50
+ frame under 1 KB. `deltaMemoryBytes` (default 262144, `0` disables) bounds the superseded
51
+ values kept per key. → ADR 0183.
52
+ - **A reconnection offers what it holds.** `stitchkit.watch.open` may carry
53
+ `have: { revision, fingerprint }`; a subscriber returning to an answer that has not moved
54
+ is told `unchanged` instead of being sent the value again. Requires the key to still exist
55
+ on the hub — set `holdMs` past your reconnect delay.
56
+ - **Reassembly is checked.** The client verifies the rebuilt value against the server's
57
+ fingerprint on every frame and resynchronises **that one key** on any mismatch, publishing
58
+ `resync-required`. Other keys on the same socket are untouched.
59
+ - **`watchDiff` / `applyWatchDelta` / `watchDeltaWins`** and the `WatchDelta` shapes are
60
+ exported from `stitchkit/live` for applications building their own binding.
61
+ - **`auditChanges`** — the sink `filter` most projects were writing themselves: drops `GET`,
62
+ `HEAD` and `OPTIONS`, keeps `401` and `403` whatever the verb was, keeps an unrecognised
63
+ verb. One predicate across HTTP, MCP and agent calls. → ADR 0184.
64
+ - **`createSpooledSink`** — writes the audit row to a local append-only file before offering
65
+ it to the store and replays what a previous process left undelivered. At least once; the
66
+ store must be idempotent on the record key (`spanId` by default).
67
+
68
+ ### Unchanged on purpose
69
+
70
+ - **Auditing stays opt-in.** `createHandler` and the tool mounts are untouched. Making a
71
+ decision about audit mandatory at startup was considered and rejected — the measurement it
72
+ rested on counted projects without an HTTP surface as projects that had forgotten. → ADR 0184.
73
+
74
+ ## [0.89.0] — 2026-09-12
75
+
76
+ ### ⚠️ Breaking changes
77
+
78
+ **Who must act:** applications implementing `AgentRuntimeStore` or `AgentRuntimeStoreDriver`,
79
+ and applications normalizing OpenRouter usage. Custom stores add ordered once-seeding;
80
+ OpenRouter callers pass raw per-step usage. New durability users return lossless JSON.
81
+ See the 0.89.0 migration in the upgrading guide.
82
+
83
+ - **OpenRouter token provenance requires raw step usage.** `normalizeOpenRouterUsage` and the
84
+ runtime read original counters rather than SDK defaults. Pass `step.usage` from each
85
+ completed SDK step; normalized-only or aggregate records without `raw` yield unavailable
86
+ token counts. Missing cache/reasoning counts no longer become provider-reported zero.
87
+
88
+ - **Durability results must be lossless JSON.** `step<T>` accepts JSON-compatible types and
89
+ rejects non-finite numbers, negative zero, Date/class instances, undefined, sparse arrays
90
+ and accessors at runtime. First execution and replay return detached JSON snapshots.
91
+ Effect-only bodies must return `null`: `step('send', async () => { await send(); return null; })`.
92
+ Convert dates explicitly with `toISOString()` before returning them. Rejected results do not
93
+ undo external effects; idempotency remains the host's responsibility.
94
+ - **`AgentRuntimeStore` gains `seedConversationInput`.** A custom store adapter must implement it;
95
+ the memory and SQLite drivers already do. The SQLite schema moves to version 3 with an automatic
96
+ migration. The method writes user-role prompt instructions into a conversation's durable history
97
+ exactly once, ahead of the conversation, so they can be summarized by compaction and removed by a
98
+ history replacement instead of being re-injected on every call. → ADR 0178
99
+
100
+ ```ts
101
+ // before: an adapter implemented the existing store members only
102
+ // after: add
103
+ async seedConversationInput({ conversationId, seedKey, inputs }) { /* … */ }
104
+ ```
105
+
106
+ - **A custom store driver gains a required `seeds` member.** `AgentRuntimeStoreDriver` now needs
107
+ `seeds: { load, create }` in addition to its history mutation, so a driver that only implemented
108
+ the previous members must add it. Memory, SQLite and the Prisma example implement it;
109
+ the public conformance kit verifies ordered once-seeding and compaction survival.
110
+
111
+ ### Fixed
112
+
113
+ - Parallel verification no longer reaps a live supervised build before its isolated
114
+ PM2 home has been created; abandonment requires the lane directory to be gone.
115
+ - Provider silence deadlines exclude resource preparation, local tool execution and approval
116
+ waiting. Provider calls still time out before the first chunk and between chunks; caller
117
+ cancellation remains active during tools and child waits.
118
+ - Connection calls isolate credentials, refuse redirects, bound SSE reads and retain typed
119
+ authorization causes through the standard mount. Lifecycle executes once.
120
+ - Instruction seed budgets are counted once; partial imports fail explicitly. Coding reads
121
+ obey EOF byte limits, report invalid UTF-8, preserve literal replacement text and bound denied lists.
122
+
123
+ ### Added
124
+
125
+ - `createSandboxCodingTools` connects the maintained coding profile to a sandbox workspace.
126
+ File authorization, UTF-8, shell deadlines/output/artifacts are shared with the host profile;
127
+ sandbox stop and command admission cover both session and coding launches.
128
+ - **Optional Linux process sandbox.** `stitchkit/agent-runtime/sandbox` supplies a Bubblewrap
129
+ backend, reusable byte-file templates, durable workspace reconnect and bounded command execution.
130
+ Network namespaces deny direct egress; an explicit HTTP Unix-socket gateway brokers configured
131
+ origin headers on the host. Existing coding tools remain unchanged. See the sandbox guide for
132
+ platform requirements, trusted-upstream and resource-isolation limits. → ADR 0181
133
+ - **Durable once-seeding of user-role instructions.** `composeAgentPrompt` reports user-role
134
+ sections separately and the runtime seeds them into durable history once; a retry or replay writes
135
+ one copy, and a history replacement does not resurrect them. → ADR 0178
136
+ - **The parent owns a child's blocking events.** `AgentChildManager` presents a child's approval or
137
+ input request on the parent once (child-local ids rewritten to parent-scoped ids, unanswered
138
+ siblings retained) and routes approval decisions or JSON input values back. A child harness uses
139
+ `blockingPresentation: 'parent'` to keep requests out of its presentation stream. The
140
+ `subagent` tool result and `list_agents` are proven to read one source. → ADR 0179
141
+ - **A local durability port for tool bodies.** `createLocalStepDurability` over the store: `step(name,
142
+ fn)` replays recorded JSON results. `createAgentRuntime({ durability: true })` exposes
143
+ `step/sleep/waitFor` in mounted handler context; a factory can replace the port. Timers and
144
+ event waits preserve ledger facts across host-driven recovery, with optional external-write
145
+ notifications. In-flight maps are store-scoped; undecodable records fail closed. → ADR 0182
146
+ - **External MCP and OpenAPI servers are consumable as typed tools.** The new server-only entrypoint
147
+ `stitchkit/tools/connections` provides `defineMcpClientConnection`, `defineOpenApiConnection` and
148
+ `mountConnections`: MCP over Streamable HTTP with an SSE fallback only on `400/404/405`,
149
+ per-call credential resolution, a typed `401` reauthorization cause while `403` passes through, OpenAPI
150
+ operations with bounded local references and qualified names, redirect refusal and a host guard
151
+ that remote specs cannot expand. Unsupported OpenAPI semantics are refused at mount. No peer
152
+ dependency enters `stitchkit/tools`. → ADR 0180
153
+ - **Prompt sections declare their authority.** `AgentPromptSection.role` (default `system`) splits
154
+ framework policy from caller-supplied context; `composeAgentPrompt` reports user-role sections
155
+ separately and the runtime carries them into provider history ahead of the durable conversation,
156
+ so retrieved or tenant context can no longer sit at system authority. → ADR 0178
157
+ - **Approval responses are authorized separately from the request.**
158
+ `createHeadlessAgentHarness` accepts `authorizeApprovalResponse`, a response-time policy that
159
+ judges the responder rather than the signature; a refusal is recorded as a durable
160
+ `approval/response-rejected` event with its reason and leaves the request pending for another
161
+ responder. Absent the policy, behaviour is unchanged. → ADR 0177
162
+ - **Tool compositions replace and disable built-ins by name.** `defineToolRegistry({ defaults })`
163
+ declares the runtime surface once and refuses a `replace`/`disable` name outside those defaults
164
+ instead of leaving a default silently in place; `mountAgent` accepts a `registry` in place of
165
+ `runtimeTools`. → ADR 0176
166
+ - **Coding discovery names the paths the host refuses.** `list_directory`, `glob` and
167
+ `search_files` gained an optional `denied` list of `{ path, kind }` — with
168
+ `deniedTruncated` when the list is cut — present only when there is something to report.
169
+ A path rejected by `authorizePath` used to vanish exactly like an absent one, so a model
170
+ read "the host hid this" as "this is not here". Only the name and kind travel, never
171
+ content, and `search_files` keeps the host's refusals apart from the include pattern's own.
172
+
173
+ ### Fixed
174
+
175
+ - **`read_file` resumes on a UTF-8 boundary.** A byte window whose end fell inside a
176
+ multi-byte character made the fatal decoder throw, surfacing as `INTERNAL_SERVER_ERROR`
177
+ on some offsets and succeeding on others for the same file. The window is now aligned to a
178
+ character boundary — extended to the whole character when the window is smaller than one —
179
+ and `nextOffset` names the start of the next character, so successive windows stitch back
180
+ to the original file. A caller-supplied `offset` inside a character now resumes at the next
181
+ character boundary instead of throwing the same unnamed refusal. A file that is genuinely
182
+ not UTF-8 is still refused. `run_command`'s retained output is aligned the same way, on the
183
+ artifact path and without artifacts, so a byte budget no longer leaves a replacement glyph.
184
+ - **Connections enforce their declared network bounds.** `defineMcpClientConnection`'s
185
+ `allowHosts` is now honoured on every MCP request, and a legacy-SSE server's discovered
186
+ `endpoint` is host-fenced before the client POSTs a bearer token to it; requests carry a
187
+ default timeout and responses are size-bounded, with `ConnectionBudget.maxSchemaBytes`
188
+ enforced over the mounted foreign schemas. SSE framing also accepts CRLF, and a non-2xx SSE
189
+ POST no longer leaves an orphaned pending response.
190
+ - **Coding discovery scopes what it reports.** `glob` now scopes its `denied` entries to the
191
+ requested path, and a re-seeded conversation whose compacted seed survived without a receipt
192
+ resolves idempotently instead of failing a `UNIQUE` constraint.
193
+ - **Journal event search treats a multi-word query as all words, not one phrase.**
194
+ `createSqliteAgentEventSearch` quoted the whole query, so a query of two or more words
195
+ matched only the adjacent phrase and returned `[]` when the words merely occurred — a
196
+ silent zero read as "the journal never said this". Terms are now quoted individually and
197
+ joined with `AND`, still escaped as literal text, and a query that reduces to no terms is
198
+ an error rather than an empty result.
199
+
18
200
  ## [0.88.0] — 2026-09-10
19
201
 
20
202
  ### ⚠️ Breaking changes
@@ -0,0 +1,17 @@
1
+ import { type AgentChildBlockingDecision, type AgentChildBlockingEvent, type AgentChildHandle, type AgentChildRecord } from './children-contract.js';
2
+ import type { AgentRuntimeStore } from './store.js';
3
+ export declare function createChildBlockingRelay(input: {
4
+ store: AgentRuntimeStore;
5
+ now: () => Date;
6
+ handles: Map<string, AgentChildHandle>;
7
+ listChildren: (id: string) => readonly AgentChildRecord[];
8
+ activeChild: (parent: string, child: string) => {
9
+ handle: AgentChildHandle;
10
+ };
11
+ bounded: <V>(work: Promise<V> | V, fallback: V) => Promise<V>;
12
+ }): {
13
+ retireChildBlocking: (childConversationId: string) => void;
14
+ listChildBlocking: (parentConversationId: string) => Promise<readonly AgentChildBlockingEvent[]>;
15
+ respondToChildBlocking: (parentConversationId: string, decision: AgentChildBlockingDecision) => Promise<void>;
16
+ };
17
+ //# sourceMappingURL=child-blocking.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"child-blocking.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/child-blocking.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,uBAAuB,EAG5B,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EAEtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AACjD,wBAAgB,wBAAwB,CAAC,KAAK,EAAE;IAC9C,KAAK,EAAE,iBAAiB,CAAC;IACzB,GAAG,EAAE,MAAM,IAAI,CAAC;IAChB,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IACvC,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,SAAS,gBAAgB,EAAE,CAAC;IAC1D,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK;QAAE,MAAM,EAAE,gBAAgB,CAAA;KAAE,CAAC;IAC7E,OAAO,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,QAAQ,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;CAC/D;+CA6BmD,MAAM,KAAG,IAAI;8CA0EvC,MAAM,KAC3B,OAAO,CAAC,SAAS,uBAAuB,EAAE,CAAC;mDAmCtB,MAAM,YAClB,0BAA0B,KACnC,OAAO,CAAC,IAAI,CAAC;EAIjB"}
@@ -0,0 +1,23 @@
1
+ import type { LanguageModelUsage } from 'ai';
2
+ import type { AgentChildManager } from './children-contract.js';
3
+ import type { AgentRuntimeStopPolicy } from './runtime.js';
4
+ import type { AgentUsage } from './schemas.js';
5
+ /**
6
+ * The child runtime's own budget policy.
7
+ *
8
+ * `recordStepUsage` measures and decides; something has to call it at every
9
+ * step boundary of the child's run, and that is the child's runtime. Given to
10
+ * `createAgentRuntime({ loop: { stopPolicies: [agentChildBudgetStopPolicy(…)] } })`
11
+ * in the host that runs the child, it records the last step's usage and stops
12
+ * the run as `policy_stop` (`child-budget`) when the budget is spent — the
13
+ * enforcement the guide promises, in the package rather than in every host.
14
+ */
15
+ export declare function agentChildBudgetStopPolicy(input: {
16
+ manager: Pick<AgentChildManager, 'recordStepUsage'>;
17
+ childConversationId: string;
18
+ /** Cost of a step, when a USD budget is set; tokens come from the step itself. */
19
+ cost?: (step: {
20
+ usage: LanguageModelUsage;
21
+ }) => AgentUsage['cost'];
22
+ }): AgentRuntimeStopPolicy;
23
+ //# sourceMappingURL=child-budget-policy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"child-budget-policy.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/child-budget-policy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,IAAI,CAAC;AAC7C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AAExD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE5C;;;;;;;;;GASG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE;IAChD,OAAO,EAAE,IAAI,CAAC,iBAAiB,EAAE,iBAAiB,CAAC,CAAC;IACpD,mBAAmB,EAAE,MAAM,CAAC;IAC5B,kFAAkF;IAClF,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE;QAAE,KAAK,EAAE,kBAAkB,CAAA;KAAE,KAAK,UAAU,CAAC,MAAM,CAAC,CAAC;CACpE,GAAG,sBAAsB,CAqBzB"}
@@ -0,0 +1,155 @@
1
+ import { z } from 'zod';
2
+ import type { AgentUsage } from './schemas.js';
3
+ export declare const AgentChildBudgetSchema: z.ZodObject<{
4
+ usd: z.ZodOptional<z.ZodNumber>;
5
+ tokens: z.ZodOptional<z.ZodInt>;
6
+ milliseconds: z.ZodOptional<z.ZodInt>;
7
+ }, z.core.$strict>;
8
+ export type AgentChildBudget = z.infer<typeof AgentChildBudgetSchema>;
9
+ export declare const AgentChildStateSchema: z.ZodEnum<{
10
+ finished: "finished";
11
+ lost: "lost";
12
+ running: "running";
13
+ spawned: "spawned";
14
+ stopped: "stopped";
15
+ }>;
16
+ export type AgentChildState = z.infer<typeof AgentChildStateSchema>;
17
+ export declare const AgentChildRecordSchema: z.ZodObject<{
18
+ parentConversationId: z.ZodString;
19
+ childConversationId: z.ZodString;
20
+ seedUptoSeq: z.ZodInt;
21
+ state: z.ZodEnum<{
22
+ finished: "finished";
23
+ lost: "lost";
24
+ running: "running";
25
+ spawned: "spawned";
26
+ stopped: "stopped";
27
+ }>;
28
+ budget: z.ZodObject<{
29
+ usd: z.ZodOptional<z.ZodNumber>;
30
+ tokens: z.ZodOptional<z.ZodInt>;
31
+ milliseconds: z.ZodOptional<z.ZodInt>;
32
+ }, z.core.$strict>;
33
+ usage: z.ZodObject<{
34
+ tokens: z.ZodInt;
35
+ usd: z.ZodNumber;
36
+ milliseconds: z.ZodInt;
37
+ }, z.core.$strict>;
38
+ resultReference: z.ZodOptional<z.ZodString>;
39
+ createdAt: z.ZodString;
40
+ updatedAt: z.ZodString;
41
+ }, z.core.$strict>;
42
+ export type AgentChildRecord = z.infer<typeof AgentChildRecordSchema>;
43
+ /**
44
+ * A child is a separate conversation with its own harness, so an approval or
45
+ * input request is raised inside it. The parent owns presentation (ADR 0179):
46
+ * the manager relays the request to the parent once and routes the parent's
47
+ * answer back. This is the source shape an `AgentChildHandle` reports.
48
+ */
49
+ export declare const AgentChildBlockingKindSchema: z.ZodEnum<{
50
+ approval: "approval";
51
+ input: "input";
52
+ }>;
53
+ export type AgentChildBlockingKind = z.infer<typeof AgentChildBlockingKindSchema>;
54
+ export declare const AgentChildBlockingSourceSchema: z.ZodObject<{
55
+ approvalId: z.ZodString;
56
+ callId: z.ZodString;
57
+ toolName: z.ZodString;
58
+ input: z.ZodJSONSchema;
59
+ kind: z.ZodDefault<z.ZodEnum<{
60
+ approval: "approval";
61
+ input: "input";
62
+ }>>;
63
+ batchId: z.ZodOptional<z.ZodString>;
64
+ }, z.core.$strict>;
65
+ export type AgentChildBlockingSource = z.infer<typeof AgentChildBlockingSourceSchema>;
66
+ /** A blocking event as the parent presents it: the id is rewritten under the child. */
67
+ export declare const AgentChildBlockingEventSchema: z.ZodObject<{
68
+ parentConversationId: z.ZodString;
69
+ childConversationId: z.ZodString;
70
+ kind: z.ZodEnum<{
71
+ approval: "approval";
72
+ input: "input";
73
+ }>;
74
+ approvalId: z.ZodString;
75
+ childApprovalId: z.ZodString;
76
+ callId: z.ZodString;
77
+ toolName: z.ZodString;
78
+ input: z.ZodJSONSchema;
79
+ batchId: z.ZodString;
80
+ presentedAt: z.ZodString;
81
+ }, z.core.$strict>;
82
+ export type AgentChildBlockingEvent = z.infer<typeof AgentChildBlockingEventSchema>;
83
+ /** The parent's answer to a presented child blocking event. */
84
+ export declare const ChildBlockingDecisionSchema: z.ZodUnion<readonly [z.ZodObject<{
85
+ approvalId: z.ZodString;
86
+ approved: z.ZodBoolean;
87
+ reason: z.ZodOptional<z.ZodString>;
88
+ }, z.core.$strict>, z.ZodObject<{
89
+ approvalId: z.ZodString;
90
+ value: z.ZodJSONSchema;
91
+ }, z.core.$strict>]>;
92
+ export type AgentChildBlockingDecision = z.infer<typeof ChildBlockingDecisionSchema>;
93
+ export declare function parseChild(raw: unknown): AgentChildRecord;
94
+ export declare function usageNumbers(usage: AgentUsage): {
95
+ tokens?: number;
96
+ usd?: number;
97
+ };
98
+ export interface AgentChildHandle {
99
+ result: Promise<{
100
+ resultReference?: string;
101
+ }>;
102
+ stopPolicy(name: string): void | Promise<void>;
103
+ sendMessage?(input: unknown): void | Promise<void>;
104
+ reachable?(): boolean | Promise<boolean>;
105
+ /**
106
+ * Child-local blocking events the parent must own. The host wires this to
107
+ * its child harness (`pendingApprovals`); the manager presents them on the
108
+ * parent and never on the child. → ADR 0179
109
+ */
110
+ blockingEvents?(): readonly AgentChildBlockingSource[] | Promise<readonly AgentChildBlockingSource[]>;
111
+ /** Route the parent's answer to the child harness (`respondToApproval`). */
112
+ respondToBlocking?(decision: AgentChildBlockingDecision): void | Promise<void>;
113
+ }
114
+ export interface AgentChildManager {
115
+ spawnChild(request: {
116
+ parentConversationId: string;
117
+ childConversationId?: string;
118
+ seedUptoSeq?: number;
119
+ childInput: unknown;
120
+ budget: AgentChildBudget;
121
+ }): Promise<AgentChildRecord>;
122
+ listChildren(parentConversationId: string): readonly AgentChildRecord[];
123
+ recordStepUsage(request: {
124
+ childConversationId: string;
125
+ usage: AgentUsage;
126
+ elapsedMs: number;
127
+ }): Promise<{
128
+ stop: boolean;
129
+ /** Whether a stop was delivered to the child's host from this process. */
130
+ enforced: boolean;
131
+ policyName?: string;
132
+ overrun: {
133
+ tokens: number;
134
+ usd: number;
135
+ milliseconds: number;
136
+ };
137
+ }>;
138
+ stopChildren(parentConversationId: string): Promise<void>;
139
+ sendMessage(parentConversationId: string, childConversationId: string, input: unknown): Promise<void>;
140
+ interruptChild(parentConversationId: string, childConversationId: string): Promise<void>;
141
+ waitChild(childConversationId: string): Promise<void>;
142
+ /**
143
+ * Present each live child's blocking events on the parent exactly once and
144
+ * return the pending set. Never writes a presentation event to the child's
145
+ * own conversation. → ADR 0179
146
+ */
147
+ listChildBlocking(parentConversationId: string): Promise<readonly AgentChildBlockingEvent[]>;
148
+ /**
149
+ * Route the parent's answer to the child that raised the request. A missing,
150
+ * stale or already-answered id is refused. Answering one request preserves
151
+ * every unanswered sibling, including requests in the same presentation batch.
152
+ */
153
+ respondToChildBlocking(parentConversationId: string, decision: AgentChildBlockingDecision): Promise<void>;
154
+ }
155
+ //# sourceMappingURL=children-contract.d.ts.map
@@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AAI,EAAE,OAAO,CAAC;QACd,0EAA0E;QAC1E,QAAQ,EAAE,OAAO,CAAC;QAClB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,OAAO,EAAE;YAAE,MAAM,EAAE,MAAM,CAAC;YAAC,GAAG,EAAE,MAAM,CAAC;YAAC,YAAY,EAAE,MAAM,CAAA;SAAE,CAAC;KAChE,CAAC,CAAC;IACH,YAAY,CAAC,oBAAoB,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1D,WAAW,CACT,oBAAoB,EAAE,MAAM,EAC5B,mBAAmB,EAAE,MAAM,EAC3B,KAAK,EAAE,OAAO,GACb,OAAO,CAAC,IAAI,CAAC,CAAC;IACjB,cAAc,CAAC,oBAAoB,EAAE,MAAM,EAAE,mBAAmB,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACzF,SAAS,CAAC,mBAAmB,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACtD;;;;OAIG;IACH,iBAAiB,CAAC,oBAAoB,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,uBAAuB,EAAE,CAAC,CAAC;IAC7F;;;;OAIG;IACH,sBAAsB,CACpB,oBAAoB,EAAE,MAAM,EAC5B,QAAQ,EAAE,0BAA0B,GACnC,OAAO,CAAC,IAAI,CAAC,CAAC;CAClB"}
@@ -1,85 +1,7 @@
1
- import type { LanguageModelUsage } from 'ai';
2
- import { z } from 'zod';
3
- import type { AgentRuntimeStopPolicy } from './runtime.js';
4
- import type { AgentUsage } from './schemas.js';
1
+ import { type AgentChildBudget, type AgentChildHandle, type AgentChildManager } from './children-contract.js';
5
2
  import type { SqliteAgentRuntimeStore } from './sqlite.js';
6
- export declare const AgentChildBudgetSchema: z.ZodObject<{
7
- usd: z.ZodOptional<z.ZodNumber>;
8
- tokens: z.ZodOptional<z.ZodInt>;
9
- milliseconds: z.ZodOptional<z.ZodInt>;
10
- }, z.core.$strict>;
11
- export type AgentChildBudget = z.infer<typeof AgentChildBudgetSchema>;
12
- export declare const AgentChildStateSchema: z.ZodEnum<{
13
- finished: "finished";
14
- lost: "lost";
15
- running: "running";
16
- spawned: "spawned";
17
- stopped: "stopped";
18
- }>;
19
- export type AgentChildState = z.infer<typeof AgentChildStateSchema>;
20
- export declare const AgentChildRecordSchema: z.ZodObject<{
21
- parentConversationId: z.ZodString;
22
- childConversationId: z.ZodString;
23
- seedUptoSeq: z.ZodInt;
24
- state: z.ZodEnum<{
25
- finished: "finished";
26
- lost: "lost";
27
- running: "running";
28
- spawned: "spawned";
29
- stopped: "stopped";
30
- }>;
31
- budget: z.ZodObject<{
32
- usd: z.ZodOptional<z.ZodNumber>;
33
- tokens: z.ZodOptional<z.ZodInt>;
34
- milliseconds: z.ZodOptional<z.ZodInt>;
35
- }, z.core.$strict>;
36
- usage: z.ZodObject<{
37
- tokens: z.ZodInt;
38
- usd: z.ZodNumber;
39
- milliseconds: z.ZodInt;
40
- }, z.core.$strict>;
41
- resultReference: z.ZodOptional<z.ZodString>;
42
- createdAt: z.ZodString;
43
- updatedAt: z.ZodString;
44
- }, z.core.$strict>;
45
- export type AgentChildRecord = z.infer<typeof AgentChildRecordSchema>;
46
- export interface AgentChildHandle {
47
- result: Promise<{
48
- resultReference?: string;
49
- }>;
50
- stopPolicy(name: string): void | Promise<void>;
51
- sendMessage?(input: unknown): void | Promise<void>;
52
- reachable?(): boolean | Promise<boolean>;
53
- }
54
- export interface AgentChildManager {
55
- spawnChild(request: {
56
- parentConversationId: string;
57
- childConversationId?: string;
58
- seedUptoSeq?: number;
59
- childInput: unknown;
60
- budget: AgentChildBudget;
61
- }): Promise<AgentChildRecord>;
62
- listChildren(parentConversationId: string): readonly AgentChildRecord[];
63
- recordStepUsage(request: {
64
- childConversationId: string;
65
- usage: AgentUsage;
66
- elapsedMs: number;
67
- }): Promise<{
68
- stop: boolean;
69
- /** Whether a stop was delivered to the child's host from this process. */
70
- enforced: boolean;
71
- policyName?: string;
72
- overrun: {
73
- tokens: number;
74
- usd: number;
75
- milliseconds: number;
76
- };
77
- }>;
78
- stopChildren(parentConversationId: string): Promise<void>;
79
- sendMessage(parentConversationId: string, childConversationId: string, input: unknown): Promise<void>;
80
- interruptChild(parentConversationId: string, childConversationId: string): Promise<void>;
81
- waitChild(childConversationId: string): Promise<void>;
82
- }
3
+ export type { AgentChildBlockingDecision, AgentChildBlockingEvent, AgentChildBlockingKind, AgentChildBlockingSource, AgentChildBudget, AgentChildHandle, AgentChildManager, AgentChildRecord, AgentChildState, } from './children-contract.js';
4
+ export { AgentChildBlockingEventSchema, AgentChildBlockingKindSchema, AgentChildBlockingSourceSchema, AgentChildBudgetSchema, AgentChildRecordSchema, AgentChildStateSchema, } from './children-contract.js';
83
5
  export declare function createSqliteAgentChildManager(input: {
84
6
  sqlite: SqliteAgentRuntimeStore;
85
7
  spawn(request: {
@@ -92,22 +14,5 @@ export declare function createSqliteAgentChildManager(input: {
92
14
  remainingBudget?(parentConversationId: string): AgentChildBudget | Promise<AgentChildBudget>;
93
15
  now?: () => Date;
94
16
  }): AgentChildManager;
95
- /**
96
- * The child runtime's own budget policy.
97
- *
98
- * `recordStepUsage` measures and decides; something has to call it at every
99
- * step boundary of the child's run, and that is the child's runtime. Given to
100
- * `createAgentRuntime({ loop: { stopPolicies: [agentChildBudgetStopPolicy(…)] } })`
101
- * in the host that runs the child, it records the last step's usage and stops
102
- * the run as `policy_stop` (`child-budget`) when the budget is spent — the
103
- * enforcement the guide promises, in the package rather than in every host.
104
- */
105
- export declare function agentChildBudgetStopPolicy(input: {
106
- manager: Pick<AgentChildManager, 'recordStepUsage'>;
107
- childConversationId: string;
108
- /** Cost of a step, when a USD budget is set; tokens come from the step itself. */
109
- cost?: (step: {
110
- usage: LanguageModelUsage;
111
- }) => AgentUsage['cost'];
112
- }): AgentRuntimeStopPolicy;
17
+ export { agentChildBudgetStopPolicy } from './child-budget-policy.js';
113
18
  //# sourceMappingURL=children.d.ts.map
@@ -1 +1 @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oBAAoB,EAAE,MAAM,CAAC;QAC7B,mBAAmB,EAAE,MAAM,CAAC;QAC5B,WAAW,EAAE,UAAU,CAAC;QACxB,UAAU,EAAE,OAAO,CAAC;QACpB,MAAM,EAAE,gBAAgB,CAAC;KAC1B,GAAG,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IACjD,eAAe,CAAC,CAAC,oBAAoB,EAAE,MAAM,GAAG,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAC7F,GAAG,CAAC,EAAE,MAAM,IAAI,CAAC;CAClB,GAAG,iBAAiB,CA4bpB;AAED,OAAO,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,33 @@
1
+ import { type AgentCodingToolConfig } from './coding-tool-contract.js';
2
+ import type { AgentProcessSandbox } from './sandbox.js';
3
+ export declare function runCodingShell(input: {
4
+ executableName: string;
5
+ executable: string;
6
+ args: readonly string[];
7
+ cwd: string;
8
+ environment: Readonly<Record<string, string>>;
9
+ signal?: AbortSignal;
10
+ timeoutMs: number;
11
+ terminationGraceMs: number;
12
+ maxOutputBytes: number;
13
+ maxArtifactBytes: number;
14
+ artifacts?: AgentCodingToolConfig['artifacts'];
15
+ authorization?: Parameters<NonNullable<AgentCodingToolConfig['authorize']>>[0];
16
+ spawn?: () => ReturnType<NonNullable<AgentProcessSandbox['spawn']>>;
17
+ }): Promise<{
18
+ executable: string;
19
+ exitCode: number | null;
20
+ signal: string | null;
21
+ stdout: string;
22
+ stderr: string;
23
+ outcome: "cancelled" | "exited" | "output-limit" | "timeout";
24
+ artifact?: {
25
+ reference: string;
26
+ bytes: number;
27
+ truncated: boolean;
28
+ headBytes: number;
29
+ tailBytes: number;
30
+ omittedBytes: number;
31
+ } | undefined;
32
+ }>;
33
+ //# sourceMappingURL=coding-shell-process.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coding-shell-process.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/coding-shell-process.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,qBAAqB,EAAqB,MAAM,wBAAwB,CAAC;AAEvF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAErD,wBAAsB,cAAc,CAAC,KAAK,EAAE;IAC1C,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC9C,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,qBAAqB,CAAC,WAAW,CAAC,CAAC;IAC/C,aAAa,CAAC,EAAE,UAAU,CAAC,WAAW,CAAC,qBAAqB,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC/E,KAAK,CAAC,EAAE,MAAM,UAAU,CAAC,WAAW,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;CACrE;;;;;;;;;;;;;;;GAwMA"}
@@ -68,6 +68,24 @@ export declare const AgentCodingToolPathAuthorizationSchema: z.ZodObject<{
68
68
  path: z.ZodString;
69
69
  }, z.core.$strict>;
70
70
  export type AgentCodingToolPathAuthorization = z.infer<typeof AgentCodingToolPathAuthorizationSchema>;
71
+ /**
72
+ * One entry the host's path policy refused while listing or searching.
73
+ *
74
+ * Only the workspace-relative path and kind travel — never content — so a
75
+ * caller can tell "the host will not let me see this" from "this is not here".
76
+ * The absence of this fact is what made a denied `.env` indistinguishable from
77
+ * a file that does not exist.
78
+ */
79
+ export declare const CodingDeniedEntrySchema: z.ZodObject<{
80
+ path: z.ZodString;
81
+ kind: z.ZodEnum<{
82
+ directory: "directory";
83
+ file: "file";
84
+ other: "other";
85
+ symlink: "symlink";
86
+ }>;
87
+ }, z.core.$strict>;
88
+ export type CodingDeniedEntry = z.infer<typeof CodingDeniedEntrySchema>;
71
89
  export interface AgentCodingToolConfig {
72
90
  root: string;
73
91
  authorize(input: AgentCodingToolAuthorization): boolean | Promise<boolean>;
@@ -1 +1 @@
1
- {"version":3,"file":"coding-tool-contract.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/coding-tool-contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AAE9E,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;kBAgB7B,CAAC;AAEZ,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCA8D7C,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAChF,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAE9F,eAAO,MAAM,sCAAsC;;kBAExC,CAAC;AAEZ,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CACpD,OAAO,sCAAsC,CAC9C,CAAC;AAEF,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,KAAK,EAAE,4BAA4B,GAAG,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC3E;;;;;OAKG;IACH,aAAa,CAAC,CAAC,KAAK,EAAE,gCAAgC,GAAG,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACpF,WAAW,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM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,eAAO,MAAM,qBAAqB;;;;kBAcvB,CAAC;AAEZ,wBAAgB,sBAAsB,CAAC,eAAe,EAAE,SAAS,MAAM,EAAE;;;;;;mBAWxE;AAED,eAAO,MAAM,gBAAgB;;;;kBAMlB,CAAC;AAEZ,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;kBAoBnB,CAAC;AAkBZ,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,OAAO,CAAC,qBAAqB,CAAC,GAAG,SAAS,GAChD,qBAAqB,CAEvB"}
@@ -1 +1 @@
1
- {"version":3,"file":"coding-tool-files.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/coding-tool-files.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC9B,KAAK,qBAAqB,EAK3B,MAAM,wBAAwB,CAAC;AA+BhC,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,qBAAqB,EAC7B,MAAM,EAAE,qBAAqB,GAC5B,SAAS,yBAAyB,EAAE,CAwJtC"}
1
+ {"version":3,"file":"coding-tool-files.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/coding-tool-files.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC9B,KAAK,qBAAqB,EAK3B,MAAM,wBAAwB,CAAC;AAgChC,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,qBAAqB,EAC7B,MAAM,EAAE,qBAAqB,GAC5B,SAAS,yBAAyB,EAAE,CA+LtC"}
@@ -1 +1 @@
1
- {"version":3,"file":"coding-tool-listing.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/coding-tool-listing.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,qBAAqB,EACrB,yBAAyB,EACzB,qBAAqB,EACtB,MAAM,wBAAwB,CAAC;AAchC,iFAAiF;AACjF,eAAO,MAAM,4BAA4B,UAQxC,CAAC;AAoCF;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CA2B5D;AAED,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,qBAAqB,EAC7B,MAAM,EAAE,qBAAqB,GAC5B,SAAS,yBAAyB,EAAE,CA2GtC"}
1
+ {"version":3,"file":"coding-tool-listing.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/coding-tool-listing.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,qBAAqB,EACrB,yBAAyB,EACzB,qBAAqB,EACtB,MAAM,wBAAwB,CAAC;AAehC,iFAAiF;AACjF,eAAO,MAAM,4BAA4B,UAQxC,CAAC;AA6CF;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CA2B5D;AAED,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,qBAAqB,EAC7B,MAAM,EAAE,qBAAqB,GAC5B,SAAS,yBAAyB,EAAE,CAkItC"}
@@ -1 +1 @@
1
- {"version":3,"file":"coding-tool-search-patch.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/coding-tool-search-patch.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,qBAAqB,EACrB,yBAAyB,EACzB,qBAAqB,EACtB,MAAM,wBAAwB,CAAC;AAqIhC,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,qBAAqB,EAC7B,MAAM,EAAE,qBAAqB,GAC5B,SAAS,yBAAyB,EAAE,CAqNtC"}
1
+ {"version":3,"file":"coding-tool-search-patch.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/coding-tool-search-patch.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,qBAAqB,EACrB,yBAAyB,EACzB,qBAAqB,EACtB,MAAM,wBAAwB,CAAC;AA6IhC,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,qBAAqB,EAC7B,MAAM,EAAE,qBAAqB,GAC5B,SAAS,yBAAyB,EAAE,CA6NtC"}
@@ -1 +1 @@
1
- {"version":3,"file":"coding-tool-shell.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/coding-tool-shell.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC9B,KAAK,qBAAqB,EAG3B,MAAM,wBAAwB,CAAC;AAgNhC,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,qBAAqB,EAC7B,MAAM,EAAE,qBAAqB,GAC5B,yBAAyB,CAkH3B"}
1
+ {"version":3,"file":"coding-tool-shell.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/coding-tool-shell.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC9B,KAAK,qBAAqB,EAG3B,MAAM,wBAAwB,CAAC;AAShC,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,qBAAqB,EAC7B,MAAM,EAAE,qBAAqB,GAC5B,yBAAyB,CA+H3B"}