@wirecat/mail-cli 0.32.0 → 0.34.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 (135) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/contracts/wirecat.json +2 -2
  3. package/dist/bin/mail.js +2 -2
  4. package/dist/bundle/{all-profiles-OTCWJSJS.js → all-profiles-2KUKROHY.js} +10 -10
  5. package/dist/bundle/{anthropic-GUXHDK32.js → anthropic-E5KRCEVC.js} +8 -8
  6. package/dist/bundle/{app-server-GX7DOE4O.js → app-server-HIQ3QO5K.js} +60 -52
  7. package/dist/bundle/{bun-V5QLYBZU.js → bun-KARJPE5D.js} +2 -2
  8. package/dist/bundle/{bun-sqlite-AXD5CCO3.js → bun-sqlite-NHGX6ZUN.js} +6 -6
  9. package/dist/bundle/{chunk-4YNUQGDP.js → chunk-26DYRMXE.js} +1 -1
  10. package/dist/bundle/{chunk-3URYKAJP.js → chunk-2GDLJKPT.js} +1 -1
  11. package/dist/bundle/{chunk-JUS4Y4BW.js → chunk-2SCQ7Z4I.js} +4 -4
  12. package/dist/bundle/{chunk-LVJWN2PR.js → chunk-2VBEBPGX.js} +21 -11
  13. package/dist/bundle/{chunk-OUM4ZO53.js → chunk-4SKE5GYA.js} +1 -1
  14. package/dist/bundle/{chunk-WNGMI6AZ.js → chunk-4URI6EAV.js} +3 -3
  15. package/dist/bundle/chunk-4VHK5UBM.js +170 -0
  16. package/dist/bundle/{chunk-O7OP5NQO.js → chunk-4VM3UCSO.js} +2 -2
  17. package/dist/bundle/chunk-5GANGHQI.js +721 -0
  18. package/dist/bundle/{chunk-SWXKS7JK.js → chunk-6G4VQFVX.js} +19 -19
  19. package/dist/bundle/{chunk-TDTCCHAI.js → chunk-6GGMFL7J.js} +3 -3
  20. package/dist/bundle/{chunk-6XNTELM5.js → chunk-6LFRZDPV.js} +1 -1
  21. package/dist/bundle/{chunk-CD3TAITM.js → chunk-A2Y2RFNW.js} +75 -11
  22. package/dist/bundle/{chunk-M4OP5ASJ.js → chunk-AGZ7SNFF.js} +1 -1
  23. package/dist/bundle/chunk-CKVWAUBW.js +787 -0
  24. package/dist/bundle/{chunk-SZZJOSIS.js → chunk-DYQGEZA2.js} +3 -3
  25. package/dist/bundle/{chunk-JRGPPS6H.js → chunk-DZRP4UCK.js} +13 -13
  26. package/dist/bundle/{chunk-7GW4D3OW.js → chunk-EGQJDEFY.js} +85 -39
  27. package/dist/bundle/{chunk-7MEVD5PI.js → chunk-EZAX77SM.js} +20 -20
  28. package/dist/bundle/{chunk-2IYAZRTC.js → chunk-FNYWC6A3.js} +2 -2
  29. package/dist/bundle/chunk-FORAOCZ3.js +334 -0
  30. package/dist/bundle/{chunk-IX3GUNGV.js → chunk-H77ALM2Y.js} +4 -4
  31. package/dist/bundle/{chunk-MENP3FF5.js → chunk-HH647UBC.js} +23 -23
  32. package/dist/bundle/{chunk-HUWQ7LXZ.js → chunk-HRDCH2VB.js} +947 -953
  33. package/dist/bundle/{chunk-ZDP6A2VL.js → chunk-I3MS74OF.js} +4 -4
  34. package/dist/bundle/{chunk-TWHIZJAZ.js → chunk-IMQ4CVZJ.js} +2 -2
  35. package/dist/bundle/{chunk-NMN5JUYL.js → chunk-JVGVLRBA.js} +5 -5
  36. package/dist/bundle/{chunk-U57QRUP7.js → chunk-KF6O4RZO.js} +3 -3
  37. package/dist/bundle/{chunk-LVFI3TCG.js → chunk-KGYK3OI3.js} +6 -6
  38. package/dist/bundle/{chunk-PALY5PGE.js → chunk-KLI5FKZ2.js} +7 -7
  39. package/dist/bundle/chunk-KNVTBDTE.js +72 -0
  40. package/dist/bundle/{chunk-PCWAZVAD.js → chunk-LKTDW5LH.js} +7 -7
  41. package/dist/bundle/{chunk-ECZSYLSL.js → chunk-LOSYDRJU.js} +45 -8
  42. package/dist/bundle/{chunk-HFA6AZWA.js → chunk-MDISZMK4.js} +4 -4
  43. package/dist/bundle/{chunk-GPOTPA3S.js → chunk-MGXYIVVJ.js} +14 -13
  44. package/dist/bundle/{chunk-KLGZX6QT.js → chunk-NAENYLIO.js} +2 -2
  45. package/dist/bundle/{chunk-SDAYOJLL.js → chunk-NHD5BOJU.js} +6 -6
  46. package/dist/bundle/{chunk-FA3B2DHZ.js → chunk-NI4GCP2T.js} +2 -2
  47. package/dist/bundle/{chunk-ZAD7K4TI.js → chunk-NJVJH5MH.js} +8053 -8240
  48. package/dist/bundle/{chunk-IVD3JTN5.js → chunk-NWD7AFOR.js} +2 -2
  49. package/dist/bundle/{chunk-U346WBJ5.js → chunk-NXERDBEK.js} +4 -4
  50. package/dist/bundle/{chunk-AJY2IT25.js → chunk-OG5QO5RR.js} +8 -8
  51. package/dist/bundle/{chunk-RNBG75HW.js → chunk-OJ3BI2U4.js} +29 -30
  52. package/dist/bundle/chunk-OOYRMTX5.js +374 -0
  53. package/dist/bundle/{chunk-GSXCMQWV.js → chunk-OX5MCGXL.js} +40 -40
  54. package/dist/bundle/{chunk-T577U52I.js → chunk-PA4GEJXQ.js} +9 -9
  55. package/dist/bundle/{chunk-2UMEZY6D.js → chunk-PC3N3LH3.js} +3 -3
  56. package/dist/bundle/{chunk-WQOGHND4.js → chunk-PRDKEVUL.js} +1 -1
  57. package/dist/bundle/{chunk-Z6OKVD3R.js → chunk-PVZMN3UZ.js} +8 -8
  58. package/dist/bundle/{chunk-SEJBS7SI.js → chunk-QFJC6POK.js} +1 -1
  59. package/dist/bundle/{chunk-MVMNZ3Q3.js → chunk-QOQF2TX3.js} +893 -1491
  60. package/dist/bundle/{chunk-7KCBPAQS.js → chunk-QQGPV3QN.js} +2 -2
  61. package/dist/bundle/{chunk-6SJ7HHAE.js → chunk-QXLYLVEC.js} +1 -1
  62. package/dist/bundle/chunk-QXYNDMA6.js +259 -0
  63. package/dist/bundle/{chunk-QHXOXYAT.js → chunk-R2GS3GBJ.js} +61 -59
  64. package/dist/bundle/{chunk-6TRKNME5.js → chunk-RPNQXWRS.js} +4 -4
  65. package/dist/bundle/{chunk-7C6FGWDH.js → chunk-SK3N4CK5.js} +4 -4
  66. package/dist/bundle/{chunk-GDDCKTBR.js → chunk-T2EE5M7O.js} +5 -5
  67. package/dist/bundle/{chunk-U7RLFLTM.js → chunk-TZJC4AOK.js} +30 -29
  68. package/dist/bundle/{chunk-PCMQYGEM.js → chunk-V43KEZYA.js} +9 -9
  69. package/dist/bundle/{chunk-MSK7RNOM.js → chunk-VBVR6JRC.js} +283 -515
  70. package/dist/bundle/{chunk-KLFF54AF.js → chunk-VRGEDK4T.js} +8 -8
  71. package/dist/bundle/{chunk-ANYADN3S.js → chunk-WYGDALB3.js} +31 -85
  72. package/dist/bundle/{chunk-IBCGCYRU.js → chunk-X6IGETU6.js} +2 -2
  73. package/dist/bundle/{chunk-CAQ5GW3A.js → chunk-XIF75Z7D.js} +1 -1
  74. package/dist/bundle/chunk-XWU3A7H6.js +29 -0
  75. package/dist/bundle/{chunk-XXXVVNGI.js → chunk-YWX5X5RI.js} +19 -117
  76. package/dist/bundle/{chunk-FIVFP53N.js → chunk-Z6A6QPPW.js} +1 -1
  77. package/dist/bundle/{chunk-MHXZ62CU.js → chunk-ZGZADWD7.js} +1 -1
  78. package/dist/bundle/{chunk-MT2WDBG2.js → chunk-ZZEWQR43.js} +18 -14
  79. package/dist/bundle/command-contract-PZ7VOOXP.js +39 -0
  80. package/dist/bundle/{command-server-entry-BVXOPKXH.js → command-server-entry-NF45UPEV.js} +28 -25
  81. package/dist/bundle/decode-DUZA3EHC.js +296 -0
  82. package/dist/bundle/{dispatch-DSVN7MNG.js → dispatch-CDJZAMVP.js} +8 -8
  83. package/dist/bundle/{dist-B2JWWTNN.js → dist-RH7EMC4J.js} +29 -24
  84. package/dist/bundle/{echarts-QIXLXS3G.js → echarts-GZHZBNRA.js} +2 -2
  85. package/dist/bundle/{embed-4NC4ELYP.js → embed-VE3CSJN4.js} +6 -6
  86. package/dist/bundle/{embedder-HBRDIFQC.js → embedder-DSJ77DX5.js} +9 -9
  87. package/dist/bundle/{failure-COTPFUP4.js → failure-YH6HAGFT.js} +2 -2
  88. package/dist/bundle/{first-run-6QF67AAZ.js → first-run-3L7HLYTI.js} +12 -12
  89. package/dist/bundle/first-screen-MY5KID77.js +37 -0
  90. package/dist/bundle/{instructions-MD2RZT5Z.js → instructions-OZK3BLIO.js} +1 -1
  91. package/dist/bundle/mail.js +12 -12
  92. package/dist/bundle/{mcp-TDKGDB4V.js → mcp-YUG4YR4R.js} +2 -2
  93. package/dist/bundle/meeting-combined-RYMUPY54.js +24 -0
  94. package/dist/bundle/meeting-model-U7LW5WEN.js +24 -0
  95. package/dist/bundle/meeting-semantic-64IOIQRR.js +21 -0
  96. package/dist/bundle/{node-IEVT2FSJ.js → node-OS3VWBUZ.js} +2 -2
  97. package/dist/bundle/{node-sqlite-EOTTDMOG.js → node-sqlite-RQ623VFA.js} +7 -7
  98. package/dist/bundle/{oauth-A5BEFGCI.js → oauth-CBPAG734.js} +7 -7
  99. package/dist/bundle/{open-HWN2EZYG.js → open-H4DGOMBC.js} +5 -5
  100. package/dist/bundle/{openai-PJKJ4CIU.js → openai-EMWRGR54.js} +28 -26
  101. package/dist/bundle/{process-6Q23D3TO.js → process-3TOIYASI.js} +1 -1
  102. package/dist/bundle/{program-WR43NPAV.js → program-WA6RGAJL.js} +3151 -2105
  103. package/dist/bundle/{prompt-E7Q2662O.js → prompt-22KNCMBI.js} +5 -5
  104. package/dist/bundle/{recognize-4F4PIL4B.js → recognize-UWD4RSCZ.js} +4 -4
  105. package/dist/bundle/{remote-RGJXO7XK.js → remote-LJY7MF2E.js} +9 -9
  106. package/dist/bundle/{rerank-EDY7PHMG.js → rerank-JJ6KNJFB.js} +7 -7
  107. package/dist/bundle/{serve-Q4XF6ID2.js → serve-3EPLJYVZ.js} +9 -9
  108. package/dist/bundle/{server-5I72DSDF.js → server-5JOFO4V4.js} +52 -44
  109. package/dist/bundle/server-EOQNS7B7.js +75 -0
  110. package/dist/bundle/{sqlite-runtime-PU3Z2H7C.js → sqlite-runtime-MGJA5E27.js} +6 -6
  111. package/dist/bundle/{state-CWSXJBU2.js → state-UCRDOWOP.js} +6 -6
  112. package/dist/bundle/{store-KQPKS3PX.js → store-265VRRQV.js} +25 -20
  113. package/dist/bundle/{store-ZAMKKM2A.js → store-HS272YSA.js} +21 -17
  114. package/dist/bundle/store-maintenance-command-IKZM5NRP.js +66 -0
  115. package/dist/commands/messages.js +1 -1
  116. package/dist/commands/messages.js.map +1 -1
  117. package/dist/config.d.ts +1 -0
  118. package/dist/config.d.ts.map +1 -1
  119. package/dist/identity.d.ts.map +1 -1
  120. package/dist/identity.js +2 -2
  121. package/dist/identity.js.map +1 -1
  122. package/dist/mail/cleanup.d.ts.map +1 -1
  123. package/dist/mail/cleanup.js +4 -3
  124. package/dist/mail/cleanup.js.map +1 -1
  125. package/dist/mail/rules/apply.js +1 -1
  126. package/dist/mail/rules/apply.js.map +1 -1
  127. package/dist/version.d.ts +1 -1
  128. package/dist/version.js +1 -1
  129. package/package.json +3 -3
  130. package/dist/bundle/command-contract-DZ6XRIOI.js +0 -36
  131. package/dist/bundle/decode-STN3EHT7.js +0 -162
  132. package/dist/bundle/first-screen-LXSZMK2P.js +0 -34
  133. package/dist/bundle/server-2Y5NSP2U.js +0 -67
  134. package/dist/bundle/store-maintenance-command-PMTTDR6J.js +0 -58
  135. /package/dist/bundle/{chunk-XWBPP2HX.js → chunk-FEBUZHU3.js} +0 -0
