@zvada/agent-server 0.3.21 → 0.3.23

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 (367) hide show
  1. package/CHANGELOG.md +332 -0
  2. package/README.md +2 -1
  3. package/dist/types/accounts/chatgpt.d.ts +1 -1
  4. package/dist/types/accounts/chatgpt.d.ts.map +1 -1
  5. package/dist/types/accounts/http.d.ts +2 -4
  6. package/dist/types/accounts/http.d.ts.map +1 -1
  7. package/dist/types/client/client.d.ts +37 -11
  8. package/dist/types/client/client.d.ts.map +1 -1
  9. package/dist/types/client/connection.d.ts +66 -13
  10. package/dist/types/client/connection.d.ts.map +1 -1
  11. package/dist/types/client/index.d.ts +1 -1
  12. package/dist/types/client/index.d.ts.map +1 -1
  13. package/dist/types/client/logins.d.ts +4 -3
  14. package/dist/types/client/logins.d.ts.map +1 -1
  15. package/dist/types/client/streams.d.ts +9 -3
  16. package/dist/types/client/streams.d.ts.map +1 -1
  17. package/dist/types/client/turns.d.ts +1 -1
  18. package/dist/types/client/turns.d.ts.map +1 -1
  19. package/dist/types/core/agents/acp/acp-agent.d.ts +34 -1
  20. package/dist/types/core/agents/acp/acp-agent.d.ts.map +1 -1
  21. package/dist/types/core/agents/acp/adapter.d.ts.map +1 -1
  22. package/dist/types/core/agents/acp/client.d.ts +12 -3
  23. package/dist/types/core/agents/acp/client.d.ts.map +1 -1
  24. package/dist/types/core/agents/acp/mappings.d.ts +8 -2
  25. package/dist/types/core/agents/acp/mappings.d.ts.map +1 -1
  26. package/dist/types/core/agents/base.d.ts +22 -8
  27. package/dist/types/core/agents/base.d.ts.map +1 -1
  28. package/dist/types/core/agents/claude-code/adapter.d.ts +7 -0
  29. package/dist/types/core/agents/claude-code/adapter.d.ts.map +1 -1
  30. package/dist/types/core/agents/claude-code/approvals.d.ts +4 -1
  31. package/dist/types/core/agents/claude-code/approvals.d.ts.map +1 -1
  32. package/dist/types/core/agents/claude-code/claude-agent.d.ts +16 -5
  33. package/dist/types/core/agents/claude-code/claude-agent.d.ts.map +1 -1
  34. package/dist/types/core/agents/claude-code/events.d.ts +9 -1
  35. package/dist/types/core/agents/claude-code/events.d.ts.map +1 -1
  36. package/dist/types/core/agents/claude-code/login.d.ts +4 -1
  37. package/dist/types/core/agents/claude-code/login.d.ts.map +1 -1
  38. package/dist/types/core/agents/claude-code/mcp.d.ts +21 -7
  39. package/dist/types/core/agents/claude-code/mcp.d.ts.map +1 -1
  40. package/dist/types/core/agents/claude-code/models.d.ts +5 -1
  41. package/dist/types/core/agents/claude-code/models.d.ts.map +1 -1
  42. package/dist/types/core/agents/claude-code/options.d.ts +10 -4
  43. package/dist/types/core/agents/claude-code/options.d.ts.map +1 -1
  44. package/dist/types/core/agents/claude-code/outcome.d.ts +3 -5
  45. package/dist/types/core/agents/claude-code/outcome.d.ts.map +1 -1
  46. package/dist/types/core/agents/claude-code/results.d.ts +16 -0
  47. package/dist/types/core/agents/claude-code/results.d.ts.map +1 -0
  48. package/dist/types/core/agents/claude-code/sdk-pair.d.ts +13 -0
  49. package/dist/types/core/agents/claude-code/sdk-pair.d.ts.map +1 -0
  50. package/dist/types/core/agents/claude-code/session.d.ts +50 -12
  51. package/dist/types/core/agents/claude-code/session.d.ts.map +1 -1
  52. package/dist/types/core/agents/claude-code/spend.d.ts +2 -1
  53. package/dist/types/core/agents/claude-code/spend.d.ts.map +1 -1
  54. package/dist/types/core/agents/claude-code/tools.d.ts +26 -3
  55. package/dist/types/core/agents/claude-code/tools.d.ts.map +1 -1
  56. package/dist/types/core/agents/codex-app-server/adapter.d.ts +2 -2
  57. package/dist/types/core/agents/codex-app-server/adapter.d.ts.map +1 -1
  58. package/dist/types/core/agents/codex-app-server/client.d.ts +21 -2
  59. package/dist/types/core/agents/codex-app-server/client.d.ts.map +1 -1
  60. package/dist/types/core/agents/codex-app-server/codex-agent.d.ts +61 -14
  61. package/dist/types/core/agents/codex-app-server/codex-agent.d.ts.map +1 -1
  62. package/dist/types/core/agents/codex-app-server/commands.d.ts +2 -2
  63. package/dist/types/core/agents/codex-app-server/commands.d.ts.map +1 -1
  64. package/dist/types/core/agents/codex-app-server/credentials.d.ts +5 -1
  65. package/dist/types/core/agents/codex-app-server/credentials.d.ts.map +1 -1
  66. package/dist/types/core/agents/codex-app-server/effort.d.ts +2 -1
  67. package/dist/types/core/agents/codex-app-server/effort.d.ts.map +1 -1
  68. package/dist/types/core/agents/codex-app-server/homes.d.ts +26 -5
  69. package/dist/types/core/agents/codex-app-server/homes.d.ts.map +1 -1
  70. package/dist/types/core/agents/codex-app-server/items.d.ts +27 -2
  71. package/dist/types/core/agents/codex-app-server/items.d.ts.map +1 -1
  72. package/dist/types/core/agents/codex-app-server/login.d.ts +4 -1
  73. package/dist/types/core/agents/codex-app-server/login.d.ts.map +1 -1
  74. package/dist/types/core/agents/codex-app-server/mcp.d.ts +45 -20
  75. package/dist/types/core/agents/codex-app-server/mcp.d.ts.map +1 -1
  76. package/dist/types/core/agents/codex-app-server/models.d.ts +3 -10
  77. package/dist/types/core/agents/codex-app-server/models.d.ts.map +1 -1
  78. package/dist/types/core/agents/codex-app-server/options.d.ts +32 -5
  79. package/dist/types/core/agents/codex-app-server/options.d.ts.map +1 -1
  80. package/dist/types/core/agents/codex-app-server/plan-approval.d.ts +2 -1
  81. package/dist/types/core/agents/codex-app-server/plan-approval.d.ts.map +1 -1
  82. package/dist/types/core/agents/codex-app-server/protocol.d.ts +16 -3
  83. package/dist/types/core/agents/codex-app-server/protocol.d.ts.map +1 -1
  84. package/dist/types/core/agents/codex-app-server/requests.d.ts.map +1 -1
  85. package/dist/types/core/agents/codex-app-server/session.d.ts +70 -33
  86. package/dist/types/core/agents/codex-app-server/session.d.ts.map +1 -1
  87. package/dist/types/core/agents/codex-app-server/subagents.d.ts +9 -4
  88. package/dist/types/core/agents/codex-app-server/subagents.d.ts.map +1 -1
  89. package/dist/types/core/agents/codex-app-server/thread-settings.d.ts +3 -2
  90. package/dist/types/core/agents/codex-app-server/thread-settings.d.ts.map +1 -1
  91. package/dist/types/core/agents/codex-app-server/turn-items.d.ts +2 -1
  92. package/dist/types/core/agents/codex-app-server/turn-items.d.ts.map +1 -1
  93. package/dist/types/core/agents/codex-app-server/turn.d.ts +37 -8
  94. package/dist/types/core/agents/codex-app-server/turn.d.ts.map +1 -1
  95. package/dist/types/core/agents/codex-app-server/user-login.d.ts +28 -0
  96. package/dist/types/core/agents/codex-app-server/user-login.d.ts.map +1 -0
  97. package/dist/types/core/agents/credentials.d.ts +3 -1
  98. package/dist/types/core/agents/credentials.d.ts.map +1 -1
  99. package/dist/types/core/agents/diffs.d.ts +9 -0
  100. package/dist/types/core/agents/diffs.d.ts.map +1 -0
  101. package/dist/types/core/agents/elicitation.d.ts +3 -2
  102. package/dist/types/core/agents/elicitation.d.ts.map +1 -1
  103. package/dist/types/core/agents/login.d.ts +6 -0
  104. package/dist/types/core/agents/login.d.ts.map +1 -1
  105. package/dist/types/core/agents/mcp-config.d.ts +0 -4
  106. package/dist/types/core/agents/mcp-config.d.ts.map +1 -1
  107. package/dist/types/core/agents/plan.d.ts +2 -13
  108. package/dist/types/core/agents/plan.d.ts.map +1 -1
  109. package/dist/types/core/agents/process-pool.d.ts +193 -0
  110. package/dist/types/core/agents/process-pool.d.ts.map +1 -0
  111. package/dist/types/core/agents/scripted/adapter.d.ts +68 -0
  112. package/dist/types/core/agents/scripted/adapter.d.ts.map +1 -0
  113. package/dist/types/core/agents/scripted/mcp-call.d.ts +56 -0
  114. package/dist/types/core/agents/scripted/mcp-call.d.ts.map +1 -0
  115. package/dist/types/core/agents/scripted/scripted-agent.d.ts +73 -0
  116. package/dist/types/core/agents/scripted/scripted-agent.d.ts.map +1 -0
  117. package/dist/types/core/agents/scripted/scripts.d.ts +29 -0
  118. package/dist/types/core/agents/scripted/scripts.d.ts.map +1 -0
  119. package/dist/types/core/agents/scripted/steps.d.ts +132 -0
  120. package/dist/types/core/agents/scripted/steps.d.ts.map +1 -0
  121. package/dist/types/core/agents/session-agent.d.ts +49 -6
  122. package/dist/types/core/agents/session-agent.d.ts.map +1 -1
  123. package/dist/types/core/diagnostics.d.ts +4 -1
  124. package/dist/types/core/diagnostics.d.ts.map +1 -1
  125. package/dist/types/core/index.d.ts +6 -1
  126. package/dist/types/core/index.d.ts.map +1 -1
  127. package/dist/types/core/presets.d.ts +32 -6
  128. package/dist/types/core/presets.d.ts.map +1 -1
  129. package/dist/types/core/processes/lifeline.d.ts +0 -20
  130. package/dist/types/core/processes/lifeline.d.ts.map +1 -1
  131. package/dist/types/core/provision/index.d.ts +2 -2
  132. package/dist/types/core/provision/index.d.ts.map +1 -1
  133. package/dist/types/core/provision/install-build.d.ts +2 -1
  134. package/dist/types/core/provision/install-build.d.ts.map +1 -1
  135. package/dist/types/core/provision/npm.d.ts +20 -8
  136. package/dist/types/core/provision/npm.d.ts.map +1 -1
  137. package/dist/types/core/provision/provisioner.d.ts +4 -1
  138. package/dist/types/core/provision/provisioner.d.ts.map +1 -1
  139. package/dist/types/core/provision/tools.d.ts +2 -1
  140. package/dist/types/core/provision/tools.d.ts.map +1 -1
  141. package/dist/types/core/runtime/agent-runtime.d.ts +18 -9
  142. package/dist/types/core/runtime/agent-runtime.d.ts.map +1 -1
  143. package/dist/types/core/runtime/event-processor.d.ts +5 -1
  144. package/dist/types/core/runtime/event-processor.d.ts.map +1 -1
  145. package/dist/types/core/runtime/harness-clis.d.ts +9 -0
  146. package/dist/types/core/runtime/harness-clis.d.ts.map +1 -1
  147. package/dist/types/core/runtime/harness-logins.d.ts +33 -5
  148. package/dist/types/core/runtime/harness-logins.d.ts.map +1 -1
  149. package/dist/types/core/runtime/model-lists.d.ts +2 -0
  150. package/dist/types/core/runtime/model-lists.d.ts.map +1 -1
  151. package/dist/types/core/runtime/permission-policy.d.ts +5 -3
  152. package/dist/types/core/runtime/permission-policy.d.ts.map +1 -1
  153. package/dist/types/core/runtime/request-broker.d.ts +2 -1
  154. package/dist/types/core/runtime/request-broker.d.ts.map +1 -1
  155. package/dist/types/core/runtime/turn.d.ts +14 -1
  156. package/dist/types/core/runtime/turn.d.ts.map +1 -1
  157. package/dist/types/core/utils/deadline.d.ts +6 -0
  158. package/dist/types/core/utils/deadline.d.ts.map +1 -1
  159. package/dist/types/core/utils/errors.d.ts +15 -1
  160. package/dist/types/core/utils/errors.d.ts.map +1 -1
  161. package/dist/types/operator/index.d.ts +11 -0
  162. package/dist/types/operator/index.d.ts.map +1 -0
  163. package/dist/types/operator/mcp.d.ts +33 -0
  164. package/dist/types/operator/mcp.d.ts.map +1 -0
  165. package/dist/types/operator/operator.d.ts +206 -0
  166. package/dist/types/operator/operator.d.ts.map +1 -0
  167. package/dist/types/operator/render.d.ts +89 -0
  168. package/dist/types/operator/render.d.ts.map +1 -0
  169. package/dist/types/operator/view.d.ts +44 -0
  170. package/dist/types/operator/view.d.ts.map +1 -0
  171. package/dist/types/protocol/auth.d.ts +54 -24
  172. package/dist/types/protocol/auth.d.ts.map +1 -1
  173. package/dist/types/protocol/clis.d.ts +14 -7
  174. package/dist/types/protocol/clis.d.ts.map +1 -1
  175. package/dist/types/protocol/config.d.ts +2 -0
  176. package/dist/types/protocol/config.d.ts.map +1 -1
  177. package/dist/types/protocol/conversation.d.ts +40 -3
  178. package/dist/types/protocol/conversation.d.ts.map +1 -1
  179. package/dist/types/protocol/credentials.d.ts +7 -0
  180. package/dist/types/protocol/credentials.d.ts.map +1 -1
  181. package/dist/types/protocol/execution.d.ts +2 -1
  182. package/dist/types/protocol/execution.d.ts.map +1 -1
  183. package/dist/types/protocol/factories.d.ts +12 -2
  184. package/dist/types/protocol/factories.d.ts.map +1 -1
  185. package/dist/types/protocol/harness.d.ts +6 -2
  186. package/dist/types/protocol/harness.d.ts.map +1 -1
  187. package/dist/types/protocol/history.d.ts +19 -0
  188. package/dist/types/protocol/history.d.ts.map +1 -1
  189. package/dist/types/protocol/lifecycle.d.ts +47 -8
  190. package/dist/types/protocol/lifecycle.d.ts.map +1 -1
  191. package/dist/types/protocol/model-catalog.d.ts.map +1 -1
  192. package/dist/types/protocol/models.d.ts +3 -0
  193. package/dist/types/protocol/models.d.ts.map +1 -1
  194. package/dist/types/protocol/parts.d.ts +14 -0
  195. package/dist/types/protocol/parts.d.ts.map +1 -1
  196. package/dist/types/protocol/plan.d.ts +20 -0
  197. package/dist/types/protocol/plan.d.ts.map +1 -0
  198. package/dist/types/protocol/tool-state.d.ts +12 -0
  199. package/dist/types/protocol/tool-state.d.ts.map +1 -1
  200. package/dist/types/protocol/wire-api.d.ts +129 -23
  201. package/dist/types/protocol/wire-api.d.ts.map +1 -1
  202. package/dist/types/protocol/wire.d.ts +70 -10
  203. package/dist/types/protocol/wire.d.ts.map +1 -1
  204. package/dist/types/server/acp/binding.d.ts +6 -1
  205. package/dist/types/server/acp/binding.d.ts.map +1 -1
  206. package/dist/types/server/acp/translate.d.ts +33 -7
  207. package/dist/types/server/acp/translate.d.ts.map +1 -1
  208. package/dist/types/server/agent-server.d.ts +6 -0
  209. package/dist/types/server/agent-server.d.ts.map +1 -1
  210. package/dist/types/server/feedback.d.ts +2 -1
  211. package/dist/types/server/feedback.d.ts.map +1 -1
  212. package/dist/types/server/install.d.ts +11 -0
  213. package/dist/types/server/install.d.ts.map +1 -1
  214. package/dist/types/server/session-gate.d.ts +2 -1
  215. package/dist/types/server/session-gate.d.ts.map +1 -1
  216. package/dist/types/server/session-store.d.ts +1 -0
  217. package/dist/types/server/session-store.d.ts.map +1 -1
  218. package/dist/types/server/subscriptions.d.ts +2 -1
  219. package/dist/types/server/subscriptions.d.ts.map +1 -1
  220. package/dist/types/server/transports.d.ts.map +1 -1
  221. package/dist/types/sync/fit.d.ts +8 -7
  222. package/dist/types/sync/fit.d.ts.map +1 -1
  223. package/dist/types/sync/history-sqlite.d.ts.map +1 -1
  224. package/dist/types/sync/index.d.ts +1 -0
  225. package/dist/types/sync/index.d.ts.map +1 -1
  226. package/dist/types/sync/journal-sqlite.d.ts +2 -1
  227. package/dist/types/sync/journal-sqlite.d.ts.map +1 -1
  228. package/dist/types/sync/journal.d.ts +11 -3
  229. package/dist/types/sync/journal.d.ts.map +1 -1
  230. package/dist/types/sync/projection.d.ts +6 -0
  231. package/dist/types/sync/projection.d.ts.map +1 -1
  232. package/dist/types/sync/recovery.d.ts +2 -1
  233. package/dist/types/sync/recovery.d.ts.map +1 -1
  234. package/dist/types/sync/schema.d.ts +10 -0
  235. package/dist/types/sync/schema.d.ts.map +1 -1
  236. package/dist/types/sync/sql.d.ts +2 -1
  237. package/dist/types/sync/sql.d.ts.map +1 -1
  238. package/dist/types/sync/worker.d.ts.map +1 -1
  239. package/docs/consuming.md +464 -40
  240. package/docs/deploy.md +36 -8
  241. package/docs/durable-sessions.md +35 -5
  242. package/docs/harnesses.md +396 -30
  243. package/package.json +11 -1
  244. package/src/accounts/chatgpt.ts +2 -2
  245. package/src/accounts/http.ts +2 -16
  246. package/src/client/client.ts +92 -31
  247. package/src/client/connection.ts +113 -22
  248. package/src/client/index.ts +1 -0
  249. package/src/client/logins.ts +24 -15
  250. package/src/client/streams.ts +12 -4
  251. package/src/client/turns.ts +1 -1
  252. package/src/core/agents/acp/acp-agent.ts +181 -52
  253. package/src/core/agents/acp/adapter.ts +9 -1
  254. package/src/core/agents/acp/client.ts +16 -4
  255. package/src/core/agents/acp/mappings.ts +27 -0
  256. package/src/core/agents/base.ts +25 -10
  257. package/src/core/agents/claude-code/adapter.ts +47 -17
  258. package/src/core/agents/claude-code/approvals.ts +6 -5
  259. package/src/core/agents/claude-code/claude-agent.ts +60 -30
  260. package/src/core/agents/claude-code/events.ts +11 -1
  261. package/src/core/agents/claude-code/login.ts +14 -2
  262. package/src/core/agents/claude-code/mcp.ts +31 -15
  263. package/src/core/agents/claude-code/models.ts +7 -2
  264. package/src/core/agents/claude-code/options.ts +11 -3
  265. package/src/core/agents/claude-code/outcome.ts +10 -2
  266. package/src/core/agents/claude-code/results.ts +73 -0
  267. package/src/core/agents/claude-code/sdk-pair.ts +66 -0
  268. package/src/core/agents/claude-code/session.ts +166 -37
  269. package/src/core/agents/claude-code/spend.ts +1 -1
  270. package/src/core/agents/claude-code/tools.ts +108 -12
  271. package/src/core/agents/codex-app-server/adapter.ts +37 -12
  272. package/src/core/agents/codex-app-server/client.ts +69 -10
  273. package/src/core/agents/codex-app-server/codex-agent.ts +141 -55
  274. package/src/core/agents/codex-app-server/commands.ts +2 -2
  275. package/src/core/agents/codex-app-server/credentials.ts +10 -5
  276. package/src/core/agents/codex-app-server/effort.ts +1 -1
  277. package/src/core/agents/codex-app-server/homes.ts +59 -10
  278. package/src/core/agents/codex-app-server/items.ts +219 -31
  279. package/src/core/agents/codex-app-server/login.ts +14 -2
  280. package/src/core/agents/codex-app-server/mcp.ts +142 -26
  281. package/src/core/agents/codex-app-server/models.ts +9 -8
  282. package/src/core/agents/codex-app-server/options.ts +79 -11
  283. package/src/core/agents/codex-app-server/plan-approval.ts +1 -1
  284. package/src/core/agents/codex-app-server/protocol.ts +14 -4
  285. package/src/core/agents/codex-app-server/requests.ts +14 -6
  286. package/src/core/agents/codex-app-server/session.ts +156 -81
  287. package/src/core/agents/codex-app-server/subagents.ts +21 -14
  288. package/src/core/agents/codex-app-server/thread-settings.ts +18 -8
  289. package/src/core/agents/codex-app-server/turn-items.ts +1 -1
  290. package/src/core/agents/codex-app-server/turn.ts +96 -35
  291. package/src/core/agents/codex-app-server/user-login.ts +107 -0
  292. package/src/core/agents/credentials.ts +5 -2
  293. package/src/core/agents/diffs.ts +25 -0
  294. package/src/core/agents/elicitation.ts +2 -2
  295. package/src/core/agents/login.ts +6 -0
  296. package/src/core/agents/mcp-config.ts +2 -2
  297. package/src/core/agents/plan.ts +3 -19
  298. package/src/core/agents/process-pool.ts +432 -0
  299. package/src/core/agents/scripted/adapter.ts +142 -0
  300. package/src/core/agents/scripted/mcp-call.ts +134 -0
  301. package/src/core/agents/scripted/scripted-agent.ts +418 -0
  302. package/src/core/agents/scripted/scripts.ts +171 -0
  303. package/src/core/agents/scripted/steps.ts +127 -0
  304. package/src/core/agents/session-agent.ts +105 -8
  305. package/src/core/diagnostics.ts +9 -1
  306. package/src/core/index.ts +12 -0
  307. package/src/core/presets.ts +99 -14
  308. package/src/core/processes/lifeline.ts +99 -25
  309. package/src/core/provision/index.ts +1 -2
  310. package/src/core/provision/install-build.ts +4 -1
  311. package/src/core/provision/npm.ts +309 -97
  312. package/src/core/provision/provisioner.ts +22 -8
  313. package/src/core/provision/tools.ts +44 -19
  314. package/src/core/runtime/agent-runtime.ts +70 -34
  315. package/src/core/runtime/event-processor.ts +18 -2
  316. package/src/core/runtime/harness-clis.ts +36 -1
  317. package/src/core/runtime/harness-logins.ts +82 -31
  318. package/src/core/runtime/model-lists.ts +1 -1
  319. package/src/core/runtime/permission-policy.ts +4 -3
  320. package/src/core/runtime/request-broker.ts +1 -1
  321. package/src/core/runtime/turn.ts +53 -3
  322. package/src/core/utils/deadline.ts +23 -0
  323. package/src/core/utils/errors.ts +24 -4
  324. package/src/operator/index.ts +40 -0
  325. package/src/operator/mcp.ts +171 -0
  326. package/src/operator/operator.ts +782 -0
  327. package/src/operator/render.ts +473 -0
  328. package/src/operator/view.ts +82 -0
  329. package/src/protocol/auth.ts +30 -23
  330. package/src/protocol/clis.ts +12 -4
  331. package/src/protocol/credentials.ts +19 -0
  332. package/src/protocol/execution.ts +5 -0
  333. package/src/protocol/factories.ts +25 -3
  334. package/src/protocol/harness.ts +11 -1
  335. package/src/protocol/history.ts +20 -0
  336. package/src/protocol/lifecycle.ts +10 -1
  337. package/src/protocol/model-catalog.ts +19 -8
  338. package/src/protocol/parts.ts +12 -1
  339. package/src/protocol/plan.ts +35 -0
  340. package/src/protocol/tool-state.ts +14 -1
  341. package/src/protocol/wire.ts +14 -0
  342. package/src/server/acp/binding.ts +113 -22
  343. package/src/server/acp/translate.ts +161 -8
  344. package/src/server/agent-server.ts +10 -1
  345. package/src/server/bin.ts +83 -9
  346. package/src/server/feedback.ts +1 -1
  347. package/src/server/install.ts +82 -4
  348. package/src/server/session-gate.ts +1 -1
  349. package/src/server/session-store.ts +5 -1
  350. package/src/server/subscriptions.ts +1 -1
  351. package/src/server/transports.ts +14 -0
  352. package/src/sync/fit.ts +115 -28
  353. package/src/sync/history-sqlite.ts +6 -2
  354. package/src/sync/index.ts +1 -0
  355. package/src/sync/journal-sqlite.ts +20 -2
  356. package/src/sync/journal.ts +10 -2
  357. package/src/sync/projection.ts +10 -0
  358. package/src/sync/recovery.ts +11 -4
  359. package/src/sync/schema.ts +7 -5
  360. package/src/sync/sql.ts +1 -1
  361. package/src/sync/worker.ts +4 -0
  362. package/dist/types/core/agents/claude-code/session-pool.d.ts +0 -36
  363. package/dist/types/core/agents/claude-code/session-pool.d.ts.map +0 -1
  364. package/dist/types/core/agents/session-pool.d.ts +0 -41
  365. package/dist/types/core/agents/session-pool.d.ts.map +0 -1
  366. package/src/core/agents/claude-code/session-pool.ts +0 -136
  367. package/src/core/agents/session-pool.ts +0 -111
