agl 43.3.2 → 43.5.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 (110) hide show
  1. package/changelog.md +33 -0
  2. package/dist_serve/bundle.js +2248 -2236
  3. package/dist_serve/bundle.js.map +2 -2
  4. package/dist_serve/bundle.js.third-party-notices.json +29 -29
  5. package/dist_serve/bundle.js.third-party-notices.txt +29 -29
  6. package/dist_ts/00_commitinfo_data.js +1 -1
  7. package/dist_ts/aglapi/interfaces.d.ts +5 -0
  8. package/dist_ts/aglapi/interfaces.js +2 -1
  9. package/dist_ts/classes.authstore.js +5 -2
  10. package/dist_ts/classes.claudeharness.js +4 -3
  11. package/dist_ts/classes.codexclientadapter.d.ts +5 -0
  12. package/dist_ts/classes.codexclientadapter.js +12 -6
  13. package/dist_ts/classes.controller.d.ts +32 -6
  14. package/dist_ts/classes.controller.js +165 -62
  15. package/dist_ts/classes.inferencegateway.js +14 -2
  16. package/dist_ts/classes.inferencerouter.d.ts +9 -1
  17. package/dist_ts/classes.inferencerouter.js +68 -14
  18. package/dist_ts/classes.mcpclient.d.ts +2 -2
  19. package/dist_ts/classes.mcpclient.js +14 -9
  20. package/dist_ts/classes.mcptools.d.ts +1 -1
  21. package/dist_ts/classes.mcptools.js +2 -1
  22. package/dist_ts/classes.opencodeclient.js +20 -4
  23. package/dist_ts/driver/functions.driverinstructions.d.ts +1 -1
  24. package/dist_ts/driver/functions.driverinstructions.js +2 -1
  25. package/dist_ts/fleet/classes.claudeworkers.d.ts +8 -5
  26. package/dist_ts/fleet/classes.claudeworkers.js +13 -8
  27. package/dist_ts/fleet/classes.deploymodels.d.ts +58 -1
  28. package/dist_ts/fleet/classes.deploymodels.js +121 -2
  29. package/dist_ts/fleet/classes.deploymonitor.d.ts +193 -47
  30. package/dist_ts/fleet/classes.deploymonitor.js +548 -180
  31. package/dist_ts/fleet/classes.gitfacts.d.ts +4 -1
  32. package/dist_ts/fleet/classes.gitfacts.js +13 -10
  33. package/dist_ts/fleet/classes.service.d.ts +2 -0
  34. package/dist_ts/fleet/classes.service.js +6 -3
  35. package/dist_ts/fleet/functions.deployprobes.js +21 -2
  36. package/dist_ts/fleet/functions.deploystatus.d.ts +26 -0
  37. package/dist_ts/fleet/functions.deploystatus.js +33 -0
  38. package/dist_ts/fleet/functions.deployvalidation.d.ts +1 -0
  39. package/dist_ts/fleet/functions.deployvalidation.js +5 -2
  40. package/dist_ts/functions.claudecoderelease.d.ts +1 -1
  41. package/dist_ts/functions.claudecoderelease.js +1 -1
  42. package/dist_ts/functions.deploycli.js +3 -2
  43. package/dist_ts/functions.deviceapi.d.ts +7 -6
  44. package/dist_ts/functions.deviceapi.js +13 -5
  45. package/dist_ts/functions.inferencecli.js +10 -2
  46. package/dist_ts/functions.inferencelaunch.d.ts +19 -8
  47. package/dist_ts/functions.inferencelaunch.js +23 -12
  48. package/dist_ts/functions.mcpdeploytools.js +3 -1
  49. package/dist_ts/functions.promptreply.d.ts +13 -0
  50. package/dist_ts/functions.promptreply.js +17 -0
  51. package/dist_ts/functions.proxyharnessconfig.d.ts +18 -0
  52. package/dist_ts/functions.proxyharnessconfig.js +30 -1
  53. package/dist_ts_authswitch/authority-renewal.d.ts +12 -3
  54. package/dist_ts_authswitch/authority-renewal.js +14 -5
  55. package/dist_ts_authswitch/classes.claudenative.d.ts +8 -8
  56. package/dist_ts_authswitch/classes.claudenative.js +13 -13
  57. package/dist_ts_interfaces/deployments.d.ts +38 -6
  58. package/dist_ts_interfaces/deployments.js +7 -3
  59. package/dist_ts_interfaces/devices.d.ts +2 -1
  60. package/dist_ts_interfaces/devices.js +1 -1
  61. package/dist_ts_interfaces/inbox.d.ts +10 -1
  62. package/dist_ts_interfaces/inbox.js +1 -1
  63. package/dist_ts_interfaces/mcprequests.d.ts +1 -1
  64. package/dist_ts_interfaces/requests.accounts.d.ts +5 -0
  65. package/dist_ts_interfaces/requests.accounts.js +3 -1
  66. package/docs/authswitch.md +5 -4
  67. package/package.json +2 -2
  68. package/readme.md +49 -21
  69. package/ts/00_commitinfo_data.ts +1 -1
  70. package/ts/aglapi/interfaces.ts +1 -0
  71. package/ts/classes.authstore.ts +4 -1
  72. package/ts/classes.claudeharness.ts +3 -2
  73. package/ts/classes.codexclientadapter.ts +11 -5
  74. package/ts/classes.controller.ts +177 -73
  75. package/ts/classes.inferencegateway.ts +15 -1
  76. package/ts/classes.inferencerouter.ts +72 -13
  77. package/ts/classes.mcpclient.ts +14 -5
  78. package/ts/classes.mcptools.ts +1 -0
  79. package/ts/classes.opencodeclient.ts +23 -3
  80. package/ts/driver/functions.driverinstructions.ts +1 -0
  81. package/ts/fleet/classes.claudeworkers.ts +12 -7
  82. package/ts/fleet/classes.deploymodels.ts +113 -1
  83. package/ts/fleet/classes.deploymonitor.ts +565 -179
  84. package/ts/fleet/classes.gitfacts.ts +10 -8
  85. package/ts/fleet/classes.service.ts +7 -1
  86. package/ts/fleet/functions.deployprobes.ts +16 -1
  87. package/ts/fleet/functions.deploystatus.ts +56 -0
  88. package/ts/fleet/functions.deployvalidation.ts +4 -1
  89. package/ts/functions.claudecoderelease.ts +1 -1
  90. package/ts/functions.deploycli.ts +2 -1
  91. package/ts/functions.deviceapi.ts +19 -9
  92. package/ts/functions.inferencecli.ts +7 -1
  93. package/ts/functions.inferencelaunch.ts +35 -14
  94. package/ts/functions.mcpdeploytools.ts +2 -0
  95. package/ts/functions.promptreply.ts +20 -0
  96. package/ts/functions.proxyharnessconfig.ts +32 -0
  97. package/ts_authswitch/authority-renewal.ts +14 -4
  98. package/ts_authswitch/classes.claudenative.ts +12 -12
  99. package/ts_authswitch/native-contracts.md +250 -28
  100. package/ts_interfaces/deployments.ts +39 -6
  101. package/ts_interfaces/devices.schema.json +1 -1
  102. package/ts_interfaces/devices.ts +2 -1
  103. package/ts_interfaces/inbox.ts +8 -1
  104. package/ts_interfaces/requests.accounts.ts +2 -0
  105. package/ts_web/00_commitinfo_data.ts +1 -1
  106. package/ts_web/classes.accountsreadmodel.ts +19 -7
  107. package/ts_web/elements.accounts.ts +31 -18
  108. package/ts_web/elements.deployments.ts +20 -4
  109. package/ts_web/elements.harnesscontrollerapp.ts +43 -13
  110. package/ts_web/elements.inbox.ts +3 -3
