@wirecat/drive-cli 0.49.0 → 0.50.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 (144) hide show
  1. package/dist/bin/drive.js +2 -2
  2. package/dist/bundle/{all-profiles-WK2XXGPU.js → all-profiles-WQTVOCIS.js} +8 -8
  3. package/dist/bundle/{anthropic-R354D7GT.js → anthropic-YCA2AWIJ.js} +5 -5
  4. package/dist/bundle/{app-server-3YHJ757G.js → app-server-ZQOYUQJH.js} +52 -52
  5. package/dist/bundle/{bun-JVDJVDHL.js → bun-5NFIDHGM.js} +2 -2
  6. package/dist/bundle/{bun-sqlite-KZCZWSRZ.js → bun-sqlite-OAQE4M2E.js} +4 -4
  7. package/dist/bundle/{chunk-2BADVV4A.js → chunk-24TOKSZE.js} +2 -2
  8. package/dist/bundle/{chunk-CCLDCM7J.js → chunk-2M5XEGVE.js} +290 -208
  9. package/dist/bundle/{chunk-HBYE4EP2.js → chunk-3CQNJKJT.js} +1 -1
  10. package/dist/bundle/{chunk-MC77UZVA.js → chunk-3HNUH632.js} +6 -6
  11. package/dist/bundle/{chunk-U77RLMOK.js → chunk-3XX52F42.js} +2 -2
  12. package/dist/bundle/{chunk-5KR7BKDV.js → chunk-4J7UGHPK.js} +5 -5
  13. package/dist/bundle/{chunk-IRDGH7DV.js → chunk-4OLWMHS6.js} +3 -3
  14. package/dist/bundle/{chunk-7WEISHFA.js → chunk-4SSUKRO4.js} +2 -2
  15. package/dist/bundle/{chunk-EF2RCQ3L.js → chunk-4VLUX3V5.js} +1 -1
  16. package/dist/bundle/{chunk-W5EUHV3J.js → chunk-53UWCVSU.js} +1 -1
  17. package/dist/bundle/{chunk-PPXNEHYX.js → chunk-5OMLYNYB.js} +8 -8
  18. package/dist/bundle/{chunk-NXFEZQDL.js → chunk-5WN7JHQE.js} +26 -26
  19. package/dist/bundle/{chunk-FB7I5JWC.js → chunk-5Z63NTC7.js} +6 -6
  20. package/dist/bundle/{chunk-2ZFR67KY.js → chunk-5ZJHQ4TN.js} +2 -2
  21. package/dist/bundle/{chunk-75VCGSNB.js → chunk-652YTDT5.js} +15 -15
  22. package/dist/bundle/{chunk-YYMHFXHK.js → chunk-6DDXB5WB.js} +2 -2
  23. package/dist/bundle/{chunk-XLJV3ZOH.js → chunk-6E4PFCQ4.js} +1 -1
  24. package/dist/bundle/{chunk-P4NOTS3U.js → chunk-7SYSC7KX.js} +2 -2
  25. package/dist/bundle/{chunk-6Z3W7LTD.js → chunk-AO3NCZNT.js} +8 -8
  26. package/dist/bundle/{chunk-LF7ACSTK.js → chunk-BUALWXBT.js} +1 -1
  27. package/dist/bundle/{chunk-FZQSGLHU.js → chunk-C4PNAHI4.js} +11 -11
  28. package/dist/bundle/{chunk-XVXXWNAA.js → chunk-CCEVICWU.js} +4 -4
  29. package/dist/bundle/{chunk-Y2AUB4TJ.js → chunk-CEUEXMIR.js} +80 -33
  30. package/dist/bundle/{chunk-254VYUWN.js → chunk-CTIQ77AB.js} +17 -17
  31. package/dist/bundle/{chunk-JZ3SUK2M.js → chunk-DTHWL5YU.js} +5 -5
  32. package/dist/bundle/{chunk-JMOX454R.js → chunk-E656DAZT.js} +1 -1
  33. package/dist/bundle/{chunk-KKZYZ32J.js → chunk-EXYEDKTX.js} +2 -2
  34. package/dist/bundle/{chunk-BJ3JRO34.js → chunk-EY4CUQW2.js} +7 -7
  35. package/dist/bundle/{chunk-YOF5BC4G.js → chunk-FABKIQ24.js} +2 -2
  36. package/dist/bundle/{chunk-QEM3MOSB.js → chunk-FSAM4Y2S.js} +8 -8
  37. package/dist/bundle/{chunk-R2QRP7EJ.js → chunk-G75FZQAZ.js} +13 -9
  38. package/dist/bundle/{chunk-VHT2WI4I.js → chunk-HGWMX7BM.js} +101 -73
  39. package/dist/bundle/{chunk-45TPBTR3.js → chunk-HURI56SB.js} +21 -21
  40. package/dist/bundle/{chunk-624B6G64.js → chunk-IA6LNKCF.js} +5 -5
  41. package/dist/bundle/{chunk-ITZI7T2X.js → chunk-IFM2APQB.js} +2 -2
  42. package/dist/bundle/{chunk-AN7HENGZ.js → chunk-IGG4RBIZ.js} +108 -96
  43. package/dist/bundle/{chunk-FUJZ5S2Q.js → chunk-INVF3GXW.js} +10 -10
  44. package/dist/bundle/{chunk-R235IRSJ.js → chunk-IUZ4PT2V.js} +2 -2
  45. package/dist/bundle/{chunk-3UHJC6HH.js → chunk-JA2YY7D4.js} +7 -7
  46. package/dist/bundle/{chunk-7BA3HL7N.js → chunk-JHBX53SK.js} +35 -35
  47. package/dist/bundle/{chunk-RAAI3JLI.js → chunk-JSMPSOEM.js} +3 -3
  48. package/dist/bundle/{chunk-HVM5LS5Z.js → chunk-KEQ35HQQ.js} +3 -3
  49. package/dist/bundle/{chunk-HIAO4MPA.js → chunk-KYMGVMOS.js} +1 -1
  50. package/dist/bundle/{chunk-467AQO7E.js → chunk-KZEOWOZV.js} +7 -7
  51. package/dist/bundle/{chunk-KYJYOZYG.js → chunk-LNWRRK2H.js} +6 -6
  52. package/dist/bundle/{chunk-P7INAZIT.js → chunk-M2D4FXKY.js} +5 -5
  53. package/dist/bundle/{chunk-SSD2V4HR.js → chunk-M6FQOGUW.js} +279 -258
  54. package/dist/bundle/{chunk-5ISHP4TK.js → chunk-MMOG7ZVF.js} +2 -2
  55. package/dist/bundle/{chunk-KK3BA4IS.js → chunk-NHRJW3PH.js} +2 -2
  56. package/dist/bundle/{chunk-MFS52LTZ.js → chunk-OKSS7YUN.js} +1 -1
  57. package/dist/bundle/{chunk-E2Y6GJZX.js → chunk-OL22OOIW.js} +4 -4
  58. package/dist/bundle/{chunk-DKJGYYCP.js → chunk-OQEBGY74.js} +46 -46
  59. package/dist/bundle/{chunk-MAXN7COO.js → chunk-P3T2SZW2.js} +1 -1
  60. package/dist/bundle/{chunk-NFU3OBCC.js → chunk-P6VN5UB4.js} +4 -4
  61. package/dist/bundle/{chunk-A3FU4RR6.js → chunk-PNUS224S.js} +4 -4
  62. package/dist/bundle/{chunk-L5RZI2M5.js → chunk-POD2GHQB.js} +19 -19
  63. package/dist/bundle/{chunk-46X7Z4FD.js → chunk-Q27HCATD.js} +324 -278
  64. package/dist/bundle/{chunk-HQ2PGEOK.js → chunk-Q3VG3UYV.js} +11 -11
  65. package/dist/bundle/{chunk-JMRHDZMV.js → chunk-QBECV7NO.js} +33 -32
  66. package/dist/bundle/{chunk-EOZPMJJP.js → chunk-QNLD7Y6Z.js} +7 -7
  67. package/dist/bundle/{chunk-NVHB2MHX.js → chunk-QSDXVUJG.js} +4 -4
  68. package/dist/bundle/{chunk-ABVFH76X.js → chunk-QY3LK3OT.js} +5 -5
  69. package/dist/bundle/{chunk-BQV3WYXW.js → chunk-R7XMCREL.js} +31 -21
  70. package/dist/bundle/{chunk-463NMG57.js → chunk-RTIMGPLN.js} +3 -3
  71. package/dist/bundle/{chunk-CB5NGX6E.js → chunk-T7UZHKAS.js} +2 -2
  72. package/dist/bundle/{chunk-4ORK4UAY.js → chunk-TATRMMOG.js} +3 -3
  73. package/dist/bundle/{chunk-MP2UCK3Z.js → chunk-UVPKSZSC.js} +4 -4
  74. package/dist/bundle/{chunk-IEAZAPC3.js → chunk-VAETCXRI.js} +42 -17
  75. package/dist/bundle/{chunk-P4OU3OVF.js → chunk-VAK2Q2XG.js} +14 -14
  76. package/dist/bundle/{chunk-ZK7Y5K63.js → chunk-XEETGCOC.js} +1 -1
  77. package/dist/bundle/{chunk-IRNX4CO5.js → chunk-XGJUEH5C.js} +27 -27
  78. package/dist/bundle/{chunk-VAGF723Z.js → chunk-Y73IZWRI.js} +1 -1
  79. package/dist/bundle/{chunk-2DLAJGRN.js → chunk-YOABRW2M.js} +1 -1
  80. package/dist/bundle/{chunk-65AW2AEQ.js → chunk-YROVFHPJ.js} +2 -2
  81. package/dist/bundle/{chunk-HD3TFIT4.js → chunk-Z54E5LKF.js} +6 -6
  82. package/dist/bundle/{chunk-W5IDHD6C.js → chunk-ZJBRKR42.js} +27 -27
  83. package/dist/bundle/{chunk-22LTNYO2.js → chunk-ZKGYW63J.js} +9 -9
  84. package/dist/bundle/{chunk-2CKGGIWF.js → chunk-ZP735UUT.js} +3 -3
  85. package/dist/bundle/{chunk-HF2T7E67.js → chunk-ZXD2I5ZQ.js} +49 -49
  86. package/dist/bundle/command-contract-TAWVO2G3.js +38 -0
  87. package/dist/bundle/{decode-BE3VDYTJ.js → decode-YZRTP54O.js} +4 -4
  88. package/dist/bundle/drive.js +7 -7
  89. package/dist/bundle/{echarts-4OQHS575.js → echarts-C6HUK2FL.js} +2 -2
  90. package/dist/bundle/{embed-QR76SJDI.js → embed-QRQ7ITFC.js} +5 -5
  91. package/dist/bundle/{embedder-EMIDKBYV.js → embedder-EZDB3JPA.js} +8 -8
  92. package/dist/bundle/{entry-FE4REJDO.js → entry-4WQQKSYG.js} +6 -6
  93. package/dist/bundle/failure-EEJGMWEP.js +37 -0
  94. package/dist/bundle/{first-run-ALPI62PX.js → first-run-ZAS4OV3T.js} +9 -9
  95. package/dist/bundle/first-screen-6ICWD2N3.js +36 -0
  96. package/dist/bundle/{google-NV75VSCD.js → google-KNILTIDW.js} +9 -9
  97. package/dist/bundle/google-api-CZACYX5T.js +82 -0
  98. package/dist/bundle/{identity-NZ7SP6OL.js → identity-VBCGUXT5.js} +2 -2
  99. package/dist/bundle/{instructions-3QZBKKPF.js → instructions-II4M2WL3.js} +1 -1
  100. package/dist/bundle/{login-KNBM6XUX.js → login-4JACQVMD.js} +62 -62
  101. package/dist/bundle/mcp-2BR2EX7L.js +95 -0
  102. package/dist/bundle/{mcp-XY2FGGUM.js → mcp-6ZIAWU3N.js} +76 -76
  103. package/dist/bundle/{mcp-OQBZXELQ.js → mcp-ZYZ4DFW2.js} +2 -2
  104. package/dist/bundle/{node-R2BLYUSB.js → node-LIN7L4VQ.js} +2 -2
  105. package/dist/bundle/{node-sqlite-PMRVP442.js → node-sqlite-VAH4KZN3.js} +4 -4
  106. package/dist/bundle/{oauth-NM2AKRRT.js → oauth-QUE3VCTU.js} +6 -6
  107. package/dist/bundle/{open-XZH5ZNDA.js → open-DQ3EVYPB.js} +3 -3
  108. package/dist/bundle/{process-IX5YWGDP.js → process-46XDWPVW.js} +1 -1
  109. package/dist/bundle/{program-MDWQHGBY.js → program-X3CZ4XDN.js} +93 -86
  110. package/dist/bundle/{prompt-5K6XGWSK.js → prompt-SAZYCZV3.js} +4 -4
  111. package/dist/bundle/{reasons-GF2TYGX6.js → reasons-366PI7OV.js} +3 -3
  112. package/dist/bundle/{recognize-U7GDD6T2.js → recognize-SSBOHOTW.js} +3 -3
  113. package/dist/bundle/{remote-ZWXOGNQX.js → remote-EL3FWCQE.js} +6 -6
  114. package/dist/bundle/{rerank-YRQBCS63.js → rerank-RPIQRJIW.js} +6 -6
  115. package/dist/bundle/{serve-6PQ7K5RK.js → serve-AX44DIKK.js} +8 -8
  116. package/dist/bundle/server-DCJIGUW2.js +56 -0
  117. package/dist/bundle/server-WWQSQBFT.js +69 -0
  118. package/dist/bundle/{services-QBIQX236.js → services-K4UOEMQD.js} +28 -28
  119. package/dist/bundle/{sqlite-runtime-7Q5UD2VR.js → sqlite-runtime-N7N3EYGH.js} +4 -4
  120. package/dist/bundle/{state-U72TC26L.js → state-C3S5FD7V.js} +5 -5
  121. package/dist/bundle/{store-B4RAJ63G.js → store-4N3NBUGX.js} +14 -14
  122. package/dist/bundle/{store-FYABCSIH.js → store-QV4ZNEQ3.js} +16 -16
  123. package/dist/bundle/store-maintenance-command-QL4AECBD.js +57 -0
  124. package/dist/bundle/tokens-Y7HCOXOA.js +103 -0
  125. package/dist/commands/session.d.ts.map +1 -1
  126. package/dist/commands/session.js +10 -2
  127. package/dist/commands/session.js.map +1 -1
  128. package/dist/tokens.d.ts.map +1 -1
  129. package/dist/tokens.js +2 -2
  130. package/dist/tokens.js.map +1 -1
  131. package/dist/version.d.ts +1 -1
  132. package/dist/version.js +1 -1
  133. package/package.json +3 -3
  134. package/dist/bundle/command-contract-AEA45IX7.js +0 -38
  135. package/dist/bundle/failure-GYOTW6NN.js +0 -37
  136. package/dist/bundle/first-screen-JLS57PIT.js +0 -36
  137. package/dist/bundle/google-api-6623OUF2.js +0 -82
  138. package/dist/bundle/mcp-4NPK6BM3.js +0 -95
  139. package/dist/bundle/server-O7SS6NAY.js +0 -56
  140. package/dist/bundle/server-WT57TF6S.js +0 -69
  141. package/dist/bundle/store-maintenance-command-DAF5NI3T.js +0 -57
  142. package/dist/bundle/tokens-DISQJKDM.js +0 -103
  143. /package/dist/bundle/{chunk-O5EHUB2V.js → chunk-2WNDZFGG.js} +0 -0
  144. /package/dist/bundle/{chunk-YLBNPI7H.js → chunk-VDZZ46RT.js} +0 -0
