@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
@@ -6,10 +6,12 @@ export declare class ConnectionClosedError extends Error {
6
6
  readonly name: string;
7
7
  }
8
8
  /**
9
- * Why a server refused this client, which it answers 401: the token it sent
10
- * (`token_refused`), or that it sent none (`token_required`).
9
+ * Why a server refused this client: answered 401, the token it sent
10
+ * (`token_refused`) or that it sent none (`token_required`); or, answering
11
+ * `initialize`, that it speaks another wire protocol version
12
+ * (`protocol_mismatch`, a `ProtocolVersionMismatchError`).
11
13
  */
12
- export type ConnectionRefusal = "token_refused" | "token_required";
14
+ export type ConnectionRefusal = "token_refused" | "token_required" | "protocol_mismatch";
13
15
  /**
14
16
  * The server answered, and refused this client (`reason`). Asked again it
15
17
  * answers the same, so a client that redials stops: the connection is closed
@@ -17,12 +19,39 @@ export type ConnectionRefusal = "token_refused" | "token_required";
17
19
  */
18
20
  export declare class ConnectionRefusedError extends ConnectionClosedError {
19
21
  readonly reason: ConnectionRefusal;
20
- /** The server that refused it. */
22
+ /** The server that refused it; empty for a client that dialed no URL (`spawn`, `attach`, a factory). */
21
23
  readonly url: string;
22
24
  readonly name: string;
23
25
  constructor(reason: ConnectionRefusal,
24
- /** The server that refused it. */
25
- url: string);
26
+ /** The server that refused it; empty for a client that dialed no URL (`spawn`, `attach`, a factory). */
27
+ url: string, message?: string);
28
+ }
29
+ /**
30
+ * The server speaks another wire protocol version than this client: it
31
+ * answered `initialize` with `protocolVersionMismatch`, or selected a version
32
+ * this build does not speak. No redial can change that (only another build of
33
+ * the client or of the server), so it is a refusal: the client stops and what
34
+ * waits on it fails with this. `code` and `data` are the wire error's, as a
35
+ * `WireRequestError` would carry them.
36
+ */
37
+ export declare class ProtocolVersionMismatchError extends ConnectionRefusedError {
38
+ /** The version this client speaks (`WIRE_PROTOCOL_VERSION`). */
39
+ readonly protocolVersion: number;
40
+ /** The versions the server speaks, as it said; empty when it did not say. */
41
+ readonly supported: number[];
42
+ readonly name: string;
43
+ readonly reason: "protocol_mismatch";
44
+ readonly code: -32004;
45
+ constructor(
46
+ /** The version this client speaks (`WIRE_PROTOCOL_VERSION`). */
47
+ protocolVersion: number,
48
+ /** The versions the server speaks, as it said; empty when it did not say. */
49
+ supported: number[], url: string,
50
+ /** What the server said, when it refused the version itself. */
51
+ detail?: string);
52
+ get data(): {
53
+ supported: number[];
54
+ };
26
55
  }
27
56
  /**
28
57
  * What the client's connection does (`onConnection`): an outage, each redial,
@@ -57,12 +86,20 @@ export type ConnectionEvent =
57
86
  initialize: InitializeResult;
58
87
  }
59
88
  /**
60
- * A redial the server refused (`ConnectionRefusedError`): no outage, its
61
- * answer, which every redial would get. The client stops; `closed` follows.
89
+ * A server that refused the client (`ConnectionRefusedError`): no outage,
90
+ * its answer, which every redial would get. The client stops; `closed`
91
+ * follows. A refused token is told of a redial (`connect` itself rejects
92
+ * with it); another protocol version (`ProtocolVersionMismatchError`) of
93
+ * any handshake: `protocolVersion` this client's, `supported` the server's.
62
94
  */
63
95
  | {
64
96
  state: "refused";
65
- reason: ConnectionRefusal;
97
+ reason: "token_refused" | "token_required";
98
+ } | {
99
+ state: "refused";
100
+ reason: "protocol_mismatch";
101
+ protocolVersion: number;
102
+ supported: number[];
66
103
  }
67
104
  /**
68
105
  * For good: `close()`, a dropped connection that does not redial,
@@ -96,7 +133,7 @@ export interface AgentServerClientOptions {
96
133
  }
97
134
  export type TransportFactory = () => Promise<WireTransport> | WireTransport;
98
135
  /** What the connection tells the client around it. */
