agl 43.5.0 → 43.6.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.
@@ -1,4 +1,4 @@
1
1
  [diffend] Oversized file quarantined before diffing.
2
2
  name: package/dist_serve/bundle.js.map
3
- size: 34827291 bytes
4
- sha256: 31f989ae78ad08ad7798073acb8c90a98a937b280d7ce74b5ba7a0ecc01a5202
3
+ size: 34828957 bytes
4
+ sha256: 1810cb0b4590ce3864bae4193e0cb73bc19fa03457a44241181dcd355c0cdbbe
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: 'agl',
6
- version: '43.5.0',
6
+ version: '43.6.0',
7
7
  description: 'Agent Gateway Layer for OpenCode, FlexHarness, and Codex sessions'
8
8
  };
9
9
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSxLQUFLO0lBQ1gsT0FBTyxFQUFFLFFBQVE7SUFDakIsV0FBVyxFQUFFLG1FQUFtRTtDQUNqRixDQUFBIn0=
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agl",
3
- "version": "43.5.0",
3
+ "version": "43.6.0",
4
4
  "controllerUpgradeManagementVersion": 2,
5
5
  "controllerManagementProtocolVersion": 1,
6
6
  "controllerGatewaySourcesVersion": 1,
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: 'agl',
6
- version: '43.5.0',
6
+ version: '43.6.0',
7
7
  description: 'Agent Gateway Layer for OpenCode, FlexHarness, and Codex sessions'
8
8
  }
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: 'agl',
6
- version: '43.5.0',
6
+ version: '43.6.0',
7
7
  description: 'Agent Gateway Layer for OpenCode, FlexHarness, and Codex sessions'
8
8
  }
@@ -1333,15 +1333,35 @@ const keyIdentityText = (accountArg: TAccount): string => {
1333
1333
  return accountArg.keyHint === null ? `${provider} API key` : `${provider} API key ending ${accountArg.keyHint}`;
1334
1334
  };
1335
1335
 
1336
- /** The list row's second line: who the account is -- email and plan, or a key's identity -- and who uses it. */
1337
- const listMeta = (accountArg: TAccount, chipsArg: readonly IAccountHarnessChip[]): string => [
1338
- ...isApiKeyAccount(accountArg) ? [keyIdentityText(accountArg)] : [
1339
- accountArg.email && accountArg.email !== accountArg.label ? accountArg.email : '',
1340
- accountArg.plan ? `${accountArg.plan} plan` : '',
1341
- ],
1342
- chipsArg.filter((chipArg) => chipArg.unavailableReason === undefined)
1343
- .map((chipArg) => harnessLabel(chipArg.harnessId)).join(', '),
1344
- ].filter(Boolean).join(' · ');
1336
+ /**
1337
+ * A Claude sign-in's next renewal as its list row says it: "renews in 12 days", in hours within the last day, or that
1338
+ * none is set (AGL sets none itself, AGL-1644).
1339
+ */
1340
+ export const renewalListText = (renewsAtArg: string | null, nowArg: number): string => {
1341
+ const renewal = plugins.authswitchRenewal.authSwitchRenewal(renewsAtArg, nowArg);
1342
+ if (renewal === null) return 'renewal not set';
1343
+ const hours = Math.max(0, Math.floor((Date.parse(renewal.at) - nowArg) / 3_600_000));
1344
+ const days = Math.floor(hours / 24);
1345
+ return days >= 1 ? `renews in ${days} ${days === 1 ? 'day' : 'days'}`
1346
+ : hours >= 1 ? `renews in ${hours} ${hours === 1 ? 'hour' : 'hours'}` : 'renews within the hour';
1347
+ };
1348
+
1349
+ /**
1350
+ * The list row's second line: who the account is -- email and plan, or a key's identity -- and who uses it. A Claude
1351
+ * sign-in says when it renews instead of naming the AGL proxy, which every one of them is used by.
1352
+ */
1353
+ const listMeta = (accountArg: TAccount, chipsArg: readonly IAccountHarnessChip[], nowArg: number): string => {
1354
+ const claudeSignIn = !isApiKeyAccount(accountArg) && accountArg.providerId === 'anthropic';
1355
+ return [
1356
+ ...isApiKeyAccount(accountArg) ? [keyIdentityText(accountArg)] : [
1357
+ accountArg.email && accountArg.email !== accountArg.label ? accountArg.email : '',
1358
+ accountArg.plan ? `${accountArg.plan} plan` : '',
1359
+ ],
1360
+ chipsArg.filter((chipArg) => chipArg.unavailableReason === undefined && !(claudeSignIn && chipArg.harnessId === 'gateway'))
1361
+ .map((chipArg) => harnessLabel(chipArg.harnessId)).join(', '),
1362
+ claudeSignIn ? renewalListText(accountArg.renewsAt, nowArg) : '',
1363
+ ].filter(Boolean).join(' · ');
1364
+ };
1345
1365
 
1346
1366
  interface IRowContext {
1347
1367
  service: IAccountsServiceStatus;
@@ -1607,7 +1627,7 @@ const serviceRow = (
1607
1627
  limitText: !spend ? 'At limit' : heldUnpriced(spend) ? 'Unpriced answer' : 'At spend limit',
1608
1628
  liftedUntil,
1609
1629
  }),
1610
- listMeta: accountArg.removed ? identity : listMeta(accountArg, harnesses),
1630
+ listMeta: accountArg.removed ? identity : listMeta(accountArg, harnesses, contextArg.now),
1611
1631
  primaryMeter: spend ? spendMeter(spend) : primaryMeter(usage, accountArg.maxUsagePercent),
1612
1632
  backAt: rawLimit?.resetAt ?? null,
1613
1633
  harnesses,