@@ -2,7 +2,7 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
 
4
4
  // dist/version.js
5
- var VERSION = "0.49.0";
5
+ var VERSION = "0.50.0";
6
6
 
7
7
  export {
8
8
  VERSION
@@ -2,12 +2,12 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  CliError
5
- } from "./chunk-BJ3JRO34.js";
5
+ } from "./chunk-EY4CUQW2.js";
6
6
  import {
7
7
  __name
8
8
  } from "./chunk-ZVVMGPBJ.js";
9
9
 
10
- // node_modules/.pnpm/@wirecat+cli-core@0.491.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_1193098e908042dfe6f4070222ac0245/node_modules/@wirecat/cli-core/dist/cli/input-policy.js
10
+ // node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/cli/input-policy.js
11
11
  var MAX_BUFFERED_INPUT = 16 * 1024 * 1024;
12
12
  var MAX_SECRET_INPUT = 64 * 1024;
13
13
  var policies = /* @__PURE__ */ new WeakMap();
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // 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/errors.js
7
+ // node_modules/.pnpm/@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/errors.js
8
8
  var errorCodes = [
9
9
  "validation_error",
10
10
  "configuration_error",
@@ -1272,7 +1272,7 @@ function unwrap(schema) {
1272
1272
  }
1273
1273
  __name(unwrap, "unwrap");
1274
1274
 
1275
- // 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/standards/effects.js
1275
+ // node_modules/.pnpm/@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/effects.js
1276
1276
  var EFFECT_LEVELS = ["none", "read", "write"];
1277
1277
  var effectsSchema = strictObject({
1278
1278
  remote: picklist(EFFECT_LEVELS),
@@ -1909,7 +1909,7 @@ function toStandardJsonSchema(schema) {
1909
1909
  }
1910
1910
  __name(toStandardJsonSchema, "toStandardJsonSchema");
1911
1911
 
1912
- // 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/standards/registry.js
1912
+ // node_modules/.pnpm/@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/registry.js
1913
1913
  var word = pipe(string(), regex(/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/, "a lower-case word, words joined by -"));
1914
1914
  var SNAKE_CASE = /^[a-z][a-z0-9]*(_[a-z0-9]+)*$/;
1915
1915
  var text = pipe(string(), regex(/\S/, "must not be empty"));
@@ -1951,7 +1951,7 @@ var fill = /* @__PURE__ */ __name((template, values) => template.replace(PLACEHO
1951
1951
  return String(value);
1952
1952
  }), "fill");
1953
1953
 
1954
- // 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/standards/output.js
1954
+ // node_modules/.pnpm/@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/output.js
1955
1955
  var MAX_NEXT_STEPS = 2;
1956
1956
  var isoTime = pipe(string(), isoTimestamp("an ISO 8601 time in UTC"), endsWith("Z", "an ISO 8601 time in UTC, ending in `Z`"));
1957
1957
  var reference = pipe(string(), regex(/^[a-z]+:\S+$/, "a reference such as `note:42`"));
@@ -2036,7 +2036,7 @@ var jsonlOf = /* @__PURE__ */ __name(({ items, page, meta }) => [
2036
2036
  JSON.stringify({ type: "end", complete: meta.complete, ...meta.issues ? { issues: meta.issues } : {}, page })
2037
2037
  ].join("\n"), "jsonlOf");
2038
2038
 
2039
- // 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/standards/errors.js
2039
+ // node_modules/.pnpm/@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/errors.js
2040
2040
  var CRASH_CODE = "internal_error";
2041
2041
  var CRASH_REASON = "command.crashed";
2042
2042
  var errorObjectSchema = strictObject({
@@ -2117,7 +2117,7 @@ var BASE_REASONS = defineReasons([
2117
2117
  { reason: CRASH_REASON, code: CRASH_CODE, message: "the command failed; this is a bug", details: [] }
2118
2118
  ]);
2119
2119
 
2120
- // 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/standards/steps.js
2120
+ // node_modules/.pnpm/@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/steps.js
2121
2121
  var SAME_COMMAND = "*";
2122
2122
  var commandPath = pipe(string(), regex(/^[a-z][a-z0-9-]*( [a-z][a-z0-9-]*)*$/, "a command path such as `messages sync`"));
2123
2123
  var stepSchema = union([
@@ -2196,7 +2196,7 @@ var STEPS = defineSteps([
2196
2196
  }
2197
2197
  ]);
2198
2198
 
2199
- // 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/standards/log.js
2199
+ // node_modules/.pnpm/@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/log.js
2200
2200
  var LOG_SEVERITIES = ["trace", "debug", "info", "warn", "error", "fatal"];
2201
2201
  var logRecordSchema = strictObject({
2202
2202
  time: isoTime,
@@ -3,7 +3,7 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  CAPABILITY_STATEMENTS,
5
5
  storeCapable
6
- } from "./chunk-KYJYOZYG.js";
6
+ } from "./chunk-LNWRRK2H.js";
7
7
  import {
8
8
  importFrom
9
9
  } from "./chunk-Y5E2WNWB.js";
@@ -11,7 +11,7 @@ import {
11
11
  __name
12
12
  } from "./chunk-ZVVMGPBJ.js";
13
13
 
14
- // node_modules/.pnpm/@wirecat+cli-core@0.491.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_1193098e908042dfe6f4070222ac0245/node_modules/@wirecat/cli-core/dist/sqlite-runtime.js
14
+ // node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/sqlite-runtime.js
15
15
  import { spawn, spawnSync } from "node:child_process";
16
16
  import { readFileSync } from "node:fs";
17
17
  import { dirname } from "node:path";
@@ -7,29 +7,29 @@ import {
7
7
  commandPathOf,
8
8
  findCommand,
9
9
  outputOf
10
- } from "./chunk-3UHJC6HH.js";
10
+ } from "./chunk-JA2YY7D4.js";
11
11
  import {
12
12
  NO_EFFECTS,
13
13
  commandAt,
14
14
  environmentOf,
15
15
  takesProfile
16
- } from "./chunk-JMRHDZMV.js";
16
+ } from "./chunk-QBECV7NO.js";
17
17
  import {
18
18
  Command,
19
19
  Help,
20
20
  Option,
21
21
  annotate,
22
22
  metaOf
23
- } from "./chunk-22LTNYO2.js";
23
+ } from "./chunk-ZKGYW63J.js";
24
24
  import {
25
25
  CliError,
26
26
  writes
27
- } from "./chunk-BJ3JRO34.js";
27
+ } from "./chunk-EY4CUQW2.js";
28
28
  import {
29
29
  __name
30
30
  } from "./chunk-ZVVMGPBJ.js";
31
31
 
32
- // node_modules/.pnpm/@wirecat+cli-core@0.491.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_1193098e908042dfe6f4070222ac0245/node_modules/@wirecat/cli-core/dist/cli/help/sections.js
32
+ // node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/cli/help/sections.js
33
33
  var SECTIONS = {
34
34
  read: "Read",
35
35
  write: "Write",
@@ -94,7 +94,7 @@ var CORE_SECTIONS = {
94
94
  upgrade: "setup"
95
95
  };
96
96
 
97
- // node_modules/.pnpm/@wirecat+cli-core@0.491.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_1193098e908042dfe6f4070222ac0245/node_modules/@wirecat/cli-core/dist/cli/help/commands-text.js
97
+ // node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/cli/help/commands-text.js
98
98
  var DESCRIPTION = 90;
99
99
  var COLUMN = 52;
100
100
  var short = /* @__PURE__ */ __name((text) => {
@@ -133,7 +133,7 @@ var commandsText = /* @__PURE__ */ __name((root, commands, scope) => {
133
133
  `;
134
134
  }, "commandsText");
135
135
 
136
- // node_modules/.pnpm/@wirecat+cli-core@0.491.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_1193098e908042dfe6f4070222ac0245/node_modules/@wirecat/cli-core/dist/cli/help/command-help.js
136
+ // node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/cli/help/command-help.js
137
137
  var ARGUMENT_KINDS = {
138
138
  chat: "chat",
139
139
  chats: "chat",
@@ -325,7 +325,7 @@ var installCommandHelp = /* @__PURE__ */ __name((program, { profile = true } = {
325
325
  command.addHelpText("after", () => commandHelpText(command));
326
326
  }, "installCommandHelp");
327
327
 
328
- // node_modules/.pnpm/@wirecat+cli-core@0.491.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_1193098e908042dfe6f4070222ac0245/node_modules/@wirecat/cli-core/dist/cli/help/first-screen.js
328
+ // node_modules/.pnpm/@wirecat+cli-core@0.494.0_@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_type_231e74d5ae3bca45b1b0de971f6f7b9a/node_modules/@wirecat/cli-core/dist/cli/help/first-screen.js
329
329
  var WIRECAT_TOOLS = [
330
330
  {
331
331
  command: "tg",
@@ -21,12 +21,12 @@ import {
21
21
  reference,
22
22
  string,
23
23
  variant
24
- } from "./chunk-BJ3JRO34.js";
24
+ } from "./chunk-EY4CUQW2.js";
25
25
  import {
26
26
  __name
27
27
  } from "./chunk-ZVVMGPBJ.js";
28
28
 
29
- // 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/query/types.js
29
+ // node_modules/.pnpm/@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/types.js
30
30
  var QUERY_LIMITS = {
31
31
  bytes: 8192,
32
32
  depth: 32,
@@ -70,7 +70,7 @@ function queryError(reason, span, alternative, context = {}, details = {}) {
70
70
  __name(queryError, "queryError");
71
71
  var walkQuery = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? [node] : node.clauses.flatMap(({ node: node2 }) => walkQuery(node2)), "walkQuery");
72
72
 
73
- // 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/query/dates.js
73
+ // node_modules/.pnpm/@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/dates.js
74
74
  var timezoneOf = /* @__PURE__ */ __name((given) => {
75
75
  const zone = given ?? Intl.DateTimeFormat().resolvedOptions().timeZone ?? "UTC";
76
76
  try {
@@ -215,7 +215,7 @@ var dateRange = /* @__PURE__ */ __name((lower, upper, lowerInclusive, upperInclu
215
215
  };
216
216
  }, "dateRange");
217
217
 
218
- // 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/query/evaluate.js
218
+ // node_modules/.pnpm/@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/evaluate.js
219
219
  var wordsOf = /* @__PURE__ */ __name((text) => text.toLowerCase().match(/[\p{L}\p{N}]+/gu) ?? [], "wordsOf");
220
220
  var pattern = /* @__PURE__ */ __name((value) => new RegExp(`^${[...value].map((char) => char === "*" ? ".*" : char === "?" ? "." : char.replace(/[.+^${}()|[\]\\]/, "\\$&")).join("")}$`, "iu"), "pattern");
221
221
  var present = /* @__PURE__ */ __name((value) => value !== void 0 && value !== null && value !== "", "present");
@@ -270,7 +270,7 @@ var matches = /* @__PURE__ */ __name((node, item, byName, options) => {
270
270
  }, "matches");
271
271
  var evaluate = /* @__PURE__ */ __name((ast, fields, item, options = {}) => matches(ast.root, item, new Map(fields.map((field) => [field.name, field])), options), "evaluate");
272
272
 
273
- // 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/query/fields.js
273
+ // node_modules/.pnpm/@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/fields.js
274
274
  var FIELD_TYPES = ["kw", "txt", "enum", "num", "time", "bool", "ref"];
275
275
  var OPERATORS_BY_TYPE = {
276
276
  kw: ["term", "phrase", "wildcard"],
@@ -347,7 +347,7 @@ var queryFieldsOf = /* @__PURE__ */ __name((schema, annotations = {}) => {
347
347
  return [...own, ...relations, ...states];
348
348
  }, "queryFieldsOf");
349
349
 
350
- // 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/query/help.js
350
+ // node_modules/.pnpm/@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/help.js
351
351
  var QUERY_SYNTAX = 'field:value \xB7 "a phrase" \xB7 word* \xB7 AND OR NOT \xB7 ( ) \xB7 [a TO b] \xB7 > >= < <=';
352
352
  var kindOf = /* @__PURE__ */ __name((field) => field.values ? `${field.type}: ${field.values.join("|")}` : `${field.type}: ${field.operators.join(", ")}`, "kindOf");
353
353
  var fieldsHelp = /* @__PURE__ */ __name((registry, guide) => {
@@ -363,7 +363,7 @@ var fieldsHelp = /* @__PURE__ */ __name((registry, guide) => {
363
363
  ].join("\n");
364
364
  }, "fieldsHelp");
365
365
 
366
- // 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/query/parser.js
366
+ // node_modules/.pnpm/@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/parser.js
367
367
  var whitespace = /* @__PURE__ */ __name((c) => /[ \t\n\r\u3000]/u.test(c), "whitespace");
368
368
  var reserved = /* @__PURE__ */ new Set([
369
369
  "+",
@@ -668,7 +668,7 @@ var implicitTextTerms = /* @__PURE__ */ __name((text) => {
668
668
  return new Set(tokens.flatMap((token, index) => token.kind === "term" && ![":", "=", "<", ">", "<=", ">="].includes(tokens[index - 1]?.kind ?? "") && ![":", "=", "<", ">", "<=", ">="].includes(tokens[index + 1]?.kind ?? "") ? [token.span.start] : []));
669
669
  }, "implicitTextTerms");
670
670
 
671
- // 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/query/validate.js
671
+ // node_modules/.pnpm/@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/validate.js
672
672
  var inContext = /* @__PURE__ */ __name((context, run) => {
673
673
  try {
674
674
  run();
@@ -743,7 +743,7 @@ var validateQuery = /* @__PURE__ */ __name((ast, registry, options = {}) => {
743
743
  }, "validateQuery");
744
744
  var fieldsNamed = /* @__PURE__ */ __name((ast) => new Set(walkQuery(ast.root).map((node) => node.field)), "fieldsNamed");
745
745
 
746
- // 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/query/registry.js
746
+ // node_modules/.pnpm/@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/registry.js
747
747
  var describeQuery = /* @__PURE__ */ __name((registry) => ({
748
748
  entity: registry.entity,
749
749
  backend: registry.backend,
@@ -771,7 +771,10 @@ var exampleProblems = /* @__PURE__ */ __name((registry) => {
771
771
  ...defaults
772
772
  ].filter((entry) => entry.problem !== void 0);
773
773
  }, "exampleProblems");
774
+ var checked = /* @__PURE__ */ new WeakSet();
774
775
  var defineQuery = /* @__PURE__ */ __name((registry) => {
776
+ if (checked.has(registry))
777
+ return registry;
775
778
  const names = registry.fields.map((field) => field.name);
776
779
  const problems = [
777
780
  ...duplicates(names).map((name) => `"${name}" is listed twice`),
@@ -780,6 +783,7 @@ var defineQuery = /* @__PURE__ */ __name((registry) => {
780
783
  ];
781
784
  if (problems.length > 0)
782
785
  throw new RegistryError(`${registry.entity} query`, problems);
786
+ checked.add(registry);
783
787
  return registry;
784
788
  }, "defineQuery");
785
789
  var SPAN = ["span", "alternative", "guide"];
@@ -14,7 +14,7 @@ import {
14
14
  safeParse,
15
15
  stepOf,
16
16
  writes
17
- } from "./chunk-BJ3JRO34.js";
17
+ } from "./chunk-EY4CUQW2.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/sanitize.js
1890
+ // node_modules/.pnpm/@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/sanitize.js
1891
1891
  var CONTROL = (
1892
1892
  // biome-ignore lint/suspicious/noControlCharactersInRegex: matching them is the whole point
1893
1893
  /[\u0000-\u0008\u000B-\u001F\u007F-\u009F\u200B\u200E\u200F\u202A-\u202E\u2066-\u2069\uFEFF\u{E0000}-\u{E007F}]/gu
@@ -1911,7 +1911,7 @@ var visibleControls = /* @__PURE__ */ __name((text) => {
1911
1911
  }, "visibleControls");
1912
1912
  var singleLine = /* @__PURE__ */ __name((text) => visibleControls(text).replace(LINE_BREAKS, escaped), "singleLine");
1913
1913
 
1914
- // 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
1914
+ // node_modules/.pnpm/@wirecat+cli-base@0.65.5_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
1915
1915
  var EXIT_CODES = {
1916
1916
  validation_error: 2,
1917
1917
  configuration_error: 3,
@@ -1931,7 +1931,7 @@ var EXIT_CODES = {
1931
1931
  var exitCodeFor = /* @__PURE__ */ __name((code) => EXIT_CODES[code], "exitCodeFor");
1932
1932
  var GENERIC_FAILURE = 1;
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.65.5_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/result-fields.js
2081
+ // node_modules/.pnpm/@wirecat+cli-base@0.65.5_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
2082
2082
  var forbidden = /* @__PURE__ */ new Set(["__proto__", "prototype", "constructor"]);
2083
2083
  var validate = /* @__PURE__ */ __name((paths) => {
2084
2084
  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))))
@@ -2143,7 +2143,7 @@ var projectFields = /* @__PURE__ */ __name((value, fields) => {
2143
2143
  return project(value, fields);
2144
2144
  }, "projectFields");
2145
2145
 
2146
- // 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
2146
+ // node_modules/.pnpm/@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/keyring.js
2147
2147
  import { createRequire } from "node:module";
2148
2148
  var ENTRY_OPTIONS = { linux: { store: "secret-service" } };
2149
2149
  var require2 = createRequire(new URL("keyring.js", import.meta.resolve("@wirecat/cli-base")).href);
@@ -2163,18 +2163,70 @@ var systemKeyring = {
2163
2163
  delete: /* @__PURE__ */ __name((service, account) => entry(service, account).deletePassword(), "delete")
2164
2164
  };
2165
2165
 
2166
- // 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
2166
+ // node_modules/.pnpm/@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/paths.js
2167
+ import { homedir, userInfo } from "node:os";
2168
+ import { join, posix, win32 } from "node:path";
2169
+ var PATH_KINDS = ["config", "state", "cache"];
2170
+ var OVERRIDES = { config: "CONFIG_DIR", state: "STATE_DIR", cache: "CACHE_DIR" };
2171
+ var overrideName = /* @__PURE__ */ __name((appName, prefix, kind) => `${prefix ?? appName.toUpperCase().replace(/[^A-Z0-9]/g, "_")}_${OVERRIDES[kind]}`, "overrideName");
2172
+ var defaultPaths = /* @__PURE__ */ __name(({ appName, env = process.env, platform = process.platform }) => {
2173
+ if (platform === "win32") {
2174
+ const home2 = env.USERPROFILE || homedir();
2175
+ const roaming = env.APPDATA || win32.join(home2, "AppData", "Roaming");
2176
+ const local = env.LOCALAPPDATA || win32.join(home2, "AppData", "Local");
2177
+ return {
2178
+ config: win32.join(roaming, appName, "Config"),
2179
+ state: win32.join(local, appName, "Data"),
2180
+ cache: win32.join(local, appName, "Cache")
2181
+ };
2182
+ }
2183
+ const home = env.HOME || homedir();
2184
+ return {
2185
+ config: posix.join(env.XDG_CONFIG_HOME || posix.join(home, ".config"), appName),
2186
+ state: posix.join(env.XDG_DATA_HOME || posix.join(home, ".local", "share"), appName),
2187
+ cache: posix.join(env.XDG_CACHE_HOME || posix.join(home, ".cache"), appName)
2188
+ };
2189
+ }, "defaultPaths");
2190
+ var resolvePaths = /* @__PURE__ */ __name((options) => {
2191
+ const { appName, prefix, env = process.env } = options;
2192
+ const base = defaultPaths(options);
2193
+ return {
2194
+ config: env[overrideName(appName, prefix, "config")] ?? base.config,
2195
+ state: env[overrideName(appName, prefix, "state")] ?? base.state,
2196
+ cache: env[overrideName(appName, prefix, "cache")] ?? base.cache
2197
+ };
2198
+ }, "resolvePaths");
2199
+ var pathsAreOverridden = /* @__PURE__ */ __name(({ appName, prefix, env = process.env }) => PATH_KINDS.some((kind) => env[overrideName(appName, prefix, kind)] !== void 0), "pathsAreOverridden");
2200
+ var accountHome = /* @__PURE__ */ __name(() => {
2201
+ try {
2202
+ return userInfo().homedir;
2203
+ } catch {
2204
+ return void 0;
2205
+ }
2206
+ }, "accountHome");
2207
+ var homeIsMoved = /* @__PURE__ */ __name(({ env = process.env, platform = process.platform, home = accountHome() } = {}) => {
2208
+ if (home === void 0)
2209
+ return true;
2210
+ const appName = "app";
2211
+ const actual = defaultPaths({ appName, env, platform });
2212
+ const owners = defaultPaths({ appName, env: { HOME: home, USERPROFILE: home }, platform });
2213
+ return PATH_KINDS.some((kind) => actual[kind] !== owners[kind]);
2214
+ }, "homeIsMoved");
2215
+ var isMovedRun = /* @__PURE__ */ __name((options) => pathsAreOverridden(options) || homeIsMoved(options), "isMovedRun");
2216
+ var configFilePath = /* @__PURE__ */ __name((configDir, fileName = "config.json") => join(configDir, fileName), "configFilePath");
2217
+
2218
+ // node_modules/.pnpm/@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/credentials.js
2167
2219
  import { readFileSync as readFileSync2 } from "node:fs";
2168
- import { join as join2 } from "node:path";
2220
+ import { join as join3, resolve } from "node:path";
2169
2221
 
2170
- // 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
2222
+ // node_modules/.pnpm/@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/config.js
2171
2223
  import { randomBytes } from "node:crypto";
2172
2224
  import { mkdirSync, readFileSync, renameSync, rmSync, writeFileSync } from "node:fs";
2173
- import { dirname, join } from "node:path";
2225
+ import { dirname, join as join2 } from "node:path";
2174
2226
  var writeSecurely = /* @__PURE__ */ __name((path, contents, mode) => {
2175
2227
  const dir = dirname(path);
2176
2228
  mkdirSync(dir, { recursive: true, mode: 448 });
2177
- const temp = join(dir, `.${randomBytes(8).toString("hex")}.tmp`);
2229
+ const temp = join2(dir, `.${randomBytes(8).toString("hex")}.tmp`);
2178
2230
  try {
2179
2231
  writeFileSync(temp, contents, { mode, flag: "wx" });
2180
2232
  renameSync(temp, path);
@@ -2211,8 +2263,9 @@ var saveConfigFile = /* @__PURE__ */ __name((path, config) => {
2211
2263
  `, 384);
2212
2264
  }, "saveConfigFile");
2213
2265
 
2214
- // 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
2215
- var keyringService = /* @__PURE__ */ __name((service, configDir, isolated = false) => isolated ? `${service}:${configDir}` : service, "keyringService");
2266
+ // node_modules/.pnpm/@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/credentials.js
2267
+ var keyringService = /* @__PURE__ */ __name((service, _configDir, _isolated) => service, "keyringService");
2268
+ var movedRunService = /* @__PURE__ */ __name((service, configDir) => `${service}:${resolve(configDir)}`, "movedRunService");
2216
2269
  var Credentials = class {
2217
2270
  static {
2218
2271
  __name(this, "Credentials");
@@ -2225,6 +2278,8 @@ var Credentials = class {
2225
2278
  #envVar;
2226
2279
  #fileName;
2227
2280
  #warn;
2281
+ /** Set only for a moved run with the system keyring. */
2282
+ #temporaryService;
2228
2283
  #warned = false;
2229
2284
  constructor(options) {
2230
2285
  this.#configDir = options.configDir;
@@ -2235,24 +2290,27 @@ var Credentials = class {
2235
2290
  this.#fileName = options.fileName ?? "credentials.json";
2236
2291
  this.#warn = options.warn ?? ((message) => process.stderr.write(`${message}
2237
2292
  `));
2238
- this.#service = keyringService(options.service, options.configDir, options.isolated);
2293
+ this.#service = options.service;
2294
+ const moved = this.#keyring === systemKeyring && (options.isolated === true || homeIsMoved({ env: this.#env }));
2295
+ this.#temporaryService = moved ? movedRunService(options.service, options.configDir) : void 0;
2239
2296
  }
2240
2297
  read(account) {
2241
2298
  const fromEnv = this.#envVar ? this.#env[this.#envVar]?.trim() : void 0;
2242
2299
  if (fromEnv)
2243
2300
  return { secret: fromEnv, source: "environment" };
2244
2301
  if (this.#storage !== "file") {
2245
- const fromKeyring = this.#tryKeyring(() => this.#keyring.get(this.#service, account));
2302
+ const temporary = this.#temporaryService;
2303
+ const fromKeyring = this.#tryKeyring(() => temporary && this.#keyring.get(temporary, account) || this.#keyring.get(this.#service, account));
2246
2304
  if (fromKeyring)
2247
2305
  return { secret: fromKeyring, source: "keyring" };
2248
2306
  }
2249
- const fromFile = this.#readFile()?.[account]?.secret;
2250
- return fromFile ? { secret: fromFile, source: "file" } : void 0;
2307
+ const secret = this.#readFile()?.[account]?.secret;
2308
+ return secret ? { secret, source: "file" } : void 0;
2251
2309
  }
2252
2310
  write(account, secret) {
2253
2311
  if (this.#storage !== "file") {
2254
2312
  const stored = this.#tryKeyring(() => {
2255
- this.#keyring.set(this.#service, account, secret);
2313
+ this.#keyring.set(this.#temporaryService ?? this.#service, account, secret);
2256
2314
  return true;
2257
2315
  });
2258
2316
  if (stored)
@@ -2268,8 +2326,13 @@ var Credentials = class {
2268
2326
  }
2269
2327
  remove(account) {
2270
2328
  const removed = [];
2271
- if (this.#storage !== "file" && this.#tryKeyring(() => this.#keyring.delete(this.#service, account))) {
2272
- removed.push("keyring");
2329
+ if (this.#storage !== "file") {
2330
+ if (this.#tryKeyring(() => this.#keyring.delete(this.#temporaryService ?? this.#service, account))) {
2331
+ removed.push("keyring");
2332
+ }
2333
+ if (this.#temporaryService) {
2334
+ this.#warn(`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`);
2335
+ }
2273
2336
  }
2274
2337
  const store = this.#readFile();
2275
2338
  if (store?.[account] !== void 0) {
@@ -2280,7 +2343,7 @@ var Credentials = class {
2280
2343
  return removed;
2281
2344
  }
2282
2345
  #path() {
2283
- return join2(this.#configDir, this.#fileName);
2346
+ return join3(this.#configDir, this.#fileName);
2284
2347
  }
2285
2348
  /** `undefined` when the file exists but is not a store: writing would replace what it holds. */
2286
2349
  #readFile() {
@@ -2318,21 +2381,21 @@ var Credentials = class {
2318
2381
  }
2319
2382
  };
2320
2383
 
2321
- // 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
2384
+ // node_modules/.pnpm/@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/time.js
2322
2385
  var abortError = /* @__PURE__ */ __name(() => new DOMException("The operation was aborted.", "AbortError"), "abortError");
2323
- var realSleep = /* @__PURE__ */ __name((ms, signal) => new Promise((resolve, reject) => {
2386
+ var realSleep = /* @__PURE__ */ __name((ms, signal) => new Promise((resolve2, reject) => {
2324
2387
  if (signal?.aborted) {
2325
2388
  reject(abortError());
2326
2389
  return;
2327
2390
  }
2328
- const timer = setTimeout(resolve, ms);
2391
+ const timer = setTimeout(resolve2, ms);
2329
2392
  signal?.addEventListener("abort", () => {
2330
2393
  clearTimeout(timer);
2331
2394
  reject(abortError());
2332
2395
  }, { once: true });
2333
2396
  }), "realSleep");
2334
2397
 
2335
- // 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/deadline.js
2398
+ // node_modules/.pnpm/@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/deadline.js
2336
2399
  var createDeadline = /* @__PURE__ */ __name(({ timeoutMs, signal, sleep = realSleep } = {}) => {
2337
2400
  if (timeoutMs !== void 0 && (!Number.isSafeInteger(timeoutMs) || timeoutMs < 0 || timeoutMs > 2147483647))
2338
2401
  throw new CliError("validation_error", "timeoutMs must be an integer from zero through 2147483647");
@@ -2416,7 +2479,7 @@ var createDeadline = /* @__PURE__ */ __name(({ timeoutMs, signal, sleep = realSl
2416
2479
  };
2417
2480
  }, "createDeadline");
2418
2481
 
2419
- // 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/output-buffer.js
2482
+ // node_modules/.pnpm/@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/output-buffer.js
2420
2483
  var createOutputBuffer = /* @__PURE__ */ __name(({ maxOutputBytes = 4 * 1024 * 1024, fields, format } = {}) => {
2421
2484
  if (!Number.isSafeInteger(maxOutputBytes) || maxOutputBytes < 0)
2422
2485
  throw new CliError("validation_error", "maxOutputBytes must be a nonnegative whole byte count");
@@ -2477,43 +2540,7 @@ var createOutputBuffer = /* @__PURE__ */ __name(({ maxOutputBytes = 4 * 1024 * 1
2477
2540
  };
2478
2541
  }, "createOutputBuffer");
2479
2542
 
2480
- // 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
2481
- import { homedir } from "node:os";
2482
- import { join as join3, posix, win32 } from "node:path";
2483
- var PATH_KINDS = ["config", "state", "cache"];
2484
- var OVERRIDES = { config: "CONFIG_DIR", state: "STATE_DIR", cache: "CACHE_DIR" };
2485
- var overrideName = /* @__PURE__ */ __name((appName, prefix, kind) => `${prefix ?? appName.toUpperCase().replace(/[^A-Z0-9]/g, "_")}_${OVERRIDES[kind]}`, "overrideName");
2486
- var defaultPaths = /* @__PURE__ */ __name(({ appName, env = process.env, platform = process.platform }) => {
2487
- if (platform === "win32") {
2488
- const home2 = env.USERPROFILE || homedir();
2489
- const roaming = env.APPDATA || win32.join(home2, "AppData", "Roaming");
2490
- const local = env.LOCALAPPDATA || win32.join(home2, "AppData", "Local");
2491
- return {
2492
- config: win32.join(roaming, appName, "Config"),
2493
- state: win32.join(local, appName, "Data"),
2494
- cache: win32.join(local, appName, "Cache")
2495
- };
2496
- }
2497
- const home = env.HOME || homedir();
2498
- return {
2499
- config: posix.join(env.XDG_CONFIG_HOME || posix.join(home, ".config"), appName),
2500
- state: posix.join(env.XDG_DATA_HOME || posix.join(home, ".local", "share"), appName),
2501
- cache: posix.join(env.XDG_CACHE_HOME || posix.join(home, ".cache"), appName)
2502
- };
2503
- }, "defaultPaths");
2504
- var resolvePaths = /* @__PURE__ */ __name((options) => {
2505
- const { appName, prefix, env = process.env } = options;
2506
- const base = defaultPaths(options);
2507
- return {
2508
- config: env[overrideName(appName, prefix, "config")] ?? base.config,
2509
- state: env[overrideName(appName, prefix, "state")] ?? base.state,
2510
- cache: env[overrideName(appName, prefix, "cache")] ?? base.cache
2511
- };
2512
- }, "resolvePaths");
2513
- var pathsAreOverridden = /* @__PURE__ */ __name(({ appName, prefix, env = process.env }) => PATH_KINDS.some((kind) => env[overrideName(appName, prefix, kind)] !== void 0), "pathsAreOverridden");
2514
- var configFilePath = /* @__PURE__ */ __name((configDir, fileName = "config.json") => join3(configDir, fileName), "configFilePath");
2515
-
2516
- // 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
2543
+ // node_modules/.pnpm/@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/drain.js
2517
2544
  var waitForDrain = /* @__PURE__ */ __name((stream, signal) => {
2518
2545
  if (signal?.aborted)
2519
2546
  return Promise.reject(signal.reason);
@@ -2521,14 +2548,14 @@ var waitForDrain = /* @__PURE__ */ __name((stream, signal) => {
2521
2548
  return Promise.reject(new Error("output stream closed"));
2522
2549
  if (!stream.writableNeedDrain)
2523
2550
  return Promise.resolve();
2524
- return new Promise((resolve, reject) => {
2551
+ return new Promise((resolve2, reject) => {
2525
2552
  const cleanup = /* @__PURE__ */ __name(() => {
2526
2553
  stream.off("drain", drained).off("error", failed).off("close", closed);
2527
2554
  signal?.removeEventListener("abort", aborted);
2528
2555
  }, "cleanup");
2529
2556
  const drained = /* @__PURE__ */ __name(() => {
2530
2557
  cleanup();
2531
- resolve();
2558
+ resolve2();
2532
2559
  }, "drained");
2533
2560
  const failed = /* @__PURE__ */ __name((error) => {
2534
2561
  cleanup();
@@ -2541,7 +2568,7 @@ var waitForDrain = /* @__PURE__ */ __name((stream, signal) => {
2541
2568
  });
2542
2569
  }, "waitForDrain");
2543
2570
 
2544
- // 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
2571
+ // node_modules/.pnpm/@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/streams.js
2545
2572
  var processStreams = {
2546
2573
  drain: /* @__PURE__ */ __name(async (signal) => {
2547
2574
  await Promise.all([waitForDrain(process.stdout, signal), waitForDrain(process.stderr, signal)]);
@@ -2570,7 +2597,7 @@ var captureStreams = /* @__PURE__ */ __name(() => {
2570
2597
  };
2571
2598
  }, "captureStreams");
2572
2599
 
2573
- // 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
2600
+ // node_modules/.pnpm/@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/pretty.js
2574
2601
  var import_cli_table3 = __toESM(require_cli_table3(), 1);
2575
2602
  import { styleText } from "node:util";
2576
2603
  var renderPretty = /* @__PURE__ */ __name((value, options) => {
@@ -2644,7 +2671,7 @@ var BORDERLESS = {
2644
2671
  middle: ""
2645
2672
  };
2646
2673
 
2647
- // 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
2674
+ // node_modules/.pnpm/@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/renderer.js
2648
2675
  var createRenderer = /* @__PURE__ */ __name(({ format, color, streams = processStreams, quiet = false }) => {
2649
2676
  const mark = /* @__PURE__ */ __name((symbol, message) => format === "pretty" ? `${symbol} ${visibleControls(message)}` : visibleControls(message), "mark");
2650
2677
  const say = /* @__PURE__ */ __name((symbol) => (message) => {
@@ -2681,7 +2708,7 @@ var createRenderer = /* @__PURE__ */ __name(({ format, color, streams = processS
2681
2708
  };
2682
2709
  }, "createRenderer");
2683
2710
 
2684
- // 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
2711
+ // node_modules/.pnpm/@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/batch.js
2685
2712
  var BATCH_LIMITS = Object.freeze({
2686
2713
  requests: 32,
2687
2714
  input_bytes: 262144,
@@ -2808,7 +2835,7 @@ var runBatch = /* @__PURE__ */ __name(async (requests, options = {}) => {
2808
2835
  };
2809
2836
  }, "runBatch");
2810
2837
 
2811
- // 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
2838
+ // node_modules/.pnpm/@wirecat+cli-base@0.65.5_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/logging.js
2812
2839
  import { appendFileSync } from "node:fs";
2813
2840
  var REDACTED_FIELDS = [
2814
2841
  "authorization",
@@ -2925,6 +2952,10 @@ export {
2925
2952
  loadConfigFile,
2926
2953
  saveConfigFile,
2927
2954
  systemKeyring,
2955
+ resolvePaths,
2956
+ pathsAreOverridden,
2957
+ isMovedRun,
2958
+ configFilePath,
2928
2959
  keyringService,
2929
2960
  Credentials,
2930
2961
  realSleep,
@@ -2932,9 +2963,6 @@ export {
2932
2963
  logRecordOf,
2933
2964
  createRecordLog,
2934
2965
  createOutputBuffer,
2935
- resolvePaths,
2936
- pathsAreOverridden,
2937
- configFilePath,
2938
2966
  processStreams,
2939
2967
  captureStreams,
2940
2968
  createRenderer