agl 43.0.5 → 43.1.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 +18 -0
- package/dist_serve/bundle.js +5186 -4683
- 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_serve/third-party-notices.md +1 -1
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/aglapi/aglapisurface.document.js +475 -4
- package/dist_ts/aglapi/interfaces.d.ts +10 -0
- package/dist_ts/aglapi/interfaces.js +3 -1
- package/dist_ts/classes.claudeharness.d.ts +14 -5
- package/dist_ts/classes.claudeharness.js +62 -2
- package/dist_ts/classes.codexclientadapter.d.ts +7 -5
- package/dist_ts/classes.codexclientadapter.js +38 -3
- package/dist_ts/classes.controller.d.ts +9 -2
- package/dist_ts/classes.controller.js +116 -24
- package/dist_ts/classes.inferencegateway.d.ts +8 -5
- package/dist_ts/classes.inferencegateway.js +62 -19
- package/dist_ts/classes.inferencespend.d.ts +9 -3
- package/dist_ts/classes.inferencespend.js +44 -16
- package/dist_ts/classes.mcpclient.d.ts +6 -4
- package/dist_ts/classes.mcpclient.js +6 -2
- package/dist_ts/classes.mcpcontrollerhost.js +5 -1
- package/dist_ts/classes.mcptools.d.ts +1 -1
- package/dist_ts/classes.mcptools.js +17 -4
- package/dist_ts/classes.opencodeclient.js +3 -1
- package/dist_ts/classes.proxycontrol.d.ts +22 -11
- package/dist_ts/classes.proxycontrol.js +6 -3
- package/dist_ts/classes.proxycontrolclient.d.ts +6 -5
- package/dist_ts/classes.proxycontrolclient.js +8 -6
- package/dist_ts/classes.proxydaemon.d.ts +8 -6
- package/dist_ts/classes.proxydaemon.js +35 -21
- package/dist_ts/classes.proxyleaseholder.d.ts +12 -4
- package/dist_ts/classes.proxyleaseholder.js +39 -9
- package/dist_ts/classes.proxystore.d.ts +4 -3
- package/dist_ts/classes.proxystore.js +17 -7
- package/dist_ts/classes.sessionfeed.d.ts +1 -1
- package/dist_ts/classes.validation.d.ts +7 -0
- package/dist_ts/classes.validation.js +49 -2
- package/dist_ts/driver/functions.drivertools.js +2 -2
- package/dist_ts/fleet/classes.codexworkers.d.ts +4 -11
- package/dist_ts/fleet/classes.codexworkers.js +6 -3
- package/dist_ts/fleet/classes.workers.d.ts +25 -13
- package/dist_ts/fleet/classes.workers.js +105 -9
- package/dist_ts/fleet/functions.workervalidation.d.ts +26 -1
- package/dist_ts/fleet/functions.workervalidation.js +40 -11
- package/dist_ts/fleet/interfaces.workers.d.ts +17 -11
- package/dist_ts/fleet/interfaces.workers.js +10 -1
- package/dist_ts/functions.confinedrelay.d.ts +21 -0
- package/dist_ts/functions.confinedrelay.js +65 -0
- package/dist_ts/functions.deviceapi.d.ts +4 -2
- package/dist_ts/functions.deviceapi.js +20 -2
- package/dist_ts/functions.elicitation.d.ts +49 -0
- package/dist_ts/functions.elicitation.js +418 -0
- package/dist_ts/functions.inferencecli.d.ts +3 -3
- package/dist_ts/functions.inferencecli.js +33 -10
- package/dist_ts/functions.inferencecliarguments.d.ts +2 -1
- package/dist_ts/functions.inferencecliarguments.js +29 -8
- package/dist_ts/functions.inferencelaunch.d.ts +35 -7
- package/dist_ts/functions.inferencelaunch.js +143 -16
- package/dist_ts/functions.mcpfleetworkertools.d.ts +63 -70
- package/dist_ts/functions.mcpfleetworkertools.js +32 -4
- package/dist_ts/functions.proxycontract.d.ts +21 -4
- package/dist_ts/functions.proxycontract.js +12 -5
- package/dist_ts/functions.proxyharnessconfig.d.ts +7 -0
- package/dist_ts/functions.proxyharnessconfig.js +11 -1
- package/dist_ts/interfaces.auth.d.ts +1 -1
- package/dist_ts/interfaces.auth.js +2 -1
- package/dist_ts_interfaces/devices.d.ts +133 -3
- package/dist_ts_interfaces/devices.js +3 -2
- package/dist_ts_interfaces/elicitations.d.ts +125 -0
- package/dist_ts_interfaces/elicitations.js +7 -0
- package/dist_ts_interfaces/fleetworkers.d.ts +119 -5
- package/dist_ts_interfaces/fleetworkers.js +14 -2
- package/dist_ts_interfaces/index.d.ts +1 -0
- package/dist_ts_interfaces/index.js +2 -1
- package/dist_ts_interfaces/interfaces.d.ts +3 -1
- package/dist_ts_interfaces/interfaces.js +2 -2
- package/dist_ts_interfaces/mcprequests.d.ts +5 -1
- package/dist_ts_interfaces/mcprequests.js +2 -1
- package/dist_ts_interfaces/nativesessions.d.ts +14 -0
- package/dist_ts_interfaces/requests.d.ts +3 -3
- package/dist_ts_interfaces/requests.fleetworkers.js +2 -2
- package/dist_ts_interfaces/requests.js +1 -1
- package/dist_ts_interfaces/requests.promptreply.d.ts +18 -0
- package/dist_ts_interfaces/sessionfeed.d.ts +3 -2
- package/dist_ts_interfaces/sessionfeed.js +1 -1
- package/package.json +3 -3
- package/readme.md +191 -24
- package/third-party-notices.md +1 -1
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/aglapi/aglapisurface.document.ts +474 -3
- package/ts/aglapi/interfaces.ts +2 -0
- package/ts/classes.claudeharness.ts +80 -9
- package/ts/classes.codexclientadapter.ts +41 -5
- package/ts/classes.controller.ts +142 -29
- package/ts/classes.inferencegateway.ts +69 -23
- package/ts/classes.inferencespend.ts +46 -13
- package/ts/classes.mcpclient.ts +8 -4
- package/ts/classes.mcpcontrollerhost.ts +4 -0
- package/ts/classes.mcptools.ts +17 -3
- package/ts/classes.opencodeclient.ts +2 -0
- package/ts/classes.proxycontrol.ts +27 -13
- package/ts/classes.proxycontrolclient.ts +9 -6
- package/ts/classes.proxydaemon.ts +49 -27
- package/ts/classes.proxyleaseholder.ts +43 -11
- package/ts/classes.proxystore.ts +21 -8
- package/ts/classes.sessionfeed.ts +1 -1
- package/ts/classes.validation.ts +52 -0
- package/ts/driver/functions.drivertools.ts +1 -1
- package/ts/fleet/classes.codexworkers.ts +8 -6
- package/ts/fleet/classes.workers.ts +101 -17
- package/ts/fleet/functions.workervalidation.ts +35 -9
- package/ts/fleet/interfaces.workers.ts +11 -4
- package/ts/functions.confinedrelay.ts +65 -0
- package/ts/functions.deviceapi.ts +24 -1
- package/ts/functions.elicitation.ts +443 -0
- package/ts/functions.inferencecli.ts +38 -13
- package/ts/functions.inferencecliarguments.ts +26 -5
- package/ts/functions.inferencelaunch.ts +143 -16
- package/ts/functions.mcpfleetworkertools.ts +34 -4
- package/ts/functions.proxycontract.ts +17 -4
- package/ts/functions.proxyharnessconfig.ts +11 -0
- package/ts/interfaces.auth.ts +1 -0
- package/ts_interfaces/devices.schema.json +476 -2
- package/ts_interfaces/devices.ts +146 -2
- package/ts_interfaces/elicitations.ts +148 -0
- package/ts_interfaces/fleetworkers.ts +96 -4
- package/ts_interfaces/index.ts +1 -0
- package/ts_interfaces/interfaces.ts +3 -1
- package/ts_interfaces/mcprequests.ts +1 -0
- package/ts_interfaces/nativesessions.ts +16 -0
- package/ts_interfaces/requests.fleetworkers.ts +1 -1
- package/ts_interfaces/requests.promptreply.ts +22 -0
- package/ts_interfaces/requests.ts +4 -0
- package/ts_interfaces/sessionfeed.ts +3 -2
- package/ts_web/00_commitinfo_data.ts +1 -1
- package/ts_web/classes.elicitationcards.ts +106 -0
- package/ts_web/classes.nativesessionstate.ts +38 -1
- package/ts_web/elements.fleetworker.ts +27 -2
- package/ts_web/elements.harnesscontrollerapp.ts +68 -1
- package/ts_web/functions.sessionchat.ts +5 -0
|
@@ -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.claudecode', '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', 'device.pairing.begin', 'device.pair', 'device.auth', 'device.revoke'];
|
|
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', 'elicitation.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.claudecode', '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', 'device.pairing.begin', 'device.pair', 'device.auth', 'device.revoke'];
|
|
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';
|
|
@@ -52,6 +52,7 @@ export const controllerAuditEventTypes = [
|
|
|
52
52
|
'slash.execute',
|
|
53
53
|
'permission.reply',
|
|
54
54
|
'question.reply',
|
|
55
|
+
'elicitation.reply',
|
|
55
56
|
'project.list',
|
|
56
57
|
'project.create',
|
|
57
58
|
'project.remove',
|
|
@@ -152,4 +153,4 @@ export class AuthError extends Error {
|
|
|
152
153
|
this.code = codeArg;
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sMEJBQTBCO0lBQzFCLDBCQUEwQjtJQUMxQiwyQkFBMkI7SUFDM0IsMkJBQTJCO0lBQzNCLHlCQUF5QjtJQUN6QiwyQkFBMkI7SUFDM0IsMkJBQTJCO0lBQzNCLDJCQUEyQjtJQUMzQiw0QkFBNEI7SUFDNUIscUJBQXFCO0lBQ3JCLDBCQUEwQjtJQUMxQiwyQkFBMkI7SUFDM0IsdUJBQXVCO0lBQ3ZCLHNCQUFzQjtJQUN0QixxQkFBcUI7SUFDckIsOEJBQThCO0lBQzlCLHVCQUF1QjtJQUN2QiwrQkFBK0I7SUFDL0IsaUNBQWlDO0lBQ2pDLGlDQUFpQztJQUNqQyw0QkFBNEI7SUFDNUIsNEJBQTRCO0lBQzVCLDZCQUE2QjtJQUM3QiwrQkFBK0I7SUFDL0IsOEJBQThCO0lBQzlCLDRGQUE0RjtJQUM1RixZQUFZO0lBQ1osY0FBYztJQUNkLHNCQUFzQjtJQUN0QixtSEFBbUg7SUFDbkgsc0JBQXNCO0lBQ3RCLGFBQWE7SUFDYixhQUFhO0lBQ2IsZUFBZTtDQUNQLENBQUM7QUE0QlgsTUFBTSxPQUFPLFNBQVUsU0FBUSxLQUFLO0lBQ2xCLElBQUksQ0FBaUI7SUFFckMsWUFBWSxPQUF1QixFQUFFLFVBQWtCLEVBQUUsVUFBeUI7UUFDaEYsS0FBSyxDQUFDLFVBQVUsRUFBRSxVQUFVLENBQUMsQ0FBQztRQUM5QixJQUFJLENBQUMsSUFBSSxHQUFHLFdBQVcsQ0FBQztRQUN4QixJQUFJLENBQUMsSUFBSSxHQUFHLE9BQU8sQ0FBQztJQUN0QixDQUFDO0NBQ0YifQ==
|
|
@@ -2,7 +2,7 @@ import type { ITypedRequest, implementsTR } from '@api.global/typedrequest-inter
|
|
|
2
2
|
/** The device protocol this controller speaks. */
|
|
3
3
|
export declare const deviceProtocolVersion: {
|
|
4
4
|
readonly major: 1;
|
|
5
|
-
readonly minor:
|
|
5
|
+
readonly minor: 1;
|
|
6
6
|
};
|
|
7
7
|
/** The scheme of a pairing payload: `agl-pair:?origin=<https origin>&controller=<controller id>&code=<base64url>`. */
|
|
8
8
|
export declare const devicePairingScheme: 'agl-pair';
|
|
@@ -46,7 +46,7 @@ export declare const deviceRevokedCloseCode = 4403;
|
|
|
46
46
|
export type TDeviceRefusalCode = 'device_unknown' | 'device_pairing_invalid' | 'device_pairing_unavailable' | 'device_limit' | 'device_already_paired' | 'device_proof_invalid' | 'device_challenge_invalid' | 'device_authentication_required' | 'session_not_found' | 'session_read_only';
|
|
47
47
|
/** The harness a session runs on. */
|
|
48
48
|
export type TDeviceHarness = 'claude' | 'codex' | 'flex' | 'opencode';
|
|
49
|
-
/** `needs_input`: a question
|
|
49
|
+
/** `needs_input`: a question, a permission or an MCP elicitation waits for the owner. */
|
|
50
50
|
export type TDeviceSessionState = 'needs_input' | 'working' | 'completed' | 'failed';
|
|
51
51
|
/** One session of the feed as a device sees it: the browser feed row without where it opens (no host paths, no tickets). */
|
|
52
52
|
export interface IDeviceSessionRow {
|
|
@@ -125,6 +125,122 @@ export interface IDeviceQuestion {
|
|
|
125
125
|
id: string;
|
|
126
126
|
questions: IDeviceQuestionItem[];
|
|
127
127
|
}
|
|
128
|
+
/** One choice of an elicitation field: the value the answer carries, and its label. */
|
|
129
|
+
export interface IDeviceElicitationOption {
|
|
130
|
+
value: string;
|
|
131
|
+
label: string;
|
|
132
|
+
}
|
|
133
|
+
/** A text field; a value is checked against `format` (`email`, `uri`, `date`, `date-time`) and the lengths in characters. */
|
|
134
|
+
export interface IDeviceElicitationTextField {
|
|
135
|
+
kind: 'text';
|
|
136
|
+
/** The name the answer carries the value under. */
|
|
137
|
+
name: string;
|
|
138
|
+
title?: string;
|
|
139
|
+
description?: string;
|
|
140
|
+
required: boolean;
|
|
141
|
+
format?: 'email' | 'uri' | 'date' | 'date-time';
|
|
142
|
+
/** @asType integer */
|
|
143
|
+
minLength?: number;
|
|
144
|
+
/** @asType integer */
|
|
145
|
+
maxLength?: number;
|
|
146
|
+
default?: string;
|
|
147
|
+
}
|
|
148
|
+
/** A number field; `integer` takes whole numbers only, the bounds are inclusive. */
|
|
149
|
+
export interface IDeviceElicitationNumberField {
|
|
150
|
+
kind: 'number';
|
|
151
|
+
name: string;
|
|
152
|
+
title?: string;
|
|
153
|
+
description?: string;
|
|
154
|
+
required: boolean;
|
|
155
|
+
integer: boolean;
|
|
156
|
+
minimum?: number;
|
|
157
|
+
maximum?: number;
|
|
158
|
+
default?: number;
|
|
159
|
+
}
|
|
160
|
+
/** A yes or no. */
|
|
161
|
+
export interface IDeviceElicitationBooleanField {
|
|
162
|
+
kind: 'boolean';
|
|
163
|
+
name: string;
|
|
164
|
+
title?: string;
|
|
165
|
+
description?: string;
|
|
166
|
+
required: boolean;
|
|
167
|
+
default?: boolean;
|
|
168
|
+
}
|
|
169
|
+
/** One choice among the options; the answer carries the option's `value`. */
|
|
170
|
+
export interface IDeviceElicitationChoiceField {
|
|
171
|
+
kind: 'choice';
|
|
172
|
+
name: string;
|
|
173
|
+
title?: string;
|
|
174
|
+
description?: string;
|
|
175
|
+
required: boolean;
|
|
176
|
+
options: IDeviceElicitationOption[];
|
|
177
|
+
default?: string;
|
|
178
|
+
}
|
|
179
|
+
/** Several of the options, each at most once; the answer carries their `value`s. */
|
|
180
|
+
export interface IDeviceElicitationChoicesField {
|
|
181
|
+
kind: 'choices';
|
|
182
|
+
name: string;
|
|
183
|
+
title?: string;
|
|
184
|
+
description?: string;
|
|
185
|
+
required: boolean;
|
|
186
|
+
options: IDeviceElicitationOption[];
|
|
187
|
+
/** @asType integer */
|
|
188
|
+
minItems?: number;
|
|
189
|
+
/** @asType integer */
|
|
190
|
+
maxItems?: number;
|
|
191
|
+
default?: string[];
|
|
192
|
+
}
|
|
193
|
+
export type TDeviceElicitationField = IDeviceElicitationTextField | IDeviceElicitationNumberField | IDeviceElicitationBooleanField | IDeviceElicitationChoiceField | IDeviceElicitationChoicesField;
|
|
194
|
+
/** An MCP server of the session asks the owner to fill in `fields`; it is never answered automatically. */
|
|
195
|
+
export interface IDeviceElicitationForm {
|
|
196
|
+
mode: 'form';
|
|
197
|
+
id: string;
|
|
198
|
+
serverName: string;
|
|
199
|
+
message: string;
|
|
200
|
+
fields: TDeviceElicitationField[];
|
|
201
|
+
/** @asType integer */
|
|
202
|
+
createdAt: number;
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* An MCP server of the session asks the owner to visit `url`, which AGL never opens or fetches: show it as plain text
|
|
206
|
+
* and accept, without content, once the owner reports the visit done.
|
|
207
|
+
*/
|
|
208
|
+
export interface IDeviceElicitationUrl {
|
|
209
|
+
mode: 'url';
|
|
210
|
+
id: string;
|
|
211
|
+
serverName: string;
|
|
212
|
+
message: string;
|
|
213
|
+
url: string;
|
|
214
|
+
/** @asType integer */
|
|
215
|
+
createdAt: number;
|
|
216
|
+
}
|
|
217
|
+
/** An MCP request AGL cannot collect, with the reason: only decline or cancel answer it. */
|
|
218
|
+
export interface IDeviceElicitationUnsupported {
|
|
219
|
+
mode: 'unsupported';
|
|
220
|
+
id: string;
|
|
221
|
+
serverName: string;
|
|
222
|
+
message: string;
|
|
223
|
+
reason: string;
|
|
224
|
+
/** @asType integer */
|
|
225
|
+
createdAt: number;
|
|
226
|
+
}
|
|
227
|
+
/** An MCP server of the session asks the owner for input: a form, a URL to visit, or a request AGL cannot collect. */
|
|
228
|
+
export type TDeviceElicitation = IDeviceElicitationForm | IDeviceElicitationUrl | IDeviceElicitationUnsupported;
|
|
229
|
+
/** A value of an elicitation field: text or a choice, a number, a yes or no, or several choices. */
|
|
230
|
+
export type TDeviceElicitationValue = string | number | boolean | string[];
|
|
231
|
+
/**
|
|
232
|
+
* The owner's answer to an elicitation. `accept` carries a form's values by field name (checked against the form; a
|
|
233
|
+
* mismatch is refused, nothing is sent), or none in URL mode, and is refused for an unsupported request; `decline`
|
|
234
|
+
* refuses; `cancel` dismisses without a decision.
|
|
235
|
+
*/
|
|
236
|
+
export type TDeviceElicitationReply = {
|
|
237
|
+
action: 'accept';
|
|
238
|
+
content?: Record<string, TDeviceElicitationValue>;
|
|
239
|
+
} | {
|
|
240
|
+
action: 'decline';
|
|
241
|
+
} | {
|
|
242
|
+
action: 'cancel';
|
|
243
|
+
};
|
|
128
244
|
/** A live snapshot of an assistant text part while it streams: it replaces the part's text. */
|
|
129
245
|
export interface IDeviceTextUpdate {
|
|
130
246
|
sessionId: string;
|
|
@@ -275,6 +391,8 @@ export interface IReq_DeviceSessionRead extends implementsTR<ITypedRequest, IReq
|
|
|
275
391
|
before: string | null;
|
|
276
392
|
permissions: IDevicePermission[];
|
|
277
393
|
questions: IDeviceQuestion[];
|
|
394
|
+
/** Since protocol 1.1. */
|
|
395
|
+
elicitations: TDeviceElicitation[];
|
|
278
396
|
};
|
|
279
397
|
}
|
|
280
398
|
/**
|
|
@@ -318,6 +436,18 @@ export interface IReq_DeviceQuestionReply extends implementsTR<ITypedRequest, IR
|
|
|
318
436
|
success: boolean;
|
|
319
437
|
};
|
|
320
438
|
}
|
|
439
|
+
/** Answers an MCP elicitation. Scope `device`. Since protocol 1.1. */
|
|
440
|
+
export interface IReq_DeviceElicitationReply extends implementsTR<ITypedRequest, IReq_DeviceElicitationReply> {
|
|
441
|
+
method: 'device.elicitation.reply';
|
|
442
|
+
request: {
|
|
443
|
+
sessionId: string;
|
|
444
|
+
elicitationId: string;
|
|
445
|
+
reply: TDeviceElicitationReply;
|
|
446
|
+
};
|
|
447
|
+
response: {
|
|
448
|
+
success: boolean;
|
|
449
|
+
};
|
|
450
|
+
}
|
|
321
451
|
/** An event, sent by the controller to an authenticated device connection. */
|
|
322
452
|
export interface IReq_DeviceEventPush extends implementsTR<ITypedRequest, IReq_DeviceEventPush> {
|
|
323
453
|
method: 'device.event';
|
|
@@ -328,4 +458,4 @@ export interface IReq_DeviceEventPush extends implementsTR<ITypedRequest, IReq_D
|
|
|
328
458
|
}
|
|
329
459
|
/** Every device method, by the scope that admits it. */
|
|
330
460
|
export declare const devicePairingMethods: readonly ['device.hello', 'device.pair', 'device.auth.challenge', 'device.auth.prove'];
|
|
331
|
-
export declare const deviceMethods: readonly ['device.sessions.list', 'device.session.read', 'device.session.send', 'device.permission.reply', 'device.question.reply'];
|
|
461
|
+
export declare const deviceMethods: readonly ['device.sessions.list', 'device.session.read', 'device.session.send', 'device.permission.reply', 'device.question.reply', 'device.elicitation.reply'];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** The device protocol this controller speaks. */
|
|
2
|
-
export const deviceProtocolVersion = { major: 1, minor:
|
|
2
|
+
export const deviceProtocolVersion = { major: 1, minor: 1 };
|
|
3
3
|
/** The scheme of a pairing payload: `agl-pair:?origin=<https origin>&controller=<controller id>&code=<base64url>`. */
|
|
4
4
|
export const devicePairingScheme = 'agl-pair';
|
|
5
5
|
/** The first field of the message a device signs to pair. */
|
|
@@ -30,5 +30,6 @@ export const deviceMethods = [
|
|
|
30
30
|
'device.session.send',
|
|
31
31
|
'device.permission.reply',
|
|
32
32
|
'device.question.reply',
|
|
33
|
+
'device.elicitation.reply',
|
|
33
34
|
];
|
|
34
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
35
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGV2aWNlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzX2ludGVyZmFjZXMvZGV2aWNlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFrQkEsa0RBQWtEO0FBQ2xELE1BQU0sQ0FBQyxNQUFNLHFCQUFxQixHQUFHLEVBQUUsS0FBSyxFQUFFLENBQUMsRUFBRSxLQUFLLEVBQUUsQ0FBQyxFQUFXLENBQUM7QUFFckUsc0hBQXNIO0FBQ3RILE1BQU0sQ0FBQyxNQUFNLG1CQUFtQixHQUFHLFVBQW1CLENBQUM7QUFDdkQsNkRBQTZEO0FBQzdELE1BQU0sQ0FBQyxNQUFNLH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NsQixDQUFDIn0=
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import type { IControllerPermission, IControllerQuestion, IControllerRuntimeId } from './interfaces.js';
|
|
2
|
+
/** What every elicitation card carries, whatever it asks for. */
|
|
3
|
+
interface IControllerElicitationBase {
|
|
4
|
+
id: IControllerRuntimeId;
|
|
5
|
+
sessionId: IControllerRuntimeId;
|
|
6
|
+
/** The MCP server that asks, as the harness names it. */
|
|
7
|
+
serverName: string;
|
|
8
|
+
/** What the server asks, in its words. */
|
|
9
|
+
message: string;
|
|
10
|
+
createdAt: number;
|
|
11
|
+
}
|
|
12
|
+
/** A form AGL collects on the card: every field the server asked for, in its order. */
|
|
13
|
+
export interface IControllerElicitationForm extends IControllerElicitationBase {
|
|
14
|
+
mode: 'form';
|
|
15
|
+
schema: IControllerElicitationSchema;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The server asks the owner to visit `url`, which AGL shows as plain text and never opens or fetches; accepting
|
|
19
|
+
* reports that the owner has done it and carries no content.
|
|
20
|
+
*/
|
|
21
|
+
export interface IControllerElicitationUrl extends IControllerElicitationBase {
|
|
22
|
+
mode: 'url';
|
|
23
|
+
url: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* A request AGL cannot collect (another mode, a nested or otherwise unknown field, a form too large to show), with
|
|
27
|
+
* the reason in AGL's words. Only decline or cancel answer it; it is never answered for the owner.
|
|
28
|
+
*/
|
|
29
|
+
export interface IControllerElicitationUnsupported extends IControllerElicitationBase {
|
|
30
|
+
mode: 'unsupported';
|
|
31
|
+
reason: string;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* MCP elicitation (`elicitation/create`, MCP 2025-11-25): an MCP server of a Claude Code or Codex session asks the
|
|
35
|
+
* owner for input. AGL holds the request as a card beside the session's permissions and questions until the owner
|
|
36
|
+
* answers it; nothing answers one on the owner's behalf, auto-accept included. A form takes MCP's flat primitive
|
|
37
|
+
* subset only: text, numbers, a yes or no, and a single or multiple choice of strings; everything else is
|
|
38
|
+
* `unsupported`, never a form with a field left out.
|
|
39
|
+
*/
|
|
40
|
+
export type TControllerElicitation = IControllerElicitationForm | IControllerElicitationUrl | IControllerElicitationUnsupported;
|
|
41
|
+
/** A form's fields in the order the server lists them. */
|
|
42
|
+
export interface IControllerElicitationSchema {
|
|
43
|
+
fields: TControllerElicitationField[];
|
|
44
|
+
}
|
|
45
|
+
export type TControllerElicitationField = IControllerElicitationTextField | IControllerElicitationNumberField | IControllerElicitationBooleanField | IControllerElicitationChoiceField | IControllerElicitationChoicesField;
|
|
46
|
+
interface IControllerElicitationFieldBase {
|
|
47
|
+
/** The property name the answer carries the value under. */
|
|
48
|
+
name: string;
|
|
49
|
+
title?: string;
|
|
50
|
+
description?: string;
|
|
51
|
+
/** The answer must carry a value for it. */
|
|
52
|
+
required: boolean;
|
|
53
|
+
}
|
|
54
|
+
/** The string formats MCP names; a value is checked against its format before it is sent. */
|
|
55
|
+
export type TControllerElicitationTextFormat = 'email' | 'uri' | 'date' | 'date-time';
|
|
56
|
+
export interface IControllerElicitationTextField extends IControllerElicitationFieldBase {
|
|
57
|
+
kind: 'text';
|
|
58
|
+
format?: TControllerElicitationTextFormat;
|
|
59
|
+
/** In characters (Unicode code points), as JSON Schema counts them. */
|
|
60
|
+
minLength?: number;
|
|
61
|
+
maxLength?: number;
|
|
62
|
+
default?: string;
|
|
63
|
+
}
|
|
64
|
+
export interface IControllerElicitationNumberField extends IControllerElicitationFieldBase {
|
|
65
|
+
kind: 'number';
|
|
66
|
+
/** Whole numbers only (JSON Schema `integer`). */
|
|
67
|
+
integer: boolean;
|
|
68
|
+
/** Inclusive bounds. */
|
|
69
|
+
minimum?: number;
|
|
70
|
+
maximum?: number;
|
|
71
|
+
default?: number;
|
|
72
|
+
}
|
|
73
|
+
export interface IControllerElicitationBooleanField extends IControllerElicitationFieldBase {
|
|
74
|
+
kind: 'boolean';
|
|
75
|
+
default?: boolean;
|
|
76
|
+
}
|
|
77
|
+
/** One choice: the value the answer carries, and the label the server gave it (its value when it gave none). */
|
|
78
|
+
export interface IControllerElicitationOption {
|
|
79
|
+
value: string;
|
|
80
|
+
label: string;
|
|
81
|
+
}
|
|
82
|
+
/** A single choice among strings. */
|
|
83
|
+
export interface IControllerElicitationChoiceField extends IControllerElicitationFieldBase {
|
|
84
|
+
kind: 'choice';
|
|
85
|
+
options: IControllerElicitationOption[];
|
|
86
|
+
default?: string;
|
|
87
|
+
}
|
|
88
|
+
/** Several choices among strings, each at most once. */
|
|
89
|
+
export interface IControllerElicitationChoicesField extends IControllerElicitationFieldBase {
|
|
90
|
+
kind: 'choices';
|
|
91
|
+
options: IControllerElicitationOption[];
|
|
92
|
+
minItems?: number;
|
|
93
|
+
maxItems?: number;
|
|
94
|
+
default?: string[];
|
|
95
|
+
}
|
|
96
|
+
/** A value of a form's field: text or a single choice, a number, a yes or no, or several choices. */
|
|
97
|
+
export type TControllerElicitationValue = string | number | boolean | string[];
|
|
98
|
+
/** A form's answer: one value per field the owner filled in, by field name. */
|
|
99
|
+
export type TControllerElicitationContent = Record<string, TControllerElicitationValue>;
|
|
100
|
+
/**
|
|
101
|
+
* The owner's answer. `accept` sends a form's `content` (every field it carries is checked against the form first; a
|
|
102
|
+
* mismatch is refused, nothing is sent) or, in URL mode, reports the visit done without content; an unsupported
|
|
103
|
+
* request refuses it. `decline` refuses what the server asks; `cancel` dismisses it without a decision.
|
|
104
|
+
*/
|
|
105
|
+
export type TControllerElicitationReply = {
|
|
106
|
+
action: 'accept';
|
|
107
|
+
content?: TControllerElicitationContent;
|
|
108
|
+
} | {
|
|
109
|
+
action: 'decline';
|
|
110
|
+
} | {
|
|
111
|
+
action: 'cancel';
|
|
112
|
+
};
|
|
113
|
+
/** At most this many fields, choices per field and bytes of UTF-8 JSON in one answer. */
|
|
114
|
+
export declare const controllerElicitationMaxFields = 64;
|
|
115
|
+
export declare const controllerElicitationMaxOptions = 256;
|
|
116
|
+
export declare const controllerElicitationMaxContentBytes: number;
|
|
117
|
+
/** The requests of a conversation that wait for the owner's answer. */
|
|
118
|
+
export interface IControllerAttention {
|
|
119
|
+
permissions: IControllerPermission[];
|
|
120
|
+
questions: IControllerQuestion[];
|
|
121
|
+
elicitations: TControllerElicitation[];
|
|
122
|
+
}
|
|
123
|
+
/** A session waits for the owner while any of its requests does. */
|
|
124
|
+
export declare const controllerAttentionPending: (attentionArg: IControllerAttention) => boolean;
|
|
125
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** At most this many fields, choices per field and bytes of UTF-8 JSON in one answer. */
|
|
2
|
+
export const controllerElicitationMaxFields = 64;
|
|
3
|
+
export const controllerElicitationMaxOptions = 256;
|
|
4
|
+
export const controllerElicitationMaxContentBytes = 64 * 1024;
|
|
5
|
+
/** A session waits for the owner while any of its requests does. */
|
|
6
|
+
export const controllerAttentionPending = (attentionArg) => (attentionArg.permissions.length > 0 || attentionArg.questions.length > 0 || attentionArg.elicitations.length > 0);
|
|
7
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZWxpY2l0YXRpb25zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHNfaW50ZXJmYWNlcy9lbGljaXRhdGlvbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBb0lBLHlGQUF5RjtBQUN6RixNQUFNLENBQUMsTUFBTSw4QkFBOEIsR0FBRyxFQUFFLENBQUM7QUFDakQsTUFBTSxDQUFDLE1BQU0sK0JBQStCLEdBQUcsR0FBRyxDQUFDO0FBQ25ELE1BQU0sQ0FBQyxNQUFNLG9DQUFvQyxHQUFHLEVBQUUsR0FBRyxJQUFJLENBQUM7QUFTOUQsb0VBQW9FO0FBQ3BFLE1BQU0sQ0FBQyxNQUFNLDBCQUEwQixHQUFHLENBQUMsWUFBa0MsRUFBVyxFQUFFLENBQUMsQ0FDekYsWUFBWSxDQUFDLFdBQVcsQ0FBQyxNQUFNLEdBQUcsQ0FBQyxJQUFJLFlBQVksQ0FBQyxTQUFTLENBQUMsTUFBTSxHQUFHLENBQUMsSUFBSSxZQUFZLENBQUMsWUFBWSxDQUFDLE1BQU0sR0FBRyxDQUFDLENBQ2pILENBQUMifQ==
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { IControllerSystemMetrics, TControllerModelLimitKind } from './interfaces.js';
|
|
1
|
+
import type { IControllerNativeWait, IControllerSystemMetrics, TControllerModelLimitKind } from './interfaces.js';
|
|
2
2
|
import type { ITicketActor } from './tickets.js';
|
|
3
3
|
import type { IFleetTicketSync } from './fleet.js';
|
|
4
|
+
import type { IControllerFleetWorkerView } from './requests.fleetworkers.js';
|
|
4
5
|
export type TFleetWorkerHarness = 'claude' | 'codex';
|
|
5
6
|
export interface IFleetWorkerDispatchHolder {
|
|
6
7
|
controllerId: string;
|
|
@@ -246,14 +247,44 @@ export interface IFleetWorkerRequests {
|
|
|
246
247
|
note?: string;
|
|
247
248
|
ticketKey: string;
|
|
248
249
|
};
|
|
250
|
+
/**
|
|
251
|
+
* Lists the owner's workers. `view` `full` (the default of this request) returns every matching public record at
|
|
252
|
+
* once; `summary` returns pages of `limit` (1-100, default 50) `IFleetWorkerSummary` rows, newest first, continued
|
|
253
|
+
* with the `cursor` of the page before. MCP `fleet_worker_list` asks for `summary` unless told otherwise. `state` and
|
|
254
|
+
* `harness` narrow either view; archived workers are listed only with `archived`.
|
|
255
|
+
*/
|
|
249
256
|
list: {
|
|
250
257
|
archived?: boolean;
|
|
251
258
|
ticketKey?: string;
|
|
259
|
+
view?: TFleetWorkerListView;
|
|
260
|
+
limit?: number;
|
|
261
|
+
cursor?: string;
|
|
262
|
+
state?: IFleetWorker['state'];
|
|
263
|
+
harness?: TFleetWorkerHarness;
|
|
264
|
+
};
|
|
265
|
+
/** One worker of the owner by its `name` or its `id`, archived ones included. */
|
|
266
|
+
get: ({
|
|
267
|
+
name: string;
|
|
268
|
+
id?: never;
|
|
269
|
+
} | {
|
|
270
|
+
id: string;
|
|
271
|
+
name?: never;
|
|
272
|
+
}) & {
|
|
273
|
+
ticketKey?: never;
|
|
252
274
|
};
|
|
253
275
|
status: {
|
|
254
276
|
id: string;
|
|
255
277
|
ticketKey?: string;
|
|
256
278
|
};
|
|
279
|
+
/**
|
|
280
|
+
* Waits until the fleet worker job `id` succeeded or failed, at most `timeoutMs` (0-240000). Waiting, timing out
|
|
281
|
+
* or abandoning the wait never cancels the job.
|
|
282
|
+
*/
|
|
283
|
+
'job-wait': {
|
|
284
|
+
id: string;
|
|
285
|
+
timeoutMs: number; /** Jobs are the owner's; the wait names no ticket. */
|
|
286
|
+
ticketKey?: never;
|
|
287
|
+
};
|
|
257
288
|
watch: {
|
|
258
289
|
cursor?: IFleetEventCursor;
|
|
259
290
|
timeoutMs?: number;
|
|
@@ -272,7 +303,71 @@ export interface IFleetWorkerRequests {
|
|
|
272
303
|
};
|
|
273
304
|
}
|
|
274
305
|
export type TFleetWorkerAction = keyof IFleetWorkerRequests;
|
|
275
|
-
|
|
306
|
+
/** The actions that read and never start a job. */
|
|
307
|
+
export declare const fleetWorkerReadActions: readonly ["list", "get", "status", "job-wait", "watch"];
|
|
308
|
+
export type TFleetWorkerJobAction = Exclude<TFleetWorkerAction, (typeof fleetWorkerReadActions)[number]>;
|
|
309
|
+
export type TFleetWorkerListView = 'summary' | 'full';
|
|
310
|
+
/** The longest fleet worker job wait one request asks for. */
|
|
311
|
+
export declare const fleetWorkerJobWaitMaximumMs = 240000;
|
|
312
|
+
/**
|
|
313
|
+
* A worker as a summary list shows it: identity, binding, what the controller observed and which fences it holds,
|
|
314
|
+
* without attribution, proof or error bodies; `fleet_worker_get` returns the whole record.
|
|
315
|
+
*/
|
|
316
|
+
export interface IFleetWorkerSummary {
|
|
317
|
+
id: string;
|
|
318
|
+
name: string;
|
|
319
|
+
harness: TFleetWorkerHarness;
|
|
320
|
+
profileId: string;
|
|
321
|
+
ticketKey?: string;
|
|
322
|
+
state: IFleetWorker['state'];
|
|
323
|
+
nativeId?: string;
|
|
324
|
+
cwd: string;
|
|
325
|
+
updatedAt: string;
|
|
326
|
+
observed: {
|
|
327
|
+
/** The native status the controller last observed; absent until it observed the worker. */
|
|
328
|
+
status?: IFleetWorkerReport['status'];
|
|
329
|
+
/** How the newest observed turn ended; see `IFleetWorkerReport.outcome`. */
|
|
330
|
+
outcome?: IFleetWorkerTurnOutcome;
|
|
331
|
+
/** The wait for a person in the harness's own client the controller last observed; see `IControllerFleetWorkerView.nativeWait`. */
|
|
332
|
+
nativeWait?: IControllerNativeWait;
|
|
333
|
+
};
|
|
334
|
+
fence: {
|
|
335
|
+
/** An unresolved dispatch: its action and since when it holds the worker. */
|
|
336
|
+
pending?: {
|
|
337
|
+
action: string;
|
|
338
|
+
since: string;
|
|
339
|
+
};
|
|
340
|
+
/** The worker holds an attributed lost-dispatch resolution (`lostDispatch`). */
|
|
341
|
+
lostDispatch?: true;
|
|
342
|
+
/** The worker holds an attributed reconfirmation of a steer fence (`reconfirmedDispatch`). */
|
|
343
|
+
reconfirmed?: true;
|
|
344
|
+
/** The worker records an error (`error`). */
|
|
345
|
+
error?: true;
|
|
346
|
+
};
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* One page of a summary list. `total`, `fenced` (workers with an unresolved dispatch) and `failed` (workers that
|
|
350
|
+
* record an error or whose newest observed turn failed) count the whole filtered set, not the page. `nextCursor` continues after the page's last row and
|
|
351
|
+
* is absent on the last page.
|
|
352
|
+
*/
|
|
353
|
+
export interface IFleetWorkerSummaryPage {
|
|
354
|
+
view: 'summary';
|
|
355
|
+
workers: IFleetWorkerSummary[];
|
|
356
|
+
total: number;
|
|
357
|
+
fenced: number;
|
|
358
|
+
failed: number;
|
|
359
|
+
nextCursor?: string;
|
|
360
|
+
}
|
|
361
|
+
/**
|
|
362
|
+
* The refusals of the fleet worker reads, passed to the caller with their message: `job_unavailable`, the controller
|
|
363
|
+
* holds no such job of the owner (jobs are transient: a controller restart or eviction drops them; read the worker
|
|
364
|
+
* with `fleet_worker_get`); `worker_not_found`, the owner has no worker of that name or id; `list_cursor_mismatch`, the
|
|
365
|
+
* cursor belongs to another filter; `list_cursor_stale`, the worker the cursor continues after is no longer held as
|
|
366
|
+
* it was; `list_cursor_invalid`, the cursor is not one a summary list returned (a `limit` or `cursor` with the full view is
|
|
367
|
+
* refused by request validation instead).
|
|
368
|
+
*/
|
|
369
|
+
export declare const fleetWorkerErrorCodes: readonly ['job_unavailable', 'worker_not_found', 'list_cursor_mismatch', 'list_cursor_stale', 'list_cursor_invalid'];
|
|
370
|
+
export type TFleetWorkerErrorCode = (typeof fleetWorkerErrorCodes)[number];
|
|
276
371
|
export type TFleetWorkerRequest<T extends TFleetWorkerAction> = IFleetWorkerRequests[T];
|
|
277
372
|
export interface IFleetWorkerJob {
|
|
278
373
|
id: string;
|
|
@@ -392,15 +487,34 @@ export interface IFleetWorkerResponses {
|
|
|
392
487
|
move: {
|
|
393
488
|
job: IFleetWorkerJob;
|
|
394
489
|
};
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
490
|
+
/** The full view returns `{ workers }`, the summary view one page. */
|
|
491
|
+
list: IFleetWorkerFullList | IFleetWorkerSummaryPage;
|
|
492
|
+
/** The public record and the native status and excerpt the controller last observed. */
|
|
493
|
+
get: IControllerFleetWorkerView;
|
|
398
494
|
status: {
|
|
399
495
|
job: IFleetWorkerJob;
|
|
400
496
|
};
|
|
497
|
+
/** The job as it is when it settled or the wait ended; `timedOut`, it still runs. */
|
|
498
|
+
'job-wait': {
|
|
499
|
+
job: IFleetWorkerJob;
|
|
500
|
+
timedOut: boolean;
|
|
501
|
+
};
|
|
401
502
|
watch: IFleetWatchResult;
|
|
402
503
|
'native-message': {
|
|
403
504
|
job: IFleetWorkerJob;
|
|
404
505
|
};
|
|
405
506
|
}
|
|
406
507
|
export type TFleetWorkerResponse<T extends TFleetWorkerAction> = IFleetWorkerResponses[T];
|
|
508
|
+
/** Every matching public record of a full list. */
|
|
509
|
+
export interface IFleetWorkerFullList {
|
|
510
|
+
workers: IFleetWorker[];
|
|
511
|
+
}
|
|
512
|
+
/**
|
|
513
|
+
* What the request `R` of `T` gets back: a list answers a summary page to `view: 'summary'` and the full records to a
|
|
514
|
+
* request without `view` (the private request's default) or with `view: 'full'`.
|
|
515
|
+
*/
|
|
516
|
+
export type TFleetWorkerResponseTo<T extends TFleetWorkerAction, R> = T extends 'list' ? 'view' extends keyof R ? R extends {
|
|
517
|
+
view: 'summary';
|
|
518
|
+
} ? IFleetWorkerSummaryPage : R extends {
|
|
519
|
+
view: 'full';
|
|
520
|
+
} ? IFleetWorkerFullList : TFleetWorkerResponse<'list'> : IFleetWorkerFullList : TFleetWorkerResponse<T>;
|
|
@@ -1,2 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/** The actions that read and never start a job. */
|
|
2
|
+
export const fleetWorkerReadActions = ['list', 'get', 'status', 'job-wait', 'watch'];
|
|
3
|
+
/** The longest fleet worker job wait one request asks for. */
|
|
4
|
+
export const fleetWorkerJobWaitMaximumMs = 240_000;
|
|
5
|
+
/**
|
|
6
|
+
* The refusals of the fleet worker reads, passed to the caller with their message: `job_unavailable`, the controller
|
|
7
|
+
* holds no such job of the owner (jobs are transient: a controller restart or eviction drops them; read the worker
|
|
8
|
+
* with `fleet_worker_get`); `worker_not_found`, the owner has no worker of that name or id; `list_cursor_mismatch`, the
|
|
9
|
+
* cursor belongs to another filter; `list_cursor_stale`, the worker the cursor continues after is no longer held as
|
|
10
|
+
* it was; `list_cursor_invalid`, the cursor is not one a summary list returned (a `limit` or `cursor` with the full view is
|
|
11
|
+
* refused by request validation instead).
|
|
12
|
+
*/
|
|
13
|
+
export const fleetWorkerErrorCodes = ['job_unavailable', 'worker_not_found', 'list_cursor_mismatch', 'list_cursor_stale', 'list_cursor_invalid'];
|
|
14
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmxlZXR3b3JrZXJzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHNfaW50ZXJmYWNlcy9mbGVldHdvcmtlcnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBcU5BLG1EQUFtRDtBQUNuRCxNQUFNLENBQUMsTUFBTSxzQkFBc0IsR0FBRyxDQUFDLE1BQU0sRUFBRSxLQUFLLEVBQUUsUUFBUSxFQUFFLFVBQVUsRUFBRSxPQUFPLENBQWtELENBQUM7QUFHdEksOERBQThEO0FBQzlELE1BQU0sQ0FBQyxNQUFNLDJCQUEyQixHQUFHLE9BQU8sQ0FBQztBQStDbkQ7Ozs7Ozs7R0FPRztBQUNILE1BQU0sQ0FBQyxNQUFNLHFCQUFxQixHQUFHLENBQUMsaUJBQWlCLEVBQUUsa0JBQWtCLEVBQUUsc0JBQXNCLEVBQUUsbUJBQW1CLEVBQUUscUJBQXFCLENBQVUsQ0FBQyJ9
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from './interfaces.js';
|
|
2
|
+
export * from './elicitations.js';
|
|
2
3
|
export * from './functions.livetoolcoverage.js';
|
|
3
4
|
export * from './functions.workspacepaths.js';
|
|
4
5
|
export * from './functions.projectid.js';
|
|
@@ -33,4 +34,4 @@ export * from './nativesessions.js';
|
|
|
33
34
|
export * from './metrics.js';
|
|
34
35
|
export * from './devices.js';
|
|
35
36
|
export * from './requests.devices.js';
|
|
36
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
37
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90c19pbnRlcmZhY2VzL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsaUJBQWlCLENBQUM7QUFDaEMsY0FBYyxtQkFBbUIsQ0FBQztBQUNsQyxjQUFjLGlDQUFp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, ILiveBrowserDialogResponse, ILiveVideoOffer, ILiveVideoDescription, ILiveVideoStatistics, ILiveVideoAcceleration } from '@push.rocks/smartbrowser/web';
|
|
2
2
|
import type { IControllerBrowserPaintSource, IControllerBrowserPresentationState, TControllerBrowserPaintAvailability, TControllerBrowserPaintTermination } from './browserpaint.js';
|
|
3
|
-
export declare const controllerProtocolVersion:
|
|
3
|
+
export declare const controllerProtocolVersion: 52;
|
|
4
4
|
export declare const controllerUpgradeManagementVersion: 2;
|
|
5
5
|
export declare const controllerPackageName: 'agl';
|
|
6
6
|
/** The systemd user unit `agl service install` writes; a controller it runs reports it in its status. */
|
|
@@ -1438,6 +1438,8 @@ export interface IControllerSessionDetail {
|
|
|
1438
1438
|
pendingPrompts: IControllerPendingPrompt[];
|
|
1439
1439
|
permissions: IControllerPermission[];
|
|
1440
1440
|
questions: IControllerQuestion[];
|
|
1441
|
+
/** MCP elicitations of a Claude Code or Codex conversation; empty for every other harness. */
|
|
1442
|
+
elicitations: import('./elicitations.js').TControllerElicitation[];
|
|
1441
1443
|
todos: IControllerTodo[];
|
|
1442
1444
|
scratchpad: IControllerSessionScratchpad;
|
|
1443
1445
|
intelligenceExchanges: IControllerIntelligenceExchange[];
|