@wirecat/mail-cli 0.23.0 → 0.23.1

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 (101) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/bin/mail.js +2 -2
  3. package/dist/bundle/{all-profiles-CI32WFEV.js → all-profiles-FJHJCGRU.js} +7 -7
  4. package/dist/bundle/{anthropic-ICSOMJIN.js → anthropic-AFL7NKVZ.js} +2 -2
  5. package/dist/bundle/{app-server-3F4ZB7DH.js → app-server-WKCBJMHI.js} +41 -41
  6. package/dist/bundle/{bun-7AHNFZMZ.js → bun-HQATAQJQ.js} +2 -2
  7. package/dist/bundle/{bun-sqlite-UIWRS4HI.js → bun-sqlite-4ECAV7OU.js} +2 -2
  8. package/dist/bundle/{chunk-D6WTKSRA.js → chunk-2HXHAFRP.js} +2 -2
  9. package/dist/bundle/{chunk-XP5FBDIG.js → chunk-34743C4C.js} +1 -1
  10. package/dist/bundle/{chunk-SETCGPFG.js → chunk-3OZKDC6Y.js} +7 -6
  11. package/dist/bundle/{chunk-ETIUB2DF.js → chunk-3UFD76IR.js} +4 -4
  12. package/dist/bundle/{chunk-UA4BOLIY.js → chunk-4IFX4HV2.js} +4 -4
  13. package/dist/bundle/{chunk-7SIWMF77.js → chunk-4IWJARFA.js} +1 -1
  14. package/dist/bundle/{chunk-WQRX4RQS.js → chunk-4YJJQNNJ.js} +3 -3
  15. package/dist/bundle/{chunk-5Y2WRUYP.js → chunk-5UKBUI4I.js} +1 -1
  16. package/dist/bundle/{chunk-7OVVX4F4.js → chunk-76RTQYJQ.js} +1 -1
  17. package/dist/bundle/{chunk-TEL2OMS5.js → chunk-7YRKUEYE.js} +70 -49
  18. package/dist/bundle/{chunk-I3YNNSGB.js → chunk-AGNAT7CM.js} +1 -1
  19. package/dist/bundle/{chunk-4YTX5YAU.js → chunk-B6QMMRIM.js} +175 -151
  20. package/dist/bundle/{chunk-5J4WNTTM.js → chunk-BVJQBAGL.js} +9 -9
  21. package/dist/bundle/{chunk-NEDYKKJJ.js → chunk-CBWA2T3N.js} +2 -2
  22. package/dist/bundle/{chunk-R4RAWEMV.js → chunk-CCYHBNRL.js} +14 -14
  23. package/dist/bundle/{chunk-ZYHBMDNU.js → chunk-CUOCDJFI.js} +7 -7
  24. package/dist/bundle/{chunk-HN6PB7F5.js → chunk-CYQVWITQ.js} +16 -16
  25. package/dist/bundle/{chunk-SCH3NC5X.js → chunk-E7ZVKQHG.js} +2 -2
  26. package/dist/bundle/{chunk-B4MWHI2V.js → chunk-EXPR6QAX.js} +25 -11
  27. package/dist/bundle/{chunk-5AQ4S4TZ.js → chunk-FWFNUJQD.js} +17 -17
  28. package/dist/bundle/{chunk-UTLJQG6Q.js → chunk-GJNFNC76.js} +7 -7
  29. package/dist/bundle/{chunk-S2U5BXWS.js → chunk-HOKGIYUO.js} +22 -2
  30. package/dist/bundle/{chunk-HGV7DSSA.js → chunk-KKGX7JMX.js} +2 -2
  31. package/dist/bundle/{chunk-7DFWXIY5.js → chunk-LQDMUMA2.js} +222 -222
  32. package/dist/bundle/{chunk-FIZWQTUC.js → chunk-M7RGG3UU.js} +2 -2
  33. package/dist/bundle/{chunk-HRIYU2HJ.js → chunk-MBKNL5TX.js} +433 -94
  34. package/dist/bundle/{chunk-5Z7LZAVP.js → chunk-MUDHCYN4.js} +5 -5
  35. package/dist/bundle/{chunk-KNRONMVG.js → chunk-NKBAZ4VC.js} +1 -1
  36. package/dist/bundle/{chunk-JDKC7EXM.js → chunk-NMGF3UOZ.js} +27 -27
  37. package/dist/bundle/{chunk-FVKZ55I2.js → chunk-NOA6E6MM.js} +1652 -1216
  38. package/dist/bundle/{chunk-7ZDH2XEY.js → chunk-OJCUSHZG.js} +3 -3
  39. package/dist/bundle/{chunk-JO4BJYVE.js → chunk-OU5CWCG2.js} +1 -1
  40. package/dist/bundle/{chunk-NKDYHAHP.js → chunk-PMIKRELC.js} +2 -2
  41. package/dist/bundle/{chunk-XV3M3NAN.js → chunk-QR7JZM3D.js} +1 -1
  42. package/dist/bundle/{chunk-KJQZXCNK.js → chunk-QUKD5SO2.js} +3 -3
  43. package/dist/bundle/{chunk-AFPETMXZ.js → chunk-QV3M2MHG.js} +8 -8
  44. package/dist/bundle/{chunk-6FSLEARF.js → chunk-R554W7ZO.js} +1 -1
  45. package/dist/bundle/{chunk-2BAO4T4Z.js → chunk-R5MYOLQP.js} +12 -12
  46. package/dist/bundle/{chunk-ELGEHZK2.js → chunk-ROKTS7WM.js} +1 -1
  47. package/dist/bundle/{chunk-5QQOUYNA.js → chunk-S5OTP7XS.js} +2 -2
  48. package/dist/bundle/{chunk-B6GITVDX.js → chunk-SBGXKM4U.js} +4 -4
  49. package/dist/bundle/{chunk-5AS5N7V5.js → chunk-SNTLN2QT.js} +1 -1
  50. package/dist/bundle/{chunk-FHCOGR7S.js → chunk-SR3ADLGX.js} +2 -2
  51. package/dist/bundle/{chunk-SGMENSI6.js → chunk-UMXVQIGD.js} +24 -14
  52. package/dist/bundle/{chunk-4PNIZUEC.js → chunk-V3TDQUXD.js} +23 -23
  53. package/dist/bundle/{chunk-BT7UUI6E.js → chunk-V7CFZ773.js} +2 -2
  54. package/dist/bundle/{chunk-4TKQIXND.js → chunk-VAMCRP47.js} +1 -1
  55. package/dist/bundle/{chunk-AHRHP2H2.js → chunk-VFKX5UMJ.js} +5 -5
  56. package/dist/bundle/{chunk-CNYQ3TTZ.js → chunk-VYHIX3OP.js} +22 -22
  57. package/dist/bundle/{chunk-OMW37FXK.js → chunk-VYIIX6VN.js} +1 -1
  58. package/dist/bundle/{chunk-RIAZTS6C.js → chunk-WN4HP7IZ.js} +10 -10
  59. package/dist/bundle/{chunk-IMIY7HQB.js → chunk-ZXIPJF3Y.js} +1 -1
  60. package/dist/bundle/{command-contract-UIRWJVEY.js → command-contract-IIHBNF7J.js} +14 -14
  61. package/dist/bundle/{decode-BJXABRAN.js → decode-QXKTMOTH.js} +2 -2
  62. package/dist/bundle/{dist-LLEA6R4V.js → dist-5FX36DAW.js} +18 -10
  63. package/dist/bundle/{echarts-YPTKBOZV.js → echarts-HHUM43TU.js} +2 -2
  64. package/dist/bundle/{embed-DMROTI5M.js → embed-SRZSDZVI.js} +3 -3
  65. package/dist/bundle/{embedder-DWMHXCHJ.js → embedder-WZIZCWLX.js} +6 -6
  66. package/dist/bundle/{first-run-FQOEF2IO.js → first-run-6DVWZ3JQ.js} +5 -5
  67. package/dist/bundle/first-screen-SRZ7NYHZ.js +33 -0
  68. package/dist/bundle/{instructions-OGKMROLD.js → instructions-UWONE6UT.js} +1 -1
  69. package/dist/bundle/mail.js +2 -2
  70. package/dist/bundle/{node-HIKYE546.js → node-HLAOYJDB.js} +2 -2
  71. package/dist/bundle/{node-sqlite-3GJAG7VO.js → node-sqlite-RO66I7W6.js} +3 -3
  72. package/dist/bundle/{oauth-H3DB6IHI.js → oauth-VNLB2TET.js} +4 -4
  73. package/dist/bundle/{open-DJ2PRG74.js → open-QQSG343L.js} +2 -2
  74. package/dist/bundle/{openai-MDBRYB55.js → openai-JTFC7OGF.js} +10 -10
  75. package/dist/bundle/{process-4LBD72JH.js → process-3CZAXR6P.js} +1 -1
  76. package/dist/bundle/{program-F6WK6RX4.js → program-XTOS4RAM.js} +1504 -817
  77. package/dist/bundle/{prompt-UNPUG6SO.js → prompt-HGQ6GPYL.js} +2 -2
  78. package/dist/bundle/{recognize-DMIO4PDB.js → recognize-2SHMNEIZ.js} +1 -1
  79. package/dist/bundle/{remote-24HJA72D.js → remote-GBQC3433.js} +4 -4
  80. package/dist/bundle/{rerank-PTNCHHIU.js → rerank-FQHQXFNR.js} +4 -4
  81. package/dist/bundle/{serve-T6JHM2YD.js → serve-THU67QUZ.js} +6 -6
  82. package/dist/bundle/{server-BWEYRUR3.js → server-LOT3CLYX.js} +33 -33
  83. package/dist/bundle/server-VKMUX7ZT.js +65 -0
  84. package/dist/bundle/{sqlite-runtime-ZJ4EH5ZM.js → sqlite-runtime-NOOUMBC4.js} +3 -3
  85. package/dist/bundle/{state-KSN4OFYW.js → state-KSKZCV2U.js} +3 -3
  86. package/dist/bundle/{store-OIEZJEA7.js → store-BAKSHTKF.js} +18 -12
  87. package/dist/bundle/{store-GVBW2ZFK.js → store-OHNZOQ7U.js} +20 -16
  88. package/dist/bundle/store-maintenance-command-ROQHJVEA.js +54 -0
  89. package/dist/commands/rules.d.ts.map +1 -1
  90. package/dist/commands/rules.js +29 -7
  91. package/dist/commands/rules.js.map +1 -1
  92. package/dist/commands/sync.d.ts +0 -1
  93. package/dist/commands/sync.d.ts.map +1 -1
  94. package/dist/commands/sync.js +8 -2
  95. package/dist/commands/sync.js.map +1 -1
  96. package/dist/version.d.ts +1 -1
  97. package/dist/version.js +1 -1
  98. package/package.json +3 -3
  99. package/dist/bundle/first-screen-B6LF5464.js +0 -33
  100. package/dist/bundle/server-VUQNR5ZD.js +0 -65
  101. package/dist/bundle/store-maintenance-command-KJ54HLUQ.js +0 -54
