@wirecat/tg-cli 0.113.0 → 0.115.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 (118) hide show
  1. package/dist/bin/tg.js +6 -2
  2. package/dist/bin/tg.js.map +1 -1
  3. package/dist/bundle/{adapter-EQKEFGPB.js → adapter-ODK7R4LY.js} +56 -53
  4. package/dist/bundle/{all-profiles-TTBFF663.js → all-profiles-AQYM65BS.js} +9 -8
  5. package/dist/bundle/{anthropic-XPZS7267.js → anthropic-VBDSVNIM.js} +6 -5
  6. package/dist/bundle/{app-server-ZSZ7KRAY.js → app-server-YOIHLBNS.js} +47 -43
  7. package/dist/bundle/{bot-api-X7BOVNIO.js → bot-api-TRYLGQKK.js} +51 -47
  8. package/dist/bundle/{bot-history-DWIUIPN5.js → bot-history-7DTJLBBJ.js} +18 -16
  9. package/dist/bundle/{bun-ZGZVAJU2.js → bun-XIMM6EHD.js} +2 -2
  10. package/dist/bundle/{bun-sqlite-UN2UJ6SI.js → bun-sqlite-6B3BL5IV.js} +5 -4
  11. package/dist/bundle/{chunk-K3F46QVN.js → chunk-2TC76TLJ.js} +4 -4
  12. package/dist/bundle/{chunk-JRTZ5I6M.js → chunk-5ROWSRK7.js} +2 -2
  13. package/dist/bundle/{chunk-PHYDBR5M.js → chunk-63YKD7YA.js} +2 -2
  14. package/dist/bundle/{chunk-PCRLXJRH.js → chunk-77M3IAVU.js} +193 -129
  15. package/dist/bundle/{chunk-VDATXIO4.js → chunk-A4BQGSKI.js} +9 -9
  16. package/dist/bundle/{chunk-HO53POQG.js → chunk-AICS3TSF.js} +8 -41
  17. package/dist/bundle/{chunk-AVUIWZTP.js → chunk-AVWPMJ6E.js} +2 -2
  18. package/dist/bundle/{chunk-G74QMORP.js → chunk-BEQPZA3S.js} +2 -2
  19. package/dist/bundle/{chunk-JO45BOYE.js → chunk-BIEBJLYO.js} +8 -3
  20. package/dist/bundle/{chunk-J6USEBA6.js → chunk-BPPRR7TV.js} +2200 -945
  21. package/dist/bundle/chunk-CCHHEMPM.js +71 -0
  22. package/dist/bundle/{chunk-T4TTRFP5.js → chunk-CNO3R4O4.js} +10 -8
  23. package/dist/bundle/{chunk-IDUYRTPF.js → chunk-D4E345BC.js} +2 -2
  24. package/dist/bundle/{chunk-OYNSFQ7K.js → chunk-D72URWJE.js} +1 -39
  25. package/dist/bundle/{chunk-T5RM4Y35.js → chunk-DIABP7ZP.js} +3 -3
  26. package/dist/bundle/chunk-EW3XTUPB.js +166 -0
  27. package/dist/bundle/{chunk-KOWQVHXI.js → chunk-GCFU6WBE.js} +3 -3
  28. package/dist/bundle/{chunk-6WJ5M2Q4.js → chunk-GWDMKEDY.js} +4 -4
  29. package/dist/bundle/{chunk-TQ6EA7TB.js → chunk-GX4DMI4H.js} +17 -16
  30. package/dist/bundle/{chunk-KK3JVOOV.js → chunk-HZKWB6WS.js} +36 -35
  31. package/dist/bundle/chunk-ILHTNOIV.js +23 -0
  32. package/dist/bundle/{chunk-JDQSX2JQ.js → chunk-IUDIRZVU.js} +8443 -7398
  33. package/dist/bundle/{chunk-TUD4MU7S.js → chunk-JZXQZW2D.js} +2 -2
  34. package/dist/bundle/{chunk-Q264PYGE.js → chunk-KDOBY524.js} +55 -20
  35. package/dist/bundle/{chunk-OQR442B6.js → chunk-KIZT2MI6.js} +1 -1
  36. package/dist/bundle/chunk-L4CMCC3V.js +34 -0
  37. package/dist/bundle/{chunk-IYKRHDX6.js → chunk-LUIPXRKN.js} +188 -57
  38. package/dist/bundle/{chunk-GX4LRLVD.js → chunk-M7B5IMH3.js} +5103 -937
  39. package/dist/bundle/{chunk-4GLMEES6.js → chunk-MUZ4KYGY.js} +4 -2
  40. package/dist/bundle/{chunk-KQ23JWLJ.js → chunk-NTW5ZE47.js} +164 -276
  41. package/dist/bundle/{chunk-UIVLDKWT.js → chunk-O7CBGHI7.js} +1 -1
  42. package/dist/bundle/{chunk-KVLCIZUK.js → chunk-OMP6ALBT.js} +3 -3
  43. package/dist/bundle/{chunk-VVA4555T.js → chunk-OSP335AJ.js} +8 -8
  44. package/dist/bundle/{chunk-EGR5IJCG.js → chunk-OUX3QMYI.js} +39 -31
  45. package/dist/bundle/{chunk-VDEXNNMH.js → chunk-PEJHI7QO.js} +6 -4
  46. package/dist/bundle/{chunk-6F6K3LWV.js → chunk-PEKTB3FQ.js} +18 -15
  47. package/dist/bundle/{chunk-Z6TRIW2O.js → chunk-POKTQZOM.js} +11 -9
  48. package/dist/bundle/chunk-PQLBPYJR.js +46 -0
  49. package/dist/bundle/{chunk-BI5YJZJB.js → chunk-PZAEI4NM.js} +115 -29
  50. package/dist/bundle/{chunk-HNN7EKIM.js → chunk-QK6VLKG5.js} +338 -169
  51. package/dist/bundle/{chunk-5NF7M4MN.js → chunk-RFRI2HFT.js} +1 -1
  52. package/dist/bundle/{chunk-OC4RRFKH.js → chunk-RHUNMU4Q.js} +6 -6
  53. package/dist/bundle/{chunk-PHPNA2HU.js → chunk-TMATSEP5.js} +14 -12
  54. package/dist/bundle/{chunk-JW7BMJ6O.js → chunk-TQYMLXDS.js} +5 -3
  55. package/dist/bundle/{chunk-MTX5EDYJ.js → chunk-U67TSAAO.js} +1136 -535
  56. package/dist/bundle/{chunk-7IWDS2CM.js → chunk-UBQ3LOF6.js} +4 -4
  57. package/dist/bundle/{chunk-UE75KPAC.js → chunk-UY7GJRGY.js} +4 -4
  58. package/dist/bundle/{chunk-OSBAISA5.js → chunk-VQCWVZWG.js} +8 -13
  59. package/dist/bundle/{chunk-XZ2ZHIAO.js → chunk-VVKEWWSO.js} +1 -1
  60. package/dist/bundle/{chunk-ENXO43TV.js → chunk-WDNNN3J4.js} +8 -8
  61. package/dist/bundle/{chunk-AGUCXSSM.js → chunk-WINKEV4F.js} +7 -20
  62. package/dist/bundle/{chunk-XXNJF3ZM.js → chunk-WMG4IGEB.js} +75 -33
  63. package/dist/bundle/{chunk-6OKGHHRL.js → chunk-WMRFAK5B.js} +35 -35
  64. package/dist/bundle/{chunk-4SQB5VKL.js → chunk-WOQGUIXE.js} +1 -1
  65. package/dist/bundle/{chunk-U3MJQLZQ.js → chunk-XIYRHIBK.js} +13 -13
  66. package/dist/bundle/{chunk-ZID2Y4XU.js → chunk-XY7IGVVS.js} +2 -2
  67. package/dist/bundle/{chunk-3MAYYFKY.js → chunk-Y3AQHPAJ.js} +1 -1
  68. package/dist/bundle/{chunk-WSAHUQ6K.js → chunk-YCUQKFGD.js} +3 -3
  69. package/dist/bundle/command-contract-YF4KGFXC.js +32 -0
  70. package/dist/bundle/{decode-AMQVTEMW.js → decode-2GATBZGH.js} +7 -6
  71. package/dist/bundle/dispatch-MJMW7WDH.js +411 -0
  72. package/dist/bundle/{echarts-ECYONFQJ.js → echarts-GKEZEAL7.js} +2 -2
  73. package/dist/bundle/{embed-VZYBZEWI.js → embed-TBQPLA4Y.js} +6 -5
  74. package/dist/bundle/{embedder-GSWBGHRK.js → embedder-B5DTNCRO.js} +11 -10
  75. package/dist/bundle/entry-A6DEW2TD.js +18 -0
  76. package/dist/bundle/failure-TLF3SISS.js +24 -0
  77. package/dist/bundle/first-run-3N5AABEY.js +27 -0
  78. package/dist/bundle/first-screen-HANARM67.js +30 -0
  79. package/dist/bundle/{instructions-AXLQQS3G.js → instructions-P5E34PQR.js} +1 -1
  80. package/dist/bundle/{mcp-VVMPUDSL.js → mcp-MNI62HHE.js} +5 -3
  81. package/dist/bundle/{node-7JHC5K77.js → node-GKPRXS5Y.js} +2 -2
  82. package/dist/bundle/{node-sqlite-LYJEK46T.js → node-sqlite-GIDPALK3.js} +11 -4
  83. package/dist/bundle/{oauth-BROPKI3K.js → oauth-C57W4IMD.js} +7 -6
  84. package/dist/bundle/{open-C6XQ46JK.js → open-E6Q4WRPU.js} +5 -3
  85. package/dist/bundle/{openai-VWSU7ZDD.js → openai-5WMXY2KP.js} +15 -14
  86. package/dist/bundle/{process-QKEFL5HL.js → process-U2P5Z6UF.js} +1 -1
  87. package/dist/bundle/{program-ACY7O33O.js → program-FEUDU6GF.js} +62 -57
  88. package/dist/bundle/{prompt-EGULVW2F.js → prompt-4NGAZGHE.js} +5 -4
  89. package/dist/bundle/{proxy-transport-KIMADLQ2.js → proxy-transport-MGCJ7JAW.js} +5 -4
  90. package/dist/bundle/{recognize-UMTKLWVR.js → recognize-EUHRBA7V.js} +4 -3
  91. package/dist/bundle/{remote-DABI7PSQ.js → remote-3JHLB2FV.js} +7 -6
  92. package/dist/bundle/{rerank-ZFATWWBE.js → rerank-ZZ45SZPC.js} +7 -6
  93. package/dist/bundle/{serve-B7YYCMGN.js → serve-XOGX5FC5.js} +12 -10
  94. package/dist/bundle/server-DRE5MJ76.js +59 -0
  95. package/dist/bundle/{server-DGKZISZH.js → server-I6O72XP5.js} +36 -34
  96. package/dist/bundle/{state-AQ2PABA5.js → state-BIUYTGH6.js} +6 -5
  97. package/dist/bundle/{store-46GJTFLJ.js → store-FOJFYOMR.js} +12 -10
  98. package/dist/bundle/store-maintenance-command-YKV2C34N.js +49 -0
  99. package/dist/bundle/tg.js +159 -14
  100. package/dist/commands/context.d.ts.map +1 -1
  101. package/dist/commands/context.js +6 -4
  102. package/dist/commands/context.js.map +1 -1
  103. package/dist/reasons.d.ts.map +1 -1
  104. package/dist/reasons.js +5 -0
  105. package/dist/reasons.js.map +1 -1
  106. package/dist/version.d.ts +1 -1
  107. package/dist/version.js +1 -1
  108. package/package.json +5 -4
  109. package/skills/tg-cli/SKILL.md +2 -0
  110. package/dist/bundle/chunk-452UZ2PU.js +0 -3603
  111. package/dist/bundle/command-contract-GV67H22L.js +0 -32
  112. package/dist/bundle/entry-LALZILY4.js +0 -14
  113. package/dist/bundle/first-run-LEAI623Q.js +0 -24
  114. package/dist/bundle/first-screen-MOCVLE23.js +0 -30
  115. package/dist/bundle/identity-54HA5GN6.js +0 -11
  116. package/dist/bundle/server-UC7UWUIS.js +0 -56
  117. package/dist/bundle/store-maintenance-command-FCFKHGRM.js +0 -45
  118. /package/dist/bundle/{chunk-HPXYN7F3.js → chunk-NUN6OGOV.js} +0 -0
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/shared-55XJMTPA.js
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/sqlite/drizzle/shared-55XJMTPA.js
8
8
  var entityKind = /* @__PURE__ */ Symbol.for("drizzle:entityKind");
