@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
package/docs/harnesses.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Harness support matrix
2
2
 
3
- Three harnesses, one event stream. The lifecycle event *structure* is identical
3
+ Four harnesses, one event stream. The lifecycle event *structure* is identical
4
4
  across harnesses (one generic `EventProcessor` drives it); payloads and config
5
5
  support differ only where the backends genuinely do.
6
6
 
@@ -9,6 +9,7 @@ support differ only where the backends genuinely do.
9
9
  | `claude-code` | `@anthropic-ai/claude-agent-sdk` (claude CLI) | token-level | yes (`resume`) | `in_session` (`setModel`) |
10
10
  | `codex-app-server` | `codex app-server` (JSON-RPC subprocess) | token-level | yes (`thread/resume`) | `in_session` (per-turn) |
11
11
  | `acp` | any ACP v1 agent via `@agentclientprotocol/sdk` | per-agent | yes (`session/resume`, else `session/load`) | when the agent offers a `model` config option (so the capability says `unsupported`) |
12
+ | `scripted` | a script the operator gives, no process ([below](#the-scripted-harness)) | a word at a time (`stream` steps) | any id (nothing to lose) | `unsupported`: it runs no model |
12
13
 
13
14
  The `acp` harness is opt-in (an operator-supplied launch command, never
14
15
  wire-sourced): well-known agents run by name (`--harness=pi`,
@@ -26,6 +27,11 @@ offers it (checked against SDK 1.7.0 with `claude-agent-acp` and `codex-acp`):
26
27
  `thought_level` config options (`session/set_config_option`). An agent
27
28
  without the option keeps its default. A model the agent does not list fails
28
29
  the turn as `invalid_request`; an unlisted thinking level is left alone.
30
+ - **Permission mode:** an agent that offers modes is put in the turn's
31
+ (`default` when it names none) with `session/set_mode`, by the agent's own
32
+ id (`acceptEdits`, `bypassPermissions` and the like are read as the
33
+ engine's); one it offers none of is reported not applied. The engine also
34
+ answers the agent's permission requests by the mode.
29
35
  - **Extra directories:** `additionalDirectories` is sent to agents that
30
36
  advertise the capability and ignored otherwise.
31
37
  - **Token usage:** read from the prompt response when the agent sends it. The
@@ -36,6 +42,9 @@ offers it (checked against SDK 1.7.0 with `claude-agent-acp` and `codex-acp`):
36
42
  those words never decide the category. A child it left running cannot hold
37
43
  the turn open, and an agent that ignores SIGTERM is killed after three
38
44
  seconds.
45
+ - **Its own name:** `initialize` names the client `agent-server`, with the
46
+ stock program's release as its version; embedded, `acp.clientName` and
47
+ `acp.clientVersion` say them (else `agent-server` and `0.0.0`).
39
48
  - **`pi`** runs a pinned `pi-acp@0.0.34` through `npx`, not whatever version
40
49
  npm published last; bump the pin after checking a new release.
41
50
 
@@ -54,12 +63,12 @@ warm multi-turn reuse, a unified `ThinkingLevel`, and normalized token usage.
54
63
  | `systemPromptAppend` | ✅ | ✅ (`developerInstructions`) |
55
64
  | `additionalDirectories` | ✅ | ✅ (writable roots of the workspace-write sandbox; a change starts a new process) |
56
65
  | `maxTurns` | ✅ | ❌ |
57
- | `mcpServers` | ✅ | ✅ (stdio / Streamable HTTP; isolated `CODEX_HOME`) |
58
- | `apiKey` / `env` | ✅ | ✅ (the key logs in that session's process, in memory only; a credential the product holds wins) |
66
+ | `mcpServers` | ✅ | ✅ (stdio / Streamable HTTP; in the thread's config, or written to the `CODEX_HOME` the turn names) |
67
+ | `apiKey` / `env` | ✅ | ✅ (the key logs in that session's process, in memory only; a credential the product holds wins; under `userLogin` it wins over the user's own login) |
59
68
  | `disableTools` | ✅ | ❌ refused as `invalid_request`: Codex gives the model its tools however it is configured (use `plan` or `default`) |
60
69
  | permission requests (capability `permissionRequests`) | ✅ (`canUseTool`) | ✅ (`on-request` approvals in `default`, `accept_edits` and `plan`, MCP tool consent included; a plan turn's edits are declined) |
61
70
  | the words said with a refusal (capability `rejectionMessages`) | ✅ the denial tells Claude what the user said | ❌ a bare verdict (a plan's answer carries them) |
62
- | `elicitation` (questions, MCP input) | `AskUserQuestion`; MCP `onElicitation` (form, url) | `request_user_input` (plan mode); MCP elicitation (form, url) |
71
+ | `elicitation` (questions, MCP input) | `AskUserQuestion`; MCP `onElicitation` (form, url) | `request_user_input` in every mode (each thread starts with Codex's `default_mode_request_user_input`; declined in a turn that does not opt in); MCP elicitation (form, url) |
63
72
  | steering (`turn/steer`) | ✅ uuid-stamped messages, read where Claude replays them; a late steer runs as one more query in the turn | ✅ `turn/steer`, read where Codex starts its user message |
64
73
  | image / file input (capabilities `images`, `files`) | images (data or http(s) URL), PDFs, text files (`files: text, pdf`) | images (data or local path), text files inline (`files: text`), local files as mentions |
65
74
  | `includeRaw` | ✅ | ✅ |
@@ -96,9 +105,11 @@ engine (`permission.requested`) only in `default`, `accept_edits` and
96
105
  boundary is its sandbox, so a command that writes in the folder
97
106
  (`printf > e1.txt`) or in `/tmp` runs unasked too.
98
107
 
99
- A Codex approval shows what it approves: a command's `rawInput` is its
100
- `command` and `cwd`, a file change's its `changes` (each `{path, kind, diff}`,
101
- with `locations`), and an MCP tool's its arguments, as Claude's are. A command
108
+ A Codex approval shows what it approves: a command's line is its `command`
109
+ (its `rawInput` is Codex's wrapped `command` and `cwd`), a file change's
110
+ hunks are its `locations` (its `rawInput` the `changes`, each `{path, kind,
111
+ diff}`), and an MCP tool's `rawInput` its arguments, as Claude's are. Why
112
+ Codex asks is `reason` ([below](#what-a-tool-call-says-per-harness)). A command
102
113
  or change the user declines fails, saying it was not approved (Codex
103
114
  completes it as `declined`).
104
115
 
@@ -106,7 +117,8 @@ A cancelled Codex turn stops the commands it started before it ends. Codex
106
117
  0.160 ends a turn on `turn/interrupt` but keeps a running command alive as a
107
118
  background terminal, so the engine terminates the terminals the turn started
108
119
  (not those it only polled or wrote to) and checks that they are gone,
109
- reading Codex's list again for a while, since a terminal can register late.
120
+ reading Codex's list again for `cancelGraceMs` (2 s by default), since a
121
+ terminal can register late.
110
122
  When Codex cannot stop one, the engine ends the app-server, whose shutdown
111
123
  stops every terminal, an earlier turn's too (the next turn resumes the
112
124
  thread). Otherwise terminals an earlier turn left running, such as a server
@@ -114,23 +126,52 @@ the agent started on purpose, keep running. A command whose stop could not be
114
126
  confirmed fails with its outcome unknown, and the cancel answers
115
127
  `unconfirmed`. A cancel that arrives after Codex's turn ended stops nothing.
116
128
 
129
+ A Codex MCP tool's image comes as `content` on its tool part (`{type:
130
+ "image", data, mimeType}` beside its text), with `[image <mimeType>]` where it
131
+ was in `output`, as a Claude tool result's does; no block's base64 is ever
132
+ text (`[<type> <mimeType>]` stands for it). A picture Codex makes itself is a
133
+ tool part too, `image_generation` (`kind: "other"`): the prompt Codex wrote as
134
+ `input.prompt` when it gives one, and the file Codex saved it to in
135
+ `metadata.savedPath`, never the picture's bytes. A code-mode `exec` cell is no item of Codex's, so
136
+ only the items it causes reach the stream (LLP 0001, D14).
137
+
117
138
  Codex per-turn MCP is supported through the engine and JSON-RPC API, and the
118
- repository CLI with an explicit `--codex-home`. The ACP server binding cannot
119
- provide isolated homes and rejects this combination at session admission.
120
- Below `inheritConfig: "all"` every Codex turn needs such a home, so the bin
121
- refuses `--acp --harness codex-app-server` with `--inherit-config project` or
122
- `none`.
139
+ repository CLI: in the user's own Codex home at `inheritConfig: "all"`, where
140
+ the servers ride the thread's config and nothing is written, or in a home of
141
+ the session's own (`config.env.CODEX_HOME`, the CLI's `--codex-home`), where
142
+ the engine writes them (LLP 0001, D21; see
143
+ [MCP configuration](consuming.md#configure-mcp-between-turns)). Behind the
144
+ ACP server binding, a client's stdio and HTTP servers take the first path;
145
+ an SSE server or one named `codex_apps` is refused at `session/new` or
146
+ `session/resume`, naming it.
147
+ Below `inheritConfig: "all"` every Codex turn needs a home of its session's
148
+ own, so the bin refuses `--acp --harness codex-app-server` with
149
+ `--inherit-config project` or `none`.
123
150
 
124
151
  The ACP server binding (`agent-server --acp`) records each session's native
125
152
  id under `$AGENT_SERVER_ACP_SESSION_DIR` (default
126
153
  `~/.local/state/agent-server/acp-sessions`), so a client's `session/resume`
127
- works after the agent process restarts. It reports per-turn usage on the prompt
128
- response and advertises HTTP/SSE MCP when fronting `claude-code`. It offers
154
+ works after the agent process restarts. A prompt's text and images reach
155
+ the turn, and a resource link (an editor's @-mention of a file) as a
156
+ Markdown link in its text; it advertises no audio or embedded context. It reports per-turn usage on the prompt
157
+ response and advertises the MCP transports the harness it fronts attaches
158
+ beside stdio: HTTP and SSE for `claude-code`, HTTP for `codex-app-server`
159
+ and `scripted`, none for `acp` (the agent behind decides). It offers
129
160
  session modes (`default`, `accept_edits`, `plan`, and the mode it was started
130
161
  in): the client picks one with `session/set_mode`, and when the agent switches
131
162
  (an approved plan) the session follows and the client hears
132
163
  `current_mode_update`. A client cannot pick a mode above the one the operator
133
- started it in.
164
+ started it in. Every turn runs on the harness's own default model and
165
+ thinking level (in front of Codex, the user's `~/.codex` default) unless the
166
+ operator names them: `--model <id>` and `--thinking <level>` hold for every
167
+ turn the binding runs, and no ACP client can change them (it is offered no
168
+ config options). A client that advertises form elicitation at `initialize`
169
+ is asked the agent's questions, as one ACP form with a required field per
170
+ question (ACP v1 has no question mode, and no masked field for a `secret`
171
+ one), and an MCP server's forms as they are; one that advertises URL
172
+ elicitation, an MCP server's URLs. A request in a mode the client did not
173
+ advertise is declined; for a client that advertises neither, the turn runs
174
+ without `elicitation`, so the agent is told no one can answer.
134
175
 
135
176
  What a Claude or Codex session loads by itself is the operator's
136
177
  `inheritConfig` (LLP 0001, D17; choosing one: [consuming.md](consuming.md#choose-what-a-turn-inherits)).
@@ -147,9 +188,16 @@ and the connectors stay off whatever either env says, and a `disableTools`
147
188
  turn runs at `none`. Claude's built-in plugins and skills and the host's
148
189
  managed policy load at every level, and `~/.claude.json` is read for the
149
190
  account (its MCP servers follow the user and local sources). A Codex session at `project` or `none`
150
- runs in the `CODEX_HOME` its turn names, of the session's own, and at `none`
151
- without the repository's `AGENTS.md`; the repository's skills and
152
- `~/.agents/skills` load at every level.
191
+ runs in the `CODEX_HOME` its turn names, of the session's own, with Codex's
192
+ apps (the ChatGPT account's connectors) off, its plugins off from the moment
193
+ its process starts (`-c features.plugins=false`: a fresh home otherwise clones
194
+ Codex's plugin catalogue, about 85 MB and 5,500 files, before any thread
195
+ opens), and at `none` without the repository's `AGENTS.md`. A session whose
196
+ home was removed or made again under its warm process starts a new one on its
197
+ next turn, which resumes the thread there or fails `resume_failed` as a cold
198
+ start would; the repository's skills and `~/.agents/skills` load
199
+ at every level. With `codexAppServer.userLogin` such a session runs on the
200
+ user's own Codex login ([below](#the-users-own-codex-login-in-a-sessions-home)).
153
201
 
154
202
  `thinkingLevel` runs from `off` to `ultra`. agent-server fits it to the
155
203
  model's levels when it knows them: a level above the model's top becomes that
@@ -166,11 +214,16 @@ cancelled before the model answered:
166
214
  - **claude-code** fits the level before starting Claude, because Claude Code
167
215
  lowers a level its model lacks without saying so (`xhigh` on Sonnet 4.6 runs
168
216
  `high`). With no known levels the level passes through and no applied level
169
- is reported. `off` is sent as is: some models do not let thinking be
170
- disabled. An operator `sdkOptions` that sets `effort` or `thinking` wins, and
171
- then no level is reported.
217
+ is reported. A model known to have no levels (`thinking.levels: []`, Haiku)
218
+ is started without one, as Claude Code runs it by default (Haiku then still
219
+ thinks), and no applied level is reported. `off` is sent as is, on Haiku
220
+ too, where it stops that default thinking: some models do not let thinking
221
+ be disabled. An operator `sdkOptions` that sets `effort` or `thinking` wins,
222
+ and then no level is reported.
172
223
  - **codex-app-server** reads what the thread's model accepts from its own
173
- `model/list`. With no level requested it reports the thread's effort (for
224
+ `model/list`. A model it lists with no efforts at all, or the engine knows
225
+ has no levels, is sent no effort, and no level is reported. With no level
226
+ requested it reports the thread's effort (for
174
227
  example from `~/.codex/config.toml`), and the thread's model in
175
228
  `reportedModels` when the stream names none. Codex runs the effort it is
176
229
  given, so that is the one reported.
@@ -190,6 +243,115 @@ cancelled before the model answered:
190
243
 
191
244
  `clampThinkingLevel` picks the nearest level when a picker switches models.
192
245
 
246
+ ## What each harness does with each turn setting
247
+
248
+ Read from the code. **Applied**: as `RunConfig` documents it. **Another
249
+ meaning**: it has an effect, a different one. **Ignored**: the turn runs
250
+ without it; the harness lists it in `capabilities.ignoredSettings`, and a turn
251
+ that sets it names it in `turn.started.execution.notApplied`. **Refused**: the
252
+ turn fails. **The agent's**: an ACP agent decides, by what it advertises.
253
+ **The engine**: applied by the engine, the same on every harness. A cell that
254
+ ends "(not applied: …)" is a case a harness finds as the turn runs, named in
255
+ `turn.ended.execution.notApplied`.
256
+
257
+ | Setting | claude-code | codex-app-server | acp | scripted |
258
+ | --- | --- | --- | --- | --- |
259
+ | `harness` | the engine | the engine | the engine | the engine |
260
+ | `model` | applied, switched live | applied (`turn/start`) | the agent's: set through its `model` config option; an agent without one keeps its own (not applied: `model`); a value it does not list is refused | ignored: `echo: "config"` says it |
261
+ | `thinkingLevel` | applied, fitted to the model's levels (a model with none: not applied: `thinkingLevel`) | applied as reasoning effort, fitted to the model; `off` is its lowest effort (a model with no reasoning control: not applied: `thinkingLevel`) | the agent's: set through its `thought_level` option when it lists the level (otherwise not applied: `thinkingLevel`) | ignored: `echo: "config"` says it |
262
+ | `cwd` | applied | applied | applied | another meaning: a change needs a resume (as on every harness), and `echo: "config"` says it |
263
+ | `additionalDirectories` | applied | another meaning: writable roots of the `accept_edits` sandbox, nothing in the other modes | the agent's: sent only to an agent that takes them (otherwise not applied: `additionalDirectories`) | ignored: `echo: "config"` says them |
264
+ | `systemPromptAppend` | applied, appended to Claude Code's system prompt | another meaning: a developer message (`developerInstructions`) | ignored: ACP v1 has no system prompt | ignored: `echo: "config"` says it |
265
+ | `maxTurns` | applied (unset is 100) | ignored | ignored | ignored |
266
+ | `subagentMode` | applied | another meaning: Codex's `multi_agent` on, an instruction to collect every sub-agent, a native cleanup at the end | refused | refused |
267
+ | `permissionMode` | applied (SDK modes) | another meaning: a sandbox and an approval policy (the table below) | applied where the agent offers a mode of that meaning (`session/set_mode`, by its own id; `default` when the turn names none), and the engine answers its requests by the mode; one it offers none of is not applied (`permissionMode`), nor `plan` on an agent with no modes | ignored: the script says which calls ask (`ask: true`); `echo: "config"` says it |
268
+ | `elicitation` | applied | applied | applied: the agent's form and URL requests (ACP v1 has no question tool) | applied: an `ask` step asks the person, else the agent is told no one can answer |
269
+ | `requestTimeoutMs` | the engine | the engine | the engine | the engine |
270
+ | `resumeSessionId` | applied | applied (`thread/resume`) | the agent's: `session/resume`, else `session/load`; refused for an agent with neither | applied: reported as the native id, resumed |
271
+ | `resumeSessionAt` | applied with a resume (without one: not applied: `resumeSessionAt`) | ignored | ignored | ignored |
272
+ | `mcpServers` | applied, switched live | applied; SSE and the name `codex_apps` refused | the agent's: every server is sent, whatever it advertises; `required` is not checked | applied: a `call` step calls an `http` one |
273
+ | `env` | applied | applied; `CODEX_HOME` is the session's home (below `all`, required) | applied | another meaning: a change needs a resume, and `echo: "config"` says its keys |
274
+ | `apiKey` | applied (`ANTHROPIC_API_KEY`) | applied (an in-memory login) | ignored: the agent's credentials are its launch command's | ignored: it runs on no credential |
275
+ | `disableTools` | applied (no tools, no MCP servers) | refused (`invalid_request`) | ignored: ACP v1 cannot ask for it | ignored: its tool calls are the script's |
276
+ | `includeRaw` | the engine | the engine | the engine | the engine |
277
+
278
+ `test/core/agents/ignored-settings.test.ts` holds this table's verdicts; a
279
+ new `RunConfig` field fails it until each harness's verdict is written there.
280
+ A setting an operator's own options replace (Claude's `sdkOptions`) is the
281
+ operator's, and not named as not applied.
282
+
283
+ ## What each permission mode does, per agent
284
+
285
+ Measured on 2026-11-15 on macOS, on Claude Code 2.1.288 (SDK 0.3.288, model
286
+ Haiku) and Codex 0.160.0, through the engine at `inheritConfig: "none"`. Each
287
+ call ran in a fresh session and folder, with every `permission.requested`
288
+ answered `allow_once`, and each call that asked ran again with the request
289
+ answered `reject_once`. Whether a call ran is read from the file on disk, the
290
+ test's own MCP server or the tool's output, never from the model's reply.
291
+ Codex's calls came from a scripted stand-in model that makes the calls
292
+ `gpt-6-luna` makes, and its web search came from the real model. The
293
+ `permission-modes` harness scenario checks every cell against the expected
294
+ tables in `apps/harness/src/scenarios/permission-modes.ts`, so a pin bump that
295
+ changes what a mode does fails it:
296
+
297
+ ```sh
298
+ bun run harness -- --harness=claude-code,codex-app-server --scenario=permission-modes
299
+ ```
300
+
301
+ On Claude it costs one small paid turn per cell on this computer's own Claude
302
+ login (64 turns). On Codex it is free; its 5 web-search turns are paid and run
303
+ only with `PERMISSION_MODES_PAID=1`.
304
+
305
+ In each cell, Claude's result comes first, then Codex's. **asks**: a
306
+ `permission.requested` arrives, and the call runs when allowed and does not
307
+ run when rejected. **runs**: nothing is asked and the call runs. **refused**:
308
+ nothing is asked and the call does not run.
309
+
310
+ | Call | `default` | `accept_edits` | `bypass_permissions` | `dont_ask` | `plan` |
311
+ | --- | --- | --- | --- | --- | --- |
312
+ | Read a file in the folder | runs / runs | runs / runs | runs / runs | runs / runs | runs / runs |
313
+ | Read a file in a sibling temp folder | asks / runs | asks / runs | runs / runs | refused / runs | asks / runs |
314
+ | Write a file in the folder (Claude's `Write`, Codex's `apply_patch`) | asks / asks | runs / runs | runs / runs | refused / refused | asks / refused |
315
+ | Write a file in the folder through the shell | asks / asks | runs / runs | runs / runs | refused / refused | asks / asks |
316
+ | `echo hi` | runs / runs | runs / runs | runs / runs | runs / runs | runs / runs |
317
+ | Write a file in a sibling temp folder | asks / asks | asks / runs | runs / runs | refused / refused | asks / refused |
318
+ | Write a file outside the folder and outside temp | not measured / asks | not measured / asks | not measured / runs | not measured / refused | not measured / refused |
319
+ | An MCP tool with no hints | asks / asks | asks / asks | runs / runs | refused / refused | asks / asks |
320
+ | An MCP tool marked `readOnlyHint` | asks / runs | asks / runs | runs / runs | refused / runs | asks / runs |
321
+ | Web (Claude's `WebFetch`\*, Codex's hosted web search) | asks / runs | asks / runs | not asked / runs | not asked / runs | asks / runs |
322
+
323
+ Claude reads with `Read` and runs commands with `Bash`. Codex runs both reads
324
+ and commands as shell commands (`cat`, `echo pm > file`). \*Claude's `WebFetch`
325
+ of a page on loopback switches to https and fails, so for it only whether it
326
+ asks is measured.
327
+
328
+ What differs, and so what a product should not assume of one agent from the
329
+ other:
330
+
331
+ - **`accept_edits` is not the same mode.** Claude runs a write in the folder
332
+ unasked, by `Write` or the shell, and still asks for a read or write outside
333
+ it, a temp folder included, and for every MCP tool. Codex runs unasked
334
+ whatever its workspace sandbox allows, a write to a sibling temp folder
335
+ included, and asks only beyond it and for an MCP tool without `readOnlyHint`.
336
+ - **Codex never asked before a read**, one in a sibling temp folder included,
337
+ in any mode. Claude asks before a read outside the folder in `default`,
338
+ `accept_edits` and `plan`, and refuses it in `dont_ask`.
339
+ - **`readOnlyHint` counts on Codex only.** Codex runs such an MCP tool unasked
340
+ in every mode. Claude asks for it as for any MCP tool, and refuses it in
341
+ `dont_ask`.
342
+ - **`plan` does not stop writes.** On Claude every write the model makes is
343
+ asked and runs when allowed. On Codex `apply_patch` is refused, but a shell
344
+ write the model retries with escalation is asked and runs when allowed.
345
+ - **`dont_ask` refuses different calls.** Claude runs only a read in the
346
+ folder and a command that writes nothing. Codex refuses writes and MCP tools
347
+ without `readOnlyHint`, and runs reads outside the folder, `readOnlyHint`
348
+ tools and web search.
349
+ - **Codex never asks before a web search**, in any mode.
350
+ - A Codex shell write asks only when the model retries it with escalation
351
+ after the sandbox refused it, as the stand-in does. In one paid run in
352
+ `default`, `gpt-6-luna` did not retry: no request came, and no tool part
353
+ reached the stream.
354
+
193
355
  ## Model lists
194
356
 
195
357
  `runtime.models({ harness, cwd })` (wire `models/list`, `client.listModels()`)
@@ -201,6 +363,7 @@ a turn with the same `cwd`, `env` and `apiKey` would use:
201
363
  | `claude-code` | `query().supportedModels()` on an idle CLI (no prompt, MCP servers or hooks), at the operator's `inheritConfig` | The folder's `availableModels` setting narrows the list. `default` is a model id: the account's default. Haiku lists no levels. Operator `sdkOptions` are not applied. |
202
364
  | `codex-app-server` | `model/list`, on the session's own process when `sessionId` has one | Lists what the login can run (a ChatGPT login gets no `gpt-5.5`). The default is the model `~/.codex/config.toml` selects, else Codex's own. With host-managed auth, pass the `sessionId` whose account to list. |
203
365
  | `acp` | none | The catalog (empty). ACP agents describe models as session config options. |
366
+ | `scripted` | the harness | One model, `scripted`, with no thinking levels. |
204
367
 
205
368
  Each `ModelDescriptor` has `id` (pass as `config.model`), `label`,
206
369
  `description`, `resolvedId` (what an alias runs), `isDefault`, `thinking`
@@ -214,12 +377,23 @@ the harness's lists; pass `refresh: true` after one it cannot see. Listing costs
214
377
  0.1 s for Codex once warm, a few seconds for the first read after the server
215
378
  starts. A CLI that cannot answer within 20 s (logged out, too old) gets the
216
379
  catalog with `source: "catalog"` and an `error`, or the last live list with the
217
- `error` when one was read; a failed read is retried after 30 seconds.
380
+ `error` when one was read; a failed read is retried after 30 seconds. A
381
+ list installs nothing: while the harness's CLI is not installed yet, being
382
+ installed or failed to install, the answer is the catalog with an `error`
383
+ saying so, cached by nothing, so the first list after the install is live
384
+ (LLP 0010).
218
385
 
219
386
  The catalog (`CATALOG_MODELS`) is what
220
387
  the pinned CLIs listed when the release was built (`bun run models:refresh`):
221
388
  Claude for the maintainer's login, Codex logged in and logged out (which adds
222
- the API-key models such as `gpt-5.5`). Keep the user's thinking choice per
389
+ the API-key models such as `gpt-5.5`). Claude's rows depend on the route:
390
+ on a login that reaches `api.anthropic.com` the CLI takes them from the list
391
+ Anthropic serves the account ("Opus 5.5"), which the catalog records. Where
392
+ it does not get that list (a product's held credentials, listed on the
393
+ placeholder key; `ANTHROPIC_BASE_URL` elsewhere; a cloud provider), it uses the
394
+ picker built into it ("Opus", "Sonnet", "Haiku", a `claude-fable-5-1[1m]` row, other
395
+ descriptions), so a picker shown from the catalog there renames its rows once
396
+ the CLI answers. Keep the user's thinking choice per
223
397
  model in your app; start from `thinking.default`, and use `clampThinkingLevel`
224
398
  only for a model the user has not set.
225
399
 
@@ -227,8 +401,10 @@ Consult `runtime.capabilities(harness)` before relying on a capability.
227
401
 
228
402
  ## Logins
229
403
 
230
- `auth/status` reads each harness's login from its CLI; `auth/login` runs the
231
- CLI's own flow (LLP 0011; the recipe is in
404
+ `auth/status` reads each harness's login from its CLI, and installs none: a
405
+ harness whose CLI is not installed yet is `unknown`, with no methods.
406
+ `auth/login` runs the CLI's own flow, installing it first (LLP 0011; the
407
+ recipe is in
232
408
  [consuming.md](consuming.md#show-each-harnesss-login-and-sign-it-in)).
233
409
 
234
410
  | Harness | Status from | Logins (`methods`) | Logout |
@@ -236,15 +412,39 @@ CLI's own flow (LLP 0011; the recipe is in
236
412
  | `claude-code` | `claude auth status --json`, with the turn's environment | `claudeai`, `console` (`browser`, with a `codeUrl` for another device; over the SDK's control requests, CLI 2.1.220 and later), `terminal` (`claude auth login`) | `claude auth logout` |
237
413
  | `codex-app-server` | `account/read` on an app-server of its own | `chatgpt` (`browser`, callback on `127.0.0.1:1455`, one per machine), `chatgpt_device_code`, `api_key`, `terminal` (`codex login`) | `account/logout` |
238
414
  | `acp` | — (`unknown`: the agent signs in on its own) | none | — |
415
+ | `scripted` | — (`signed_in`: it runs on nothing, so there is nothing to sign in to) | none | refused (`invalid_request`) |
239
416
 
240
417
  A login lands in the store a turn with the same `env` uses (`CLAUDE_CONFIG_DIR`,
241
418
  `CODEX_HOME`). Claude reports the credential a turn would run with, so a key in
242
419
  the environment shows as `source: "environment"` over any login. A login change
243
420
  starts each session's next turn on a new CLI. Codex logins below `inheritConfig:
244
- "all"` land in the `CODEX_HOME` the request's `env` names. The engine reads and
421
+ "all"` land in the `CODEX_HOME` the request's `env` names; under
422
+ `codexAppServer.userLogin` the turns in those homes run on the user's own
423
+ login, which a request with no `env` reads and signs in. The engine reads and
245
424
  runs the CLI it starts: a host that starts Claude its own way
246
425
  (`claudeCode.sdkOptions`, a spawner of its own) signs it in where it runs it.
247
426
 
427
+ ## The user's own Codex login in a session's home
428
+
429
+ `codexAppServer.userLogin: true` (`createAgentRuntime`; operator-level and
430
+ embed-tier only, never from the wire) runs a Codex turn
431
+ that names a `CODEX_HOME` of its session's own on the user's own Codex login,
432
+ the one of the engine's own home (`$CODEX_HOME`, else `~/.codex`) (LLP 0017).
433
+ Before each turn, and each model list for an `env` naming a home, the engine
434
+ starts an app-server there with its own environment and asks
435
+ `getAuthStatus {includeToken: true, refreshToken: false}`: a ChatGPT login
436
+ logs the session's process in with `chatgptAuthTokens` (account and plan from
437
+ the access token's claims), an API key as `apiKey`, both in that process's
438
+ memory; nothing is written to the session's home. A product's `credentials`
439
+ and the turn's `apiKey` come first. No login there, or one that cannot be
440
+ handed over, fails the turn `auth` (`credentialsReconnect`) before the
441
+ session's process starts. When Codex refuses the token, the login is read
442
+ again, and when it still holds the refused token Codex renews it in the
443
+ user's own home; another account is refused. Nothing is cached: a login the
444
+ user changes in a terminal is the next turn's, and another account starts a
445
+ new process that resumes the thread. A turn that names no home runs on its
446
+ home's own login as before.
447
+
248
448
  ## Host-managed Codex authentication
249
449
 
250
450
  An embedding host hands Codex a login of its own with `credentials`, the same
@@ -256,8 +456,9 @@ or none, which runs the turn as without it (its own `apiKey`, else the
256
456
  `CODEX_HOME`'s own login). Throw when the selected account is unavailable:
257
457
  the turn fails before Codex starts.
258
458
 
259
- Authentication and session storage are independent. Per-turn MCP still needs an
260
- isolated `CODEX_HOME` for writable configuration and conversation history, but
459
+ Authentication and session storage are independent. A session in a home of
460
+ its own (every one below `inheritConfig: "all"`, and one whose MCP servers
461
+ the engine writes) keeps its configuration and conversation history there, and
261
462
  a held credential lets the host authenticate that session without a separate
262
463
  native login or copying `auth.json` into each home. The engine keeps no token
263
464
  store: its logins (`auth/login`) are the CLI's own, stored in a home's own
@@ -282,6 +483,34 @@ credentials are added to `RunConfig` or the engine's public wire.
282
483
  The protocol was checked against Codex CLI 0.160.0 and the
283
484
  [official app-server authentication documentation](https://learn.chatgpt.com/docs/app-server#3c-log-in-with-externally-managed-chatgpt-tokens-chatgptauthtokens).
284
485
 
486
+ ## What a tool call says, per harness
487
+
488
+ What a product draws a terminal step, a fetch, a diff or a permission card
489
+ from, without reading a harness's own input keys (LLP 0002, A tool call says
490
+ what it acts on). A field a harness does not give is left out.
491
+
492
+ | Field | claude-code | codex-app-server | acp |
493
+ | --- | --- | --- | --- |
494
+ | `command` (part and request) | a `Bash` call's `input.command` | the line apart from the shell Codex wraps it in (`/bin/zsh -lc '…'`), unquoted; any other shape as Codex reports it. `input.command` stays wrapped | none: an agent's `title` is all ACP v1 gives |
495
+ | `url` | a `WebFetch` call's `input.url` | none: its network approval was not observed | none |
496
+ | `locations` | a file tool's path; once an `Edit` or a `Write` over a file is done, each hunk at its start line in the new file | a file change's hunks, each at its start line in the new file; a move's source and destination; an add's or a delete's path | the agent's own |
497
+ | `reason` (request) | the CLI's `decisionReason`, when it sends one ("Path is outside allowed working directories") | the approval's `reason`, the model's own justification. `title` is never it | none: ACP v1's request has no field for it |
498
+ | `diff` content | from the CLI's structured result: an `Edit`'s or an overwriting `Write`'s hunks; a created file's content as `newText`; a `NotebookEdit`'s cell, `old_source` to `new_source`. None on a failed edit | a hunk per entry for an update (at a move's destination, without its `Moved to:` trailer); an add's content as `newText`; a delete's as `oldText`, `newText` `""`. None on a failed or declined change | the agent's `diff` and `terminal` content, as it sent them, the latest update's winning |
499
+ | `metadata.exitCode` | on a failed `Bash` call only, from the `Exit code N` its result begins with: the CLI reports no code for a success, and counts some non-zero exits as one | Codex's `exitCode`, on a completed and a failed command alike | none |
500
+
501
+ Every tool the pinned Claude CLI offers has a decided `kind`. A Claude pin
502
+ bump runs `bun run test:live:free`: its `claude-tool-kinds` check starts the
503
+ pinned CLI for free and names each tool it offers that has none.
504
+
505
+ Behind `agent-server --acp`, a part's `diff` entries reach the client as ACP
506
+ `diff` content, after its output; a `terminal` is the agent's, so it is
507
+ not sent. A permission request carries the call's `name`, `kind`,
508
+ `locations` and `rawInput`; ACP v1's request has no field for its
509
+ `command`, `url`, `reason` or `mcp`.
510
+
511
+ A hunk's `oldText` is its context and removed lines, its `newText` its
512
+ context and added lines; a `` marker is dropped.
513
+
285
514
  ## Payload notes
286
515
 
287
516
  - A turn ends with a normalized `stopReason`
@@ -337,6 +566,143 @@ turn totals take precedence over intermediate message usage.
337
566
  cache accounting. An ACP/custom agent that exposes only this gauge cannot
338
567
  provide the cache breakdown without an additional native usage report.
339
568
 
569
+ ## The scripted harness
570
+
571
+ `scripted` plays a script instead of a model, so a product can test its whole
572
+ integration (its turns, its tool server, its permission and question
573
+ handling, resume, close) for nothing, and so the engine has one small,
574
+ complete example of a harness (`core/agents/scripted/`; LLP 0016, The
575
+ scripted harness). It has a name of its own: `initialize`, `session.created`
576
+ and every event say `scripted`, so a stream never passes a script off as a
577
+ real agent. It is registered only when the operator gives it a script, and
578
+ never otherwise: no default set holds it.
579
+
580
+ ```ts
581
+ import { createAgentRuntime, scriptedQueue } from "@zvada/agent-server/core";
582
+
583
+ const runtime = createAgentRuntime({
584
+ harnesses: ["scripted"],
585
+ scripted: { turn: scriptedQueue([{ say: "Hello." }, { end: true }]) },
586
+ });
587
+ ```
588
+
589
+ **Where a turn's steps come from: one function.**
590
+ `scripted: { turn: (request) => steps }` returns an iterable, or an async
591
+ iterable a test can release a step at a time, of `ScriptStep`s. `request`
592
+ holds the turn's `sessionId`, `turnId`, `input`, `config` (the turn's
593
+ `RunConfig`, as a harness gets it), `turnIndex` (how many turns the session
594
+ ran before, in this engine) and `signal`. A turn plays its steps until they
595
+ end or an `end` step.
596
+
597
+ A step's `yield` evaluates to what the step did (`ScriptStepOutcome`): the
598
+ agent passes it to the next `next()`, so a script written as a generator can
599
+ use an earlier answer, and an array, the helpers and a file ignore it.
600
+
601
+ ```ts
602
+ scripted: {
603
+ turn: async function* () {
604
+ const made = yield { call: { server: "notes", tool: "save_note", arguments: { text: "a" } } };
605
+ if (!made || !("output" in made)) throw new Error("the save failed");
606
+ const id = made.metadata?.structuredContent?.id;
607
+ yield { call: { server: "notes", tool: "update_note", arguments: { id } } };
608
+ yield { say: "Done." };
609
+ },
610
+ }
611
+ ```
612
+
613
+ A `tool` or `call` step that completed hands back `{ output, content?,
614
+ metadata? }`, what its part completed with (a call's `structuredContent` under
615
+ `metadata`); one that failed `{ error, metadata? }`, with `rejected: true`
616
+ when the person denied it; an `ask` step `{ answer }`, the elicitation outcome, and
617
+ `undefined` when the turn's client answers no questions; every other step
618
+ `undefined`. A permission request answered as a cancel ends the turn, so
619
+ nothing is handed back.
620
+
621
+ Built on it, all from `./core`:
622
+
623
+ | Helper | What it plays |
624
+ | --- | --- |
625
+ | `scriptedQueue(steps)` | One queue for the runtime, turn by turn whatever the session, one turn at a time: `end` closes a turn, and the next plays on from the step after it. A turn that stops before its `end` (a `fail`, a cancel) skips through that `end`. A turn that finds the queue empty fails, saying the script ran out; one that starts while another plays the queue fails, saying sessions that run at once need `scriptedBySession`. |
626
+ | `scriptedFile(path, { position? })` | The same, from a JSONL file, one step per line; a bad line is refused when the file is read, by its number. It plays from its start each time an engine reads it, and writes nothing. With `position`, how far it has played is kept in that file, so an engine restarted mid-script goes on where the last stopped (stopped inside a turn, from the next turn); a changed file plays from its start, and a queue that runs out says where its position is kept. |
627
+ | `scriptedBySession(scripts, otherwise?)` | A queue per session id; any other session plays `otherwise` from its start, or fails without one. |
628
+
629
+ **The steps** are plain JSON (the type `ScriptStep`). Each is strict: a step or a field the schema does not know is
630
+ refused when the script is read, never skipped.
631
+
632
+ | Step | What it does |
633
+ | --- | --- |
634
+ | `{ say: string }` | A complete text part. |
635
+ | `{ stream: string, every?: ms }` | A text part streamed a word at a time, `every` ms apart, then its snapshot. |
636
+ | `{ tool, input?, kind?, mcp?, command?, url?, locations?, reason?, output?, error?, content?, metadata?, ask? }` | A tool call the script answers: the part opens in progress and completes with `output`, or fails with `error`. `command`, `url` and `locations` are on the part and on its request; `reason` on the request only, so it is refused without `ask`. `metadata` (a command's `exitCode`) is kept completed or failed; `content` (a `diff`) only on a completed call, as a failed one shows nothing ([What a tool call says](#what-a-tool-call-says-per-harness)). With `ask: true` the engine's permission broker is asked first, with the same call: a rejection fails the part (`The user rejected this tool call.`, then the user's words) and the turn goes on; an approval that edits the input runs the edit; a request answered as a cancel (or one that expires) ends the turn `cancelled`, the part closed `cancelled`. |
637
+ | `{ call: { server, tool, arguments? }, ask? }` | A real call to the turn's own `mcpServers[server]` (`http` only), with the official MCP SDK (`@modelcontextprotocol/sdk`, an optional peer, loaded at the first call). Its text goes into `output`, an image into `content`, the server's `structuredContent` into `metadata.structuredContent`, and `mcp` names the server and tool. A server the turn lacks, one not over `http`, or a missing SDK fails the turn; a call the server fails fails the part. Each call runs on a connection of its own, so a server that keeps state per MCP session sees a new session each call. `ask` as for `tool`; a cancelled request calls nothing. |
638
+ | `{ ask: Question[] }` | Questions to the person (`elicitation.requested`, the protocol's `ElicitationQuestion`); the outcome is said back as a text part of JSON. A turn whose client answers no questions is told so in the words Claude and Codex are told, and goes on. |
639
+ | `{ echo: "input" }` | Says the turn's input as a model reads it (`inputToText`). |
640
+ | `{ echo: "config" }` | Says the turn's config as JSON: `model`, `thinkingLevel`, `cwd`, `additionalDirectories`, `systemPromptAppend`, `permissionMode`, the names of its MCP servers and the keys of its `env`, never their values. |
641
+ | `{ wait: ms }` | A pause; a cancel ends it. |
642
+ | `{ hang: true, stopTakes?: ms }` | Runs until the turn is cancelled; `stopTakes` ms more before it stops, as a harness slow to stop. The cancel is confirmed at once. |
643
+ | `{ fail: string, category? }` | Ends the turn in an error: of `category` when given, else what the engine's classifier makes of the text. |
644
+ | `{ end: true, stopReason?, usage?, cost? }` | Ends the turn: `end_turn` and zero usage by default. |
645
+
646
+ **The stock program** plays a script too, for a product in any language or
647
+ one that spawns it: `agent-server --script turns.jsonl` registers the
648
+ scripted harness with `scriptedFile`, as its only harness unless `--harness`
649
+ names others beside `scripted`. One queue serves every session, one turn at
650
+ a time, from its start each time the program starts; `--script-position
651
+ <file>` keeps its position in that file across restarts. `--script` with a
652
+ `--harness` that does not name `scripted`, `--harness scripted` without
653
+ `--script`, `--script-position` without `--script`, and a script that cannot
654
+ be read (`--script: <why>`) are refused at start, in one line.
655
+
656
+ **As a harness.** Its native session id is `scripted-<sessionId>`, or the
657
+ turn's `resumeSessionId`, reported as resumed; any id resumes, since a script
658
+ keeps no conversation. It declares multi-turn, resume, MCP servers and
659
+ permission requests, and no steering, sub-agents or thinking levels; the
660
+ settings it never applies are its `ignoredSettings` (the table above).
661
+ `models/list` answers one model, `scripted`; `auth/status` answers
662
+ `signed_in` with no methods, since it runs on nothing; `clis/list` answers
663
+ `unmanaged`. It runs no process and takes no credential, so a durable
664
+ server's restart that cuts one of its turns off fences nothing: the turn ends
665
+ `server_restart` and the next names its conversation (`resumeRequired`), as
666
+ for Claude or Codex once the restart saw them stopped.
667
+
668
+ **Not in it:** Claude's or Codex's tool names and consent rules (a call asks
669
+ only when the script says `ask`, whatever the permission mode), sub-agents,
670
+ steering, pending tools and input deltas, reasoning. The engine's own tests
671
+ keep a richer fixture for those (`test/server/fixtures.ts`).
672
+
673
+ ## ACP v1, as each side speaks it
674
+
675
+ The engine speaks ACP v1 (`@agentclientprotocol/sdk` 1.7.0) as a client,
676
+ the `acp` harness, and as an agent, `agent-server --acp`. What each side
677
+ does with each method and capability, and which test holds it. The
678
+ loopback test (`test/server/acp-loopback.test.ts`) runs the harness in
679
+ front of the binding over the scripted harness, so it holds both sides at
680
+ once. Unstable methods (`session/list`, `session/fork`, `session/delete`,
681
+ `providers/*`, `nes/*`, `mcp/message`) are used by neither.
682
+
683
+ | Method or capability | Client (`acp` harness) | Agent (`--acp`) | Held by |
684
+ | --- | --- | --- | --- |
685
+ | `initialize` | protocol 1; `clientInfo` (`agent-server`, the stock program's release); advertises form and URL elicitation, no `fs`, no `terminal` | answers protocol 1; images; MCP transports per harness; `resume` and `close`; no `loadSession`; no auth methods | loopback, `acp-session-config`, `bin.test` |
686
+ | `authenticate`, `authMethods` | never called: an agent signs in on its own, and a turn fails with its words | none offered | — |
687
+ | `session/new` | the turn's folder, MCP servers, extra directories when advertised | a session, its modes | loopback |
688
+ | `session/resume` | when advertised | from memory, else the session record | loopback (a new engine), `acp-session-config` |
689
+ | `session/load` | when no resume (the replay is dropped) | not offered | `acp-session-config` |
690
+ | `session/close` | not sent: the agent's process is ended | ends the session's turn and process | `acp-close-during-turn`, loopback (process table) |
691
+ | `session/prompt`, `session/cancel` | yes; a cancel confirmed when the prompt ends within 2 s | yes | loopback, `acp-cancel` |
692
+ | `session/set_mode` | the turn's permission mode, by the agent's own id | `default`, `accept_edits`, `plan` and the operator's own | loopback, `acp-session-config`, `acp-binding-modes` |
693
+ | `session/set_config_option` | `model` and `thought_level` | none offered: the operator's `--model`, `--thinking` | `acp-session-config`, `bin.test` |
694
+ | `session/request_permission` | to the engine's broker (an option id back; edited input denies) | from the broker: `name`, `kind`, `locations`, `rawInput`; no `content` | loopback |
695
+ | `elicitation/create` | to the broker, form and URL | questions as one form; MCP forms and URLs as they are | loopback, `acp-elicitation` |
696
+ | `elicitation/complete` | ignored | not sent | — |
697
+ | `fs/*`, `terminal/*` | not advertised, not served | never asked: each harness's agent uses its own | — |
698
+ | Updates: message and thought chunks, `tool_call`, `tool_call_update`, `usage_update`, `current_mode_update` | to parts and events | from them (sub-agent parts dropped) | loopback, `acp-agent`, `acp-binding` |
699
+ | Updates: `plan`, `available_commands_update`, `session_info_update`, `user_message_chunk` | dropped (`includeRaw` keeps them) | not sent | — |
700
+ | Content: text, image | sent; image when advertised | taken | loopback |
701
+ | Content: `resource_link` | for a file by URL | as a Markdown link in the text | loopback |
702
+ | Content: `resource` (embedded) | a file's data, when advertised | not advertised; dropped | `acp-agent` |
703
+ | Content: audio | never sent | not advertised; dropped | — |
704
+ | Tool content: `diff`, `terminal` | kept on the part | `diff` sent; `terminal` not | loopback, `acp-drawable` |
705
+
340
706
  ## Known limitations (roadmap)
341
707
 
342
708
  - **Work after a turn:** a turn is the unit the stream shows, so the agent
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zvada/agent-server",
3
- "version": "0.3.21",
3
+ "version": "0.3.23",
4
4
  "description": "Harness-agnostic agent execution engine: run Claude Code, Codex (app-server), and any ACP agent behind one interface with a normalized event stream, multi-turn sessions, and resume. Root export is the wire contract; /core, /server, /client are the seats.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -96,6 +96,11 @@
96
96
  "types": "./dist/types/accounts/index.d.ts",
97
97
  "default": "./src/accounts/index.ts"
98
98
  },
99
+ "./operator": {
100
+ "agent-server-source": "./src/operator/index.ts",
101
+ "types": "./dist/types/operator/index.d.ts",
102
+ "default": "./src/operator/index.ts"
103
+ },
99
104
  "./package.json": "./package.json",
100
105
  "./sync": {
101
106
  "agent-server-source": "./src/sync/index.ts",
@@ -116,6 +121,7 @@
116
121
  "peerDependencies": {
117
122
  "@agentclientprotocol/sdk": ">=1.3.0",
118
123
  "@anthropic-ai/claude-agent-sdk": ">=0.3.277",
124
+ "@modelcontextprotocol/sdk": ">=1.31.0",
119
125
  "zod": "^4.0.0"
120
126
  },
121
127
  "peerDependenciesMeta": {
@@ -124,11 +130,15 @@
124
130
  },
125
131
  "@anthropic-ai/claude-agent-sdk": {
126
132
  "optional": true
133
+ },
134
+ "@modelcontextprotocol/sdk": {
135
+ "optional": true
127
136
  }
128
137
  },
129
138
  "devDependencies": {
130
139
  "@agentclientprotocol/sdk": "^1.7.0",
131
140
  "@anthropic-ai/claude-agent-sdk": "0.3.288",
141
+ "@modelcontextprotocol/sdk": "1.32.1",
132
142
  "@openai/codex": "0.160.0",
133
143
  "@types/bun": "^1.2.0",
134
144
  "zod": "^4.6.7"
@@ -1,5 +1,5 @@
1
- import type { CredentialGrant } from "../protocol/credentials.ts";
2
- import { AccountError, type ProviderOptions, call, claimsOf, isRecord, text } from "./http.ts";
1
+ import { type CredentialGrant, claimsOf } from "../protocol/credentials.ts";
2
+ import { AccountError, type ProviderOptions, call, isRecord, text } from "./http.ts";
3
3
 
4
4
  // The Codex CLI's own OAuth client, as the `codex` binary carries it, and its
5
5
  // device sign-in (codex-rs `login/`). A public client: no secret, the same for