@@ -0,0 +1,374 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ validateVector
5
+ } from "./chunk-4VHK5UBM.js";
6
+ import {
7
+ meaningFloor
8
+ } from "./chunk-FORAOCZ3.js";
9
+ import {
10
+ RRF_K
11
+ } from "./chunk-5GANGHQI.js";
12
+ import {
13
+ MESSAGE_PARSING
14
+ } from "./chunk-KNVTBDTE.js";
15
+ import {
16
+ normalize
17
+ } from "./chunk-26DYRMXE.js";
18
+ import {
19
+ formatMeetingReference,
20
+ implicitTextTerms,
21
+ liftMeetingFields,
22
+ parseLucene,
23
+ parseMeetingReference,
24
+ walkQuery
25
+ } from "./chunk-QOQF2TX3.js";
26
+ import {
27
+ CliError
28
+ } from "./chunk-QQGPV3QN.js";
29
+ import {
30
+ __name
31
+ } from "./chunk-ZVVMGPBJ.js";
32
+
33
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/services/meeting-combined.js
34
+ import { createHash } from "node:crypto";
35
+
36
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/search/question-plan.js
37
+ var words = /* @__PURE__ */ __name((text) => normalize(text).match(/[\p{L}\p{N}]+/gu) ?? [], "words");
38
+ var joinedHyphens = /* @__PURE__ */ __name((text) => (normalize(text).match(new RegExp("(?<![:\\p{L}\\p{N}-])\\p{L}[\\p{L}\\p{N}]*(?:-\\p{L}[\\p{L}\\p{N}]*)+", "gu")) ?? []).map((word) => word.replaceAll("-", "")), "joinedHyphens");
39
+ var scaffolding = new Set(words("what which how many much who where when is are was were do does did can could should we the a an for of to under from in on at has have \u0441\u043A\u043E\u043B\u044C\u043A\u043E \u043A\u0430\u043A\u043E\u0439 \u043A\u0430\u043A\u0430\u044F \u043A\u0430\u043A\u0438\u0435 \u043A\u0430\u043A\u043E\u0435 \u043A\u0442\u043E \u043A\u043E\u043C\u0443 \u043A\u0435\u043C \u0433\u0434\u0435 \u043A\u043E\u0433\u0434\u0430 \u043A\u0430\u043A \u0447\u0442\u043E \u0432\u043E \u043F\u043E \u043D\u0430 \u0432 \u043A \u0441 \u0443 \u0447\u0435\u0440\u0435\u0437 \u043B\u0438 \u0434\u043E\u043B\u0436\u0435\u043D \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0443\u0436\u043D\u043E \u0438\u0434\u0451\u0442 \u0438\u0434\u0435\u0442 \u043C\u043E\u0436\u043D\u043E \u043C\u043E\u0436\u0435\u0442 \u043C\u043E\u0433\u0443\u0442"));
40
+ var questionWord = /\b(?:what|which|how|who|where|when|can|could|should)\b|(?:^|\s)(?:сколько|какой|какая|какие|какое|кто|кому|кем|где|когда|как|что|можно|может|могут|ли)(?:\s|$)/iu;
41
+ var QUESTION_STARTS = new Set(words("what which how who whom whose where when why can could should would did do does is are was were will \u0447\u0442\u043E \u043A\u0442\u043E \u043A\u043E\u0433\u043E \u043A\u043E\u043C\u0443 \u043A\u0435\u043C \u0433\u0434\u0435 \u043A\u043E\u0433\u0434\u0430 \u043A\u0430\u043A \u043A\u0430\u043A\u043E\u0439 \u043A\u0430\u043A\u0430\u044F \u043A\u0430\u043A\u043E\u0435 \u043A\u0430\u043A\u0438\u0435 \u043A\u0430\u043A\u0443\u044E \u043A\u0430\u043A\u0438\u043C \u043A\u0430\u043A\u043E\u0433\u043E \u043A\u0430\u043A\u0438\u0445 \u043F\u043E\u0447\u0435\u043C\u0443 \u0437\u0430\u0447\u0435\u043C \u043E\u0442\u043A\u0443\u0434\u0430 \u043A\u0443\u0434\u0430 \u0441\u043A\u043E\u043B\u044C\u043A\u043E \u043B\u0438 \u043C\u043E\u0436\u043D\u043E \u0440\u0430\u0437\u0432\u0435 \u0447\u0435\u0439 \u0447\u044C\u044F \u0447\u044C\u0451 \u0447\u044C\u0438"));
42
+ var QUESTION_FILLER = new Set(words("about any did does why whom whose would will \u044D\u0442\u043E \u043C\u044B \u0432\u044B \u044F \u043E\u043D\u0438 \u043E\u043D \u043E\u043D\u0430 \u043E \u043E\u0431 \u043F\u0440\u043E \u043B\u0438"));
43
+ var LINKING = new Set(words("and or but not nor with without this that these those there their they them you your our its his her all any and for into onto over then than also just and \u043F\u0440\u0438 \u0434\u043B\u044F \u0431\u0435\u0437 \u043D\u0430\u0434 \u043F\u043E\u0434 \u0438\u043B\u0438 \u043B\u0438\u0431\u043E \u0435\u0433\u043E \u0435\u0451 \u0438\u0445 \u0432\u0441\u0435 \u0432\u0441\u0451 \u0443\u0436\u0435 \u0435\u0449\u0451 \u0442\u0430\u043A \u0442\u043E\u0436\u0435 \u0442\u0430\u043A\u0436\u0435 \u0431\u044B\u043B \u0431\u044B\u043B\u0430 \u0431\u044B\u043B\u0438 \u0431\u044B\u043B\u043E \u0431\u0443\u0434\u0435\u0442 \u044D\u0442\u043E \u044D\u0442\u0430 \u044D\u0442\u043E\u0442 \u044D\u0442\u0438 \u0442\u0430\u043C \u0442\u0443\u0442"));
44
+ var isFunctionWord = /* @__PURE__ */ __name((word) => scaffolding.has(word) || QUESTION_STARTS.has(word) || QUESTION_FILLER.has(word) || LINKING.has(word), "isFunctionWord");
45
+ var questionTerms = /* @__PURE__ */ __name((text) => /\?\s*$/u.test(text) || QUESTION_STARTS.has(words(text)[0] ?? "") ? words(text).filter((word) => !scaffolding.has(word) && !QUESTION_STARTS.has(word) && !QUESTION_FILLER.has(word)) : null, "questionTerms");
46
+ function planQuestion(text, strict = false) {
47
+ if (strict)
48
+ return {
49
+ changed: false,
50
+ natural: false,
51
+ queries: [text],
52
+ scope: "",
53
+ terms: words(text),
54
+ rankingTerms: words(text),
55
+ removed: [],
56
+ aliases: []
57
+ };
58
+ const inputAst = parseLucene(text, MESSAGE_PARSING);
59
+ const rawTextual = walkQuery(inputAst.root).filter((node) => node.field === "text" || node.field === "exact");
60
+ const body = rawTextual.map((node) => node.value).join(" ");
61
+ const prefix = words(body).slice(0, 2);
62
+ const questionPrefix = [
63
+ "what",
64
+ "which",
65
+ "how",
66
+ "who",
67
+ "where",
68
+ "when",
69
+ "can",
70
+ "could",
71
+ "should",
72
+ "\u0441\u043A\u043E\u043B\u044C\u043A\u043E",
73
+ "\u043A\u0430\u043A\u043E\u0438",
74
+ "\u043A\u0430\u043A\u0430\u044F",
75
+ "\u043A\u0430\u043A\u0438\u0435",
76
+ "\u043A\u0430\u043A\u043E\u0435",
77
+ "\u043A\u0442\u043E",
78
+ "\u043A\u043E\u043C\u0443",
79
+ "\u043A\u0435\u043C",
80
+ "\u0433\u0434\u0435",
81
+ "\u043A\u043E\u0433\u0434\u0430",
82
+ "\u043A\u0430\u043A",
83
+ "\u0447\u0442\u043E",
84
+ "\u043C\u043E\u0436\u043D\u043E",
85
+ "\u043C\u043E\u0436\u0435\u0442",
86
+ "\u043C\u043E\u0433\u0443\u0442"
87
+ ].includes(prefix[0] ?? "") || ["\u043A", "\u0432\u043E"].includes(prefix[0] ?? "") && ["\u043A\u043E\u043C\u0443", "\u0441\u043A\u043E\u043B\u044C\u043A\u043E"].includes(prefix[1] ?? "");
88
+ const natural = questionWord.test(body) && (/\?/u.test(body) || questionPrefix);
89
+ let cleaned = text;
90
+ if (natural && !text.includes("\\")) {
91
+ const last = rawTextual.at(-1);
92
+ const mark = (last?.span.end ?? 0) - 1;
93
+ if (last?.operator === "wildcard" && text[mark] === "?")
94
+ cleaned = text.slice(0, mark) + text.slice(mark + 1);
95
+ }
96
+ const ast = cleaned === text ? inputAst : parseLucene(cleaned, MESSAGE_PARSING);
97
+ const predicates = walkQuery(ast.root);
98
+ const textual = predicates.filter((p) => p.field === "text" || p.field === "exact");
99
+ const fields = predicates.filter((p) => p.field !== "text" && p.field !== "exact");
100
+ const scope = fields.map((p) => {
101
+ const raw = cleaned.slice(p.span.start, p.span.end);
102
+ return new RegExp(`^${p.field}[:=<>]`, "u").test(raw) ? raw : `${p.field}:${raw}`;
103
+ }).join(" ");
104
+ const bypass = strict || !natural || implicitTextTerms(cleaned).size === 0 || // A quoted single word is how `plainQuery` keeps `10:30` or `HH:MM` literal; it is no phrase the asker wrote.
105
+ textual.some((p) => !(p.operator === "term" || p.operator === "phrase" && !/\s/u.test(p.value)) || p.field === "exact");
106
+ if (bypass)
107
+ return {
108
+ changed: false,
109
+ natural: false,
110
+ queries: [text],
111
+ scope,
112
+ terms: textual.flatMap((p) => words(p.value)),
113
+ rankingTerms: textual.flatMap((p) => words(p.value)),
114
+ removed: [],
115
+ aliases: []
116
+ };
117
+ const original = textual.flatMap((p) => words(p.value));
118
+ const removed = original.filter((w) => scaffolding.has(w));
119
+ const terms = [...new Set(original.filter((w) => !scaffolding.has(w)))];
120
+ if (!terms.length)
121
+ return {
122
+ changed: false,
123
+ natural: true,
124
+ queries: [text],
125
+ scope,
126
+ terms,
127
+ rankingTerms: original,
128
+ removed,
129
+ aliases: []
130
+ };
131
+ const alias = [...terms];
132
+ const changes = [];
133
+ const replace = /* @__PURE__ */ __name((from, to) => {
134
+ for (let i = 0; i < alias.length; i++)
135
+ if (from.includes(alias[i] ?? "")) {
136
+ changes.push(`${alias[i]} -> ${to}`);
137
+ alias[i] = to;
138
+ }
139
+ }, "replace");
140
+ if (terms.some((w) => ["refund", "euros", "euro", "money", "\u0432\u043E\u0437\u0432\u0440\u0430\u0442\u0430", "\u0432\u043E\u0437\u0432\u0440\u0430\u0442", "\u0435\u0432\u0440\u043E"].includes(w))) {
141
+ replace(["returned", "refunded", "received"], "refund");
142
+ replace(["\u0432\u0435\u0440\u043D\u0443\u043B\u0438", "\u0432\u043E\u0437\u0432\u0440\u0430\u0449\u0435\u043D\u043E", "\u043F\u0435\u0440\u0435\u0447\u0438\u0441\u043B\u0435\u043D\u043E"], "\u0432\u043E\u0437\u0432\u0440\u0430\u0442");
143
+ }
144
+ if (terms.some((w) => ["log", "logs", "retention", "backup", "\u043B\u043E\u0433\u043E\u0432", "\u043B\u043E\u0433\u0438", "\u0445\u0440\u0430\u043D\u0435\u043D\u0438\u0435", "\u0445\u0440\u0430\u043D\u0435\u043D\u0438\u044F"].includes(w))) {
145
+ replace(["lifetime", "kept", "keep"], "retention");
146
+ replace(["\u0445\u0440\u0430\u043D\u044F\u0442\u0441\u044F", "\u0445\u0440\u0430\u043D\u044F\u0442", "\u0445\u0440\u0430\u043D\u0438\u0442\u044C", "\u0441\u0440\u043E\u043A"], "\u0445\u0440\u0430\u043D\u0435\u043D\u0438\u0435");
147
+ }
148
+ if (terms.includes("service") || terms.includes("build"))
149
+ replace(["currently", "now"], "current");
150
+ const render = /* @__PURE__ */ __name((ws) => [...new Set(ws)].join(" ") + (scope ? ` ${scope}` : ""), "render");
151
+ const queries = [.../* @__PURE__ */ new Set([render(terms), render(alias)])].slice(0, 2);
152
+ return { changed: true, natural: true, queries, scope, terms, rankingTerms: original, removed, aliases: changes };
153
+ }
154
+ __name(planQuestion, "planQuestion");
155
+ var questionText = /* @__PURE__ */ __name((text) => text.replace(new RegExp("(?<=\\p{L})\\?(?=\\s|$)", "gu"), "").replace(/"(?:[^"\\]|\\.)*"|(?<=\d):(?=\d)/gu, (found) => found === ":" ? " " : found), "questionText");
156
+ var lookupTerms = /* @__PURE__ */ __name((plan) => [
157
+ ...new Set(plan.terms.concat(plan.aliases.flatMap((alias) => words(alias.split(" -> ")[1] ?? ""))))
158
+ ], "lookupTerms");
159
+ var anyOfTerms = /* @__PURE__ */ __name((terms, scope) => `(${terms.join(" OR ")})${scope ? ` ${scope}` : ""}`, "anyOfTerms");
160
+ var questionLookup = /* @__PURE__ */ __name((text) => {
161
+ let plan;
162
+ try {
163
+ plan = planQuestion(questionText(text));
164
+ } catch (error) {
165
+ if (error instanceof CliError)
166
+ return void 0;
167
+ throw error;
168
+ }
169
+ const terms = plan.changed ? lookupTerms(plan) : [];
170
+ return terms.length ? anyOfTerms(terms, plan.scope) : void 0;
171
+ }, "questionLookup");
172
+
173
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/services/meeting-hit-search.js
174
+ var refreshMeetingIndex = /* @__PURE__ */ __name(async (meetings, accountId, signal) => {
175
+ let before = Number.POSITIVE_INFINITY;
176
+ for (; ; ) {
177
+ signal?.throwIfAborted();
178
+ const { indexed, remaining } = await meetings.indexSearch({
179
+ accountId,
180
+ limit: 1e3,
181
+ maxReadBytes: 64 * 1024 ** 2,
182
+ signal
183
+ });
184
+ if (remaining === 0 || indexed === 0 || remaining >= before)
185
+ return;
186
+ before = remaining;
187
+ }
188
+ }, "refreshMeetingIndex");
189
+ var resolveMeetingSelection = /* @__PURE__ */ __name(async (store, request) => {
190
+ const { project, tag, topic, ...input } = request;
191
+ input.signal?.throwIfAborted();
192
+ if (project !== void 0 && input.projectId !== void 0 || [tag, topic].filter((value) => value !== void 0).length + Number(input.tagId !== void 0) > 1)
193
+ throw new CliError("validation_error", "choose one project selector and one tag or topic selector");
194
+ const selection = [];
195
+ const knowledge = store.knowledge;
196
+ if (!knowledge && [project, tag, topic].some((value) => value !== void 0))
197
+ throw new CliError("configuration_error", "this store cannot resolve project, tag or topic names");
198
+ for (const [kind, name] of [
199
+ ["project", project],
200
+ ["tag", tag],
201
+ ["topic", topic]
202
+ ]) {
203
+ if (name === void 0)
204
+ continue;
205
+ if (!knowledge)
206
+ continue;
207
+ const found = await knowledge.resolveVocabulary(name, { kind, signal: input.signal });
208
+ input.signal?.throwIfAborted();
209
+ if (found.ambiguous || found.matches.length !== 1)
210
+ throw new CliError(found.matches.length ? "validation_error" : "not_found", `the ${kind} name needs one canonical record`, {
211
+ candidates: found.matches.map((entry2) => ({ kind: entry2.kind, id: entry2.id, name: entry2.name }))
212
+ });
213
+ const entry = found.matches[0];
214
+ const id = Number(entry?.id);
215
+ if (!entry || entry.kind !== kind || !Number.isSafeInteger(id) || id < 1)
216
+ throw new CliError("invalid_response", "vocabulary resolution returned an invalid canonical record");
217
+ if (kind === "project")
218
+ input.projectId = id;
219
+ else
220
+ input.tagId = id;
221
+ selection.push({ kind, id, name: entry.name, by: "explicit-link" });
222
+ }
223
+ return { input, selection };
224
+ }, "resolveMeetingSelection");
225
+
226
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/services/meeting-combined.js
227
+ var DEPTH = 200;
228
+ var cursorOf = /* @__PURE__ */ __name((value, key) => {
229
+ if (value === void 0)
230
+ return 0;
231
+ let cursor;
232
+ try {
233
+ cursor = JSON.parse(Buffer.from(value, "base64url").toString("utf8"));
234
+ } catch {
235
+ throw new CliError("validation_error", "the cursor is not from a combined meeting search; search again");
236
+ }
237
+ if (cursor?.version !== 1 || cursor.key !== key || !Number.isSafeInteger(cursor.offset) || cursor.offset < 0)
238
+ throw new CliError("validation_error", "the cursor belongs to another query, filter or model; search again");
239
+ return cursor.offset;
240
+ }, "cursorOf");
241
+ var searchMeetingsCombined = /* @__PURE__ */ __name(async (store, embedder, typed, request) => {
242
+ const { maxChunks, maxRows, maxTextBytes, ...chosen } = request;
243
+ const { query, request: words2 } = liftMeetingFields(typed, chosen);
244
+ const { input, selection } = await resolveMeetingSelection(store, words2);
245
+ const { after, limit = 20, maxReadBytes, ...filters } = input;
246
+ const terms = questionTerms(query);
247
+ const wordQuery = terms === null ? query : terms.join(" ");
248
+ const key = createHash("sha256").update(JSON.stringify([query, embedder.key, Object.entries(filters).filter(([name]) => name !== "signal")])).digest("base64url");
249
+ const offset = cursorOf(after, key);
250
+ let byWords = [];
251
+ let indexing = "ready";
252
+ let refused;
253
+ if (wordQuery.trim()) {
254
+ await refreshMeetingIndex(store.meetings, input.accountId, input.signal);
255
+ try {
256
+ const page = await store.meetings.searchHits(wordQuery, { ...filters, limit: DEPTH, maxReadBytes });
257
+ byWords = page.items;
258
+ indexing = page.coverage.indexing;
259
+ } catch (error) {
260
+ if (!(error instanceof CliError) || error.code !== "validation_error")
261
+ throw error;
262
+ refused = error.message;
263
+ }
264
+ }
265
+ input.signal?.throwIfAborted();
266
+ const vectors = await embedder.embed([query], "query");
267
+ if (vectors.length !== 1)
268
+ throw new CliError("invalid_response", "Meeting query model returned another vector count");
269
+ const vector = vectors[0];
270
+ const ranked = await store.meetingVectors.ranked(embedder.key, validateVector(vector, embedder.dims), {
271
+ ...filters,
272
+ limit: DEPTH,
273
+ ...maxChunks === void 0 ? {} : { maxChunks },
274
+ ...maxRows === void 0 ? {} : { maxRows },
275
+ ...maxTextBytes === void 0 ? {} : { maxTextBytes }
276
+ });
277
+ const floor = meaningFloor(embedder.key);
278
+ const byMeaning = ranked.items.filter(({ score }) => score > floor);
279
+ const merged = /* @__PURE__ */ new Map();
280
+ byMeaning.forEach((hit, rank) => {
281
+ const reference = { type: "meeting", accountId: input.accountId, meetingId: hit.meetingId };
282
+ const first = formatMeetingReference({
283
+ ...reference,
284
+ transcriptId: hit.transcriptId,
285
+ cuePosition: hit.firstPosition
286
+ });
287
+ merged.set(`${hit.transcriptId}:${hit.firstPosition}`, {
288
+ ref: first,
289
+ meetingId: hit.meetingId,
290
+ scope: "transcript",
291
+ text: hit.text,
292
+ startMs: null,
293
+ source: { title: hit.title, startedAt: hit.startedAt, url: null },
294
+ by: ["meaning"],
295
+ score: hit.score,
296
+ passage: {
297
+ first,
298
+ last: formatMeetingReference({ ...reference, transcriptId: hit.transcriptId, cuePosition: hit.lastPosition })
299
+ },
300
+ fused: 1 / (RRF_K + rank + 1)
301
+ });
302
+ });
303
+ byWords.forEach((hit, rank) => {
304
+ const share = 1 / (RRF_K + rank + 1);
305
+ const cue = hit.scope === "transcript" ? parseMeetingReference(hit.ref) : void 0;
306
+ const within = cue?.cuePosition === void 0 ? void 0 : byMeaning.find((passage) => passage.transcriptId === cue.transcriptId && passage.firstPosition <= cue.cuePosition && cue.cuePosition <= passage.lastPosition);
307
+ const held = within && merged.get(`${within.transcriptId}:${within.firstPosition}`);
308
+ const found = {
309
+ ref: hit.ref,
310
+ text: hit.text,
311
+ startMs: hit.startMs,
312
+ ...hit.match === void 0 ? {} : { match: hit.match },
313
+ ...hit.corrections === void 0 ? {} : { corrections: hit.corrections }
314
+ };
315
+ if (held && !held.by.includes("words")) {
316
+ Object.assign(held, found, { by: ["words", "meaning"], fused: held.fused + share });
317
+ if (hit.source?.url)
318
+ held.source.url = hit.source.url;
319
+ } else if (held)
320
+ held.fused += share;
321
+ else
322
+ merged.set(`w:${hit.ref}:${hit.scope}:${hit.id}`, {
323
+ ...found,
324
+ meetingId: hit.meetingId,
325
+ scope: hit.scope,
326
+ source: {
327
+ title: hit.source?.title ?? null,
328
+ startedAt: hit.source?.startedAt ?? null,
329
+ url: hit.source?.url ?? null
330
+ },
331
+ by: ["words"],
332
+ score: null,
333
+ fused: share
334
+ });
335
+ });
336
+ const ordered = [...merged.values()].sort((a, b) => b.fused - a.fused || Number(b.by.includes("words")) - Number(a.by.includes("words")) || (b.score ?? -2) - (a.score ?? -2));
337
+ const items = ordered.slice(offset, offset + limit).map(({ fused: _, ...hit }) => hit);
338
+ const hasMore = ordered.length > offset + limit;
339
+ return {
340
+ items,
341
+ hasMore,
342
+ nextCursor: hasMore ? Buffer.from(JSON.stringify({ version: 1, key, offset: offset + limit })).toString("base64url") : null,
343
+ selection,
344
+ words: {
345
+ query: wordQuery,
346
+ ...terms === null ? {} : { from: "question" },
347
+ ...refused === void 0 ? {} : { refused }
348
+ },
349
+ model: { key: embedder.key, model: embedder.model, kind: embedder.kind, dims: embedder.dims },
350
+ coverage: {
351
+ archiveCompleteness: "unknown",
352
+ indexCompleteness: "unknown",
353
+ indexing,
354
+ /** Every vector of the selection was compared; false when `maxChunks` stopped the scan. */
355
+ meaningScanComplete: ranked.complete,
356
+ scanned: ranked.scanned,
357
+ /** Each side ranks this many at most; pages past them hold nothing more. */
358
+ depth: DEPTH
359
+ }
360
+ };
361
+ }, "searchMeetingsCombined");
362
+
363
+ export {
364
+ words,
365
+ joinedHyphens,
366
+ isFunctionWord,
367
+ planQuestion,
368
+ questionText,
369
+ lookupTerms,
370
+ anyOfTerms,
371
+ questionLookup,
372
+ resolveMeetingSelection,
373
+ searchMeetingsCombined
374
+ };
@@ -12,10 +12,10 @@ import {
12
12
  refuseWriteBeforeConnecting,
13
13
  registerPrompts,
14
14
  syncsFirst
15
- } from "./chunk-RNBG75HW.js";
15
+ } from "./chunk-OJ3BI2U4.js";
16
16
  import {
17
17
  stdinFieldOf
18
- } from "./chunk-MHXZ62CU.js";
18
+ } from "./chunk-ZGZADWD7.js";
19
19
  import {
20
20
  BinaryResource,
21
21
  Picture,
@@ -36,31 +36,21 @@ import {
36
36
  tool,
37
37
  toolKey,
38
38
  toolsFromCommands
39
- } from "./chunk-7GW4D3OW.js";
39
+ } from "./chunk-EGQJDEFY.js";
40
40
  import {
41
41
  agentJson,
42
42
  skillResource
43
- } from "./chunk-MENP3FF5.js";
44
- import {
45
- instructions
46
- } from "./chunk-CAQ5GW3A.js";
43
+ } from "./chunk-HH647UBC.js";
47
44
  import {
48
45
  StdioServerTransport,
49
46
  answeredWire,
50
47
  callerOf,
51
48
  callingAgent,
52
49
  serveStdio
53
- } from "./chunk-TDTCCHAI.js";
54
- import {
55
- McpServer,
56
- ResourceTemplate
57
- } from "./chunk-5D4AEUVA.js";
58
- import {
59
- mcpHttpMarker
60
- } from "./chunk-U346WBJ5.js";
50
+ } from "./chunk-6GGMFL7J.js";
61
51
  import {
62
52
  connectedFor
63
- } from "./chunk-XXXVVNGI.js";
53
+ } from "./chunk-YWX5X5RI.js";
64
54
  import {
65
55
  capability,
66
56
  dateWindow,
@@ -70,10 +60,20 @@ import {
70
60
  servicesFor,
71
61
  storedDeps,
72
62
  wholeList
73
- } from "./chunk-HUWQ7LXZ.js";
63
+ } from "./chunk-HRDCH2VB.js";
64
+ import {
65
+ instructions
66
+ } from "./chunk-XIF75Z7D.js";
67
+ import {
68
+ McpServer,
69
+ ResourceTemplate
70
+ } from "./chunk-5D4AEUVA.js";
71
+ import {
72
+ mcpHttpMarker
73
+ } from "./chunk-NXERDBEK.js";
74
74
  import {
75
75
  findCommand
76
- } from "./chunk-NMN5JUYL.js";
76
+ } from "./chunk-JVGVLRBA.js";
77
77
  import {
78
78
  DEFAULT_OUTPUT_BYTES,
79
79
  changesAuthorityAt,
@@ -88,31 +88,31 @@ import {
88
88
  rootOf2 as rootOf,
89
89
  sealed,
90
90
  snakeKeys
91
- } from "./chunk-MSK7RNOM.js";
91
+ } from "./chunk-VBVR6JRC.js";
92
92
  import {
93
93
  fetchesAt,
94
94
  levelFor,
95
95
  readKeysForCommand
96
- } from "./chunk-PCWAZVAD.js";
96
+ } from "./chunk-LKTDW5LH.js";
97
97
  import {
98
98
  withCaller
99
- } from "./chunk-Z6OKVD3R.js";
99
+ } from "./chunk-PVZMN3UZ.js";
100
100
  import {
101
101
  openStore,
102
102
  pdfPreviewLimits
103
- } from "./chunk-ZAD7K4TI.js";
103
+ } from "./chunk-NJVJH5MH.js";
104
104
  import {
105
105
  typedCommand
106
- } from "./chunk-U7RLFLTM.js";
107
- import {
108
- timezoneOf
109
- } from "./chunk-MVMNZ3Q3.js";
106
+ } from "./chunk-TZJC4AOK.js";
110
107
  import {
111
108
  isCliFailure
112
- } from "./chunk-O7OP5NQO.js";
109
+ } from "./chunk-4VM3UCSO.js";
110
+ import {
111
+ timezoneOf
112
+ } from "./chunk-QOQF2TX3.js";
113
113
  import {
114
114
  warmEmbedders
115
- } from "./chunk-LVFI3TCG.js";
115
+ } from "./chunk-KGYK3OI3.js";
116
116
  import {
117
117
  description,
118
118
  errorObjectOf,
@@ -129,19 +129,19 @@ import {
129
129
  regex,
130
130
  strictObject,
131
131
  string
132
- } from "./chunk-ECZSYLSL.js";
132
+ } from "./chunk-LOSYDRJU.js";
133
133
  import {
134
134
  CliError,
135
135
  visibleControls
136
- } from "./chunk-7KCBPAQS.js";
136
+ } from "./chunk-QQGPV3QN.js";
137
137
  import {
138
138
  __name
139
139
  } from "./chunk-ZVVMGPBJ.js";
