@wirecat/mail-cli 0.1.1 → 0.2.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 (183) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/README.md +4 -3
  3. package/dist/bin/mail.js +2 -2
  4. package/dist/bundle/{all-profiles-TKMBELRZ.js → all-profiles-7WILOT5E.js} +5 -5
  5. package/dist/bundle/{anthropic-7LMUAEIZ.js → anthropic-NHWLIMEZ.js} +3 -3
  6. package/dist/bundle/{app-server-JGMIJDD4.js → app-server-XDMYCJLV.js} +39 -39
  7. package/dist/bundle/{bun-XRO6XJHQ.js → bun-GTG5IYLQ.js} +2 -2
  8. package/dist/bundle/{bun-sqlite-Z54LEHVM.js → bun-sqlite-KGH5F33G.js} +2 -2
  9. package/dist/bundle/{chunk-JVMVLITS.js → chunk-2X4WYZPA.js} +4 -2
  10. package/dist/bundle/{chunk-GN62YOT5.js → chunk-4I3YT5KK.js} +4 -4
  11. package/dist/bundle/{chunk-MS53RALV.js → chunk-5FLW25US.js} +5 -5
  12. package/dist/bundle/{chunk-FZ5FXIG6.js → chunk-5JOKRFWE.js} +1 -1
  13. package/dist/bundle/{chunk-KHTO2Q6E.js → chunk-6HIW7IJL.js} +4 -4
  14. package/dist/bundle/{chunk-TVREDYX4.js → chunk-76IKLP2M.js} +95 -91
  15. package/dist/bundle/{chunk-ZANYM66S.js → chunk-77VHMI3A.js} +1 -1
  16. package/dist/bundle/{chunk-TQFCPUIM.js → chunk-7LKJDJNS.js} +1 -1
  17. package/dist/bundle/{chunk-WLFLBWNH.js → chunk-7QEE5I7H.js} +2 -2
  18. package/dist/bundle/{chunk-6MAZWSC3.js → chunk-7REG25RM.js} +3 -3
  19. package/dist/bundle/{chunk-TWTATDM7.js → chunk-AJIT2T3F.js} +6 -6
  20. package/dist/bundle/{chunk-JBBZCTTF.js → chunk-AROBJF5P.js} +1 -1
  21. package/dist/bundle/{chunk-NK7EB63L.js → chunk-BKZEYTLU.js} +849 -440
  22. package/dist/bundle/{chunk-4FEMINO2.js → chunk-BPF7IXJT.js} +5 -5
  23. package/dist/bundle/{chunk-BTQX2ZSZ.js → chunk-BUOSCMCD.js} +2 -2
  24. package/dist/bundle/{chunk-5NYMNSSO.js → chunk-CT7NG7BI.js} +3 -3
  25. package/dist/bundle/{chunk-TWPDVUBR.js → chunk-D7UZXUSB.js} +2 -2
  26. package/dist/bundle/{chunk-OTUOZ33L.js → chunk-DDMJ3RVO.js} +2 -2
  27. package/dist/bundle/{chunk-3KEVLSNN.js → chunk-EKE3R36Y.js} +46 -8
  28. package/dist/bundle/{chunk-YO4CUH5E.js → chunk-ETPT7TPW.js} +1 -1
  29. package/dist/bundle/{chunk-3KOA73LS.js → chunk-GPAAQ6LY.js} +14 -14
  30. package/dist/bundle/{chunk-GQQJOH7A.js → chunk-GQKYSGIA.js} +58 -46
  31. package/dist/bundle/{chunk-QLEUNU6G.js → chunk-H5BW7454.js} +4 -4
  32. package/dist/bundle/{chunk-KM7Q67Z3.js → chunk-H66ZMBDD.js} +1 -1
  33. package/dist/bundle/{chunk-VEIZZRQ5.js → chunk-H7NUGJPV.js} +12 -3
  34. package/dist/bundle/{chunk-2LLNPNMB.js → chunk-H7XOHNRY.js} +1 -1
  35. package/dist/bundle/{chunk-F6D6PJ34.js → chunk-HJRUFT5Y.js} +5 -5
  36. package/dist/bundle/{chunk-52F5DWS5.js → chunk-MABCR67K.js} +1 -1
  37. package/dist/bundle/{chunk-IK5TH3O7.js → chunk-MDVXIPA3.js} +10 -10
  38. package/dist/bundle/{chunk-YPQQ5J4X.js → chunk-QJHCKFFC.js} +16 -16
  39. package/dist/bundle/{chunk-Z34ICZA3.js → chunk-QLYHLW54.js} +5 -5
  40. package/dist/bundle/{chunk-7SXGLT6T.js → chunk-QUGFBY7O.js} +9 -8
  41. package/dist/bundle/{chunk-CEW6KIFA.js → chunk-QUSZWBZF.js} +21 -21
  42. package/dist/bundle/{chunk-FDCGTODC.js → chunk-R5JD4GMA.js} +1 -1
  43. package/dist/bundle/{chunk-K4FVKPDQ.js → chunk-S2GSU4MT.js} +9 -9
  44. package/dist/bundle/{chunk-T6464KYA.js → chunk-STC45HZX.js} +204 -203
  45. package/dist/bundle/{chunk-75CWWETH.js → chunk-SVNTRF5O.js} +11 -11
  46. package/dist/bundle/{chunk-GWDCKUBI.js → chunk-THVLMTH7.js} +30 -29
  47. package/dist/bundle/{chunk-4E7BN3TC.js → chunk-TMVIQJCG.js} +2 -2
  48. package/dist/bundle/{chunk-EOEDICIE.js → chunk-UZR3IKS7.js} +1 -1
  49. package/dist/bundle/{chunk-CH6RXYAX.js → chunk-VBLFQJY3.js} +1 -1
  50. package/dist/bundle/{chunk-GAH7N7HO.js → chunk-VRQRBVKT.js} +44 -44
  51. package/dist/bundle/{chunk-GK4M2SUP.js → chunk-VWO3XXSF.js} +1 -1
  52. package/dist/bundle/{chunk-QQB7WT7R.js → chunk-WJ3LUWRN.js} +3 -3
  53. package/dist/bundle/{chunk-3E3WA2L6.js → chunk-Y5WA7AOA.js} +21 -21
  54. package/dist/bundle/{chunk-TE5U5OAM.js → chunk-Y6KUKIQZ.js} +2 -2
  55. package/dist/bundle/{chunk-J6MSJLIW.js → chunk-YQAUH3PN.js} +1 -1
  56. package/dist/bundle/{chunk-MNOIRJEO.js → chunk-Z6F7EXT2.js} +7 -7
  57. package/dist/bundle/{chunk-WXAXYJJ7.js → chunk-ZKH5CHGI.js} +5 -5
  58. package/dist/bundle/{chunk-UH4DDRHA.js → chunk-ZNYJG4AY.js} +42 -42
  59. package/dist/bundle/{command-contract-WU434ZUL.js → command-contract-Y42ULKE5.js} +13 -13
  60. package/dist/bundle/{decode-YB3ZDTES.js → decode-L4X542L3.js} +2 -2
  61. package/dist/bundle/{dist-A6GKSKFC.js → dist-WKIRHOLK.js} +14 -14
  62. package/dist/bundle/{echarts-YNGCOYHW.js → echarts-G6QLXR4X.js} +2 -2
  63. package/dist/bundle/{embed-LWNHIRBQ.js → embed-E33ZBHQR.js} +3 -3
  64. package/dist/bundle/{embedder-2LYD3U37.js → embedder-EMBCIVGF.js} +6 -6
  65. package/dist/bundle/{first-run-N3HJKGU7.js → first-run-WF2HF5FI.js} +5 -5
  66. package/dist/bundle/{first-screen-4U2DMV3G.js → first-screen-DZFOUUZC.js} +14 -14
  67. package/dist/bundle/{instructions-GJHHFV64.js → instructions-DUH7265J.js} +1 -1
  68. package/dist/bundle/mail.js +2 -2
  69. package/dist/bundle/{node-GFOH6FKP.js → node-73PKCCE7.js} +2 -2
  70. package/dist/bundle/{node-sqlite-NBXQXBIU.js → node-sqlite-FDD5N6GC.js} +2 -2
  71. package/dist/bundle/{oauth-56EFO5AQ.js → oauth-ND3K2F7B.js} +4 -4
  72. package/dist/bundle/{open-2V7QZQJP.js → open-FZYY6TKE.js} +1 -1
  73. package/dist/bundle/{openai-V3SVACVL.js → openai-BXOF6XIM.js} +10 -10
  74. package/dist/bundle/{process-XVDX4SPD.js → process-TXIK4VJP.js} +1 -1
  75. package/dist/bundle/{program-JTJB26P3.js → program-2SUR4WOS.js} +1699 -1458
  76. package/dist/bundle/{prompt-YKWAI222.js → prompt-I5GCP73M.js} +2 -2
  77. package/dist/bundle/{recognize-PAR66KVM.js → recognize-ILYEKXVB.js} +1 -1
  78. package/dist/bundle/{remote-CE43TKXC.js → remote-SSPZEAJ7.js} +4 -4
  79. package/dist/bundle/{rerank-M7S7P2TW.js → rerank-NAO5RMGB.js} +4 -4
  80. package/dist/bundle/{serve-ENPMIV6J.js → serve-UDXIEQKC.js} +6 -6
  81. package/dist/bundle/{server-MBEZLVKZ.js → server-KTPELKAN.js} +31 -31
  82. package/dist/bundle/server-UZFSEKNJ.js +63 -0
  83. package/dist/bundle/{sqlite-runtime-HVGDHBJJ.js → sqlite-runtime-AONFLND6.js} +2 -2
  84. package/dist/bundle/{state-QZSOSKBD.js → state-I4PLX3UB.js} +3 -3
  85. package/dist/bundle/{store-UJ7SNKXI.js → store-OHQH3MGN.js} +30 -12
  86. package/dist/bundle/{store-2BUX6LVX.js → store-ZPPRXGPY.js} +9 -9
  87. package/dist/bundle/store-maintenance-command-QOYXEBT6.js +52 -0
  88. package/dist/commands/account.d.ts.map +1 -1
  89. package/dist/commands/account.js +6 -5
  90. package/dist/commands/account.js.map +1 -1
  91. package/dist/commands/context.d.ts +19 -8
  92. package/dist/commands/context.d.ts.map +1 -1
  93. package/dist/commands/context.js +14 -10
  94. package/dist/commands/context.js.map +1 -1
  95. package/dist/commands/folders.js +4 -4
  96. package/dist/commands/folders.js.map +1 -1
  97. package/dist/commands/login.d.ts +2 -2
  98. package/dist/commands/login.d.ts.map +1 -1
  99. package/dist/commands/login.js +3 -5
  100. package/dist/commands/login.js.map +1 -1
  101. package/dist/commands/mailbox.d.ts +2 -1
  102. package/dist/commands/mailbox.d.ts.map +1 -1
  103. package/dist/commands/mailbox.js.map +1 -1
  104. package/dist/commands/session-start.d.ts +3 -0
  105. package/dist/commands/session-start.d.ts.map +1 -0
  106. package/dist/commands/session-start.js +117 -0
  107. package/dist/commands/session-start.js.map +1 -0
  108. package/dist/commands/session.d.ts.map +1 -1
  109. package/dist/commands/session.js +9 -117
  110. package/dist/commands/session.js.map +1 -1
  111. package/dist/commands/status.d.ts.map +1 -1
  112. package/dist/commands/status.js +8 -20
  113. package/dist/commands/status.js.map +1 -1
  114. package/dist/commands/sync.d.ts.map +1 -1
  115. package/dist/commands/sync.js +49 -26
  116. package/dist/commands/sync.js.map +1 -1
  117. package/dist/config.d.ts +2 -0
  118. package/dist/config.d.ts.map +1 -1
  119. package/dist/config.js +4 -0
  120. package/dist/config.js.map +1 -1
  121. package/dist/discovery.d.ts +4 -15
  122. package/dist/discovery.d.ts.map +1 -1
  123. package/dist/discovery.js +19 -92
  124. package/dist/discovery.js.map +1 -1
  125. package/dist/mail/backend.d.ts +36 -0
  126. package/dist/mail/backend.d.ts.map +1 -0
  127. package/dist/mail/backend.js +2 -0
  128. package/dist/mail/backend.js.map +1 -0
  129. package/dist/mail/imap/account.d.ts +5 -0
  130. package/dist/mail/imap/account.d.ts.map +1 -0
  131. package/dist/mail/imap/account.js +41 -0
  132. package/dist/mail/imap/account.js.map +1 -0
  133. package/dist/mail/imap/connection.d.ts +62 -0
  134. package/dist/mail/imap/connection.d.ts.map +1 -0
  135. package/dist/mail/imap/connection.js +188 -0
  136. package/dist/mail/imap/connection.js.map +1 -0
  137. package/dist/mail/{imap-errors.d.ts → imap/errors.d.ts} +1 -1
  138. package/dist/mail/imap/errors.d.ts.map +1 -0
  139. package/dist/mail/{imap-errors.js → imap/errors.js} +1 -1
  140. package/dist/mail/imap/errors.js.map +1 -0
  141. package/dist/mail/imap/index.d.ts +7 -0
  142. package/dist/mail/imap/index.d.ts.map +1 -0
  143. package/dist/mail/imap/index.js +11 -0
  144. package/dist/mail/imap/index.js.map +1 -0
  145. package/dist/mail/{imap-messages.d.ts → imap/messages.d.ts} +9 -9
  146. package/dist/mail/imap/messages.d.ts.map +1 -0
  147. package/dist/mail/imap/messages.js +66 -0
  148. package/dist/mail/imap/messages.js.map +1 -0
  149. package/dist/mail/imap/read.d.ts +7 -0
  150. package/dist/mail/imap/read.d.ts.map +1 -0
  151. package/dist/mail/imap/read.js +164 -0
  152. package/dist/mail/imap/read.js.map +1 -0
  153. package/dist/mail/rethread.d.ts +15 -0
  154. package/dist/mail/rethread.d.ts.map +1 -0
  155. package/dist/mail/rethread.js +52 -0
  156. package/dist/mail/rethread.js.map +1 -0
  157. package/dist/profile.d.ts +2 -1
  158. package/dist/profile.d.ts.map +1 -1
  159. package/dist/profile.js +1 -0
  160. package/dist/profile.js.map +1 -1
  161. package/dist/providers.d.ts +126 -26
  162. package/dist/providers.d.ts.map +1 -1
  163. package/dist/providers.js +141 -72
  164. package/dist/providers.js.map +1 -1
  165. package/dist/secret.d.ts +2 -1
  166. package/dist/secret.d.ts.map +1 -1
  167. package/dist/secret.js +1 -0
  168. package/dist/secret.js.map +1 -1
  169. package/dist/version.d.ts +1 -1
  170. package/dist/version.js +1 -1
  171. package/package.json +3 -2
  172. package/skills/mail-cli/SKILL.md +8 -0
  173. package/dist/bundle/server-JRTHUCVY.js +0 -63
  174. package/dist/bundle/store-maintenance-command-I7V5C44K.js +0 -52
  175. package/dist/mail/imap-errors.d.ts.map +0 -1
  176. package/dist/mail/imap-errors.js.map +0 -1
  177. package/dist/mail/imap-messages.d.ts.map +0 -1
  178. package/dist/mail/imap-messages.js +0 -66
  179. package/dist/mail/imap-messages.js.map +0 -1
  180. package/dist/mail/imap.d.ts +0 -67
  181. package/dist/mail/imap.d.ts.map +0 -1
  182. package/dist/mail/imap.js +0 -348
  183. package/dist/mail/imap.js.map +0 -1
