@wirecat/tg-cli 0.108.0 → 0.109.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 (101) hide show
  1. package/dist/bin/tg.js +2 -2
  2. package/dist/bundle/{adapter-YFWRJWL5.js → adapter-6JLFYFL5.js} +45 -44
  3. package/dist/bundle/{all-profiles-GQIZSF4W.js → all-profiles-X7Y3T5S4.js} +8 -8
  4. package/dist/bundle/{anthropic-BKWEDKPU.js → anthropic-LGVXAADT.js} +5 -5
  5. package/dist/bundle/{app-server-RJV7ICLH.js → app-server-UI3AFSJX.js} +40 -39
  6. package/dist/bundle/{bot-api-2PAH2JZ3.js → bot-api-TQYRNYJQ.js} +46 -45
  7. package/dist/bundle/{bot-history-DPPZ43F4.js → bot-history-DDNTNMNB.js} +15 -15
  8. package/dist/bundle/{bun-Q7COX3Z5.js → bun-WXGS6HML.js} +2 -2
  9. package/dist/bundle/{bun-sqlite-YI4AYZXO.js → bun-sqlite-M6JEXKRT.js} +4 -4
  10. package/dist/bundle/{chunk-PQHYM2XC.js → chunk-25VC6U3A.js} +1 -1
  11. package/dist/bundle/{chunk-DNOJKQXQ.js → chunk-2ILQYCBY.js} +377 -286
  12. package/dist/bundle/{chunk-EWL3ZFOI.js → chunk-3PEZWXKO.js} +6 -6
  13. package/dist/bundle/{chunk-LY2LFJMU.js → chunk-4R4AH6FM.js} +117 -94
  14. package/dist/bundle/{chunk-CVWF3BFK.js → chunk-5SUFMBU5.js} +44 -44
  15. package/dist/bundle/chunk-76C5SSMR.js +379 -0
  16. package/dist/bundle/{chunk-5HPXENE5.js → chunk-7AJ2IESO.js} +1 -1
  17. package/dist/bundle/{chunk-PCMW3PW6.js → chunk-7T7ILNCU.js} +2 -2
  18. package/dist/bundle/{chunk-ZYBDAZFO.js → chunk-AD3QPYI3.js} +2 -2
  19. package/dist/bundle/{chunk-ON67U6WV.js → chunk-AGVKIJB7.js} +6 -6
  20. package/dist/bundle/{chunk-YJ6GFFEE.js → chunk-BESIMQ5U.js} +1 -1
  21. package/dist/bundle/{chunk-76OSISA3.js → chunk-BHPCZCX7.js} +2 -2
  22. package/dist/bundle/{chunk-3GXKJKIC.js → chunk-BZIZLEJN.js} +4 -4
  23. package/dist/bundle/{chunk-BOSMBW4I.js → chunk-C3RX3UOE.js} +11 -11
  24. package/dist/bundle/{chunk-KQFR7ZAA.js → chunk-CH2ESVV5.js} +22 -22
  25. package/dist/bundle/{chunk-WUF64WOG.js → chunk-CHI6D4D6.js} +4 -4
  26. package/dist/bundle/{chunk-DUWTG2GE.js → chunk-CVLDXFRP.js} +8 -8
  27. package/dist/bundle/{chunk-MFS52LTZ.js → chunk-DLAFGSTN.js} +1 -1
  28. package/dist/bundle/{chunk-XZXOGHU5.js → chunk-DO33KAMM.js} +71 -60
  29. package/dist/bundle/{chunk-77OOX2OE.js → chunk-DZVYGBZB.js} +79 -56
  30. package/dist/bundle/{chunk-WAGDZB62.js → chunk-GUFM5RLW.js} +2 -2
  31. package/dist/bundle/{chunk-REI5TPS3.js → chunk-IGIPIO4J.js} +11 -11
  32. package/dist/bundle/{chunk-LYLGLFWY.js → chunk-INYO2QFW.js} +3 -3
  33. package/dist/bundle/{chunk-3HYDKCXB.js → chunk-IULYECPC.js} +12 -12
  34. package/dist/bundle/{chunk-6MZ2ZBX4.js → chunk-IV2QWSPG.js} +2 -2
  35. package/dist/bundle/{chunk-6QTUYMGX.js → chunk-KHKC236O.js} +2 -2
  36. package/dist/bundle/{chunk-QVIT6SQ5.js → chunk-M62LF3QE.js} +613 -381
  37. package/dist/bundle/{chunk-KZPZFPGB.js → chunk-MF6NKU3Z.js} +81 -30
  38. package/dist/bundle/{chunk-WEDWIXIC.js → chunk-N56WXUCW.js} +2 -2
  39. package/dist/bundle/{chunk-T4SDOYPY.js → chunk-N5FSRC6H.js} +117 -70
  40. package/dist/bundle/{chunk-FG2QTYEF.js → chunk-NAVNCM5K.js} +1 -1
  41. package/dist/bundle/{chunk-F67VPIJL.js → chunk-OHLMHBDI.js} +28 -28
  42. package/dist/bundle/{chunk-SONKULUF.js → chunk-P55L4S6N.js} +3 -3
  43. package/dist/bundle/{chunk-OB5PPPXH.js → chunk-P57R2P75.js} +7 -7
  44. package/dist/bundle/{chunk-5P27JGGA.js → chunk-P5ILJ7MN.js} +5 -5
  45. package/dist/bundle/{chunk-AS2BVZU3.js → chunk-QQF7RDLR.js} +49 -24
  46. package/dist/bundle/{chunk-WKSLGPZQ.js → chunk-RD2NLJSU.js} +16 -4
  47. package/dist/bundle/{chunk-NCXCBVHO.js → chunk-S7B6MTXX.js} +6 -6
  48. package/dist/bundle/{chunk-CZANI3DM.js → chunk-SH63Q4QR.js} +22 -22
  49. package/dist/bundle/{chunk-BT6PWDM6.js → chunk-TMXNMO66.js} +3 -3
  50. package/dist/bundle/{chunk-4RDMNNVO.js → chunk-UIPBAT2T.js} +26 -14
  51. package/dist/bundle/{chunk-EBB7RFCW.js → chunk-UUQ3BH2Z.js} +2 -2
  52. package/dist/bundle/{chunk-VMU4SGCE.js → chunk-VFVMB3NV.js} +8 -6
  53. package/dist/bundle/{chunk-B7TFWNKJ.js → chunk-VYR2IIWW.js} +1 -1
  54. package/dist/bundle/{chunk-AOUB2QFP.js → chunk-WHYS6OSG.js} +2 -2
  55. package/dist/bundle/{chunk-ZHHVNTBJ.js → chunk-WNTXIQMB.js} +2 -2
  56. package/dist/bundle/{chunk-26PWIQPP.js → chunk-XJVGCCQE.js} +666 -782
  57. package/dist/bundle/{chunk-67SRVSPU.js → chunk-XMMWKHNY.js} +26 -9
  58. package/dist/bundle/{chunk-BL72ZIBV.js → chunk-YXCQ4DLZ.js} +1 -1
  59. package/dist/bundle/{chunk-3562DVQ7.js → chunk-YYOIULA2.js} +8 -8
  60. package/dist/bundle/{chunk-TVA3NXXO.js → chunk-ZFMS5G4H.js} +2 -2
  61. package/dist/bundle/{chunk-D6DBVPES.js → chunk-ZHP44EML.js} +3 -3
  62. package/dist/bundle/{chunk-VK2YLSK7.js → chunk-ZMZKZL3Y.js} +1 -1
  63. package/dist/bundle/{chunk-R5YOKYTE.js → chunk-ZUOS7QUB.js} +11 -11
  64. package/dist/bundle/command-contract-E2MWR3T3.js +32 -0
  65. package/dist/bundle/{decode-ZFAFVFWX.js → decode-RKPOGPBE.js} +19 -17
  66. package/dist/bundle/{echarts-SVXNTKGV.js → echarts-H5QQRBHI.js} +2 -2
  67. package/dist/bundle/{embed-V755YE7O.js → embed-7TVAPNP7.js} +5 -5
  68. package/dist/bundle/{embedder-MQAPNQBH.js → embedder-YOOHWWN6.js} +8 -8
  69. package/dist/bundle/{entry-ULQ3VOMQ.js → entry-SAKW5HEZ.js} +5 -5
  70. package/dist/bundle/{first-run-64BTWXDR.js → first-run-C744N572.js} +9 -9
  71. package/dist/bundle/first-screen-7GKUEIWS.js +30 -0
  72. package/dist/bundle/{identity-PW45VBUU.js → identity-NRWTZIQ4.js} +3 -3
  73. package/dist/bundle/{instructions-G3ZUIRRH.js → instructions-6LWRAW47.js} +1 -1
  74. package/dist/bundle/{mcp-OQBZXELQ.js → mcp-WSGVVZWI.js} +2 -2
  75. package/dist/bundle/{node-IDJXLZSX.js → node-XN4PIVWW.js} +2 -2
  76. package/dist/bundle/{node-sqlite-W22J37MG.js → node-sqlite-PCBGROGQ.js} +4 -4
  77. package/dist/bundle/{oauth-Q52LBXDE.js → oauth-PX6NGHUV.js} +6 -6
  78. package/dist/bundle/{open-YLD7VHEC.js → open-BKJGJ6GX.js} +3 -3
  79. package/dist/bundle/openai-MJP7CZXP.js +250 -0
  80. package/dist/bundle/{process-OBESF2XG.js → process-4PRR3MLT.js} +1 -1
  81. package/dist/bundle/{program-EBMWHOKQ.js → program-7YZUO42B.js} +48 -47
  82. package/dist/bundle/{prompt-FHHQF3MG.js → prompt-CILSZC2R.js} +4 -4
  83. package/dist/bundle/{proxy-transport-YSBYG26I.js → proxy-transport-FWGKTYBL.js} +4 -4
  84. package/dist/bundle/{recognize-QNHKHGKM.js → recognize-AVFDJAIL.js} +5 -3
  85. package/dist/bundle/{remote-RVZWRCCT.js → remote-2VYXGOM4.js} +6 -6
  86. package/dist/bundle/{rerank-KG2USEME.js → rerank-6FU2JPCD.js} +6 -6
  87. package/dist/bundle/{serve-I4MJKEQ4.js → serve-3YQOHBR6.js} +8 -8
  88. package/dist/bundle/server-S2K4YDDG.js +56 -0
  89. package/dist/bundle/{server-GV7SV3L6.js → server-TPK3LNEX.js} +32 -31
  90. package/dist/bundle/{state-AJKHWFBU.js → state-LLUNBLZE.js} +5 -5
  91. package/dist/bundle/{store-L3HFSSGJ.js → store-27FQ743G.js} +10 -10
  92. package/dist/bundle/store-maintenance-command-AFJMKEBK.js +45 -0
  93. package/dist/bundle/tg.js +4 -4
  94. package/dist/version.d.ts +1 -1
  95. package/dist/version.js +1 -1
  96. package/package.json +3 -3
  97. package/dist/bundle/command-contract-5GJV6EHG.js +0 -32
  98. package/dist/bundle/first-screen-YZCH4TEV.js +0 -30
  99. package/dist/bundle/server-AXMWFPNT.js +0 -55
  100. package/dist/bundle/store-maintenance-command-Y22ARSDR.js +0 -44
  101. /package/dist/bundle/{chunk-O5EHUB2V.js → chunk-62EDJKGP.js} +0 -0
