@1agents/acp-service 0.9.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (274) hide show
  1. package/README.md +19 -13
  2. package/dist/bin/a2a.js +6 -2
  3. package/dist/bin/acp-service.js +25 -1
  4. package/dist/bin/process.d.ts +4 -0
  5. package/dist/bin/process.js +57 -0
  6. package/dist/bin/roles.js +21 -18
  7. package/dist/bin/rsi.d.ts +3 -0
  8. package/dist/bin/rsi.js +114 -0
  9. package/dist/bin/ticket.d.ts +13 -0
  10. package/dist/bin/ticket.js +97 -0
  11. package/dist/bin/trail.d.ts +4 -0
  12. package/dist/bin/trail.js +62 -0
  13. package/dist/src/a2a/artifact-content.d.ts +9 -0
  14. package/dist/src/a2a/artifact-content.js +45 -0
  15. package/dist/src/a2a/desktop-notify.d.ts +1 -0
  16. package/dist/src/a2a/desktop-notify.js +12 -0
  17. package/dist/src/a2a/execution-binding.d.ts +9 -0
  18. package/dist/src/a2a/execution-binding.js +19 -0
  19. package/dist/src/a2a/executor.d.ts +7 -2
  20. package/dist/src/a2a/executor.js +127 -60
  21. package/dist/src/a2a/gateway.d.ts +581 -10
  22. package/dist/src/a2a/gateway.js +1018 -95
  23. package/dist/src/a2a/index.d.ts +8 -1
  24. package/dist/src/a2a/index.js +4 -0
  25. package/dist/src/a2a/job-directory.d.ts +6 -0
  26. package/dist/src/a2a/job-directory.js +19 -0
  27. package/dist/src/a2a/preflight.js +16 -1
  28. package/dist/src/a2a/resubmit.d.ts +46 -0
  29. package/dist/src/a2a/resubmit.js +82 -0
  30. package/dist/src/a2a/result-metadata.d.ts +3 -0
  31. package/dist/src/a2a/result-metadata.js +27 -5
  32. package/dist/src/a2a/server.d.ts +10 -0
  33. package/dist/src/a2a/server.js +125 -1
  34. package/dist/src/a2a/session-lifecycle.d.ts +40 -0
  35. package/dist/src/a2a/session-lifecycle.js +54 -0
  36. package/dist/src/a2a/store.d.ts +4 -0
  37. package/dist/src/a2a/store.js +70 -1
  38. package/dist/src/a2a/types.d.ts +46 -6
  39. package/dist/src/a2a/types.js +4 -6
  40. package/dist/src/a2a/workbench-ui.d.ts +28 -0
  41. package/dist/src/a2a/workbench-ui.js +182 -0
  42. package/dist/src/acp-connection.js +27 -3
  43. package/dist/src/bridge.d.ts +1 -0
  44. package/dist/src/bridge.js +191 -39
  45. package/dist/src/capacity-queue.d.ts +35 -0
  46. package/dist/src/capacity-queue.js +139 -2
  47. package/dist/src/capacity.d.ts +25 -0
  48. package/dist/src/capacity.js +48 -9
  49. package/dist/src/dsh.js +1 -1
  50. package/dist/src/execution/agent-files.d.ts +25 -0
  51. package/dist/src/execution/agent-files.js +90 -0
  52. package/dist/src/execution/agent-registry.d.ts +164 -0
  53. package/dist/src/execution/agent-registry.js +275 -0
  54. package/dist/src/execution/human-review.d.ts +2 -0
  55. package/dist/src/execution/human-review.js +3 -1
  56. package/dist/src/execution/ledger.d.ts +52 -0
  57. package/dist/src/execution/ledger.js +83 -5
  58. package/dist/src/execution/ppt-delivery.d.ts +0 -5
  59. package/dist/src/execution/ppt-delivery.js +0 -26
  60. package/dist/src/execution/process-request.d.ts +151 -0
  61. package/dist/src/execution/process-request.js +177 -0
  62. package/dist/src/execution/targets.d.ts +64 -5
  63. package/dist/src/execution/targets.js +58 -7
  64. package/dist/src/execution/ticket-executor.d.ts +25 -0
  65. package/dist/src/execution/ticket-executor.js +27 -0
  66. package/dist/src/execution/ticket.d.ts +326 -0
  67. package/dist/src/execution/ticket.js +301 -0
  68. package/dist/src/execution/workbench-chat.d.ts +25 -0
  69. package/dist/src/execution/workbench-chat.js +54 -0
  70. package/dist/src/execution/workbench.d.ts +32 -1
  71. package/dist/src/execution/workbench.js +113 -22
  72. package/dist/src/roles/index.d.ts +1 -1
  73. package/dist/src/roles/index.js +1 -1
  74. package/dist/src/roles/skills.d.ts +27 -58
  75. package/dist/src/roles/skills.js +89 -404
  76. package/dist/src/rsi/gate.d.ts +25 -0
  77. package/dist/src/rsi/gate.js +59 -0
  78. package/dist/src/rsi/outline-run.d.ts +107 -0
  79. package/dist/src/rsi/outline-run.js +443 -0
  80. package/dist/workbench-ui/app.css +453 -0
  81. package/dist/workbench-ui/app.js +13 -0
  82. package/dist/workbench-ui/chunk-23JHGYT3.js +1 -0
  83. package/dist/workbench-ui/chunk-3H6STGPV.js +1 -0
  84. package/dist/workbench-ui/chunk-3SNBBMGH.js +1 -0
  85. package/dist/workbench-ui/chunk-3XJZ6DIE.js +1 -0
  86. package/dist/workbench-ui/chunk-44KDLLKJ.js +1 -0
  87. package/dist/workbench-ui/chunk-46H7FU5Y.js +7 -0
  88. package/dist/workbench-ui/chunk-4N44QPL7.js +1 -0
  89. package/dist/workbench-ui/chunk-4YN4BS7I.js +1 -0
  90. package/dist/workbench-ui/chunk-53EG4IVQ.js +96 -0
  91. package/dist/workbench-ui/chunk-5FIPUNR4.js +1 -0
  92. package/dist/workbench-ui/chunk-6DWWYA6G.js +2 -0
  93. package/dist/workbench-ui/chunk-6FU3T633.js +99 -0
  94. package/dist/workbench-ui/chunk-6XKIHRA4.js +1 -0
  95. package/dist/workbench-ui/chunk-7GIX43Y5.js +1 -0
  96. package/dist/workbench-ui/chunk-7Q4WBGX6.js +4 -0
  97. package/dist/workbench-ui/chunk-A3BQM7HR.js +1 -0
  98. package/dist/workbench-ui/chunk-AFCFDDOP.js +24 -0
  99. package/dist/workbench-ui/chunk-AG67EUYD.js +89 -0
  100. package/dist/workbench-ui/chunk-AGJHMMTN.js +1 -0
  101. package/dist/workbench-ui/chunk-AO6JUBV6.js +41 -0
  102. package/dist/workbench-ui/chunk-AUSLTP43.js +72 -0
  103. package/dist/workbench-ui/chunk-AVZL46TT.js +1 -0
  104. package/dist/workbench-ui/chunk-AZRIGIV2.js +168 -0
  105. package/dist/workbench-ui/chunk-B2LIVH37.js +1 -0
  106. package/dist/workbench-ui/chunk-B7YX5TR5.js +1 -0
  107. package/dist/workbench-ui/chunk-BCB4X4XX.js +1 -0
  108. package/dist/workbench-ui/chunk-BCRQUL2A.js +88 -0
  109. package/dist/workbench-ui/chunk-BI6UHHQP.js +1 -0
  110. package/dist/workbench-ui/chunk-BLSLQ4AQ.js +120 -0
  111. package/dist/workbench-ui/chunk-C3QSRS6E.js +1 -0
  112. package/dist/workbench-ui/chunk-CK7M2PJ3.js +62 -0
  113. package/dist/workbench-ui/chunk-CM6LZ7TU.js +1 -0
  114. package/dist/workbench-ui/chunk-CP63H27F.js +36 -0
  115. package/dist/workbench-ui/chunk-CPUMMIS2.js +70 -0
  116. package/dist/workbench-ui/chunk-CSEIBI5U.js +2 -0
  117. package/dist/workbench-ui/chunk-CUS65DKZ.js +161 -0
  118. package/dist/workbench-ui/chunk-CVQY7TNC.js +1 -0
  119. package/dist/workbench-ui/chunk-D6S3XBIX.js +106 -0
  120. package/dist/workbench-ui/chunk-E253Y562.js +1 -0
  121. package/dist/workbench-ui/chunk-EADDJUDC.js +1 -0
  122. package/dist/workbench-ui/chunk-EBGJ3YXG.js +206 -0
  123. package/dist/workbench-ui/chunk-EKPVZ3WY.js +8 -0
  124. package/dist/workbench-ui/chunk-EQDCEAFY.js +1 -0
  125. package/dist/workbench-ui/chunk-ES3SSDJY.js +40 -0
  126. package/dist/workbench-ui/chunk-ESFD2H7N.js +231 -0
  127. package/dist/workbench-ui/chunk-FVOHPMS6.js +1 -0
  128. package/dist/workbench-ui/chunk-FXMQAGVT.js +1 -0
  129. package/dist/workbench-ui/chunk-GGTADRXD.js +24 -0
  130. package/dist/workbench-ui/chunk-GHIVPGNQ.js +1 -0
  131. package/dist/workbench-ui/chunk-GLU2YQV2.js +1 -0
  132. package/dist/workbench-ui/chunk-GOCKBYSM.js +1 -0
  133. package/dist/workbench-ui/chunk-H2KMMTJB.js +1 -0
  134. package/dist/workbench-ui/chunk-HGVLDNPP.js +39 -0
  135. package/dist/workbench-ui/chunk-HSAVC5GY.js +1 -0
  136. package/dist/workbench-ui/chunk-HSEAD2JH.js +1 -0
  137. package/dist/workbench-ui/chunk-HSIHOBTY.js +1 -0
  138. package/dist/workbench-ui/chunk-IZXOKUGG.js +67 -0
  139. package/dist/workbench-ui/chunk-JFT2LC2T.js +1 -0
  140. package/dist/workbench-ui/chunk-JHL3ZDYK.js +3 -0
  141. package/dist/workbench-ui/chunk-JMORLCZG.js +257 -0
  142. package/dist/workbench-ui/chunk-JR4SIX7A.js +1 -0
  143. package/dist/workbench-ui/chunk-K23HAGEH.js +30 -0
  144. package/dist/workbench-ui/chunk-K43JDCBH.js +1 -0
  145. package/dist/workbench-ui/chunk-KINKFJY7.js +1 -0
  146. package/dist/workbench-ui/chunk-KKQSA4LI.js +2 -0
  147. package/dist/workbench-ui/chunk-KOUZX3UX.js +1 -0
  148. package/dist/workbench-ui/chunk-KR4DRHW2.js +78 -0
  149. package/dist/workbench-ui/chunk-KT4DJNOR.js +1 -0
  150. package/dist/workbench-ui/chunk-KTPNKRRZ.js +292 -0
  151. package/dist/workbench-ui/chunk-LFHIPGSU.js +7 -0
  152. package/dist/workbench-ui/chunk-LWDL4HZB.js +125 -0
  153. package/dist/workbench-ui/chunk-MVYC3CY4.js +1 -0
  154. package/dist/workbench-ui/chunk-NWUPALCY.js +129 -0
  155. package/dist/workbench-ui/chunk-NY7C662Z.js +1 -0
  156. package/dist/workbench-ui/chunk-O76WTHWP.js +1 -0
  157. package/dist/workbench-ui/chunk-OTF7YHRE.js +162 -0
  158. package/dist/workbench-ui/chunk-P6TKKRKP.js +1 -0
  159. package/dist/workbench-ui/chunk-PFHOOWV3.js +1 -0
  160. package/dist/workbench-ui/chunk-PUQLANIM.js +1 -0
  161. package/dist/workbench-ui/chunk-PZCGBYVO.js +1 -0
  162. package/dist/workbench-ui/chunk-QOHUZGP4.js +1 -0
  163. package/dist/workbench-ui/chunk-QSEG3OFF.js +1 -0
  164. package/dist/workbench-ui/chunk-QYPOXZIA.js +84 -0
  165. package/dist/workbench-ui/chunk-R6SOF3JC.js +1 -0
  166. package/dist/workbench-ui/chunk-RCLOYU5F.js +1 -0
  167. package/dist/workbench-ui/chunk-RSRUP64S.js +1 -0
  168. package/dist/workbench-ui/chunk-RVAIT6JW.js +1 -0
  169. package/dist/workbench-ui/chunk-S2CCN3II.js +1 -0
  170. package/dist/workbench-ui/chunk-S2Q52W46.js +1 -0
  171. package/dist/workbench-ui/chunk-S2W5THJ5.js +1 -0
  172. package/dist/workbench-ui/chunk-S6ZQZNOX.js +1 -0
  173. package/dist/workbench-ui/chunk-S74PLMMS.js +1 -0
  174. package/dist/workbench-ui/chunk-S7C4HKEY.js +1 -0
  175. package/dist/workbench-ui/chunk-SDTB3Q65.js +1 -0
  176. package/dist/workbench-ui/chunk-SLPRGYUV.js +32 -0
  177. package/dist/workbench-ui/chunk-SQE76S5B.js +1 -0
  178. package/dist/workbench-ui/chunk-SSDZPVPW.js +1 -0
  179. package/dist/workbench-ui/chunk-SVI7DGIE.js +1 -0
  180. package/dist/workbench-ui/chunk-T6QKLZ4H.js +62 -0
  181. package/dist/workbench-ui/chunk-TJNRPTFL.js +1 -0
  182. package/dist/workbench-ui/chunk-TP6U4EDH.js +2 -0
  183. package/dist/workbench-ui/chunk-TYAAT3GQ.js +1 -0
  184. package/dist/workbench-ui/chunk-U6OCY4ZH.js +1 -0
  185. package/dist/workbench-ui/chunk-UAN3NLRF.js +1 -0
  186. package/dist/workbench-ui/chunk-UMLU3FIX.js +1 -0
  187. package/dist/workbench-ui/chunk-URIY2OTM.js +1 -0
  188. package/dist/workbench-ui/chunk-V2NUKAA7.js +38 -0
  189. package/dist/workbench-ui/chunk-V4QLL4TE.js +139 -0
  190. package/dist/workbench-ui/chunk-VASHXUK4.js +2 -0
  191. package/dist/workbench-ui/chunk-VJLIWNIU.js +1 -0
  192. package/dist/workbench-ui/chunk-VQNQFBID.js +1 -0
  193. package/dist/workbench-ui/chunk-VSIWU7XA.js +3 -0
  194. package/dist/workbench-ui/chunk-VSJASPUZ.js +321 -0
  195. package/dist/workbench-ui/chunk-VXPNUNUX.js +3 -0
  196. package/dist/workbench-ui/chunk-WBKLDCV6.js +1 -0
  197. package/dist/workbench-ui/chunk-WOKJM3FY.js +1 -0
  198. package/dist/workbench-ui/chunk-X3U3NA3X.js +34 -0
  199. package/dist/workbench-ui/chunk-XBYU7M4J.js +1 -0
  200. package/dist/workbench-ui/chunk-XBZAO4ID.js +10 -0
  201. package/dist/workbench-ui/chunk-XLLPZ2WO.js +1 -0
  202. package/dist/workbench-ui/chunk-YFVL4NJL.js +1 -0
  203. package/dist/workbench-ui/chunk-YRFQENM4.js +1 -0
  204. package/dist/workbench-ui/chunk-YUADQVB2.js +1 -0
  205. package/dist/workbench-ui/chunk-Z3TCAKM5.js +1 -0
  206. package/dist/workbench-ui/chunk-Z6QR6FRE.js +10 -0
  207. package/dist/workbench-ui/chunk-ZJPSORPP.js +3 -0
  208. package/dist/workbench-ui/chunk-ZLGCSTR2.js +15 -0
  209. package/dist/workbench-ui/chunk-ZLR4SG5X.js +1 -0
  210. package/dist/workbench-ui/chunk-ZND3TTGF.js +1 -0
  211. package/dist/workbench-ui/chunk-ZOP3ZYH7.js +2 -0
  212. package/dist/workbench-ui/index.html +14 -0
  213. package/package.json +19 -8
  214. package/skills/acp-service/SKILL.md +4 -2
  215. package/skills/acp-service/references/a2a.md +18 -6
  216. package/skills/acp-service/references/dsh.md +2 -0
  217. package/skills/acp-service/references/roles-and-tasks.md +10 -10
  218. package/skills/rsi-coach/SKILL.md +134 -0
  219. package/vendor/dsh/README.md +10 -6
  220. package/vendor/dsh/a2a-executor.d.ts +56 -2
  221. package/vendor/dsh/a2a-executor.js +163 -17
  222. package/vendor/dsh/a2a.d.ts +12 -2
  223. package/vendor/dsh/a2a.js +9 -2
  224. package/vendor/dsh/adapter.d.ts +52 -3
  225. package/vendor/dsh/adapter.js +297 -30
  226. package/vendor/dsh/client.js +67 -11
  227. package/vendor/dsh/index.js +55 -3
  228. package/vendor/dsh/native-approvals.d.ts +4 -0
  229. package/vendor/dsh/native-approvals.js +44 -0
  230. package/vendor/dsh/preset-route.d.ts +49 -0
  231. package/vendor/dsh/preset-route.js +51 -0
  232. package/vendor/dsh/preset.js +10 -3
  233. package/vendor/dsh/process-admission.d.ts +25 -0
  234. package/vendor/dsh/process-admission.js +87 -0
  235. package/vendor/dsh/process-requests.d.ts +57 -0
  236. package/vendor/dsh/process-requests.js +49 -0
  237. package/vendor/dsh/review-mcp.d.ts +1 -0
  238. package/vendor/dsh/review-mcp.js +56 -0
  239. package/vendor/dsh/review.d.ts +30 -0
  240. package/vendor/dsh/review.js +149 -0
  241. package/vendor/dsh/session-settings.d.ts +34 -0
  242. package/vendor/dsh/session-settings.js +114 -0
  243. package/vendor/dsh/ticket-spec.d.ts +30 -0
  244. package/vendor/dsh/ticket-spec.js +10 -0
  245. package/vendor/dsh/ticket-tools.d.ts +21 -0
  246. package/vendor/dsh/ticket-tools.js +43 -0
  247. package/vendor/dsh/workbench.d.ts +18 -0
  248. package/vendor/dsh/workbench.js +91 -0
  249. package/vendor/runtime/README.md +6 -4
  250. package/vendor/runtime/dist/docs-site/CLI.html +2 -2
  251. package/vendor/runtime/dist/docs-site/VISION.html +2 -2
  252. package/vendor/runtime/dist/docs-site/agents.html +2 -2
  253. package/vendor/runtime/dist/docs-site/compare.html +2 -2
  254. package/vendor/runtime/dist/docs-site/config.html +2 -2
  255. package/vendor/runtime/dist/docs-site/custom-agents.html +2 -2
  256. package/vendor/runtime/dist/docs-site/exit-codes.html +2 -2
  257. package/vendor/runtime/dist/docs-site/flows.html +2 -2
  258. package/vendor/runtime/dist/docs-site/index.html +1 -1
  259. package/vendor/runtime/dist/docs-site/install.html +2 -2
  260. package/vendor/runtime/dist/docs-site/llms.txt +1 -1
  261. package/vendor/runtime/dist/docs-site/output-formats.html +2 -2
  262. package/vendor/runtime/dist/docs-site/permissions.html +2 -2
  263. package/vendor/runtime/dist/docs-site/prompting.html +2 -2
  264. package/vendor/runtime/dist/docs-site/quickstart.html +2 -2
  265. package/vendor/runtime/dist/docs-site/releasing.html +2 -2
  266. package/vendor/runtime/dist/docs-site/runtime-environment.html +2 -2
  267. package/vendor/runtime/dist/docs-site/runtime-process-lifecycle.html +2 -2
  268. package/vendor/runtime/dist/docs-site/safe-errors.html +2 -2
  269. package/vendor/runtime/dist/docs-site/session-control.html +2 -2
  270. package/vendor/runtime/dist/docs-site/session-watch.html +2 -2
  271. package/vendor/runtime/dist/docs-site/sessions.html +2 -2
  272. package/vendor/runtime/dist/docs-site/shared-sessions.html +2 -2
  273. package/vendor/runtime/package.json +6 -4
  274. package/vendor/runtime/skills/acpx/SKILL.md +2 -0
