agl 41.0.1 → 41.2.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 +24 -0
- package/dist_serve/bundle.js +1448 -1448
- package/dist_serve/bundle.js.map +2 -2
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/aglapi/aglapisurface.document.js +7 -3
- package/dist_ts/classes.authmodels.d.ts +15 -0
- package/dist_ts/classes.authmodels.js +78 -7
- package/dist_ts/classes.authstore.js +23 -6
- package/dist_ts/classes.cli.js +8 -3
- package/dist_ts/classes.controller.d.ts +13 -0
- package/dist_ts/classes.controller.js +51 -14
- package/dist_ts/classes.controllermanagement.d.ts +53 -6
- package/dist_ts/classes.controllermanagement.js +180 -72
- package/dist_ts/classes.inferencegateway.d.ts +6 -6
- package/dist_ts/classes.inferencegateway.js +28 -15
- package/dist_ts/classes.inferenceusage.d.ts +19 -7
- package/dist_ts/classes.inferenceusage.js +49 -13
- package/dist_ts/classes.inferenceusagetap.d.ts +15 -3
- package/dist_ts/classes.inferenceusagetap.js +16 -9
- package/dist_ts/classes.processinspection.d.ts +3 -1
- package/dist_ts/classes.processinspection.js +4 -2
- package/dist_ts/classes.proxycontrol.d.ts +22 -7
- package/dist_ts/classes.proxycontrol.js +5 -3
- package/dist_ts/classes.proxycontrolclient.d.ts +4 -3
- package/dist_ts/classes.proxycontrolclient.js +7 -5
- package/dist_ts/classes.proxydaemon.d.ts +6 -4
- package/dist_ts/classes.proxydaemon.js +42 -17
- package/dist_ts/classes.proxyleaseholder.d.ts +11 -2
- package/dist_ts/classes.proxyleaseholder.js +25 -2
- package/dist_ts/classes.proxystore.d.ts +3 -2
- package/dist_ts/classes.proxystore.js +5 -2
- package/dist_ts/classes.upgradecoordinator.d.ts +2 -1
- package/dist_ts/classes.upgradecoordinator.js +13 -10
- package/dist_ts/classes.upgradetransaction.d.ts +6 -0
- package/dist_ts/classes.upgradetransaction.js +38 -13
- package/dist_ts/classes.usagefeed.js +3 -2
- package/dist_ts/functions.controllermanagementsurface.d.ts +37 -0
- package/dist_ts/functions.controllermanagementsurface.js +110 -0
- package/dist_ts/functions.inferencecli.d.ts +6 -3
- package/dist_ts/functions.inferencecli.js +9 -5
- package/dist_ts/functions.inferencecliarguments.d.ts +1 -1
- package/dist_ts/functions.inferencecliarguments.js +19 -7
- package/dist_ts/functions.inferencelaunch.d.ts +30 -9
- package/dist_ts/functions.inferencelaunch.js +49 -23
- package/dist_ts/interfaces.auth.d.ts +14 -3
- package/dist_ts/interfaces.auth.js +4 -3
- package/dist_ts_interfaces/index.d.ts +1 -0
- package/dist_ts_interfaces/index.js +2 -1
- package/dist_ts_interfaces/interfaces.d.ts +6 -1
- package/dist_ts_interfaces/interfaces.js +2 -2
- package/dist_ts_interfaces/management.d.ts +33 -0
- package/dist_ts_interfaces/management.js +35 -0
- package/dist_ts_interfaces/metrics.d.ts +29 -7
- package/dist_ts_interfaces/metrics.js +14 -1
- package/package.json +6 -5
- package/readme.md +123 -28
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/aglapi/aglapisurface.document.ts +6 -2
- package/ts/classes.authmodels.ts +74 -5
- package/ts/classes.authstore.ts +24 -4
- package/ts/classes.cli.ts +9 -2
- package/ts/classes.controller.ts +98 -59
- package/ts/classes.controllermanagement.ts +284 -107
- package/ts/classes.inferencegateway.ts +31 -19
- package/ts/classes.inferenceusage.ts +58 -19
- package/ts/classes.inferenceusagetap.ts +27 -8
- package/ts/classes.processinspection.ts +2 -1
- package/ts/classes.proxycontrol.ts +25 -9
- package/ts/classes.proxycontrolclient.ts +7 -4
- package/ts/classes.proxydaemon.ts +43 -17
- package/ts/classes.proxyleaseholder.ts +36 -7
- package/ts/classes.proxystore.ts +8 -3
- package/ts/classes.upgradecoordinator.ts +20 -11
- package/ts/classes.upgradetransaction.ts +53 -2
- package/ts/classes.usagefeed.ts +2 -1
- package/ts/functions.controllermanagementsurface.ts +149 -0
- package/ts/functions.inferencecli.ts +15 -7
- package/ts/functions.inferencecliarguments.ts +16 -6
- package/ts/functions.inferencelaunch.ts +57 -23
- package/ts/interfaces.auth.ts +14 -3
- package/ts_interfaces/index.ts +1 -0
- package/ts_interfaces/interfaces.ts +6 -1
- package/ts_interfaces/management.ts +52 -0
- package/ts_interfaces/metrics.ts +34 -7
- package/ts_web/00_commitinfo_data.ts +1 -1
- package/ts_web/classes.controllersocketclient.ts +5 -2
- package/ts_web/elements.metricsboard.ts +68 -18
package/changelog.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2026-10-27 - 41.2.0
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- The Metrics view no longer shows cache reads or writes an answer did not state as none (AGL-1012). The proxy read a missing cache count as 0, so a ChatGPT answer, which states the tokens it read from the cache but not the ones it wrote (OpenAI's `input_tokens_details.cache_write_tokens`), counted as an answer that wrote nothing. An answer's cache reads and writes are now each unknown (`null`) when it does not state them: a Responses answer without `cached_tokens` or `cache_write_tokens`, or a Claude answer whose `cache_read_input_tokens`, or `cache_creation_input_tokens` with no `cache_creation` split, is missing or null (Anthropic documents both as `number or null`); a stated 0 stays 0. Each usage bucket keeps the reads and writes its answers stated and, beside them, `cacheReadUnknownCalls` and `cacheWriteUnknownCalls`, the answers that did not state theirs, so known counts still add up exactly. The Metrics view shows the cache reads or writes of a window, model or session as **Unknown** when no call stated any, as **≥** the stated count when some calls did not, and the tile then says for how many calls they are unknown. A Responses answer's unknown cache counts stay inside its input count, as OpenAI's `input_tokens` counts every input token, so an OpenAI account's total stays exact; a Claude account's answers leave the cache out of their input, so a model's or session's **Total** reads **≥** when one of its Claude answers did not state a cache count (`controllerUsageTotalIsLowerBound`). Controller protocol 47: a usage bucket carries `cacheReadUnknownCalls` and `cacheWriteUnknownCalls` (`IControllerUsageBucket`, counts in `IControllerUsageCounts`), and a browser of an earlier AGL reloads.
|
|
8
|
+
- Buckets stored before this release did not record whether their answers stated their cache reads and writes; each of their answers reads as unknown for both until they expire (minutes after a day, hours after eight days), and an answer added to such a bucket keeps that. Nothing is migrated.
|
|
9
|
+
- Downgrade: an earlier proxy refuses a stored bucket that carries the new count, so its Metrics view fails to load and its writes into such a bucket fail (reported on its standard error) until those buckets expire.
|
|
10
|
+
- A Messages request a ChatGPT account answers through the proxy's translation counts the cache writes ChatGPT did not state as unknown as well: the translation (`@modelprofile.com/flexharness-providers` 17.0.0) now reports a cache count the model did not state as `null` where it reported 0, and Claude Code on the ChatGPT pool gets that `null` in the answer's usage. Its unknown writes stay inside its input count, so the account's total stays exact. The account service's Claude usage estimate counts unknown writes as none, as before.
|
|
11
|
+
|
|
12
|
+
### Maintenance
|
|
13
|
+
|
|
14
|
+
- FlexHarness 17.0.0 (`@modelprofile.com/flexharness`, `-agent`, `-models`, `-providers`), pinned at 17.0.0. Its one breaking change is the Messages translation's usage (`IAnthropicMessagesUsage.cache_creation_input_tokens` and `cache_read_input_tokens` are `number | null`, `null` for a count the model did not state), which AGL reads as unknown (above).
|
|
15
|
+
|
|
16
|
+
## 2026-10-27 - 41.1.0
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
- The CLI and the upgrade worker manage the controller over loopback HTTP instead of the browser's WebSocket (AGL-825). The controller's port now also serves a management endpoint: one TypedRequest per HTTP `POST` to `/management/typedrequest`, answered only to a loopback peer (`127.0.0.1` or `::1`) that addresses `127.0.0.1:<port>` and sends no `Origin` and no forwarding header (`Forwarded`, `X-Forwarded-*`, `X-Real-IP`, the trusted proxy's secret header), with `controller.status`, `controller.upgrade.launch`, `controller.upgrade.prepare.begin` and `controller.upgrade.finalize` and nothing else. Each is the socket's own handler, so the upgrade methods still authorise themselves against the upgrade token and its one-time grant, and every upgrade request counts against the controller's global unauthenticated preflight limit. `agl status`, `agl start`, `agl upgrade` and the upgrade worker use it for a controller that declares it, and the controller's socket for one that does not, with no second attempt over the other transport. A release declares the endpoint's protocol twice: as `controllerManagementProtocolVersion` (1) in its `package.json`, which decides before its controller runs, and as `managementProtocolVersion` in the controller's status (also in `agl status --json`), which decides once it runs; `controllerUpgradeManagementVersion` stays 2. So the worker of this release reads and finalizes the next release's controller through the endpoint whatever transport that release's browser speaks, and a later release can move its browser transport to another TypedSocket major without breaking an online upgrade from this one. A controller of an earlier release declares neither, so it, and a source a recovery restores, is still reached over its socket, and the socket keeps serving the status read and every upgrade method, so an AGL that predates this release upgrades to it online as before. The wire is a contract between releases: `test/helpers.managementwireoracle.ts` freezes what this release's client sends and accepts, and `test/test.controllermanagementwire.node.ts` holds every later build's endpoint to it.
|
|
21
|
+
- Serve Claude Code in confined containers from the ChatGPT pool as well, chosen per run (AGL-1019). `agl proxy confined run --provider openai -- docker run …` takes a run's credential that is a lease of the ChatGPT pool, as `agl proxy run claude --provider openai` leases it: served by the pool's ChatGPT accounts alone, since a translated Messages request never goes to an OpenAI API key, its sessions those of the client `confined` on that pool, accepted on the confined listener alone and ended with the run. Without the option, or with `--provider anthropic`, a run is a Claude-pool run exactly as before. The confined listener serves either pool's run Claude Code's three endpoints alone -- `GET /anthropic/v1/models`, `POST /anthropic/v1/messages` (translated on the ChatGPT pool) and `POST /anthropic/v1/messages/count_tokens` (404 on the ChatGPT pool, as on the loopback listener, on which Claude Code estimates) -- exactly as the loopback listener serves Claude Code on that pool, and refuses every `/openai/v1/` path and every other path and method with 404 before anything is read or routed. The proxy hands a ChatGPT-pool run the pool's models with its credential (`agl.proxy.confined` takes `{ provider: 'openai' }`; an empty request is a Claude-pool run, as every proxy since confined runs takes it, and the grant names its pool), and the launcher passes Claude Code by name what `agl proxy run claude --provider openai` sets on the host: the pool's default model as `ANTHROPIC_MODEL` and for every alias, its context window, no experimental betas, no nonessential traffic and no attribution block, besides the socket, the endpoint and the credential. That command's configuration directory, in the AGL home, and its `/model` picker, an option of Claude Code's command line, are not passed; the model variables are removed from the environment `docker` runs with, so `-e NAME` of one passes nothing. `agl proxy status` names each confined run's pool (`confinedRuns[].provider`; a proxy before this release names none, and its runs are Claude-pool runs). The readme states, for Claude Code on the ChatGPT pool, what the translation adds to a request and drops from a request and an answer, how Claude Code's reasoning effort reaches the model, and what AGL can and cannot know of the ChatGPT account's own personalization. `test/e2e/e2e.proxyconfined.node.ts` now also runs Claude Code in a container without a network on the ChatGPT pool through the socket. Downgrade: 41.0.1 and earlier refuse to start while the proxy's store keeps a ChatGPT-pool run's credential; let every confined run end first, or start this release once with none going and wait out the 60-second reclaim window.
|
|
22
|
+
|
|
23
|
+
### Fixes
|
|
24
|
+
|
|
25
|
+
- An AGL rolled back from a later release prunes the audit events it does not know instead of failing (AGL-825). The audit log is shared between releases, and 42 writes types this release does not know (`remote.*`, `device.*`): each pruning pass refused them with "Audit history pruning failed", so the 2,000-event cap and the 7-day prune stopped until the 90-day expiry removed the rows. A stored event of an unknown type is now read when its type is spelled as an audit type (lowercase dotted segments, at most 128 characters) and its envelope passes the same checks as a known type's; only the rules that tie `localCli` to `configuration.*` and a sender label to `session.message` are left to the release that knows the type. Events now have an optional `details` field (bounded plain JSON: an object at most eight levels deep and 4 KiB serialized), which this release never writes and where a later release records what its own types add. A configuration with gateway sources, which a later release's `agl remote set` stores, is still refused, and the refusal now names `gatewaySources` and the remedy: run `agl remote unset --port <port>` on the later release before rolling back. A start lease a later release's command left behind (`agl remote`) counts as live while that command runs and is reclaimed once it ended, instead of blocking every upgrade as unverifiable. 41.1.0 is the release a 42 controller rolls back to; 40.5.0 and older are not rollback targets for 42. See "Rolling back from a later release" in the readme.
|
|
26
|
+
|
|
3
27
|
## 2026-10-26 - 41.0.1
|
|
4
28
|
|
|
5
29
|
### Fixes
|