agl 43.2.0 → 43.3.1
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 +29 -0
- package/dist_serve/bundle.js +2845 -2638
- package/dist_serve/bundle.js.map +2 -2
- package/dist_serve/bundle.js.third-party-notices.json +1 -1
- package/dist_serve/bundle.js.third-party-notices.txt +1 -1
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/aglapi/aglapisurface.document.js +197 -17
- package/dist_ts/classes.accountsactions.d.ts +3 -1
- package/dist_ts/classes.accountsactions.js +21 -3
- package/dist_ts/classes.authstore.d.ts +7 -0
- package/dist_ts/classes.authstore.js +9 -1
- package/dist_ts/classes.claudeharness.d.ts +29 -2
- package/dist_ts/classes.claudeharness.js +35 -6
- package/dist_ts/classes.codexclientadapter.d.ts +11 -0
- package/dist_ts/classes.codexclientadapter.js +14 -2
- package/dist_ts/classes.controller.d.ts +187 -12
- package/dist_ts/classes.controller.js +1208 -186
- package/dist_ts/classes.controllerdevices.d.ts +2 -0
- package/dist_ts/classes.controllerdevices.js +6 -1
- package/dist_ts/classes.inbox.d.ts +72 -0
- package/dist_ts/classes.inbox.js +231 -0
- package/dist_ts/classes.inferencerouter.d.ts +10 -0
- package/dist_ts/classes.inferencerouter.js +5 -3
- package/dist_ts/classes.inferenceservice.js +2 -2
- package/dist_ts/classes.mcpclient.d.ts +1 -1
- package/dist_ts/classes.mcpclient.js +24 -6
- package/dist_ts/classes.mcpcontrollerhost.js +6 -1
- package/dist_ts/classes.mcptools.js +18 -8
- package/dist_ts/classes.mcpvalidation.d.ts +5 -0
- package/dist_ts/classes.mcpvalidation.js +32 -2
- package/dist_ts/classes.nativesessions.d.ts +29 -4
- package/dist_ts/classes.nativesessions.js +41 -9
- package/dist_ts/classes.opencodeclient.d.ts +23 -2
- package/dist_ts/classes.opencodeclient.js +47 -3
- package/dist_ts/classes.publishedset.d.ts +38 -0
- package/dist_ts/classes.publishedset.js +50 -0
- package/dist_ts/classes.sessionfeed.d.ts +3 -3
- package/dist_ts/classes.sessionfeed.js +18 -26
- package/dist_ts/classes.systemmetricssampler.d.ts +6 -0
- package/dist_ts/classes.systemmetricssampler.js +15 -3
- package/dist_ts/classes.ticketstore.d.ts +50 -3
- package/dist_ts/classes.ticketstore.js +45 -8
- package/dist_ts/classes.workercallers.js +4 -2
- package/dist_ts/driver/classes.directreports.d.ts +14 -4
- package/dist_ts/driver/classes.directreports.js +42 -23
- package/dist_ts/driver/classes.directreportstore.d.ts +8 -1
- package/dist_ts/driver/classes.directreportstore.js +20 -10
- package/dist_ts/driver/classes.driverservice.d.ts +44 -3
- package/dist_ts/driver/classes.driverservice.js +50 -16
- package/dist_ts/fleet/classes.claudeworkers.d.ts +21 -5
- package/dist_ts/fleet/classes.claudeworkers.js +142 -46
- package/dist_ts/fleet/classes.codexworkers.d.ts +16 -4
- package/dist_ts/fleet/classes.codexworkers.js +22 -5
- package/dist_ts/fleet/classes.workercommand.d.ts +6 -1
- package/dist_ts/fleet/classes.workercommand.js +15 -4
- package/dist_ts/fleet/classes.workers.d.ts +21 -1
- package/dist_ts/fleet/classes.workers.js +80 -40
- package/dist_ts/fleet/classes.workerstore.js +14 -8
- package/dist_ts/fleet/functions.unbounddrivers.js +2 -2
- package/dist_ts/fleet/functions.workervalidation.js +11 -4
- package/dist_ts/fleet/interfaces.workers.d.ts +27 -5
- package/dist_ts/fleet/interfaces.workers.js +8 -4
- package/dist_ts/functions.agentmessage.d.ts +3 -0
- package/dist_ts/functions.agentmessage.js +4 -1
- package/dist_ts/functions.deviceapi.d.ts +198 -4
- package/dist_ts/functions.deviceapi.js +1060 -38
- package/dist_ts/functions.exactpersistence.d.ts +3 -0
- package/dist_ts/functions.exactpersistence.js +4 -0
- package/dist_ts/functions.fleetworkercli.d.ts +1 -1
- package/dist_ts/functions.fleetworkercli.js +11 -8
- package/dist_ts/functions.inferencecli.js +3 -1
- package/dist_ts/functions.mcpfleetworkertools.js +3 -3
- package/dist_ts/functions.ticketactor.d.ts +17 -1
- package/dist_ts/functions.ticketactor.js +55 -15
- package/dist_ts/functions.ticketvalidation.js +11 -2
- package/dist_ts/interfaces.auth.d.ts +1 -1
- package/dist_ts/interfaces.auth.js +9 -1
- package/dist_ts/plugins.d.ts +3 -1
- package/dist_ts/plugins.js +7 -2
- package/dist_ts_authswitch/authority-contract.d.ts +25 -0
- package/dist_ts_authswitch/authority-contract.js +1 -1
- package/dist_ts_authswitch/authority-overview.d.ts +8 -0
- package/dist_ts_authswitch/authority-overview.js +17 -6
- package/dist_ts_authswitch/authority-placement.d.ts +20 -16
- package/dist_ts_authswitch/authority-placement.js +17 -10
- package/dist_ts_authswitch/authority-renewal.d.ts +34 -0
- package/dist_ts_authswitch/authority-renewal.js +56 -0
- package/dist_ts_authswitch/classes.authoritybroker.d.ts +8 -0
- package/dist_ts_authswitch/classes.authoritybroker.js +35 -2
- package/dist_ts_authswitch/classes.authoritycli.d.ts +1 -0
- package/dist_ts_authswitch/classes.authoritycli.js +44 -3
- package/dist_ts_authswitch/classes.authorityclient.d.ts +6 -1
- package/dist_ts_authswitch/classes.authorityclient.js +12 -4
- package/dist_ts_authswitch/classes.authoritydaemon.js +8 -1
- package/dist_ts_authswitch/classes.authoritydatabase.js +6 -2
- package/dist_ts_authswitch/classes.authoritymodels.d.ts +7 -0
- package/dist_ts_authswitch/classes.authoritymodels.js +21 -5
- package/dist_ts_interfaces/devices.d.ts +1027 -7
- package/dist_ts_interfaces/devices.js +68 -2
- package/dist_ts_interfaces/fleetworkers.d.ts +37 -10
- package/dist_ts_interfaces/fleetworkers.js +19 -8
- package/dist_ts_interfaces/inbox.d.ts +234 -0
- package/dist_ts_interfaces/inbox.js +101 -0
- package/dist_ts_interfaces/index.d.ts +1 -0
- package/dist_ts_interfaces/index.js +2 -1
- package/dist_ts_interfaces/interfaces.d.ts +10 -3
- package/dist_ts_interfaces/interfaces.js +4 -2
- package/dist_ts_interfaces/mcprequests.d.ts +34 -4
- package/dist_ts_interfaces/mcprequests.js +11 -1
- package/dist_ts_interfaces/mcpworkspacerequests.d.ts +4 -1
- package/dist_ts_interfaces/mcpworkspacerequests.js +1 -1
- package/dist_ts_interfaces/nativesessions.d.ts +16 -3
- package/dist_ts_interfaces/plugins.d.ts +2 -1
- package/dist_ts_interfaces/plugins.js +4 -2
- package/dist_ts_interfaces/requests.accounts.d.ts +21 -0
- package/dist_ts_interfaces/requests.accounts.js +3 -1
- package/dist_ts_interfaces/requests.d.ts +3 -2
- package/dist_ts_interfaces/requests.js +1 -1
- package/dist_ts_interfaces/workercallers.d.ts +2 -0
- package/dist_ts_migration/classes.documentmigrationrunner.d.ts +14 -0
- package/dist_ts_migration/classes.documentmigrationrunner.js +20 -1
- package/dist_ts_migration/index.d.ts +1 -0
- package/dist_ts_migration/index.js +2 -1
- package/dist_ts_migration/v43_ticketactornames.d.ts +32 -0
- package/dist_ts_migration/v43_ticketactornames.js +236 -0
- package/docs/authswitch.md +20 -1
- package/package.json +3 -3
- package/readme.md +144 -27
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/aglapi/aglapisurface.document.ts +196 -16
- package/ts/classes.accountsactions.ts +30 -3
- package/ts/classes.authstore.ts +10 -0
- package/ts/classes.claudeharness.ts +45 -5
- package/ts/classes.codexclientadapter.ts +14 -1
- package/ts/classes.controller.ts +1412 -262
- package/ts/classes.controllerdevices.ts +6 -0
- package/ts/classes.inbox.ts +239 -0
- package/ts/classes.inferencerouter.ts +15 -2
- package/ts/classes.inferenceservice.ts +1 -1
- package/ts/classes.mcpclient.ts +24 -3
- package/ts/classes.mcpcontrollerhost.ts +5 -0
- package/ts/classes.mcptools.ts +17 -7
- package/ts/classes.mcpvalidation.ts +27 -1
- package/ts/classes.nativesessions.ts +63 -12
- package/ts/classes.opencodeclient.ts +55 -4
- package/ts/classes.publishedset.ts +56 -0
- package/ts/classes.sessionfeed.ts +17 -20
- package/ts/classes.systemmetricssampler.ts +13 -2
- package/ts/classes.ticketstore.ts +73 -12
- package/ts/classes.workercallers.ts +3 -1
- package/ts/driver/classes.directreports.ts +42 -23
- package/ts/driver/classes.directreportstore.ts +20 -9
- package/ts/driver/classes.driverservice.ts +75 -14
- package/ts/fleet/classes.claudeworkers.ts +112 -39
- package/ts/fleet/classes.codexworkers.ts +21 -6
- package/ts/fleet/classes.workercommand.ts +14 -4
- package/ts/fleet/classes.workers.ts +75 -41
- package/ts/fleet/classes.workerstore.ts +11 -7
- package/ts/fleet/functions.unbounddrivers.ts +1 -1
- package/ts/fleet/functions.workervalidation.ts +8 -3
- package/ts/fleet/interfaces.workers.ts +26 -7
- package/ts/functions.agentmessage.ts +3 -0
- package/ts/functions.deviceapi.ts +1292 -34
- package/ts/functions.exactpersistence.ts +5 -0
- package/ts/functions.fleetworkercli.ts +10 -7
- package/ts/functions.inferencecli.ts +2 -0
- package/ts/functions.mcpfleetworkertools.ts +2 -2
- package/ts/functions.ticketactor.ts +58 -14
- package/ts/functions.ticketvalidation.ts +11 -1
- package/ts/interfaces.auth.ts +8 -0
- package/ts/plugins.ts +7 -0
- package/ts_authswitch/authority-contract.ts +20 -0
- package/ts_authswitch/authority-overview.ts +28 -6
- package/ts_authswitch/authority-placement.ts +25 -17
- package/ts_authswitch/authority-renewal.ts +64 -0
- package/ts_authswitch/classes.authoritybroker.ts +34 -1
- package/ts_authswitch/classes.authoritycli.ts +49 -2
- package/ts_authswitch/classes.authorityclient.ts +14 -4
- package/ts_authswitch/classes.authoritydaemon.ts +9 -1
- package/ts_authswitch/classes.authoritydatabase.ts +5 -1
- package/ts_authswitch/classes.authoritymodels.ts +23 -3
- package/ts_authswitch/native-contracts.md +21 -0
- package/ts_authswitch/readme.md +1 -1
- package/ts_interfaces/devices.schema.json +3576 -603
- package/ts_interfaces/devices.ts +1111 -6
- package/ts_interfaces/fleetworkers.ts +38 -10
- package/ts_interfaces/inbox.ts +287 -0
- package/ts_interfaces/index.ts +1 -0
- package/ts_interfaces/interfaces.ts +9 -2
- package/ts_interfaces/mcprequests.ts +43 -4
- package/ts_interfaces/mcpworkspacerequests.ts +4 -2
- package/ts_interfaces/nativesessions.ts +17 -3
- package/ts_interfaces/plugins.ts +3 -1
- package/ts_interfaces/requests.accounts.ts +20 -0
- package/ts_interfaces/requests.ts +4 -0
- package/ts_interfaces/workercallers.ts +2 -0
- package/ts_migration/classes.documentmigrationrunner.ts +21 -0
- package/ts_migration/index.ts +1 -0
- package/ts_migration/v43_ticketactornames.ts +225 -0
- package/ts_web/00_commitinfo_data.ts +1 -1
- package/ts_web/accounts.plugins.ts +4 -2
- package/ts_web/classes.accountsreadmodel.ts +33 -0
- package/ts_web/classes.browserpresentation.ts +10 -5
- package/ts_web/classes.inboxfeed.ts +329 -0
- package/ts_web/classes.nativesessionstate.ts +9 -23
- package/ts_web/elements.accounts.ts +81 -0
- package/ts_web/elements.deployments.ts +66 -2
- package/ts_web/elements.fleetworker.ts +4 -2
- package/ts_web/elements.harnesscontrollerapp.ts +107 -37
- package/ts_web/elements.inbox.ts +808 -0
- package/ts_web/functions.inbox.ts +95 -0
- package/ts_web/functions.sessioncards.ts +40 -0
- package/ts_web/plugins.ts +2 -0
|
@@ -36,6 +36,14 @@ export declare const settleControllerAttentionLists: (permissionsPromiseArg: Pro
|
|
|
36
36
|
permissions: IControllerPermission[];
|
|
37
37
|
questions: IControllerQuestion[];
|
|
38
38
|
}>;
|
|
39
|
+
/**
|
|
40
|
+
* A failed fleet `native-message` in the fleet's terms, so its job's outcome says whether the message may have arrived
|
|
41
|
+
* (`IFleetWorkerJob.errorOutcome`): a refusal that proves nothing reached the job, one of the send's own refusals of the
|
|
42
|
+
* session (`fleetNativeMessageRefusals`, before the send and again under the session's lock) or a native send failure
|
|
43
|
+
* that says `refused`, is a `FleetDispatchError` that sent nothing, with the same message; any other failure stays as
|
|
44
|
+
* it is, an unknown outcome.
|
|
45
|
+
*/
|
|
46
|
+
export declare const fleetNativeMessageFailure: (errorArg: unknown) => unknown;
|
|
39
47
|
export type TControllerManagedSessionAuthority = 'managed' | 'definitively_unmanaged' | 'uncertain';
|
|
40
48
|
export declare class OpenCodeController {
|
|
41
49
|
readonly options: IControllerStartOptions;
|
|
@@ -207,6 +215,47 @@ export declare class OpenCodeController {
|
|
|
207
215
|
private acknowledgeSessionFeedRow;
|
|
208
216
|
/** The sidebar's session list, merged from the conversations, fleet, terminals and board the controller already reads. */
|
|
209
217
|
private startSessionFeed;
|
|
218
|
+
/** What waits for the owner, for the browser and devices alike (AGL-1635). */
|
|
219
|
+
private inbox?;
|
|
220
|
+
private startInbox;
|
|
221
|
+
/** The Inbox's items of one source, each read from the component that owns them. */
|
|
222
|
+
private readInboxSource;
|
|
223
|
+
/** The session feed's row of a session, and the name the Inbox shows for it. */
|
|
224
|
+
private inboxRow;
|
|
225
|
+
/**
|
|
226
|
+
* The items of a session's requests. A permission that the owner's auto-accept answers (`autoAcceptedArg`) waits for
|
|
227
|
+
* nobody and is left out; questions and MCP forms are never answered automatically.
|
|
228
|
+
*/
|
|
229
|
+
private inboxSessionItems;
|
|
230
|
+
/** A native session as the Inbox names it: where it runs and how the browser opens it. */
|
|
231
|
+
private inboxNativeWhere;
|
|
232
|
+
/** The requests Claude Code holds: its conversations' and those of AGL's turns in native sessions. */
|
|
233
|
+
private readInboxClaude;
|
|
234
|
+
/** The requests the Codex connections hold: the conversations' and, on the fleet's connection, the native threads'. */
|
|
235
|
+
private readInboxCodex;
|
|
236
|
+
/**
|
|
237
|
+
* The requests of the OpenCode conversations the feed shows waiting, from the project's pending lists, and of their
|
|
238
|
+
* direct children (subagents), from `readOpenCodeFamilyAttention`, the read the browser's child scopes use: only a
|
|
239
|
+
* managed conversation has children AGL answers. A project or a conversation whose read fails keeps the items it had.
|
|
240
|
+
*/
|
|
241
|
+
private readInboxOpenCode;
|
|
242
|
+
/** The failures of the Inbox's partial reads, by what failed: a lasting one is reported once. */
|
|
243
|
+
private readonly inboxErrors;
|
|
244
|
+
private reportInboxError;
|
|
245
|
+
/**
|
|
246
|
+
* The Flex permissions of the conversations the feed shows waiting, and of the driver, by the run that asks (a
|
|
247
|
+
* subagent's by its root conversation). A permission the owner's auto-accept answers is left out.
|
|
248
|
+
*/
|
|
249
|
+
private readInboxFlex;
|
|
250
|
+
/** The sessions whose harness waits in its own client: AGL holds no request for them, so they are answered there. */
|
|
251
|
+
private readInboxNativeWaits;
|
|
252
|
+
/** The driver's `needs input:` turn, as the driver service found it; its own prompts are Flex session prompts. */
|
|
253
|
+
private readInboxDriver;
|
|
254
|
+
/**
|
|
255
|
+
* The board's open questions that wait for the owner: every one the owner did not ask, on a ticket that is not done.
|
|
256
|
+
* A deploy plan's and a maintenance window's question is the owner's go, shown with what the deploy monitor observes.
|
|
257
|
+
*/
|
|
258
|
+
private readInboxTickets;
|
|
210
259
|
private ticketNotifier?;
|
|
211
260
|
private boardPump?;
|
|
212
261
|
private deployMonitor?;
|
|
@@ -843,6 +892,33 @@ export declare class OpenCodeController {
|
|
|
843
892
|
private updateControllerSettings;
|
|
844
893
|
private retireResourceForPrincipal;
|
|
845
894
|
private prepareMcpSessionTarget;
|
|
895
|
+
/**
|
|
896
|
+
* Whether an MCP request names a Claude Code session outside AGL's conversations of the project: a `claude` id that no
|
|
897
|
+
* conversation of this project records. Such an id is served by the native path, everything else by the managed one.
|
|
898
|
+
*/
|
|
899
|
+
private isMcpNativeClaudeId;
|
|
900
|
+
/**
|
|
901
|
+
* The Claude Code session outside AGL that an MCP caller names in a project: only a session of the host's own Claude
|
|
902
|
+
* Code home, as the session feed lists it, whose directory is the project folder itself, and that no other project's
|
|
903
|
+
* conversation records. Anything else is `session_not_found`; nothing is recorded.
|
|
904
|
+
*/
|
|
905
|
+
private requireMcpNativeClaudeTarget;
|
|
906
|
+
/** The project's scope for Claude Code sessions outside AGL: the host's own home, the exact folder, no other project's conversation. */
|
|
907
|
+
private inMcpNativeScope;
|
|
908
|
+
/**
|
|
909
|
+
* The Claude Code sessions of the host's own Claude Code home whose directory is the project folder itself and that no
|
|
910
|
+
* project conversation records, for `sessions_list`: running ones first, all of them, then the newest settled ones up
|
|
911
|
+
* to `controllerMcpNativeSessionSettledLimit`. An inventory that cannot be read is named, never hidden.
|
|
912
|
+
*/
|
|
913
|
+
private listMcpNativeClaudeSessions;
|
|
914
|
+
/** `session_read` of a Claude Code session outside AGL: the session, its newest transcript page and its scratchpad. */
|
|
915
|
+
private readMcpNativeClaudeSession;
|
|
916
|
+
/**
|
|
917
|
+
* An agent message to a Claude Code background job outside AGL, after the project's switch: behind the
|
|
918
|
+
* `session_message` header naming the caller, through the one native send, which wakes a settled job and puts the
|
|
919
|
+
* message into a running job's inbox. A send that may have reached the job is `outcome_unknown`, never resent.
|
|
920
|
+
*/
|
|
921
|
+
private deliverNativeAgentMessage;
|
|
846
922
|
/**
|
|
847
923
|
* Any caller may message a task: unlike a task mutation, no ownership is required. The target
|
|
848
924
|
* must still be an active root task of the project the request names; archived tasks and child
|
|
@@ -863,6 +939,11 @@ export declare class OpenCodeController {
|
|
|
863
939
|
private cliCallerClaudeSession;
|
|
864
940
|
/** The chat this MCP call runs as, proven by the credential on the request envelope. */
|
|
865
941
|
private mcpCaller;
|
|
942
|
+
/**
|
|
943
|
+
* The owner's active direct report whose session an MCP caller acts in, read once per ticket request: a ticket names
|
|
944
|
+
* the caller by it (AGL-1686). None for a caller without a session or whose session is no active report.
|
|
945
|
+
*/
|
|
946
|
+
private mcpCallerReportName;
|
|
866
947
|
private mcpIdentityRequired;
|
|
867
948
|
private mcpSubjectForbidden;
|
|
868
949
|
/** Discovery and mutation both require an identity; only the reach differs. */
|
|
@@ -1076,9 +1157,26 @@ export declare class OpenCodeController {
|
|
|
1076
1157
|
* unauthenticated preflight budget; a pairing and a proof are audited, under the unauthenticated audit budget.
|
|
1077
1158
|
*/
|
|
1078
1159
|
private registerDevicePairingHandlers;
|
|
1160
|
+
/**
|
|
1161
|
+
* A device's answer to a direct child (an OpenCode subagent) of the session it names: the session must be an OpenCode
|
|
1162
|
+
* conversation the feed lists, and the child is proven a running direct child of it as the browser's child scopes do.
|
|
1163
|
+
*/
|
|
1164
|
+
private replyDeviceChildRequest;
|
|
1165
|
+
/**
|
|
1166
|
+
* A conversation's transcript page and what it waits for, as a device reads it through the browser's session read:
|
|
1167
|
+
* the newest page without `before`, sized by the controller, else the next older page of `limit` messages.
|
|
1168
|
+
*/
|
|
1169
|
+
private readDeviceConversation;
|
|
1170
|
+
/**
|
|
1171
|
+
* The host's driver session for a device's read or send, as the driver's status names it now; refused while there is
|
|
1172
|
+
* none. A device never creates the driver.
|
|
1173
|
+
*/
|
|
1174
|
+
private deviceDriverSession;
|
|
1079
1175
|
/**
|
|
1080
1176
|
* Scope `device`: the session feed, bounded transcript reads, direct sends and permission and question answers of an
|
|
1081
|
-
* authenticated device
|
|
1177
|
+
* authenticated device, the Inbox, the driver, the direct reports, the host's status and the shared board -- through
|
|
1178
|
+
* the same operations the owner's browser runs, audited as `device:<id>`. `publicOriginArg` is the origin the scope
|
|
1179
|
+
* admits.
|
|
1082
1180
|
*/
|
|
1083
1181
|
private registerDeviceHandlers;
|
|
1084
1182
|
/**
|
|
@@ -1150,6 +1248,19 @@ export declare class OpenCodeController {
|
|
|
1150
1248
|
* alike. The harness checks the reply against the pending request before it sends anything; elicitations are never
|
|
1151
1249
|
* answered automatically, auto-accept included.
|
|
1152
1250
|
*/
|
|
1251
|
+
/**
|
|
1252
|
+
* Answers a permission or question of a direct child (an OpenCode subagent) of a managed root conversation, for the
|
|
1253
|
+
* owner's browser and a paired device alike: `verifyArg` proves the session is a direct child of the root (the
|
|
1254
|
+
* browser's child scope, or the same direct-child check for a device) and, while `activeRequiredArg`, that it runs. It
|
|
1255
|
+
* runs before the pending list is read, before the answer is sent and after it; `null` answers reject a question.
|
|
1256
|
+
*/
|
|
1257
|
+
private replyChildRequestForPrincipal;
|
|
1258
|
+
/**
|
|
1259
|
+
* A device's proof that `childSessionIdArg` is a direct child of the managed root conversation, by the check the
|
|
1260
|
+
* browser's child scopes run (`observeOpenCodeDirectChild`), and, while `activeRequiredArg`, that it runs: a child
|
|
1261
|
+
* whose turn ended takes no answer.
|
|
1262
|
+
*/
|
|
1263
|
+
private verifyDeviceDirectChild;
|
|
1153
1264
|
private replyElicitationForPrincipal;
|
|
1154
1265
|
/**
|
|
1155
1266
|
* Answers a permission request of a conversation, for the owner's browser and a paired device alike: the request must
|
|
@@ -1164,6 +1275,29 @@ export declare class OpenCodeController {
|
|
|
1164
1275
|
private registerResourceHandlers;
|
|
1165
1276
|
private registerBrowserHandlers;
|
|
1166
1277
|
private registerTicketHandlers;
|
|
1278
|
+
/**
|
|
1279
|
+
* Answers a ticket question as the owner, for the owner's browser and a paired device alike, audited as
|
|
1280
|
+
* `ticket.answer` with the peer. A deploy plan's or a maintenance window's question takes it as the owner's go. The
|
|
1281
|
+
* identical answer again is a confirmed replay; a different one is refused (`ticket_question_answered`), and the
|
|
1282
|
+
* client keeps the owner's choice.
|
|
1283
|
+
*/
|
|
1284
|
+
private answerTicketForPrincipal;
|
|
1285
|
+
/**
|
|
1286
|
+
* Comments on a ticket, asks on it or moves it as the owner, for the owner's browser and a paired device alike,
|
|
1287
|
+
* audited as `ticket.comment`, `ticket.ask` or `ticket.move` with the peer (the envelope alone). The ticket store
|
|
1288
|
+
* decides every change in one transaction: a refusal changes nothing and carries the store's code and reason.
|
|
1289
|
+
*/
|
|
1290
|
+
private changeTicketForPrincipal;
|
|
1291
|
+
/**
|
|
1292
|
+
* The owner, whom a device's ticket request runs as, and what the device's ticket views read besides the tickets:
|
|
1293
|
+
* the owner's principal id, which they replace with the `owner` kind, and the session feed's published rows.
|
|
1294
|
+
*/
|
|
1295
|
+
private deviceTicketViewer;
|
|
1296
|
+
/** The ticket a ticket's `parentId` names, which a device's card and detail name; a store refusal as a device's. */
|
|
1297
|
+
private deviceTicketParent;
|
|
1298
|
+
private requireInbox;
|
|
1299
|
+
/** The Inbox: what waits for the owner, read after every source that changed (AGL-1635). */
|
|
1300
|
+
private registerInboxHandlers;
|
|
1167
1301
|
/**
|
|
1168
1302
|
* The host's driver: one Flex session that no session list shows, opened from the topbar. Fleet
|
|
1169
1303
|
* events reach it through the relay once it exists.
|
|
@@ -1217,7 +1351,8 @@ export declare class OpenCodeController {
|
|
|
1217
1351
|
private discoverFleetScope;
|
|
1218
1352
|
/** The driver session, or undefined when the controller definitively no longer has it. */
|
|
1219
1353
|
private readDriverSession;
|
|
1220
|
-
|
|
1354
|
+
/** The driver's newest assistant transcript entry with text: the entry's own id (a Flex message or part id). */
|
|
1355
|
+
private latestDriverAssistantMessage;
|
|
1221
1356
|
/** A queued relay message keeps its id, sender, FIFO position and persistence mirror. Never edits held input. */
|
|
1222
1357
|
private mergeQueuedDriverEvents;
|
|
1223
1358
|
/** One relayed batch of fleet events, queued into the driver session as an attributed agent message. */
|
|
@@ -1226,6 +1361,8 @@ export declare class OpenCodeController {
|
|
|
1226
1361
|
private driverNativeIds;
|
|
1227
1362
|
/** The driver is opened from the topbar only; it is never admitted, archived or deleted like a task. */
|
|
1228
1363
|
private assertNotDriverSession;
|
|
1364
|
+
/** A driver operation for the browser: a `DriverError` is answered with its own code (a device's: `serveDeviceDriver`). */
|
|
1365
|
+
private serveDriver;
|
|
1229
1366
|
/** The driver topbar: the host's one driver session, its status, and the unread turns it marks seen. */
|
|
1230
1367
|
private registerDriverHandlers;
|
|
1231
1368
|
/** The Deployments view: status, history, a probe now and release state (AGL-911, AGL-914). */
|
|
@@ -1264,20 +1401,31 @@ export declare class OpenCodeController {
|
|
|
1264
1401
|
/** The requests of AGL's own turns in a native session that wait for an answer. */
|
|
1265
1402
|
private nativeSessionAttention;
|
|
1266
1403
|
private replyNativeSessionRequest;
|
|
1267
|
-
/**
|
|
1404
|
+
/**
|
|
1405
|
+
* Native session failures are bounded messages; the session view and the fleet's receipt show them as they are. Each
|
|
1406
|
+
* says what it did (`INativeSessionFailedErrorData`). `effectArg` `none` means the operation sends the session
|
|
1407
|
+
* nothing (a read, the session's resolution, AGL's own scratchpad), so it is `refused`: a scratchpad save under `none`
|
|
1408
|
+
* is safe to repeat because its `expectedRevision` refuses a second write of the same revision. A send or an answer
|
|
1409
|
+
* (`dispatch`) is `refused` only where the fleet proved it never went out, and `unknown` otherwise.
|
|
1410
|
+
*/
|
|
1268
1411
|
private serveNativeSession;
|
|
1269
1412
|
/**
|
|
1270
|
-
* The one send to a native session, for the browser's `controller.nativesession.send
|
|
1271
|
-
* `native-message`: audited as `session.send`, under the session's lock, where the
|
|
1272
|
-
* `assertArg` refuses what this caller may not write to, so a session
|
|
1273
|
-
* Codex thread goes through its shared server, a Claude Code background job is
|
|
1274
|
-
*
|
|
1413
|
+
* The one send to a native session, for the browser's `controller.nativesession.send`, a paired device, the fleet's
|
|
1414
|
+
* `native-message` and an MCP `session_message`: audited as `session.send`, under the session's lock, where the
|
|
1415
|
+
* session is resolved again and `assertArg` refuses what this caller may not write to, so a session whose state
|
|
1416
|
+
* changed meanwhile is refused. A Codex thread goes through its shared server, a Claude Code background job is reached
|
|
1417
|
+
* through Claude Code itself (woken while settled, its inbox while it runs), and another settled Claude Code session
|
|
1418
|
+
* resumes in AGL's own Claude Code. The owner's own text (`ownerArg`) goes into a job's inbox as the owner's agent
|
|
1419
|
+
* message: a peer message names no sender of its own. Resolves right after the dispatch with, for a job, how it took
|
|
1420
|
+
* the message, and reads nothing after it: a failed read must never turn a delivered message into a refusal, which a
|
|
1421
|
+
* caller would answer by sending again. A caller that shows the session reads it afterwards.
|
|
1275
1422
|
*/
|
|
1276
1423
|
private sendNativeSession;
|
|
1277
1424
|
/**
|
|
1278
1425
|
* The fleet's `native-message`: resolves the Claude Code background job the caller names by id or prefix, refuses
|
|
1279
1426
|
* what the browser's send would refuse and what is no background job, each with its reason and the adopt command,
|
|
1280
|
-
* and sends the message behind the `session_message` attribution header through `sendNativeSession
|
|
1427
|
+
* and sends the message behind the `session_message` attribution header through `sendNativeSession`: a wake of a
|
|
1428
|
+
* settled job, or its inbox while it runs.
|
|
1281
1429
|
*/
|
|
1282
1430
|
private sendFleetNativeMessage;
|
|
1283
1431
|
/** Who a fleet owner capability's agent message is from, as its header states it: what the controller proved. */
|
|
@@ -1290,9 +1438,10 @@ export declare class OpenCodeController {
|
|
|
1290
1438
|
*/
|
|
1291
1439
|
private sendNativeClaudeSession;
|
|
1292
1440
|
/**
|
|
1293
|
-
*
|
|
1294
|
-
*
|
|
1295
|
-
* the message never reached
|
|
1441
|
+
* Sends to a Claude Code background job through Claude Code itself, so the job stays the session's owner: a settled
|
|
1442
|
+
* job is woken with the message, a running one takes it in its inbox, as the resolution prepared it. Claude Code does
|
|
1443
|
+
* not report when the turn that reads it ends, so the upload stays for the sweep unless the message never reached
|
|
1444
|
+
* Claude Code.
|
|
1296
1445
|
*/
|
|
1297
1446
|
private sendNativeClaudeJob;
|
|
1298
1447
|
/**
|
|
@@ -1300,8 +1449,23 @@ export declare class OpenCodeController {
|
|
|
1300
1449
|
* message ended; when the server's answer leaves that open, it stays for the sweep.
|
|
1301
1450
|
*/
|
|
1302
1451
|
private sendNativeCodexSession;
|
|
1452
|
+
/**
|
|
1453
|
+
* A direct report operation for the owner's browser or a device, given the owner: its failures reach them as
|
|
1454
|
+
* `directReportFailure` decides, by the error's class.
|
|
1455
|
+
*/
|
|
1456
|
+
private serveDirectReport;
|
|
1303
1457
|
/** The Driver view's direct reports: sessions that report to the owner, appointed from the fleet or adopted by reference. */
|
|
1304
1458
|
private registerDirectReportHandlers;
|
|
1459
|
+
/**
|
|
1460
|
+
* The owner's own message to the active direct report `name`, from the Driver view or a paired device, audited as
|
|
1461
|
+
* `session.message` from the `Owner` for the caller. A fleet worker report is steered through the report's driver
|
|
1462
|
+
* ticket, as the driver's `directreport_message` does, and answers with the settled steer job as the fleet recorded
|
|
1463
|
+
* it, audited `failed` unless the job succeeded; the caller shows a failed job's error by its code
|
|
1464
|
+
* (`directReportJobView`, `deviceDirectReportJobRefusal`), and one that may have delivered it (`errorOutcome`) as of
|
|
1465
|
+
* unknown outcome. A steer the fleet refused is `direct_report_failed`
|
|
1466
|
+
* (`directReportFailure`), also audited `failed`. A Codex thread takes it as the owner's agent message.
|
|
1467
|
+
*/
|
|
1468
|
+
private messageDirectReportForPrincipal;
|
|
1305
1469
|
/** The driver session's instructions, notes and tools; the caller checked its session authority. */
|
|
1306
1470
|
private handleFlexDriverHostRequest;
|
|
1307
1471
|
/**
|
|
@@ -1354,6 +1518,10 @@ export declare class OpenCodeController {
|
|
|
1354
1518
|
/** The active workspace a workspace request names, or the refusal. */
|
|
1355
1519
|
private requireActiveWorkspace;
|
|
1356
1520
|
private registerTerminalHandlers;
|
|
1521
|
+
/**
|
|
1522
|
+
* Runs an operation between its `attempted` record and its terminal one. `outcomeOfArg` names the outcome of an
|
|
1523
|
+
* operation that returns its own failure (a settled job that failed), which is then recorded `failed`.
|
|
1524
|
+
*/
|
|
1357
1525
|
private runAudited;
|
|
1358
1526
|
private requireProjectsRoot;
|
|
1359
1527
|
private registerExplicitInitialProject;
|
|
@@ -1680,6 +1848,13 @@ export declare class OpenCodeController {
|
|
|
1680
1848
|
private requireChildScope;
|
|
1681
1849
|
private boundOpenCodeChildMessagePage;
|
|
1682
1850
|
private openChildScope;
|
|
1851
|
+
/**
|
|
1852
|
+
* The requests that wait in a managed OpenCode root conversation and in its direct children, from the controller's
|
|
1853
|
+
* own reads (OpenCode's pending lists and the root's direct children), whichever browser has the conversation open:
|
|
1854
|
+
* the root's own requests, and each direct child with requests, the most recently updated first. `strictArg` lets a
|
|
1855
|
+
* failed pending list fail the read instead of reading as empty.
|
|
1856
|
+
*/
|
|
1857
|
+
private readOpenCodeFamilyAttention;
|
|
1683
1858
|
private readBrowserChildAttention;
|
|
1684
1859
|
private sessionEventIsManaged;
|
|
1685
1860
|
private readControllerSession;
|