@@ -1,10 +1,14 @@
1
1
  import { z } from 'zod';
2
2
  import { A2AAutomation } from './automation.js';
3
3
  import { SessionDelivery } from './session-delivery.js';
4
+ import { type CloseReason } from './session-lifecycle.js';
5
+ import { type CapacityInspection } from '../capacity.js';
4
6
  import { TargetDirectory } from '../execution/targets.js';
5
7
  import { ProjectRoleDiscovery } from '../execution/project-discovery.js';
6
8
  import { JobLedger } from '../execution/ledger.js';
9
+ import { type ProcessRequest } from '../execution/process-request.js';
7
10
  import { type WorkbenchListQuery } from '../execution/workbench.js';
11
+ import { AgentRegistry } from '../execution/agent-registry.js';
8
12
  export type { RemoteAgentNotice } from './notices.js';
9
13
  declare const configSchema: z.ZodObject<{
10
14
  stateDirectory: z.ZodString;
@@ -75,10 +79,6 @@ declare const configSchema: z.ZodObject<{
75
79
  runtimeDocument: z.ZodString;
76
80
  designSkill: z.ZodString;
77
81
  pythonExecutable: z.ZodString;
78
- roleSkills: z.ZodOptional<z.ZodObject<{
79
- profilePath: z.ZodString;
80
- cacheRoot: z.ZodString;
81
- }, z.core.$strict>>;
82
82
  nodeExecutable: z.ZodOptional<z.ZodString>;
83
83
  nodeModuleRoot: z.ZodOptional<z.ZodString>;
84
84
  maxRevisionRounds: z.ZodDefault<z.ZodNumber>;
@@ -94,11 +94,21 @@ declare const configSchema: z.ZodObject<{
94
94
  allowedRemotes: z.ZodArray<z.ZodString>;
95
95
  }, z.core.$strict>>;
96
96
  workbench: z.ZodOptional<z.ZodObject<{
97
- token: z.ZodString;
97
+ token: z.ZodOptional<z.ZodString>;
98
98
  reviewerId: z.ZodDefault<z.ZodString>;
99
99
  reviewerName: z.ZodOptional<z.ZodString>;
100
100
  publicBaseUrl: z.ZodOptional<z.ZodString>;
101
+ pageRelaySecret: z.ZodOptional<z.ZodString>;
101
102
  allowedOrigins: z.ZodOptional<z.ZodArray<z.ZodString>>;
103
+ requestTimeoutMinutes: z.ZodDefault<z.ZodNumber>;
104
+ desktopNotifications: z.ZodDefault<z.ZodBoolean>;
105
+ }, z.core.$strict>>;
106
+ capacityDirectory: z.ZodOptional<z.ZodString>;
107
+ sessionLifecycle: z.ZodDefault<z.ZodObject<{
108
+ persistentIdleTtlSeconds: z.ZodDefault<z.ZodNumber>;
109
+ idleScanIntervalMs: z.ZodDefault<z.ZodNumber>;
110
+ inputRequiredAlertSeconds: z.ZodDefault<z.ZodNumber>;
111
+ allowDelete: z.ZodDefault<z.ZodBoolean>;
102
112
  }, z.core.$strict>>;
103
113
  }, z.core.$strict>;
104
114
  export type A2AGatewayConfig = z.input<typeof configSchema>;
@@ -134,7 +144,6 @@ export declare const REMOTE_AGENT_METHODS: {
134
144
  notificationTarget: z.ZodOptional<z.ZodString>;
135
145
  title: z.ZodOptional<z.ZodString>;
136
146
  roleId: z.ZodOptional<z.ZodString>;
137
- roleLockPath: z.ZodOptional<z.ZodString>;
138
147
  preflight: z.ZodOptional<z.ZodObject<{
139
148
  allowedDirectories: z.ZodOptional<z.ZodArray<z.ZodString>>;
140
149
  jobDirectory: z.ZodOptional<z.ZodString>;
@@ -157,6 +166,27 @@ export declare const REMOTE_AGENT_METHODS: {
157
166
  artifactManifestPath: z.ZodOptional<z.ZodString>;
158
167
  }, z.core.$strict>>;
159
168
  clientRequestId: z.ZodOptional<z.ZodString>;
169
+ lifecycle: z.ZodOptional<z.ZodObject<{
170
+ mode: z.ZodDefault<z.ZodEnum<{
171
+ persistent: "persistent";
172
+ "one-shot": "one-shot";
173
+ }>>;
174
+ idleTtlSeconds: z.ZodOptional<z.ZodNumber>;
175
+ closeAfter: z.ZodOptional<z.ZodEnum<{
176
+ terminal: "terminal";
177
+ ack: "ack";
178
+ }>>;
179
+ }, z.core.$strict>>;
180
+ provider: z.ZodOptional<z.ZodString>;
181
+ model: z.ZodOptional<z.ZodString>;
182
+ initiatedBy: z.ZodOptional<z.ZodObject<{
183
+ kind: z.ZodEnum<{
184
+ person: "person";
185
+ coach: "coach";
186
+ }>;
187
+ agent: z.ZodOptional<z.ZodString>;
188
+ sessionId: z.ZodOptional<z.ZodString>;
189
+ }, z.core.$strict>>;
160
190
  originSessionId: z.ZodString;
161
191
  }, z.core.$strict>>;
162
192
  };
@@ -180,9 +210,16 @@ export declare const REMOTE_AGENT_METHODS: {
180
210
  description: string;
181
211
  parameters: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
182
212
  prompt: z.ZodString;
213
+ initiatedBy: z.ZodOptional<z.ZodObject<{
214
+ kind: z.ZodEnum<{
215
+ person: "person";
216
+ coach: "coach";
217
+ }>;
218
+ agent: z.ZodOptional<z.ZodString>;
219
+ sessionId: z.ZodOptional<z.ZodString>;
220
+ }, z.core.$strict>>;
183
221
  clientRequestId: z.ZodOptional<z.ZodString>;
184
222
  roleId: z.ZodOptional<z.ZodString>;
185
- roleLockPath: z.ZodOptional<z.ZodString>;
186
223
  preflight: z.ZodOptional<z.ZodObject<{
187
224
  allowedDirectories: z.ZodOptional<z.ZodArray<z.ZodString>>;
188
225
  jobDirectory: z.ZodOptional<z.ZodString>;
@@ -204,11 +241,45 @@ export declare const REMOTE_AGENT_METHODS: {
204
241
  originSessionId: z.ZodOptional<z.ZodString>;
205
242
  artifactManifestPath: z.ZodOptional<z.ZodString>;
206
243
  }, z.core.$strict>>;
244
+ lifecycle: z.ZodOptional<z.ZodObject<{
245
+ mode: z.ZodDefault<z.ZodEnum<{
246
+ persistent: "persistent";
247
+ "one-shot": "one-shot";
248
+ }>>;
249
+ idleTtlSeconds: z.ZodOptional<z.ZodNumber>;
250
+ closeAfter: z.ZodOptional<z.ZodEnum<{
251
+ terminal: "terminal";
252
+ ack: "ack";
253
+ }>>;
254
+ }, z.core.$strict>>;
255
+ autoResume: z.ZodOptional<z.ZodBoolean>;
256
+ provider: z.ZodOptional<z.ZodString>;
257
+ model: z.ZodOptional<z.ZodString>;
207
258
  remote: z.ZodString;
208
259
  taskId: z.ZodString;
209
260
  originSessionId: z.ZodString;
210
261
  }, z.core.$strict>>;
211
262
  };
263
+ remote_agent_close: {
264
+ description: string;
265
+ parameters: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
266
+ remote: z.ZodString;
267
+ taskId: z.ZodOptional<z.ZodString>;
268
+ contextId: z.ZodOptional<z.ZodString>;
269
+ sessionId: z.ZodOptional<z.ZodString>;
270
+ mode: z.ZodOptional<z.ZodEnum<{
271
+ delete: "delete";
272
+ close: "close";
273
+ }>>;
274
+ force: z.ZodOptional<z.ZodBoolean>;
275
+ clientRequestId: z.ZodOptional<z.ZodString>;
276
+ originSessionId: z.ZodString;
277
+ }, z.core.$strict>>;
278
+ };
279
+ remote_agent_sessions: {
280
+ description: string;
281
+ parameters: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{}, z.core.$strict>>;
282
+ };
212
283
  remote_agent_list: {
213
284
  description: string;
214
285
  parameters: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
@@ -261,6 +332,174 @@ export declare const REMOTE_AGENT_METHODS: {
261
332
  hostReceiptId: z.ZodOptional<z.ZodString>;
262
333
  }, z.core.$strict>>;
263
334
  };
