@dotobokuri/fleet-console 1.58.1 → 1.60.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.
Files changed (68) hide show
  1. package/AGENTS.md +1 -1
  2. package/dist/cli.mjs +664 -193
  3. package/dist/client/assets/{_baseUniq-DJ4C0UQF.js → _baseUniq-CA3I-KTP.js} +1 -1
  4. package/dist/client/assets/{arc-DkQKttnC.js → arc-DOkIWugv.js} +1 -1
  5. package/dist/client/assets/{architectureDiagram-Q4EWVU46-BpuET3uK.js → architectureDiagram-Q4EWVU46--Z_t3Gn9.js} +1 -1
  6. package/dist/client/assets/{blockDiagram-DXYQGD6D-CatlulZp.js → blockDiagram-DXYQGD6D-CrRA5qvl.js} +1 -1
  7. package/dist/client/assets/{c4Diagram-AHTNJAMY-BPfWevDh.js → c4Diagram-AHTNJAMY-DKvbMOAM.js} +1 -1
  8. package/dist/client/assets/channel-Bjfd2afp.js +1 -0
  9. package/dist/client/assets/{chunk-4BX2VUAB-a7lkla2P.js → chunk-4BX2VUAB-D6wc2KrB.js} +1 -1
  10. package/dist/client/assets/{chunk-4TB4RGXK-Bh-20OVN.js → chunk-4TB4RGXK-B4QvYh7f.js} +1 -1
  11. package/dist/client/assets/{chunk-55IACEB6-DiPm-_AS.js → chunk-55IACEB6-B0VZPoad.js} +1 -1
  12. package/dist/client/assets/{chunk-EDXVE4YY-BcGep4mz.js → chunk-EDXVE4YY-BdHIgvVh.js} +1 -1
  13. package/dist/client/assets/{chunk-FMBD7UC4-Cn0A6Wm1.js → chunk-FMBD7UC4-BAYTd_pU.js} +1 -1
  14. package/dist/client/assets/{chunk-OYMX7WX6-DNTIDjw4.js → chunk-OYMX7WX6-DkZ-neug.js} +1 -1
  15. package/dist/client/assets/{chunk-QZHKN3VN-cji_BhbG.js → chunk-QZHKN3VN-B5h7E8GE.js} +1 -1
  16. package/dist/client/assets/{chunk-YZCP3GAM-B6I5kLlB.js → chunk-YZCP3GAM-COMJ2EwJ.js} +1 -1
  17. package/dist/client/assets/classDiagram-6PBFFD2Q-DgpHvFOU.js +1 -0
  18. package/dist/client/assets/classDiagram-v2-HSJHXN6E-DgpHvFOU.js +1 -0
  19. package/dist/client/assets/clone-sFXqwEZz.js +1 -0
  20. package/dist/client/assets/{cose-bilkent-S5V4N54A-_Xmui3Dj.js → cose-bilkent-S5V4N54A-JvC7pCqe.js} +1 -1
  21. package/dist/client/assets/{dagre-KV5264BT-BI_m6tGN.js → dagre-KV5264BT-jZdVPQcJ.js} +1 -1
  22. package/dist/client/assets/{diagram-5BDNPKRD-JDBqcRRR.js → diagram-5BDNPKRD-B6-u7AU2.js} +1 -1
  23. package/dist/client/assets/{diagram-G4DWMVQ6-CdIHKaZT.js → diagram-G4DWMVQ6-CV5G3KNM.js} +1 -1
  24. package/dist/client/assets/{diagram-MMDJMWI5-CULX6wM5.js → diagram-MMDJMWI5-ZLrEkNww.js} +1 -1
  25. package/dist/client/assets/{diagram-TYMM5635-C1JXiI2W.js → diagram-TYMM5635-D1tv2JX9.js} +1 -1
  26. package/dist/client/assets/{erDiagram-SMLLAGMA-RJI8bZrW.js → erDiagram-SMLLAGMA-Bta0Mt3t.js} +1 -1
  27. package/dist/client/assets/{flowDiagram-DWJPFMVM-CSrF7U0E.js → flowDiagram-DWJPFMVM-C282oRLT.js} +1 -1
  28. package/dist/client/assets/{ganttDiagram-T4ZO3ILL-CHp3LObA.js → ganttDiagram-T4ZO3ILL-D9P4CVIW.js} +1 -1
  29. package/dist/client/assets/{gitGraphDiagram-UUTBAWPF-BEeoTjqh.js → gitGraphDiagram-UUTBAWPF-DLQnTjJ2.js} +1 -1
  30. package/dist/client/assets/{graph-DNvMdh3j.js → graph-Cd8Q-8WG.js} +1 -1
  31. package/dist/client/assets/index-B3gusU1E.js +465 -0
  32. package/dist/client/assets/index-_PHObHQ-.css +1 -0
  33. package/dist/client/assets/{infoDiagram-42DDH7IO-31kh8JMu.js → infoDiagram-42DDH7IO-ClhLpons.js} +1 -1
  34. package/dist/client/assets/{ishikawaDiagram-UXIWVN3A-DZgEgolJ.js → ishikawaDiagram-UXIWVN3A-BDeZ2vOG.js} +1 -1
  35. package/dist/client/assets/{journeyDiagram-VCZTEJTY-DfZ3i3Bu.js → journeyDiagram-VCZTEJTY-DbJhbFKN.js} +1 -1
  36. package/dist/client/assets/{kanban-definition-6JOO6SKY-giivFfnv.js → kanban-definition-6JOO6SKY-CYKcE2fE.js} +1 -1
  37. package/dist/client/assets/{layout-DdVRNrH8.js → layout-CuAgTRkn.js} +1 -1
  38. package/dist/client/assets/{linear-3cmeYdGh.js → linear-3EL9MakS.js} +1 -1
  39. package/dist/client/assets/{mermaid.core-Cjqy_Y5Z.js → mermaid.core-7qKaxHEA.js} +4 -4
  40. package/dist/client/assets/{min-Cgsd0one.js → min-4mJsdKjT.js} +1 -1
  41. package/dist/client/assets/{mindmap-definition-QFDTVHPH-PfuGubxC.js → mindmap-definition-QFDTVHPH-B-Zve2OH.js} +1 -1
  42. package/dist/client/assets/{pieDiagram-DEJITSTG-B9O6H439.js → pieDiagram-DEJITSTG-DlsdbAii.js} +1 -1
  43. package/dist/client/assets/{quadrantDiagram-34T5L4WZ-DJH7RQzs.js → quadrantDiagram-34T5L4WZ-Cb4h0xwt.js} +1 -1
  44. package/dist/client/assets/{requirementDiagram-MS252O5E-BZHTYV2q.js → requirementDiagram-MS252O5E-CZNGYqJt.js} +1 -1
  45. package/dist/client/assets/{sankeyDiagram-XADWPNL6-B5aGVyLG.js → sankeyDiagram-XADWPNL6-DeVSGR6W.js} +1 -1
  46. package/dist/client/assets/{sequenceDiagram-FGHM5R23-D2890FYU.js → sequenceDiagram-FGHM5R23-Te7TkLIe.js} +1 -1
  47. package/dist/client/assets/{stateDiagram-FHFEXIEX-DWmhZMWZ.js → stateDiagram-FHFEXIEX-Be-0oYyv.js} +1 -1
  48. package/dist/client/assets/stateDiagram-v2-QKLJ7IA2-BnQ2lBhr.js +1 -0
  49. package/dist/client/assets/{timeline-definition-GMOUNBTQ-B0pTOfcD.js → timeline-definition-GMOUNBTQ-DQyUgC-K.js} +1 -1
  50. package/dist/client/assets/{vennDiagram-DHZGUBPP-D-S4XLnE.js → vennDiagram-DHZGUBPP-BrArIWI8.js} +1 -1
  51. package/dist/client/assets/{wardley-RL74JXVD-ClPA8Fc3.js → wardley-RL74JXVD-6-sWm8kk.js} +1 -1
  52. package/dist/client/assets/{wardleyDiagram-NUSXRM2D-JJgj7CxJ.js → wardleyDiagram-NUSXRM2D-C4MvFXGS.js} +1 -1
  53. package/dist/client/assets/{xychartDiagram-5P7HB3ND-BBIy9-Kq.js → xychartDiagram-5P7HB3ND-CGrtjhmr.js} +1 -1
  54. package/dist/client/index.html +2 -2
  55. package/dist/fleet-plugins/file-explorer/routes.mjs +132 -13
  56. package/dist/fleet-plugins/ledger/routes.mjs +223 -16
  57. package/dist/fleet-plugins/quota/routes.mjs +206 -270
  58. package/dist/fleet-plugins/scuttlebutt/routes.mjs +557 -130
  59. package/dist/fleet-plugins/terminal/routes.mjs +7107 -5403
  60. package/dist/fleet.mjs +6063 -5545
  61. package/package.json +1 -1
  62. package/dist/client/assets/channel-DDcyY5eB.js +0 -1
  63. package/dist/client/assets/classDiagram-6PBFFD2Q-CqqUqRwS.js +0 -1
  64. package/dist/client/assets/classDiagram-v2-HSJHXN6E-CqqUqRwS.js +0 -1
  65. package/dist/client/assets/clone-CjMEm_X8.js +0 -1
  66. package/dist/client/assets/index-BG857Idy.css +0 -1
  67. package/dist/client/assets/index-CCNdSGui.js +0 -483
  68. package/dist/client/assets/stateDiagram-v2-QKLJ7IA2-DoQKtZ4H.js +0 -1
