@wirecat/mail-cli 0.24.0 → 0.26.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 (157) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/README.md +3 -0
  3. package/contracts/wirecat.json +1325 -0
  4. package/dist/bin/mail.js +2 -2
  5. package/dist/bin/mail.js.map +1 -1
  6. package/dist/bundle/{all-profiles-VS7P6DJY.js → all-profiles-6NXVQLUQ.js} +11 -11
  7. package/dist/bundle/{anthropic-C5JXKGBS.js → anthropic-OLNFE2CL.js} +17 -10
  8. package/dist/bundle/{app-server-HU3LVU42.js → app-server-J76N6XIK.js} +60 -49
  9. package/dist/bundle/{bun-QLFX47WZ.js → bun-6PYDHXNR.js} +2 -2
  10. package/dist/bundle/{bun-sqlite-W4PGAKVY.js → bun-sqlite-QD5PFHPS.js} +9 -5
  11. package/dist/bundle/{chunk-WOX7FZJP.js → chunk-2E2EV4HD.js} +130 -77
  12. package/dist/bundle/{chunk-A6J4MPTI.js → chunk-2TCS4PLJ.js} +1 -1
  13. package/dist/bundle/{chunk-QI3PXUOJ.js → chunk-3J2UJFBJ.js} +39 -32
  14. package/dist/bundle/{chunk-LVGX7VTD.js → chunk-3RY4HC4V.js} +63 -5
  15. package/dist/bundle/chunk-3XTKQ5EM.js +54 -0
  16. package/dist/bundle/{chunk-ZO4MQWIK.js → chunk-4Q6KAV4O.js} +8 -8
  17. package/dist/bundle/{chunk-JOQGJUFT.js → chunk-52M5BAEG.js} +1 -1
  18. package/dist/bundle/{chunk-Q4OKEN3B.js → chunk-5WROIMUV.js} +12 -7
  19. package/dist/bundle/{chunk-VVL4MKYH.js → chunk-66C66FNK.js} +1 -1
  20. package/dist/bundle/{chunk-O373QEAJ.js → chunk-76EKZSDK.js} +27 -27
  21. package/dist/bundle/{chunk-AUTX2MLF.js → chunk-76VSHS5Y.js} +15 -10
  22. package/dist/bundle/{chunk-HBZAJINU.js → chunk-7C6FGWDH.js} +4 -4
  23. package/dist/bundle/{chunk-VUBZFMGP.js → chunk-7KCBPAQS.js} +2 -2
  24. package/dist/bundle/{chunk-FNLUKODV.js → chunk-7MEVD5PI.js} +57 -28
  25. package/dist/bundle/chunk-A3EBRXOQ.js +16 -0
  26. package/dist/bundle/{chunk-C3NYJW6B.js → chunk-A6XETABW.js} +852 -278
  27. package/dist/bundle/{chunk-VNKWSCN7.js → chunk-AJ5K74X6.js} +17 -17
  28. package/dist/bundle/{chunk-BFQQV22T.js → chunk-BDYQQ6G2.js} +1 -1
  29. package/dist/bundle/{chunk-ZR2BDNGG.js → chunk-BMGRDZM3.js} +1 -1
  30. package/dist/bundle/{chunk-TLEBSMC7.js → chunk-CFBIPM7T.js} +4109 -3575
  31. package/dist/bundle/{chunk-IRUN4XOV.js → chunk-CZI45AQM.js} +2 -2
  32. package/dist/bundle/{chunk-QVMOEB3I.js → chunk-DKIVYAXW.js} +18 -17
  33. package/dist/bundle/{chunk-X7J3TTDO.js → chunk-ECZSYLSL.js} +48 -9
  34. package/dist/bundle/{chunk-EKGRNFYQ.js → chunk-EDWJ7IYH.js} +1 -1
  35. package/dist/bundle/{chunk-MCPOZNWG.js → chunk-FIVFP53N.js} +1 -1
  36. package/dist/bundle/{chunk-5X3GU5LI.js → chunk-GIG7F6UW.js} +6 -6
  37. package/dist/bundle/{chunk-RN7OI5KL.js → chunk-H2IJQH5X.js} +20 -112
  38. package/dist/bundle/{chunk-NWKKPDZV.js → chunk-HI5XUETY.js} +2 -2
  39. package/dist/bundle/{chunk-YBQ5AYLZ.js → chunk-HNSBXC6U.js} +3 -3
  40. package/dist/bundle/{chunk-4W4EVVL4.js → chunk-IX3GUNGV.js} +4 -4
  41. package/dist/bundle/{chunk-PT6MF2VU.js → chunk-JNKXU7AE.js} +340 -108
  42. package/dist/bundle/{chunk-64ZG5ERD.js → chunk-JVJG54QK.js} +40 -2
  43. package/dist/bundle/{chunk-KGOVFEWZ.js → chunk-KXASCNOV.js} +3 -3
  44. package/dist/bundle/{chunk-5NLHDK7P.js → chunk-LMTQMYUF.js} +31 -31
  45. package/dist/bundle/{chunk-Q6K2XUGU.js → chunk-LTZGLOKE.js} +3 -2
  46. package/dist/bundle/{chunk-RLQZFZLK.js → chunk-M2LATBP2.js} +84 -10
  47. package/dist/bundle/{chunk-RX5CJ55S.js → chunk-M4OP5ASJ.js} +1 -1
  48. package/dist/bundle/{chunk-H5FJTHVA.js → chunk-M4Y33SJJ.js} +2 -2
  49. package/dist/bundle/{chunk-SWKQ6IAR.js → chunk-M7ECSGSN.js} +3 -3
  50. package/dist/bundle/{chunk-MTO6YVMN.js → chunk-M7RHPCXM.js} +3 -3
  51. package/dist/bundle/{chunk-PRQ2U7HF.js → chunk-MIWSCTLG.js} +2 -2
  52. package/dist/bundle/{chunk-NSIN5IM4.js → chunk-NBJU6MBU.js} +10 -15
  53. package/dist/bundle/{chunk-JWMLMAHP.js → chunk-NMFPK3MU.js} +14 -5
  54. package/dist/bundle/{chunk-4QNHAM3J.js → chunk-OGE7YG4J.js} +2 -2
  55. package/dist/bundle/{chunk-XBEO472U.js → chunk-PJ6YMNJG.js} +26515 -24466
  56. package/dist/bundle/{chunk-RUASZW3M.js → chunk-PY2IOVUN.js} +5 -5
  57. package/dist/bundle/{chunk-OQW6GHUA.js → chunk-QI6EXKSH.js} +1 -1
  58. package/dist/bundle/{chunk-KV4VTKF3.js → chunk-QJGG6QYV.js} +69 -6
  59. package/dist/bundle/{chunk-JMLIKXFO.js → chunk-RXKIP2ML.js} +2 -2
  60. package/dist/bundle/{chunk-6VV7J2TN.js → chunk-T7SHPALQ.js} +35 -28
  61. package/dist/bundle/{chunk-YI544LHI.js → chunk-UE2NKPA4.js} +9 -9
  62. package/dist/bundle/{chunk-X47BL4M5.js → chunk-UNJUCK5R.js} +13 -13
  63. package/dist/bundle/{chunk-C5BMCLCQ.js → chunk-V32L23NN.js} +4 -4
  64. package/dist/bundle/{chunk-DW3F6DUW.js → chunk-V4PFD25P.js} +1 -1
  65. package/dist/bundle/{chunk-U6MMQNNK.js → chunk-VA4V73SL.js} +6 -6
  66. package/dist/bundle/{chunk-3KSK5BBB.js → chunk-VJPLIXV4.js} +8 -2
  67. package/dist/bundle/{chunk-YA45XV6G.js → chunk-VWRT57QU.js} +4 -4
  68. package/dist/bundle/{chunk-FKWUUCX2.js → chunk-XELZCDWE.js} +427 -189
  69. package/dist/bundle/{chunk-3FD3IATT.js → chunk-XUJEZ5YF.js} +6 -6
  70. package/dist/bundle/{chunk-TI7ZIPA2.js → chunk-XZ7CQ6NA.js} +4 -4
  71. package/dist/bundle/{chunk-NCRSE647.js → chunk-YM345236.js} +159 -46
  72. package/dist/bundle/{chunk-6PWCQKMD.js → chunk-YXGHC3NP.js} +14 -14
  73. package/dist/bundle/{chunk-RNZKQMFY.js → chunk-ZZSZN4CJ.js} +22 -15
  74. package/dist/bundle/command-contract-NNEXHZW5.js +36 -0
  75. package/dist/bundle/{command-server-entry-5E3PPDE5.js → command-server-entry-AIBWNC5D.js} +25 -24
  76. package/dist/bundle/{decode-AVWV7SVZ.js → decode-H7KLRD33.js} +5 -5
  77. package/dist/bundle/{dispatch-BXPHSNK5.js → dispatch-DSVN7MNG.js} +8 -8
  78. package/dist/bundle/{dist-PIOOKBWT.js → dist-YYSP43J3.js} +29 -18
  79. package/dist/bundle/{echarts-7K6YQV52.js → echarts-VSD3LS6D.js} +2 -2
  80. package/dist/bundle/{embed-4NT76GJK.js → embed-UENZ5HN3.js} +6 -6
  81. package/dist/bundle/{embedder-ITQFF7EN.js → embedder-MJMGOJT7.js} +9 -9
  82. package/dist/bundle/{failure-3Q65JOPD.js → failure-COTPFUP4.js} +2 -2
  83. package/dist/bundle/{first-run-PM74YU4X.js → first-run-HYALREFN.js} +12 -11
  84. package/dist/bundle/first-screen-GPF5RHBX.js +34 -0
  85. package/dist/bundle/{instructions-JDSITYHV.js → instructions-WOHRYOLN.js} +1 -1
  86. package/dist/bundle/mail.js +15 -20
  87. package/dist/bundle/{mcp-7KQUJNFN.js → mcp-TDKGDB4V.js} +2 -2
  88. package/dist/bundle/{node-D6YIJOJI.js → node-4BRWJJCE.js} +2 -2
  89. package/dist/bundle/{node-sqlite-PJOHHB4X.js → node-sqlite-D3QESEYQ.js} +10 -6
  90. package/dist/bundle/{oauth-BOWJ3IBT.js → oauth-T7TTOBIZ.js} +7 -7
  91. package/dist/bundle/{open-FIAKKZMW.js → open-6P6627QB.js} +5 -5
  92. package/dist/bundle/{openai-QL54VVLC.js → openai-FIMCJGAP.js} +24 -19
  93. package/dist/bundle/{process-AYHK7WRC.js → process-35IH3WHC.js} +1 -1
  94. package/dist/bundle/{program-6FKWOTBK.js → program-IEXB72IK.js} +6685 -5463
  95. package/dist/bundle/{prompt-XJZCBELC.js → prompt-HFBCPMVL.js} +5 -5
  96. package/dist/bundle/{recognize-OQKWAHBY.js → recognize-CNL4HJ7Z.js} +4 -4
  97. package/dist/bundle/{remote-NLVUZ5WK.js → remote-AYGZI7HT.js} +9 -7
  98. package/dist/bundle/{rerank-NRPZDTJ7.js → rerank-5C2OZZXD.js} +7 -7
  99. package/dist/bundle/{serve-O4YUI7F6.js → serve-S6OYBDIB.js} +9 -9
  100. package/dist/bundle/{server-WAL3M4OO.js → server-VKO6E6PI.js} +42 -40
  101. package/dist/bundle/server-WXSHVDME.js +68 -0
  102. package/dist/bundle/{sqlite-runtime-5YHGI4D4.js → sqlite-runtime-DBTGNTVE.js} +6 -6
  103. package/dist/bundle/{state-WYYOJ7KK.js → state-ZQG6AL2Y.js} +6 -6
  104. package/dist/bundle/{store-X72GOJHD.js → store-B7BXWILZ.js} +25 -18
  105. package/dist/bundle/{store-6BJO3F2J.js → store-LY4QKTOO.js} +19 -16
  106. package/dist/bundle/store-maintenance-command-UR6NQDVV.js +58 -0
  107. package/dist/commands/rules.d.ts.map +1 -1
  108. package/dist/commands/rules.js +57 -19
  109. package/dist/commands/rules.js.map +1 -1
  110. package/dist/commands/session-start.d.ts.map +1 -1
  111. package/dist/commands/session-start.js +1 -1
  112. package/dist/commands/session-start.js.map +1 -1
  113. package/dist/config.d.ts +1 -0
  114. package/dist/config.d.ts.map +1 -1
  115. package/dist/config.js +13 -12
  116. package/dist/config.js.map +1 -1
  117. package/dist/discovery.d.ts.map +1 -1
  118. package/dist/discovery.js +7 -2
  119. package/dist/discovery.js.map +1 -1
  120. package/dist/identity.d.ts +2 -0
  121. package/dist/identity.d.ts.map +1 -1
  122. package/dist/identity.js +34 -0
  123. package/dist/identity.js.map +1 -1
  124. package/dist/mail/domain-age.d.ts +1 -1
  125. package/dist/mail/domain-age.d.ts.map +1 -1
  126. package/dist/mail/domain-age.js +9 -3
  127. package/dist/mail/domain-age.js.map +1 -1
  128. package/dist/mail/rules/file.d.ts.map +1 -1
  129. package/dist/mail/rules/file.js +4 -1
  130. package/dist/mail/rules/file.js.map +1 -1
  131. package/dist/mail/rules/query.d.ts +2 -1
  132. package/dist/mail/rules/query.d.ts.map +1 -1
  133. package/dist/mail/rules/query.js +16 -3
  134. package/dist/mail/rules/query.js.map +1 -1
  135. package/dist/oauth.d.ts +3 -1
  136. package/dist/oauth.d.ts.map +1 -1
  137. package/dist/oauth.js +48 -34
  138. package/dist/oauth.js.map +1 -1
  139. package/dist/reasons.d.ts.map +1 -1
  140. package/dist/reasons.js +5 -0
  141. package/dist/reasons.js.map +1 -1
  142. package/dist/store.d.ts.map +1 -1
  143. package/dist/store.js +2 -21
  144. package/dist/store.js.map +1 -1
  145. package/dist/version.d.ts +1 -1
  146. package/dist/version.js +1 -1
  147. package/dist/wcat.d.ts +3 -0
  148. package/dist/wcat.d.ts.map +1 -0
  149. package/dist/wcat.js +4 -0
  150. package/dist/wcat.js.map +1 -0
  151. package/package.json +10 -9
  152. package/dist/bundle/chunk-B72343TK.js +0 -35
  153. package/dist/bundle/command-contract-ERYYPAD2.js +0 -35
  154. package/dist/bundle/first-screen-WBVGVSMY.js +0 -33
  155. package/dist/bundle/server-6OT5ZEWL.js +0 -66
  156. package/dist/bundle/store-maintenance-command-ASS7RBYC.js +0 -54
  157. /package/dist/bundle/{chunk-YVNHQFLC.js → chunk-XWBPP2HX.js} +0 -0
