@dotobokuri/fleet-console 1.58.1 → 1.59.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 (65) hide show
  1. package/dist/cli.mjs +652 -191
  2. package/dist/client/assets/{_baseUniq-DJ4C0UQF.js → _baseUniq-CKkDoWU8.js} +1 -1
  3. package/dist/client/assets/{arc-DkQKttnC.js → arc-CcRdX8oF.js} +1 -1
  4. package/dist/client/assets/{architectureDiagram-Q4EWVU46-BpuET3uK.js → architectureDiagram-Q4EWVU46-gaFzE1W7.js} +1 -1
  5. package/dist/client/assets/{blockDiagram-DXYQGD6D-CatlulZp.js → blockDiagram-DXYQGD6D-Bzybih30.js} +1 -1
  6. package/dist/client/assets/{c4Diagram-AHTNJAMY-BPfWevDh.js → c4Diagram-AHTNJAMY-Dz8bwV9j.js} +1 -1
  7. package/dist/client/assets/channel-CAhLkt5l.js +1 -0
  8. package/dist/client/assets/{chunk-4BX2VUAB-a7lkla2P.js → chunk-4BX2VUAB-DmgZtGyV.js} +1 -1
  9. package/dist/client/assets/{chunk-4TB4RGXK-Bh-20OVN.js → chunk-4TB4RGXK-DX1WxV3U.js} +1 -1
  10. package/dist/client/assets/{chunk-55IACEB6-DiPm-_AS.js → chunk-55IACEB6-Bk4b3T9u.js} +1 -1
  11. package/dist/client/assets/{chunk-EDXVE4YY-BcGep4mz.js → chunk-EDXVE4YY-BzGadfvT.js} +1 -1
  12. package/dist/client/assets/{chunk-FMBD7UC4-Cn0A6Wm1.js → chunk-FMBD7UC4-44f7YyvW.js} +1 -1
  13. package/dist/client/assets/{chunk-OYMX7WX6-DNTIDjw4.js → chunk-OYMX7WX6-CyUAky9W.js} +1 -1
  14. package/dist/client/assets/{chunk-QZHKN3VN-cji_BhbG.js → chunk-QZHKN3VN-C11OUntR.js} +1 -1
  15. package/dist/client/assets/{chunk-YZCP3GAM-B6I5kLlB.js → chunk-YZCP3GAM-DVTmWawU.js} +1 -1
  16. package/dist/client/assets/classDiagram-6PBFFD2Q-BSvLoE2t.js +1 -0
  17. package/dist/client/assets/classDiagram-v2-HSJHXN6E-BSvLoE2t.js +1 -0
  18. package/dist/client/assets/clone-o26VS_sk.js +1 -0
  19. package/dist/client/assets/{cose-bilkent-S5V4N54A-_Xmui3Dj.js → cose-bilkent-S5V4N54A-CEatGsZv.js} +1 -1
  20. package/dist/client/assets/{dagre-KV5264BT-BI_m6tGN.js → dagre-KV5264BT-DlrgN02H.js} +1 -1
  21. package/dist/client/assets/{diagram-5BDNPKRD-JDBqcRRR.js → diagram-5BDNPKRD-BZ3hRO5t.js} +1 -1
  22. package/dist/client/assets/{diagram-G4DWMVQ6-CdIHKaZT.js → diagram-G4DWMVQ6-B-izS46x.js} +1 -1
  23. package/dist/client/assets/{diagram-MMDJMWI5-CULX6wM5.js → diagram-MMDJMWI5-Cw-wnJGs.js} +1 -1
  24. package/dist/client/assets/{diagram-TYMM5635-C1JXiI2W.js → diagram-TYMM5635-BoWnyd4_.js} +1 -1
  25. package/dist/client/assets/{erDiagram-SMLLAGMA-RJI8bZrW.js → erDiagram-SMLLAGMA-BUmyXZbP.js} +1 -1
  26. package/dist/client/assets/{flowDiagram-DWJPFMVM-CSrF7U0E.js → flowDiagram-DWJPFMVM-COS3kjS0.js} +1 -1
  27. package/dist/client/assets/{ganttDiagram-T4ZO3ILL-CHp3LObA.js → ganttDiagram-T4ZO3ILL-BTr1fdio.js} +1 -1
  28. package/dist/client/assets/{gitGraphDiagram-UUTBAWPF-BEeoTjqh.js → gitGraphDiagram-UUTBAWPF-BkGkaosN.js} +1 -1
  29. package/dist/client/assets/{graph-DNvMdh3j.js → graph-DmbgK-mH.js} +1 -1
  30. package/dist/client/assets/index-C-3spb_b.js +465 -0
  31. package/dist/client/assets/index-FU1PGEfG.css +1 -0
  32. package/dist/client/assets/{infoDiagram-42DDH7IO-31kh8JMu.js → infoDiagram-42DDH7IO-B8zI6k1l.js} +1 -1
  33. package/dist/client/assets/{ishikawaDiagram-UXIWVN3A-DZgEgolJ.js → ishikawaDiagram-UXIWVN3A-cIcEzrcK.js} +1 -1
  34. package/dist/client/assets/{journeyDiagram-VCZTEJTY-DfZ3i3Bu.js → journeyDiagram-VCZTEJTY-DhuabHCk.js} +1 -1
  35. package/dist/client/assets/{kanban-definition-6JOO6SKY-giivFfnv.js → kanban-definition-6JOO6SKY-uHTkqxhX.js} +1 -1
  36. package/dist/client/assets/{layout-DdVRNrH8.js → layout-Cfgk_duA.js} +1 -1
  37. package/dist/client/assets/{linear-3cmeYdGh.js → linear-BKvV0sr5.js} +1 -1
  38. package/dist/client/assets/{mermaid.core-Cjqy_Y5Z.js → mermaid.core-DozmrCuG.js} +4 -4
  39. package/dist/client/assets/{min-Cgsd0one.js → min-ke46otlW.js} +1 -1
  40. package/dist/client/assets/{mindmap-definition-QFDTVHPH-PfuGubxC.js → mindmap-definition-QFDTVHPH-d7xzxhzf.js} +1 -1
  41. package/dist/client/assets/{pieDiagram-DEJITSTG-B9O6H439.js → pieDiagram-DEJITSTG-C4S9Jy5A.js} +1 -1
  42. package/dist/client/assets/{quadrantDiagram-34T5L4WZ-DJH7RQzs.js → quadrantDiagram-34T5L4WZ-CoQnj3kv.js} +1 -1
  43. package/dist/client/assets/{requirementDiagram-MS252O5E-BZHTYV2q.js → requirementDiagram-MS252O5E-CdopMDtg.js} +1 -1
  44. package/dist/client/assets/{sankeyDiagram-XADWPNL6-B5aGVyLG.js → sankeyDiagram-XADWPNL6-DdR4zdh4.js} +1 -1
  45. package/dist/client/assets/{sequenceDiagram-FGHM5R23-D2890FYU.js → sequenceDiagram-FGHM5R23-NeYZWVQm.js} +1 -1
  46. package/dist/client/assets/{stateDiagram-FHFEXIEX-DWmhZMWZ.js → stateDiagram-FHFEXIEX-D0CQGKV_.js} +1 -1
  47. package/dist/client/assets/stateDiagram-v2-QKLJ7IA2-hM1GV37r.js +1 -0
  48. package/dist/client/assets/{timeline-definition-GMOUNBTQ-B0pTOfcD.js → timeline-definition-GMOUNBTQ-Bz2b3nfQ.js} +1 -1
  49. package/dist/client/assets/{vennDiagram-DHZGUBPP-D-S4XLnE.js → vennDiagram-DHZGUBPP-CVO2Ja80.js} +1 -1
  50. package/dist/client/assets/{wardley-RL74JXVD-ClPA8Fc3.js → wardley-RL74JXVD-Ba_GKs5u.js} +1 -1
  51. package/dist/client/assets/{wardleyDiagram-NUSXRM2D-JJgj7CxJ.js → wardleyDiagram-NUSXRM2D-yP3xvrPy.js} +1 -1
  52. package/dist/client/assets/{xychartDiagram-5P7HB3ND-BBIy9-Kq.js → xychartDiagram-5P7HB3ND-BLSs6w4C.js} +1 -1
  53. package/dist/client/index.html +2 -2
  54. package/dist/fleet-plugins/quota/routes.mjs +173 -268
  55. package/dist/fleet-plugins/scuttlebutt/routes.mjs +552 -125
  56. package/dist/fleet-plugins/terminal/routes.mjs +4932 -3578
  57. package/dist/fleet.mjs +3346 -3059
  58. package/package.json +1 -1
  59. package/dist/client/assets/channel-DDcyY5eB.js +0 -1
  60. package/dist/client/assets/classDiagram-6PBFFD2Q-CqqUqRwS.js +0 -1
  61. package/dist/client/assets/classDiagram-v2-HSJHXN6E-CqqUqRwS.js +0 -1
  62. package/dist/client/assets/clone-CjMEm_X8.js +0 -1
  63. package/dist/client/assets/index-BG857Idy.css +0 -1
  64. package/dist/client/assets/index-CCNdSGui.js +0 -483
  65. 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) => {
@@ -19074,9 +19183,9 @@ async function resolveClaudeCredentials(deps) {
19074
19183
  } catch {
19075
19184
  }
19076
19185
  }
