agl 43.1.0 → 43.3.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 (259) hide show
  1. package/changelog.md +32 -0
  2. package/dist_serve/bundle.js +5950 -5530
  3. package/dist_serve/bundle.js.map +2 -2
  4. package/dist_serve/bundle.js.third-party-notices.json +31 -31
  5. package/dist_serve/bundle.js.third-party-notices.txt +31 -31
  6. package/dist_ts/00_commitinfo_data.js +1 -1
  7. package/dist_ts/aglapi/aglapisurface.document.js +521 -17
  8. package/dist_ts/aglapi/interfaces.d.ts +3 -0
  9. package/dist_ts/aglapi/interfaces.js +2 -1
  10. package/dist_ts/classes.accountsactions.d.ts +3 -1
  11. package/dist_ts/classes.accountsactions.js +21 -3
  12. package/dist_ts/classes.authmodels.js +17 -4
  13. package/dist_ts/classes.authstore.js +16 -2
  14. package/dist_ts/classes.claudeharness.d.ts +16 -0
  15. package/dist_ts/classes.claudeharness.js +24 -2
  16. package/dist_ts/classes.cli.d.ts +4 -2
  17. package/dist_ts/classes.cli.js +6 -3
  18. package/dist_ts/classes.codexclientadapter.d.ts +11 -0
  19. package/dist_ts/classes.codexclientadapter.js +14 -2
  20. package/dist_ts/classes.controller.d.ts +175 -11
  21. package/dist_ts/classes.controller.js +1213 -173
  22. package/dist_ts/classes.controllerdevices.d.ts +2 -0
  23. package/dist_ts/classes.controllerdevices.js +6 -1
  24. package/dist_ts/classes.controllermanagement.d.ts +14 -4
  25. package/dist_ts/classes.controllermanagement.js +20 -2
  26. package/dist_ts/classes.gatewayclient.d.ts +115 -0
  27. package/dist_ts/classes.gatewayclient.js +336 -0
  28. package/dist_ts/classes.gatewayclientstore.d.ts +97 -0
  29. package/dist_ts/classes.gatewayclientstore.js +261 -0
  30. package/dist_ts/classes.inbox.d.ts +72 -0
  31. package/dist_ts/classes.inbox.js +231 -0
  32. package/dist_ts/classes.inferencerouter.d.ts +19 -0
  33. package/dist_ts/classes.inferencerouter.js +15 -3
  34. package/dist_ts/classes.inferenceservice.d.ts +9 -0
  35. package/dist_ts/classes.inferenceservice.js +28 -2
  36. package/dist_ts/classes.mcpclient.d.ts +4 -1
  37. package/dist_ts/classes.mcpclient.js +42 -6
  38. package/dist_ts/classes.mcpcontrollerhost.d.ts +3 -1
  39. package/dist_ts/classes.mcpcontrollerhost.js +11 -1
  40. package/dist_ts/classes.mcptools.d.ts +3 -3
  41. package/dist_ts/classes.mcptools.js +38 -8
  42. package/dist_ts/classes.mcpvalidation.d.ts +5 -0
  43. package/dist_ts/classes.mcpvalidation.js +38 -2
  44. package/dist_ts/classes.nativesessions.d.ts +17 -4
  45. package/dist_ts/classes.nativesessions.js +41 -9
  46. package/dist_ts/classes.opencodeclient.d.ts +23 -2
  47. package/dist_ts/classes.opencodeclient.js +47 -3
  48. package/dist_ts/classes.proxycontrol.d.ts +11 -0
  49. package/dist_ts/classes.proxycontrol.js +7 -1
  50. package/dist_ts/classes.proxycontrolclient.d.ts +17 -0
  51. package/dist_ts/classes.proxycontrolclient.js +35 -1
  52. package/dist_ts/classes.proxydaemon.js +8 -1
  53. package/dist_ts/classes.proxymonitor.d.ts +7 -0
  54. package/dist_ts/classes.proxymonitor.js +13 -1
  55. package/dist_ts/classes.publishedset.d.ts +38 -0
  56. package/dist_ts/classes.publishedset.js +50 -0
  57. package/dist_ts/classes.sessionfeed.d.ts +3 -3
  58. package/dist_ts/classes.sessionfeed.js +18 -26
  59. package/dist_ts/classes.systemmetricssampler.d.ts +6 -0
  60. package/dist_ts/classes.systemmetricssampler.js +15 -3
  61. package/dist_ts/classes.ticketstore.d.ts +50 -3
  62. package/dist_ts/classes.ticketstore.js +45 -8
  63. package/dist_ts/classes.trustedproxysecrets.d.ts +2 -0
  64. package/dist_ts/classes.trustedproxysecrets.js +5 -1
  65. package/dist_ts/driver/classes.directreports.d.ts +14 -4
  66. package/dist_ts/driver/classes.directreports.js +25 -6
  67. package/dist_ts/driver/classes.driverservice.d.ts +44 -3
  68. package/dist_ts/driver/classes.driverservice.js +50 -16
  69. package/dist_ts/fleet/classes.claudeworkers.d.ts +21 -5
  70. package/dist_ts/fleet/classes.claudeworkers.js +142 -46
  71. package/dist_ts/fleet/classes.codexworkers.d.ts +16 -4
  72. package/dist_ts/fleet/classes.codexworkers.js +22 -5
  73. package/dist_ts/fleet/classes.workercommand.d.ts +6 -1
  74. package/dist_ts/fleet/classes.workercommand.js +15 -4
  75. package/dist_ts/fleet/classes.workers.d.ts +5 -1
  76. package/dist_ts/fleet/classes.workers.js +8 -2
  77. package/dist_ts/fleet/functions.unbounddrivers.js +2 -2
  78. package/dist_ts/fleet/functions.workervalidation.js +2 -2
  79. package/dist_ts/fleet/interfaces.workers.d.ts +21 -3
  80. package/dist_ts/fleet/interfaces.workers.js +1 -1
  81. package/dist_ts/functions.agentmessage.d.ts +3 -0
  82. package/dist_ts/functions.agentmessage.js +4 -1
  83. package/dist_ts/functions.controllermanagementsurface.d.ts +4 -0
  84. package/dist_ts/functions.controllermanagementsurface.js +15 -1
  85. package/dist_ts/functions.deviceapi.d.ts +151 -4
  86. package/dist_ts/functions.deviceapi.js +893 -38
  87. package/dist_ts/functions.fleetworkercli.d.ts +1 -1
  88. package/dist_ts/functions.fleetworkercli.js +11 -8
  89. package/dist_ts/functions.gatewaycli.d.ts +24 -0
  90. package/dist_ts/functions.gatewaycli.js +395 -0
  91. package/dist_ts/functions.gatewayroute.d.ts +135 -0
  92. package/dist_ts/functions.gatewayroute.js +366 -0
  93. package/dist_ts/functions.inferencecli.js +32 -1
  94. package/dist_ts/functions.inferencecliarguments.d.ts +8 -2
  95. package/dist_ts/functions.inferencecliarguments.js +31 -3
  96. package/dist_ts/functions.mcpfleetworkertools.js +2 -2
  97. package/dist_ts/functions.proxycapacity.d.ts +50 -0
  98. package/dist_ts/functions.proxycapacity.js +142 -0
  99. package/dist_ts/functions.proxycapacitycli.d.ts +30 -0
  100. package/dist_ts/functions.proxycapacitycli.js +65 -0
  101. package/dist_ts/functions.remotecli.d.ts +30 -3
  102. package/dist_ts/functions.remotecli.js +44 -18
  103. package/dist_ts/functions.ticketvalidation.js +11 -2
  104. package/dist_ts/interfaces.auth.d.ts +25 -4
  105. package/dist_ts/interfaces.auth.js +15 -1
  106. package/dist_ts/plugins.d.ts +5 -1
  107. package/dist_ts/plugins.js +10 -2
  108. package/dist_ts_authswitch/authority-contract.d.ts +25 -0
  109. package/dist_ts_authswitch/authority-contract.js +1 -1
  110. package/dist_ts_authswitch/authority-overview.d.ts +8 -0
  111. package/dist_ts_authswitch/authority-overview.js +17 -6
  112. package/dist_ts_authswitch/authority-placement.d.ts +20 -16
  113. package/dist_ts_authswitch/authority-placement.js +19 -26
  114. package/dist_ts_authswitch/authority-renewal.d.ts +34 -0
  115. package/dist_ts_authswitch/authority-renewal.js +56 -0
  116. package/dist_ts_authswitch/authority-usagelimit.d.ts +29 -0
  117. package/dist_ts_authswitch/authority-usagelimit.js +66 -2
  118. package/dist_ts_authswitch/authority-usagewindows.d.ts +6 -0
  119. package/dist_ts_authswitch/authority-usagewindows.js +15 -1
  120. package/dist_ts_authswitch/classes.authoritybroker.d.ts +8 -0
  121. package/dist_ts_authswitch/classes.authoritybroker.js +35 -2
  122. package/dist_ts_authswitch/classes.authoritycli.d.ts +1 -0
  123. package/dist_ts_authswitch/classes.authoritycli.js +44 -3
  124. package/dist_ts_authswitch/classes.authorityclient.d.ts +6 -1
  125. package/dist_ts_authswitch/classes.authorityclient.js +12 -4
  126. package/dist_ts_authswitch/classes.authoritydaemon.js +8 -1
  127. package/dist_ts_authswitch/classes.authoritydatabase.js +6 -2
  128. package/dist_ts_authswitch/classes.authoritymodels.d.ts +7 -0
  129. package/dist_ts_authswitch/classes.authoritymodels.js +21 -5
  130. package/dist_ts_interfaces/devices.d.ts +1012 -5
  131. package/dist_ts_interfaces/devices.js +68 -2
  132. package/dist_ts_interfaces/fleetworkers.d.ts +5 -3
  133. package/dist_ts_interfaces/gateway.d.ts +151 -0
  134. package/dist_ts_interfaces/gateway.js +66 -0
  135. package/dist_ts_interfaces/inbox.d.ts +234 -0
  136. package/dist_ts_interfaces/inbox.js +101 -0
  137. package/dist_ts_interfaces/index.d.ts +3 -0
  138. package/dist_ts_interfaces/index.js +4 -1
  139. package/dist_ts_interfaces/interfaces.d.ts +10 -3
  140. package/dist_ts_interfaces/interfaces.js +4 -2
  141. package/dist_ts_interfaces/management.d.ts +4 -4
  142. package/dist_ts_interfaces/management.js +3 -2
  143. package/dist_ts_interfaces/mcprequests.d.ts +48 -6
  144. package/dist_ts_interfaces/mcprequests.js +12 -1
  145. package/dist_ts_interfaces/mcpworkspacerequests.d.ts +4 -1
  146. package/dist_ts_interfaces/mcpworkspacerequests.js +1 -1
  147. package/dist_ts_interfaces/nativesessions.d.ts +16 -3
  148. package/dist_ts_interfaces/plugins.d.ts +2 -1
  149. package/dist_ts_interfaces/plugins.js +4 -2
  150. package/dist_ts_interfaces/proxycapacity.d.ts +99 -0
  151. package/dist_ts_interfaces/proxycapacity.js +74 -0
  152. package/dist_ts_interfaces/requests.accounts.d.ts +21 -0
  153. package/dist_ts_interfaces/requests.accounts.js +3 -1
  154. package/dist_ts_interfaces/requests.d.ts +3 -2
  155. package/dist_ts_interfaces/requests.js +1 -1
  156. package/docs/authswitch.md +20 -1
  157. package/package.json +6 -5
  158. package/readme.md +191 -31
  159. package/ts/00_commitinfo_data.ts +1 -1
  160. package/ts/aglapi/aglapisurface.document.ts +520 -16
  161. package/ts/aglapi/interfaces.ts +1 -0
  162. package/ts/classes.accountsactions.ts +30 -3
  163. package/ts/classes.authmodels.ts +22 -3
  164. package/ts/classes.authstore.ts +15 -1
  165. package/ts/classes.claudeharness.ts +27 -1
  166. package/ts/classes.cli.ts +7 -3
  167. package/ts/classes.codexclientadapter.ts +14 -1
  168. package/ts/classes.controller.ts +1428 -249
  169. package/ts/classes.controllerdevices.ts +6 -0
  170. package/ts/classes.controllermanagement.ts +40 -7
  171. package/ts/classes.gatewayclient.ts +401 -0
  172. package/ts/classes.gatewayclientstore.ts +272 -0
  173. package/ts/classes.inbox.ts +239 -0
  174. package/ts/classes.inferencerouter.ts +27 -2
  175. package/ts/classes.inferenceservice.ts +28 -1
  176. package/ts/classes.mcpclient.ts +42 -3
  177. package/ts/classes.mcpcontrollerhost.ts +15 -0
  178. package/ts/classes.mcptools.ts +42 -9
  179. package/ts/classes.mcpvalidation.ts +32 -1
  180. package/ts/classes.nativesessions.ts +50 -12
  181. package/ts/classes.opencodeclient.ts +55 -4
  182. package/ts/classes.proxycontrol.ts +16 -0
  183. package/ts/classes.proxycontrolclient.ts +30 -0
  184. package/ts/classes.proxydaemon.ts +8 -0
  185. package/ts/classes.proxymonitor.ts +12 -0
  186. package/ts/classes.publishedset.ts +56 -0
  187. package/ts/classes.sessionfeed.ts +17 -20
  188. package/ts/classes.systemmetricssampler.ts +13 -2
  189. package/ts/classes.ticketstore.ts +73 -12
  190. package/ts/classes.trustedproxysecrets.ts +5 -0
  191. package/ts/driver/classes.directreports.ts +25 -6
  192. package/ts/driver/classes.driverservice.ts +75 -14
  193. package/ts/fleet/classes.claudeworkers.ts +112 -39
  194. package/ts/fleet/classes.codexworkers.ts +21 -6
  195. package/ts/fleet/classes.workercommand.ts +14 -4
  196. package/ts/fleet/classes.workers.ts +9 -2
  197. package/ts/fleet/functions.unbounddrivers.ts +1 -1
  198. package/ts/fleet/functions.workervalidation.ts +1 -1
  199. package/ts/fleet/interfaces.workers.ts +20 -5
  200. package/ts/functions.agentmessage.ts +3 -0
  201. package/ts/functions.controllermanagementsurface.ts +15 -0
  202. package/ts/functions.deviceapi.ts +1071 -34
  203. package/ts/functions.fleetworkercli.ts +10 -7
  204. package/ts/functions.gatewaycli.ts +436 -0
  205. package/ts/functions.gatewayroute.ts +429 -0
  206. package/ts/functions.inferencecli.ts +26 -0
  207. package/ts/functions.inferencecliarguments.ts +30 -4
  208. package/ts/functions.mcpfleetworkertools.ts +1 -1
  209. package/ts/functions.proxycapacity.ts +191 -0
  210. package/ts/functions.proxycapacitycli.ts +104 -0
  211. package/ts/functions.remotecli.ts +56 -20
  212. package/ts/functions.ticketvalidation.ts +11 -1
  213. package/ts/interfaces.auth.ts +36 -4
  214. package/ts/plugins.ts +12 -0
  215. package/ts_authswitch/authority-contract.ts +20 -0
  216. package/ts_authswitch/authority-overview.ts +28 -6
  217. package/ts_authswitch/authority-placement.ts +27 -32
  218. package/ts_authswitch/authority-renewal.ts +64 -0
  219. package/ts_authswitch/authority-usagelimit.ts +84 -1
  220. package/ts_authswitch/authority-usagewindows.ts +13 -0
  221. package/ts_authswitch/classes.authoritybroker.ts +34 -1
  222. package/ts_authswitch/classes.authoritycli.ts +49 -2
  223. package/ts_authswitch/classes.authorityclient.ts +14 -4
  224. package/ts_authswitch/classes.authoritydaemon.ts +9 -1
  225. package/ts_authswitch/classes.authoritydatabase.ts +5 -1
  226. package/ts_authswitch/classes.authoritymodels.ts +23 -3
  227. package/ts_authswitch/native-contracts.md +21 -0
  228. package/ts_authswitch/readme.md +1 -1
  229. package/ts_interfaces/devices.schema.json +3573 -603
  230. package/ts_interfaces/devices.ts +1093 -4
  231. package/ts_interfaces/fleetworkers.ts +5 -3
  232. package/ts_interfaces/gateway.ts +242 -0
  233. package/ts_interfaces/inbox.ts +287 -0
  234. package/ts_interfaces/index.ts +3 -0
  235. package/ts_interfaces/interfaces.ts +9 -2
  236. package/ts_interfaces/management.ts +6 -4
  237. package/ts_interfaces/mcprequests.ts +61 -4
  238. package/ts_interfaces/mcpworkspacerequests.ts +4 -2
  239. package/ts_interfaces/nativesessions.ts +17 -3
  240. package/ts_interfaces/plugins.ts +3 -1
  241. package/ts_interfaces/proxycapacity.ts +162 -0
  242. package/ts_interfaces/requests.accounts.ts +20 -0
  243. package/ts_interfaces/requests.ts +4 -0
  244. package/ts_web/00_commitinfo_data.ts +1 -1
  245. package/ts_web/accounts.plugins.ts +4 -2
  246. package/ts_web/classes.accountsreadmodel.ts +33 -0
  247. package/ts_web/classes.browserpresentation.ts +19 -6
  248. package/ts_web/classes.inboxfeed.ts +329 -0
  249. package/ts_web/classes.nativesessionstate.ts +9 -23
  250. package/ts_web/elements.accounts.ts +121 -113
  251. package/ts_web/elements.configurationpane.ts +24 -37
  252. package/ts_web/elements.deployments.ts +66 -2
  253. package/ts_web/elements.devices.ts +4 -17
  254. package/ts_web/elements.flexlimitstrip.ts +21 -70
  255. package/ts_web/elements.harnesscontrollerapp.ts +198 -222
  256. package/ts_web/elements.inbox.ts +808 -0
  257. package/ts_web/functions.inbox.ts +95 -0
  258. package/ts_web/functions.sessioncards.ts +40 -0
  259. package/ts_web/plugins.ts +2 -0
