@zvada/agent-server 0.3.25 → 0.3.27

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 (256) hide show
  1. package/CHANGELOG.md +113 -0
  2. package/README.md +4 -1
  3. package/dist/client/client.js +27 -11
  4. package/dist/client/connection.js +35 -3
  5. package/dist/core/agents/acp/acp-agent.js +91 -14
  6. package/dist/core/agents/acp/mappings.js +5 -1
  7. package/dist/core/agents/claude-code/approvals.js +3 -2
  8. package/dist/core/agents/claude-code/claude-agent.js +12 -2
  9. package/dist/core/agents/claude-code/mcp.js +9 -1
  10. package/dist/core/agents/claude-code/models.js +16 -10
  11. package/dist/core/agents/claude-code/options.js +23 -2
  12. package/dist/core/agents/claude-code/session.js +21 -1
  13. package/dist/core/agents/claude-code/tools.js +9 -4
  14. package/dist/core/agents/claude-code/turn.js +2 -0
  15. package/dist/core/agents/codex-app-server/adapter.js +2 -0
  16. package/dist/core/agents/codex-app-server/client.js +8 -5
  17. package/dist/core/agents/codex-app-server/codex-agent.js +35 -2
  18. package/dist/core/agents/codex-app-server/effort.js +13 -6
  19. package/dist/core/agents/codex-app-server/mcp.js +35 -18
  20. package/dist/core/agents/codex-app-server/models.js +10 -10
  21. package/dist/core/agents/codex-app-server/options.js +11 -2
  22. package/dist/core/agents/codex-app-server/plan-approval.js +1 -1
  23. package/dist/core/agents/codex-app-server/session.js +11 -4
  24. package/dist/core/agents/codex-app-server/thread-settings.js +30 -11
  25. package/dist/core/agents/host-tools.js +493 -0
  26. package/dist/core/agents/mcp-config.js +6 -2
  27. package/dist/core/agents/scripted/scripted-agent.js +39 -6
  28. package/dist/core/agents/scripted/steps.js +5 -1
  29. package/dist/core/agents/session-agent.js +70 -2
  30. package/dist/core/agents/thinking-levels.js +8 -5
  31. package/dist/core/index.js +1 -0
  32. package/dist/core/presets.js +16 -3
  33. package/dist/core/processes/lifeline.js +9 -5
  34. package/dist/core/provision/pins.js +7 -16
  35. package/dist/core/provision/releases.js +25 -25
  36. package/dist/core/proxy/loopback.js +22 -4
  37. package/dist/core/runtime/agent-runtime.js +15 -5
  38. package/dist/core/runtime/event-processor.js +13 -8
  39. package/dist/core/runtime/origin-line.js +42 -0
  40. package/dist/core/runtime/request-broker.js +2 -1
  41. package/dist/core/runtime/steering.js +4 -3
  42. package/dist/core/runtime/turn.js +6 -4
  43. package/dist/operator/errors.js +97 -0
  44. package/dist/operator/index.js +10 -5
  45. package/dist/operator/mcp.js +7 -12
  46. package/dist/operator/operator.js +1336 -380
  47. package/dist/operator/refs.js +59 -0
  48. package/dist/operator/render.js +171 -74
  49. package/dist/operator/session-tools.js +87 -0
  50. package/dist/operator/types.js +30 -0
  51. package/dist/operator/view.js +82 -27
  52. package/dist/protocol/config.js +33 -6
  53. package/dist/protocol/conversation.js +3 -0
  54. package/dist/protocol/history.js +2 -1
  55. package/dist/protocol/index.js +1 -0
  56. package/dist/protocol/lifecycle.js +19 -0
  57. package/dist/protocol/model-catalog.js +58 -18
  58. package/dist/protocol/models.js +6 -27
  59. package/dist/protocol/origin.js +39 -0
  60. package/dist/protocol/reduce.js +2 -0
  61. package/dist/protocol/thinking.js +22 -9
  62. package/dist/protocol/wire-api.js +2 -2
  63. package/dist/protocol/wire.js +17 -0
  64. package/dist/server/bin.js +6 -4
  65. package/dist/server/routes.js +15 -5
  66. package/dist/types/client/client.d.ts.map +1 -1
  67. package/dist/types/client/connection.d.ts +14 -2
  68. package/dist/types/client/connection.d.ts.map +1 -1
  69. package/dist/types/client/turns.d.ts +2 -2
  70. package/dist/types/client/turns.d.ts.map +1 -1
  71. package/dist/types/core/agents/acp/acp-agent.d.ts +15 -0
  72. package/dist/types/core/agents/acp/acp-agent.d.ts.map +1 -1
  73. package/dist/types/core/agents/acp/mappings.d.ts +5 -1
  74. package/dist/types/core/agents/acp/mappings.d.ts.map +1 -1
  75. package/dist/types/core/agents/acp/requests.d.ts +2 -0
  76. package/dist/types/core/agents/acp/requests.d.ts.map +1 -1
  77. package/dist/types/core/agents/base.d.ts +2 -0
  78. package/dist/types/core/agents/base.d.ts.map +1 -1
  79. package/dist/types/core/agents/claude-code/approvals.d.ts +2 -1
  80. package/dist/types/core/agents/claude-code/approvals.d.ts.map +1 -1
  81. package/dist/types/core/agents/claude-code/claude-agent.d.ts +1 -0
  82. package/dist/types/core/agents/claude-code/claude-agent.d.ts.map +1 -1
  83. package/dist/types/core/agents/claude-code/mcp.d.ts +8 -1
  84. package/dist/types/core/agents/claude-code/mcp.d.ts.map +1 -1
  85. package/dist/types/core/agents/claude-code/models.d.ts +9 -5
  86. package/dist/types/core/agents/claude-code/models.d.ts.map +1 -1
  87. package/dist/types/core/agents/claude-code/options.d.ts +10 -1
  88. package/dist/types/core/agents/claude-code/options.d.ts.map +1 -1
  89. package/dist/types/core/agents/claude-code/session.d.ts +2 -0
  90. package/dist/types/core/agents/claude-code/session.d.ts.map +1 -1
  91. package/dist/types/core/agents/claude-code/tools.d.ts.map +1 -1
  92. package/dist/types/core/agents/claude-code/turn.d.ts +3 -0
  93. package/dist/types/core/agents/claude-code/turn.d.ts.map +1 -1
  94. package/dist/types/core/agents/codex-app-server/adapter.d.ts.map +1 -1
  95. package/dist/types/core/agents/codex-app-server/client.d.ts +2 -0
  96. package/dist/types/core/agents/codex-app-server/client.d.ts.map +1 -1
  97. package/dist/types/core/agents/codex-app-server/codex-agent.d.ts +11 -0
  98. package/dist/types/core/agents/codex-app-server/codex-agent.d.ts.map +1 -1
  99. package/dist/types/core/agents/codex-app-server/effort.d.ts +7 -7
  100. package/dist/types/core/agents/codex-app-server/effort.d.ts.map +1 -1
  101. package/dist/types/core/agents/codex-app-server/mcp.d.ts +11 -3
  102. package/dist/types/core/agents/codex-app-server/mcp.d.ts.map +1 -1
  103. package/dist/types/core/agents/codex-app-server/models.d.ts +4 -1
  104. package/dist/types/core/agents/codex-app-server/models.d.ts.map +1 -1
  105. package/dist/types/core/agents/codex-app-server/options.d.ts +9 -2
  106. package/dist/types/core/agents/codex-app-server/options.d.ts.map +1 -1
  107. package/dist/types/core/agents/codex-app-server/requests.d.ts +2 -0
  108. package/dist/types/core/agents/codex-app-server/requests.d.ts.map +1 -1
  109. package/dist/types/core/agents/codex-app-server/session.d.ts +6 -3
  110. package/dist/types/core/agents/codex-app-server/session.d.ts.map +1 -1
  111. package/dist/types/core/agents/codex-app-server/thread-settings.d.ts.map +1 -1
  112. package/dist/types/core/agents/host-tools.d.ts +162 -0
  113. package/dist/types/core/agents/host-tools.d.ts.map +1 -0
  114. package/dist/types/core/agents/mcp-config.d.ts +11 -2
  115. package/dist/types/core/agents/mcp-config.d.ts.map +1 -1
  116. package/dist/types/core/agents/scripted/scripted-agent.d.ts +14 -1
  117. package/dist/types/core/agents/scripted/scripted-agent.d.ts.map +1 -1
  118. package/dist/types/core/agents/scripted/steps.d.ts.map +1 -1
  119. package/dist/types/core/agents/session-agent.d.ts +2 -7
  120. package/dist/types/core/agents/session-agent.d.ts.map +1 -1
  121. package/dist/types/core/agents/thinking-levels.d.ts +7 -3
  122. package/dist/types/core/agents/thinking-levels.d.ts.map +1 -1
  123. package/dist/types/core/index.d.ts +1 -0
  124. package/dist/types/core/index.d.ts.map +1 -1
  125. package/dist/types/core/presets.d.ts +11 -1
  126. package/dist/types/core/presets.d.ts.map +1 -1
  127. package/dist/types/core/processes/lifeline.d.ts.map +1 -1
  128. package/dist/types/core/provision/pins.d.ts +5 -4
  129. package/dist/types/core/provision/pins.d.ts.map +1 -1
  130. package/dist/types/core/proxy/loopback.d.ts.map +1 -1
  131. package/dist/types/core/runtime/agent-runtime.d.ts +4 -2
  132. package/dist/types/core/runtime/agent-runtime.d.ts.map +1 -1
  133. package/dist/types/core/runtime/event-processor.d.ts +2 -2
  134. package/dist/types/core/runtime/event-processor.d.ts.map +1 -1
  135. package/dist/types/core/runtime/origin-line.d.ts +15 -0
  136. package/dist/types/core/runtime/origin-line.d.ts.map +1 -0
  137. package/dist/types/core/runtime/request-broker.d.ts +1 -1
  138. package/dist/types/core/runtime/request-broker.d.ts.map +1 -1
  139. package/dist/types/core/runtime/steering.d.ts +7 -4
  140. package/dist/types/core/runtime/steering.d.ts.map +1 -1
  141. package/dist/types/core/runtime/turn.d.ts.map +1 -1
  142. package/dist/types/operator/errors.d.ts +83 -0
  143. package/dist/types/operator/errors.d.ts.map +1 -0
  144. package/dist/types/operator/index.d.ts +10 -5
  145. package/dist/types/operator/index.d.ts.map +1 -1
  146. package/dist/types/operator/mcp.d.ts +1 -1
  147. package/dist/types/operator/mcp.d.ts.map +1 -1
  148. package/dist/types/operator/operator.d.ts +15 -197
  149. package/dist/types/operator/operator.d.ts.map +1 -1
  150. package/dist/types/operator/refs.d.ts +25 -0
  151. package/dist/types/operator/refs.d.ts.map +1 -0
  152. package/dist/types/operator/render.d.ts +59 -19
  153. package/dist/types/operator/render.d.ts.map +1 -1
  154. package/dist/types/operator/session-tools.d.ts +61 -0
  155. package/dist/types/operator/session-tools.d.ts.map +1 -0
  156. package/dist/types/operator/types.d.ts +441 -0
  157. package/dist/types/operator/types.d.ts.map +1 -0
  158. package/dist/types/operator/view.d.ts +19 -29
  159. package/dist/types/operator/view.d.ts.map +1 -1
  160. package/dist/types/protocol/config.d.ts +32 -24
  161. package/dist/types/protocol/config.d.ts.map +1 -1
  162. package/dist/types/protocol/conversation.d.ts +48 -39
  163. package/dist/types/protocol/conversation.d.ts.map +1 -1
  164. package/dist/types/protocol/execution.d.ts +2 -18
  165. package/dist/types/protocol/execution.d.ts.map +1 -1
  166. package/dist/types/protocol/history.d.ts +1 -1
  167. package/dist/types/protocol/history.d.ts.map +1 -1
  168. package/dist/types/protocol/index.d.ts +1 -0
  169. package/dist/types/protocol/index.d.ts.map +1 -1
  170. package/dist/types/protocol/lifecycle.d.ts +48 -74
  171. package/dist/types/protocol/lifecycle.d.ts.map +1 -1
  172. package/dist/types/protocol/model-catalog.d.ts.map +1 -1
  173. package/dist/types/protocol/models.d.ts +4 -42
  174. package/dist/types/protocol/models.d.ts.map +1 -1
  175. package/dist/types/protocol/origin.d.ts +49 -0
  176. package/dist/types/protocol/origin.d.ts.map +1 -0
  177. package/dist/types/protocol/reduce.d.ts.map +1 -1
  178. package/dist/types/protocol/thinking.d.ts +19 -19
  179. package/dist/types/protocol/thinking.d.ts.map +1 -1
  180. package/dist/types/protocol/wire-api.d.ts +59 -106
  181. package/dist/types/protocol/wire-api.d.ts.map +1 -1
  182. package/dist/types/protocol/wire.d.ts +81 -119
  183. package/dist/types/protocol/wire.d.ts.map +1 -1
  184. package/dist/types/server/routes.d.ts.map +1 -1
  185. package/docs/consuming.md +124 -132
  186. package/docs/deploy.md +6 -5
  187. package/docs/harnesses.md +79 -31
  188. package/docs/sync-history.md +2 -1
  189. package/package.json +4 -4
  190. package/src/client/client.ts +36 -9
  191. package/src/client/connection.ts +31 -1
  192. package/src/client/turns.ts +2 -1
  193. package/src/core/agents/acp/acp-agent.ts +123 -17
  194. package/src/core/agents/acp/mappings.ts +5 -1
  195. package/src/core/agents/acp/requests.ts +2 -0
  196. package/src/core/agents/base.ts +2 -0
  197. package/src/core/agents/claude-code/approvals.ts +4 -3
  198. package/src/core/agents/claude-code/claude-agent.ts +14 -2
  199. package/src/core/agents/claude-code/mcp.ts +11 -1
  200. package/src/core/agents/claude-code/models.ts +15 -10
  201. package/src/core/agents/claude-code/options.ts +33 -3
  202. package/src/core/agents/claude-code/session.ts +26 -1
  203. package/src/core/agents/claude-code/tools.ts +10 -4
  204. package/src/core/agents/claude-code/turn.ts +4 -0
  205. package/src/core/agents/codex-app-server/adapter.ts +2 -0
  206. package/src/core/agents/codex-app-server/client.ts +11 -5
  207. package/src/core/agents/codex-app-server/codex-agent.ts +45 -1
  208. package/src/core/agents/codex-app-server/effort.ts +15 -20
  209. package/src/core/agents/codex-app-server/mcp.ts +46 -23
  210. package/src/core/agents/codex-app-server/models.ts +10 -10
  211. package/src/core/agents/codex-app-server/options.ts +16 -2
  212. package/src/core/agents/codex-app-server/plan-approval.ts +1 -1
  213. package/src/core/agents/codex-app-server/requests.ts +2 -0
  214. package/src/core/agents/codex-app-server/session.ts +19 -4
  215. package/src/core/agents/codex-app-server/thread-settings.ts +31 -11
  216. package/src/core/agents/host-tools.ts +649 -0
  217. package/src/core/agents/mcp-config.ts +15 -3
  218. package/src/core/agents/scripted/scripted-agent.ts +51 -5
  219. package/src/core/agents/scripted/steps.ts +5 -1
  220. package/src/core/agents/session-agent.ts +78 -2
  221. package/src/core/agents/thinking-levels.ts +9 -6
  222. package/src/core/index.ts +9 -0
  223. package/src/core/presets.ts +28 -4
  224. package/src/core/processes/lifeline.ts +9 -5
  225. package/src/core/provision/pins.ts +7 -16
  226. package/src/core/provision/releases.ts +25 -25
  227. package/src/core/proxy/loopback.ts +25 -4
  228. package/src/core/runtime/agent-runtime.ts +31 -7
  229. package/src/core/runtime/event-processor.ts +13 -6
  230. package/src/core/runtime/origin-line.ts +43 -0
  231. package/src/core/runtime/request-broker.ts +2 -0
  232. package/src/core/runtime/steering.ts +8 -4
  233. package/src/core/runtime/turn.ts +11 -4
  234. package/src/operator/errors.ts +218 -0
  235. package/src/operator/index.ts +18 -23
  236. package/src/operator/mcp.ts +7 -16
  237. package/src/operator/operator.ts +1583 -613
  238. package/src/operator/refs.ts +75 -0
  239. package/src/operator/render.ts +208 -98
  240. package/src/operator/session-tools.ts +126 -0
  241. package/src/operator/types.ts +505 -0
  242. package/src/operator/view.ts +93 -42
  243. package/src/protocol/config.ts +36 -7
  244. package/src/protocol/conversation.ts +3 -0
  245. package/src/protocol/history.ts +2 -1
  246. package/src/protocol/index.ts +1 -0
  247. package/src/protocol/lifecycle.ts +21 -0
  248. package/src/protocol/model-catalog.ts +58 -18
  249. package/src/protocol/models.ts +6 -26
  250. package/src/protocol/origin.ts +47 -0
  251. package/src/protocol/reduce.ts +4 -0
  252. package/src/protocol/thinking.ts +27 -14
  253. package/src/protocol/wire-api.ts +2 -2
  254. package/src/protocol/wire.ts +18 -0
  255. package/src/server/bin.ts +6 -4
  256. package/src/server/routes.ts +16 -5