@@ -3,8 +3,8 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  pasteHint,
5
5
  readSecret
6
- } from "./chunk-5QQOUYNA.js";
7
- import "./chunk-IMIY7HQB.js";
6
+ } from "./chunk-S5OTP7XS.js";
7
+ import "./chunk-ZXIPJF3Y.js";
8
8
  import "./chunk-LLYVBO3R.js";
9
9
  import "./chunk-GOMJNH56.js";
10
10
  import "./chunk-Y5E2WNWB.js";
@@ -8,7 +8,7 @@ import {
8
8
  openRecognizer,
9
9
  openSpeechCutter,
10
10
  toModelRate
11
- } from "./chunk-7ZDH2XEY.js";
11
+ } from "./chunk-OJCUSHZG.js";
12
12
  import "./chunk-LLYVBO3R.js";
13
13
  import "./chunk-GOMJNH56.js";
14
14
  import "./chunk-Y5E2WNWB.js";
@@ -8,10 +8,10 @@ import {
8
8
  openRemote,
9
9
  remoteKey,
10
10
  remoteModel
11
- } from "./chunk-NKDYHAHP.js";
12
- import "./chunk-AHRHP2H2.js";
13
- import "./chunk-KJQZXCNK.js";
14
- import "./chunk-5Y2WRUYP.js";
11
+ } from "./chunk-PMIKRELC.js";
12
+ import "./chunk-VFKX5UMJ.js";
13
+ import "./chunk-QUKD5SO2.js";
14
+ import "./chunk-5UKBUI4I.js";
15
15
  import "./chunk-LLYVBO3R.js";