335
+ ticket_get: {
336
+ description: string;
337
+ parameters: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
338
+ originSessionId: z.ZodString;
339
+ jobId: z.ZodString;
340
+ }, z.core.$strict>>;
341
+ };
342
+ ticket_open: {
343
+ description: string;
344
+ parameters: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
345
+ originSessionId: z.ZodString;
346
+ jobId: z.ZodString;
347
+ roleId: z.ZodString;
348
+ caseId: z.ZodString;
349
+ exportPath: z.ZodOptional<z.ZodString>;
350
+ }, z.core.$strict>>;
351
+ };
352
+ ticket_checks: {
353
+ description: string;
354
+ parameters: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
355
+ originSessionId: z.ZodString;
356
+ jobId: z.ZodString;
357
+ results: z.ZodArray<z.ZodObject<{
358
+ itemId: z.ZodString;
359
+ pass: z.ZodBoolean;
360
+ evidence: z.ZodArray<z.ZodUnknown>;
361
+ }, z.core.$strict>>;
362
+ }, z.core.$strict>>;
363
+ };
364
+ ticket_review: {
365
+ description: string;
366
+ parameters: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
367
+ originSessionId: z.ZodString;
368
+ jobId: z.ZodString;
369
+ review: z.ZodObject<{
370
+ verdict: z.ZodEnum<{
371
+ pass: "pass";
372
+ revise: "revise";
373
+ }>;
374
+ summary: z.ZodString;
375
+ scores: z.ZodRecord<z.ZodString, z.ZodNumber>;
376
+ issues: z.ZodArray<z.ZodObject<{
377
+ where: z.ZodString;
378
+ problem: z.ZodString;
379
+ suggestion: z.ZodString;
380
+ severity: z.ZodEnum<{
381
+ must: "must";
382
+ should: "should";
383
+ }>;
384
+ }, z.core.$strict>>;
385
+ previous: z.ZodOptional<z.ZodArray<z.ZodObject<{
386
+ id: z.ZodString;
387
+ status: z.ZodEnum<{
388
+ fixed: "fixed";
389
+ partly: "partly";
390
+ not_fixed: "not_fixed";
391
+ withdrawn: "withdrawn";
392
+ }>;
393
+ note: z.ZodOptional<z.ZodString>;
394
+ }, z.core.$strict>>>;
395
+ proposals: z.ZodOptional<z.ZodArray<z.ZodObject<{
396
+ kind: z.ZodEnum<{
397
+ check: "check";
398
+ role: "role";
399
+ qa: "qa";
400
+ locked: "locked";
401
+ }>;
402
+ text: z.ZodString;
403
+ }, z.core.$strict>>>;
404
+ }, z.core.$loose>;
405
+ qaJobId: z.ZodOptional<z.ZodString>;
406
+ }, z.core.$strict>>;
407
+ };
408
+ ticket_revise: {
409
+ description: string;
410
+ parameters: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
411
+ originSessionId: z.ZodString;
412
+ jobId: z.ZodString;
413
+ note: z.ZodOptional<z.ZodString>;
414
+ }, z.core.$strict>>;
415
+ };
416
+ ticket_show: {
417
+ description: string;
418
+ parameters: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
419
+ jobId: z.ZodString;
420
+ attemptId: z.ZodOptional<z.ZodString>;
421
+ sessionId: z.ZodOptional<z.ZodString>;
422
+ via: z.ZodOptional<z.ZodEnum<{
423
+ cli: "cli";
424
+ dsh: "dsh";
425
+ mcp: "mcp";
426
+ }>>;
427
+ }, z.core.$strict>>;
428
+ };
429
+ ticket_mark: {
430
+ description: string;
431
+ parameters: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
432
+ jobId: z.ZodString;
433
+ attemptId: z.ZodOptional<z.ZodString>;
434
+ sessionId: z.ZodOptional<z.ZodString>;
435
+ via: z.ZodOptional<z.ZodEnum<{
436
+ cli: "cli";
437
+ dsh: "dsh";
438
+ mcp: "mcp";
439
+ }>>;
440
+ itemId: z.ZodString;
441
+ state: z.ZodEnum<{
442
+ done: "done";
443
+ disputed: "disputed";
444
+ }>;
445
+ note: z.ZodString;
446
+ }, z.core.$strict>>;
447
+ };
448
+ ticket_submit: {
449
+ description: string;
450
+ parameters: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
451
+ jobId: z.ZodString;
452
+ attemptId: z.ZodOptional<z.ZodString>;
453
+ sessionId: z.ZodOptional<z.ZodString>;
454
+ via: z.ZodOptional<z.ZodEnum<{
455
+ cli: "cli";
456
+ dsh: "dsh";
457
+ mcp: "mcp";
458
+ }>>;
459
+ }, z.core.$strict>>;
460
+ };
461
+ ticket_proposal: {
462
+ description: string;
463
+ parameters: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
464
+ originSessionId: z.ZodString;
465
+ jobId: z.ZodString;
466
+ proposalId: z.ZodString;
467
+ state: z.ZodEnum<{
468
+ done: "done";
469
+ accepted: "accepted";
470
+ rejected: "rejected";
471
+ }>;
472
+ note: z.ZodOptional<z.ZodString>;
473
+ by: z.ZodOptional<z.ZodObject<{
474
+ kind: z.ZodEnum<{
475
+ person: "person";
476
+ coach: "coach";
477
+ }>;
478
+ agent: z.ZodOptional<z.ZodString>;
479
+ sessionId: z.ZodOptional<z.ZodString>;
480
+ }, z.core.$strict>>;
481
+ }, z.core.$strict>>;
482
+ };
483
+ ticket_close: {
484
+ description: string;
485
+ parameters: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
486
+ originSessionId: z.ZodString;
487
+ jobId: z.ZodString;
488
+ status: z.ZodEnum<{
489
+ stopped: "stopped";
490
+ closed: "closed";
491
+ }>;
492
+ stopReason: z.ZodOptional<z.ZodString>;
493
+ }, z.core.$strict>>;
494
+ };
495
+ ticket_reopen: {
496
+ description: string;
497
+ parameters: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
498
+ originSessionId: z.ZodString;
499
+ jobId: z.ZodString;
500
+ note: z.ZodOptional<z.ZodString>;
501
+ }, z.core.$strict>>;
502
+ };
264
503
  execution_submit: {
265
504
  description: string;
266
505
  parameters: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
@@ -279,6 +518,14 @@ export declare const REMOTE_AGENT_METHODS: {
279
518
  sourceId: z.ZodString;
280
519
  jobId: z.ZodString;
281
520
  }, z.core.$strict>>;
521
+ initiatedBy: z.ZodOptional<z.ZodObject<{
522
+ kind: z.ZodEnum<{
523
+ person: "person";
524
+ coach: "coach";
525
+ }>;
526
+ agent: z.ZodOptional<z.ZodString>;
527
+ sessionId: z.ZodOptional<z.ZodString>;
528
+ }, z.core.$strict>>;
282
529
  originSessionId: z.ZodString;
283
530
  }, z.core.$strict>>;
