@wirecat/mail-cli 0.34.0 → 0.36.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 (155) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/README.md +4 -1
  3. package/contracts/wirecat.json +52 -2
  4. package/dist/bin/mail.js +2 -2
  5. package/dist/bundle/agent-MW7YWUIY.js +39 -0
  6. package/dist/bundle/{all-profiles-2KUKROHY.js → all-profiles-RS6OV3YO.js} +63 -21
  7. package/dist/bundle/{anthropic-E5KRCEVC.js → anthropic-PPQ7DTXN.js} +5 -5
  8. package/dist/bundle/{app-server-HIQ3QO5K.js → app-server-EBFBMFQC.js} +81 -71
  9. package/dist/bundle/{bun-KARJPE5D.js → bun-J7HAT7MW.js} +2 -2
  10. package/dist/bundle/{bun-sqlite-NHGX6ZUN.js → bun-sqlite-PCSNAXIQ.js} +6 -6
  11. package/dist/bundle/{chunk-WYGDALB3.js → chunk-2RV4V55B.js} +18 -18
  12. package/dist/bundle/{chunk-QXYNDMA6.js → chunk-2UNZ3L2H.js} +6 -6
  13. package/dist/bundle/{chunk-DYQGEZA2.js → chunk-2VEFNFYZ.js} +3 -3
  14. package/dist/bundle/chunk-3BYKGMRM.js +338 -0
  15. package/dist/bundle/{chunk-PRDKEVUL.js → chunk-3NOXZZJV.js} +1 -1
  16. package/dist/bundle/{chunk-4VM3UCSO.js → chunk-3ZKNXKM7.js} +2 -2
  17. package/dist/bundle/{chunk-JVGVLRBA.js → chunk-42XY6D5C.js} +5 -5
  18. package/dist/bundle/{chunk-A2Y2RFNW.js → chunk-437UHSIO.js} +123 -6
  19. package/dist/bundle/{chunk-FNYWC6A3.js → chunk-4WSTWZUB.js} +3 -3
  20. package/dist/bundle/{chunk-V43KEZYA.js → chunk-5G4MDFZ2.js} +9 -60
  21. package/dist/bundle/{chunk-ZZEWQR43.js → chunk-5JEKBYIH.js} +14 -14
  22. package/dist/bundle/{chunk-CKVWAUBW.js → chunk-5TIWO6AR.js} +12 -12
  23. package/dist/bundle/{chunk-X6IGETU6.js → chunk-5VPLQS4S.js} +2 -2
  24. package/dist/bundle/chunk-645FQC4G.js +559 -0
  25. package/dist/bundle/{chunk-PA4GEJXQ.js → chunk-6FZPFNEU.js} +9 -9
  26. package/dist/bundle/{chunk-XWU3A7H6.js → chunk-6LJIENVT.js} +2 -2
  27. package/dist/bundle/{chunk-2GDLJKPT.js → chunk-6NDPOY4N.js} +1 -1
  28. package/dist/bundle/{chunk-QXLYLVEC.js → chunk-6PKMUKUF.js} +1 -1
  29. package/dist/bundle/{chunk-TZJC4AOK.js → chunk-6TT62IUW.js} +53 -33
  30. package/dist/bundle/chunk-6UYIWQLU.js +52 -0
  31. package/dist/bundle/{chunk-MGXYIVVJ.js → chunk-6VMJLOYO.js} +12 -12
  32. package/dist/bundle/{chunk-ZGZADWD7.js → chunk-774VG5WZ.js} +1 -1
  33. package/dist/bundle/chunk-AVR4FPYG.js +192 -0
  34. package/dist/bundle/{chunk-KF6O4RZO.js → chunk-BBQERXQX.js} +3 -3
  35. package/dist/bundle/{chunk-LOSYDRJU.js → chunk-C3JSQ7UJ.js} +53 -11
  36. package/dist/bundle/{chunk-OJ3BI2U4.js → chunk-CJHO6B3M.js} +34 -28
  37. package/dist/bundle/{chunk-VRGEDK4T.js → chunk-CJMZQ2MZ.js} +35 -12
  38. package/dist/bundle/{chunk-4SKE5GYA.js → chunk-CMOO4INK.js} +1 -1
  39. package/dist/bundle/{chunk-DZRP4UCK.js → chunk-DVJPEZGV.js} +30 -15
  40. package/dist/bundle/{chunk-H77ALM2Y.js → chunk-EGR3YUWD.js} +4 -4
  41. package/dist/bundle/{chunk-4VHK5UBM.js → chunk-GBZIWCEP.js} +3 -3
  42. package/dist/bundle/{chunk-2SCQ7Z4I.js → chunk-GCTHVCJU.js} +4 -4
  43. package/dist/bundle/{chunk-4URI6EAV.js → chunk-GEU3WR75.js} +3 -3
  44. package/dist/bundle/{chunk-OX5MCGXL.js → chunk-GI6DNX7Q.js} +63 -54
  45. package/dist/bundle/{chunk-KLI5FKZ2.js → chunk-HH34WRQE.js} +7 -7
  46. package/dist/bundle/chunk-HPSESLOZ.js +7 -0
  47. package/dist/bundle/{chunk-6LFRZDPV.js → chunk-IBOWSQ7X.js} +3 -4
  48. package/dist/bundle/{chunk-XIF75Z7D.js → chunk-JCILSTFK.js} +1 -1
  49. package/dist/bundle/{chunk-OOYRMTX5.js → chunk-KLPFPNZP.js} +12 -26
  50. package/dist/bundle/{chunk-6G4VQFVX.js → chunk-KP7JHJVP.js} +17 -17
  51. package/dist/bundle/chunk-KTVQIKU5.js +726 -0
  52. package/dist/bundle/{chunk-2VBEBPGX.js → chunk-KVFBSOCV.js} +9 -9
  53. package/dist/bundle/{chunk-KGYK3OI3.js → chunk-L4QLZDBZ.js} +43 -64
  54. package/dist/bundle/{chunk-R2GS3GBJ.js → chunk-LQQIYBHN.js} +100 -66
  55. package/dist/bundle/{chunk-I3MS74OF.js → chunk-MQ6DQRRI.js} +4 -4
  56. package/dist/bundle/{chunk-FORAOCZ3.js → chunk-MRWV5VNQ.js} +6 -6
  57. package/dist/bundle/{chunk-NJVJH5MH.js → chunk-MT3LYU4T.js} +3245 -1644
  58. package/dist/bundle/{chunk-5GANGHQI.js → chunk-NCY55XIT.js} +9 -9
  59. package/dist/bundle/{chunk-QFJC6POK.js → chunk-NJZR3OFK.js} +1 -1
  60. package/dist/bundle/chunk-NSH2UHJR.js +353 -0
  61. package/dist/bundle/chunk-NTUP5RCP.js +116 -0
  62. package/dist/bundle/chunk-NYR7PIAG.js +80 -0
  63. package/dist/bundle/{chunk-PC3N3LH3.js → chunk-NYYMMIVW.js} +3 -3
  64. package/dist/bundle/{chunk-NXERDBEK.js → chunk-OEL4DQTT.js} +4 -4
  65. package/dist/bundle/{chunk-RPNQXWRS.js → chunk-PF7ZNIVP.js} +2 -2
  66. package/dist/bundle/{chunk-5D4AEUVA.js → chunk-PL5P7UKW.js} +434 -1
  67. package/dist/bundle/{chunk-QQGPV3QN.js → chunk-PMGAU6AP.js} +2 -2
  68. package/dist/bundle/{chunk-PVZMN3UZ.js → chunk-PMSZBUC7.js} +8 -8
  69. package/dist/bundle/{chunk-HH647UBC.js → chunk-PPIMXOBT.js} +104 -255
  70. package/dist/bundle/{chunk-YWX5X5RI.js → chunk-Q6TPXXOS.js} +19 -17
  71. package/dist/bundle/{chunk-Z6A6QPPW.js → chunk-QDNYJOWJ.js} +1 -1
  72. package/dist/bundle/{chunk-OG5QO5RR.js → chunk-QI2XGTFH.js} +8 -8
  73. package/dist/bundle/{chunk-T2EE5M7O.js → chunk-REWV37HQ.js} +144 -10
  74. package/dist/bundle/{chunk-LKTDW5LH.js → chunk-RJUVWJTA.js} +18 -8
  75. package/dist/bundle/{chunk-MDISZMK4.js → chunk-RMWS7IQ4.js} +4 -4
  76. package/dist/bundle/{chunk-VBVR6JRC.js → chunk-ROK7Z5LQ.js} +275 -174
  77. package/dist/bundle/{chunk-HRDCH2VB.js → chunk-SCJVKWMV.js} +3665 -3339
  78. package/dist/bundle/{chunk-NAENYLIO.js → chunk-SJNFPBPF.js} +2 -2
  79. package/dist/bundle/{chunk-6GGMFL7J.js → chunk-TV634B6T.js} +2 -100
  80. package/dist/bundle/{chunk-26DYRMXE.js → chunk-U3BO342P.js} +1 -1
  81. package/dist/bundle/{chunk-KNVTBDTE.js → chunk-U67XMAEE.js} +3 -3
  82. package/dist/bundle/chunk-V5I7QP4T.js +108 -0
  83. package/dist/bundle/{chunk-NI4GCP2T.js → chunk-VIDPFLFM.js} +2 -2
  84. package/dist/bundle/{chunk-AGZ7SNFF.js → chunk-VIJV474N.js} +1 -1
  85. package/dist/bundle/{chunk-QOQF2TX3.js → chunk-WNQECDIP.js} +338 -299
  86. package/dist/bundle/{chunk-SK3N4CK5.js → chunk-WPPPO427.js} +4 -4
  87. package/dist/bundle/{chunk-EZAX77SM.js → chunk-WZFGZBGD.js} +86 -75
  88. package/dist/bundle/{chunk-EGQJDEFY.js → chunk-XRVZMM5B.js} +158 -562
  89. package/dist/bundle/{chunk-NWD7AFOR.js → chunk-YPB5BEAD.js} +2 -2
  90. package/dist/bundle/{chunk-NHD5BOJU.js → chunk-ZRSLG3B3.js} +6 -6
  91. package/dist/bundle/{chunk-IMQ4CVZJ.js → chunk-ZV57PIPE.js} +2 -2
  92. package/dist/bundle/command-contract-WFTIRPL5.js +39 -0
  93. package/dist/bundle/{command-server-entry-NF45UPEV.js → command-server-entry-73RJELAV.js} +28 -28
  94. package/dist/bundle/{decode-DUZA3EHC.js → decode-7BUWBDPT.js} +5 -5
  95. package/dist/bundle/{dispatch-CDJZAMVP.js → dispatch-IBOMVWZA.js} +8 -8
  96. package/dist/bundle/{dist-RH7EMC4J.js → dist-MULVCVSR.js} +25 -23
  97. package/dist/bundle/dist-PAKDDIBT.js +191 -0
  98. package/dist/bundle/{echarts-GZHZBNRA.js → echarts-VLWFC322.js} +2 -2
  99. package/dist/bundle/{embed-VE3CSJN4.js → embed-W3VH4HPY.js} +6 -6
  100. package/dist/bundle/{embedder-DSJ77DX5.js → embedder-I7ERQZJV.js} +9 -9
  101. package/dist/bundle/{failure-YH6HAGFT.js → failure-QMAPSQ7X.js} +2 -2
  102. package/dist/bundle/{first-run-3L7HLYTI.js → first-run-LCVER6QN.js} +12 -12
  103. package/dist/bundle/first-screen-DCTHI4NQ.js +39 -0
  104. package/dist/bundle/{instructions-OZK3BLIO.js → instructions-BNCVLSYQ.js} +1 -1
  105. package/dist/bundle/mail.js +12 -12
  106. package/dist/bundle/{mcp-YUG4YR4R.js → mcp-Z2KZNCXB.js} +2 -2
  107. package/dist/bundle/meeting-combined-ITU7SZ7E.js +24 -0
  108. package/dist/bundle/{meeting-model-U7LW5WEN.js → meeting-model-BWLSTNXA.js} +11 -11
  109. package/dist/bundle/{meeting-semantic-64IOIQRR.js → meeting-semantic-ZIEHXN2R.js} +6 -6
  110. package/dist/bundle/{node-OS3VWBUZ.js → node-RYFTRSG4.js} +2 -2
  111. package/dist/bundle/{node-sqlite-RQ623VFA.js → node-sqlite-XCHVNTGQ.js} +7 -7
  112. package/dist/bundle/{oauth-CBPAG734.js → oauth-FNUJSKKJ.js} +8 -8
  113. package/dist/bundle/{open-H4DGOMBC.js → open-WVWSJ3WI.js} +5 -5
  114. package/dist/bundle/{openai-EMWRGR54.js → openai-QOUTYYTF.js} +15 -15
  115. package/dist/bundle/{process-3TOIYASI.js → process-W5KPID53.js} +1 -1
  116. package/dist/bundle/{program-WA6RGAJL.js → program-L5UANM3I.js} +3397 -2219
  117. package/dist/bundle/{prompt-22KNCMBI.js → prompt-JSBAPNJE.js} +5 -5
  118. package/dist/bundle/{recognize-UWD4RSCZ.js → recognize-FDX4SJ6Q.js} +4 -4
  119. package/dist/bundle/{remote-LJY7MF2E.js → remote-MYOXOQHM.js} +9 -9
  120. package/dist/bundle/{rerank-JJ6KNJFB.js → rerank-NY5MSZCR.js} +7 -7
  121. package/dist/bundle/{serve-3EPLJYVZ.js → serve-URI6NZA3.js} +10 -10
  122. package/dist/bundle/{server-5JOFO4V4.js → server-HQ25RHQM.js} +75 -64
  123. package/dist/bundle/server-UVYFU2JN.js +84 -0
  124. package/dist/bundle/{sqlite-runtime-MGJA5E27.js → sqlite-runtime-6UUPSSKG.js} +6 -6
  125. package/dist/bundle/{state-UCRDOWOP.js → state-NDDVFPCI.js} +6 -6
  126. package/dist/bundle/{store-265VRRQV.js → store-2RDOICVN.js} +28 -23
  127. package/dist/bundle/{store-HS272YSA.js → store-PKYWPKKR.js} +34 -21
  128. package/dist/bundle/store-maintenance-command-Y5XTO47X.js +71 -0
  129. package/dist/bundle/surface-3XKM3MQ2.js +70 -0
  130. package/dist/commands/read.d.ts +2 -2
  131. package/dist/commands/read.d.ts.map +1 -1
  132. package/dist/commands/read.js +5 -4
  133. package/dist/commands/read.js.map +1 -1
  134. package/dist/commands/session-start.js +1 -1
  135. package/dist/commands/session-start.js.map +1 -1
  136. package/dist/commands/sync.d.ts +2 -1
  137. package/dist/commands/sync.d.ts.map +1 -1
  138. package/dist/commands/sync.js +16 -9
  139. package/dist/commands/sync.js.map +1 -1
  140. package/dist/config.d.ts +5 -0
  141. package/dist/config.d.ts.map +1 -1
  142. package/dist/config.js +16 -1
  143. package/dist/config.js.map +1 -1
  144. package/dist/oauth.d.ts.map +1 -1
  145. package/dist/oauth.js +2 -1
  146. package/dist/oauth.js.map +1 -1
  147. package/dist/version.d.ts +1 -1
  148. package/dist/version.js +1 -1
  149. package/package.json +3 -3
  150. package/dist/bundle/chunk-FEBUZHU3.js +0 -2
  151. package/dist/bundle/command-contract-PZ7VOOXP.js +0 -39
  152. package/dist/bundle/first-screen-MY5KID77.js +0 -37
  153. package/dist/bundle/meeting-combined-RYMUPY54.js +0 -24
  154. package/dist/bundle/server-EOQNS7B7.js +0 -75
  155. package/dist/bundle/store-maintenance-command-IKZM5NRP.js +0 -66
