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.
- package/changelog.md +33 -0
- package/dist_serve/bundle.js +2248 -2236
- package/dist_serve/bundle.js.map +2 -2
- package/dist_serve/bundle.js.third-party-notices.json +29 -29
- package/dist_serve/bundle.js.third-party-notices.txt +29 -29
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/aglapi/interfaces.d.ts +5 -0
- package/dist_ts/aglapi/interfaces.js +2 -1
- package/dist_ts/classes.authstore.js +5 -2
- package/dist_ts/classes.claudeharness.js +4 -3
- package/dist_ts/classes.codexclientadapter.d.ts +5 -0
- package/dist_ts/classes.codexclientadapter.js +12 -6
- package/dist_ts/classes.controller.d.ts +32 -6
- package/dist_ts/classes.controller.js +165 -62
- package/dist_ts/classes.inferencegateway.js +14 -2
- package/dist_ts/classes.inferencerouter.d.ts +9 -1
- package/dist_ts/classes.inferencerouter.js +68 -14
- package/dist_ts/classes.mcpclient.d.ts +2 -2
- package/dist_ts/classes.mcpclient.js +14 -9
- package/dist_ts/classes.mcptools.d.ts +1 -1
- package/dist_ts/classes.mcptools.js +2 -1
- package/dist_ts/classes.opencodeclient.js +20 -4
- package/dist_ts/driver/functions.driverinstructions.d.ts +1 -1
- package/dist_ts/driver/functions.driverinstructions.js +2 -1
- package/dist_ts/fleet/classes.claudeworkers.d.ts +8 -5
- package/dist_ts/fleet/classes.claudeworkers.js +13 -8
- package/dist_ts/fleet/classes.deploymodels.d.ts +58 -1
- package/dist_ts/fleet/classes.deploymodels.js +121 -2
- package/dist_ts/fleet/classes.deploymonitor.d.ts +193 -47
- package/dist_ts/fleet/classes.deploymonitor.js +548 -180
- package/dist_ts/fleet/classes.gitfacts.d.ts +4 -1
- package/dist_ts/fleet/classes.gitfacts.js +13 -10
- package/dist_ts/fleet/classes.service.d.ts +2 -0
- package/dist_ts/fleet/classes.service.js +6 -3
- package/dist_ts/fleet/functions.deployprobes.js +21 -2
- package/dist_ts/fleet/functions.deploystatus.d.ts +26 -0
- package/dist_ts/fleet/functions.deploystatus.js +33 -0
- package/dist_ts/fleet/functions.deployvalidation.d.ts +1 -0
- package/dist_ts/fleet/functions.deployvalidation.js +5 -2
- package/dist_ts/functions.claudecoderelease.d.ts +1 -1
- package/dist_ts/functions.claudecoderelease.js +1 -1
- package/dist_ts/functions.deploycli.js +3 -2
- package/dist_ts/functions.deviceapi.d.ts +7 -6
- package/dist_ts/functions.deviceapi.js +13 -5
- package/dist_ts/functions.inferencecli.js +10 -2
- package/dist_ts/functions.inferencelaunch.d.ts +19 -8
- package/dist_ts/functions.inferencelaunch.js +23 -12
- package/dist_ts/functions.mcpdeploytools.js +3 -1
- package/dist_ts/functions.promptreply.d.ts +13 -0
- package/dist_ts/functions.promptreply.js +17 -0
- package/dist_ts/functions.proxyharnessconfig.d.ts +18 -0
- package/dist_ts/functions.proxyharnessconfig.js +30 -1
- package/dist_ts_authswitch/authority-renewal.d.ts +12 -3
- package/dist_ts_authswitch/authority-renewal.js +14 -5
- package/dist_ts_authswitch/classes.claudenative.d.ts +8 -8
- package/dist_ts_authswitch/classes.claudenative.js +13 -13
- package/dist_ts_interfaces/deployments.d.ts +38 -6
- package/dist_ts_interfaces/deployments.js +7 -3
- package/dist_ts_interfaces/devices.d.ts +2 -1
- package/dist_ts_interfaces/devices.js +1 -1
- package/dist_ts_interfaces/inbox.d.ts +10 -1
- package/dist_ts_interfaces/inbox.js +1 -1
- package/dist_ts_interfaces/mcprequests.d.ts +1 -1
- package/dist_ts_interfaces/requests.accounts.d.ts +5 -0
- package/dist_ts_interfaces/requests.accounts.js +3 -1
- package/docs/authswitch.md +5 -4
- package/package.json +2 -2
- package/readme.md +49 -21
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/aglapi/interfaces.ts +1 -0
- package/ts/classes.authstore.ts +4 -1
- package/ts/classes.claudeharness.ts +3 -2
- package/ts/classes.codexclientadapter.ts +11 -5
- package/ts/classes.controller.ts +177 -73
- package/ts/classes.inferencegateway.ts +15 -1
- package/ts/classes.inferencerouter.ts +72 -13
- package/ts/classes.mcpclient.ts +14 -5
- package/ts/classes.mcptools.ts +1 -0
- package/ts/classes.opencodeclient.ts +23 -3
- package/ts/driver/functions.driverinstructions.ts +1 -0
- package/ts/fleet/classes.claudeworkers.ts +12 -7
- package/ts/fleet/classes.deploymodels.ts +113 -1
- package/ts/fleet/classes.deploymonitor.ts +565 -179
- package/ts/fleet/classes.gitfacts.ts +10 -8
- package/ts/fleet/classes.service.ts +7 -1
- package/ts/fleet/functions.deployprobes.ts +16 -1
- package/ts/fleet/functions.deploystatus.ts +56 -0
- package/ts/fleet/functions.deployvalidation.ts +4 -1
- package/ts/functions.claudecoderelease.ts +1 -1
- package/ts/functions.deploycli.ts +2 -1
- package/ts/functions.deviceapi.ts +19 -9
- package/ts/functions.inferencecli.ts +7 -1
- package/ts/functions.inferencelaunch.ts +35 -14
- package/ts/functions.mcpdeploytools.ts +2 -0
- package/ts/functions.promptreply.ts +20 -0
- package/ts/functions.proxyharnessconfig.ts +32 -0
- package/ts_authswitch/authority-renewal.ts +14 -4
- package/ts_authswitch/classes.claudenative.ts +12 -12
- package/ts_authswitch/native-contracts.md +250 -28
- package/ts_interfaces/deployments.ts +39 -6
- package/ts_interfaces/devices.schema.json +1 -1
- package/ts_interfaces/devices.ts +2 -1
- package/ts_interfaces/inbox.ts +8 -1
- package/ts_interfaces/requests.accounts.ts +2 -0
- package/ts_web/00_commitinfo_data.ts +1 -1
- package/ts_web/classes.accountsreadmodel.ts +19 -7
- package/ts_web/elements.accounts.ts +31 -18
- package/ts_web/elements.deployments.ts +20 -4
- package/ts_web/elements.harnesscontrollerapp.ts +43 -13
- package/ts_web/elements.inbox.ts +3 -3
|
@@ -98,4 +98,4 @@ export const controllerInboxItemShown = (itemArg, chipArg, queryArg = '') => {
|
|
|
98
98
|
const text = controllerInboxSearchText(itemArg);
|
|
99
99
|
return words.every((wordArg) => text.includ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2RixNQUFNLEtBQUssR0FBRyxRQUFRLENBQUMsV0FBVyxFQUFFLENBQUMsS0FBSyxDQUFDLE1BQU0sQ0FBQyxDQUFDLE1BQU0sQ0FBQyxPQUFPLENBQUMsQ0FBQztJQUNuRSxJQUFJLEtBQUssQ0FBQyxNQUFNLEtBQUssQ0FBQztRQUFFLE9BQU8sSUFBSSxDQUFDO0lBQ3BDLE1BQU0sSUFBSSxHQUFHLHlCQUF5QixDQUFDLE9BQU8sQ0FBQyxDQUFDO0lBQ2hELE9BQU8sS0FBSyxDQUFDLEtBQUssQ0FBQyxDQUFDLE9BQU8sRUFBRSxFQUFFLENBQUMsSUFBSSxDQUFDLFFBQVEsQ0FBQyxPQUFPLENBQUMsQ0FBQyxDQUFDO0FBQzFELENBQUMsQ0FBQyJ9
|
|
@@ -18,7 +18,7 @@ export declare const controllerMcpTypedRequestMaximumBodyBytes: number;
|
|
|
18
18
|
/** Admits a master configuration document or a harness review with its before and after texts. */
|
|
19
19
|
export declare const controllerMcpTypedResponseMaximumBytes: number;
|
|
20
20
|
export declare const controllerMcpToolMaximumOutputBytes: number;
|
|
21
|
-
export declare const controllerMcpMethods: readonly ["agl.mcp.controller.status", "agl.mcp.projects.list", "agl.mcp.sessions.list", "agl.mcp.session.read", "agl.mcp.session.send", "agl.mcp.session.scratchpad.read", "agl.mcp.session.scratchpad.update", "agl.mcp.session.message", "agl.mcp.proxy.capacity", "agl.mcp.browser.action", "agl.mcp.project.create", "agl.mcp.model.list", "agl.mcp.session.create", "agl.mcp.session.model.update", "agl.mcp.session.rename", "agl.mcp.session.archive", "agl.mcp.session.abort", "agl.mcp.resource.list", "agl.mcp.resource.create", "agl.mcp.resource.rename", "agl.mcp.resource.attach", "agl.mcp.resource.detach", "agl.mcp.resource.start", "agl.mcp.resource.stop", "agl.mcp.resource.retire", "agl.mcp.workspace.reveal", "agl.mcp.context.resolve", "agl.mcp.job.start", "agl.mcp.job.status", "agl.mcp.job.tail", "agl.mcp.job.wait", "agl.mcp.job.stop", "agl.mcp.job.list", "agl.mcp.controller.settings.get", "agl.mcp.controller.settings.update", "agl.mcp.configuration.state", "agl.mcp.configuration.master.get", "agl.mcp.configuration.master.save", "agl.mcp.configuration.project", "agl.mcp.configuration.review", "agl.mcp.configuration.apply", "agl.mcp.configuration.restore.review", "agl.mcp.configuration.restore", "agl.mcp.configuration.operation.retry", "agl.mcp.configuration.operation.recover", "agl.mcp.configuration.operation.abandon", "agl.mcp.ticket.list", "agl.mcp.ticket.board", "agl.mcp.ticket.search", "agl.mcp.ticket.get", "agl.mcp.ticket.comments", "agl.mcp.ticket.create", "agl.mcp.ticket.update", "agl.mcp.ticket.move", "agl.mcp.ticket.comment", "agl.mcp.ticket.link", "agl.mcp.ticket.unlink", "agl.mcp.ticket.ask", "agl.mcp.ticket.answer", "agl.mcp.fleet.land", "agl.mcp.fleet.release", "agl.mcp.fleet.tooling", "agl.mcp.fleet.audit", "agl.mcp.fleet.reconcile", "agl.mcp.fleet.status", ...("agl.mcp.fleet.worker.adopt" | "agl.mcp.fleet.worker.archive" | "agl.mcp.fleet.worker.get" | "agl.mcp.fleet.worker.job-wait" | "agl.mcp.fleet.worker.list" | "agl.mcp.fleet.worker.move" | "agl.mcp.fleet.worker.native-message" | "agl.mcp.fleet.worker.reconfirm" | "agl.mcp.fleet.worker.refresh" | "agl.mcp.fleet.worker.report" | "agl.mcp.fleet.worker.resolve-lost" | "agl.mcp.fleet.worker.start" | "agl.mcp.fleet.worker.status" | "agl.mcp.fleet.worker.steer" | "agl.mcp.fleet.worker.stop" | "agl.mcp.fleet.worker.watch")[], "agl.mcp.sessionfeed.list", "agl.mcp.sessionfeed.acknowledge", "agl.mcp.deploy.status", "agl.mcp.deploy.history", "agl.mcp.deploy.probe", "agl.mcp.deploy.release", "agl.mcp.deploy.ticket", "agl.mcp.worker.enroll"];
|
|
21
|
+
export declare const controllerMcpMethods: readonly ["agl.mcp.controller.status", "agl.mcp.projects.list", "agl.mcp.sessions.list", "agl.mcp.session.read", "agl.mcp.session.send", "agl.mcp.session.scratchpad.read", "agl.mcp.session.scratchpad.update", "agl.mcp.session.message", "agl.mcp.proxy.capacity", "agl.mcp.browser.action", "agl.mcp.project.create", "agl.mcp.model.list", "agl.mcp.session.create", "agl.mcp.session.model.update", "agl.mcp.session.rename", "agl.mcp.session.archive", "agl.mcp.session.abort", "agl.mcp.resource.list", "agl.mcp.resource.create", "agl.mcp.resource.rename", "agl.mcp.resource.attach", "agl.mcp.resource.detach", "agl.mcp.resource.start", "agl.mcp.resource.stop", "agl.mcp.resource.retire", "agl.mcp.workspace.reveal", "agl.mcp.context.resolve", "agl.mcp.job.start", "agl.mcp.job.status", "agl.mcp.job.tail", "agl.mcp.job.wait", "agl.mcp.job.stop", "agl.mcp.job.list", "agl.mcp.controller.settings.get", "agl.mcp.controller.settings.update", "agl.mcp.configuration.state", "agl.mcp.configuration.master.get", "agl.mcp.configuration.master.save", "agl.mcp.configuration.project", "agl.mcp.configuration.review", "agl.mcp.configuration.apply", "agl.mcp.configuration.restore.review", "agl.mcp.configuration.restore", "agl.mcp.configuration.operation.retry", "agl.mcp.configuration.operation.recover", "agl.mcp.configuration.operation.abandon", "agl.mcp.ticket.list", "agl.mcp.ticket.board", "agl.mcp.ticket.search", "agl.mcp.ticket.get", "agl.mcp.ticket.comments", "agl.mcp.ticket.create", "agl.mcp.ticket.update", "agl.mcp.ticket.move", "agl.mcp.ticket.comment", "agl.mcp.ticket.link", "agl.mcp.ticket.unlink", "agl.mcp.ticket.ask", "agl.mcp.ticket.answer", "agl.mcp.fleet.land", "agl.mcp.fleet.release", "agl.mcp.fleet.tooling", "agl.mcp.fleet.audit", "agl.mcp.fleet.reconcile", "agl.mcp.fleet.status", ...("agl.mcp.fleet.worker.adopt" | "agl.mcp.fleet.worker.archive" | "agl.mcp.fleet.worker.get" | "agl.mcp.fleet.worker.job-wait" | "agl.mcp.fleet.worker.list" | "agl.mcp.fleet.worker.move" | "agl.mcp.fleet.worker.native-message" | "agl.mcp.fleet.worker.reconfirm" | "agl.mcp.fleet.worker.refresh" | "agl.mcp.fleet.worker.report" | "agl.mcp.fleet.worker.resolve-lost" | "agl.mcp.fleet.worker.start" | "agl.mcp.fleet.worker.status" | "agl.mcp.fleet.worker.steer" | "agl.mcp.fleet.worker.stop" | "agl.mcp.fleet.worker.watch")[], "agl.mcp.sessionfeed.list", "agl.mcp.sessionfeed.acknowledge", "agl.mcp.deploy.status", "agl.mcp.deploy.history", "agl.mcp.deploy.probe", "agl.mcp.deploy.release", "agl.mcp.deploy.ticket", "agl.mcp.deploy.refresh", "agl.mcp.worker.enroll"];
|
|
22
22
|
export type TControllerMcpMethod = (typeof controllerMcpMethods)[number];
|
|
23
23
|
export type TControllerOperationPrincipal = 'browser' | 'mcp' | 'device';
|
|
24
24
|
/** JSON kind of one top-level field in a private MCP response. */
|
|
@@ -202,6 +202,11 @@ export declare const controllerSpendLimitRange: Readonly<{
|
|
|
202
202
|
}>;
|
|
203
203
|
/** The renewal anchor rule of the accounts service (`IReq_ControllerAccountsRenewal`); a past date and time is valid. */
|
|
204
204
|
export declare const isControllerRenewsAt: typeof plugins.authswitchRenewal.isAuthSwitchRenewsAt;
|
|
205
|
+
/** The instants a renewal anchor may name, in epoch milliseconds, both included: the rule's own range. */
|
|
206
|
+
export declare const controllerRenewsAtRange: Readonly<{
|
|
207
|
+
min: number;
|
|
208
|
+
max: number;
|
|
209
|
+
}>;
|
|
205
210
|
/** The longest API key the accounts service holds, in characters; a longer value is refused before it is sent. */
|
|
206
211
|
export declare const controllerApiKeyMaxLength = 512;
|
|
207
212
|
/**
|
|
@@ -26,8 +26,10 @@ export const isControllerSpendLimitMicroUsd = plugins.authswitchSpend.isAuthSwit
|
|
|
26
26
|
export const controllerSpendLimitRange = plugins.authswitchSpend.authSwitchSpendLimitRange;
|
|
27
27
|
/** The renewal anchor rule of the accounts service (`IReq_ControllerAccountsRenewal`); a past date and time is valid. */
|
|
28
28
|
export const isControllerRenewsAt = plugins.authswitchRenewal.isAuthSwitchRenewsAt;
|
|
29
|
+
/** The instants a renewal anchor may name, in epoch milliseconds, both included: the rule's own range. */
|
|
30
|
+
export const controllerRenewsAtRange = plugins.authswitchRenewal.authSwitchRenewsAtRange;
|
|
29
31
|
/** The longest API key the accounts service holds, in characters; a longer value is refused before it is sent. */
|
|
30
32
|
export const controllerApiKeyMaxLength = 512;
|
|
31
33
|
/** Duration validation shared with the authority; no implicit duration is supplied. */
|
|
32
34
|
export const isControllerReserveLiftHours = plugins.authswitchAuthority.isAuthSwitchReserveLiftHours;
|
|
33
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
35
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVxdWVzdHMuYWNjb3VudHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90c19pbnRlcmZhY2VzL3JlcXVlc3RzLmFjY291bnRzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxPQUFPLE1BQU0sY0FBYyxDQUFDO0FBOEd4QyxvR0FBb0c7QUFDcEcsTUFBTSxDQUFDLE1BQU0sZ0NBQWdDLEdBQUcsQ0FBQyxTQUFrQyxFQUFXLEVBQUUsQ0FBQyxDQUMvRixTQUFTLENBQUMsS0FBSyxLQUFLLFNBQVMsSUFBSSxTQUFTLENBQUMsS0FBSyxLQUFLLFlBQVksQ0FDbEUsQ0FBQztBQThCRjs7O0dBR0c7QUFDSCxNQUFNLENBQUMsTUFBTSx3QkFBd0IsR0FBRyxPQUFPLENBQUMsbUJBQW1CLENBQUMsd0JBQXdCLENBQUM7QUFDN0YsdUVBQXVFO0FBQ3ZFLE1BQU0sQ0FBQyxNQUFNLCtCQUErQixHQUFHLE9BQU8sQ0FBQyxtQkFBbUIsQ0FBQywrQkFBK0IsQ0FBQztBQWlCM0c7Ozs7R0FJRztBQUNILE1BQU0sQ0FBQyxNQUFNLGtDQUFrQyxHQUFHLE9BQU8sQ0FBQyxtQkFBbUIsQ0FBQywyQkFBMkIsQ0FBQztBQUMxRyxtRUFBbUU7QUFDbkUsTUFBTSxDQUFDLE1BQU0sOEJBQThCLEdBQUcsT0FBTyxDQUFDLG1CQUFtQixDQUFDLHVCQUF1QixDQUFDO0FBcUJsRzs7OztHQUlHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sOEJBQThCLEdBQUcsT0FBTyxDQUFDLGVBQWUsQ0FBQyw4QkFBOEIsQ0FBQztBQUNyRyxvREFBb0Q7QUFDcEQsTUFBTSxDQUFDLE1BQU0seUJBQXlCLEdBQUcsT0FBTyxDQUFDLGVBQWUsQ0FBQyx5QkFBeUIsQ0FBQztBQUUzRix5SEFBeUg7QUFDekgsTUFBTSxDQUFDLE1BQU0sb0JBQW9CLEdBQUcsT0FBTyxDQUFDLGlCQUFpQixDQUFDLG9CQUFvQixDQUFDO0FBQ25GLDBHQUEwRztBQUMxRyxNQUFNLENBQUMsTUFBTSx1QkFBdUIsR0FBRyxPQUFPLENBQUMsaUJBQWlCLENBQUMsdUJBQXVCLENBQUM7QUFFekYsa0hBQWtIO0FBQ2xILE1BQU0sQ0FBQyxNQUFNLHlCQUF5QixHQUFHLEdBQUcsQ0FBQztBQWtFN0MsdUZBQXVGO0FBQ3ZGLE1BQU0sQ0FBQyxNQUFNLDRCQUE0QixHQUFHLE9BQU8sQ0FBQyxtQkFBbUIsQ0FBQyw0QkFBNEIsQ0FBQyJ9
|
package/docs/authswitch.md
CHANGED
|
@@ -449,8 +449,9 @@ maximum usage is: an older service cannot read the accounts once this release's
|
|
|
449
449
|
`account set --renews-at <date-time>` sets the anchor of a Claude sign-in's monthly renewal, at the revision `account
|
|
450
450
|
list` reads just before (`authswitch.authority.renewal { accountId, expectedRevision, renewsAt }`,
|
|
451
451
|
`AuthSwitchClient.setAccountRenewal`); `--clear-renewal` removes it. The anchor follows the lapse date's rule
|
|
452
|
-
(`isAuthSwitchRenewsAt`, `ts_authswitch/authority-renewal.ts
|
|
453
|
-
|
|
452
|
+
(`isAuthSwitchRenewsAt`, `ts_authswitch/authority-renewal.ts`; its range, which a date picker is bounded with, is
|
|
453
|
+
`authSwitchRenewsAtRange`) and is stored in UTC; a past anchor is valid. Every renewal is a calendar month from the
|
|
454
|
+
anchor, always computed from the anchor itself: its UTC day clamped to the month's
|
|
454
455
|
last day, at its UTC time (`authSwitchNextRenewal`), and an anchor still ahead is itself the next one. Only an account on
|
|
455
456
|
a Claude sign-in has one; any other is refused as `invalid_input`, an unreadable value too, and a stale revision as
|
|
456
457
|
`account_changed`. The renewal is set by the owner only: nothing is derived from the profile's
|
|
@@ -650,7 +651,7 @@ holds no login, and reading it creates nothing. `authswitch.authority.usage` sti
|
|
|
650
651
|
adopted home from the home itself, and only while Claude Code demonstrably selects that login there: once the home's
|
|
651
652
|
settings route Claude Code through the proxy, that read refuses until the login is released. Every Claude Code session
|
|
652
653
|
on the home must run a release whose selector was read (2.1.273, 2.1.282, 2.1.288, the release AGL's own Claude chats
|
|
653
|
-
run through the Agent SDK, and 2.1.
|
|
654
|
+
run through the Agent SDK, 2.1.306 and 2.1.322) or any release from 2.1.282 on, which the read takes as verified, a remote
|
|
654
655
|
agent's hashed build ordered by its release; an unlisted release below 2.1.282 (2.1.274 to 2.1.281) refuses the read.
|
|
655
656
|
|
|
656
657
|
### Releasing Claude Code's own login
|
|
@@ -673,7 +674,7 @@ configured, and since the home's routing settings do not reach it, it may still
|
|
|
673
674
|
process configured on the home with its store elsewhere runs on another login and refuses the release, and so does one
|
|
674
675
|
whose store cannot be resolved. Every process on the home must run a release whose credential custody was read from its
|
|
675
676
|
bundle (currently 2.1.280, 2.1.281, 2.1.282, 2.1.288, the release the Agent SDK of AGL's own Claude chats
|
|
676
|
-
bundles, and 2.1.
|
|
677
|
+
bundles, 2.1.306 and 2.1.322): such a process reads its store again before every refresh decision, also once the credential file is gone,
|
|
677
678
|
and writes a refresh only over the token it sent, so once the home holds no login it never renews one again. A process
|
|
678
679
|
on another release, or one that cannot be inspected, refuses the release with `claude_native_sessions`, which names
|
|
679
680
|
each such process by pid, start and the build its executable names. The whole build name must be listed: a newer
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agl",
|
|
3
|
-
"version": "43.
|
|
3
|
+
"version": "43.5.0",
|
|
4
4
|
"controllerUpgradeManagementVersion": 2,
|
|
5
5
|
"controllerManagementProtocolVersion": 1,
|
|
6
6
|
"controllerGatewaySourcesVersion": 1,
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"@api.global/typedsocket": "^10.0.1",
|
|
31
31
|
"@apiclient.xyz/docker": "^12.0.0",
|
|
32
32
|
"@aws-sdk/client-s3": "^3.1136.0",
|
|
33
|
-
"@design.estate/dees-catalog": "24.6.
|
|
33
|
+
"@design.estate/dees-catalog": "24.6.2",
|
|
34
34
|
"@design.estate/dees-comms": "^2.1.0",
|
|
35
35
|
"@design.estate/dees-element": "4.0.2",
|
|
36
36
|
"@jitl/quickjs-ng-wasmfile-release-sync": "0.32.0",
|
package/readme.md
CHANGED
|
@@ -187,7 +187,9 @@ A Claude sign-in's monthly renewal is the owner's to set as well: `authswitch ac
|
|
|
187
187
|
<date-time>` takes any date and time the subscription renewed or renews -- a past one too, since every renewal is a
|
|
188
188
|
calendar month after it, on its day clamped to the month's last day (January 31st renews on February 28th, or 29th, and
|
|
189
189
|
March 31st) at its time in UTC -- and `--clear-renewal` removes it; the account's Details in Settings → Accounts show
|
|
190
|
-
it as **Renews** and set or clear it (`controller.accounts.renewal`, audited `accounts.renewal`)
|
|
190
|
+
it as **Renews** and set or clear it (`controller.accounts.renewal`, audited `accounts.renewal`): the date and time are
|
|
191
|
+
picked in a calendar, or typed into its field, in the browser's time zone, and sent as their UTC instant only with
|
|
192
|
+
**Save**; **No renewal** removes it. AGL derives no renewal
|
|
191
193
|
from what Claude states. The proxy then spends first the usage a window would still hold at the next renewal (see
|
|
192
194
|
placement below); a renewal changes nothing else, and an account with a lapse date ignores it. Whether Claude resets
|
|
193
195
|
usage windows at a renewal is not known. `authswitch list`, `limits` and `account list` show the next renewal
|
|
@@ -210,7 +212,7 @@ Codex renews the login of the account it runs on, and a login has one renewer, s
|
|
|
210
212
|
|
|
211
213
|
**Add Claude account** starts a Claude sign-in in the accounts service: it makes a private Claude Code home for it and names the command that signs Claude Code in there. The sign-in waits above the list with that command, **Open in a terminal**, which closes Settings and runs the command in a new terminal of the project in view, and **Cancel sign-in**. Once Claude Code signed in, the service takes the login over -- it is the login's only renewer from then on -- and the new account appears in the list; the screen says how the sign-in ended. The service takes the login only while no Claude Code process may still write to the sign-in home: one running on it, or one it could not inspect that started after the sign-in did (a process that started earlier cannot name the home; one whose working directory was deleted is still matched by the home and credential store it names by absolute path). Until then the sign-in says that Claude Code signed in and names those processes by pid; one still held after fifteen minutes ends without adding the login and names them again. **Add Codex's current sign-in** adds the account Codex on this host is already signed in to, once (the `codex_native` source of the service's import inventory): the service manages Codex's sign-in from then on and can switch it, and Codex keeps renewing its own login. The service restarts Codex's app-server to prove the sign-in. It is offered until the service manages Codex's sign-in on this host.
|
|
212
214
|
|
|
213
|
-
**Claude Code on this host**, below **New Claude terminals**, says what Claude Code's own home on this host holds (`controller.accounts.claude.host.get`, the service's `claude.host` read) and offers the one action it calls for, each confirmed with what it does first. Claude Code is not switched between accounts: once AGL Configuration routes it through the AGL proxy, its own sign-in is handed to AGL with **Hand to AGL** (`controller.accounts.claude.release { operationId, accountId, loginId, endNativeSessions }`, naming the account and sign-in the read named) -- the sign-in an earlier AGL adopted moves into the service's custody, and a sign-in of an account the service already renews is signed out of Claude Code's files, which keep everything else. Before Claude Code is routed the hand-over waits and **Open Inference settings** opens AGL Configuration on its Inference section. A Claude Code process that started before the routing may still use the sign-in: the screen names it by pid and start, and **Hand to AGL and end their sign-in** hands it over anyway, after saying those processes fail at their next request until restarted. A Claude Code process on a release whose credential handling AGL has not verified (2.1.280 to 2.1.282, 2.1.288, the one AGL's own Claude chats run through the Agent SDK, and 2.1.
|
|
215
|
+
**Claude Code on this host**, below **New Claude terminals**, says what Claude Code's own home on this host holds (`controller.accounts.claude.host.get`, the service's `claude.host` read) and offers the one action it calls for, each confirmed with what it does first. Claude Code is not switched between accounts: once AGL Configuration routes it through the AGL proxy, its own sign-in is handed to AGL with **Hand to AGL** (`controller.accounts.claude.release { operationId, accountId, loginId, endNativeSessions }`, naming the account and sign-in the read named) -- the sign-in an earlier AGL adopted moves into the service's custody, and a sign-in of an account the service already renews is signed out of Claude Code's files, which keep everything else. Before Claude Code is routed the hand-over waits and **Open Inference settings** opens AGL Configuration on its Inference section. A Claude Code process that started before the routing may still use the sign-in: the screen names it by pid and start, and **Hand to AGL and end their sign-in** hands it over anyway, after saying those processes fail at their next request until restarted. A Claude Code process on a release whose credential handling AGL has not verified (2.1.280 to 2.1.282, 2.1.288, the one AGL's own Claude chats run through the Agent SDK, 2.1.306 and 2.1.322 are; a newer release, a remote agent's build such as `2.1.295-8b2928c330c4` or another Agent SDK's build is not yet) blocks the hand-over, also when its sign-in would be ended: the screen names each such process by pid, start and release, to be closed or restarted on a verified release first. A process counts as running on the home when its credential store is there, also when `CLAUDE_SECURESTORAGE_CONFIG_DIR` puts it there from another configuration directory; one configured on the home whose store is elsewhere blocks the hand-over too. A sign-in an earlier AGL adopted that can no longer be handed over -- the service holds it after a hand-over or switch it could not settle, or Claude Code's files now hold another account, none, or no readable one -- is **Repair**ed instead (`controller.accounts.claude.repair { operationId }`): the service forgets it, leaves Claude Code's files as they are, and the adopted account needs a new sign-in unless a renewal the held hand-over kept is confirmed by the provider. The browser names each hand-over and repair by an operation id of its own, so one whose answer is lost is read again by it: a hand-over with `controller.accounts.claude.release.get`, a repair by sending it again with the same id, which the service answers with the repair it committed; both are recorded in AGL's audit trail (`accounts.claude.release`, `accounts.claude.repair`). While Claude Code renews an adopted sign-in in its routed home, its usage is not read, and its row says so.
|
|
214
216
|
|
|
215
217
|
**Add account** also offers **OpenAI API key** and **Anthropic API key**, which add a key as an account of its own; see [API keys and their spend limit](#api-keys-and-their-spend-limit).
|
|
216
218
|
|
|
@@ -502,9 +504,14 @@ continues from them.
|
|
|
502
504
|
|
|
503
505
|
An inference request that answers with a rate-limit error (429) makes the service read that account's usage at once
|
|
504
506
|
-- one read however many requests hit the limit, as soon as the usage service allows and no sooner than five minutes
|
|
505
|
-
after the account's last read that landed, and the 10-minute clock starts again after it. The account cools down meanwhile so sessions move; once the fresh reading is held, a cool-down
|
|
506
|
-
|
|
507
|
-
that window resets and one with room takes work again
|
|
507
|
+
after the account's last read that landed, and the 10-minute clock starts again after it. The account cools down meanwhile so sessions move; once the fresh reading is held, a cool-down whose
|
|
508
|
+
`Retry-After` named a rate limit's short wait (at most five minutes) runs its course and any other ends, so an account
|
|
509
|
+
whose window is used up rests until that window resets and one with room takes work again -- also one whose limit was
|
|
510
|
+
reset or raised after a 429 that named a wait of hours or days. On a Claude sign-in such a long wait rests only the
|
|
511
|
+
model the request asked for, as it may be one model family's weekly limit: the account's other models keep routing,
|
|
512
|
+
`agl proxy status` names the resting model with the account, and the rest ends once a reading made after the 429 shows
|
|
513
|
+
no model-specific window used up. Each provider 429 is one line on the proxy's standard error, with the account, the
|
|
514
|
+
model, the `Retry-After` and the rate-limit headers the provider sent.
|
|
508
515
|
|
|
509
516
|
Each client is served from one pool. The `claude` client starts on Claude accounts, every other client on
|
|
510
517
|
ChatGPT accounts; `agl proxy credential <client> --provider openai|anthropic` moves a client to the other
|
|
@@ -572,8 +579,9 @@ account's access for a request, makes the account unavailable even with a list h
|
|
|
572
579
|
next account. A failed model-list read or sign-in is not repeated for a minute; a failed access, usually a brief outage
|
|
573
580
|
of the account service, is tried again after 5 seconds, together with a fresh model-list read. A model-list 429 never
|
|
574
581
|
cools the account down, and each change of an account's reason is one line on the proxy's standard error. Started streams are never replayed. A rate-limited
|
|
575
|
-
account cools down for the provider's `Retry-After` interval, or 60 seconds when none is supplied
|
|
576
|
-
usage reading made after the 429
|
|
582
|
+
account cools down for the provider's `Retry-After` interval (at most a day), or 60 seconds when none is supplied; a
|
|
583
|
+
usage reading made after the 429 ends every cool-down but a `Retry-After` of up to five minutes, and the account's usage
|
|
584
|
+
must also permit use. A ChatGPT account is at its limit when its usage reading says so or a window
|
|
577
585
|
reaches 100%. A Claude account is at its limit when one of its account-wide windows (the five-hour session, the
|
|
578
586
|
week) reaches 100%, the provider's retry time lies ahead, or its latest answer refused it until a reset; its per-model weekly windows are not read, because
|
|
579
587
|
the reading does not say which models they cover. An account with a maximum usage is reserved once any of its
|
|
@@ -1563,7 +1571,7 @@ ready-to-release or `Handoff` line, a line addressed to the driver: `driver:`, `
|
|
|
1563
1571
|
`spec question:`); a turn that continues past its report keeps that report.
|
|
1564
1572
|
Claude API error records are never reports: login, organization and `apiKeyHelper` failures
|
|
1565
1573
|
raise `worker.credential.failed` when watch reads the record. Reports and permission checks
|
|
1566
|
-
use an isolated transcript adapter verified on Claude Code 2.1.306 and
|
|
1574
|
+
use an isolated transcript adapter verified on Claude Code 2.1.322, 2.1.306 and 2.1.282. The fleet runs
|
|
1567
1575
|
2.1.282 and every newer release: `claude --version` must print `X.Y.Z (Claude Code)` at 2.1.282 or above,
|
|
1568
1576
|
and an older release, other output or a failed run refuses, naming what it printed. On a newer
|
|
1569
1577
|
release the adapter's own checks are where a change in Claude Code's output shows: an inventory,
|
|
@@ -1571,11 +1579,11 @@ note or transcript record it cannot read fails visibly, never as a resend. Every
|
|
|
1571
1579
|
the current executable identity, and a repointed launcher or changed binary requires version
|
|
1572
1580
|
verification again. `plan` mode cannot currently prove peer-relay compatibility and refuses steering.
|
|
1573
1581
|
|
|
1574
|
-
The first time AGL meets a Claude Code release newer than 2.1.
|
|
1582
|
+
The first time AGL meets a Claude Code release newer than 2.1.322 (the fleet's version check or
|
|
1575
1583
|
the configuration's), it records the release in its database and publishes one
|
|
1576
1584
|
`harness.release.discovered` fleet event to every owner, with the release as `version`: the
|
|
1577
1585
|
built-in Driver receives it, and `agl fleet watch` shows it
|
|
1578
|
-
(`10:41:07Z fleet: harness.release.discovered 2.1.
|
|
1586
|
+
(`10:41:07Z fleet: harness.release.discovered 2.1.323 Claude Code 2.1.323 is newer than 2.1.322, …`).
|
|
1579
1587
|
Its text names the release, whether handing Claude Code's own sign-in to the accounts service
|
|
1580
1588
|
works on it (only once its credential handling was read, as 2.1.306's was) or stays refused, and the
|
|
1581
1589
|
"Claude Code compatibility check" list in
|
|
@@ -2038,7 +2046,7 @@ and clears a deadline already set. Known limits:
|
|
|
2038
2046
|
- Each warm-up turn makes the controller read the driver session once more, although nothing
|
|
2039
2047
|
it shows changed.
|
|
2040
2048
|
|
|
2041
|
-
The driver's tools are the fleet, worker and
|
|
2049
|
+
The driver's tools are the fleet, worker, ticket and deploy tools of the MCP server, under the same
|
|
2042
2050
|
names and schemas, plus `ticket_question_answer`, the direct report tools, `driver_notes_read`
|
|
2043
2051
|
and `driver_notes_update`, the shell and file tools
|
|
2044
2052
|
every Flex session has, and the [AGL API](#agl-api-for-flex-sessions) without its ticket methods. The controller runs each of these tool calls as the driver: actor
|
|
@@ -2684,8 +2692,21 @@ first release tag holding that commit by the deploy monitor's release reconciler
|
|
|
2684
2692
|
release is known to have published, those a fleet release published and saw at every registry;
|
|
2685
2693
|
for a tag cut elsewhere it names the repository and version alone. The first such tag moves the
|
|
2686
2694
|
ticket to Released; the release of each other repository is linked as its tag appears, where the
|
|
2687
|
-
ticket stands. A fleet release asks for a pass when it is done.
|
|
2688
|
-
it
|
|
2695
|
+
ticket stands. A fleet release or landing asks for a pass when it is done. The controller computes
|
|
2696
|
+
the deploy status after every pass and once board changes settle, keeps it in its database and
|
|
2697
|
+
answers `deploy status` and `release status` from it at once, also right after a restart; when its
|
|
2698
|
+
newest computation failed, the status carries that `failure` (when, why and the failure journal
|
|
2699
|
+
reference) beside the last one computed. A release status of one repository, the history and where
|
|
2700
|
+
a ticket runs are read when asked.
|
|
2701
|
+
|
|
2702
|
+
A full check now is `refresh` (`controller.deploy.refresh`, `agl.mcp.deploy.refresh` with the
|
|
2703
|
+
local owner capability, the tool `deploy_refresh`): it asks for a pass, which follows the pass in
|
|
2704
|
+
progress if one runs and which every refresh until it starts shares, waits for it up to 60 s and
|
|
2705
|
+
answers `{ state: 'refreshed' | 'refreshing', checkedAt }` (`refreshing` while the pass runs on).
|
|
2706
|
+
Its end tells the views, also when nothing changed, so they show when the targets were checked; a
|
|
2707
|
+
failed pass is refused as `deploy_unavailable` with the failure's reference. Opening the
|
|
2708
|
+
Deployments view shows the stored status at once and asks for a refresh in the background, and
|
|
2709
|
+
**Probe all** is one refresh. `agl deploy` has no `refresh` verb: its verbs are written by hand.
|
|
2689
2710
|
|
|
2690
2711
|
```sh
|
|
2691
2712
|
agl deploy status [TARGET] [--json] # running version and commit, since when, probe, newest tag, what does not run yet, open bugs, deploys, plans, windows
|
|
@@ -2694,8 +2715,9 @@ agl deploy probe TARGET [--json] # ask a target now; deploy scripts call
|
|
|
2694
2715
|
agl release status [REPO] [--json] # newest tag, release plans, and the landed tickets the next release would ship
|
|
2695
2716
|
```
|
|
2696
2717
|
|
|
2697
|
-
The MCP and driver tools are `deploy_status`, `deploy_history`, `deploy_probe`
|
|
2698
|
-
`release_status
|
|
2718
|
+
The MCP and driver tools are `deploy_status`, `deploy_history`, `deploy_probe`, `deploy_refresh`
|
|
2719
|
+
and `release_status`; `deploy_refresh` changes nothing but asks for work, so it is not read-only
|
|
2720
|
+
(Flex asks the `agl.driver` permission for it once per session). "Open bugs on the running version" are tickets not closed that were found in
|
|
2699
2721
|
the version a target runs or an earlier one (an `affects` link whose tag the running tag holds;
|
|
2700
2722
|
by version order where either has no tag on the remote), and whose fix does not run there: no
|
|
2701
2723
|
fix landed, or the running tag does not hold the commit it landed as. A released ticket is not running yet while
|
|
@@ -2743,9 +2765,10 @@ The controller keeps one list of what waits for the owner, and the browser and p
|
|
|
2743
2765
|
list: an answer in any of them removes the item everywhere, because every item is read from the component that
|
|
2744
2766
|
owns it and nothing about the Inbox is stored. It holds, in this order, the oldest first within each kind:
|
|
2745
2767
|
|
|
2746
|
-
- session prompts: a permission, a question or an MCP form a harness holds for a conversation, for a
|
|
2747
|
-
|
|
2748
|
-
permission the owner's auto-accept answers waits
|
|
2768
|
+
- session prompts: a permission, a question or an MCP form a harness holds for a conversation, for a native session
|
|
2769
|
+
AGL runs a turn in, or for the driver's own session, and a permission or a question for a direct child (an
|
|
2770
|
+
OpenCode subagent) of a conversation, which holds no MCP forms; a permission the owner's auto-accept answers waits
|
|
2771
|
+
for nobody and is not listed;
|
|
2749
2772
|
- a wait a harness shows in its own client (Codex's approval, Claude Code's `requires_action`), listed as
|
|
2750
2773
|
information only: it names the session and the host, and is answered in that client;
|
|
2751
2774
|
- the driver's `needs input:` turn: the line and the transcript entry it ends, answered in the Driver view;
|
|
@@ -2783,8 +2806,11 @@ from another browser or the phone takes the item out at once (`inbox.changed`).
|
|
|
2783
2806
|
shows its `needs input:` line with **Open Driver**; a wait a harness shows in its own client says
|
|
2784
2807
|
where it waits and that it is answered there; an item listed without its payload is answered in
|
|
2785
2808
|
its session view or ticket. A question takes one answer: when another client answered first, the
|
|
2786
|
-
card keeps what the owner chose and shows the answer that stands until the owner moves on.
|
|
2787
|
-
|
|
2809
|
+
card keeps what the owner chose and shows the answer that stands until the owner moves on. A
|
|
2810
|
+
permission or question that was answered elsewhere or went with its turn before the answer arrived
|
|
2811
|
+
is refused as answered or changed meanwhile (`concurrent_change`, nothing was sent): the card says
|
|
2812
|
+
so and the Inbox lists again; in a conversation the composer says so and the conversation is read
|
|
2813
|
+
again. An answer whose outcome is unknown (a lost connection, a time-out, the controller's `outcome_unknown`)
|
|
2788
2814
|
keeps the card locked with the owner's draft, says so, and is never sent again on its own;
|
|
2789
2815
|
**Check again** lists the Inbox again (and reads a ticket's question), and an item that still waits
|
|
2790
2816
|
at its owner says so and takes an answer again; a check that cannot be made (the connection is down
|
|
@@ -2804,6 +2830,8 @@ AGL keeps one **master configuration** and projects it onto Claude Code, Codex,
|
|
|
2804
2830
|
|
|
2805
2831
|
The command policy is a list of `allow`, `ask` or `deny` rules on command globs; the last matching rule decides, and a command no rule matches is asked. Globs read as OpenCode reads them: `\` counts as `/` in the command and the glob, `*` matches any run of characters, `?` one character, and a trailing ` *` makes the arguments optional, so `git push *` matches `git push` as well as `git push origin main` but not `git pushx`. AGL's Claude Code hook uses the same matcher. OpenCode receives it as its Bash permission table, as a whole and in order behind a leading `"*": "ask"`, so OpenCode asks for an unmatched command too instead of falling back to its own default. Claude Code enforces every deny through AGL's `PreToolUse` hook (`agl-policy-hook.mjs` with `agl-policy.json`), which replaces another Bash policy hook for the same matcher and keeps unrelated hooks. The hook denies a payload it cannot read, unparsable JSON, a payload without a tool name, a Bash call without a string `command` or a job without a string `argv`, so a renamed payload field blocks the call instead of skipping the rules. The hook runs on the AGL controller's own `node`, named by absolute path, so it needs nothing on the harness's `PATH`; when it cannot run, because that `node` is gone or the hook crashed, the call is blocked with a reason. A review reports a hook that still runs `node` from `PATH` or another or a missing interpreter, and applying it moves the hook to the controller's `node`. Codex receives prefix rules in `rules/agl.rules`: `ask` and `deny` only narrow, and an `allow` is written only when every command its prefix admits is one the master allows — a rule without an exact Codex form is reported instead. A subagent's own command policy is enforced by OpenCode; Claude Code and Codex run subagents under the master policy. Flex has no command rules and keeps asking before each command it has no permission for.
|
|
2806
2832
|
|
|
2833
|
+
Claude Code runs no hook of the user's settings, AGL's policy hook included, when it inherits `CLAUDE_CODE_SIMPLE`, `CLAUDE_CODE_SAFE_MODE` or `CLAUDE_CODE_RESTRICTED`, or review mode's `CLAUDE_CODE_REMOTE_SESSION_ORIGIN=review` together with its three other variables; `CLAUDE_CODE_IGNORE_PERSISTED_TRUST`, as read from Claude Code 2.1.322's bundle and not yet shown by a run, makes it count no workspace trust and skip every hook of a background session it then runs untrusted. AGL drops these five names, whatever their value, from the environment of the Claude Code sessions it starts: fleet workers, its own Claude chats, `agl proxy run claude` and a confined Claude Code run's `docker run`. `agl proxy run` and `agl proxy confined run` print one line on stderr naming what they dropped, and the controller logs once at start which of them its own environment holds. A flag typed for the run (`--bare`, `--safe-mode`) still applies, and terminals pass only their allowlist and `AGL_FORWARD_ENV`. The hook does not run either in a checkout whose `.claude/settings.json` sets `disableAllHooks: true`, and the drop may not reach a Claude Code daemon that was started from another environment; AGL does not yet check per session that its hook is live.
|
|
2834
|
+
|
|
2807
2835
|
Flex reports a projection active only after a managed run of an exact captured session generation reaches configuration-backed model preparation after the apply; older sessions keep the projection they captured. For a bound Flex session, the effective system text follows the model base, the Flex instructions of its projection, the current project-root `AGENTS.md` (32 KiB, read anew on each run), any caller addition or the selected subagent's body, and the skill catalogue. The `skill_read` tool pages a skill's files of the captured projection in UTF-8-safe ranges of at most 16 KiB.
|
|
2808
2836
|
|
|
2809
2837
|
A Flex session reaches the tools of its projection's MCP servers through a tool catalog instead of one tool definition each: `search_tools` finds them, `describe_tools` reads their declarations, and `execute` or a `run_code` program calls them by their `<server>__<tool>` names, which agents' `allowedTools` restrict. Every call asks for `mcp.call` permission. A call is proposed and runs in order, a `run_code` program's only once the program finished, so a program that fails calls nothing. The exception is a tool that a server whose master entry sets `trustReadOnlyHints: true` annotates `readOnlyHint: true`: its calls run at once and concurrently with the other reads of a step, and a program reads their results while it runs. With `mcp.call` on `ask`, the permission requests of such concurrent reads are pending together.
|
|
@@ -3827,7 +3855,7 @@ The device API is its own contract, separate from the browser's: `ts_interfaces/
|
|
|
3827
3855
|
- `device.directreports.list` lists the active direct reports as the Driver view does, each by its name, with its session as the feed names it, status, projects, ticket, newest `result:` line, open questions and the fleet workers that report to it (name, harness, status, ticket; no directories or profiles), and whether it takes a message. `device.directreport.message` sends one the owner's message as the Driver view does: a fleet worker report is steered through its ticket and answers `fleet` once the steer succeeded (a steer the fleet refused before its dispatch is refused with `direct_report_failed` and the fleet's own text, such as "Worker is archived.", or "The controller operation failed." with the failure journal's reference where a harness's own text failed it; a steer that failed after its dispatch, or whose job does not prove it sent nothing (`errorOutcome` other than `refused`), may have delivered the message and is `outcome_unknown`, "The request may have taken effect. Read again to learn whether it did before sending it again." with the failure journal's reference, which a client never sends again on its own); a Codex thread takes it as the owner's agent message, `steer` into the turn AGL runs or `next-turn`. A turn another Codex client runs is refused with `direct_report_busy` (nothing was sent), a Claude Code session the fleet does not run with `direct_report_failed`, and messages to a report faster than its agent message rate with `rate_limited`. Messages are audited as `session.message` from `Owner` for the device.
|
|
3828
3856
|
- The Host view is read-only (AGL-824): a device changes nothing on the host (no deploy or deploy probe, account, setting, upgrade or pairing). `device.host.get` answers what runs (`agl`: the AGL release, its start, its public origin, and whether a device reaches it through the gateway AGL keeps its route on, with where that route's sync stands, or through the owner's own reverse proxy; never the gateway's address, the client or the route's target), the device itself as the controller keeps it (`device`: name, model, when it paired and when it last connected; a device neither renames nor unpairs itself), the deploy targets (`deploys`: what each runs and since when, whether its probe answers, its newest release, the released versions it does not run (`undeployed`, newest first), and its planned deploys (`plans`: the ticket, the version, the owner's go and, for one queued into a maintenance window, the window's times); never a probe's address, the owner's notes on how it deploys and what a deploy interrupts, a failed probe's text, a plan's question or who deploys it, and the read runs no probe), the inference proxy's account pools (`pools`: each pool's verdict and room, and its accounts by plan and then the most used first, each only as its plan, state and the usage window it is bound by: no account id, and no order that stands in for one) and the API keys (`apiKeys`: per provider, how many keys are under their monthly spend limit, held at it, without one, or not read, judged by the rule AGL's inference proxy places by; no label, email, id or dollar amount). `deploys`, `pools` and `apiKeys` each answer `ready` or `unavailable` on their own, with the reason (`not_running`, `outdated`, or `failed` with the failure journal's `reference`), and the request still answers the others. `host.changed` (no payload) says when to read it again: the deploy targets, their planned deploys (tickets) or the accounts changed. Usage moves without an event, so a client reads it again when the Host view is opened or refreshed.
|
|
3829
3857
|
- The shared board on a device is the browser's board (AGL-1637). `device.board.list` answers one column at a time, as the browser shows its cards (the tasks; an epic and a subtask open with `device.ticket.get`), in the column's order, `limit` (1 to 100, default 50) from `offset`, filtered as the browser filters: `text` (1 to 200 characters, in the key, title, description and source words), `project`, `epic` (the epic's own tasks), `assignee` (`{ kind: 'owner' }`, `{ kind: 'unassigned' }` or a session as the feed names it) and an AutoLabel (`openQuestion`, `planned`, `undeployed`). Every column's count under the same filters comes from the same read as the page, with `total`, the projects the board's tickets name, the epics a filter may choose and the board's `revision`: when a later page answers another revision, or `tickets.changed` arrives, a client reads the board again from offset 0. `device.ticket.get` answers a ticket with its description, source words, links and parent, one page of its discussion (comments and questions together in the order they were written, newest page first, at most `limit` of 1 to 50 and 256 KiB, `before` for the next older page), where it runs (`placement`, from the deploy monitor, `unavailable` on its own as a section of `device.host.get` is) and what it plans (`plans`: the release plan, the maintenance window and the deploy plan, with where the window stands and the owner's go while the monitor answers); no history of its other changes, no source attachments, no plan's question and nothing that names who deploys it. People appear by name: the owner as `kind: 'owner'`, never the owner's account, a person's id or a session the feed does not list (the driver's own session included). `device.ticket.comment` (Markdown, at most 64 KiB as the store keeps it), `device.ticket.ask` (text alone, at most 16 KiB, answered with text) and `device.ticket.move` (to the end of a column; "Move to…" stands in for the browser's drag) run the browser board's own function as the owner, audited as `ticket.comment`, `ticket.ask` and `ticket.move` for the device; `device.ticket.answer` answers a question. The controller decides every change: a refusal changes nothing and carries the ticket store's own code (`deviceTicketRefusalCodes`, such as `ticket_review_branch_required` for a move to review without a branch) and its reason. The app then keeps the owner's draft, reads the ticket again and shows the reason; it never sends a refused change again on its own. A change whose outcome AGL cannot tell is refused as `outcome_unknown` and stays fenced: the app reads the ticket again to learn whether it happened before the owner decides, and never sends it again on its own. Creating, editing and assigning tickets stay in the browser.
|
|
3830
|
-
- Every refusal of every device method carries one code of `TDeviceRefusalCode` as `error.data.code` and a message to show, whatever the controller refused it with (AGL-1670): the set is closed, and within a major it only grows. The pairing and the connection: `device_unknown` (forget the pairing), `device_pairing_invalid`, `device_pairing_unavailable`, `device_limit`, `device_already_paired`, `device_proof_invalid`, `device_challenge_invalid` and `device_authentication_required`. What the request names is gone: `session_not_found` (list the feed again), `driver_absent`, and the ticket store's `ticket_not_found` and `ticket_question_not_found`. Nothing was done because something else changed meanwhile, so read again, then decide: `concurrent_change
|
|
3858
|
+
- Every refusal of every device method carries one code of `TDeviceRefusalCode` as `error.data.code` and a message to show, whatever the controller refused it with (AGL-1670): the set is closed, and within a major it only grows. The pairing and the connection: `device_unknown` (forget the pairing), `device_pairing_invalid`, `device_pairing_unavailable`, `device_limit`, `device_already_paired`, `device_proof_invalid`, `device_challenge_invalid` and `device_authentication_required`. What the request names is gone: `session_not_found` (list the feed again), `driver_absent`, and the ticket store's `ticket_not_found` and `ticket_question_not_found`. Nothing was done because something else changed meanwhile, so read again, then decide: `concurrent_change` (among others an answer to a permission or question the session no longer holds, AGL-1687), `ticket_revision_conflict` and `direct_report_busy`. Refused by a rule, with the reason: `session_read_only` (including a session whose model or stopped message the owner resolves in the browser first), `invalid_request`, `direct_report_failed` and the ticket store's other codes (`deviceTicketRefusalCodes`). Limits: `rate_limited`, final as every refusal, and `operation_limit`. The controller: `controller_unavailable` (not ready: starting, stopping, or a harness or the Flex child not running) and `controller_failed` (a fault, always "The controller operation failed."; `error.data.reference` names the failure journal entry the owner's browser shows, and no message to a device carries a raw cause such as a socket path or a spawn error). `outcome_unknown` means the request may have happened: AGL dispatched it, or may have, and cannot tell whether it took effect. A client never resends it on its own; it keeps the owner's text, reads the session, the driver or the ticket again to learn the outcome, and the owner decides.
|
|
3831
3859
|
- The controller pushes a device an allowlist of events in their own shape: feed changes, a session's change, its streaming text (snapshots and exact deltas), Inbox changes, the driver's changes (`driver.changed` with its status, also when its transcript or prompts changed, never its streaming text), the direct reports' changes (`directreports.changed`, with no payload, also when fleet workers or tickets changed), the host's changes (`host.changed`, with no payload, when the deploy targets or the accounts changed), the board's changes (`tickets.changed`, with no ticket key and with the board's revision when it moved, followed by `directreports.changed` and `host.changed`, since tickets hold the reports' questions and the planned deploys) and a resynchronization request. Every other event, and every event about a session the feed does not list, stays on the controller. A device that falls behind by 256 events or 4 MiB is resynchronized alone: on `sessions.changed` it lists the feed and reads the open session again, an open Driver view included (the driver's own changes may have folded into it).
|
|
3832
3860
|
- Through the gateway, a device's WebSocket upgrade carries the public origin as `Origin`, like a browser's (Admission).
|
|
3833
3861
|
|
package/ts/00_commitinfo_data.ts
CHANGED
package/ts/aglapi/interfaces.ts
CHANGED
|
@@ -154,6 +154,7 @@ export const aglApiMethods = {
|
|
|
154
154
|
'agl.mcp.deploy.probe': { use: 'excluded', exclusion: 'person', reason: ownerToken },
|
|
155
155
|
'agl.mcp.deploy.release': { use: 'excluded', exclusion: 'person', reason: ownerToken },
|
|
156
156
|
'agl.mcp.deploy.ticket': { use: 'excluded', exclusion: 'person', reason: ownerToken },
|
|
157
|
+
'agl.mcp.deploy.refresh': { use: 'excluded', exclusion: 'person', reason: ownerToken },
|
|
157
158
|
'agl.mcp.worker.enroll': { use: 'excluded', exclusion: 'transport',
|
|
158
159
|
reason: 'It enrols the caller credential of a launched worker: the MCP channel itself.' },
|
|
159
160
|
} as const satisfies Record<TControllerMcpMethod, TAglApiMethodUse>;
|
package/ts/classes.authstore.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { DriverModel } from './driver/classes.driverstore.js';
|
|
|
3
3
|
import { DirectReportModel } from './driver/classes.directreportstore.js';
|
|
4
4
|
import { SessionFeedAcknowledgementModel } from './classes.sessionfeedacknowledgements.js';
|
|
5
5
|
import { HarnessReleaseModel } from './classes.harnessreleases.js';
|
|
6
|
-
import { DeployObservationModel } from './fleet/classes.deploymodels.js';
|
|
6
|
+
import { DeployObservationModel, DeployStatusModel } from './fleet/classes.deploymodels.js';
|
|
7
7
|
import { TicketMigrationMarkerModel } from '../ts_migration/v41_ticketmigrationmarkers.js';
|
|
8
8
|
import { WorkerCallerBindingModel } from './classes.workercallerbindings.js';
|
|
9
9
|
import { FleetTicketEffectModel } from './fleet/classes.ticketeffects.js';
|
|
@@ -790,6 +790,7 @@ const setAuthStoreModelManager = (
|
|
|
790
790
|
plugins.nosqldb.setDefaultManagerForDoc(managerArg, FleetTicketEffectModel);
|
|
791
791
|
plugins.nosqldb.setDefaultManagerForDoc(managerArg, HarnessReleaseModel);
|
|
792
792
|
plugins.nosqldb.setDefaultManagerForDoc(managerArg, DeployObservationModel);
|
|
793
|
+
plugins.nosqldb.setDefaultManagerForDoc(managerArg, DeployStatusModel);
|
|
793
794
|
plugins.nosqldb.setDefaultManagerForDoc(managerArg, TicketMigrationMarkerModel);
|
|
794
795
|
plugins.nosqldb.setDefaultManagerForDoc(managerArg, WorkerCallerBindingModel);
|
|
795
796
|
plugins.nosqldb.setDefaultManagerForDoc(managerArg, TicketModel);
|
|
@@ -1070,6 +1071,8 @@ export class SmartDataAuthStore implements IAuthStore, IAuthStoreSessionIdentity
|
|
|
1070
1071
|
await HarnessReleaseModel.exact.prepare();
|
|
1071
1072
|
await DeployObservationModel.init();
|
|
1072
1073
|
await DeployObservationModel.exact.prepare();
|
|
1074
|
+
await DeployStatusModel.init();
|
|
1075
|
+
await DeployStatusModel.exact.prepare();
|
|
1073
1076
|
await TicketMigrationMarkerModel.init();
|
|
1074
1077
|
await TicketMigrationMarkerModel.exact.prepare();
|
|
1075
1078
|
await WorkerCallerBindingModel.init();
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
} from './classes.claudeprojection.js';
|
|
14
14
|
import { isClaudeSessionNativeId, type IControllerClaudeSessionDocument } from './classes.claudesessionmodels.js';
|
|
15
15
|
import { ControllerElicitationReplyError, controllerElicitation, controllerElicitationAnswer } from './functions.elicitation.js';
|
|
16
|
+
import { promptNoLongerPending } from './functions.promptreply.js';
|
|
16
17
|
|
|
17
18
|
/** The SDK calls the harness makes; tests hand in a fake. */
|
|
18
19
|
export type TClaudeSdk = Pick<typeof plugins.claudeAgentSdk, 'query' | 'getSessionMessages' | 'getSessionInfo' | 'deleteSession'>;
|
|
@@ -539,7 +540,7 @@ export class ClaudeHarness {
|
|
|
539
540
|
|
|
540
541
|
public replyPermission(nativeIdArg: string, idArg: string, replyArg: 'once' | 'reject'): void {
|
|
541
542
|
const request = this.pending.get(idArg);
|
|
542
|
-
if (!request?.permission || request.nativeId !== nativeIdArg) throw
|
|
543
|
+
if (!request?.permission || request.nativeId !== nativeIdArg) throw promptNoLongerPending('permission');
|
|
543
544
|
this.answer(request, replyArg === 'once'
|
|
544
545
|
? { behavior: 'allow', updatedInput: request.input }
|
|
545
546
|
: { behavior: 'deny', message: 'The user rejected this tool call.' });
|
|
@@ -547,7 +548,7 @@ export class ClaudeHarness {
|
|
|
547
548
|
|
|
548
549
|
public replyQuestion(nativeIdArg: string, idArg: string, answersArg: string[][] | null): void {
|
|
549
550
|
const request = this.pending.get(idArg);
|
|
550
|
-
if (!request?.question || !request.questionTexts || request.nativeId !== nativeIdArg) throw
|
|
551
|
+
if (!request?.question || !request.questionTexts || request.nativeId !== nativeIdArg) throw promptNoLongerPending('question');
|
|
551
552
|
if (answersArg === null) {
|
|
552
553
|
this.answer(request, { behavior: 'deny', message: 'The user dismissed the question.' });
|
|
553
554
|
return;
|
|
@@ -5,6 +5,7 @@ import { CodexSupervisor } from './classes.codexsupervisor.js';
|
|
|
5
5
|
import { codexArray, codexBoundedText, codexNativeWait, codexNonnegativeInteger, codexItemBundle, codexRecord, codexRuntimeId, codexSession, codexSessionId, codexString, codexText, codexThreadId, codexTurnError, codexTurnErrorBundle, codexTurnUsage, codexUsageTotal, isCodexTerminalItemStatus, type ICodexUsageTotal, type TCodexAnswerMeta, type TCodexTerminalTurnStatus } from './classes.codexprojection.js';
|
|
6
6
|
import { codexPublicThreadId, codexQualifiedIdentity } from './functions.codexidentity.js';
|
|
7
7
|
import { ControllerElicitationReplyError, controllerElicitation, controllerElicitationAnswer } from './functions.elicitation.js';
|
|
8
|
+
import { promptNoLongerPending } from './functions.promptreply.js';
|
|
8
9
|
import { maxCodexTurnPartialReplyBytes, maxCodexTurnRecordsPerSession, maxCodexTurnStopAnchors, type ICodexTurnRecord, type ICodexTurnRecordStore, type ICodexTurnStop } from './classes.codexturnstore.js';
|
|
9
10
|
|
|
10
11
|
interface ICodexSessionScope { projectId: string; directory: string; session: IControllerSession; revision: number; statusRevision: number; closedRevision: number }
|
|
@@ -1916,29 +1917,34 @@ export class CodexClientAdapter {
|
|
|
1916
1917
|
} catch { client.rejectRequest(requestArg.id, -32602, 'The Codex request cannot be handled in this managed AGL scope.'); }
|
|
1917
1918
|
}
|
|
1918
1919
|
|
|
1920
|
+
/**
|
|
1921
|
+
* Answers a pending approval; one this connection no longer holds is refused `promptNoLongerPending`, nothing sent.
|
|
1922
|
+
* `respond` answers false, before it writes anything, only when the connection no longer holds the server request:
|
|
1923
|
+
* Codex resolved it (`serverRequest/resolved`), or the connection closed, which `requireClient` rules out just before.
|
|
1924
|
+
*/
|
|
1919
1925
|
public replyPermission(threadIdArg: string, idArg: string, replyArg: 'once' | 'reject'): void {
|
|
1920
1926
|
this.scope(threadIdArg);
|
|
1921
1927
|
const pending = this.pending.get(idArg);
|
|
1922
|
-
if (!pending?.permission || pending.request.params.threadId !== threadIdArg) throw
|
|
1928
|
+
if (!pending?.permission || pending.request.params.threadId !== threadIdArg) throw promptNoLongerPending('permission');
|
|
1923
1929
|
let result: Record<string, unknown> = { decision: replyArg === 'once' ? 'accept' : 'decline' };
|
|
1924
1930
|
if (pending.request.method === 'item/permissions/requestApproval') {
|
|
1925
1931
|
const requested = codexRecord(pending.request.params.permissions);
|
|
1926
1932
|
result = { scope: 'turn', permissions: replyArg === 'reject' ? {} : Object.fromEntries(['network', 'fileSystem'].filter((key) => requested[key] !== null && requested[key] !== undefined).map((key) => [key, requested[key]])) };
|
|
1927
1933
|
}
|
|
1928
|
-
if (!this.supervisor.requireClient().respond(pending.request.id, result)) throw
|
|
1934
|
+
if (!this.supervisor.requireClient().respond(pending.request.id, result)) throw promptNoLongerPending('permission');
|
|
1929
1935
|
}
|
|
1930
1936
|
|
|
1931
1937
|
public replyQuestion(threadIdArg: string, idArg: string, answersArg: string[][] | null): void {
|
|
1932
1938
|
this.scope(threadIdArg);
|
|
1933
1939
|
const pending = this.pending.get(idArg);
|
|
1934
|
-
if (!pending?.question || !pending.questionIds || pending.request.params.threadId !== threadIdArg) throw
|
|
1940
|
+
if (!pending?.question || !pending.questionIds || pending.request.params.threadId !== threadIdArg) throw promptNoLongerPending('question');
|
|
1935
1941
|
if (answersArg === null) {
|
|
1936
|
-
if (!this.supervisor.requireClient().respond(pending.request.id, { answers: {} })) throw
|
|
1942
|
+
if (!this.supervisor.requireClient().respond(pending.request.id, { answers: {} })) throw promptNoLongerPending('question');
|
|
1937
1943
|
return;
|
|
1938
1944
|
}
|
|
1939
1945
|
if (answersArg.length !== pending.questionIds.length) throw new Error('Codex question answer count does not match.');
|
|
1940
1946
|
const answers = Object.fromEntries(pending.questionIds.map((id, index) => [id, { answers: answersArg[index] }]));
|
|
1941
|
-
if (!this.supervisor.requireClient().respond(pending.request.id, { answers })) throw
|
|
1947
|
+
if (!this.supervisor.requireClient().respond(pending.request.id, { answers })) throw promptNoLongerPending('question');
|
|
1942
1948
|
}
|
|
1943
1949
|
|
|
1944
1950
|
/**
|