agl 43.2.0 → 43.3.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 (213) hide show
  1. package/changelog.md +29 -0
  2. package/dist_serve/bundle.js +2845 -2638
  3. package/dist_serve/bundle.js.map +2 -2
  4. package/dist_serve/bundle.js.third-party-notices.json +1 -1
  5. package/dist_serve/bundle.js.third-party-notices.txt +1 -1
  6. package/dist_ts/00_commitinfo_data.js +1 -1
  7. package/dist_ts/aglapi/aglapisurface.document.js +197 -17
  8. package/dist_ts/classes.accountsactions.d.ts +3 -1
  9. package/dist_ts/classes.accountsactions.js +21 -3
  10. package/dist_ts/classes.authstore.d.ts +7 -0
  11. package/dist_ts/classes.authstore.js +9 -1
  12. package/dist_ts/classes.claudeharness.d.ts +29 -2
  13. package/dist_ts/classes.claudeharness.js +35 -6
  14. package/dist_ts/classes.codexclientadapter.d.ts +11 -0
  15. package/dist_ts/classes.codexclientadapter.js +14 -2
  16. package/dist_ts/classes.controller.d.ts +187 -12
  17. package/dist_ts/classes.controller.js +1208 -186
  18. package/dist_ts/classes.controllerdevices.d.ts +2 -0
  19. package/dist_ts/classes.controllerdevices.js +6 -1
  20. package/dist_ts/classes.inbox.d.ts +72 -0
  21. package/dist_ts/classes.inbox.js +231 -0
  22. package/dist_ts/classes.inferencerouter.d.ts +10 -0
  23. package/dist_ts/classes.inferencerouter.js +5 -3
  24. package/dist_ts/classes.inferenceservice.js +2 -2
  25. package/dist_ts/classes.mcpclient.d.ts +1 -1
  26. package/dist_ts/classes.mcpclient.js +24 -6
  27. package/dist_ts/classes.mcpcontrollerhost.js +6 -1
  28. package/dist_ts/classes.mcptools.js +18 -8
  29. package/dist_ts/classes.mcpvalidation.d.ts +5 -0
  30. package/dist_ts/classes.mcpvalidation.js +32 -2
  31. package/dist_ts/classes.nativesessions.d.ts +29 -4
  32. package/dist_ts/classes.nativesessions.js +41 -9
  33. package/dist_ts/classes.opencodeclient.d.ts +23 -2
  34. package/dist_ts/classes.opencodeclient.js +47 -3
  35. package/dist_ts/classes.publishedset.d.ts +38 -0
  36. package/dist_ts/classes.publishedset.js +50 -0
  37. package/dist_ts/classes.sessionfeed.d.ts +3 -3
  38. package/dist_ts/classes.sessionfeed.js +18 -26
  39. package/dist_ts/classes.systemmetricssampler.d.ts +6 -0
  40. package/dist_ts/classes.systemmetricssampler.js +15 -3
  41. package/dist_ts/classes.ticketstore.d.ts +50 -3
  42. package/dist_ts/classes.ticketstore.js +45 -8
  43. package/dist_ts/classes.workercallers.js +4 -2
  44. package/dist_ts/driver/classes.directreports.d.ts +14 -4
  45. package/dist_ts/driver/classes.directreports.js +42 -23
  46. package/dist_ts/driver/classes.directreportstore.d.ts +8 -1
  47. package/dist_ts/driver/classes.directreportstore.js +20 -10
  48. package/dist_ts/driver/classes.driverservice.d.ts +44 -3
  49. package/dist_ts/driver/classes.driverservice.js +50 -16
  50. package/dist_ts/fleet/classes.claudeworkers.d.ts +21 -5
  51. package/dist_ts/fleet/classes.claudeworkers.js +142 -46
  52. package/dist_ts/fleet/classes.codexworkers.d.ts +16 -4
  53. package/dist_ts/fleet/classes.codexworkers.js +22 -5
  54. package/dist_ts/fleet/classes.workercommand.d.ts +6 -1
  55. package/dist_ts/fleet/classes.workercommand.js +15 -4
  56. package/dist_ts/fleet/classes.workers.d.ts +21 -1
  57. package/dist_ts/fleet/classes.workers.js +80 -40
  58. package/dist_ts/fleet/classes.workerstore.js +14 -8
  59. package/dist_ts/fleet/functions.unbounddrivers.js +2 -2
  60. package/dist_ts/fleet/functions.workervalidation.js +11 -4
  61. package/dist_ts/fleet/interfaces.workers.d.ts +27 -5
  62. package/dist_ts/fleet/interfaces.workers.js +8 -4
  63. package/dist_ts/functions.agentmessage.d.ts +3 -0
  64. package/dist_ts/functions.agentmessage.js +4 -1
  65. package/dist_ts/functions.deviceapi.d.ts +198 -4
  66. package/dist_ts/functions.deviceapi.js +1060 -38
  67. package/dist_ts/functions.exactpersistence.d.ts +3 -0
  68. package/dist_ts/functions.exactpersistence.js +4 -0
  69. package/dist_ts/functions.fleetworkercli.d.ts +1 -1
  70. package/dist_ts/functions.fleetworkercli.js +11 -8
  71. package/dist_ts/functions.inferencecli.js +3 -1
  72. package/dist_ts/functions.mcpfleetworkertools.js +3 -3
  73. package/dist_ts/functions.ticketactor.d.ts +17 -1
  74. package/dist_ts/functions.ticketactor.js +55 -15
  75. package/dist_ts/functions.ticketvalidation.js +11 -2
  76. package/dist_ts/interfaces.auth.d.ts +1 -1
  77. package/dist_ts/interfaces.auth.js +9 -1
  78. package/dist_ts/plugins.d.ts +3 -1
  79. package/dist_ts/plugins.js +7 -2
  80. package/dist_ts_authswitch/authority-contract.d.ts +25 -0
  81. package/dist_ts_authswitch/authority-contract.js +1 -1
  82. package/dist_ts_authswitch/authority-overview.d.ts +8 -0
  83. package/dist_ts_authswitch/authority-overview.js +17 -6
  84. package/dist_ts_authswitch/authority-placement.d.ts +20 -16
  85. package/dist_ts_authswitch/authority-placement.js +17 -10
  86. package/dist_ts_authswitch/authority-renewal.d.ts +34 -0
  87. package/dist_ts_authswitch/authority-renewal.js +56 -0
  88. package/dist_ts_authswitch/classes.authoritybroker.d.ts +8 -0
  89. package/dist_ts_authswitch/classes.authoritybroker.js +35 -2
  90. package/dist_ts_authswitch/classes.authoritycli.d.ts +1 -0
  91. package/dist_ts_authswitch/classes.authoritycli.js +44 -3
  92. package/dist_ts_authswitch/classes.authorityclient.d.ts +6 -1
  93. package/dist_ts_authswitch/classes.authorityclient.js +12 -4
  94. package/dist_ts_authswitch/classes.authoritydaemon.js +8 -1
  95. package/dist_ts_authswitch/classes.authoritydatabase.js +6 -2
  96. package/dist_ts_authswitch/classes.authoritymodels.d.ts +7 -0
  97. package/dist_ts_authswitch/classes.authoritymodels.js +21 -5
  98. package/dist_ts_interfaces/devices.d.ts +1027 -7
  99. package/dist_ts_interfaces/devices.js +68 -2
  100. package/dist_ts_interfaces/fleetworkers.d.ts +37 -10
  101. package/dist_ts_interfaces/fleetworkers.js +19 -8
  102. package/dist_ts_interfaces/inbox.d.ts +234 -0
  103. package/dist_ts_interfaces/inbox.js +101 -0
  104. package/dist_ts_interfaces/index.d.ts +1 -0
  105. package/dist_ts_interfaces/index.js +2 -1
  106. package/dist_ts_interfaces/interfaces.d.ts +10 -3
  107. package/dist_ts_interfaces/interfaces.js +4 -2
  108. package/dist_ts_interfaces/mcprequests.d.ts +34 -4
  109. package/dist_ts_interfaces/mcprequests.js +11 -1
  110. package/dist_ts_interfaces/mcpworkspacerequests.d.ts +4 -1
  111. package/dist_ts_interfaces/mcpworkspacerequests.js +1 -1
  112. package/dist_ts_interfaces/nativesessions.d.ts +16 -3
  113. package/dist_ts_interfaces/plugins.d.ts +2 -1
  114. package/dist_ts_interfaces/plugins.js +4 -2
  115. package/dist_ts_interfaces/requests.accounts.d.ts +21 -0
  116. package/dist_ts_interfaces/requests.accounts.js +3 -1
  117. package/dist_ts_interfaces/requests.d.ts +3 -2
  118. package/dist_ts_interfaces/requests.js +1 -1
  119. package/dist_ts_interfaces/workercallers.d.ts +2 -0
  120. package/dist_ts_migration/classes.documentmigrationrunner.d.ts +14 -0
  121. package/dist_ts_migration/classes.documentmigrationrunner.js +20 -1
  122. package/dist_ts_migration/index.d.ts +1 -0
  123. package/dist_ts_migration/index.js +2 -1
  124. package/dist_ts_migration/v43_ticketactornames.d.ts +32 -0
  125. package/dist_ts_migration/v43_ticketactornames.js +236 -0
  126. package/docs/authswitch.md +20 -1
  127. package/package.json +3 -3
  128. package/readme.md +144 -27
  129. package/ts/00_commitinfo_data.ts +1 -1
  130. package/ts/aglapi/aglapisurface.document.ts +196 -16
  131. package/ts/classes.accountsactions.ts +30 -3
  132. package/ts/classes.authstore.ts +10 -0
  133. package/ts/classes.claudeharness.ts +45 -5
  134. package/ts/classes.codexclientadapter.ts +14 -1
  135. package/ts/classes.controller.ts +1412 -262
  136. package/ts/classes.controllerdevices.ts +6 -0
  137. package/ts/classes.inbox.ts +239 -0
  138. package/ts/classes.inferencerouter.ts +15 -2
  139. package/ts/classes.inferenceservice.ts +1 -1
  140. package/ts/classes.mcpclient.ts +24 -3
  141. package/ts/classes.mcpcontrollerhost.ts +5 -0
  142. package/ts/classes.mcptools.ts +17 -7
  143. package/ts/classes.mcpvalidation.ts +27 -1
  144. package/ts/classes.nativesessions.ts +63 -12
  145. package/ts/classes.opencodeclient.ts +55 -4
  146. package/ts/classes.publishedset.ts +56 -0
  147. package/ts/classes.sessionfeed.ts +17 -20
  148. package/ts/classes.systemmetricssampler.ts +13 -2
  149. package/ts/classes.ticketstore.ts +73 -12
  150. package/ts/classes.workercallers.ts +3 -1
  151. package/ts/driver/classes.directreports.ts +42 -23
  152. package/ts/driver/classes.directreportstore.ts +20 -9
  153. package/ts/driver/classes.driverservice.ts +75 -14
  154. package/ts/fleet/classes.claudeworkers.ts +112 -39
  155. package/ts/fleet/classes.codexworkers.ts +21 -6
  156. package/ts/fleet/classes.workercommand.ts +14 -4
  157. package/ts/fleet/classes.workers.ts +75 -41
  158. package/ts/fleet/classes.workerstore.ts +11 -7
  159. package/ts/fleet/functions.unbounddrivers.ts +1 -1
  160. package/ts/fleet/functions.workervalidation.ts +8 -3
  161. package/ts/fleet/interfaces.workers.ts +26 -7
  162. package/ts/functions.agentmessage.ts +3 -0
  163. package/ts/functions.deviceapi.ts +1292 -34
  164. package/ts/functions.exactpersistence.ts +5 -0
  165. package/ts/functions.fleetworkercli.ts +10 -7
  166. package/ts/functions.inferencecli.ts +2 -0
  167. package/ts/functions.mcpfleetworkertools.ts +2 -2
  168. package/ts/functions.ticketactor.ts +58 -14
  169. package/ts/functions.ticketvalidation.ts +11 -1
  170. package/ts/interfaces.auth.ts +8 -0
  171. package/ts/plugins.ts +7 -0
  172. package/ts_authswitch/authority-contract.ts +20 -0
  173. package/ts_authswitch/authority-overview.ts +28 -6
  174. package/ts_authswitch/authority-placement.ts +25 -17
  175. package/ts_authswitch/authority-renewal.ts +64 -0
  176. package/ts_authswitch/classes.authoritybroker.ts +34 -1
  177. package/ts_authswitch/classes.authoritycli.ts +49 -2
  178. package/ts_authswitch/classes.authorityclient.ts +14 -4
  179. package/ts_authswitch/classes.authoritydaemon.ts +9 -1
  180. package/ts_authswitch/classes.authoritydatabase.ts +5 -1
  181. package/ts_authswitch/classes.authoritymodels.ts +23 -3
  182. package/ts_authswitch/native-contracts.md +21 -0
  183. package/ts_authswitch/readme.md +1 -1
  184. package/ts_interfaces/devices.schema.json +3576 -603
  185. package/ts_interfaces/devices.ts +1111 -6
  186. package/ts_interfaces/fleetworkers.ts +38 -10
  187. package/ts_interfaces/inbox.ts +287 -0
  188. package/ts_interfaces/index.ts +1 -0
  189. package/ts_interfaces/interfaces.ts +9 -2
  190. package/ts_interfaces/mcprequests.ts +43 -4
  191. package/ts_interfaces/mcpworkspacerequests.ts +4 -2
  192. package/ts_interfaces/nativesessions.ts +17 -3
  193. package/ts_interfaces/plugins.ts +3 -1
  194. package/ts_interfaces/requests.accounts.ts +20 -0
  195. package/ts_interfaces/requests.ts +4 -0
  196. package/ts_interfaces/workercallers.ts +2 -0
  197. package/ts_migration/classes.documentmigrationrunner.ts +21 -0
  198. package/ts_migration/index.ts +1 -0
  199. package/ts_migration/v43_ticketactornames.ts +225 -0
  200. package/ts_web/00_commitinfo_data.ts +1 -1
  201. package/ts_web/accounts.plugins.ts +4 -2
  202. package/ts_web/classes.accountsreadmodel.ts +33 -0
  203. package/ts_web/classes.browserpresentation.ts +10 -5
  204. package/ts_web/classes.inboxfeed.ts +329 -0
  205. package/ts_web/classes.nativesessionstate.ts +9 -23
  206. package/ts_web/elements.accounts.ts +81 -0
  207. package/ts_web/elements.deployments.ts +66 -2
  208. package/ts_web/elements.fleetworker.ts +4 -2
  209. package/ts_web/elements.harnesscontrollerapp.ts +107 -37
  210. package/ts_web/elements.inbox.ts +808 -0
  211. package/ts_web/functions.inbox.ts +95 -0
  212. package/ts_web/functions.sessioncards.ts +40 -0
  213. package/ts_web/plugins.ts +2 -0
