@dotobokuri/fleet-console 1.44.1 → 1.45.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 (67) hide show
  1. package/dist/cli.d.ts +1 -1
  2. package/dist/cli.mjs +3088 -3139
  3. package/dist/client/assets/{_baseUniq-DfRTNtWd.js → _baseUniq-DtJH2bh8.js} +1 -1
  4. package/dist/client/assets/{arc-Ds9vyD8n.js → arc-DHCKMqqF.js} +1 -1
  5. package/dist/client/assets/{architectureDiagram-Q4EWVU46-pZ_1tCpx.js → architectureDiagram-Q4EWVU46-BOuyINL8.js} +1 -1
  6. package/dist/client/assets/{blockDiagram-DXYQGD6D-nntXWaQ9.js → blockDiagram-DXYQGD6D-cIre3_5n.js} +1 -1
  7. package/dist/client/assets/{c4Diagram-AHTNJAMY-AHAd4NjZ.js → c4Diagram-AHTNJAMY-DTX-qjSW.js} +1 -1
  8. package/dist/client/assets/channel-BhciS8jR.js +1 -0
  9. package/dist/client/assets/{chunk-4BX2VUAB-BNfWXMb-.js → chunk-4BX2VUAB-DiBwpozK.js} +1 -1
  10. package/dist/client/assets/{chunk-4TB4RGXK-B5MiBj0N.js → chunk-4TB4RGXK-uCZ-B3-y.js} +1 -1
  11. package/dist/client/assets/{chunk-55IACEB6-9vJ9AfWn.js → chunk-55IACEB6-CmBu2sf0.js} +1 -1
  12. package/dist/client/assets/{chunk-EDXVE4YY-CpxmITfr.js → chunk-EDXVE4YY-BXpw2VyB.js} +1 -1
  13. package/dist/client/assets/{chunk-FMBD7UC4-BoUi1EcN.js → chunk-FMBD7UC4-Cn9sKTn5.js} +1 -1
  14. package/dist/client/assets/{chunk-OYMX7WX6-s7qMNTfq.js → chunk-OYMX7WX6-BDgH1zlW.js} +1 -1
  15. package/dist/client/assets/{chunk-QZHKN3VN-Bdgo-JE9.js → chunk-QZHKN3VN-BOdvRibu.js} +1 -1
  16. package/dist/client/assets/{chunk-YZCP3GAM-C9RCb0eu.js → chunk-YZCP3GAM-BDIEapcU.js} +1 -1
  17. package/dist/client/assets/classDiagram-6PBFFD2Q-BjRUnHce.js +1 -0
  18. package/dist/client/assets/classDiagram-v2-HSJHXN6E-BjRUnHce.js +1 -0
  19. package/dist/client/assets/clone-DygBt67n.js +1 -0
  20. package/dist/client/assets/{cose-bilkent-S5V4N54A-Mr2xbCPD.js → cose-bilkent-S5V4N54A-BVlc3Dad.js} +1 -1
  21. package/dist/client/assets/{dagre-KV5264BT-xIfrxsrb.js → dagre-KV5264BT-raV4BK6w.js} +1 -1
  22. package/dist/client/assets/{diagram-5BDNPKRD-BM49JRbq.js → diagram-5BDNPKRD-BMAh1LJt.js} +1 -1
  23. package/dist/client/assets/{diagram-G4DWMVQ6-uMduxuqy.js → diagram-G4DWMVQ6-AM5t2f3j.js} +1 -1
  24. package/dist/client/assets/{diagram-MMDJMWI5-BfCnnu9a.js → diagram-MMDJMWI5-DMw_UwWR.js} +1 -1
  25. package/dist/client/assets/{diagram-TYMM5635-DTVL_WEx.js → diagram-TYMM5635-CiDAD3e9.js} +1 -1
  26. package/dist/client/assets/{erDiagram-SMLLAGMA-BUQDjGU2.js → erDiagram-SMLLAGMA-D1IXSwFZ.js} +1 -1
  27. package/dist/client/assets/{flowDiagram-DWJPFMVM-RZ85tRp5.js → flowDiagram-DWJPFMVM-pEq1L6HP.js} +1 -1
  28. package/dist/client/assets/{ganttDiagram-T4ZO3ILL-CenzFyys.js → ganttDiagram-T4ZO3ILL-BAXTU16v.js} +1 -1
  29. package/dist/client/assets/{gitGraphDiagram-UUTBAWPF-BpkFTm7f.js → gitGraphDiagram-UUTBAWPF-PkEvpSio.js} +1 -1
  30. package/dist/client/assets/{graph-BlyDgw2r.js → graph-OOLam9NE.js} +1 -1
  31. package/dist/client/assets/{index-BmGY-BNs.css → index-BgHFwZy9.css} +1 -1
  32. package/dist/client/assets/{index-BAMerP8r.js → index-CvXOp1di.js} +68 -68
  33. package/dist/client/assets/{infoDiagram-42DDH7IO-ZB4pKXQT.js → infoDiagram-42DDH7IO-CcLveXnw.js} +1 -1
  34. package/dist/client/assets/{ishikawaDiagram-UXIWVN3A-BfXl0ksQ.js → ishikawaDiagram-UXIWVN3A-D-p_eX0W.js} +1 -1
  35. package/dist/client/assets/{journeyDiagram-VCZTEJTY-DCSluqxm.js → journeyDiagram-VCZTEJTY-D81ht6ZY.js} +1 -1
  36. package/dist/client/assets/{kanban-definition-6JOO6SKY-5X3OxziR.js → kanban-definition-6JOO6SKY-D8SIIBWy.js} +1 -1
  37. package/dist/client/assets/{layout-C2Jxamqz.js → layout-CeMy87tl.js} +1 -1
  38. package/dist/client/assets/{linear-DgO5otCG.js → linear-C0Txkuhf.js} +1 -1
  39. package/dist/client/assets/{mermaid.core-CqKupZd5.js → mermaid.core-zdTcCzmD.js} +4 -4
  40. package/dist/client/assets/{min-B9jNVA7s.js → min-BPp_9Vnv.js} +1 -1
  41. package/dist/client/assets/{mindmap-definition-QFDTVHPH-B_Clh0rq.js → mindmap-definition-QFDTVHPH-DRJbMf8W.js} +1 -1
  42. package/dist/client/assets/{pieDiagram-DEJITSTG-D1rR7mwo.js → pieDiagram-DEJITSTG-CqPISwE-.js} +1 -1
  43. package/dist/client/assets/{quadrantDiagram-34T5L4WZ-CGnU5k3k.js → quadrantDiagram-34T5L4WZ-BGLaujDD.js} +1 -1
  44. package/dist/client/assets/{requirementDiagram-MS252O5E-BDFOsklw.js → requirementDiagram-MS252O5E-DWF6sFQ_.js} +1 -1
  45. package/dist/client/assets/{sankeyDiagram-XADWPNL6-DT-8dpb6.js → sankeyDiagram-XADWPNL6-Dv2O23aj.js} +1 -1
  46. package/dist/client/assets/{sequenceDiagram-FGHM5R23-3IY8NxLM.js → sequenceDiagram-FGHM5R23-BXgYtweg.js} +1 -1
  47. package/dist/client/assets/{stateDiagram-FHFEXIEX-DqaGlW3D.js → stateDiagram-FHFEXIEX-COtDK2gC.js} +1 -1
  48. package/dist/client/assets/stateDiagram-v2-QKLJ7IA2-BzCFtEfV.js +1 -0
  49. package/dist/client/assets/{timeline-definition-GMOUNBTQ-DmOlxq0r.js → timeline-definition-GMOUNBTQ-B_-QYLHK.js} +1 -1
  50. package/dist/client/assets/{vennDiagram-DHZGUBPP-UsUm6iWZ.js → vennDiagram-DHZGUBPP-BNVDRgAa.js} +1 -1
  51. package/dist/client/assets/{wardley-RL74JXVD-C0JK7zQx.js → wardley-RL74JXVD-B3XwoW1A.js} +1 -1
  52. package/dist/client/assets/{wardleyDiagram-NUSXRM2D-pFHz6DzF.js → wardleyDiagram-NUSXRM2D-B6-OKLa-.js} +1 -1
  53. package/dist/client/assets/{xychartDiagram-5P7HB3ND-Cgy9Igjb.js → xychartDiagram-5P7HB3ND-DepfDqrZ.js} +1 -1
  54. package/dist/client/index.html +2 -2
  55. package/dist/fleet-plugins/file-explorer/routes.mjs +647 -648
  56. package/dist/fleet-plugins/ledger/routes.mjs +1 -5
  57. package/dist/fleet-plugins/quota/routes.mjs +169 -157
  58. package/dist/fleet-plugins/repository/routes.mjs +0 -2
  59. package/dist/fleet-plugins/scuttlebutt/routes.mjs +1 -5
  60. package/dist/fleet-plugins/skills/routes.mjs +1 -5
  61. package/dist/fleet-plugins/terminal/routes.mjs +5863 -6682
  62. package/package.json +1 -1
  63. package/dist/client/assets/channel-D_VyV3Fr.js +0 -1
  64. package/dist/client/assets/classDiagram-6PBFFD2Q-TBLL_03g.js +0 -1
  65. package/dist/client/assets/classDiagram-v2-HSJHXN6E-TBLL_03g.js +0 -1
  66. package/dist/client/assets/clone-CYDDwEhh.js +0 -1
  67. package/dist/client/assets/stateDiagram-v2-QKLJ7IA2-2tlPZvTx.js +0 -1