284
531
  };
@@ -289,6 +536,14 @@ export declare const REMOTE_AGENT_METHODS: {
289
536
  originSessionId: z.ZodString;
290
537
  input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
291
538
  clientRequestId: z.ZodOptional<z.ZodString>;
539
+ initiatedBy: z.ZodOptional<z.ZodObject<{
540
+ kind: z.ZodEnum<{
541
+ person: "person";
542
+ coach: "coach";
543
+ }>;
544
+ agent: z.ZodOptional<z.ZodString>;
545
+ sessionId: z.ZodOptional<z.ZodString>;
546
+ }, z.core.$strict>>;
292
547
  }, z.core.$strict>>;
293
548
  };
294
549
  execution_cancel: {
@@ -339,6 +594,62 @@ export declare const REMOTE_AGENT_METHODS: {
339
594
  changes_requested: "changes_requested";
340
595
  }>;
341
596
  note: z.ZodOptional<z.ZodString>;
597
+ decidedBy: z.ZodObject<{
598
+ kind: z.ZodEnum<{
599
+ person: "person";
600
+ coach: "coach";
601
+ }>;
602
+ agent: z.ZodOptional<z.ZodString>;
603
+ sessionId: z.ZodOptional<z.ZodString>;
604
+ }, z.core.$strict>;
605
+ }, z.core.$strict>>;
606
+ };
607
+ execution_rewatch: {
608
+ description: string;
609
+ parameters: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
610
+ jobId: z.ZodString;
611
+ originSessionId: z.ZodString;
612
+ }, z.core.$strict>>;
613
+ };
614
+ execution_unwatch: {
615
+ description: string;
616
+ parameters: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
617
+ jobId: z.ZodString;
618
+ originSessionId: z.ZodString;
619
+ reason: z.ZodString;
620
+ }, z.core.$strict>>;
621
+ };
622
+ execution_process_requests: {
623
+ description: string;
624
+ parameters: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
625
+ jobId: z.ZodString;
626
+ originSessionId: z.ZodString;
627
+ }, z.core.$strict>>;
628
+ };
629
+ execution_process_answer: {
630
+ description: string;
631
+ parameters: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
632
+ jobId: z.ZodString;
633
+ originSessionId: z.ZodString;
634
+ requestId: z.ZodString;
635
+ clientRequestId: z.ZodString;
636
+ outcome: z.ZodEnum<{
637
+ cancelled: "cancelled";
638
+ abandoned: "abandoned";
639
+ accepted: "accepted";
640
+ rejected: "rejected";
641
+ approved: "approved";
642
+ }>;
643
+ note: z.ZodOptional<z.ZodString>;
644
+ stopTask: z.ZodOptional<z.ZodLiteral<true>>;
645
+ decidedBy: z.ZodOptional<z.ZodObject<{
646
+ kind: z.ZodEnum<{
647
+ person: "person";
648
+ coach: "coach";
649
+ }>;
650
+ agent: z.ZodOptional<z.ZodString>;
651
+ sessionId: z.ZodOptional<z.ZodString>;
652
+ }, z.core.$strict>>;
342
653
  }, z.core.$strict>>;
