@wirecat/tg-cli 0.127.0 → 0.129.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 (126) hide show
  1. package/contracts/wirecat.json +26 -0
  2. package/dist/bin/tg.js +2 -2
  3. package/dist/bundle/{adapter-EZFS2UR6.js → adapter-2XFPXBTA.js} +60 -52
  4. package/dist/bundle/{all-profiles-TNIUBQK6.js → all-profiles-GXFPZLYU.js} +20 -30
  5. package/dist/bundle/{anthropic-NGIS5LTL.js → anthropic-FHS5XNK5.js} +5 -5
  6. package/dist/bundle/{app-server-RPU76G7D.js → app-server-IZMFSFP2.js} +56 -63
  7. package/dist/bundle/{bot-api-QJ6U6BLG.js → bot-api-LQP75V5I.js} +61 -53
  8. package/dist/bundle/{bot-history-THULK2C6.js → bot-history-EJQOD4AQ.js} +22 -18
  9. package/dist/bundle/{bun-QLSLLP27.js → bun-GBAZFRCV.js} +2 -2
  10. package/dist/bundle/{bun-sqlite-SH5245ZY.js → bun-sqlite-JB4BX6X7.js} +6 -6
  11. package/dist/bundle/chunk-2JZJPVBH.js +334 -0
  12. package/dist/bundle/{chunk-DNNYE6PS.js → chunk-2LPODKIF.js} +18 -15
  13. package/dist/bundle/chunk-3KZG63EH.js +170 -0
  14. package/dist/bundle/chunk-3XMUP55N.js +372 -0
  15. package/dist/bundle/{chunk-BWHVHPAQ.js → chunk-4BJAQNJ5.js} +9 -9
  16. package/dist/bundle/{chunk-M4OP5ASJ.js → chunk-66PL7P4C.js} +1 -1
  17. package/dist/bundle/{chunk-JWEKUAVZ.js → chunk-66UG67CE.js} +12 -12
  18. package/dist/bundle/{chunk-R52ZZZKZ.js → chunk-6JBRQ6PM.js} +55 -22
  19. package/dist/bundle/{chunk-Y7UA7HGL.js → chunk-6M3FAHPS.js} +3 -3
  20. package/dist/bundle/{chunk-TGKTIDYS.js → chunk-7F3LOHRB.js} +290 -504
  21. package/dist/bundle/{chunk-XS5C5TQ7.js → chunk-AUNNJDVD.js} +25 -8
  22. package/dist/bundle/{chunk-ERUB3KU3.js → chunk-B5RGPZDZ.js} +7 -7
  23. package/dist/bundle/{chunk-YRZXOQOB.js → chunk-B6NQJAUC.js} +2 -2
  24. package/dist/bundle/{chunk-4FFKCC7Y.js → chunk-BMSS3PCY.js} +62 -36
  25. package/dist/bundle/{chunk-VMV5CMLH.js → chunk-C4ALE7CH.js} +1 -1
  26. package/dist/bundle/{chunk-K4VO7S6Q.js → chunk-CKJ73EF3.js} +1 -1
  27. package/dist/bundle/{chunk-IX3GUNGV.js → chunk-CLG2ISQH.js} +4 -4
  28. package/dist/bundle/{chunk-MTU3UP5U.js → chunk-EB2JE722.js} +1 -1
  29. package/dist/bundle/{chunk-EGNQSWPH.js → chunk-EUL7HMUL.js} +2 -2
  30. package/dist/bundle/{chunk-2R6ZSE3O.js → chunk-F6CV4KUN.js} +2 -2
  31. package/dist/bundle/{chunk-7KCBPAQS.js → chunk-F6MLJ3V5.js} +2 -2
  32. package/dist/bundle/{chunk-ZSS3BH6Z.js → chunk-FH4YIBBH.js} +4 -4
  33. package/dist/bundle/chunk-FIO5NMK3.js +771 -0
  34. package/dist/bundle/{chunk-FSDLSEZA.js → chunk-G2SMVYBU.js} +2 -2
  35. package/dist/bundle/{chunk-FIVFP53N.js → chunk-GA3URWIF.js} +1 -1
  36. package/dist/bundle/{chunk-4CQ3PV3V.js → chunk-GGGBPWUS.js} +10 -15
  37. package/dist/bundle/{chunk-3CV5TBBR.js → chunk-GSHTLLCJ.js} +2 -2
  38. package/dist/bundle/{chunk-IWJ5OLU6.js → chunk-GYCKRIRK.js} +3 -3
  39. package/dist/bundle/{chunk-H7GAFD4N.js → chunk-HHUK3XO5.js} +1 -1
  40. package/dist/bundle/{chunk-NM5GBJME.js → chunk-HT6OFANN.js} +19 -19
  41. package/dist/bundle/{chunk-GHVRCLJI.js → chunk-I5PILOTU.js} +1 -1
  42. package/dist/bundle/chunk-IBSHQWIJ.js +29 -0
  43. package/dist/bundle/{chunk-5SN6KFPC.js → chunk-IRWSZJYL.js} +65 -60
  44. package/dist/bundle/{chunk-3I3TGKVG.js → chunk-IV6SIKVH.js} +4 -4
  45. package/dist/bundle/{chunk-URFBZNLU.js → chunk-JUFLELQ7.js} +2 -2
  46. package/dist/bundle/{chunk-5FDYMMEQ.js → chunk-KY3JLXW2.js} +4 -4
  47. package/dist/bundle/{chunk-YZGIQY2R.js → chunk-LPT5T6PU.js} +37 -28
  48. package/dist/bundle/chunk-LQPZDDDP.js +259 -0
  49. package/dist/bundle/{chunk-CXWAKV2O.js → chunk-M327UNS6.js} +6 -6
  50. package/dist/bundle/{chunk-4MKRKW6V.js → chunk-MS6YEIG5.js} +13 -13
  51. package/dist/bundle/{chunk-UY2TRFYN.js → chunk-MVFSWKTM.js} +12 -12
  52. package/dist/bundle/{chunk-45URY64S.js → chunk-NRCY3WBC.js} +2 -2
  53. package/dist/bundle/{chunk-SN52ZGFN.js → chunk-O2ULG7OO.js} +3 -3
  54. package/dist/bundle/{chunk-JF7D2Y4K.js → chunk-OJMDKWWL.js} +670 -519
  55. package/dist/bundle/{chunk-UW34Z7J3.js → chunk-OKTRB4ZQ.js} +1 -1
  56. package/dist/bundle/{chunk-7GE6KMLB.js → chunk-OOQVHMCS.js} +15 -15
  57. package/dist/bundle/{chunk-P5NJECXX.js → chunk-OWVQMK7G.js} +939 -909
  58. package/dist/bundle/{chunk-YIPOWJPN.js → chunk-P4FZJO5F.js} +2 -2
  59. package/dist/bundle/{chunk-LD42OGKK.js → chunk-PS7ZS5HD.js} +4 -4
  60. package/dist/bundle/{chunk-J6FHZXNS.js → chunk-PWQKGFS2.js} +49 -55
  61. package/dist/bundle/{chunk-APSMQIA4.js → chunk-QBNEWEJC.js} +3 -3
  62. package/dist/bundle/{chunk-Y65BQJOY.js → chunk-QDEP2QOA.js} +3 -3
  63. package/dist/bundle/{chunk-FD44T7HC.js → chunk-QFVIHBLD.js} +1 -1
  64. package/dist/bundle/{chunk-5KZKVKWU.js → chunk-QJDHRBXL.js} +7 -7
  65. package/dist/bundle/{chunk-LOG65WHO.js → chunk-QJLCEOAP.js} +1 -1
  66. package/dist/bundle/{chunk-XUAVZ6YX.js → chunk-RAFK5KXU.js} +9 -9
  67. package/dist/bundle/{chunk-UIQMBOXU.js → chunk-RPWYTOLI.js} +5 -5
  68. package/dist/bundle/{chunk-QPVCFSVU.js → chunk-RZPMFVWM.js} +6 -6
  69. package/dist/bundle/chunk-S5UTBEV3.js +1974 -0
  70. package/dist/bundle/{chunk-X4ECHJNG.js → chunk-SYZXOEHY.js} +98 -6
  71. package/dist/bundle/{chunk-BNM6KNUQ.js → chunk-SZB5WRMI.js} +2 -2
  72. package/dist/bundle/{chunk-5AOFOJQA.js → chunk-TGRB4SSZ.js} +4 -4
  73. package/dist/bundle/{chunk-Y62I2T36.js → chunk-VSPSHBAC.js} +2 -2
  74. package/dist/bundle/{chunk-JFQZ6BWI.js → chunk-VTJ3AOTT.js} +17 -17
  75. package/dist/bundle/{chunk-HPM47WO3.js → chunk-VXWDQDRU.js} +6130 -6675
  76. package/dist/bundle/{chunk-S3XUJPPL.js → chunk-X5H5NERR.js} +6 -6
  77. package/dist/bundle/{chunk-3WI53AA4.js → chunk-XHX5D5VE.js} +1174 -2636
  78. package/dist/bundle/chunk-XXW6PFAX.js +16 -0
  79. package/dist/bundle/{chunk-NBN5OYXH.js → chunk-ZRQQOGAZ.js} +4 -4
  80. package/dist/bundle/command-contract-G752BLKA.js +37 -0
  81. package/dist/bundle/{command-server-entry-UG2CLYXI.js → command-server-entry-YR6ONDWO.js} +27 -24
  82. package/dist/bundle/decode-VUKGWFSW.js +296 -0
  83. package/dist/bundle/{dispatch-PRAIGIFS.js → dispatch-ST5FK2KI.js} +8 -8
  84. package/dist/bundle/{echarts-CN6ZVAJZ.js → echarts-GOV5M733.js} +2 -2
  85. package/dist/bundle/{embed-M4EHIKA5.js → embed-2IVIYNAJ.js} +6 -6
  86. package/dist/bundle/{embedder-K2XL2UB4.js → embedder-2HU7JYZK.js} +9 -9
  87. package/dist/bundle/{entry-6M55YL2H.js → entry-CSTCXYI5.js} +9 -9
  88. package/dist/bundle/{failure-7Y34AUJT.js → failure-GMUQKQ5K.js} +2 -2
  89. package/dist/bundle/{first-run-TLJILIOF.js → first-run-3IZGXZT5.js} +12 -11
  90. package/dist/bundle/first-screen-7QSNCZIK.js +35 -0
  91. package/dist/bundle/{instructions-QLC2AXAB.js → instructions-YSXV6FAC.js} +1 -1
  92. package/dist/bundle/{mcp-TDKGDB4V.js → mcp-VFIOZDVY.js} +2 -2
  93. package/dist/bundle/meeting-combined-X4E3LSIJ.js +23 -0
  94. package/dist/bundle/meeting-model-FQBDHGRU.js +24 -0
  95. package/dist/bundle/meeting-semantic-ONNEOJX5.js +21 -0
  96. package/dist/bundle/{node-BAA3T4CH.js → node-FMQWCZRS.js} +2 -2
  97. package/dist/bundle/{node-sqlite-FNYVHQCO.js → node-sqlite-YN5OKOC6.js} +7 -7
  98. package/dist/bundle/{oauth-32T5KL5E.js → oauth-EW7PTZVT.js} +7 -7
  99. package/dist/bundle/{open-4VQ6FUEI.js → open-Q2RDY344.js} +5 -5
  100. package/dist/bundle/{openai-HDOKCN3Z.js → openai-STON6G3O.js} +28 -26
  101. package/dist/bundle/{process-GOUBIWKC.js → process-OQUC2TW3.js} +1 -1
  102. package/dist/bundle/{program-QFXJL2R5.js → program-7JJHTZ25.js} +66 -57
  103. package/dist/bundle/{prompt-YYODWYFO.js → prompt-WHVF7UTW.js} +5 -5
  104. package/dist/bundle/{proxy-transport-DP7SIMIC.js → proxy-transport-A4MRO3PF.js} +5 -5
  105. package/dist/bundle/{recognize-7ZULX5HL.js → recognize-YDQWMXNI.js} +4 -4
  106. package/dist/bundle/{remote-TUG7M5Y5.js → remote-477LQHP6.js} +9 -9
  107. package/dist/bundle/{rerank-D2EZWG66.js → rerank-4YPB26FG.js} +7 -7
  108. package/dist/bundle/{serve-MP3GA2XX.js → serve-FXJNUOTS.js} +9 -9
  109. package/dist/bundle/{server-D277L3H3.js → server-2S6HFBGR.js} +52 -42
  110. package/dist/bundle/server-UOSUTZNE.js +69 -0
  111. package/dist/bundle/{sqlite-runtime-XHZXEOLY.js → sqlite-runtime-RXYNJYMC.js} +6 -6
  112. package/dist/bundle/{state-YI3W6HGO.js → state-I2GGYGRL.js} +6 -6
  113. package/dist/bundle/{store-CIZPJFWE.js → store-KX3AAQZH.js} +25 -20
  114. package/dist/bundle/{store-C4RFPYPK.js → store-VQXIB6KV.js} +17 -13
  115. package/dist/bundle/store-maintenance-command-LW2MMDLY.js +60 -0
  116. package/dist/bundle/tg.js +13 -13
  117. package/dist/version.d.ts +1 -1
  118. package/dist/version.js +1 -1
  119. package/package.json +3 -3
  120. package/dist/bundle/chunk-ZIPUVOGT.js +0 -76
  121. package/dist/bundle/command-contract-DY6Y4TES.js +0 -34
  122. package/dist/bundle/decode-3NEUZJ2N.js +0 -162
  123. package/dist/bundle/first-screen-WME7ILW2.js +0 -32
  124. package/dist/bundle/server-GEP7QXGI.js +0 -62
  125. package/dist/bundle/store-maintenance-command-JNDYWFD2.js +0 -52
  126. /package/dist/bundle/{chunk-XWBPP2HX.js → chunk-ZI3YTXSF.js} +0 -0