@@ -1 +1 @@
1
- {"version":3,"file":"lifeline.d.ts","sourceRoot":"","sources":["../../../../src/core/processes/lifeline.ts"],"names":[],"mappings":"AAqKA;;;;GAIG;AACH,cAAM,QAAQ;IAOD,OAAO,CAAC,QAAQ,CAAC,OAAO;IANpC,OAAO,CAAC,KAAK,CAA4B;IACzC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqB;IAC5C,OAAO,CAAC,SAAS,CAAK;IACtB,mFAAmF;IACnF,OAAO,CAAC,MAAM,CAAS;gBAEM,OAAO,EAAE,MAAM;IAE5C,uEAAuE;IACvE,IAAI,GAAG,IAAI,MAAM,GAAG,SAAS,CAE5B;IAED,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAM5B,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAI1B,qFAAqF;IACrF,OAAO,CAAC,MAAM;IAoCd,OAAO,CAAC,KAAK;CAQb;AAID,qGAAqG;AACrG,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,QAAQ,CAGlD;AAED,yDAAyD;AACzD,wBAAgB,WAAW,IAAI,MAAM,GAAG,SAAS,CAEhD"}
1
+ {"version":3,"file":"lifeline.d.ts","sourceRoot":"","sources":["../../../../src/core/processes/lifeline.ts"],"names":[],"mappings":"AAyKA;;;;GAIG;AACH,cAAM,QAAQ;IAOD,OAAO,CAAC,QAAQ,CAAC,OAAO;IANpC,OAAO,CAAC,KAAK,CAA4B;IACzC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqB;IAC5C,OAAO,CAAC,SAAS,CAAK;IACtB,mFAAmF;IACnF,OAAO,CAAC,MAAM,CAAS;gBAEM,OAAO,EAAE,MAAM;IAE5C,uEAAuE;IACvE,IAAI,GAAG,IAAI,MAAM,GAAG,SAAS,CAE5B;IAED,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAM5B,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAI1B,qFAAqF;IACrF,OAAO,CAAC,MAAM;IAoCd,OAAO,CAAC,KAAK;CAQb;AAID,qGAAqG;AACrG,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,QAAQ,CAGlD;AAED,yDAAyD;AACzD,wBAAgB,WAAW,IAAI,MAAM,GAAG,SAAS,CAEhD"}
@@ -15,10 +15,11 @@ import type { CliTool } from "./tools.ts";
15
15
  * `auto` an installed `@openai/codex` package (a lockfile's) runs instead,
16
16
  * and a `codex` on PATH only in `system` mode.
17
17
  *
18
- * After any bump, run `bun run releases:refresh` (each platform's build and
19
- * its checksums, `releases.ts`) and `bun run models:refresh` (the model
20
- * catalog, which records the versions that listed it); tests fail until both
21
- * match these pins.
18
+ * A bump is `bun run bump -- <tool>`: it writes what changed upstream, moves
19
+ * the pin, and runs both refreshes, `releases:refresh` (each platform's build
20
+ * and its checksums, `releases.ts`) and `models:refresh` (the model catalog,
21
+ * which records the versions that listed it); tests fail until both match
22
+ * these pins. The `bump-clis` skill says what to read and prove.
22
23
  */
23
24
  export declare const DEFAULT_PINS: Record<CliTool, string>;
24
25
  //# sourceMappingURL=pins.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pins.d.ts","sourceRoot":"","sources":["../../../../src/core/provision/pins.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAahD,CAAC"}
1
+ {"version":3,"file":"pins.d.ts","sourceRoot":"","sources":["../../../../src/core/provision/pins.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAGhD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"loopback.d.ts","sourceRoot":"","sources":["../../../../src/core/proxy/loopback.ts"],"names":[],"mappings":"AAGA,iDAAiD;AACjD,MAAM,WAAW,QAAQ;IACxB,wDAAwD;IACxD,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACvB;AAiDD;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CA0ChG"}
1
+ {"version":3,"file":"loopback.d.ts","sourceRoot":"","sources":["../../../../src/core/proxy/loopback.ts"],"names":[],"mappings":"AAGA,iDAAiD;AACjD,MAAM,WAAW,QAAQ;IACxB,wDAAwD;IACxD,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACvB;AA0DD;;;;;GAKG;AACH,wBAAsB,aAAa,CAClC,MAAM,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,QAAQ,CAAC,GAC7C,OAAO,CAAC,QAAQ,CAAC,CAoDnB"}
@@ -1,4 +1,4 @@
1
- import type { AgentCapabilities, AgentHarness, AuthLogin, AuthLoginParams, AuthUpdated, ElicitationOutcome, HarnessAuth, HarnessCli, HarnessCliProgress, ModelList, ModelsListParams, PermissionOutcome, RunRequest, TurnSteerResult } from "../../protocol/index.ts";
1
+ import type { AgentCapabilities, AgentHarness, AuthLogin, AuthLoginParams, AuthUpdated, ElicitationOutcome, HarnessAuth, HarnessCli, HarnessCliProgress, ModelList, ModelsListParams, Origin, PermissionOutcome, RunRequest, TurnSteerResult } from "../../protocol/index.ts";
2
2
  import type { CancelResult, SteerRequest } from "../agents/base.ts";
3
3
  import type { AgentRegistry } from "../agents/registry.ts";
4
4
  import type { DiagnosticHandler } from "../diagnostics.ts";
@@ -148,7 +148,9 @@ export declare class AgentRuntime {
148
148
  * ended; the same id with other input throws `TurnConflictError`. Input the
149
149
  * harness cannot take throws, as it would fail a turn.
150
150
  */
151
- steer(sessionId: string, request: SteerRequest): Promise<TurnSteerResult>;
151
+ steer(sessionId: string, request: SteerRequest & {
152
+ origin?: Origin;
153
+ }): Promise<TurnSteerResult>;
152
154
  /** Whether another turn of the session, live or remembered, took this steer id. */
153
155
  private steerIdTaken;
154
156
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"agent-runtime.d.ts","sourceRoot":"","sources":["../../../../src/core/runtime/agent-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,iBAAiB,EACjB,YAAY,EACZ,SAAS,EACT,eAAe,EACf,WAAW,EACX,kBAAkB,EAClB,WAAW,EACX,UAAU,EACV,kBAAkB,EAClB,SAAS,EACT,gBAAgB,EAChB,iBAAiB,EACjB,UAAU,EACV,eAAe,EACf,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAG1F,OAAO,EAAE,KAAK,SAAS,EAAkB,MAAM,iBAAiB,CAAC;AAMjE,OAAO,EACN,KAAK,UAAU,EAKf,MAAM,WAAW,CAAC;AAEnB;;;GAGG;AACH,MAAM,MAAM,aAAa,GACtB;IAAE,MAAM,EAAE,KAAK,CAAA;CAAE,GACjB;IAAE,MAAM,EAAE,UAAU,CAAA;CAAE,GACtB;IAAE,MAAM,EAAE,WAAW,CAAC;IAAC,OAAO,EAAE,UAAU,CAAA;CAAE,CAAC;AAgBhD;;;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ts";
1
+ import type { AgentInput, LifecycleEvent, Origin, TurnEndedEvent, TurnExecution } from "../../protocol/index.ts";
2
2
  import type { AppliedExecution } from "../agents/base.ts";
3
3
  import type { AdapterEvent, TransformResult } from "../agents/types.ts";
4
4
  import type { TurnSteers } from "./steering.ts";
@@ -52,7 +52,7 @@ export declare class EventProcessor {
52
52
  * id (`echoMessageId`), so a consumer that minted the turnId can predict the
53
53
  * whole echo instead of reconciling a look-alike against it.
54
54
  */
55
- echoUserMessage(input: AgentInput): Generator<LifecycleEvent>;
55
+ echoUserMessage(input: AgentInput, origin?: Origin): Generator<LifecycleEvent>;
56
56
  /**
57
57
  * A steer's echo: a complete user message at the point the agent read it,
58
58
  * after whatever it had produced so far. Its ids derive from the steer id,
@@ -1 +1 @@
1
- {"version":3,"file":"event-processor.d.ts","sourceRoot":"","sources":["../../../../src/core/runtime/event-processor.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACX,UAAU,EAEV,cAAc,EAEd,cAAc,EACd,aAAa,EACb,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAqDrD;;;;;;;;;GASG;AACH,qBAAa,cAAc;IAsBzB,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,gFAAgF;IAChF,OAAO,CAAC,QAAQ,CAAC,MAAM;IAzBxB,OAAO,CAAC,aAAa,CAAC,CAAS;IAC/B,iFAAiF;IACjF,OAAO,CAAC,iBAAiB,CAAC,CAAS;IACnC,OAAO,CAAC,kBAAkB,CAAM;IAChC,8E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gBAAgB,CAAC,CAAS;gBAGhB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,aAAa;IACzC,gFAAgF;IAC/D,MAAM,EAAE,UAAU;IAKpC,yGAAyG;IACzG,cAAc,CAAC,EAAE,UAAU,EAAE,GAAG,MAAM,EAAE,EAAE,gBAAgB,GAAG,IAAI;IAKjE,sFAAsF;IACtF,cAAc,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,IAAI;IAI9C;;;;;;OAMG;IACF,eAAe,CAAC,KAAK,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC,cAAc,CAAC;IAS/E;;;;;OAKG;IACH,OAAO,CAAE,SAAS;IAUjB,MAAM,CAAC,EAAE,EAAE,YAAY,GAAG,SAAS,CAAC,cAAc,CAAC;IAsHpD;;;OAGG;IACH,MAAM,CACL,MAAM,EAAE,eAAe,EACvB,OAAO,EAAE,WAAW,GAClB;QAAE,MAAM,EAAE,cAAc,EAAE,CAAC;QAAC,KAAK,EAAE,cAAc,GAAG;YAAE,SAAS,EAAE,aAAa,CAAA;SAAE,CAAA;KAAE;IAiCrF,mEAAmE;IACnE,OAAO,CAAE,WAAW;IA6CpB,OAAO,CAAC,YAAY;IASpB,OAAO,CAAE,YAAY;IAarB;;;gFAG4E;IAC5E,OAAO,CAAE,aAAa;IAOtB,OAAO,CAAE,QAAQ;IA8BjB;;;;OAIG;IACH,OAAO,CAAE,KAAK;CAkBd"}
@@ -0,0 +1,15 @@
1
+ import { type AgentInput, type Origin } from "../../protocol/index.ts";
2
+ /**
3
+ * The one line an agent is given before a message that is not the person's,
4
+ * saying who sent it. Undefined for the person, whose messages carry none.
5
+ * The names and ids are the host's and untrusted: each is one JSON-quoted
6
+ * line, so none can end the line, the bracket or the quote.
7
+ */
8
+ export declare function originLine(origin: Origin | undefined): string | undefined;
9
+ /**
10
+ * The input as its agent is given it: the sender's line first when it is not
11
+ * the person (to text after a blank line; before a list as a text part of its
12
+ * own). The echo, and every store, keep the caller's input as it was sent.
13
+ */
14
+ export declare function withOriginLine(input: AgentInput, origin: Origin | undefined): AgentInput;
15
+ //# sourceMappingURL=origin-line.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"origin-line.d.ts","sourceRoot":"","sources":["../../../../src/core/runtime/origin-line.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,MAAM,EAAe,MAAM,yBAAyB,CAAC;AAGpF;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CASzE;AAcD;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,UAAU,CAKxF"}
@@ -33,7 +33,7 @@ export declare class RequestBroker {
33
33
  /** Whether it takes requests: until its turn ends, or its sink fails. */
34
34
  get open(): boolean;
35
35
  /** Ask whether a tool may run; resolves with the answer, or a cancel. */
36
- askPermission(toolCall: PermissionToolCall, options: PermissionOption[], signal?: AbortSignal): Promise<PermissionOutcome>;
36
+ askPermission(toolCall: PermissionToolCall, options: PermissionOption[], signal?: AbortSignal, purpose?: "tool" | "plan"): Promise<PermissionOutcome>;
37
37
  /** Ask the user what the agent asks; resolves with the answer, or a cancel. */
38
38
  askElicitation(request: ElicitationRequest, signal?: AbortSignal): Promise<ElicitationOutcome>;
39
39
  /** Answer an open request of this kind; false when it is not open here. */
@@ -1 +1 @@
1
- {"version":3,"file":"request-broker.d.ts","sourceRoot":"","sources":["../../../../src/core/runtime/request-broker.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,kBAAkB,EAElB,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AA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E,WAAW,GAAG,OAAO,CAAC,kBAAkB,CAAC;IA0B9F,2EAA2E;IAC3E,OAAO,CAAC,CAAC,SAAS,WAAW,EAAE,IAAI,EAAE,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,OAAO;IAO9F,gGAAgG;IAC1F,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAKhC,iFAAiF;IACjF,KAAK,IAAI,IAAI;IAIb,uFAAuF;IACjF,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;YAMd,IAAI;CAkClB"}
@@ -1,4 +1,4 @@
1
- import type { AgentInput, TurnSteerResult } from "../../protocol/index.ts";
1
+ import type { AgentInput, Origin, TurnSteerResult } from "../../protocol/index.ts";
2
2
  import type { SteerOutcome } from "../agents/base.ts";
3
3
  /** What a turn answered a steer: kept with the settled turn, so a retry converges. */
4
4
  export interface SteerAnswer {
@@ -22,10 +22,13 @@ export declare class TurnSteers {
22
22
  /** What it answered this steer id, if it took it. */
23
23
  find(steerId: string): SteerAnswer | undefined;
24
24
  /** Take a steer, and hand it to the harness with `deliver`. */
25
- accept(steerId: string, inputKey: string, input: AgentInput, deliver: () => Promise<SteerOutcome>): Promise<TurnSteerResult>;
25
+ accept(steerId: string, inputKey: string, input: AgentInput, deliver: () => Promise<SteerOutcome>, origin?: Origin): Promise<TurnSteerResult>;
26
26
  private answer;
27
- /** The agent read a steer: its input, once, for its echo. */
28
- read(steerId: string): AgentInput | undefined;
27
+ /** The agent read a steer: its input and sender, once, for its echo. */
28
+ read(steerId: string): {
29
+ input: AgentInput;
30
+ origin?: Origin;
31
+ } | undefined;
29
32
  /** The steers it took that the agent has not read (all of them, once the turn is over). */
30
33
  undelivered(): string[];
31
34
  /** Its harness stopped executing: it takes no more steers. */
@@ -1 +1 @@
1
- {"version":3,"file":"steering.d.ts","sourceRoot":"","sources":["../../../../src/core/runtime/steering.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,E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,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IACtC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAgB;IAC1C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAiB;IAC3C,oFAAoF;IACpF,OAAO,CAAC,WAAW,CAAC,CAAiB;IACrC;;;;OAIG;IACH,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAyB;IACnD,uFAAuF;IACvF,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAc;IACrC,OAAO,CAAC,eAAe,CAAC,CAAS;IACjC,wEAAwE;IACxE,OAAO,CAAC,OAAO,CAAC,CAAU;IAC1B,6EAA6E;IAC7E,OAAO,CAAC,SAAS,CAAS;gBAGR,OAAO,EAAE,UAAU;IACpC,wEAAwE;IAC/D,QAAQ,EAAE,MAAM,EACR,IAAI,EAAE,SAAS;IAChC,gEAAgE;IAChE,MAAM,EAAE,WAAW,EACF,IAAI,EAAE,QAAQ;IAwBhC;;;;;OAKG;IACH,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;YAQhB,OAAO;IAyGrB,6GAA6G;IAC7G,OAAO,CAAC,YAAY;IAyCpB,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAqBhC;IAEF,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CACkB;YAEvC,qBAAqB;IAqBnC;;;;;OAKG;YACW,IAAI;CAuBlB"}
@@ -0,0 +1,83 @@
1
+ /**
2
+ * The refusals: a closed set of codes (`OPERATOR_ERROR_CODES`), each with its
3
+ * sentence. A refusal reads `refused (<code>): <sentence>`, then the host's
4
+ * words, then the next call, which names only a tool that is installed.
5
+ */
6
+ import type { OperatorErrorCode, Refusal } from "./types.ts";
7
+ /**
8
+ * A host's refusal at its own commit (`start`, `archive`, `send`): the code
9
+ * and the sessions it is about, by id; the package words it as its own
10
+ * refusal of that code, naming the sessions as the caller sees them.
11
+ */
12
+ export declare class Refused extends Error {
13
+ readonly refusal: Refusal;
14
+ name: string;
15
+ constructor(refusal: Refusal);
16
+ }
17
+ /**
18
+ * What can be archived, as `archive` takes it: a chat on its own, or, for a
19
+ * chat that is its workspace's only one, the workspace (a host may refuse
20
+ * archiving a workspace's last chat on its own).
21
+ */
22
+ export interface Archivable {
23
+ sessions: readonly string[];
24
+ workspaces: readonly string[];
25
+ }
26
+ /** A refusal a model can act on. Anything else a tool throws is `failed`. */
27
+ export declare class OperatorError extends Error {
28
+ readonly code: OperatorErrorCode;
29
+ readonly extra: {
30
+ /** The host's words: trusted, one line, said after the sentence. */
31
+ detail?: string;
32
+ /** The next call, already built from the installed tools. */
33
+ next?: string;
34
+ retryAfter?: number;
35
+ /** What was done before the refusal, when something was. */
36
+ done?: string;
37
+ };
38
+ name: string;
39
+ constructor(code: OperatorErrorCode, sentence: string, extra?: {
40
+ /** The host's words: trusted, one line, said after the sentence. */
41
+ detail?: string;
42
+ /** The next call, already built from the installed tools. */
43
+ next?: string;
44
+ retryAfter?: number;
45
+ /** What was done before the refusal, when something was. */
46
+ done?: string;
47
+ });
48
+ get retryAfter(): number | undefined;
49
+ /** A refusal whose words are already built (a batch whose every item was refused). */
50
+ static said(code: OperatorErrorCode, text: string): OperatorError;
51
+ }
52
+ /** Build a hint for a call, or nothing when that tool is not installed. */
53
+ export type Hint = (tool: string, args?: Record<string, unknown>) => string | undefined;
54
+ /**
55
+ * Every refusal, by code. Each takes what its sentence names and the `hint`
56
+ * of the operator that refuses, so its next call is one the caller has.
57
+ */
58
+ export declare const refuse: {
59
+ invalidInput: (tool: string, field: string, problem: string) => OperatorError;
60
+ notFound: (hint: Hint, ref: string, known: readonly string[]) => OperatorError;
61
+ ambiguous: (ref: string, refs: readonly string[]) => OperatorError;
62
+ archived: (hint: Hint, ref: string, project?: string) => OperatorError;
63
+ self: (what: "session" | "workspace") => OperatorError;
64
+ readOnly: () => OperatorError;
65
+ access: (detail?: string) => OperatorError;
66
+ notYoursArchive: (ref: string, busy: readonly string[]) => OperatorError;
67
+ notYoursAnswer: (ref: string) => OperatorError;
68
+ notYoursPermission: () => OperatorError;
69
+ hasChildren: (hint: Hint, ref: string, children: readonly string[], archive: Archivable) => OperatorError;
70
+ busy: (hint: Hint, ref: string, state: "working" | "waiting on an answer" | "being set up", undone: "archived" | "started in it" | "sent") => OperatorError;
71
+ notWaiting: (hint: Hint, ref: string, status: string, current?: string) => OperatorError;
72
+ personOnly: (ref: string, why: string) => OperatorError;
73
+ setupFailed: (hint: Hint, ref: string, reason: string, done?: string) => OperatorError;
74
+ limitDepth: (depth: number) => OperatorError;
75
+ limitSessions: (hint: Hint, count: number, settled: Archivable) => OperatorError;
76
+ limitSettingUp: (retryAfter: number, detail?: string) => OperatorError;
77
+ limitRate: (count: number, retryAfter: number) => OperatorError;
78
+ limitResources: (retryAfter: number | undefined, detail?: string) => OperatorError;
79
+ staleCursor: (hint: Hint, ref: string) => OperatorError;
80
+ unsupported: (detail?: string) => OperatorError;
81
+ failed: () => OperatorError;
82
+ };
83
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/operator/errors.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,KAAK,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE7D;;;;GAIG;AACH,qBAAa,OAAQ,SAAQ,KAAK;IAErB,QAAQ,CAAC,OAAO,EAAE,OAAO;IAD5B,IAAI,SAAa;gBACL,OAAO,EAAE,OAAO;CAGrC;AAED;;;;GAIG;AACH,MAAM,WAAW,UAAU;IAC1B,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5B,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;CAC9B;AAUD,6EAA6E;AAC7E,qBAAa,aAAc,SAAQ,KAAK;IAGtC,QAAQ,CAAC,IAAI,EAAE,iBAAiB;IAEhC,QAAQ,CAAC,KAAK,EAAE;QACf,oEAAoE;QACpE,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,6DAA6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Y,MAAM;sBAUpD,MAAM,OAAO,MAAM;wBAKjB,IAAI,OAAO,MAAM,UAAU,MAAM,SAAS,MAAM;wBAShD,MAAM;0BAKJ,IAAI,SAAS,MAAM,WAAW,UAAU;iCAMjC,MAAM,WAAW,MAAM;uBAMjC,MAAM,cAAc,MAAM;iCAMhB,MAAM,GAAG,SAAS,WAAW,MAAM;wBAM5C,IAAI,OAAO,MAAM;2BAQd,MAAM;;CAO7B,CAAC"}
@@ -1,11 +1,16 @@
1
1
  /**
2
- * `@zvada/agent-server/operator`: the session tools an outside agent operates a
3
- * product's coding agents with, and their MCP binding. Imports only the
4
- * protocol and zod; the product is the `OperatorHost` (LLP 0014).
2
+ * `@zvada/agent-server/operator`: the session tools an outside agent, or a
3
+ * product's own session, operates a product's coding agents with, and their
4
+ * MCP binding. Imports only the protocol and zod; the product is the
5
+ * `OperatorHost` (LLP 0014, LLP 0019).
5
6
  */
6
7
  export { PLAN_OPTIONS, PLAN_TITLE } from "../protocol/plan.ts";
8
+ export { type Archivable, type Hint, OperatorError, Refused, refuse } from "./errors.ts";
7
9
  export { type McpHandler, type McpServerInfo, type ToolSource, createMcpHandler, } from "./mcp.ts";
8
- export { type Operator, type OperatorClock, type OperatorHost, type OperatorOptions, type SendOptions, type SendResult, type SessionEntry, type StartInput, type StartResult, type Tool, type ToolInfo, type ViewOptions, OperatorError, createOperator, tool, } from "./operator.ts";
10
+ export { DEFAULT_LIMITS, DEFAULT_WAITS, createOperator, tool } from "./operator.ts";
11
+ export { refOf } from "./refs.ts";
12
+ export { OPERATOR_GUIDANCE, type SessionTool, type SessionToolCaller, type SessionToolContent, type SessionToolSource, operatorSessionTools, } from "./session-tools.ts";
9
13
  export { type Answer, callHint, oneLine, quote, quoted } from "./render.ts";
10
- export { type DecisionRequest, type Phase, type QuestionRequest, type SessionView, type ViewMessage, type Waiting, phaseOf, viewOf, } from "./view.ts";
14
+ export * from "./types.ts";
15
+ export { type DecisionRequest, type QuestionRequest, type ViewMessage, settledStatus, turnOf, viewOf, waitingOf, } from "./view.ts";
11
16
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/operator/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EACN,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,gBAAgB,GAChB,MAAM,UAAU,CAAC;AAClB,OAAO,EACN,KAAK,QAAQ,EACb,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,IAAI,EACT,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,aAAa,EACb,cAAc,EACd,IAAI,GACJ,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,KAAK,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC5E,OAAO,EACN,KAAK,eAAe,EACpB,KAAK,KAAK,EACV,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,OAAO,EACZ,OAAO,EACP,MAAM,GACN,MAAM,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/operator/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACzF,OAAO,EACN,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,gBAAgB,GAChB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACpF,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,EACN,iBAAiB,EACjB,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,oBAAoB,GACpB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,KAAK,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC5E,cAAc,YAAY,CAAC;AAC3B,OAAO,EACN,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,aAAa,EACb,MAAM,EACN,MAAM,EACN,SAAS,GACT,MAAM,WAAW,CAAC"}
@@ -8,7 +8,7 @@
8
8
  * result is null (a notification). It answers GET with `405`: the server
9
9
  * never opens a stream of its own.
10
10
  */
11
- import { type ToolInfo } from "./operator.ts";
11
+ import type { ToolInfo } from "./types.ts";
12
12
  /** Anything that lists and runs tools: an operator, or a host's wrapper around one. */
13
13
  export interface ToolSource<Caller> {
14
14
  tools(caller: Caller): ToolInfo[];
@@ -1 +1 @@
1
- {"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../../../src/operator/mcp.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,EAAiB,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAC;AAG7D,uFAAuF;AACvF,MAAM,WAAW,UAAU,CAAC,MAAM;IACjC,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,QAAQ,EAAE,CAAC;IAClC,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CACnE;AAED,MAAM,WAAW,aAAa;IAC7B,IAAI,EAAE,M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AAC,CAAC;AAgB/F,0GAA0G;AAC1G,wBAAgB,gBAAgB,CAAC,MAAM,EACtC,MAAM,EAAE,UAAU,CAAC,MAAM,CAAC,EAC1B,IAAI,EAAE,aAAa,GACjB,UAAU,CAAC,MAAM,CAAC,CA0FpB"}
@@ -1,206 +1,24 @@
1
1
  /**
2
- * Operator tools: what a person does with a set of agent sessions, as a handful
3
- * of calls an outside agent can make. See what each session is doing, read one,
4
- * start one, tell it something, wait for it, answer what it asks, stop it.
5
- *
6
- * The tools are transport-neutral: `tools()` lists them (name, words for a
7
- * model, JSON Schema input, whether they only read) and `call()` runs one and
8
- * answers in text. `createMcpHandler` (mcp.ts) serves them over MCP; a product
9
- * adds its own tools (its projects, its diffs) beside them with `tool()` so
10
- * they read as one set.
11
- *
12
- * The product supplies an `OperatorHost`: which sessions exist and what they are
13
- * called, how to read one, and how to start, stop and answer a turn (it owns the
14
- * run configuration, the storage and the authorization; the engine owns none).
2
+ * Operator tools: what a person does with a set of agent sessions, as calls an
3
+ * agent can make, whether it is an outside assistant or one of the product's
4
+ * own sessions (LLP 0014, LLP 0019). See who you are, list the sessions, read
5
+ * one, wait for some, start one, message one, answer what it asks, stop it,
6
+ * archive it. The product is the `OperatorHost`; the package owns the words,
7
+ * the waits, the rules and the limits, and holds nothing between calls.
15
8
  */
16
9
  import { z } from "zod";
17
- import { type Answer } from "./render.ts";
18
- import { type Phase, type SessionView } from "./view.ts";
19
- /** One session as the host lists it. `name` is what people and agents call it. */
20
- export interface SessionEntry {
21
- /** The host's id. */
22
- id: string;
23
- /** What people call it; unique within its group. */
24
- name: string;
25
- /** What it belongs to (a project, a repository). Listed under it. */
26
- group?: string;
27
- phase: Phase;
28
- title?: string;
29
- /** Epoch milliseconds. */
30
- lastActivityAt?: number;
31
- /** A few words the host adds to the row (lines changed, a pull request). */
32
- note?: string;
33
- /** Paths in this session's tool lines are shown relative to this folder. */
34
- root?: string;
35
- }
36
- export interface SendOptions {
37
- /** `interrupt` stops a running turn first; `auto` is refused while one runs. */
38
- delivery: "auto" | "interrupt";
39
- }
40
- export interface ViewOptions {
41
- /** The most recent messages wanted. A host may give more; the operator cuts. */
42
- last?: number;
43
- }
44
- export interface StartInput {
45
- /** The group (project) the new session is listed under. */
46
- group: string;
47
- /** Its first task. */
48
- message: string;
49
- }
50
- /**
51
- * What `send` may resolve to. `duplicate: true`: this caller's identical
52
- * request is still in flight, so nothing new was sent. Resolving to nothing
53
- * (or `duplicate` absent or false) means a new turn was sent.
54
- */
55
- export interface SendResult {
56
- duplicate?: boolean;
57
- /**
58
- * One line in the host's words about what the send did that the view cannot
59
- * show (for example, a message the host held that this one replaced).
60
- * `send_message` says it before the outcome.
61
- */
62
- note?: string;
63
- }
64
- /**
65
- * What `start` returns: the session, with `duplicate: true` when this caller's
66
- * identical start is still in flight (that session is returned) and nothing
67
- * new was started.
68
- */
69
- export interface StartResult extends SessionEntry {
70
- duplicate?: boolean;
71
- }
72
- export interface OperatorHost<Caller = unknown> {
73
- /** The sessions this caller may see. */
74
- list(caller: Caller): Promise<SessionEntry[]>;
75
- view(caller: Caller, sessionId: string, options?: ViewOptions): Promise<SessionView>;
76
- /**
77
- * Start a turn. The host chooses the agent, model, permissions and turn id.
78
- * Refuse (throw an `OperatorError`) a turn while another runs and `delivery`
79
- * is `auto`. A repeat is the same caller, the same session and the same
80
- * message (trimmed) while the turn that message started is being sent or has
81
- * not ended, whatever its `delivery`: send nothing and resolve to
82
- * `{ duplicate: true }`. The operator then reports that turn as it stands,
83
- * and never waits for a new one to show. Once that turn has ended, the same
84
- * words are a new turn. Recognising a repeat is optional: a host that never
85
- * reports one refuses it as busy, which is safe. With `interrupt`, resolve
86
- * only once the turn it stops has ended: the operator then takes the next
87
- * working view as the new turn.
88
- */
89
- send(caller: Caller, sessionId: string, message: string, options: SendOptions): Promise<void | SendResult>;
90
- /**
91
- * Stop the session's turn. Resolve to `{ note }` when the stop is complete in
92
- * a way the view cannot show (for example, a message the host held, dropped
93
- * before it was sent): `stop_session` answers with the note and does not
94
- * wait for the view to change.
95
- */
96
- cancel(caller: Caller, sessionId: string): Promise<void | {
97
- note: string;
98
- }>;
99
- respond(caller: Caller, sessionId: string, answer: Answer): Promise<void>;
100
- /**
101
- * Optional: create a session in a group and give it its first task. Enables
102
- * `start_session`. It may return as soon as the session exists: until its
103
- * first turn begins, its view is `working` with no messages, and the
104
- * operator waits through that like a turn. A repeat is the same caller, the
105
- * same group (case-insensitive) and the same message while the session it
106
- * made is being set up or its first turn has not ended: return that session
107
- * with `duplicate: true` and start nothing. Recognising a repeat is
108
- * optional: a host that never reports one starts a second session.
109
- */
110
- start?(caller: Caller, input: StartInput): Promise<StartResult>;
111
- /**
112
- * Optional: the name of every group (project) this caller could start a
113
- * session in, those with no session included. `list_sessions` then shows
114
- * the empty ones too, and the `start_session` hint names a real one.
115
- */
116
- groups?(caller: Caller): Promise<string[]>;
117
- /**
118
- * Optional: the session with this id, for one `list` leaves out (a host that
119
- * lists only its newest). Tried, with the reference as given (trimmed), when
120
- * it names nothing listed. Throw an `OperatorError` to refuse it in your
121
- * words: one the host knows but will not act on (archived) is no typo.
122
- */
123
- entry?(caller: Caller, sessionId: string): Promise<SessionEntry | undefined>;
124
- /** Optional: one line of host facts appended when a turn has settled ("changes: a.ts (+4 -0)"). */
125
- outcome?(caller: Caller, entry: SessionEntry): Promise<string | undefined>;
126
- /**
127
- * Optional: resolves when any session may have changed. Remove what it
128
- * registered when `signal` aborts (it always does, after each look). Without
129
- * it the operator looks again every half second.
130
- */
131
- changed?(signal: AbortSignal): Promise<void>;
132
- }
133
- export interface Tool<Caller = unknown> {
134
- name: string;
135
- title: string;
136
- description: string;
137
- input: z.ZodObject;
138
- /** A tool that only reads: assistants run these without asking the person. */
139
- readOnly: boolean;
140
- /** It reaches past this host (sends something elsewhere): MCP's `openWorldHint`. */
141
- openWorld?: boolean;
142
- /** It may undo or lose work (stops a turn, removes something): MCP's `destructiveHint`. */
143
- destructive?: boolean;
144
- run(args: never, caller: Caller): Promise<string>;
145
- }
146
- /** Declare a tool, typed by its input. Hosts use this for their own tools. */
147
- export declare function tool<Shape extends z.ZodRawShape, Caller = unknown>(def: {
10
+ import type { CallScope, Caller, Effect, ExtraTool, Limits, Operator, OperatorHost, OperatorOptions, WaitCaps } from "./types.ts";
11
+ /** Declare a tool, typed by its input. Hosts use this for their own (`effect`: what it does, honestly). */
12
+ export declare function tool<Shape extends z.ZodRawShape, Auth = unknown>(def: {
148
13
  name: string;
149
14
  title: string;
150
15
  description: string;
151
16
  input: Shape;
152
- readOnly: boolean;
17
+ effect: Effect;
153
18
  openWorld?: boolean;
154
- destructive?: boolean;
155
- run(args: z.infer<z.ZodObject<Shape>>, caller: Caller): Promise<string>;
156
- }): Tool<Caller>;
157
- /** A tool as any transport lists it. */
158
- export interface ToolInfo {
159
- name: string;
160
- title: string;
161
- description: string;
162
- /** JSON Schema of the arguments (an object). */
163
- inputSchema: unknown;
164
- readOnly: boolean;
165
- /** It reaches past this host: MCP's `openWorldHint`. */
166
- openWorld?: boolean;
167
- /** It may undo or lose work: MCP's `destructiveHint`. */
168
- destructive?: boolean;
169
- }
170
- /** Time, for the waits. Tests pass their own; the default is the wall clock. */
171
- export interface OperatorClock {
172
- now(): number;
173
- /** Resolve after `ms`, or as soon as `signal` aborts. */
174
- pause(ms: number, signal: AbortSignal): Promise<void>;
175
- }
176
- export interface OperatorOptions<Caller> {
177
- /**
178
- * No held call outlasts this (hosted assistants cut a tool call off after 2
179
- * to 4 minutes). Default 90. A function is asked once per call, for the
180
- * calling caller (a host holds a call no longer than the caller's sign-in
181
- * has left). Below one second, a call does not wait: it looks once and
182
- * answers, a working session as still working.
183
- */
184
- maxWaitSeconds?: number | ((caller: Caller) => number);
185
- /** The host's own tools, listed after the session tools. */
186
- extra?: Tool<Caller>[];
187
- clock?: OperatorClock;
188
- }
189
- export interface Operator<Caller = unknown> {
190
- /**
191
- * The tools, as any transport lists them: the same for every caller (an
192
- * assistant keeps the list it got when it connected). A host that limits
193
- * what a caller may run checks around `call`, in its own words.
194
- */
195
- tools(caller: Caller): ToolInfo[];
196
- /** Run one tool and answer in text. Refusals a model can act on are `OperatorError`s. */
197
- call(name: string, args: unknown, caller: Caller): Promise<string>;
198
- /** The session a model's `session` argument names (name, `group/name` or id). */
199
- find(caller: Caller, ref: string): Promise<SessionEntry>;
200
- }
201
- /** A refusal a model can act on: its message says what to do instead. */
202
- export declare class OperatorError extends Error {
203
- name: string;
204
- }
205
- export declare function createOperator<Caller = unknown>(host: OperatorHost<Caller>, options?: OperatorOptions<Caller>): Operator<Caller>;
19
+ run(args: z.infer<z.ZodObject<Shape>>, caller: Caller<Auth>, call: CallScope): Promise<string>;
20
+ }): ExtraTool<Auth>;
21
+ export declare const DEFAULT_LIMITS: Limits;
22
+ export declare const DEFAULT_WAITS: WaitCaps;
23
+ export declare function createOperator<Auth = unknown>(host: OperatorHost<Auth>, options?: OperatorOptions<Auth>): Operator<Auth>;
206
24
  //# sourceMappingURL=operator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"operator.d.ts","sourceRoot":"","sources":["../../../src/operator/operator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACN,KAAK,MAAM,EAUX,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,WAAW,EAAW,MAAM,WAAW,CAAC;AAElE,kFAAkF;AAClF,MAAM,WAAW,YAAY;IAC5B,qBAAqB;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,oDAAoD;IACpD,IAAI,EAAE,MAAM,CAAC;IACb,qEAAqE;IACrE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,KAAK,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0BAA0B;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,4EAA4E;IAC5E,IAAI,CAAC,EAAE,MA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AAI,CAAC,EAAE,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAC/F,GAAG,SAAS,CAAC,IAAI,CAAC,CAElB;AAED,eAAO,MAAM,cAAc,EAAE,MAI5B,CAAC;AACF,eAAO,MAAM,aAAa,EAAE,QAG3B,CAAC;AA6FF,wBAAgB,cAAc,CAAC,IAAI,GAAG,OAAO,EAC5C,IAAI,EAAE,YAAY,CAAC,IAAI,CAAC,EACxB,OAAO,GAAE,eAAe,CAAC,IAAI,CAAM,GACjC,QAAQ,CAAC,IAAI,CAAC,CA4iDhB"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * References a model types: `id / [project "/"] workspace [":" chat]`. What
3
+ * the tools print is always explicit (`workspace:N`, or the session's id when
4
+ * the host numbers no chats), so a printed reference never moves to another
5
+ * chat.
6
+ */
7
+ import type { Entry } from "./types.ts";
8
+ /** How the tools print an entry: `[project/]workspace:N`, or its id when it has no number. */
9
+ export declare function refOf(entry: Entry, all: readonly Entry[]): string;
10
+ /** What a reference resolved to: one entry, several, or none. */
11
+ export type Resolved = {
12
+ found: Entry;
13
+ } | {
14
+ ambiguous: Entry[];
15
+ } | {
16
+ missing: true;
17
+ };
18
+ /**
19
+ * The entry `ref` names among `all` (everything the caller may see, archived
20
+ * included). An id is exact: a session's, or a workspace's (its current
21
+ * chat). A name is case-insensitive; a bare workspace means its current chat,
22
+ * resolved now.
23
+ */
24
+ export declare function resolve(ref: string, all: readonly Entry[]): Resolved;
25
+ //# sourceMappingURL=refs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"refs.d.ts","sourceRoot":"","sources":["../../../src/operator/refs.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAExC,8FAA8F;AAC9F,wBAAgB,KAAK,CAAC,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,SAAS,KAAK,EAAE,GAAG,MAAM,CASjE;AAED,iEAAiE;AACjE,MAAM,MAAM,QAAQ,GAAG;IAAE,KAAK,EAAE,KAAK,CAAA;CAAE,GAAG;IAAE,SAAS,EAAE,KAAK,EAAE,CAAA;CAAE,GAAG;IAAE,OAAO,EAAE,IAAI,CAAA;CAAE,CAAC;AAErF;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,KAAK,EAAE,GAAG,QAAQ,CA6BpE"}