343
654
  };
344
655
  execution_inbox: {
@@ -467,12 +778,15 @@ export declare const REMOTE_AGENT_METHODS: {
467
778
  agentPreset: z.ZodOptional<z.ZodString>;
468
779
  roleId: z.ZodOptional<z.ZodString>;
469
780
  skillRefs: z.ZodOptional<z.ZodArray<z.ZodString>>;
470
- skillPolicy: z.ZodOptional<z.ZodLiteral<"network_pinned">>;
781
+ loadRole: z.ZodOptional<z.ZodLiteral<true>>;
471
782
  allowedDirectories: z.ZodOptional<z.ZodArray<z.ZodString>>;
472
783
  allowedPresets: z.ZodOptional<z.ZodArray<z.ZodString>>;
473
784
  flowId: z.ZodOptional<z.ZodString>;
474
785
  flowVersion: z.ZodOptional<z.ZodString>;
475
786
  driver: z.ZodOptional<z.ZodLiteral<"ppt_delivery">>;
787
+ agentFile: z.ZodOptional<z.ZodString>;
788
+ provider: z.ZodOptional<z.ZodString>;
789
+ model: z.ZodOptional<z.ZodString>;
476
790
  }, z.core.$strict>>;
477
791
  }, z.core.$strict>>;
478
792
  };