@@ -18,7 +18,7 @@ import {
18
18
  isJSONRPCRequest,
19
19
  isJSONRPCResultResponse,
20
20
  modernOnlyStrictRejection,
21
- process,
21
+ process as process2,
22
22
  requestMetaOf,
23
23
  serializeMessage,
24
24
  serverIdentityOf,
@@ -29,7 +29,7 @@ import {
29
29
  agentOf,
30
30
  clientHash,
31
31
  currentCaller
32
- } from "./chunk-5KZKVKWU.js";
32
+ } from "./chunk-QJDHRBXL.js";
33
33
  import {
34
34
  __name
35
35
  } from "./chunk-ZVVMGPBJ.js";
@@ -43,7 +43,7 @@ var StdioServerTransport = class {
43
43
  _readBuffer;
44
44
  _started = false;
45
45
  _closed = false;
46
- constructor(_stdin = process.stdin, _stdout = process.stdout, options) {
46
+ constructor(_stdin = process2.stdin, _stdout = process2.stdout, options) {
47
47
  this._stdin = _stdin;
48
48
  this._stdout = _stdout;
49
49
  this._readBuffer = new ReadBuffer({ maxBufferSize: options?.maxBufferSize });
@@ -541,7 +541,7 @@ function toError(value) {
541
541
  }
542
542
  __name(toError, "toError");
543
543
 
544
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._7ae9f69690019eb17dc9f8442c19cb73/node_modules/@wirecat/cli-core/dist/mcp/caller.js
544
+ // node_modules/.pnpm/@wirecat+cli-core@0.665.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.101.0_commander@15_1712fa6347d2f5f4f52e592cd2c1c3bf/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")
@@ -567,7 +567,7 @@ var callerOf = /* @__PURE__ */ __name((ctx, tool, source) => {
567
567
  const meta = ctx?.mcpReq?._meta;
568
568
  const requestId = ctx?.mcpReq?.id;
569
569
  const initialized = source.client?.();
570
- const proxied = initialized?.name === PROXY_CLIENT_NAME ? passedOn(meta?.[CALLER_META_KEY], tool) : void 0;
570
+ const proxied = initialized?.name === PROXY_CLIENT_NAME && !ctx?.http ? passedOn(meta?.[CALLER_META_KEY], tool) : void 0;
571
571
  if (proxied)
572
572
  return proxied;
573
573
  const client = clientFrom(meta?.[CLIENT_INFO_META_KEY]) ?? clientFrom(initialized);
@@ -629,11 +629,103 @@ var passedOn = /* @__PURE__ */ __name((value, tool) => {
629
629
  };
630
630
  }, "passedOn");
631
631
 
632
+ // node_modules/.pnpm/@wirecat+cli-core@0.665.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.101.0_commander@15_1712fa6347d2f5f4f52e592cd2c1c3bf/node_modules/@wirecat/cli-core/dist/mcp/stdio-wire.js
633
+ import { PassThrough, Writable } from "node:stream";
634
+ var lineReader = /* @__PURE__ */ __name((onMessage) => {
635
+ let rest = "";
636
+ return (chunk) => {
637
+ const lines = (rest + chunk.toString()).split("\n");
638
+ rest = lines.pop() ?? "";
639
+ for (const line of lines) {
640
+ try {
641
+ const message = JSON.parse(line);
642
+ if (message !== null && typeof message === "object")
643
+ onMessage(message);
644
+ } catch {
645
+ }
646
+ }
647
+ };
648
+ }, "lineReader");
649
+ var answeredWire = /* @__PURE__ */ __name((source, sink) => {
650
+ const asked = /* @__PURE__ */ new Set();
651
+ let settle;
652
+ const input = new PassThrough();
653
+ const answeredOne = /* @__PURE__ */ __name((id) => {
654
+ asked.delete(JSON.stringify(id));
655
+ if (asked.size === 0)
656
+ settle?.();
657
+ }, "answeredOne");
658
+ const onData = lineReader(({ jsonrpc, id, method, params }) => {
659
+ if (jsonrpc !== "2.0" || typeof method !== "string")
660
+ return;
661
+ if (method === "notifications/cancelled")
662
+ answeredOne(params?.requestId);
663
+ else if (id !== void 0)
664
+ asked.add(JSON.stringify(id));
665
+ });
666
+ const output = new Writable({
667
+ write: /* @__PURE__ */ __name((chunk, _encoding, done) => {
668
+ noteAnswer(chunk);
669
+ sink.write(chunk, done);
670
+ }, "write")
671
+ });
672
+ const noteAnswer = lineReader(({ id, method }) => {
673
+ if (id !== void 0 && method === void 0)
674
+ answeredOne(id);
675
+ });
676
+ const forward = /* @__PURE__ */ __name((chunk) => {
677
+ onData(chunk);
678
+ input.write(chunk);
679
+ }, "forward");
680
+ source.on("data", forward);
681
+ const ended = new Promise((resolve) => {
682
+ source.once("end", resolve);
683
+ source.once("close", resolve);
684
+ });
685
+ return {
686
+ input,
687
+ output,
688
+ /**
689
+ * Until the client's stdin ended and everything it asked was answered, or until a stop: `signal` for a session
690
+ * relayed on other streams, SIGINT or SIGTERM for this process's own. A stop never waits for answers.
691
+ */
692
+ finished: /* @__PURE__ */ __name((signal) => new Promise((resolve) => {
693
+ const stop = /* @__PURE__ */ __name(() => {
694
+ process.off("SIGINT", stop);
695
+ process.off("SIGTERM", stop);
696
+ resolve();
697
+ }, "stop");
698
+ if (signal) {
699
+ if (signal.aborted)
700
+ return resolve();
701
+ signal.addEventListener("abort", stop, { once: true });
702
+ } else {
703
+ process.once("SIGINT", stop);
704
+ process.once("SIGTERM", stop);
705
+ }
706
+ ended.then(() => {
707
+ if (asked.size === 0)
708
+ stop();
709
+ else
710
+ settle = stop;
711
+ });
712
+ }), "finished"),
713
+ /** Lets go of the real stdin, so it no longer holds the process open. */
714
+ release: /* @__PURE__ */ __name(() => {
715
+ source.off("data", forward);
716
+ if (source.listenerCount("data") === 0)
717
+ source.pause();
718
+ input.end();
719
+ }, "release")
720
+ };
721
+ }, "answeredWire");
722
+
632
723
  export {
633
724
  StdioServerTransport,
634
725
  serveStdio,
635
726
  callingAgent,
636
727
  CALLER_META_KEY,
637
728
  PROXY_CLIENT_NAME,
638
- callerOf
729
+ callerOf,
730
+ answeredWire
639
731
  };
@@ -2,11 +2,11 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  openCache
5
- } from "./chunk-CXWAKV2O.js";
5
+ } from "./chunk-M327UNS6.js";
6
6
  import {
7
7
  CliError,
8
8
  isCliError
9
- } from "./chunk-7KCBPAQS.js";
9
+ } from "./chunk-F6MLJ3V5.js";
10
10
  import {
11
11
  __name
12
12
  } from "./chunk-ZVVMGPBJ.js";
@@ -5,15 +5,15 @@ import {
5
5
  readLock,
6
6
  releaseLock,
7
7
  takeLock
8
- } from "./chunk-SN52ZGFN.js";
8
+ } from "./chunk-O2ULG7OO.js";
9
9
  import {
10
10
  __name
11
11
  } from "./chunk-ZVVMGPBJ.js";
