agl 43.5.0 → 43.7.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 +16 -0
- package/dist_serve/bundle.js +1843 -1825
- package/dist_serve/bundle.js.map +2 -2
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/classes.accountsactions.d.ts +3 -1
- package/dist_ts/classes.accountsactions.js +17 -1
- package/dist_ts/classes.controller.d.ts +3 -3
- package/dist_ts/classes.controller.js +5 -4
- package/dist_ts/classes.inferencerouter.d.ts +21 -3
- package/dist_ts/classes.inferencerouter.js +40 -17
- package/dist_ts/classes.inferenceservice.js +2 -2
- package/dist_ts/functions.inferencecli.js +2 -1
- package/dist_ts/interfaces.auth.d.ts +1 -1
- package/dist_ts/interfaces.auth.js +2 -1
- package/dist_ts/plugins.d.ts +2 -1
- package/dist_ts/plugins.js +4 -2
- package/dist_ts_authswitch/authority-contract.d.ts +26 -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 +10 -4
- package/dist_ts_authswitch/authority-placement.d.ts +16 -9
- package/dist_ts_authswitch/authority-placement.js +10 -7
- package/dist_ts_authswitch/authority-priority.d.ts +20 -0
- package/dist_ts_authswitch/authority-priority.js +21 -0
- package/dist_ts_authswitch/classes.authoritybroker.d.ts +7 -0
- package/dist_ts_authswitch/classes.authoritybroker.js +26 -2
- package/dist_ts_authswitch/classes.authoritycli.d.ts +1 -0
- package/dist_ts_authswitch/classes.authoritycli.js +43 -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 +7 -1
- package/dist_ts_authswitch/classes.authoritydatabase.d.ts +6 -0
- package/dist_ts_authswitch/classes.authoritydatabase.js +13 -2
- package/dist_ts_authswitch/classes.authoritymodels.d.ts +7 -0
- package/dist_ts_authswitch/classes.authoritymodels.js +17 -8
- package/dist_ts_interfaces/requests.accounts.d.ts +19 -0
- package/dist_ts_interfaces/requests.accounts.js +1 -1
- package/dist_ts_interfaces/requests.d.ts +2 -2
- package/dist_ts_interfaces/requests.js +1 -1
- package/docs/authswitch.md +25 -0
- package/package.json +1 -1
- package/readme.md +29 -5
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/classes.accountsactions.ts +25 -0
- package/ts/classes.controller.ts +4 -3
- package/ts/classes.inferencerouter.ts +61 -16
- package/ts/classes.inferenceservice.ts +1 -1
- package/ts/functions.inferencecli.ts +1 -0
- package/ts/interfaces.auth.ts +1 -0
- package/ts/plugins.ts +3 -0
- package/ts_authswitch/authority-contract.ts +21 -0
- package/ts_authswitch/authority-overview.ts +19 -5
- package/ts_authswitch/authority-placement.ts +18 -10
- package/ts_authswitch/authority-priority.ts +25 -0
- package/ts_authswitch/classes.authoritybroker.ts +26 -1
- package/ts_authswitch/classes.authoritycli.ts +48 -2
- package/ts_authswitch/classes.authorityclient.ts +14 -4
- package/ts_authswitch/classes.authoritydaemon.ts +8 -1
- package/ts_authswitch/classes.authoritydatabase.ts +11 -1
- package/ts_authswitch/classes.authoritymodels.ts +17 -6
- package/ts_authswitch/readme.md +1 -1
- package/ts_interfaces/requests.accounts.ts +17 -0
- package/ts_interfaces/requests.ts +2 -0
- package/ts_web/00_commitinfo_data.ts +1 -1
- package/ts_web/accounts.plugins.ts +4 -2
- package/ts_web/classes.accountsreadmodel.ts +64 -10
- package/ts_web/elements.accounts.ts +48 -0
|
@@ -1024,6 +1024,22 @@ export class AglAccounts extends plugins.deesElement.DeesElement {
|
|
|
1024
1024
|
});
|
|
1025
1025
|
}
|
|
1026
1026
|
|
|
1027
|
+
/**
|
|
1028
|
+
* Gives the account the owner's priority for 24 hours from now, or turns it off with `false`. The accounts service sets
|
|
1029
|
+
* its end by its own clock; the page shows it in local time once the projection has it.
|
|
1030
|
+
*/
|
|
1031
|
+
private async setPriority(rowArg: IAccountRow, priorityArg: boolean): Promise<void> {
|
|
1032
|
+
await this.runAction(`priority:${rowArg.accountId}`, async () => {
|
|
1033
|
+
const { answer } = await this.client!.fire<interfaces.IReq_ControllerAccountsPriority>(
|
|
1034
|
+
'controller.accounts.priority',
|
|
1035
|
+
{ accountId: rowArg.accountId, expectedRevision: rowArg.revision, priority: priorityArg },
|
|
1036
|
+
{ maxRetries: 0 },
|
|
1037
|
+
);
|
|
1038
|
+
this.notice = answerNotice(answer);
|
|
1039
|
+
await this.refresh();
|
|
1040
|
+
});
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1027
1043
|
/** Sets an API key's monthly spend limit from the field, in dollars, or clears it with `null`. */
|
|
1028
1044
|
private async setSpendLimit(rowArg: IAccountRow, spendLimitMicroUsdArg: number | null): Promise<void> {
|
|
1029
1045
|
await this.runAction(`spendlimit:${rowArg.accountId}`, async () => {
|
|
@@ -1075,6 +1091,31 @@ export class AglAccounts extends plugins.deesElement.DeesElement {
|
|
|
1075
1091
|
`;
|
|
1076
1092
|
}
|
|
1077
1093
|
|
|
1094
|
+
/**
|
|
1095
|
+
* The owner's priority (AGL-1809): while it holds, new sessions go to this account before any account of its pool
|
|
1096
|
+
* without one, for 24 hours from when it was given, or until it is turned off. Giving it again starts the 24 hours
|
|
1097
|
+
* again.
|
|
1098
|
+
*/
|
|
1099
|
+
private renderPriority(rowArg: IAccountRow, slotsArg: readonly IAccountActionSlot[]): plugins.deesElement.TemplateResult {
|
|
1100
|
+
return plugins.deesElement.html`
|
|
1101
|
+
<div class="item" data-priority>
|
|
1102
|
+
<div>
|
|
1103
|
+
<div class="itemLabel">Priority</div>
|
|
1104
|
+
<div class="itemText">AGL places new sessions on this account before any other while it takes them, for 24
|
|
1105
|
+
hours or until you turn it off; several accounts can have it. Sessions already running elsewhere stay where
|
|
1106
|
+
they are, and the account's limits still hold.</div>
|
|
1107
|
+
</div>
|
|
1108
|
+
<div class="inline">
|
|
1109
|
+
${rowArg.priorityStatus
|
|
1110
|
+
? plugins.deesElement.html`<dees-badge data-priority-status .type=${badgeType(rowArg.priorityStatus.tone)}
|
|
1111
|
+
.text=${rowArg.priorityStatus.text}></dees-badge>`
|
|
1112
|
+
: ''}
|
|
1113
|
+
${this.slots(slotsArg, (slotArg) => void this.setPriority(rowArg, slotArg.id === 'priority'))}
|
|
1114
|
+
</div>
|
|
1115
|
+
</div>
|
|
1116
|
+
`;
|
|
1117
|
+
}
|
|
1118
|
+
|
|
1078
1119
|
/**
|
|
1079
1120
|
* Adds the API key the dialog holds. The accounts service asks the provider whether it accepts the key before it holds
|
|
1080
1121
|
* anything, so the dialog's fields stay locked while it does; added, the dialog closes and the screen says the spend
|
|
@@ -1719,6 +1760,7 @@ export class AglAccounts extends plugins.deesElement.DeesElement {
|
|
|
1719
1760
|
const spendLimitSlot = slot('spendLimit');
|
|
1720
1761
|
const claudeCodeSlot = slot('claudeCode');
|
|
1721
1762
|
const liftSlot = slot('liftReserve');
|
|
1763
|
+
const prioritySlots = [slot('priority'), slot('clearPriority')].filter((slotArg) => slotArg !== null);
|
|
1722
1764
|
const removeSlot = slot('remove');
|
|
1723
1765
|
const useCodexSlot = slot('useCodex');
|
|
1724
1766
|
const releaseCodexSlot = slot('releaseCodex');
|
|
@@ -1845,6 +1887,12 @@ export class AglAccounts extends plugins.deesElement.DeesElement {
|
|
|
1845
1887
|
</div>
|
|
1846
1888
|
</section>`
|
|
1847
1889
|
: ''}
|
|
1890
|
+
${prioritySlots.length
|
|
1891
|
+
? plugins.deesElement.html`<section class="section" data-placement aria-label="Placement">
|
|
1892
|
+
<div class="sectionHead"><span>Placement</span></div>
|
|
1893
|
+
<div class="card">${this.renderPriority(rowArg, prioritySlots)}</div>
|
|
1894
|
+
</section>`
|
|
1895
|
+
: ''}
|
|
1848
1896
|
${rowArg.harnesses.length || rowArg.flexActions.length
|
|
1849
1897
|
? plugins.deesElement.html`<section class="section" data-used-by aria-label="Used by">
|
|
1850
1898
|
<div class="sectionHead"><span>Used by</span></div>
|