140
140
 
141
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/mcp/server.js
141
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/mcp/server.js
142
142
  import { randomUUID } from "node:crypto";
143
143
 
144
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/mcp/agent-log.js
144
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/mcp/agent-log.js
145
145
  var agentLog = /* @__PURE__ */ __name((open) => {
146
146
  let held;
147
147
  return {
@@ -160,7 +160,7 @@ var agentLog = /* @__PURE__ */ __name((open) => {
160
160
  };
161
161
  }, "agentLog");
162
162
 
163
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/mcp/resources.js
163
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/mcp/resources.js
164
164
  var LISTED = 100;
165
165
  var registerResources = /* @__PURE__ */ __name((server, session, { command, name, limit, recorded, withStore, messenger, guard, assertRead }) => {
166
166
  server.registerResource("chat", new ResourceTemplate(`${command}://chat/{id}`, {
@@ -198,7 +198,7 @@ var registerResources = /* @__PURE__ */ __name((server, session, { command, name
198
198
  });
199
199
  }, "registerResources");
200
200
 
201
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/mcp/session.js
201
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/mcp/session.js
202
202
  var HARMLESS = /* @__PURE__ */ new Set(["validation_error", "not_found", "permission_error", "confirmation_required", "rate_limited"]);
203
203
  var harmless = /* @__PURE__ */ __name((code) => HARMLESS.has(code), "harmless");
204
204
  var MessengerSession = class {
@@ -273,7 +273,7 @@ var MessengerSession = class {
273
273
  }
274
274
  };
275
275
 
276
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/mcp/tools/attachments.js
276
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/mcp/tools/attachments.js
277
277
  var attachmentsTools = /* @__PURE__ */ __name((messenger) => {
278
278
  const _command = messenger.app.command;
279
279
  return {
@@ -327,7 +327,7 @@ var attachmentsTools = /* @__PURE__ */ __name((messenger) => {
327
327
  };
328
328
  }, "attachmentsTools");
329
329
 
330
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/mcp/tools/messages-photo.js
330
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/mcp/tools/messages-photo.js
331
331
  var PHOTO_LIMIT = 512 * 1024;
332
332
  var IMAGE_TYPES = [
333
333
  ["image/jpeg", (b) => b[0] === 255 && b[1] === 216 && b[2] === 255],
@@ -383,7 +383,7 @@ var readUpTo = /* @__PURE__ */ __name(async (file, limit, saveIt) => {
383
383
  return new Uint8Array(Buffer.concat(chunks));
384
384
  }, "readUpTo");
385
385
 
386
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/mcp/tools/stats.js
386
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/mcp/tools/stats.js
387
387
  var statsTools = /* @__PURE__ */ __name((messenger) => ({
388
388
  stats_charts: tool({
389
389
  title: "A chart from a chat's statistics",
@@ -420,14 +420,14 @@ var statsTools = /* @__PURE__ */ __name((messenger) => ({
420
420
  })
421
421
  }), "statsTools");
422
422
 
423
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/mcp/tools.js
423
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/mcp/tools.js
424
424
  var pictureTools = /* @__PURE__ */ __name((messenger) => Object.fromEntries(Object.entries({
425
425
  ...messagesPhotoTools(messenger),
426
426
  ...attachmentsTools(messenger),
427
427
  ...statsTools(messenger)
428
428
  }).map(([name, definition]) => [name, { ...definition, input: strictObject(definition.input.entries) }])), "pictureTools");
429
429
 
430
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/mcp/server.js
430
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/mcp/server.js
431
431
  var PER_RUN = /* @__PURE__ */ new Set([
432
432
  "streams",
433
433
  "stdin",
@@ -744,7 +744,7 @@ var serveOverStdio = /* @__PURE__ */ __name(async (command, context, messenger,
744
744
  }, "serveOverStdio");
745
745
  var serveOverHttpUntilStopped = /* @__PURE__ */ __name(async (command, context, messenger, options, http) => {
746
746
  const { session, embedders, build, log } = createServer(command, context, messenger, options);
747
- const { serveOverHttp } = await import("./serve-Q4XF6ID2.js");
747
+ const { serveOverHttp } = await import("./serve-3EPLJYVZ.js");
748
748
  const appName = messenger.app.command;
749
749
  const appEnvPrefix = messenger.app.envPrefix;
750
750
  const listening = await serveOverHttp(build, {
@@ -4,18 +4,18 @@ import {
4
4
  PLAIN_HTTP_REFUSED,
5
5
  modelAddressAllowed,
6
6
  onThisComputer
7
- } from "./chunk-GDDCKTBR.js";
7
+ } from "./chunk-T2EE5M7O.js";
8
8
  import {
9
9
  readSharedSection,
10
10
  sharedConfigPath,
11
11
  writeSharedSection
12
- } from "./chunk-PALY5PGE.js";
12
+ } from "./chunk-KLI5FKZ2.js";
13
13
  import {
14
14
  unit
15
- } from "./chunk-LVFI3TCG.js";
15
+ } from "./chunk-KGYK3OI3.js";
16
16
  import {
17
17
  storePath
18
- } from "./chunk-FA3B2DHZ.js";
18
+ } from "./chunk-NI4GCP2T.js";
19
19
  import {
20
20
  boolean,
21
21
  isoTimestamp,
@@ -23,18 +23,18 @@ import {
23
23
  safeParse,
24
24
  strictObject,
25
25
  string
26
- } from "./chunk-ECZSYLSL.js";
26
+ } from "./chunk-LOSYDRJU.js";
27
27
  import {
28
28
  CliError
29
- } from "./chunk-7KCBPAQS.js";
29
+ } from "./chunk-QQGPV3QN.js";
30
30
  import {
31
31
  __name
32
32
  } from "./chunk-ZVVMGPBJ.js";
33
33
 
34
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/embeddings/remote.js
34
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/embeddings/remote.js
35
35
  import { setTimeout } from "node:timers/promises";
36
36
 
37
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/models/local-only.js
37
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/models/local-only.js
38
38
  var SECTION = "local_only";
39
39
  var Setting = strictObject({
40
40
  on: boolean(),
@@ -68,7 +68,7 @@ var refuseModelAddress = /* @__PURE__ */ __name((env, address, what) => {
68
68
  refuseOffComputer(env, address, what);
69
69
  }, "refuseModelAddress");
70
70
 
71
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/embeddings/remote.js
71
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/embeddings/remote.js
72
72
  var OPENAI_URL = "https://api.openai.com/v1";
73
73
  var OPENAI_MODELS = {
74
74
  "text-embedding-3-small": { dims: 1536, perMillion: 0.02 },
@@ -2,16 +2,16 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  alive
5
- } from "./chunk-WQOGHND4.js";
5
+ } from "./chunk-PRDKEVUL.js";
6
6
  import {
7
7
  resolvePaths,
8
8
  writeSecurely
9
- } from "./chunk-7MEVD5PI.js";
9
+ } from "./chunk-EZAX77SM.js";
10
10
  import {
11
11
  __name
12
12
  } from "./chunk-ZVVMGPBJ.js";
13
13
 
14
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/background/lock.js
14
+ // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/background/lock.js
15
15
  import { existsSync, linkSync, mkdirSync, readdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
16
16
  import { dirname, join } from "node:path";
17
17
  var lockPath = /* @__PURE__ */ __name((app, profile, env) => join(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "serve", `${profile}.lock`), "lockPath");