@wirecat/tg-cli 0.115.0 → 0.117.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 (133) hide show
  1. package/dist/bin/tg.js +2 -2
  2. package/dist/bot/transport.d.ts +11 -9
  3. package/dist/bot/transport.d.ts.map +1 -1
  4. package/dist/bot/transport.js +58 -32
  5. package/dist/bot/transport.js.map +1 -1
  6. package/dist/bundle/{adapter-ODK7R4LY.js → adapter-VNQ72MBK.js} +98 -63
  7. package/dist/bundle/{all-profiles-AQYM65BS.js → all-profiles-3W2UQTCK.js} +10 -9
  8. package/dist/bundle/{anthropic-VBDSVNIM.js → anthropic-DFUW2KTG.js} +6 -6
  9. package/dist/bundle/{app-server-YOIHLBNS.js → app-server-5XJIMLHB.js} +49 -45
  10. package/dist/bundle/{bot-api-TRYLGQKK.js → bot-api-HRRBF3W6.js} +50 -49
  11. package/dist/bundle/{bot-history-7DTJLBBJ.js → bot-history-GBH5XE4N.js} +18 -17
  12. package/dist/bundle/{bun-XIMM6EHD.js → bun-ZMOYGG6F.js} +2 -2
  13. package/dist/bundle/{bun-sqlite-6B3BL5IV.js → bun-sqlite-6FZFMA7K.js} +5 -5
  14. package/dist/bundle/{chunk-DIABP7ZP.js → chunk-2452HCIV.js} +3 -3
  15. package/dist/bundle/{chunk-WMG4IGEB.js → chunk-2XLKZL6K.js} +77 -38
  16. package/dist/bundle/chunk-3GRX7WP6.js +35 -0
  17. package/dist/bundle/{chunk-WINKEV4F.js → chunk-3MQOLYAN.js} +4 -4
  18. package/dist/bundle/{chunk-KDOBY524.js → chunk-3RJYLN5V.js} +133 -27
  19. package/dist/bundle/{chunk-Y3AQHPAJ.js → chunk-4JDGN6OD.js} +1 -1
  20. package/dist/bundle/{chunk-JZXQZW2D.js → chunk-56Q5JV3Z.js} +2 -2
  21. package/dist/bundle/{chunk-XIYRHIBK.js → chunk-66FZBLRJ.js} +13 -13
  22. package/dist/bundle/{chunk-OUX3QMYI.js → chunk-6GFUL4OU.js} +228 -84
  23. package/dist/bundle/{chunk-O7CBGHI7.js → chunk-6HRN7BW6.js} +1 -1
  24. package/dist/bundle/{chunk-TQYMLXDS.js → chunk-7NBUT62O.js} +3 -3
  25. package/dist/bundle/{chunk-A4BQGSKI.js → chunk-7Y3RUEVY.js} +6 -6
  26. package/dist/bundle/chunk-AG6HWPQP.js +64 -0
  27. package/dist/bundle/{chunk-GCFU6WBE.js → chunk-AUBRELCM.js} +3 -3
  28. package/dist/bundle/{chunk-PEKTB3FQ.js → chunk-B2YPB5AE.js} +56 -27
  29. package/dist/bundle/{chunk-CCHHEMPM.js → chunk-BXTDAGM4.js} +3 -2
  30. package/dist/bundle/{chunk-QK6VLKG5.js → chunk-C6TUVV7E.js} +674 -316
  31. package/dist/bundle/{chunk-XY7IGVVS.js → chunk-EA2PGDER.js} +2 -2
  32. package/dist/bundle/{chunk-KIZT2MI6.js → chunk-EL6I4WTB.js} +1 -1
  33. package/dist/bundle/{chunk-77M3IAVU.js → chunk-EPCFXKTX.js} +27 -8
  34. package/dist/bundle/{chunk-L4CMCC3V.js → chunk-EZTYJ43A.js} +4 -2
  35. package/dist/bundle/{chunk-PEJHI7QO.js → chunk-F6KBVIJP.js} +4 -4
  36. package/dist/bundle/{chunk-UY7GJRGY.js → chunk-FAHHERJ7.js} +4 -4
  37. package/dist/bundle/{chunk-WOQGUIXE.js → chunk-FEKXHILZ.js} +1 -1
  38. package/dist/bundle/chunk-G7B5UIE7.js +182 -0
  39. package/dist/bundle/{chunk-RFRI2HFT.js → chunk-GFHNQBD2.js} +1 -1
  40. package/dist/bundle/{chunk-TMATSEP5.js → chunk-HORGORHK.js} +12 -12
  41. package/dist/bundle/{chunk-2TC76TLJ.js → chunk-HWYSRB64.js} +2 -2
  42. package/dist/bundle/{chunk-GX4DMI4H.js → chunk-HZZGOLGP.js} +15 -12
  43. package/dist/bundle/{chunk-MUZ4KYGY.js → chunk-JWIUK3SK.js} +2 -2
  44. package/dist/bundle/{chunk-WDNNN3J4.js → chunk-KVTLT4V7.js} +6 -6
  45. package/dist/bundle/{chunk-UBQ3LOF6.js → chunk-L5WNE4WS.js} +2 -2
  46. package/dist/bundle/{chunk-OMP6ALBT.js → chunk-M7V5XRM6.js} +3 -3
  47. package/dist/bundle/{chunk-LUIPXRKN.js → chunk-MLHKQDUN.js} +647 -129
  48. package/dist/bundle/{chunk-VQCWVZWG.js → chunk-MP7M6FFU.js} +6 -6
  49. package/dist/bundle/{chunk-5ROWSRK7.js → chunk-NUCDEOFC.js} +2 -2
  50. package/dist/bundle/{chunk-ILHTNOIV.js → chunk-P3ASN72F.js} +1 -1
  51. package/dist/bundle/{chunk-VVKEWWSO.js → chunk-PTIB7NEE.js} +1 -1
  52. package/dist/bundle/{chunk-D4E345BC.js → chunk-Q7O4CQDO.js} +4 -2
  53. package/dist/bundle/{chunk-EW3XTUPB.js → chunk-QOGYHU3Q.js} +4 -4
  54. package/dist/bundle/{chunk-BEQPZA3S.js → chunk-RDH2QBUE.js} +3 -3
  55. package/dist/bundle/{chunk-AVWPMJ6E.js → chunk-RDSLSV4M.js} +2 -2
  56. package/dist/bundle/{chunk-YCUQKFGD.js → chunk-SQXB5ZUZ.js} +3 -3
  57. package/dist/bundle/{chunk-RHUNMU4Q.js → chunk-TFBHDIGY.js} +4 -4
  58. package/dist/bundle/{chunk-OSP335AJ.js → chunk-TG6ZYL4B.js} +8 -8
  59. package/dist/bundle/{chunk-IUDIRZVU.js → chunk-UGPZCNYC.js} +991 -536
  60. package/dist/bundle/{chunk-AICS3TSF.js → chunk-UYK5AXSW.js} +4 -4
  61. package/dist/bundle/{chunk-PZAEI4NM.js → chunk-V2T7NYNU.js} +55 -46
  62. package/dist/bundle/{chunk-HZKWB6WS.js → chunk-V47NPSSV.js} +28 -28
  63. package/dist/bundle/{chunk-U67TSAAO.js → chunk-VMCQGZIA.js} +1893 -840
  64. package/dist/bundle/{chunk-CNO3R4O4.js → chunk-VRDVXXXD.js} +8 -8
  65. package/dist/bundle/{chunk-PQLBPYJR.js → chunk-VW6BF6M7.js} +1 -1
  66. package/dist/bundle/{chunk-M7B5IMH3.js → chunk-X3CD475M.js} +1336 -366
  67. package/dist/bundle/chunk-XW5C4TI7.js +91 -0
  68. package/dist/bundle/{chunk-NTW5ZE47.js → chunk-YHZFGUAP.js} +39 -33
  69. package/dist/bundle/{chunk-BIEBJLYO.js → chunk-YIXXH74F.js} +2 -2
  70. package/dist/bundle/{chunk-BPPRR7TV.js → chunk-Z4QKLHJW.js} +15587 -1637
  71. package/dist/bundle/{chunk-POKTQZOM.js → chunk-ZPILMEFY.js} +12 -89
  72. package/dist/bundle/command-contract-KMMHARMR.js +33 -0
  73. package/dist/bundle/{decode-2GATBZGH.js → decode-YMSOY2AY.js} +5 -5
  74. package/dist/bundle/{dispatch-MJMW7WDH.js → dispatch-OP27MWX5.js} +8 -8
  75. package/dist/bundle/{echarts-GKEZEAL7.js → echarts-7XS55TQY.js} +2 -2
  76. package/dist/bundle/{embed-TBQPLA4Y.js → embed-QTOE7NN3.js} +6 -6
  77. package/dist/bundle/{embedder-B5DTNCRO.js → embedder-KBBRYSNH.js} +9 -9
  78. package/dist/bundle/{entry-A6DEW2TD.js → entry-HGEUYYMX.js} +7 -7
  79. package/dist/bundle/{failure-TLF3SISS.js → failure-4JUQFXJT.js} +2 -2
  80. package/dist/bundle/{first-run-3N5AABEY.js → first-run-CSGMEJXY.js} +11 -11
  81. package/dist/bundle/first-screen-K2PBNJNE.js +31 -0
  82. package/dist/bundle/{instructions-P5E34PQR.js → instructions-S6ZXCTFH.js} +1 -1
  83. package/dist/bundle/{mcp-MNI62HHE.js → mcp-M4QN2E7R.js} +2 -2
  84. package/dist/bundle/{node-GKPRXS5Y.js → node-LCIUWXXG.js} +2 -2
  85. package/dist/bundle/{node-sqlite-GIDPALK3.js → node-sqlite-HL4WY4N2.js} +6 -6
  86. package/dist/bundle/{oauth-C57W4IMD.js → oauth-U4KIMDKG.js} +7 -7
  87. package/dist/bundle/{open-E6Q4WRPU.js → open-EH7OS7M7.js} +5 -5
  88. package/dist/bundle/{openai-5WMXY2KP.js → openai-W5TB3NA5.js} +14 -14
  89. package/dist/bundle/{process-U2P5Z6UF.js → process-3CVLTCTA.js} +1 -1
  90. package/dist/bundle/{program-FEUDU6GF.js → program-LOIZTK2P.js} +58 -50
  91. package/dist/bundle/{prompt-4NGAZGHE.js → prompt-IDNH7N3W.js} +5 -5
  92. package/dist/bundle/{proxy-transport-MGCJ7JAW.js → proxy-transport-4DPZB2W2.js} +5 -5
  93. package/dist/bundle/{recognize-EUHRBA7V.js → recognize-G5EWYXIF.js} +4 -4
  94. package/dist/bundle/{remote-3JHLB2FV.js → remote-4XTBZVZD.js} +7 -7
  95. package/dist/bundle/{rerank-ZZ45SZPC.js → rerank-OWSTDLZN.js} +7 -7
  96. package/dist/bundle/{serve-XOGX5FC5.js → serve-YCPSEWP3.js} +9 -9
  97. package/dist/bundle/server-KELKX6S3.js +60 -0
  98. package/dist/bundle/{server-I6O72XP5.js → server-ODG4A2KK.js} +35 -34
  99. package/dist/bundle/{state-BIUYTGH6.js → state-OL2235G5.js} +6 -6
  100. package/dist/bundle/{store-FOJFYOMR.js → store-5AACYNDM.js} +17 -12
  101. package/dist/bundle/store-maintenance-command-3J7WZYVN.js +50 -0
  102. package/dist/bundle/tg.js +13 -13
  103. package/dist/commands/session.d.ts.map +1 -1
  104. package/dist/commands/session.js +7 -0
  105. package/dist/commands/session.js.map +1 -1
  106. package/dist/telegram/account.d.ts.map +1 -1
  107. package/dist/telegram/account.js +4 -1
  108. package/dist/telegram/account.js.map +1 -1
  109. package/dist/telegram/errors.d.ts.map +1 -1
  110. package/dist/telegram/errors.js +2 -1
  111. package/dist/telegram/errors.js.map +1 -1
  112. package/dist/telegram/feature.d.ts +4 -1
  113. package/dist/telegram/feature.d.ts.map +1 -1
  114. package/dist/telegram/feature.js +5 -2
  115. package/dist/telegram/feature.js.map +1 -1
  116. package/dist/telegram/login.d.ts +2 -0
  117. package/dist/telegram/login.d.ts.map +1 -1
  118. package/dist/telegram/login.js +31 -2
  119. package/dist/telegram/login.js.map +1 -1
  120. package/dist/telegram/sending.d.ts.map +1 -1
  121. package/dist/telegram/sending.js +24 -10
  122. package/dist/telegram/sending.js.map +1 -1
  123. package/dist/version.d.ts +1 -1
  124. package/dist/version.js +1 -1
  125. package/package.json +3 -3
  126. package/dist/bundle/chunk-63YKD7YA.js +0 -18
  127. package/dist/bundle/chunk-GWDMKEDY.js +0 -48
  128. package/dist/bundle/chunk-WMRFAK5B.js +0 -132
  129. package/dist/bundle/command-contract-YF4KGFXC.js +0 -32
  130. package/dist/bundle/first-screen-HANARM67.js +0 -30
  131. package/dist/bundle/server-DRE5MJ76.js +0 -59
  132. package/dist/bundle/store-maintenance-command-YKV2C34N.js +0 -49
  133. /package/dist/bundle/{chunk-NUN6OGOV.js → chunk-VOXIGICJ.js} +0 -0