@@ -1,13 +1,14 @@
1
1
  #!/usr/bin/env node
2
- import { execFile } from 'node:child_process';
2
+ import { execFile } from 'child_process';
3
+ import { constants } from 'fs';
4
+ import fs22 from 'fs/promises';
5
+ import os4 from 'os';
6
+ import { promisify } from 'util';
7
+ import path32 from 'path';
8
+ import { deflateRawSync } from 'zlib';
3
9
  import * as fs4 from 'node:fs';
4
- import fs4__default, { constants } from 'node:fs';
5
- import fs32 from 'node:fs/promises';
10
+ import * as path from 'node:path';
6
11
  import * as os3 from 'node:os';
7
- import os3__default from 'node:os';
8
- import { promisify } from 'node:util';
9
- import * as path32 from 'node:path';
10
- import path32__default from 'node:path';
11
12
 
12
13
  var __defProp = Object.defineProperty;
13
14
  var __export = (target, all) => {
@@ -19,16 +20,16 @@ var __export = (target, all) => {
19
20
  function definePlugin(definition) {
20
21
  return definition;
21
22
  }
22
- function registerRouter(ctx, path6, handler, catalog) {
23
+ function registerRouter(ctx, path5, handler, catalog) {
23
24
  if (catalog) {
24
- ctx.registerRouter(normalizePath(path6), handler, catalog);
25
+ ctx.registerRouter(normalizePath(path5), handler, catalog);
25
26
  return;
26
27
  }
27
- ctx.registerRouter(normalizePath(path6), handler);
28
+ ctx.registerRouter(normalizePath(path5), handler);
28
29
  }
29
- function normalizePath(path6) {
30
- if (path6.length === 0 || path6 === "/") return "/";
31
- return path6;
30
+ function normalizePath(path5) {
31
+ if (path5.length === 0 || path5 === "/") return "/";
32
+ return path5;
32
33
  }
33
34
 
34
35
  // ../../node_modules/.pnpm/zod@4.4.1/node_modules/zod/v4/classic/external.js
@@ -793,10 +794,10 @@ function mergeDefs(...defs) {
793
794
  function cloneDef(schema) {
794
795
  return mergeDefs(schema._zod.def);
795
796
  }
796
- function getElementAtPath(obj, path6) {
797
- if (!path6)
797
+ function getElementAtPath(obj, path5) {
798
+ if (!path5)
798
799
  return obj;
799
- return path6.reduce((acc, key) => acc?.[key], obj);
800
+ return path5.reduce((acc, key) => acc?.[key], obj);
800
801
  }
801
802
  function promiseAllObject(promisesObj) {
802
803
  const keys = Object.keys(promisesObj);
@@ -1205,11 +1206,11 @@ function explicitlyAborted(x, startIndex = 0) {
1205
1206
  }
1206
1207
  return false;
1207
1208
  }
1208
- function prefixIssues(path6, issues) {
1209
+ function prefixIssues(path5, issues) {
1209
1210
  return issues.map((iss) => {
1210
1211
  var _a3;
1211
1212
  (_a3 = iss).path ?? (_a3.path = []);
1212
- iss.path.unshift(path6);
1213
+ iss.path.unshift(path5);
1213
1214
  return iss;
1214
1215
  });
1215
1216
  }
@@ -1356,16 +1357,16 @@ function flattenError(error51, mapper = (issue2) => issue2.message) {
1356
1357
  }
1357
1358
  function formatError(error51, mapper = (issue2) => issue2.message) {
1358
1359
  const fieldErrors = { _errors: [] };
1359
- const processError = (error52, path6 = []) => {
1360
+ const processError = (error52, path5 = []) => {
1360
1361
  for (const issue2 of error52.issues) {
1361
1362
  if (issue2.code === "invalid_union" && issue2.errors.length) {
1362
- issue2.errors.map((issues) => processError({ issues }, [...path6, ...issue2.path]));
1363
+ issue2.errors.map((issues) => processError({ issues }, [...path5, ...issue2.path]));
1363
1364
  } else if (issue2.code === "invalid_key") {
1364
- processError({ issues: issue2.issues }, [...path6, ...issue2.path]);
1365
+ processError({ issues: issue2.issues }, [...path5, ...issue2.path]);
1365
1366
  } else if (issue2.code === "invalid_element") {
1366
- processError({ issues: issue2.issues }, [...path6, ...issue2.path]);
1367
+ processError({ issues: issue2.issues }, [...path5, ...issue2.path]);
1367
1368
  } else {
1368
- const fullpath = [...path6, ...issue2.path];
1369
+ const fullpath = [...path5, ...issue2.path];
1369
1370
  if (fullpath.length === 0) {
1370
1371
  fieldErrors._errors.push(mapper(issue2));
1371
1372
  } else {
@@ -1392,17 +1393,17 @@ function formatError(error51, mapper = (issue2) => issue2.message) {
1392
1393
  }
1393
1394
  function treeifyError(error51, mapper = (issue2) => issue2.message) {
1394
1395
  const result = { errors: [] };
1395
- const processError = (error52, path6 = []) => {
1396
+ const processError = (error52, path5 = []) => {
1396
1397
  var _a3, _b;
1397
1398
  for (const issue2 of error52.issues) {
1398
1399
  if (issue2.code === "invalid_union" && issue2.errors.length) {
1399
- issue2.errors.map((issues) => processError({ issues }, [...path6, ...issue2.path]));
1400
+ issue2.errors.map((issues) => processError({ issues }, [...path5, ...issue2.path]));
1400
1401
  } else if (issue2.code === "invalid_key") {
1401
- processError({ issues: issue2.issues }, [...path6, ...issue2.path]);
1402
+ processError({ issues: issue2.issues }, [...path5, ...issue2.path]);
1402
1403
  } else if (issue2.code === "invalid_element") {
1403
- processError({ issues: issue2.issues }, [...path6, ...issue2.path]);
1404
+ processError({ issues: issue2.issues }, [...path5, ...issue2.path]);
1404
1405
  } else {
1405
- const fullpath = [...path6, ...issue2.path];
1406
+ const fullpath = [...path5, ...issue2.path];
1406
1407
  if (fullpath.length === 0) {
1407
1408
  result.errors.push(mapper(issue2));
1408
1409
  continue;
@@ -1434,8 +1435,8 @@ function treeifyError(error51, mapper = (issue2) => issue2.message) {
1434
1435
  }
1435
1436
  function toDotPath(_path) {
1436
1437
  const segs = [];
1437
- const path6 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
1438
- for (const seg of path6) {
1438
+ const path5 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
1439
+ for (const seg of path5) {
1439
1440
  if (typeof seg === "number")
1440
1441
  segs.push(`[${seg}]`);
1441
1442
  else if (typeof seg === "symbol")
@@ -14099,13 +14100,13 @@ function resolveRef(ref, ctx) {
14099
14100
  if (!ref.startsWith("#")) {
14100
14101
  throw new Error("External $ref is not supported, only local refs (#/...) are allowed");
14101
14102
  }
14102
- const path6 = ref.slice(1).split("/").filter(Boolean);
14103
- if (path6.length === 0) {
14103
+ const path5 = ref.slice(1).split("/").filter(Boolean);
14104
+ if (path5.length === 0) {
14104
14105
  return ctx.rootSchema;
14105
14106
  }
14106
14107
  const defsKey = ctx.version === "draft-2020-12" ? "$defs" : "definitions";
14107
- if (path6[0] === defsKey) {
14108
- const key = path6[1];
14108
+ if (path5[0] === defsKey) {
14109
+ const key = path5[1];
14109
14110
  if (!key || !ctx.defs[key]) {
14110
14111
  throw new Error(`Reference not found: ${ref}`);
14111
14112
  }
@@ -17093,8 +17094,8 @@ function bootEnumDescriptorProto(init) {
17093
17094
  }
17094
17095
 
17095
17096
  // ../../node_modules/.pnpm/@bufbuild+protobuf@2.13.0/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/message.js
17096
- function messageDesc(file2, path6, ...paths) {
17097
- return paths.reduce((acc, cur) => acc.nestedMessages[cur], file2.messages[path6]);
17097
+ function messageDesc(file2, path5, ...paths) {
17098
+ return paths.reduce((acc, cur) => acc.nestedMessages[cur], file2.messages[path5]);
17098
17099
  }
17099
17100
 
17100
17101
  // ../../node_modules/.pnpm/@bufbuild+protobuf@2.13.0/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/descriptor_pb.js
@@ -17454,8 +17455,8 @@ var FLEET_DATA_DIR_NAME = ".fleet";
17454
17455
  var FLEET_DATA_DIR_ENV = "FLEET_DATA_DIR";
17455
17456
  function getFleetDataDir(env = process.env) {
17456
17457
  const override = env[FLEET_DATA_DIR_ENV];
17457
- if (override === void 0 || override.trim().length === 0) return path32.join(os3.homedir(), FLEET_DATA_DIR_NAME);
17458
- if (!path32.isAbsolute(override)) throw new Error(`${FLEET_DATA_DIR_ENV} must be an absolute path, received: ${override}`);
17458
+ if (override === void 0 || override.trim().length === 0) return path.join(os3.homedir(), FLEET_DATA_DIR_NAME);
17459
+ if (!path.isAbsolute(override)) throw new Error(`${FLEET_DATA_DIR_ENV} must be an absolute path, received: ${override}`);
17459
17460
  return override;
17460
17461
  }
17461
17462
  var SECURE_DIR_MODE = 448;
@@ -17628,7 +17629,7 @@ function writeLockOwner(lockDir, ownerFileName, startedAt) {
17628
17629
  hostname: os3.hostname(),
17629
17630
  startedAt
17630
17631
  };
17631
- const ownerPath = path32.join(lockDir, ownerFileName);
17632
+ const ownerPath = path.join(lockDir, ownerFileName);
17632
17633
  try {
17633
17634
  fs4.writeFileSync(ownerPath, JSON.stringify(owner), { encoding: "utf-8", mode: 384 });
17634
17635
  } catch (error51) {
@@ -17637,7 +17638,7 @@ function writeLockOwner(lockDir, ownerFileName, startedAt) {
17637
17638
  }
17638
17639
  }
17639
17640
  function readLockOwner(lockDir, ownerFileName) {
17640
- const ownerPath = path32.join(lockDir, ownerFileName);
17641
+ const ownerPath = path.join(lockDir, ownerFileName);
17641
17642
  try {
17642
17643
  return sanitizeLockOwner(JSON.parse(fs4.readFileSync(ownerPath, "utf-8")));
17643
17644
  } catch (error51) {
@@ -17695,7 +17696,7 @@ function sleepSync(ms) {
17695
17696
  }
17696
17697
 
17697
17698
  // ../../packages/core-infra/src/auth/auth-storage.ts
17698
- var DEFAULT_AUTH_PATH = path32.join(getFleetDataDir(), "auth.json");
17699
+ var DEFAULT_AUTH_PATH = path.join(getFleetDataDir(), "auth.json");
17699
17700
  var AUTH_LOCK_OWNER_FILE_NAME = "owner.json";
17700
17701
  var AUTH_LOCK_TIMEOUT_MS = 5e3;
17701
17702
  function readAuthStoreFile(filePath) {
@@ -17770,7 +17771,7 @@ function createAuthService(deps = {}) {
17770
17771
  }
17771
17772
  },
17772
17773
  async setApiKey(providerId, key) {
17773
- const dir = path32.dirname(authPath);
17774
+ const dir = path.dirname(authPath);
17774
17775
  ensureSafeDirectory(dir);
17775
17776
  withAuthLock(authPath, lockDir, () => {
17776
17777
  const data = fs4.existsSync(authPath) ? readAuthStoreFile(authPath) : {};
@@ -17963,6 +17964,26 @@ var benchmarks_default = {
17963
17964
  }
17964
17965
  }
17965
17966
  },
17967
+ "claude-opus-5": {
17968
+ source: "cursorbench",
17969
+ rungs: {
17970
+ low: { score: 62.8, tokensPerTask: 18529, stepsPerTask: 37 },
17971
+ medium: { score: 64.3, tokensPerTask: 23612, stepsPerTask: 44 },
17972
+ high: { score: 66.7, tokensPerTask: 27932, stepsPerTask: 48 },
17973
+ xhigh: { score: 69.3, tokensPerTask: 54239, stepsPerTask: 72 },
17974
+ max: { score: 70, tokensPerTask: 61838, stepsPerTask: 78 }
17975
+ }
17976
+ },
17977
+ "claude-fable-5": {
17978
+ source: "cursorbench",
17979
+ rungs: {
17980
+ low: { score: 62.1, tokensPerTask: 18182, stepsPerTask: 31 },
17981
+ medium: { score: 65.2, tokensPerTask: 30366, stepsPerTask: 41 },
17982
+ high: { score: 66.5, tokensPerTask: 43747, stepsPerTask: 48 },
17983
+ xhigh: { score: 68.4, tokensPerTask: 64971, stepsPerTask: 56 },
17984
+ max: { score: 70.5, tokensPerTask: 103525, stepsPerTask: 72 }
17985
+ }
17986
+ },
17966
17987
  "kimi-k3": {
17967
17988
  source: "cursorbench",
17968
17989
  rungs: {
@@ -18011,7 +18032,7 @@ var benchmarks_default = {
18011
18032
  };
18012
18033
  var models_default = {
18013
18034
  version: 1,
18014
- updatedAt: "2026-08-14T00:00:00Z",
18035
+ updatedAt: "2026-08-15T00:00:00Z",
18015
18036
  providers: {
18016
18037
  codex: {
18017
18038
  name: "Codex",
@@ -18153,7 +18174,7 @@ var models_default = {
18153
18174
  cursor: {
18154
18175
  name: "Cursor",
18155
18176
  defaultModel: "auto",
18156
- source: "Cursor GetUsableModels + Run conversationCheckpointUpdate.token_details.max_tokens (cli-2026.07.08-0c04a8a; auto, composer-2.5, and grok-4.5 families observed 2026-08-01); cursor-agent 2026.08.11-e8db854 observed 2026-08-13 for grok-4.6; quotaScope from DashboardService/GetCurrentPeriodUsage autoBucketModels (2026-08-05)",
18177
+ source: "Cursor GetUsableModels + Run conversationCheckpointUpdate.token_details.max_tokens (cli-2026.07.08-0c04a8a; auto, composer-2.5, and grok-4.5 families observed 2026-08-01); cursor-agent 2026.08.11-e8db854 observed 2026-08-13 for grok-4.6; claude-opus-5 and claude-fable-5 standard/Max Mode windows observed 2026-08-10; quotaScope from DashboardService/GetCurrentPeriodUsage autoBucketModels (2026-08-05)",
18157
18178
  models: [
18158
18179
  {
18159
18180
  modelId: "auto",
@@ -18247,6 +18268,94 @@ var models_default = {
18247
18268
  ],
18248
18269
  upstreamModelIdTemplate: "cursor-grok-4.6-{effort}-fast"
18249
18270
  }
18271
+ },
18272
+ {
18273
+ modelId: "claude-opus-5",
18274
+ name: "Opus-5",
18275
+ capabilityClass: "flagship",
18276
+ quotaScope: "api",
18277
+ contextWindow: 3e5,
18278
+ effort: {
18279
+ supported: true,
18280
+ levels: [
18281
+ "low",
18282
+ "medium",
18283
+ "high",
18284
+ "xhigh",
18285
+ "max"
18286
+ ],
18287
+ upstreamModelIdTemplate: "claude-opus-5-{effort}",
18288
+ upstreamModelIds: {
18289
+ xhigh: "claude-opus-5-thinking-xhigh",
18290
+ max: "claude-opus-5-thinking-max"
18291
+ }
18292
+ },
18293
+ benchmarkKey: "claude-opus-5"
18294
+ },
18295
+ {
18296
+ modelId: "claude-opus-5-1m",
18297
+ name: "Opus-5-1M",
18298
+ capabilityClass: "flagship",
18299
+ quotaScope: "api",
18300
+ contextWindow: 1e6,
18301
+ cursorMaxMode: true,
18302
+ effort: {
18303
+ supported: true,
18304
+ levels: [
18305
+ "low",
18306
+ "medium",
18307
+ "high",
18308
+ "xhigh",
18309
+ "max"
18310
+ ],
18311
+ upstreamModelIdTemplate: "claude-opus-5-{effort}",
18312
+ upstreamModelIds: {
18313
+ xhigh: "claude-opus-5-thinking-xhigh",
18314
+ max: "claude-opus-5-thinking-max"
18315
+ }
18316
+ },
18317
+ benchmarkKey: "claude-opus-5"
18318
+ },
18319
+ {
18320
+ modelId: "claude-fable-5",
18321
+ name: "Fable-5",
18322
+ capabilityClass: "flagship",
18323
+ quotaScope: "api",
18324
+ description: "NO ZDR",
18325
+ contextWindow: 3e5,
18326
+ effort: {
18327
+ supported: true,
18328
+ levels: [
18329
+ "low",
18330
+ "medium",
18331
+ "high",
18332
+ "xhigh",
18333
+ "max"
18334
+ ],
18335
+ upstreamModelIdTemplate: "claude-fable-5-{effort}"
18336
+ },
18337
+ benchmarkKey: "claude-fable-5"
18338
+ },
18339
+ {
18340
+ modelId: "claude-fable-5-1m",
18341
+ name: "Fable-5-1M",
18342
+ capabilityClass: "flagship",
18343
+ quotaScope: "api",
18344
+ description: "NO ZDR",
18345
+ contextWindow: 1e6,
18346
+ cursorMaxMode: true,
18347
+ effort: {
18348
+ supported: true,
18349
+ levels: [
18350
+ "low",
18351
+ "medium",
18352
+ "high",
18353
+ "xhigh",
18354
+ "max"
18355
+ ],
18356
+ upstreamModelIdTemplate: "claude-fable-5-{effort}"
18357
+ },
18358
+ benchmarkKey: "claude-fable-5"
18250
18359
  }
18251
18360
  ]
18252
18361
  },
@@ -18998,7 +19107,7 @@ var execFileAsync = promisify(execFile);
18998
19107
  var MAX_CREDENTIAL_BYTES = 65536;
18999
19108
  var CREDENTIAL_OPEN_FLAGS = process.platform === "win32" ? constants.O_RDONLY : constants.O_RDONLY | constants.O_NONBLOCK;
19000
19109
  async function readBoundedFile(filePath, maxBytes) {
19001
- const handle = await fs32.open(filePath, CREDENTIAL_OPEN_FLAGS);
19110
+ const handle = await fs22.open(filePath, CREDENTIAL_OPEN_FLAGS);
19002
19111
  try {
19003
19112
  const stat2 = await handle.stat();
19004
19113
  if (!stat2.isFile() || stat2.size > maxBytes) return null;
@@ -19021,7 +19130,7 @@ async function readBoundedFile(filePath, maxBytes) {
19021
19130
  }
19022
19131
  var defaultCredentialDeps = {
19023
19132
  platform: process.platform,
19024
- homedir: os3__default.homedir,
19133
+ homedir: os4.homedir,
19025
19134
  env: process.env,
19026
19135
  readBounded: readBoundedFile,
19027
19136
  execFile: async (file2, args, options) => {
@@ -19051,10 +19160,12 @@ function parseClaudeCredentialJson(raw, method) {
19051
19160
  const oauth = credentialRecord(parsed.claudeAiOauth);
19052
19161
  const accessToken = optionalString(oauth?.accessToken ?? parsed.accessToken);
19053
19162
  if (!accessToken) return null;
19163
+ const rateLimitTier = optionalString(oauth?.rateLimitTier ?? parsed.rateLimitTier);
19054
19164
  return {
19055
19165
  accessToken,
19056
19166
  expiresAt: optionalEpoch(oauth?.expiresAt ?? parsed.expiresAt),
19057
19167
  subscriptionType: optionalString(oauth?.subscriptionType ?? parsed.subscriptionType),
19168
+ ...rateLimitTier === void 0 ? {} : { rateLimitTier },
19058
19169
  method
19059
19170
  };
19060
19171
  } catch {
@@ -19074,15 +19185,22 @@ async function resolveClaudeCredentials(deps) {
19074
19185
  } catch {
19075
19186
  }
19076
19187
  }
19077
- const configDir = deps.env.CLAUDE_CONFIG_DIR || path32__default.join(deps.homedir(), ".claude");
19188
+ const configDir = deps.env.CLAUDE_CONFIG_DIR || path32.join(deps.homedir(), ".claude");
19078
19189
  try {
19079
- const raw = await deps.readBounded(path32__default.join(configDir, ".credentials.json"), MAX_CREDENTIAL_BYTES);
19190
+ const raw = await deps.readBounded(path32.join(configDir, ".credentials.json"), MAX_CREDENTIAL_BYTES);
19080
19191
  return raw === null || raw.length > MAX_CREDENTIAL_BYTES ? null : parseClaudeCredentialJson(raw, "file");
19081
19192
  } catch {
19082
19193
  return null;
19083
19194
  }
19084
19195
  }
19085
19196
  var CLAUDE_SESSION_MS = 5 * HOUR_MS;
19197
+ function formatClaudePlan(subscriptionType, rateLimitTier) {
19198
+ const base = titleCase(subscriptionType);
19199
+ if (!base) return void 0;
19200
+ if (base.toLowerCase() !== "max" || typeof rateLimitTier !== "string") return base;
19201
+ const match = /\d+x/i.exec(rateLimitTier.trim());
19202
+ return match ? titleCase(`${base} ${match[0].toLowerCase()}`) : base;
19203
+ }
19086
19204
  function firstClaudePercent(row) {
19087
19205
  for (const key of ["percent", "used_percentage", "utilization"]) {
19088
19206
  const value = row[key];
@@ -19166,7 +19284,7 @@ async function fetchClaudeUsage(deps = {}) {
19166
19284
  return {
19167
19285
  status: "ok",
19168
19286
  method: credentials.method,
19169
- plan: titleCase(credentials.subscriptionType),
19287
+ plan: formatClaudePlan(credentials.subscriptionType, credentials.rateLimitTier),
19170
19288
  windows: parsed.windows,
19171
19289
  fetchedAt: (deps.now ?? Date.now)()
19172
19290
  };
@@ -19180,7 +19298,7 @@ function optionalNonEmptyString(value) {
19180
19298
  return typeof value === "string" && value.length > 0 ? value : void 0;
19181
19299
  }
19182
19300
  function codexAuthFilePath(deps) {
19183
- return path32__default.join(deps.env.CODEX_HOME || path32__default.join(deps.homedir(), ".codex"), "auth.json");
19301
+ return path32.join(deps.env.CODEX_HOME || path32.join(deps.homedir(), ".codex"), "auth.json");
19184
19302
  }
19185
19303
  async function resolveCodexCredentials(deps) {
19186
19304
  try {
@@ -19211,6 +19329,17 @@ function codexWindow(source, fallbackId) {
19211
19329
  ...period ? { period } : {}
19212
19330
  };
19213
19331
  }
19332
+ function formatCodexPlan(value) {
19333
+ if (typeof value !== "string") return titleCase(value);
19334
+ switch (value.trim().toLowerCase()) {
19335
+ case "prolite":
19336
+ return "Pro 5x";
19337
+ case "pro":
19338
+ return "Pro 20x";
19339
+ default:
19340
+ return titleCase(value);
19341
+ }
19342
+ }
19214
19343
  function parseCodexUsage(payload) {
19215
19344
  const root = object2(payload) ?? {};
19216
19345
  const rateLimit = object2(root.rate_limit) ?? {};
@@ -19219,7 +19348,7 @@ function parseCodexUsage(payload) {
19219
19348
  codexWindow(rateLimit.primary_window, "session"),
19220
19349
  codexWindow(rateLimit.secondary_window, "weekly")
19221
19350
  ].filter((row) => row !== null),
19222
- plan: titleCase(root.plan_type)
19351
+ plan: formatCodexPlan(root.plan_type)
19223
19352
  };
19224
19353
  }
19225
19354
  function parseResetCredits(payload) {
@@ -19299,12 +19428,12 @@ function parseCursorCredentialJson(raw, method) {
19299
19428
  function cursorAuthFilePath(deps) {
19300
19429
  const home = deps.homedir();
19301
19430
  if (deps.platform === "win32") {
19302
- return path32__default.join(deps.env.APPDATA || path32__default.join(home, "AppData", "Roaming"), "Cursor", "auth.json");
19431
+ return path32.join(deps.env.APPDATA || path32.join(home, "AppData", "Roaming"), "Cursor", "auth.json");
19303
19432
  }
19304
19433
  if (deps.platform === "darwin") {
19305
- return path32__default.join(home, ".cursor", "auth.json");
19434
+ return path32.join(home, ".cursor", "auth.json");
19306
19435
  }
19307
- return path32__default.join(deps.env.XDG_CONFIG_HOME || path32__default.join(home, ".config"), "cursor", "auth.json");
19436
+ return path32.join(deps.env.XDG_CONFIG_HOME || path32.join(home, ".config"), "cursor", "auth.json");
19308
19437
  }
19309
19438
  async function resolveCursorCredentials(deps) {
19310
19439
  if (deps.platform === "darwin") {
@@ -19505,207 +19634,6 @@ async function fetchKimiUsage(deps = {}) {
19505
19634
  throw error51;
19506
19635
  }
19507
19636
  }
19508
- var OPENCODE_GO_SESSION_CAP_USD = 12;
19509
- var OPENCODE_GO_WEEKLY_CAP_USD = 30;
19510
- var OPENCODE_GO_MONTHLY_CAP_USD = 60;
19511
- var SESSION_MS = 5 * 36e5;
19512
- var WEEK_MS2 = 7 * 864e5;
19513
- var SCAN_DAYS_BACK = 33;
19514
- function resolveOpencodeDataDir(env = process.env, homeDir = os3__default.homedir()) {
19515
- const override = env.OPENCODE_DATA_DIR?.trim();
19516
- if (override) return expandHome(override, homeDir).replace(/\/+$/, "");
19517
- const xdg = env.XDG_DATA_HOME?.trim();
19518
- if (xdg) return `${expandHome(xdg, homeDir).replace(/\/+$/, "")}/opencode`;
19519
- return path32__default.join(homeDir, ".local", "share", "opencode");
19520
- }
19521
- function listOpencodeDatabases(dataDir) {
19522
- let names;
19523
- try {
19524
- names = fs4__default.readdirSync(dataDir);
19525
- } catch (error51) {
19526
- if (!fs4__default.existsSync(dataDir)) return [];
19527
- throw error51;
19528
- }
19529
- return names.filter((name) => name.startsWith("opencode") && name.endsWith(".db")).sort().map((name) => path32__default.join(dataDir, name));
19530
- }
19531
- async function scanOpencodeGoWindows(deps = {}) {
19532
- const nowMs = (deps.now ?? Date.now)();
19533
- const dataDir = resolveOpencodeDataDir(deps.env ?? process.env, deps.homeDir ?? os3__default.homedir());
19534
- const databases = listOpencodeDatabases(dataDir);
19535
- if (databases.length === 0) return null;
19536
- const { DatabaseSync } = await import('node:sqlite');
19537
- const cutoffMs = nowMs - SCAN_DAYS_BACK * 864e5;
19538
- const costs = [];
19539
- let anchorMs;
19540
- let failures = 0;
19541
- for (const databasePath of databases) {
19542
- let db;
19543
- try {
19544
- db = new DatabaseSync(databasePath, { readOnly: true });
19545
- const rows = db.prepare(
19546
- `SELECT time_created AS ms, json_extract(data,'$.cost') AS cost
19547
- FROM message
19548
- WHERE time_created >= ?
19549
- AND json_valid(data)
19550
- AND json_extract(data,'$.role') = 'assistant'
19551
- AND json_extract(data,'$.providerID') = 'opencode-go'
19552
- AND json_type(data,'$.cost') IN ('integer','real')`
19553
- ).all(cutoffMs);
19554
- for (const row of rows) {
19555
- if (typeof row.ms !== "number" || typeof row.cost !== "number" || row.cost < 0) continue;
19556
- costs.push({ ms: row.ms, cost: row.cost });
19557
- }
19558
- const anchorRow = db.prepare(
19559
- `SELECT MIN(time_created) AS ms FROM message
19560
- WHERE json_valid(data)
19561
- AND json_extract(data,'$.role') = 'assistant'
19562
- AND json_extract(data,'$.providerID') = 'opencode-go'
19563
- AND json_type(data,'$.cost') IN ('integer','real')`
19564
- ).get();
19565
- if (typeof anchorRow?.ms === "number") {
19566
- anchorMs = anchorMs === void 0 ? anchorRow.ms : Math.min(anchorMs, anchorRow.ms);
19567
- }
19568
- } catch {
19569
- failures += 1;
19570
- } finally {
19571
- db?.close();
19572
- }
19573
- }
19574
- if (failures === databases.length) {
19575
- throw new Error("Every OpenCode database exists but could not be read");
19576
- }
19577
- return computeOpencodeGoWindows(costs, anchorMs, nowMs);
19578
- }
19579
- function computeOpencodeGoWindows(costs, anchorMs, nowMs) {
19580
- const sessionStart = nowMs - SESSION_MS;
19581
- const sessionSpend = sumRange(costs, sessionStart, nowMs);
19582
- const oldestInSession = costs.filter((row) => row.ms >= sessionStart && row.ms < nowMs).reduce((min, row) => min === void 0 ? row.ms : Math.min(min, row.ms), void 0);
19583
- const sessionResetsAt = (oldestInSession ?? nowMs) + SESSION_MS;
19584
- const weekStart = startOfUtcWeek(nowMs);
19585
- const weekEnd = weekStart + WEEK_MS2;
19586
- const weeklySpend = sumRange(costs, weekStart, weekEnd);
19587
- const month = anchoredMonthBounds(nowMs, anchorMs);
19588
- const monthlySpend = sumRange(costs, month.start, month.end);
19589
- return {
19590
- windows: [
19591
- {
19592
- id: "session",
19593
- usedPercent: percent2(sessionSpend, OPENCODE_GO_SESSION_CAP_USD),
19594
- resetsAt: sessionResetsAt,
19595
- period: {
19596
- durationMs: SESSION_MS,
19597
- durationBasis: "catalog",
19598
- startsAt: sessionResetsAt - SESSION_MS,
19599
- startsAtBasis: "derived"
19600
- }
19601
- },
19602
- {
19603
- id: "weekly",
19604
- usedPercent: percent2(weeklySpend, OPENCODE_GO_WEEKLY_CAP_USD),
19605
- resetsAt: weekEnd,
19606
- period: {
19607
- durationMs: WEEK_MS2,
19608
- durationBasis: "catalog",
19609
- startsAt: weekStart,
19610
- startsAtBasis: "derived"
19611
- }
19612
- },
19613
- {
19614
- id: "cycle",
19615
- usedPercent: percent2(monthlySpend, OPENCODE_GO_MONTHLY_CAP_USD),
19616
- resetsAt: month.end,
19617
- period: {
19618
- durationMs: month.end - month.start,
19619
- durationBasis: "catalog",
19620
- startsAt: month.start,
19621
- startsAtBasis: "derived"
19622
- }
19623
- }
19624
- ],
19625
- cycleDays: Math.round((month.end - month.start) / 864e5)
19626
- };
19627
- }
19628
- function percent2(spend, cap) {
19629
- return Math.max(0, Math.min(100, Math.round(spend / cap * 100)));
19630
- }
19631
- function sumRange(costs, start, end) {
19632
- const total = costs.reduce(
19633
- (partial2, row) => row.ms >= start && row.ms < end ? partial2 + row.cost : partial2,
19634
- 0
19635
- );
19636
- return Math.round(total * 1e4) / 1e4;
19637
- }
19638
- function startOfUtcWeek(nowMs) {
19639
- const now = new Date(nowMs);
19640
- const dayStart = Date.UTC(now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate());
19641
- const daysSinceMonday = (new Date(dayStart).getUTCDay() + 6) % 7;
19642
- return dayStart - daysSinceMonday * 864e5;
19643
- }
19644
- function anchoredMonthBounds(nowMs, anchorMs) {
19645
- const now = new Date(nowMs);
19646
- if (anchorMs === void 0 || !Number.isFinite(anchorMs)) {
19647
- return {
19648
- start: Date.UTC(now.getUTCFullYear(), now.getUTCMonth(), 1),
19649
- end: Date.UTC(now.getUTCFullYear(), now.getUTCMonth() + 1, 1)
19650
- };
19651
- }
19652
- const anchor = new Date(anchorMs);
19653
- let year = now.getUTCFullYear();
19654
- let month = now.getUTCMonth();
19655
- let start = anchoredMonthStart(year, month, anchor);
19656
- if (start > nowMs) {
19657
- month -= 1;
19658
- start = anchoredMonthStart(year, month, anchor);
19659
- }
19660
- const end = anchoredMonthStart(year, month + 1, anchor);
19661
- return { start, end };
19662
- }
19663
- function anchoredMonthStart(year, month, anchor) {
19664
- const daysInMonth = new Date(Date.UTC(year, month + 1, 0)).getUTCDate();
19665
- const day = Math.min(anchor.getUTCDate(), daysInMonth);
19666
- return Date.UTC(
19667
- year,
19668
- month,
19669
- day,
19670
- anchor.getUTCHours(),
19671
- anchor.getUTCMinutes(),
19672
- anchor.getUTCSeconds(),
19673
- anchor.getUTCMilliseconds()
19674
- );
19675
- }
19676
- function expandHome(value, homeDir) {
19677
- if (value === "~") return homeDir;
19678
- if (value.startsWith("~/")) return path32__default.join(homeDir, value.slice(2));
19679
- return value;
19680
- }
19681
- var OPENCODE_AUTH_PROVIDER_ID = "Claude Code with OpenCode Go";
19682
- async function fetchOpencodeUsage(deps = {}) {
19683
- if (deps.authService === void 0) {
19684
- throw new Error("authService is required to probe OpenCode Go usage; pass it via createAiGatewayQuotaCollectors");
19685
- }
19686
- const apiKey = await deps.authService.getApiKey(OPENCODE_AUTH_PROVIDER_ID);
19687
- if (!apiKey) return { status: "signed_out" };
19688
- const now = deps.now ?? Date.now;
19689
- try {
19690
- const scan = await (deps.scanOpencodeGoWindows ?? (() => scanOpencodeGoWindows({ now })))();
19691
- if (scan !== null) {
19692
- return {
19693
- status: "ok",
19694
- plan: "Go",
19695
- cycleDays: scan.cycleDays,
19696
- windows: scan.windows,
19697
- fetchedAt: now()
19698
- };
19699
- }
19700
- } catch {
19701
- }
19702
- return {
19703
- status: "ok",
19704
- plan: "Go",
19705
- windows: [],
19706
- fetchedAt: now()
19707
- };
19708
- }
19709
19637
  var XAI_OIDC_ISSUER = "https://auth.x.ai";
19710
19638
  var XAI_CLI_REFRESH_URL = "https://auth.x.ai/oauth2/token";
19711
19639
  var XAI_CLI_DEFAULT_CLIENT_ID = "b1a00492-073a-47ea-816f-4c329264a828";
@@ -19713,7 +19641,7 @@ var XAI_CLI_REFRESH_BUFFER_MS = 5 * 60 * 1e3;
19713
19641
  var REFRESH_TIMEOUT_MS = 15e3;
19714
19642
  var FALLBACK_ACCESS_TOKEN_TTL_MS = 36e5;
19715
19643
  function xaiCliAuthFilePath(deps) {
19716
- return path32__default.join(deps.env.GROK_HOME || path32__default.join(deps.homedir(), ".grok"), "auth.json");
19644
+ return path32.join(deps.env.GROK_HOME || path32.join(deps.homedir(), ".grok"), "auth.json");
19717
19645
  }
19718
19646
  function expiry(value) {
19719
19647
  if (typeof value !== "string" && typeof value !== "number") return void 0;
@@ -19752,10 +19680,10 @@ function refreshToken(entry) {
19752
19680
  async function defaultWriteAuthFile(filePath, contents) {
19753
19681
  const tmpPath = `${filePath}.${process.pid}.${Date.now()}.tmp`;
19754
19682
  try {
19755
- await fs32.writeFile(tmpPath, contents, { encoding: "utf8", mode: 384 });
19756
- await fs32.rename(tmpPath, filePath);
19683
+ await fs22.writeFile(tmpPath, contents, { encoding: "utf8", mode: 384 });
19684
+ await fs22.rename(tmpPath, filePath);
19757
19685
  } catch (error51) {
19758
- await fs32.unlink(tmpPath).catch(() => void 0);
19686
+ await fs22.unlink(tmpPath).catch(() => void 0);
19759
19687
  throw error51;
19760
19688
  }
19761
19689
  }
@@ -19880,6 +19808,7 @@ async function resolveXaiCliAuth(deps, options = {}) {
19880
19808
  }
19881
19809
  }
19882
19810
  var XAI_CLI_CREDITS_URL = "https://cli-chat-proxy.grok.com/v1/billing?format=credits";
19811
+ var XAI_CLI_SETTINGS_URL = "https://cli-chat-proxy.grok.com/v1/settings";
19883
19812
  var WEEKLY_PERIOD = "USAGE_PERIOD_TYPE_WEEKLY";
19884
19813
  function parseXaiCredits(payload) {
19885
19814
  const root = object2(payload);
@@ -19913,6 +19842,9 @@ function parseXaiCredits(payload) {
19913
19842
  }
19914
19843
  };
19915
19844
  }
19845
+ function parseXaiPlan(payload) {
19846
+ return titleCase(object2(payload)?.subscription_tier_display);
19847
+ }
19916
19848
  function creditsHeaders(credentials) {
19917
19849
  const headers = {
19918
19850
  Accept: "application/json",
@@ -19957,8 +19889,15 @@ async function fetchXaiUsage(deps = {}) {
19957
19889
  }
19958
19890
  const parsed = parseXaiCredits(payload);
19959
19891
  if (!parsed) throw new Error("Grok returned an unsupported quota response");
19892
+ let plan;
19893
+ try {
19894
+ plan = parseXaiPlan(await getJson(fetchImpl, XAI_CLI_SETTINGS_URL, creditsHeaders(credentials)));
19895
+ } catch {
19896
+ plan = void 0;
19897
+ }
19960
19898
  return {
19961
19899
  status: "ok",
19900
+ ...plan ? { plan } : {},
19962
19901
  windows: parsed.status === "weekly" ? [parsed.window] : [],
19963
19902
  fetchedAt: now()
19964
19903
  };
@@ -19975,15 +19914,13 @@ function createAiGatewayQuotaCollectors(deps) {
19975
19914
  credentials: deps.credentialDeps ?? defaultCredentialDeps,
19976
19915
  authService: deps.authService,
19977
19916
  ...deps.fetch !== void 0 ? { fetch: deps.fetch } : {},
19978
- ...deps.now !== void 0 ? { now: deps.now } : {},
19979
- ...deps.scanOpencodeWindows !== void 0 ? { scanOpencodeGoWindows: deps.scanOpencodeWindows } : {}
19917
+ ...deps.now !== void 0 ? { now: deps.now } : {}
19980
19918
  };
19981
19919
  return {
19982
19920
  fetchClaude: () => fetchClaudeUsage(providerDeps),
19983
19921
  fetchCodex: () => fetchCodexUsage(providerDeps),
19984
19922
  fetchCursor: () => fetchCursorUsage(providerDeps),
19985
19923
  fetchKimi: () => fetchKimiUsage(providerDeps),
19986
- fetchOpencode: () => fetchOpencodeUsage(providerDeps),
19987
19924
  fetchXai: () => fetchXaiUsage(providerDeps)
19988
19925
  };
19989
19926
  }
@@ -19997,7 +19934,6 @@ function createQuotaService(deps) {
19997
19934
  codex: deps.fetchCodex,
19998
19935
  cursor: deps.fetchCursor,
19999
19936
  kimi: deps.fetchKimi,
20000
- opencode: deps.fetchOpencode,
20001
19937
  xai: deps.fetchXai ?? (async () => ({ status: "signed_out" }))
20002
19938
  };
20003
19939
  const cache = /* @__PURE__ */ new Map();
@@ -20041,12 +19977,11 @@ function createQuotaService(deps) {
20041
19977
  }
20042
19978
  return {
20043
19979
  async getSummary(options = {}) {
20044
- const [claude, codex, cursor, kimi, opencode, xai] = await Promise.all([
19980
+ const [claude, codex, cursor, kimi, xai] = await Promise.all([
20045
19981
  load("claude", options.force === true || options.forceProvider === "claude"),
20046
19982
  load("codex", options.force === true || options.forceProvider === "codex"),
20047
19983
  load("cursor", options.force === true || options.forceProvider === "cursor"),
20048
19984
  load("kimi", options.force === true || options.forceProvider === "kimi"),
20049
- load("opencode", options.force === true || options.forceProvider === "opencode"),
20050
19985
  load("xai", options.force === true || options.forceProvider === "xai")
20051
19986
  ]);
20052
19987
  return {
@@ -20055,18 +19990,18 @@ function createQuotaService(deps) {
20055
19990
  codex: withRisk(codex),
20056
19991
  cursor: withRisk(cursor),
20057
19992
  kimi: withRisk(kimi),
20058
- opencode: withRisk(opencode),
20059
19993
  xai: withRisk(xai)
20060
19994
  }
20061
19995
  };
20062
19996
  }
20063
19997
  };
20064
19998
  }
20065
- var CURSOR_GREP_RECEIPT_PREFIX = "FLEET_CURSOR_GREP_V1:";
20066
- String.raw`
19999
+ var CURSOR_GREP_RECEIPT_PREFIX = "FLEET_CURSOR_GREP_V2:";
20000
+ var CURSOR_GREP_RECEIPT_SCRIPT = String.raw`
20067
20001
  const {spawn}=require("node:child_process");
20068
20002
  const {TextDecoder}=require("node:util");
20069
- const emit=(value)=>process.stdout.write("${CURSOR_GREP_RECEIPT_PREFIX}"+Buffer.from(JSON.stringify(value)).toString("base64url"));
20003
+ const {deflateRawSync}=require("node:zlib");
20004
+ const emit=(value)=>process.stdout.write("${CURSOR_GREP_RECEIPT_PREFIX}"+deflateRawSync(Buffer.from(JSON.stringify(value))).toString("base64url"));
20070
20005
  (async()=>{try {
20071
20006
  const input=JSON.parse(Buffer.from(process.argv[1],"base64url").toString("utf8"));
20072
20007
  const matchSeparator=30;
@@ -20152,6 +20087,7 @@ const emit=(value)=>process.stdout.write("${CURSOR_GREP_RECEIPT_PREFIX}"+Buffer.
20152
20087
  emit({ok:true,outputMode:input.outputMode,files,counts,matches,totalFiles,totalLines,totalMatchedLines,clientTruncated});
20153
20088
  }catch(error){emit({ok:false,error:error instanceof Error?error.message:String(error)});}})();
20154
20089
  `.trim();
20090
+ deflateRawSync(CURSOR_GREP_RECEIPT_SCRIPT).toString("base64url");
20155
20091
  var cursorAgentDescriptor = [
20156
20092
  "CgthZ2VudC5wcm90bxIIYWdlbnQudjEicgoOR2xvYlRvb2xSZXN1bHQSLAoHc3VjY2VzcxgBIAEoCzIZLmFnZW50LnYxLkdsb2JUb29sU3VjY2Vzc0gAEigK",
20157
20093
  "BWVycm9yGAIgASgLMhcuYWdlbnQudjEuR2xvYlRvb2xFcnJvckgAQggKBnJlc3VsdCIeCg1HbG9iVG9vbEVycm9yEg0KBWVycm9yGAEgASgJIokBCg9HbG9i",
@@ -20920,7 +20856,7 @@ messageDesc(cursorAgentFile, 70);
20920
20856
  new Set(REASONING_EFFORTS);
20921
20857
 
20922
20858
  // ../fleet-plugins/quota/provider-order.ts
20923
- var PROVIDER_ORDER_DEFAULT = ["claude", "codex", "xai", "cursor", "opencode", "kimi"];
20859
+ var PROVIDER_ORDER_DEFAULT = ["claude", "codex", "xai", "cursor", "kimi"];
20924
20860
  function isProviderId(value) {
20925
20861
  return PROVIDER_ORDER_DEFAULT.includes(value);
20926
20862
  }