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
@@ -393,14 +393,128 @@ compared with 2.1.288's dump. It keeps every custody item, so it is on `CLAUDE_N
393
393
  hookName:"PreToolUse:<tool>"}}` (@28860388).
394
394
  - AGL's hook prints its reason to stderr and exits 2 (`deny`).
395
395
 
396
+ Claude Code 2.1.322 (AGL-1780, read 2026-11-12). Linux ELF bundle `~/.local/share/claude/versions/2.1.322`, BuildID
397
+ 69e0821094c6c8ff81436e0a0adfc15b651a2679, SHA-256 bfb3703ad5380242328459bc62ada4bde8ae7ba57c6e1eeadb9c00e08874c478,
398
+ `--version` `2.1.322 (Claude Code)`. Offsets refer to its `strings -n 6` dump and names are 2.1.322's. Each item was
399
+ compared with 2.1.306's dump in one of three ways:
400
+ - Every definition named here beside its 2.1.306 twin was diffed token by token, from its first token to the end of its
401
+ body, after renaming minified names. Equal: the locks `n0r`, `tR`, `Tea`, `kp`, `e0`, `XGn`, `Kjt` and the switch `No`,
402
+ the pickup `YC` and `BFe`, the saves `yRo` and `Eea`, `jvo`, `JDs`, `LRo`, `XNe` and `SB` (a template literal's
403
+ renamed placeholder aside). Changed, and read hunk by hunk: `Ul`, `kRo`, `oj`, `Gi`, `Zi`, `HRo`, `Qa`, `Ae` and
404
+ `E9r`; what of it touches custody or the hook is described below.
405
+ - Lists were diffed as lists: the logout's caches, the `CLAUDE_*`/`ANTHROPIC_*` names, and the code around every write
406
+ that names `claudeAiOauth` (`ERo` and the rollback `de` among them).
407
+ - The callers of the lock switch and of the refresh request, the remote token files, the install paths, the diskless
408
+ gates and the policy hook's fields were read at their offsets.
409
+
410
+ It keeps every custody item once `CLAUDE_NATIVE_ACCOUNT_CACHES` lists the cache its logout adds, so it is on
411
+ `CLAUDE_NATIVE_CUSTODY_RELEASES`:
412
+ - Locks. The OAuth refresh lock `n0r` (@21828143), its taker `Tea` (@21828569) with the legacy twin `tR` (@21828340),
413
+ the `fs` adapter `kp` (@21575280, still behind `tengu_zany_book`) and the owner record takeover `e0` (@21573183) are
414
+ 2.1.306's `hXn`, `o5s`, `Mw`, `Kd` and `UM`. The refresh decision `Ul` (@21831531) still retries 5 times, 1-2 s
415
+ apart; the locked wrapper `XGn` (@21830052) is `apn`, also used by the projects-scope expansion (@37644713).
416
+ - The credential store write lock `Kjt` (@19777283: `<dir>/.storage-write`, `stale:15000`, 10 retries) is unchanged.
417
+ - The global config lock `Gi` (@21338537) still locks `${.claude.json}.lock`. New: a caller that only needs the lock
418
+ passes `realpath:false` and may wait `CLAUDE_CODE_CONFIG_LOCK_WAIT_MS` longer, ENOENT/ESTALE are retried behind
419
+ `tengu_swift_glade`, and an exit-time lock `Bc` (@21297159) takes the same path.
420
+ - Every caller of `CLAUDE_CODE_DISABLE_AUTH_REFRESH_LOCK` (`No` @21588724, in the chunk @21229255-22207533 that also
421
+ holds `Tea`, `XGn` and `Ul`) is the `awsAuthRefresh`/`gcpAuthRefresh` single-flight path (its lock files
422
+ `.aws_auth_refresh`/`.gcp_auth_refresh`): @21585440, the waiter @21601260, the sign-in-failure counters @21794912
423
+ and @21804948. Nothing gates the OAuth lock or `XGn`.
424
+ - Every caller of the refresh request (`Fpe`): `Ul` twice, under `Tea`; the projects-scope expansion, under `XGn`; the
425
+ cloud-sessions and design tokens under their own locks; and `claude auth login` from
426
+ `CLAUDE_CODE_OAUTH_REFRESH_TOKEN`, as in 2.1.306. None is new.
427
+ - Live pickup `YC` (@21819463) and its directory `BFe` (@19762965: diskless ? null : the store directory) are `Cw`
428
+ and `wAe`. The 401 path `oj` (@21823208) still reads the store again and adopts a different stored token; its new
429
+ `adoptOnly` caller returns there instead of refreshing, and a new branch for a launcher's login needs `MM()` (below).
430
+ - New, behind the flag `tengu_bubbly_fountain` (`Ios` @28367384, off by default) and only in an interactive
431
+ foreground session (never `-p`, never a background job): the session-owner ask `Rle` (@57845394). When the stored
432
+ login names another account than the one that started the session, the session holds its requests
433
+ (`session_owner`) and asks the user to exit, sign in or copy the conversation. A login taken out of the home asks
434
+ nothing, and authswitch never moves another account's login into Claude Code's home, so no AGL path raises it.
435
+ With the flag on it writes `knownAccounts` into `.claude.json` and `session-owner` transcript records.
436
+ - The refresh decision `Ul` reads the store, returns `no_refresh_token` without one, refuses in a diskless session and
437
+ checks again under the lock. New: the invalid-scope fallback stops after a bounded number of tries.
438
+ - The save `yRo` (@21810193), the subscription stamp `Eea` (@21812205), the token save `ERo` (@21813241) and the
439
+ sign-in rollback `de` (@48067394) are 2.1.306's `UBr`, `t5s`, `zBr` and `U`.
440
+ - The dead-token mark `kRo` (@21814711) is still a compare-and-swap on the dead refresh token. New: when the refusal
441
+ says `Refresh token expired` (`uQi` @21571351) it also writes `loginEnded: "time_limit"` into the emptied
442
+ `claudeAiOauth`, read by `_Ns` (@21815627). AGL reads such a login as incomplete, as before.
443
+ - Of every write that names `claudeAiOauth` (diffed against 2.1.306), the only new ones are `kRo`'s field and the
444
+ sign-in's `keepStoredLogin`, which keeps the stored login through a re-login of the same account.
445
+ - The v5 factory `jvo` (@34318492) returns undefined, and `JDs` (@34317579) is `Z$o`. The store is still the plaintext
446
+ `.credentials.json` (`C` @19778726).
447
+ - Selector. `Zi` (@21783671) and `Qa` (@21782763), with their async twins `HRo` (@21846714) and `LRo` (@21846298), keep
448
+ 2.1.306's order. New: the `CLAUDE_CODE_OAUTH_TOKEN` source also takes a launcher's token (`X$` @20174131), and the
449
+ memoized login falls back to it (`Un`). Both need `MM()` (@20172497), which is `CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST`
450
+ with `CLAUDE_CODE_HOST_AUTH_ENV_VAR`, both on `CREDENTIAL_OVERRIDES`. A host's cloud-sessions bearer (`uxe`
451
+ @21780075) needs `CLAUDE_CODE_SDK_HAS_SESSIONS_OAUTH_REFRESH` and `CLAUDE_CODE_SDK_HAS_OAUTH_REFRESH` in an SDK
452
+ entrypoint and serves the cloud-sessions API only.
453
+ - The remote token files are unchanged (@19927882).
454
+ - Against 2.1.306 the bundle adds 135 `CLAUDE_*`/`ANTHROPIC_*` names and drops 3. Those that touch credentials:
455
+ `CLAUDE_CODE_SESSIONS_OAUTH_TOKEN` (the cloud-sessions bearer, scrubbed from child environments),
456
+ `CLAUDE_CODE_SDK_HAS_SESSIONS_OAUTH_REFRESH`, `CLAUDE_CODE_DISABLE_LAUNCHER_SIGN_IN` (turns the launcher's login
457
+ off), `CLAUDE_CODE_HOST_OWNED_CONFIG_DIR` (only how an unparsable `.claude.json` is reported, `Ka` @21351757) and
458
+ `CLAUDE_CODE_CONFIG_LOCK_WAIT_MS`. None is a login source, so `CREDENTIAL_OVERRIDES` is unchanged.
459
+ - Logout `Yor` (@43966434) adds `managedSettingsNoticeSeenOrg` (the organization whose managed-settings notice was
460
+ shown) to 2.1.306's caches. It is now on `CLAUDE_NATIVE_ACCOUNT_CACHES`. The store prune is unchanged.
461
+ - The background session's environment `Ae` (@34483013) is `Gr`: `CLAUDE_CONFIG_DIR` and
462
+ `CLAUDE_SECURESTORAGE_CONFIG_DIR` pass through. New: it also drops the shell's OAuth token when it is the stored one.
463
+ - Install paths are unchanged (`versions` via `XNe` @23308286; `ccd-cli` is the remote agent's own layout).
464
+ - Where a process cannot write: `q()` is `launchOptions.diskless()` (@18039526), as 2.1.306's `ee()`; refreshes, the
465
+ store write lock and the `.claude.json` watch are skipped in it as before. None of the new launch options gates a
466
+ refresh or a lock.
467
+ - The policy hook's contract (`ts/configuration/policyhook/claude.ts`):
468
+ - `E9r` (@31824964) builds `{…, hook_event_name:"PreToolUse",tool_name:e,tool_input:r,tool_use_id:n}`, as 2.1.306
469
+ did; its diff changes only when it returns early and an `askedAbove` option it hands the dispatcher. New: its
470
+ wrapper `kTe` (@31824474) first looks for a matching hook still held back while the organization's settings are
471
+ unread (`nYt` @28956982); such a call is denied in `bypassPermissions` and asks otherwise, never runs unchecked. A
472
+ hook in user settings is still dispatched.
473
+ - `tool_name` `Bash` (`Ie="Bash"` @21094672, the tool's `name:Ie` @33338883, `userFacingName` @33340684);
474
+ `tool_input.command` (@33328499); MCP names `mcp__` (`kk` @18451249) + server + `__` (`Qr` @18451537) + tool (`ur`
475
+ @18451856), sanitised by `bn` (@17857352), so `mcp__agl__job_start`.
476
+ - Exit 2 is a `blockingError` (@31940389, and @31936722 for JSON stdout). The missing-script exception `Iyr`
477
+ (@31871303) covers the same five events, never `PreToolUse`, and a `PreToolUse` `blockingError` is a hook deny
478
+ (@32342941).
479
+ - New: `CLAUDE_CODE_PERSONAL_HOOKS_OFF` (`y9i` @22861664, unset after its first read @23343368). It keeps no hook
480
+ out: it is read only while `CLAUDE_CODE_RESTRICT_PERSONAL_CONFIG` is on (`UCi` @29492733), and its one caller
481
+ (`fn` @38114558) only adds a notice. In a run without network or login, a `SessionStart` hook of the user's
482
+ settings fired with it set, alone and together with `CLAUDE_CODE_RESTRICT_PERSONAL_CONFIG` (AGL-1783).
483
+ - The hook switches (AGL-1783, `claudeHookSwitchVariables`), read where each is read:
484
+ - `CLAUDE_CODE_SIMPLE`: `vr()` @18063297 (it or `--bare`); the hook list `y()` @22955659 is then empty, managed
485
+ hooks included.
486
+ - `CLAUDE_CODE_SAFE_MODE`: `oo()` @18063366 (it or `--safe-mode`); the hook table @22863606 then holds the policy
487
+ settings' hooks alone.
488
+ - `CLAUDE_CODE_RESTRICTED`: `Ihe()` @18063443; `hko` @34330053 then empties the settings sources, as `--restricted`
489
+ does.
490
+ - 2.1.282 and 2.1.306 read all three as well. `Pe` @17866644 takes `1`, `true`, `yes` or `on`, trimmed, in any
491
+ case, as on.
492
+ - New: `CLAUDE_CODE_IGNORE_PERSISTED_TRUST` (`XIo` @19401489; its message @21312416): no workspace trust record
493
+ counts. The dispatcher skips every hook while the directory is untrusted (`hook execution - workspace trust not
494
+ accepted` @31913419), and a background session starts untrusted with hooks off (@40606069). From the bundle
495
+ only: in `-p` it changed nothing, the hook fired.
496
+ - `CLAUDE_CODE_REMOTE_SESSION_ORIGIN`: review mode (`pO` @19372428) needs `CLAUDE_CODE_REMOTE`,
497
+ `CLAUDE_CODE_ENVIRONMENT_KIND=byoc` (`sf` @19371415), `CLAUDE_CODE_REMOTE_ENVIRONMENT_TYPE=self_hosted` (`SEe`
498
+ @19371126) and
499
+ `CLAUDE_CODE_REMOTE_SESSION_ORIGIN=review` (@19372383); then `hko` empties the settings sources (`if(pO())l("")`
500
+ @34330096). Every in-process read compares it to `review` (@17746624, @19372383, @41287135), so it is the
501
+ conjunction's most specific variable. The other three stay.
502
+ - Claude Code's own list `S` (@34463650: the first three), which `Lri` (@34463767) deletes from child
503
+ environments, matching names in any case, and `k1e`, which adds 131 marker names to it.
504
+ - Runs without network, key or login, a `SessionStart` hook of a disposable home's user settings: the baseline
505
+ fired; `CLAUDE_CODE_SIMPLE` (`1`, `yes`), `CLAUDE_CODE_SAFE_MODE=1`, `CLAUDE_CODE_RESTRICTED` (`1`, `true`),
506
+ `--bare`, `--safe-mode` and the four review variables together kept it out; `CLAUDE_CODE_SIMPLE=0`,
507
+ `CLAUDE_CODE_SAFE_MODE=off`, `CLAUDE_CODE_IGNORE_PERSISTED_TRUST=1`, `CLAUDE_CODE_REMOTE_SESSION_ORIGIN=review`
508
+ alone and the other three review variables without it did not.
509
+
396
510
  The credential store's directory (AGL-773): `CLAUDE_SECURESTORAGE_CONFIG_DIR` moves the credential store and the
397
511
  OAuth refresh lock out of the config home. It is read the same way in 2.1.282 (`pw` @15383197), 2.1.288 (`OS`
398
- @15713331) and 2.1.306 (`TL` @18472254): the variable when it is set, NFC-normalised; an empty value means
399
- `.claude` in `os.homedir()`; otherwise the config home. Claude Code hands it on to jobs and teammates, though it never
400
- sets it itself. `claudeNativeCredentialStoreDirectory` models this, reading `HOME` for the home directory, and the
401
- scan keeps the variable's value with the other path variables. It resolves each process's store directory through the
402
- process's own root, or under its cwd for a relative path, into `credentialStoreIdentity`. Every check then matches a
403
- process to a home by both directories (`claudeNativeHomeRelation`):
512
+ @15713331), 2.1.306 (`TL` @18472254) and 2.1.322 (`SB` @19762830): the variable when it is set, NFC-normalised; an
513
+ empty value means `.claude` in `os.homedir()`; otherwise the config home. Claude Code hands it on to jobs and
514
+ teammates, though it never sets it itself. `claudeNativeCredentialStoreDirectory` models this, reading `HOME` for the
515
+ home directory, and the scan keeps the variable's value with the other path variables. It resolves each process's
516
+ store directory through the process's own root, or under its cwd for a relative path, into `credentialStoreIdentity`.
517
+ Every check then matches a process to a home by both directories (`claudeNativeHomeRelation`):
404
518
  - A process whose store is the home is a session of that home, wherever it is configured. Custody reads its release.
405
519
  When it is configured elsewhere, the home's routing says nothing about it, so it counts as still able to use the login
406
520
  until it is ended. The usage read counts it as running.
@@ -522,20 +636,21 @@ can invalidate the grant. Requests to Claude account endpoints report an HTTP 42
522
636
 
523
637
  ## Claude Code compatibility check
524
638
 
525
- AGL verified Claude Code 2.1.306 (`claudeCodeVerifiedRelease` in `ts/functions.claudecoderelease.ts`, on
526
- `CLAUDE_NATIVE_VERIFIED_RELEASES`; 2.1.282 before it). Its fleet's floor is a separate constant, `claudeCodeFleetFloor`
527
- (2.1.282): the oldest release whose fleet output the tests still pin. It rises only when the adapter stops handling an
528
- older release's output, never because a newer release was verified (arbiter ruling 2026-10-23, AGL-686). AGL runs a
529
- release newer than the verified one optimistically -- fleet workers, Claude Code sessions in the session feed and the
530
- usage read -- refuses one older than the floor in the fleet, and keeps custody (handing Claude Code's own
531
- sign-in to the accounts service) refused on it until its custody items were read (`CLAUDE_NATIVE_CUSTODY_RELEASES`, which
532
- may take a release before its fleet items are confirmed, as it took 2.1.306). The first time the controller's fleet or configuration probe meets a
533
- newer release it records it (`agl_harness_releases`) and publishes one `harness.release.discovered` fleet event to every
534
- owner's watch and the built-in Driver, so the driver files a compatibility check for that release on the board. The
535
- check works through this list against the release's own bundle (`~/.local/share/claude/versions/<release>`) and
536
- disposable homes, never a credential file. A release that keeps every item moves the verified release (the controller
537
- constant `claudeCodeVerifiedRelease`, `CLAUDE_NATIVE_VERIFIED_RELEASES`, and `CLAUDE_NATIVE_CUSTODY_RELEASES` for the
538
- custody items), with its BuildID and SHA-256 recorded here and its output added to the tests beside the floor's.
639
+ AGL verified Claude Code 2.1.322 (AGL-1780; `claudeCodeVerifiedRelease` in `ts/functions.claudecoderelease.ts`, on
640
+ `CLAUDE_NATIVE_VERIFIED_RELEASES`; 2.1.306 and 2.1.282 before it). Its fleet's floor is a separate constant,
641
+ `claudeCodeFleetFloor` (2.1.282): the oldest release whose fleet output the tests still pin. It rises only when the
642
+ adapter stops handling an older release's output, never because a newer release was verified (arbiter ruling 2026-10-23,
643
+ AGL-686). AGL runs a release newer than the verified one optimistically -- fleet workers, Claude Code sessions in the
644
+ session feed and the usage read -- refuses one older than the floor in the fleet, and keeps custody (handing Claude
645
+ Code's own sign-in to the accounts service) refused on it until its custody items were read
646
+ (`CLAUDE_NATIVE_CUSTODY_RELEASES`, which may take a release before its fleet items are confirmed, as it took 2.1.306).
647
+ The first time the controller's fleet or configuration probe meets a newer release it records it
648
+ (`agl_harness_releases`) and publishes one `harness.release.discovered` fleet event to every owner's watch and the
649
+ built-in Driver, so the driver files a compatibility check for that release on the board. The check works through this
650
+ list against the release's own bundle (`~/.local/share/claude/versions/<release>`) and disposable homes, never a
651
+ credential file. A release that keeps every item moves the verified release (the controller constant
652
+ `claudeCodeVerifiedRelease`, `CLAUDE_NATIVE_VERIFIED_RELEASES`, and `CLAUDE_NATIVE_CUSTODY_RELEASES` for the custody
653
+ items), with its BuildID and SHA-256 recorded here and its output added to the tests beside the floor's.
539
654
 
540
655
  An Agent SDK update gets the same check against the binary its platform package ships, the custody and usage-read items
541
656
  at least, since AGL's own chats run that binary on the controller's home. Record the SDK version and the release it
@@ -579,6 +694,51 @@ stop applying. The hook is a shell-form command, which Claude Code runs with `sh
579
694
  status but 0 and 2 is a non-blocking error that lets the call through; the projected command therefore names its