@@ -29,7 +29,7 @@ import {
29
29
  agentOf,
30
30
  clientHash,
31
31
  currentCaller
32
- } from "./chunk-POKTQZOM.js";
32
+ } from "./chunk-ZPILMEFY.js";
33
33
  import {
34
34
  __name
35
35
  } from "./chunk-ZVVMGPBJ.js";
@@ -541,7 +541,7 @@ function toError(value) {
541
541
  }
542
542
  __name(toError, "toError");
543
543
 
544
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/mcp/caller.js
544
+ // node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/mcp/caller.js
545
545
  var callingAgent = /* @__PURE__ */ __name((fallback, caller = currentCaller()) => {
546
546
  const client = caller?.agent?.client?.name;
547
547
  if (client && client !== "unknown")
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/background/processes.js
7
+ // node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/background/processes.js
8
8
  import { execFileSync } from "node:child_process";
9
9
  import { readdirSync, readFileSync, readlinkSync } from "node:fs";
10
10
  var alive = /* @__PURE__ */ __name((pid) => {
@@ -4,12 +4,12 @@ import {
4
4
  errorCodes,
5
5
  isCliError,
6
6
  visibleControls
7
- } from "./chunk-CCHHEMPM.js";
7
+ } from "./chunk-BXTDAGM4.js";
8
8
  import {
9
9
  __name
10
10
  } from "./chunk-ZVVMGPBJ.js";
11
11
 
12
- // node_modules/.pnpm/@wirecat+cli-base@0.75.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
12
+ // node_modules/.pnpm/@wirecat+cli-base@0.80.8_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
13
13
  var EXIT_CODES = {
14
14
  validation_error: 2,
15
15
  configuration_error: 3,
@@ -24,6 +24,7 @@ var EXIT_CODES = {
24
24
  provider_unavailable: 12,
25
25
  invalid_response: 13,
26
26
  outcome_unknown: 14,
27
+ conflict: 15,
27
28
  cancelled: 130
28
29
  };
29
30
  var exitCodeFor = /* @__PURE__ */ __name((code) => EXIT_CODES[code], "exitCodeFor");
@@ -1280,7 +1281,7 @@ function unwrap(schema) {
1280
1281
  }
1281
1282
  __name(unwrap, "unwrap");
1282
1283
 
1283
- // node_modules/.pnpm/@wirecat+cli-base@0.75.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
1284
+ // node_modules/.pnpm/@wirecat+cli-base@0.80.8_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
1284
1285
  var EFFECT_LEVELS = ["none", "read", "write"];
1285
1286
  var effectsSchema = strictObject({
1286
1287
  remote: picklist(EFFECT_LEVELS),
@@ -1917,7 +1918,7 @@ function toStandardJsonSchema(schema) {
1917
1918
  }
1918
1919
  __name(toStandardJsonSchema, "toStandardJsonSchema");
1919
1920
 
1920
- // node_modules/.pnpm/@wirecat+cli-base@0.75.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
1921
+ // node_modules/.pnpm/@wirecat+cli-base@0.80.8_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
1921
1922
  var word = pipe(string(), regex(/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/, "a lower-case word, words joined by -"));
1922
1923
  var SNAKE_CASE = /^[a-z][a-z0-9]*(_[a-z0-9]+)*$/;
1923
1924
  var text = pipe(string(), regex(/\S/, "must not be empty"));
@@ -1959,7 +1960,7 @@ var fill = /* @__PURE__ */ __name((template, values) => template.replace(PLACEHO
1959
1960
  return String(value);
1960
1961
  }), "fill");
1961
1962
 
1962
- // node_modules/.pnpm/@wirecat+cli-base@0.75.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
1963
+ // node_modules/.pnpm/@wirecat+cli-base@0.80.8_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
1963
1964
  var MAX_NEXT_STEPS = 2;
1964
1965
  var COMPACT_FLAG = "--compact";
1965
1966
  var isoTime = pipe(string(), isoTimestamp("an ISO 8601 time in UTC"), endsWith("Z", "an ISO 8601 time in UTC, ending in `Z`"));
@@ -2035,6 +2036,17 @@ var metaSchema = strictObject({
2035
2036
  now_local: optional(localTime),
2036
2037
  window: optional(strictObject({ since: optional(isoTime), until: optional(isoTime) }))
2037
2038
  });
2039
+ var offsetOf = /* @__PURE__ */ __name((at, zone) => {
2040
+ const name = new Intl.DateTimeFormat("en-US", { timeZone: zone, timeZoneName: "longOffset" }).formatToParts(at).find((part) => part.type === "timeZoneName")?.value ?? "GMT";
2041
+ return name === "GMT" ? "+00:00" : name.slice(3);
2042
+ }, "offsetOf");
2043
+ var clockMeta = /* @__PURE__ */ __name((at, zone) => {
2044
+ const offset = offsetOf(at, zone);
2045
+ const sign = offset.startsWith("-") ? -1 : 1;
2046
+ const [hours = 0, minutes = 0] = offset.slice(1).split(":").map(Number);
2047
+ const wall = new Date(at + sign * (hours * 60 + minutes) * 6e4).toISOString().slice(0, -1);
2048
+ return { now: new Date(at).toISOString(), now_local: `${wall}${offset}`, timezone: zone };
2049
+ }, "clockMeta");
2038
2050
  var nextSteps = optional(pipe(array(nextStepSchema), maxLength(MAX_NEXT_STEPS)));
2039
2051
  var listEnvelopeSchema = /* @__PURE__ */ __name((item) => strictObject({
2040
2052
  items: array(item),
@@ -2060,7 +2072,7 @@ var jsonlOf = /* @__PURE__ */ __name(({ items, page, meta }) => [
2060
2072
  JSON.stringify({ type: "end", complete: meta.complete, ...meta.issues ? { issues: meta.issues } : {}, page })
2061
2073
  ].join("\n"), "jsonlOf");
2062
2074
 
2063
- // node_modules/.pnpm/@wirecat+cli-base@0.75.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
2075
+ // node_modules/.pnpm/@wirecat+cli-base@0.80.8_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
2064
2076
  var CRASH_CODE = "internal_error";
2065
2077
  var CRASH_REASON = "command.crashed";
2066
2078
  var errorObjectSchema = strictObject({
@@ -2143,11 +2155,17 @@ var BASE_REASONS = defineReasons([
2143
2155
  details: []
2144
2156
  },
2145
2157
  { reason: "outcome.unknown", code: "outcome_unknown", message: "it is not known whether it worked", details: [] },
2158
+ {
2159
+ reason: "write.conflict",
2160
+ code: "conflict",
2161
+ message: "it changed since it was read; read it again",
2162
+ details: []
2163
+ },
2146
2164
  { reason: "command.cancelled", code: "cancelled", message: "the command was cancelled", details: [] },
2147
2165
  { reason: CRASH_REASON, code: CRASH_CODE, message: "the command failed; this is a bug", details: [] }
2148
2166
  ]);
2149
2167
 
2150
- // node_modules/.pnpm/@wirecat+cli-base@0.75.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
2168
+ // node_modules/.pnpm/@wirecat+cli-base@0.80.8_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
2151
2169
  var SAME_COMMAND = "*";
2152
2170
  var commandPath = pipe(string(), regex(/^[a-z][a-z0-9-]*( [a-z][a-z0-9-]*)*$/, "a command path such as `messages sync`"));
2153
2171
  var stepSchema = union([
@@ -2226,7 +2244,7 @@ var STEPS = defineSteps([
2226
2244
  }
2227
2245
  ]);
2228
2246
 
2229
- // node_modules/.pnpm/@wirecat+cli-base@0.75.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
2247
+ // node_modules/.pnpm/@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/failure.js
2230
2248
  var recognise = /* @__PURE__ */ __name((failure) => {
2231
2249
  if (isCliError(failure))
2232
2250
  return failure;
@@ -2439,6 +2457,7 @@ export {
2439
2457
  isoTime,
2440
2458
  reference,
2441
2459
  pageSchema,
2460
+ clockMeta,
2442
2461
  listEnvelopeSchema,
2443
2462
  itemEnvelopeSchema,
2444
2463
  jsonlOf,
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/store/driver.js
7
+ // node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/store/driver.js
8
8
  var TIME_LIMIT_FUNCTION = "wc_time_limit";
9
9
  var TimeLimitReached = class extends Error {
10
10
  static {
@@ -25,10 +25,12 @@ var PRAGMAS = `
25
25
  PRAGMA journal_mode = WAL;
26
26
  PRAGMA foreign_keys = ON;
27
27
  `;
28
+ var isQueryOnly = /* @__PURE__ */ __name((database) => Number(Object.values(database.prepare("PRAGMA query_only").get() ?? {})[0]) === 1, "isQueryOnly");
28
29
 
29
30
  export {
30
31
  TIME_LIMIT_FUNCTION,
31
32
  TimeLimitReached,
32
33
  beforeTimeLimit,
33
- PRAGMAS
34
+ PRAGMAS,
35
+ isQueryOnly
34
36
  };
@@ -2,15 +2,15 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  wirecatDirectory
5
- } from "./chunk-63YKD7YA.js";
5
+ } from "./chunk-3GRX7WP6.js";
6
6
  import {
7
7
  CliError
8
- } from "./chunk-CCHHEMPM.js";
8
+ } from "./chunk-BXTDAGM4.js";
9
9
  import {
10
10
  __name
11
11
  } from "./chunk-ZVVMGPBJ.js";
12
12
 
13
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/speech/models.js
13
+ // node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/speech/models.js
14
14
  var huggingFace = /* @__PURE__ */ __name((repository, commit) => (name) => `https://huggingface.co/csukuangfj/${repository}/resolve/${commit}/${name}`, "huggingFace");
15
15
  var gigaam = huggingFace("sherpa-onnx-nemo-transducer-punct-giga-am-v3-russian-2025-12-16", "a6039be7cee829a9044a69ac0ebaf1c191217c97");
16
16
  var gigaamCtc = huggingFace("sherpa-onnx-nemo-ctc-punct-giga-am-v3-russian-2025-12-16", "4fb5407ff028a69fec516cdf4c10fac9ddea7c16");
@@ -137,7 +137,7 @@ var speechModel = /* @__PURE__ */ __name((id) => {
137
137
  return model;
138
138
  }, "speechModel");
139
139
 
140
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/speech/install.js
140
+ // node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/speech/install.js
141
141
  import { createHash, randomUUID } from "node:crypto";
142
142
  import { createReadStream, createWriteStream, mkdirSync, statSync } from "node:fs";
143
143
  import { rename, rm } from "node:fs/promises";
@@ -5,15 +5,15 @@ import {
5
5
  readLock,
6
6
  releaseLock,
7
7
  takeLock
8
- } from "./chunk-GCFU6WBE.js";
8
+ } from "./chunk-AUBRELCM.js";
9
9
  import {
10
10
  __name
11
11
  } from "./chunk-ZVVMGPBJ.js";
12
12
 
13
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/mcp/http/state.js
13
+ // node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/mcp/http/state.js
14
14
  import { existsSync as existsSync2, readFileSync as readFileSync2 } from "node:fs";
15
15
 
16
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/mcp/http/activity.js
16
+ // node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/mcp/http/activity.js
17
17
  import { randomBytes } from "node:crypto";
18
18
  import { chmodSync, existsSync, mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
19
19
  import { dirname } from "node:path";
@@ -86,7 +86,7 @@ var activityRecorder = /* @__PURE__ */ __name((path, now = Date.now) => {
86
86
  };
87
87
  }, "activityRecorder");
88
88
 
89
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/mcp/http/state.js
89
+ // node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/mcp/http/state.js
90
90
  var ACCESS_SECONDS = 60 * 60;
91
91
  var REFRESH_SECONDS = 30 * 24 * 60 * 60;
92
92
  var readStored = /* @__PURE__ */ __name((path) => existsSync2(path) ? JSON.parse(readFileSync2(path, "utf8")) : { clients: [], tokens: [] }, "readStored");
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/mcp/bot/instructions.js
7
+ // node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/mcp/bot/instructions.js
8
8
  var botInstructions = /* @__PURE__ */ __name(({ command, name, profile, writes, skill }) => [
9
9
  `The owner's ${name} bot "${profile}", through the official Bot API \u2014 not the owner's personal account. What it writes, people see as the bot.`,
10
10
  "Use these tools to read the chats this bot is in, find a message or a person, and \u2014 when the profile allows \u2014 write as the bot.",
@@ -0,0 +1,182 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ openSqlite
5
+ } from "./chunk-Z4QKLHJW.js";
6
+ import {
7
+ __name
8
+ } from "./chunk-ZVVMGPBJ.js";
9
+
10
+ // node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/store/damage.js
11
+ var DERIVED = /* @__PURE__ */ new Set(["mentions", "involvements", "embeddings"]);
12
+ var named = /* @__PURE__ */ __name((tables) => tables.length <= 5 ? tables.join(", ") : `${tables.slice(0, 5).join(", ")} and ${tables.length - 5} more`, "named");
13
+ var isDerivedTable = /* @__PURE__ */ __name((table, searchIndexes) => DERIVED.has(table) || table.startsWith("vector_index_") || searchIndexes.some((index) => table === index || table.startsWith(`${index}_`)), "isDerivedTable");
14
+ var WIRECAT_UNITS = ["memo-*", "mail-*", "tg-*", "max-*", "wirecat-*"];
15
+ var explainDamage = /* @__PURE__ */ __name((health, command) => {
16
+ if (health.ok)
17
+ return null;
18
+ const indexNames = (health.searchIndexes ?? []).map((index) => index.name);
19
+ const badIndexes = (health.searchIndexes ?? []).filter((index) => !index.ok).map((index) => index.name);
20
+ const tables = (health.damagedTables ?? []).map((one) => one.table).filter((table) => table !== null);
21
+ const sources = tables.filter((table) => !isDerivedTable(table, indexNames));
22
+ const derived = [.../* @__PURE__ */ new Set([...tables.filter((table) => isDerivedTable(table, indexNames)), ...badIndexes])];
23
+ const unopened = health.error !== void 0;
24
+ const what = unopened ? `the store file cannot be opened: ${health.error}` : health.checked === "quick" ? "the store file's header or schema is damaged" : `the store file is damaged: ${health.problems ?? 0} problems` + (sources.length ? ` in the data of ${named(sources)}` : "") + (derived.length ? `${sources.length ? ", and" : " in"} the search data of ${named(derived)}` : "");
25
+ const impact = [
26
+ ...sources.length ? [`some rows of ${named(sources)} cannot be read; a recovery keeps every row it can read and names the rest`] : [],
27
+ ...derived.length ? [`searches may miss results or fail; ${named(derived)} hold nothing that is not elsewhere, and are rebuilt`] : [],
28
+ "reads that do not touch a damaged page work; a write that touches one fails until the store is recovered"
29
+ ];
30
+ return {
31
+ what,
32
+ causes: [
33
+ "the computer lost power or crashed, or the disk filled up, while a tool was writing",
34
+ "the file was copied, restored or synced while a tool had it open, or it sits in a synced or network folder",
35
+ "a fault of the disk itself"
36
+ ],
37
+ investigate: [
38
+ `journalctl --user ${WIRECAT_UNITS.map((unit) => `-u '${unit}'`).join(" ")} --since -14d | grep -i -e malformed -e corrupt -e 'disk full'`,
39
+ "journalctl -k --since -14d | grep -i -e 'I/O error' -e nvme -e ata",
40
+ `df -h ${health.path.replace(/\/[^/]*$/, "")}`,
41
+ ...health.checked === "quick" ? [`${command} store recover`] : []
42
+ ],
43
+ impact,
44
+ externalUnaffected: "only this computer's copy is damaged: Telegram, MAX, the mail servers and Google Drive keep their own data, so whatever is lost here can be fetched again by a sync",
45
+ steps: [
46
+ "stop every timer and server of the WireCat tools; `store recover run` lists the ones still running",
47
+ `${command} store recover run`,
48
+ "run the fetch commands it prints, then start the timers again"
49
+ ]
50
+ };
51
+ }, "explainDamage");
52
+
53
+ // node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/store/health.js
54
+ import { existsSync, statSync } from "node:fs";
55
+ var QUICK_CHECK_LIMIT = 1e4;
56
+ var QUICK_HEALTH_CHECKS = "the file header, its size against its page count, and the schema's own pages";
57
+ var FTS5 = /^\s*CREATE\s+VIRTUAL\s+TABLE\s+\S+\s+USING\s+fts5\s*\(/i;
58
+ var fts5Tables = /* @__PURE__ */ __name((database) => database.prepare("SELECT name, sql FROM sqlite_master WHERE type = 'table' AND sql LIKE 'CREATE VIRTUAL TABLE%' ORDER BY name").all().filter((row) => FTS5.test(String(row.sql))).map((row) => {
59
+ const sql = String(row.sql);
60
+ return { name: String(row.name), sql, external: /content\s*=\s*'[^']+'/i.test(sql) };
61
+ }), "fts5Tables");
62
+ var messageOf = /* @__PURE__ */ __name((error) => error instanceof Error ? error.message : String(error), "messageOf");
63
+ var bytesOf = /* @__PURE__ */ __name((path) => statSync(path, { throwIfNoEntry: false })?.size ?? 0, "bytesOf");
64
+ var damagedTables = /* @__PURE__ */ __name((database, lines) => {
65
+ const roots = new Map(database.prepare("SELECT rootpage, tbl_name FROM sqlite_master WHERE rootpage > 0").all().map((row) => [Number(row.rootpage), String(row.tbl_name)]));
66
+ const owners = new Map(database.prepare("SELECT name, tbl_name FROM sqlite_master WHERE type = 'index'").all().map((row) => [String(row.name), String(row.tbl_name)]));
67
+ const virtual = database.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND sql LIKE 'CREATE VIRTUAL TABLE%'").all().map((row) => String(row.name));
68
+ const ownerOf = /* @__PURE__ */ __name((table) => table === null ? null : virtual.find((name) => table.startsWith(`${name}_`)) ?? table, "ownerOf");
69
+ const tables = /* @__PURE__ */ new Map();
70
+ for (const raw of lines) {
71
+ const line = raw.replace(/^\*\*\* in database \w+ \*\*\*\s*/, "");
72
+ const tree = /^Tree (\d+) /.exec(line);
73
+ const column = /value in (\w+)\.\w+/.exec(line) ?? /^table (\w+): /.exec(line);
74
+ const index = /index (\w+)/.exec(line)?.[1];
75
+ const table = ownerOf(tree ? roots.get(Number(tree[1])) ?? null : column ? column[1] ?? null : index ? owners.get(index) ?? null : null);
76
+ const known = tables.get(table);
77
+ if (known)
78
+ known.problems += 1;
79
+ else
80
+ tables.set(table, { table, problems: 1, sample: line.slice(0, 200) });
81
+ }
82
+ return [...tables.values()].sort((a, b) => b.problems - a.problems);
83
+ }, "damagedTables");
84
+ var searchIndexHealth = /* @__PURE__ */ __name((database) => fts5Tables(database).map(({ name }) => {
85
+ try {
86
+ database.exec("BEGIN");
87
+ try {
88
+ database.exec(`INSERT INTO "${name}" ("${name}", rank) VALUES ('integrity-check', 0)`);
89
+ } finally {
90
+ database.exec("ROLLBACK");
91
+ }
92
+ return { name, ok: true };
93
+ } catch (error) {
94
+ return { name, ok: false, error: messageOf(error) };
95
+ }
96
+ }), "searchIndexHealth");
97
+ var pragmaLines = /* @__PURE__ */ __name((database, sql) => database.prepare(sql).all().flatMap((row) => String(Object.values(row)[0]).split("\n")), "pragmaLines");
98
+ var checkLines = /* @__PURE__ */ __name((database) => {
99
+ try {
100
+ return pragmaLines(database, `PRAGMA quick_check(${QUICK_CHECK_LIMIT})`);
101
+ } catch {
102
+ const tables = database.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND rootpage > 0 ORDER BY name").all().map((row) => String(row.name));
103
+ return tables.flatMap((table) => {
104
+ try {
105
+ return pragmaLines(database, `PRAGMA quick_check("${table}")`).filter((line) => line !== "ok");
106
+ } catch (error) {
107
+ return [`table ${table}: ${messageOf(error)}`];
108
+ }
109
+ });
110
+ }
111
+ }, "checkLines");
112
+ var quickHealth = /* @__PURE__ */ __name((database, path) => {
113
+ const pragma = /* @__PURE__ */ __name((name) => Number(Object.values(database.prepare(`PRAGMA ${name}`).get() ?? {})[0] ?? 0), "pragma");
114
+ const file = {
115
+ bytes: bytesOf(path),
116
+ pages: pragma("page_count"),
117
+ pageSize: pragma("page_size"),
118
+ freePages: pragma("freelist_count")
119
+ };
120
+ const schema = database.prepare("PRAGMA quick_check('sqlite_schema')").all().map((row) => String(Object.values(row)[0]));
121
+ const walFrames = existsSync(`${path}-wal`) && bytesOf(`${path}-wal`) > 0;
122
+ const sized = walFrames || file.bytes === file.pages * file.pageSize;
123
+ const problems = [
124
+ ...schema.length === 1 && schema[0] === "ok" ? [] : schema,
125
+ ...sized ? [] : [`the file holds ${file.bytes} bytes, its header says ${file.pages * file.pageSize}`]
126
+ ];
127
+ return { file, problems };
128
+ }, "quickHealth");
129
+ var storeHealth = /* @__PURE__ */ __name(async (path, { deep = false } = {}) => {
130
+ const started = Date.now();
131
+ const checked = deep ? "deep" : "quick";
132
+ const done = /* @__PURE__ */ __name((health) => ({
133
+ path,
134
+ checked,
135
+ ...health,
136
+ ms: Date.now() - started
137
+ }), "done");
138
+ let database;
139
+ try {
140
+ database = (await openSqlite(path, { readOnly: !deep })).database;
141
+ } catch (error) {
142
+ return done({ ok: false, error: messageOf(error) });
143
+ }
144
+ try {
145
+ const { file, problems } = quickHealth(database, path);
146
+ if (!deep) {
147
+ return done({
148
+ ok: problems.length === 0,
149
+ file,
150
+ ...problems.length ? {
151
+ problems: problems.length,
152
+ damagedTables: [{ table: null, problems: problems.length, sample: problems[0] }]
153
+ } : {}
154
+ });
155
+ }
156
+ database.exec("PRAGMA busy_timeout = 30000");
157
+ const lines = checkLines(database);
158
+ const pagesOk = lines.length === 1 && lines[0] === "ok";
159
+ const indexes = searchIndexHealth(database);
160
+ return done({
161
+ ok: pagesOk && problems.length === 0 && indexes.every((index) => index.ok),
162
+ file,
163
+ problems: pagesOk ? 0 : lines.length,
164
+ damagedTables: pagesOk ? [] : damagedTables(database, lines),
165
+ searchIndexes: indexes
166
+ });
167
+ } catch (error) {
168
+ return done({ ok: false, error: messageOf(error) });
169
+ } finally {
170
+ database.close();
171
+ }
172
+ }, "storeHealth");
173
+
174
+ // node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/snapshot.js
175
+ var MAX_BYTES = 16 * 1024 * 1024;
176
+
177
+ export {
178
+ explainDamage,
179
+ QUICK_HEALTH_CHECKS,
180
+ fts5Tables,
181
+ storeHealth
182
+ };
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/mcp/instructions.js
7
+ // node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/mcp/instructions.js
8
8
  var instructions = /* @__PURE__ */ __name(({ command, name, profile, writes, skill }) => {
9
9
  const all = typeof profile !== "string";
10
10
  const offers = /* @__PURE__ */ __name((key) => all || writes.includes(key), "offers");
@@ -2,31 +2,31 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  updateCommand
5
- } from "./chunk-WINKEV4F.js";
5
+ } from "./chunk-3MQOLYAN.js";
6
6
  import {
7
7
  QUESTIONS,
8
8
  readSetupAnswers,
9
9
  unanswered,
10
10
  writeSetupAnswers
11
- } from "./chunk-OMP6ALBT.js";
11
+ } from "./chunk-M7V5XRM6.js";
12
12
  import {
13
13
  DEFAULT_STEMMERS,
14
14
  LANGUAGES
15
- } from "./chunk-OSP335AJ.js";
15
+ } from "./chunk-TG6ZYL4B.js";
16
16
  import {
17
17
  sharedConfigPath
18
- } from "./chunk-A4BQGSKI.js";
18
+ } from "./chunk-7Y3RUEVY.js";
19
19
  import {
20
20
  storePath
21
- } from "./chunk-63YKD7YA.js";
21
+ } from "./chunk-3GRX7WP6.js";
22
22
  import {
23
23
  installerOf
24
- } from "./chunk-ILHTNOIV.js";
24
+ } from "./chunk-P3ASN72F.js";
25
25
  import {
26
26
  __name
27
27
  } from "./chunk-ZVVMGPBJ.js";
28
28
 
29
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/cli/first-run.js
29
+ // node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/cli/first-run.js
30
30
  import { spawnSync } from "node:child_process";
31
31
  import { accessSync, constants, realpathSync } from "node:fs";
32
32
  import { delimiter, join } from "node:path";
@@ -84,7 +84,7 @@ var suggested = /* @__PURE__ */ __name((env, contentLanguages) => {
84
84
  return (own.length ? own : LANGUAGES.filter(({ code }) => code === "en" || code === system)).map(({ name }) => name);
85
85
  }, "suggested");
86
86
  var askLanguages = /* @__PURE__ */ __name(async ({ command, env, io, contentLanguages }) => {
87
- const { openStore } = await import("./store-FOJFYOMR.js");
87
+ const { openStore } = await import("./store-5AACYNDM.js");
88
88
  const store = await openStore({ env });
89
89
  let rebuild = false;
90
90
  try {
@@ -113,8 +113,8 @@ var askLanguages = /* @__PURE__ */ __name(async ({ command, env, io, contentLang
113
113
  if (!rebuild)
114
114
  return;
115
115
  const [{ openCache }, { buildStems }] = await Promise.all([
116
- import("./open-E6Q4WRPU.js"),
117
- import("./store-maintenance-command-YKV2C34N.js")
116
+ import("./open-EH7OS7M7.js"),
117
+ import("./store-maintenance-command-3J7WZYVN.js")
118
118
  ]);
119
119
  const database = await openCache(storePath(env));
120
120
  try {
@@ -126,7 +126,7 @@ var askLanguages = /* @__PURE__ */ __name(async ({ command, env, io, contentLang
126
126
  var askTools = /* @__PURE__ */ __name(async (run) => {
127
127
  const { command, env, io } = run;
128
128
  const installed = run.installed ?? ((name) => onPath(name, env));
129
- const { WIRECAT_TOOLS } = await import("./first-screen-HANARM67.js");
129
+ const { WIRECAT_TOOLS } = await import("./first-screen-K2PBNJNE.js");
130
130
  const others = WIRECAT_TOOLS.filter((tool) => tool.command !== command);
131
131
  const missing = others.filter((tool) => !installed(tool.command));
132
132
  io.say("Other WireCat tools \u2014 they share this store, so one search finds everything:");
@@ -199,7 +199,7 @@ var setupAtStart = /* @__PURE__ */ __name(async (start) => {
199
199
  contentLanguages: start.contentLanguages,
200
200
  all: start.path[0] === "setup",
201
201
  io: {
202
- ask: /* @__PURE__ */ __name(async (prompt) => (await import("./prompt-4NGAZGHE.js")).readSecret(prompt, { input, echo: true }), "ask"),
202
+ ask: /* @__PURE__ */ __name(async (prompt) => (await import("./prompt-IDNH7N3W.js")).readSecret(prompt, { input, echo: true }), "ask"),
203
203
  say: /* @__PURE__ */ __name((text) => process.stderr.write(`${text}
204
204
  `), "say")
205
205
  }
@@ -8,12 +8,12 @@ import {
8
8
  ACCESS_SECONDS,
9
9
  REFRESH_SECONDS,
10
10
  readStored
11
- } from "./chunk-UY7GJRGY.js";
11
+ } from "./chunk-FAHHERJ7.js";
12
12
  import {
13
13
  __name
14
14
  } from "./chunk-ZVVMGPBJ.js";
15
15
 
16
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/mcp/http/oauth.js
16
+ // node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/mcp/http/oauth.js
17
17
  import { createHash, randomBytes, randomInt, timingSafeEqual } from "node:crypto";
18
18
  import { chmodSync, mkdirSync, renameSync, rmSync, writeFileSync } from "node:fs";
19
19
  import { dirname } from "node:path";
@@ -3,28 +3,28 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  envName,
5
5
  readOnlyLockOf
6
- } from "./chunk-D4E345BC.js";
6
+ } from "./chunk-Q7O4CQDO.js";
7
7
  import {
8
8
  CAPABILITY_STATEMENTS,
9
9
  storeCapable
10
- } from "./chunk-VQCWVZWG.js";
10
+ } from "./chunk-MP7M6FFU.js";
11
11
  import {
12
12
  catchCrashes
13
- } from "./chunk-77M3IAVU.js";
13
+ } from "./chunk-EPCFXKTX.js";
14
14
  import {
15
15
  importFrom
16
16
  } from "./chunk-Y5E2WNWB.js";
17
17
  import {
18
18
  CliError
19
- } from "./chunk-CCHHEMPM.js";
19
+ } from "./chunk-BXTDAGM4.js";
20
20
  import {
21
21
  __name
22
22
  } from "./chunk-ZVVMGPBJ.js";
23
23
 
24
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/cli/entry.js
24
+ // node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/cli/entry.js
25
25
  import { spawn as spawn2 } from "node:child_process";
26
26
 
27
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/sqlite-runtime.js
27
+ // node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/sqlite-runtime.js
28
28
  import { spawn, spawnSync } from "node:child_process";
29
29
  import { readFileSync } from "node:fs";
30
30
  import { dirname } from "node:path";
@@ -112,7 +112,7 @@ var relay = /* @__PURE__ */ __name((child, host = process) => new Promise(() =>
112
112
  });
113
113
  }), "relay");
114
114
 
115
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/cli/argv-log.js
115
+ // node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/cli/argv-log.js
116
116
  import { appendFileSync } from "node:fs";
117
117
  var logParsedArgv = /* @__PURE__ */ __name((file, action) => {
118
118
  const words = [];
@@ -136,7 +136,7 @@ var logVersion = /* @__PURE__ */ __name((file) => {
136
136
  `);
137
137
  }, "logVersion");
138
138
 
139
- // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/cli/entry.js
139
+ // node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/cli/entry.js
140
140
  var processIo = /* @__PURE__ */ __name(() => ({
141
141
  argv: process.argv,
142
142
  env: process.env,
@@ -190,8 +190,8 @@ var startCli = /* @__PURE__ */ __name(async (entry) => {
190
190
  if (command.optsWithGlobals().dryRun === true)
191
191
  return;
192
192
  const [{ setupAtStart }, { commandPathOf }] = await Promise.all([
193
- import("./first-run-3N5AABEY.js"),
194
- import("./command-contract-YF4KGFXC.js")
193
+ import("./first-run-CSGMEJXY.js"),
194
+ import("./command-contract-KMMHARMR.js")
195
195
  ]);
196
196
  await setupAtStart({
197
197
  command: entry.app.command,
@@ -206,7 +206,7 @@ var startCli = /* @__PURE__ */ __name(async (entry) => {
206
206
  ask: /* @__PURE__ */ __name(async (question, command) => {
207
207
  if (headless(command) || io.stdin.isTTY !== true)
208
208
  return false;
209
- const { readSecret } = await import("./prompt-4NGAZGHE.js");
209
+ const { readSecret } = await import("./prompt-IDNH7N3W.js");
210
210
  const answer = await readSecret(`${question} [y/N] `, {
211
211
  input: io.stdin,
212
212
  output: io.stderr,
@@ -215,7 +215,10 @@ var startCli = /* @__PURE__ */ __name(async (entry) => {
215
215
  });
216
216
  return /^(y|yes)$/i.test(answer.trim());
217
217
  }, "ask"),
218
- openBrowser: /* @__PURE__ */ __name((url, browser) => openBrowser(url, browser, io), "openBrowser"),
218
+ openBrowser: /* @__PURE__ */ __name(async (url, browser, command) => {
219
+ if (!headless(command))
220
+ await openBrowser(url, browser, io);
221
+ }, "openBrowser"),
219
222
  outputClosed: /* @__PURE__ */ __name(() => closed, "outputClosed")
220
223
  };
221
224
  let code;
@@ -4,10 +4,10 @@ import {
4
4
  check,
5
5
  pipe,
6
6
  string
7
- } from "./chunk-77M3IAVU.js";
7
+ } from "./chunk-EPCFXKTX.js";
8
8
  import {
9
9
  CliError
10
- } from "./chunk-CCHHEMPM.js";
10
+ } from "./chunk-BXTDAGM4.js";
11
11
  import {
12
12
  __name
13
13
  } from "./chunk-ZVVMGPBJ.js";