@@ -14,7 +14,7 @@ import {
14
14
  safeParse,
15
15
  stepOf,
16
16
  writes
17
- } from "./chunk-67SRVSPU.js";
17
+ } from "./chunk-XMMWKHNY.js";
18
18
  import {
19
19
  __commonJS,
20
20
  __name,
@@ -1887,7 +1887,7 @@ var require_cli_table3 = __commonJS({
1887
1887
  }
1888
1888
  });
1889
1889
 
1890
- // node_modules/.pnpm/@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/exit-codes.js
1890
+ // node_modules/.pnpm/@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/exit-codes.js
1891
1891
  var EXIT_CODES = {
1892
1892
  validation_error: 2,
1893
1893
  configuration_error: 3,
@@ -1907,7 +1907,7 @@ var EXIT_CODES = {
1907
1907
  var exitCodeFor = /* @__PURE__ */ __name((code) => EXIT_CODES[code], "exitCodeFor");
1908
1908
  var GENERIC_FAILURE = 1;
1909
1909
 
1910
- // node_modules/.pnpm/@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/sanitize.js
1910
+ // node_modules/.pnpm/@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/sanitize.js
1911
1911
  var CONTROL = (
1912
1912
  // biome-ignore lint/suspicious/noControlCharactersInRegex: matching them is the whole point
1913
1913
  /[\u0000-\u0008\u000B-\u001F\u007F-\u009F\u200B\u200E\u200F\u202A-\u202E\u2066-\u2069\uFEFF\u{E0000}-\u{E007F}]/gu
@@ -1931,7 +1931,7 @@ var visibleControls = /* @__PURE__ */ __name((text) => {
1931
1931
  }, "visibleControls");
1932
1932
  var singleLine = /* @__PURE__ */ __name((text) => visibleControls(text).replace(LINE_BREAKS, escaped), "singleLine");
1933
1933
 
1934
- // node_modules/.pnpm/@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/failure.js
1934
+ // node_modules/.pnpm/@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/failure.js
1935
1935
  var recognise = /* @__PURE__ */ __name((failure) => {
1936
1936
  if (isCliError(failure))
1937
1937
  return failure;
@@ -2078,7 +2078,7 @@ var catchCrashes = /* @__PURE__ */ __name((options) => {
2078
2078
  };
2079
2079
  }, "catchCrashes");
2080
2080
 
2081
- // node_modules/.pnpm/@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/drain.js
2081
+ // node_modules/.pnpm/@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/drain.js
2082
2082
  var waitForDrain = /* @__PURE__ */ __name((stream, signal) => {
2083
2083
  if (signal?.aborted)
2084
2084
  return Promise.reject(signal.reason);
@@ -2086,14 +2086,14 @@ var waitForDrain = /* @__PURE__ */ __name((stream, signal) => {
2086
2086
  return Promise.reject(new Error("output stream closed"));
2087
2087
  if (!stream.writableNeedDrain)
2088
2088
  return Promise.resolve();
2089
- return new Promise((resolve, reject) => {
2089
+ return new Promise((resolve2, reject) => {
2090
2090
  const cleanup = /* @__PURE__ */ __name(() => {
2091
2091
  stream.off("drain", drained).off("error", failed).off("close", closed);
2092
2092
  signal?.removeEventListener("abort", aborted);
2093
2093
  }, "cleanup");
2094
2094
  const drained = /* @__PURE__ */ __name(() => {
2095
2095
  cleanup();
2096
- resolve();
2096
+ resolve2();
2097
2097
  }, "drained");
2098
2098
  const failed = /* @__PURE__ */ __name((error) => {
2099
2099
  cleanup();
@@ -2106,7 +2106,7 @@ var waitForDrain = /* @__PURE__ */ __name((stream, signal) => {
2106
2106
  });
2107
2107
  }, "waitForDrain");
2108
2108
 
2109
- // node_modules/.pnpm/@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/streams.js
2109
+ // node_modules/.pnpm/@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/streams.js
2110
2110
  var processStreams = {
2111
2111
  drain: /* @__PURE__ */ __name(async (signal) => {
2112
2112
  await Promise.all([waitForDrain(process.stdout, signal), waitForDrain(process.stderr, signal)]);
@@ -2135,7 +2135,19 @@ var captureStreams = /* @__PURE__ */ __name(() => {
2135
2135
  };
2136
2136
  }, "captureStreams");
2137
2137
 
2138
- // node_modules/.pnpm/@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/result-fields.js
2138
+ // node_modules/.pnpm/@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/retry.js
2139
+ var DEFAULT_RETRY = {
2140
+ retries: 1,
2141
+ baseDelayMs: 250,
2142
+ maxDelayMs: 1e4,
2143
+ maxRetryAfterMs: 3e4
2144
+ };
2145
+ var backoffMs = /* @__PURE__ */ __name((attempt, config, random) => {
2146
+ const ceiling = Math.min(config.maxDelayMs, config.baseDelayMs * 2 ** (attempt - 1));
2147
+ return Math.round(random() * ceiling);
2148
+ }, "backoffMs");
2149
+
2150
+ // node_modules/.pnpm/@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/result-fields.js
2139
2151
  var forbidden = /* @__PURE__ */ new Set(["__proto__", "prototype", "constructor"]);
2140
2152
  var validate = /* @__PURE__ */ __name((paths) => {
2141
2153
  if (paths.length === 0 || paths.length > 128 || paths.some((path) => path.length > 256 || !/^[A-Za-z][A-Za-z0-9_]*(?:\.[A-Za-z][A-Za-z0-9_]*)*$/.test(path) || path.split(".").some((part) => forbidden.has(part))))
@@ -2200,7 +2212,7 @@ var projectFields = /* @__PURE__ */ __name((value, fields) => {
2200
2212
  return project(value, fields);
2201
2213
  }, "projectFields");
2202
2214
 
2203
- // node_modules/.pnpm/@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/batch.js
2215
+ // node_modules/.pnpm/@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/batch.js
2204
2216
  var BATCH_LIMITS = Object.freeze({
2205
2217
  requests: 32,
2206
2218
  input_bytes: 262144,
@@ -2327,7 +2339,7 @@ var runBatch = /* @__PURE__ */ __name(async (requests, options = {}) => {
2327
2339
  };
2328
2340
  }, "runBatch");
2329
2341
 
2330
- // node_modules/.pnpm/@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/config.js
2342
+ // node_modules/.pnpm/@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/config.js
2331
2343
  import { randomBytes } from "node:crypto";
2332
2344
  import { mkdirSync, readFileSync, renameSync, rmSync, writeFileSync } from "node:fs";
2333
2345
  import { dirname, join } from "node:path";
@@ -2371,11 +2383,11 @@ var saveConfigFile = /* @__PURE__ */ __name((path, config) => {
2371
2383
  `, 384);
2372
2384
  }, "saveConfigFile");
2373
2385
 
2374
- // node_modules/.pnpm/@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/credentials.js
2386
+ // node_modules/.pnpm/@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/credentials.js
2375
2387
  import { readFileSync as readFileSync2 } from "node:fs";
2376
- import { join as join2 } from "node:path";
2388
+ import { join as join3, resolve } from "node:path";
2377
2389
 
2378
- // node_modules/.pnpm/@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/keyring.js
2390
+ // node_modules/.pnpm/@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/keyring.js
2379
2391
  import { createRequire } from "node:module";
2380
2392
  var ENTRY_OPTIONS = { linux: { store: "secret-service" } };
2381
2393
  var require2 = createRequire(new URL("keyring.js", import.meta.resolve("@wirecat/cli-base")).href);
@@ -2395,8 +2407,59 @@ var systemKeyring = {
2395
2407
  delete: /* @__PURE__ */ __name((service, account) => entry(service, account).deletePassword(), "delete")
2396
2408
  };
2397
2409
 
2398
- // node_modules/.pnpm/@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/credentials.js
2399
- var keyringService = /* @__PURE__ */ __name((service, configDir, isolated = false) => isolated ? `${service}:${configDir}` : service, "keyringService");
2410
+ // node_modules/.pnpm/@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/paths.js
2411
+ import { homedir, userInfo } from "node:os";
2412
+ import { join as join2, posix, win32 } from "node:path";
2413
+ var PATH_KINDS = ["config", "state", "cache"];
2414
+ var OVERRIDES = { config: "CONFIG_DIR", state: "STATE_DIR", cache: "CACHE_DIR" };
2415
+ var overrideName = /* @__PURE__ */ __name((appName, prefix, kind) => `${prefix ?? appName.toUpperCase().replace(/[^A-Z0-9]/g, "_")}_${OVERRIDES[kind]}`, "overrideName");
2416
+ var defaultPaths = /* @__PURE__ */ __name(({ appName, env = process.env, platform = process.platform }) => {
2417
+ if (platform === "win32") {
2418
+ const home2 = env.USERPROFILE || homedir();
2419
+ const roaming = env.APPDATA || win32.join(home2, "AppData", "Roaming");
2420
+ const local = env.LOCALAPPDATA || win32.join(home2, "AppData", "Local");
2421
+ return {
2422
+ config: win32.join(roaming, appName, "Config"),
2423
+ state: win32.join(local, appName, "Data"),
2424
+ cache: win32.join(local, appName, "Cache")
2425
+ };
2426
+ }
2427
+ const home = env.HOME || homedir();
2428
+ return {
2429
+ config: posix.join(env.XDG_CONFIG_HOME || posix.join(home, ".config"), appName),
2430
+ state: posix.join(env.XDG_DATA_HOME || posix.join(home, ".local", "share"), appName),
2431
+ cache: posix.join(env.XDG_CACHE_HOME || posix.join(home, ".cache"), appName)
2432
+ };
2433
+ }, "defaultPaths");
2434
+ var resolvePaths = /* @__PURE__ */ __name((options) => {
2435
+ const { appName, prefix, env = process.env } = options;
2436
+ const base = defaultPaths(options);
2437
+ return {
2438
+ config: env[overrideName(appName, prefix, "config")] ?? base.config,
2439
+ state: env[overrideName(appName, prefix, "state")] ?? base.state,
2440
+ cache: env[overrideName(appName, prefix, "cache")] ?? base.cache
2441
+ };
2442
+ }, "resolvePaths");
2443
+ var pathsAreOverridden = /* @__PURE__ */ __name(({ appName, prefix, env = process.env }) => PATH_KINDS.some((kind) => env[overrideName(appName, prefix, kind)] !== void 0), "pathsAreOverridden");
2444
+ var accountHome = /* @__PURE__ */ __name(() => {
2445
+ try {
2446
+ return userInfo().homedir;
2447
+ } catch {
2448
+ return void 0;
2449
+ }
2450
+ }, "accountHome");
2451
+ var homeIsMoved = /* @__PURE__ */ __name(({ env = process.env, platform = process.platform, home = accountHome() } = {}) => {
2452
+ if (home === void 0)
2453
+ return true;
2454
+ const appName = "app";
2455
+ const actual = defaultPaths({ appName, env, platform });
2456
+ const owners = defaultPaths({ appName, env: { HOME: home, USERPROFILE: home }, platform });
2457
+ return PATH_KINDS.some((kind) => actual[kind] !== owners[kind]);
2458
+ }, "homeIsMoved");
2459
+ var configFilePath = /* @__PURE__ */ __name((configDir, fileName = "config.json") => join2(configDir, fileName), "configFilePath");
2460
+
2461
+ // node_modules/.pnpm/@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/credentials.js
2462
+ var movedRunService = /* @__PURE__ */ __name((service, configDir) => `${service}:${resolve(configDir)}`, "movedRunService");
2400
2463
  var Credentials = class {
2401
2464
  static {
2402
2465
  __name(this, "Credentials");
@@ -2409,6 +2472,8 @@ var Credentials = class {
2409
2472
  #envVar;
2410
2473
  #fileName;
2411
2474
  #warn;
2475
+ /** Set only for a moved run with the system keyring. */
2476
+ #temporaryService;
2412
2477
  #warned = false;
2413
2478
  constructor(options) {
2414
2479
  this.#configDir = options.configDir;
@@ -2419,24 +2484,27 @@ var Credentials = class {
2419
2484
  this.#fileName = options.fileName ?? "credentials.json";
2420
2485
  this.#warn = options.warn ?? ((message) => process.stderr.write(`${message}
2421
2486
  `));
2422
- this.#service = keyringService(options.service, options.configDir, options.isolated);
2487
+ this.#service = options.service;
2488
+ const moved = this.#keyring === systemKeyring && (options.isolated === true || homeIsMoved({ env: this.#env }));
2489
+ this.#temporaryService = moved ? movedRunService(options.service, options.configDir) : void 0;
2423
2490
  }
2424
2491
  read(account) {
2425
2492
  const fromEnv = this.#envVar ? this.#env[this.#envVar]?.trim() : void 0;
2426
2493
  if (fromEnv)
2427
2494
  return { secret: fromEnv, source: "environment" };
2428
2495
  if (this.#storage !== "file") {
2429
- const fromKeyring = this.#tryKeyring(() => this.#keyring.get(this.#service, account));
2496
+ const temporary = this.#temporaryService;
2497
+ const fromKeyring = this.#tryKeyring(() => temporary && this.#keyring.get(temporary, account) || this.#keyring.get(this.#service, account));
2430
2498
  if (fromKeyring)
2431
2499
  return { secret: fromKeyring, source: "keyring" };
2432
2500
  }
2433
- const fromFile = this.#readFile()?.[account]?.secret;
2434
- return fromFile ? { secret: fromFile, source: "file" } : void 0;
2501
+ const secret = this.#readFile()?.[account]?.secret;
2502
+ return secret ? { secret, source: "file" } : void 0;
2435
2503
  }
2436
2504
  write(account, secret) {
2437
2505
  if (this.#storage !== "file") {
2438
2506
  const stored = this.#tryKeyring(() => {
2439
- this.#keyring.set(this.#service, account, secret);
2507
+ this.#keyring.set(this.#temporaryService ?? this.#service, account, secret);
2440
2508
  return true;
2441
2509
  });
2442
2510
  if (stored)
@@ -2452,8 +2520,13 @@ var Credentials = class {
2452
2520
  }
2453
2521
  remove(account) {
2454
2522
  const removed = [];
2455
- if (this.#storage !== "file" && this.#tryKeyring(() => this.#keyring.delete(this.#service, account))) {
2456
- removed.push("keyring");
2523
+ if (this.#storage !== "file") {
2524
+ if (this.#tryKeyring(() => this.#keyring.delete(this.#temporaryService ?? this.#service, account))) {
2525
+ removed.push("keyring");
2526
+ }
2527
+ if (this.#temporaryService && this.#ownersEntryExists(account)) {
2528
+ this.#warn(removed.includes("keyring") ? `removed this run's own sign-in of ${account} from the OS keyring and kept the owner's: a run with moved folders never removes it` : `kept ${account} in the OS keyring: it is the owner's sign-in, shared with every run, and a run with moved folders never removes it`);
2529
+ }
2457
2530
  }
2458
2531
  const store = this.#readFile();
2459
2532
  if (store?.[account] !== void 0) {
@@ -2463,8 +2536,16 @@ var Credentials = class {
2463
2536
  }
2464
2537
  return removed;
2465
2538
  }
2539
+ /** Only for the warning: a keyring that fails here must not fail a removal that already happened. */
2540
+ #ownersEntryExists(account) {
2541
+ try {
2542
+ return this.#keyring.get(this.#service, account) !== null;
2543
+ } catch {
2544
+ return false;
2545
+ }
2546
+ }
2466
2547
  #path() {
2467
- return join2(this.#configDir, this.#fileName);
2548
+ return join3(this.#configDir, this.#fileName);
2468
2549
  }
2469
2550
  /** `undefined` when the file exists but is not a store: writing would replace what it holds. */
2470
2551
  #readFile() {
@@ -2502,21 +2583,21 @@ var Credentials = class {
2502
2583
  }
2503
2584
  };
2504
2585
 
2505
- // node_modules/.pnpm/@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/time.js
2586
+ // node_modules/.pnpm/@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/time.js
2506
2587
  var abortError = /* @__PURE__ */ __name(() => new DOMException("The operation was aborted.", "AbortError"), "abortError");
2507
- var realSleep = /* @__PURE__ */ __name((ms, signal) => new Promise((resolve, reject) => {
2588
+ var realSleep = /* @__PURE__ */ __name((ms, signal) => new Promise((resolve2, reject) => {
2508
2589
  if (signal?.aborted) {
2509
2590
  reject(abortError());
2510
2591
  return;
2511
2592
  }
2512
- const timer = setTimeout(resolve, ms);
2593
+ const timer = setTimeout(resolve2, ms);
2513
2594
  signal?.addEventListener("abort", () => {
2514
2595
  clearTimeout(timer);
2515
2596
  reject(abortError());
2516
2597
  }, { once: true });
2517
2598
  }), "realSleep");
2518
2599
 
2519
- // node_modules/.pnpm/@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/logging.js
2600
+ // node_modules/.pnpm/@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/logging.js
2520
2601
  import { appendFileSync } from "node:fs";
2521
2602
  var REDACTED_FIELDS = [
2522
2603
  "authorization",
@@ -2611,43 +2692,7 @@ var silent = {
2611
2692
  }, "error")
2612
2693
  };
2613
2694
 
2614
- // node_modules/.pnpm/@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/paths.js
2615
- import { homedir } from "node:os";
2616
- import { join as join3, posix, win32 } from "node:path";
2617
- var PATH_KINDS = ["config", "state", "cache"];
2618
- var OVERRIDES = { config: "CONFIG_DIR", state: "STATE_DIR", cache: "CACHE_DIR" };
2619
- var overrideName = /* @__PURE__ */ __name((appName, prefix, kind) => `${prefix ?? appName.toUpperCase().replace(/[^A-Z0-9]/g, "_")}_${OVERRIDES[kind]}`, "overrideName");
2620
- var defaultPaths = /* @__PURE__ */ __name(({ appName, env = process.env, platform = process.platform }) => {
2621
- if (platform === "win32") {
2622
- const home2 = env.USERPROFILE || homedir();
2623
- const roaming = env.APPDATA || win32.join(home2, "AppData", "Roaming");
2624
- const local = env.LOCALAPPDATA || win32.join(home2, "AppData", "Local");
2625
- return {
2626
- config: win32.join(roaming, appName, "Config"),
2627
- state: win32.join(local, appName, "Data"),
2628
- cache: win32.join(local, appName, "Cache")
2629
- };
2630
- }
2631
- const home = env.HOME || homedir();
2632
- return {
2633
- config: posix.join(env.XDG_CONFIG_HOME || posix.join(home, ".config"), appName),
2634
- state: posix.join(env.XDG_DATA_HOME || posix.join(home, ".local", "share"), appName),
2635
- cache: posix.join(env.XDG_CACHE_HOME || posix.join(home, ".cache"), appName)
2636
- };
2637
- }, "defaultPaths");
2638
- var resolvePaths = /* @__PURE__ */ __name((options) => {
2639
- const { appName, prefix, env = process.env } = options;
2640
- const base = defaultPaths(options);
2641
- return {
2642
- config: env[overrideName(appName, prefix, "config")] ?? base.config,
2643
- state: env[overrideName(appName, prefix, "state")] ?? base.state,
2644
- cache: env[overrideName(appName, prefix, "cache")] ?? base.cache
2645
- };
2646
- }, "resolvePaths");
2647
- var pathsAreOverridden = /* @__PURE__ */ __name(({ appName, prefix, env = process.env }) => PATH_KINDS.some((kind) => env[overrideName(appName, prefix, kind)] !== void 0), "pathsAreOverridden");
2648
- var configFilePath = /* @__PURE__ */ __name((configDir, fileName = "config.json") => join3(configDir, fileName), "configFilePath");
2649
-
2650
- // node_modules/.pnpm/@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/pretty.js
2695
+ // node_modules/.pnpm/@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/pretty.js
2651
2696
  var import_cli_table3 = __toESM(require_cli_table3(), 1);
2652
2697
  import { styleText } from "node:util";
2653
2698
  var renderPretty = /* @__PURE__ */ __name((value, options) => {
@@ -2722,7 +2767,7 @@ var BORDERLESS = {
2722
2767
  middle: ""
2723
2768
  };
2724
2769
 
2725
- // node_modules/.pnpm/@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/renderer.js
2770
+ // node_modules/.pnpm/@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/renderer.js
2726
2771
  var createRenderer = /* @__PURE__ */ __name(({ format, color, streams = processStreams, quiet = false }) => {
2727
2772
  const mark = /* @__PURE__ */ __name((symbol, message) => format === "pretty" ? `${symbol} ${visibleControls(message)}` : visibleControls(message), "mark");
2728
2773
  const say = /* @__PURE__ */ __name((symbol) => (message) => {
@@ -2780,16 +2825,18 @@ export {
2780
2825
  writeSecurely,
2781
2826
  loadConfigFile,
2782
2827
  saveConfigFile,
2828
+ resolvePaths,
2829
+ pathsAreOverridden,
2830
+ configFilePath,
2783
2831
  Credentials,
2784
2832
  realSleep,
2785
2833
  logRecordOf,
2786
2834
  createRecordLog,
2787
- resolvePaths,
2788
- pathsAreOverridden,
2789
- configFilePath,
2790
2835
  renderPretty,
2791
2836
  indent,
2792
2837
  processStreams,
2793
2838
  captureStreams,
2794
- createRenderer
2839
+ createRenderer,
2840
+ DEFAULT_RETRY,
2841
+ backoffMs
2795
2842
  };
@@ -5,7 +5,7 @@ import {
5
5
  check,
6
6
  pipe,
7
7
  string
8
- } from "./chunk-67SRVSPU.js";
8
+ } from "./chunk-XMMWKHNY.js";
9
9
  import {
10
10
  __name
11
11
  } from "./chunk-ZVVMGPBJ.js";
@@ -20,7 +20,7 @@ import {
20
20
  tool,
21
21
  toolKey,
22
22
  toolsFromCommands
23
- } from "./chunk-KQFR7ZAA.js";
23
+ } from "./chunk-CH2ESVV5.js";
24
24
  import {
25
25
  CHART_KINDS,
26
26
  CHART_SIZE,
@@ -34,19 +34,19 @@ import {
34
34
  registerPrompts,
35
35
  stdinFieldOf,
36
36
  syncsFirst
37
- } from "./chunk-KZPZFPGB.js";
37
+ } from "./chunk-MF6NKU3Z.js";
38
38
  import {
39
39
  agentJson,
40
40
  skillResource
41
- } from "./chunk-4RDMNNVO.js";
41
+ } from "./chunk-UIPBAT2T.js";
42
42
  import {
43
43
  answeredWire
44
- } from "./chunk-5HPXENE5.js";
44
+ } from "./chunk-7AJ2IESO.js";
45
45
  import {
46
46
  StdioServerTransport,
47
47
  callerOf,
48
48
  serveStdio
49
- } from "./chunk-6MZ2ZBX4.js";
49
+ } from "./chunk-IV2QWSPG.js";
50
50
  import {
51
51
  McpServer,
52
52
  ResourceTemplate
@@ -54,7 +54,7 @@ import {
54
54
  import {
55
55
  connectedFor,
56
56
  guardFor
57
- } from "./chunk-CZANI3DM.js";
57
+ } from "./chunk-SH63Q4QR.js";
58
58
  import {
59
59
  capability,
60
60
  dateWindow,
@@ -63,10 +63,10 @@ import {
63
63
  servicesFor,
64
64
  storedDeps,
65
65
  wholeList
66
- } from "./chunk-26PWIQPP.js";
66
+ } from "./chunk-XJVGCCQE.js";
67
67
  import {
68
68
  findCommand
69
- } from "./chunk-5P27JGGA.js";
69
+ } from "./chunk-P5ILJ7MN.js";
70
70
  import {
71
71
  DEFAULT_OUTPUT_BYTES,
72
72
  changesAuthorityAt,
@@ -82,34 +82,34 @@ import {
82
82
  sealed,
83
83
  snakeKeys,
84
84
  typedCommand
85
- } from "./chunk-77OOX2OE.js";
85
+ } from "./chunk-DZVYGBZB.js";
86
86
  import {
87
87
  isCliFailure,
88
88
  withCaller
89
- } from "./chunk-DUWTG2GE.js";
89
+ } from "./chunk-CVLDXFRP.js";
90
90
  import {
91
91
  readOnlyLockOf
92
- } from "./chunk-PCMW3PW6.js";
92
+ } from "./chunk-7T7ILNCU.js";
93
93
  import {
94
94
  mcpHttpMarker
95
- } from "./chunk-WUF64WOG.js";
95
+ } from "./chunk-CHI6D4D6.js";
96
96
  import {
97
97
  instructions
98
- } from "./chunk-BL72ZIBV.js";
98
+ } from "./chunk-YXCQ4DLZ.js";
99
99
  import {
100
100
  warmEmbedders
101
- } from "./chunk-EWL3ZFOI.js";
101
+ } from "./chunk-3PEZWXKO.js";
102
102
  import {
103
103
  openStore,
104
104
  pdfPreviewLimits
105
- } from "./chunk-QVIT6SQ5.js";
105
+ } from "./chunk-M62LF3QE.js";
106
106
  import {
107
107
  timezoneOf
108
- } from "./chunk-XZXOGHU5.js";
108
+ } from "./chunk-DO33KAMM.js";
109
109
  import {
110
110
  mcpErrorResult,
111
111
  visibleControls
112
- } from "./chunk-T4SDOYPY.js";
112
+ } from "./chunk-N5FSRC6H.js";
113
113
  import {
114
114
  CliError,
115
115
  description,
@@ -125,15 +125,15 @@ import {
125
125
  regex,
126
126
  strictObject,
127
127
  string
128
- } from "./chunk-67SRVSPU.js";
128
+ } from "./chunk-XMMWKHNY.js";
129
129
  import {
130
130
  __name
131
131
  } from "./chunk-ZVVMGPBJ.js";
132
132
 
133
- // node_modules/.pnpm/@wirecat+cli-core@0.491.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._95f40a748301e48ce1af109feea5b293/node_modules/@wirecat/cli-core/dist/mcp/server.js
133
+ // node_modules/.pnpm/@wirecat+cli-core@0.501.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.67.0_commander@15._175d7b0a70ee7b08949f50032917d93e/node_modules/@wirecat/cli-core/dist/mcp/server.js
134
134
  import { randomUUID } from "node:crypto";
135
135
 
136
- // node_modules/.pnpm/@wirecat+cli-core@0.491.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._95f40a748301e48ce1af109feea5b293/node_modules/@wirecat/cli-core/dist/mcp/agent-log.js
136
+ // node_modules/.pnpm/@wirecat+cli-core@0.501.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.67.0_commander@15._175d7b0a70ee7b08949f50032917d93e/node_modules/@wirecat/cli-core/dist/mcp/agent-log.js
137
137
  var agentLog = /* @__PURE__ */ __name((open) => {
138
138
  let held;
139
139
  return {
@@ -152,7 +152,7 @@ var agentLog = /* @__PURE__ */ __name((open) => {
152
152
  };
153
153
  }, "agentLog");
154
154
 
155
- // node_modules/.pnpm/@wirecat+cli-core@0.491.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._95f40a748301e48ce1af109feea5b293/node_modules/@wirecat/cli-core/dist/mcp/resources.js
155
+ // node_modules/.pnpm/@wirecat+cli-core@0.501.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.67.0_commander@15._175d7b0a70ee7b08949f50032917d93e/node_modules/@wirecat/cli-core/dist/mcp/resources.js
156
156
  var LISTED = 100;
157
157
  var registerResources = /* @__PURE__ */ __name((server, session, { command, name, limit, recorded, withStore, messenger, guard, assertRead }) => {
158
158
  server.registerResource("chat", new ResourceTemplate(`${command}://chat/{id}`, {
@@ -190,7 +190,7 @@ var registerResources = /* @__PURE__ */ __name((server, session, { command, name
190
190
  });
191
191
  }, "registerResources");
192
192
 
193
- // node_modules/.pnpm/@wirecat+cli-core@0.491.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._95f40a748301e48ce1af109feea5b293/node_modules/@wirecat/cli-core/dist/mcp/session.js
193
+ // node_modules/.pnpm/@wirecat+cli-core@0.501.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.67.0_commander@15._175d7b0a70ee7b08949f50032917d93e/node_modules/@wirecat/cli-core/dist/mcp/session.js
194
194
  var HARMLESS = /* @__PURE__ */ new Set(["validation_error", "not_found", "permission_error", "confirmation_required", "rate_limited"]);
195
195
  var harmless = /* @__PURE__ */ __name((code) => HARMLESS.has(code), "harmless");
196
196
  var MessengerSession = class {
@@ -265,7 +265,7 @@ var MessengerSession = class {
265
265
  }
266
266
  };
267
267
 
268
- // node_modules/.pnpm/@wirecat+cli-core@0.491.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._95f40a748301e48ce1af109feea5b293/node_modules/@wirecat/cli-core/dist/mcp/tools/attachments.js
268
+ // node_modules/.pnpm/@wirecat+cli-core@0.501.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.67.0_commander@15._175d7b0a70ee7b08949f50032917d93e/node_modules/@wirecat/cli-core/dist/mcp/tools/attachments.js
269
269
  var attachmentsTools = /* @__PURE__ */ __name((messenger) => {
270
270
  const _command = messenger.app.command;
271
271
  return {
@@ -319,7 +319,7 @@ var attachmentsTools = /* @__PURE__ */ __name((messenger) => {
319
319
  };
320
320
  }, "attachmentsTools");
321
321
 
322
- // node_modules/.pnpm/@wirecat+cli-core@0.491.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._95f40a748301e48ce1af109feea5b293/node_modules/@wirecat/cli-core/dist/mcp/tools/messages-photo.js
322
+ // node_modules/.pnpm/@wirecat+cli-core@0.501.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.67.0_commander@15._175d7b0a70ee7b08949f50032917d93e/node_modules/@wirecat/cli-core/dist/mcp/tools/messages-photo.js
323
323
  var PHOTO_LIMIT = 512 * 1024;
324
324
  var IMAGE_TYPES = [
325
325
  ["image/jpeg", (b) => b[0] === 255 && b[1] === 216 && b[2] === 255],
@@ -373,7 +373,7 @@ var readUpTo = /* @__PURE__ */ __name(async (file, limit, saveIt) => {
373
373
  return new Uint8Array(Buffer.concat(chunks));
374
374
  }, "readUpTo");
375
375
 
376
- // node_modules/.pnpm/@wirecat+cli-core@0.491.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._95f40a748301e48ce1af109feea5b293/node_modules/@wirecat/cli-core/dist/mcp/tools/stats.js
376
+ // node_modules/.pnpm/@wirecat+cli-core@0.501.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.67.0_commander@15._175d7b0a70ee7b08949f50032917d93e/node_modules/@wirecat/cli-core/dist/mcp/tools/stats.js
377
377
  var statsTools = /* @__PURE__ */ __name((messenger) => ({
378
378
  stats_charts: tool({
379
379
  title: "A chart from a chat's statistics",
@@ -410,14 +410,14 @@ var statsTools = /* @__PURE__ */ __name((messenger) => ({
410
410
  })
411
411
  }), "statsTools");
412
412
 
413
- // node_modules/.pnpm/@wirecat+cli-core@0.491.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._95f40a748301e48ce1af109feea5b293/node_modules/@wirecat/cli-core/dist/mcp/tools.js
413
+ // node_modules/.pnpm/@wirecat+cli-core@0.501.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.67.0_commander@15._175d7b0a70ee7b08949f50032917d93e/node_modules/@wirecat/cli-core/dist/mcp/tools.js
414
414
  var pictureTools = /* @__PURE__ */ __name((messenger) => Object.fromEntries(Object.entries({
415
415
  ...messagesPhotoTools(messenger),
416
416
  ...attachmentsTools(messenger),
417
417
  ...statsTools(messenger)
418
418
  }).map(([name, definition]) => [name, { ...definition, input: strictObject(definition.input.entries) }])), "pictureTools");
419
419
 
420
- // node_modules/.pnpm/@wirecat+cli-core@0.491.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._95f40a748301e48ce1af109feea5b293/node_modules/@wirecat/cli-core/dist/mcp/server.js
420
+ // node_modules/.pnpm/@wirecat+cli-core@0.501.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.67.0_commander@15._175d7b0a70ee7b08949f50032917d93e/node_modules/@wirecat/cli-core/dist/mcp/server.js
421
421
  var PER_RUN = /* @__PURE__ */ new Set([
422
422
  "streams",
423
423
  "stdin",
@@ -741,7 +741,7 @@ var serveOverStdio = /* @__PURE__ */ __name(async (command, context, messenger,
741
741
  }, "serveOverStdio");
742
742
  var serveOverHttpUntilStopped = /* @__PURE__ */ __name(async (command, context, messenger, options, http) => {
743
743
  const { session, embedders, build, log } = createServer(command, context, messenger, options);
744
- const { serveOverHttp } = await import("./serve-I4MJKEQ4.js");
744
+ const { serveOverHttp } = await import("./serve-3YQOHBR6.js");
745
745
  const appName = messenger.app.command;
746
746
  const appEnvPrefix = messenger.app.envPrefix;
747
747
  const listening = await serveOverHttp(build, {
@@ -3,15 +3,15 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  readSharedSection,
5
5
  writeSharedSection
6
- } from "./chunk-ON67U6WV.js";
6
+ } from "./chunk-AGVKIJB7.js";
7
7
  import {
8
8
  CliError
9
- } from "./chunk-67SRVSPU.js";
9
+ } from "./chunk-XMMWKHNY.js";
10
10
  import {
11
11
  __name
12
12
  } from "./chunk-ZVVMGPBJ.js";
13
13
 
14
- // node_modules/.pnpm/@wirecat+cli-core@0.491.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._95f40a748301e48ce1af109feea5b293/node_modules/@wirecat/cli-core/dist/cli/setup-answers.js
14
+ // node_modules/.pnpm/@wirecat+cli-core@0.501.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.67.0_commander@15._175d7b0a70ee7b08949f50032917d93e/node_modules/@wirecat/cli-core/dist/cli/setup-answers.js
15
15
  var PERMISSION_ANSWERS = ["readonly", "allow"];
16
16
  var QUESTIONS = ["languages", "tools", "permissions"];
17
17
  var SECTION = "setup";
@@ -7,7 +7,7 @@ import {
7
7
  commandPathOf,
8
8
  findCommand,
9
9
  outputOf
10
- } from "./chunk-5P27JGGA.js";
10
+ } from "./chunk-P5ILJ7MN.js";
11
11
  import {
12
12
  Command,
13
13
  Help,
@@ -18,16 +18,16 @@ import {
18
18
  environmentOf,
19
19
  metaOf,
20
20
  takesProfile
21
- } from "./chunk-77OOX2OE.js";
21
+ } from "./chunk-DZVYGBZB.js";
22
22
  import {
23
23
  CliError,
24
24
  writes
25
- } from "./chunk-67SRVSPU.js";
25
+ } from "./chunk-XMMWKHNY.js";
26
26
  import {
27
27
  __name
28
28
  } from "./chunk-ZVVMGPBJ.js";
29
29
 
30
- // node_modules/.pnpm/@wirecat+cli-core@0.491.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._95f40a748301e48ce1af109feea5b293/node_modules/@wirecat/cli-core/dist/cli/help/sections.js
30
+ // node_modules/.pnpm/@wirecat+cli-core@0.501.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.67.0_commander@15._175d7b0a70ee7b08949f50032917d93e/node_modules/@wirecat/cli-core/dist/cli/help/sections.js
31
31
  var SECTIONS = {
32
32
  read: "Read",
33
33
  write: "Write",
@@ -92,7 +92,7 @@ var CORE_SECTIONS = {
92
92
  upgrade: "setup"
93
93
  };
94
94
 
95
- // node_modules/.pnpm/@wirecat+cli-core@0.491.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._95f40a748301e48ce1af109feea5b293/node_modules/@wirecat/cli-core/dist/cli/help/commands-text.js
95
+ // node_modules/.pnpm/@wirecat+cli-core@0.501.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.67.0_commander@15._175d7b0a70ee7b08949f50032917d93e/node_modules/@wirecat/cli-core/dist/cli/help/commands-text.js
96
96
  var DESCRIPTION = 90;
97
97
  var COLUMN = 52;
98
98
  var short = /* @__PURE__ */ __name((text) => {
@@ -131,7 +131,7 @@ var commandsText = /* @__PURE__ */ __name((root, commands, scope) => {
131
131
  `;
132
132
  }, "commandsText");
133
133
 
134
- // node_modules/.pnpm/@wirecat+cli-core@0.491.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._95f40a748301e48ce1af109feea5b293/node_modules/@wirecat/cli-core/dist/cli/help/command-help.js
134
+ // node_modules/.pnpm/@wirecat+cli-core@0.501.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.67.0_commander@15._175d7b0a70ee7b08949f50032917d93e/node_modules/@wirecat/cli-core/dist/cli/help/command-help.js
135
135
  var ARGUMENT_KINDS = {
136
136
  chat: "chat",
137
137
  chats: "chat",
@@ -323,7 +323,7 @@ var installCommandHelp = /* @__PURE__ */ __name((program, { profile = true } = {
323
323
  command.addHelpText("after", () => commandHelpText(command));
324
324
  }, "installCommandHelp");
325
325
 
326
- // node_modules/.pnpm/@wirecat+cli-core@0.491.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._95f40a748301e48ce1af109feea5b293/node_modules/@wirecat/cli-core/dist/cli/help/first-screen.js
326
+ // node_modules/.pnpm/@wirecat+cli-core@0.501.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.67.0_commander@15._175d7b0a70ee7b08949f50032917d93e/node_modules/@wirecat/cli-core/dist/cli/help/first-screen.js
327
327
  var WIRECAT_TOOLS = [
328
328
  {
329
329
  command: "tg",