agl 43.7.0 → 43.8.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 (116) hide show
  1. package/changelog.md +17 -0
  2. package/dist_serve/bundle.js +786 -786
  3. package/dist_serve/bundle.js.map +2 -2
  4. package/dist_ts/00_commitinfo_data.js +1 -1
  5. package/dist_ts/aglapi/interfaces.d.ts +35 -0
  6. package/dist_ts/aglapi/interfaces.js +9 -1
  7. package/dist_ts/classes.apnsclient.d.ts +97 -0
  8. package/dist_ts/classes.apnsclient.js +363 -0
  9. package/dist_ts/classes.authmodels.js +19 -6
  10. package/dist_ts/classes.authstore.js +15 -2
  11. package/dist_ts/classes.cli.js +8 -1
  12. package/dist_ts/classes.controller.d.ts +30 -3
  13. package/dist_ts/classes.controller.js +250 -9
  14. package/dist_ts/classes.controllerdevices.d.ts +35 -7
  15. package/dist_ts/classes.controllerdevices.js +86 -13
  16. package/dist_ts/classes.controllerpush.d.ts +111 -0
  17. package/dist_ts/classes.controllerpush.js +299 -0
  18. package/dist_ts/classes.fcmclient.d.ts +78 -0
  19. package/dist_ts/classes.fcmclient.js +278 -0
  20. package/dist_ts/classes.inbox.d.ts +10 -2
  21. package/dist_ts/classes.inbox.js +9 -2
  22. package/dist_ts/classes.mcpclient.d.ts +5 -0
  23. package/dist_ts/classes.mcpclient.js +18 -6
  24. package/dist_ts/classes.mcpcontrollerhost.d.ts +3 -0
  25. package/dist_ts/classes.mcpcontrollerhost.js +19 -1
  26. package/dist_ts/classes.mcpvalidation.js +4 -1
  27. package/dist_ts/classes.mcpworkercaller.d.ts +6 -0
  28. package/dist_ts/classes.mcpworkercaller.js +26 -4
  29. package/dist_ts/classes.pushdelivery.d.ts +115 -0
  30. package/dist_ts/classes.pushdelivery.js +311 -0
  31. package/dist_ts/classes.pushhandover.d.ts +46 -0
  32. package/dist_ts/classes.pushhandover.js +131 -0
  33. package/dist_ts/classes.pushregistrations.d.ts +96 -0
  34. package/dist_ts/classes.pushregistrations.js +263 -0
  35. package/dist_ts/classes.pushsettings.d.ts +125 -0
  36. package/dist_ts/classes.pushsettings.js +377 -0
  37. package/dist_ts/classes.workercallers.d.ts +73 -2
  38. package/dist_ts/classes.workercallers.js +354 -43
  39. package/dist_ts/driver/classes.directreports.d.ts +5 -0
  40. package/dist_ts/driver/classes.directreports.js +3 -2
  41. package/dist_ts/fleet/classes.workerlaunches.d.ts +6 -4
  42. package/dist_ts/fleet/classes.workerlaunches.js +10 -9
  43. package/dist_ts/fleet/classes.workers.d.ts +12 -2
  44. package/dist_ts/fleet/classes.workers.js +82 -2
  45. package/dist_ts/functions.deviceapi.d.ts +23 -3
  46. package/dist_ts/functions.deviceapi.js +41 -3
  47. package/dist_ts/functions.pushcli.d.ts +43 -0
  48. package/dist_ts/functions.pushcli.js +201 -0
  49. package/dist_ts/functions.pushcredentials.d.ts +53 -0
  50. package/dist_ts/functions.pushcredentials.js +111 -0
  51. package/dist_ts/functions.pushwire.d.ts +8 -0
  52. package/dist_ts/functions.pushwire.js +83 -0
  53. package/dist_ts/functions.remotecli.d.ts +2 -2
  54. package/dist_ts/functions.remotecli.js +4 -4
  55. package/dist_ts/functions.workercallervalidation.js +3 -2
  56. package/dist_ts/functions.workerprocessproof.d.ts +12 -0
  57. package/dist_ts/functions.workerprocessproof.js +32 -1
  58. package/dist_ts/interfaces.auth.d.ts +27 -3
  59. package/dist_ts/interfaces.auth.js +9 -1
  60. package/dist_ts/interfaces.lifecycle.d.ts +7 -1
  61. package/dist_ts/interfaces.push.d.ts +69 -0
  62. package/dist_ts/interfaces.push.js +25 -0
  63. package/dist_ts/plugins.d.ts +3 -1
  64. package/dist_ts/plugins.js +4 -2
  65. package/dist_ts_interfaces/devices.d.ts +178 -2
  66. package/dist_ts_interfaces/devices.js +24 -2
  67. package/dist_ts_interfaces/index.d.ts +1 -0
  68. package/dist_ts_interfaces/index.js +2 -1
  69. package/dist_ts_interfaces/mcprequests.d.ts +3 -2
  70. package/dist_ts_interfaces/mcprequests.js +3 -1
  71. package/dist_ts_interfaces/push.d.ts +166 -0
  72. package/dist_ts_interfaces/push.js +24 -0
  73. package/dist_ts_interfaces/workercallers.d.ts +43 -3
  74. package/package.json +1 -1
  75. package/readme.md +64 -11
  76. package/ts/00_commitinfo_data.ts +1 -1
  77. package/ts/aglapi/interfaces.ts +8 -0
  78. package/ts/classes.apnsclient.ts +389 -0
  79. package/ts/classes.authmodels.ts +21 -5
  80. package/ts/classes.authstore.ts +14 -1
  81. package/ts/classes.cli.ts +7 -0
  82. package/ts/classes.controller.ts +273 -7
  83. package/ts/classes.controllerdevices.ts +94 -12
  84. package/ts/classes.controllerpush.ts +351 -0
  85. package/ts/classes.fcmclient.ts +292 -0
  86. package/ts/classes.inbox.ts +13 -2
  87. package/ts/classes.mcpclient.ts +20 -5
  88. package/ts/classes.mcpcontrollerhost.ts +20 -0
  89. package/ts/classes.mcpvalidation.ts +2 -0
  90. package/ts/classes.mcpworkercaller.ts +24 -2
  91. package/ts/classes.pushdelivery.ts +378 -0
  92. package/ts/classes.pushhandover.ts +98 -0
  93. package/ts/classes.pushregistrations.ts +244 -0
  94. package/ts/classes.pushsettings.ts +428 -0
  95. package/ts/classes.workercallers.ts +329 -37
  96. package/ts/driver/classes.directreports.ts +7 -1
  97. package/ts/fleet/classes.workerlaunches.ts +9 -7
  98. package/ts/fleet/classes.workers.ts +65 -2
  99. package/ts/functions.deviceapi.ts +52 -2
  100. package/ts/functions.pushcli.ts +212 -0
  101. package/ts/functions.pushcredentials.ts +129 -0
  102. package/ts/functions.pushwire.ts +106 -0
  103. package/ts/functions.remotecli.ts +3 -2
  104. package/ts/functions.workercallervalidation.ts +2 -1
  105. package/ts/functions.workerprocessproof.ts +34 -0
  106. package/ts/interfaces.auth.ts +26 -3
  107. package/ts/interfaces.lifecycle.ts +7 -1
  108. package/ts/interfaces.push.ts +78 -0
  109. package/ts/plugins.ts +3 -1
  110. package/ts_interfaces/devices.schema.json +327 -0
  111. package/ts_interfaces/devices.ts +206 -1
  112. package/ts_interfaces/index.ts +1 -0
  113. package/ts_interfaces/mcprequests.ts +3 -0
  114. package/ts_interfaces/push.ts +162 -0
  115. package/ts_interfaces/workercallers.ts +34 -2
  116. package/ts_web/00_commitinfo_data.ts +1 -1