@@ -49,6 +49,7 @@ export declare const RunConfigSchema: z.ZodObject<{
49
49
  "claude-code": "claude-code";
50
50
  "codex-app-server": "codex-app-server";
51
51
  acp: "acp";
52
+ scripted: "scripted";
52
53
  }>;
53
54
  model: z.ZodOptional<z.ZodString>;
54
55
  thinkingLevel: z.ZodOptional<z.ZodEnum<{
@@ -136,6 +137,7 @@ export declare const RunRequestSchema: z.ZodObject<{
136
137
  "claude-code": "claude-code";
137
138
  "codex-app-server": "codex-app-server";
138
139
  acp: "acp";
140
+ scripted: "scripted";
139
141
  }>;
140
142
  model: z.ZodOptional<z.ZodString>;
141
143
  thinkingLevel: z.ZodOptional<z.ZodEnum<{
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/protocol/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB;;;;;;EAM/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,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z.ZodString;
58
58
  toolName: z.ZodString;
59
59
  kind: z.ZodOptional<z.ZodType<(string & {}) | "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | "task" | "other", unknown, z.core.$ZodTypeInternals<(string & {}) | "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | "task" | "other", unknown>>>;
60
+ mcp: z.ZodOptional<z.ZodObject<{
61
+ server: z.ZodString;
62
+ tool: z.ZodString;
63
+ }, z.core.$strip>>;
60
64
  title: z.ZodOptional<z.ZodString>;
65
+ command: z.ZodOptional<z.ZodString>;
66
+ url: z.ZodOptional<z.ZodString>;
61
67
  locations: z.ZodOptional<z.ZodArray<z.ZodObject<{
62
68
  path: z.ZodString;
63
69
  line: z.ZodOptional<z.ZodNumber>;
@@ -116,6 +122,7 @@ export declare const ConversationMessageSchema: z.ZodObject<{
116
122
  input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
117
123
  error: z.ZodString;
118
124
  closure: z.ZodOptional<z.ZodType<(string & {}) | "interrupted" | "never_ran" | "outcome_unknown", unknown, z.core.$ZodTypeInternals<(string & {}) | "interrupted" | "never_ran" | "outcome_unknown", unknown>>>;
125
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
119
126
  time: z.ZodObject<{
120
127
  start: z.ZodNumber;
121
128
  end: z.ZodNumber;
@@ -246,7 +253,13 @@ export declare const TimelineEntrySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
246
253
  toolCallId: z.ZodString;
247
254
  toolName: z.ZodString;
248
255
  kind: z.ZodOptional<z.ZodType<(string & {}) | "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | "task" | "other", unknown, z.core.$ZodTypeInternals<(string & {}) | "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | "task" | "other", unknown>>>;
256
+ mcp: z.ZodOptional<z.ZodObject<{
257
+ server: z.ZodString;
258
+ tool: z.ZodString;
259
+ }, z.core.$strip>>;
249
260
  title: z.ZodOptional<z.ZodString>;
261
+ command: z.ZodOptional<z.ZodString>;
262
+ url: z.ZodOptional<z.ZodString>;
250
263
  locations: z.ZodOptional<z.ZodArray<z.ZodObject<{
251
264
  path: z.ZodString;
252
265
  line: z.ZodOptional<z.ZodNumber>;
@@ -305,6 +318,7 @@ export declare const TimelineEntrySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
305
318
  input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
306
319
  error: z.ZodString;
307
320
  closure: z.ZodOptional<z.ZodType<(string & {}) | "interrupted" | "never_ran" | "outcome_unknown", unknown, z.core.$ZodTypeInternals<(string & {}) | "interrupted" | "never_ran" | "outcome_unknown", unknown>>>;
321
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
308
322
  time: z.ZodObject<{
309
323
  start: z.ZodNumber;
310
324
  end: z.ZodNumber;
@@ -388,7 +402,7 @@ export type ErrorEntry = z.infer<typeof ErrorEntrySchema>;
388
402
  export declare const ConversationTurnSchema: z.ZodObject<{
389
403
  turnId: z.ZodString;
390
404
  execution: z.ZodOptional<z.ZodObject<{
391
- harness: z.ZodType<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown, z.core.$ZodTypeInternals<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown>>;
405
+ harness: z.ZodType<(string & {}) | "claude-code" | "codex-app-server" | "acp" | "scripted", unknown, z.core.$ZodTypeInternals<(string & {}) | "claude-code" | "codex-app-server" | "acp" | "scripted", unknown>>;
392
406
  model: z.ZodOptional<z.ZodString>;
393
407
  thinkingLevel: z.ZodOptional<z.ZodEnum<{
394
408
  off: "off";
@@ -410,6 +424,7 @@ export declare const ConversationTurnSchema: z.ZodObject<{
410
424
  ultra: "ultra";
411
425
  }>>;
412
426
  reportedModels: z.ZodOptional<z.ZodArray<z.ZodString>>;
427
+ notApplied: z.ZodOptional<z.ZodArray<z.ZodString>>;
413
428
  }, z.core.$strip>>;
414
429
  status: z.ZodEnum<{
415
430
  active: "active";
@@ -457,11 +472,18 @@ export declare const ConversationPermissionSchema: z.ZodObject<{
457
472
  toolCallId: z.ZodOptional<z.ZodString>;
458
473
  toolName: z.ZodString;
459
474
  kind: z.ZodOptional<z.ZodType<(string & {}) | "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | "task" | "other", unknown, z.core.$ZodTypeInternals<(string & {}) | "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | "task" | "other", unknown>>>;
475
+ mcp: z.ZodOptional<z.ZodObject<{
476
+ server: z.ZodString;
477
+ tool: z.ZodString;
478
+ }, z.core.$strip>>;
460
479
  title: z.ZodOptional<z.ZodString>;
480
+ command: z.ZodOptional<z.ZodString>;
481
+ url: z.ZodOptional<z.ZodString>;
461
482
  locations: z.ZodOptional<z.ZodArray<z.ZodObject<{
462
483
  path: z.ZodString;
463
484
  line: z.ZodOptional<z.ZodNumber>;
464
485
  }, z.core.$strip>>>;
486
+ reason: z.ZodOptional<z.ZodString>;
465
487
  rawInput: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
466
488
  }, z.core.$strip>>;
467
489
  options: z.ZodArray<z.ZodObject<{
@@ -518,7 +540,7 @@ export type ConversationElicitation = z.infer<typeof ConversationElicitationSche
518
540
  export declare const ConversationStateSchema: z.ZodObject<{
519
541
  sessionId: z.ZodOptional<z.ZodString>;
520
542
  nativeSessionId: z.ZodOptional<z.ZodString>;
521
- harness: z.ZodOptional<z.ZodType<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown, z.core.$ZodTypeInternals<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown>>>;
543
+ harness: z.ZodOptional<z.ZodType<(string & {}) | "claude-code" | "codex-app-server" | "acp" | "scripted", unknown, z.core.$ZodTypeInternals<(string & {}) | "claude-code" | "codex-app-server" | "acp" | "scripted", unknown>>>;
522
544
  model: z.ZodOptional<z.ZodString>;
523
545
  resumed: z.ZodOptional<z.ZodBoolean>;
524
546
  timeline: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -572,7 +594,13 @@ export declare const ConversationStateSchema: z.ZodObject<{
572
594
  toolCallId: z.ZodString;
573
595
  toolName: z.ZodString;
574
596
  kind: z.ZodOptional<z.ZodType<(string & {}) | "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | "task" | "other", unknown, z.core.$ZodTypeInternals<(string & {}) | "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | "task" | "other", unknown>>>;
597
+ mcp: z.ZodOptional<z.ZodObject<{
598
+ server: z.ZodString;
599
+ tool: z.ZodString;
600
+ }, z.core.$strip>>;
575
601
  title: z.ZodOptional<z.ZodString>;
602
+ command: z.ZodOptional<z.ZodString>;
603
+ url: z.ZodOptional<z.ZodString>;
576
604
  locations: z.ZodOptional<z.ZodArray<z.ZodObject<{
577
605
  path: z.ZodString;
578
606
  line: z.ZodOptional<z.ZodNumber>;
@@ -631,6 +659,7 @@ export declare const ConversationStateSchema: z.ZodObject<{
631
659
  input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
632
660
  error: z.ZodString;
633
661
  closure: z.ZodOptional<z.ZodType<(string & {}) | "interrupted" | "never_ran" | "outcome_unknown", unknown, z.core.$ZodTypeInternals<(string & {}) | "interrupted" | "never_ran" | "outcome_unknown", unknown>>>;
662
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
634
663
  time: z.ZodObject<{
635
664
  start: z.ZodNumber;
636
665
  end: z.ZodNumber;
@@ -700,7 +729,7 @@ export declare const ConversationStateSchema: z.ZodObject<{
700
729
  turns: z.ZodArray<z.ZodObject<{
701
730
  turnId: z.ZodString;
702
731
  execution: z.ZodOptional<z.ZodObject<{
703
- harness: z.ZodType<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown, z.core.$ZodTypeInternals<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown>>;
732
+ harness: z.ZodType<(string & {}) | "claude-code" | "codex-app-server" | "acp" | "scripted", unknown, z.core.$ZodTypeInternals<(string & {}) | "claude-code" | "codex-app-server" | "acp" | "scripted", unknown>>;
704
733
  model: z.ZodOptional<z.ZodString>;
705
734
  thinkingLevel: z.ZodOptional<z.ZodEnum<{
706
735
  off: "off";
@@ -722,6 +751,7 @@ export declare const ConversationStateSchema: z.ZodObject<{
722
751
  ultra: "ultra";
723
752
  }>>;
724
753
  reportedModels: z.ZodOptional<z.ZodArray<z.ZodString>>;
754
+ notApplied: z.ZodOptional<z.ZodArray<z.ZodString>>;
725
755
  }, z.core.$strip>>;
726
756
  status: z.ZodEnum<{
727
757
  active: "active";
@@ -768,11 +798,18 @@ export declare const ConversationStateSchema: z.ZodObject<{
768
798
  toolCallId: z.ZodOptional<z.ZodString>;
769
799
  toolName: z.ZodString;
770
800
  kind: z.ZodOptional<z.ZodType<(string & {}) | "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | "task" | "other", unknown, z.core.$ZodTypeInternals<(string & {}) | "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | "task" | "other", unknown>>>;
801
+ mcp: z.ZodOptional<z.ZodObject<{
802
+ server: z.ZodString;
803
+ tool: z.ZodString;
804
+ }, z.core.$strip>>;
771
805
  title: z.ZodOptional<z.ZodString>;
806
+ command: z.ZodOptional<z.ZodString>;
807
+ url: z.ZodOptional<z.ZodString>;
772
808
  locations: z.ZodOptional<z.ZodArray<z.ZodObject<{
773
809
  path: z.ZodString;
774
810
  line: z.ZodOptional<z.ZodNumber>;
775
811
  }, z.core.$strip>>>;
812
+ reason: z.ZodOptional<z.ZodString>;
776
813
  rawInput: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
777
814
  }, z.core.$strip>>;
778
815
  options: z.ZodArray<z.ZodObject<{
@@ -1 +1 @@
1
- {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AExE,yCAAyC;AACzC,wBAAgB,iBAAiB,IAAI,iBAAiB,CAarD;AAED,uEAAuE;AACvE,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,iBAAiB,GAAG,sBAAsB,EAAE,CAErF;AAED,gEAAgE;AAChE,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,iBAAiB,GAAG,uBAAuB,EAAE,CAEvF;AAED,4EAA4E;AAC5E,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,iBAAiB,GAAG,mBAAmB,EAAE,CAEpF;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAkCnC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
@@ -63,6 +63,11 @@ export declare function credentialRunsOn<H extends keyof HarnessCredentials>(har
63
63
  * (`rejectedSha256`): an engine sends it, a product compares it, never the token.
64
64
  */
65
65
  export declare function tokenDigest(token: string): Promise<string>;
66
+ /**
67
+ * A JWT's claims, read, not verified: only ever of a token its issuer just
68
+ * answered over TLS, or the CLI that holds it. `{}` for anything else.
69
+ */
70
+ export declare function claimsOf(jwt: string): Record<string, unknown>;
66
71
  /**
67
72
  * What a product stores for an account it holds: who it is (`AccountInfo`),
68
73
  * the credential a turn gets, and what renews it (a ChatGPT login's refresh
@@ -78,6 +83,7 @@ export declare const CredentialGrantSchema: z.ZodObject<{
78
83
  "claude-code": "claude-code";
79
84
  "codex-app-server": "codex-app-server";
80
85
  acp: "acp";
86
+ scripted: "scripted";
81
87
  }>;
82
88
  credential: z.ZodDiscriminatedUnion<[z.ZodObject<{
83
89
  type: z.ZodLiteral<"api_key">;
@@ -108,6 +114,7 @@ export declare const CredentialRequestSchema: z.ZodObject<{
108
114
  "claude-code": "claude-code";
109
115
  "codex-app-server": "codex-app-server";
110
116
  acp: "acp";
117
+ scripted: "scripted";
111
118
  }>;
112
119
  sessionId: z.ZodString;
113
120
  turnId: z.ZodOptional<z.ZodString>;
@@ -1 +1 @@
1
- {"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../../../src/protocol/credentials.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAwBxB;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;2BAIlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,6EAA6E;AAC7E,eAAO,MAAM,sBAAsB;;;;;;;;2BAGjC,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,yEAAyE;AACzE,eAAO,MAAM,qBAAqB;;;;;;;;;;2BAIhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,iCAAiC;AACjC,MAAM,WAAW,kBAAkB;IAClC,aAAa,EAAE,gBAAgB,CAAC;IAChC,kBAAkB,EAAE,eAAe,CAAC;CACpC;AAMD,uFAAuF;AACvF,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,MAAM,kBAAkB,EAClE,OAAO,EAAE,CAAC,EACV,UAAU,EAAE,iBAAiB,GAC3B;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,UAAU,EAAE,kBAAkB,CAAC,CAAC,CAAC,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAQhF;AAED;;;GAGG;AACH,wBAAsB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAGhE;AAED;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAMhC,CAA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declare const TurnExecutionSchema: z.ZodObject<{
4
- harness: z.ZodType<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown, z.core.$ZodTypeInternals<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown>>;
4
+ harness: z.ZodType<(string & {}) | "claude-code" | "codex-app-server" | "acp" | "scripted", unknown, z.core.$ZodTypeInternals<(string & {}) | "claude-code" | "codex-app-server" | "acp" | "scripted", unknown>>;
5
5
  model: z.ZodOptional<z.ZodString>;
6
6
  thinkingLevel: z.ZodOptional<z.ZodEnum<{
7
7
  off: "off";
@@ -23,6 +23,7 @@ export declare const TurnExecutionSchema: z.ZodObject<{
23
23
  ultra: "ultra";
24
24
  }>>;
25
25
  reportedModels: z.ZodOptional<z.ZodArray<z.ZodString>>;
26
+ notApplied: z.ZodOptional<z.ZodArray<z.ZodString>>;
26
27
  }, z.core.$strip>;
27
28
  export type TurnExecution = z.infer<typeof TurnExecutionSchema>;
28
29
  //# sourceMappingURL=execution.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"execution.d.ts","sourceRoot":"","sources":["../../../src/protocol/execution.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,kFAAkF;AAClF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;iBAiB9B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
1
+ {"version":3,"file":"execution.d.ts","sourceRoot":"","sources":["../../../src/protocol/execution.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,kFAAkF;AAClF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;iBAsB9B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import type { Delta } from "./lifecycle.ts";
2
2
  import type { AgentInput } from "./part-input.ts";
3
3
  import type { Part, ReasoningPart, SubagentMetadata, TextPart, ToolPart } from "./parts.ts";
4
- import type { ToolKind, ToolLocation, ToolResultContent } from "./tool-state.ts";
4
+ import type { McpTool, ToolKind, ToolLocation, ToolResultContent } from "./tool-state.ts";
5
5
  /** Context an adapter threads through while building parts for one message. */
6
6
  export interface StreamContext {
7
7
  sessionId: string;
@@ -11,7 +11,13 @@ export interface StreamContext {
11
11
  /** Optional normalized metadata for a tool part (see ToolPart). */
12
12
  export interface ToolMeta {
13
13
  kind?: ToolKind;
14
+ /** A call to an MCP tool, when the harness knows its server and tool. */
15
+ mcp?: McpTool;
14
16
  title?: string;
17
+ /** A command's line as the agent wrote it, apart from any wrapper the harness adds. */
18
+ command?: string;
19
+ /** A fetch's address. */
20
+ url?: string;
15
21
  locations?: ToolLocation[];
16
22
  /** Present when this tool spawns a subagent (implies kind "task"). */
17
23
  subagent?: SubagentMetadata;
@@ -36,7 +42,11 @@ export declare function appendToolInput(part: ToolPart, partialJson: string): vo
36
42
  export declare function extendPart(part: Part, delta: Delta): Part | undefined;
37
43
  /** Attach/refresh normalized metadata on an existing tool part. */
38
44
  export declare function setToolMeta(part: ToolPart, meta: ToolMeta): void;
39
- /** Mutates a tool part into its terminal `completed`/`failed` state. */
45
+ /**
46
+ * Mutates a tool part into its terminal `completed`/`failed` state. A failure
47
+ * keeps its `metadata` (a command's exit code) and drops its `content`: what
48
+ * a failed call would have shown did not happen.
49
+ */
40
50
  export declare function completeToolPart(part: ToolPart, result: {
41
51
  output: string;
42
52
  isError?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"factories.d.ts","sourceRoot":"","sources":["../../../src/protocol/factories.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,E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AM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAEhE;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED,gDAAgD;AAChD,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAElE;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,EAAE,CAE7E;AAED,8EAA8E;AAC9E,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,EAAE,CAE/E"}
@@ -6,13 +6,16 @@ import { z } from "zod";
6
6
  * - `acp` — any Agent Client Protocol v1 agent subprocess (`gemini --acp`,
7
7
  * `claude-code-acp`, `codex-acp`, ACP registry agents); the launch
8
8
  * command is operator-configured, never taken from the wire
9
+ * - `scripted` — a script the operator gives plays the agent (a product's
10
+ * free test double); registered only with its script
9
11
  */
10
- export declare const AGENT_HARNESSES: readonly ["claude-code", "codex-app-server", "acp"];
12
+ export declare const AGENT_HARNESSES: readonly ["claude-code", "codex-app-server", "acp", "scripted"];
11
13
  export type AgentHarness = (typeof AGENT_HARNESSES)[number];
12
14
  export declare const AgentHarnessSchema: z.ZodEnum<{
13
15
  "claude-code": "claude-code";
14
16
  "codex-app-server": "codex-app-server";
15
17
  acp: "acp";
18
+ scripted: "scripted";
16
19
  }>;
17
20
  /**
18
21
  * A harness id as it appears on the stream: OPEN, so an event or history entry
@@ -21,7 +24,7 @@ export declare const AgentHarnessSchema: z.ZodEnum<{
21
24
  * can only ask for a harness this build has.
22
25
  */
23
26
  export type HarnessId = AgentHarness | (string & {});
24
- export declare const HarnessIdSchema: z.ZodType<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown, z.core.$ZodTypeInternals<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown>>;
27
+ export declare const HarnessIdSchema: z.ZodType<(string & {}) | "claude-code" | "codex-app-server" | "acp" | "scripted", unknown, z.core.$ZodTypeInternals<(string & {}) | "claude-code" | "codex-app-server" | "acp" | "scripted", unknown>>;
25
28
  export declare function isAgentHarness(value: string): value is AgentHarness;
26
29
  /**
27
30
  * How a harness handles changing the model mid-conversation:
@@ -65,6 +68,7 @@ export declare const AgentCapabilitiesSchema: z.ZodObject<{
65
68
  rejectionMessages: z.ZodBoolean;
66
69
  turnScopedSubagents: z.ZodOptional<z.ZodBoolean>;
67
70
  steering: z.ZodOptional<z.ZodBoolean>;
71
+ ignoredSettings: z.ZodOptional<z.ZodArray<z.ZodString>>;
68
72
  }, z.core.$strip>;
69
73
  export type AgentCapabilities = z.infer<typeof AgentCapabilitiesSchema>;
70
74
  //# sourceMappingURL=harness.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"harness.d.ts","sourceRoot":"","sources":["../../../src/protocol/harness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,qDAAsD,CAAC;AACnF,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAC5D,eAAO,MAAM,kBAAkB;;;;EAA0B,CAAC;AAE1D;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GAAG,YAAY,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AACrD,eAAO,MAAM,eAAe,+KAAkC,CAAC;AAE/D,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,YAAY,CAEnE;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB,2DAA4D,CAAC;AAC5F,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,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O,MAAM,qBAAqB,2LAAqC,CAAC;AAExE;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU,oCAAqC,CAAC;AAC7D,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AACnE,eAAO,MAAM,cAAc,6IAA6B,CAAC;AAKzD,gFAAgF;AAChF,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAGtE;AAED;;;;GAIG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;iBAyClC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
@@ -18,6 +18,25 @@ export declare const HISTORY_MAX_RECORDS = 256;
18
18
  /** How long `history/wait` waits by default before answering with an unchanged head. */
19
19
  export declare const HISTORY_WAIT_TIMEOUT_MS = 15000;
20
20
  export declare const HISTORY_MAX_BYTES: number;
21
+ /**
22
+ * The `_meta` key on what a durable store kept in place of a binary it could
23
+ * not keep whole: an image or file whose base64 `data` would not fit an
24
+ * event's record or a checkpoint. The entry is text, so every reader renders
25
+ * it as it is: a tool result's `content` image becomes a `text` entry, an
26
+ * image or file part a `text` part at the same address. Under this key it
27
+ * says what was there (`OmittedBinary`). Every client receives this entry,
28
+ * live and on replay alike: the stream delivers what the store kept.
29
+ */
30
+ export declare const OMITTED_BINARY_META_KEY = "agent-server/omittedBinary";
31
+ /** What an entry under `OMITTED_BINARY_META_KEY` stands for. */
32
+ export interface OmittedBinary {
33
+ /** The entry it replaced: a tool result's or part's `image`, or a `file` part. */
34
+ type: "image" | "file";
35
+ mimeType: string;
36
+ /** The binary's size, decoded from its base64. */
37
+ bytes: number;
38
+ filename?: string;
39
+ }
21
40
  /** A history: the store that writes it (`sourceId`) and its session. */
22
41
  export declare const SessionRefSchema: z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AAC,KAC9B,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAChD,CAAC"}
@@ -66,7 +66,7 @@ export declare const SessionCreatedEventSchema: z.ZodObject<{
66
66
  type: z.ZodLiteral<"session.created">;
67
67
  sessionId: z.ZodString;
68
68
  nativeSessionId: z.ZodString;
69
- harness: z.ZodType<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown, z.core.$ZodTypeInternals<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown>>;
69
+ harness: z.ZodType<(string & {}) | "claude-code" | "codex-app-server" | "acp" | "scripted", unknown, z.core.$ZodTypeInternals<(string & {}) | "claude-code" | "codex-app-server" | "acp" | "scripted", unknown>>;
70
70
  model: z.ZodOptional<z.ZodString>;
71
71
  resumed: z.ZodOptional<z.ZodBoolean>;
72
72
  }, z.core.$strip>;
@@ -177,7 +177,7 @@ export declare const TurnStartedEventSchema: z.ZodObject<{
177
177
  timestamp: z.ZodNumber;
178
178
  _meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
179
179
  execution: z.ZodOptional<z.ZodObject<{
180
- harness: z.ZodType<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown, z.core.$ZodTypeInternals<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown>>;
180
+ harness: z.ZodType<(string & {}) | "claude-code" | "codex-app-server" | "acp" | "scripted", unknown, z.core.$ZodTypeInternals<(string & {}) | "claude-code" | "codex-app-server" | "acp" | "scripted", unknown>>;
181
181
  model: z.ZodOptional<z.ZodString>;
182
182
  thinkingLevel: z.ZodOptional<z.ZodEnum<{
183
183
  off: "off";
@@ -199,6 +199,7 @@ export declare const TurnStartedEventSchema: z.ZodObject<{
199
199
  ultra: "ultra";
200
200
  }>>;
201
201
  reportedModels: z.ZodOptional<z.ZodArray<z.ZodString>>;
202
+ notApplied: z.ZodOptional<z.ZodArray<z.ZodString>>;
202
203
  }, z.core.$strip>>;
203
204
  sessionId: z.ZodString;
204
205
  turnId: z.ZodString;
@@ -209,7 +210,7 @@ export declare const TurnEndedEventSchema: z.ZodObject<{
209
210
  timestamp: z.ZodNumber;
210
211
  _meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
211
212
  execution: z.ZodOptional<z.ZodObject<{
212
- harness: z.ZodType<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown, z.core.$ZodTypeInternals<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown>>;
213
+ harness: z.ZodType<(string & {}) | "claude-code" | "codex-app-server" | "acp" | "scripted", unknown, z.core.$ZodTypeInternals<(string & {}) | "claude-code" | "codex-app-server" | "acp" | "scripted", unknown>>;
213
214
  model: z.ZodOptional<z.ZodString>;
214
215
  thinkingLevel: z.ZodOptional<z.ZodEnum<{
215
216
  off: "off";
@@ -231,6 +232,7 @@ export declare const TurnEndedEventSchema: z.ZodObject<{
231
232
  ultra: "ultra";
232
233
  }>>;
233
234
  reportedModels: z.ZodOptional<z.ZodArray<z.ZodString>>;
235
+ notApplied: z.ZodOptional<z.ZodArray<z.ZodString>>;
234
236
  }, z.core.$strip>>;
235
237
  stopReason: z.ZodType<"error" | (string & {}) | "cancelled" | "end_turn" | "max_tokens" | "max_turn_requests" | "refusal", unknown, z.core.$ZodTypeInternals<"error" | (string & {}) | "cancelled" | "end_turn" | "max_tokens" | "max_turn_requests" | "refusal", unknown>>;
236
238
  finishReason: z.ZodOptional<z.ZodString>;
@@ -322,7 +324,13 @@ export declare const MessagePartEventSchema: z.ZodObject<{
322
324
  toolCallId: z.ZodString;
323
325
  toolName: z.ZodString;
324
326
  kind: z.ZodOptional<z.ZodType<(string & {}) | "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | "task" | "other", unknown, z.core.$ZodTypeInternals<(string & {}) | "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | "task" | "other", unknown>>>;
327
+ mcp: z.ZodOptional<z.ZodObject<{
328
+ server: z.ZodString;
329
+ tool: z.ZodString;
330
+ }, z.core.$strip>>;
325
331
  title: z.ZodOptional<z.ZodString>;
332
+ command: z.ZodOptional<z.ZodString>;
333
+ url: z.ZodOptional<z.ZodString>;
326
334
  locations: z.ZodOptional<z.ZodArray<z.ZodObject<{
327
335
  path: z.ZodString;
328
336
  line: z.ZodOptional<z.ZodNumber>;
@@ -381,6 +389,7 @@ export declare const MessagePartEventSchema: z.ZodObject<{
381
389
  input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
382
390
  error: z.ZodString;
383
391
  closure: z.ZodOptional<z.ZodType<(string & {}) | "interrupted" | "never_ran" | "outcome_unknown", unknown, z.core.$ZodTypeInternals<(string & {}) | "interrupted" | "never_ran" | "outcome_unknown", unknown>>>;
392
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
384
393
  time: z.ZodObject<{
385
394
  start: z.ZodNumber;
386
395
  end: z.ZodNumber;
@@ -513,11 +522,18 @@ export declare const PermissionToolCallSchema: z.ZodObject<{
513
522
  toolCallId: z.ZodOptional<z.ZodString>;
514
523
  toolName: z.ZodString;
515
524
  kind: z.ZodOptional<z.ZodType<(string & {}) | "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | "task" | "other", unknown, z.core.$ZodTypeInternals<(string & {}) | "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | "task" | "other", unknown>>>;
525
+ mcp: z.ZodOptional<z.ZodObject<{
526
+ server: z.ZodString;
527
+ tool: z.ZodString;
528
+ }, z.core.$strip>>;
516
529
  title: z.ZodOptional<z.ZodString>;
530
+ command: z.ZodOptional<z.ZodString>;
531
+ url: z.ZodOptional<z.ZodString>;
517
532
  locations: z.ZodOptional<z.ZodArray<z.ZodObject<{
518
533
  path: z.ZodString;
519
534
  line: z.ZodOptional<z.ZodNumber>;
520
535
  }, z.core.$strip>>>;
536
+ reason: z.ZodOptional<z.ZodString>;
521
537
  rawInput: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
522
538
  }, z.core.$strip>;
523
539
  export type PermissionToolCall = z.infer<typeof PermissionToolCallSchema>;
@@ -546,11 +562,18 @@ export declare const PermissionRequestedEventSchema: z.ZodObject<{
546
562
  toolCallId: z.ZodOptional<z.ZodString>;
547
563
  toolName: z.ZodString;
548
564
  kind: z.ZodOptional<z.ZodType<(string & {}) | "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | "task" | "other", unknown, z.core.$ZodTypeInternals<(string & {}) | "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | "task" | "other", unknown>>>;
565
+ mcp: z.ZodOptional<z.ZodObject<{
566
+ server: z.ZodString;
567
+ tool: z.ZodString;
568
+ }, z.core.$strip>>;
549
569
  title: z.ZodOptional<z.ZodString>;
570
+ command: z.ZodOptional<z.ZodString>;
571
+ url: z.ZodOptional<z.ZodString>;
550
572
  locations: z.ZodOptional<z.ZodArray<z.ZodObject<{
551
573
  path: z.ZodString;
552
574
  line: z.ZodOptional<z.ZodNumber>;
553
575
  }, z.core.$strip>>>;
576
+ reason: z.ZodOptional<z.ZodString>;
554
577
  rawInput: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
555
578
  }, z.core.$strip>>;
556
579
  options: z.ZodArray<z.ZodObject<{
@@ -699,7 +722,7 @@ export type ErrorEvent = z.infer<typeof ErrorEventSchema>;
699
722
  export declare const RawEventSchema: z.ZodObject<{
700
723
  timestamp: z.ZodNumber;
701
724
  _meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
702
- harness: z.ZodType<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown, z.core.$ZodTypeInternals<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown>>;
725
+ harness: z.ZodType<(string & {}) | "claude-code" | "codex-app-server" | "acp" | "scripted", unknown, z.core.$ZodTypeInternals<(string & {}) | "claude-code" | "codex-app-server" | "acp" | "scripted", unknown>>;
703
726
  data: z.ZodUnknown;
704
727
  sessionId: z.ZodString;
705
728
  turnId: z.ZodString;
@@ -712,7 +735,7 @@ export declare const LifecycleEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
712
735
  type: z.ZodLiteral<"session.created">;
713
736
  sessionId: z.ZodString;
714
737
  nativeSessionId: z.ZodString;
715
- harness: z.ZodType<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown, z.core.$ZodTypeInternals<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown>>;
738
+ harness: z.ZodType<(string & {}) | "claude-code" | "codex-app-server" | "acp" | "scripted", unknown, z.core.$ZodTypeInternals<(string & {}) | "claude-code" | "codex-app-server" | "acp" | "scripted", unknown>>;
716
739
  model: z.ZodOptional<z.ZodString>;
717
740
  resumed: z.ZodOptional<z.ZodBoolean>;
718
741
  }, z.core.$strip>, z.ZodObject<{
@@ -725,7 +748,7 @@ export declare const LifecycleEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
725
748
  timestamp: z.ZodNumber;
726
749
  _meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
727
750
  execution: z.ZodOptional<z.ZodObject<{
728
- harness: z.ZodType<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown, z.core.$ZodTypeInternals<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown>>;
751
+ harness: z.ZodType<(string & {}) | "claude-code" | "codex-app-server" | "acp" | "scripted", unknown, z.core.$ZodTypeInternals<(string & {}) | "claude-code" | "codex-app-server" | "acp" | "scripted", unknown>>;
729
752
  model: z.ZodOptional<z.ZodString>;
730
753
  thinkingLevel: z.ZodOptional<z.ZodEnum<{
731
754
  off: "off";
@@ -747,6 +770,7 @@ export declare const LifecycleEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
747
770
  ultra: "ultra";
748
771
  }>>;
749
772
  reportedModels: z.ZodOptional<z.ZodArray<z.ZodString>>;
773
+ notApplied: z.ZodOptional<z.ZodArray<z.ZodString>>;
750
774
  }, z.core.$strip>>;
751
775
  sessionId: z.ZodString;
752
776
  turnId: z.ZodString;
@@ -810,7 +834,13 @@ export declare const LifecycleEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
810
834
  toolCallId: z.ZodString;
811
835
  toolName: z.ZodString;
812
836
  kind: z.ZodOptional<z.ZodType<(string & {}) | "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | "task" | "other", unknown, z.core.$ZodTypeInternals<(string & {}) | "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | "task" | "other", unknown>>>;
837
+ mcp: z.ZodOptional<z.ZodObject<{
838
+ server: z.ZodString;
839
+ tool: z.ZodString;
840
+ }, z.core.$strip>>;
813
841
  title: z.ZodOptional<z.ZodString>;
842
+ command: z.ZodOptional<z.ZodString>;
843
+ url: z.ZodOptional<z.ZodString>;
814
844
  locations: z.ZodOptional<z.ZodArray<z.ZodObject<{
815
845
  path: z.ZodString;
816
846
  line: z.ZodOptional<z.ZodNumber>;
@@ -869,6 +899,7 @@ export declare const LifecycleEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
869
899
  input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
870
900
  error: z.ZodString;
871
901
  closure: z.ZodOptional<z.ZodType<(string & {}) | "interrupted" | "never_ran" | "outcome_unknown", unknown, z.core.$ZodTypeInternals<(string & {}) | "interrupted" | "never_ran" | "outcome_unknown", unknown>>>;
902
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
872
903
  time: z.ZodObject<{
873
904
  start: z.ZodNumber;
874
905
  end: z.ZodNumber;
@@ -957,7 +988,7 @@ export declare const LifecycleEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
957
988
  timestamp: z.ZodNumber;
958
989
  _meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
959
990
  execution: z.ZodOptional<z.ZodObject<{
960
- harness: z.ZodType<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown, z.core.$ZodTypeInternals<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown>>;
991
+ harness: z.ZodType<(string & {}) | "claude-code" | "codex-app-server" | "acp" | "scripted", unknown, z.core.$ZodTypeInternals<(string & {}) | "claude-code" | "codex-app-server" | "acp" | "scripted", unknown>>;
961
992
  model: z.ZodOptional<z.ZodString>;
962
993
  thinkingLevel: z.ZodOptional<z.ZodEnum<{
963
994
  off: "off";
@@ -979,6 +1010,7 @@ export declare const LifecycleEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
979
1010
  ultra: "ultra";
980
1011
  }>>;
981
1012
  reportedModels: z.ZodOptional<z.ZodArray<z.ZodString>>;
1013
+ notApplied: z.ZodOptional<z.ZodArray<z.ZodString>>;
982
1014
  }, z.core.$strip>>;
983
1015
  stopReason: z.ZodType<"error" | (string & {}) | "cancelled" | "end_turn" | "max_tokens" | "max_turn_requests" | "refusal", unknown, z.core.$ZodTypeInternals<"error" | (string & {}) | "cancelled" | "end_turn" | "max_tokens" | "max_turn_requests" | "refusal", unknown>>;
984
1016
  finishReason: z.ZodOptional<z.ZodString>;
@@ -1070,11 +1102,18 @@ export declare const LifecycleEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
1070
1102
  toolCallId: z.ZodOptional<z.ZodString>;
1071
1103
  toolName: z.ZodString;
1072
1104
  kind: z.ZodOptional<z.ZodType<(string & {}) | "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | "task" | "other", unknown, z.core.$ZodTypeInternals<(string & {}) | "read" | "edit" | "delete" | "move" | "search" | "execute" | "think" | "fetch" | "switch_mode" | "task" | "other", unknown>>>;
1105
+ mcp: z.ZodOptional<z.ZodObject<{
1106
+ server: z.ZodString;
1107
+ tool: z.ZodString;
1108
+ }, z.core.$strip>>;
1073
1109
  title: z.ZodOptional<z.ZodString>;
1110
+ command: z.ZodOptional<z.ZodString>;
1111
+ url: z.ZodOptional<z.ZodString>;
1074
1112
  locations: z.ZodOptional<z.ZodArray<z.ZodObject<{
1075
1113
  path: z.ZodString;
1076
1114
  line: z.ZodOptional<z.ZodNumber>;
1077
1115
  }, z.core.$strip>>>;
1116
+ reason: z.ZodOptional<z.ZodString>;
1078
1117
  rawInput: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1079
1118
  }, z.core.$strip>>;
1080
1119
  options: z.ZodArray<z.ZodObject<{
@@ -1144,7 +1183,7 @@ export declare const LifecycleEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
1144
1183
  }, z.core.$strip>, z.ZodObject<{
1145
1184
  timestamp: z.ZodNumber;
1146
1185
  _meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1147
- harness: z.ZodType<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown, z.core.$ZodTypeInternals<(string & {}) | "claude-code" | "codex-app-server" | "acp", unknown>>;
1186
+ harness: z.ZodType<(string & {}) | "claude-code" | "codex-app-server" | "acp" | "scripted", unknown, z.core.$ZodTypeInternals<(string & {}) | "claude-code" | "codex-app-server" | "acp" | "scripted", unknown>>;
1148
1187
  data: z.ZodUnknown;
1149
1188
  sessionId: z.ZodString;
1150
1189
  turnId: z.ZodString;