12
12
 
13
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._7ae9f69690019eb17dc9f8442c19cb73/node_modules/@wirecat/cli-core/dist/mcp/http/state.js
13
+ // node_modules/.pnpm/@wirecat+cli-core@0.665.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.101.0_commander@15_1712fa6347d2f5f4f52e592cd2c1c3bf/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.659.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._7ae9f69690019eb17dc9f8442c19cb73/node_modules/@wirecat/cli-core/dist/mcp/http/activity.js
16
+ // node_modules/.pnpm/@wirecat+cli-core@0.665.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.101.0_commander@15_1712fa6347d2f5f4f52e592cd2c1c3bf/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.659.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._7ae9f69690019eb17dc9f8442c19cb73/node_modules/@wirecat/cli-core/dist/mcp/http/state.js
89
+ // node_modules/.pnpm/@wirecat+cli-core@0.665.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.101.0_commander@15_1712fa6347d2f5f4f52e592cd2c1c3bf/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");
@@ -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-NM5GBJME.js";
5
+ } from "./chunk-HT6OFANN.js";
6
6
  import {
7
7
  __name
8
8
  } from "./chunk-ZVVMGPBJ.js";
9
9
 
10
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._7ae9f69690019eb17dc9f8442c19cb73/node_modules/@wirecat/cli-core/dist/store/path.js
10
+ // node_modules/.pnpm/@wirecat+cli-core@0.665.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.101.0_commander@15_1712fa6347d2f5f4f52e592cd2c1c3bf/node_modules/@wirecat/cli-core/dist/store/path.js
11
11
  import { realpathSync } from "node:fs";