@@ -16378,8 +16378,6 @@ function parsePathExt(pathExt) {
16378
16378
  const raw = pathExt && pathExt.trim().length > 0 ? pathExt : DEFAULT_WINDOWS_PATHEXT;
16379
16379
  return raw.split(WINDOWS_PATH_SEPARATOR).map((entry) => entry.trim()).filter((entry) => entry.length > 0);
16380
16380
  }
16381
-
16382
- // ../../packages/core-process/src/hidden.ts
16383
16381
  function withHidden(options) {
16384
16382
  return { ...options ?? {}, windowsHide: true };
16385
16383
  }
@@ -16454,7 +16452,7 @@ var models_default = {
16454
16452
  }
16455
16453
  };
16456
16454
 
16457
- // ../../packages/core-unified-agent/src/models/schemas.ts
16455
+ // ../../packages/core-unified-agent/src/models/registry.ts
16458
16456
  var EffortLevelSchema = external_exports.enum([
16459
16457
  "low",
16460
16458
  "medium",
@@ -16551,8 +16549,6 @@ var ModelsRegistrySchema = external_exports.object({
16551
16549
  /** 프로바이더별 모델 정보 */
16552
16550
  providers: external_exports.record(external_exports.string(), ProviderSchema)
16553
16551
  });
16554
-
16555
- // ../../packages/core-unified-agent/src/models/ModelRegistry.ts
16556
16552
  Object.freeze(ModelsRegistrySchema.parse(models_default));
16557
16553
 
16558
16554
  // ../../packages/core-unified-agent/src/config/CliConfigs.ts
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
+ import { execFile } from 'child_process';
2
3
  import * as fs5 from 'fs';
3
4
  import { constants } from 'fs';
4
- import * as path9 from 'path';
5
- import path9__default from 'path';
6
- import * as os3 from 'os';
7
- import os3__default from 'os';
8
- import { execFile } from 'child_process';
9
- import fs8 from 'fs/promises';
5
+ import fs from 'fs/promises';
6
+ import * as os4 from 'os';
7
+ import os4__default from 'os';
8
+ import * as path from 'path';
9
+ import path__default from 'path';
10
10
  import { promisify } from 'util';
11
11
 
12
12
  var __defProp = Object.defineProperty;
@@ -19,12 +19,12 @@ var __export = (target, all) => {
19
19
  function definePlugin(definition) {
20
20
  return definition;
21
21
  }
22
- function registerRouter(ctx, path10, handler) {
23
- ctx.registerRouter(normalizePath(path10), handler);
22
+ function registerRouter(ctx, path11, handler) {
23
+ ctx.registerRouter(normalizePath(path11), handler);
24
24
  }
25
- function normalizePath(path10) {
26
- if (path10.length === 0 || path10 === "/") return "/";
27
- return path10;
25
+ function normalizePath(path11) {
26
+ if (path11.length === 0 || path11 === "/") return "/";
27
+ return path11;
28
28
  }
29
29
 
30
30
  // ../fleet-plugins/quota/server/handlers.ts
@@ -840,10 +840,10 @@ function mergeDefs(...defs) {
840
840
  function cloneDef(schema) {
841
841
  return mergeDefs(schema._zod.def);
842
842
  }
843
- function getElementAtPath(obj, path10) {
844
- if (!path10)
843
+ function getElementAtPath(obj, path11) {
844
+ if (!path11)
845
845
  return obj;
846
- return path10.reduce((acc, key) => acc?.[key], obj);
846
+ return path11.reduce((acc, key) => acc?.[key], obj);
847
847
  }
848
848
  function promiseAllObject(promisesObj) {
849
849
  const keys = Object.keys(promisesObj);
@@ -1252,11 +1252,11 @@ function explicitlyAborted(x, startIndex = 0) {
1252
1252
  }
1253
1253
  return false;
1254
1254
  }
1255
- function prefixIssues(path10, issues) {
1255
+ function prefixIssues(path11, issues) {
1256
1256
  return issues.map((iss) => {
1257
1257
  var _a3;
1258
1258
  (_a3 = iss).path ?? (_a3.path = []);
1259
- iss.path.unshift(path10);
1259
+ iss.path.unshift(path11);
1260
1260
  return iss;
1261
1261
  });
1262
1262
  }
@@ -1403,16 +1403,16 @@ function flattenError(error51, mapper = (issue2) => issue2.message) {
1403
1403
  }
1404
1404
  function formatError(error51, mapper = (issue2) => issue2.message) {
1405
1405
  const fieldErrors = { _errors: [] };
1406
- const processError = (error52, path10 = []) => {
1406
+ const processError = (error52, path11 = []) => {
1407
1407
  for (const issue2 of error52.issues) {
1408
1408
  if (issue2.code === "invalid_union" && issue2.errors.length) {
1409
- issue2.errors.map((issues) => processError({ issues }, [...path10, ...issue2.path]));
1409
+ issue2.errors.map((issues) => processError({ issues }, [...path11, ...issue2.path]));
1410
1410
  } else if (issue2.code === "invalid_key") {
1411
- processError({ issues: issue2.issues }, [...path10, ...issue2.path]);
1411
+ processError({ issues: issue2.issues }, [...path11, ...issue2.path]);
1412
1412
  } else if (issue2.code === "invalid_element") {
1413
- processError({ issues: issue2.issues }, [...path10, ...issue2.path]);
1413
+ processError({ issues: issue2.issues }, [...path11, ...issue2.path]);
1414
1414
  } else {
1415
- const fullpath = [...path10, ...issue2.path];
1415
+ const fullpath = [...path11, ...issue2.path];
1416
1416
  if (fullpath.length === 0) {
1417
1417
  fieldErrors._errors.push(mapper(issue2));
1418
1418
  } else {
@@ -1439,17 +1439,17 @@ function formatError(error51, mapper = (issue2) => issue2.message) {
1439
1439
  }
1440
1440
  function treeifyError(error51, mapper = (issue2) => issue2.message) {
1441
1441
  const result = { errors: [] };
1442
- const processError = (error52, path10 = []) => {
1442
+ const processError = (error52, path11 = []) => {
1443
1443
  var _a3, _b;
1444
1444
  for (const issue2 of error52.issues) {
1445
1445
  if (issue2.code === "invalid_union" && issue2.errors.length) {
1446
- issue2.errors.map((issues) => processError({ issues }, [...path10, ...issue2.path]));
1446
+ issue2.errors.map((issues) => processError({ issues }, [...path11, ...issue2.path]));
1447
1447
  } else if (issue2.code === "invalid_key") {
1448
- processError({ issues: issue2.issues }, [...path10, ...issue2.path]);
1448
+ processError({ issues: issue2.issues }, [...path11, ...issue2.path]);
1449
1449
  } else if (issue2.code === "invalid_element") {
1450
- processError({ issues: issue2.issues }, [...path10, ...issue2.path]);
1450
+ processError({ issues: issue2.issues }, [...path11, ...issue2.path]);
1451
1451
  } else {
1452
- const fullpath = [...path10, ...issue2.path];
1452
+ const fullpath = [...path11, ...issue2.path];
1453
1453
  if (fullpath.length === 0) {
1454
1454
  result.errors.push(mapper(issue2));
1455
1455
  continue;
@@ -1481,8 +1481,8 @@ function treeifyError(error51, mapper = (issue2) => issue2.message) {
1481
1481
  }
1482
1482
  function toDotPath(_path) {
1483
1483
  const segs = [];
1484
- const path10 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
1485
- for (const seg of path10) {
1484
+ const path11 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
1485
+ for (const seg of path11) {
1486
1486
  if (typeof seg === "number")
1487
1487
  segs.push(`[${seg}]`);
1488
1488
  else if (typeof seg === "symbol")
@@ -14146,13 +14146,13 @@ function resolveRef(ref, ctx) {
14146
14146
  if (!ref.startsWith("#")) {
14147
14147
  throw new Error("External $ref is not supported, only local refs (#/...) are allowed");
14148
14148
  }
14149
- const path10 = ref.slice(1).split("/").filter(Boolean);
14150
- if (path10.length === 0) {
14149
+ const path11 = ref.slice(1).split("/").filter(Boolean);
14150
+ if (path11.length === 0) {
14151
14151
  return ctx.rootSchema;
14152
14152
  }
14153
14153
  const defsKey = ctx.version === "draft-2020-12" ? "$defs" : "definitions";
14154
- if (path10[0] === defsKey) {
14155
- const key = path10[1];
14154
+ if (path11[0] === defsKey) {
14155
+ const key = path11[1];
14156
14156
  if (!key || !ctx.defs[key]) {
14157
14157
  throw new Error(`Reference not found: ${ref}`);
14158
14158
  }
@@ -17140,8 +17140,8 @@ function bootEnumDescriptorProto(init) {
17140
17140
  }
17141
17141
 
17142
17142
  // ../../node_modules/.pnpm/@bufbuild+protobuf@2.13.0/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/message.js
17143
- function messageDesc(file2, path10, ...paths) {
17144
- return paths.reduce((acc, cur) => acc.nestedMessages[cur], file2.messages[path10]);
17143
+ function messageDesc(file2, path11, ...paths) {
17144
+ return paths.reduce((acc, cur) => acc.nestedMessages[cur], file2.messages[path11]);
17145
17145
  }
17146
17146
 
17147
17147
  // ../../node_modules/.pnpm/@bufbuild+protobuf@2.13.0/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/descriptor_pb.js
@@ -17497,8 +17497,6 @@ function fileDesc(b64, imports) {
17497
17497
  const reg = createFileRegistry(root, (protoFileName) => void 0 );
17498
17498
  return reg.getFile(root.name);
17499
17499
  }
17500
-
17501
- // ../../packages/core-ai-gateway/dist/index.js
17502
17500
  var REASONING_EFFORTS = [
17503
17501
  "minimal",
17504
17502
  "low",
@@ -17801,6 +17799,8 @@ var models_default = {
17801
17799
  }
17802
17800
  }
17803
17801
  };
17802
+ var KIMI_AUTH_PROVIDER_ID = "Claude Code with Moonshot Kimi";
17803
+ var KIMI_CODE_API_BASE_URL = "https://api.kimi.com/coding";
17804
17804
  var GATEWAY_PROVIDERS = ["codex", "cursor", "kimi"];
17805
17805
  var GATEWAY_REASONING_EFFORTS = [
17806
17806
  "low",
@@ -18761,11 +18761,122 @@ messageDesc(cursorAgentFile, 119);
18761
18761
  messageDesc(cursorAgentFile, 53);
18762
18762
  messageDesc(cursorAgentFile, 63);
18763
18763
  messageDesc(cursorAgentFile, 70);
18764
- var KIMI_AUTH_PROVIDER_ID = "Claude Code with Moonshot Kimi";
18765
- var KIMI_CODE_API_BASE_URL = "https://api.kimi.com/coding";
18764
+ var execFileAsync = promisify(execFile);
18765
+ var MAX_CREDENTIAL_BYTES = 65536;
18766
+ var CREDENTIAL_OPEN_FLAGS = process.platform === "win32" ? constants.O_RDONLY : constants.O_RDONLY | constants.O_NONBLOCK;
18767
+ async function readBoundedFile(filePath, maxBytes) {
18768
+ const handle = await fs.open(filePath, CREDENTIAL_OPEN_FLAGS);
18769
+ try {
18770
+ const stat = await handle.stat();
18771
+ if (!stat.isFile() || stat.size > maxBytes) return null;
18772
+ const buffer = Buffer.allocUnsafe(maxBytes + 1);
18773
+ let totalBytes = 0;
18774
+ while (totalBytes < buffer.byteLength) {
18775
+ const { bytesRead } = await handle.read(
18776
+ buffer,
18777
+ totalBytes,
18778
+ buffer.byteLength - totalBytes,
18779
+ totalBytes
18780
+ );
18781
+ if (bytesRead === 0) break;
18782
+ totalBytes += bytesRead;
18783
+ }
18784
+ return totalBytes > maxBytes ? null : buffer.subarray(0, totalBytes).toString("utf8");
18785
+ } finally {
18786
+ await handle.close();
18787
+ }
18788
+ }
18789
+ var defaultCredentialDeps = {
18790
+ platform: process.platform,
18791
+ homedir: os4__default.homedir,
18792
+ env: process.env,
18793
+ readBounded: readBoundedFile,
18794
+ execFile: async (file2, args, options) => {
18795
+ const result = await execFileAsync(file2, [...args], options);
18796
+ return result.stdout;
18797
+ }
18798
+ };
18799
+ function credentialRecord(value) {
18800
+ return value !== null && typeof value === "object" && !Array.isArray(value) ? value : null;
18801
+ }
18802
+ function optionalNonEmptyString(value) {
18803
+ return typeof value === "string" && value.length > 0 ? value : void 0;
18804
+ }
18805
+ function optionalTrimmedString(value) {
18806
+ if (typeof value !== "string") return void 0;
18807
+ const trimmed = value.trim();
18808
+ return trimmed.length > 0 ? trimmed : void 0;
18809
+ }
18810
+ function parseCursorCredentialJson(raw, method) {
18811
+ if (raw.length > MAX_CREDENTIAL_BYTES) return null;
18812
+ try {
18813
+ const parsed = credentialRecord(JSON.parse(raw));
18814
+ if (!parsed) return null;
18815
+ const tokens = credentialRecord(parsed.tokens);
18816
+ const cursorAuth = credentialRecord(parsed.cursorAuth);
18817
+ const accessToken = [
18818
+ parsed.accessToken,
18819
+ parsed.access_token,
18820
+ tokens?.accessToken,
18821
+ tokens?.access_token,
18822
+ cursorAuth?.accessToken,
18823
+ cursorAuth?.access_token
18824
+ ].map(optionalTrimmedString).find((value) => value !== void 0);
18825
+ return accessToken ? { accessToken, method } : null;
18826
+ } catch {
18827
+ return null;
18828
+ }
18829
+ }
18830
+ function cursorAuthFilePath(deps) {
18831
+ const home = deps.homedir();
18832
+ if (deps.platform === "win32") {
18833
+ return path__default.join(deps.env.APPDATA || path__default.join(home, "AppData", "Roaming"), "Cursor", "auth.json");
18834
+ }
18835
+ if (deps.platform === "darwin") {
18836
+ return path__default.join(home, ".cursor", "auth.json");
18837
+ }
18838
+ return path__default.join(deps.env.XDG_CONFIG_HOME || path__default.join(home, ".config"), "cursor", "auth.json");
18839
+ }
18840
+ async function resolveCursorCredentials(deps) {
18841
+ if (deps.platform === "darwin") {
18842
+ try {
18843
+ const raw = await deps.execFile(
18844
+ "security",
18845
+ ["find-generic-password", "-s", "cursor-access-token", "-a", "cursor-user", "-w"],
18846
+ { timeout: 5e3 }
18847
+ );
18848
+ const accessToken = raw.length <= MAX_CREDENTIAL_BYTES ? optionalTrimmedString(raw) : void 0;
18849
+ if (accessToken) return { accessToken, method: "keychain" };
18850
+ } catch {
18851
+ }
18852
+ }
18853
+ try {
18854
+ const raw = await deps.readBounded(cursorAuthFilePath(deps), MAX_CREDENTIAL_BYTES);
18855
+ return raw === null || raw.length > MAX_CREDENTIAL_BYTES ? null : parseCursorCredentialJson(raw, "file");
18856
+ } catch {
18857
+ return null;
18858
+ }
18859
+ }
18860
+ function codexAuthFilePath(deps) {
18861
+ return path__default.join(deps.env.CODEX_HOME || path__default.join(deps.homedir(), ".codex"), "auth.json");
18862
+ }
18863
+ async function resolveCodexCredentials(deps) {
18864
+ try {
18865
+ const raw = await deps.readBounded(codexAuthFilePath(deps), MAX_CREDENTIAL_BYTES);
18866
+ if (raw === null || raw.length > MAX_CREDENTIAL_BYTES) return null;
18867
+ const parsed = credentialRecord(JSON.parse(raw));
18868
+ const tokens = credentialRecord(parsed?.tokens);
18869
+ const accessToken = optionalNonEmptyString(tokens?.access_token);
18870
+ if (!accessToken) return null;
18871
+ const accountId = optionalNonEmptyString(tokens?.account_id);
18872
+ return accountId === void 0 ? { accessToken } : { accessToken, accountId };
18873
+ } catch {
18874
+ return null;
18875
+ }
18876
+ }
18766
18877
  var FLEET_DATA_DIR_NAME = ".fleet";
18767
18878
  function getFleetDataDir() {
18768
- return path9.join(os3.homedir(), FLEET_DATA_DIR_NAME);
18879
+ return path.join(os4.homedir(), FLEET_DATA_DIR_NAME);
18769
18880
  }
18770
18881
  var SECURE_DIR_MODE = 448;
18771
18882
  var SECURE_FILE_MODE = 384;
@@ -18801,7 +18912,7 @@ function ensureSafeDirectory(dirPath) {
18801
18912
  var DEFAULT_MAX_ATTEMPTS = 10;
18802
18913
  var IGNORED_FSYNC_ERROR_CODES = /* @__PURE__ */ new Set(["EPERM", "EINVAL", "ENOSYS"]);
18803
18914
  function buildTempPath(filePath) {
18804
- const suffix = `${process.pid}.${Date.now()}.${Math.random().toString(16).slice(2)}.${os3.hostname()}`;
18915
+ const suffix = `${process.pid}.${Date.now()}.${Math.random().toString(16).slice(2)}.${os4.hostname()}`;
18805
18916
  return `${filePath}.${suffix}.tmp`;
18806
18917
  }
18807
18918
  function writeAtomicSync(filePath, content, options = {}) {
@@ -18934,10 +19045,10 @@ function buildQuarantinePath(lockDir) {
18934
19045
  function writeLockOwner(lockDir, ownerFileName, startedAt) {
18935
19046
  const owner = {
18936
19047
  pid: process.pid,
18937
- hostname: os3.hostname(),
19048
+ hostname: os4.hostname(),
18938
19049
  startedAt
18939
19050
  };
18940
- const ownerPath = path9.join(lockDir, ownerFileName);
19051
+ const ownerPath = path.join(lockDir, ownerFileName);
18941
19052
  try {
18942
19053
  fs5.writeFileSync(ownerPath, JSON.stringify(owner), { encoding: "utf-8", mode: 384 });
18943
19054
  } catch (error51) {
@@ -18946,7 +19057,7 @@ function writeLockOwner(lockDir, ownerFileName, startedAt) {
18946
19057
  }
18947
19058
  }
18948
19059
  function readLockOwner(lockDir, ownerFileName) {
18949
- const ownerPath = path9.join(lockDir, ownerFileName);
19060
+ const ownerPath = path.join(lockDir, ownerFileName);
18950
19061
  try {
18951
19062
  return sanitizeLockOwner(JSON.parse(fs5.readFileSync(ownerPath, "utf-8")));
18952
19063
  } catch (error51) {
@@ -18956,7 +19067,7 @@ function readLockOwner(lockDir, ownerFileName) {
18956
19067
  }
18957
19068
  }
18958
19069
  function isRecoverableOwner(owner, now, staleLockMs) {
18959
- if (owner.hostname !== os3.hostname()) return false;
19070
+ if (owner.hostname !== os4.hostname()) return false;
18960
19071
  if (now() - owner.startedAt < staleLockMs) return false;
18961
19072
  return !isProcessAlive(owner.pid);
18962
19073
  }
@@ -18986,10 +19097,10 @@ function isProcessAlive(pid) {
18986
19097
  }
18987
19098
  function sanitizeLockOwner(value) {
18988
19099
  if (typeof value !== "object" || value === null || Array.isArray(value)) return null;
18989
- const record3 = value;
18990
- const pid = record3.pid;
18991
- const hostname5 = record3.hostname;
18992
- const startedAt = record3.startedAt;
19100
+ const record2 = value;
19101
+ const pid = record2.pid;
19102
+ const hostname5 = record2.hostname;
19103
+ const startedAt = record2.startedAt;
18993
19104
  if (!Number.isInteger(pid) || pid <= 0) return null;
18994
19105
  if (typeof hostname5 !== "string" || !hostname5) return null;
18995
19106
  if (!Number.isFinite(startedAt) || startedAt <= 0) return null;
@@ -19002,6 +19113,11 @@ function sanitizeLockOwner(value) {
19002
19113
  function sleepSync(ms) {
19003
19114
  Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, ms);
19004
19115
  }
19116
+
19117
+ // ../../packages/core-infra/src/auth/auth-storage.ts
19118
+ var DEFAULT_AUTH_PATH = path.join(getFleetDataDir(), "auth.json");
19119
+ var AUTH_LOCK_OWNER_FILE_NAME = "owner.json";
19120
+ var AUTH_LOCK_TIMEOUT_MS = 5e3;
19005
19121
  function readAuthStoreFile(filePath) {
19006
19122
  let fd;
19007
19123
  try {
@@ -19021,11 +19137,6 @@ function readAuthStoreFile(filePath) {
19021
19137
  }
19022
19138
  }
19023
19139
  }
19024
-
19025
- // ../../packages/core-infra/src/auth/auth-storage.ts
19026
- var DEFAULT_AUTH_PATH = path9.join(getFleetDataDir(), "auth.json");
19027
- var AUTH_LOCK_OWNER_FILE_NAME = "owner.json";
19028
- var AUTH_LOCK_TIMEOUT_MS = 5e3;
19029
19140
  function createAuthService(deps = {}) {
19030
19141
  const authPath = deps.authPath ?? DEFAULT_AUTH_PATH;
19031
19142
  const lockDir = `${authPath}.lock`;
@@ -19079,7 +19190,7 @@ function createAuthService(deps = {}) {
19079
19190
  }
19080
19191
  },
19081
19192
  async setApiKey(providerId, key) {
19082
- const dir = path9.dirname(authPath);
19193
+ const dir = path.dirname(authPath);
19083
19194
  ensureSafeDirectory(dir);
19084
19195
  withAuthLock(authPath, lockDir, () => {
19085
19196
  const data = fs5.existsSync(authPath) ? readAuthStoreFile(authPath) : {};
@@ -19109,61 +19220,18 @@ function writeAuthData(authPath, data) {
19109
19220
  fsync: true
19110
19221
  });
19111
19222
  }
19112
- var execFileAsync = promisify(execFile);
19113
- var MAX_CREDENTIAL_BYTES = 65536;
19114
- var CREDENTIAL_OPEN_FLAGS = process.platform === "win32" ? constants.O_RDONLY : constants.O_RDONLY | constants.O_NONBLOCK;
19115
- async function readBoundedFile(filePath, maxBytes) {
19116
- const handle = await fs8.open(filePath, CREDENTIAL_OPEN_FLAGS);
19117
- try {
19118
- const stat = await handle.stat();
19119
- if (!stat.isFile() || stat.size > maxBytes) return null;
19120
- const buffer = Buffer.allocUnsafe(maxBytes + 1);
19121
- let totalBytes = 0;
19122
- while (totalBytes < buffer.byteLength) {
19123
- const { bytesRead } = await handle.read(
19124
- buffer,
19125
- totalBytes,
19126
- buffer.byteLength - totalBytes,
19127
- totalBytes
19128
- );
19129
- if (bytesRead === 0) break;
19130
- totalBytes += bytesRead;
19131
- }
19132
- return totalBytes > maxBytes ? null : buffer.subarray(0, totalBytes).toString("utf8");
19133
- } finally {
19134
- await handle.close();
19135
- }
19136
- }
19137
- var defaultCredentialDeps = {
19138
- platform: process.platform,
19139
- homedir: os3__default.homedir,
19140
- env: process.env,
19141
- readBounded: readBoundedFile,
19142
- execFile: async (file2, args, options) => {
19143
- const result = await execFileAsync(file2, [...args], options);
19144
- return result.stdout;
19145
- }
19146
- };
19147
- function record2(value) {
19148
- return value !== null && typeof value === "object" && !Array.isArray(value) ? value : null;
19149
- }
19150
19223
  function optionalString(value) {
19151
19224
  return typeof value === "string" && value.length > 0 ? value : void 0;
19152
19225
  }
19153
- function optionalTrimmedString(value) {
19154
- if (typeof value !== "string") return void 0;
19155
- const trimmed = value.trim();
19156
- return trimmed.length > 0 ? trimmed : void 0;
19157
- }
19158
19226
  function optionalEpoch(value) {
19159
19227
  return typeof value === "number" && Number.isSafeInteger(value) && value >= 0 ? value : void 0;
19160
19228
  }
19161
19229
  function parseClaudeCredentialJson(raw, method) {
19162
19230
  if (raw.length > MAX_CREDENTIAL_BYTES) return null;
19163
19231
  try {
19164
- const parsed = record2(JSON.parse(raw));
19232
+ const parsed = credentialRecord(JSON.parse(raw));
19165
19233
  if (!parsed) return null;
19166
- const oauth = record2(parsed.claudeAiOauth);
19234
+ const oauth = credentialRecord(parsed.claudeAiOauth);
19167
19235
  const accessToken = optionalString(oauth?.accessToken ?? parsed.accessToken);
19168
19236
  if (!accessToken) return null;
19169
19237
  return {
@@ -19189,70 +19257,14 @@ async function resolveClaudeCredentials(deps) {
19189
19257
  } catch {
19190
19258
  }
19191
19259
  }
19192
- const configDir = deps.env.CLAUDE_CONFIG_DIR || path9__default.join(deps.homedir(), ".claude");
19260
+ const configDir = deps.env.CLAUDE_CONFIG_DIR || path__default.join(deps.homedir(), ".claude");
19193
19261
  try {
19194
- const raw = await deps.readBounded(path9__default.join(configDir, ".credentials.json"), MAX_CREDENTIAL_BYTES);
19262
+ const raw = await deps.readBounded(path__default.join(configDir, ".credentials.json"), MAX_CREDENTIAL_BYTES);
19195
19263
  return raw === null || raw.length > MAX_CREDENTIAL_BYTES ? null : parseClaudeCredentialJson(raw, "file");
19196
19264
  } catch {
19197
19265
  return null;
19198
19266
  }
19199
19267
  }
19200
- async function resolveCodexCredentials(deps) {
19201
- const home = deps.env.CODEX_HOME || path9__default.join(deps.homedir(), ".codex");
19202
- try {
19203
- const raw = await deps.readBounded(path9__default.join(home, "auth.json"), MAX_CREDENTIAL_BYTES);
19204
- if (raw === null || raw.length > MAX_CREDENTIAL_BYTES) return null;
19205
- const parsed = record2(JSON.parse(raw));
19206
- const tokens = record2(parsed?.tokens);
19207
- const accessToken = optionalString(tokens?.access_token);
19208
- if (!accessToken) return null;
19209
- return { accessToken, accountId: optionalString(tokens?.account_id) };
19210
- } catch {
19211
- return null;
19212
- }
19213
- }
19214
- function parseCursorCredentialJson(raw, method) {
19215
- if (raw.length > MAX_CREDENTIAL_BYTES) return null;
19216
- try {
19217
- const parsed = record2(JSON.parse(raw));
19218
- if (!parsed) return null;
19219
- const tokens = record2(parsed.tokens);
19220
- const cursorAuth = record2(parsed.cursorAuth);
19221
- const accessToken = [
19222
- parsed.accessToken,
19223
- parsed.access_token,
19224
- tokens?.accessToken,
19225
- tokens?.access_token,
19226
- cursorAuth?.accessToken,
19227
- cursorAuth?.access_token
19228
- ].map(optionalTrimmedString).find((value) => value !== void 0);
19229
- return accessToken ? { accessToken, method } : null;
19230
- } catch {
19231
- return null;
19232
- }
19233
- }
19234
- async function resolveCursorCredentials(deps) {
19235
- if (deps.platform === "darwin") {
19236
- try {
19237
- const raw = await deps.execFile(
19238
- "security",
19239
- ["find-generic-password", "-s", "cursor-access-token", "-a", "cursor-user", "-w"],
19240
- { timeout: 5e3 }
19241
- );
19242
- const accessToken = raw.length <= MAX_CREDENTIAL_BYTES ? optionalTrimmedString(raw) : void 0;
19243
- if (accessToken) return { accessToken, method: "keychain" };
19244
- } catch {
19245
- }
19246
- }
19247
- const home = deps.homedir();
19248
- const authFile = deps.platform === "win32" ? path9__default.join(deps.env.APPDATA || path9__default.join(home, "AppData", "Roaming"), "Cursor", "auth.json") : deps.platform === "darwin" ? path9__default.join(home, ".cursor", "auth.json") : path9__default.join(deps.env.XDG_CONFIG_HOME || path9__default.join(home, ".config"), "cursor", "auth.json");
19249
- try {
19250
- const raw = await deps.readBounded(authFile, MAX_CREDENTIAL_BYTES);
19251
- return raw === null || raw.length > MAX_CREDENTIAL_BYTES ? null : parseCursorCredentialJson(raw, "file");
19252
- } catch {
19253
- return null;
19254
- }
19255
- }
19256
19268
 
19257
19269
  // ../fleet-plugins/quota/server/providers.ts
19258
19270
  var REQUEST_TIMEOUT_MS = 1e4;
@@ -15,8 +15,6 @@ function normalizePath(path10) {
15
15
  if (path10.length === 0 || path10 === "/") return "/";
16
16
  return path10;
17
17
  }
18
-
19
- // ../../packages/core-process/src/hidden.ts
20
18
  function withHidden(options) {
21
19
  return { ...options ?? {}, windowsHide: true };
22
20
  }
@@ -18331,8 +18331,6 @@ function parsePathExt(pathExt) {
18331
18331
  const raw = pathExt && pathExt.trim().length > 0 ? pathExt : DEFAULT_WINDOWS_PATHEXT;
18332
18332
  return raw.split(WINDOWS_PATH_SEPARATOR).map((entry) => entry.trim()).filter((entry) => entry.length > 0);
18333
18333
  }
18334
-
18335
- // ../../packages/core-process/src/hidden.ts
18336
18334
  function withHidden(options) {
18337
18335
  return { ...options ?? {}, windowsHide: true };
18338
18336
  }
@@ -19431,7 +19429,7 @@ var models_default = {
19431
19429
  }
19432
19430
  };
19433
19431
 
19434
- // ../../packages/core-unified-agent/src/models/schemas.ts
19432
+ // ../../packages/core-unified-agent/src/models/registry.ts
19435
19433
  var EffortLevelSchema = external_exports.enum([
19436
19434
  "low",
19437
19435
  "medium",
@@ -19528,8 +19526,6 @@ var ModelsRegistrySchema = external_exports.object({
19528
19526
  /** 프로바이더별 모델 정보 */
19529
19527
  providers: external_exports.record(external_exports.string(), ProviderSchema)
19530
19528
  });
19531
-
19532
- // ../../packages/core-unified-agent/src/models/ModelRegistry.ts
19533
19529
  var registry2 = Object.freeze(ModelsRegistrySchema.parse(models_default));
19534
19530
  function getProviderModels(cli) {
19535
19531
  const provider = registry2.providers[cli];
@@ -16378,8 +16378,6 @@ function parsePathExt(pathExt) {
16378
16378
  const raw = pathExt && pathExt.trim().length > 0 ? pathExt : DEFAULT_WINDOWS_PATHEXT;
16379
16379
  return raw.split(WINDOWS_PATH_SEPARATOR).map((entry) => entry.trim()).filter((entry) => entry.length > 0);
16380
16380
  }
16381
-
16382
- // ../../packages/core-process/src/hidden.ts
16383
16381
  function withHidden(options) {
16384
16382
  return { ...options ?? {}, windowsHide: true };
16385
16383
  }
@@ -16454,7 +16452,7 @@ var models_default = {
16454
16452
  }
16455
16453
  };
16456
16454
 
16457
- // ../../packages/core-unified-agent/src/models/schemas.ts
16455
+ // ../../packages/core-unified-agent/src/models/registry.ts
16458
16456
  var EffortLevelSchema = external_exports.enum([
16459
16457
  "low",
16460
16458
  "medium",
@@ -16551,8 +16549,6 @@ var ModelsRegistrySchema = external_exports.object({
16551
16549
  /** 프로바이더별 모델 정보 */
16552
16550
  providers: external_exports.record(external_exports.string(), ProviderSchema)
16553
16551
  });
16554
-
16555
- // ../../packages/core-unified-agent/src/models/ModelRegistry.ts
16556
16552
  Object.freeze(ModelsRegistrySchema.parse(models_default));
16557
16553
 
16558
16554
  // ../../packages/core-unified-agent/src/config/CliConfigs.ts