agl 42.0.0 → 42.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 +44 -0
- package/dist_serve/bundle.js +2520 -2158
- package/dist_serve/bundle.js.map +2 -2
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/aglapi/aglapisurface.document.js +124 -10
- package/dist_ts/classes.accountsactions.d.ts +3 -1
- package/dist_ts/classes.accountsactions.js +16 -1
- package/dist_ts/classes.authstore.d.ts +2 -0
- package/dist_ts/classes.authstore.js +58 -17
- package/dist_ts/classes.cli.js +19 -49
- package/dist_ts/classes.configurationauthority.js +2 -2
- package/dist_ts/classes.controller.d.ts +71 -2
- package/dist_ts/classes.controller.js +500 -113
- package/dist_ts/classes.controllerdevices.d.ts +128 -0
- package/dist_ts/classes.controllerdevices.js +472 -0
- package/dist_ts/classes.controllerservice.d.ts +20 -2
- package/dist_ts/classes.controllerservice.js +42 -6
- package/dist_ts/classes.flexservice.js +8 -3
- package/dist_ts/classes.inferencegateway.d.ts +30 -2
- package/dist_ts/classes.inferencegateway.js +115 -20
- package/dist_ts/classes.inferencerouter.d.ts +16 -0
- package/dist_ts/classes.inferencerouter.js +5 -3
- package/dist_ts/classes.inferenceservice.js +7 -3
- package/dist_ts/classes.sessionfeed.d.ts +10 -1
- package/dist_ts/classes.sessionfeed.js +12 -2
- package/dist_ts/classes.ticketmodels.js +4 -3
- package/dist_ts/classes.ticketnotifier.js +9 -2
- package/dist_ts/classes.ticketstore.js +9 -5
- package/dist_ts/classes.upgradecoordinator.d.ts +6 -1
- package/dist_ts/classes.upgradecoordinator.js +9 -2
- package/dist_ts/classes.upgradetransaction.d.ts +27 -1
- package/dist_ts/classes.upgradetransaction.js +92 -2
- package/dist_ts/classes.validation.d.ts +2 -0
- package/dist_ts/classes.validation.js +2 -2
- package/dist_ts/configuration/functions.master.d.ts +7 -2
- package/dist_ts/configuration/functions.master.js +7 -4
- package/dist_ts/driver/classes.drivereventrelay.d.ts +1 -1
- package/dist_ts/driver/classes.drivereventrelay.js +3 -3
- package/dist_ts/fleet/classes.boardpump.d.ts +1 -1
- package/dist_ts/fleet/classes.boardpump.js +7 -4
- package/dist_ts/fleet/classes.claudeworkers.d.ts +6 -0
- package/dist_ts/fleet/classes.claudeworkers.js +17 -7
- package/dist_ts/fleet/classes.deploymodels.d.ts +19 -0
- package/dist_ts/fleet/classes.deploymodels.js +140 -0
- package/dist_ts/fleet/functions.validation.d.ts +8 -1
- package/dist_ts/fleet/functions.validation.js +65 -3
- package/dist_ts/fleet/interfaces.workers.d.ts +6 -0
- package/dist_ts/fleet/interfaces.workers.js +65 -2
- package/dist_ts/functions.deviceapi.d.ts +28 -0
- package/dist_ts/functions.deviceapi.js +246 -0
- package/dist_ts/functions.deviceproof.d.ts +33 -0
- package/dist_ts/functions.deviceproof.js +93 -0
- package/dist_ts/functions.fleetworkercli.d.ts +16 -3
- package/dist_ts/functions.fleetworkercli.js +21 -7
- package/dist_ts/functions.inferencecli.js +4 -2
- package/dist_ts/functions.mcptickettools.d.ts +1 -0
- package/dist_ts/functions.remotecli.d.ts +1 -1
- package/dist_ts/functions.remotecli.js +12 -7
- package/dist_ts/functions.ticketvalidation.d.ts +36 -3
- package/dist_ts/functions.ticketvalidation.js +45 -14
- package/dist_ts/interfaces.auth.d.ts +1 -1
- package/dist_ts/interfaces.auth.js +7 -1
- package/dist_ts_authswitch/authority-contract.d.ts +23 -0
- package/dist_ts_authswitch/authority-contract.js +1 -1
- package/dist_ts_authswitch/classes.authoritybroker.d.ts +6 -0
- package/dist_ts_authswitch/classes.authoritybroker.js +31 -4
- package/dist_ts_authswitch/classes.authoritycli.d.ts +1 -0
- package/dist_ts_authswitch/classes.authoritycli.js +26 -1
- package/dist_ts_authswitch/classes.authorityclient.d.ts +3 -1
- package/dist_ts_authswitch/classes.authorityclient.js +10 -4
- package/dist_ts_authswitch/classes.authoritydaemon.js +7 -1
- package/dist_ts_authswitch/classes.authorityimport.js +2 -2
- package/dist_ts_authswitch/classes.authoritymodels.d.ts +3 -0
- package/dist_ts_authswitch/classes.authoritymodels.js +10 -3
- package/dist_ts_authswitch/testsupport.js +4 -4
- package/dist_ts_authswitch/ts_migration/0012_account_claude_code.d.ts +11 -0
- package/dist_ts_authswitch/ts_migration/0012_account_claude_code.js +18 -0
- package/dist_ts_authswitch/ts_migration/index.js +3 -1
- package/dist_ts_interfaces/deployments.d.ts +104 -0
- package/dist_ts_interfaces/deployments.js +8 -0
- package/dist_ts_interfaces/devices.d.ts +331 -0
- package/dist_ts_interfaces/devices.js +34 -0
- package/dist_ts_interfaces/fleet.d.ts +2 -0
- package/dist_ts_interfaces/index.d.ts +3 -0
- package/dist_ts_interfaces/index.js +4 -1
- package/dist_ts_interfaces/interfaces.d.ts +4 -2
- package/dist_ts_interfaces/interfaces.js +3 -2
- package/dist_ts_interfaces/mcprequests.d.ts +1 -1
- package/dist_ts_interfaces/requests.accounts.d.ts +18 -0
- package/dist_ts_interfaces/requests.accounts.js +1 -1
- package/dist_ts_interfaces/requests.d.ts +3 -2
- package/dist_ts_interfaces/requests.devices.d.ts +89 -0
- package/dist_ts_interfaces/requests.devices.js +2 -0
- package/dist_ts_interfaces/requests.js +1 -1
- package/dist_ts_interfaces/tickets.d.ts +53 -4
- package/dist_ts_interfaces/tickets.js +6 -2
- package/dist_ts_migration/index.d.ts +1 -0
- package/dist_ts_migration/index.js +2 -1
- package/dist_ts_migration/v41_ticketmigrationmarkers.d.ts +19 -0
- package/dist_ts_migration/v41_ticketmigrationmarkers.js +85 -0
- package/docs/authswitch.md +6 -0
- package/package.json +5 -5
- package/readme.md +84 -16
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/aglapi/aglapisurface.document.ts +123 -9
- package/ts/classes.accountsactions.ts +24 -0
- package/ts/classes.authstore.ts +54 -14
- package/ts/classes.cli.ts +17 -54
- package/ts/classes.configurationauthority.ts +1 -1
- package/ts/classes.controller.ts +697 -167
- package/ts/classes.controllerdevices.ts +469 -0
- package/ts/classes.controllerservice.ts +49 -6
- package/ts/classes.flexservice.ts +7 -2
- package/ts/classes.inferencegateway.ts +133 -19
- package/ts/classes.inferencerouter.ts +20 -2
- package/ts/classes.inferenceservice.ts +6 -3
- package/ts/classes.sessionfeed.ts +13 -1
- package/ts/classes.ticketmodels.ts +3 -2
- package/ts/classes.ticketnotifier.ts +8 -1
- package/ts/classes.ticketstore.ts +8 -4
- package/ts/classes.upgradecoordinator.ts +14 -4
- package/ts/classes.upgradetransaction.ts +118 -0
- package/ts/classes.validation.ts +1 -1
- package/ts/configuration/functions.master.ts +6 -3
- package/ts/driver/classes.drivereventrelay.ts +2 -2
- package/ts/fleet/classes.boardpump.ts +7 -4
- package/ts/fleet/classes.claudeworkers.ts +16 -6
- package/ts/fleet/classes.deploymodels.ts +44 -0
- package/ts/fleet/functions.validation.ts +50 -2
- package/ts/fleet/interfaces.workers.ts +56 -1
- package/ts/functions.deviceapi.ts +295 -0
- package/ts/functions.deviceproof.ts +118 -0
- package/ts/functions.fleetworkercli.ts +26 -8
- package/ts/functions.inferencecli.ts +3 -1
- package/ts/functions.remotecli.ts +11 -5
- package/ts/functions.ticketvalidation.ts +48 -13
- package/ts/interfaces.auth.ts +6 -0
- package/ts_authswitch/authority-contract.ts +18 -0
- package/ts_authswitch/classes.authoritybroker.ts +29 -3
- package/ts_authswitch/classes.authoritycli.ts +29 -0
- package/ts_authswitch/classes.authorityclient.ts +12 -4
- package/ts_authswitch/classes.authoritydaemon.ts +8 -1
- package/ts_authswitch/classes.authorityimport.ts +1 -1
- package/ts_authswitch/classes.authoritymodels.ts +5 -1
- package/ts_authswitch/native-contracts.md +10 -0
- package/ts_authswitch/testsupport.ts +3 -3
- package/ts_authswitch/ts_migration/0012_account_claude_code.ts +17 -0
- package/ts_authswitch/ts_migration/index.ts +2 -0
- package/ts_interfaces/deployments.ts +98 -0
- package/ts_interfaces/devices.schema.json +890 -0
- package/ts_interfaces/devices.ts +392 -0
- package/ts_interfaces/fleet.ts +2 -0
- package/ts_interfaces/index.ts +3 -0
- package/ts_interfaces/interfaces.ts +4 -1
- package/ts_interfaces/mcprequests.ts +1 -1
- package/ts_interfaces/requests.accounts.ts +16 -0
- package/ts_interfaces/requests.devices.ts +95 -0
- package/ts_interfaces/requests.ts +12 -0
- package/ts_interfaces/tickets.ts +34 -4
- package/ts_migration/index.ts +1 -0
- package/ts_migration/v41_ticketmigrationmarkers.ts +28 -0
- package/ts_web/00_commitinfo_data.ts +1 -1
- package/ts_web/classes.accountsreadmodel.ts +12 -1
- package/ts_web/classes.controllersocketclient.ts +27 -0
- package/ts_web/elements.accounts.ts +44 -0
- package/ts_web/elements.devices.ts +752 -0
- package/ts_web/elements.harnesscontrollerapp.ts +18 -1
- package/ts_web/elements.ticketboard.ts +15 -4
|
@@ -25,7 +25,21 @@ export interface IInferenceGatewayRequestFailure {
|
|
|
25
25
|
code: string;
|
|
26
26
|
protocol?: TProtocol;
|
|
27
27
|
error?: string;
|
|
28
|
+
/**
|
|
29
|
+
* For a request refused before its client was known (AGL-304): the path it asked for, without its query, and the
|
|
30
|
+
* client's own name for itself (`user-agent`), each printable ASCII and cut short (`refusalText`), so a looping
|
|
31
|
+
* client can be found from the journal. Never a header value beyond those, never the credential.
|
|
32
|
+
*/
|
|
33
|
+
path?: string;
|
|
34
|
+
userAgent?: string;
|
|
35
|
+
/** For a 401: what the request presented (`TInferenceGatewayCredentialRefusal`). */
|
|
36
|
+
credential?: TInferenceGatewayCredentialRefusal;
|
|
28
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* What a refused request presented as its gateway credential: none, one the gateway cannot read (not a bearer token or
|
|
40
|
+
* `x-api-key`, or over 512 characters), one no client holds, or one of a client of the other listener.
|
|
41
|
+
*/
|
|
42
|
+
export type TInferenceGatewayCredentialRefusal = 'missing' | 'malformed' | 'unknown' | 'other_listener';
|
|
29
43
|
export interface IInferenceGatewayOptions {
|
|
30
44
|
router: InferenceRouter;
|
|
31
45
|
signatureKey: Uint8Array;
|
|
@@ -81,6 +95,11 @@ export interface IInferenceGatewayStreamCut {
|
|
|
81
95
|
/** The failure's class, and its system code where it names one, such as `TypeError UND_ERR_SOCKET`. */
|
|
82
96
|
error: string;
|
|
83
97
|
}
|
|
98
|
+
/**
|
|
99
|
+
* The proxy's journal line per refusal, the same line at most once a minute (AGL-304): a client that repeats a refused
|
|
100
|
+
* request in a loop gets its line once, and the next one after the minute says how many like it the minute held.
|
|
101
|
+
*/
|
|
102
|
+
export declare const inferenceRequestFailureWriter: (writeArg?: (textArg: string) => void, nowArg?: () => number) => ((failureArg: IInferenceGatewayRequestFailure) => void);
|
|
84
103
|
/** A named client's use, credential-free. Unnamed clients are leases. */
|
|
85
104
|
export interface IInferenceGatewayClientStatus {
|
|
86
105
|
name: string;
|
|
@@ -134,6 +153,12 @@ export interface IInferenceGatewayRestoredLease {
|
|
|
134
153
|
}
|
|
135
154
|
/** Codex's Responses, Messages answered by a ChatGPT pool, or Claude Code's own Messages sent to a Claude pool. */
|
|
136
155
|
type TProtocol = 'responses' | 'messages' | 'claude';
|
|
156
|
+
/**
|
|
157
|
+
* Whether a Claude pool's request comes from Claude Code (AGL-1146): its client is one AGL runs Claude Code on, or the
|
|
158
|
+
* request names Claude Code itself (`user-agent: claude-cli/…`, as Claude Code and the Agent SDK send it). The header
|
|
159
|
+
* can only narrow the accounts a request may use, never widen them.
|
|
160
|
+
*/
|
|
161
|
+
export declare const inferenceClaudeCodeRequest: (sessionScopeArg: string, headersArg: Headers) => boolean;
|
|
137
162
|
/** The digest under which the gateway knows a credential, as `IInferenceGatewayGrant.digest` reports it. */
|
|
138
163
|
export declare const inferenceGatewayCredentialDigest: (tokenArg: string) => string;
|
|
139
164
|
/** These payloads carry provider/account-owned state and cannot move to another account. */
|
|
@@ -149,8 +174,11 @@ export declare const inferenceRequestHasAccountState: (bodyArg: Record<string, u
|
|
|
149
174
|
* with HTTP 429 whose `error.code` names the cause (`credit_balance_exhausted`, `organization_spend_limit_exceeded`,
|
|
150
175
|
* `project_spend_limit_exceeded`, `organization_usage_limit_exceeded`) and whose `error.type` can be
|
|
151
176
|
* `insufficient_quota`; retrying does not help (https://developers.openai.com/api/docs/guides/error-codes). A Claude
|
|
152
|
-
* account's subscription states only the billing error
|
|
153
|
-
*
|
|
177
|
+
* account's subscription states only the billing error. Undocumented but observed (2026-10-29, AGL-1147): Anthropic
|
|
178
|
+
* refuses every request on an API key whose organization has no credit left with HTTP 400 `invalid_request_error`
|
|
179
|
+
* whose message says the credit balance is too low (`anthropicCreditBalanceTooLow`, the phrase Claude Code itself reads as
|
|
180
|
+
* a billing error); that is a billing problem of the key. Any other 400, a spend limit set in the Claude Console among
|
|
181
|
+
* them, is not read as one.
|
|
154
182
|
*/
|
|
155
183
|
export declare const inferencePaymentCause: (providerArg: TInferenceProvider, credentialArg: TInferenceCredential, statusArg: number, bodyArg: unknown) => TInferencePaymentCause | undefined;
|
|
156
184
|
/**
|