@@ -1,5 +1,5 @@
1
1
  /** The device protocol this controller speaks. */
2
- export const deviceProtocolVersion = { major: 1, minor: 1 };
2
+ export const deviceProtocolVersion = { major: 1, minor: 3 };
3
3
  /** The scheme of a pairing payload: `agl-pair:?origin=<https origin>&controller=<controller id>&code=<base64url>`. */
4
4
  export const devicePairingScheme = 'agl-pair';
5
5
  /** The first field of the message a device signs to pair. */
@@ -22,6 +22,58 @@ export const deviceLabelMaximumCharacters = 64;
22
22
  export const deviceMessageMaximumBytes = 64 * 1024;
23
23
  /** The close code of every live connection of a device the owner revoked. */
24
24
  export const deviceRevokedCloseCode = 4403;
25
+ /**
26
+ * The ticket store's own refusals: a device's ticket request is refused with them as the store refuses the owner's
27
+ * browser, each with the store's reason, and nothing changed. The ones a device meets: `ticket_not_found`,
28
+ * `ticket_question_not_found`; `ticket_revision_conflict`: the board changed while the change was made, so read the
29
+ * ticket again; `ticket_review_branch_required`, `ticket_landed_evidence_required`,
30
+ * `ticket_released_evidence_required`: the column needs its evidence first (a branch link; a branch or commit link; a
31
+ * release link); `ticket_closed_landed`: landed code ships with its release and is not closed; `ticket_question_answered`
32
+ * and `ticket_answer_invalid`. The others refuse workers and requests a device does not make. Since protocol 1.3;
33
+ * `ticket_not_found`, `ticket_question_not_found`, `ticket_question_answered` and `ticket_answer_invalid` since 1.2.
34
+ */
35
+ export const deviceTicketRefusalCodes = [
36
+ 'ticket_revision_conflict',
37
+ 'ticket_identity_required',
38
+ 'ticket_not_found',
39
+ 'ticket_not_assigned',
40
+ 'ticket_worker_column',
41
+ 'ticket_worker_create_backlog',
42
+ 'ticket_assignment_forbidden',
43
+ 'ticket_review_branch_required',
44
+ 'ticket_landed_evidence_required',
45
+ 'ticket_released_evidence_required',
46
+ 'ticket_closed_landed',
47
+ 'ticket_parent_required',
48
+ 'ticket_parent_invalid',
49
+ 'ticket_move_anchor_invalid',
50
+ 'ticket_label_reserved',
51
+ 'ticket_release_plan_forbidden',
52
+ 'ticket_unlink_forbidden',
53
+ 'ticket_release_link_forbidden',
54
+ 'ticket_link_not_found',
55
+ 'ticket_affects_invalid',
56
+ 'ticket_release_plan_invalid',
57
+ 'ticket_window_forbidden',
58
+ 'ticket_window_invalid',
59
+ 'ticket_deploy_plan_forbidden',
60
+ 'ticket_deploy_plan_invalid',
61
+ 'ticket_deploy_plan_link_forbidden',
62
+ 'ticket_deploy_plan_fixed',
63
+ 'ticket_window_waiting',
64
+ 'ticket_go_owner_only',
65
+ 'ticket_ask_forbidden',
66
+ 'ticket_answer_forbidden',
67
+ 'ticket_question_not_found',
68
+ 'ticket_comment_not_found',
69
+ 'ticket_question_answered',
70
+ 'ticket_answer_invalid',
71
+ ];
72
+ /**
73
+ * A page of a ticket's discussion holds at most `maximum` comments and questions together (`default` when the request
74
+ * names none) and at most `bytes` of them as JSON, but always one.
75
+ */
76
+ export const deviceTicketDiscussionPage = { default: 20, maximum: 50, bytes: 256 * 1024 };
25
77
  /** Every device method, by the scope that admits it. */