9
9
  var kindsByConstructor = /* @__PURE__ */ new WeakMap();
10
10
  function collectKinds(ctor) {
@@ -3,15 +3,15 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  readSharedSection,
5
5
  writeSharedSection
6
- } from "./chunk-VDATXIO4.js";
6
+ } from "./chunk-A4BQGSKI.js";
7
7
  import {
8
8
  CliError
9
- } from "./chunk-PCRLXJRH.js";
9
+ } from "./chunk-CCHHEMPM.js";
10
10
  import {
11
11
  __name
12
12
  } from "./chunk-ZVVMGPBJ.js";
13
13
 
14
- // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/cli/setup-answers.js
14
+ // 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/setup-answers.js
15
15
  var PERMISSION_ANSWERS = ["readonly", "allow"];
16
16
  var QUESTIONS = ["languages", "tools", "permissions"];
17
17
  var SECTION = "setup";
@@ -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-PCRLXJRH.js";
5
+ } from "./chunk-CCHHEMPM.js";
6
6
  import {
7
7
  __name
8
8
  } from "./chunk-ZVVMGPBJ.js";
9
9
 
10
- // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/search/languages.js
10
+ // 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/search/languages.js
11
11
  var LANGUAGES = [
12
12
  { name: "russian", code: "ru", label: "Russian", script: "cyrillic", dictionary: "dictionary-ru" },
13
13
  { name: "english", code: "en", label: "English", script: "latin", dictionary: "dictionary-en" },
@@ -15,12 +15,12 @@ var LANGUAGES = [
15
15
  ];
16
16
  var languagesOf = /* @__PURE__ */ __name((script) => LANGUAGES.filter((one) => one.script === script).map(({ name }) => name), "languagesOf");
17
17
 
18
- // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/normalize.js
18
+ // 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/normalize.js
19
19
  var NORMALIZER_VERSION = 1;
20
20
  var fold = /* @__PURE__ */ __name((text) => text.normalize("NFKD").replace(new RegExp("\\p{M}+", "gu"), "").normalize("NFC").toLowerCase(), "fold");
21
21
  var normalize = /* @__PURE__ */ __name((text) => fold(text).replace(new RegExp("\\p{Cc}", "gu"), " ").replace(/\s+/gu, " ").trim(), "normalize");
22
22
 
23
- // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/search/snowball/base-stemmer.js
23
+ // 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/search/snowball/base-stemmer.js
24
24
  var BaseStemmer = class {
25
25
  static {
26
26
  __name(this, "BaseStemmer");
@@ -395,7 +395,7 @@ var BaseStemmer = class {
395
395
  }
396
396
  };
397
397
 
398
- // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/search/snowball/english-stemmer.js
398
+ // 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/search/snowball/english-stemmer.js
399
399
  var a_0 = [
400
400
  ["arsen", -1],
401
401
  ["commun", -1],
@@ -1096,7 +1096,7 @@ var english_stemmer_default = class extends BaseStemmer {
1096
1096
  stemWord = this.stem;
1097
1097
  };
1098
1098
 
1099
- // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/search/snowball/russian-stemmer.js
1099
+ // 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/search/snowball/russian-stemmer.js
1100
1100
  var a_02 = [
1101
1101
  ["\u0432", 1],
1102
1102
  ["\u0438\u0432", 2, 1],
@@ -1519,7 +1519,7 @@ var russian_stemmer_default = class extends BaseStemmer {
1519
1519
  stemWord = this.stem;
1520
1520
  };
1521
1521
 
1522
- // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/search/snowball/spanish-stemmer.js
1522
+ // 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/search/snowball/spanish-stemmer.js
1523
1523
  var a_03 = [
1524
1524
  ["", 6],
1525
1525
  ["\xE1", 1, 1],
@@ -2195,7 +2195,7 @@ var spanish_stemmer_default = class extends BaseStemmer {
2195
2195
  stemWord = this.stem;
2196
2196
  };
2197
2197
 
2198
- // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/search/stem.js
2198
+ // 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/search/stem.js
2199
2199
  var SNOWBALL_VERSION = "3.1.1";
2200
2200
  var CYRILLIC_STEMMERS = [...languagesOf("cyrillic"), "none"];
2201
2201
  var LATIN_STEMMERS = [...languagesOf("latin"), "none"];
@@ -7,10 +7,10 @@ import {
7
7
  agentJson,
8
8
  commandAvailability,
9
9
  failureContext
10
- } from "./chunk-Q264PYGE.js";
10
+ } from "./chunk-KDOBY524.js";
11
11
  import {
12
12
  callerOf
13
- } from "./chunk-ZID2Y4XU.js";
13
+ } from "./chunk-XY7IGVVS.js";
14
14
  import {
15
15
  QUERY_ARGUMENT,
16
16
  lentConnection,
@@ -18,12 +18,10 @@ import {
18
18
  refuseLacking,
19
19
  servicesFor,
20
20
  storeModeDeps
21
- } from "./chunk-JDQSX2JQ.js";
22
- import {
23
- ENTITIES
24
- } from "./chunk-452UZ2PU.js";
21
+ } from "./chunk-IUDIRZVU.js";
25
22
  import {
26
23
  DEFAULT_OUTPUT_BYTES,
24
+ ENTITIES,
27
25
  LOCAL_WRITE,
28
26
  REMOTE_WRITE,
29
27
  answerSchema,
@@ -44,32 +42,31 @@ import {
44
42
  sealed,
45
43
  startRecording,
46
44
  traceOf
47
- } from "./chunk-GX4LRLVD.js";
45
+ } from "./chunk-M7B5IMH3.js";
48
46
  import {
49
47
  currentCaller,
50
48
  keepsSuccess,
51
49
  runContextOf,
52
50
  withCaller
53
- } from "./chunk-Z6TRIW2O.js";
51
+ } from "./chunk-POKTQZOM.js";
54
52
  import {
55
53
  queryDescription
56
- } from "./chunk-HNN7EKIM.js";
54
+ } from "./chunk-QK6VLKG5.js";
57
55
  import {
58
56
  MAX_BUFFERED_INPUT
59
- } from "./chunk-AVUIWZTP.js";
57
+ } from "./chunk-AVWPMJ6E.js";
60
58
  import {
61
59
  captureStreams,
62
- errorObjectOf,
63
- mcpErrorResult
64
- } from "./chunk-KQ23JWLJ.js";
60
+ traceIdOf
61
+ } from "./chunk-NTW5ZE47.js";
65
62
  import {
66
- CliError,
63
+ COMPACT_FLAG,
67
64
  SNAKE_CASE,
68
65
  array,
69
66
  boolean,
70
67
  description,
71
68
  duplicates,
72
- errorCodes,
69
+ errorObjectOf,
73
70
  integer,
74
71
  isoDate,
75
72
  itemEnvelopeSchema,
@@ -78,6 +75,7 @@ import {
78
75
  looseObject,
79
76
  maxLength,
80
77
  maxValue,
78
+ mcpErrorResult,
81
79
  minLength,
82
80
  minValue,
83
81
  number,
@@ -95,20 +93,23 @@ import {
95
93
  text,
96
94
  toJsonSchema,
97
95
  toStandardJsonSchema,
98
- traceIdOf,
99
96
  union,
100
97
  unknown,
101
98
  word,
102
99
  writes
103
- } from "./chunk-PCRLXJRH.js";
100
+ } from "./chunk-77M3IAVU.js";
101
+ import {
102
+ CliError,
103
+ errorCodes
104
+ } from "./chunk-CCHHEMPM.js";
104
105
  import {
105
106
  __name
106
107
  } from "./chunk-ZVVMGPBJ.js";
107
108
 
108
- // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/mcp/agent.js
109
+ // 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/agent.js
109
110
  import { Readable } from "node:stream";
110
111
 
111
- // node_modules/.pnpm/@wirecat+cli-base@0.73.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/lint.js
112
+ // 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/lint.js
112
113
  var LINT_SEVERITIES = ["high", "medium", "low"];
113
114
  var lintRuleSchema = strictObject({
114
115
  id: word,
@@ -235,7 +236,7 @@ var overridesSchema = array(strictObject({
235
236
  review_after: pipe(string(), isoDate("a date, YYYY-MM-DD"))
236
237
  }));
237
238
 
238
- // node_modules/.pnpm/@wirecat+cli-base@0.73.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/audit.js
239
+ // 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/audit.js
239
240
  var auditRuleSchema = strictObject({ id: word, severity: picklist(LINT_SEVERITIES), summary: text });
240
241
  var defineAuditRules = /* @__PURE__ */ __name((input) => parseRegistry("audit rules", array(auditRuleSchema), input, (rules) => duplicates(rules.map((rule) => rule.id)).map((id) => `"${id}" is listed twice`)), "defineAuditRules");
241
242
  var AUDIT_RULES = defineAuditRules([
@@ -344,7 +345,7 @@ var REQUIRED_ROOTS = defineRequiredRoots([
344
345
  { path: ["upgrade"], meaning: "updates the CLI" }
345
346
  ]);
346
347
 
347
- // node_modules/.pnpm/@wirecat+cli-base@0.73.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/fields.js
348
+ // 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/fields.js
348
349
  var fieldRuleSchema = strictObject({ id: word, rule: text });
349
350
  var defineFieldRules = /* @__PURE__ */ __name((input) => parseRegistry("output field rules", array(fieldRuleSchema), input, (rules) => duplicates(rules.map((rule) => rule.id)).map((id) => `"${id}" is listed twice`)), "defineFieldRules");
350
351
  var FIELD_RULES = defineFieldRules([
@@ -360,7 +361,7 @@ var FIELD_RULES = defineFieldRules([
360
361
  }
361
362
  ]);
362
363
 
363
- // node_modules/.pnpm/@wirecat+cli-base@0.73.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/identifiers.js
364
+ // 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/identifiers.js
364
365
  var key = pipe(string(), regex(SNAKE_CASE, "a snake_case key"));
365
366
  var identifierSchema = strictObject({ key, meaning: text, replaces: optional(array(key)) });
366
367
  var defineIdentifiers = /* @__PURE__ */ __name((input) => parseRegistry("identifiers", array(identifierSchema), input, (identifiers) => {
@@ -382,7 +383,7 @@ var IDENTIFIERS = defineIdentifiers([
382
383
  { key: "trace_id", meaning: "the distributed trace a run belongs to, from `traceparent`" }
383
384
  ]);
384
385
 
385
- // node_modules/.pnpm/@wirecat+cli-base@0.73.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/flags-calendar.js
386
+ // 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/flags-calendar.js
386
387
  var CALENDAR_FLAGS = [
387
388
  { name: "--end-time", value: "<time>", role: "value", type: "time", meaning: "when it ends" },
388
389
  {
@@ -456,7 +457,7 @@ var CALENDAR_FLAGS = [
456
457
  }
457
458
  ];
458
459
 
459
- // node_modules/.pnpm/@wirecat+cli-base@0.73.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/flags-how.js
460
+ // 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/flags-how.js
460
461
  var HOW_FLAGS = [
461
462
  {
462
463
  name: "--limit",
@@ -543,6 +544,12 @@ var HOW_FLAGS = [
543
544
  type: "switch",
544
545
  meaning: "each item as its reference, title, time and excerpt only"
545
546
  },
547
+ {
548
+ name: COMPACT_FLAG,
549
+ role: "output",
550
+ type: "switch",
551
+ meaning: "one line per item, built from the same answer as --json, with its paging and next steps as # lines"
552
+ },
546
553
  {
547
554
  name: "--chart-kind",
548
555
  value: "<messages|active|membership>",
@@ -734,6 +741,7 @@ var HOW_FLAGS = [
734
741
  meaning: "refuse if what it names has changed since it was read",
735
742
  replaces: ["--expected"]
736
743
  },
744
+ { name: "--full-history", role: "mode", type: "switch", meaning: "keep a chat's whole history, past its limits" },
737
745
  {
738
746
  name: "--for-everyone",
739
747
  role: "mode",
@@ -1443,7 +1451,7 @@ var HOW_FLAGS = [
1443
1451
  }
1444
1452
  ];
1445
1453
 
1446
- // node_modules/.pnpm/@wirecat+cli-base@0.73.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/flags-mail.js
1454
+ // 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/flags-mail.js
1447
1455
  var MAIL_FLAGS = [
1448
1456
  {
1449
1457
  name: "--cc",
@@ -1467,7 +1475,7 @@ var MAIL_FLAGS = [
1467
1475
  }
1468
1476
  ];
1469
1477
 
1470
- // node_modules/.pnpm/@wirecat+cli-base@0.73.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/flags-what.js
1478
+ // 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/flags-what.js
1471
1479
  var WHAT_FLAGS = [
1472
1480
  {
1473
1481
  name: "--analysis-provider",
@@ -2465,7 +2473,7 @@ var WHAT_FLAGS = [
2465
2473
  }
2466
2474
  ];
2467
2475
 
2468
- // node_modules/.pnpm/@wirecat+cli-base@0.73.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/vocabulary.js
2476
+ // 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/vocabulary.js
2469
2477
  var FLAG_TYPES = [
2470
2478
  "switch",
2471
2479
  "count",
@@ -2826,7 +2834,7 @@ var VOCABULARY = defineVocabulary({
2826
2834
  flags: [...HOW_FLAGS, ...WHAT_FLAGS, ...CALENDAR_FLAGS, ...MAIL_FLAGS]
2827
2835
  });
2828
2836
 
2829
- // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/mcp/agent.js
2837
+ // 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/agent.js
2830
2838
  var TYPES = new Map(VOCABULARY.flags.map((flag) => [flag.name, flag.type]));
2831
2839
  var snake = /* @__PURE__ */ __name((name) => name.replaceAll("|", "_or_").replace(/[^a-z0-9]+/gi, "_"), "snake");
2832
2840
  var longOf = /* @__PURE__ */ __name((option) => option.flags.match(/--[a-z0-9][a-z0-9-]*/)?.[0], "longOf");
@@ -3049,7 +3057,7 @@ var runCommandForAgent = /* @__PURE__ */ __name(async (program, path, input, ctx
3049
3057
  }
3050
3058
  }, "runCommandForAgent");
3051
3059
 
3052
- // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/mcp/tool.js
3060
+ // 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/tool.js
3053
3061
  var limit = optional(pipe(number(), integer(), minValue(1), maxValue(100), description("how many")));
3054
3062
  var page = optional(pipe(number(), integer(), minValue(1), description("which page, from 1")));
3055
3063
  var message = pipe(
@@ -3308,7 +3316,7 @@ var failed = /* @__PURE__ */ __name((error, errors, effects) => {
3308
3316
  return mcpErrorResult(JSON.parse(agentJson(errorObjectOf(error, context))));
3309
3317
  }, "failed");
3310
3318
 
3311
- // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/mcp/surface.js
3319
+ // 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/surface.js
3312
3320
  import { randomUUID } from "node:crypto";
3313
3321
  var MATCHES = 8;
3314
3322
  var ANSWER = answerSchema();
@@ -3331,7 +3339,7 @@ var runnableOnly = /* @__PURE__ */ __name((result, offered) => {
3331
3339
  const body = result.structuredContent;
3332
3340
  if (result.isError || !Array.isArray(body?.next))
3333
3341
  return result;
3334
- const next = body.next.filter((step) => offered(step.command));
3342
+ const next = body.next.filter((step) => step.command === void 0 || offered(step.command));
3335
3343
  const { next: _, ...rest } = body;
3336
3344
  const kept = next.length > 0 ? { ...rest, next } : rest;
3337
3345
  return {
@@ -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-PHYDBR5M.js";
5
+ } from "./chunk-63YKD7YA.js";
6
6
  import {
7
7
  CliError
8
- } from "./chunk-PCRLXJRH.js";
8
+ } from "./chunk-CCHHEMPM.js";
9
9
  import {
10
10
  __name
11
11
  } from "./chunk-ZVVMGPBJ.js";
12
12
 
13
- // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/speech/models.js
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
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");
@@ -20,6 +20,7 @@ var MODELS = [
20
20
  id: "gigaam-v3",
21
21
  title: "GigaAM v3, with punctuation",
22
22
  languages: "Russian \u2014 the best of the three for Russian",
23
+ language: "ru",
23
24
  featureDim: 64,
24
25
  files: [
25
26
  {
@@ -57,6 +58,7 @@ var MODELS = [
57
58
  id: "gigaam-v3-ctc",
58
59
  title: "GigaAM v3 CTC, with punctuation \u2014 a little faster",
59
60
  languages: "Russian \u2014 a little faster, rougher with capital letters",
61
+ language: "ru",
60
62
  featureDim: 64,
61
63
  files: [
62
64
  {
@@ -135,7 +137,7 @@ var speechModel = /* @__PURE__ */ __name((id) => {
135
137
  return model;
136
138
  }, "speechModel");
137
139
 
138
- // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/speech/install.js
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
139
141
  import { createHash, randomUUID } from "node:crypto";
140
142
  import { createReadStream, createWriteStream, mkdirSync, statSync } from "node:fs";
141
143
  import { rename, rm } from "node:fs/promises";
@@ -13,43 +13,45 @@ import {
13
13
  privateFiles,
14
14
  providerRequest,
15
15
  withSqliteSidecars
16
- } from "./chunk-MTX5EDYJ.js";
16
+ } from "./chunk-U67TSAAO.js";
17
17
  import {
18
18
  parseProxy,
19
19
  proxyAddress,
20
20
  proxyError,
21
21
  proxyLabel,
22
22
  proxySetting
23
- } from "./chunk-4GLMEES6.js";
23
+ } from "./chunk-MUZ4KYGY.js";
24
24
  import {
25
25
  messengerContext
26
- } from "./chunk-BI5YJZJB.js";
26
+ } from "./chunk-PZAEI4NM.js";
27
27
  import {
28
28
  uploadBlob
29
- } from "./chunk-JDQSX2JQ.js";
29
+ } from "./chunk-IUDIRZVU.js";
30
30
  import {
31
31
  asFirstWord,
32
32
  currentAttempt,
33
33
  environmentOf,
34
34
  fromFile,
35
35
  settingsFor
36
- } from "./chunk-GX4LRLVD.js";
36
+ } from "./chunk-M7B5IMH3.js";
37
37
  import {
38
38
  TG
39
- } from "./chunk-JO45BOYE.js";
39
+ } from "./chunk-BIEBJLYO.js";
40
40
  import {
41
41
  Credentials,
42
42
  pathsAreOverridden,
43
43
  resolvePaths
44
- } from "./chunk-KQ23JWLJ.js";
44
+ } from "./chunk-NTW5ZE47.js";
45
45
  import {
46
- CliError,
47
- isCliError,
48
46
  optional
49
- } from "./chunk-PCRLXJRH.js";
47
+ } from "./chunk-77M3IAVU.js";
50
48
  import {
51
49
  importFrom
52
50
  } from "./chunk-Y5E2WNWB.js";
51
+ import {
52
+ CliError,
53
+ isCliError
54
+ } from "./chunk-CCHHEMPM.js";
53
55
  import {
54
56
  __name
55
57
  } from "./chunk-ZVVMGPBJ.js";
@@ -174,11 +176,12 @@ var telegramOf = /* @__PURE__ */ __name((command, base) => {
174
176
  const resolved = given ?? credentials.read();
175
177
  if (!resolved) {
176
178
  const loggedIn = existsSync(sessionPath);
177
- const unreachable = loggedIn && command.name() === "serve" ? "provider_unavailable" : "authentication_error";
178
- throw new CliError(unreachable, loggedIn ? `no Telegram app credentials found for profile "${profile}", although it has logged in on this machine \u2014 the keyring is probably out of reach (cron, ssh, an MCP client that trims the environment: set XDG_RUNTIME_DIR); \`tg ${asFirstWord(profile)}doctor\` shows it. Log in again only if they were removed` : `no Telegram app credentials for profile "${profile}" \u2014 run ${setup} in a local terminal first, or sign in from ${desktop}; agents: read \`tg skill show\``);
179
+ const background = command.name() === "serve" || base.env.TG_SCHEDULED !== void 0;
180
+ const temporary = loggedIn && background;
181
+ throw new CliError(temporary ? "provider_unavailable" : "authentication_error", loggedIn ? `no Telegram app credentials found for profile "${profile}", although it has logged in on this machine \u2014 the keyring is probably out of reach (cron, ssh, an MCP client that trims the environment: set XDG_RUNTIME_DIR); \`tg ${asFirstWord(profile)}doctor\` shows it. Log in again only if they were removed` : `no Telegram app credentials for profile "${profile}" \u2014 run ${setup} in a local terminal first, or sign in from ${desktop}; agents: read \`tg skill show\``, temporary ? { reason: "credentials.unreachable" } : {});
179
182
  }
180
183
  const options = { credentials: resolved, sessionPath, ...connecting };
181
- return environment.adapter ? await environment.adapter(options) : await (await import("./adapter-EQKEFGPB.js")).TelegramAdapter.open({
184
+ return environment.adapter ? await environment.adapter(options) : await (await import("./adapter-ODK7R4LY.js")).TelegramAdapter.open({
182
185
  ...options,
183
186
  ...proxyOption(proxy()),
184
187
  diagnostic: /* @__PURE__ */ __name((line) => base.streams.diagnostic(line), "diagnostic"),
@@ -864,7 +867,7 @@ var TELEGRAM_BOT = {
864
867
  const botId = token.split(":", 1)[0] ?? "";
865
868
  if (!/^\d+$/.test(botId))
866
869
  throw new CliError("authentication_error", "the bot token has no valid bot id");
867
- const reader = await (environment.botHistory ?? (await import("./bot-history-DWIUIPN5.js")).openBotHistory)({
870
+ const reader = await (environment.botHistory ?? (await import("./bot-history-7DTJLBBJ.js")).openBotHistory)({
868
871
  credentials,
869
872
  sessionPath: botSessionFile(profile, botId, env),
870
873
  token,
@@ -884,7 +887,7 @@ var TELEGRAM_BOT = {
884
887
  return void 0;
885
888
  let personal;
886
889
  try {
887
- personal = environment.adapter ? await environment.adapter({ credentials, sessionPath: personalPath }) : await (await import("./adapter-EQKEFGPB.js")).TelegramAdapter.open({
890
+ personal = environment.adapter ? await environment.adapter({ credentials, sessionPath: personalPath }) : await (await import("./adapter-ODK7R4LY.js")).TelegramAdapter.open({
888
891
  credentials,
889
892
  sessionPath: personalPath,
890
893
  checks: words,
@@ -1,21 +1,23 @@
1
1
  import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
- errorCodes,
5
4
  isContentKey
6
- } from "./chunk-PCRLXJRH.js";
5
+ } from "./chunk-NTW5ZE47.js";
6
+ import {
7
+ errorCodes
8
+ } from "./chunk-CCHHEMPM.js";
7
9
  import {
8
10
  __name
9
11
  } from "./chunk-ZVVMGPBJ.js";
10
12
 
11
- // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/runs/run-context.js
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/runs/run-context.js
12
14
  import { AsyncLocalStorage } from "node:async_hooks";
13
15
  import { createHash } from "node:crypto";
14
16
 
15
- // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/runs/error-detail.js
17
+ // 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/runs/error-detail.js
16
18
  import { homedir } from "node:os";
17
19
 
18
- // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/errors/failures.js
20
+ // 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/errors/failures.js
19
21
  var isCliFailure = /* @__PURE__ */ __name((value) => value instanceof Error && value.name === "CliError" && errorCodes.includes(value.code), "isCliFailure");
20
22
  var isCommanderFailure = /* @__PURE__ */ __name((value) => {
21
23
  const { code, exitCode } = value ?? {};
@@ -23,7 +25,7 @@ var isCommanderFailure = /* @__PURE__ */ __name((value) => {
23
25
  }, "isCommanderFailure");
24
26
  var failureKey = /* @__PURE__ */ __name((error) => isCliFailure(error) ? error.code : error instanceof Error ? error.name : "error", "failureKey");
25
27
 
26
- // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/runs/events.js
28
+ // 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/runs/events.js
27
29
  var providerErrorKey = /* @__PURE__ */ __name((value) => typeof value === "string" && /^[A-Za-z][A-Za-z0-9._-]{0,63}$/.test(value) ? value : void 0, "providerErrorKey");
28
30
  var renderEvent = /* @__PURE__ */ __name((event) => {
29
31
  if (event.event === "warning") {
@@ -71,7 +73,7 @@ var MARK = { request: "\u2192", response: "\u2190", cache: "\u2022", warning: "!
71
73
  var age = /* @__PURE__ */ __name((ms) => ms < 1e3 ? `${ms}ms` : `${Math.round(ms / 1e3)}s`, "age");
72
74
  var size = /* @__PURE__ */ __name((bytes) => bytes < 1e3 ? `${bytes} B` : `${(bytes / 1e3).toFixed(1)} kB`, "size");
73
75
 
74
- // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/runs/secrets.js
76
+ // 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/runs/secrets.js
75
77
  var SECRET_WORDS = /* @__PURE__ */ new Set([
76
78
  "authorization",
77
79
  "cookie",
@@ -152,7 +154,7 @@ var withoutSecrets = /* @__PURE__ */ __name((text, mark = "[redacted]") => text.
152
154
  var RUN = /(?<![A-Za-z0-9_+/-])[A-Za-z0-9_+/-]{20,}/g;
153
155
  var HEX = /(?<![A-Za-z0-9])(?=[0-9]*[a-f])[0-9a-f]{20,}(?![A-Za-z0-9])/g;
154
156
 
155
- // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/runs/error-detail.js
157
+ // 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/runs/error-detail.js
156
158
  var MESSAGE_AT_MOST = 500;
157
159
  var CAUSES_AT_MOST = 5;
158
160
  var FRAMES_AT_MOST = 15;
@@ -261,7 +263,7 @@ var redactText = /* @__PURE__ */ __name((text) => {
261
263
  return out.length > MESSAGE_AT_MOST ? `${out.slice(0, MESSAGE_AT_MOST)}\u2026` : out;
262
264
  }, "redactText");
263
265
 
264
- // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/runs/run-context.js
266
+ // 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/runs/run-context.js
265
267
  var REDACTED = "[redacted]";
266
268
  var keepsSuccess = /* @__PURE__ */ __name(({ record, fromFlag, env, caller, persistent = false }) => {
267
269
  if (!record)
@@ -0,0 +1,46 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ __name
5
+ } from "./chunk-ZVVMGPBJ.js";
6
+
7
+ // 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/executable.js
8
+ import { existsSync } from "node:fs";
9
+ import { win32 } from "node:path";
10
+ var variable = /* @__PURE__ */ __name((env, name) => Object.entries(env).find(([key]) => key.toUpperCase() === name)?.[1], "variable");
11
+ var executableOnPath = /* @__PURE__ */ __name((command, env, platform = process.platform, exists = existsSync) => {
12
+ if (platform !== "win32" || win32.isAbsolute(command))
13
+ return command;
14
+ if (/[\\/]/.test(command))
15
+ return command;
16
+ const extensions = win32.extname(command) ? [""] : (variable(env, "PATHEXT") ?? ".EXE;.COM;.CMD;.BAT").split(";").filter((ext) => /^\.[a-z0-9]+$/i.test(ext));
17
+ for (const entry of (variable(env, "PATH") ?? "").split(";")) {
18
+ const directory = entry.replace(/^"(.*)"$/, "$1");
19
+ for (const extension of extensions) {
20
+ const candidate = win32.join(directory, command + extension);
21
+ if (exists(candidate))
22
+ return candidate;
23
+ }
24
+ }
25
+ return command;
26
+ }, "executableOnPath");
27
+ var executableEnvironment = /* @__PURE__ */ __name((env, platform = process.platform) => {
28
+ if (platform !== "win32")
29
+ return env;
30
+ const configured = variable(env, "COMSPEC");
31
+ const system = variable(env, "SYSTEMROOT");
32
+ const shell = configured ? configured : system && win32.isAbsolute(system) ? win32.join(system, "System32", "cmd.exe") : void 0;
33
+ if (!shell)
34
+ return env;
35
+ const result = { ...env };
36
+ for (const key of Object.keys(result))
37
+ if (key.toUpperCase() === "COMSPEC")
38
+ delete result[key];
39
+ result.comspec = shell;
40
+ return result;
41
+ }, "executableEnvironment");
42
+
43
+ export {
44
+ executableOnPath,
45
+ executableEnvironment
46
+ };