package/changelog.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # Changelog
2
2
 
3
+ ## 2026-11-14 - 43.8.0
4
+
5
+ ### Features
6
+
7
+ - Device protocol 1.4, the contract for push notifications of Inbox items (AGL-1639): a paired device's host entry can carry `push` (`reports`, `previews`, `available`, the last failure), and the notification payloads are typed for both apps: an Inbox item, a summary, a direct report's result, a clear and the owner's test, with one fixed sentence per kind for previews off. Additive: an app on 1.3 is served as before.
8
+ - Push registrations (AGL-1639): a paired device registers its APNs or FCM token over its authenticated connection (`device.push.register`, `device.push.unregister`); registering again replaces it. AGL keeps one registration per device in its own collection (`agl_controller_push_registrations`), removes it when the device is revoked or the controller's origin moves, and sweeps registrations of devices that are gone at start. The token is never logged, audited or returned. Downgrade: an older controller does not read the collection; nothing else changes.
9
+ - `agl push`: the owner sets what AGL needs to send notifications, on the host (AGL-1639): `agl push apns set --key-id KEY_ID --team-id TEAM_ID [--topic BUNDLE_ID] < AuthKey.p8`, `agl push fcm set < SERVICE_ACCOUNT.json`, `agl push apns|fcm unset`, `agl push previews on|off` and `agl push status [--json]`. A key is read from standard input only, sealed with the TPM and never printed, logged or audited; the service account's `token_uri` is ignored. Previews are off unless turned on: a notification then says one fixed sentence per kind of item. Every change is audited (`push.*`). The settings live in their own collection (`agl_controller_push_settings`), which an older controller does not read.
10
+ - The APNs and FCM senders (AGL-1639): AGL talks to Apple's and Google's push services itself, over HTTP/2 and HTTPS with Node's own modules and no new dependency, to hosts fixed in the code. An Inbox item, a summary and the test arrive as an alert with the default sound, a direct report's result quietly, a clear in the background. What the service answers becomes one of delivered, unregistered, credential refused, rate limited, refused, service failed or unreachable; only its code is kept, never its message.
11
+ - Delivery and `agl push test [--device DEVICE_ID] [--json]` (AGL-1639): a send never holds up the controller. Each device has a bounded queue that keeps the newest notification per key, waits from 1 second up to 5 minutes between attempts (longer when the service says so) and drops what is older than an hour; a stop ends every request, timer and connection. A device whose token the service no longer knows loses its registration, and a refused credential stops that platform until it is set again, shown by `agl push status`. `agl push test` sends "Push from AGL works." to the registered devices and prints what Apple or Google answered for each. A paired device's host entry now tells whether notifications can reach it, whether previews are on and its last failed send.
12
+ - Push holds up better against a wrong host clock and a quiet connection (AGL-1639): Apple's "expired provider token" on a fresh token and Google's `invalid_grant` while its clock and the host's are more than 60 seconds apart are retried instead of stopping the platform, and `agl push status` names the clock difference. A connection to Apple that sat idle for a minute must answer a ping within 3 seconds before it is used again. `agl push test` answers "no answer in time" for a device after 20 seconds.
13
+ - Notifications for Inbox items (AGL-1639): a new item in the Inbox sends a notification to the registered devices, an item that leaves clears it, and more than four new items at once arrive as one summary; a direct report's new result goes quietly to devices that asked for reports. With previews off, the default, a notification says one fixed sentence per kind of item and names nothing. The Inbox is now also worked out with no browser or app connected, as long as a notification could go out: a host without a push credential or a registered device does nothing more than before. A clean stop hands the next start what it already announced, so an upgrade does not announce again what waited before it; after a stop that was not clean, what waits is sent once more under the same key, which replaces the notification. The handover lives in its own collection (`agl_controller_push_handover`), which an older controller does not read.
14
+
15
+ ### Fixes
16
+
17
+ - A project driver keeps its verified identity across an `agl upgrade` when Claude Code has updated itself under its running job (AGL-1888): the driver's ticket writes were refused with `TICKET_IDENTITY_REQUIRED` from the first upgrade after such an update. A job process the controller has already proved keeps its proof on the Claude Code release it was proved on; only a new process for the job must run the current release.
18
+ - A fleet Claude Code worker is identified by its process, so a session adopted without a relaunch can write to its ticket and keeps that across controller restarts (AGL-1888): the caller's bridge must be a direct child of the job process that the fleet's inventory lists for exactly one live worker, running an installed Claude Code release. No relaunch and no adoption step is needed; a session is identified at its next tool call. A launch the controller no longer knows falls back to the same proof. A stop, an archive and a re-bind always end the worker's identity, and an identification that ran across such a change is discarded. A session identified this way no longer presents a credential it inherited from its environment.
19
+
3
20
  ## 2026-11-13 - 43.7.0
4
21
 
5
22
  ### Features