@@ -2,7 +2,7 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  defineReasons
5
- } from "./chunk-X7J3TTDO.js";
5
+ } from "./chunk-ECZSYLSL.js";
6
6
 
7
7
  // dist/reasons.js
8
8
  var ENTRIES = [
@@ -12,6 +12,11 @@ var ENTRIES = [
12
12
  ["mail.host-unreachable", "network_error", "the mail server cannot be reached"],
13
13
  ["mail.no-password", "authentication_error", "no app password is stored for this profile"],
14
14
  ["mail.oauth-refused", "authentication_error", "the mail server refused the OAuth token even after a refresh"],
15
+ [
16
+ "mail.google-account-refused",
17
+ "authentication_error",
18
+ "Google refused the account check or gave no verified address"
19
+ ],
15
20
  ["mail.smtp-auth-disabled", "authentication_error", "Microsoft refused the OAuth login for sending"],
16
21
  ["mail.uidvalidity-changed", "invalid_response", "the folder's UIDVALIDITY changed during the run"],
17
22
  ["mail.not-returned", "not_found", "the server did not return the email"],
@@ -52,7 +57,7 @@ var ENTRIES = [
52
57
  var REASONS = defineReasons(ENTRIES.map(([reason, code, message]) => ({ reason, code, message, details: [] })));
53
58
 
54
59
  // dist/version.js
55
- var VERSION = "0.24.0";
60
+ var VERSION = "0.26.0";
56
61
 
57
62
  // dist/identity.js
58
63
  var PACKAGE = "@wirecat/mail-cli";
@@ -70,10 +75,43 @@ var IDENTITY = {
70
75
  contentLanguages: ["ru", "en"],
71
76
  errors: { reasons: REASONS }
72
77
  };
78
+ var DESKTOP = {
79
+ ...IDENTITY,
80
+ docs: "https://github.com/WireCatLabs/mail-cli#readme",
81
+ hosts: [
82
+ "login.microsoftonline.com",
83
+ "accounts.google.com",
84
+ "oauth2.googleapis.com",
85
+ "openidconnect.googleapis.com",
86
+ "autoconfig.thunderbird.net",
87
+ "data.iana.org",
88
+ "imap.yandex.com",
89
+ "smtp.yandex.ru",
90
+ "imap.gmail.com",
91
+ "smtp.gmail.com",
92
+ "imap.mail.me.com",
93
+ "smtp.mail.me.com",
94
+ "imap.mail.ru",
95
+ "smtp.mail.ru",
96
+ "imap.fastmail.com",
97
+ "smtp.fastmail.com",
98
+ "outlook.office365.com",
99
+ "smtp.office365.com",
100
+ "smtp-mail.outlook.com"
101
+ ],
102
+ userHosts: "the mail server you sign in to, your domain's autoconfig file, and each sender domain's registry from IANA's list",
103
+ tagline: "Your mailbox over IMAP, searchable on your computer",
104
+ syncs: "mail from the folders you choose",
105
+ signIn: {
106
+ gives: "Lets your agent read, organise and send your mail.",
107
+ asks: "Your mail address and an app password, or a Microsoft or Google sign-in in the browser."
108
+ }
109
+ };
73
110
  var SKILL = new URL("../skills/mail-cli/SKILL.md", new URL("../identity.js", import.meta.url).href);
74
111
 
75
112
  export {
76
113
  PACKAGE,
77
114
  IDENTITY,
115
+ DESKTOP,
78
116
  SKILL
79
117
  };
@@ -4,15 +4,15 @@ import {
4
4
  MAX_SECRET_INPUT,
5
5
  bufferedInput,
6
6
  inputPolicy
7
- } from "./chunk-NWKKPDZV.js";
7
+ } from "./chunk-HI5XUETY.js";
8
8
  import {
9
9
  CliError
10
- } from "./chunk-VUBZFMGP.js";
10
+ } from "./chunk-7KCBPAQS.js";
11
11
  import {
12
12
  __name
13
13
  } from "./chunk-ZVVMGPBJ.js";
14
14
 
15
- // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/terminal/prompt.js
15
+ // node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/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 EMPTY_TRIES = 3;
@@ -12,10 +12,10 @@ import {
12
12
  refuseWriteBeforeConnecting,
13
13
  registerPrompts,
14
14
  syncsFirst
15
- } from "./chunk-6VV7J2TN.js";
15
+ } from "./chunk-T7SHPALQ.js";
16
16
  import {
17
17
  stdinFieldOf
18
- } from "./chunk-EKGRNFYQ.js";
18
+ } from "./chunk-EDWJ7IYH.js";
19
19
  import {
20
20
  BinaryResource,
21
21
  Picture,
@@ -36,33 +36,33 @@ import {
36
36
  tool,
37
37
  toolKey,
38
38
  toolsFromCommands
39
- } from "./chunk-NCRSE647.js";
39
+ } from "./chunk-YM345236.js";
40
40
  import {
41
41
  agentJson,
42
42
  skillResource
43
- } from "./chunk-RNZKQMFY.js";
43
+ } from "./chunk-ZZSZN4CJ.js";
44
44
  import {
45
45
  instructions
46
- } from "./chunk-OQW6GHUA.js";
46
+ } from "./chunk-QI6EXKSH.js";
47
47
  import {
48
48
  answeredWire
49
- } from "./chunk-BFQQV22T.js";
49
+ } from "./chunk-BDYQQ6G2.js";
50
50
  import {
51
51
  StdioServerTransport,
52
52
  callerOf,
53
53
  callingAgent,
54
54
  serveStdio
55
- } from "./chunk-H5FJTHVA.js";
55
+ } from "./chunk-M4Y33SJJ.js";
56
56
  import {
57
57
  McpServer,
58
58
  ResourceTemplate
59
59
  } from "./chunk-5D4AEUVA.js";
