agl 43.1.0 → 43.2.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 +12 -0
- package/dist_serve/bundle.js +5329 -5116
- package/dist_serve/bundle.js.map +2 -2
- package/dist_serve/bundle.js.third-party-notices.json +30 -30
- package/dist_serve/bundle.js.third-party-notices.txt +30 -30
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/aglapi/aglapisurface.document.js +325 -1
- package/dist_ts/aglapi/interfaces.d.ts +3 -0
- package/dist_ts/aglapi/interfaces.js +2 -1
- package/dist_ts/classes.authmodels.js +17 -4
- package/dist_ts/classes.authstore.js +16 -2
- package/dist_ts/classes.cli.d.ts +4 -2
- package/dist_ts/classes.cli.js +6 -3
- package/dist_ts/classes.controller.d.ts +10 -0
- package/dist_ts/classes.controller.js +119 -4
- package/dist_ts/classes.controllermanagement.d.ts +14 -4
- package/dist_ts/classes.controllermanagement.js +20 -2
- package/dist_ts/classes.gatewayclient.d.ts +115 -0
- package/dist_ts/classes.gatewayclient.js +336 -0
- package/dist_ts/classes.gatewayclientstore.d.ts +97 -0
- package/dist_ts/classes.gatewayclientstore.js +261 -0
- package/dist_ts/classes.inferencerouter.d.ts +9 -0
- package/dist_ts/classes.inferencerouter.js +11 -1
- package/dist_ts/classes.inferenceservice.d.ts +9 -0
- package/dist_ts/classes.inferenceservice.js +27 -1
- package/dist_ts/classes.mcpclient.d.ts +4 -1
- package/dist_ts/classes.mcpclient.js +19 -1
- package/dist_ts/classes.mcpcontrollerhost.d.ts +3 -1
- package/dist_ts/classes.mcpcontrollerhost.js +9 -1
- package/dist_ts/classes.mcptools.d.ts +3 -3
- package/dist_ts/classes.mcptools.js +26 -1
- package/dist_ts/classes.mcpvalidation.js +7 -1
- package/dist_ts/classes.proxycontrol.d.ts +11 -0
- package/dist_ts/classes.proxycontrol.js +7 -1
- package/dist_ts/classes.proxycontrolclient.d.ts +17 -0
- package/dist_ts/classes.proxycontrolclient.js +35 -1
- package/dist_ts/classes.proxydaemon.js +8 -1
- package/dist_ts/classes.proxymonitor.d.ts +7 -0
- package/dist_ts/classes.proxymonitor.js +13 -1
- package/dist_ts/classes.trustedproxysecrets.d.ts +2 -0
- package/dist_ts/classes.trustedproxysecrets.js +5 -1
- package/dist_ts/functions.controllermanagementsurface.d.ts +4 -0
- package/dist_ts/functions.controllermanagementsurface.js +15 -1
- package/dist_ts/functions.gatewaycli.d.ts +24 -0
- package/dist_ts/functions.gatewaycli.js +395 -0
- package/dist_ts/functions.gatewayroute.d.ts +135 -0
- package/dist_ts/functions.gatewayroute.js +366 -0
- package/dist_ts/functions.inferencecli.js +30 -1
- package/dist_ts/functions.inferencecliarguments.d.ts +8 -2
- package/dist_ts/functions.inferencecliarguments.js +31 -3
- package/dist_ts/functions.proxycapacity.d.ts +50 -0
- package/dist_ts/functions.proxycapacity.js +142 -0
- package/dist_ts/functions.proxycapacitycli.d.ts +30 -0
- package/dist_ts/functions.proxycapacitycli.js +65 -0
- package/dist_ts/functions.remotecli.d.ts +30 -3
- package/dist_ts/functions.remotecli.js +44 -18
- package/dist_ts/interfaces.auth.d.ts +25 -4
- package/dist_ts/interfaces.auth.js +7 -1
- package/dist_ts/plugins.d.ts +2 -0
- package/dist_ts/plugins.js +4 -1
- package/dist_ts_authswitch/authority-placement.js +3 -17
- package/dist_ts_authswitch/authority-usagelimit.d.ts +29 -0
- package/dist_ts_authswitch/authority-usagelimit.js +66 -2
- package/dist_ts_authswitch/authority-usagewindows.d.ts +6 -0
- package/dist_ts_authswitch/authority-usagewindows.js +15 -1
- package/dist_ts_interfaces/gateway.d.ts +151 -0
- package/dist_ts_interfaces/gateway.js +66 -0
- package/dist_ts_interfaces/index.d.ts +2 -0
- package/dist_ts_interfaces/index.js +3 -1
- package/dist_ts_interfaces/management.d.ts +4 -4
- package/dist_ts_interfaces/management.js +3 -2
- package/dist_ts_interfaces/mcprequests.d.ts +14 -2
- package/dist_ts_interfaces/mcprequests.js +2 -1
- package/dist_ts_interfaces/proxycapacity.d.ts +99 -0
- package/dist_ts_interfaces/proxycapacity.js +74 -0
- package/package.json +4 -3
- package/readme.md +79 -5
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/aglapi/aglapisurface.document.ts +324 -0
- package/ts/aglapi/interfaces.ts +1 -0
- package/ts/classes.authmodels.ts +22 -3
- package/ts/classes.authstore.ts +15 -1
- package/ts/classes.cli.ts +7 -3
- package/ts/classes.controller.ts +134 -3
- package/ts/classes.controllermanagement.ts +40 -7
- package/ts/classes.gatewayclient.ts +401 -0
- package/ts/classes.gatewayclientstore.ts +272 -0
- package/ts/classes.inferencerouter.ts +12 -0
- package/ts/classes.inferenceservice.ts +27 -0
- package/ts/classes.mcpclient.ts +18 -0
- package/ts/classes.mcpcontrollerhost.ts +13 -0
- package/ts/classes.mcptools.ts +30 -2
- package/ts/classes.mcpvalidation.ts +5 -0
- package/ts/classes.proxycontrol.ts +16 -0
- package/ts/classes.proxycontrolclient.ts +30 -0
- package/ts/classes.proxydaemon.ts +8 -0
- package/ts/classes.proxymonitor.ts +12 -0
- package/ts/classes.trustedproxysecrets.ts +5 -0
- package/ts/functions.controllermanagementsurface.ts +15 -0
- package/ts/functions.gatewaycli.ts +436 -0
- package/ts/functions.gatewayroute.ts +429 -0
- package/ts/functions.inferencecli.ts +24 -0
- package/ts/functions.inferencecliarguments.ts +30 -4
- package/ts/functions.proxycapacity.ts +191 -0
- package/ts/functions.proxycapacitycli.ts +104 -0
- package/ts/functions.remotecli.ts +56 -20
- package/ts/interfaces.auth.ts +28 -4
- package/ts/plugins.ts +5 -0
- package/ts_authswitch/authority-placement.ts +2 -15
- package/ts_authswitch/authority-usagelimit.ts +84 -1
- package/ts_authswitch/authority-usagewindows.ts +13 -0
- package/ts_interfaces/gateway.ts +242 -0
- package/ts_interfaces/index.ts +2 -0
- package/ts_interfaces/management.ts +6 -4
- package/ts_interfaces/mcprequests.ts +18 -0
- package/ts_interfaces/proxycapacity.ts +162 -0
- package/ts_web/00_commitinfo_data.ts +1 -1
- package/ts_web/classes.browserpresentation.ts +13 -5
- package/ts_web/elements.accounts.ts +40 -113
- package/ts_web/elements.configurationpane.ts +24 -37
- package/ts_web/elements.devices.ts +4 -17
- package/ts_web/elements.flexlimitstrip.ts +21 -70
- package/ts_web/elements.harnesscontrollerapp.ts +91 -185
|
@@ -214,7 +214,7 @@ export class ControllerBrowserPresentation {
|
|
|
214
214
|
const paint = this.paint;
|
|
215
215
|
if (paint && paint.response.paintId === eventArg.paintId) {
|
|
216
216
|
void this.openVideoRoute(paint, eventArg.routeId).catch((errorArg) => {
|
|
217
|
-
if (this.paint
|
|
217
|
+
if (this.isCurrentPaint(paint)) this.options.onError('Show the browser view\'s video', errorArg);
|
|
218
218
|
});
|
|
219
219
|
return;
|
|
220
220
|
}
|
|
@@ -330,7 +330,7 @@ export class ControllerBrowserPresentation {
|
|
|
330
330
|
for (const pending of this.pendingVideoRoutes.splice(0)) {
|
|
331
331
|
if (pending.paintId === opened.paintId) {
|
|
332
332
|
void this.openVideoRoute(paint, pending.routeId).catch((errorArg) => {
|
|
333
|
-
if (this.paint
|
|
333
|
+
if (this.isCurrentPaint(paint)) this.options.onError('Show the browser view\'s video', errorArg);
|
|
334
334
|
});
|
|
335
335
|
}
|
|
336
336
|
}
|
|
@@ -384,7 +384,15 @@ export class ControllerBrowserPresentation {
|
|
|
384
384
|
if (failure !== undefined) this.fallBackToVideo({ kind: 'viewer-cannot-render', failure });
|
|
385
385
|
}
|
|
386
386
|
|
|
387
|
+
/** Whether `paintArg` is the run this view presents: a stopping, replaced or closed run is not. */
|
|
388
|
+
private isCurrentPaint(paintArg: IPaintRun): boolean {
|
|
389
|
+
return this.paint === paintArg && !this.closed;
|
|
390
|
+
}
|
|
391
|
+
|
|
387
392
|
private async stopPaint(paintArg: IPaintRun): Promise<void> {
|
|
393
|
+
// The run stops being current before its abort listeners run: they fire synchronously, and
|
|
394
|
+
// what they end belongs to the stopping run, never to the view.
|
|
395
|
+
if (this.paint === paintArg) this.paint = undefined;
|
|
388
396
|
paintArg.abortController.abort(new Error('The Paint stream closed.'));
|
|
389
397
|
paintArg.removeSessionEnd();
|
|
390
398
|
this.closeVideoRoutes(paintArg);
|
|
@@ -392,7 +400,6 @@ export class ControllerBrowserPresentation {
|
|
|
392
400
|
// Closes the controller's Paint stream exactly once and stops the renderer.
|
|
393
401
|
await paintArg.presenter.close();
|
|
394
402
|
} finally {
|
|
395
|
-
if (this.paint === paintArg) this.paint = undefined;
|
|
396
403
|
this.clearRenderer(paintArg.renderer);
|
|
397
404
|
}
|
|
398
405
|
}
|
|
@@ -427,10 +434,11 @@ export class ControllerBrowserPresentation {
|
|
|
427
434
|
// The host ended the route on purpose (a source rebind or a closed subscription): the worker
|
|
428
435
|
// keeps running and the next route mounts on it.
|
|
429
436
|
onEnded: () => { paintArg.routes.delete(mount); },
|
|
430
|
-
// A broken route closes only its own decoders; the renderer keeps running.
|
|
437
|
+
// A broken route closes only its own decoders; the renderer keeps running. A route of a
|
|
438
|
+
// stopping, replaced or closed run is not this view's fault.
|
|
431
439
|
onFailure: (errorArg) => {
|
|
432
440
|
paintArg.routes.delete(mount);
|
|
433
|
-
this.options.onError('Show the browser view\'s video', errorArg);
|
|
441
|
+
if (this.isCurrentPaint(paintArg)) this.options.onError('Show the browser view\'s video', errorArg);
|
|
434
442
|
},
|
|
435
443
|
});
|
|
436
444
|
paintArg.routes.add(mount);
|
|
@@ -91,6 +91,15 @@ export interface IAccountsOpenConfigurationDetail {
|
|
|
91
91
|
|
|
92
92
|
/** The screen's three views: the accounts, the tools on this host, and the accounts service. */
|
|
93
93
|
export type TAccountsTab = 'list' | 'host' | 'service';
|
|
94
|
+
const accountsTabs: readonly TAccountsTab[] = ['list', 'host', 'service'];
|
|
95
|
+
|
|
96
|
+
/** What new Claude terminals can run on, as the Host view offers it. */
|
|
97
|
+
const claudeTerminalsChoices = ['claude_code', 'chatgpt'] as const;
|
|
98
|
+
const claudeTerminalsOptions: plugins.deesCatalog.TRadiogroupOption[] = [
|
|
99
|
+
{ key: 'claude_code', option: 'Claude Code\'s own configuration',
|
|
100
|
+
description: 'Route it through the AGL proxy in Configuration → Inference to give it AGL\'s accounts.' },
|
|
101
|
+
{ key: 'chatgpt', option: 'ChatGPT models through the AGL proxy', description: 'Claude Code\'s terminal, answered by the ChatGPT accounts.' },
|
|
102
|
+
];
|
|
94
103
|
|
|
95
104
|
/**
|
|
96
105
|
* The confirmation or sign-in in view, if any. It names what it acts on, never a copy of it: the dialog reads its
|
|
@@ -340,69 +349,13 @@ export class AglAccounts extends plugins.deesElement.DeesElement {
|
|
|
340
349
|
gap: var(--dees-spacing-md);
|
|
341
350
|
}
|
|
342
351
|
|
|
343
|
-
.
|
|
344
|
-
display: inline-flex;
|
|
345
|
-
gap: 2px;
|
|
346
|
-
padding: 2px;
|
|
347
|
-
border-radius: var(--dees-radius-md);
|
|
348
|
-
background: var(--dees-color-fill-tertiary, var(--dees-color-hover));
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
.tabs button {
|
|
352
|
-
display: inline-flex;
|
|
353
|
-
align-items: center;
|
|
354
|
-
gap: var(--dees-spacing-xs);
|
|
355
|
-
height: 26px;
|
|
356
|
-
padding: 0 var(--dees-spacing-md);
|
|
357
|
-
border: 0;
|
|
358
|
-
border-radius: var(--dees-radius-sm);
|
|
359
|
-
background: transparent;
|
|
360
|
-
color: var(--dees-color-text-primary);
|
|
361
|
-
font: inherit;
|
|
362
|
-
font-size: var(--dees-font-footnote-size);
|
|
363
|
-
font-weight: 500;
|
|
364
|
-
cursor: pointer;
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
.tabs button[aria-pressed='true'] {
|
|
368
|
-
background: var(--dees-color-bg-elevated, var(--dees-color-bg-primary));
|
|
369
|
-
box-shadow: 0 1px 2px rgb(0 0 0 / 0.25);
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
.tabs button:focus-visible, .row:focus-visible, .back:focus-visible, .freshness:focus-visible {
|
|
352
|
+
.row:focus-visible {
|
|
373
353
|
outline: var(--dees-line-width-focus-ring, 2px) solid var(--dees-color-focus-ring);
|
|
374
354
|
outline-offset: 2px;
|
|
375
355
|
}
|
|
376
356
|
|
|
377
|
-
.count { color: var(--dees-color-text-muted); font-size: var(--dees-font-caption1-size); }
|
|
378
|
-
|
|
379
357
|
.tools, .actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--dees-spacing-xs); }
|
|
380
358
|
|
|
381
|
-
.freshness {
|
|
382
|
-
display: inline-flex;
|
|
383
|
-
align-items: center;
|
|
384
|
-
gap: var(--dees-spacing-xs);
|
|
385
|
-
height: 30px;
|
|
386
|
-
padding: 0 var(--dees-spacing-sm);
|
|
387
|
-
border: 0;
|
|
388
|
-
border-radius: var(--dees-radius-md);
|
|
389
|
-
background: transparent;
|
|
390
|
-
color: var(--dees-color-text-secondary);
|
|
391
|
-
font: inherit;
|
|
392
|
-
font-size: var(--dees-font-caption1-size);
|
|
393
|
-
cursor: pointer;
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
.serviceDot {
|
|
397
|
-
width: 7px;
|
|
398
|
-
height: 7px;
|
|
399
|
-
flex: none;
|
|
400
|
-
border-radius: 999px;
|
|
401
|
-
background: var(--dees-color-accent-success);
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
.serviceDot.stale { background: var(--dees-color-accent-warning); }
|
|
405
|
-
|
|
406
359
|
.reason {
|
|
407
360
|
margin: 0;
|
|
408
361
|
color: var(--dees-color-text-secondary);
|
|
@@ -561,19 +514,7 @@ export class AglAccounts extends plugins.deesElement.DeesElement {
|
|
|
561
514
|
|
|
562
515
|
.page { display: grid; gap: var(--dees-spacing-lg); }
|
|
563
516
|
|
|
564
|
-
.back {
|
|
565
|
-
justify-self: start;
|
|
566
|
-
display: inline-flex;
|
|
567
|
-
align-items: center;
|
|
568
|
-
gap: 2px;
|
|
569
|
-
padding: 0;
|
|
570
|
-
border: 0;
|
|
571
|
-
background: none;
|
|
572
|
-
color: var(--dees-color-accent-primary, var(--dees-color-text-link));
|
|
573
|
-
font: inherit;
|
|
574
|
-
font-size: var(--dees-font-footnote-size);
|
|
575
|
-
cursor: pointer;
|
|
576
|
-
}
|
|
517
|
+
.back { justify-self: start; }
|
|
577
518
|
|
|
578
519
|
.pageHead {
|
|
579
520
|
display: grid;
|
|
@@ -635,16 +576,7 @@ export class AglAccounts extends plugins.deesElement.DeesElement {
|
|
|
635
576
|
overflow-wrap: anywhere;
|
|
636
577
|
}
|
|
637
578
|
|
|
638
|
-
|
|
639
|
-
display: grid;
|
|
640
|
-
grid-template-columns: 18px minmax(0, 1fr);
|
|
641
|
-
gap: var(--dees-spacing-sm);
|
|
642
|
-
align-items: start;
|
|
643
|
-
padding: var(--dees-spacing-md) var(--dees-spacing-lg);
|
|
644
|
-
cursor: pointer;
|
|
645
|
-
}
|
|
646
|
-
|
|
647
|
-
.radio input { margin: 2px 0 0; accent-color: var(--dees-color-accent-primary); }
|
|
579
|
+
dees-input-radiogroup { padding: var(--dees-spacing-md) var(--dees-spacing-lg); }
|
|
648
580
|
|
|
649
581
|
/* The one visual difference of a last-known screen: the service's accounts, and only those. */
|
|
650
582
|
.dimmed .row, .dimmed .page { opacity: .62; }
|
|
@@ -1476,18 +1408,21 @@ export class AglAccounts extends plugins.deesElement.DeesElement {
|
|
|
1476
1408
|
`;
|
|
1477
1409
|
}
|
|
1478
1410
|
|
|
1411
|
+
/** The screen's three views as one segmented control; choosing the open view again closes an account's page. */
|
|
1479
1412
|
private renderTabs(viewArg: IAccountsView): plugins.deesElement.TemplateResult {
|
|
1480
1413
|
const count = viewArg.list.groups.reduce((sumArg, groupArg) => sumArg + groupArg.rows.length, 0);
|
|
1481
|
-
const
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
`;
|
|
1414
|
+
const options: plugins.deesCatalog.TMultitoggleOption[] = [
|
|
1415
|
+
{ key: 'list', label: 'Accounts', badge: count },
|
|
1416
|
+
{ key: 'host', label: 'This host' },
|
|
1417
|
+
{ key: 'service', label: 'Service' },
|
|
1418
|
+
];
|
|
1487
1419
|
return plugins.deesElement.html`
|
|
1488
|
-
<
|
|
1489
|
-
|
|
1490
|
-
|
|
1420
|
+
<dees-input-multitoggle data-tabs size="sm" label="Accounts views" .labelPosition=${'none'} .options=${options}
|
|
1421
|
+
.selectedOption=${this.tab}
|
|
1422
|
+
@option-activate=${(eventArg: CustomEvent<{ selectedOption: string }>) => {
|
|
1423
|
+
this.tab = accountsTabs.find((tabArg) => tabArg === eventArg.detail.selectedOption) ?? this.tab;
|
|
1424
|
+
this.openKey = '';
|
|
1425
|
+
}}></dees-input-multitoggle>
|
|
1491
1426
|
`;
|
|
1492
1427
|
}
|
|
1493
1428
|
|
|
@@ -1730,9 +1665,8 @@ export class AglAccounts extends plugins.deesElement.DeesElement {
|
|
|
1730
1665
|
const signInHead = rowArg.apiKey ? 'Key' : 'Sign-in';
|
|
1731
1666
|
return plugins.deesElement.html`
|
|
1732
1667
|
<section class="page" data-account-page=${rowArg.key} aria-label=${`Account ${rowArg.label}`}>
|
|
1733
|
-
<button class="back" type="
|
|
1734
|
-
|
|
1735
|
-
</button>
|
|
1668
|
+
<dees-button class="back" type="link" size="sm" icon="lucide:ChevronLeft" data-action="back"
|
|
1669
|
+
@clicked=${() => { this.openKey = ''; }}>Accounts</dees-button>
|
|
1736
1670
|
<header class="pageHead">
|
|
1737
1671
|
${renderMark(rowArg)}
|
|
1738
1672
|
<div>
|
|
@@ -1938,23 +1872,17 @@ export class AglAccounts extends plugins.deesElement.DeesElement {
|
|
|
1938
1872
|
? plugins.deesElement.html`<div class="card"><div class="item stacked" data-claude-terminals>
|
|
1939
1873
|
<div class="statusText">${read.state === 'pending' ? 'Reading what new Claude terminals run on.' : read.reason}</div>
|
|
1940
1874
|
</div></div>`
|
|
1941
|
-
: plugins.deesElement.html`<div class="card"
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
// The choice shows what the controller holds: it changes once the controller saved it.
|
|
1953
|
-
eventArg.preventDefault();
|
|
1954
|
-
if (valueArg !== read.terminals) void this.useClaudeTerminals(valueArg);
|
|
1955
|
-
}}>
|
|
1956
|
-
<span><span class="itemLabel">${labelArg}</span><div class="itemText">${textArg}</div></span>
|
|
1957
|
-
</label>`)}
|
|
1875
|
+
: plugins.deesElement.html`<div class="card" data-claude-terminals=${read.terminals}>
|
|
1876
|
+
<dees-input-radiogroup aria-label="New Claude terminals run on" .options=${claudeTerminalsOptions}
|
|
1877
|
+
.selectedOption=${read.terminals} .disabled=${this.busyAction !== ''}
|
|
1878
|
+
@change=${(eventArg: Event) => {
|
|
1879
|
+
// The choice shows what the controller holds: the pick goes back at once, and the choice changes once
|
|
1880
|
+
// the controller saved it.
|
|
1881
|
+
const group = eventArg.currentTarget as plugins.deesCatalog.DeesInputRadiogroup;
|
|
1882
|
+
const picked = claudeTerminalsChoices.find((choiceArg) => choiceArg === group.selectedOption);
|
|
1883
|
+
group.selectedOption = read.terminals;
|
|
1884
|
+
if (picked && picked !== read.terminals) void this.useClaudeTerminals(picked);
|
|
1885
|
+
}}></dees-input-radiogroup>
|
|
1958
1886
|
<div class="item stacked"><div class="statusText">${claudeTerminalsText(read.terminals)} Terminals already
|
|
1959
1887
|
open keep what they run on.</div></div>
|
|
1960
1888
|
</div>`}
|
|
@@ -2265,10 +2193,9 @@ export class AglAccounts extends plugins.deesElement.DeesElement {
|
|
|
2265
2193
|
<div class="bar">
|
|
2266
2194
|
${this.renderTabs(view)}
|
|
2267
2195
|
<div class="tools">
|
|
2268
|
-
<button
|
|
2269
|
-
|
|
2270
|
-
Accounts service · ${view.service.freshness}
|
|
2271
|
-
</button>
|
|
2196
|
+
<dees-button type="ghost" size="sm" data-freshness .badge=${''} .badgeDot=${true}
|
|
2197
|
+
.badgeVariant=${view.service.state === 'current' ? 'success' : 'warning'}
|
|
2198
|
+
@clicked=${() => { this.tab = 'service'; this.openKey = ''; }}>Accounts service · ${view.service.freshness}</dees-button>
|
|
2272
2199
|
<dees-button size="sm" type="ghost" icon="lucide:RefreshCw" data-action="refresh" title="Read the accounts again"
|
|
2273
2200
|
aria-label="Read the accounts again" .disabled=${this.reading}
|
|
2274
2201
|
@clicked=${() => void this.refresh(true)}></dees-button>
|
|
@@ -432,8 +432,6 @@ export class AglConfigurationPane extends plugins.deesElement.DeesElement {
|
|
|
432
432
|
[data-tone='ok'] { color: var(--dees-color-text-success); }
|
|
433
433
|
[data-tone='warn'] { color: var(--dees-color-text-warning); }
|
|
434
434
|
[data-tone='bad'] { color: var(--dees-color-text-error); }
|
|
435
|
-
button.link { border: 0; padding: 0; background: transparent; color: var(--dees-color-link); cursor: pointer; font-size: inherit; }
|
|
436
|
-
button.link:hover { color: var(--dees-color-link-hover); }
|
|
437
435
|
.confirm {
|
|
438
436
|
display: flex; flex-wrap: wrap; align-items: center; gap: var(--dees-spacing-sm) var(--dees-spacing-md);
|
|
439
437
|
padding: var(--dees-spacing-sm-plus) var(--dees-spacing-lg); background: var(--dees-color-badge-warning-bg);
|
|
@@ -577,18 +575,15 @@ export class AglConfigurationPane extends plugins.deesElement.DeesElement {
|
|
|
577
575
|
.list .li .tag { margin-left: auto; white-space: nowrap; font-size: var(--dees-font-caption2-size); color: var(--dees-color-text-muted); }
|
|
578
576
|
.list .empty { padding: var(--dees-spacing-md); color: var(--dees-color-text-muted); font-size: var(--dees-font-secondary-size); }
|
|
579
577
|
.lab { display: block; margin-bottom: var(--dees-spacing-xs-plus); font-size: var(--dees-font-caption1-size); color: var(--dees-color-text-muted); }
|
|
578
|
+
/* The file tabs sit on the pane's own surface, one hairline under the tabs and the file actions. */
|
|
580
579
|
.filetabs {
|
|
581
580
|
display: flex; flex-wrap: wrap; align-items: center; gap: var(--dees-spacing-2xs);
|
|
582
581
|
border-bottom: var(--dees-line-width-hairline) solid var(--dees-color-border-subtle);
|
|
583
582
|
}
|
|
584
|
-
.filetabs
|
|
585
|
-
min-
|
|
586
|
-
|
|
587
|
-
font-family: var(--dees-font-family-mono); font-size: var(--dees-font-caption1-size); color: var(--dees-color-text-secondary);
|
|
583
|
+
.filetabs dees-appui-tabs {
|
|
584
|
+
flex: 1 1 240px; min-width: 0; margin-bottom: calc(-1 * var(--dees-line-width-hairline));
|
|
585
|
+
--dees-appui-row-height: 40px; --dees-appui-chrome-bg: var(--dees-color-bg-primary);
|
|
588
586
|
}
|
|
589
|
-
.filetabs .tab[aria-selected='true'] { color: var(--dees-color-text-primary); border-bottom-color: var(--dees-color-accent-primary); }
|
|
590
|
-
.filetabs .tabs { display: flex; flex-wrap: wrap; gap: var(--dees-spacing-2xs); }
|
|
591
|
-
.filetabs .spacer { flex: 1 1 auto; }
|
|
592
587
|
.filepanel { display: flex; flex-direction: column; gap: var(--dees-spacing-md); }
|
|
593
588
|
|
|
594
589
|
.note { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--dees-spacing-sm-plus); padding: var(--dees-spacing-sm-plus) var(--dees-spacing-md); font-size: var(--dees-font-secondary-size); line-height: 1.45; }
|
|
@@ -632,10 +627,11 @@ export class AglConfigurationPane extends plugins.deesElement.DeesElement {
|
|
|
632
627
|
}
|
|
633
628
|
.applybar > div { flex: 1 1 var(--dees-content-width-sm); }
|
|
634
629
|
.arow {
|
|
635
|
-
display: grid; grid-template-columns:
|
|
636
|
-
padding: var(--dees-spacing-sm-plus) var(--dees-spacing-md);
|
|
630
|
+
display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--dees-spacing-sm-plus);
|
|
631
|
+
padding: var(--dees-spacing-sm-plus) var(--dees-spacing-md);
|
|
637
632
|
}
|
|
638
|
-
|
|
633
|
+
/* The files line under the checkbox's label, in line with it: the box is 18px wide, the gap the checkbox's own. */
|
|
634
|
+
.arow .sd { padding-left: calc(18px + var(--dees-spacing-sm)); }
|
|
639
635
|
.afoot {
|
|
640
636
|
display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--dees-spacing-sm) var(--dees-spacing-md);
|
|
641
637
|
padding: var(--dees-spacing-sm-plus) var(--dees-spacing-md); font-size: var(--dees-font-caption1-size); color: var(--dees-color-text-muted);
|
|
@@ -678,6 +674,9 @@ export class AglConfigurationPane extends plugins.deesElement.DeesElement {
|
|
|
678
674
|
if (changedArg.has('confirming') && this.confirming) {
|
|
679
675
|
void this.shadowRoot?.querySelector<HTMLElement & { focus(): void }>('.confirm [data-keep]')?.focus();
|
|
680
676
|
}
|
|
677
|
+
// The skill file tabs name the panel they control by element: an id reference cannot reach into their shadow root.
|
|
678
|
+
const fileTabs = this.shadowRoot?.querySelector<plugins.deesCatalog.DeesAppuiTabs>('dees-appui-tabs.skillfiles');
|
|
679
|
+
if (fileTabs) fileTabs.controlsElement = this.shadowRoot?.querySelector<HTMLElement>('.filepanel') ?? undefined;
|
|
681
680
|
}
|
|
682
681
|
|
|
683
682
|
/** Whether the master editor holds changes that are not saved yet. */
|
|
@@ -1140,8 +1139,8 @@ export class AglConfigurationPane extends plugins.deesElement.DeesElement {
|
|
|
1140
1139
|
const status = this.harnessesStatus();
|
|
1141
1140
|
return html`<span class="status" data-tone=${status.tone}>
|
|
1142
1141
|
${status.tone === 'ok' ? html`<dees-icon icon="lucide:Check" iconSize="14"></dees-icon>` : ''}${status.text}
|
|
1143
|
-
${status.toHistory && this.selection.kind !== 'history' ? html` · <button
|
|
1144
|
-
@
|
|
1142
|
+
${status.toHistory && this.selection.kind !== 'history' ? html` · <dees-button type="link" size="sm" data-action="openHistory"
|
|
1143
|
+
@clicked=${() => { this.selection = { kind: 'history' }; }}>Apply and history</dees-button>` : ''}
|
|
1145
1144
|
</span>`;
|
|
1146
1145
|
}
|
|
1147
1146
|
|
|
@@ -1545,32 +1544,20 @@ export class AglConfigurationPane extends plugins.deesElement.DeesElement {
|
|
|
1545
1544
|
this.skillFile = fileIndexArg;
|
|
1546
1545
|
this.renamingFile = false;
|
|
1547
1546
|
};
|
|
1548
|
-
//
|
|
1549
|
-
const
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
: eventArg.key === 'Home' ? 0 : eventArg.key === 'End' ? count - 1 : undefined;
|
|
1553
|
-
if (next === undefined) return;
|
|
1554
|
-
eventArg.preventDefault();
|
|
1555
|
-
choose(next);
|
|
1556
|
-
await this.updateComplete;
|
|
1557
|
-
this.shadowRoot?.querySelector<HTMLButtonElement>('.filetabs [role="tab"][aria-selected="true"]')?.focus();
|
|
1558
|
-
};
|
|
1547
|
+
// A tab's key is its file's index: renaming a file keeps its tab chosen.
|
|
1548
|
+
const tabs: plugins.deesCatalog.IMenuItem[] = skillArg.files.map((candidate, fileIndex) => ({
|
|
1549
|
+
key: String(fileIndex), label: candidate.path, action: () => choose(fileIndex),
|
|
1550
|
+
}));
|
|
1559
1551
|
return html`
|
|
1560
1552
|
<div class="filetabs">
|
|
1561
|
-
<
|
|
1562
|
-
${skillArg.files.map((candidate, fileIndex) => html`<button class="tab" role="tab" id=${`skill-file-${fileIndex}`}
|
|
1563
|
-
aria-selected=${String(fileIndex === index)} aria-controls="skill-file-panel" tabindex=${fileIndex === index ? '0' : '-1'}
|
|
1564
|
-
@click=${() => choose(fileIndex)}>${candidate.path}</button>`)}
|
|
1565
|
-
</div>
|
|
1553
|
+
<dees-appui-tabs class="skillfiles" .tabs=${tabs} .selectedTab=${tabs[index] ?? null} .labels=${{ tabsName: 'Skill files' }}></dees-appui-tabs>
|
|
1566
1554
|
<dees-button size="sm" type="ghost" data-action="addFile" @clicked=${addFile}>+ Add file</dees-button>
|
|
1567
|
-
<span class="spacer"></span>
|
|
1568
1555
|
${file ? html`
|
|
1569
1556
|
<dees-button size="sm" type="ghost" data-action="renameFile" @clicked=${() => { this.renamingFile = !this.renamingFile; }}>${this.renamingFile ? 'Done' : 'Rename file'}</dees-button>
|
|
1570
1557
|
<dees-button size="sm" type="ghost" data-action="removeFile" ?disabled=${skillArg.files.length < 2}
|
|
1571
1558
|
@clicked=${() => { this.setField(filesPath, skillArg.files.filter((_, i) => i !== index)); choose(Math.max(0, index - 1)); }}>Remove file</dees-button>` : ''}
|
|
1572
1559
|
</div>
|
|
1573
|
-
${file ? html`<div role="tabpanel"
|
|
1560
|
+
${file ? html`<div role="tabpanel" aria-label=${file.path} class="filepanel">
|
|
1574
1561
|
${this.renamingFile ? this.textField([...filesPath, index, 'path'], 'File path') : ''}
|
|
1575
1562
|
${plugins.deesElement.directives.keyed(JSON.stringify([this.editorEpoch, pathArg, index]), html`
|
|
1576
1563
|
<dees-input-code key=${`file:${index}`} label="" aria-label="File contents" language=${codeLanguage(file.path)} height="400px"
|
|
@@ -1867,18 +1854,18 @@ export class AglConfigurationPane extends plugins.deesElement.DeesElement {
|
|
|
1867
1854
|
: html`${pending.map((harness) => {
|
|
1868
1855
|
const relative = this.relativeTo(harness);
|
|
1869
1856
|
const replaced = this.replacedEdits(harness);
|
|
1870
|
-
return html`<
|
|
1871
|
-
<input type="checkbox" .checked=${this.applyTargets.includes(harness.targetId)}
|
|
1872
|
-
@change=${(eventArg: Event) => toggle(harness.targetId, (eventArg.target as HTMLInputElement).checked)}>
|
|
1857
|
+
return html`<div class="arow" data-harness=${harness.targetId}>
|
|
1873
1858
|
<span>
|
|
1874
|
-
<
|
|
1859
|
+
<dees-input-checkbox .label=${`${harnessLabels[harness.targetId]} · ${plural(harness.files.length, 'file')}`}
|
|
1860
|
+
.value=${this.applyTargets.includes(harness.targetId)}
|
|
1861
|
+
@newValue=${(eventArg: CustomEvent<boolean>) => toggle(harness.targetId, eventArg.detail)}></dees-input-checkbox>
|
|
1875
1862
|
${harness.state === 'drifted' || replaced.length
|
|
1876
1863
|
? html`<div class="sd warn">${replaced.length ? `Applying replaces the edits made outside AGL in ${joinNames(replaced)}.`
|
|
1877
1864
|
: 'Its files were edited outside AGL; applying replaces those edits.'}</div>`
|
|
1878
1865
|
: html`<div class="sd">${harness.files.map((file) => relative(file.path)).join(', ')}</div>`}
|
|
1879
1866
|
</span>
|
|
1880
1867
|
<dees-badge rounded dot type=${badgeTypes[stateTones[harness.state]]} text=${stateLabels[harness.state]}></dees-badge>
|
|
1881
|
-
</
|
|
1868
|
+
</div>`;
|
|
1882
1869
|
})}
|
|
1883
1870
|
<div class="afoot">
|
|
1884
1871
|
<span>A harness whose files changed since its review is refused and has to be reviewed again.</span>
|
|
@@ -155,7 +155,7 @@ export class AglDevices extends plugins.deesElement.DeesElement {
|
|
|
155
155
|
.row:hover { background: var(--dees-color-hover); }
|
|
156
156
|
.row:active { background: var(--dees-color-active); }
|
|
157
157
|
|
|
158
|
-
.row:focus-visible
|
|
158
|
+
.row:focus-visible {
|
|
159
159
|
outline: var(--dees-line-width-focus-ring, 2px) solid var(--dees-color-focus-ring);
|
|
160
160
|
outline-offset: 2px;
|
|
161
161
|
}
|
|
@@ -206,19 +206,7 @@ export class AglDevices extends plugins.deesElement.DeesElement {
|
|
|
206
206
|
|
|
207
207
|
.page { display: grid; gap: var(--dees-spacing-lg); }
|
|
208
208
|
|
|
209
|
-
.back {
|
|
210
|
-
justify-self: start;
|
|
211
|
-
display: inline-flex;
|
|
212
|
-
align-items: center;
|
|
213
|
-
gap: 2px;
|
|
214
|
-
padding: 0;
|
|
215
|
-
border: 0;
|
|
216
|
-
background: none;
|
|
217
|
-
color: var(--dees-color-accent-primary, var(--dees-color-text-link));
|
|
218
|
-
font: inherit;
|
|
219
|
-
font-size: var(--dees-font-footnote-size);
|
|
220
|
-
cursor: pointer;
|
|
221
|
-
}
|
|
209
|
+
.back { justify-self: start; }
|
|
222
210
|
|
|
223
211
|
.pageHead {
|
|
224
212
|
display: grid;
|
|
@@ -564,9 +552,8 @@ export class AglDevices extends plugins.deesElement.DeesElement {
|
|
|
564
552
|
const status = deviceStatus(deviceArg);
|
|
565
553
|
return plugins.deesElement.html`
|
|
566
554
|
<div class="page" data-device-page=${deviceArg.id}>
|
|
567
|
-
<button class="back" type="
|
|
568
|
-
|
|
569
|
-
</button>
|
|
555
|
+
<dees-button class="back" type="link" size="sm" icon="lucide:ChevronLeft" data-action="back"
|
|
556
|
+
@clicked=${() => { this.openId = ''; }}>Devices</dees-button>
|
|
570
557
|
<div class="pageHead">
|
|
571
558
|
<span class="glyph"><dees-icon icon="lucide:Smartphone" iconSize="16" aria-hidden="true"></dees-icon></span>
|
|
572
559
|
<h3 class="pageTitle">${deviceArg.name}</h3>
|
|
@@ -140,54 +140,6 @@ export class AglFlexLimitStrip extends plugins.deesElement.DeesElement {
|
|
|
140
140
|
gap: var(--dees-spacing-xs) var(--dees-spacing-sm);
|
|
141
141
|
margin-left: auto;
|
|
142
142
|
}
|
|
143
|
-
|
|
144
|
-
label {
|
|
145
|
-
display: inline-flex;
|
|
146
|
-
align-items: center;
|
|
147
|
-
gap: 4px;
|
|
148
|
-
color: var(--dees-color-text-primary);
|
|
149
|
-
cursor: pointer;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
label:has(input:disabled) {
|
|
153
|
-
opacity: .55;
|
|
154
|
-
cursor: default;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
input {
|
|
158
|
-
margin: 0;
|
|
159
|
-
accent-color: var(--dees-color-accent-primary);
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
button {
|
|
163
|
-
min-height: 24px;
|
|
164
|
-
padding: 1px 10px;
|
|
165
|
-
border: 1px solid var(--dees-color-border-default);
|
|
166
|
-
border-radius: var(--dees-radius-sm);
|
|
167
|
-
background: transparent;
|
|
168
|
-
color: var(--dees-color-text-primary);
|
|
169
|
-
font: 600 12px/1.35 var(--dees-font-family);
|
|
170
|
-
cursor: pointer;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
button:hover:not(:disabled) {
|
|
174
|
-
background: var(--dees-color-fill-secondary);
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
button:disabled {
|
|
178
|
-
opacity: .5;
|
|
179
|
-
cursor: default;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
button:focus-visible,
|
|
183
|
-
input:focus-visible {
|
|
184
|
-
outline: 2px solid var(--dees-color-focus-ring);
|
|
185
|
-
outline-offset: 1px;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
@media (pointer: coarse) {
|
|
189
|
-
button { min-height: 44px; }
|
|
190
|
-
}
|
|
191
143
|
`,
|
|
192
144
|
];
|
|
193
145
|
|
|
@@ -262,38 +214,37 @@ export class AglFlexLimitStrip extends plugins.deesElement.DeesElement {
|
|
|
262
214
|
const { startAtReset, compactFirst } = this.resumeOptions;
|
|
263
215
|
return plugins.deesElement.html`
|
|
264
216
|
<div class="controls">
|
|
265
|
-
<
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
<
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
>
|
|
279
|
-
<button
|
|
280
|
-
title="
|
|
281
|
-
<button type="button" ?disabled=${this.locked} @click=${() => this.emitRelease('cancel')}
|
|
282
|
-
title="Drop the held prompts">Cancel</button>
|
|
217
|
+
<dees-input-checkbox data-option="startAtReset" .label=${'Start at reset'} .value=${startAtReset}
|
|
218
|
+
.disabled=${this.locked} title="Send the held prompts on their own once the limit has reset"
|
|
219
|
+
@newValue=${(eventArg: CustomEvent<boolean>) => this.requestLimitResume(eventArg, startAtReset, {
|
|
220
|
+
startAtReset: !startAtReset,
|
|
221
|
+
compactFirst,
|
|
222
|
+
})}></dees-input-checkbox>
|
|
223
|
+
<dees-input-checkbox data-option="compactFirst" .label=${'Compact first'} .value=${compactFirst}
|
|
224
|
+
.disabled=${this.locked || !startAtReset} title="Compact the conversation before the held prompts start at the reset"
|
|
225
|
+
@newValue=${(eventArg: CustomEvent<boolean>) => this.requestLimitResume(eventArg, compactFirst, {
|
|
226
|
+
startAtReset,
|
|
227
|
+
compactFirst: !compactFirst,
|
|
228
|
+
})}></dees-input-checkbox>
|
|
229
|
+
<dees-button size="sm" data-action="send_now" .disabled=${this.locked}
|
|
230
|
+
title="Send the held prompts now, before the limit resets" @clicked=${() => this.emitRelease('send_now')}>Send now</dees-button>
|
|
231
|
+
<dees-button size="sm" data-action="cancel" .disabled=${this.locked}
|
|
232
|
+
title="Drop the held prompts" @clicked=${() => this.emitRelease('cancel')}>Cancel</dees-button>
|
|
283
233
|
</div>
|
|
284
234
|
`;
|
|
285
235
|
}
|
|
286
236
|
|
|
287
237
|
/**
|
|
288
238
|
* The boxes show what the conversation holds, never a click on its own: the click is only a
|
|
289
|
-
* request,
|
|
239
|
+
* request, so the box goes back to the held value at once and follows once the host takes the
|
|
240
|
+
* change up.
|
|
290
241
|
*/
|
|
291
242
|
private requestLimitResume(
|
|
292
|
-
eventArg:
|
|
243
|
+
eventArg: CustomEvent<boolean>,
|
|
244
|
+
heldArg: boolean,
|
|
293
245
|
limitResumeArg: interfaces.IControllerLimitResumeOptions,
|
|
294
246
|
): void {
|
|
295
|
-
|
|
296
|
-
if (box instanceof HTMLInputElement) box.checked = !box.checked;
|
|
247
|
+
(eventArg.currentTarget as plugins.deesCatalog.DeesInputCheckbox).value = heldArg;
|
|
297
248
|
this.dispatchEvent(new CustomEvent<interfaces.IControllerLimitResumeOptions>(
|
|
298
249
|
'limit-resume-change',
|
|
299
250
|
{ detail: limitResumeArg },
|