19077
- const configDir = deps.env.CLAUDE_CONFIG_DIR || path32__default.join(deps.homedir(), ".claude");
19186
+ const configDir = deps.env.CLAUDE_CONFIG_DIR || path32.join(deps.homedir(), ".claude");
19078
19187
  try {
19079
- const raw = await deps.readBounded(path32__default.join(configDir, ".credentials.json"), MAX_CREDENTIAL_BYTES);
19188
+ const raw = await deps.readBounded(path32.join(configDir, ".credentials.json"), MAX_CREDENTIAL_BYTES);
19080
19189
  return raw === null || raw.length > MAX_CREDENTIAL_BYTES ? null : parseClaudeCredentialJson(raw, "file");
19081
19190
  } catch {
19082
19191
  return null;
@@ -19180,7 +19289,7 @@ function optionalNonEmptyString(value) {
19180
19289
  return typeof value === "string" && value.length > 0 ? value : void 0;
19181
19290
  }
19182
19291
  function codexAuthFilePath(deps) {
19183
- return path32__default.join(deps.env.CODEX_HOME || path32__default.join(deps.homedir(), ".codex"), "auth.json");
19292
+ return path32.join(deps.env.CODEX_HOME || path32.join(deps.homedir(), ".codex"), "auth.json");
19184
19293
  }
19185
19294
  async function resolveCodexCredentials(deps) {
19186
19295
  try {
@@ -19299,12 +19408,12 @@ function parseCursorCredentialJson(raw, method) {
19299
19408
  function cursorAuthFilePath(deps) {
19300
19409
  const home = deps.homedir();
19301
19410
  if (deps.platform === "win32") {
19302
- return path32__default.join(deps.env.APPDATA || path32__default.join(home, "AppData", "Roaming"), "Cursor", "auth.json");
19411
+ return path32.join(deps.env.APPDATA || path32.join(home, "AppData", "Roaming"), "Cursor", "auth.json");
19303
19412
  }
19304
19413
  if (deps.platform === "darwin") {
19305
- return path32__default.join(home, ".cursor", "auth.json");
19414
+ return path32.join(home, ".cursor", "auth.json");
19306
19415
  }
19307
- return path32__default.join(deps.env.XDG_CONFIG_HOME || path32__default.join(home, ".config"), "cursor", "auth.json");
19416
+ return path32.join(deps.env.XDG_CONFIG_HOME || path32.join(home, ".config"), "cursor", "auth.json");
19308
19417
  }
19309
19418
  async function resolveCursorCredentials(deps) {
19310
19419
  if (deps.platform === "darwin") {
@@ -19505,207 +19614,6 @@ async function fetchKimiUsage(deps = {}) {
19505
19614
  throw error51;
19506
19615
  }
19507
19616
  }
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
19617
  var XAI_OIDC_ISSUER = "https://auth.x.ai";
19710
19618
  var XAI_CLI_REFRESH_URL = "https://auth.x.ai/oauth2/token";
19711
19619
  var XAI_CLI_DEFAULT_CLIENT_ID = "b1a00492-073a-47ea-816f-4c329264a828";
@@ -19713,7 +19621,7 @@ var XAI_CLI_REFRESH_BUFFER_MS = 5 * 60 * 1e3;
19713
19621
  var REFRESH_TIMEOUT_MS = 15e3;
19714
19622
  var FALLBACK_ACCESS_TOKEN_TTL_MS = 36e5;
19715
19623
  function xaiCliAuthFilePath(deps) {
19716
- return path32__default.join(deps.env.GROK_HOME || path32__default.join(deps.homedir(), ".grok"), "auth.json");
19624
+ return path32.join(deps.env.GROK_HOME || path32.join(deps.homedir(), ".grok"), "auth.json");
19717
19625
  }
19718
19626
  function expiry(value) {
19719
19627
  if (typeof value !== "string" && typeof value !== "number") return void 0;
@@ -19752,10 +19660,10 @@ function refreshToken(entry) {
19752
19660
  async function defaultWriteAuthFile(filePath, contents) {
19753
19661
  const tmpPath = `${filePath}.${process.pid}.${Date.now()}.tmp`;
19754
19662
  try {
19755
- await fs32.writeFile(tmpPath, contents, { encoding: "utf8", mode: 384 });
19756
- await fs32.rename(tmpPath, filePath);
19663
+ await fs22.writeFile(tmpPath, contents, { encoding: "utf8", mode: 384 });
19664
+ await fs22.rename(tmpPath, filePath);
19757
19665
  } catch (error51) {
19758
- await fs32.unlink(tmpPath).catch(() => void 0);
19666
+ await fs22.unlink(tmpPath).catch(() => void 0);
19759
19667
  throw error51;
19760
19668
  }
19761
19669
  }
@@ -19975,15 +19883,13 @@ function createAiGatewayQuotaCollectors(deps) {
19975
19883
  credentials: deps.credentialDeps ?? defaultCredentialDeps,
19976
19884
  authService: deps.authService,
19977
19885
  ...deps.fetch !== void 0 ? { fetch: deps.fetch } : {},
19978
- ...deps.now !== void 0 ? { now: deps.now } : {},
19979
- ...deps.scanOpencodeWindows !== void 0 ? { scanOpencodeGoWindows: deps.scanOpencodeWindows } : {}
19886
+ ...deps.now !== void 0 ? { now: deps.now } : {}
19980
19887
  };
19981
19888
  return {
19982
19889
  fetchClaude: () => fetchClaudeUsage(providerDeps),
19983
19890
  fetchCodex: () => fetchCodexUsage(providerDeps),
19984
19891
  fetchCursor: () => fetchCursorUsage(providerDeps),
19985
19892
  fetchKimi: () => fetchKimiUsage(providerDeps),
19986
- fetchOpencode: () => fetchOpencodeUsage(providerDeps),
19987
19893
  fetchXai: () => fetchXaiUsage(providerDeps)
19988
19894
  };
19989
19895
  }
@@ -19997,7 +19903,6 @@ function createQuotaService(deps) {
19997
19903
  codex: deps.fetchCodex,
19998
19904
  cursor: deps.fetchCursor,
19999
19905
  kimi: deps.fetchKimi,
20000
- opencode: deps.fetchOpencode,
20001
19906
  xai: deps.fetchXai ?? (async () => ({ status: "signed_out" }))
20002
19907
  };
20003
19908
  const cache = /* @__PURE__ */ new Map();
@@ -20041,12 +19946,11 @@ function createQuotaService(deps) {
20041
19946
  }
20042
19947
  return {
20043
19948
  async getSummary(options = {}) {
20044
- const [claude, codex, cursor, kimi, opencode, xai] = await Promise.all([
19949
+ const [claude, codex, cursor, kimi, xai] = await Promise.all([
20045
19950
  load("claude", options.force === true || options.forceProvider === "claude"),
20046
19951
  load("codex", options.force === true || options.forceProvider === "codex"),
20047
19952
  load("cursor", options.force === true || options.forceProvider === "cursor"),
20048
19953
  load("kimi", options.force === true || options.forceProvider === "kimi"),
20049
- load("opencode", options.force === true || options.forceProvider === "opencode"),
20050
19954
  load("xai", options.force === true || options.forceProvider === "xai")
20051
19955
  ]);
20052
19956
  return {
@@ -20055,18 +19959,18 @@ function createQuotaService(deps) {
20055
19959
  codex: withRisk(codex),
20056
19960
  cursor: withRisk(cursor),
20057
19961
  kimi: withRisk(kimi),
20058
- opencode: withRisk(opencode),
20059
19962
  xai: withRisk(xai)
20060
19963
  }
20061
19964
  };
20062
19965
  }
20063
19966
  };
20064
19967
  }
20065
- var CURSOR_GREP_RECEIPT_PREFIX = "FLEET_CURSOR_GREP_V1:";
20066
- String.raw`
19968
+ var CURSOR_GREP_RECEIPT_PREFIX = "FLEET_CURSOR_GREP_V2:";
19969
+ var CURSOR_GREP_RECEIPT_SCRIPT = String.raw`
20067
19970
  const {spawn}=require("node:child_process");
20068
19971
  const {TextDecoder}=require("node:util");
20069
- const emit=(value)=>process.stdout.write("${CURSOR_GREP_RECEIPT_PREFIX}"+Buffer.from(JSON.stringify(value)).toString("base64url"));
19972
+ const {deflateRawSync}=require("node:zlib");
19973
+ const emit=(value)=>process.stdout.write("${CURSOR_GREP_RECEIPT_PREFIX}"+deflateRawSync(Buffer.from(JSON.stringify(value))).toString("base64url"));
20070
19974
  (async()=>{try {
20071
19975
  const input=JSON.parse(Buffer.from(process.argv[1],"base64url").toString("utf8"));
20072
19976
  const matchSeparator=30;
@@ -20152,6 +20056,7 @@ const emit=(value)=>process.stdout.write("${CURSOR_GREP_RECEIPT_PREFIX}"+Buffer.
20152
20056
  emit({ok:true,outputMode:input.outputMode,files,counts,matches,totalFiles,totalLines,totalMatchedLines,clientTruncated});
20153
20057
  }catch(error){emit({ok:false,error:error instanceof Error?error.message:String(error)});}})();
20154
20058
  `.trim();
20059
+ deflateRawSync(CURSOR_GREP_RECEIPT_SCRIPT).toString("base64url");
20155
20060
  var cursorAgentDescriptor = [
20156
20061
  "CgthZ2VudC5wcm90bxIIYWdlbnQudjEicgoOR2xvYlRvb2xSZXN1bHQSLAoHc3VjY2VzcxgBIAEoCzIZLmFnZW50LnYxLkdsb2JUb29sU3VjY2Vzc0gAEigK",
20157
20062
  "BWVycm9yGAIgASgLMhcuYWdlbnQudjEuR2xvYlRvb2xFcnJvckgAQggKBnJlc3VsdCIeCg1HbG9iVG9vbEVycm9yEg0KBWVycm9yGAEgASgJIokBCg9HbG9i",
@@ -20920,7 +20825,7 @@ messageDesc(cursorAgentFile, 70);
20920
20825
  new Set(REASONING_EFFORTS);
20921
20826
 
20922
20827
  // ../fleet-plugins/quota/provider-order.ts
20923
- var PROVIDER_ORDER_DEFAULT = ["claude", "codex", "xai", "cursor", "opencode", "kimi"];
20828
+ var PROVIDER_ORDER_DEFAULT = ["claude", "codex", "xai", "cursor", "kimi"];
20924
20829
  function isProviderId(value) {
20925
20830
  return PROVIDER_ORDER_DEFAULT.includes(value);
20926
20831
  }