60
60
  import {
61
61
  mcpHttpMarker
62
- } from "./chunk-YA45XV6G.js";
62
+ } from "./chunk-VWRT57QU.js";
63
63
  import {
64
64
  connectedFor
65
- } from "./chunk-QI3PXUOJ.js";
65
+ } from "./chunk-3J2UJFBJ.js";
66
66
  import {
67
67
  capability,
68
68
  dateWindow,
@@ -72,10 +72,10 @@ import {
72
72
  servicesFor,
73
73
  storedDeps,
74
74
  wholeList
75
- } from "./chunk-TLEBSMC7.js";
75
+ } from "./chunk-CFBIPM7T.js";
76
76
  import {
77
77
  findCommand
78
- } from "./chunk-RUASZW3M.js";
78
+ } from "./chunk-PY2IOVUN.js";
79
79
  import {
80
80
  DEFAULT_OUTPUT_BYTES,
81
81
  changesAuthorityAt,
@@ -89,30 +89,30 @@ import {
89
89
  rootOf2 as rootOf,
90
90
  sealed,
91
91
  snakeKeys
92
- } from "./chunk-FKWUUCX2.js";
92
+ } from "./chunk-XELZCDWE.js";
93
93
  import {
94
94
  levelFor,
95
95
  readKeysForCommand
96
- } from "./chunk-Q4OKEN3B.js";
96
+ } from "./chunk-5WROIMUV.js";
97
97
  import {
98
98
  withCaller
99
- } from "./chunk-AUTX2MLF.js";
99
+ } from "./chunk-76VSHS5Y.js";
100
100
  import {
101
101
  openStore,
102
102
  pdfPreviewLimits
103
- } from "./chunk-XBEO472U.js";
103
+ } from "./chunk-PJ6YMNJG.js";
104
104
  import {
105
105
  typedCommand
106
- } from "./chunk-O373QEAJ.js";
106
+ } from "./chunk-76EKZSDK.js";
107
107
  import {
108
108
  timezoneOf
109
- } from "./chunk-WOX7FZJP.js";
109
+ } from "./chunk-2E2EV4HD.js";
110
110
  import {
111
111
  isCliFailure
112
- } from "./chunk-3KSK5BBB.js";
112
+ } from "./chunk-VJPLIXV4.js";
113
113
  import {
114
114
  warmEmbedders
115
- } from "./chunk-5X3GU5LI.js";
115
+ } from "./chunk-GIG7F6UW.js";
116
116
  import {
117
117
  description,
118
118
  integer,
@@ -128,19 +128,19 @@ import {
128
128
  regex,
129
129
  strictObject,
130
130
  string
131
- } from "./chunk-X7J3TTDO.js";
131
+ } from "./chunk-ECZSYLSL.js";
132
132
  import {
133
133
  CliError,
134
134
  visibleControls
135
- } from "./chunk-VUBZFMGP.js";
135
+ } from "./chunk-7KCBPAQS.js";
136
136
  import {
137
137
  __name
138
138
  } from "./chunk-ZVVMGPBJ.js";