580
695
  interpreter by absolute path and maps every other status to 2 itself (AGL-370). Since 2.1.295 `"onFailure": "block"` does
581
696
  the same natively and also covers a hook timeout; AGL does not set it while it supports releases before 2.1.295.
697
+ - Every path on which the hook does not run (AGL-1783). A variable that keeps the hooks of the user's settings out of a
698
+ session turns AGL's deny rules off for every process that inherits it, so AGL deletes each one from the environment of
699
+ the Claude Code sessions it starts: `claudeHookSwitchVariables` (`ts/functions.proxyharnessconfig.ts`), one name per
700
+ path on which the environment alone stops a hook of the user's settings, and for a path that needs several variables
701
+ together its most specific one. Read the release path first, never by a diff of names alone: start at the hook
702
+ dispatcher and walk back every condition under which a hook of the user's settings does not run, finding each by its
703
+ strings, not by its minified name:
704
+ - the dispatch-time skip (`hook execution - workspace trust not accepted`) and the trust predicate it calls, with
705
+ everything that makes a directory untrusted or no trust record count;
706
+ - the hook table per settings source (the function that reads `disableAllHooks` and `allowManagedHooksOnly`) and the
707
+ hook list built from it;
708
+ - the predicate that says whether a settings source is enabled, and the settings-source selection
709
+ (`--setting-sources`, and whatever empties it: `--restricted`, review mode);
710
+ - the bare, safe and restricted predicates (`--bare`, `--safe-mode`, and the variables each reads);
711
+ - review mode (`CLAUDE_CODE_REMOTE_SESSION_ORIGIN==="review"` and the conditions beside it).
712
+
713
+ Then diff Claude Code's own list of the mode variables it deletes from its child environments (the array literal
714
+ `["CLAUDE_CODE_SAFE_MODE","CLAUDE_CODE_SIMPLE","CLAUDE_CODE_RESTRICTED"]`, `S` in 2.1.322) and the longer list that
715
+ spreads it and adds the marker names (`k1e` in 2.1.322, continuing `"CLAUDE_CODE_RESTRICT_PERSONAL_CONFIG",…`) against
716
+ the last verified release's: a name added to the first list is a member of `claudeHookSwitchVariables` by definition.
717
+ Read the watch names again: the callers of `CLAUDE_CODE_PERSONAL_HOOKS_OFF` (2.1.322: notice only, see its entry),
718
+ `CLAUDE_CODE_RESTRICT_PERSONAL_CONFIG` (fails closed), `CLAUDE_BG_WORKSPACE_TRUSTED`, and the variables that move a
719
+ settings file (`CLAUDE_CONFIG_DIR`, `CLAUDE_CODE_MANAGED_SETTINGS_PATH`, `CLAUDE_CODE_REMOTE_SETTINGS_PATH`). Last,
720
+ run the marker-hook probe: a `SessionStart` hook of a disposable home's user settings that touches a marker file, the
721
+ release's executable by absolute path in `-p`, under `unshare -rmn` (no network) and `env -i` with a minimal `PATH`,
722
+ the disposable `HOME` and `CLAUDE_CONFIG_DIR`, no key and no login. The baseline must fire, and every listed name
723
+ must keep the hook out or be recorded as not testable in `-p`. Record each name's read sites in the release's entry.
724
+
725
+ `claudeHookSwitchVariables` is deleted, whatever its value, from the environment of the fleet's workers
726
+ (`FleetClaudeWorkers.env`: version checks, runs, relays, wakes), of AGL's own Claude chats and `agl proxy run claude`
727
+ on either pool (`inferenceHarnessLaunch`), and of a confined Claude Code run's `docker run` (`confinedDockerLaunch`), so
728
+ `-e NAME` passes none. A flag typed for the run (`--bare`, `--safe-mode`, `-e NAME=1`) stays. `agl proxy run` and
729
+ `agl proxy confined run` say on stderr which names they dropped; the controller says once at start which its own
730
+ environment holds. Left alone: the sign-in (`ts_authswitch/classes.authoritycli.ts`, Claude Code's own login in a home
731
+ of its own), the configuration probe's `claude --version` (an isolated environment of its own), the terminal list's
732
+ `claude agents --json` (a listing, no session), and terminals, which pass only their allowlist and the names
733
+ `AGL_FORWARD_ENV` lists.
734
+
735
+ What the environment AGL hands over does not reach, stated, not fixed: `disableAllHooks: true` in a checkout's
736
+ `.claude/settings.json`, `--bare` or `--safe-mode` typed by the user, and a Claude Code daemon that was started from
737
+ another environment each keep the hook out all the same; per-session hook liveness is AGL-1790. Not confirmed: that
738
+ `CLAUDE_CODE_IGNORE_PERSISTED_TRUST` keeps the hook out of a real `--bg` session (read from the bundle only), that
739
+ dropping the switches reaches the jobs of a daemon started elsewhere, and that managed hooks survive safe mode or
740
+ `disableAllHooks` (the
741
+ `--managed-settings` probe hook fired in no run, the baseline's included).
582
742
 
583
743
  Custody and the usage read (`ts_authswitch/classes.claudenative.ts`), read from the bundle's `strings -n 6` dump with
584
744
  offsets, as for 2.1.280-2.1.282 above:
@@ -587,26 +747,29 @@ offsets, as for 2.1.280-2.1.282 above:
587
747
  (`<dir>/.storage-write`, `stale:15000`, 10 retries) and the global config lock (`.claude.json.lock`). Also the options
588
748
  each lock passes to proper-lockfile: 2.1.306 adds an `fs` adapter behind a flag (`tengu_zany_book`), which must still
589
749
  take the same `mkdir` lock directory.
590
- - Any switch that turns a lock off. `CLAUDE_CODE_DISABLE_AUTH_REFRESH_LOCK` (2.1.288 `Xr`, 2.1.306 `Yr`) turns off only
591
- the single-flight lock around the `awsAuthRefresh` and `gcpAuthRefresh` settings commands in both releases, never the
592
- OAuth refresh lock. Check each of its callers again in the chunk that defines it: should it ever reach the OAuth refresh,
593
- custody would have to read it from each process's environment before admitting the release.
750
+ - Any switch that turns a lock off. `CLAUDE_CODE_DISABLE_AUTH_REFRESH_LOCK` (2.1.288 `Xr`, 2.1.306 `Yr`, 2.1.322 `No`)
751
+ turns off only the single-flight lock around the `awsAuthRefresh` and `gcpAuthRefresh` settings commands in each,
752
+ never the OAuth refresh lock. Check each of its callers again in the chunk that defines it: should it ever reach the
753
+ OAuth refresh, custody would have to read it from each process's environment before admitting the release.
594
754
  - Live pickup: the stat of `.credentials.json` clears the memoized token when it changed or is gone; `.claude.json` is
595
755
  watched; a 401 reads the store again.
596
756
  - The refresh decision reads the store again and sends nothing without a refresh token; the refresh save is a
597
757
  compare-and-swap over the token it sent and writes nothing into a store without `claudeAiOauth`.
598
758
  - The v5 storage backend (`tengu_hover_rest`, `CLAUDE_CODE_HOVER_REST`): its credential and config factory must still
599
- return nothing (2.1.282 `K1n`, 2.1.288 `_Zn`, 2.1.306 `hFr`). 2.1.306 hands the backend to teammate mailboxes and
600
- transcripts too, but only a backend a host handed in; none is built on the host.
759
+ return nothing (2.1.282 `K1n`, 2.1.288 `_Zn`, 2.1.306 `hFr`, 2.1.322 `jvo`). 2.1.306 hands the backend to teammate
760
+ mailboxes and transcripts too, but only a backend a host handed in; none is built on the host.
601
761
  - The selector: the environment and settings sources that outrank the claude.ai login (2.1.282 `jc`, `Cc`), the
602
762
  provider switches and the remote token files. Diff the bundle's `CLAUDE_*` and `ANTHROPIC_*` names against the last
603
763
  verified release's, read each new one that touches credentials, and compare them with `CREDENTIAL_OVERRIDES`. 2.1.288
604
764
  adds `ANTHROPIC_WORK_SECRET` and `CLAUDE_CODE_REMOTE_TOOLS_PIN_STORED_LOGIN`, neither of them a login source (see
605
765
  above). Against 2.1.288, 2.1.306 adds `CLAUDE_BG_GATEWAY_WITHHELD`, the folder named in a message when a background
606
766
  session lacks the shell's gateway, not a login source. `CLAUDE_CODE_OAUTH_SCOPES` and
607
- `CLAUDE_CODE_GATEWAY_HINT_HEADERS` are in 2.1.282 already.
767
+ `CLAUDE_CODE_GATEWAY_HINT_HEADERS` are in 2.1.282 already. 2.1.322's new names that touch credentials are in its
768
+ entry above; its launcher login is selected only under `CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST` with
769
+ `CLAUDE_CODE_HOST_AUTH_ENV_VAR`, both on the list.
608
770
  - The logout's account caches (`performLogout`) against `CLAUDE_NATIVE_ACCOUNT_CACHES` (2.1.288 added
609
- `metricsStatusCache` and `metricsStatusCacheByPrincipal`, 2.1.306 `unusedLimitResetStatusCache`), and the install paths
771
+ `metricsStatusCache` and `metricsStatusCacheByPrincipal`, 2.1.306 `unusedLimitResetStatusCache`, 2.1.322
772
+ `managedSettingsNoticeSeenOrg`), and the install paths
610
773
  process detection matches (`versions/<build>`, `ccd-cli/<build>`, an Agent SDK platform package's `claude`).
611
774
  - Where a process cannot write: 2.1.306 skips refreshes, the store write lock and the `.claude.json` watch in a
612
775
  "diskless" session (`ee()`, a launch option a hosting server sets; off on the host). A new mode like it must not let a
@@ -683,6 +846,65 @@ contradicts the bundle read gets a fix ticket:
683
846
  - The Agent SDK's chain reader (`jM` in SDK 0.3.288) keeps only `user`, `assistant`, `progress`, `system` and
684
847
  `attachment` records with a `uuid`, so it skips the new records.
685
848
 
849
+ 2.1.322's fleet items (AGL-1780, 2026-11-12). Sources: its bundle's `strings -n 6` dump (offsets as in its entry above),
850
+ compared with 2.1.306's after renaming minified names; `--version`, `--help` and the AGL-382 relay run in a disposable
851
+ home without any credential, inside a user, mount and network namespace; and the transcripts 2.1.322 processes wrote on
852
+ this host in its first hour, read for structure only. AGL's own parsers (`parseFleetClaudeTranscript`,
853
+ `fleetClaudeAssistantTexts`, `fleetClaudeCredentialFailures`, `fleetClaudePermissionMode`) and, for each session, the
854
+ history projection (`getSessionMessages`, `claudeTranscript`, `claudePage`) read all 35 files that held a 2.1.322 record
855
+ at 22:58 UTC (5 sessions, drv-agl and drv-servezone among them, and 30 subagents), from each file's first 2.1.322
856
+ record and in its 4 MiB window, without an error. The counts below are from a structural scan at 22:59 UTC. Every item
857
+ holds, so 2.1.322 is the verified release; the floor stays 2.1.282. The live controller was not consulted, so whether
858
+ the fleet started, woke or relayed on 2.1.322 in that time is not known; the items marked bundle only wait for their
859
+ first natural occurrence, as 2.1.306's did:
860
+ - Inventory (bundle only). The chunk that exports `printAgentsJson` (@65402936-65424362) differs from 2.1.306's only in
861
+ its imports.
862
+ - `--bg` and wake output (bundle only), all 2.1.306's:
863
+ - `backgrounded · <id>[ · <name>]` and the four command lines (@35966656), the idle note
864
+ `send a prompt to start` (@27881313);
865
+ - the wake note (@35964696), the copy note (case `own-options`, @35960267), the message saved for the job's next
866
+ start and `Couldn't tell whether <flag> is a flag or text here` (@35960676), in a region whose only change is how
867
+ the trust dialog renders;
868
+ - `--mcp-config <configs...>` (@39438057) in an option block equal to 2.1.306's, `--help` equal but for two subcommand
869
+ descriptions, and the trust key `hasTrustDialogAccepted`. New: `CLAUDE_CODE_IGNORE_PERSISTED_TRUST`, which a
870
+ self-hosted runner sets, makes no trust record count.
871
+ - Held and delivery notices (bundle only). `Held peer message — from …` (@57881354) is 2.1.306's text, still appended as
872
+ a `warning`; the delivery notices (@57362305) and the SendMessage caveat (@54011147) are unchanged. No 2.1.322 session
873
+ held a message. `CLAUDE_CODE_DISABLE_HELD_MESSAGE_RECOGNITION` and `CLAUDE_CODE_DISABLE_STOP_OF_HELD_MESSAGES` concern
874
+ cloud-session notices, not peer holds.
875
+ - SendMessage receipts (8 sends), all shapes 2.1.306 wrote: a send by name answers `{success: true, msg_id, message}` (6)
876
+ or `{success: false, message}` (1), with the caveat 2.1.306's, and the tool's own result object adds `display`; a
877
+ send to a subagent (`recipient_kind: "agent"`) answers `{success: true, message, pin}` (1).
878
+ - API error records: `isApiErrorMessage: true` with `error: "rate_limit"`, `apiErrorStatus: 429` (9 records). The error
879
+ list (@20451248) is 2.1.306's, `authentication_failed` and `oauth_org_not_allowed` included.
880
+ - `system`/`turn_duration` records: 65 written, 64 of them by drv-agl (30) and drv-servezone (34).
881
+ - `permission-mode` records (82, `bypassPermissions`); the mode lists and `manual` read as `default` (`Qb`) are
882
+ 2.1.306's. `user.origin.kind` `human` (3) and `peer` (3, with `body`, one also with `hopChain`), and
883
+ `task-notification` (59), all shapes 2.1.306 wrote. Copies keeping their uuids are bundle only.
884
+ - Relay stream-json: `system`/`init` (@37599717) gains optional fields (`plugin_errors`, `capabilities`,
885
+ `memory_paths`, the effort fields); `tools` and `mcp_servers` are built as before. The `result` fields are present
886
+ in the bundle; the relay run below printed a `result` record after its init.
887
+ - Relay tools (AGL-382), run on 2.1.322 itself as on 2.1.306: `claude -p --output-format stream-json --verbose` in a
888
+ disposable home without any credential, inside a user, mount and network namespace (no network, private `/run/user`
889
+ and `/tmp`), with a user-scoped stdio MCP server (`probe`) in the home's config:
890
+ - `--tools=SendMessage,Read,ToolSearch --strict-mcp-config` prints `system`/`init` first, before any model call, with
891
+ `tools` `["Read","SendMessage","ToolSearch"]` and `mcp_servers` `[]`, in the modes `default`, `acceptEdits` and
892
+ `bypassPermissions` (run as a mapped non-root user).
893
+ - Without `--strict-mcp-config` the server's tool `mcp__probe__probe` stays in `tools`; without `--tools` the init
894
+ lists 22 tools (2.1.306: 21), `Bash`, `Edit` and `Write` among them, in `default` and in `bypassPermissions`; an
895
+ unknown name (`--tools=…,Bogus`) is dropped without an error.
896
+ - Without a credential the run ends after init with `Not logged in · Please run /login`, exit 1. The `--tools` list
897
+ parser `_u` (@17855380) is 2.1.306's.
898
+ - Transcript growth, measured at 23:02 UTC over the 37 files then holding a 2.1.322 record. `api-request*` records are
899
+ 30 % of the bytes written after each file's first 2.1.322 record (12.5 of 41.4 MB, 10.2 MB of it blobs; 30 % in
900
+ sessions and in subagents), against 2.1.306's 27 %.
901
+ - drv-agl's 4 MiB window covers 6.8 h and 42 turns, drv-servezone's 1.0 h and 35 turns (`api-request*` 30 % and 22 %
902
+ of them); both hold `permission-mode` records (83 and 59). The most written within 2 s was 0.6 MB.
903
+ - New record types the bundle can write: `repl-mode`, `resume-head-vouch` and the flag-gated `session-owner`, none
904
+ with a `uuid` (`tools-used` was already in 2.1.306 transcripts). None occurred yet: every record type in those files
905
+ (census at 23:01 UTC) also occurs in 2.1.306 records. The Agent SDK's chain reader skips such records, as it skips
906
+ every record without a `uuid`, and AGL's parsers take any record object.
907
+
686
908
  ## Managed Codex app-server contract (Codex 0.157.0, 2026-09-25)
