@wirecat/tg-cli 0.110.0 → 0.112.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 (111) hide show
  1. package/README.md +3 -0
  2. package/dist/bin/tg.js +2 -2
  3. package/dist/bundle/{adapter-JWUCHTXU.js → adapter-ILDV2YSZ.js} +70 -50
  4. package/dist/bundle/{all-profiles-OMRCKP54.js → all-profiles-4SH2Q4WV.js} +8 -8
  5. package/dist/bundle/{anthropic-WXFHH74P.js → anthropic-64SM23YO.js} +5 -5
  6. package/dist/bundle/{app-server-ILIPNO6T.js → app-server-SSYZWCDJ.js} +40 -40
  7. package/dist/bundle/{bot-api-KV765AZK.js → bot-api-OHAGQMES.js} +46 -46
  8. package/dist/bundle/{bot-history-3P6EIM5L.js → bot-history-AUFO7UL2.js} +15 -15
  9. package/dist/bundle/{bun-MJOYPPEN.js → bun-AHZX63TR.js} +2 -2
  10. package/dist/bundle/{bun-sqlite-GFRVRRDZ.js → bun-sqlite-KBIIODPV.js} +4 -4
  11. package/dist/bundle/{chunk-XLNYDJKG.js → chunk-2IGZLBTE.js} +2 -2
  12. package/dist/bundle/{chunk-ABVHA4K6.js → chunk-3AJO4GER.js} +5 -5
  13. package/dist/bundle/{chunk-RARYRHQA.js → chunk-3GL4AOOG.js} +1 -1
  14. package/dist/bundle/{chunk-SLAPUEMZ.js → chunk-3W7BU2BL.js} +6 -6
  15. package/dist/bundle/{chunk-MXIBRT6W.js → chunk-4IDJ7QCG.js} +4 -4
  16. package/dist/bundle/{chunk-QRH2AWBZ.js → chunk-4JXZKMXV.js} +77 -54
  17. package/dist/bundle/{chunk-6KESAYMZ.js → chunk-5BNYW5RA.js} +2 -2
  18. package/dist/bundle/{chunk-6WTLP2SI.js → chunk-5W72OARG.js} +8 -8
  19. package/dist/bundle/{chunk-RSZEEWOW.js → chunk-6KGENDPF.js} +2 -2
  20. package/dist/bundle/{chunk-4GOF43MW.js → chunk-7MFJFVUN.js} +1 -1
  21. package/dist/bundle/{chunk-4YOPRYEY.js → chunk-B3Y2KZRS.js} +109 -94
  22. package/dist/bundle/{chunk-RXWG7OWT.js → chunk-BIERCQVG.js} +1221 -557
  23. package/dist/bundle/{chunk-AXNBGLO5.js → chunk-BTAET4U3.js} +1 -1
  24. package/dist/bundle/{chunk-UIPT6IAU.js → chunk-COTC7HF3.js} +1 -1
  25. package/dist/bundle/{chunk-F7RWNBC2.js → chunk-D5JP2YWG.js} +2 -2
  26. package/dist/bundle/{chunk-W3B6EEZU.js → chunk-DFUTZGEV.js} +1 -1
  27. package/dist/bundle/{chunk-3KOF5T4N.js → chunk-DNYGJAEP.js} +4 -4
  28. package/dist/bundle/{chunk-3L2JTAVD.js → chunk-E4EJ2UTT.js} +2 -2
  29. package/dist/bundle/{chunk-YPLL3Q3M.js → chunk-EO7PQE3J.js} +119 -65
  30. package/dist/bundle/{chunk-YPEAEEHF.js → chunk-EPAOLRUL.js} +2 -2
  31. package/dist/bundle/{chunk-TJA3BWY3.js → chunk-GM44UNGL.js} +1 -1
  32. package/dist/bundle/{chunk-4I6HTOCM.js → chunk-GSGS62LX.js} +1 -1
  33. package/dist/bundle/{chunk-7ABA4EXC.js → chunk-GW7JRFTF.js} +3 -3
  34. package/dist/bundle/{chunk-5CMOXHQS.js → chunk-ICEJKOKO.js} +7 -7
  35. package/dist/bundle/{chunk-GPIORQAD.js → chunk-JIGYVVWA.js} +22 -22
  36. package/dist/bundle/{chunk-AZYVTDAE.js → chunk-JLB5LEXJ.js} +3 -3
  37. package/dist/bundle/{chunk-VOBMR7E5.js → chunk-JPRYFDOJ.js} +45 -44
  38. package/dist/bundle/{chunk-FYAHTTOB.js → chunk-JXTYTAWE.js} +11 -11
  39. package/dist/bundle/{chunk-F24EAGOU.js → chunk-JYOQMYNJ.js} +28 -28
  40. package/dist/bundle/{chunk-YWSNUUW5.js → chunk-K7VOCHVS.js} +6 -6
  41. package/dist/bundle/{chunk-KLOFBUXA.js → chunk-KGYPSBTI.js} +33 -23
  42. package/dist/bundle/{chunk-BWRCPMMC.js → chunk-KLNQXUDX.js} +18 -18
  43. package/dist/bundle/{chunk-3XTMVGTS.js → chunk-KYYAHIG2.js} +246 -229
  44. package/dist/bundle/{chunk-TDQVVXPF.js → chunk-MCXVGHL6.js} +85 -31
  45. package/dist/bundle/{chunk-32HEOKI2.js → chunk-NKACHGB2.js} +27 -14
  46. package/dist/bundle/{chunk-HCAYTAJN.js → chunk-NQKPXVLX.js} +2 -2
  47. package/dist/bundle/{chunk-L3YDXUDK.js → chunk-PDVSMGWO.js} +2 -2
  48. package/dist/bundle/{chunk-2YWQEG2P.js → chunk-PXUHQO66.js} +11 -11
  49. package/dist/bundle/{chunk-EO563SUX.js → chunk-QL4WBCL5.js} +7 -7
  50. package/dist/bundle/{chunk-MZRD776E.js → chunk-QMJGHSGN.js} +3 -3
  51. package/dist/bundle/{chunk-M3XIME74.js → chunk-RANORATG.js} +4 -4
  52. package/dist/bundle/{chunk-Q35J5LCO.js → chunk-RC7EBLHM.js} +10 -9
  53. package/dist/bundle/{chunk-VM7I5VKX.js → chunk-RHYMEHYK.js} +2 -2
  54. package/dist/bundle/{chunk-NDT22GBK.js → chunk-RPNRCFEE.js} +2 -2
  55. package/dist/bundle/{chunk-EB44Z44U.js → chunk-SC2DUQAK.js} +1 -1
  56. package/dist/bundle/{chunk-ONHHBPV3.js → chunk-SFJFBIYP.js} +2 -2
  57. package/dist/bundle/{chunk-SD5J5T7M.js → chunk-TOBJGMMA.js} +11 -11
  58. package/dist/bundle/{chunk-5ASW5BNM.js → chunk-TUJEJ4D5.js} +26 -13
  59. package/dist/bundle/{chunk-BYOEVYY2.js → chunk-UQOSZ2XX.js} +468 -351
  60. package/dist/bundle/{chunk-JDOSIWPN.js → chunk-UVRD447S.js} +3 -3
  61. package/dist/bundle/{chunk-4BMXELWN.js → chunk-UXCWUEN7.js} +5 -5
  62. package/dist/bundle/{chunk-54CWOD7V.js → chunk-WI2S6INJ.js} +6 -6
  63. package/dist/bundle/{chunk-NFBOZT7H.js → chunk-WWKXTKCE.js} +4 -4
  64. package/dist/bundle/{chunk-7LZBMZQM.js → chunk-XSYJKEA5.js} +4 -4
  65. package/dist/bundle/command-contract-4KVJJZ46.js +32 -0
  66. package/dist/bundle/{decode-3KBXZCFM.js → decode-FR3QHHJI.js} +4 -4
  67. package/dist/bundle/{echarts-24TVPFGC.js → echarts-VTV4C2OS.js} +2 -2
  68. package/dist/bundle/{embed-3BDPZ4Q7.js → embed-US7X5P5D.js} +5 -5
  69. package/dist/bundle/{embedder-EMVDEZFR.js → embedder-63Z7ZBYG.js} +8 -8
  70. package/dist/bundle/{entry-NQD6Z2BM.js → entry-B4J7IAG3.js} +5 -5
  71. package/dist/bundle/{first-run-ZBIO6C67.js → first-run-MXPPUGII.js} +9 -9
  72. package/dist/bundle/first-screen-GFYHUBBD.js +30 -0
  73. package/dist/bundle/{identity-EDGOOTOM.js → identity-AQWKU7SM.js} +3 -3
  74. package/dist/bundle/{instructions-N2WVMNFZ.js → instructions-GBR6DJTK.js} +1 -1
  75. package/dist/bundle/{mcp-EMNFFY4N.js → mcp-YJEQYYTR.js} +2 -2
  76. package/dist/bundle/{node-VBZAZHUS.js → node-QXGPMDH2.js} +2 -2
  77. package/dist/bundle/{node-sqlite-C3V64OAL.js → node-sqlite-L6CAMXQ2.js} +4 -4
  78. package/dist/bundle/{oauth-NZXELYDA.js → oauth-5RK6J4SG.js} +6 -6
  79. package/dist/bundle/{open-2XRUGMV7.js → open-A3IAG7U6.js} +3 -3
  80. package/dist/bundle/{openai-OLGTN3ZB.js → openai-YKNGCHVV.js} +13 -13
  81. package/dist/bundle/{process-CASPZ2DH.js → process-CGLNXFIU.js} +1 -1
  82. package/dist/bundle/{program-QPQDSGYA.js → program-AEDR6R5P.js} +48 -48
  83. package/dist/bundle/{prompt-ESZL7SGX.js → prompt-65CSCL2T.js} +4 -4
  84. package/dist/bundle/{proxy-transport-OROEVBCG.js → proxy-transport-U3QOYMQF.js} +4 -4
  85. package/dist/bundle/{recognize-LQ7QOG4T.js → recognize-ECRO6CFK.js} +3 -3
  86. package/dist/bundle/{remote-34XP4EDN.js → remote-6IEFZFGO.js} +6 -6
  87. package/dist/bundle/{rerank-7F6NLBCW.js → rerank-23GXWT2V.js} +6 -6
  88. package/dist/bundle/{serve-M6TTKXI4.js → serve-S65YTPZN.js} +8 -8
  89. package/dist/bundle/server-IH24WEAC.js +56 -0
  90. package/dist/bundle/{server-GLZ5M7PE.js → server-MVTBK7GV.js} +32 -32
  91. package/dist/bundle/{state-UKKPLMHS.js → state-TH3UVQAW.js} +5 -5
  92. package/dist/bundle/{store-J2MBIDJK.js → store-2WFTUSNG.js} +12 -10
  93. package/dist/bundle/store-maintenance-command-PUOU2CL6.js +45 -0
  94. package/dist/bundle/tg.js +4 -4
  95. package/dist/telegram/adapter.d.ts +2 -0
  96. package/dist/telegram/adapter.d.ts.map +1 -1
  97. package/dist/telegram/adapter.js +3 -0
  98. package/dist/telegram/adapter.js.map +1 -1
  99. package/dist/telegram/topics.d.ts +4 -2
  100. package/dist/telegram/topics.d.ts.map +1 -1
  101. package/dist/telegram/topics.js +21 -3
  102. package/dist/telegram/topics.js.map +1 -1
  103. package/dist/version.d.ts +1 -1
  104. package/dist/version.js +1 -1
  105. package/package.json +3 -3
  106. package/skills/tg-cli/SKILL.md +16 -9
  107. package/dist/bundle/command-contract-TNSW7W6G.js +0 -32
  108. package/dist/bundle/first-screen-4HRCG7OX.js +0 -30
  109. package/dist/bundle/server-KOW7OKE2.js +0 -56
  110. package/dist/bundle/store-maintenance-command-64B57C3U.js +0 -45
  111. /package/dist/bundle/{chunk-NPGVOZVK.js → chunk-WJWLHLQ7.js} +0 -0
