@wirecat/tg-cli 0.110.0 → 0.111.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 (91) hide show
  1. package/dist/bin/tg.js +2 -2
  2. package/dist/bundle/{adapter-JWUCHTXU.js → adapter-WFC2JAD4.js} +38 -38
  3. package/dist/bundle/{all-profiles-OMRCKP54.js → all-profiles-FEUSGHT7.js} +5 -5
  4. package/dist/bundle/{anthropic-WXFHH74P.js → anthropic-O646SJIJ.js} +3 -3
  5. package/dist/bundle/{app-server-ILIPNO6T.js → app-server-7P23Y45A.js} +35 -35
  6. package/dist/bundle/{bot-api-KV765AZK.js → bot-api-WTJCL6VF.js} +39 -39
  7. package/dist/bundle/{bot-history-3P6EIM5L.js → bot-history-5J2Q4SPC.js} +10 -10
  8. package/dist/bundle/{bun-MJOYPPEN.js → bun-KUKVEKDW.js} +2 -2
  9. package/dist/bundle/{bun-sqlite-GFRVRRDZ.js → bun-sqlite-2G5TXHYE.js} +2 -2
  10. package/dist/bundle/{chunk-4BMXELWN.js → chunk-2K6IGVSI.js} +4 -4
  11. package/dist/bundle/{chunk-3L2JTAVD.js → chunk-2ZH3PUQX.js} +1 -1
  12. package/dist/bundle/{chunk-6WTLP2SI.js → chunk-33HEHPIK.js} +7 -7
  13. package/dist/bundle/{chunk-4YOPRYEY.js → chunk-3BD24JYK.js} +96 -92
  14. package/dist/bundle/{chunk-54CWOD7V.js → chunk-3WUTBGZE.js} +4 -4
  15. package/dist/bundle/{chunk-XLNYDJKG.js → chunk-43ZFY6TW.js} +1 -1
  16. package/dist/bundle/{chunk-Q35J5LCO.js → chunk-5FJQG5UZ.js} +9 -8
  17. package/dist/bundle/{chunk-3XTMVGTS.js → chunk-5ZPLOYTP.js} +205 -204
  18. package/dist/bundle/{chunk-YWSNUUW5.js → chunk-7665YBJ7.js} +5 -5
  19. package/dist/bundle/{chunk-VM7I5VKX.js → chunk-7GQLD5TJ.js} +1 -1
  20. package/dist/bundle/{chunk-NFBOZT7H.js → chunk-AUWYMMYL.js} +3 -3
  21. package/dist/bundle/{chunk-TJA3BWY3.js → chunk-BNQOUCL2.js} +1 -1
  22. package/dist/bundle/{chunk-L3YDXUDK.js → chunk-CJUSP5X2.js} +2 -2
  23. package/dist/bundle/{chunk-TDQVVXPF.js → chunk-COHMFCHD.js} +11 -11
  24. package/dist/bundle/{chunk-BYOEVYY2.js → chunk-DEG4JJHG.js} +267 -258
  25. package/dist/bundle/{chunk-YPLL3Q3M.js → chunk-DREEXESG.js} +86 -50
  26. package/dist/bundle/{chunk-4GOF43MW.js → chunk-HN6ZMUAS.js} +1 -1
  27. package/dist/bundle/{chunk-SD5J5T7M.js → chunk-ITSSCYLP.js} +9 -9
  28. package/dist/bundle/{chunk-AXNBGLO5.js → chunk-J2Z5E7TO.js} +1 -1
  29. package/dist/bundle/{chunk-6KESAYMZ.js → chunk-J4QVXR5I.js} +2 -2
  30. package/dist/bundle/{chunk-KLOFBUXA.js → chunk-K457FHD4.js} +31 -21
  31. package/dist/bundle/{chunk-RXWG7OWT.js → chunk-KE47Y4PW.js} +839 -440
  32. package/dist/bundle/{chunk-QRH2AWBZ.js → chunk-KLHLWKWC.js} +59 -47
  33. package/dist/bundle/{chunk-GPIORQAD.js → chunk-LLAZSGS7.js} +20 -20
  34. package/dist/bundle/{chunk-F7RWNBC2.js → chunk-MSGYLWCH.js} +1 -1
  35. package/dist/bundle/{chunk-YPEAEEHF.js → chunk-NIKYFRDQ.js} +1 -1
  36. package/dist/bundle/{chunk-4I6HTOCM.js → chunk-NQAV7U7C.js} +1 -1
  37. package/dist/bundle/{chunk-HCAYTAJN.js → chunk-OYVDWHP5.js} +1 -1
  38. package/dist/bundle/{chunk-RARYRHQA.js → chunk-PNUHAHTF.js} +1 -1
  39. package/dist/bundle/{chunk-MZRD776E.js → chunk-PQGWEFJ2.js} +2 -2
  40. package/dist/bundle/{chunk-NDT22GBK.js → chunk-QAC6Z675.js} +1 -1
  41. package/dist/bundle/{chunk-5CMOXHQS.js → chunk-QEAMO2TS.js} +6 -6
  42. package/dist/bundle/{chunk-7LZBMZQM.js → chunk-QLLPZWYZ.js} +3 -3
  43. package/dist/bundle/{chunk-3KOF5T4N.js → chunk-QVM2HKJP.js} +4 -4
  44. package/dist/bundle/{chunk-32HEOKI2.js → chunk-T6DSAROY.js} +11 -9
  45. package/dist/bundle/{chunk-SLAPUEMZ.js → chunk-TWZTQHP6.js} +5 -5
  46. package/dist/bundle/{chunk-W3B6EEZU.js → chunk-UDYCZ5KB.js} +1 -1
  47. package/dist/bundle/{chunk-M3XIME74.js → chunk-UFIUMPXP.js} +3 -3
  48. package/dist/bundle/{chunk-AZYVTDAE.js → chunk-UMUJHC4M.js} +2 -2
  49. package/dist/bundle/{chunk-7ABA4EXC.js → chunk-UPRYEDAV.js} +2 -2
  50. package/dist/bundle/{chunk-FYAHTTOB.js → chunk-VIEVOF3O.js} +8 -8
  51. package/dist/bundle/{chunk-VOBMR7E5.js → chunk-WDRNVSWF.js} +42 -42
  52. package/dist/bundle/{chunk-2YWQEG2P.js → chunk-XIRASTVS.js} +10 -10
  53. package/dist/bundle/{chunk-F24EAGOU.js → chunk-XXOJ7PQY.js} +26 -26
  54. package/dist/bundle/{chunk-MXIBRT6W.js → chunk-YFK3DNNP.js} +4 -4
  55. package/dist/bundle/{chunk-RSZEEWOW.js → chunk-YG4BO7N3.js} +1 -1
  56. package/dist/bundle/{chunk-5ASW5BNM.js → chunk-ZCHC7TYO.js} +11 -11
  57. package/dist/bundle/{chunk-JDOSIWPN.js → chunk-ZCV4UEVH.js} +2 -2
  58. package/dist/bundle/{command-contract-TNSW7W6G.js → command-contract-JCRVVL7P.js} +12 -12
  59. package/dist/bundle/{decode-3KBXZCFM.js → decode-QJNVAAKJ.js} +2 -2
  60. package/dist/bundle/{echarts-24TVPFGC.js → echarts-2EDY7OUX.js} +2 -2
  61. package/dist/bundle/{embed-3BDPZ4Q7.js → embed-PZSXOQJO.js} +3 -3
  62. package/dist/bundle/{embedder-EMVDEZFR.js → embedder-O4EGMMUU.js} +6 -6
  63. package/dist/bundle/{entry-NQD6Z2BM.js → entry-DVLMQM6J.js} +3 -3
  64. package/dist/bundle/{first-run-ZBIO6C67.js → first-run-J67KTUWA.js} +5 -5
  65. package/dist/bundle/{first-screen-4HRCG7OX.js → first-screen-PYEE5NMQ.js} +13 -13
  66. package/dist/bundle/{identity-EDGOOTOM.js → identity-DSYY4FLQ.js} +1 -1
  67. package/dist/bundle/{instructions-N2WVMNFZ.js → instructions-O535XB2L.js} +1 -1
  68. package/dist/bundle/{node-VBZAZHUS.js → node-S3VEQNTE.js} +2 -2
  69. package/dist/bundle/{node-sqlite-C3V64OAL.js → node-sqlite-3DNWF2BW.js} +2 -2
  70. package/dist/bundle/{oauth-NZXELYDA.js → oauth-IU2RAZ3D.js} +4 -4
  71. package/dist/bundle/{open-2XRUGMV7.js → open-M2IPPXMI.js} +1 -1
  72. package/dist/bundle/{openai-OLGTN3ZB.js → openai-GDI7HISL.js} +10 -10
  73. package/dist/bundle/{process-CASPZ2DH.js → process-3IGMEATV.js} +1 -1
  74. package/dist/bundle/{program-QPQDSGYA.js → program-P7YPHVLD.js} +41 -41
  75. package/dist/bundle/{prompt-ESZL7SGX.js → prompt-S6R7IHDK.js} +2 -2
  76. package/dist/bundle/{recognize-LQ7QOG4T.js → recognize-PFZRQ3P4.js} +1 -1
  77. package/dist/bundle/{remote-34XP4EDN.js → remote-Q37V7LUX.js} +4 -4
  78. package/dist/bundle/{rerank-7F6NLBCW.js → rerank-V5YQQQAM.js} +4 -4
  79. package/dist/bundle/{serve-M6TTKXI4.js → serve-5CAD2UVG.js} +6 -6
  80. package/dist/bundle/{server-GLZ5M7PE.js → server-R6YAO2SG.js} +27 -27
  81. package/dist/bundle/server-RUQLAWWS.js +56 -0
  82. package/dist/bundle/{state-UKKPLMHS.js → state-Y3A2NEM3.js} +3 -3
  83. package/dist/bundle/{store-J2MBIDJK.js → store-H5K32CNI.js} +7 -7
  84. package/dist/bundle/store-maintenance-command-QZDC4WKW.js +45 -0
  85. package/dist/bundle/tg.js +2 -2
  86. package/dist/version.d.ts +1 -1
  87. package/dist/version.js +1 -1
  88. package/package.json +2 -2
  89. package/skills/tg-cli/SKILL.md +14 -9
  90. package/dist/bundle/server-KOW7OKE2.js +0 -56
  91. package/dist/bundle/store-maintenance-command-64B57C3U.js +0 -45