687
909
 
688
910
  `MANAGED_CODEX_VERSION` in `ts/classes.codexmanaged.ts` is the one release managed Codex runs.
@@ -4,7 +4,9 @@ import type { ITicketReleasePlan, TTicketColumn, TTicketPriority } from './ticke
4
4
  /**
5
5
  * Deployments (AGL-909): what runs where, observed rather than claimed. A release is the repository's tag `v<version>`;
6
6
  * what a target runs is what its probe answers, recorded as an observation whenever it changes. Everything else (what a
7
- * release holds, how far a target is behind, open bugs on the running version) is computed when it is read.
7
+ * release holds, how far a target is behind, open bugs on the running version) is computed by the controller in the
8
+ * background and stored as its deploy status (AGL-1704), which the views read; what depends on the clock or the busy
9
+ * sessions is applied when it is read.
8
10
  */
9
11
 
10
12
  /**
@@ -100,7 +102,7 @@ export interface IFleetDeployObservation {
100
102
  artifacts: IFleetDeployArtifact[];
101
103
  }
102
104
 
103
- /** What the last probe of a target found; held by the controller, never stored. */
105
+ /** What the last probe of a target found, as the controller's last computation of the deploy status holds it. */
104
106
  export interface IFleetDeployProbeState {
105
107
  state: 'up' | 'down' | 'unknown';
106
108
  checkedAt?: string;
@@ -185,7 +187,7 @@ export interface IFleetDeployBug extends IFleetDeployTicket {
185
187
  fixedIn?: string;
186
188
  }
187
189
 
188
- /** One target as `agl deploy status` and the Deployments view show it, computed when it is read. */
190
+ /** One target as `agl deploy status` and the Deployments view show it, from the stored deploy status. */
189
191
  export interface IFleetDeployTargetStatus {
190
192
  target: IFleetDeployTarget & { builtIn?: true };
191
193
  /** The repository's `org/name` as fleet discovery found its checkout; absent when no checkout holds it. */
@@ -216,11 +218,24 @@ export interface IFleetDeployTargetStatus {
216
218
  deployPlans: IFleetDeployPlan[];
217
219
  }
218
220
 
221
+ /**
222
+ * The newest computation of the deploy status, when it failed (AGL-1704): when, why in AGL's own words (naming the
223
+ * repository it could not read), and the failure journal reference its cause is kept under.
224
+ */
225
+ export interface IFleetDeployStatusFailure {
226
+ at: string;
227
+ message: string;
228
+ reference: string;
229
+ }
230
+
219
231
  export interface IFleetDeployStatus {
232
+ /** When the stored status was computed: at least once per pass, so when the targets were last checked. */
220
233
  checkedAt: string;
221
234
  targets: IFleetDeployTargetStatus[];
222
235
  /** Every maintenance window on a ticket that is not done, scheduled, active or done, the earliest first. */
223
236
  windows: IFleetDeployWindow[];
237
+ /** While the newest computation failed: that failure. The status is the last one computed, from `checkedAt`. */
238
+ failure?: IFleetDeployStatusFailure;
224
239
  }
225
240
 
226
241
  /** A repository's release state, as `agl release status` shows it. */
@@ -258,6 +273,22 @@ export interface IFleetDeployTicketPlacement {
258
273
  deployPlan?: { plan: IFleetDeployPlan; targetName: string; environment?: string; deployWhen: TFleetDeployCondition };
259
274
  }
260
275
 
276
+ /** How long `refresh` waits for its check before it answers `refreshing`; the check goes on, and `deployments.changed` tells of it. */
277
+ export const fleetDeployRefreshWaitMs = 60_000;
278
+
279
+ /** How much longer than `fleetDeployRefreshWaitMs` a caller waits for a `refresh` answer, so the controller's own bound answers first. */
280
+ export const fleetDeployRefreshClientMarginMs = 15_000;
281
+
282
+ /**
283
+ * A `refresh` answer: `refreshed` once a full check that started after the request (fetch, probes, computation) ended
284
+ * within `fleetDeployRefreshWaitMs`, `refreshing` while it still runs. `checkedAt` is the stored status's, absent only
285
+ * while none is stored yet.
286
+ */
287
+ export interface IFleetDeployRefreshResult {
288
+ state: 'refreshed' | 'refreshing';
289
+ checkedAt?: string;
290
+ }
291
+
261
292
  /** Every request of the deploy views; the browser sends the `controller.deploy.*` ones, `agl deploy` the `agl.mcp.deploy.*` ones. */
262
293
  export interface IFleetDeployOperations {
263
294
  status: { request: { targetId?: string }; response: IFleetDeployStatus };
@@ -265,13 +296,15 @@ export interface IFleetDeployOperations {
265
296
  probe: { request: { targetId: string }; response: IFleetDeployTargetStatus };
266
297
  release: { request: { repo?: string }; response: IFleetReleaseStatus };
267
298
  ticket: { request: { ticketKey: string }; response: IFleetDeployTicketPlacement };
299
+ refresh: { request: Record<never, never>; response: IFleetDeployRefreshResult };
268
300
  }
269
301
  export type TFleetDeployOperation = keyof IFleetDeployOperations;
270
- export const fleetDeployOperations = ['status', 'history', 'probe', 'release', 'ticket'] as const satisfies readonly TFleetDeployOperation[];
302
+ export const fleetDeployOperations = ['status', 'history', 'probe', 'release', 'ticket', 'refresh'] as const satisfies readonly TFleetDeployOperation[];
271
303
 
272
304
  /**
273
305
  * The deploy views in the browser. `status` and `history` read; `probe` asks for a probe of one target now and claims
274
- * nothing (a deploy path calls it after a deploy); `release` reads a repository's release state.
306
+ * nothing (a deploy path calls it after a deploy); `release` reads a repository's release state; `refresh` asks for one
307
+ * full check now and waits for it, at most `fleetDeployRefreshWaitMs` (AGL-1704).
275
308
  */
276
309
  export type TControllerDeployRequest<TOperation extends TFleetDeployOperation> = {
277
310
  method: `controller.deploy.${TOperation}`;
@@ -282,7 +315,7 @@ export type TControllerDeployTypedRequest = { [TOperation in TFleetDeployOperati
282
315
 
283
316
  /** The same through the controller's private channel, for `agl deploy` and `agl release status`: the local owner capability. */
284
317
  export const controllerMcpDeployMethods = ['agl.mcp.deploy.status', 'agl.mcp.deploy.history', 'agl.mcp.deploy.probe', 'agl.mcp.deploy.release',
285
- 'agl.mcp.deploy.ticket'] as const;
318
+ 'agl.mcp.deploy.ticket', 'agl.mcp.deploy.refresh'] as const;
286
319
  export type TControllerMcpDeployMethod = (typeof controllerMcpDeployMethods)[number];
287
320
  export type TControllerMcpDeployRequest<TOperation extends TFleetDeployOperation> = {
288
321
  method: `agl.mcp.deploy.${TOperation}`;
@@ -3906,7 +3906,7 @@
3906
3906
  "ticket",
3907
3907
  "none"
3908
3908
  ],
3909
- "description": "How a device answers an item: `session` with `device.permission.reply`, `device.question.reply` or `device.elicitation.reply` for the session; `child` with the same replies and the child's `childSessionId`; `ticket` with `device.ticket.answer`; `none` not on a device (the driver's turn, the driver's own prompts, a native wait, an item whose payload was left out, or a session the feed does not list)."
3909
+ "description": "How a device answers an item: `session` with `device.permission.reply`, `device.question.reply` or `device.elicitation.reply` for the session; `child`, only ever a permission or a question, with `device.permission.reply` or `device.question.reply` for the session and the child's `childSessionId`; `ticket` with `device.ticket.answer`; `none` not on a device (the driver's turn, the driver's own prompts, a native wait, an item whose payload was left out, or a session the feed does not list)."
3910
3910
  },
3911
3911
  "TDeviceInboxItem": {
3912
3912
  "anyOf": [
@@ -467,7 +467,8 @@ export type TDeviceInboxWhere =
467
467
 
468
468
  /**
469
469
  * How a device answers an item: `session` with `device.permission.reply`, `device.question.reply` or
470
- * `device.elicitation.reply` for the session; `child` with the same replies and the child's `childSessionId`; `ticket`
470
+ * `device.elicitation.reply` for the session; `child`, only ever a permission or a question, with
471
+ * `device.permission.reply` or `device.question.reply` for the session and the child's `childSessionId`; `ticket`
471
472
  * with `device.ticket.answer`; `none` not on a device (the driver's turn, the driver's own prompts, a native wait, an
472
473
  * item whose payload was left out, or a session the feed does not list).
473
474
  */
@@ -176,6 +176,11 @@ interface IControllerInboxItemBase<TKind extends TControllerInboxKind, TWhere ex
176
176
  }
177
177
 
178
178
  type TSessionWhere = Extract<TControllerInboxWhere, { kind: 'conversation' | 'child' | 'native' | 'driver' }>;
179
+ /**
180
+ * Where an MCP form lives: never a direct child, whose harness (OpenCode) hands AGL no MCP forms, so no child reply
181
+ * answers one (AGL-1701).
182
+ */
183
+ type TElicitationWhere = Extract<TControllerInboxWhere, { kind: 'conversation' | 'native' | 'driver' }>;
179
184
 
180
185
  export interface IControllerInboxPermissionItem extends IControllerInboxItemBase<'permission', TSessionWhere> {
181
186
  permission?: IControllerPermission;
@@ -183,7 +188,9 @@ export interface IControllerInboxPermissionItem extends IControllerInboxItemBase
183
188
  export interface IControllerInboxQuestionItem extends IControllerInboxItemBase<'question', TSessionWhere> {
184
189
  question?: IControllerQuestion;
185
190
  }
186
- export interface IControllerInboxElicitationItem extends IControllerInboxItemBase<'elicitation', TSessionWhere> {
191
+ export interface IControllerInboxElicitationItem extends IControllerInboxItemBase<'elicitation', TElicitationWhere> {
192
+ /** Never `child`: no child holds an MCP form. */
193
+ answer: Exclude<TControllerInboxAnswer, 'child'>;
187
194
  elicitation?: TControllerElicitation;
188
195
  }
189
196
  /** A wait the harness shows in its own client: AGL holds no request for it, so it is answered there (`answer: 'none'`). */
@@ -203,6 +203,8 @@ export const controllerSpendLimitRange = plugins.authswitchSpend.authSwitchSpend
203
203
 
204
204
  /** The renewal anchor rule of the accounts service (`IReq_ControllerAccountsRenewal`); a past date and time is valid. */
205
205
  export const isControllerRenewsAt = plugins.authswitchRenewal.isAuthSwitchRenewsAt;
206
+ /** The instants a renewal anchor may name, in epoch milliseconds, both included: the rule's own range. */
207
+ export const controllerRenewsAtRange = plugins.authswitchRenewal.authSwitchRenewsAtRange;
206
208
 
207
209
  /** The longest API key the accounts service holds, in characters; a longer value is refused before it is sent. */
208
210
  export const controllerApiKeyMaxLength = 512;
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: 'agl',
6
- version: '43.3.2',
6
+ version: '43.5.0',
7
7
  description: 'Agent Gateway Layer for OpenCode, FlexHarness, and Codex sessions'
8
8
  }
@@ -1371,14 +1371,26 @@ export const renewalFact = (renewsAtArg: string | null, nowArg: number): string
1371
1371
  };
1372
1372
 
1373
1373
  /**
1374
- * Why a renewal draft cannot be saved yet, or `''` when it can: a date and time the service's own rule reads, other
1375
- * than the renewal the account has. A past one is valid: the next renewal is a whole number of months after it.
1374
+ * The earliest and the latest moment the renewal's date picker takes (its `minDate` and `maxDate`): the service's own
1375
+ * range (`controllerRenewsAtRange`), so the picker refuses, in its own words, exactly what the service would.
1376
1376
  */
1377
- export const renewalReason = (draftArg: string, currentArg: string | null): string => {
1378
- const draft = draftArg.trim();
1379
- if (draft.length === 0) return 'Enter a date and time.';
1380
- if (!interfaces.isControllerRenewsAt(draft)) return 'Enter a date and time, year first, such as 2026-11-20 09:30.';
1381
- return currentArg !== null && Date.parse(draft) === Date.parse(currentArg) ? 'The renewal is unchanged.' : '';
1377
+ export const renewalPickerBounds: Readonly<{ minDate: string; maxDate: string }> = Object.freeze({
1378
+ minDate: new Date(interfaces.controllerRenewsAtRange.min).toISOString(),
1379
+ maxDate: new Date(interfaces.controllerRenewsAtRange.max).toISOString(),
1380
+ });
1381
+
1382
+ /**
1383
+ * Why a renewal draft cannot be saved yet, or `''` when it can. The draft is the date picker's value: the moment it
1384
+ * holds, in UTC, or `''` while it holds none. `fieldMessageArg` is what the picker says is wrong with its text while it
1385
+ * says anything: text it cannot read, or a moment outside the service's range. A draft is saved only as a moment the
1386
+ * service's own rule reads (`isControllerRenewsAt`), other than the renewal the account has. A past one is valid: the
1387
+ * next renewal is a whole number of months after it.
1388
+ */
1389
+ export const renewalReason = (draftArg: string, fieldMessageArg: string, currentArg: string | null): string => {
1390
+ if (fieldMessageArg !== '') return 'Correct the date and time first.';
1391
+ if (draftArg === '') return 'Pick a date and time.';
1392
+ if (!interfaces.isControllerRenewsAt(draftArg)) return 'Pick a date and time from the year 2000 to 9999.';
1393
+ return currentArg !== null && Date.parse(draftArg) === Date.parse(currentArg) ? 'The renewal is unchanged.' : '';
1382
1394
  };
1383
1395
 
1384
1396
  /** What the Details say of an account's usage threshold. */