16
16
  import "./chunk-GOMJNH56.js";
17
17
  import "./chunk-Y5E2WNWB.js";
@@ -4,9 +4,9 @@ import {
4
4
  defaultThreads,
5
5
  loadModel,
6
6
  truncated
7
- } from "./chunk-AHRHP2H2.js";
8
- import "./chunk-KJQZXCNK.js";
9
- import "./chunk-5Y2WRUYP.js";
7
+ } from "./chunk-VFKX5UMJ.js";
8
+ import "./chunk-QUKD5SO2.js";
9
+ import "./chunk-5UKBUI4I.js";
10
10
  import "./chunk-LLYVBO3R.js";
11
11
  import "./chunk-GOMJNH56.js";
12
12
  import "./chunk-Y5E2WNWB.js";
@@ -15,7 +15,7 @@ import {
15
15
  __name
16
16
  } from "./chunk-ZVVMGPBJ.js";
17
17
 
18
- // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_af5f2db22f61976c09fb28de9c7dc33e/node_modules/@wirecat/cli-core/dist/embeddings/rerank.js
18
+ // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/embeddings/rerank.js
19
19
  var openReranker = /* @__PURE__ */ __name(async (model, directory, { threads = defaultThreads() } = {}) => {
20
20
  const { ort, tokenizer, session } = await loadModel(model, directory, threads);
21
21
  const typeIds = session.inputNames.includes("token_type_ids");
@@ -2,10 +2,10 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  listen
5
- } from "./chunk-XP5FBDIG.js";
5
+ } from "./chunk-34743C4C.js";
6
6
  import {
7
7
  ownerLogin
8
- } from "./chunk-D6WTKSRA.js";
8
+ } from "./chunk-2HXHAFRP.js";
9
9
  import {
10
10
  WebStandardStreamableHTTPServerTransport,
11
11
  createMcpHandler,
@@ -20,9 +20,9 @@ import {
20
20
  calledTools,
21
21
  httpActivityFile,
22
22
  httpLock
23
- } from "./chunk-UA4BOLIY.js";
24
- import "./chunk-FIZWQTUC.js";
25
- import "./chunk-JO4BJYVE.js";
23
+ } from "./chunk-4IFX4HV2.js";
24
+ import "./chunk-M7RGG3UU.js";
25
+ import "./chunk-OU5CWCG2.js";
26
26
  import "./chunk-LLYVBO3R.js";
27
27
  import "./chunk-GOMJNH56.js";
28
28
  import "./chunk-Y5E2WNWB.js";
@@ -33,7 +33,7 @@ import {
33
33
  __name
34
34
  } from "./chunk-ZVVMGPBJ.js";
35
35
 
36
- // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_af5f2db22f61976c09fb28de9c7dc33e/node_modules/@wirecat/cli-core/dist/mcp/http/serve.js
36
+ // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/mcp/http/serve.js
37
37
  import { randomUUID } from "node:crypto";
38
38
  var MCP_PATH = "/mcp";
39
39
  var AS_METADATA = "/.well-known/oauth-authorization-server";
@@ -2,33 +2,33 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  botInstructions
5
- } from "./chunk-7OVVX4F4.js";
5
+ } from "./chunk-76RTQYJQ.js";
6
6
  import {
7
7
  answered,
8
8
  normal,
9
9
  registerCommands,
10
10
  runCommandForAgent,
11
11
  toolsFromCommands
12
- } from "./chunk-R4RAWEMV.js";
12
+ } from "./chunk-CCYHBNRL.js";
13
13
  import {
14
14
  agentJson,
15
15
  skillResource
16
- } from "./chunk-5J4WNTTM.js";
17
- import "./chunk-S2U5BXWS.js";
16
+ } from "./chunk-BVJQBAGL.js";
17
+ import "./chunk-HOKGIYUO.js";
18
18
  import {
19
19
  callerOf,
20
20
  serveStdio
21
- } from "./chunk-HGV7DSSA.js";
21
+ } from "./chunk-KKGX7JMX.js";
22
22
  import {
23
23
  McpServer
24
24
  } from "./chunk-5D4AEUVA.js";