139
139
 
140
- // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/mcp/server.js
140
+ // node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/mcp/server.js
141
141
  import { randomUUID } from "node:crypto";
142
142
 
143
- // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/mcp/agent-log.js
143
+ // node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/mcp/agent-log.js
144
144
  var agentLog = /* @__PURE__ */ __name((open) => {
145
145
  let held;
146
146
  return {
@@ -159,7 +159,7 @@ var agentLog = /* @__PURE__ */ __name((open) => {
159
159
  };
160
160
  }, "agentLog");
161
161
 
162
- // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/mcp/resources.js
162
+ // node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/mcp/resources.js
163
163
  var LISTED = 100;
164
164
  var registerResources = /* @__PURE__ */ __name((server, session, { command, name, limit, recorded, withStore, messenger, guard, assertRead }) => {
165
165
  server.registerResource("chat", new ResourceTemplate(`${command}://chat/{id}`, {
@@ -197,7 +197,7 @@ var registerResources = /* @__PURE__ */ __name((server, session, { command, name
197
197
  });
198
198
  }, "registerResources");
199
199
 
200
- // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/mcp/session.js
200
+ // node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/mcp/session.js
201
201
  var HARMLESS = /* @__PURE__ */ new Set(["validation_error", "not_found", "permission_error", "confirmation_required", "rate_limited"]);
202
202
  var harmless = /* @__PURE__ */ __name((code) => HARMLESS.has(code), "harmless");
203
203
  var MessengerSession = class {
@@ -272,7 +272,7 @@ var MessengerSession = class {
272
272
  }
273
273
  };
274
274
 
275
- // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/mcp/tools/attachments.js
275
+ // node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/mcp/tools/attachments.js
276
276
  var attachmentsTools = /* @__PURE__ */ __name((messenger) => {
277
277
  const _command = messenger.app.command;
278
278
  return {
@@ -326,7 +326,7 @@ var attachmentsTools = /* @__PURE__ */ __name((messenger) => {
326
326
  };
327
327
  }, "attachmentsTools");
328
328
 
329
- // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/mcp/tools/messages-photo.js
329
+ // node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/mcp/tools/messages-photo.js
330
330
  var PHOTO_LIMIT = 512 * 1024;
331
331
  var IMAGE_TYPES = [
332
332
  ["image/jpeg", (b) => b[0] === 255 && b[1] === 216 && b[2] === 255],
@@ -380,7 +380,7 @@ var readUpTo = /* @__PURE__ */ __name(async (file, limit, saveIt) => {
380
380
  return new Uint8Array(Buffer.concat(chunks));
381
381
  }, "readUpTo");
382
382
 
383
- // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/mcp/tools/stats.js
383
+ // node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/mcp/tools/stats.js
384
384
  var statsTools = /* @__PURE__ */ __name((messenger) => ({
385
385
  stats_charts: tool({
386
386
  title: "A chart from a chat's statistics",
@@ -417,14 +417,14 @@ var statsTools = /* @__PURE__ */ __name((messenger) => ({
417
417
  })
418
418
  }), "statsTools");
419
419
 
420
- // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/mcp/tools.js
420
+ // node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/mcp/tools.js
421
421
  var pictureTools = /* @__PURE__ */ __name((messenger) => Object.fromEntries(Object.entries({
422
422
  ...messagesPhotoTools(messenger),
423
423
  ...attachmentsTools(messenger),
424
424
  ...statsTools(messenger)
425
425
  }).map(([name, definition]) => [name, { ...definition, input: strictObject(definition.input.entries) }])), "pictureTools");
426
426
 
427
- // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/mcp/server.js
427
+ // node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/mcp/server.js
428
428
  var PER_RUN = /* @__PURE__ */ new Set([
429
429
  "streams",
430
430
  "stdin",
@@ -748,7 +748,7 @@ var serveOverStdio = /* @__PURE__ */ __name(async (command, context, messenger,
748
748
  }, "serveOverStdio");
749
749
  var serveOverHttpUntilStopped = /* @__PURE__ */ __name(async (command, context, messenger, options, http) => {
750
750
  const { session, embedders, build, log } = createServer(command, context, messenger, options);
751
- const { serveOverHttp } = await import("./serve-O4YUI7F6.js");
751
+ const { serveOverHttp } = await import("./serve-S6OYBDIB.js");
752
752
  const appName = messenger.app.command;
753
753
  const appEnvPrefix = messenger.app.envPrefix;
754
754
  const listening = await serveOverHttp(build, {
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/runs/secrets.js
7
+ // node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/runs/secrets.js
8
8
  var SECRET_WORDS = /* @__PURE__ */ new Set([
9
9
  "authorization",
10
10
  "cookie",
@@ -47,6 +47,7 @@ var KNOWN_TOKENS = new RegExp(`${[
47
47
  "npm_[A-Za-z0-9]{36}",
48
48
  "eyJ[A-Za-z0-9_-]{5,}\\.eyJ[A-Za-z0-9_-]{5,}\\.[A-Za-z0-9_-]*"
49
49
  ].map((pattern) => `${START}${pattern}${END}`).join("|")}|(?<!\\d)\\d{8,10}:[A-Za-z0-9_-]{35}${END}`, "g");
50
+ var WEBHOOK_PATH = /(\/rest\/\d+\/)[^/\s?#"']+/g;
50
51
  var PRIVATE_KEY = /-----BEGIN[A-Z ]* PRIVATE KEY-----[\s\S]*?(?:-----END[A-Z ]* PRIVATE KEY-----|$)/g;
51
52
  var SCHEME = /(?<![A-Za-z])(Bearer|Basic)(\s+)(?![A-Z]?[a-z]+(?![A-Za-z0-9]))[A-Za-z0-9._~+/=-]{8,}/g;
52
53
  var NAMED_PAIR = /(?<![\p{L}\p{N}])([\p{L}\p{N}_.-]*(?:token|pass|pwd|pin|otp|2fa|secret|credential|cookie|authorization|key|contrase|clave|пароль|пин|код)[\p{L}\p{N}_.-]*)(["']?\s*(?:=>|[:=])\s*["']?|\s+(?![\p{L}]+(?![\p{L}\p{N}])))((?:Bearer\s+|Basic\s+)?)([^\s"'&,;]+)/giu;
@@ -78,7 +79,7 @@ var entropy = /* @__PURE__ */ __name((text) => {
78
79
  bits -= count / text.length * Math.log2(count / text.length);
79
80
  return bits;
80
81
  }, "entropy");
81
- var withoutSecrets = /* @__PURE__ */ __name((text, mark = "[redacted]") => text.replace(PRIVATE_KEY, mark).replace(KNOWN_TOKENS, mark).replace(SCHEME, `$1$2${mark}`).replace(NAMED_PAIR, (whole, name, separator, scheme) => secretNamed(name) ? `${name}${separator}${scheme}${mark}` : whole).replace(/[!-~]{20,}/g, (token) => (
82
+ var withoutSecrets = /* @__PURE__ */ __name((text, mark = "[redacted]") => text.replace(WEBHOOK_PATH, `$1${mark}`).replace(PRIVATE_KEY, mark).replace(KNOWN_TOKENS, mark).replace(SCHEME, `$1$2${mark}`).replace(NAMED_PAIR, (whole, name, separator, scheme) => secretNamed(name) ? `${name}${separator}${scheme}${mark}` : whole).replace(/[!-~]{20,}/g, (token) => (
82
83
  // A URL or a path is somebody's address, not a key; a credential in one is caught by the rules above.
83
84
  token.includes("://") || /^(?:\/|~\/|\.\.?\/)/.test(token) ? token : token.replace(RUN, (run) => looksRandom(run) ? mark : run.replace(HEX, (hex) => entropy(hex) >= 3 ? mark : hex))
84
85
  )), "withoutSecrets");
@@ -2,15 +2,15 @@ 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-WOX7FZJP.js";
5
+ } from "./chunk-2E2EV4HD.js";
6
6
  import {
7
7
  defineReasons
8
- } from "./chunk-X7J3TTDO.js";
8
+ } from "./chunk-ECZSYLSL.js";
9
9
  import {
10
10
  __name
11
11
  } from "./chunk-ZVVMGPBJ.js";
12
12
 
13
- // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/errors/reasons.js
13
+ // node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/errors/reasons.js
14
14
  var validation = /* @__PURE__ */ __name((reason, message) => [reason, "validation_error", message], "validation");
15
15
  var QUERY = [
16
16
  ["query.aborted", "the search was stopped before it finished"],
@@ -23,14 +23,15 @@ var QUERY = [
23
23
  ["query.invalid-reference", "a reference in the query is not valid"],
24
24
  ["query.invalid-tag", "a tag in the query is not valid"],
25
25
  ["query.invalid-topic", "a topic in the query is not valid"],
26
- ["query.topic-scope", "a topic needs its chat in the query"]
27
- ].map(([reason, message]) => validation(reason, message));
26
+ ["query.topic-scope", "a topic needs its chat in the query"],
27
+ ["query.short-text", "a search by part of a name or a title needs three characters or more"],
28
+ ["query.legacy-date-field", "after: and before: are written date>= and date<"]
29
+ ].map(([reason, message]) => validation(reason, message)).concat([["query.no-match", "not_found", "no person or chat in the store fits a name in the query"]]);
28
30
  var SIGN_IN = [
29
31
  ["oauth.declined", "authentication_error", "the provider's consent was declined"],
30
32
  ["oauth.timeout", "timeout", "the sign-in was not finished in time"],
31
33
  ["oauth.mismatch", "authentication_error", "the pasted sign-in result belongs to another sign-in"],
32
- ["oauth.missing", "authentication_error", "this profile is not signed in to the provider"],
33
- ["session.missing", "authentication_error", "this profile has no API token saved"],
34
+ ["session.missing", "authentication_error", "this profile is not signed in: no saved sign-in or API token"],
34
35
  ["oauth.locked", "provider_unavailable", "another process holds this sign-in's lock"],
35
36
  ["oauth.no-response", "outcome_unknown", "the token request did not finish"],
36
37
  ["oauth.unavailable", "provider_unavailable", "the provider's token endpoint is unavailable"],
@@ -47,6 +48,7 @@ var SIGN_IN = [
47
48
  ["sign-in.secret-without-id", "configuration_error", "an OAuth client secret is set without its client id"],
48
49
  validation("account-remove.no-choice", "account remove needs --keep-data or --delete-data, one of them"),
49
50
  ["account-remove.unknown-profile", "not_found", "no profile by this name on this computer"],
51
+ ["profile.unknown", "not_found", "no profile by this name on this computer; details.profiles lists the ones here"],
50
52
  ["account-remove.busy", "conflict", "a serve or a sync runs for this profile; stop it first"],
51
53
  ["account-remove.unconfirmed", "confirmation_required", "removing an account asks first; add --yes"],
52
54
  ["account-remove.path-outside", "configuration_error", "the tool named a path outside its own folders"],
@@ -65,20 +67,58 @@ var PROVIDER_API = [
65
67
  validation("file.not-a-file", "the path names a folder or another thing that is not a file"),
66
68
  ["file.denied", "permission_error", "the file cannot be opened: permission denied"]
67
69
  ];
70
+ var SFTP = [
71
+ ["sftp.host-key-missing", "configuration_error", "no host key is pinned for the SFTP server"],
72
+ ["sftp.host-key-mismatch", "authentication_error", "the SFTP server's host key is not the pinned one"],
73
+ ["sftp.auth-missing", "configuration_error", "an SFTP connection needs a password or a private key"],
74
+ ["sftp.key-invalid", "configuration_error", "the SFTP private key or its passphrase cannot be read"],
75
+ ["sftp.library-missing", "configuration_error", "SFTP needs the ssh2 package in the CLI's dependencies"],
76
+ ["sftp.timeout", "timeout", "the SFTP server did not answer in time"],
77
+ validation("sftp.too-large", "the file is larger than the read's byte limit"),
78
+ validation("sftp.closed", "the SFTP connection was closed before the operation")
79
+ ];
68
80
  var OTHERS = [
81
+ validation("doctor.report-exists", "the report's file exists; a problem report never overwrites a file"),
82
+ validation("usage.unknown-command", "no command by this name; the CLI's help lists them"),
83
+ validation("usage.unknown-option", "the command takes no option by this name; its help lists them"),
69
84
  ["query.time-limit", "timeout", "the search took longer than its time limit; the query itself is valid"],
70
85
  ["enrichment.owner-only", "permission_error", "only the owner turns enrichment on, not an agent"],
71
86
  ["search-harder.owner-only", "permission_error", "only the owner allows search all --harder, not an agent"],
72
87
  ["model.offline", "permission_error", "downloading a model needs the network; --offline was requested"],
73
88
  ["model.key-rejected", "invalid_response", "the model provider refused the API key (401 or 403)"],
74
89
  ["model.unreachable", "invalid_response", "the model provider could not be reached over the network"],
90
+ [
91
+ "model.empty-answer",
92
+ "invalid_response",
93
+ "the model answered nothing; given a picture, it may not read pictures \u2014 choose a vision model"
94
+ ],
95
+ validation("model.address-refused", "the model address is refused: https, or plain http and Ollama only on this computer"),
96
+ [
97
+ "network.host-undeclared",
98
+ "configuration_error",
99
+ "the request went to a host the CLI does not declare, or not the model address's own; nothing was sent"
100
+ ],
101
+ [
102
+ "local-only.refused",
103
+ "permission_error",
104
+ "local only is on and the address is not on this computer; nothing was sent"
105
+ ],
106
+ ["local-only.owner-only", "permission_error", "only the owner turns local only off, not an agent"],
107
+ ["ai.images-not-allowed", "permission_error", "the AI model may not read pictures; models ai set --allow-remote"],
108
+ ["picture-reading.off", "permission_error", "picture reading is never; models picture-reading set request"],
109
+ ["picture-reading.owner-only", "permission_error", "only the owner turns picture reading on, not an agent"],
110
+ validation("picture-reading.agent-missing", "choose the agent that reads: --agent claude or --agent codex"),
111
+ validation("picture-reading.not-a-picture", "the file is not a PNG, JPEG or WebP picture"),
112
+ ["picture-reading.unavailable-file", "not_found", "the picture could not be fetched, or is over the size limit"],
113
+ ["picture-reading.unavailable", "configuration_error", "the chosen coding agent is not installed"],
114
+ ["picture-reading.failed", "invalid_response", "the coding agent failed or answered nothing"],
115
+ ["picture-reading.timeout", "timeout", "the coding agent gave no answer in time"],
75
116
  [
76
117
  "ai.owner-only",
77
118
  "permission_error",
78
119
  "only the owner chooses, unsets, checks or removes the AI model and its key, or revokes its consent"
79
120
  ],
80
121
  ["ai.setting-invalid", "configuration_error", "the ai section or the model given is not one WireCat can use"],
81
- validation("ai.address-refused", "the model address must be https, or http only on this computer"),
82
122
  ["ai.not-set", "configuration_error", "no AI model is chosen; models ai set chooses one"],
83
123
  ["ai.key-missing", "configuration_error", "no API key is stored for the AI model's address"],
84
124
  ["ai.ok", "invalid_response", "models ai check: the model answered (a result, never raised)"],
@@ -106,6 +146,18 @@ var OTHERS = [
106
146
  validation("finding.unknown-field", "a finding has a field its kind does not take"),
107
147
  validation("finding.quote-not-found", "a finding's quote is not in the text it cites, word for word"),
108
148
  validation("finding.missing-field", "a finding leaves out a field its kind needs"),
149
+ [
150
+ "agent.unrestricted",
151
+ "permission_error",
152
+ "nothing holds this agent to the CLI's commands, so no schedule starts it"
153
+ ],
154
+ ["read-only.output-outside", "permission_error", "a read-only process writes files only inside its working folder"],
155
+ [
156
+ "agent.refused",
157
+ "permission_error",
158
+ "the schedule changed since it was saved, or starts no agent a schedule may run"
159
+ ],
160
+ validation("agent.cost-unknown", "the agent reports no cost, so a cost cap cannot stop it"),
109
161
  validation("document.changed", "the document changed while it was read; nothing was saved"),
110
162
  ["document.not-imported", "not_found", "the document is not imported in this source account"],
111
163
  ["extraction.invalid-proposals", "invalid_response", "the model's memory proposals could not be used"],
@@ -223,6 +275,7 @@ var OTHERS = [
223
275
  "another program deleted or replaced the store's journal file while it was open; store recover says what to do"
224
276
  ],
225
277
  validation("store.file-damaged", "the named store file is damaged or not a database"),
278
+ ["store.unopenable", "configuration_error", "the store file cannot be opened at its path; details.path names it"],
226
279
  [
227
280
  "store.unreadable",
228
281
  "configuration_error",
@@ -258,7 +311,7 @@ var OTHERS = [
258
311
  validation("input.empty", "a hidden prompt got an empty answer three times"),
259
312
  validation("input.required", "the command needs an answer and cannot ask for one"),
260
313
  validation("input.too-large", "the input is over its size limit"),
261
- ["meeting-project.stale", "configuration_error", "the meeting's project changed meanwhile"],
314
+ ["meeting-project.stale", "conflict", "the meeting's project changed meanwhile"],
262
315
  validation("fact.not-accepted", "only an accepted fact can be revoked"),
263
316
  validation("fact.owner-written", "the owner wrote this fact; it was never proposed, so it cannot be revoked"),
264
317
  validation("fact.payment-retired", "a payment is a payments row in store.finance, not a fact"),
@@ -347,6 +400,8 @@ var OTHERS = [
347
400
  validation("crm.not-reported", "the CRM did not list users or departments; what they would say is unknown, nothing withdrawn"),
348
401
  validation("crm.reference-unknown", "a CRM row names a contact, company or user the store does not hold; that link was not made"),
349
402
  validation("crm.pending-dropped", "relationships waited too long for an end that never came; they were dropped"),
403
+ validation("crm.activities-failed", "the activities and tasks could not be read; the deals and leads were synced"),
404
+ validation("crm.stage-history-failed", "the CRM's stage history could not be read; stage tasks wait for the next sync"),
350
405
  validation("crm.email-ambiguous", "a CRM contact's email belongs to more than one person; the owner decides"),
351
406
  validation("crm.own-unknown", "no own company of the CRM account is stored, so its users are no one's employees yet"),
352
407
  validation("relationship.reference-unknown", "a reported relationship names something the store does not hold"),
@@ -385,6 +440,11 @@ var OTHERS = [
385
440
  validation("order.status", "a rejected or deleted order's status does not change"),
386
441
  ["model.not-downloaded", "not_found", "the model is not downloaded on this machine"],
387
442
  ["person.no-owner", "not_found", "no person is marked as the owner in the store"],
443
+ ["person.unknown", "not_found", "the store has no person by that reference; people list gives person:<uid>"],
444
+ ["person.no-doubt", "not_found", "nothing about that person is in doubt; people links check lists who is"],
445
+ validation("person.owner", "the owner's own person is not test data"),
446
+ validation("person.no-identity", "a person with no identity is not test data; there is nothing to hide"),
447
+ validation("person.from-required", "say whom the identity leaves: --from person:<uid>, or person:me for the owner"),
388
448
  [
389
449
  "identity.separated",
390
450
  "conflict",
@@ -400,17 +460,31 @@ var OTHERS = [
400
460
  "conflict",
401
461
  "the people a merge or a proposed link names changed since; undo the later merge, or propose the link again"
402
462
  ],
463
+ ["identity.no-merge", "not_found", "nothing of that person is merged into the other; people show lists the merges"],
464
+ validation("identity.held-elsewhere", "the identity sits on another person than the one named; name that person to take it off them"),
465
+ validation("identity.several-persons", "the identities that leave a person are all of that one person"),
466
+ validation("identity.nothing-left", "a split leaves at least one identity with the person"),
467
+ [
468
+ "identity.kept-together",
469
+ "conflict",
470
+ "the owner kept these identities together by turning down their split; only the owner splits them"
471
+ ],
403
472
  [
404
473
  "identity.rejected",
405
474
  "conflict",
406
475
  "the owner rejected linking these people on this evidence; only a new signal or identity proposes them again"
407
476
  ],
408
477
  validation("identity.same", "the two identities are one person already"),
478
+ validation("identity.not-shared", "only a match on a shared mailbox can say the mailbox is a company's"),
479
+ ["organization.not-found", "not_found", "no stored organization has that id"],
480
+ validation("organization.unnamed", "a free mailbox names no company; name the organization or the company"),
481
+ validation("organization.ambiguous", "more than one organization matches; name the one meant as a reference"),
409
482
  validation("identity.shared-phone", "more than six people share the phone number, so it proposes no one"),
410
483
  validation("identity.common-name", "more than six people have the name, so it proposes no one"),
411
484
  validation("identity.owner", "one side is the owner's person, and only the owner joins anyone to themselves"),
412
485
  validation("identity.shared-email", "more than six people share the address, so it proposes no one"),
413
486
  validation("identity-link.dedicated-review", "an identity link is staged and decided through the people review"),
487
+ validation("identity-split.dedicated-review", "a split of a person is staged and decided through the people review"),
414
488
  ["transcription.no-key", "authentication_error", "no OpenAI key is set for transcription"],
415
489
  validation("transcription.too-large", "the audio is over the transcription provider's size limit"),
416
490
  [
@@ -523,7 +597,7 @@ var INPUT_FIELD_REASONS = defineReasons([
523
597
  var REASONS = defineReasons([
524
598
  ...QUERY_REASONS,
525
599
  ...INPUT_FIELD_REASONS,
526
- ...[...QUERY, ...SIGN_IN, ...PROVIDER_API, ...OTHERS].map(([reason, code, message]) => ({
600
+ ...[...QUERY, ...SIGN_IN, ...PROVIDER_API, ...SFTP, ...OTHERS].map(([reason, code, message]) => ({
527
601
  reason,
528
602
  code,
529
603
  message,
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/installer.js
7
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/installer.js
8
8
  var installerOf = /* @__PURE__ */ __name((scriptPath) => {
9
9
  const path = scriptPath.replaceAll("\\", "/");
10
10
  if (path.includes("/_npx/"))
@@ -29,7 +29,7 @@ import {
29
29
  agentOf,
30
30
  clientHash,
31
31
  currentCaller
32
- } from "./chunk-AUTX2MLF.js";
32
+ } from "./chunk-76VSHS5Y.js";
33
33
  import {
34
34
  __name
35
35
  } from "./chunk-ZVVMGPBJ.js";
@@ -541,7 +541,7 @@ function toError(value) {
541
541
  }
542
542
  __name(toError, "toError");
543
543
 
544
- // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/mcp/caller.js
544
+ // node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/mcp/caller.js
545
545
  var callingAgent = /* @__PURE__ */ __name((fallback, caller = currentCaller()) => {
546
546
  const client = caller?.agent?.client?.name;
547
547
  if (client && client !== "unknown")
@@ -3,15 +3,15 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  readSharedSection,
5
5
  writeSharedSection
6
- } from "./chunk-3FD3IATT.js";
6
+ } from "./chunk-XUJEZ5YF.js";
7
7
  import {
8
8
  CliError
9
- } from "./chunk-VUBZFMGP.js";
9
+ } from "./chunk-7KCBPAQS.js";
10
10
  import {
11
11
  __name
12
12
  } from "./chunk-ZVVMGPBJ.js";
13
13
 
14
- // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/cli/setup-answers.js
14
+ // node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/cli/setup-answers.js
15
15
  var PERMISSION_ANSWERS = ["readonly", "allow"];
16
16
  var QUESTIONS = ["languages", "tools", "permissions"];
17
17
  var SECTION = "setup";
@@ -5,7 +5,7 @@ import {
5
5
  id,
6
6
  text,
7
7
  time
8
- } from "./chunk-O373QEAJ.js";
8
+ } from "./chunk-76EKZSDK.js";
9
9
  import {
10
10
  array,
11
11
  nullable,
@@ -16,9 +16,9 @@ import {
16
16
  strictObject,
17
17
  string,
18
18
  unknown
19
- } from "./chunk-X7J3TTDO.js";
19
+ } from "./chunk-ECZSYLSL.js";
20
20
 
21
- // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/note.js
21
+ // node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/node_modules/@wirecat/cli-core/dist/entities/note.js
22
22
  var link = {
23
23
  target_text: nullable(text),
24
24
  kind: text,
@@ -8,12 +8,12 @@ import {
8
8
  ACCESS_SECONDS,
9
9
  REFRESH_SECONDS,
10
10
  readStored
11
- } from "./chunk-YA45XV6G.js";
11
+ } from "./chunk-VWRT57QU.js";
12
12
  import {
13
13
  __name
14
14
  } from "./chunk-ZVVMGPBJ.js";
15
15
 
16
- // node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/mcp/http/oauth.js
16
+ // node_modules/.pnpm/@wirecat+cli-core@0.653.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_65220cf269874adf69135700bd89254b/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";