@@ -505,12 +819,15 @@ export declare const REMOTE_AGENT_METHODS: {
505
819
  agentPreset: z.ZodOptional<z.ZodString>;
506
820
  roleId: z.ZodOptional<z.ZodString>;
507
821
  skillRefs: z.ZodOptional<z.ZodArray<z.ZodString>>;
508
- skillPolicy: z.ZodOptional<z.ZodLiteral<"network_pinned">>;
822
+ loadRole: z.ZodOptional<z.ZodLiteral<true>>;
509
823
  allowedDirectories: z.ZodOptional<z.ZodArray<z.ZodString>>;
510
824
  allowedPresets: z.ZodOptional<z.ZodArray<z.ZodString>>;
511
825
  flowId: z.ZodOptional<z.ZodString>;
512
826
  flowVersion: z.ZodOptional<z.ZodString>;
513
827
  driver: z.ZodOptional<z.ZodLiteral<"ppt_delivery">>;
828
+ agentFile: z.ZodOptional<z.ZodString>;
829
+ provider: z.ZodOptional<z.ZodString>;
830
+ model: z.ZodOptional<z.ZodString>;
514
831
  }, z.core.$strict>>;
515
832
  }, z.core.$strict>;
516
833
  }, z.core.$strict>>;
@@ -522,6 +839,48 @@ export declare const REMOTE_AGENT_METHODS: {
522
839
  expectedConfigVersion: z.ZodOptional<z.ZodNumber>;
523
840
  }, z.core.$strict>>;
524
841
  };