25
25
  import {
26
26
  wholeList
27
- } from "./chunk-7DFWXIY5.js";
28
- import "./chunk-2BAO4T4Z.js";
29
- import "./chunk-AFPETMXZ.js";
30
- import "./chunk-NEDYKKJJ.js";
31
- import "./chunk-IMIY7HQB.js";
27
+ } from "./chunk-LQDMUMA2.js";
28
+ import "./chunk-R5MYOLQP.js";
29
+ import "./chunk-QV3M2MHG.js";
30
+ import "./chunk-CBWA2T3N.js";
31
+ import "./chunk-ZXIPJF3Y.js";
32
32
  import {
33
33
  MESSENGER_CHANGE_REFUSAL,
34
34
  changesMessenger,
@@ -36,32 +36,32 @@ import {
36
36
  itemOf,
37
37
  readOnlyLockOf,
38
38
  readOnlyRefusal
39
- } from "./chunk-4YTX5YAU.js";
40
- import "./chunk-B6GITVDX.js";
41
- import "./chunk-ZYHBMDNU.js";
42
- import "./chunk-JO4BJYVE.js";
39
+ } from "./chunk-B6QMMRIM.js";
40
+ import "./chunk-SBGXKM4U.js";
41
+ import "./chunk-CUOCDJFI.js";
42
+ import "./chunk-OU5CWCG2.js";
43
43
  import "./chunk-3QVGB2CI.js";
44
44
  import "./chunk-3DQYO7FB.js";
45
- import "./chunk-FHCOGR7S.js";
46
- import "./chunk-HN6PB7F5.js";
47
- import "./chunk-SCH3NC5X.js";
48
- import "./chunk-FVKZ55I2.js";
49
- import "./chunk-5AQ4S4TZ.js";
50
- import "./chunk-B4MWHI2V.js";
51
- import "./chunk-TEL2OMS5.js";
52
- import "./chunk-6FSLEARF.js";
53
- import "./chunk-ELGEHZK2.js";
54
- import "./chunk-UTLJQG6Q.js";
55
- import "./chunk-ETIUB2DF.js";
56
- import "./chunk-NKDYHAHP.js";
57
- import "./chunk-AHRHP2H2.js";
58
- import "./chunk-KJQZXCNK.js";
59
- import "./chunk-5Y2WRUYP.js";
45
+ import "./chunk-SR3ADLGX.js";
46
+ import "./chunk-CYQVWITQ.js";
47
+ import "./chunk-E7ZVKQHG.js";
48
+ import "./chunk-NOA6E6MM.js";
49
+ import "./chunk-FWFNUJQD.js";
50
+ import "./chunk-EXPR6QAX.js";
51
+ import "./chunk-7YRKUEYE.js";
52
+ import "./chunk-R554W7ZO.js";
53
+ import "./chunk-ROKTS7WM.js";
54
+ import "./chunk-GJNFNC76.js";
55
+ import "./chunk-3UFD76IR.js";
56
+ import "./chunk-PMIKRELC.js";
57
+ import "./chunk-VFKX5UMJ.js";
58
+ import "./chunk-QUKD5SO2.js";
59
+ import "./chunk-5UKBUI4I.js";
60
60
  import "./chunk-UHC5I3JV.js";
61
61
  import "./chunk-QZLK2ISN.js";
62
62
  import "./chunk-D72URWJE.js";
63
- import "./chunk-5Z7LZAVP.js";
64
- import "./chunk-5AS5N7V5.js";
63
+ import "./chunk-MUDHCYN4.js";
64
+ import "./chunk-SNTLN2QT.js";
65
65
  import "./chunk-LLYVBO3R.js";