@@ -8,7 +8,7 @@ import {
8
8
  __name
9
9
  } from "./chunk-ZVVMGPBJ.js";
10
10
 
11
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/domain/locator.js
11
+ // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/domain/locator.js
12
12
  var SCHEME = "msg:";
13
13
  var formatLocator = /* @__PURE__ */ __name(({ provider, account, chat, message }) => SCHEME + [provider, account, chat, message].map(encodeURIComponent).join("/"), "formatLocator");
14
14
  var isLocator = /* @__PURE__ */ __name((reference) => reference.trim().startsWith(SCHEME), "isLocator");
@@ -22,7 +22,7 @@ var parseLocator = /* @__PURE__ */ __name((reference) => {
22
22
  return { provider, account, chat, message };
23
23
  }, "parseLocator");
24
24
 
25
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/domain/references.js
25
+ // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/domain/references.js
26
26
  var SIMPLE_REFERENCES = [
27
27
  "note",
28
28
  "document",
@@ -94,7 +94,7 @@ var folderPath = /* @__PURE__ */ __name((path) => {
94
94
  }, "folderPath");
95
95
  var canonicalReference = /* @__PURE__ */ __name((text) => formatReference(parseReference(text)), "canonicalReference");
96
96
 
97
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/domain/providers.js
97
+ // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/domain/providers.js
98
98
  var KINDS = ["messages", "mail", "notes", "documents", "meetings", "events"];
99
99
  var PROVIDERS = [
100
100
  { name: "telegram", kind: "messages", aliases: ["tg"] },
@@ -188,7 +188,7 @@ var providerNamed = /* @__PURE__ */ __name((word) => {
188
188
  var kindIn = /* @__PURE__ */ __name((provider) => isFolderProvider(provider) ? "notes" : registry.find(({ name }) => name === provider)?.kind, "kindIn");
189
189
  var kindOf = /* @__PURE__ */ __name((provider) => kindIn(provider) ?? "messages", "kindOf");
190
190
 
191
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/domain/counters.js
191
+ // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/domain/counters.js
192
192
  var COUNTER_FIELDS = ["views", "reactions", "comments"];
193
193
  var validCounter = /* @__PURE__ */ __name((value) => typeof value === "number" && Number.isFinite(value) && value >= 0, "validCounter");
194
194
  var counterValue = /* @__PURE__ */ __name((message, field) => {
@@ -225,7 +225,7 @@ var counterFreshness = /* @__PURE__ */ __name((states) => {
225
225
  return states.some((one) => one.freshness === "stale") ? "stale" : "fresh";
226
226
  }, "counterFreshness");
227
227
 
228
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/domain/rankings-options.js
228
+ // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/domain/rankings-options.js
229
229
  var MESSAGE_MEASURES = ["views", "reactions", "forwards", "comments", "replies", "thread-size"];
230
230
  var AUTHOR_MEASURES = [
231
231
  "messages",
@@ -8,12 +8,12 @@ import {
8
8
  ACCESS_SECONDS,
9
9
  REFRESH_SECONDS,
10
10
  readStored
11
- } from "./chunk-GN62YOT5.js";
11
+ } from "./chunk-4I3YT5KK.js";
12
12
  import {
13
13
  __name
14
14
  } from "./chunk-ZVVMGPBJ.js";
15
15
 
16
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/mcp/http/oauth.js
16
+ // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/mcp/http/oauth.js
17
17
  import { createHash, randomBytes, randomInt, timingSafeEqual } from "node:crypto";
18
18
  import { chmodSync, mkdirSync, renameSync, rmSync, writeFileSync } from "node:fs";
19
19
  import { dirname } from "node:path";
@@ -2,7 +2,7 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  wirecatDirectory
5
- } from "./chunk-FZ5FXIG6.js";
5
+ } from "./chunk-5JOKRFWE.js";
6
6
  import {
7
7
  CliError
8
8
  } from "./chunk-5BVIWP3S.js";
@@ -10,7 +10,7 @@ import {
10
10
  __name
11
11
  } from "./chunk-ZVVMGPBJ.js";
12
12
 
13
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/speech/models.js
13
+ // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/speech/models.js
14
14
  var huggingFace = /* @__PURE__ */ __name((repository, commit) => (name) => `https://huggingface.co/csukuangfj/${repository}/resolve/${commit}/${name}`, "huggingFace");
15
15
  var gigaam = huggingFace("sherpa-onnx-nemo-transducer-punct-giga-am-v3-russian-2025-12-16", "a6039be7cee829a9044a69ac0ebaf1c191217c97");
16
16
  var gigaamCtc = huggingFace("sherpa-onnx-nemo-ctc-punct-giga-am-v3-russian-2025-12-16", "4fb5407ff028a69fec516cdf4c10fac9ddea7c16");
@@ -135,7 +135,7 @@ var speechModel = /* @__PURE__ */ __name((id) => {
135
135
  return model;
136
136
  }, "speechModel");
137
137
 
138
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/speech/install.js
138
+ // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/speech/install.js
139
139
  import { createHash, randomUUID } from "node:crypto";
140
140
  import { createReadStream, createWriteStream, mkdirSync, statSync } from "node:fs";
141
141
  import { rename, rm } from "node:fs/promises";
@@ -3,7 +3,7 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  CAPABILITY_STATEMENTS,
5
5
  storeCapable
6
- } from "./chunk-F6D6PJ34.js";
6
+ } from "./chunk-HJRUFT5Y.js";
7
7
  import {
8
8
  importFrom
9
9
  } from "./chunk-Y5E2WNWB.js";
@@ -11,7 +11,7 @@ import {
11
11
  __name
12
12
  } from "./chunk-ZVVMGPBJ.js";
13
13
 
14
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/sqlite-runtime.js
14
+ // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/sqlite-runtime.js
15
15
  import { spawn, spawnSync } from "node:child_process";
16
16
  import { readFileSync } from "node:fs";
17
17
  import { dirname } from "node:path";
@@ -4,7 +4,7 @@ import {
4
4
  MAX_SECRET_INPUT,
5
5
  bufferedInput,
6
6
  inputPolicy
7
- } from "./chunk-CH6RXYAX.js";
7
+ } from "./chunk-VBLFQJY3.js";
8
8
  import {
9
9
  CliError
10
10
  } from "./chunk-5BVIWP3S.js";
@@ -12,7 +12,7 @@ import {
12
12
  __name
13
13
  } from "./chunk-ZVVMGPBJ.js";
14
14
 
15
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/terminal/prompt.js
15
+ // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/terminal/prompt.js
16
16
  import { createInterface } from "node:readline";
17
17
  import { Writable } from "node:stream";
18
18
  var readSecret = /* @__PURE__ */ __name(async (prompt, { input = process.stdin, output = process.stderr, echo = false, signal: givenSignal } = {}) => {
@@ -7,20 +7,49 @@ import {
7
7
  __name
8
8
  } from "./chunk-ZVVMGPBJ.js";
9
9
 
10
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/tasks/model.js
10
+ // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/tasks/model.js
11
11
  var TASK_KINDS = ["question", "request", "mention", "promise"];
12
- var TASK_STATES = ["open", "done", "dismissed"];
12
+ var TASK_STATES = ["open", "todo", "in_progress", "done", "dismissed"];
13
+ var CLOSED_STATES = ["done", "dismissed"];
13
14
  var TASK_ORIGINS = ["rule", "agent", "owner"];
14
15
  var TASK_VERDICTS = ["useful", "not_useful"];
16
+ var isClosedState = /* @__PURE__ */ __name((state) => CLOSED_STATES.includes(state), "isClosedState");
15
17
  function closeTask(task, state, by, at, reason) {
16
- if (task.state !== "open")
18
+ if (isClosedState(task.state))
17
19
  throw new CliError("validation_error", `task ${task.id} is already ${task.state}`, { reason: "task.closed" });
18
20
  const { claimedBy: _by, claimedUntil: _until, ...unclaimed } = task;
19
21
  return { ...unclaimed, state, closedAt: at, closedBy: by, ...reason === void 0 ? {} : { reason } };
20
22
  }
21
23
  __name(closeTask, "closeTask");
22
24
 
23
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/tasks/service.js
25
+ // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/tasks/priority.js
26
+ var PRIORITY_LABELS = ["low", "medium", "high", "critical"];
27
+ var MIDDLE = { low: 0.125, medium: 0.375, high: 0.625, critical: 0.875 };
28
+ var LEGACY_PRIORITY_SCORES = [0.875, 0.625, 0.375, 0.1875, 0.0625];
29
+ var priorityLabel = /* @__PURE__ */ __name((score) => score === null ? null : PRIORITY_LABELS[Math.min(3, Math.max(0, Math.floor(score * 4)))], "priorityLabel");
30
+ var priorityBand = /* @__PURE__ */ __name((label) => {
31
+ const at = PRIORITY_LABELS.indexOf(label);
32
+ return { from: at / 4, to: (at + 1) / 4 };
33
+ }, "priorityBand");
34
+ var legacyPriority = /* @__PURE__ */ __name((score) => score === null ? null : score < 0.125 ? 4 : 3 - PRIORITY_LABELS.indexOf(priorityLabel(score)), "legacyPriority");
35
+ var checkedScore = /* @__PURE__ */ __name((score) => {
36
+ if (!Number.isFinite(score) || score < 0 || score > 1)
37
+ throw new CliError("validation_error", "a priority score is 0 to 1");
38
+ return score;
39
+ }, "checkedScore");
40
+ var priorityOf = /* @__PURE__ */ __name((value) => {
41
+ const word = value.trim().toLowerCase();
42
+ if (word === "none")
43
+ return null;
44
+ if (PRIORITY_LABELS.includes(word))
45
+ return MIDDLE[word];
46
+ if (/^[0-4]$/.test(word))
47
+ return LEGACY_PRIORITY_SCORES[Number(word)];
48
+ throw new CliError("validation_error", `a priority is ${PRIORITY_LABELS.join(", ")} or none; 0 (urgent) \u2026 4 (low) still work as critical, high, medium, low, low`);
49
+ }, "priorityOf");
50
+ var priorityOption = /* @__PURE__ */ __name((value) => priorityOf(value) ?? "none", "priorityOption");
51
+
52
+ // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/tasks/service.js
24
53
  function createTaskService({ store, now = /* @__PURE__ */ __name(() => /* @__PURE__ */ new Date(), "now"), newId = /* @__PURE__ */ __name(() => crypto.randomUUID(), "newId") }) {
25
54
  async function find(id) {
26
55
  const task = await store.get(id);
@@ -58,7 +87,7 @@ function createTaskService({ store, now = /* @__PURE__ */ __name(() => /* @__PUR
58
87
  for (const task of await store.list(filter))
59
88
  byGroup.set(task.group, [...byGroup.get(task.group) ?? [], task]);
60
89
  return [...byGroup].map(([group, tasks]) => {
61
- const open = tasks.filter((task) => task.state === "open");
90
+ const open = tasks.filter((task) => !isClosedState(task.state));
62
91
  const closeMs = tasks.flatMap((task) => task.closedAt ? [task.closedAt.getTime() - task.createdAt.getTime()] : []);
63
92
  const oldestOpenAt = open.map((task) => task.createdAt).sort((a, b) => a.getTime() - b.getTime())[0];
64
93
  return {
@@ -80,13 +109,13 @@ function median(values) {
80
109
  }
81
110
  __name(median, "median");
82
111
 
83
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/tasks/store.js
112
+ // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/tasks/store.js
84
113
  function matches(task, filter) {
85
114
  return (filter.account === void 0 || task.account === filter.account) && (filter.state === void 0 || task.state === filter.state) && (filter.group === void 0 || task.group === filter.group) && (filter.kind === void 0 || task.kind === filter.kind) && (filter.createdBefore === void 0 || task.createdAt < filter.createdBefore);
86
115
  }
87
116
  __name(matches, "matches");
88
117
 
89
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/domain/knowledge.js
118
+ // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/domain/knowledge.js
90
119
  var FACT_TYPES = ["fact", "statement", "question", "decision", "promise"];
91
120
  var FACT_STATUSES = ["proposed", "accepted", "superseded", "reversed", "rejected"];
92
121
  var MEMORY_KINDS = ["summary", "digest", "preference"];
@@ -95,7 +124,7 @@ var MEMORY_SCOPES = ["personal", "work"];
95
124
  var WORK_TASK_TYPES = ["bug", "feature", "chore"];
96
125
  var TASK_TYPES = [...WORK_TASK_TYPES, ...TASK_KINDS];
97
126
 
98
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/store/sqlite/link-kinds.js
127
+ // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/store/sqlite/link-kinds.js
99
128
  var LINK_KINDS = [
100
129
  "links-to",
101
130
  "blocked-by",
@@ -119,8 +148,17 @@ var linkKind = /* @__PURE__ */ __name((kind) => `'${kind}'`, "linkKind");
119
148
  export {
120
149
  TASK_KINDS,
121
150
  TASK_STATES,
151
+ CLOSED_STATES,
122
152
  TASK_ORIGINS,
123
153
  TASK_VERDICTS,
154
+ isClosedState,
155
+ PRIORITY_LABELS,
156
+ priorityLabel,
157
+ priorityBand,
158
+ legacyPriority,
159
+ checkedScore,
160
+ priorityOf,
161
+ priorityOption,
124
162
  createTaskService,
125
163
  matches,
126
164
  FACT_TYPES,
@@ -17,7 +17,7 @@ import {
17
17
  __name
18
18
  } from "./chunk-ZVVMGPBJ.js";
19
19
 
20
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/models/options.js
20
+ // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/models/options.js
21
21
  var checkedOptions = /* @__PURE__ */ __name((provider, schema, options) => {
22
22
  const parsed = safeParse(schema, options);
23
23
  if (!parsed.success) {
@@ -6,26 +6,26 @@ import {
6
6
  agentArguments,
7
7
  agentJson,
8
8
  commandAvailability
9
- } from "./chunk-K4FVKPDQ.js";
9
+ } from "./chunk-S2GSU4MT.js";
10
10
  import {
11
11
  failureContext
12
- } from "./chunk-JVMVLITS.js";
12
+ } from "./chunk-2X4WYZPA.js";
13
13
  import {
14
14
  callerOf
15
- } from "./chunk-VEIZZRQ5.js";
15
+ } from "./chunk-H7NUGJPV.js";
16
16
  import {
17
17
  lentConnection,
18
18
  onlineDeps,
19
19
  refuseLacking,
20
20
  servicesFor,
21
21
  storeModeDeps
22
- } from "./chunk-T6464KYA.js";
22
+ } from "./chunk-STC45HZX.js";
23
23
  import {
24
24
  MAX_BUFFERED_INPUT
25
- } from "./chunk-CH6RXYAX.js";
25
+ } from "./chunk-VBLFQJY3.js";
26
26
  import {
27
27
  ENTITIES
28
- } from "./chunk-TVREDYX4.js";
28
+ } from "./chunk-76IKLP2M.js";
29
29
  import {
30
30
  DEFAULT_OUTPUT_BYTES,
31
31
  LOCAL_WRITE,
@@ -43,20 +43,20 @@ import {
43
43
  sealed,
44
44
  startRecording,
45
45
  traceOf
46
- } from "./chunk-GQQJOH7A.js";
46
+ } from "./chunk-GQKYSGIA.js";
47
47
  import {
48
48
  authorityAllowed,
49
49
  botApiAllowed,
50
50
  keyForCommand,
51
51
  levelFor,
52
52
  readKeysForCommand
53
- } from "./chunk-QLEUNU6G.js";
53
+ } from "./chunk-H5BW7454.js";
54
54
  import {
55
55
  currentCaller,
56
56
  keepsSuccess,
57
57
  runContextOf,
58
58
  withCaller
59
- } from "./chunk-7SXGLT6T.js";
59
+ } from "./chunk-QUGFBY7O.js";
60
60
  import {
61
61
  captureStreams,
62
62
  traceIdOf
@@ -107,7 +107,7 @@ import {
107
107
  __name
108
108
  } from "./chunk-ZVVMGPBJ.js";
109
109
 
110
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/mcp/agent.js
110
+ // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/mcp/agent.js
111
111
  import { Readable } from "node:stream";
112
112
 
113
113
  // node_modules/.pnpm/@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/lint.js
@@ -2773,7 +2773,7 @@ var VOCABULARY = defineVocabulary({
2773
2773
  flags: [...HOW_FLAGS, ...WHAT_FLAGS, ...CALENDAR_FLAGS]
2774
2774
  });
2775
2775
 
2776
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/mcp/agent.js
2776
+ // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/mcp/agent.js
2777
2777
  var TYPES = new Map(VOCABULARY.flags.map((flag) => [flag.name, flag.type]));
2778
2778
  var snake = /* @__PURE__ */ __name((name) => name.replaceAll("|", "_or_").replace(/[^a-z0-9]+/gi, "_"), "snake");
2779
2779
  var longOf = /* @__PURE__ */ __name((option) => option.flags.match(/--[a-z0-9][a-z0-9-]*/)?.[0], "longOf");
@@ -2994,7 +2994,7 @@ var runCommandForAgent = /* @__PURE__ */ __name(async (program, path, input, ctx
2994
2994
  }
2995
2995
  }, "runCommandForAgent");
2996
2996
 
2997
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/mcp/tool.js
2997
+ // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/mcp/tool.js
2998
2998
  var limit = optional(pipe(number(), integer(), minValue(1), maxValue(100), description("how many")));
2999
2999
  var page = optional(pipe(number(), integer(), minValue(1), description("which page, from 1")));
3000
3000
  var message = pipe(
@@ -3108,7 +3108,7 @@ var entryRunner = /* @__PURE__ */ __name((registration) => {
3108
3108
  ...outcomeOf(result),
3109
3109
  startedAt,
3110
3110
  finishedAt: Date.now()
3111
- })?.catch(() => void 0);
3111
+ }, caller)?.catch(() => void 0);
3112
3112
  return result;
3113
3113
  };
3114
3114
  }, "entryRunner");
@@ -3253,7 +3253,7 @@ var failed = /* @__PURE__ */ __name((error, errors, effects) => {
3253
3253
  return mcpErrorResult(JSON.parse(agentJson(errorObjectOf(error, context))));
3254
3254
  }, "failed");
3255
3255
 
3256
- // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/mcp/surface.js
3256
+ // node_modules/.pnpm/@wirecat+cli-core@0.516.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_25c347a01b8fd53eda94896ae0eba94d/node_modules/@wirecat/cli-core/dist/mcp/surface.js
3257
3257
  import { randomUUID } from "node:crypto";
3258
3258
  var MATCHES = 8;
3259
3259
  var ANSWER = answerSchema();