@@ -2,7 +2,7 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  storePath
5
- } from "./chunk-VM7I5VKX.js";
5
+ } from "./chunk-7GQLD5TJ.js";
6
6
  import {
7
7
  resolvePaths,
8
8
  singleLine
@@ -14,11 +14,11 @@ import {
14
14
  __name
15
15
  } from "./chunk-ZVVMGPBJ.js";
16
16
 
17
- // 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/shared-config.js
17
+ // node_modules/.pnpm/@wirecat+cli-core@0.517.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.68.1_commander@15._6629eebba461c30d3c69d5318744d1d9/node_modules/@wirecat/cli-core/dist/store/shared-config.js
18
18
  import { mkdirSync, readFileSync, renameSync, statSync, writeFileSync } from "node:fs";
19
19
  import { dirname, join, resolve } from "node:path";
20
20
 
21
- // 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/domain/task-categories.js
21
+ // node_modules/.pnpm/@wirecat+cli-core@0.517.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.68.1_commander@15._6629eebba461c30d3c69d5318744d1d9/node_modules/@wirecat/cli-core/dist/domain/task-categories.js
22
22
  var DEFAULT_TASK_CATEGORIES = [
23
23
  {
24
24
  name: "taxes",
@@ -773,7 +773,7 @@ var storedTaskCategories = /* @__PURE__ */ __name((json) => {
773
773
  }
774
774
  }, "storedTaskCategories");
775
775
 
776
- // 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/shared-config.js
776
+ // node_modules/.pnpm/@wirecat+cli-core@0.517.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.68.1_commander@15._6629eebba461c30d3c69d5318744d1d9/node_modules/@wirecat/cli-core/dist/store/shared-config.js
777
777
  var SECTION = "task_categories";
778
778
  var sharedConfigPath = /* @__PURE__ */ __name((store, env = process.env) => {
779
779
  const paths = resolvePaths({ appName: "WireCat", prefix: "WIRECAT", env });
@@ -7,7 +7,7 @@ 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/ports/app.js
10
+ // node_modules/.pnpm/@wirecat+cli-core@0.517.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.68.1_commander@15._6629eebba461c30d3c69d5318744d1d9/node_modules/@wirecat/cli-core/dist/ports/app.js
11
11
  var envName = /* @__PURE__ */ __name((app, name) => `${app.envPrefix}_${name}`, "envName");
12
12
  var readOnlyLockOf = /* @__PURE__ */ __name((app, env) => {
13
13
  const name = envName(app, "READ_ONLY");
@@ -8,14 +8,14 @@ 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.517.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.68.1_commander@15._6629eebba461c30d3c69d5318744d1d9/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.517.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.68.1_commander@15._6629eebba461c30d3c69d5318744d1d9/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.517.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.68.1_commander@15._6629eebba461c30d3c69d5318744d1d9/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.517.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.68.1_commander@15._6629eebba461c30d3c69d5318744d1d9/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.517.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.68.1_commander@15._6629eebba461c30d3c69d5318744d1d9/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.517.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.68.1_commander@15._6629eebba461c30d3c69d5318744d1d9/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.517.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.68.1_commander@15._6629eebba461c30d3c69d5318744d1d9/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)