stitchkit 0.127.0 → 0.128.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 (233) hide show
  1. package/CHANGELOG.md +137 -6
  2. package/dist/agent-executor/acp/v1-connect.d.ts +9 -1
  3. package/dist/agent-executor/acp/v1-connect.d.ts.map +1 -1
  4. package/dist/agent-executor/acp/v1-driver.d.ts +8 -2
  5. package/dist/agent-executor/acp/v1-driver.d.ts.map +1 -1
  6. package/dist/agent-executor/acp/v1-map.d.ts.map +1 -1
  7. package/dist/agent-executor/acp/v1-session.d.ts +8 -0
  8. package/dist/agent-executor/acp/v1-session.d.ts.map +1 -1
  9. package/dist/agent-executor/claude/cli-driver.d.ts +4 -0
  10. package/dist/agent-executor/claude/cli-driver.d.ts.map +1 -1
  11. package/dist/agent-executor/claude/protocol.d.ts +20 -2
  12. package/dist/agent-executor/claude/protocol.d.ts.map +1 -1
  13. package/dist/agent-executor/claude/session.d.ts +2 -1
  14. package/dist/agent-executor/claude/session.d.ts.map +1 -1
  15. package/dist/agent-executor/claude/transcript.d.ts +7 -4
  16. package/dist/agent-executor/claude/transcript.d.ts.map +1 -1
  17. package/dist/agent-executor/claude-sdk/driver.d.ts +4 -0
  18. package/dist/agent-executor/claude-sdk/driver.d.ts.map +1 -1
  19. package/dist/agent-executor/claude-sdk/session.d.ts.map +1 -1
  20. package/dist/agent-executor/codex/driver.d.ts +4 -0
  21. package/dist/agent-executor/codex/driver.d.ts.map +1 -1
  22. package/dist/agent-executor/codex/protocol.d.ts +26 -2
  23. package/dist/agent-executor/codex/protocol.d.ts.map +1 -1
  24. package/dist/agent-executor/codex/session.d.ts +3 -1
  25. package/dist/agent-executor/codex/session.d.ts.map +1 -1
  26. package/dist/agent-executor/image-input.d.ts +71 -0
  27. package/dist/agent-executor/image-input.d.ts.map +1 -0
  28. package/dist/agent-executor/session-primitives.d.ts +0 -3
  29. package/dist/agent-executor/session-primitives.d.ts.map +1 -1
  30. package/dist/agent-runtime/agent-tool.d.ts +21 -7
  31. package/dist/agent-runtime/agent-tool.d.ts.map +1 -1
  32. package/dist/agent-runtime/branch-contract.d.ts +1 -0
  33. package/dist/agent-runtime/branch-contract.d.ts.map +1 -1
  34. package/dist/agent-runtime/branch-identities.d.ts +5 -2
  35. package/dist/agent-runtime/branch-identities.d.ts.map +1 -1
  36. package/dist/agent-runtime/branch-messages.d.ts +9 -9
  37. package/dist/agent-runtime/branch-messages.d.ts.map +1 -1
  38. package/dist/agent-runtime/branch-observations.d.ts +45 -32
  39. package/dist/agent-runtime/branch-observations.d.ts.map +1 -1
  40. package/dist/agent-runtime/branch-provider.d.ts +12 -6
  41. package/dist/agent-runtime/branch-provider.d.ts.map +1 -1
  42. package/dist/agent-runtime/branch-source.d.ts +13 -1
  43. package/dist/agent-runtime/branch-source.d.ts.map +1 -1
  44. package/dist/agent-runtime/child-tools.d.ts +64 -0
  45. package/dist/agent-runtime/child-tools.d.ts.map +1 -1
  46. package/dist/agent-runtime/event-search-tools.d.ts +82 -5
  47. package/dist/agent-runtime/event-search-tools.d.ts.map +1 -1
  48. package/dist/agent-runtime/invocation-attempt.d.ts +1 -1
  49. package/dist/agent-runtime/invocation-attempt.d.ts.map +1 -1
  50. package/dist/agent-runtime/invocation-payload.d.ts +12 -0
  51. package/dist/agent-runtime/invocation-payload.d.ts.map +1 -1
  52. package/dist/agent-runtime/invocation-read.d.ts +6 -3
  53. package/dist/agent-runtime/invocation-read.d.ts.map +1 -1
  54. package/dist/agent-runtime/invocation-schema.d.ts +50 -8
  55. package/dist/agent-runtime/invocation-schema.d.ts.map +1 -1
  56. package/dist/agent-runtime/invocations.d.ts +20 -9
  57. package/dist/agent-runtime/invocations.d.ts.map +1 -1
  58. package/dist/agent-runtime/postgres.d.ts.map +1 -1
  59. package/dist/agent-runtime/schedule-tools.d.ts +30 -0
  60. package/dist/agent-runtime/schedule-tools.d.ts.map +1 -1
  61. package/dist/agent-runtime/schemas-invocation-payload.d.ts +48 -0
  62. package/dist/agent-runtime/schemas-invocation-payload.d.ts.map +1 -0
  63. package/dist/agent-runtime/sql-events.d.ts.map +1 -1
  64. package/dist/agent-runtime/sql-session.d.ts +11 -0
  65. package/dist/agent-runtime/sql-session.d.ts.map +1 -1
  66. package/dist/agent-runtime/sqlite-transactions.d.ts.map +1 -1
  67. package/dist/agent-runtime/state-tools.d.ts +55 -0
  68. package/dist/agent-runtime/state-tools.d.ts.map +1 -1
  69. package/dist/agent-runtime/store-branch.d.ts.map +1 -1
  70. package/dist/agent-runtime/store-conformance-lifecycle.d.ts +20 -20
  71. package/dist/agent-runtime/store-conformance-support.d.ts +10 -10
  72. package/dist/agent-runtime/store-create.d.ts.map +1 -1
  73. package/dist/agent-runtime/store-driver-contract.d.ts +12 -0
  74. package/dist/agent-runtime/store-driver-contract.d.ts.map +1 -1
  75. package/dist/agent-runtime/store-memory-events.d.ts.map +1 -1
  76. package/dist/agent-runtime/store.d.ts +7 -0
  77. package/dist/agent-runtime/store.d.ts.map +1 -1
  78. package/dist/declaration/declaration.d.ts +6 -3
  79. package/dist/declaration/declaration.d.ts.map +1 -1
  80. package/dist/entrypoints/agent-executor/acp.d.ts +1 -1
  81. package/dist/entrypoints/agent-executor/acp.d.ts.map +1 -1
  82. package/dist/entrypoints/agent-executor/acp.js +23 -12
  83. package/dist/entrypoints/agent-executor/claude-sdk.js +26 -10
  84. package/dist/entrypoints/agent-executor/claude.js +35 -16
  85. package/dist/entrypoints/agent-executor/codex.js +81 -21
  86. package/dist/entrypoints/agent-executor.js +1 -1
  87. package/dist/entrypoints/agent-runtime/harness.js +5 -6
  88. package/dist/entrypoints/agent-runtime/openrouter.js +2 -2
  89. package/dist/entrypoints/agent-runtime/postgres.js +8 -3
  90. package/dist/entrypoints/agent-runtime/sandbox.js +3 -3
  91. package/dist/entrypoints/agent-runtime/sqlite/bun.js +4 -4
  92. package/dist/entrypoints/agent-runtime/sqlite/node.js +4 -4
  93. package/dist/entrypoints/agent-runtime/testing.js +6 -6
  94. package/dist/entrypoints/agent-runtime.d.ts +9 -7
  95. package/dist/entrypoints/agent-runtime.d.ts.map +1 -1
  96. package/dist/entrypoints/agent-runtime.js +246 -199
  97. package/dist/entrypoints/application/diagnostic-journal.js +4 -4
  98. package/dist/entrypoints/application/directory-inbox.js +8 -8
  99. package/dist/entrypoints/cli/publish.js +8 -8
  100. package/dist/entrypoints/cli.js +10 -9
  101. package/dist/entrypoints/declaration.js +0 -1
  102. package/dist/entrypoints/files.js +40 -17
  103. package/dist/entrypoints/node.js +4 -4
  104. package/dist/entrypoints/observability.js +1 -1
  105. package/dist/entrypoints/process.js +1 -1
  106. package/dist/entrypoints/server.js +7 -7
  107. package/dist/entrypoints/service-host/macos.js +4 -4
  108. package/dist/entrypoints/service-host.d.ts +4 -1
  109. package/dist/entrypoints/service-host.d.ts.map +1 -1
  110. package/dist/entrypoints/service-host.js +831 -220
  111. package/dist/entrypoints/spend.js +1 -1
  112. package/dist/entrypoints/telegram.js +4 -4
  113. package/dist/entrypoints/tools/agent.js +4 -3
  114. package/dist/entrypoints/tools/invoker.js +3 -2
  115. package/dist/entrypoints/tools/mcp.js +4 -3
  116. package/dist/entrypoints/tools/toolkit.js +6 -5
  117. package/dist/entrypoints/tools.d.ts +1 -1
  118. package/dist/entrypoints/tools.d.ts.map +1 -1
  119. package/dist/entrypoints/tools.js +10 -8
  120. package/dist/files/directory-appearance.d.ts +20 -9
  121. package/dist/files/directory-appearance.d.ts.map +1 -1
  122. package/dist/files/polled-json.d.ts.map +1 -1
  123. package/dist/files/regular-file.d.ts +15 -5
  124. package/dist/files/regular-file.d.ts.map +1 -1
  125. package/dist/{index-z4k0hqp9.js → index-0gqs8ght.js} +106 -24
  126. package/dist/{index-caywx1c0.js → index-13dnv6d0.js} +107 -10
  127. package/dist/{index-a725ayvz.js → index-1qwrczr1.js} +1 -1
  128. package/dist/{index-xtkw9866.js → index-2c5w2d1d.js} +1 -1
  129. package/dist/{index-g1q7fwn9.js → index-2nwvn7m2.js} +1 -1
  130. package/dist/{index-4s2w4g37.js → index-3tnwtz38.js} +80 -2
  131. package/dist/{index-5e0zsbf7.js → index-4j8efqr3.js} +1 -1
  132. package/dist/{index-p1m9djt6.js → index-5v5vg85s.js} +1 -1
  133. package/dist/{index-x90w78yz.js → index-673drwkn.js} +23 -8
  134. package/dist/{index-7xp05h20.js → index-6wp4dn9d.js} +6 -6
  135. package/dist/{index-0hdm5sx6.js → index-8x22nprv.js} +6 -2
  136. package/dist/{index-j13gzgdv.js → index-bz3gn6cs.js} +8 -4
  137. package/dist/{index-d96c1n1q.js → index-c5gp2gh6.js} +20 -19
  138. package/dist/{index-wbnpa8z6.js → index-d54npte7.js} +4 -4
  139. package/dist/{index-kmbpej2y.js → index-emgrmavr.js} +102 -61
  140. package/dist/{index-bbzvrq66.js → index-g3e57qj6.js} +455 -202
  141. package/dist/index-gf92hc87.js +100 -0
  142. package/dist/{index-3djgv3ch.js → index-gzny6zsw.js} +25 -10
  143. package/dist/{index-3b31z0pc.js → index-hj1zq7mh.js} +12 -6
  144. package/dist/{index-8xr2eq99.js → index-jfecdk1e.js} +3 -3
  145. package/dist/{index-dvd1qdwa.js → index-ke02kxsr.js} +3 -3
  146. package/dist/{index-83n766x4.js → index-m18xm96h.js} +15 -9
  147. package/dist/{index-qnzhmk2s.js → index-n7f89hjw.js} +90 -47
  148. package/dist/{index-3agqmmrg.js → index-pn5b11ce.js} +7 -9
  149. package/dist/{index-3gwp8ez6.js → index-pwskmywy.js} +12 -17
  150. package/dist/{index-9wh98cpa.js → index-rxnyygke.js} +130 -90
  151. package/dist/{index-0djnptn8.js → index-rzeezh79.js} +10 -3
  152. package/dist/{index-nbv44x0x.js → index-s2e3h616.js} +137 -36
  153. package/dist/{index-5zwac8ft.js → index-t7wa7k12.js} +2 -2
  154. package/dist/{index-xypxnzhp.js → index-v1mxss62.js} +2 -2
  155. package/dist/index-vgzhw2zk.js +304 -0
  156. package/dist/{index-jrka9029.js → index-vmbxj75t.js} +2 -2
  157. package/dist/{index-j516jaaz.js → index-waa6t4zx.js} +49 -2
  158. package/dist/{index-fcw255hd.js → index-xv9jb84s.js} +2 -2
  159. package/dist/{index-dwa6pskj.js → index-y065r8g5.js} +82 -43
  160. package/dist/internal/bounded-file-confirm.d.ts +32 -0
  161. package/dist/internal/bounded-file-confirm.d.ts.map +1 -0
  162. package/dist/internal/bounded-file-read.d.ts +10 -7
  163. package/dist/internal/bounded-file-read.d.ts.map +1 -1
  164. package/dist/internal/file-observation.d.ts +5 -1
  165. package/dist/internal/file-observation.d.ts.map +1 -1
  166. package/dist/internal/process-instance.d.ts +8 -0
  167. package/dist/internal/process-instance.d.ts.map +1 -1
  168. package/dist/internal/unix-socket.d.ts +3 -1
  169. package/dist/internal/unix-socket.d.ts.map +1 -1
  170. package/dist/server/unix-client.d.ts +7 -0
  171. package/dist/server/unix-client.d.ts.map +1 -1
  172. package/dist/service-host/systemd-inspect.d.ts +3 -1
  173. package/dist/service-host/systemd-inspect.d.ts.map +1 -1
  174. package/dist/service-host/systemd-render-shared.d.ts +64 -0
  175. package/dist/service-host/systemd-render-shared.d.ts.map +1 -0
  176. package/dist/service-host/systemd-render.d.ts +31 -26
  177. package/dist/service-host/systemd-render.d.ts.map +1 -1
  178. package/dist/service-host/systemd-timer-render.d.ts +31 -0
  179. package/dist/service-host/systemd-timer-render.d.ts.map +1 -0
  180. package/dist/service-host/systemd-timer-rollback.d.ts +26 -0
  181. package/dist/service-host/systemd-timer-rollback.d.ts.map +1 -0
  182. package/dist/service-host/systemd-timer.d.ts +82 -0
  183. package/dist/service-host/systemd-timer.d.ts.map +1 -0
  184. package/dist/service-host/systemd-unit-ops.d.ts +26 -0
  185. package/dist/service-host/systemd-unit-ops.d.ts.map +1 -0
  186. package/dist/service-host/systemd.d.ts +1 -1
  187. package/dist/service-host/systemd.d.ts.map +1 -1
  188. package/dist/tools/access.d.ts +30 -1
  189. package/dist/tools/access.d.ts.map +1 -1
  190. package/dist/tools/agent.d.ts +2 -2
  191. package/dist/tools/agent.d.ts.map +1 -1
  192. package/dist/tools/cli/args-scan.d.ts +5 -0
  193. package/dist/tools/cli/args-scan.d.ts.map +1 -1
  194. package/dist/tools/cli/args.d.ts +11 -5
  195. package/dist/tools/cli/args.d.ts.map +1 -1
  196. package/dist/tools/cli/invoke.d.ts +2 -1
  197. package/dist/tools/cli/invoke.d.ts.map +1 -1
  198. package/dist/tools/cli/notices.d.ts.map +1 -1
  199. package/dist/tools/cli/run-managed.d.ts.map +1 -1
  200. package/dist/tools/cli/session.d.ts.map +1 -1
  201. package/dist/tools/execute.d.ts.map +1 -1
  202. package/dist/tools/invoker.d.ts +2 -1
  203. package/dist/tools/invoker.d.ts.map +1 -1
  204. package/dist/tools/list-names.d.ts +2 -3
  205. package/dist/tools/list-names.d.ts.map +1 -1
  206. package/dist/tools/manifest.d.ts +2 -3
  207. package/dist/tools/manifest.d.ts.map +1 -1
  208. package/dist/tools/mcp/mount.d.ts +5 -5
  209. package/dist/tools/mcp/mount.d.ts.map +1 -1
  210. package/dist/tools/mcp/register.d.ts +2 -1
  211. package/dist/tools/mcp/register.d.ts.map +1 -1
  212. package/dist/tools/mcp/runtime-tools.d.ts.map +1 -1
  213. package/llms/agent-executor-acp.txt +10 -6
  214. package/llms/agent-executor-claude-sdk.txt +1 -1
  215. package/llms/agent-executor-claude.txt +1 -1
  216. package/llms/agent-executor-codex.txt +1 -1
  217. package/llms/agent-runtime.4.txt +21 -9
  218. package/llms/cli.3.txt +4 -4
  219. package/llms/cli.txt +1 -0
  220. package/llms/declaration.txt +2 -2
  221. package/llms/files.txt +1 -1
  222. package/llms/node.txt +2 -2
  223. package/llms/server.5.txt +2 -2
  224. package/llms/service-host.txt +5 -5
  225. package/llms/stitchkit.txt +81 -77
  226. package/llms/tools.3.txt +3 -2
  227. package/llms/upgrading-0.128.0.txt +147 -0
  228. package/llms/upgrading.txt +1 -0
  229. package/llms-full.txt +272 -113
  230. package/llms.txt +14 -13
  231. package/package.json +1 -1
  232. package/dist/index-ajmtxsky.js +0 -193
  233. package/dist/index-ax3wns1a.js +0 -93