@@ -222,11 +222,18 @@ export declare class OpenCodeController {
222
222
  private readInboxSource;
223
223
  /** The session feed's row of a session, and the name the Inbox shows for it. */
224
224
  private inboxRow;
225
+ /** An Inbox item's id: its kind, the session that holds the request and the request's id. */
226
+ private inboxRequestItemId;
225
227
  /**
226
- * The items of a session's requests. A permission that the owner's auto-accept answers (`autoAcceptedArg`) waits for
227
- * nobody and is left out; questions and MCP forms are never answered automatically.
228
+ * The items of a session's permissions and questions. A permission that the owner's auto-accept answers
229
+ * (`autoAcceptedArg`) waits for nobody and is left out; questions are never answered automatically.
228
230
  */
229
231
  private inboxSessionItems;
232
+ /**
233
+ * The items of a session's MCP forms, which are never answered automatically. Only Claude Code and Codex hand AGL
234
+ * MCP forms, so a direct child (an OpenCode subagent) never holds one.
235
+ */
236
+ private inboxElicitationItems;
230
237
  /** A native session as the Inbox names it: where it runs and how the browser opens it. */
231
238
  private inboxNativeWhere;
232
239
  /** The requests Claude Code holds: its conversations' and those of AGL's turns in native sessions. */
@@ -655,7 +662,10 @@ export declare class OpenCodeController {
655
662
  * Claude Code processes started with it, and the next process takes a new one.
656
663
  */
657
664
  private claudeLease;
658
- /** How a Claude Code process starts: the controller's environment with only its endpoint and credential on the lease. */
665
+ /**
666
+ * How a Claude Code process starts: the controller's environment with only its endpoint and credential on the lease,
667
+ * and without its hook switches (`inferenceHarnessLaunch`).
668
+ */
659
669
  private claudeLaunch;
660
670
  private handleClaudeEvent;
661
671
  /**
@@ -995,6 +1005,12 @@ export declare class OpenCodeController {
995
1005
  */
996
1006
  private createMcpJobApi;
997
1007
  private createControllerMcpApi;
1008
+ /**
1009
+ * Says once at start which hook switches (`claudeHookSwitchVariables`) the controller's own environment holds: the Claude
1010
+ * Code sessions it starts, its chats and its fleet's workers, get none of them (AGL-1783). On stderr, which a detached
1011
+ * controller keeps in its log file.
1012
+ */
1013
+ private noteClaudeHookSwitches;
998
1014
  private performStart;
999
1015
  private coordinatorForUpgradeToken;
1000
1016
  private startOpenCodeEventStream;
@@ -1316,7 +1332,10 @@ export declare class OpenCodeController {
1316
1332
  private listUnboundDrivers;
1317
1333
  /** AGL-210: the loop that finds stalled tickets and tells the driver, configured by `fleet.boardPump`. */
1318
1334
  private startBoardPump;
1319
- /** AGL-911: the loop that observes what each deploy target runs; status and history are computed from it when read. */
1335
+ /**
1336
+ * AGL-911: the loop that observes what each deploy target runs. It stores the deploy status it computes (AGL-1704),
1337
+ * which status and release state answer from; history and where a ticket runs are read when asked.
1338
+ */
1320
1339
  private requireDeployMonitor;
1321
1340
  /**
1322
1341
  * Once (migration v41_ticketlinkrepos, AGL-909): the links and release plans that name a discovered repository by its
@@ -1370,7 +1389,7 @@ export declare class OpenCodeController {
1370
1389
  private serveDriver;
1371
1390
  /** The driver topbar: the host's one driver session, its status, and the unread turns it marks seen. */
1372
1391
  private registerDriverHandlers;
1373
- /** The Deployments view: status, history, a probe now and release state (AGL-911, AGL-914). */
1392
+ /** The Deployments view: status, history, a probe now, release state and a full check now (AGL-911, AGL-914, AGL-1704). */
1374
1393
  private registerDeployHandlers;
1375
1394
  private registerSessionFeedHandlers;
1376
1395
  /** The metrics board's usage windows: a watch answers the window's buckets, and its changes follow as `usage.changed`. */
@@ -1405,6 +1424,8 @@ export declare class OpenCodeController {
1405
1424
  private replyNativeSessionForPrincipal;
1406
1425
  /** The requests of AGL's own turns in a native session that wait for an answer. */
1407
1426
  private nativeSessionAttention;
1427
+ /** The requests AGL's own Claude Code holds for a conversation; none once it no longer runs the conversation. */
1428
+ private claudeAttention;
1408
1429
  private replyNativeSessionRequest;
1409
1430
  /**
1410
1431
  * Native session failures are bounded messages; the session view and the fleet's receipt show them as they are. Each
@@ -1747,7 +1768,12 @@ export declare class OpenCodeController {
1747
1768
  /** An unavailable runtime cannot prove an archive. Its stored layout rows remain authoritative. */
1748
1769
  private layoutSessionRuntimeIsUnavailable;
1749
1770
  private findArchivedLayoutSessionIds;
1750
- private assertAttentionRequestOwned;
1771
+ /**
1772
+ * Refuses an answer to a permission or question the session does not hold (`promptNoLongerPending`), read from
1773
+ * OpenCode's pending requests before anything is sent; OpenCode refuses one answered in between itself (its client
1774
+ * throws `promptNoLongerPending`).
1775
+ */
1776
+ private assertPromptPending;
1751
1777
  private toFlexMessageBundle;
1752
1778
  private toFlexPermission;
1753
1779
  /** A project's key starts with its id; a projectless session's key starts with NUL, which no project id does. */