12
12
  import { userInfo } from "node:os";
13
13
  import { basename, dirname, isAbsolute, join, relative, resolve } from "node:path";
@@ -23,28 +23,28 @@ import {
23
23
  tagMemberIds,
24
24
  thingOf,
25
25
  write
26
- } from "./chunk-HPM47WO3.js";
26
+ } from "./chunk-VXWDQDRU.js";
27
27
  import {
28
28
  fold
29
- } from "./chunk-4CQ3PV3V.js";
29
+ } from "./chunk-XXW6PFAX.js";
30
30
  import {
31
31
  ADDED_PROVIDER,
32
32
  filesAccountSql,
33
33
  folderProviderOf,
34
34
  folderProviderSql,
35
35
  isDocumentAccountProvider
36
- } from "./chunk-3WI53AA4.js";
36
+ } from "./chunk-S5UTBEV3.js";
37
37
  import {
38
38
  damagedFile
39
- } from "./chunk-APSMQIA4.js";
39
+ } from "./chunk-QBNEWEJC.js";
40
40
  import {
41
41
  CliError
42
- } from "./chunk-7KCBPAQS.js";
42
+ } from "./chunk-F6MLJ3V5.js";
43
43
  import {
44
44
  __name
45
45
  } from "./chunk-ZVVMGPBJ.js";