842
+ execution_target_fork: {
843
+ description: string;
844
+ parameters: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
845
+ targetId: z.ZodString;
846
+ newTargetId: z.ZodString;
847
+ patch: z.ZodOptional<z.ZodObject<{
848
+ kind: z.ZodOptional<z.ZodEnum<{
849
+ agent_host: "agent_host";
850
+ resident_agent: "resident_agent";
851
+ workflow: "workflow";
852
+ }>>;
853
+ name: z.ZodOptional<z.ZodString>;
854
+ description: z.ZodOptional<z.ZodOptional<z.ZodString>>;
855
+ connectionId: z.ZodOptional<z.ZodString>;
856
+ inputSchema: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
857
+ outputSchema: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
858
+ capabilities: z.ZodOptional<z.ZodOptional<z.ZodObject<{
859
+ query: z.ZodDefault<z.ZodBoolean>;
860
+ cancel: z.ZodDefault<z.ZodBoolean>;
861
+ continue: z.ZodDefault<z.ZodBoolean>;
862
+ reconcile: z.ZodDefault<z.ZodBoolean>;
863
+ }, z.core.$strict>>>;
864
+ enabled: z.ZodOptional<z.ZodBoolean>;
865
+ binding: z.ZodOptional<z.ZodObject<{
866
+ remote: z.ZodOptional<z.ZodOptional<z.ZodString>>;
867
+ cwd: z.ZodOptional<z.ZodOptional<z.ZodString>>;
868
+ agentPreset: z.ZodOptional<z.ZodOptional<z.ZodString>>;
869
+ roleId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
870
+ skillRefs: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
871
+ loadRole: z.ZodOptional<z.ZodOptional<z.ZodLiteral<true>>>;
872
+ allowedDirectories: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
873
+ allowedPresets: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
874
+ flowId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
875
+ flowVersion: z.ZodOptional<z.ZodOptional<z.ZodString>>;
876
+ driver: z.ZodOptional<z.ZodOptional<z.ZodLiteral<"ppt_delivery">>>;
877
+ agentFile: z.ZodOptional<z.ZodOptional<z.ZodString>>;
878
+ provider: z.ZodOptional<z.ZodOptional<z.ZodString>>;
879
+ model: z.ZodOptional<z.ZodOptional<z.ZodString>>;
880
+ }, z.core.$strict>>;
881
+ }, z.core.$strict>>;
882
+ }, z.core.$strict>>;
883
+ };
525
884
  execution_target_probe: {
526
885
  description: string;
527
886
  parameters: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
@@ -529,11 +888,21 @@ export declare const REMOTE_AGENT_METHODS: {
529
888
  }, z.core.$strict>>;
530
889
  };
531
890
  };