@@ -2,15 +2,61 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  QUERY_REASONS
5
- } from "./chunk-QOQF2TX3.js";
5
+ } from "./chunk-WNQECDIP.js";
6
6
  import {
7
- defineReasons
8
- } from "./chunk-LOSYDRJU.js";
7
+ readSharedSection,
8
+ sharedConfigPath,
9
+ writeSharedSection
10
+ } from "./chunk-HH34WRQE.js";
11
+ import {
12
+ storePath
13
+ } from "./chunk-VIDPFLFM.js";
14
+ import {
15
+ defineReasons,
16
+ isoTimestamp,
17
+ picklist,
18
+ pipe,
19
+ safeParse,
20
+ strictObject,
21
+ string
22
+ } from "./chunk-C3JSQ7UJ.js";
23
+ import {
24
+ CliError
25
+ } from "./chunk-PMGAU6AP.js";
9
26
  import {
10
27
  __name
11
28
  } from "./chunk-ZVVMGPBJ.js";
12
29
 
13
- // 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/errors/reasons.js
30
+ // node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/models/chat-sending.js
31
+ var CHAT_SENDING_MODES = ["allowed", "ask", "denied"];
32
+ var SECTION = "chat_sending";
33
+ var Setting = strictObject({
34
+ mode: picklist(CHAT_SENDING_MODES),
35
+ at: pipe(string(), isoTimestamp())
36
+ });
37
+ var CHAT_SENDING_ASK_DETAILS = ["emails", "threads", "tokens", "host", "model", "estimated_cost_usd"];
38
+ var pathOf = /* @__PURE__ */ __name((env) => sharedConfigPath(storePath(env), env), "pathOf");
39
+ var readChatSending = /* @__PURE__ */ __name((env) => {
40
+ const section = readSharedSection(pathOf(env), SECTION);
41
+ if (section === void 0 || section === null)
42
+ return void 0;
43
+ const checked = safeParse(Setting, section);
44
+ return checked.success ? checked.output : { mode: "denied", at: (/* @__PURE__ */ new Date(0)).toISOString() };
45
+ }, "readChatSending");
46
+ var chatSendingMode = /* @__PURE__ */ __name((env) => readChatSending(env)?.mode ?? "ask", "chatSendingMode");
47
+ var writeChatSending = /* @__PURE__ */ __name((env, mode) => writeSharedSection(pathOf(env), SECTION, mode === "ask" ? void 0 : { mode, at: (/* @__PURE__ */ new Date()).toISOString() }), "writeChatSending");
48
+ var STRICTNESS = { allowed: 0, ask: 1, denied: 2 };
49
+ var loosens = /* @__PURE__ */ __name((from, to) => STRICTNESS[to] < STRICTNESS[from], "loosens");
50
+ var chatSendingCommand = /* @__PURE__ */ __name((command, mode) => `${command} models chats set ${mode}`, "chatSendingCommand");
51
+ var chatSendingAllowed = /* @__PURE__ */ __name((env, host, command) => {
52
+ const mode = chatSendingMode(env);
53
+ if (mode === "denied")
54
+ throw new CliError("permission_error", `sending chat text to a model outside this computer is denied by the setting \`models chats\`; nothing was sent to ${host}, and --yes does not change that. Use a model on this computer, or ask the owner to run \`${chatSendingCommand(command, "ask")}\` (or \`allowed\`)`, { reason: "chat-sending.denied" });
55
+ return mode === "allowed";
56
+ }, "chatSendingAllowed");
57
+ var chatSendingAskRefusal = /* @__PURE__ */ __name((what, command, details = {}) => new CliError("confirmation_required", `${what} \u2014 add --yes to send them (an agent may pass yes), or ask the owner to run \`${chatSendingCommand(command, "allowed")}\` so no yes is needed`, { ...details, reason: "chat-sending.ask" }), "chatSendingAskRefusal");
58
+
59
+ // node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/errors/reasons.js
14
60
  var validation = /* @__PURE__ */ __name((reason, message) => [reason, "validation_error", message], "validation");