46
46
 
47
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._7ae9f69690019eb17dc9f8442c19cb73/node_modules/@wirecat/cli-core/dist/store/damage.js
47
+ // node_modules/.pnpm/@wirecat+cli-core@0.665.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.101.0_commander@15_1712fa6347d2f5f4f52e592cd2c1c3bf/node_modules/@wirecat/cli-core/dist/store/damage.js
48
48
  var DERIVED = /* @__PURE__ */ new Set(["mentions", "involvements", "embeddings"]);
49
49
  var named = /* @__PURE__ */ __name((tables) => tables.length <= 5 ? tables.join(", ") : `${tables.slice(0, 5).join(", ")} and ${tables.length - 5} more`, "named");
50
50
  var isDerivedTable = /* @__PURE__ */ __name((table, searchIndexes) => DERIVED.has(table) || table.startsWith("vector_index_") || searchIndexes.some((index) => table === index || table.startsWith(`${index}_`)), "isDerivedTable");
@@ -147,11 +147,11 @@ var storeDamageReport = /* @__PURE__ */ __name(({ health, command, mark = null,
147
147
  };
148
148
  }, "storeDamageReport");
149
149
 
150
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._7ae9f69690019eb17dc9f8442c19cb73/node_modules/@wirecat/cli-core/dist/store/document-transfer/index.js
150
+ // node_modules/.pnpm/@wirecat+cli-core@0.665.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.101.0_commander@15_1712fa6347d2f5f4f52e592cd2c1c3bf/node_modules/@wirecat/cli-core/dist/store/document-transfer/index.js
151
151
  import { realpathSync, statSync } from "node:fs";