66
66
  import {
67
67
  mcpErrorResult,
@@ -69,12 +69,12 @@ import {
69
69
  } from "./chunk-GOMJNH56.js";
70
70
  import "./chunk-Y5E2WNWB.js";
71
71
  import "./chunk-DALBYUPC.js";
72
- import "./chunk-XV3M3NAN.js";
72
+ import "./chunk-QR7JZM3D.js";
73
73
  import {
74
74
  __name
75
75
  } from "./chunk-ZVVMGPBJ.js";
76
76
 
77
- // node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_af5f2db22f61976c09fb28de9c7dc33e/node_modules/@wirecat/cli-core/dist/mcp/bot/server.js
77
+ // node_modules/.pnpm/@wirecat+cli-core@0.618.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_89df442a19027064da492ef27322716d/node_modules/@wirecat/cli-core/dist/mcp/bot/server.js
78
78
  import { randomUUID } from "node:crypto";
79
79
  var body = /* @__PURE__ */ __name((command, value) => Array.isArray(value) ? wholeList(`bot ${command}`, value) : value !== null && typeof value === "object" && ("item" in value || "items" in value) ? value : itemOf(value !== null && typeof value === "object" ? value : { value }), "body");
80
80
  var createBotServer = /* @__PURE__ */ __name((options) => {
@@ -0,0 +1,65 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ PER_RUN,
5
+ createServer,
6
+ envelope,
7
+ serveOverHttpUntilStopped,
8
+ serveOverStdio
9
+ } from "./chunk-NMGF3UOZ.js";
10
+ import "./chunk-CCYHBNRL.js";
11
+ import "./chunk-V3TDQUXD.js";
12
+ import "./chunk-BVJQBAGL.js";
13
+ import "./chunk-HOKGIYUO.js";
14
+ import "./chunk-VYIIX6VN.js";
15
+ import "./chunk-4IWJARFA.js";
16
+ import "./chunk-KKGX7JMX.js";
17
+ import "./chunk-5D4AEUVA.js";
18
+ import "./chunk-4IFX4HV2.js";
19
+ import "./chunk-VYHIX3OP.js";
20
+ import "./chunk-LQDMUMA2.js";
21
+ import "./chunk-R5MYOLQP.js";
22
+ import "./chunk-QV3M2MHG.js";
23
+ import "./chunk-CBWA2T3N.js";
24
+ import "./chunk-M7RGG3UU.js";
25
+ import "./chunk-ZXIPJF3Y.js";
26
+ import "./chunk-4YJJQNNJ.js";
27
+ import "./chunk-B6QMMRIM.js";
28
+ import "./chunk-SBGXKM4U.js";
29
+ import "./chunk-CUOCDJFI.js";
30
+ import "./chunk-OU5CWCG2.js";
31
+ import "./chunk-3QVGB2CI.js";
32
+ import "./chunk-3DQYO7FB.js";
33
+ import "./chunk-SR3ADLGX.js";
34
+ import "./chunk-CYQVWITQ.js";
35
+ import "./chunk-E7ZVKQHG.js";
36
+ import "./chunk-NOA6E6MM.js";
37
+ import "./chunk-FWFNUJQD.js";
38
+ import "./chunk-EXPR6QAX.js";
39
+ import "./chunk-7YRKUEYE.js";
40
+ import "./chunk-R554W7ZO.js";
41
+ import "./chunk-ROKTS7WM.js";
42
+ import "./chunk-GJNFNC76.js";
43
+ import "./chunk-3UFD76IR.js";
44
+ import "./chunk-PMIKRELC.js";
45
+ import "./chunk-VFKX5UMJ.js";
46
+ import "./chunk-QUKD5SO2.js";
47
+ import "./chunk-5UKBUI4I.js";
48
+ import "./chunk-UHC5I3JV.js";
49
+ import "./chunk-QZLK2ISN.js";
50
+ import "./chunk-D72URWJE.js";
51
+ import "./chunk-MUDHCYN4.js";
52
+ import "./chunk-SNTLN2QT.js";
53
+ import "./chunk-LLYVBO3R.js";
54
+ import "./chunk-GOMJNH56.js";
55
+ import "./chunk-Y5E2WNWB.js";
56
+ import "./chunk-DALBYUPC.js";
57
+ import "./chunk-QR7JZM3D.js";
58
+ import "./chunk-ZVVMGPBJ.js";
59
+ export {
60
+ PER_RUN,
61
+ createServer,
62
+ envelope,
63
+ serveOverHttpUntilStopped,
64
+ serveOverStdio
65
+ };
@@ -4,9 +4,9 @@ import {
4
4
  ensureSqlite,
5
5
  nodeRuntime,
6
6
  relay
7
- } from "./chunk-BT7UUI6E.js";
8
- import "./chunk-5Z7LZAVP.js";
9
- import "./chunk-5AS5N7V5.js";
7
+ } from "./chunk-V7CFZ773.js";
8
+ import "./chunk-MUDHCYN4.js";
9
+ import "./chunk-SNTLN2QT.js";
10
10
  import "./chunk-LLYVBO3R.js";
11
11
  import "./chunk-GOMJNH56.js";
12
12
  import "./chunk-Y5E2WNWB.js";
@@ -12,9 +12,9 @@ import {
12
12
  readHttpLock,
13
13
  readStored,
14
14
  signedInClients
15
- } from "./chunk-UA4BOLIY.js";
16
- import "./chunk-FIZWQTUC.js";
17
- import "./chunk-JO4BJYVE.js";
15
+ } from "./chunk-4IFX4HV2.js";
16
+ import "./chunk-M7RGG3UU.js";
17
+ import "./chunk-OU5CWCG2.js";
18
18
  import "./chunk-LLYVBO3R.js";
19
19
  import "./chunk-GOMJNH56.js";
20
20
  import "./chunk-Y5E2WNWB.js";
@@ -30,6 +30,7 @@ import {
30
30
  historyStartKey,
31
31
  inboxKey,
32
32
  involvementStoreOver,
33
+ mergeId,
33
34
  messageOfEmail,
34
35
  noteIndexState,
35
36
  openSqlite,
@@ -38,6 +39,7 @@ import {
38
39
  ownerLanguages,
39
40
  parseCrmSetting,
40
41
  parseCrmSettingValue,
42
+ parseMergeId,
41
43
  parseOwnerLanguages,
42
44
  pendingNormalization,
43
45
  queryFilter,
@@ -64,28 +66,29 @@ import {
64
66
  stemsState,
65
67
  storeClients,
66
68
  storeContents,
69
+ storedTemplateBodies,
67
70
  threadConversation,
68
71
  titlePart,
69
72
  vectorIndexCounts
70
- } from "./chunk-FVKZ55I2.js";
71
- import "./chunk-5AQ4S4TZ.js";
72
- import "./chunk-B4MWHI2V.js";
73
+ } from "./chunk-NOA6E6MM.js";
74
+ import "./chunk-FWFNUJQD.js";
75
+ import "./chunk-EXPR6QAX.js";
73
76
  import {
74
77
  BUSINESS_KINDS
75
- } from "./chunk-TEL2OMS5.js";
76
- import "./chunk-6FSLEARF.js";
77
- import "./chunk-ELGEHZK2.js";
78
- import "./chunk-UTLJQG6Q.js";
79
- import "./chunk-ETIUB2DF.js";
80
- import "./chunk-5Y2WRUYP.js";
78
+ } from "./chunk-7YRKUEYE.js";
79
+ import "./chunk-R554W7ZO.js";
80
+ import "./chunk-ROKTS7WM.js";
81
+ import "./chunk-GJNFNC76.js";
82
+ import "./chunk-3UFD76IR.js";
83
+ import "./chunk-5UKBUI4I.js";
81
84
  import "./chunk-QZLK2ISN.js";