891
+ export declare class WorkbenchArtifactError extends Error {
892
+ readonly status: 404 | 409 | 413 | 502;
893
+ readonly code: string;
894
+ constructor(status: 404 | 409 | 413 | 502, code: string);
895
+ }
896
+ export declare class RemoteAgentError extends Error {
897
+ readonly code: 'SESSION_NOT_FOUND' | 'SESSION_DELETED' | 'SESSION_CLOSED' | 'SESSION_BUSY' | 'SESSION_CONFLICT' | 'SESSION_ATTACH_IN_PROGRESS' | 'UNSUPPORTED' | 'REMOTE_UNAVAILABLE' | 'DELETE_DISABLED';
898
+ constructor(code: 'SESSION_NOT_FOUND' | 'SESSION_DELETED' | 'SESSION_CLOSED' | 'SESSION_BUSY' | 'SESSION_CONFLICT' | 'SESSION_ATTACH_IN_PROGRESS' | 'UNSUPPORTED' | 'REMOTE_UNAVAILABLE' | 'DELETE_DISABLED', message: string);
899
+ }
532
900
  export declare class RemoteAgentGateway {
533
901
  readonly config: Config;
534
902
  readonly automation?: A2AAutomation;
535
903
  readonly sessions: SessionDelivery;
536
904
  readonly targets: TargetDirectory;
905
+ readonly agents: AgentRegistry;
537
906
  readonly projectDiscovery?: ProjectRoleDiscovery;
538
907
  readonly ledger: JobLedger;
539
908
  private readonly lease;
@@ -548,14 +917,25 @@ export declare class RemoteAgentGateway {
548
917
  private readonly operations;
549
918
  private readonly advancingDeliveries;
550
919
  private readonly canceling;
920
+ private readonly closingSessions;
921
+ private readonly automaticCloseStopped;
922
+ private readonly now;
923
+ private idleScannedAt;
924
+ /** taskId and status timestamp of INPUT_REQUIRED turns already warned about. */
925
+ private readonly inputRequiredAlerts;
926
+ private closeFailures;
551
927
  private reconciling?;
552
928
  private workbenchQueue;
553
929
  private readonly timer;
554
930
  private closed;
555
- constructor(input: A2AGatewayConfig);
931
+ constructor(input: A2AGatewayConfig, options?: {
932
+ now?: () => number;
933
+ });
556
934
  private save;
557
935
  private standardState;
558
936
  private legacySnapshot;
937
+ /** A continuation keeps the channel frozen on its current attempt. A new task is admitted from the registry. */
938
+ private developmentFor;
559
939
  private targetSnapshot;
560
940
  private ledgerView;
561
941
  private submitExecution;
@@ -575,6 +955,20 @@ export declare class RemoteAgentGateway {
575
955
  private client;
576
956
  private auth;
577
957
  private preflight;
958
+ /** Host extensions sit beside the JSONRPC endpoint the remote advertises, and only on its configured origin. */
959
+ private hostRoute;
960
+ /** One verified artifact, read from the host that produced it and checked against the recorded receipt again here. */
961
+ /** The execution host replaced a finished task's result (manual takeover): read it now rather than wait for a webhook. */
962
+ refreshWorkbenchTask(jobId: string): Promise<import("../execution/workbench.js").AcpTaskDetail>;
963
+ /** A person sends a failed task another round in its own session. */
964
+ continueWorkbenchTask(jobId: string, prompt: string): Promise<import("../execution/workbench.js").AcpTaskDetail>;
965
+ /** A person marks the task's current result as read (已阅). */
966
+ acceptWorkbenchTask(jobId: string, note?: string): import("../execution/workbench.js").AcpTaskDetail;
967
+ workbenchArtifact(jobId: string, sha256: string): Promise<{
968
+ content: Buffer;
969
+ name: string;
970
+ mediaType?: string;
971
+ }>;
578
972
  private checkDispatch;
579
973
  private job;
580
974
  private view;
@@ -589,6 +983,8 @@ export declare class RemoteAgentGateway {
589
983
  /** Push events are hints. GetTask remains authoritative, including after missed callbacks. */
590
984
  receivePush(event: unknown): Promise<void>;
591
985
  private workbenchProjection;
986
+ private workbench;
987
+ private writeProcessRequest;
592
988
  workbenchList(query?: WorkbenchListQuery): {
593
989
  items: import("../execution/workbench.js").AcpTaskSummary[];
594
990
  total: number;
@@ -601,11 +997,186 @@ export declare class RemoteAgentGateway {
601
997
  offset: number;
602
998
  limit: number;
603
999
  };
1000
+ workbenchAgents(): {
1001
+ connections: {
1002
+ connectionId: string;
1003
+ remote: string;
1004
+ }[];
1005
+ developing: import("../execution/agent-registry.js").WorkbenchAgentRow[];
1006
+ published: import("../execution/agent-registry.js").WorkbenchAgentRow[];
1007
+ };
1008
+ /**
1009
+ * Register every agents/*.md under a directory as a developing draft with its own path-agent target: cwd and preset
1010
+ * fixed to that directory and runtime, the file as the role. Each runtime (an ACP agent or a DSH-native preset) gets
1011
+ * its own draft `<name>@<runtime>` and target, so one directory can run on several. Registering the same runtime again
1012
+ * refreshes its drafts and targets.
1013
+ * The file is read here for its name and again by the execution host at dispatch, so both must see the same path.
1014
+ */
1015
+ registerWorkbenchAgentPath(input: unknown): Promise<{
1016
+ connections: {
1017
+ connectionId: string;
1018
+ remote: string;
1019
+ }[];
1020
+ developing: import("../execution/agent-registry.js").WorkbenchAgentRow[];
1021
+ published: import("../execution/agent-registry.js").WorkbenchAgentRow[];
1022
+ registered: {
1023
+ agentId: string;
1024
+ name: string;
1025
+ targetId: string;
1026
+ file: string;
1027
+ }[];
1028
+ }>;
1029
+ createWorkbenchAgent(input: unknown): Promise<{
1030
+ connections: {
1031
+ connectionId: string;
1032
+ remote: string;
1033
+ }[];
1034
+ developing: import("../execution/agent-registry.js").WorkbenchAgentRow[];
1035
+ published: import("../execution/agent-registry.js").WorkbenchAgentRow[];
1036
+ draft: {
1037
+ agentId: string;
1038
+ name: string;
1039
+ options: {
1040
+ id: string;
1041
+ value: string;
1042
+ model?: true | undefined;
1043
+ }[];
1044
+ updatedAt: string;
1045
+ acpAgent?: string | undefined;
1046
+ agentPreset?: string | undefined;
1047
+ provider?: string | undefined;
1048
+ model?: string | undefined;
1049
+ roleId?: string | undefined;
1050
+ targetId?: string | undefined;
1051
+ modeId?: string | undefined;
1052
+ source?: {
1053
+ path: string;
1054
+ file: string;
1055
+ } | undefined;
1056
+ description?: string | undefined;
1057
+ };
1058
+ }>;
1059
+ updateWorkbenchAgent(agentId: string, input: unknown): Promise<{
1060
+ connections: {
1061
+ connectionId: string;
1062
+ remote: string;
1063
+ }[];
1064
+ developing: import("../execution/agent-registry.js").WorkbenchAgentRow[];
1065
+ published: import("../execution/agent-registry.js").WorkbenchAgentRow[];
1066
+ draft: {
1067
+ agentId: string;
1068
+ name: string;
1069
+ options: {
1070
+ id: string;
1071
+ value: string;
1072
+ model?: true | undefined;
1073
+ }[];
1074
+ updatedAt: string;
1075
+ acpAgent?: string | undefined;
1076
+ agentPreset?: string | undefined;
1077
+ provider?: string | undefined;
1078
+ model?: string | undefined;
1079
+ roleId?: string | undefined;
1080
+ targetId?: string | undefined;
1081
+ modeId?: string | undefined;
1082
+ source?: {
1083
+ path: string;
1084
+ file: string;
1085
+ } | undefined;
1086
+ description?: string | undefined;
1087
+ };
1088
+ }>;
1089
+ publishWorkbenchAgent(agentId: string, input: unknown): Promise<{
1090
+ connections: {
1091
+ connectionId: string;
1092
+ remote: string;
1093
+ }[];
1094
+ developing: import("../execution/agent-registry.js").WorkbenchAgentRow[];
1095
+ published: import("../execution/agent-registry.js").WorkbenchAgentRow[];
1096
+ release: {
1097
+ releaseName: string;
1098
+ options: {
1099
+ id: string;
1100
+ value: string;
1101
+ model?: true | undefined;
1102
+ }[];
1103
+ publishedAt: string;
1104
+ sourceAgentId?: string | undefined;
1105
+ acpAgent?: string | undefined;
1106
+ agentPreset?: string | undefined;
1107
+ provider?: string | undefined;
1108
+ model?: string | undefined;
1109
+ roleId?: string | undefined;
1110
+ targetId?: string | undefined;
1111
+ modeId?: string | undefined;
1112
+ source?: {
1113
+ path: string;
1114
+ file: string;
1115
+ } | undefined;
1116
+ description?: string | undefined;
1117
+ };
1118
+ }>;
604
1119
  workbenchTask(jobId: string): import("../execution/workbench.js").AcpTaskDetail;
1120
+ /** Read-only transcript from the stored A2A history of the job's attempts; the same scope check as the task detail. */
1121
+ workbenchChat(jobId: string, query?: {
1122
+ limit?: number;
1123
+ before?: number;
1124
+ }): import("../execution/workbench-chat.js").WorkbenchChatPage;
605
1125
  /** Only the dedicated HTTP workbench calls this; it is deliberately absent from the agent tool catalogue. */
606
1126
  decideWorkbenchReview(jobId: string, reviewId: string, input: unknown): Promise<import("../execution/workbench.js").AcpTaskDetail>;
1127
+ /** Records a question or plan approval against the running attempt. The workbench token never travels in A2A metadata. */
1128
+ openProcessRequest(jobId: string, input: unknown): Promise<ProcessRequest>;
1129
+ processRequest(jobId: string, requestId: string): import("../execution/workbench.js").WorkbenchProcessRequest;
1130
+ /** Completes the stored request. The caller must still finish the original userQuestions wait; this does not send another prompt. */
1131
+ answerProcessRequest(jobId: string, requestId: string, input: unknown): Promise<import("../execution/workbench.js").AcpTaskDetail>;
1132
+ /** A follow-up keeps its session's policy. A new task without one is one-shot. */
1133
+ private jobLifecycle;
1134
+ /**
1135
+ * P3. A persistent ACP session closes once the host confirms it is attached and idle and its
1136
+ * last turn ended more than idleTtlSeconds ago. Busy, INPUT_REQUIRED and unknown status stay open.
1137
+ */
1138
+ private reconcileIdleSessions;
1139
+ /** Warns once per INPUT_REQUIRED turn after the alert window. The process is never closed for this. */
1140
+ private alertInputRequired;
1141
+ /** Read-only lifecycle counts for /health. Close reasons and resumes are counted per context from saved jobs. */
1142
+ lifecycleReport(): {
1143
+ busy: number;
1144
+ inputRequiredAlerts: {
1145
+ sessionId?: string;
1146
+ contextId: string;
1147
+ since: string;
1148
+ }[];
1149
+ closeReasons: Record<CloseReason, number>;
1150
+ resumes: number;
1151
+ closeFailures: number;
1152
+ processReleasePending: number;
1153
+ };
1154
+ private taskAcknowledged;
1155
+ private releaseOneShot;
1156
+ private finishClose;
1157
+ private jobsForClose;
1158
+ private markClosed;
1159
+ private performClose;
1160
+ private postSession;
1161
+ /** Read-only ledger view. strict requests fail when the directory is unset or the ledger cannot be read. */
1162
+ capacityReport(strict?: boolean): Promise<(CapacityInspection & {
1163
+ processSlot: CapacityInspection['processSlot'] & {
1164
+ headWaitMs: number;
1165
+ };
1166
+ }) | undefined>;
607
1167
  close(): Promise<void>;
608
1168
  }
1169
+ /** Only a missing bind address is retried. A busy port or a permission error is a bad configuration. */
1170
+ export declare function isRetryableCallbackBindError(error: unknown): boolean;
1171
+ /** Keeps trying `bind` after EADDRNOTAVAIL. Any other error rejects without another sleep. */
1172
+ export declare function retryCallbackBind(options: {
1173
+ bind: () => Promise<void>;
1174
+ signal: AbortSignal;
1175
+ onPending: (error: unknown, at: string) => void;
1176
+ sleep?: (ms: number, signal: AbortSignal) => Promise<void>;
1177
+ initialDelayMs?: number;
1178
+ maxDelayMs?: number;
1179
+ }): Promise<void>;
609
1180
  export declare function serveA2AGateway(input: A2AGatewayConfig, options?: {
610
1181
  report?: boolean;
611
1182
  }): Promise<{