@1agents/acp-service 0.9.0 → 0.9.1

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