82
- import "./chunk-5Z7LZAVP.js";
83
- import "./chunk-5AS5N7V5.js";
85
+ import "./chunk-MUDHCYN4.js";
86
+ import "./chunk-SNTLN2QT.js";
84
87
  import "./chunk-LLYVBO3R.js";
85
88
  import "./chunk-GOMJNH56.js";
86
89
  import "./chunk-Y5E2WNWB.js";
87
90
  import "./chunk-DALBYUPC.js";
88
- import "./chunk-XV3M3NAN.js";
91
+ import "./chunk-QR7JZM3D.js";
89
92
  import "./chunk-ZVVMGPBJ.js";
90
93
  export {
91
94
  AGENDA_COLUMNS,
@@ -118,6 +121,7 @@ export {
118
121
  historyStartKey,
119
122
  inboxKey,
120
123
  involvementStoreOver,
124
+ mergeId,
121
125
  messageOfEmail,
122
126
  noteIndexState,
123
127
  openSqlite,
@@ -126,6 +130,7 @@ export {
126
130
  ownerLanguages,
127
131
  parseCrmSetting,
128
132
  parseCrmSettingValue,
133
+ parseMergeId,
129
134
  parseOwnerLanguages,
130
135
  pendingNormalization,
131
136
  queryFilter,
@@ -152,6 +157,7 @@ export {
152
157
  stemsState,
153
158
  storeClients,
154
159
  storeContents,
160
+ storedTemplateBodies,
155
161
  threadConversation,
156
162
  titlePart,
157
163
  vectorIndexCounts
@@ -8,10 +8,10 @@ import {
8
8
  previewProjectAnnotationSnapshot,
9
9
  snapshotProjectAnnotations,
10
10
  storeHealth
11
- } from "./chunk-HN6PB7F5.js";
11
+ } from "./chunk-CYQVWITQ.js";
12
12
  import {
13
13
  note
14
- } from "./chunk-SCH3NC5X.js";
14
+ } from "./chunk-E7ZVKQHG.js";
15
15
  import {
16
16
  ADDED_KINDS,
17
17
  BUSINESS_FIND_MAX,
@@ -41,8 +41,6 @@ import {
41
41
  PROPOSAL_STATUSES,
42
42
  REMINDERS_QUERY,
43
43
  SCOPES,
44
- SOURCE_REVIEW_CAUSES,
45
- SOURCE_REVIEW_KIND,
46
44
  TASK_EVENT_KINDS,
47
45
  TASK_PAIR_DECISIONS,
48
46
  TASK_RELATION_KINDS,
@@ -63,10 +61,12 @@ import {
63
61
  isDecisionToken,
64
62
  isOwnerOnlyKind,
65
63
  mayDecide,
64
+ mergeId,
66
65
  migrate,
67
66
  openStore,
68
67
  ownerLanguages,
69
68
  parseCallbackData,
69
+ parseMergeId,
70
70
  pendingNormalization,
71
71
  planProjectAnnotationSnapshot,
72
72
  planProjectAnnotations,
@@ -80,8 +80,8 @@ import {
80
80
  validateEvidenceFindings,
81
81
  waitingPointer,
82
82
  withoutField
83
- } from "./chunk-FVKZ55I2.js";
84
- import "./chunk-5AQ4S4TZ.js";
83
+ } from "./chunk-NOA6E6MM.js";
84
+ import "./chunk-FWFNUJQD.js";
85
85
  import {
86
86
  CLOSED_STATES,
87
87
  FACT_STATUSES,
@@ -89,6 +89,8 @@ import {
89
89
  MEMORY_SCOPES,
90
90
  MEMORY_STATUSES,
91
91
  PRIORITY_LABELS,
92
+ SOURCE_REVIEW_CAUSES,
93
+ SOURCE_REVIEW_KIND,
92
94
  TASK_STATES,
93
95
  TASK_TYPES,
94
96
  WORK_TASK_TYPES,
@@ -106,7 +108,7 @@ import {
106
108
  readHealthMark,
107
109
  recordDeepCheck,
108
110
  reminder
109
- } from "./chunk-B4MWHI2V.js";
111
+ } from "./chunk-EXPR6QAX.js";
110
112
  import {
111
113
  BUSINESS_KINDS,
112
114
  FACT_TYPES,
@@ -114,26 +116,26 @@ import {
114
116
  PAYMENT_STATES,
115
117
  paymentTitle,
116
118
  validatePayment
117
- } from "./chunk-TEL2OMS5.js";
118
- import "./chunk-6FSLEARF.js";
119
- import "./chunk-ELGEHZK2.js";
120
- import "./chunk-UTLJQG6Q.js";
121
- import "./chunk-ETIUB2DF.js";
119
+ } from "./chunk-7YRKUEYE.js";
120
+ import "./chunk-R554W7ZO.js";
121
+ import "./chunk-ROKTS7WM.js";
122
+ import "./chunk-GJNFNC76.js";
123
+ import "./chunk-3UFD76IR.js";
122
124
  import {
123
125
  storePath
124
- } from "./chunk-5Y2WRUYP.js";
126
+ } from "./chunk-5UKBUI4I.js";
125
127
  import "./chunk-QZLK2ISN.js";
126
128
  import {
127
129
  openCache
128
- } from "./chunk-5Z7LZAVP.js";
130
+ } from "./chunk-MUDHCYN4.js";
129
131
  import {
130
132
  PRAGMAS
131
- } from "./chunk-5AS5N7V5.js";
133
+ } from "./chunk-SNTLN2QT.js";
132
134
  import "./chunk-LLYVBO3R.js";
133
135
  import "./chunk-GOMJNH56.js";
134
136
  import "./chunk-Y5E2WNWB.js";
135
137
  import "./chunk-DALBYUPC.js";
136
- import "./chunk-XV3M3NAN.js";
138
+ import "./chunk-QR7JZM3D.js";
137
139
  import "./chunk-ZVVMGPBJ.js";
138
140
  export {
139
141
  ADDED_KINDS,
@@ -208,6 +210,7 @@ export {
208
210
  isOwnerOnlyKind,
209
211
  markStoreDamaged,
210
212
  mayDecide,
213
+ mergeId,
211
214
  migrate,
212
215
  note,
213
216
  openCache,
@@ -215,6 +218,7 @@ export {
215
218
  organization,
216
219
  ownerLanguages,
217
220
  parseCallbackData,
221
+ parseMergeId,
218
222
  paymentTitle,
219
223
  pendingNormalization,
220
224
  planProjectAnnotationSnapshot,
@@ -0,0 +1,54 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ buildStems,
5
+ storeMaintenanceCommands,
6
+ storeSummary
7
+ } from "./chunk-MBKNL5TX.js";
8
+ import "./chunk-AGNAT7CM.js";
9
+ import "./chunk-VYHIX3OP.js";
10
+ import "./chunk-LQDMUMA2.js";
11
+ import "./chunk-R5MYOLQP.js";
12
+ import "./chunk-QV3M2MHG.js";
13
+ import "./chunk-CBWA2T3N.js";
14
+ import "./chunk-M7RGG3UU.js";
15
+ import "./chunk-S5OTP7XS.js";
16
+ import "./chunk-ZXIPJF3Y.js";
17
+ import "./chunk-HTQTIKWP.js";
18
+ import "./chunk-B6QMMRIM.js";
19
+ import "./chunk-SBGXKM4U.js";
20
+ import "./chunk-CUOCDJFI.js";
21
+ import "./chunk-OU5CWCG2.js";
22
+ import "./chunk-3QVGB2CI.js";
23
+ import "./chunk-3DQYO7FB.js";
24
+ import "./chunk-SR3ADLGX.js";
25
+ import "./chunk-CYQVWITQ.js";
26
+ import "./chunk-E7ZVKQHG.js";
27
+ import "./chunk-NOA6E6MM.js";
28
+ import "./chunk-FWFNUJQD.js";
29
+ import "./chunk-EXPR6QAX.js";
30
+ import "./chunk-7YRKUEYE.js";
31
+ import "./chunk-R554W7ZO.js";
32
+ import "./chunk-ROKTS7WM.js";
33
+ import "./chunk-GJNFNC76.js";
34
+ import "./chunk-3UFD76IR.js";
35
+ import "./chunk-PMIKRELC.js";
36
+ import "./chunk-VFKX5UMJ.js";
37
+ import "./chunk-QUKD5SO2.js";
38
+ import "./chunk-5UKBUI4I.js";
39
+ import "./chunk-UHC5I3JV.js";
40
+ import "./chunk-QZLK2ISN.js";
41
+ import "./chunk-D72URWJE.js";
42
+ import "./chunk-MUDHCYN4.js";
43
+ import "./chunk-SNTLN2QT.js";
44
+ import "./chunk-LLYVBO3R.js";
45
+ import "./chunk-GOMJNH56.js";
46
+ import "./chunk-Y5E2WNWB.js";
47
+ import "./chunk-DALBYUPC.js";
48
+ import "./chunk-QR7JZM3D.js";
49
+ import "./chunk-ZVVMGPBJ.js";
50
+ export {
51
+ buildStems,
52
+ storeMaintenanceCommands,
53
+ storeSummary
54
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../../src/commands/rules.ts"],"names":[],"mappings":"AAgCA,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAA;AA6a3C,eAAO,MAAM,YAAY,QAAO,OAQA,CAAA"}
1
+ {"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../../src/commands/rules.ts"],"names":[],"mappings":"AAoCA,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAA;AAqc3C,eAAO,MAAM,YAAY,QAAO,OAQA,CAAA"}
@@ -2,8 +2,8 @@ import { readFileSync } from "node:fs";
2
2
  import { CliError } from "@wirecat/cli-base";
3
3
  import { annotate } from "@wirecat/cli-base/commands";
4
4
  import { queryFieldsOf } from "@wirecat/cli-base/query";
5
- import { answerEntity, baseContext, dateWindow, grantsAuthority, itemOf, LOCAL_READ, LOCAL_WRITE, listOf, listQuery, outputFor, renderAnswer, snakeKeys, typedQuery, withQuery, } from "@wirecat/cli-core/cli";
6
- import { conditionKeys, describeMatch, mapProposedTags, PRESET_NAMES, storedMailRules, } from "@wirecat/cli-core/mail";
5
+ import { answerEntity, baseContext, dateWindow, grantsAuthority, itemOf, LOCAL_READ, LOCAL_WRITE, listOf, listQuery, narrowsUnderLock, outputFor, readOnlyLockOf, readOnlyRefusal, renderAnswer, snakeKeys, typedQuery, withQuery, } from "@wirecat/cli-core/cli";
6
+ import { conditionKeys, describeMatch, mapProposedTags, PRESET_NAMES, ruleInput, storedMailRules, } from "@wirecat/cli-core/mail";
7
7
  import { Command, Option } from "commander";
8
8
  import * as v from "valibot";
9
9
  import { configuration } from "../config.js";
@@ -71,6 +71,13 @@ const matchOf = (options) => {
71
71
  throw new CliError("validation_error", "give at least one of --sender, --domain, --list-id, --filter, --kind");
72
72
  return match;
73
73
  };
74
+ /** Under `MAIL_READ_ONLY` (memo's scheduled triage) a rule only adds: one already there, perhaps the owner's, stays. */
75
+ const refuseReplacing = async (lock, match, store, address) => {
76
+ const same = JSON.stringify(ruleInput({ match, action: "skip", decided_at: "" }).conditions);
77
+ const rules = await storedMailRules(store, { address });
78
+ if (rules.some((rule) => JSON.stringify(ruleInput(rule).conditions) === same))
79
+ throw readOnlyRefusal(lock, `replace the rule for ${describeMatch(match)}; the owner changes it`);
80
+ };
74
81
  const megabytes = (bytes) => (bytes / 1024 / 1024).toFixed(1);
75
82
  const ruleLine = (rule) => [
76
83
  rule.protected ? "PROTECTED" : rule.action.padEnd(8),
@@ -139,14 +146,14 @@ const listCommand = () => answerEntity(withQuery(annotate(new Command("list"), {
139
146
  });
140
147
  renderAnswer(this, outputFor(this), listOf("rules list", { items, limit: Math.max(1, items.length), has_more: false }), () => items.map(ruleLine).join("\n") || "no rules");
141
148
  });
142
- const addCommand = () => answerEntity(matchOptions(grantsAuthority(annotate(new Command("add"), {
149
+ const addCommand = () => answerEntity(matchOptions(narrowsUnderLock(grantsAuthority(annotate(new Command("add"), {
143
150
  effects: LOCAL_WRITE,
144
151
  examples: [
145
152
  `${IDENTITY.command} personal rules add --domain shop.example --do envelope,tag:promo`,
146
153
  `${IDENTITY.command} personal rules add --sender boss@example.com --do protect --reason "never lose these"`,
147
154
  `${IDENTITY.command} personal rules add --filter "older:365d larger:5MB" --do envelope`,
148
155
  ],
149
- }))), "mail_rule", mailRule)
156
+ })))), "mail_rule", mailRule)
150
157
  .description("decide mail by sender, list, subject, age, size, label or kind; repeats replace")
151
158
  .requiredOption("--do <actions>", ACTION_HELP, flagParser("--do", actionsOf))
152
159
  .option("--reason <text>", "why, for the owner later")
@@ -157,18 +164,33 @@ const addCommand = () => answerEntity(matchOptions(grantsAuthority(annotate(new
157
164
  "in search. Changing an envelope rule to keep, or removing it, reads those emails in full on the next sync. " +
158
165
  "Mail already stored in full stays; rules apply cuts or tags it.\n\n" +
159
166
  "score: and --kind judge a sender by its mail in the same listing; a sync that lists only new mail judges it " +
160
- "from that mail. has:attachment reads Content-Type at list time: a guess, not a parse.")
167
+ "from that mail. has:attachment reads Content-Type at list time: a guess, not a parse.\n\n" +
168
+ "Under MAIL_READ_ONLY, as in memo's scheduled mail triage, it takes only --sender or --list-id with " +
169
+ "--do envelope, never replaces a rule, and records the rule with source agent.")
161
170
  .action(async function (options) {
171
+ const lock = readOnlyLockOf(IDENTITY, contextOf(this).env);
172
+ // A query, a kind or a domain could catch a whole mailbox, and skip or a tag decides more than how mail is
173
+ // stored; the triage only files one sender or list as envelopes, which the owner can list and remove.
174
+ if (lock && (options.filter !== undefined || options.kind !== undefined || options.domain !== undefined))
175
+ throw readOnlyRefusal(lock, "add a rule by --filter, --kind or --domain; give --sender or --list-id");
176
+ if (lock && (options.do.action !== "envelope" || options.do.protect || options.do.tags.length > 0))
177
+ throw readOnlyRefusal(lock, "add a rule that does more than --do envelope");
178
+ const match = matchOf(options);
162
179
  const rule = {
163
- match: matchOf(options),
180
+ match,
164
181
  action: options.do.action,
165
182
  ...(options.do.tags.length ? { tags: options.do.tags } : {}),
166
183
  ...(options.do.protect ? { protected: true } : {}),
167
184
  ...(options.kind === undefined ? {} : { source: `preset:${options.kind}` }),
185
+ ...(lock ? { source: "agent" } : {}),
168
186
  ...(options.reason === undefined ? {} : { reason: options.reason }),
169
187
  decided_at: new Date().toISOString(),
170
188
  };
171
- const saved = await withRules(this, (store, address) => saveRule(store, address, rule));
189
+ const saved = await withRules(this, async (store, address) => {
190
+ if (lock)
191
+ await refuseReplacing(lock, match, store, address);
192
+ return saveRule(store, address, rule);
193
+ });
172
194
  renderAnswer(this, outputFor(this), itemOf(saved), () => ruleLine(saved));
173
195
  });
174
196
  const removeCommand = () => answerEntity(matchOptions(grantsAuthority(annotate(new Command("remove"), {