agl 41.2.0 → 42.0.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.
- package/changelog.md +35 -0
- package/dist_serve/bundle.js +1996 -1999
- package/dist_serve/bundle.js.map +2 -2
- package/dist_serve/bundle.js.third-party-notices.json +3 -68
- package/dist_serve/bundle.js.third-party-notices.txt +4 -137
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/aglapi/aglapisurface.document.js +4 -4
- package/dist_ts/classes.authmodels.d.ts +2 -8
- package/dist_ts/classes.authmodels.js +60 -23
- package/dist_ts/classes.authstore.d.ts +22 -0
- package/dist_ts/classes.authstore.js +152 -23
- package/dist_ts/classes.cli.d.ts +3 -6
- package/dist_ts/classes.cli.js +38 -51
- package/dist_ts/classes.config.d.ts +17 -3
- package/dist_ts/classes.config.js +55 -18
- package/dist_ts/classes.controller.d.ts +12 -12
- package/dist_ts/classes.controller.js +46 -117
- package/dist_ts/classes.controllermanagement.d.ts +42 -9
- package/dist_ts/classes.controllermanagement.js +72 -23
- package/dist_ts/classes.controllerservice.d.ts +3 -31
- package/dist_ts/classes.controllerservice.js +3 -47
- package/dist_ts/classes.mcpcontrollerhost.js +9 -3
- package/dist_ts/classes.processinspection.d.ts +8 -1
- package/dist_ts/classes.processinspection.js +92 -2
- package/dist_ts/classes.proxycontrol.js +6 -1
- package/dist_ts/classes.proxydaemon.d.ts +2 -2
- package/dist_ts/classes.proxydaemon.js +1 -1
- package/dist_ts/classes.proxystore.d.ts +2 -11
- package/dist_ts/classes.proxystore.js +3 -25
- package/dist_ts/classes.tpmsecretcodec.d.ts +13 -0
- package/dist_ts/classes.tpmsecretcodec.js +28 -0
- package/dist_ts/classes.trustedproxysecrets.d.ts +91 -0
- package/dist_ts/classes.trustedproxysecrets.js +338 -0
- package/dist_ts/classes.upgradecoordinator.d.ts +14 -1
- package/dist_ts/classes.upgradecoordinator.js +21 -3
- package/dist_ts/classes.upgradetransaction.d.ts +32 -0
- package/dist_ts/classes.upgradetransaction.js +101 -4
- package/dist_ts/functions.controlleradmission.d.ts +67 -0
- package/dist_ts/functions.controlleradmission.js +127 -0
- package/dist_ts/functions.remotecli.d.ts +27 -0
- package/dist_ts/functions.remotecli.js +236 -0
- package/dist_ts/functions.retiredenvironment.d.ts +11 -2
- package/dist_ts/functions.retiredenvironment.js +22 -5
- package/dist_ts/index.d.ts +1 -0
- package/dist_ts/index.js +2 -1
- package/dist_ts/interfaces.auth.d.ts +29 -4
- package/dist_ts/interfaces.auth.js +5 -1
- package/dist_ts/interfaces.config.d.ts +14 -0
- package/dist_ts/interfaces.config.js +9 -2
- package/dist_ts/interfaces.lifecycle.d.ts +3 -0
- package/dist_ts_authswitch/classes.authoritydaemon.js +6 -1
- package/dist_ts_interfaces/interfaces.d.ts +2 -2
- package/dist_ts_interfaces/interfaces.js +1 -1
- package/dist_ts_interfaces/management.d.ts +2 -2
- package/dist_ts_interfaces/management.js +2 -2
- package/dist_ts_interfaces/requests.d.ts +1 -2
- package/dist_ts_interfaces/requests.js +1 -1
- package/dist_ts_interfaces/requests.upgrade.d.ts +0 -12
- package/package.json +12 -11
- package/readme.md +84 -24
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/aglapi/aglapisurface.document.ts +3 -3
- package/ts/classes.authmodels.ts +68 -25
- package/ts/classes.authstore.ts +151 -24
- package/ts/classes.cli.ts +38 -61
- package/ts/classes.config.ts +70 -21
- package/ts/classes.controller.ts +50 -163
- package/ts/classes.controllermanagement.ts +123 -49
- package/ts/classes.controllerservice.ts +3 -56
- package/ts/classes.mcpcontrollerhost.ts +10 -5
- package/ts/classes.processinspection.ts +84 -3
- package/ts/classes.proxycontrol.ts +2 -0
- package/ts/classes.proxydaemon.ts +3 -2
- package/ts/classes.proxystore.ts +4 -25
- package/ts/classes.tpmsecretcodec.ts +26 -0
- package/ts/classes.trustedproxysecrets.ts +317 -0
- package/ts/classes.upgradecoordinator.ts +33 -3
- package/ts/classes.upgradetransaction.ts +130 -1
- package/ts/functions.controlleradmission.ts +168 -0
- package/ts/functions.remotecli.ts +264 -0
- package/ts/functions.retiredenvironment.ts +25 -3
- package/ts/index.ts +1 -0
- package/ts/interfaces.auth.ts +36 -3
- package/ts/interfaces.config.ts +15 -0
- package/ts/interfaces.lifecycle.ts +3 -0
- package/ts_authswitch/classes.authoritydaemon.ts +2 -0
- package/ts_interfaces/interfaces.ts +2 -2
- package/ts_interfaces/management.ts +2 -2
- package/ts_interfaces/requests.ts +0 -10
- package/ts_interfaces/requests.upgrade.ts +0 -16
- package/ts_web/00_commitinfo_data.ts +1 -1
package/changelog.md
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2026-10-27 - 42.0.0
|
|
4
|
+
|
|
5
|
+
### Breaking Changes
|
|
6
|
+
|
|
7
|
+
- The controller speaks TypedSocket wire 9 and TypedRequest 9 (AGL-826): `@api.global/typedsocket` 10.0.1 (wire major 9, shared with TypedSocket 9), `@api.global/typedrequest` 9.2.0, `@api.global/typedserver` 16 and `@push.rocks/smartserve` 10, with one copy of TypedRequest 9 in the runtime graph (`test/test.typedrequestgraph.node.ts` fails on a second one). Native clients such as `@api.global/swiftsupport` speak wire 9 only; a TypedSocket 8 client now fails the controller's package-major handshake.
|
|
8
|
+
- An open browser tab of an earlier release can no longer reconnect after the upgrade: instead of reloading itself into the new bundle it shows "This page does not match the running controller … Reload the page to load the controller's current version." Reload each open tab once; later upgrades reload by themselves again.
|
|
9
|
+
- Programs of your own that talk to the controller's WebSocket must move to `@api.global/typedsocket` 9 or 10 (both speak wire 9) and `@api.global/typedrequest` 9 together.
|
|
10
|
+
- What keeps working across the upgrade, pinned by the frozen wire oracles of the earlier release's clients (`test/test.wireoracles.node.ts`): the upgrade worker and `agl status` of the earlier release (the loopback management endpoint), a running `agl mcp` of the earlier release until it moves onto the new build (the private MCP host still answers `response: {}` beside an error, as every `agl mcp` client requires, where TypedRequest 9 answers `null`), and the earlier release's inference proxy against the upgraded accounts service.
|
|
11
|
+
- Library: a router's `routeAndAddResponse()` resolves `null` when there is nothing to answer (TypedRequest 9); the private MCP host's `ControllerMcpBoundedTypedRouter` and `routeForCaller` are typed `T | null` accordingly, and the proxy control socket and the accounts service close the connection for such a request instead of writing `null`.
|
|
12
|
+
- Library: `controllerListenerOptions` (`functions.controlleradmission`) returns TypedServer 16 server options, whose admission callbacks take SmartServe 10 request contexts: `IRequestContext.runtime` is `'node' | 'bun'`, since SmartServe 10 and TypedSocket 10 drop Deno.
|
|
13
|
+
- AGL 41.0.x or older must upgrade to 41.1.x before 42 (AGL-826). AGL 42 manages a controller only through the loopback management endpoint 41.1.0 added, by the management protocol the controller declares (`managementProtocolVersion` 1 or more in its status, `controllerManagementProtocolVersion` in its `package.json`), never by its version, and never over the controller socket. The controller socket no longer serves `controller.upgrade.launch`, `controller.upgrade.prepare.begin`, `controller.upgrade.finalize` or the legacy synchronous `controller.upgrade.prepare`: no upgrade worker that could call them there can reach a TypedSocket 9 controller.
|
|
14
|
+
- The refusal ends with "AGL 41.0.x or older must upgrade to 41.1.x before 42." and names the release as `agl@<version>` when the installed package or an upgrade transaction names it. A running controller older than the endpoint answers the management `POST` with HTTP 405 and `Allow: GET, HEAD`; 42 refuses it as "a controller older than 41.1.0" on its port, or by the release an upgrade transaction left there, only when the process holding the port's listening socket runs an installed AGL package's controller for that port (`installedControllerHoldsPort`; Linux and macOS). Any other program that answers 405 there is reported as a busy port, never as an AGL controller. `agl status`, `agl stop`, `agl start`, `agl restart`, `agl upgrade` and `agl service install`/`uninstall` of 42 report that refusal instead of "not running" or a busy port, and a unit-run controller stands down with it.
|
|
15
|
+
- Upgrade a 41.0.x or older controller to 41.1.0 or a later 41.x release first (`agl upgrade` while a 41.x release is the latest). Once 42 is the latest release, upgrade it while it is stopped: `agl stop --port 4097` with its own release, `agl upgrade --port 4097`, `agl start --port 4097`.
|
|
16
|
+
- A stalled upgrade whose recovery restores a release older than the endpoint (and a package transition's bridge package) leaves that release installed and its controller stopped, with the transaction open and its stopped conversations recorded; run `agl upgrade --port 4097` again, which now runs that release, to let it start its controller and finish the recovery.
|
|
17
|
+
- A recovery of 42 that would roll a stalled upgrade back to a release that does not declare gateway sources (every release before 42) refuses before it restores anything while the port's stored configuration names them (`agl remote set --gateway-source`), which that release refuses to start on and cannot remove: run `agl remote unset --port 4097` with 42, still installed, then `agl upgrade --port 4097` again. A release declares them in its `package.json` (`controllerGatewaySourcesVersion`, 1 from 42 on), and the CLI that creates an upgrade transaction records its installed source package's declaration (`sourceGatewaySourcesVersion`); a transaction without one counts as a source without them. The check reads only the configuration's own collection (`SmartDataAuthStore.readRuntimeConfigOnly`), so the store stays one the older release starts on.
|
|
18
|
+
- Downgrade: an AGL older than 42 refuses an upgrade transaction that 42 or later created, since it carries `sourceGatewaySourcesVersion`. Upgrades never downgrade, so this matters only for a manual downgrade while such a transaction is still open.
|
|
19
|
+
- The controller protocol is 48.
|
|
20
|
+
- Library: `controllerManagementTransport` is replaced by `assertManagedController`, `isManagedControllerManagementProtocol` and `controllerManagementProtocolFloor` (`classes.controllermanagement`); `IControllerManagementTarget` names `packageName` and `packageVersion`; a status query (`IControllerStatusQuery`) states its `managementProtocolVersion` and whether its identity comes from an upgrade `transaction` or only the `caller`; `tryQueryControllerStatus` throws the refusal (`isUnmanagedControllerError`) instead of answering `undefined`; `IReq_ControllerUpgradePrepare` is removed, and `TControllerRequest` no longer lists the upgrade methods (they stay in `TControllerManagementTypedRequest`). `installedControllerHoldsPort` (`classes.processinspection`), `controllerGatewaySourcesVersion` (`interfaces.config`), `isControllerGatewaySourcesVersion` and `IUpgradeTransactionV2.sourceGatewaySourcesVersion` (`classes.upgradecoordinator`) and `IPnpmGlobalInstallation.gatewaySourcesVersion` are new.
|
|
21
|
+
- AGL generates its trusted-proxy secret and keeps it TPM2-sealed in the controller's database; `AGL_TRUSTED_PROXY_SECRET` is gone (AGL-827). A controller behind a TLS reverse proxy (`tlsMode: proxy`) generates 32 random bytes at its first start in that mode, seals them with `systemd-creds` and the TPM as the inference proxy seals its credentials, and stores only the sealed form (`agl_controller_trusted_proxy_secrets`, one record per controller); the secret is never read from the environment, written to a file or the unit, or logged. A rotation keeps the previous secret valid until the route carrying the new one is confirmed (`ControllerTrustedProxySecrets.rotate` and `confirm`, for AGL's gateway client). TLS-proxy mode therefore needs a TPM2 the user can use. `start`, `restart`, `foreground`, `upgrade`, `temp-password` and `service` refuse to run while `AGL_TRUSTED_PROXY_SECRET` (or `HARNESS_CONTROLLER_TRUSTED_PROXY_SECRET`) is set, naming the way out, and `agl-controller.service` now runs a controller behind a TLS proxy: `service install` no longer refuses `--behind-tls-proxy`, an HTTPS `--public-origin` or a stored proxy configuration, a unit-run controller in that mode no longer stands down with exit status 78, and `restart` no longer checks the shell for the secret.
|
|
22
|
+
- Migration: stop the controller, pipe the secret your proxy sends into the database and unset the variable: `agl stop --port 4097`, `printf '%s' "$AGL_TRUSTED_PROXY_SECRET" | agl remote secret import --port 4097`, `unset AGL_TRUSTED_PROXY_SECRET`, `agl start --port 4097`. For an older AGL running behind a TLS proxy, upgrade with the controller stopped: a running one's upgrade starts this release either with the variable set, which it refuses (the upgrade restores the old release), or without it, and then it generates a secret of its own that the proxy does not send. Keep the secret in a private file, `agl stop`, unset the variable, `agl upgrade`, `agl remote secret import --port 4097 < <that file>`, `agl start`. `agl remote secret import` reads a 32-byte base64url secret from a pipe or file, never a terminal, replaces the stored secret and any rotation, prints only its generation and is audited (`remote.secret.import`).
|
|
23
|
+
- Library: `readTrustedProxySecret` and `trustedProxySecretEnvironmentVariable` (`classes.config`) and `assertControllerStartsAgain` (`classes.cli`) are removed.
|
|
24
|
+
- Admission off loopback needs a configured gateway source address and the trusted-proxy secret, and only loopback connects without an `Origin` (AGL-827). In TLS-proxy mode the controller used to bind every interface and admit a WebSocket upgrade without an `Origin` from any address, without the secret, and served its static assets to anyone. Now there is one listener: loopback in local mode and in TLS-proxy mode without a gateway source, every interface (IPv6 too for an IPv6 source) once one is configured. Every HTTP request and upgrade on it, every surface included, is admitted by `controllerAdmissionRefusal`: from loopback as before (the CLI, `agl mcp` and the upgrade worker connect without an `Origin`; a browser upgrade through a reverse proxy on the host needs the public origin, `X-Forwarded-Proto: https` and the secret); from any other address only a configured gateway source sending the secret, whose upgrades also carry the public origin as `Origin` and `X-Forwarded-Proto: https`, and whose other requests carry the public origin as `Origin`, or for GET and HEAD no `Origin` at all. A refusal is a 403. A native client behind the proxy must send the public origin as `Origin` on its upgrade.
|
|
25
|
+
- Migration: a controller behind a reverse proxy on another host is refused until that proxy's address is a gateway source: `agl stop --port 4097`, `agl remote set --port 4097 --public-origin <its origin> --gateway-source <the proxy's address>`, `agl start --port 4097` (the passkey stays while the origin and RP ID do), and let only that address reach the port in the host firewall (readme, "Backend isolation").
|
|
26
|
+
- Downgrade: an older AGL refuses to start on a port whose stored configuration names gateway sources (`gatewaySources`); run `agl remote set` without `--gateway-source`, or `agl remote unset`, before downgrading. It needs `AGL_TRUSTED_PROXY_SECRET` again and ignores the sealed record.
|
|
27
|
+
- Library: `isControllerWebSocketRequestAllowed` is replaced by `controllerAdmissionRefusal` and `controllerListenerOptions` (`functions.controlleradmission`, exported from the package). `ControllerRuntimeConfigFromLaterReleaseError` (`classes.authmodels`), 41.1.0's refusal of a configuration with gateway sources, is removed: this release reads and enforces them.
|
|
28
|
+
|
|
29
|
+
### Features
|
|
30
|
+
|
|
31
|
+
- Move a stopped controller's port between localhost and a public origin behind a TLS reverse proxy (AGL-827): `agl remote set --port 4097 --public-origin https://agl.example.com [--rp-id agl.example.com] [--gateway-source 192.0.2.10]...` and `agl remote unset --port 4097`. The controller keeps its id (`controller:4097`) and all of its data; when the origin or RP ID changes, its passkey is removed and every temporary password revoked, and the next start prints a fresh setup code. `unset` also forgets the trusted-proxy secret. Both refuse while anything listens on the port, take start admission, run as the local OS user and are audited (`remote.set`, `remote.unset`, attempted and then succeeded or failed, with the OS user and process and the public origin and RP ID moved from and to). A start still never changes an initialized port's origin, RP ID or TLS mode; its refusal now names `agl remote set`.
|
|
32
|
+
|
|
33
|
+
### Maintenance
|
|
34
|
+
|
|
35
|
+
- Depend on `@lossless.org/client` ^2.5.0 instead of 1.22.2 and `@apiclient.xyz/docker` ^12.0.0 instead of 10.1.3 (AGL-908), so the runtime graph holds one TypedRequest, AGL's 9.2.0: client 2.4.1 moved to taskbuffer 11 and docker 12 to client 2, which takes the TypedRequest 8 that client 1.x's taskbuffer 9 brought through dees-element 3, dees-domtools 3 and dees-comms 1 out of the production tree. `test/test.typedrequestgraph.node.ts` now refuses every copy beside AGL's, of any version. Client 2.0.0 bounds every object-storage request (each attempt answered within 60 s, request body included, each request settled within 221 s with its retries); AGL writes and reads each message file, at most 10 MiB, with one request to its loopback object storage. AGL uses the Docker client for container environments alone, which docker 11 and 12 leave unchanged apart from dropping Deno.
|
|
36
|
+
- Flex sessions no longer resend a tool call that never ran (AGL-1090): FlexHarness 17.0.1 (`@modelprofile.com/flexharness`, `-agent`, `-models`, `-providers`), pinned at 17.0.1. When a model call failed after it had streamed a write tool call, the next model call showed the model that call twice, closed with its unknown-effect result, and a retried model call carried it without a result, which failed the retry; the model now sees it once, or not at all on a retry. A call the provider ran itself, such as a web search, is no longer repeated in a second assistant message either.
|
|
37
|
+
|
|
3
38
|
## 2026-10-27 - 41.2.0
|
|
4
39
|
|
|
5
40
|
### Features
|