agl 41.1.0 → 42.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/changelog.md +48 -0
- package/dist_serve/bundle.js +2190 -2193
- package/dist_serve/bundle.js.map +2 -2
- package/dist_serve/bundle.js.third-party-notices.json +3 -68
- package/dist_serve/bundle.js.third-party-notices.txt +4 -137
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/aglapi/aglapisurface.document.js +4 -4
- package/dist_ts/classes.authmodels.d.ts +2 -8
- package/dist_ts/classes.authmodels.js +60 -23
- package/dist_ts/classes.authstore.d.ts +22 -0
- package/dist_ts/classes.authstore.js +152 -23
- package/dist_ts/classes.cli.d.ts +3 -6
- package/dist_ts/classes.cli.js +38 -51
- package/dist_ts/classes.config.d.ts +17 -3
- package/dist_ts/classes.config.js +55 -18
- package/dist_ts/classes.controller.d.ts +12 -12
- package/dist_ts/classes.controller.js +46 -117
- package/dist_ts/classes.controllermanagement.d.ts +42 -9
- package/dist_ts/classes.controllermanagement.js +72 -23
- package/dist_ts/classes.controllerservice.d.ts +3 -31
- package/dist_ts/classes.controllerservice.js +3 -47
- package/dist_ts/classes.inferencegateway.js +4 -3
- 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.mcpcontrollerhost.js +9 -3
- package/dist_ts/classes.processinspection.d.ts +8 -1
- package/dist_ts/classes.processinspection.js +92 -2
- package/dist_ts/classes.proxycontrol.js +6 -1
- package/dist_ts/classes.proxydaemon.d.ts +2 -2
- package/dist_ts/classes.proxydaemon.js +1 -1
- package/dist_ts/classes.proxystore.d.ts +2 -11
- package/dist_ts/classes.proxystore.js +3 -25
- package/dist_ts/classes.tpmsecretcodec.d.ts +13 -0
- package/dist_ts/classes.tpmsecretcodec.js +28 -0
- package/dist_ts/classes.trustedproxysecrets.d.ts +91 -0
- package/dist_ts/classes.trustedproxysecrets.js +338 -0
- package/dist_ts/classes.upgradecoordinator.d.ts +14 -1
- package/dist_ts/classes.upgradecoordinator.js +21 -3
- package/dist_ts/classes.upgradetransaction.d.ts +32 -0
- package/dist_ts/classes.upgradetransaction.js +101 -4
- package/dist_ts/classes.usagefeed.js +3 -2
- package/dist_ts/functions.controlleradmission.d.ts +67 -0
- package/dist_ts/functions.controlleradmission.js +127 -0
- package/dist_ts/functions.remotecli.d.ts +27 -0
- package/dist_ts/functions.remotecli.js +236 -0
- package/dist_ts/functions.retiredenvironment.d.ts +11 -2
- package/dist_ts/functions.retiredenvironment.js +22 -5
- package/dist_ts/index.d.ts +1 -0
- package/dist_ts/index.js +2 -1
- package/dist_ts/interfaces.auth.d.ts +29 -4
- package/dist_ts/interfaces.auth.js +5 -1
- package/dist_ts/interfaces.config.d.ts +14 -0
- package/dist_ts/interfaces.config.js +9 -2
- package/dist_ts/interfaces.lifecycle.d.ts +3 -0
- package/dist_ts_authswitch/classes.authoritydaemon.js +6 -1
- package/dist_ts_interfaces/interfaces.d.ts +2 -2
- package/dist_ts_interfaces/interfaces.js +1 -1
- package/dist_ts_interfaces/management.d.ts +2 -2
- package/dist_ts_interfaces/management.js +2 -2
- package/dist_ts_interfaces/metrics.d.ts +29 -7
- package/dist_ts_interfaces/metrics.js +14 -1
- package/dist_ts_interfaces/requests.d.ts +1 -2
- package/dist_ts_interfaces/requests.js +1 -1
- package/dist_ts_interfaces/requests.upgrade.d.ts +0 -12
- package/package.json +12 -11
- package/readme.md +99 -28
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/aglapi/aglapisurface.document.ts +3 -3
- package/ts/classes.authmodels.ts +68 -25
- package/ts/classes.authstore.ts +151 -24
- package/ts/classes.cli.ts +38 -61
- package/ts/classes.config.ts +70 -21
- package/ts/classes.controller.ts +50 -163
- package/ts/classes.controllermanagement.ts +123 -49
- package/ts/classes.controllerservice.ts +3 -56
- package/ts/classes.inferencegateway.ts +3 -2
- package/ts/classes.inferenceusage.ts +58 -19
- package/ts/classes.inferenceusagetap.ts +27 -8
- package/ts/classes.mcpcontrollerhost.ts +10 -5
- package/ts/classes.processinspection.ts +84 -3
- package/ts/classes.proxycontrol.ts +2 -0
- package/ts/classes.proxydaemon.ts +3 -2
- package/ts/classes.proxystore.ts +4 -25
- package/ts/classes.tpmsecretcodec.ts +26 -0
- package/ts/classes.trustedproxysecrets.ts +317 -0
- package/ts/classes.upgradecoordinator.ts +33 -3
- package/ts/classes.upgradetransaction.ts +130 -1
- package/ts/classes.usagefeed.ts +2 -1
- package/ts/functions.controlleradmission.ts +168 -0
- package/ts/functions.remotecli.ts +264 -0
- package/ts/functions.retiredenvironment.ts +25 -3
- package/ts/index.ts +1 -0
- package/ts/interfaces.auth.ts +36 -3
- package/ts/interfaces.config.ts +15 -0
- package/ts/interfaces.lifecycle.ts +3 -0
- package/ts_authswitch/classes.authoritydaemon.ts +2 -0
- package/ts_interfaces/interfaces.ts +2 -2
- package/ts_interfaces/management.ts +2 -2
- package/ts_interfaces/metrics.ts +34 -7
- package/ts_interfaces/requests.ts +0 -10
- package/ts_interfaces/requests.upgrade.ts +0 -16
- package/ts_web/00_commitinfo_data.ts +1 -1
- package/ts_web/classes.controllersocketclient.ts +5 -2
- package/ts_web/elements.metricsboard.ts +68 -18
|
@@ -9,18 +9,32 @@ export const retiredControllerEnvironmentNames = Object.freeze({
|
|
|
9
9
|
HARNESS_CONTROLLER_MONGO_DB: 'AGL_MONGO_DB',
|
|
10
10
|
HARNESS_CONTROLLER_DB_DIR: 'AGL_DB_DIR',
|
|
11
11
|
HARNESS_CONTROLLER_FORWARD_ENV: 'AGL_FORWARD_ENV',
|
|
12
|
-
HARNESS_CONTROLLER_TRUSTED_PROXY_SECRET: 'AGL_TRUSTED_PROXY_SECRET',
|
|
13
12
|
HARNESS_CONTROLLER_CLAUDE_EXECUTABLE: 'AGL_CLAUDE_EXECUTABLE',
|
|
14
13
|
HARNESS_CONTROLLER_CODEX_EXECUTABLE: 'AGL_CODEX_EXECUTABLE',
|
|
15
14
|
HARNESS_CONTROLLER_CODEX_SERVER_URL: 'AGL_CODEX_SERVER_URL',
|
|
16
15
|
HARNESS_CONTROLLER_CODEX_SERVER_TOKEN: 'AGL_CODEX_SERVER_TOKEN',
|
|
17
16
|
});
|
|
17
|
+
const trustedProxySecretRemedy = 'The trusted-proxy secret is generated and sealed in the controller\'s database '
|
|
18
|
+
+ 'now; for a reverse proxy other than AGL\'s own gateway, stop the controller, pipe your secret into '
|
|
19
|
+
+ '`agl remote secret import --port <port>` (for example `printf \'%s\' "$AGL_TRUSTED_PROXY_SECRET" | agl remote '
|
|
20
|
+
+ 'secret import --port 4097`), then unset the variable.';
|
|
21
|
+
/**
|
|
22
|
+
* Configuration names retired without a replacement variable, each with what to do instead. A process started with
|
|
23
|
+
* one would silently run without it, so starting is refused here too.
|
|
24
|
+
*/
|
|
25
|
+
export const retiredControllerEnvironmentRemedies = Object.freeze({
|
|
26
|
+
AGL_TRUSTED_PROXY_SECRET: trustedProxySecretRemedy,
|
|
27
|
+
HARNESS_CONTROLLER_TRUSTED_PROXY_SECRET: trustedProxySecretRemedy,
|
|
28
|
+
});
|
|
18
29
|
const retiredPrefix = 'HARNESS_CONTROLLER_';
|
|
19
30
|
export class RetiredControllerEnvironmentError extends Error {
|
|
20
31
|
names;
|
|
21
32
|
constructor(names) {
|
|
22
33
|
super(`AGL no longer reads ${names.join(', ')}. `
|
|
23
34
|
+ names.map((nameArg) => {
|
|
35
|
+
const remedy = retiredControllerEnvironmentRemedies[nameArg];
|
|
36
|
+
if (remedy)
|
|
37
|
+
return `${nameArg}: ${remedy}`;
|
|
24
38
|
const replacement = retiredControllerEnvironmentNames[nameArg];
|
|
25
39
|
return replacement ? `Set ${replacement} instead of ${nameArg}.` : `Remove ${nameArg}.`;
|
|
26
40
|
}).join(' '));
|
|
@@ -29,17 +43,20 @@ export class RetiredControllerEnvironmentError extends Error {
|
|
|
29
43
|
}
|
|
30
44
|
}
|
|
31
45
|
/**
|
|
32
|
-
* Refuses an environment that still sets a retired `HARNESS_CONTROLLER_*` name
|
|
46
|
+
* Refuses an environment that still sets a retired `HARNESS_CONTROLLER_*` name or a name retired without a
|
|
47
|
+
* replacement (`retiredControllerEnvironmentRemedies`). The upgrade token a
|
|
33
48
|
* pre-33 upgrade worker hands its target is the one exception: it is a process wire, not configuration.
|
|
34
49
|
* Only names are reported, never values.
|
|
35
50
|
*/
|
|
36
|
-
export const assertNoRetiredControllerEnvironment = (environmentArg = process.env) => {
|
|
51
|
+
export const assertNoRetiredControllerEnvironment = (environmentArg = process.env, optionsArg = {}) => {
|
|
37
52
|
const names = Object.keys(environmentArg)
|
|
38
53
|
.filter((nameArg) => environmentArg[nameArg] !== undefined)
|
|
39
|
-
.filter((nameArg) =>
|
|
54
|
+
.filter((nameArg) => !(optionsArg.allowRemedied && Object.hasOwn(retiredControllerEnvironmentRemedies, nameArg)))
|
|
55
|
+
.filter((nameArg) => nameArg.toUpperCase().startsWith(retiredPrefix)
|
|
56
|
+
|| Object.hasOwn(retiredControllerEnvironmentRemedies, nameArg))
|
|
40
57
|
.filter((nameArg) => nameArg !== preAglUpgradeTokenEnvironmentVariable)
|
|
41
58
|
.sort();
|
|
42
59
|
if (names.length > 0)
|
|
43
60
|
throw new RetiredControllerEnvironmentError(names);
|
|
44
61
|
};
|
|
45
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
62
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZnVuY3Rpb25zLnJldGlyZWRlbnZpcm9ubWVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzL2Z1bmN0aW9ucy5yZXRpcmVkZW52aXJvbm1lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLHFDQUFxQyxFQUFFLE1BQU0sbU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UFDLENBQUM7U0FDakUsTUFBTSxDQUFDLENBQUMsT0FBTyxFQUFFLEVBQUUsQ0FBQyxPQUFPLEtBQUsscUNBQXFDLENBQUM7U0FDdEUsSUFBSSxFQUFFLENBQUM7SUFDVixJQUFJLEtBQUssQ0FBQyxNQUFNLEdBQUcsQ0FBQztRQUFFLE1BQU0sSUFBSSxpQ0FBaUMsQ0FBQyxLQUFLLENBQUMsQ0FBQztBQUMzRSxDQUFDLENBQUMifQ==
|
package/dist_ts/index.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ export type { IAdmitControllerManagedSessionInput, IBeginControllerManagedSessio
|
|
|
15
15
|
export { buildControllerFlexCleanupCohort } from './classes.sessionidentityservice.js';
|
|
16
16
|
export * from './classes.cli.js';
|
|
17
17
|
export * from './classes.config.js';
|
|
18
|
+
export * from './functions.controlleradmission.js';
|
|
18
19
|
export * from './classes.controller.js';
|
|
19
20
|
export * from './classes.resourcecoordinator.js';
|
|
20
21
|
export * from './classes.terminalresourcehost.js';
|
package/dist_ts/index.js
CHANGED
|
@@ -13,6 +13,7 @@ export * from './classes.managedsessionmodels.js';
|
|
|
13
13
|
export { buildControllerFlexCleanupCohort } from './classes.sessionidentityservice.js';
|
|
14
14
|
export * from './classes.cli.js';
|
|
15
15
|
export * from './classes.config.js';
|
|
16
|
+
export * from './functions.controlleradmission.js';
|
|
16
17
|
export * from './classes.controller.js';
|
|
17
18
|
export * from './classes.resourcecoordinator.js';
|
|
18
19
|
export * from './classes.terminalresourcehost.js';
|
|
@@ -27,4 +28,4 @@ export * from './classes.processinspection.js';
|
|
|
27
28
|
export * from './classes.upgradecoordinator.js';
|
|
28
29
|
export * from './classes.upgradetransaction.js';
|
|
29
30
|
export * from './classes.validation.js';
|
|
30
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
31
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI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UFjLHlCQUF5QixDQUFDIn0=
|
|
@@ -11,7 +11,7 @@ export type TWebAuthnCeremonyState = 'pending' | 'consumed';
|
|
|
11
11
|
* automatically storable with its type-specific checks — the two can no longer
|
|
12
12
|
* drift apart. Other well-formed types are a later release's and still read.
|
|
13
13
|
*/
|
|
14
|
-
export declare const controllerAuditEventTypes: readonly ['controller.started', 'controller.stopped', 'setup.finish', 'authentication.finish', 'authentication.logout', 'temppassword.create', 'temppassword.login', 'auth.resume', 'auth.handoff', 'auth.signout', 'session.list', 'conversation.list', 'conversation.search', 'conversation.open', 'conversation.archive', 'conversation.reopen', 'session.read', 'session.auxiliary.read', 'session.model.update', 'session.mode.update', 'session.scratchpad.save', 'session.intelligence.ask', 'session.messages.page', 'session.message.read', 'session.create', 'session.delete', 'session.discard-empty', 'session.send', 'session.message', 'session.abort', 'session.harness.restart', 'opencode.restart', 'controller.restart', 'session.compaction.update', 'session.limitresume.update', 'session.promptqueue.release', 'session.heldprompt.release', 'session.pendingprompt.edit', 'session.pendingprompt.retract', 'session.rename', 'session.archive', 'session.yolo', 'session.builtin', 'slash.list', 'slash.execute', 'permission.reply', 'question.reply', 'project.list', 'project.create', 'project.remove', 'project.removal.retry', 'project.agentmessages.update', 'model.list', 'provider.list', 'provider.connection.list', 'provider.login.begin', 'authswitch.request', 'accounts.rename', 'accounts.maxusage', 'accounts.reserve.lift', 'accounts.apikey.add', 'accounts.spendlimit', 'accounts.remove', 'accounts.add', 'accounts.reauth', 'accounts.operation.cancel', 'accounts.preuse.start', 'accounts.preuse.cancel', 'accounts.claude.signin.start', 'accounts.claude.signin.cancel', 'accounts.claude.adopt', 'accounts.claude.release', 'accounts.claude.repair', 'accounts.codex.adopt', 'accounts.codex.release', 'provider.login.read', 'provider.login.cancel', 'provider.connection.logout', 'provider.connection.activate-opencode', 'provider.connection.ratelimits.read', 'provider.model.refresh.begin', 'provider.model.refresh.read', 'command.list', 'session.command', 'settings.read', 'settings.update', 'sessiongroups.read', 'sessiongroups.update', 'terminal.list', 'terminal.create', 'terminal.rename', 'terminal.remove', 'terminal.attach', 'resource.list', 'resource.create', 'resource.rename', 'resource.attach', 'resource.detach', 'resource.start', 'resource.stop', 'resource.retire', 'resource.workspace.base', 'resource.workspace.write', 'resource.workspace.mkdir', 'resource.workspace.remove', 'resource.workspace.rename', 'resource.workspace.copy', 'resource.workspace.reveal', 'configuration.target.bind', 'configuration.owner.issue', 'configuration.owner.revoke', 'configuration.state', 'configuration.master.get', 'configuration.master.save', 'configuration.project', 'configuration.review', 'configuration.apply', 'configuration.restore.review', 'configuration.restore', 'configuration.operation.retry', 'configuration.operation.recover', 'configuration.operation.abandon', 'resource.browser.operation', 'resource.browser.view.open', 'resource.browser.view.close', 'resource.browser.view.operate', 'resource.browser.paint.rearm'];
|
|
14
|
+
export declare const controllerAuditEventTypes: readonly ['controller.started', 'controller.stopped', 'setup.finish', 'authentication.finish', 'authentication.logout', 'temppassword.create', 'temppassword.login', 'auth.resume', 'auth.handoff', 'auth.signout', 'session.list', 'conversation.list', 'conversation.search', 'conversation.open', 'conversation.archive', 'conversation.reopen', 'session.read', 'session.auxiliary.read', 'session.model.update', 'session.mode.update', 'session.scratchpad.save', 'session.intelligence.ask', 'session.messages.page', 'session.message.read', 'session.create', 'session.delete', 'session.discard-empty', 'session.send', 'session.message', 'session.abort', 'session.harness.restart', 'opencode.restart', 'controller.restart', 'session.compaction.update', 'session.limitresume.update', 'session.promptqueue.release', 'session.heldprompt.release', 'session.pendingprompt.edit', 'session.pendingprompt.retract', 'session.rename', 'session.archive', 'session.yolo', 'session.builtin', 'slash.list', 'slash.execute', 'permission.reply', 'question.reply', 'project.list', 'project.create', 'project.remove', 'project.removal.retry', 'project.agentmessages.update', 'model.list', 'provider.list', 'provider.connection.list', 'provider.login.begin', 'authswitch.request', 'accounts.rename', 'accounts.maxusage', 'accounts.reserve.lift', 'accounts.apikey.add', 'accounts.spendlimit', 'accounts.remove', 'accounts.add', 'accounts.reauth', 'accounts.operation.cancel', 'accounts.preuse.start', 'accounts.preuse.cancel', 'accounts.claude.signin.start', 'accounts.claude.signin.cancel', 'accounts.claude.adopt', 'accounts.claude.release', 'accounts.claude.repair', 'accounts.codex.adopt', 'accounts.codex.release', 'provider.login.read', 'provider.login.cancel', 'provider.connection.logout', 'provider.connection.activate-opencode', 'provider.connection.ratelimits.read', 'provider.model.refresh.begin', 'provider.model.refresh.read', 'command.list', 'session.command', 'settings.read', 'settings.update', 'sessiongroups.read', 'sessiongroups.update', 'terminal.list', 'terminal.create', 'terminal.rename', 'terminal.remove', 'terminal.attach', 'resource.list', 'resource.create', 'resource.rename', 'resource.attach', 'resource.detach', 'resource.start', 'resource.stop', 'resource.retire', 'resource.workspace.base', 'resource.workspace.write', 'resource.workspace.mkdir', 'resource.workspace.remove', 'resource.workspace.rename', 'resource.workspace.copy', 'resource.workspace.reveal', 'configuration.target.bind', 'configuration.owner.issue', 'configuration.owner.revoke', 'configuration.state', 'configuration.master.get', 'configuration.master.save', 'configuration.project', 'configuration.review', 'configuration.apply', 'configuration.restore.review', 'configuration.restore', 'configuration.operation.retry', 'configuration.operation.recover', 'configuration.operation.abandon', 'resource.browser.operation', 'resource.browser.view.open', 'resource.browser.view.close', 'resource.browser.view.operate', 'resource.browser.paint.rearm', 'remote.set', 'remote.unset', 'remote.secret.import'];
|
|
15
15
|
export type TControllerAuditEventType = (typeof controllerAuditEventTypes)[number];
|
|
16
16
|
export type TControllerAuditOutcome = 'attempted' | 'succeeded' | 'denied' | 'failed';
|
|
17
17
|
export type TAuthErrorCode = 'not_initialized' | 'config_mismatch' | 'setup_unavailable' | 'setup_invalid' | 'setup_expired' | 'rate_limited' | 'ceremony_limit' | 'ceremony_invalid' | 'ceremony_replayed' | 'ceremony_expired' | 'origin_mismatch' | 'peer_mismatch' | 'verification_failed' | 'credential_not_found' | 'concurrent_change' | 'ambiguous_write' | 'counter_conflict' | 'invalid_project' | 'invalid_resource' | 'invalid_settings' | 'temp_password_invalid' | 'temp_password_limit';
|
|
@@ -80,6 +80,30 @@ export interface ISetupAuthority {
|
|
|
80
80
|
* BrowserRuntime qualifies it.
|
|
81
81
|
*/
|
|
82
82
|
export type TControllerAuditSessionId = IControllerRuntimeId | plugins.browserRuntime.IBrowserClaudeSessionId;
|
|
83
|
+
/** One end of an offline `agl remote set|unset` move, as its audit events record it; never a secret. */
|
|
84
|
+
export interface IControllerAuditRemoteEndpoint {
|
|
85
|
+
publicOrigin: string;
|
|
86
|
+
rpId: string;
|
|
87
|
+
}
|
|
88
|
+
/** The public origin and RP ID a `remote.set` or `remote.unset` moves from and to. */
|
|
89
|
+
export interface IControllerAuditRemoteMove {
|
|
90
|
+
previous: IControllerAuditRemoteEndpoint;
|
|
91
|
+
target: IControllerAuditRemoteEndpoint;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* What an audit event records beyond its envelope (bounded plain JSON). This release records `remoteMove` on
|
|
95
|
+
* `remote.set` and `remote.unset`; any other key is a later release's, kept and pruned as it wrote it.
|
|
96
|
+
*/
|
|
97
|
+
export interface IControllerAuditEventDetails {
|
|
98
|
+
/** `remote.set` and `remote.unset` only: where the move goes from and to. */
|
|
99
|
+
remoteMove?: IControllerAuditRemoteMove;
|
|
100
|
+
[key: string]: unknown;
|
|
101
|
+
}
|
|
102
|
+
/** What this release records in an audit event's `details`. */
|
|
103
|
+
export interface IRecordAuditEventDetails {
|
|
104
|
+
/** `remote.set` and `remote.unset` only: where the move goes from and to. */
|
|
105
|
+
remoteMove: IControllerAuditRemoteMove;
|
|
106
|
+
}
|
|
83
107
|
/**
|
|
84
108
|
* A stored audit event. The audit log is shared with later releases, so a stored `type` is any audit type, also one
|
|
85
109
|
* this release does not know (a later release's, read back after a rollback). This release writes only its own types
|
|
@@ -100,10 +124,10 @@ export interface IControllerAuditEvent {
|
|
|
100
124
|
senderLabel?: string;
|
|
101
125
|
localCli?: IConfigurationLocalCliActor;
|
|
102
126
|
/**
|
|
103
|
-
* What
|
|
104
|
-
*
|
|
127
|
+
* What the event records beyond the envelope (bounded plain JSON): this release's `remoteMove`, or what a later
|
|
128
|
+
* release's type adds, read back after a rollback.
|
|
105
129
|
*/
|
|
106
|
-
details?:
|
|
130
|
+
details?: IControllerAuditEventDetails;
|
|
107
131
|
}
|
|
108
132
|
export interface IControllerTempPasswordDocument {
|
|
109
133
|
id: string;
|
|
@@ -131,6 +155,7 @@ export interface IRecordAuditEventInput {
|
|
|
131
155
|
/** The sender label an agent message declared (`session.message`). */
|
|
132
156
|
senderLabel?: string;
|
|
133
157
|
localCli?: IConfigurationLocalCliActor;
|
|
158
|
+
details?: IRecordAuditEventDetails;
|
|
134
159
|
}
|
|
135
160
|
export interface IConsumeCeremonyOptions {
|
|
136
161
|
ceremonyId: string;
|
|
@@ -133,6 +133,10 @@ export const controllerAuditEventTypes = [
|
|
|
133
133
|
'resource.browser.view.close',
|
|
134
134
|
'resource.browser.view.operate',
|
|
135
135
|
'resource.browser.paint.rearm',
|
|
136
|
+
// The offline `agl remote` commands, run by the local OS user against a stopped controller.
|
|
137
|
+
'remote.set',
|
|
138
|
+
'remote.unset',
|
|
139
|
+
'remote.secret.import',
|
|
136
140
|
];
|
|
137
141
|
export class AuthError extends Error {
|
|
138
142
|
code;
|
|
@@ -142,4 +146,4 @@ export class AuthError extends Error {
|
|
|
142
146
|
this.code = codeArg;
|
|
143
147
|
}
|
|
144
148
|
}
|
|
145
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
149
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZXJmYWNlcy5hdXRoLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHMvaW50ZXJmYWNlcy5hdXRoLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQVFBOzs7OztHQUtHO0FBQ0gsTUFBTSxDQUFDLE1BQU0seUJBQXlCLEdBQUc7SUFDdkMsb0JBQW9CO0lBQ3BCLG9CQUFvQjtJQ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2QkFBNkI7SUFDN0IsK0JBQStCO0lBQy9CLDhCQUE4QjtJQUM5Qiw0RkFBNEY7SUFDNUYsWUFBWTtJQUNaLGNBQWM7SUFDZCxzQkFBc0I7Q0FDZCxDQUFDO0FBNEJYLE1BQU0sT0FBTyxTQUFVLFNBQVEsS0FBSztJQUNsQixJQUFJLENBQWlCO0lBRXJDLFlBQVksT0FBdUIsRUFBRSxVQUFrQixFQUFFLFVBQXlCO1FBQ2hGLEtBQUssQ0FBQyxVQUFVLEVBQUUsVUFBVSxDQUFDLENBQUM7UUFDOUIsSUFBSSxDQUFDLElBQUksR0FBRyxXQUFXLENBQUM7UUFDeEIsSUFBSSxDQUFDLElBQUksR0FBRyxPQUFPLENBQUM7SUFDdEIsQ0FBQztDQUNGIn0=
|
|
@@ -11,7 +11,21 @@ export interface IControllerRuntimeConfig {
|
|
|
11
11
|
projectsRoot: string;
|
|
12
12
|
opencodePort: number;
|
|
13
13
|
tlsMode: TControllerTlsMode;
|
|
14
|
+
/**
|
|
15
|
+
* TLS-proxy mode only: the addresses a gateway reaches this controller from (canonical IP literals, sorted, no
|
|
16
|
+
* duplicates). A request from any other address off loopback is refused, and without any the controller listens
|
|
17
|
+
* on loopback only. Present only while it names one; changed only by `agl remote set` against a stopped controller.
|
|
18
|
+
*/
|
|
19
|
+
gatewaySources?: string[];
|
|
14
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* What this release declares about gateway sources (`controllerGatewaySourcesVersion` in its `package.json`): it
|
|
23
|
+
* stores and enforces them as `IControllerRuntimeConfig.gatewaySources` holds them. 1 is that contract as AGL 42 ships
|
|
24
|
+
* it; only an incompatible change to it raises the number. A release that declares none (every release before 42)
|
|
25
|
+
* refuses to start on a configuration that names them, so an upgrade transaction records its source's declaration
|
|
26
|
+
* (`sourceGatewaySourcesVersion`) and a recovery never rolls back to a source without it while they are stored.
|
|
27
|
+
*/
|
|
28
|
+
export declare const controllerGatewaySourcesVersion: 1;
|
|
15
29
|
export interface IControllerRuntimeOverrides {
|
|
16
30
|
controllerPort: number;
|
|
17
31
|
publicOrigin?: string;
|
|
@@ -1,2 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* What this release declares about gateway sources (`controllerGatewaySourcesVersion` in its `package.json`): it
|
|
3
|
+
* stores and enforces them as `IControllerRuntimeConfig.gatewaySources` holds them. 1 is that contract as AGL 42 ships
|
|
4
|
+
* it; only an incompatible change to it raises the number. A release that declares none (every release before 42)
|
|
5
|
+
* refuses to start on a configuration that names them, so an upgrade transaction records its source's declaration
|
|
6
|
+
* (`sourceGatewaySourcesVersion`) and a recovery never rolls back to a source without it while they are stored.
|
|
7
|
+
*/
|
|
8
|
+
export const controllerGatewaySourcesVersion = 1;
|
|
9
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZXJmYWNlcy5jb25maWcuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9pbnRlcmZhY2VzLmNvbmZpZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF1QkE7Ozs7OztHQU1HO0FBQ0gsTUFBTSxDQUFDLE1BQU0sK0JBQStCLEdBQUcsQ0FBVSxDQUFDIn0=
|
|
@@ -2,6 +2,7 @@ import type { controllerServiceUnitName, IControllerStatus, TControllerProcessMo
|
|
|
2
2
|
import type { IAuthoritySocketPaths } from './classes.authorityclient.js';
|
|
3
3
|
import type { IControllerRuntimeOverrides } from './interfaces.config.js';
|
|
4
4
|
import type * as plugins from './plugins.js';
|
|
5
|
+
import type { ITpmSecretCodec } from './classes.tpmsecretcodec.js';
|
|
5
6
|
export interface IControllerStartOptions {
|
|
6
7
|
processMode: TControllerProcessMode;
|
|
7
8
|
/** The systemd user unit this controller runs as (`__serve --service`), reported in its status. */
|
|
@@ -23,6 +24,8 @@ export interface IControllerStartOptions {
|
|
|
23
24
|
codexAppServerScope?: plugins.authswitch.ICodexAppServerScopeOptions;
|
|
24
25
|
/** Operator-provided first-start setup code; a random code is minted when absent. */
|
|
25
26
|
setupCode?: string;
|
|
27
|
+
/** Seals the trusted-proxy secret in TLS-proxy mode; TPM2 (`TpmSecretCodec`) when absent. For tests. */
|
|
28
|
+
trustedProxySecretCodec?: ITpmSecretCodec;
|
|
26
29
|
/** Private upgrade transaction token received over parent IPC. */
|
|
27
30
|
upgradeToken?: string;
|
|
28
31
|
upgradeGlobalRoot?: string;
|