15
61
  var QUERY = [
16
62
  ["query.aborted", "the search was stopped before it finished"],
@@ -69,6 +115,8 @@ var PROVIDER_API = [
69
115
  ["offline.refused", "permission_error", "this command needs the provider; --offline was given"],
70
116
  validation("api.unknown-method", "the provider has no method by this name"),
71
117
  ["api.disabled", "configuration_error", "the provider's API is turned off for this OAuth project"],
118
+ ["manifest.invalid", "configuration_error", "the source manifest does not match its shape or the generated API"],
119
+ ["verify.no-id", "provider_error", "the answer to the sign-in check holds no account id where auth.verify says"],
72
120
  ["provider.usage-limit", "rate_limited", "the account's usage limit at the provider is reached; wait, do not retry"],
73
121
  ["access.denied", "permission_error", "the provider refused this account access to the item"],
74
122
  ["item.not-found", "not_found", "the provider has no item by this id, or this account cannot see it"],
@@ -192,6 +240,15 @@ var OTHERS = [
192
240
  validation("document.changed", "the document changed while it was read; nothing was saved"),
193
241
  ["document.not-imported", "not_found", "the document is not imported in this source account"],
194
242
  ["document.not-found", "not_found", "no listed document has that reference"],
243
+ ["state.unreadable", "configuration_error", "a sync state file cannot be read; move it away and sync again"],
244
+ ["profile.busy", "provider_unavailable", "another sync or write holds this profile's local copy"],
245
+ ["profile.account-taken", "conflict", "another profile here already uses this provider account"],
246
+ ["profile.other-account", "conflict", "this profile's copy was synced from another provider account"],
247
+ ["profile.not-synced", "not_found", "the profile has no local copy yet; sync it first"],
248
+ ["provider.failed", "provider_error", "a read from the provider failed"],
249
+ ["identity.none", "not_found", "the provider shows no accounts on a document"],
250
+ validation("folder.not-a-folder", "what was named is not a folder the account can read"),
251
+ ["folder.not-chosen", "not_found", "the folder is not among the chosen folders"],
195
252
  ["meeting.not-found", "not_found", "no meeting row has that event or meeting reference"],
196
253
  ["listing.too-large", "provider_error", "the listing is over its bound; the checkpoint was kept"],
197
254
  ["listing.source-not-found", "not_found", "a source: term names no account holding what is listed"],
@@ -202,6 +259,8 @@ var OTHERS = [
202
259
  validation("mail.cursor-ahead", "an acknowledge cursor is past the newest stored email"),
203
260
  ["mail.holder-not-yours", "permission_error", "a run moves only the mark of the holder its schedule names"],
204
261
  ["mail.no-mark", "not_found", "the holder has no mark in the mailbox yet; its first review starts it"],
262
+ ["mail.inbox-agent", "permission_error", "an agent sorts mail itself from review; inbox --offline lists"],
263
+ ["mail.inbox-answer-invalid", "invalid_response", "the AI model's answer to inbox is not the JSON it asks for"],
205
264
  ["mail.reset-owner-only", "permission_error", "only the owner moves a holder's mark back"],
206
265
  ["mail.source-failed", "provider_error", "the mail server refused or did not complete a request"],
207
266
  ["mail.search-refused", "provider_error", "the mail server refused to search a folder"],
@@ -214,6 +273,27 @@ var OTHERS = [
214
273
  ["mirror.none", "not_found", "the profile has no mirrors; add one with mirrors add"],
215
274
  ["mirror.not-found", "not_found", "no such mirror in this profile; see mirrors list"],
216
275
  validation("mirror.not-folder", "the path to mirror is not a folder"),
276
+ validation("mirror.symlink", "the file is under a symbolic link, which the sync does not follow"),
277
+ [
278
+ "mirror.too-many-deletions",
279
+ "confirmation_required",
280
+ "the sync would delete more files than the guard allows; check them with --dry-run and allow them explicitly"
281
+ ],
282
+ [
283
+ "mirror.too-many-replacements",
284
+ "confirmation_required",
285
+ "the sync would replace more files than the guard allows; check them with --dry-run and allow them explicitly"
286
+ ],
287
+ validation("mirror.no-space", "the sync needs more free space than the local drive has"),
288
+ validation("mirror.bad-exclusion", "the exclusion is not a path pattern inside the mirror"),
289
+ [
290
+ "mirror.version-not-kept",
291
+ "provider_error",
292
+ "the earlier content could not be kept in the version store, so the sync did not replace it"
293
+ ],
294
+ ["mirror.remote-changed", "conflict", "the remote file changed since the listing; the next sync settles it"],
295
+ ["upload.mismatch", "conflict", "the uploaded file reads back with other content; the local file changed meanwhile"],
296
+ ["download.mismatch", "invalid_response", "the downloaded file has other content than the listing said"],
217
297
  ["catalog.unavailable", "configuration_error", "the store has no shared catalog for this account"],
218
298
  ["catalog.not-found", "not_found", "the file or folder is not in the local catalog; run catalog import or sync"],
219
299
  validation("catalog.depth-invalid", "tree depth must be between 0 and 50"),
@@ -422,6 +502,7 @@ var OTHERS = [
422
502
  validation("deal.field", "a field of the deal or lead is not valid"),
423
503
  ["deal.denied", "permission_error", "the profile denies listing deals or leads, so none is answered"],
424
504
  ["deal.out-of-scope", "not_found", "the deal or lead is a copy from an account outside the accounts asked for"],
505
+ ["deal.not-readable", "not_found", "the deal or lead is a copy the profile's CRM sign-in may not read"],
425
506
  validation("deal.ref", "the reference names no deal or lead"),
426
507
  validation("deal.stage", "no stage of that name, or a stage name more than one pipeline has"),
427
508
  validation("stage.base-field", "a base stage needs a name its set has once and a position within the set"),
@@ -443,6 +524,7 @@ var OTHERS = [
443
524
  validation("pipeline.duplicate", "a pipeline of that name and kind is already stored"),
444
525
  validation("pipeline.field", "a pipeline needs a name and at least one stage, each named once"),
445
526
  ["pipeline.not-found", "not_found", "no stored pipeline has that name or reference"],
527
+ validation("crm.self-from-sync", "only a sync records whose CRM copy it is; config unset hands the copy to the next sync"),
446
528
  validation("crm.stage-unknown", "a CRM item stands in a stage the store does not hold; it was not kept"),
447
529
  validation("crm.item-invalid", "a CRM item has a field the store refuses, such as a status it does not know"),
448
530
  validation("crm.amount-unkept", "a CRM deal's amount is in a currency or with decimals the store cannot hold: the deal is kept without it"),
@@ -456,8 +538,19 @@ var OTHERS = [
456
538
  [
457
539
  "crm.foreign-contacts-spent",
458
540
  "permission_error",
459
- "the day's views of contacts and companies that are not yours are spent"
541
+ "the day's reads of records that are not yours (contacts, companies, other people's files) are spent"
460
542
  ],
543
+ validation("crm.files-limit-range", "a files setting takes a whole number within its range; it is never clamped"),
544
+ validation("crm.file-too-large", "the file is larger than the download may take; --max-size raises it up to 2048 MB"),
545
+ validation("crm.files-disk-full", "the account's files folder is at its files.max_total_mb even after dropping"),
546
+ ["crm.file-unavailable", "provider_error", "the CRM did not give the file; its link is never shown"],
547
+ ["crm.files-denied", "permission_error", "the profile's files.download level stops downloading files"],
548
+ [
549
+ "crm.file-exists",
550
+ "conflict",
551
+ "the --dir folder already holds a file of that name, which a download never overwrites"
552
+ ],
553
+ ["crm.scope-missing", "permission_error", "the CRM sign-in lacks a scope one kind of a record's files needs"],
461
554
  [
462
555
  "crm.client-reads-admin-only",
463
556
  "permission_error",
@@ -466,8 +559,18 @@ var OTHERS = [
466
559
  validation("field.not-filterable", "the CRM cannot filter a list by that custom field"),
467
560
  validation("query.bad-value", "a term's value is not the kind its field takes, such as an id or a number"),
468
561
  validation("crm.record-field", "a contact's or company's field is not valid"),
562
+ validation("crm.owner-unknown", "owner: names no CRM user: me without a known sign-in user, or not a user id"),
469
563
  validation("crm.write-unsupported", "the CRM does not take this write, or does not recognise a repeated one"),
470
564
  validation("crm.unlisted-held", "a list of every id would mark most of a kind deleted; nothing was, until --rescan"),
565
+ validation("tracker.unlisted-held", "a tracker's id list would mark too much deleted, or the sign-in read only part; nothing was, until --rescan"),
566
+ validation("content.unlisted-held", "a content id list would mark too much deleted, the sign-in read only part, or the site moved; nothing was"),
567
+ validation("content.conflict", "the post changed at the source since the last sync; sync, then write again"),
568
+ validation("content.lossy-body", "the post's text holds blocks or embeds Markdown does not keep; --replace-body"),
569
+ validation("content.schedule-past", "a post is scheduled for a time to come, not one that passed"),
570
+ validation("content.already-published", "a published post cannot be scheduled; unpublish it first"),
571
+ validation("content.empty", "a write names no field to set"),
572
+ ["content.get-unsupported", "configuration_error", "the source cannot read one post, author or term by its id"],
573
+ validation("content.write-unsupported", "the source does not take this write, such as a deletion past the trash"),
471
574
  validation("crm.narrowing-held", "the default scope mine would mark most of a kind's stored rows deleted; none is, until the owner sets the scope"),
472
575
  validation("crm.unassigned-dropped", "the CRM does not let this sign-in choose a user in unassigned; that user's deals are not copied"),
473
576
  validation("crm.not-reported", "the CRM did not list users or departments; what they would say is unknown, nothing withdrawn"),
@@ -553,6 +656,7 @@ var OTHERS = [
553
656
  "the owner rejected linking these people on this evidence; only a new signal or identity proposes them again"
554
657
  ],
555
658
  validation("identity.same", "the two identities are one person already"),
659
+ validation("identity.agent-unnamed", "an agent's link names the agent, and never as the owner"),
556
660
  validation("identity.not-shared", "only a match on a shared mailbox can say the mailbox is a company's"),
557
661
  ["organization.not-found", "not_found", "no stored organization has that id"],
558
662
  validation("organization.unnamed", "a free mailbox names no company; name the organization or the company"),
@@ -672,6 +776,10 @@ var INPUT_FIELD_REASONS = defineReasons([
672
776
  details: ["fields"]
673
777
  }
674
778
  ]);
779
+ var DETAILED = {
780
+ "vocabulary.consolidation-over-budget": ["table"],
781
+ "chat-sending.ask": CHAT_SENDING_ASK_DETAILS
782
+ };
675
783
  var REASONS = defineReasons([
676
784
  ...QUERY_REASONS,
677
785
  ...INPUT_FIELD_REASONS,
@@ -679,10 +787,12 @@ var REASONS = defineReasons([
679
787
  reason,
680
788
  code,
681
789
  message,
682
- details: reason === "vocabulary.consolidation-over-budget" ? ["table"] : []
790
+ details: DETAILED[reason] ?? []
683
791
  }))
684
792
  ]);
685
793
  var DETAILS = [
794
+ "holders",
795
+ "profile",
686
796
  "contracts",
687
797
  "calendars",
688
798
  "allowed",
@@ -772,6 +882,13 @@ var failureContext = /* @__PURE__ */ __name((errors) => {
772
882
  }, "failureContext");
773
883
 
774
884
  export {
885
+ CHAT_SENDING_MODES,
886
+ readChatSending,
887
+ chatSendingMode,
888
+ writeChatSending,
889
+ loosens,
890
+ chatSendingAllowed,
891
+ chatSendingAskRefusal,
775
892
  INPUT_FIELD_REASONS,
776
893
  REASONS,
777
894
  DETAILS,
@@ -3,17 +3,17 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  OAuthError,
5
5
  OAuthErrorCode
6
- } from "./chunk-5D4AEUVA.js";
6
+ } from "./chunk-PL5P7UKW.js";
7
7
  import {
8
8
  ACCESS_SECONDS,
9
9
  REFRESH_SECONDS,
10
10
  readStored
11
- } from "./chunk-NXERDBEK.js";
11
+ } from "./chunk-OEL4DQTT.js";
12
12
  import {
13
13
  __name
14
14
  } from "./chunk-ZVVMGPBJ.js";
15
15
 
16
- // 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/http/oauth.js
16
+ // node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/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";
@@ -3,10 +3,13 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  wrapAnsi
5
5
  } from "./chunk-HTQTIKWP.js";
6
+ import {
7
+ WIRECAT_TOOLS
8
+ } from "./chunk-NTUP5RCP.js";
6
9
  import {
7
10
  commandPathOf,
8
11
  outputOf
9
- } from "./chunk-JVGVLRBA.js";
12
+ } from "./chunk-42XY6D5C.js";
10
13
  import {
11
14
  Command,
12
15
  Help,
@@ -17,18 +20,18 @@ import {
17
20
  environmentOf,
18
21
  metaOf,
19
22
  takesProfile
20
- } from "./chunk-VBVR6JRC.js";
23
+ } from "./chunk-ROK7Z5LQ.js";
21
24
  import {
22
25
  writes
23
- } from "./chunk-LOSYDRJU.js";
26
+ } from "./chunk-C3JSQ7UJ.js";
24
27
  import {
25
28
  CliError
26
- } from "./chunk-QQGPV3QN.js";
29
+ } from "./chunk-PMGAU6AP.js";
27
30
  import {
28
31
  __name
29
32
  } from "./chunk-ZVVMGPBJ.js";
30
33
 
31
- // 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/cli/help/command-help.js
34
+ // node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/cli/help/command-help.js
32
35
  var ARGUMENT_KINDS = {
33
36
  chat: "chat",
34
37
  chats: "chat",
@@ -221,60 +224,7 @@ var installCommandHelp = /* @__PURE__ */ __name((program, { profile = true } = {
221
224
  command.addHelpText("after", () => commandHelpText(command));
222
225
  }, "installCommandHelp");
223
226
 
224
- // 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/cli/help/first-screen.js
225
- var WIRECAT_TOOLS = [
226
- {
227
- command: "tg",
228
- package: "@wirecat/tg-cli",
229
- does: "Telegram in the same local store: search, review and tasks offline"
230
- },
231
- {
232
- command: "max",
233
- package: "@wirecat/max-cli",
234
- does: "MAX in the same local store: search, review and tasks offline"
235
- },
236
- {
237
- command: "wa",
238
- package: "@wirecat/whatsapp-cli",
239
- does: "WhatsApp in the same local store: search, review and tasks offline"
240
- },
241
- {
242
- command: "zm",
243
- package: "@wirecat/zoom-cli",
244
- does: "Zoom meetings: transcripts and summaries, searchable with your other WireCat data"
245
- },
246
- {
247
- command: "drive",
248
- package: "@wirecat/drive-cli",
249
- does: "Google Drive and Docs as local text, searchable with your other WireCat data"
250
- },
251
- {
252
- command: "gcal",
253
- package: "@wirecat/gcal-cli",
254
- does: "Google Calendar events, searchable with your other WireCat data"
255
- },
256
- {
257
- command: "memo",
258
- package: "@wirecat/cli-memo",
259
- shown: "memo context <person>",
260
- does: "one person across messengers, mail, notes and meetings"
261
- },
262
- {
263
- command: "mail",
264
- package: "@wirecat/mail-cli",
265
- does: "IMAP mail in the same local store: search your mailbox offline, next to your other WireCat data"
266
- },
267
- {
268
- command: "b24",
269
- package: "@wirecat/bitrix24-cli",
270
- does: "Bitrix24 CRM: deals, leads and pipelines, searchable with your other WireCat data"
271
- },
272
- {
273
- command: "pbx",
274
- package: "@wirecat/asterisk-cli",
275
- does: "Asterisk PBX calls and recordings, searchable with your other WireCat data"
276
- }
277
- ];
227
+ // node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/cli/help/first-screen.js
278
228
  var WIDTH = 100;
279
229
  var widest = /* @__PURE__ */ __name((texts) => texts.reduce((most, text) => Math.max(most, text.length), 0), "widest");
280
230
  var block = /* @__PURE__ */ __name((title, rows, column) => rows.length === 0 ? [] : ["", `${title}:`, ...rows.map(([left, right]) => ` ${left.padEnd(column)}${right}`)], "block");
@@ -364,7 +314,6 @@ var installHelp = /* @__PURE__ */ __name((program, screen = {}) => {
364
314
  }, "installHelp");
365
315
 
366
316
  export {
367
- WIRECAT_TOOLS,
368
317
  firstScreen,
369
318
  installHelp
370
319
  };
@@ -2,34 +2,34 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  validateFormattedText
5
- } from "./chunk-2VBEBPGX.js";
5
+ } from "./chunk-KVFBSOCV.js";
6
6
  import {
7
7
  inputPolicy
8
- } from "./chunk-NWD7AFOR.js";
8
+ } from "./chunk-YPB5BEAD.js";
9
9
  import {
10
10
  RECORDS_SCHEMA_VERSION,
11
11
  RECORD_TYPES,
12
12
  pointerOf
13
- } from "./chunk-WYGDALB3.js";
13
+ } from "./chunk-2RV4V55B.js";
14
14
  import {
15
15
  parseReference
16
- } from "./chunk-CKVWAUBW.js";
16
+ } from "./chunk-5TIWO6AR.js";
17
17
  import {
18
18
  indent
19
- } from "./chunk-EZAX77SM.js";
19
+ } from "./chunk-WZFGZBGD.js";
20
20
  import {
21
21
  CliError
22
- } from "./chunk-QQGPV3QN.js";
22
+ } from "./chunk-PMGAU6AP.js";
23
23
  import {
24
24
  __name
25
25
  } from "./chunk-ZVVMGPBJ.js";