@@ -2,7 +2,7 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  CliError
5
- } from "./chunk-EO563SUX.js";
5
+ } from "./chunk-QL4WBCL5.js";
6
6
  import {
7
7
  importFrom
8
8
  } from "./chunk-Y5E2WNWB.js";
@@ -10,10 +10,10 @@ import {
10
10
  __name
11
11
  } from "./chunk-ZVVMGPBJ.js";
12
12
 
13
- // node_modules/.pnpm/@wirecat+cli-core@0.511.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.68.1_commander@15._5c8fd69a9fdf1e5f27f7a7a8cfa45e82/node_modules/@wirecat/cli-core/dist/speech/recognize.js
13
+ // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/speech/recognize.js
14
14
  import { createRequire } from "node:module";
15
15
 
16
- // node_modules/.pnpm/@wirecat+cli-core@0.511.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.68.1_commander@15._5c8fd69a9fdf1e5f27f7a7a8cfa45e82/node_modules/@wirecat/cli-core/dist/speech/ogg-limit.js
16
+ // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/speech/ogg-limit.js
17
17
  var invalid = /* @__PURE__ */ __name(() => new CliError("validation_error", "local transcription needs a complete mono or stereo Ogg Opus recording"), "invalid");
18
18
  var checkOggDuration = /* @__PURE__ */ __name((bytes) => {
19
19
  const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
@@ -70,7 +70,7 @@ var checkOggDuration = /* @__PURE__ */ __name((bytes) => {
70
70
  throw invalid();
71
71
  }, "checkOggDuration");
72
72
 
73
- // node_modules/.pnpm/@wirecat+cli-core@0.511.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.68.1_commander@15._5c8fd69a9fdf1e5f27f7a7a8cfa45e82/node_modules/@wirecat/cli-core/dist/speech/recognize.js
73
+ // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/speech/recognize.js
74
74
  var SAMPLE_RATE = 16e3;
75
75
  var LEAD = SAMPLE_RATE / 2;
76
76
  var toModelRate = /* @__PURE__ */ __name((samples, rate) => {
@@ -3,19 +3,19 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  errorCodes,
5
5
  isContentKey
6
- } from "./chunk-EO563SUX.js";
6
+ } from "./chunk-QL4WBCL5.js";
7
7
  import {
8
8
  __name
9
9
  } from "./chunk-ZVVMGPBJ.js";
10
10
 
11
- // node_modules/.pnpm/@wirecat+cli-core@0.511.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.68.1_commander@15._5c8fd69a9fdf1e5f27f7a7a8cfa45e82/node_modules/@wirecat/cli-core/dist/runs/run-context.js
11
+ // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/runs/run-context.js
12
12
  import { AsyncLocalStorage } from "node:async_hooks";
13
13
  import { createHash } from "node:crypto";
14
14
 
15
- // node_modules/.pnpm/@wirecat+cli-core@0.511.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.68.1_commander@15._5c8fd69a9fdf1e5f27f7a7a8cfa45e82/node_modules/@wirecat/cli-core/dist/runs/error-detail.js
15
+ // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/runs/error-detail.js
16
16
  import { homedir } from "node:os";
17
17
 
18
- // node_modules/.pnpm/@wirecat+cli-core@0.511.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.68.1_commander@15._5c8fd69a9fdf1e5f27f7a7a8cfa45e82/node_modules/@wirecat/cli-core/dist/errors/failures.js
18
+ // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/errors/failures.js
19
19
  var isCliFailure = /* @__PURE__ */ __name((value) => value instanceof Error && value.name === "CliError" && errorCodes.includes(value.code), "isCliFailure");
20
20
  var isCommanderFailure = /* @__PURE__ */ __name((value) => {
21
21
  const { code, exitCode } = value ?? {};
@@ -23,7 +23,7 @@ var isCommanderFailure = /* @__PURE__ */ __name((value) => {
23
23
  }, "isCommanderFailure");
24
24
  var failureKey = /* @__PURE__ */ __name((error) => isCliFailure(error) ? error.code : error instanceof Error ? error.name : "error", "failureKey");
25
25
 
26
- // node_modules/.pnpm/@wirecat+cli-core@0.511.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.68.1_commander@15._5c8fd69a9fdf1e5f27f7a7a8cfa45e82/node_modules/@wirecat/cli-core/dist/runs/events.js
26
+ // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/runs/events.js
27
27
  var providerErrorKey = /* @__PURE__ */ __name((value) => typeof value === "string" && /^[A-Za-z][A-Za-z0-9._-]{0,63}$/.test(value) ? value : void 0, "providerErrorKey");
28
28
  var renderEvent = /* @__PURE__ */ __name((event) => {
29
29
  if (event.event === "warning") {
@@ -71,7 +71,7 @@ var MARK = { request: "\u2192", response: "\u2190", cache: "\u2022", warning: "!
71
71
  var age = /* @__PURE__ */ __name((ms) => ms < 1e3 ? `${ms}ms` : `${Math.round(ms / 1e3)}s`, "age");
72
72
  var size = /* @__PURE__ */ __name((bytes) => bytes < 1e3 ? `${bytes} B` : `${(bytes / 1e3).toFixed(1)} kB`, "size");
73
73
 
74
- // node_modules/.pnpm/@wirecat+cli-core@0.511.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.68.1_commander@15._5c8fd69a9fdf1e5f27f7a7a8cfa45e82/node_modules/@wirecat/cli-core/dist/runs/secrets.js
74
+ // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/runs/secrets.js
75
75
  var SECRET_WORDS = /* @__PURE__ */ new Set([
76
76
  "authorization",
77
77
  "cookie",
@@ -152,7 +152,7 @@ var withoutSecrets = /* @__PURE__ */ __name((text, mark = "[redacted]") => text.
152
152
  var RUN = /(?<![A-Za-z0-9_+/-])[A-Za-z0-9_+/-]{20,}/g;
153
153
  var HEX = /(?<![A-Za-z0-9])(?=[0-9]*[a-f])[0-9a-f]{20,}(?![A-Za-z0-9])/g;
154
154
 
155
- // node_modules/.pnpm/@wirecat+cli-core@0.511.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.68.1_commander@15._5c8fd69a9fdf1e5f27f7a7a8cfa45e82/node_modules/@wirecat/cli-core/dist/runs/error-detail.js
155
+ // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/runs/error-detail.js
156
156
  var MESSAGE_AT_MOST = 500;
157
157
  var CAUSES_AT_MOST = 5;
158
158
  var FRAMES_AT_MOST = 15;
@@ -253,14 +253,15 @@ var endpointTemplate = /* @__PURE__ */ __name((raw) => {
253
253
  }, "endpointTemplate");
254
254
  var INTERNATIONAL_PHONE = /\+\d[\d\s()-]{6,}\d/.source;
255
255
  var BARE_PHONE = /(^|[^\w-])\d{11,15}\b/.source;
256
+ var MESSENGER_ID = /\b\d+(?:-\d+)?(?::\d+)?@(?:s\.whatsapp\.net|g\.us|c\.us|lid|broadcast|newsletter)\b/g;
256
257
  var redactText = /* @__PURE__ */ __name((text) => {
257
258
  const home = homedir();
258
259
  let out = home && home !== "/" ? text.split(home).join("~") : text;
259
- out = withoutSecrets(out.replace(/"[^"\n]*"|“[^”\n]*”|«[^»\n]*»/g, '"[redacted]"')).replace(/\b(bearer|basic|token|key|password|secret)(\s*[:=]\s*|\s+)[^\s'"]+/gi, "$1$2[redacted]").replace(/[\w.+-]+@[\w-]+\.[\w.-]+/g, "[email]").replace(new RegExp(INTERNATIONAL_PHONE, "g"), "[number]").replace(new RegExp(BARE_PHONE, "g"), "$1[number]").replace(/\bbot\d+:[\w-]+/g, "bot[token]").replace(/\b\d{6,}:[\w-]{20,}\b/g, "[token]").replace(/(\?|&)[^\s#]*/g, "$1[redacted]").replace(/\b[A-Za-z0-9_-]{40,}\b/g, "[redacted]");
260
+ out = withoutSecrets(out.replace(/"[^"\n]*"|“[^”\n]*”|«[^»\n]*»/g, '"[redacted]"')).replace(/\b(bearer|basic|token|key|password|secret)(\s*[:=]\s*|\s+)[^\s'"]+/gi, "$1$2[redacted]").replace(MESSENGER_ID, "[id]").replace(/[\w.+-]+@[\w-]+\.[\w.-]+/g, "[email]").replace(new RegExp(INTERNATIONAL_PHONE, "g"), "[number]").replace(new RegExp(BARE_PHONE, "g"), "$1[number]").replace(/\bbot\d+:[\w-]+/g, "bot[token]").replace(/\b\d{6,}:[\w-]{20,}\b/g, "[token]").replace(/(\?|&)[^\s#]*/g, "$1[redacted]").replace(/\b[A-Za-z0-9_-]{40,}\b/g, "[redacted]");
260
261
  return out.length > MESSAGE_AT_MOST ? `${out.slice(0, MESSAGE_AT_MOST)}\u2026` : out;
261
262
  }, "redactText");
262
263
 
263
- // node_modules/.pnpm/@wirecat+cli-core@0.511.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.68.1_commander@15._5c8fd69a9fdf1e5f27f7a7a8cfa45e82/node_modules/@wirecat/cli-core/dist/runs/run-context.js
264
+ // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/runs/run-context.js
264
265
  var REDACTED = "[redacted]";
265
266
  var keepsSuccess = /* @__PURE__ */ __name(({ record, fromFlag, env, caller, persistent = false }) => {
266
267
  if (!record)
@@ -2,12 +2,12 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  resolvePaths
5
- } from "./chunk-BWRCPMMC.js";
5
+ } from "./chunk-KLNQXUDX.js";
6
6
  import {
7
7
  __name
8
8
  } from "./chunk-ZVVMGPBJ.js";
9
9
 
10
- // node_modules/.pnpm/@wirecat+cli-core@0.511.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.68.1_commander@15._5c8fd69a9fdf1e5f27f7a7a8cfa45e82/node_modules/@wirecat/cli-core/dist/store/path.js
10
+ // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/store/path.js
11
11
  import { join } from "node:path";
12
12
  var wirecatDirectory = /* @__PURE__ */ __name((env = process.env, platform) => resolvePaths({ appName: "WireCat", prefix: "WIRECAT", env, ...platform ? { platform } : {} }).state, "wirecatDirectory");
13
13
  var storePath = /* @__PURE__ */ __name((env = process.env) => env.MESSAGING_STORE ?? join(wirecatDirectory(env), "wirecat.db"), "storePath");
@@ -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-EO563SUX.js";
5
+ } from "./chunk-QL4WBCL5.js";
6
6
  import {
7
7
  __name
8
8
  } from "./chunk-ZVVMGPBJ.js";
9
9
 
10
- // node_modules/.pnpm/@wirecat+cli-core@0.511.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.68.1_commander@15._5c8fd69a9fdf1e5f27f7a7a8cfa45e82/node_modules/@wirecat/cli-core/dist/models/types.js
10
+ // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/models/types.js
11
11
  var MAX_MODEL_IMAGE_BYTES = 4 * 1024 * 1024;
12
12
  var validateImages = /* @__PURE__ */ __name((images) => {
13
13
  if (images === void 0)
@@ -5,7 +5,7 @@ import {
5
5
  check,
6
6
  pipe,
7
7
  string
8
- } from "./chunk-EO563SUX.js";
8
+ } from "./chunk-QL4WBCL5.js";
9
9
  import {
10
10
  __name
11
11
  } from "./chunk-ZVVMGPBJ.js";
@@ -3,10 +3,10 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  proxyError,
5
5
  proxyLabel
6
- } from "./chunk-EB44Z44U.js";
6
+ } from "./chunk-SC2DUQAK.js";
7
7
  import {
8
8
  CliError
9
- } from "./chunk-EO563SUX.js";
9
+ } from "./chunk-QL4WBCL5.js";
10
10
  import {
11
11
  __name
12
12
  } from "./chunk-ZVVMGPBJ.js";
@@ -3,17 +3,17 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  envName,
5
5
  readOnlyLockOf
6
- } from "./chunk-XLNYDJKG.js";
6
+ } from "./chunk-2IGZLBTE.js";
7
7
  import {
8
8
  CAPABILITY_STATEMENTS,
9
9
  storeCapable
10
- } from "./chunk-SLAPUEMZ.js";
10
+ } from "./chunk-3W7BU2BL.js";
11
11
  import {
12
12
  catchCrashes
13
- } from "./chunk-BWRCPMMC.js";
13
+ } from "./chunk-KLNQXUDX.js";
14
14
  import {
15
15
  CliError
16
- } from "./chunk-EO563SUX.js";
16
+ } from "./chunk-QL4WBCL5.js";
17
17
  import {
18
18
  importFrom
19
19
  } from "./chunk-Y5E2WNWB.js";
@@ -21,10 +21,10 @@ import {
21
21
  __name
22
22
  } from "./chunk-ZVVMGPBJ.js";
23
23
 
24
- // node_modules/.pnpm/@wirecat+cli-core@0.511.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.68.1_commander@15._5c8fd69a9fdf1e5f27f7a7a8cfa45e82/node_modules/@wirecat/cli-core/dist/cli/entry.js
24
+ // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/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.511.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.68.1_commander@15._5c8fd69a9fdf1e5f27f7a7a8cfa45e82/node_modules/@wirecat/cli-core/dist/sqlite-runtime.js
27
+ // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/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.511.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.68.1_commander@15._5c8fd69a9fdf1e5f27f7a7a8cfa45e82/node_modules/@wirecat/cli-core/dist/cli/argv-log.js
115
+ // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/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.511.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.68.1_commander@15._5c8fd69a9fdf1e5f27f7a7a8cfa45e82/node_modules/@wirecat/cli-core/dist/cli/entry.js
139
+ // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/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-ZBIO6C67.js"),
194
- import("./command-contract-TNSW7W6G.js")
193
+ import("./first-run-MXPPUGII.js"),
194
+ import("./command-contract-4KVJJZ46.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-ESZL7SGX.js");
209
+ const { readSecret } = await import("./prompt-65CSCL2T.js");
210
210
  const answer = await readSecret(`${question} [y/N] `, {
211
211
  input: io.stdin,
212
212
  output: io.stderr,
@@ -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-EO563SUX.js";
5
+ } from "./chunk-QL4WBCL5.js";
6
6
  import {
7
7
  __name
8
8
  } from "./chunk-ZVVMGPBJ.js";
9
9
 
10
- // node_modules/.pnpm/@wirecat+cli-core@0.511.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.68.1_commander@15._5c8fd69a9fdf1e5f27f7a7a8cfa45e82/node_modules/@wirecat/cli-core/dist/files/ordinary-file.js
10
+ // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/files/ordinary-file.js
11
11
  import { constants } from "node:fs";
12
12
  import { lstat, open } from "node:fs/promises";
13
13
  var deviceOf = /* @__PURE__ */ __name((dev) => process.platform === "win32" ? BigInt.asUintN(32, dev) : dev, "deviceOf");
@@ -73,7 +73,7 @@ var syncDirectory = /* @__PURE__ */ __name(async (path) => {
73
73
  }
74
74
  }, "syncDirectory");
75
75
 
76
- // node_modules/.pnpm/@wirecat+cli-core@0.511.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.68.1_commander@15._5c8fd69a9fdf1e5f27f7a7a8cfa45e82/node_modules/@wirecat/cli-core/dist/files/atomic-write.js
76
+ // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/files/atomic-write.js
77
77
  import { randomUUID } from "node:crypto";
78
78
  import { constants as constants2 } from "node:fs";
79
79
  import { link, open as open2, realpath, rename, unlink } from "node:fs/promises";
@@ -111,7 +111,7 @@ var writeFileAtomic = /* @__PURE__ */ __name(async (path, content, { mode = 384,
111
111
  }
112
112
  }, "writeFileAtomic");
113
113
 
114
- // node_modules/.pnpm/@wirecat+cli-core@0.511.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.68.1_commander@15._5c8fd69a9fdf1e5f27f7a7a8cfa45e82/node_modules/@wirecat/cli-core/dist/files/bounded-utf8.js
114
+ // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/files/bounded-utf8.js
115
115
  var readBoundedUtf8File = /* @__PURE__ */ __name(async (path, { maxBytes }) => {
116
116
  if (!Number.isSafeInteger(maxBytes) || maxBytes < 1 || maxBytes > 16 * 1024 * 1024)
117
117
  throw new CliError("validation_error", "file maxBytes takes 1\u201316777216 bytes");
@@ -140,21 +140,21 @@ var readBoundedUtf8File = /* @__PURE__ */ __name(async (path, { maxBytes }) => {
140
140
  }
141
141
  }, "readBoundedUtf8File");
142
142
 
143
- // node_modules/.pnpm/@wirecat+cli-core@0.511.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.68.1_commander@15._5c8fd69a9fdf1e5f27f7a7a8cfa45e82/node_modules/@wirecat/cli-core/dist/files/lock.js
143
+ // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/files/lock.js
144
144
  import { mkdir as mkdir2 } from "node:fs/promises";
145
145
  import { basename as basename2, dirname as dirname2 } from "node:path";
146
146
 
147
- // node_modules/.pnpm/@wirecat+cli-core@0.511.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.68.1_commander@15._5c8fd69a9fdf1e5f27f7a7a8cfa45e82/node_modules/@wirecat/cli-core/dist/files/native-writer-lease.js
147
+ // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/files/native-writer-lease.js
148
148
  import { randomUUID as randomUUID2 } from "node:crypto";
149
149
  import { lstat as lstat3, mkdir, open as open3, realpath as realpath3, rmdir as rmdir2, unlink as unlink4 } from "node:fs/promises";
150
150
  import { hostname as hostname2 } from "node:os";
151
151
  import { join as join3 } from "node:path";
152
152
 
153
- // node_modules/.pnpm/@wirecat+cli-core@0.511.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.68.1_commander@15._5c8fd69a9fdf1e5f27f7a7a8cfa45e82/node_modules/@wirecat/cli-core/dist/files/native-lease-inspection.js
153
+ // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/files/native-lease-inspection.js
154
154
  import { lstat as lstat2, readdir, realpath as realpath2, unlink as unlink2 } from "node:fs/promises";
155
155
  import { join as join2 } from "node:path";
156
156
 
157
- // node_modules/.pnpm/@wirecat+cli-core@0.511.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.68.1_commander@15._5c8fd69a9fdf1e5f27f7a7a8cfa45e82/node_modules/@wirecat/cli-core/dist/files/native-lease-owner.js
157
+ // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/files/native-lease-owner.js
158
158
  import { hostname } from "node:os";
159
159
  var missingLeaseFile = /* @__PURE__ */ __name((error) => typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT", "missingLeaseFile");
160
160
  var readLeaseOwner = /* @__PURE__ */ __name(async (path, name, signal) => {
@@ -199,7 +199,7 @@ var leaseOwnerStatus = /* @__PURE__ */ __name((owner) => {
199
199
  }
200
200
  }, "leaseOwnerStatus");
201
201
 
202
- // node_modules/.pnpm/@wirecat+cli-core@0.511.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.68.1_commander@15._5c8fd69a9fdf1e5f27f7a7a8cfa45e82/node_modules/@wirecat/cli-core/dist/files/native-lease-inspection.js
202
+ // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/files/native-lease-inspection.js
203
203
  var leaseInspection = /* @__PURE__ */ __name((markerDirectory) => {
204
204
  const inspect = /* @__PURE__ */ __name(async (destination, options = {}) => {
205
205
  options.signal?.throwIfAborted();
@@ -258,7 +258,7 @@ var leaseInspection = /* @__PURE__ */ __name((markerDirectory) => {
258
258
  return { inspect, recover };
259
259
  }, "leaseInspection");
260
260
 
261
- // node_modules/.pnpm/@wirecat+cli-core@0.511.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.68.1_commander@15._5c8fd69a9fdf1e5f27f7a7a8cfa45e82/node_modules/@wirecat/cli-core/dist/files/native-lease-release.js
261
+ // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/files/native-lease-release.js
262
262
  import { rmdir, unlink as unlink3 } from "node:fs/promises";
263
263
  var ownedNativeLease = /* @__PURE__ */ __name((path, name, owner, folder, identity) => {
264
264
  let releasing;
@@ -283,7 +283,7 @@ var ownedNativeLease = /* @__PURE__ */ __name((path, name, owner, folder, identi
283
283
  };
284
284
  }, "ownedNativeLease");
285
285
 
286
- // node_modules/.pnpm/@wirecat+cli-core@0.511.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.68.1_commander@15._5c8fd69a9fdf1e5f27f7a7a8cfa45e82/node_modules/@wirecat/cli-core/dist/files/native-writer-lease.js
286
+ // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/files/native-writer-lease.js
287
287
  var validName = /* @__PURE__ */ __name((value) => typeof value === "string" && value.length > 0 && value !== "." && value !== ".." && !/[\\/\0:]/.test(value), "validName");
288
288
  var nativeWriterLeaseStore = /* @__PURE__ */ __name((layout) => {
289
289
  const { markerDirectory, legacyMarker } = layout;
@@ -354,7 +354,7 @@ var nativeWriterLeaseStore = /* @__PURE__ */ __name((layout) => {
354
354
  };
355
355
  }, "nativeWriterLeaseStore");
356
356
 
357
- // node_modules/.pnpm/@wirecat+cli-core@0.511.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.68.1_commander@15._5c8fd69a9fdf1e5f27f7a7a8cfa45e82/node_modules/@wirecat/cli-core/dist/files/lock.js
357
+ // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/files/lock.js
358
358
  var acquireLock = /* @__PURE__ */ __name(async (path, { signal } = {}) => {
359
359
  const folder = dirname2(path);
360
360
  await mkdir2(folder, { recursive: true, mode: 448 });
@@ -369,11 +369,24 @@ var acquireLock = /* @__PURE__ */ __name(async (path, { signal } = {}) => {
369
369
  });
370
370
  }, "acquireLock");
371
371
 
372
+ // node_modules/.pnpm/@wirecat+cli-core@0.531.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.71.0_commander@15._cfa5eacb532b7a1817693c3848e83d75/node_modules/@wirecat/cli-core/dist/files/safe-name.js
373
+ import { basename as basename3 } from "node:path";
374
+ var safeName = /* @__PURE__ */ __name((name, platform = process.platform) => {
375
+ let plain = name === void 0 ? "" : basename3(name.replaceAll("\\", "/")).replace(/[\p{Cc}​-‏‪-‮⁦-⁩]/gu, "").replace(/^\.+/, "");
376
+ if (platform === "win32") {
377
+ plain = plain.replace(/[<>:"|?*]/g, "_").replace(/[. ]+$/, "");
378
+ if (/^(con|prn|aux|nul|com[1-9]|lpt[1-9])(?:\.|$)/i.test(plain))
379
+ return void 0;
380
+ }
381
+ return plain === "" ? void 0 : plain;
382
+ }, "safeName");
383
+
372
384
  export {
373
385
  writeFileAtomic,
374
386
  openOrdinaryFile,
375
387
  sameOrdinaryFile,
376
388
  syncDirectory,
377
389
  readBoundedUtf8File,
378
- acquireLock
390
+ acquireLock,
391
+ safeName
379
392
  };