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
|
@@ -31,11 +31,15 @@ import { AglConfigurationPane, type IConfigurationOpenSettingsDetail,
|
|
|
31
31
|
import { AglTicketBoard } from './elements.ticketboard.js';
|
|
32
32
|
import { AglMetricsBoard } from './elements.metricsboard.js';
|
|
33
33
|
import { AglDeployments } from './elements.deployments.js';
|
|
34
|
+
import { type IInboxOpenDetail } from './elements.inbox.js';
|
|
35
|
+
import './elements.inbox.js';
|
|
36
|
+
import { InboxFeed } from './classes.inboxfeed.js';
|
|
34
37
|
import { deploymentsAttentionCount, deploymentsHref } from './functions.deployments.js';
|
|
35
38
|
import { AglFleetWorker } from './elements.fleetworker.js';
|
|
36
39
|
import { AglNativeSession } from './elements.nativesession.js';
|
|
37
40
|
import type { ISessionIntelligenceRemedyDetail } from './classes.nativesessionstate.js';
|
|
38
41
|
import { ElicitationCards, elicitationReply } from './classes.elicitationcards.js';
|
|
42
|
+
import { permissionCard, questionCardId, questionCards } from './functions.sessioncards.js';
|
|
39
43
|
import {
|
|
40
44
|
renderSessionChat,
|
|
41
45
|
sessionIntelligenceAvailabilityAction,
|
|
@@ -2371,6 +2375,10 @@ export class HarnessControllerApp extends plugins.deesElement.DeesElement {
|
|
|
2371
2375
|
private readonly answeredPermissionCards = new Map<string, plugins.deesCatalog.IHarnessPermissionRequest>();
|
|
2372
2376
|
// MCP elicitation cards of the viewed session: a card and its refusal keep their objects across renders.
|
|
2373
2377
|
private readonly elicitationCards = new ElicitationCards(controllerRuntimeIdToUiKey);
|
|
2378
|
+
/** The Inbox, listed on connect and kept current by `inbox.changed`; the header counts what waits. */
|
|
2379
|
+
private readonly inboxFeed = new InboxFeed({
|
|
2380
|
+
list: () => this.socketClient.fire<interfaces.IReq_ControllerInboxList>('controller.inbox.list', {}),
|
|
2381
|
+
});
|
|
2374
2382
|
// Multi-question requests answer card-by-card; the reply fires once all
|
|
2375
2383
|
// cards of the request are in.
|
|
2376
2384
|
private readonly pendingQuestionBatchAnswers = new Map<string, Map<number, string[]>>();
|
|
@@ -2672,6 +2680,10 @@ export class HarnessControllerApp extends plugins.deesElement.DeesElement {
|
|
|
2672
2680
|
@plugins.deesElement.state()
|
|
2673
2681
|
accessor deploymentsSelected = false;
|
|
2674
2682
|
|
|
2683
|
+
/** Whether the main pane shows the Inbox. */
|
|
2684
|
+
@plugins.deesElement.state()
|
|
2685
|
+
accessor inboxSelected = false;
|
|
2686
|
+
|
|
2675
2687
|
/** How many deploy targets run less than their newest release, rolled back or do not answer: the header badge. */
|
|
2676
2688
|
@plugins.deesElement.state()
|
|
2677
2689
|
accessor deploymentsAttention = 0;
|
|
@@ -2763,6 +2775,8 @@ export class HarnessControllerApp extends plugins.deesElement.DeesElement {
|
|
|
2763
2775
|
// The workspace editor's Monaco comes from the controller's own origin, which serves the very
|
|
2764
2776
|
// build the catalog pins; its language workers start there too.
|
|
2765
2777
|
libLoader.provideMonacoBaseUrl(interfaces.controllerMonacoAssetPath);
|
|
2778
|
+
// The header counts what waits in the Inbox.
|
|
2779
|
+
this.inboxFeed.subscribe(() => this.requestUpdate());
|
|
2766
2780
|
this.socketClient = new ControllerSocketClient({
|
|
2767
2781
|
onStatus: (statusArg) => this.handleConnectionStatus(statusArg),
|
|
2768
2782
|
onControllerEvent: (eventArg) => this.handleControllerEvent(eventArg),
|
|
@@ -4464,6 +4478,7 @@ export class HarnessControllerApp extends plugins.deesElement.DeesElement {
|
|
|
4464
4478
|
this.boardSelected = false;
|
|
4465
4479
|
this.metricsSelected = false;
|
|
4466
4480
|
this.deploymentsSelected = false;
|
|
4481
|
+
this.inboxSelected = false;
|
|
4467
4482
|
this.fleetWorkerSelected = '';
|
|
4468
4483
|
this.nativeSessionSelected = undefined;
|
|
4469
4484
|
this.directReportViews = undefined;
|
|
@@ -4474,6 +4489,7 @@ export class HarnessControllerApp extends plugins.deesElement.DeesElement {
|
|
|
4474
4489
|
this.sessionFeedRevision = 0;
|
|
4475
4490
|
this.sessionFeedBufferedDeltas = undefined;
|
|
4476
4491
|
this.sessionFeedRequestId += 1;
|
|
4492
|
+
this.inboxFeed.clear();
|
|
4477
4493
|
this.resourceViewSelected = false;
|
|
4478
4494
|
this.driverStatus = undefined;
|
|
4479
4495
|
this.selectedSessionId = undefined;
|
|
@@ -5172,6 +5188,7 @@ export class HarnessControllerApp extends plugins.deesElement.DeesElement {
|
|
|
5172
5188
|
this.refreshDeploymentsAttention(),
|
|
5173
5189
|
this.refreshDirectReports(),
|
|
5174
5190
|
this.refreshSessionFeed(),
|
|
5191
|
+
this.inboxFeed.refresh(),
|
|
5175
5192
|
]);
|
|
5176
5193
|
void this.retryStaleDraftSessionCleanup();
|
|
5177
5194
|
void this.refreshModelCatalog();
|
|
@@ -8281,7 +8298,8 @@ export class HarnessControllerApp extends plugins.deesElement.DeesElement {
|
|
|
8281
8298
|
);
|
|
8282
8299
|
const standaloneResourceSelected = this.selectedSessionId === undefined
|
|
8283
8300
|
&& (isNonEmptyString(this.selectedResourceId) || this.selectedConfigurationResource !== undefined
|
|
8284
|
-
|| this.boardSelected || this.metricsSelected || this.deploymentsSelected || this.
|
|
8301
|
+
|| this.boardSelected || this.metricsSelected || this.deploymentsSelected || this.inboxSelected
|
|
8302
|
+
|| this.fleetWorkerSelected !== ''
|
|
8285
8303
|
|| this.nativeSessionSelected !== undefined);
|
|
8286
8304
|
if (
|
|
8287
8305
|
!selectedStillExists
|
|
@@ -10538,6 +10556,7 @@ export class HarnessControllerApp extends plugins.deesElement.DeesElement {
|
|
|
10538
10556
|
this.boardSelected = false;
|
|
10539
10557
|
this.metricsSelected = false;
|
|
10540
10558
|
this.deploymentsSelected = false;
|
|
10559
|
+
this.inboxSelected = false;
|
|
10541
10560
|
this.fleetWorkerSelected = '';
|
|
10542
10561
|
this.nativeSessionSelected = undefined;
|
|
10543
10562
|
this.resourceViewSelected = false;
|
|
@@ -13796,7 +13815,7 @@ ${entry.detail.stack}`}</pre>`}
|
|
|
13796
13815
|
for (const candidateArg of sourceArg.questions) {
|
|
13797
13816
|
const requestKey = controllerRuntimeIdToUiKey(candidateArg.id);
|
|
13798
13817
|
const matchedIndex = candidateArg.questions.findIndex((_questionArg, indexArg) => (
|
|
13799
|
-
cardId === (candidateArg.questions.length
|
|
13818
|
+
cardId === questionCardId(requestKey, candidateArg.questions.length, indexArg)
|
|
13800
13819
|
));
|
|
13801
13820
|
if (matchedIndex >= 0) {
|
|
13802
13821
|
request = candidateArg;
|
|
@@ -17003,6 +17022,11 @@ ${entry.detail.stack}`}</pre>`}
|
|
|
17003
17022
|
if (eventArg.sessionFeed) this.applySessionFeedDelta(eventArg.sessionFeed);
|
|
17004
17023
|
return;
|
|
17005
17024
|
}
|
|
17025
|
+
// Inbox deltas change the Inbox and its header count, nothing else on screen.
|
|
17026
|
+
if (eventArg.type === 'inbox.changed') {
|
|
17027
|
+
this.inboxFeed.apply(eventArg.inbox);
|
|
17028
|
+
return;
|
|
17029
|
+
}
|
|
17006
17030
|
// Usage deltas reach only a browser that watches a usage window: the metrics board's.
|
|
17007
17031
|
if (eventArg.type === 'usage.changed') {
|
|
17008
17032
|
if (eventArg.usageDelta) this.metricsBoard()?.applyDelta(eventArg.usageDelta);
|
|
@@ -17306,6 +17330,7 @@ ${entry.detail.stack}`}</pre>`}
|
|
|
17306
17330
|
this.boardSelected = false;
|
|
17307
17331
|
this.metricsSelected = false;
|
|
17308
17332
|
this.deploymentsSelected = false;
|
|
17333
|
+
this.inboxSelected = false;
|
|
17309
17334
|
this.fleetWorkerSelected = '';
|
|
17310
17335
|
this.nativeSessionSelected = undefined;
|
|
17311
17336
|
this.resourceViewSelected = false;
|
|
@@ -19951,6 +19976,7 @@ ${entry.detail.stack}`}</pre>`}
|
|
|
19951
19976
|
@clicked=${this.showErrorJournalModal}
|
|
19952
19977
|
></dees-button>`}
|
|
19953
19978
|
${this.renderDriverButton(current === 'driver')}
|
|
19979
|
+
${this.renderInboxButton(current === 'inbox')}
|
|
19954
19980
|
${(['terminal', 'browser', 'workspace'] as const).map((kindArg) => plugins.deesElement.html`
|
|
19955
19981
|
<dees-button
|
|
19956
19982
|
class=${`${kindArg}sButton headerNavButton resourceNavButton`}
|
|
@@ -20117,6 +20143,8 @@ ${entry.detail.stack}`}</pre>`}
|
|
|
20117
20143
|
? this.renderNativeSession(this.nativeSessionSelected)
|
|
20118
20144
|
: this.boardSelected
|
|
20119
20145
|
? this.renderBoard()
|
|
20146
|
+
: this.inboxSelected
|
|
20147
|
+
? this.renderInbox()
|
|
20120
20148
|
: this.metricsSelected
|
|
20121
20149
|
? this.renderMetrics()
|
|
20122
20150
|
: this.deploymentsSelected
|
|
@@ -20387,9 +20415,10 @@ ${entry.detail.stack}`}</pre>`}
|
|
|
20387
20415
|
* The header entry whose view the main pane shows, in the main pane's own precedence: a fleet
|
|
20388
20416
|
* worker, a native session or a configuration resource is no header view.
|
|
20389
20417
|
*/
|
|
20390
|
-
private headerNavCurrent(): 'driver' | 'board' | 'deployments' | 'metrics' | interfaces.TControllerResourceKind | undefined {
|
|
20418
|
+
private headerNavCurrent(): 'driver' | 'inbox' | 'board' | 'deployments' | 'metrics' | interfaces.TControllerResourceKind | undefined {
|
|
20391
20419
|
if (this.fleetWorkerSelected || this.nativeSessionSelected) return undefined;
|
|
20392
20420
|
if (this.boardSelected) return 'board';
|
|
20421
|
+
if (this.inboxSelected) return 'inbox';
|
|
20393
20422
|
if (this.deploymentsSelected) return 'deployments';
|
|
20394
20423
|
if (this.metricsSelected) return 'metrics';
|
|
20395
20424
|
if (this.selectedConfigurationResource) return undefined;
|
|
@@ -20742,6 +20771,19 @@ ${entry.detail.stack}`}</pre>`}
|
|
|
20742
20771
|
});
|
|
20743
20772
|
}
|
|
20744
20773
|
|
|
20774
|
+
/** Shows the Inbox, which the header button opens. */
|
|
20775
|
+
private openInbox(): Promise<void> {
|
|
20776
|
+
if (this.inboxSelected) return Promise.resolve();
|
|
20777
|
+
return this.leaveWorkspaceThen(() => {
|
|
20778
|
+
this.beginWorkspaceSelection();
|
|
20779
|
+
this.selectedResourceId = '';
|
|
20780
|
+
this.deselectConversationForStandaloneResource();
|
|
20781
|
+
void this.closeBrowserView();
|
|
20782
|
+
this.closeTerminalView();
|
|
20783
|
+
this.inboxSelected = true;
|
|
20784
|
+
});
|
|
20785
|
+
}
|
|
20786
|
+
|
|
20745
20787
|
/** Reads the deploy status for the header badge; `deployments.changed` reads it again. */
|
|
20746
20788
|
private async refreshDeploymentsAttention(): Promise<void> {
|
|
20747
20789
|
const generation = this.connectionGeneration;
|
|
@@ -21055,7 +21097,7 @@ ${entry.detail.stack}`}</pre>`}
|
|
|
21055
21097
|
* not track yet becomes first, its terminal, the fleet worker bound to a native session, or the native session
|
|
21056
21098
|
* itself, where it runs and with no project. A row that cannot open says why in the sidebar.
|
|
21057
21099
|
*/
|
|
21058
|
-
private async openSessionFeedRow(rowArg: interfaces.IControllerSessionFeedRow): Promise<void> {
|
|
21100
|
+
private async openSessionFeedRow(rowArg: Pick<interfaces.IControllerSessionFeedRow, 'name' | 'open'>): Promise<void> {
|
|
21059
21101
|
const open = rowArg.open;
|
|
21060
21102
|
if (open.kind === 'native') {
|
|
21061
21103
|
if (open.workerName) return this.openFleetWorker(open.workerName);
|
|
@@ -21425,6 +21467,57 @@ ${entry.detail.stack}`}</pre>`}
|
|
|
21425
21467
|
`;
|
|
21426
21468
|
}
|
|
21427
21469
|
|
|
21470
|
+
private renderInbox(): plugins.deesElement.TemplateResult {
|
|
21471
|
+
return plugins.deesElement.html`
|
|
21472
|
+
<agl-inbox .feed=${this.inboxFeed} .sender=${this.socketClient} @agl-inbox-open=${this.handleInboxOpen}></agl-inbox>
|
|
21473
|
+
`;
|
|
21474
|
+
}
|
|
21475
|
+
|
|
21476
|
+
/** "Open in session", "Open ticket" and "Open Driver" of an Inbox item: its home, wherever it lives. */
|
|
21477
|
+
private readonly handleInboxOpen = (eventArg: CustomEvent<IInboxOpenDetail>): void => {
|
|
21478
|
+
const item = eventArg.detail?.item;
|
|
21479
|
+
if (item) void this.openInboxItemHome(item);
|
|
21480
|
+
};
|
|
21481
|
+
|
|
21482
|
+
private async openInboxItemHome(itemArg: interfaces.TControllerInboxItem): Promise<void> {
|
|
21483
|
+
const where = itemArg.where;
|
|
21484
|
+
const row = 'rowId' in where ? this.sessionFeedRows.find((rowArg) => rowArg.id === where.rowId) : undefined;
|
|
21485
|
+
switch (where.kind) {
|
|
21486
|
+
case 'ticket': return this.openTicketOnBoard(where.ticketKey);
|
|
21487
|
+
case 'driver': return this.openDriver();
|
|
21488
|
+
// A subagent's prompt is answered in its parent conversation, which shows its children's requests.
|
|
21489
|
+
case 'conversation': case 'child':
|
|
21490
|
+
return this.openSessionFeedRow(row ?? { name: where.name, open: {
|
|
21491
|
+
kind: 'conversation', projectId: where.projectId, sessionId: where.kind === 'child' ? where.parentSessionId : where.sessionId,
|
|
21492
|
+
} });
|
|
21493
|
+
// The feed row names the fleet worker a native session belongs to; without one the session opens where it runs.
|
|
21494
|
+
case 'native': return row ? this.openSessionFeedRow(row) : this.openNativeSession(where.session);
|
|
21495
|
+
}
|
|
21496
|
+
}
|
|
21497
|
+
|
|
21498
|
+
/** The header's Inbox button: how many items wait for the owner, amber while any does. */
|
|
21499
|
+
private renderInboxButton(currentArg: boolean): plugins.deesElement.TemplateResult {
|
|
21500
|
+
const waiting = this.inboxFeed.total;
|
|
21501
|
+
const description = waiting > 0 ? `Inbox: ${waiting} wait${waiting === 1 ? 's' : ''} for you` : 'Inbox: nothing waits for you';
|
|
21502
|
+
return plugins.deesElement.html`
|
|
21503
|
+
<dees-button
|
|
21504
|
+
class="inboxButton headerNavButton"
|
|
21505
|
+
type="ghost"
|
|
21506
|
+
size=${this.compactHeader ? 'icon' : 'sm'}
|
|
21507
|
+
title=${description}
|
|
21508
|
+
.ariaLabel=${description}
|
|
21509
|
+
.pressed=${currentArg}
|
|
21510
|
+
aria-current=${currentArg ? 'page' : 'false'}
|
|
21511
|
+
.badge=${waiting > 0 ? (waiting > 99 ? '99+' : waiting) : undefined}
|
|
21512
|
+
.badgeVariant=${'warning'}
|
|
21513
|
+
@clicked=${() => void this.openInbox()}
|
|
21514
|
+
>
|
|
21515
|
+
<dees-icon icon="lucide:Inbox" iconSize="14"></dees-icon>
|
|
21516
|
+
Inbox
|
|
21517
|
+
</dees-button>
|
|
21518
|
+
`;
|
|
21519
|
+
}
|
|
21520
|
+
|
|
21428
21521
|
private renderMetrics(): plugins.deesElement.TemplateResult {
|
|
21429
21522
|
return plugins.deesElement.html`<agl-metrics-board .sender=${this.socketClient}></agl-metrics-board>`;
|
|
21430
21523
|
}
|
|
@@ -21996,26 +22089,14 @@ ${entry.detail.stack}`}</pre>`}
|
|
|
21996
22089
|
...(isOpenCode ? (detailArg.childAttention ?? []).flatMap((attentionArg) => attentionArg.questions) : []),
|
|
21997
22090
|
];
|
|
21998
22091
|
for (const requestArg of pendingQuestions) {
|
|
21999
|
-
|
|
22000
|
-
|
|
22001
|
-
|
|
22002
|
-
|
|
22003
|
-
|
|
22004
|
-
pendingQuestionCardIds.add(
|
|
22005
|
-
harnessQuestions.push(
|
|
22006
|
-
|
|
22007
|
-
id: cardId,
|
|
22008
|
-
sessionId: controllerRuntimeIdToUiKey(requestArg.sessionId),
|
|
22009
|
-
question: questionArg.question,
|
|
22010
|
-
options: questionArg.options.map((optionArg) => ({
|
|
22011
|
-
label: optionArg.label,
|
|
22012
|
-
description: optionArg.description,
|
|
22013
|
-
})),
|
|
22014
|
-
multiSelect: questionArg.multiple === true,
|
|
22015
|
-
allowCustom: questionArg.custom !== false,
|
|
22016
|
-
},
|
|
22017
|
-
);
|
|
22018
|
-
});
|
|
22092
|
+
for (const card of questionCards(
|
|
22093
|
+
requestArg,
|
|
22094
|
+
controllerRuntimeIdToUiKey(requestArg.id),
|
|
22095
|
+
controllerRuntimeIdToUiKey(requestArg.sessionId),
|
|
22096
|
+
)) {
|
|
22097
|
+
pendingQuestionCardIds.add(card.id);
|
|
22098
|
+
harnessQuestions.push(this.answeredQuestionCards.get(card.id) ?? card);
|
|
22099
|
+
}
|
|
22019
22100
|
}
|
|
22020
22101
|
for (const [cardId, card] of this.answeredQuestionCards) {
|
|
22021
22102
|
// The transcript version of a just-answered question replaces the
|
|
@@ -22034,19 +22115,8 @@ ${entry.detail.stack}`}</pre>`}
|
|
|
22034
22115
|
const permissionId = controllerRuntimeIdToUiKey(permissionArg.id);
|
|
22035
22116
|
pendingPermissionIds.add(permissionId);
|
|
22036
22117
|
harnessPermissions.push(
|
|
22037
|
-
this.answeredPermissionCards.get(permissionId)
|
|
22038
|
-
|
|
22039
|
-
sessionId: controllerRuntimeIdToUiKey(permissionArg.sessionId),
|
|
22040
|
-
createdAt: permissionArg.createdAt,
|
|
22041
|
-
title: permissionArg.title || 'Permission requested',
|
|
22042
|
-
type: permissionArg.type,
|
|
22043
|
-
metadata: {
|
|
22044
|
-
...(permissionArg.patterns.length > 0
|
|
22045
|
-
? { patterns: permissionArg.patterns }
|
|
22046
|
-
: {}),
|
|
22047
|
-
...permissionArg.metadata,
|
|
22048
|
-
},
|
|
22049
|
-
},
|
|
22118
|
+
this.answeredPermissionCards.get(permissionId)
|
|
22119
|
+
?? permissionCard(permissionArg, permissionId, controllerRuntimeIdToUiKey(permissionArg.sessionId)),
|
|
22050
22120
|
);
|
|
22051
22121
|
}
|
|
22052
22122
|
for (const [permissionId, card] of this.answeredPermissionCards) {
|