26
26
 
27
- // 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/domain/checks.js
27
+ // node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/domain/checks.js
28
28
  var spelled = /* @__PURE__ */ __name((check, args) => `${check.replaceAll(".", " ")}${args === void 0 ? "" : ` ${args}`}`, "spelled");
29
29
  var bareCheck = /* @__PURE__ */ __name((check, args) => `\`${spelled(check, args)}\``, "bareCheck");
30
30
  var checkWords = /* @__PURE__ */ __name((command, profile) => (check, args) => `\`${command} ${profile === void 0 ? "" : `${profile} `}${spelled(check, args)}\``, "checkWords");
31
31
 
32
- // 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/domain/links.js
32
+ // node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/domain/links.js
33
33
  var LINK_VERSION = "v1";
34
34
  var DEFAULT_LINK_CONFIG = { base: "https://wirecat.dev/o", enabled: true };
35
35
  var APP_PREFIX = "wirecat://open";
@@ -150,7 +150,7 @@ var linkFor = /* @__PURE__ */ __name((ref, { form, config = DEFAULT_LINK_CONFIG,
150
150
  return form === "app" ? `${APP_PREFIX}${path}` : `${config.base}#${path}`;
151
151
  }, "linkFor");
152
152
 
153
- // 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/domain/markdown.js
153
+ // node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/domain/markdown.js
154
154
  var MARKERS = [
155
155
  ["**", "bold"],
156
156
  ["~~", "strike"],
@@ -196,7 +196,7 @@ var closing = /* @__PURE__ */ __name((input, open, marker) => {
196
196
  return end;
197
197
  }, "closing");
198
198
 
199
- // 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/domain/markdown-spans.js
199
+ // node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/domain/markdown-spans.js
200
200
  var STYLES = [
201
201
  ["**", "bold"],
202
202
  ["__", "underline"],
@@ -356,7 +356,7 @@ var parseMarkdownSpans = /* @__PURE__ */ __name((input) => {
356
356
  return validateFormattedText(result);
357
357
  }, "parseMarkdownSpans");
358
358
 
359
- // 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/domain/polls.js
359
+ // node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/domain/polls.js
360
360
  var countedPoll = /* @__PURE__ */ __name((poll, votes, self) => {
361
361
  const cast = votes.filter((vote) => vote.answers.length > 0);
362
362
  const mine = self === null ? void 0 : votes.find((vote) => vote.person.id === self);
@@ -371,7 +371,7 @@ var countedPoll = /* @__PURE__ */ __name((poll, votes, self) => {
371
371
  };
372
372
  }, "countedPoll");
373
373
 
374
- // 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/domain/records-table.js
374
+ // node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/domain/records-table.js
375
375
  var TABLE_RECORD_TYPES = Object.keys(RECORD_TYPES).filter((type) => RECORD_TYPES[type].sheet !== false);
376
376
  var TableError = class extends Error {
377
377
  static {
@@ -2361,7 +2361,7 @@ var createDataURL = /* @__PURE__ */ __name(function(width, height, getPixel) {
2361
2361
  var qrcode_default = qrcode;
2362
2362
  var stringToBytes = qrcode.stringToBytes;
2363
2363
 
2364
- // 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/terminal/qr.js
2364
+ // node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/terminal/qr.js
2365
2365
  var QUIET_ZONE = 4;
2366
2366
  var BLACK_ON_WHITE = "\x1B[30;107m";
2367
2367
  var RESET = "\x1B[0m";
@@ -2408,7 +2408,7 @@ var plainQr = /* @__PURE__ */ __name((link) => {
2408
2408
  return lines.join("\n");
2409
2409
  }, "plainQr");
2410
2410
 
2411
- // 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/terminal/login-qr.js
2411
+ // node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/terminal/login-qr.js
2412
2412
  var MARGIN = 2;
2413
2413
  var atTerminal = /* @__PURE__ */ __name((input) => input.isTTY === true && !inputPolicy(input).noInput, "atTerminal");
2414
2414
  var PASTE_QR = "agents: paste the QR code above into the chat as a code block, exactly as printed; when a new one is printed, paste it and say the old one expired";
@@ -3,16 +3,16 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  formatMeetingReference,
5
5
  parseMeetingReference
6
- } from "./chunk-QOQF2TX3.js";
6
+ } from "./chunk-WNQECDIP.js";
7
7
  import {
8
8
  CliError,
9
9
  singleLine
10
- } from "./chunk-QQGPV3QN.js";
10
+ } from "./chunk-PMGAU6AP.js";
11
11
  import {
12
12
  __name
13
13
  } from "./chunk-ZVVMGPBJ.js";
14
14
 
15
- // 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/domain/locator.js
15
+ // node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/domain/locator.js
16
16
  var SCHEME = "msg:";
17
17
  var formatLocator = /* @__PURE__ */ __name(({ provider, account, chat, message }) => SCHEME + [provider, account, chat, message].map(encodeURIComponent).join("/"), "formatLocator");
18
18
  var isLocator = /* @__PURE__ */ __name((reference) => reference.trim().startsWith(SCHEME), "isLocator");
@@ -33,7 +33,7 @@ var parseLocator = /* @__PURE__ */ __name((reference) => {
33
33
  return { provider, account, chat, message };
34
34
  }, "parseLocator");
35
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/domain/references.js
36
+ // node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/domain/references.js
37
37
  var SIMPLE_REFERENCES = [
38
38
  "note",
39
39
  "document",
@@ -196,7 +196,7 @@ var looksLikeReference = /* @__PURE__ */ __name((text) => {
196
196
  return match !== null && byPrefix.has(match[1]);
197
197
  }, "looksLikeReference");
198
198
 
199
- // 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/domain/providers.js
199
+ // node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/domain/providers.js
200
200
  var KINDS = ["messages", "mail", "notes", "documents", "meetings", "events", "crm"];
201
201
  var MESSENGER_OPENS = { chat: "messages list", message: "messages show", contact: "contacts show" };
202
202
  var CRM_OPENS = { deal: "deals show", lead: "leads show", pipeline: "pipelines show" };
@@ -375,7 +375,7 @@ var holdsKind = /* @__PURE__ */ __name((provider, kind2) => kindsIn(provider).in
375
375
  var holdsKindOf = /* @__PURE__ */ __name((provider, kind2) => kindIn(provider) === void 0 ? kind2 === "messages" : holdsKind(provider, kind2), "holdsKindOf");
376
376
  var kindOf = /* @__PURE__ */ __name((provider) => kindIn(provider) ?? "messages", "kindOf");
377
377
 
378
- // 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/domain/money.js
378
+ // node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/domain/money.js
379
379
  var CURRENCY_SCALES = {
380
380
  AED: 2,
381
381
  AMD: 2,
@@ -469,7 +469,7 @@ var quantityOf = /* @__PURE__ */ __name((text) => {
469
469
  }, "quantityOf");
470
470
  var lineUnits = /* @__PURE__ */ __name((thousandths, unitPrice) => Number((thousandths * BigInt(unitPrice) + 500n) / 1000n), "lineUnits");
471
471
 
472
- // 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/domain/deals.js
472
+ // node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/domain/deals.js
473
473
  var DEAL_KINDS = ["deal", "lead"];
474
474
  var DEAL_STATUSES = ["open", "won", "lost"];
475
475
  var STAGE_OUTCOMES = DEAL_STATUSES;
@@ -479,7 +479,7 @@ var dealLine = /* @__PURE__ */ __name((deal) => {
479
479
  return `${deal.title} \xB7 ${deal.stage}${money}${deal.status === "open" ? "" : ` (${deal.status})`}`;
480
480
  }, "dealLine");
481
481
 
482
- // 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/domain/finance.js
482
+ // node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/domain/finance.js
483
483
  var INVOICE_DIRECTIONS = ["receivable", "payable"];
484
484
  var INVOICE_STATUSES = ["draft", "issued", "partly_paid", "paid", "void"];
485
485
  var MONEY_DIRECTIONS = ["in", "out"];
@@ -508,7 +508,7 @@ var paymentLine = /* @__PURE__ */ __name((payment) => {
508
508
  var invoiceTitle = /* @__PURE__ */ __name((invoice) => `Invoice ${invoiceLine(invoice)}`, "invoiceTitle");
509
509
  var paymentEntryTitle = /* @__PURE__ */ __name((payment) => `Payment \xB7 ${paymentLine(payment)}`, "paymentEntryTitle");
510
510
 
511
- // 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/domain/orders.js
511
+ // node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/domain/orders.js
512
512
  var ORDER_STATUSES = ["placed", "shipped", "delivered", "cancelled", "returned"];
513
513
  var ORDER_PURPOSES = ["personal", "business", "client", "other"];
514
514
  var orderLine = /* @__PURE__ */ __name((order) => {
@@ -519,7 +519,7 @@ var orderLine = /* @__PURE__ */ __name((order) => {
519
519
  }, "orderLine");
520
520
  var orderTitle = /* @__PURE__ */ __name((order) => `Order ${orderLine(order)}`, "orderTitle");
521
521
 
522
- // 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/domain/relations.js
522
+ // node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/domain/relations.js
523
523
  var ORGANIZATION_ROLES = [
524
524
  "employee",
525
525
  "contractor",
@@ -626,7 +626,7 @@ var KEYED = "kind IN ('member-of', 'related-to', 'reports-to', 'customer-of', 'p
626
626
  var notOverriddenSql = /* @__PURE__ */ __name((alias) => `NOT EXISTS (SELECT 1 FROM links override WHERE ${KEYED} AND override.kind = ${alias}.kind AND override.from_type = ${alias}.from_type AND override.from_id = ${alias}.from_id AND override.to_type = ${alias}.to_type AND override.to_id = ${alias}.to_id AND json_extract(override.metadata, '$.overrides') = ${alias}.id)`, "notOverriddenSql");
627
627
  var usableLinkSql = /* @__PURE__ */ __name((alias, now) => `(${alias}.confirmed = 1 OR (${alias}.account_id IS NOT NULL AND ${alias}.deleted_at IS NULL))` + (now === void 0 ? "" : ` AND (${alias}.ends_at IS NULL OR ${alias}.ends_at > ${Math.trunc(now)})`), "usableLinkSql");
628
628
 
629
- // 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/domain/crm.js
629
+ // node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/domain/crm.js
630
630
  var CRM_KINDS = ["organization", "person", "deal", "lead"];
631
631
  var CRM_ACTIVITY_KINDS = ["call", "email", "meeting", "todo", "task", "comment", "other"];
632
632
  var isCrmUserId = /* @__PURE__ */ __name((id) => /^\d{1,20}$/.test(id), "isCrmUserId");
@@ -636,7 +636,7 @@ var normalCrmUserId = /* @__PURE__ */ __name((id) => {
636
636
  }, "normalCrmUserId");
637
637
  var isItemKind = /* @__PURE__ */ __name((kind2) => kind2 === "deal" || kind2 === "lead", "isItemKind");
638
638
 
639
- // 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/domain/business.js
639
+ // node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/domain/business.js
640
640
  var CATALOG_KINDS = ["product", "service"];
641
641
  var BUSINESS_KINDS = ["invoice", "payment", "order", "contract", "subscription", "product", "wallet"];
642
642
  var CONTRACT_KINDS = ["sale", "purchase", "service", "lease", "employment", "nda", "license", "other"];
@@ -5,12 +5,12 @@ import {
5
5
  } from "./chunk-Y5E2WNWB.js";
6
6
  import {
7
7
  CliError
8
- } from "./chunk-QQGPV3QN.js";
8
+ } from "./chunk-PMGAU6AP.js";
9
9
  import {
10
10
  __name
11
11
  } from "./chunk-ZVVMGPBJ.js";
12
12
 
13
- // 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/store/vector-extension.js
13
+ // node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/vector-extension.js
14
14
  import { readFileSync } from "node:fs";
15
15
  var musl = /* @__PURE__ */ __name(() => {
16
16
  if (process.platform !== "linux")