@@ -207,6 +207,47 @@ export declare class OpenCodeController {
207
207
  private acknowledgeSessionFeedRow;
208
208
  /** The sidebar's session list, merged from the conversations, fleet, terminals and board the controller already reads. */
209
209
  private startSessionFeed;
210
+ /** What waits for the owner, for the browser and devices alike (AGL-1635). */
211
+ private inbox?;
212
+ private startInbox;
213
+ /** The Inbox's items of one source, each read from the component that owns them. */
214
+ private readInboxSource;
215
+ /** The session feed's row of a session, and the name the Inbox shows for it. */
216
+ private inboxRow;
217
+ /**
218
+ * The items of a session's requests. A permission that the owner's auto-accept answers (`autoAcceptedArg`) waits for
219
+ * nobody and is left out; questions and MCP forms are never answered automatically.
220
+ */
221
+ private inboxSessionItems;
222
+ /** A native session as the Inbox names it: where it runs and how the browser opens it. */
223
+ private inboxNativeWhere;
224
+ /** The requests Claude Code holds: its conversations' and those of AGL's turns in native sessions. */
225
+ private readInboxClaude;
226
+ /** The requests the Codex connections hold: the conversations' and, on the fleet's connection, the native threads'. */
227
+ private readInboxCodex;
228
+ /**
229
+ * The requests of the OpenCode conversations the feed shows waiting, from the project's pending lists, and of their
230
+ * direct children (subagents), from `readOpenCodeFamilyAttention`, the read the browser's child scopes use: only a
231
+ * managed conversation has children AGL answers. A project or a conversation whose read fails keeps the items it had.
232
+ */
233
+ private readInboxOpenCode;
234
+ /** The failures of the Inbox's partial reads, by what failed: a lasting one is reported once. */
235
+ private readonly inboxErrors;
236
+ private reportInboxError;
237
+ /**
238
+ * The Flex permissions of the conversations the feed shows waiting, and of the driver, by the run that asks (a
239
+ * subagent's by its root conversation). A permission the owner's auto-accept answers is left out.
240
+ */
241
+ private readInboxFlex;
242
+ /** The sessions whose harness waits in its own client: AGL holds no request for them, so they are answered there. */
243
+ private readInboxNativeWaits;
244
+ /** The driver's `needs input:` turn, as the driver service found it; its own prompts are Flex session prompts. */
245
+ private readInboxDriver;
246
+ /**
247
+ * The board's open questions that wait for the owner: every one the owner did not ask, on a ticket that is not done.
248
+ * A deploy plan's and a maintenance window's question is the owner's go, shown with what the deploy monitor observes.
249
+ */
250
+ private readInboxTickets;
210
251
  private ticketNotifier?;
211
252
  private boardPump?;
212
253
  private deployMonitor?;
@@ -220,6 +261,8 @@ export declare class OpenCodeController {
220
261
  private passkeyManager?;
221
262
  /** TLS-proxy mode only: the secret admission accepts from the reverse proxy, and its rotation. */
222
263
  private trustedProxySecrets?;
264
+ /** The controller's own route on its gateway (`agl remote gateway`), synced in the background once it is ready. */
265
+ private gatewayClient?;
223
266
  private openCodeSupervisor?;
224
267
  private openCodeClient?;
225
268
  private flexSupervisor?;
@@ -841,6 +884,33 @@ export declare class OpenCodeController {
841
884
  private updateControllerSettings;
842
885
  private retireResourceForPrincipal;
843
886
  private prepareMcpSessionTarget;
887
+ /**
888
+ * Whether an MCP request names a Claude Code session outside AGL's conversations of the project: a `claude` id that no
889
+ * conversation of this project records. Such an id is served by the native path, everything else by the managed one.
890
+ */
891
+ private isMcpNativeClaudeId;
892
+ /**
893
+ * The Claude Code session outside AGL that an MCP caller names in a project: only a session of the host's own Claude
894
+ * Code home, as the session feed lists it, whose directory is the project folder itself, and that no other project's
895
+ * conversation records. Anything else is `session_not_found`; nothing is recorded.
896
+ */
897
+ private requireMcpNativeClaudeTarget;
898
+ /** The project's scope for Claude Code sessions outside AGL: the host's own home, the exact folder, no other project's conversation. */
899
+ private inMcpNativeScope;
900
+ /**
901
+ * The Claude Code sessions of the host's own Claude Code home whose directory is the project folder itself and that no
902
+ * project conversation records, for `sessions_list`: running ones first, all of them, then the newest settled ones up
903
+ * to `controllerMcpNativeSessionSettledLimit`. An inventory that cannot be read is named, never hidden.
904
+ */
905
+ private listMcpNativeClaudeSessions;
906
+ /** `session_read` of a Claude Code session outside AGL: the session, its newest transcript page and its scratchpad. */
907
+ private readMcpNativeClaudeSession;
908
+ /**
909
+ * An agent message to a Claude Code background job outside AGL, after the project's switch: behind the
910
+ * `session_message` header naming the caller, through the one native send, which wakes a settled job and puts the
911
+ * message into a running job's inbox. A send that may have reached the job is `outcome_unknown`, never resent.
912
+ */
913
+ private deliverNativeAgentMessage;
844
914
  /**
845
915
  * Any caller may message a task: unlike a task mutation, no ownership is required. The target
846
916
  * must still be an active root task of the project the request names; archived tasks and child
@@ -1074,9 +1144,26 @@ export declare class OpenCodeController {
1074
1144
  * unauthenticated preflight budget; a pairing and a proof are audited, under the unauthenticated audit budget.
1075
1145
  */
1076
1146
  private registerDevicePairingHandlers;
1147
+ /**
1148
+ * A device's answer to a direct child (an OpenCode subagent) of the session it names: the session must be an OpenCode
1149
+ * conversation the feed lists, and the child is proven a running direct child of it as the browser's child scopes do.
1150
+ */
1151
+ private replyDeviceChildRequest;
1152
+ /**
1153
+ * A conversation's transcript page and what it waits for, as a device reads it through the browser's session read:
1154
+ * the newest page without `before`, sized by the controller, else the next older page of `limit` messages.
1155
+ */
1156
+ private readDeviceConversation;
1157
+ /**
1158
+ * The host's driver session for a device's read or send, as the driver's status names it now; refused while there is
1159
+ * none. A device never creates the driver.
1160
+ */
1161
+ private deviceDriverSession;
1077
1162
  /**
1078
1163
  * Scope `device`: the session feed, bounded transcript reads, direct sends and permission and question answers of an
1079
- * authenticated device -- through the same operations the owner's browser runs, audited as `device:<id>`.
1164
+ * authenticated device, the Inbox, the driver, the direct reports, the host's status and the shared board -- through
1165
+ * the same operations the owner's browser runs, audited as `device:<id>`. `publicOriginArg` is the origin the scope
1166
+ * admits.
1080
1167
  */
1081
1168
  private registerDeviceHandlers;
1082
1169
  /**
@@ -1096,6 +1183,14 @@ export declare class OpenCodeController {
1096
1183
  * endpoint's admission grants a request only its own peer. No other method is reachable through it.
1097
1184
  */
1098
1185
  private createManagementRouter;
1186
+ /** The browser's status and, on the management endpoint only, the gateway client's (AGL-828). */
1187
+ private createManagementStatusHandler;
1188
+ /**
1189
+ * `agl remote gateway sync [--rotate]`: only a process of the controller's own OS user that holds the request's
1190
+ * loopback connection (the `localCli` it names, proved from the kernel) syncs the route now, rotating the
1191
+ * trusted-proxy secret first when asked; audited as `remote.gateway.sync`.
1192
+ */
1193
+ private createGatewaySyncHandler;
1099
1194
  private createStatusHandler;
1100
1195
  private createUpgradeLaunchHandler;
1101
1196
  private createUpgradePrepareBeginHandler;
@@ -1140,6 +1235,19 @@ export declare class OpenCodeController {
1140
1235
  * alike. The harness checks the reply against the pending request before it sends anything; elicitations are never
1141
1236
  * answered automatically, auto-accept included.
1142
1237
  */
1238
+ /**
1239
+ * Answers a permission or question of a direct child (an OpenCode subagent) of a managed root conversation, for the
1240
+ * owner's browser and a paired device alike: `verifyArg` proves the session is a direct child of the root (the
1241
+ * browser's child scope, or the same direct-child check for a device) and, while `activeRequiredArg`, that it runs. It
1242
+ * runs before the pending list is read, before the answer is sent and after it; `null` answers reject a question.
1243
+ */
1244
+ private replyChildRequestForPrincipal;
1245
+ /**
1246
+ * A device's proof that `childSessionIdArg` is a direct child of the managed root conversation, by the check the
1247
+ * browser's child scopes run (`observeOpenCodeDirectChild`), and, while `activeRequiredArg`, that it runs: a child
1248
+ * whose turn ended takes no answer.
1249
+ */
1250
+ private verifyDeviceDirectChild;
1143
1251
  private replyElicitationForPrincipal;
1144
1252
  /**
1145
1253
  * Answers a permission request of a conversation, for the owner's browser and a paired device alike: the request must
@@ -1154,6 +1262,29 @@ export declare class OpenCodeController {
1154
1262
  private registerResourceHandlers;
1155
1263
  private registerBrowserHandlers;
1156
1264
  private registerTicketHandlers;
1265
+ /**
1266
+ * Answers a ticket question as the owner, for the owner's browser and a paired device alike, audited as
1267
+ * `ticket.answer` with the peer. A deploy plan's or a maintenance window's question takes it as the owner's go. The
1268
+ * identical answer again is a confirmed replay; a different one is refused (`ticket_question_answered`), and the
1269
+ * client keeps the owner's choice.
1270
+ */
1271
+ private answerTicketForPrincipal;
1272
+ /**
1273
+ * Comments on a ticket, asks on it or moves it as the owner, for the owner's browser and a paired device alike,
1274
+ * audited as `ticket.comment`, `ticket.ask` or `ticket.move` with the peer (the envelope alone). The ticket store
1275
+ * decides every change in one transaction: a refusal changes nothing and carries the store's code and reason.
1276
+ */
1277
+ private changeTicketForPrincipal;
1278
+ /**
1279
+ * The owner, whom a device's ticket request runs as, and what the device's ticket views read besides the tickets:
1280
+ * the owner's principal id, which they replace with the `owner` kind, and the session feed's published rows.
1281
+ */
1282
+ private deviceTicketViewer;
1283
+ /** The ticket a ticket's `parentId` names, which a device's card and detail name; a store refusal as a device's. */
1284
+ private deviceTicketParent;
1285
+ private requireInbox;
1286
+ /** The Inbox: what waits for the owner, read after every source that changed (AGL-1635). */
1287
+ private registerInboxHandlers;
1157
1288
  /**
1158
1289
  * The host's driver: one Flex session that no session list shows, opened from the topbar. Fleet
1159
1290
  * events reach it through the relay once it exists.
@@ -1207,7 +1338,8 @@ export declare class OpenCodeController {
1207
1338
  private discoverFleetScope;
1208
1339
  /** The driver session, or undefined when the controller definitively no longer has it. */
1209
1340
  private readDriverSession;
1210
- private latestDriverAssistantText;
1341
+ /** The driver's newest assistant transcript entry with text: the entry's own id (a Flex message or part id). */
1342
+ private latestDriverAssistantMessage;
1211
1343
  /** A queued relay message keeps its id, sender, FIFO position and persistence mirror. Never edits held input. */
1212
1344
  private mergeQueuedDriverEvents;
1213
1345
  /** One relayed batch of fleet events, queued into the driver session as an attributed agent message. */
@@ -1216,6 +1348,8 @@ export declare class OpenCodeController {
1216
1348
  private driverNativeIds;
1217
1349
  /** The driver is opened from the topbar only; it is never admitted, archived or deleted like a task. */
1218
1350
  private assertNotDriverSession;
1351
+ /** A driver operation for the browser: a `DriverError` is answered with its own code (a device's: `serveDeviceDriver`). */
1352
+ private serveDriver;
1219
1353
  /** The driver topbar: the host's one driver session, its status, and the unread turns it marks seen. */
1220
1354
  private registerDriverHandlers;
1221
1355
  /** The Deployments view: status, history, a probe now and release state (AGL-911, AGL-914). */
@@ -1257,17 +1391,22 @@ export declare class OpenCodeController {
1257
1391
  /** Native session failures are bounded messages; the session view and the fleet's receipt show them as they are. */
1258
1392
  private serveNativeSession;
1259
1393
  /**
1260
- * The one send to a native session, for the browser's `controller.nativesession.send` and the fleet's
1261
- * `native-message`: audited as `session.send`, under the session's lock, where the session is resolved again and
1262
- * `assertArg` refuses what this caller may not write to, so a session that started running meanwhile is refused. A
1263
- * Codex thread goes through its shared server, a Claude Code background job is woken through Claude Code itself, and
1264
- * another settled Claude Code session resumes in AGL's own Claude Code. Resolves with the session after the send.
1394
+ * The one send to a native session, for the browser's `controller.nativesession.send`, a paired device, the fleet's
1395
+ * `native-message` and an MCP `session_message`: audited as `session.send`, under the session's lock, where the
1396
+ * session is resolved again and `assertArg` refuses what this caller may not write to, so a session whose state
1397
+ * changed meanwhile is refused. A Codex thread goes through its shared server, a Claude Code background job is reached
1398
+ * through Claude Code itself (woken while settled, its inbox while it runs), and another settled Claude Code session
1399
+ * resumes in AGL's own Claude Code. The owner's own text (`ownerArg`) goes into a job's inbox as the owner's agent
1400
+ * message: a peer message names no sender of its own. Resolves right after the dispatch with, for a job, how it took
1401
+ * the message, and reads nothing after it: a failed read must never turn a delivered message into a refusal, which a
1402
+ * caller would answer by sending again. A caller that shows the session reads it afterwards.
1265
1403
  */
1266
1404
  private sendNativeSession;
1267
1405
  /**
1268
1406
  * The fleet's `native-message`: resolves the Claude Code background job the caller names by id or prefix, refuses
1269
1407
  * what the browser's send would refuse and what is no background job, each with its reason and the adopt command,
1270
- * and sends the message behind the `session_message` attribution header through `sendNativeSession`.
1408
+ * and sends the message behind the `session_message` attribution header through `sendNativeSession`: a wake of a
1409
+ * settled job, or its inbox while it runs.
1271
1410
  */
1272
1411
  private sendFleetNativeMessage;
1273
1412
  /** Who a fleet owner capability's agent message is from, as its header states it: what the controller proved. */
@@ -1280,9 +1419,10 @@ export declare class OpenCodeController {
1280
1419
  */
1281
1420
  private sendNativeClaudeSession;
1282
1421
  /**
1283
- * Wakes a settled Claude Code background job with the message through Claude Code itself, so the job stays the
1284
- * session's owner. Claude Code does not report when the woken turn ends, so the upload stays for the sweep unless
1285
- * the message never reached Claude Code.
1422
+ * Sends to a Claude Code background job through Claude Code itself, so the job stays the session's owner: a settled
1423
+ * job is woken with the message, a running one takes it in its inbox, as the resolution prepared it. Claude Code does
1424
+ * not report when the turn that reads it ends, so the upload stays for the sweep unless the message never reached
1425
+ * Claude Code.
1286
1426
  */
1287
1427
  private sendNativeClaudeJob;
1288
1428
  /**
@@ -1290,8 +1430,21 @@ export declare class OpenCodeController {
1290
1430
  * message ended; when the server's answer leaves that open, it stays for the sweep.
1291
1431
  */
1292
1432
  private sendNativeCodexSession;
1433
+ /**
1434
+ * A direct report operation for the owner's browser or a device, given the owner: its failures are bounded messages
1435
+ * for the owner (`direct_report_failed`), which the Driver view and a device show as they are.
1436
+ */
1437
+ private serveDirectReport;
1293
1438
  /** The Driver view's direct reports: sessions that report to the owner, appointed from the fleet or adopted by reference. */
1294
1439
  private registerDirectReportHandlers;
1440
+ /**
1441
+ * The owner's own message to the active direct report `name`, from the Driver view or a paired device, audited as
1442
+ * `session.message` from the `Owner` for the caller. A fleet worker report is steered through the report's driver
1443
+ * ticket, as the driver's `directreport_message` does, and answers with the settled steer job, audited `failed`
1444
+ * unless the job succeeded; a steer the fleet refused is `direct_report_failed` with the fleet's reason, also audited
1445
+ * `failed`. A Codex thread takes it as the owner's agent message.
1446
+ */
1447
+ private messageDirectReportForPrincipal;
1295
1448
  /** The driver session's instructions, notes and tools; the caller checked its session authority. */
1296
1449
  private handleFlexDriverHostRequest;
1297
1450
  /**
@@ -1344,6 +1497,10 @@ export declare class OpenCodeController {
1344
1497
  /** The active workspace a workspace request names, or the refusal. */
1345
1498
  private requireActiveWorkspace;
1346
1499
  private registerTerminalHandlers;
1500
+ /**
1501
+ * Runs an operation between its `attempted` record and its terminal one. `outcomeOfArg` names the outcome of an
1502
+ * operation that returns its own failure (a settled job that failed), which is then recorded `failed`.
1503
+ */
1347
1504
  private runAudited;
1348
1505
  private requireProjectsRoot;
1349
1506
  private registerExplicitInitialProject;
@@ -1670,6 +1827,13 @@ export declare class OpenCodeController {
1670
1827
  private requireChildScope;
1671
1828
  private boundOpenCodeChildMessagePage;
1672
1829
  private openChildScope;
1830
+ /**
1831
+ * The requests that wait in a managed OpenCode root conversation and in its direct children, from the controller's
1832
+ * own reads (OpenCode's pending lists and the root's direct children), whichever browser has the conversation open:
1833
+ * the root's own requests, and each direct child with requests, the most recently updated first. `strictArg` lets a
1834
+ * failed pending list fail the read instead of reading as empty.
1835
+ */
1836
+ private readOpenCodeFamilyAttention;
1673
1837
  private readBrowserChildAttention;
1674
1838
  private sessionEventIsManaged;
1675
1839
  private readControllerSession;