152
152
  import { resolve } from "node:path";
153
153
 
154
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._7ae9f69690019eb17dc9f8442c19cb73/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/people.js
154
+ // node_modules/.pnpm/@wirecat+cli-core@0.665.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.101.0_commander@15_1712fa6347d2f5f4f52e592cd2c1c3bf/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/people.js
155
155
  var planPeople = /* @__PURE__ */ __name((database, snapshot, mappings, bindings, conflicts) => {
156
156
  const creatable = /* @__PURE__ */ new Set();
157
157
  let people = 0, identities = 0;
@@ -214,11 +214,11 @@ var copyPeople = /* @__PURE__ */ __name((database, snapshot, mappings, now) => {
214
214
  }
215
215
  }, "copyPeople");
216
216
 
217
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._7ae9f69690019eb17dc9f8442c19cb73/node_modules/@wirecat/cli-core/dist/store/document-transfer/digest.js
217
+ // node_modules/.pnpm/@wirecat+cli-core@0.665.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.101.0_commander@15_1712fa6347d2f5f4f52e592cd2c1c3bf/node_modules/@wirecat/cli-core/dist/store/document-transfer/digest.js
218
218
  import { createHash } from "node:crypto";
219
219
  var digest = /* @__PURE__ */ __name((value) => createHash("sha256").update(JSON.stringify(value)).digest("hex"), "digest");
220
220
 
221
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._7ae9f69690019eb17dc9f8442c19cb73/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/collection.js
221
+ // node_modules/.pnpm/@wirecat+cli-core@0.665.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.101.0_commander@15_1712fa6347d2f5f4f52e592cd2c1c3bf/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/collection.js
222
222
  var documentsKeyOf = /* @__PURE__ */ __name((collection) => {
223
223
  const colon = collection.indexOf(":");
224
224
  const provider = collection.slice(0, colon);
@@ -262,7 +262,7 @@ var currentCollection = /* @__PURE__ */ __name((row) => {
262
262
  };
263
263
  }, "currentCollection");
264
264
 
265
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._7ae9f69690019eb17dc9f8442c19cb73/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/plan.js
265
+ // node_modules/.pnpm/@wirecat+cli-core@0.665.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.101.0_commander@15_1712fa6347d2f5f4f52e592cd2c1c3bf/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/plan.js
266
266
  var planTransfer = /* @__PURE__ */ __name((database, snapshot, sourceKey, bindings) => {
267
267
  const mappings = /* @__PURE__ */ new Map();
268
268
  const missing = /* @__PURE__ */ new Set(), conflicts = /* @__PURE__ */ new Set();
@@ -429,7 +429,7 @@ var planTransfer = /* @__PURE__ */ __name((database, snapshot, sourceKey, bindin
429
429
  };
430
430
  }, "planTransfer");
431
431
 
432
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._7ae9f69690019eb17dc9f8442c19cb73/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/snapshot.js
432
+ // node_modules/.pnpm/@wirecat+cli-core@0.665.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.101.0_commander@15_1712fa6347d2f5f4f52e592cd2c1c3bf/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/snapshot.js
433
433
  var TRANSFER_TABLES = { document: "documents", note: "notes", memory: "memories", fact: "facts" };
434
434
  var MAX_ENTITIES = 1e3;
435
435
  var MAX_AUXILIARY = 1e4;
@@ -591,7 +591,7 @@ var transferSnapshot = /* @__PURE__ */ __name((database, collection) => read(dat
591
591
  };
592
592
  }), "transferSnapshot");
593
593
 
594
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._7ae9f69690019eb17dc9f8442c19cb73/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/apply.js
594
+ // node_modules/.pnpm/@wirecat+cli-core@0.665.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.101.0_commander@15_1712fa6347d2f5f4f52e592cd2c1c3bf/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/apply.js
595
595
  var providerHere = /* @__PURE__ */ __name(({ provider, name, settings }) => {
596
596
  if (provider !== "folder" || String(name ?? "").startsWith("google-drive:"))
597
597
  return provider ?? null;
@@ -763,7 +763,7 @@ var remapEntity = /* @__PURE__ */ __name((database, entity, id, mappings) => {
763
763
  database.prepare(`UPDATE ${TRANSFER_TABLES[entity.kind]} SET ${columns.join(",")} WHERE id=?`).run(...values, id);
764
764
  }, "remapEntity");
765
765
 
766
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._7ae9f69690019eb17dc9f8442c19cb73/node_modules/@wirecat/cli-core/dist/store/document-transfer/index.js
766
+ // node_modules/.pnpm/@wirecat+cli-core@0.665.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.101.0_commander@15_1712fa6347d2f5f4f52e592cd2c1c3bf/node_modules/@wirecat/cli-core/dist/store/document-transfer/index.js
767
767
  var locations = /* @__PURE__ */ __name((options) => {
768
768
  for (const value of [options.source, options.destination, options.collection])
769
769
  if (typeof value !== "string" || !value.trim())
@@ -865,7 +865,7 @@ var applyWith = /* @__PURE__ */ __name(async (location, options) => {
865
865
  }
866
866
  }, "applyWith");
867
867
 
868
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._7ae9f69690019eb17dc9f8442c19cb73/node_modules/@wirecat/cli-core/dist/store/health.js
868
+ // node_modules/.pnpm/@wirecat+cli-core@0.665.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.101.0_commander@15_1712fa6347d2f5f4f52e592cd2c1c3bf/node_modules/@wirecat/cli-core/dist/store/health.js
869
869
  import { existsSync, statSync as statSync2 } from "node:fs";
870
870
  var JSON_COLUMNS = {
871
871
  accounts: ["settings"],
@@ -1007,7 +1007,7 @@ var storeHealth = /* @__PURE__ */ __name(async (path, { deep = false } = {}) =>
1007
1007
  }
1008
1008
  }, "storeHealth");
1009
1009
 
1010
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._7ae9f69690019eb17dc9f8442c19cb73/node_modules/@wirecat/cli-core/dist/store/project-transfer/preview.js
1010
+ // node_modules/.pnpm/@wirecat+cli-core@0.665.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.101.0_commander@15_1712fa6347d2f5f4f52e592cd2c1c3bf/node_modules/@wirecat/cli-core/dist/store/project-transfer/preview.js
1011
1011
  var previewProjectAnnotationSnapshot = /* @__PURE__ */ __name(async (options) => {
1012
1012
  if (!options || typeof options !== "object" || Array.isArray(options))
1013
1013
  throw new CliError("validation_error", "project preview options are required");
@@ -1033,7 +1033,7 @@ var previewProjectAnnotationSnapshot = /* @__PURE__ */ __name(async (options) =>
1033
1033
  });
1034
1034
  }, "previewProjectAnnotationSnapshot");
1035
1035
 
1036
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._7ae9f69690019eb17dc9f8442c19cb73/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot.js
1036
+ // node_modules/.pnpm/@wirecat+cli-core@0.665.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.101.0_commander@15_1712fa6347d2f5f4f52e592cd2c1c3bf/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot.js
1037
1037
  var snapshotProjectAnnotations = /* @__PURE__ */ __name(async (options) => {
1038
1038
  if (!options || typeof options !== "object" || Array.isArray(options))
1039
1039
  throw new CliError("validation_error", "snapshot options are required");