package/CHANGELOG.md CHANGED
@@ -15,6 +15,137 @@ additive**; the first breaking change landed in 0.10.0. Grep the file for
15
15
 
16
16
  ## [Unreleased]
17
17
 
18
+ ## [0.128.0] - 2026-11-25
19
+
20
+ ### ⚠️ Breaking changes
21
+
22
+ **Who must act:** every caller of `createModelInvocationLedger` from `stitchkit/agent-runtime` that
23
+ reads `readPayload`, assumes `sent.artifactId` or a `provider/response` record's `artifactId` is
24
+ always present, switches exhaustively on `ModelInvocationConfig.authorize` actions, or relies on
25
+ `maxPayloadBytes` aborting the provider call
26
+ ([migration](docs/guide/upgrading.md#invocation-payload-lifecycle)); every caller of
27
+ `extractCliGlobalOptions` or `scanCliInvocation` from `stitchkit/cli` that caught `CliArgumentError`
28
+ on call or on `.argv` access ([migration](docs/guide/upgrading.md#cli-option-projections-error-field));
29
+ and every repository with a `project.json` validated by `stitchkit/declaration` that still declares
30
+ `identity.version` ([migration](docs/guide/upgrading.md#declaration-single-version)).
31
+
32
+ - `stitchkit/agent-runtime` `createModelInvocationLedger` makes `maxPayloadBytes` non-fatal and adds
33
+ encrypted payload expiry redaction (`purgePayloads` / `store.purgeExpiredPayloads`). Exceeding
34
+ `maxPayloadBytes` previously failed the call before or after provider execution, and encrypted
35
+ payload artifacts had no retention purge path. Oversized request/response bodies now omit the
36
+ encrypted artifact with `payloadOmitted: 'max-payload-bytes'` (making `sent.artifactId` on
37
+ `provider/request` and top-level `artifactId` on `provider/response` optional while preserving
38
+ `payloadSha256`) and report `InvocationPayloadTooLargeError` via `complete().receiptError`;
39
+ `readPayload` now returns a discriminated `ModelInvocationPayloadRead`
40
+ (`{ status: 'available', payload, ... }` or `{ status: 'expired', expiredAt, ... }`); and
41
+ `ModelInvocationConfig.authorize` receives a fifth action `'purge-payloads'` alongside
42
+ `'complete'`, `'agent'`, `'read'`, and `'read-payload'` (`ModelInvocationAuthorizationInput`).
43
+ `const body = (await ledger.readPayload(in, ctx)).payload` →
44
+ `const res = await ledger.readPayload(in, ctx); if (res.status === 'available') { … }`.
45
+ **Affects:** `stitchkit/agent-runtime` createModelInvocationLedger, ModelInvocationLedger(readPayload, purgePayloads), ModelInvocationConfig(maxPayloadBytes, authorize), ModelInvocationRecordSchema, ModelInvocationRecord, ModelInvocationPayloadReadSchema, ModelInvocationPayloadRead, ModelInvocationAuthorizationInput, InvocationPayloadTooLargeError, createAgentRuntimeStore, createMemoryAgentRuntimeStore, AgentRuntimeStore(purgeExpiredPayloads)
46
+ - `stitchkit/cli` `extractCliGlobalOptions` and `scanCliInvocation` return malformed CLI flag
47
+ errors on an `error?: CliArgumentError` field instead of throwing on call or via a throwing
48
+ `.argv` getter. Dynamic-catalog entrypoints calling `extractCliGlobalOptions` before `createCli`
49
+ had to wrap the helper in `try/catch` and avoid spreading the returned object whenever a user
50
+ passed malformed flags. On error, `extractCliGlobalOptions` returns `argv: []` and
51
+ `scanCliInvocation` returns `command: undefined` and `commandTokens: []` alongside `error`, while
52
+ early notices suppress when `scan.error !== undefined || scan.framework.quiet`. `routeCliArgv`
53
+ preserves its `error?: string` field.
54
+ `try { const p = extractCliGlobalOptions(argv, g); void p.argv } catch (e) { … }` →
55
+ `const p = extractCliGlobalOptions(argv, g); if (p.error) { … }`. → ADR 0327
56
+ **Affects:** `stitchkit/cli` extractCliGlobalOptions, scanCliInvocation, CliGlobalOptionsParse(argv, error), CliInvocationScan(command, commandTokens, error)
57
+ - `stitchkit/declaration` `ProjectIdentitySchema` removes `identity.version` so the root
58
+ `package.json` is the single source of truth for a project's version (supporting both SemVer and
59
+ CalVer without a second copy in `project.json`). Because `ProjectIdentitySchema` is strict, a
60
+ `project.json` carrying `identity.version` is now refused. `starter.version` (the scaffolder
61
+ package version) is unchanged.
62
+ `{ "identity": { "slug": "app", "name": "App", "version": "0.1.0", "description": { "en": "…" } } }` →
63
+ `{ "identity": { "slug": "app", "name": "App", "description": { "en": "…" } } }`.
64
+ **Affects:** `stitchkit/declaration` ProjectIdentitySchema, ProjectIdentity, ProjectDeclarationSchema, ProjectDeclaration, parseProjectDeclaration, findProjectRole
65
+
66
+ ### Added
67
+
68
+ - `stitchkit/agent-executor/claude`, `stitchkit/agent-executor/claude-sdk`, and
69
+ `stitchkit/agent-executor/codex`: turn-input image attachments via optional `resolveFile` and
70
+ `maxImageBytes` (default 5 MiB) on `ClaudeCliDriverConfig`, `ClaudeSdkDriverConfig`, and
71
+ `CodexDriverConfig`, encoding ordered text and base64 image blocks/data URLs and failing closed
72
+ before dispatch on unsupported media types, oversize payloads, or unresolved references.
73
+ - `stitchkit/agent-executor/acp`: `AcpApprovalEnforcement` (`'agent-initiated'`) on
74
+ `AcpDriver.approvalEnforcement` and `AcpSession.approvalEnforcement`, advertising that ACP
75
+ tool approvals are initiated by the agent and answered by the host without fabricating approval
76
+ prompts for unprompted tool calls.
77
+ - `stitchkit/files`: `match?: 'directory' | 'entry'` on `waitForDirectory` (`WaitForDirectoryOptions`),
78
+ allowing callers to wake when any filesystem entry (regular file, broken or cyclic symlink, or
79
+ directory) appears at the target path while still refusing intermediate non-directory components.
80
+ - `stitchkit/service-host`: extended `SystemdServiceUnitConfig` with `startLimitIntervalSec`,
81
+ `successExitStatus`, `timeoutStartSec`, `dynamicUser`, `nice`, `ioSchedulingClass`,
82
+ `privateNetwork`, `privateTmp`, `protectSystem`, `protectHome`, `restrictAddressFamilies`,
83
+ `bindReadOnlyPaths` (`SystemdBindReadOnlyPath`), `runtimeDirectoryMode`, `stateDirectory`, and
84
+ `stateDirectoryMode`, plus `.timer` rendering (`renderSystemdTimerUnit`, `SystemdTimerUnitConfig`,
85
+ `SystemdTimerUnitConfigSchema`) and rollback-guarded `.service` + `.timer` pair inspection and
86
+ installation (per-file atomic writes with rollback: `checkSystemdTimerPair`,
87
+ `installSystemdTimerPair`, `CheckSystemdTimerPairOptions`, `SystemdTimerPairCheckResult`,
88
+ `InstallSystemdTimerPairOptions`, `SystemdTimerPairInstallResult`).
89
+ - `stitchkit/agent-runtime`: `sourceIdentity: 'rekey-spill'` on `BranchAgentConversationInput.applicationKeys`,
90
+ rekeying declared application tool JSON fields that carry source spill references (live or
91
+ legitimately expired) while refusing foreign spills and all other source identities (→ ADR 0328).
92
+ - `stitchkit/agent-runtime`: `ModelInvocationLedger.purgePayloads` and
93
+ `AgentRuntimeStore.purgeExpiredPayloads` (`PurgeInvocationPayloadsInput`,
94
+ `PurgeInvocationPayloadsResult`) to redact expired encrypted invocation payloads in-place across
95
+ memory, SQLite (including `events_fts`), and Postgres (including `event_search`) in bounded pages
96
+ without losing receipt metadata or digests.
97
+ - `stitchkit/agent-runtime` and `stitchkit/tools`: deeply frozen non-executable static catalog
98
+ descriptors (`AgentToolDescriptor`, `AGENT_STATE_TOOL_DESCRIPTORS`,
99
+ `AGENT_SCHEDULE_TOOL_DESCRIPTORS`, `AGENT_CHILD_TOOL_DESCRIPTORS`,
100
+ `AGENT_EVENT_SEARCH_TOOL_DESCRIPTORS`) and widened `listToolNames`, `buildToolManifest`, and
101
+ `describeToolCatalog` to accept `SurfaceRuntimeToolDefinition` (exported from `stitchkit/tools`)
102
+ so hosts can inspect full tool catalogs without an active run.
103
+ - `stitchkit/tools`, `stitchkit/tools/agent`, `stitchkit/tools/mcp`, `stitchkit/tools/invoker`,
104
+ `stitchkit/cli`, and `stitchkit/agent-runtime`: `access: { inspect: true }` on `ToolAccess` for
105
+ read-only surface inspection (catalogs, schemas, `--help`, `--schema`, `commands`) that refuses
106
+ every tool invocation fail-closed with `FORBIDDEN` before extensions, hooks, durability,
107
+ multi-round handlers, or auth run.
108
+
109
+ ### Fixed
110
+
111
+ - `stitchkit/agent-executor/claude` and `stitchkit/agent-executor/claude-sdk`: stream Claude Code
112
+ transcripts line-by-line during `findInput` instead of reading the whole file into a 64 MiB string
113
+ buffer, matching only `type === 'user'` records (never mistaking assistant UUIDs for accepted user
114
+ input) and failing closed on corrupt or overlong records while enforcing a 16 MiB per-record memory
115
+ ceiling.
116
+ **Affects:** `stitchkit/agent-executor/claude` createClaudeCliDriver; `stitchkit/agent-executor/claude-sdk` createClaudeSdkDriver
117
+ - `stitchkit/agent-executor/codex`: paginate `thread/turns/list` across all pages (up to 256 pages)
118
+ in `findInput` with cycle/cursor guards instead of stopping after the first page.
119
+ **Affects:** `stitchkit/agent-executor/codex` createCodexDriver
120
+ - `stitchkit/files`: confirm the current named path after `readRegularFile` / `readRegularFileSync`
121
+ accepts an opened descriptor, retrying once when the path was swapped concurrently (including to
122
+ a symlink under `noFollow`) instead of returning bytes from an unlinked or replaced target.
123
+ **Affects:** `stitchkit/files` readRegularFile, readRegularFileSync, readJsonFileSync, readJsonOnce, PolledJsonFile, PolledJsonFiles
124
+ - `stitchkit/server` and `stitchkit/node`: allow `createUnixClientTransport` to pin an explicit
125
+ POSIX owner UID (`expectedOwnerUid`) for cross-UID group-accessible local daemon sockets while
126
+ preserving parent-directory, symlink, and non-group/world-writable checks on both Bun and Node.
127
+ **Affects:** `stitchkit/server` createUnixClientTransport, UnixClientTransportConfig(expectedOwnerUid); `stitchkit/node` createUnixClientTransport, UnixClientTransportConfig(expectedOwnerUid)
128
+ - `stitchkit/agent-runtime`: allow `branchConversation` and `planConversationBranch` to branch
129
+ conversations whose spills legitimately expired via `spill/deleted` (including across
130
+ `throughRunId` cutoffs and multi-hop branches via inert `runtime/branch-observation` records),
131
+ while continuing to refuse corrupt, orphan, or unexplained missing spills with `integrity`
132
+ (→ ADR 0328).
133
+ **Affects:** `stitchkit/agent-runtime` createAgentRuntimeStore, createMemoryAgentRuntimeStore, AgentRuntimeStore(branchConversation, planConversationBranch)
134
+ - `stitchkit/process`: re-check PID liveness in `probeProcessOwner` and `probeProcessOwnerSync`
135
+ when process identity observation becomes unavailable after an initial `'alive'` liveness check,
136
+ reporting `{ liveness: 'gone', identity: 'pid-gone' }` when the process exited in the TOCTOU
137
+ window instead of `unavailable / not-probed`, while keeping live-process observation failures
138
+ (`EPERM`, foreign namespace, unreadable `/proc/self`) as `unavailable` with their original
139
+ `cause`.
140
+ **Affects:** `stitchkit/process` probeProcessOwner
141
+ - Upgrade scanner (`stitchkit upgrade`): backfilled missing producer exports (`listToolNames`,
142
+ `listContractToolNames`, `createRuntimeToolFactory`, `defineAsyncOperation`,
143
+ `RuntimeToolDefinition*`, `createAgentCodingTools`, and 10 other omitted producer functions) in
144
+ the `0.127.0` changelog `**Affects:**` lines and added a checked-in
145
+ `public-surface-producers.json` release gate (`assertAffectsProducersNamed`) that refuses any
146
+ future breaking, `Fixed`, or `Security` `**Affects:**` line naming a type-only export without its
147
+ producer functions.
148
+
18
149
  ## [0.127.0] - 2026-11-25
19
150
 
20
151
  ### ⚠️ Breaking changes
@@ -174,7 +305,7 @@ branches on the class of a SQLite store's transaction failure or of a failed
174
305
  `createSqliteAgentEventSearch({ database: sqlite.database })` →
175
306
  `createAgentEventSearch({ host: sqlite.host })`;
176
307
  `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
308
+ **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
309
  - `stitchkit/agent-runtime` `AgentChildManager.listChildBlocking` returns
179
310
  `{ pending, unavailable }` instead of the bare pending list. Each live child is
180
311
  asked for its blocking events within the stop bound; a child that did not answer
@@ -246,7 +377,7 @@ branches on the class of a SQLite store's transaction failure or of a failed
246
377
  Bun, browsers and React Native / Hermes without `process.hrtime`.
247
378
  `Number(process.hrtime.bigint() - ctx.startedAt) / 1e6` →
248
379
  `performance.now() - ctx.startedAt`. → ADR 0307
249
- **Affects:** `stitchkit/observability` RequestContext(startedAt); `stitchkit/server` behaviour; `stitchkit/node` behaviour
380
+ **Affects:** `stitchkit/observability` RequestContext(startedAt), getRequestContext(startedAt); `stitchkit/server` behaviour; `stitchkit/node` behaviour
250
381
  - `stitchkit` Minimum supported runtimes rise from `node >=22` / `bun >=1.2.0`
251
382
  to `node >=22.3.0` / `bun >=1.4.0` because `RequestContext` loads
252
383
  `AsyncLocalStorage` lazily through `process.getBuiltinModule('async_hooks')`
@@ -466,7 +597,7 @@ branches on the class of a SQLite store's transaction failure or of a failed
466
597
  `catch (error) { if (error instanceof X) … }`
467
598
  → `catch (error) { const first = error instanceof AggregateError ? error.cause : error; if (first instanceof X) … }`.
468
599
  [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
600
+ **Affects:** `stitchkit` SessionCredentials(login), createSessionCredentials(login); `stitchkit/agent-runtime/sqlite/bun` behaviour; `stitchkit/agent-runtime/sqlite/node` behaviour
470
601
  - `stitchkit/telegram` the operator channel waits Telegram's `retry_after` only up to
471
602
  `maxRetryAfterMs` (new option, default 60 000 ms — the minute over which Telegram
472
603
  counts a group's messages). A longer flood wait would hold every queued message
@@ -493,7 +624,7 @@ branches on the class of a SQLite store's transaction failure or of a failed
493
624
  (`Promise<readonly AgentSchedule[]>`); `AgentStoreConformanceConfig` now requires
494
625
  explicit `capabilities: { branch, planBranch }` and
495
626
  `commitConflict: { arm() } | { impossible: 'single-writer' }`. → ADR 0311
496
- **Affects:** `stitchkit/agent-runtime` AgentScheduleService(listSchedules), AgentRuntimeStoreDriver; `stitchkit/agent-runtime/testing` runAgentStoreConformance, AgentStoreConformanceConfig
627
+ **Affects:** `stitchkit/agent-runtime` AgentScheduleService(listSchedules), createAgentScheduleService(listSchedules), AgentRuntimeStoreDriver; `stitchkit/agent-runtime/testing` runAgentStoreConformance, AgentStoreConformanceConfig
497
628
  - `stitchkit/agent-runtime` and `stitchkit/agent-runtime/testing` store driver
498
629
  contract step 2: a store built by `createAgentRuntimeStore` reports
499
630
  `store.capabilities` (`{ archive, historyRestore, purge }`, frozen) for its
@@ -523,7 +654,7 @@ branches on the class of a SQLite store's transaction failure or of a failed
523
654
  factories, async-operation capability maps, `ToolNameEntry.expose`, coding tool
524
655
  definitions, and MCP/OpenAPI client connection configs; passing the removed
525
656
  `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
657
+ **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
658
  - `stitchkit/cli` consolidated top-level `optionAliases`, `positionals`,
528
659
  `results`, `passthrough`, and `wait` (and duplicate `lifecycle`) into one typed
529
660
  `CliConfig.commandSettings` map (`CliCommandName`, `CliCommandSettings`),
@@ -1472,7 +1603,7 @@ branches on the class of a SQLite store's transaction failure or of a failed
1472
1603
  the one archive spill schema instead of a looser copy, so a malformed stored
1473
1604
  spill (an `authorization` of `false`) is refused instead of travelling into an
1474
1605
  archive.
1475
- **Affects:** `stitchkit/agent-runtime` AgentRuntimeStore(branchConversation), AgentRuntimeStore(planConversationBranch), createAgentSpillStore
1606
+ **Affects:** `stitchkit/agent-runtime` AgentRuntimeStore(branchConversation), AgentRuntimeStore(planConversationBranch), createAgentRuntimeStore(branchConversation), createMemoryAgentRuntimeStore(branchConversation), createAgentSpillStore
1476
1607
  - `stitchkit/agent-runtime` `createAgentChildManager` no longer writes `stopped`
1477
1608
  over a child that finished while it was being stopped. A host that answers a
1478
1609
  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
- /** Set at open through the option of category `mode`: whether the agent asks before a tool is its mode. */
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,2GAA2G;IAC3G,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uGAAuG;IACvG,UAAU,CAAC,EAAE,SAAS,YAAY,EAAE,CAAC;IACrC,uFAAuF;IACvF,WAAW,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;IACzD,6CAA6C;IAC7C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,0FAA0F;IAC1F,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC;IACvD,iFAAiF;IACjF,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,mGAAmG;AACnG,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,IAAI,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAChD,MAAM,CAKR;AAED,yEAAyE;AACzE,wBAAgB,sB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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,qBAA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D,oGAAoG;AACpG,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,GAAG,CAAC,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;AAQrE,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;AAWvB,6FAA6F;AAC7F,MAAM,WAAW,UAAW,SAAQ,kBAAkB;IACpD,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,CAuIrB"}
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;AAoCnD,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,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,CAuF3F"}
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
- text: string;
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,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;CACnB;IAEG,IAAI;IACJ,OAAO;QAAI,IAAI;QAAU,OAAO;;IAChC,IAAI;IACJ,kBAAkB;IAClB,UAAU;EAEb;AAED,+FAA+F;AAC/F,wBAAgB,wBAAwB,CACtC,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,wB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AG,sBAAsB,EAAE,CAcnC;AAED,wEAAwE;AACxE,wBAAgB,iBAAiB,CAAC,KAAK,EAAE;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,GAAG,SAAS,sBAAsB,EAAE,CAAC;IACpD,SAAS,EAAE,MAAM,CAAC;CACnB;IAEG,IAAI;IACJ,OAAO;QAAI,IAAI;QAAU,OAAO;;IAChC,IAAI;IACJ,kBAAkB;IAClB,UAAU;EAEb;AAED,+FAA+F;AAC/F,wBAAgB,wBAAwB,CACtC,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":[],"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AAE,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"}
@@ -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. Found means the engine took the input; not found
16
- * means it has no record of it, which is not the same as "never sent": the
17
- * caller settles that as `uncertain`, never by sending again.
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":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,KAAK,qBAAqB,EAAiB,MAAM,YAAY,CAAC;AAIvE;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAA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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"}
@@ -19,6 +19,10 @@ export interface ClaudeSdkDriverConfig {
19
19
  model?: string;
20
20
  /** Default `default`: every tool the profile does not allow is asked of `canUseTool`. */
21
21
  permissionMode?: NonNullable<Options['permissionMode']>;
22
+ /** Read the bytes behind a `file` part's `reference`; without it a file part is refused. */
23
+ resolveFile?: (reference: string) => Promise<Uint8Array>;
24
+ /** Maximum decoded size of one image attachment in bytes. Default 5 MiB. */
25
+ maxImageBytes?: number;
22
26
  ambient?: Readonly<Record<string, string | undefined>>;
23
27
  }
24
28
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"driver.d.ts","sourceRoot":"","sources":["../../../src/agent-executor/claude-sdk/driver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAE9E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAKnD,uEAAuE;AACvE,MAAM,WAAW,YAAa,SAAQ,aAAa,CAAC,OAAO,CAAC;IAC1D,SAAS,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAC9B,KAAK,CAAC,IAAI,IAAI,CAAC;CAChB;AAED,gGAAgG;AAChG,MAAM,MAAM,cAAc,GAAG,CAAC,MAAM,EAAE;IACpC,MAAM,EAAE,aAAa,CAAC,cAAc,CAAC,CAAC;IACtC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,KAAK,YAAY,CAAC;AAEnB,uDAAuD;AACvD,MAAM,WAAW,qBAAqB;IACpC,wFAAwF;IACxF,KAAK,EAAE,cAAc,CAAC;IACtB,+CAA+C;IAC/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CAAC,CAAC;IACzD,4EAA4E;IAC5E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC;CACxD;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,qBAAqB,GAAG,iBAAiB,CA0BtF"}
@@ -1 +1 @@
1
- {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../src/agent-executor/claude-sdk/session.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,iBAAiB,EAAE,kBAAkB,EAAmB,MAAM,WAAW,CAAC;AAUxF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAW3C,OAAO,KAAK,EAAE,qBAAqB,EAAgB,MAAM,UAAU,CAAC;AAwJpE;;;;GAIG;AACH,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,qBAAqB,EAC7B,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,EAC/B,KAAK,EAAE,UAAU,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,GAC9C,OAAO,CAAC,kBAAkB,CAAC,CAoI7B"}
1
+ {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../src/agent-executor/claude-sdk/session.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,iBAAiB,EAAE,kBAAkB,EAAmB,MAAM,WAAW,CAAC;AAUxF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAW3C,OAAO,KAAK,EAAE,qBAAqB,EAAgB,MAAM,UAAU,CAAC;AAwJpE;;;;GAIG;AACH,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,qBAAqB,EAC7B,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,EAC/B,KAAK,EAAE,UAAU,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,GAC9C,OAAO,CAAC,kBAAkB,CAAC,CAmJ7B"}
@@ -10,6 +10,10 @@ export interface CodexDriverConfig {
10
10
  approvalPolicy?: 'untrusted' | 'on-failure' | 'on-request' | 'never';
11
11
  /** `sandbox` of a new thread. Default `workspace-write`. */
12
12
  sandbox?: 'read-only' | 'workspace-write' | 'danger-full-access';
13
+ /** Read the bytes behind a `file` part's `reference`; without it a file part is refused. */
14
+ resolveFile?: (reference: string) => Promise<Uint8Array>;
15
+ /** Maximum decoded size of one image attachment in bytes. Default 5 MiB. */
16
+ maxImageBytes?: number;
13
17
  ambient?: Readonly<Record<string, string | undefined>>;
14
18
  }
15
19
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"driver.d.ts","sourceRoot":"","sources":["../../../src/agent-executor/codex/driver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AASnD,mDAAmD;AACnD,MAAM,WAAW,iBAAiB;IAChC,qEAAqE;IACrE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,+FAA+F;IAC/F,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wFAAwF;IACxF,cAAc,CAAC,EAAE,WAAW,GAAG,YAAY,GAAG,YAAY,GAAG,OAAO,CAAC;IACrE,4DAA4D;IAC5D,OAAO,CAAC,EAAE,WAAW,GAAG,iBAAiB,GAAG,oBAAoB,CAAC;IACjE,OAAO,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC;CACxD;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,GAAE,iBAAsB,GAAG,iBAAiB,CA2GnF"}
1
+ {"version":3,"file":"driver.d.ts","sourceRoot":"","sources":["../../../src/agent-executor/codex/driver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAkBnD,mDAAmD;AACnD,MAAM,WAAW,iBAAiB;IAChC,qEAAqE;IACrE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,+FAA+F;IAC/F,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wFAAwF;IACxF,cAAc,CAAC,EAAE,WAAW,GAAG,YAAY,GAAG,YAAY,GAAG,OAAO,CAAC;IACrE,4DAA4D;IAC5D,OAAO,CAAC,EAAE,WAAW,GAAG,iBAAiB,GAAG,oBAAoB,CAAC;IACjE,4FAA4F;IAC5F,WAAW,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;IACzD,4EAA4E;IAC5E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC;CACxD;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,GAAE,iBAAsB,GAAG,iBAAiB,CA6InF"}
@@ -114,6 +114,28 @@ export declare const CodexStartedTurnSchema: z.ZodObject<{
114
114
  id: z.ZodString;
115
115
  }, z.core.$loose>;
116
116
  }, z.core.$loose>;
117
+ export declare const CodexListedTurnItemSchema: z.ZodObject<{
118
+ type: z.ZodString;
119
+ clientId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
120
+ }, z.core.$loose>;
121
+ export declare const CodexListedTurnSchema: z.ZodObject<{
122
+ id: z.ZodString;
123
+ status: z.ZodEnum<{
124
+ completed: "completed";
125
+ failed: "failed";
126
+ inProgress: "inProgress";
127
+ interrupted: "interrupted";
128
+ }>;
129
+ error: z.ZodOptional<z.ZodNullable<z.ZodObject<{
130
+ message: z.ZodString;
131
+ codexErrorInfo: z.ZodOptional<z.ZodNullable<z.ZodJSONSchema>>;
132
+ }, z.core.$loose>>>;
133
+ items: z.ZodArray<z.ZodObject<{
134
+ type: z.ZodString;
135
+ clientId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
136
+ }, z.core.$loose>>;
137
+ itemsView: z.ZodOptional<z.ZodLiteral<"full">>;
138
+ }, z.core.$loose>;
117
139
  export declare const CodexTurnsPageSchema: z.ZodObject<{
118
140
  data: z.ZodArray<z.ZodObject<{
119
141
  id: z.ZodString;
@@ -127,11 +149,13 @@ export declare const CodexTurnsPageSchema: z.ZodObject<{
127
149
  message: z.ZodString;
128
150
  codexErrorInfo: z.ZodOptional<z.ZodNullable<z.ZodJSONSchema>>;
129
151
  }, z.core.$loose>>>;
130
- items: z.ZodOptional<z.ZodArray<z.ZodObject<{
152
+ items: z.ZodArray<z.ZodObject<{
131
153
  type: z.ZodString;
132
154
  clientId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
133
- }, z.core.$loose>>>;
155
+ }, z.core.$loose>>;
156
+ itemsView: z.ZodOptional<z.ZodLiteral<"full">>;
134
157
  }, z.core.$loose>>;
158
+ nextCursor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
135
159
  }, z.core.$loose>;
136
160
  /** Notifications the driver asks the server not to send: noise for a turn. */
137
161
  export declare const CODEX_OPTED_OUT_NOTIFICATIONS: string[];
@@ -1 +1 @@
1
- {"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../../../src/agent-executor/codex/protocol.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB;;;iBAGhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;iBAU1B,CAAC;AAEH,eAAO,MAAM,uBAAuB;aAClC,yBAAyB;;;;aACzB,0BAA0B;;;;aAC1B,i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;aAChB,gBAAgB;;;;;;;;;;;;;;;;;;;aAChB,2BAA2B;;;;;;;;;aAS3B,wBAAwB;;;aACxB,4BAA4B;;;CACpB,CAAC;AAEX,eAAO,MAAM,yBAAyB;;;;iBAIpC,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;iBAKrC,CAAC;AAEH,iFAAiF;AACjF,eAAO,MAAM,2BAA2B;;mBAGvC,CAAC;AAEF,eAAO,MAAM,wBAAwB;;;;iBAEnC,CAAC;AACH,eAAO,MAAM,sBAAsB;;;;iBAEjC,CAAC;AACH,eAAO,MAAM,yBAAyB;;;iBAGpC,CAAC;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;iBAGhC,CAAC;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;iBAG/B,CAAC;AAEH,8EAA8E;AAC9E,eAAO,MAAM,6BAA6B,UAQzC,CAAC;AAEF,+DAA+D;AAC/D,eAAO,MAAM,yBAAyB,aAkBpC,CAAC;AAEH,2EAA2E;AAC3E,eAAO,MAAM,uBAAuB,aAGlC,CAAC;AACH,eAAO,MAAM,mBAAmB,+BAA+B,CAAC;AAChE;;;GAGG;AACH,eAAO,MAAM,uBAAuB;aAClC,OAAO,EAAE,QAAQ;aACjB,IAAI,EAAE,SAAS;aACf,WAAW,EAAE,QAAQ;CACb,CAAC"}
@@ -1,8 +1,9 @@
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 { createJsonRpcPeer, type JsonRpcValue } from '../json-rpc-peer.js';
4
5
  import { type ExecutorProfileConfig } from '../profile.js';
5
- export interface CodexSessionConfig {
6
+ export interface CodexSessionConfig extends DriverImageOptions {
6
7
  executable: string;
7
8
  prefix: readonly string[];
8
9
  model?: string;
@@ -11,6 +12,7 @@ export interface CodexSessionConfig {
11
12
  ambient: Readonly<Record<string, string | undefined>>;
12
13
  limits: Map<string, PlanLimits>;
13
14
  version: string;
15
+ maxLineBytes?: number;
14
16
  }
15
17
  /** Spawn `codex app-server`, initialize it, and return the peer; the caller owns the process. */
16
18
  export declare function connectCodex(config: CodexSessionConfig, profile: ExecutorProfileConfig, cwd: string, signal: AbortSignal, handlers?: Partial<Pick<Parameters<typeof createJsonRpcPeer>[0], 'onRequest' | 'onNotification'>>,
@@ -1 +1 @@
1
- {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../src/agent-executor/codex/session.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAmB,MAAM,WAAW,CAAC;AAWrE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EACL,iBAAiB,EAIjB,KAAK,YAAY,EAClB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,KAAK,qBAAqB,EAAoC,MAAM,YAAY,CAAC;AA2B1F,MAAM,WAAW,kBAAkB;IACjC,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,MAAM,CAAC;IAChB,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC;IACtD,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IAChC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,iGAAiG;AACjG,wBAAsB,YAAY,CAChC,MAAM,EAAE,kBAAkB,EAC1B,OAAO,EAAE,qBAAqB,EAC9B,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,WAAW,EACnB,QAAQ,GAAE,OAAO,CACf,IAAI,CAAC,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC,CAAC,CAAC,EAAE,WAAW,GAAG,gBAAgB,CAAC,CACzE;AACN,6EAA6E;AAC7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