26
78
  export const devicePairingMethods = ['device.hello', 'device.pair', 'device.auth.challenge', 'device.auth.prove'];
27
79
  export const deviceMethods = [
@@ -31,5 +83,19 @@ export const deviceMethods = [
31
83
  'device.permission.reply',
32
84
  'device.question.reply',
33
85
  'device.elicitation.reply',
86
+ 'device.inbox.list',
87
+ 'device.ticket.answer',
88
+ 'device.driver.get',
89
+ 'device.driver.seen',
90
+ 'device.driver.read',
91
+ 'device.driver.send',
92
+ 'device.directreports.list',
93
+ 'device.directreport.message',
94
+ 'device.host.get',
95
+ 'device.board.list',
96
+ 'device.ticket.get',
97
+ 'device.ticket.comment',
98
+ 'device.ticket.ask',
99
+ 'device.ticket.move',
34
100
  ];
35
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGV2aWNlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzX2ludGVyZmFjZXMvZGV2aWNlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbm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JBQTJCO0lBQzNCLDBCQUEwQjtJQUMxQiwwQkFBMEI7SUFDMUIsdUJBQXVCO0NBQ2YsQ0FBQztBQXdrQ1g7OztHQUdHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sMEJBQTBCLEdBQUcsRUFBRSxPQUFPLEVBQUUsRUFBRSxFQUFFLE9BQU8sRUFBRSxFQUFFLEVBQUUsS0FBSyxFQUFFLEdBQUcsR0FBRyxJQUFJLEVBQVcsQ0FBQztBQTJhbkcsd0RBQXdEO0FBQ3hELE1BQU0sQ0FBQyxNQUFNLG9CQUFvQixHQUFHLENBQUMsY0FBYyxFQUFFLGFBQWEsRUFBRSx1QkFBdUIsRUFBRSxtQkFBbUIsQ0FBVSxDQUFDO0FBQzNILE1BQU0sQ0FBQyxNQUFNLGFBQWEsR0FBRztJQUMzQixzQkFBc0I7SUFDdEIscUJBQXFCO0lBQ3JCLHFCQUFxQjtJQUNyQix5QkFBeUI7SUFDekIsdUJBQXVCO0lBQ3ZCLDBCQUEwQjtJQUMxQixtQkFBbUI7SUFDbkIsc0JBQXNCO0lBQ3RCLG1CQUFtQjtJQUNuQixvQkFBb0I7SUFDcEIsb0JBQW9CO0lBQ3BCLG9CQUFvQjtJQUNwQiwyQkFBMkI7SUFDM0IsNkJBQTZCO0lBQzdCLGlCQUFpQjtJQUNqQixtQkFBbUI7SUFDbkIsbUJBQW1CO0lBQ25CLHVCQUF1QjtJQUN2QixtQkFBbUI7SUFDbkIsb0JBQW9CO0NBQ1osQ0FBQyJ9
@@ -359,14 +359,22 @@ export interface IFleetWorkerSummaryPage {
359
359
  nextCursor?: string;
360
360
  }
361
361
  /**
362
- * The refusals of the fleet worker reads, passed to the caller with their message: `job_unavailable`, the controller
363
- * holds no such job of the owner (jobs are transient: a controller restart or eviction drops them; read the worker
364
- * with `fleet_worker_get`); `worker_not_found`, the owner has no worker of that name or id; `list_cursor_mismatch`, the
365
- * cursor belongs to another filter; `list_cursor_stale`, the worker the cursor continues after is no longer held as
366
- * it was; `list_cursor_invalid`, the cursor is not one a summary list returned (a `limit` or `cursor` with the full view is
367
- * refused by request validation instead).
362
+ * The fleet's own refusals, whose text AGL writes, passed to the caller with their message, thrown or as a failed job's
363
+ * `errorCode`. Of the worker reads: `job_unavailable`, the controller holds no such job of the owner (jobs are
364
+ * transient: a controller restart or eviction drops them; read the worker with `fleet_worker_get`); `worker_not_found`,
365
+ * the owner has no worker of that name or id; `list_cursor_mismatch`, the cursor belongs to another filter;
366
+ * `list_cursor_stale`, the worker the cursor continues after is no longer held as it was; `list_cursor_invalid`, the
367
+ * cursor is not one a summary list returned (a `limit` or `cursor` with the full view is refused by request validation
368
+ * instead). Of the jobs, the relaunch and the dispatch fences, by what the caller does next: `fleet_unavailable`, the
369
+ * fleet admits no job now (it is closing, holds its most jobs, or cannot prove its own process); try again later;
370
+ * `worker_fenced`, the worker's dispatch fence stands in the way (an unresolved or running dispatch, one resolved as
371
+ * lost, a reconfirmation without its ticket comment, a fence or record another job changed, no native session yet);
372
+ * inspect the worker before acting again; `worker_archived`, the worker is archived; `ticket_mismatch`, the worker is
373
+ * bound to another ticket; `worker_conflict`, the request does not fit what the fleet holds (the name is taken, the
374
+ * session is bound already, the harness has no relaunch or native sessions, the profile is not configured, the
375
+ * directory is none, the session cannot be adopted as that identity); change the request.
368
376
  */
369
- export declare const fleetWorkerErrorCodes: readonly ['job_unavailable', 'worker_not_found', 'list_cursor_mismatch', 'list_cursor_stale', 'list_cursor_invalid'];
377
+ export declare const fleetWorkerErrorCodes: readonly ['job_unavailable', 'worker_not_found', 'list_cursor_mismatch', 'list_cursor_stale', 'list_cursor_invalid', 'fleet_unavailable', 'worker_fenced', 'worker_archived', 'ticket_mismatch', 'worker_conflict'];
370
378
  export type TFleetWorkerErrorCode = (typeof fleetWorkerErrorCodes)[number];
371
379
  export type TFleetWorkerRequest<T extends TFleetWorkerAction> = IFleetWorkerRequests[T];
372
380
  export interface IFleetWorkerJob {
@@ -379,14 +387,33 @@ export interface IFleetWorkerJob {
379
387
  ticketSync?: IFleetTicketSync;
380
388
  /** What a `native-message` job delivered. */
381
389
  nativeMessage?: IFleetNativeMessageReceipt;
390
+ /** Why the job failed, as its error said: the fleet's own refusal, or a dependency's text (a harness's output). */
382
391
  error?: string;
392
+ /**
393
+ * Set on a failed job exactly when the fleet refused it itself (`fleetWorkerErrorCodes`): then `error` is AGL's own
394
+ * text, which the Driver view and a device show. Without it, `error` may be a dependency's output.
395
+ */
396
+ errorCode?: TFleetWorkerErrorCode;
397
+ /**
398
+ * Set on a failed job: whether what it dispatched may have reached a native session, in the words of a failed native
399
+ * send (`native_session_failed`'s `outcome`). `refused`: the job failed before anything reached a native session,
400
+ * proved by a refusal before its first dispatch or by a dispatch that sent nothing: nothing was sent. `unknown`: it
401
+ * may have (a steer may have been delivered), which is every failure without that proof; read the worker before acting
402
+ * again and never send it again on your own. A failed job without it, from an older controller, is `unknown`.
403
+ */
404
+ errorOutcome?: TFleetWorkerErrorOutcome;
383
405
  }
406
+ /** How far a failed fleet worker job got (`IFleetWorkerJob.errorOutcome`). */
407
+ export declare const fleetWorkerErrorOutcomes: readonly ['refused', 'unknown'];
408
+ export type TFleetWorkerErrorOutcome = (typeof fleetWorkerErrorOutcomes)[number];
384
409
  /**
385
- * A native wake of a settled Claude Code background job no fleet worker binds. It holds no dispatch fence, writes no
386
- * ticket comment and does not observe the woken turn; `adopt` is the command that makes the job a fleet worker.
410
+ * A message to a Claude Code background job no fleet worker binds: a native wake of a settled job (`native-wake`) or a
411
+ * message into a running job's inbox through Claude Code's own SendMessage (`native-inbox`, accepted and queued, not
412
+ * read). It holds no dispatch fence, writes no ticket comment and does not observe the turn; `adopt` is the command that
413
+ * makes the job a fleet worker.
387
414
  */
388
415
  export interface IFleetNativeMessageReceipt {
389
- delivery: 'native-wake';
416
+ delivery: 'native-wake' | 'native-inbox';
390
417
  /** The job's full session id. */
391
418
  nativeId: string;
392
419
  /** Claude Code's short job id. */
@@ -3,12 +3,23 @@ export const fleetWorkerReadActions = ['list', 'get', 'status', 'job-wait', 'wat
3
3
  /** The longest fleet worker job wait one request asks for. */
4
4
  export const fleetWorkerJobWaitMaximumMs = 240_000;
5
5
  /**
6
- * The refusals of the fleet worker reads, passed to the caller with their message: `job_unavailable`, the controller
7
- * holds no such job of the owner (jobs are transient: a controller restart or eviction drops them; read the worker
8
- * with `fleet_worker_get`); `worker_not_found`, the owner has no worker of that name or id; `list_cursor_mismatch`, the
9
- * cursor belongs to another filter; `list_cursor_stale`, the worker the cursor continues after is no longer held as
10
- * it was; `list_cursor_invalid`, the cursor is not one a summary list returned (a `limit` or `cursor` with the full view is
11
- * refused by request validation instead).
6
+ * The fleet's own refusals, whose text AGL writes, passed to the caller with their message, thrown or as a failed job's
7
+ * `errorCode`. Of the worker reads: `job_unavailable`, the controller holds no such job of the owner (jobs are
8
+ * transient: a controller restart or eviction drops them; read the worker with `fleet_worker_get`); `worker_not_found`,
9
+ * the owner has no worker of that name or id; `list_cursor_mismatch`, the cursor belongs to another filter;
10
+ * `list_cursor_stale`, the worker the cursor continues after is no longer held as it was; `list_cursor_invalid`, the
11
+ * cursor is not one a summary list returned (a `limit` or `cursor` with the full view is refused by request validation
12
+ * instead). Of the jobs, the relaunch and the dispatch fences, by what the caller does next: `fleet_unavailable`, the
13
+ * fleet admits no job now (it is closing, holds its most jobs, or cannot prove its own process); try again later;
14
+ * `worker_fenced`, the worker's dispatch fence stands in the way (an unresolved or running dispatch, one resolved as
15
+ * lost, a reconfirmation without its ticket comment, a fence or record another job changed, no native session yet);
16
+ * inspect the worker before acting again; `worker_archived`, the worker is archived; `ticket_mismatch`, the worker is
17
+ * bound to another ticket; `worker_conflict`, the request does not fit what the fleet holds (the name is taken, the
18
+ * session is bound already, the harness has no relaunch or native sessions, the profile is not configured, the
19
+ * directory is none, the session cannot be adopted as that identity); change the request.
12
20
  */
13
- export const fleetWorkerErrorCodes = ['job_unavailable', 'worker_not_found', 'list_cursor_mismatch', 'list_cursor_stale', 'list_cursor_invalid'];
14
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmxlZXR3b3JrZXJzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHNfaW50ZXJmYWNlcy9mbGVldHdvcmtlcnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBcU5BLG1EQUFtRDtBQUNuRCxNQUFNLENBQUMsTUFBTSxzQkFBc0IsR0FBRyxDQUFDLE1BQU0sRUFBRSxLQUFLLEVBQUUsUUFBUSxFQUFFLFVBQVUsRUFBRSxPQUFPLENBQWtELENBQUM7QUFHdEksOERBQThEO0FBQzlELE1BQU0sQ0FBQyxNQUFNLDJCQUEyQixHQUFHLE9BQU8sQ0FBQztBQStDbkQ7Ozs7Ozs7R0FPRztBQUNILE1BQU0sQ0FBQyxNQUFNLHFCQUFxQixHQUFHLENBQUMsaUJBQWlCLEVBQUUsa0JBQWtCLEVBQUUsc0JBQXNCLEVBQUUsbUJBQW1CLEVBQUUscUJBQXFCLENBQVUsQ0FBQyJ9
21
+ export const fleetWorkerErrorCodes = ['job_unavailable', 'worker_not_found', 'list_cursor_mismatch', 'list_cursor_stale', 'list_cursor_invalid',
22
+ 'fleet_unavailable', 'worker_fenced', 'worker_archived', 'ticket_mismatch', 'worker_conflict'];
23
+ /** How far a failed fleet worker job got (`IFleetWorkerJob.errorOutcome`). */
24
+ export const fleetWorkerErrorOutcomes = ['refused', 'unknown'];
25
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmxlZXR3b3JrZXJzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHNfaW50ZXJmYWNlcy9mbGVldHdvcmtlcnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBcU5BLG1EQUFtRDtBQUNuRCxNQUFNLENBQUMsTUFBTSxzQkFBc0IsR0FBRyxDQUFDLE1BQU0sRUFBRSxLQUFLLEVBQUUsUUFBUSxFQUFFLFVBQVUsRUFBRSxPQUFPLENBQWtELENBQUM7QUFHdEksOERBQThEO0FBQzlELE1BQU0sQ0FBQyxNQUFNLDJCQUEyQixHQUFHLE9BQU8sQ0FBQztBQStDbkQ7Ozs7Ozs7Ozs7Ozs7OztHQWVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0scUJBQXFCLEdBQUcsQ0FBQyxpQkFBaUIsRUFBRSxrQkFBa0IsRUFBRSxzQkFBc0IsRUFBRSxtQkFBbUIsRUFBRSxxQkFBcUI7SUFDN0ksbUJBQW1CLEVBQUUsZUFBZSxFQUFFLGlCQUFpQixFQUFFLGlCQUFpQixFQUFFLGlCQUFpQixDQUFVLENBQUM7QUE2QjFHLDhFQUE4RTtBQUM5RSxNQUFNLENBQUMsTUFBTSx3QkFBd0IsR0FBRyxDQUFDLFNBQVMsRUFBRSxTQUFTLENBQVUsQ0FBQyJ9
@@ -0,0 +1,234 @@
1
+ import type * as plugins from './plugins.js';
2
+ import type { IControllerNativeWait, IControllerPermission, IControllerQuestion, IControllerRuntimeId } from './interfaces.js';
3
+ import type { TControllerElicitation } from './elicitations.js';
4
+ import type { IControllerNativeSessionRef } from './nativesessions.js';
5
+ import type { TControllerSessionFeedHarness } from './sessionfeed.js';
6
+ import type { ITicketQuestion, TTicketColumn } from './tickets.js';
7
+ import type { TFleetDeployCondition } from './deployments.js';
8
+ /** Every kind of Inbox item. */
9
+ export declare const controllerInboxKinds: readonly ['permission', 'question', 'elicitation', 'native_wait', 'driver', 'deploy_go', 'window_go', 'ticket_question'];
10
+ export type TControllerInboxKind = (typeof controllerInboxKinds)[number];
11
+ /**
12
+ * The order the Inbox lists its items in: the session prompts (a permission, a question, an MCP form, and a wait the
13
+ * harness shows in its own client), then the driver's `needs input:` turn, then the owner's go's, then ticket
14
+ * questions. Within a group the oldest comes first, whatever its kind. The controller sorts; clients show the order
15
+ * it sends.
16
+ */
17
+ export declare const controllerInboxGroups: readonly (readonly TControllerInboxKind[])[];
18
+ /** The filter chips besides All, and the kinds each shows. All shows every kind. */
19
+ export declare const controllerInboxChipKinds: {
20
+ readonly sessions: readonly ["permission", "question", "elicitation", "native_wait", "driver"];
21
+ readonly board: readonly ["ticket_question"];
22
+ readonly deploys: readonly ["deploy_go", "window_go"];
23
+ };
24
+ export type TControllerInboxChip = 'all' | keyof typeof controllerInboxChipKinds;
25
+ export declare const controllerInboxChips: readonly TControllerInboxChip[];
26
+ /** The chip, besides All, that shows `kindArg`. */
27
+ export declare const controllerInboxChipOf: (kindArg: TControllerInboxKind) => Exclude<TControllerInboxChip, 'all'>;
28
+ /**
29
+ * The Inbox's bounds. An item whose JSON is over `itemBytes` keeps its place without its payload (`omitted`) and is
30
+ * answered only in its own view; a payload is never cut short. The list holds at most `items` items and `listBytes` of
31
+ * JSON; `total` counts every item, and `limited` says some were left out. A change of more than `deltaItems` items
32
+ * publishes a reset. A title is one line of at most `titleChars` characters; a go names at most `ships` tickets.
33
+ */
34
+ export declare const controllerInboxLimits: {
35
+ readonly items: 200;
36
+ readonly itemBytes: number;
37
+ readonly listBytes: number;
38
+ readonly deltaItems: 100;
39
+ readonly titleChars: 280;
40
+ readonly ships: 20;
41
+ };
42
+ /** Where an item lives. A session is named as the session feed names it (`rowId`) and as the browser opens it. */
43
+ export type TControllerInboxWhere =
44
+ /** A conversation AGL hosts. */
45
+ {
46
+ kind: 'conversation';
47
+ projectId: string;
48
+ sessionId: IControllerRuntimeId;
49
+ harness: TControllerSessionFeedHarness;
50
+ rowId: string;
51
+ name: string;
52
+ }
53
+ /** A direct child (an OpenCode subagent) of the conversation `parentSessionId`, whose row is `rowId`. */
54
+ | {
55
+ kind: 'child';
56
+ projectId: string;
57
+ parentSessionId: IControllerRuntimeId & {
58
+ harnessId: 'opencode';
59
+ };
60
+ childSessionId: IControllerRuntimeId & {
61
+ harnessId: 'opencode';
62
+ };
63
+ harness: 'opencode';
64
+ rowId: string;
65
+ name: string;
66
+ childName: string;
67
+ }
68
+ /** A native session AGL does not host, on this controller's host. */
69
+ | {
70
+ kind: 'native';
71
+ session: IControllerNativeSessionRef;
72
+ harness: 'claude' | 'codex';
73
+ rowId: string;
74
+ name: string;
75
+ /** The host the session runs on: the controller's. */
76
+ host: string;
77
+ }
78
+ /** The host's driver, which no session list shows. */
79
+ | {
80
+ kind: 'driver';
81
+ projectId: string;
82
+ sessionId: IControllerRuntimeId;
83
+ } | {
84
+ kind: 'ticket';
85
+ ticketId: string;
86
+ ticketKey: string;
87
+ ticketTitle: string;
88
+ project: string;
89
+ columnId: TTicketColumn;
90
+ };
91
+ /**
92
+ * How an item is answered, through the request its owner already takes:
93
+ * `conversation`: `controller.permission.reply`, `controller.question.reply` or `controller.elicitation.reply` with the
94
+ * conversation's `projectId` and `sessionId` (the driver's own prompts too);
95
+ * `child`: `controller.session.child.get` for the child, then `controller.session.child.permission.reply` or
96
+ * `controller.session.child.question.reply`;
97
+ * `native`: `controller.nativesession.permission.reply`, `.question.reply` or `.elicitation.reply` with the session ref;
98
+ * `ticket`: `controller.ticket.answer` with the ticket and the question;
99
+ * `none`: not here. The driver's turn is answered in the Driver view, a native wait in the harness's own client, and an
100
+ * item whose payload was left out in its own view.
101
+ */
102
+ export type TControllerInboxAnswer = 'conversation' | 'child' | 'native' | 'ticket' | 'none';
103
+ /** Why an item's payload was left out: its JSON is `bytes` long, over `controllerInboxLimits.itemBytes`. */
104
+ export interface IControllerInboxOmission {
105
+ reason: 'oversize';
106
+ bytes: number;
107
+ }
108
+ /** A deploy plan as its go shows it: what runs now, what it deploys, when, and what ships with it. */
109
+ export interface IControllerInboxDeployGo {
110
+ target: string;
111
+ targetName?: string;
112
+ environment?: string;
113
+ /** The release the target should run. */
114
+ version: string;
115
+ /** What the target runs now, as its newest observation says. */
116
+ runs?: string;
117
+ deployWhen?: TFleetDeployCondition;
118
+ /** The maintenance window the deploy would run in, the next one the owner gave for the target. */
119
+ window?: {
120
+ from: string;
121
+ to: string;
122
+ };
123
+ /** Tickets the deploy ships, at most `controllerInboxLimits.ships`; `shipsTotal` counts them all. */
124
+ ships: {
125
+ key: string;
126
+ title: string;
127
+ }[];
128
+ shipsTotal: number;
129
+ /** Who deploys it: the session the plan is assigned to; absent is the driver. */
130
+ assignee?: string;
131
+ }
132
+ /** A maintenance window the driver proposed, as its go shows it. */
133
+ export interface IControllerInboxWindowGo {
134
+ from: string;
135
+ to: string;
136
+ targets: string[];
137
+ }
138
+ interface IControllerInboxItemBase<TKind extends TControllerInboxKind, TWhere extends TControllerInboxWhere> {
139
+ /** Stable across clients and passes: the kind, where it lives and the request or question id. */
140
+ id: string;
141
+ kind: TKind;
142
+ /** Unix milliseconds since it waits. */
143
+ since: number;
144
+ /** One line: what is asked. */
145
+ title: string;
146
+ where: TWhere;
147
+ answer: TControllerInboxAnswer;
148
+ /** Set when the payload was left out; the item is then answered only in its own view (`answer: 'none'`). */
149
+ omitted?: IControllerInboxOmission;
150
+ }
151
+ type TSessionWhere = Extract<TControllerInboxWhere, {
152
+ kind: 'conversation' | 'child' | 'native' | 'driver';
153
+ }>;
154
+ export interface IControllerInboxPermissionItem extends IControllerInboxItemBase<'permission', TSessionWhere> {
155
+ permission?: IControllerPermission;
156
+ }
157
+ export interface IControllerInboxQuestionItem extends IControllerInboxItemBase<'question', TSessionWhere> {
158
+ question?: IControllerQuestion;
159
+ }
160
+ export interface IControllerInboxElicitationItem extends IControllerInboxItemBase<'elicitation', TSessionWhere> {
161
+ elicitation?: TControllerElicitation;
162
+ }
163
+ /** A wait the harness shows in its own client: AGL holds no request for it, so it is answered there (`answer: 'none'`). */
164
+ export interface IControllerInboxNativeWaitItem extends IControllerInboxItemBase<'native_wait', Extract<TControllerInboxWhere, {
165
+ kind: 'conversation' | 'native';
166
+ }>> {
167
+ nativeWait: IControllerNativeWait;
168
+ /** The host the harness's client runs on: the controller's. */
169
+ host: string;
170
+ }
171
+ /** The driver's last turn ended on a `needs input:` line; the owner answers in the Driver view (`answer: 'none'`). */
172
+ export interface IControllerInboxDriverItem extends IControllerInboxItemBase<'driver', Extract<TControllerInboxWhere, {
173
+ kind: 'driver';
174
+ }>> {
175
+ /** The `needs input:` line. */
176
+ line?: string;
177
+ /** The transcript entry the line ends. */
178
+ messageId: string;
179
+ }
180
+ type TTicketWhere = Extract<TControllerInboxWhere, {
181
+ kind: 'ticket';
182
+ }>;
183
+ /** A deploy plan's question: only the owner's answer is a go. */
184
+ export interface IControllerInboxDeployGoItem extends IControllerInboxItemBase<'deploy_go', TTicketWhere> {
185
+ question?: ITicketQuestion;
186
+ plan: IControllerInboxDeployGo;
187
+ }
188
+ /** The question of a maintenance window the driver proposed: only the owner's answer is a go. */
189
+ export interface IControllerInboxWindowGoItem extends IControllerInboxItemBase<'window_go', TTicketWhere> {
190
+ question?: ITicketQuestion;
191
+ window: IControllerInboxWindowGo;
192
+ }
193
+ export interface IControllerInboxTicketQuestionItem extends IControllerInboxItemBase<'ticket_question', TTicketWhere> {
194
+ question?: ITicketQuestion;
195
+ }
196
+ export type TControllerInboxItem = IControllerInboxPermissionItem | IControllerInboxQuestionItem | IControllerInboxElicitationItem | IControllerInboxNativeWaitItem | IControllerInboxDriverItem | IControllerInboxDeployGoItem | IControllerInboxWindowGoItem | IControllerInboxTicketQuestionItem;
197
+ /** The order of two items: by group as `controllerInboxGroups` lists them, then oldest first, then by id. */
198
+ export declare const compareControllerInboxItems: (leftArg: TControllerInboxItem, rightArg: TControllerInboxItem) => number;
199
+ /** The words an item is found by: its title, where it lives and what it names. */
200
+ export declare const controllerInboxSearchText: (itemArg: TControllerInboxItem) => string;
201
+ /** Whether an item shows under `chipArg` and the search `queryArg` (every word of it, any case). */
202
+ export declare const controllerInboxItemShown: (itemArg: TControllerInboxItem, chipArg: TControllerInboxChip, queryArg?: string) => boolean;
203
+ /** The list as the controller holds it, in its order. `total` counts every item, also those `limited` left out. */
204
+ export interface IControllerInboxSnapshot {
205
+ epoch: string;
206
+ revision: number;
207
+ items: TControllerInboxItem[];
208
+ total: number;
209
+ limited: boolean;
210
+ }
211
+ /**
212
+ * One change. `epoch` names the controller process's Inbox; a client applies a delta only on its epoch at the revision
213
+ * after the one it holds, and lists the Inbox again otherwise (and on `reset`). `order` is every listed item's id in
214
+ * the list's order.
215
+ */
216
+ export type TControllerInboxDelta = {
217
+ epoch: string;
218
+ revision: number;
219
+ } & ({
220
+ upserts: TControllerInboxItem[];
221
+ removed: string[];
222
+ order: string[];
223
+ total: number;
224
+ limited: boolean;
225
+ } | {
226
+ reset: true;
227
+ });
228
+ /** The Inbox, after reading every source that changed. */
229
+ export interface IReq_ControllerInboxList extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_ControllerInboxList> {
230
+ method: 'controller.inbox.list';
231
+ request: Record<string, never>;
232
+ response: IControllerInboxSnapshot;
233
+ }
234
+ export {};
@@ -0,0 +1,101 @@
1
+ /*
2
+ * The Inbox (AGL-1635): one list, kept by the controller, of what waits for the owner across sessions and the board.
3
+ * The browser and paired devices read the same list; each item names where it lives and how it is answered, and the
4
+ * answer goes to the item's owner (the harness of its session, or the ticket store). An answer in any client removes
5
+ * the item everywhere, because the list is recomputed from those owners.
6
+ */
7
+ /** Every kind of Inbox item. */
8
+ export const controllerInboxKinds = [
9
+ 'permission',
10
+ 'question',
11
+ 'elicitation',
12
+ 'native_wait',
13
+ 'driver',
14
+ 'deploy_go',
15
+ 'window_go',
16
+ 'ticket_question',
17
+ ];
18
+ /**
19
+ * The order the Inbox lists its items in: the session prompts (a permission, a question, an MCP form, and a wait the
20
+ * harness shows in its own client), then the driver's `needs input:` turn, then the owner's go's, then ticket
21
+ * questions. Within a group the oldest comes first, whatever its kind. The controller sorts; clients show the order
22
+ * it sends.
23
+ */
24
+ export const controllerInboxGroups = [
25
+ ['permission', 'question', 'elicitation', 'native_wait'],
26
+ ['driver'],
27
+ ['deploy_go', 'window_go'],
28
+ ['ticket_question'],
29
+ ];
30
+ const controllerInboxGroupOf = (kindArg) => (controllerInboxGroups.findIndex((groupArg) => groupArg.includes(kindArg)));
31
+ /** The filter chips besides All, and the kinds each shows. All shows every kind. */
32
+ export const controllerInboxChipKinds = {
33
+ sessions: ['permission', 'question', 'elicitation', 'native_wait', 'driver'],
34
+ board: ['ticket_question'],
35
+ deploys: ['deploy_go', 'window_go'],
36
+ };
37
+ export const controllerInboxChips = ['all', 'sessions', 'board', 'deploys'];
38
+ /** The chip, besides All, that shows `kindArg`. */
39
+ export const controllerInboxChipOf = (kindArg) => {
40
+ for (const [chip, kinds] of Object.entries(controllerInboxChipKinds)) {
41
+ if (kinds.includes(kindArg))
42
+ return chip;
43
+ }
44
+ throw new Error(`The Inbox kind ${kindArg} has no chip.`);
45
+ };
46
+ /**
47
+ * The Inbox's bounds. An item whose JSON is over `itemBytes` keeps its place without its payload (`omitted`) and is
48
+ * answered only in its own view; a payload is never cut short. The list holds at most `items` items and `listBytes` of
49
+ * JSON; `total` counts every item, and `limited` says some were left out. A change of more than `deltaItems` items
50
+ * publishes a reset. A title is one line of at most `titleChars` characters; a go names at most `ships` tickets.
51
+ */
52
+ export const controllerInboxLimits = {
53
+ items: 200,
54
+ itemBytes: 64 * 1024,
55
+ listBytes: 2 * 1024 * 1024,
56
+ deltaItems: 100,
57
+ titleChars: 280,
58
+ ships: 20,
59
+ };
60
+ /** The order of two items: by group as `controllerInboxGroups` lists them, then oldest first, then by id. */
61
+ export const compareControllerInboxItems = (leftArg, rightArg) => (controllerInboxGroupOf(leftArg.kind) - controllerInboxGroupOf(rightArg.kind)
62
+ || leftArg.since - rightArg.since
63
+ || (leftArg.id < rightArg.id ? -1 : leftArg.id > rightArg.id ? 1 : 0));
64
+ /** The words an item is found by: its title, where it lives and what it names. */
65
+ export const controllerInboxSearchText = (itemArg) => {
66
+ const where = itemArg.where;
67
+ const words = [itemArg.title, itemArg.kind.replace('_', ' ')];
68
+ switch (where.kind) {
69
+ case 'conversation':
70
+ words.push(where.name, where.harness);
71
+ break;
72
+ case 'child':
73
+ words.push(where.name, where.childName, where.harness);
74
+ break;
75
+ case 'native':
76
+ words.push(where.name, where.harness, where.host);
77
+ break;
78
+ case 'driver':
79
+ words.push('driver');
80
+ break;
81
+ case 'ticket':
82
+ words.push(where.ticketKey, where.ticketTitle, where.project);
83
+ break;
84
+ }
85
+ if (itemArg.kind === 'deploy_go')
86
+ words.push(itemArg.plan.target, itemArg.plan.targetName ?? '', itemArg.plan.version);
87
+ if (itemArg.kind === 'window_go')
88
+ words.push(...itemArg.window.targets);
89
+ return words.join(' ').toLowerCase();
90
+ };
91
+ /** Whether an item shows under `chipArg` and the search `queryArg` (every word of it, any case). */
92
+ export const controllerInboxItemShown = (itemArg, chipArg, queryArg = '') => {
93
+ if (chipArg !== 'all' && controllerInboxChipOf(itemArg.kind) !== chipArg)
94
+ return false;
95
+ const words = queryArg.toLowerCase().split(/\s+/u).filter(Boolean);
96
+ if (words.length === 0)
97
+ return true;
98
+ const text = controllerInboxSearchText(itemArg);
99
+ return words.every((wordArg) => text.includes(wordArg));
100
+ };
101
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5ib3guanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90c19pbnRlcmZhY2VzL2luYm94LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWFBOzs7OztHQUtHO0FBRUgsZ0NBQWdDO0FBQ2hDLE1BQU0sQ0FBQyxNQUFNLG9CQUFvQixHQUFHO0lBQ2xDLFlBQVk7SUFDWixVQUFVO0lBQ1YsYUFBYTtJQUNiLGFBQWE7SUFDYixRQUFRO0lBQ1IsV0FBVztJQUNYLFdBQVc7SUFDWCxpQkFBaUI7Q0FDVCxDQUFDO0FBR1g7Ozs7O0dBS0c7QUFDSCxNQUFNLENBQUMsTUFBTSxxQkFBcUIsR0FBaUQ7SUFDakYsQ0FBQyxZQUFZLEVBQUUsVUFBVSxFQUFFLGFBQWEsRUFBRSxhQUFhLENBQUM7SUFDeEQsQ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MsSUFBSSxLQUFLLFdBQVc7UUFBRSxLQUFLLENBQUMsSUFBSSxDQUFDLEdBQUcsT0FBTyxDQUFDLE1BQU0sQ0FBQyxPQUFPLENBQUMsQ0FBQztJQUN4RSxPQUFPLEtBQUssQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLENBQUMsV0FBVyxFQUFFLENBQUM7QUFDdkMsQ0FBQyxDQUFDO0FBRUYsb0dBQW9HO0FBQ3BHLE1BQU0sQ0FBQyxNQUFNLHdCQUF3QixHQUFHLENBQUMsT0FBNkIsRUFBRSxPQUE2QixFQUFFLFFBQVEsR0FBRyxFQUFFLEVBQVcsRUFBRTtJQUMvSCxJQUFJLE9BQU8sS0FBSyxLQUFLLElBQUkscUJBQXFCLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxLQUFLLE9BQU87UUFBRSxPQUFPLEtBQUssQ0FBQztJQUN2RixNQUFNLEtBQUssR0FBRyxRQUFRLENBQUMsV0FBVyxFQUFFLENBQUMsS0FBSyxDQUFDLE1BQU0sQ0FBQyxDQUFDLE1BQU0sQ0FBQyxPQUFPLENBQUMsQ0FBQztJQUNuRSxJQUFJLEtBQUssQ0FBQyxNQUFNLEtBQUssQ0FBQztRQUFFLE9BQU8sSUFBSSxDQUFDO0lBQ3BDLE1BQU0sSUFBSSxHQUFHLHlCQUF5QixDQUFDLE9BQU8sQ0FBQyxDQUFDO0lBQ2hELE9BQU8sS0FBSyxDQUFDLEtBQUssQ0FBQyxDQUFDLE9BQU8sRUFBRSxFQUFFLENBQUMsSUFBSSxDQUFDLFFBQVEsQ0FBQyxPQUFPLENBQUMsQ0FBQyxDQUFDO0FBQzFELENBQUMsQ0FBQyJ9
@@ -31,6 +31,7 @@ export * from './workercallers.js';
31
31
  export * from './driver.js';
32
32
  export * from './requests.driver.js';
33
33
  export * from './sessionfeed.js';
34
+ export * from './inbox.js';
34
35
  export * from './nativesessions.js';
35
36
  export * from './metrics.js';
36
37
  export * from './proxycapacity.js';
@@ -31,9 +31,10 @@ export * from './workercallers.js';
31
31
  export * from './driver.js';
32
32
  export * from './requests.driver.js';
33
33
  export * from './sessionfeed.js';
34
+ export * from './inbox.js';
34
35
  export * from './nativesessions.js';
35
36
  export * from './metrics.js';
36
37
  export * from './proxycapacity.js';
37
38
  export * from './devices.js';
38
39
  export * from './requests.devices.js';
39
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90c19pbnRlcmZhY2VzL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsaUJBQWlCLENBQUM7QUFDaEMsY0FBYyxtQkFBbUIsQ0FBQztBQUNsQyxjQUFjLGlDQUFpQyxDQUFDO0FBQ2hELGNBQWMsK0JBQStCLENBQUM7QUFDOUMsY0FBYywwQkFBMEIsQ0FBQztBQUN6QyxjQUFjLCtCQUErQixDQUFDO0FBQzlDLGNBQWMsdUJBQXVCLENBQUM7QUFDdEMsY0FBYyxtQkFBbUIsQ0FBQztBQUNsQyxjQUFjLGlDQUFpQyxDQUFDO0FBQ2hELGNBQWMsZUFBZSxDQUFDO0FBQzlCLGNBQWMsZUFBZSxDQUFDO0FBQzlCLGNBQWMsa0JBQWtCLENBQUM7QUFDakMsY0FBYyxpQkFBaUIsQ0FBQztBQUNoQyxjQUFjLGNBQWMsQ0FBQztBQUM3QixjQUFjLFlBQVksQ0FBQztBQUMzQixjQUFjLDJCQUEyQixDQUFDO0FBQzFDLGNBQWMscUJBQXFCLENBQUM7QUFDcEMsY0FBYyx3QkFBd0IsQ0FBQztBQUN2QyxjQUFjLG9CQUFvQixDQUFDO0FBQ25DLGNBQWMsNkJBQTZCLENBQUM7QUFDNUMsY0FBYyxjQUFjLENBQUM7QUFDN0IsY0FBYyx1QkFBdUIsQ0FBQztBQUN0QyxjQUFjLFlBQVksQ0FBQztBQUMzQixjQUFjLHFC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ksQ0FBQztBQUMzQixjQUFjLDJCQUEyQixDQUFDO0FBQzFDLGNBQWMscUJBQXFCLENBQUM7QUFDcEMsY0FBYyx3QkFBd0IsQ0FBQztBQUN2QyxjQUFjLG9CQUFvQixDQUFDO0FBQ25DLGNBQWMsNkJBQTZCLENBQUM7QUFDNUMsY0FBYyxjQUFjLENBQUM7QUFDN0IsY0FBYyx1QkFBdUIsQ0FBQztBQUN0QyxjQUFjLFlBQVksQ0FBQztBQUMzQixjQUFjLHFCQUFxQixDQUFDO0FBQ3BDLGNBQWMsa0JBQWtCLENBQUM7QUFFakMsY0FBYyxtQkFBbUIsQ0FBQztBQUNsQyxjQUFjLDRCQUE0QixDQUFDO0FBQzNDLGNBQWMsb0JBQW9CLENBQUM7QUFDbkMsY0FBYyw2QkFBNkIsQ0FBQztBQUM1QyxjQUFjLG9CQUFvQixDQUFDO0FBQ25DLGNBQWMsYUFBYSxDQUFDO0FBQzVCLGNBQWMsc0JBQXNCLENBQUM7QUFDckMsY0FBYyxrQkFBa0IsQ0FBQztBQUNqQyxjQUFjLFlBQVksQ0FBQztBQUMzQixjQUFjLHFCQUFxQixDQUFDO0FBQ3BDLGNBQWMsY0FBYyxDQUFDO0FBQzdCLGNBQWMsb0JBQW9CLENBQUM7QUFDbkMsY0FBYyxjQUFjLENBQUM7QUFDN0IsY0FBYyx1QkFBdUIsQ0FBQyJ9
@@ -1,6 +1,6 @@
1
1
  import type { ILiveBrowserDialog, ILiveBrowserDialogResponse, ILiveVideoOffer, ILiveVideoDescription, ILiveVideoStatistics, ILiveVideoAcceleration } from '@push.rocks/smartbrowser/web';
2
2
  import type { IControllerBrowserPaintSource, IControllerBrowserPresentationState, TControllerBrowserPaintAvailability, TControllerBrowserPaintTermination } from './browserpaint.js';
3
- export declare const controllerProtocolVersion: 52;
3
+ export declare const controllerProtocolVersion: 53;
4
4
  export declare const controllerUpgradeManagementVersion: 2;
5
5
  export declare const controllerPackageName: 'agl';
6
6
  /** The systemd user unit `agl service install` writes; a controller it runs reports it in its status. */
@@ -1307,7 +1307,8 @@ export interface IControllerPermission {
1307
1307
  type: string;
1308
1308
  patterns: string[];
1309
1309
  metadata: Record<string, unknown>;
1310
- createdAt?: number;
1310
+ /** Unix milliseconds when the request entered its harness's pending requests: the harness's own time where it has one. */
1311
+ createdAt: number;
1311
1312
  }
1312
1313
  export interface IControllerTodo {
1313
1314
  id?: IControllerRuntimeId;
@@ -1337,6 +1338,8 @@ export interface IControllerQuestion {
1337
1338
  questions: IControllerQuestionItem[];
1338
1339
  /** Tool call that raised the ask; links the request to its transcript entry. */
1339
1340
  toolCallId?: IControllerRuntimeId;
1341
+ /** Unix milliseconds when the question entered its harness's pending requests. */
1342
+ createdAt: number;
1340
1343
  }
1341
1344
  export interface IControllerTerminal {
1342
1345
  /** Controller-generated opaque PTY identifier. */
@@ -1634,7 +1637,9 @@ export interface IControllerModelRefreshJob {
1634
1637
  */
1635
1638
  export declare const controllerEventTypes: readonly ['sessions.changed', 'session.changed', 'session.draft.changed', 'session.history.changed', 'session.tool.updated', 'session.reasoning.updated', 'session.reasoning.delta', 'session.text.updated', 'session.text.delta', 'permissions.changed', 'harness.changed', 'projects.changed', 'settings.changed', 'sessiongroups.changed', 'resources.changed', 'tickets.changed', 'workspace.reveal', 'terminals.changed', 'upgrade.changed', 'accounts.changed', 'driver.changed', 'fleet.workers.changed', 'directreports.changed', 'sessionfeed.changed', 'usage.changed', 'devices.changed',
1636
1639
  /** What a deploy target runs, whether its probe answers, or which tickets run nowhere changed. */
1637
- 'deployments.changed'];
1640
+ 'deployments.changed',
1641
+ /** The Inbox changed: what waits for the owner (`inbox`, a delta). */
1642
+ 'inbox.changed'];
1638
1643
  export type TControllerEventType = (typeof controllerEventTypes)[number];
1639
1644
  export interface IControllerEvent {
1640
1645
  type: TControllerEventType;
@@ -1673,6 +1678,8 @@ export interface IControllerEvent {
1673
1678
  driverStatus?: import('./driver.js').IControllerDriverStatus;
1674
1679
  /** Present only on a sessionfeed.changed event. */
1675
1680
  sessionFeed?: import('./sessionfeed.js').TControllerSessionFeedDelta;
1681
+ /** Present only on an inbox.changed event. */
1682
+ inbox?: import('./inbox.js').TControllerInboxDelta;
1676
1683
  /** Present only on a usage.changed event, sent only to the browser that watches the window. */
1677
1684
  usageDelta?: import('./metrics.js').TControllerUsageDelta;
1678
1685
  /** Present only on the devices.changed event of a pairing: the code the device used, and the device. */