99
- export interface ConnectionHost {
136
+ interface ConnectionHost {
100
137
  /** A line from the current transport. */
101
138
  line(line: string, transport: WireTransport): void;
102
139
  /** A new transport opened; `redialed`: its handshake comes next, before anything else may run. */
@@ -121,6 +158,8 @@ export declare class Connection {
121
158
  private readonly options;
122
159
  readonly redials: boolean;
123
160
  private readonly host;
161
+ /** The URL it dials, for what a refusal says; empty when it dials none. */
162
+ private readonly url;
124
163
  transport: WireTransport | null;
125
164
  readonly rpc: Rpc;
126
165
  readonly events: Listeners<ConnectionEvent>;
@@ -135,10 +174,17 @@ export declare class Connection {
135
174
  private stopBackoff;
136
175
  /** The running reconnect loop, for a request that waits to be re-sent. */
137
176
  private reconnection;
138
- constructor(factory: TransportFactory, options: AgentServerClientOptions, redials: boolean, host: ConnectionHost);
177
+ constructor(factory: TransportFactory, options: AgentServerClientOptions, redials: boolean, host: ConnectionHost,
178
+ /** The URL it dials, for what a refusal says; empty when it dials none. */
179
+ url?: string);
139
180
  open(): Promise<void>;
140
- /** Handshake (memoized). */
181
+ /**
182
+ * Handshake (memoized). A server of another protocol version closes the
183
+ * client for good: it rejects with `ProtocolVersionMismatchError`.
184
+ */
141
185
  initialize(): Promise<InitializeResult>;
186
+ /** The server speaks another protocol version: the client is closed by its refusal, which this returns. */
187
+ private mismatched;
142
188
  /** A request, its answer read as `WIRE_API` reads the method's. */
143
189
  request<M extends WireRequestMethod>(method: M, params: WireParams<M>, onAnswer?: OnAnswer<WireDecodedResult<M>>): Promise<WireDecodedResult<M>>;
144
190
  /**
@@ -154,7 +200,14 @@ export declare class Connection {
154
200
  close(): void;
155
201
  private dropped;
156
202
  private redial;
157
- /** Closed for good by the server's refusal, which what waits on the connection fails with. */
203
+ /** Let the current transport go without reporting it as a drop: it was never handed over. */
204
+ private discard;
205
+ /**
206
+ * Closed for good by the server's refusal, which what waits on the
207
+ * connection fails with: the requests in flight, and the transport it came
208
+ * on (a handshake's) let go.
209
+ */
158
210
  private refused;
159
211
  }
212
+ export {};
160
213
  //# sourceMappingURL=connection.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"connection.d.ts","sourceRoot":"","sources":["../../../src/client/connection.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,gBAAgB,EAKrB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,KAAK,QAAQ,EAAE,GAAG,EAAoB,MAAM,UAAU,CAAC;AAEhE,qEAAqE;AACrE,qBAAa,qBAAsB,SAAQ,KAAK;IAC/C,SAAkB,IAAI,EAAE,MAAM,CAA2B;CACzD;AAED;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,eAAe,GAAG,gBAAgB,CAAC;AAEnE;;;;GAIG;AACH,qBAAa,sBAAuB,SAAQ,qBAAqB;IAG/D,QAAQ,CAAC,MAAM,EAAE,iBAAiB;IAClC,kCAAkC;IAClC,QAAQ,CAAC,GAAG,EAAE,MAAM;IAJrB,SAAkB,IAAI,EAAE,MAAM,CAA4B;gBAEhD,MAAM,EAAE,iBAAiB;IAClC,kCAAkC;IACzB,GAAG,EAAE,MAAM;CAMrB;AAED;;;GAGG;AACH,MAAM,MAAM,eAAe;AAC1B,6EAA6E;AAC3E;IAAE,KAAK,EAAE,cAAc,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE;AAC3C,6FAA6F;GAC3F;IAAE,KAAK,EAAE,cAAc,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC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,OAAO,CAAC,YAAY,CAAS;IAC7B,qEAAqE;IACrE,OAAO,CAAC,WAAW,CAA6B;IAChD,0EAA0E;IAC1E,OAAO,CAAC,YAAY,CAA8B;gBAGhC,OAAO,EAAE,gBAAgB,EACzB,OAAO,EAAE,wBAAwB,EACzC,OAAO,EAAE,OAAO,EACR,IAAI,EAAE,cAAc;IACrC,2EAA2E;IAC1D,GAAG,SAAK;IAkBpB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAe3B;;;OAGG;IACH,UAAU,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAkCvC,2GAA2G;IAC3G,OAAO,CAAC,UAAU;IAWlB,mEAAmE;IACnE,OAAO,CAAC,CAAC,SAAS,iBAAiB,EAClC,MAAM,EAAE,CAAC,EACT,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,EACrB,QAAQ,CAAC,EAAE,QAAQ,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,GACvC,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC;IAQhC;;;;;;;;OAQG;IACG,MAAM,CAAC,CAAC,SAAS,iBAAiB,EACvC,MAAM,EAAE,CAAC,EACT,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,EACrB,QAAQ,CAAC,EAAE,QAAQ,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,GACvC,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC;IAehC,KAAK,IAAI,IAAI;IAYb,OAAO,CAAC,OAAO;YAmBD,MAAM;IA+EpB,6FAA6F;IAC7F,OAAO,CAAC,OAAO;IAMf;;;;OAIG;IACH,OAAO,CAAC,OAAO;CAqBf"}
@@ -1,4 +1,4 @@
1
- export { AgentServerClient, type AgentServerClientOptions, type ConnectOptions, ConnectionClosedError, type ConnectionEvent, type ConnectionRefusal, ConnectionRefusedError, EventGapError, type FollowOptions, type JoinTurnOptions, type SessionEventGap, type SessionSubscription, type SubscribeOptions, type TurnHandle, } from "./client.ts";
1
+ export { AgentServerClient, type AgentServerClientOptions, type ConnectOptions, ConnectionClosedError, type ConnectionEvent, type ConnectionRefusal, ConnectionRefusedError, EventGapError, type FollowOptions, type JoinTurnOptions, ProtocolVersionMismatchError, type SessionEventGap, type SessionSubscription, type SubscribeOptions, type TurnHandle, } from "./client.ts";
2
2
  export { LoginError, type LoginHandle } from "./logins.ts";
3
3
  export { WireRequestError, refusalData } from "./rpc.ts";
4
4
  export { connectTransport, type SpawnServerOptions, socketTransport, spawnTransport, type WebSocketLike, } from "./transports.ts";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":"AAGA,OAAO,EACN,iBAAiB,EACjB,KAAK,wBAAwB,EAC7B,KAAK,cAAc,EACnB,qBAAqB,EACrB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,sBAAsB,EACtB,aAAa,EACb,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,UAAU,GACf,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,UAAU,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACzD,OAAO,EACN,gBAAgB,EAChB,KAAK,kBAAkB,EACvB,eAAe,EACf,cAAc,EACd,KAAK,aAAa,GAClB,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":"AAGA,OAAO,EACN,iBAAiB,EACjB,KAAK,wBAAwB,EAC7B,KAAK,cAAc,EACnB,qBAAqB,EACrB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,sBAAsB,EACtB,aAAa,EACb,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,4BAA4B,EAC5B,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,UAAU,GACf,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,UAAU,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACzD,OAAO,EACN,gBAAgB,EAChB,KAAK,kBAAkB,EACvB,eAAe,EACf,cAAc,EACd,KAAK,aAAa,GAClB,MAAM,iBAAiB,CAAC"}
@@ -21,15 +21,16 @@ export interface LoginHandle extends AuthLogin {
21
21
  cancel(): Promise<void>;
22
22
  }
23
23
  /** What a login handle asks of the client. */
24
- export interface LoginsPort {
24
+ interface LoginsPort {
25
25
  readonly updates: Listeners<AuthUpdated>;
26
26
  readonly connection: Listeners<ConnectionEvent>;
27
27
  complete(loginId: string, code: string): Promise<AuthUpdated>;
28
28
  cancel(loginId: string): Promise<unknown>;
29
29
  }
30
30
  /**
31
- * Start a login and follow it to its end. Its end is watched for from before
32
- * the request: `auth/updated` may come before the answer.
31
+ * Start a login and follow it to its end. Its end, and the connection's, are
32
+ * watched for from before the request: either may come before the answer.
33
33
  */
34
34
  export declare function startLogin(port: LoginsPort, request: () => Promise<AuthLogin>): Promise<LoginHandle>;
35
+ export {};
35
36
  //# sourceMappingURL=logins.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"logins.d.ts","sourceRoot":"","sources":["../../../src/client/logins.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC9F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,qHAAqH;AACrH,qBAAa,UAAW,SAAQ,KAAK;IAGxB,QAAQ,CAAC,GAAG,EAAE,YAAY;IAFtC,QAAQ,CAAC,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,MAAM,CAAC;gBAEJ,GAAG,EAAE,YAAY;CAOtC;AAED,6EAA6E;AAC7E,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC7C;;;;OAIG;IACH,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;IACpC,8EAA8E;IAC9E,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAC7C,4CAA4C;IAC5C,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB;AAED,8CAA8C;AAC9C,UAAU,UAAU;IACnB,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC,WAAW,CAAC,CAAC;IACzC,QAAQ,CAAC,UAAU,EAAE,SAAS,CAAC,eAAe,CAAC,CAAC;IAChD,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAC9D,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CAC1C;AAED;;;GAGG;AACH,wBAAsB,UAAU,CAC/B,IAAI,EAAE,UAAU,EAChB,OAAO,EAAE,MAAM,OAAO,CAAC,SAAS,CAAC,GAC/B,OAAO,CAAC,WAAW,CAAC,CAmEtB"}
@@ -24,7 +24,7 @@ export type Follow = "watch" | {
24
24
  turnId: string;
25
25
  } | "all";
26
26
  /** What the streams ask of the client around them. */
27
- export interface StreamsHost {
27
+ interface StreamsHost {
28
28
  /** The transport frames come on now; null between connections. */
29
29
  transport(): WireTransport | null;
30
30
  /** False once the client closed. */
@@ -52,7 +52,7 @@ export declare class Streams {
52
52
  /** Per-session seq discipline — the shared `/protocol` implementation. */
53
53
  private readonly cursor;
54
54
  private readonly streams;
55
- /** Subscribed to every session (`subscribeAll`). */
55
+ /** Follows every session (`subscribeAll`): from the ask, not its answer, until `unsubscribeAll` or a refusal. */
56
56
  private all;
57
57
  /** A redialed transport's handshake is pending: frames wait for it to say which server this is. */
58
58
  private paused;
@@ -90,7 +90,12 @@ export declare class Streams {
90
90
  * was evicted; then the session is let go, unless something else follows it.
91
91
  */
92
92
  turnEnded(sessionId: string, turnId: string, headSeq: number): void;
93
- /** Every session's frames, from now: those with a running turn start at their head. */
93
+ /** `subscribeAll` asked: every server from now on is asked for every session, until `unfollowAll`. */
94
+ followAll(): void;
95
+ /**
96
+ * Every session's frames, from now: those with a running turn start at
97
+ * their head. An answer to an ask `unfollowAll` withdrew follows nothing.
98
+ */
94
99
  joinedAll(sessions: Array<{
95
100
  sessionId: string;
96
101
  headSeq: number;
@@ -147,4 +152,5 @@ export declare class Streams {
147
152
  /** Replay the session from what was delivered, page by page, until its held frames drain. */
148
153
  private heal;
149
154
  }
155
+ export {};
150
156
  //# sourceMappingURL=streams.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"streams.d.ts","sourceRoot":"","sources":["../../../src/client/streams.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC7B,KAAK,qBAAqB,EAE1B,KAAK,aAAa,EAIlB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAExC;;;GAGG;AACH,qBAAa,aAAc,SAAQ,KAAK;IACvC,SAAkB,IAAI,mBAAmB;CACzC;AAED,oFAAoF;AACpF,MAAM,WAAW,eAAe;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,sGAAsG;IACtG,MAAM,EACH,SAAS,GACT,eAAe,GACf,iBAAiB,GACjB,kBAAkB,GAClB,WAAW,GACX,sBAAsB,CAAC;IAC1B,KAAK,EAAE,aAAa,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,MAAM,MAAM,GAAG,OAAO,GAAG;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,KAAK,CAAC;AA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
  * kept events after `headSeq` and the live frames that arrived after the
31
31
  * `position`-th frame the client received.
32
32
  */
33
- export interface JoinPoint {
33
+ interface JoinPoint {
34
34
  headSeq: number;
35
35
  position: number;
36
36
  }
@@ -1 +1 @@
1
- {"version":3,"file":"turns.d.ts","sourceRoot":"","sources":["../../../src/client/turns.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,UAAU,EACf,UAAU,EACV,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,EAC7B,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,YAAY,EAGjB,MAAM,sBAAsB,CAAC;AAE9B,6FAA6F;AAC7F,MAAM,MAAM,SAAS,GAAG,qBAAqB,GAAG,YAAY,CAAC;AAE7D;;;;;;;GAOG;AACH,MAAM,WAAW,UAAU;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,qBAAqB,CAAC,SAAS,CAAC,CAAC;IACzC,MAAM,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;IAChC;;;;;;OAMG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,gFAAgF;IAChF,KAAK,CAAC,KAAK,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;CACrE;AAED;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CACjB;AAED,+EAA+E;AAC/E,cAAM,MAAM;IAYV,QAAQ,CAAC,SAAS,EAAE,MAAM;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM;IACvB,0EAA0E;IAC1E,QAAQ,CAAC,GAAG,EAAE,OAAO;IACrB,OAAO,CAAC,QAAQ,CAAC,OAAO;IAfzB,QAAQ,CAAC,KAAK,wBAA+B;IAC7C,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,cAAc,CAAC,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15
15
  clientVersion?: string;
16
+ /**
17
+ * Idle time before a session's agent is ended (5 minutes by default); 0
18
+ * never ends one for idleness. An agent that can neither resume nor load
19
+ * is never ended for idleness.
20
+ */
16
21
  idleTimeoutMs?: number;
17
- /** Grace period for a `session/cancel` to resolve the in-flight prompt. */
22
+ /**
23
+ * How long a cancel waits for the agent's prompt to end before it answers
24
+ * `confirmed: false` (`CANCEL_CONFIRM_MS`, 2 s, by default).
25
+ */
26
+ cancelConfirmMs?: number;
27
+ /**
28
+ * How long after a cancel an agent whose prompt has not ended is ended
29
+ * (10 s by default); its turn then ends `cancelled`.
30
+ */
18
31
  cancelGraceMs?: number;
19
32
  /** Injectable client factory for deterministic tests. */
20
33
  createClient?: (options: AcpClientOptions) => Promise<AcpClient>;
@@ -48,21 +61,41 @@ export declare class AcpAgent extends SessionAgent {
48
61
  rejectionMessages: boolean;
49
62
  turnScopedSubagents?: boolean | undefined;
50
63
  steering?: boolean | undefined;
64
+ ignoredSettings?: string[] | undefined;
51
65
  };
52
66
  /** Its CLIs start here: the runtime's, or this OS process's own when it was made without one. */
53
67
  readonly processes: NativeProcesses;
54
68
  private readonly sessions;
55
69
  constructor(agentOptions: AcpAgentOptions);
56
70
  private resolveSession;
71
+ /**
72
+ * Start the session's agent and open its conversation: the one the turn
73
+ * names by `session/resume` or `session/load`, else a new one. The pool
74
+ * starts it once every agent of the session before it has exited, so a
75
+ * successor never loads a conversation another agent still has.
76
+ */
77
+ private spawn;
57
78
  /**
58
79
  * Select the requested model and thinking level through the agent's config
59
80
  * options. An agent without the option keeps its own default. A model the
60
81
  * agent does not offer fails the turn; thinking levels are a normalized
61
82
  * vocabulary an agent may not share, so an unmatched level is left alone.
83
+ * Returns the settings it left alone.
62
84
  */
63
85
  private applyConfig;
86
+ /**
87
+ * Put the agent in the turn's permission mode (`default` when it names
88
+ * none) through `session/set_mode`, by the agent's own id for it. Returns
89
+ * whether the mode holds: false for one the agent offers none of, which
90
+ * leaves the agent in its own. An agent that offers no modes runs as it
91
+ * does, the engine answering what it asks by the mode (`autoDecide`); it
92
+ * has no plan of its own to make, so `plan` does not hold there.
93
+ */
94
+ private applyMode;
64
95
  protected executeTurn(input: AgentInput, options: AgentExecuteOptions, controller: AbortController): AsyncIterableIterator<RawAgentEvent>;
65
96
  release(sessionId: string): Promise<void>;
97
+ /** After a host resume, each session's next turn starts its agent again, on its conversation. */
98
+ invalidateMcpConnections(): void;
66
99
  terminateAll(): Promise<void>;
67
100
  }
68
101
  //# sourceMappingURL=acp-agent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"acp-agent.d.ts","sourceRoot":"","sources":["../../../../../src/core/agents/acp/acp-agent.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAqB,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAEhF,OAAO,EAAE,KAAK,eAAe,EAAyB,MAAM,qCAAqC,CAAC;AAGlG,OAAO,KAAK,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAGrE,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGnD,OAAO,EAAE,SAAS,EAAE,KAAK,gBAAgB,EAAE,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AA+D/E,MAAM,WAAW,eAAe;IAC/B;;;OAGG;IACH,aAAa,EAAE,MAAM,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC,GAAG,SAAS,GAAG,SAAS,CAAC;IAC5E,8CAA8C;IAC9C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iDAAiD;IACjD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,2EAA2E;IAC3E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,yDAAyD;IACzD,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,OAAO,CAAC,SAAS,CAAC,CAAC;IACjE;;;OAGG;IACH,SAAS,CAAC,EAAE,eAAe,CAAC;C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,gBAAgB,CAEjF"}
@@ -11,11 +11,11 @@ export interface AcpLaunch {
11
11
  /** Extra env layered onto the subprocess (over process.env). */
12
12
  env?: Record<string, string>;
13
13
  }
14
- export type SessionUpdateHandler = (notification: SessionNotification) => void;
14
+ type SessionUpdateHandler = (notification: SessionNotification) => void;
15
15
  /** Answers agent→client `session/request_permission`. Absent handler → cancelled. */
16
- export type AcpPermissionHandler = (request: RequestPermissionRequest) => Promise<RequestPermissionResponse>;
16
+ type AcpPermissionHandler = (request: RequestPermissionRequest) => Promise<RequestPermissionResponse>;
17
17
  /** Answers agent→client `elicitation/create`. Absent handler → declined. */
18
- export type AcpElicitationHandler = (request: CreateElicitationRequest) => Promise<CreateElicitationResponse>;
18
+ type AcpElicitationHandler = (request: CreateElicitationRequest) => Promise<CreateElicitationResponse>;
19
19
  export interface AcpClientOptions {
20
20
  launch: AcpLaunch;
21
21
  cwd: string;
@@ -48,6 +48,8 @@ export declare class AcpClient {
48
48
  private permissionHandler?;
49
49
  private elicitationHandler?;
50
50
  private exited;
51
+ /** The stop of its process, once one began: what `gone` waits for. */
52
+ private leaving?;
51
53
  /** Why the agent stopped, once it has: its exit code and stderr tail. */
52
54
  private exitError?;
53
55
  private connectionEnded;
@@ -76,6 +78,12 @@ export declare class AcpClient {
76
78
  private send;
77
79
  /** Send a notification to the agent (`session/cancel`). */
78
80
  notify<M extends AgentNotificationMethod>(method: M, params: AgentNotificationParamsByMethod[M]): Promise<void>;
81
+ /**
82
+ * Settles once its process has exited after a close or its own exit, its
83
+ * tree stopped (bounded by the stop's grace and SIGKILL, LLP 0007); at
84
+ * once when no process was started or none is stopping.
85
+ */
86
+ gone(): Promise<void>;
79
87
  close(): void;
80
88
  /**
81
89
  * SIGTERM the agent's group and the tool sessions under it, and SIGKILL
@@ -87,4 +95,5 @@ export declare class AcpClient {
87
95
  private onExit;
88
96
  private notifyClosed;
89
97
  }
98
+ export {};
90
99
  //# sourceMappingURL=client.d.ts.map
@@ -1 +1 @@
1
- {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AM,EAAE,+BAA+B,CAAC,CAAC,CAAC,GACxC,OAAO,CAAC,IAAI,CAAC;IAKhB;;;;OAIG;IACH,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAIrB,KAAK,IAAI,IAAI;IAWb;;;;OAIG;IACH,OAAO,CAAC,IAAI;YAKE,KAAK;IA0DnB,OAAO,CAAC,MAAM;IAWd,OAAO,CAAC,YAAY;CAIpB"}
@@ -1,5 +1,5 @@
1
- import type { ContentBlock, McpServer, PermissionOption, RequestPermissionRequest, RequestPermissionResponse, ToolCallLocation } from "@agentclientprotocol/sdk";
2
- import type { AgentInput, McpServerConfig, PermissionMode, PermissionToolCall, ToolKind, ToolLocation } from "../../../protocol/index.ts";
1
+ import type { ContentBlock, McpServer, PermissionOption, RequestPermissionRequest, RequestPermissionResponse, ToolCallContent, ToolCallLocation } from "@agentclientprotocol/sdk";
2
+ import type { AgentInput, McpServerConfig, PermissionMode, PermissionToolCall, ToolKind, ToolLocation, ToolResultContent } from "../../../protocol/index.ts";
3
3
  /**
4
4
  * The single bridge between ACP's vocabulary and the engine's. Everything here
5
5
  * is a pure conversion shared by the agent (outbound requests, permission
@@ -11,6 +11,12 @@ import type { AgentInput, McpServerConfig, PermissionMode, PermissionToolCall, T
11
11
  export declare function toolKindOf(kind: string | null | undefined): ToolKind | undefined;
12
12
  /** ACP `ToolCallLocation[]` → engine `ToolLocation[]` (drop null lines, empty → absent). */
13
13
  export declare function toToolLocations(locations: ToolCallLocation[] | null | undefined): ToolLocation[] | undefined;
14
+ /**
15
+ * The display content of an ACP tool call: its `diff` entries (a creation's
16
+ * null `oldText` left out) and its `terminal`s, as the agent sent them. Text
17
+ * is the call's `output`, so it is not repeated here.
18
+ */
19
+ export declare function toToolResultContent(content: ToolCallContent[] | null | undefined): ToolResultContent[];
14
20
  /** Engine MCP config map → ACP `McpServer[]` (names come from the record keys). */
15
21
  export declare function toAcpMcpServers(mcpServers: Record<string, McpServerConfig> | undefined): McpServer[];
16
22
  /** What an ACP agent's `initialize` says its prompts accept beyond text and links. */
@@ -1 +1 @@
1
- {"version":3,"file":"mappings.d.ts","sourceRoot":"","sources":["../../../../../src/core/agents/acp/mappings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,YAAY,EACZ,SAAS,EACT,gBAAgB,EAChB,wBAAwB,EACxB,yBAAyB,EACzB,gBAAgB,EAChB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EACX,UAAU,EACV,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,QAAQ,EACR,YAAY,EACZ,MAAM,4BAA4B,CAAC;AAUpC;;;;;;GAMG;AAGH,gFAAgF;AAChF,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAEhF;AAED,4FAA4F;AAC5F,wBAAgB,eAAe,CAC9B,SAAS,EAAE,gBAAgB,EAAE,GAAG,IAAI,GAAG,SAAS,GAC9C,YAAY,EAAE,GAAG,SAAS,CAG5B;AAED,mFAAmF;AACnF,wBAAgB,eAAe,CAC9B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,GAAG,SAAS,GACrD,SAAS,EAAE,CAkBb;AAED,sFAAsF;AACtF,MAAM,WAAW,qBAAqB;IACrC,KAAK,EAAE,OAAO,CAAC;IACf,eAAe,EAAE,OAAO,CAAC;CACzB;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,qBAAqB,GAAG,YAAY,EAAE,CA+B/F;AAED,0FAA0F;AAC1F,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,wBAAwB,GAAG,kBAAkB,CAYxF;AAED,eAAO,MAAM,iBAAiB,EAAE,yBAE/B,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC5B,OAAO,EAAE,gBAAgB,EAAE,EAC3B,KAAK,EAAE,OAAO,GACZ,yBAAyB,CAO3B;AAED;;;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E,MAAM,EAAE,qBAAqB,GAAG,YAAY,EAAE,CA+B/F;AAED,0FAA0F;AAC1F,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,wBAAwB,GAAG,kBAAkB,CAaxF;AAED,eAAO,MAAM,iBAAiB,EAAE,yBAE/B,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC5B,OAAO,EAAE,gBAAgB,EAAE,EAC3B,KAAK,EAAE,OAAO,GACZ,yBAAyB,CAO3B;AAED;;;GAGG;AACH,wBAAgB,UAAU,CACzB,OAAO,EAAE,wBAAwB,EACjC,IAAI,EAAE,cAAc,GAAG,SAAS,GAC9B,yBAAyB,CAM3B;AAED,yFAAyF;AACzF,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS,CAY3E"}
@@ -120,6 +120,12 @@ export interface AppliedExecution {
120
120
  thinkingLevel?: ThinkingLevel;
121
121
  /** A model the harness reported for this turn (joins `reportedModels`). */
122
122
  model?: string;
123
+ /**
124
+ * Settings this turn set that the harness found, as it ran, it could not
125
+ * apply (`execution.notApplied`); those it never applies are its
126
+ * `capabilities.ignoredSettings`, which the engine adds itself.
127
+ */
128
+ notApplied?: Array<keyof RunConfig>;
123
129
  }
124
130
  /** Whose models to list: the same login and folder a turn would use. */
125
131
  export interface ListModelsOptions {
@@ -132,6 +138,12 @@ export interface ListModelsOptions {
132
138
  }
133
139
  /** Raw, harness-specific event. Adapters interpret it; the engine never does. */
134
140
  export type RawAgentEvent = unknown;
141
+ /**
142
+ * How long a cancel waits for the harness to show its turn stopped before it
143
+ * answers `confirmed: false`, unless `cancelConfirmMs` says otherwise. One
144
+ * value for every built-in harness.
145
+ */
146
+ export declare const CANCEL_CONFIRM_MS = 2000;
135
147
  /**
136
148
  * What `cancel` reports back. `confirmed: true` = the cancelled state holds —
137
149
  * either nothing was running (`hadTurn: false`, a clean no-op ack) or the
@@ -190,16 +202,18 @@ export interface Agent {
190
202
  /** Its CLI's own login: what it is, signing in through the CLI's flows, signing out. */
191
203
  readonly login?: CliLogin;
192
204
  /**
193
- * The CLI's login changed: each session's next turn starts a new process,
194
- * which resumes its conversation, since a running CLI keeps the
195
- * credentials it started with.
205
+ * The CLI's login changed in `store` (its login's `store`), or in every
206
+ * store when none is named: each of that store's sessions starts its next
207
+ * turn on a new process, which resumes its conversation, since a running
208
+ * CLI keeps the credentials it started with.
196
209
  */
197
- loginChanged?(): void;
210
+ loginChanged?(store?: string): void;
198
211
  /**
199
- * Where this agent starts its native processes, when it starts them through
200
- * a `NativeProcesses`: the runtime whose registry holds the same one can
201
- * vouch for its sessions after a restart (`AgentRuntime.recordedHarnesses`).
202
- * An agent without it has its sessions fenced whenever a restart cuts one off.
212
+ * The `NativeProcesses` through which this agent starts every native
213
+ * process it starts, or, for an agent that starts none, the one it names
214
+ * to say so: the runtime whose registry holds the same one can vouch for
215
+ * its sessions after a restart (`AgentRuntime.recordedHarnesses`). An
216
+ * agent without it has its sessions fenced whenever a restart cuts one off.
203
217
  */
204
218
  readonly processes?: NativeProcesses;
205
219
  /** Tear down every live session (process shutdown). Built-ins reject subsequent turns. */
@@ -1 +1 @@
1
- {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../src/core/agents/base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,iBAAiB,EACjB,YAAY,EACZ,UAAU,EACV,kBAAkB,EAClB,yBAAyB,EACzB,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,SAAS,EACT,aAAa,EACb,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAExE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAC3B,CAAC;IACD,QAAQ,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,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QAAQ,CAAC,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAC;IACxC,QAAQ,CAAC,QAAQ,CAAC,YAAY,EAAE,iBAAiB,CAAC;IAElD;;;;;OAKG;IACH,SAAS,CAAC,QAAQ,CAAC,QAAQ,oCAA2C;IACtE,OAAO,CAAC,QAAQ,CAAC,WAAW,CAA8C;IAE1E,QAAQ,CAAC,OAAO,CACf,KAAK,EAAE,UAAU,EACjB,OAAO,EAAE,mBAAmB,GAC1B,qBAAqB,CAAC,aAAa,CAAC;IAEjC,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAWhD,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAKzC,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;IAOnC,mGAAmG;IACnG,SAAS,CAAC,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,WAAW,GAAG,eAAe;IAe/E,SAAS,CAAC,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,eAAe,GAAG,IAAI;CASvE"}
@@ -21,6 +21,8 @@ export declare class ClaudeCodeTransformer implements EventTransformer<unknown>
21
21
  private settled?;
22
22
  private readonly usage;
23
23
  private readonly outcome;
24
+ /** The MCP servers the session knows, which name its MCP tools. */
25
+ private mcpServers;
24
26
  constructor(ctx: {
25
27
  sessionId: string;
26
28
  });
@@ -48,6 +50,11 @@ export declare class ClaudeCodeTransformer implements EventTransformer<unknown>
48
50
  */
49
51
  private completeToolInputs;
50
52
  private closeBlock;
53
+ /**
54
+ * Tool results complete their parts. The message's `tool_use_result` is the
55
+ * structured result of its one tool result: the CLI sends each in a
56
+ * message of its own, so a message with several has none that is theirs.
57
+ */
51
58
  private handleToolResults;
52
59
  /** A query's result: the session's word on what it spent came just before. */
53
60
  private captureResult;
@@ -1 +1 @@
1
- {"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../../src/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C,GAAG,EAAE;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,GAAG,gBAAgB,CAExF"}
@@ -2,7 +2,7 @@ import type { CanUseTool, OnElicitation } from "@anthropic-ai/claude-agent-sdk";
2
2
  import { type ClaudeToolPolicy } from "./options.ts";
3
3
  import type { ClaudeTurn } from "./turn.ts";
4
4
  /** What a request needs of the turn it is asked in. */
5
- export type ClaudeTurnRequests = Pick<ClaudeTurn, "permissions" | "elicitation" | "cancelByRequest">;
5
+ type ClaudeTurnRequests = Pick<ClaudeTurn, "permissions" | "elicitation" | "cancelByRequest">;
6
6
  /**
7
7
  * Start a session's query. Under `bypassPermissions` the SDK warns that
8
8
  * `canUseTool` is never asked, but Claude still asks it about what needs a
@@ -27,6 +27,8 @@ export declare function createCanUseTool(deps: {
27
27
  policy?: ClaudeToolPolicy;
28
28
  /** The turn running now; null between turns. */
29
29
  turn: () => ClaudeTurnRequests | null;
30
+ /** The MCP servers the session knows, which name its MCP tools. */
31
+ mcpServers?: () => readonly string[];
30
32
  }): CanUseTool;
31
33
  /**
32
34
  * MCP elicitation from Claude's servers (a form, or a URL to visit), asked
@@ -34,4 +36,5 @@ export declare function createCanUseTool(deps: {
34
36
  * answer.
35
37
  */
36
38
  export declare function createOnElicitation(turn: () => ClaudeTurnRequests | null): OnElicitation;
39
+ export {};
37
40
  //# sourceMappingURL=approvals.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"approvals.d.ts","sourceRoot":"","sources":["../../../../../src/core/agents/claude-code/approvals.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,UAAU,EACV,aAAa,EAGb,MAAM,gCAAgC,CAAC;AAWxC,OAAO,EAAE,KAAK,gBAAgB,EAA8C,MAAM,cAAc,CAAC;AAEjG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE5C,uDAAuD;AACvD,MAAM,MAAM,kBAAkB,GAAG,IAAI,CACpC,UAAU,EACV,aAAa,GAAG,aAAa,GAAG,i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