@wirecat/mail-cli 0.21.0 → 0.23.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 (121) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/README.md +5 -3
  3. package/dist/bin/mail.js +2 -2
  4. package/dist/bundle/{all-profiles-DTUWUCQQ.js → all-profiles-CI32WFEV.js} +9 -9
  5. package/dist/bundle/{anthropic-YJAEQSNT.js → anthropic-ICSOMJIN.js} +9 -7
  6. package/dist/bundle/{app-server-3ZXSTBA3.js → app-server-3F4ZB7DH.js} +46 -46
  7. package/dist/bundle/{bun-34VBM7C5.js → bun-7AHNFZMZ.js} +2 -2
  8. package/dist/bundle/{bun-sqlite-GCT7ROCK.js → bun-sqlite-UIWRS4HI.js} +4 -4
  9. package/dist/bundle/{chunk-NOVBK4SY.js → chunk-2BAO4T4Z.js} +12 -12
  10. package/dist/bundle/{chunk-UWL2IOII.js → chunk-3QVGB2CI.js} +2 -2
  11. package/dist/bundle/{chunk-HN43G27G.js → chunk-4PNIZUEC.js} +45 -27
  12. package/dist/bundle/{chunk-LF5XM4HE.js → chunk-4TKQIXND.js} +1 -1
  13. package/dist/bundle/{chunk-HSBGNVEL.js → chunk-4YTX5YAU.js} +334 -185
  14. package/dist/bundle/{chunk-LTXYJAJK.js → chunk-5AQ4S4TZ.js} +24 -63
  15. package/dist/bundle/{chunk-ODFHIXMA.js → chunk-5AS5N7V5.js} +1 -1
  16. package/dist/bundle/{chunk-WBAA2X3E.js → chunk-5J4WNTTM.js} +11 -11
  17. package/dist/bundle/{chunk-GAPQENMY.js → chunk-5QQOUYNA.js} +22 -4
  18. package/dist/bundle/{chunk-RPCKBXKN.js → chunk-5Y2WRUYP.js} +2 -2
  19. package/dist/bundle/{chunk-AF62BPIW.js → chunk-5Z7LZAVP.js} +5 -5
  20. package/dist/bundle/{chunk-SYEICLTR.js → chunk-6FSLEARF.js} +1 -1
  21. package/dist/bundle/{chunk-QTMVGOSF.js → chunk-7DFWXIY5.js} +1336 -796
  22. package/dist/bundle/{chunk-J4UZXBEV.js → chunk-7OVVX4F4.js} +1 -1
  23. package/dist/bundle/{chunk-QE72KTS7.js → chunk-7SIWMF77.js} +1 -1
  24. package/dist/bundle/{chunk-J2U6LUT5.js → chunk-7ZDH2XEY.js} +3 -3
  25. package/dist/bundle/{chunk-SFC46MP2.js → chunk-AFPETMXZ.js} +10 -10
  26. package/dist/bundle/{chunk-Z7N4MGOQ.js → chunk-AHRHP2H2.js} +5 -5
  27. package/dist/bundle/{chunk-HJ2CXDKJ.js → chunk-B4MWHI2V.js} +12 -12
  28. package/dist/bundle/{chunk-HRRSTIGP.js → chunk-B6GITVDX.js} +10 -6
  29. package/dist/bundle/{chunk-3DSYLE5N.js → chunk-BT7UUI6E.js} +2 -2
  30. package/dist/bundle/{chunk-72N26BQM.js → chunk-CNYQ3TTZ.js} +88 -88
  31. package/dist/bundle/{chunk-RFB27ACZ.js → chunk-D6WTKSRA.js} +2 -2
  32. package/dist/bundle/{chunk-4FWJNIPH.js → chunk-ELGEHZK2.js} +1 -1
  33. package/dist/bundle/{chunk-3HDQVTND.js → chunk-ETIUB2DF.js} +5 -5
  34. package/dist/bundle/{chunk-VDUGE6TH.js → chunk-FHCOGR7S.js} +2 -2
  35. package/dist/bundle/{chunk-VQZCIDSO.js → chunk-FIZWQTUC.js} +3 -3
  36. package/dist/bundle/{chunk-KMQAHDBM.js → chunk-FVKZ55I2.js} +860 -420
  37. package/dist/bundle/{chunk-BHNBWFT5.js → chunk-GOMJNH56.js} +44 -0
  38. package/dist/bundle/{chunk-FTI73RLC.js → chunk-HGV7DSSA.js} +2 -2
  39. package/dist/bundle/{chunk-RY7PBP4F.js → chunk-HN6PB7F5.js} +16 -16
  40. package/dist/bundle/{chunk-R3WPMQYZ.js → chunk-HRIYU2HJ.js} +245 -387
  41. package/dist/bundle/{chunk-ZKLXSVIO.js → chunk-I3YNNSGB.js} +1 -1
  42. package/dist/bundle/{chunk-MDDB7M7Z.js → chunk-IMIY7HQB.js} +1 -1
  43. package/dist/bundle/{chunk-2PPEDB67.js → chunk-JDKC7EXM.js} +30 -30
  44. package/dist/bundle/{chunk-T3DTYJTG.js → chunk-JO4BJYVE.js} +1 -1
  45. package/dist/bundle/{chunk-O3M2S62X.js → chunk-KJQZXCNK.js} +3 -3
  46. package/dist/bundle/{chunk-T4FVIPUJ.js → chunk-KNRONMVG.js} +2 -2
  47. package/dist/bundle/{chunk-BMV56JCL.js → chunk-LLYVBO3R.js} +1 -1
  48. package/dist/bundle/{chunk-TCCN5TON.js → chunk-NEDYKKJJ.js} +24 -2
  49. package/dist/bundle/{chunk-OKO2Q6H6.js → chunk-NKDYHAHP.js} +2 -2
  50. package/dist/bundle/{chunk-P2QJA7S5.js → chunk-OMW37FXK.js} +1 -1
  51. package/dist/bundle/{chunk-P6FT6YYT.js → chunk-R4RAWEMV.js} +16 -16
  52. package/dist/bundle/{chunk-V6OIIVH3.js → chunk-RIAZTS6C.js} +11 -11
  53. package/dist/bundle/{chunk-7XLOWYGD.js → chunk-S2U5BXWS.js} +19 -4
  54. package/dist/bundle/{chunk-566MEXK5.js → chunk-SCH3NC5X.js} +3 -3
  55. package/dist/bundle/{chunk-Z75WYAX6.js → chunk-SETCGPFG.js} +7 -7
  56. package/dist/bundle/{chunk-4WIEVQ2Q.js → chunk-SGMENSI6.js} +127 -9
  57. package/dist/bundle/{chunk-I2SDXWLR.js → chunk-TEL2OMS5.js} +97 -54
  58. package/dist/bundle/{chunk-SCIC2CJS.js → chunk-UA4BOLIY.js} +4 -4
  59. package/dist/bundle/{chunk-VINSQR4X.js → chunk-UTLJQG6Q.js} +7 -7
  60. package/dist/bundle/{chunk-ZZSHGCRC.js → chunk-WQRX4RQS.js} +4 -4
  61. package/dist/bundle/{chunk-MD64ITYO.js → chunk-XP5FBDIG.js} +1 -1
  62. package/dist/bundle/{chunk-RT6SLZBI.js → chunk-XV3M3NAN.js} +1 -1
  63. package/dist/bundle/{chunk-B74SOC4R.js → chunk-ZYHBMDNU.js} +8 -8
  64. package/dist/bundle/command-contract-UIRWJVEY.js +35 -0
  65. package/dist/bundle/{decode-BIOOL5E4.js → decode-BJXABRAN.js} +4 -4
  66. package/dist/bundle/{dispatch-R5OF2FVZ.js → dispatch-G4CYFWQ2.js} +1 -1
  67. package/dist/bundle/{dist-TJVIRLE5.js → dist-LLEA6R4V.js} +36 -22
  68. package/dist/bundle/{echarts-ECPGMKXO.js → echarts-YPTKBOZV.js} +2 -2
  69. package/dist/bundle/{embed-F7JFSLHN.js → embed-DMROTI5M.js} +5 -5
  70. package/dist/bundle/{embedder-U4G74HV3.js → embedder-DWMHXCHJ.js} +8 -8
  71. package/dist/bundle/{failure-WYKVF6RH.js → failure-FFPK2WYB.js} +1 -1
  72. package/dist/bundle/{first-run-JTYPUYQP.js → first-run-FQOEF2IO.js} +8 -8
  73. package/dist/bundle/first-screen-B6LF5464.js +33 -0
  74. package/dist/bundle/{instructions-WNCGZ7OJ.js → instructions-OGKMROLD.js} +1 -1
  75. package/dist/bundle/mail.js +5 -5
  76. package/dist/bundle/{node-UIRGGMGT.js → node-HIKYE546.js} +2 -2
  77. package/dist/bundle/{node-sqlite-4ZM7OPRF.js → node-sqlite-3GJAG7VO.js} +5 -5
  78. package/dist/bundle/{oauth-5RAJZPBW.js → oauth-H3DB6IHI.js} +6 -6
  79. package/dist/bundle/{open-7ORCHOAI.js → open-DJ2PRG74.js} +4 -4
  80. package/dist/bundle/{openai-XSJNXJA7.js → openai-MDBRYB55.js} +12 -12
  81. package/dist/bundle/{process-ZLO72UVZ.js → process-4LBD72JH.js} +1 -1
  82. package/dist/bundle/{program-LBLGFZWU.js → program-F6WK6RX4.js} +3713 -2439
  83. package/dist/bundle/{prompt-IDUPCUGM.js → prompt-UNPUG6SO.js} +6 -4
  84. package/dist/bundle/{recognize-OS3EZKIM.js → recognize-DMIO4PDB.js} +3 -3
  85. package/dist/bundle/{remote-PF4LZR65.js → remote-24HJA72D.js} +6 -6
  86. package/dist/bundle/{rerank-CQNZF3JI.js → rerank-PTNCHHIU.js} +6 -6
  87. package/dist/bundle/{serve-Y2DDLGBT.js → serve-T6JHM2YD.js} +8 -8
  88. package/dist/bundle/{server-TVRT7YEY.js → server-BWEYRUR3.js} +36 -36
  89. package/dist/bundle/server-VUQNR5ZD.js +65 -0
  90. package/dist/bundle/{sqlite-runtime-5343C3OE.js → sqlite-runtime-ZJ4EH5ZM.js} +5 -5
  91. package/dist/bundle/{state-4GBTMPIV.js → state-KSN4OFYW.js} +5 -5
  92. package/dist/bundle/{store-OLBLTQPT.js → store-GVBW2ZFK.js} +24 -16
  93. package/dist/bundle/{store-QA6QJ5BB.js → store-OIEZJEA7.js} +31 -14
  94. package/dist/bundle/store-maintenance-command-KJ54HLUQ.js +54 -0
  95. package/dist/commands/account-remove.d.ts +3 -0
  96. package/dist/commands/account-remove.d.ts.map +1 -0
  97. package/dist/commands/account-remove.js +65 -0
  98. package/dist/commands/account-remove.js.map +1 -0
  99. package/dist/commands/account.d.ts.map +1 -1
  100. package/dist/commands/account.js +3 -1
  101. package/dist/commands/account.js.map +1 -1
  102. package/dist/commands/context.d.ts +3 -1
  103. package/dist/commands/context.d.ts.map +1 -1
  104. package/dist/commands/context.js.map +1 -1
  105. package/dist/commands/session-start.d.ts.map +1 -1
  106. package/dist/commands/session-start.js +17 -4
  107. package/dist/commands/session-start.js.map +1 -1
  108. package/dist/mail/changes.d.ts +1 -0
  109. package/dist/mail/changes.d.ts.map +1 -1
  110. package/dist/mail/changes.js +1 -1
  111. package/dist/mail/changes.js.map +1 -1
  112. package/dist/providers.js +2 -2
  113. package/dist/providers.js.map +1 -1
  114. package/dist/version.d.ts +1 -1
  115. package/dist/version.js +1 -1
  116. package/package.json +2 -2
  117. package/dist/bundle/chunk-QPRXTLMD.js +0 -33
  118. package/dist/bundle/command-contract-Y4ZQAJEC.js +0 -35
  119. package/dist/bundle/first-screen-W6RWTAU7.js +0 -33
  120. package/dist/bundle/server-I3IALQMC.js +0 -65
  121. package/dist/bundle/store-maintenance-command-LB6CMGP4.js +0 -55
@@ -8,14 +8,17 @@ import {
8
8
  refuseLacking,
9
9
  servicesFor,
10
10
  throughWrapper
11
- } from "./chunk-QTMVGOSF.js";
11
+ } from "./chunk-7DFWXIY5.js";
12
12
  import {
13
13
  chatReferenceOf,
14
14
  ensureAccount,
15
15
  foldName,
16
16
  isId,
17
17
  pickPerson
18
- } from "./chunk-SFC46MP2.js";
18
+ } from "./chunk-AFPETMXZ.js";
19
+ import {
20
+ servingProfiles
21
+ } from "./chunk-FIZWQTUC.js";
19
22
  import {
20
23
  LOG_ATTRIBUTES,
21
24
  MESSENGER_CHANGE_REFUSAL,
@@ -35,7 +38,7 @@ import {
35
38
  recalledAccount,
36
39
  rememberAccount,
37
40
  rootOf2 as rootOf
38
- } from "./chunk-HSBGNVEL.js";
41
+ } from "./chunk-4YTX5YAU.js";
39
42
  import {
40
43
  AUTHORITY_KEY,
41
44
  CEILING_KEY,
@@ -46,25 +49,22 @@ import {
46
49
  levelFor,
47
50
  readKeysForCommand,
48
51
  skipFlagFor
49
- } from "./chunk-HRRSTIGP.js";
52
+ } from "./chunk-B6GITVDX.js";
50
53
  import {
51
54
  providerErrorKey
52
- } from "./chunk-B74SOC4R.js";
53
- import {
54
- servingProfiles
55
- } from "./chunk-VQZCIDSO.js";
55
+ } from "./chunk-ZYHBMDNU.js";
56
56
  import {
57
57
  openStore
58
- } from "./chunk-KMQAHDBM.js";
58
+ } from "./chunk-FVKZ55I2.js";
59
59
  import {
60
60
  isCliFailure
61
- } from "./chunk-SYEICLTR.js";
61
+ } from "./chunk-6FSLEARF.js";
62
62
  import {
63
63
  logRecordOf,
64
64
  realSleep,
65
65
  resolvePaths,
66
66
  writeSecurely
67
- } from "./chunk-BMV56JCL.js";
67
+ } from "./chunk-LLYVBO3R.js";
68
68
  import {
69
69
  CliError
70
70
  } from "./chunk-DALBYUPC.js";
@@ -72,10 +72,65 @@ import {
72
72
  __name
73
73
  } from "./chunk-ZVVMGPBJ.js";
74
74
 
75
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_2045f8d992dff370989171c93240f8d7/node_modules/@wirecat/cli-core/dist/sends/guard.js
75
+ // 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/cli/messenger/ask.js
76
+ import { openSync } from "node:fs";
77
+ import { createInterface } from "node:readline";
78
+ import { ReadStream } from "node:tty";
79
+ var fromTerminal = /* @__PURE__ */ __name(async (question) => {
80
+ if (!process.stdin.isTTY || !process.stderr.isTTY)
81
+ return null;
82
+ let input;
83
+ try {
84
+ input = new ReadStream(openSync("/dev/tty", "r"));
85
+ } catch {
86
+ return null;
87
+ }
88
+ const reader = createInterface({ input, output: process.stderr, terminal: true });
89
+ try {
90
+ return await new Promise((resolve, reject) => {
91
+ const cancel = /* @__PURE__ */ __name(() => reject(new CliError("cancelled", "cancelled \u2014 nothing was done")), "cancel");
92
+ reader.once("SIGINT", cancel);
93
+ reader.once("close", cancel);
94
+ reader.question(question, resolve);
95
+ });
96
+ } finally {
97
+ reader.close();
98
+ input.destroy();
99
+ }
100
+ }, "fromTerminal");
101
+ var what = /* @__PURE__ */ __name((key, { chatId, count, personIds, forEveryone }) => [
102
+ key,
103
+ forEveryone ? "for everyone" : void 0,
104
+ count !== void 0 ? `${count} ${count === 1 ? "item" : "items"}` : void 0,
105
+ personIds?.length ? `${personIds.length} ${personIds.length === 1 ? "person" : "people"}` : void 0,
106
+ chatId !== null ? `in chat ${chatId}` : void 0
107
+ ].filter(Boolean).join(", "), "what");
108
+ var answerOf = /* @__PURE__ */ __name(async (command, question) => {
109
+ const given = command.optsWithGlobals();
110
+ if (given.json === true || given.jsonl === true)
111
+ return null;
112
+ return (environmentOf(command).answer ?? fromTerminal)(question);
113
+ }, "answerOf");
114
+ var terminalAsker = /* @__PURE__ */ __name((command) => async (key, request) => {
115
+ if (environmentOf(command).agent)
116
+ return;
117
+ const flag = skipFlagFor(key);
118
+ const given = command.optsWithGlobals();
119
+ if (flag === "--yes" ? given.yes === true : given.allowDangerous === true)
120
+ return;
121
+ const machine = given.json === true || given.jsonl === true;
122
+ const answer = machine ? null : await (environmentOf(command).answer ?? fromTerminal)(`${what(key, request)} \u2014 go ahead? [y/N] `);
123
+ if (answer === null) {
124
+ throw new CliError("confirmation_required", `${key} asks before it acts (its permission level is ask), and nobody is at a terminal to answer \u2014 add ${flag} to go ahead`, { permission: key });
125
+ }
126
+ if (!/^\s*y(es)?\s*$/i.test(answer))
127
+ throw new CliError("cancelled", `${key}: not done \u2014 the answer was no`);
128
+ }, "terminalAsker");
129
+
130
+ // 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/sends/guard.js
76
131
  import { randomUUID } from "node:crypto";
77
132
 
78
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_2045f8d992dff370989171c93240f8d7/node_modules/@wirecat/cli-core/dist/sends/flood.js
133
+ // 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/sends/flood.js
79
134
  import { mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
80
135
  import { dirname, join } from "node:path";
81
136
  var MOST_DEADLINES = 50;
@@ -159,12 +214,12 @@ var FloodMemory = class {
159
214
  }
160
215
  };
161
216
 
162
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_2045f8d992dff370989171c93240f8d7/node_modules/@wirecat/cli-core/dist/sends/journal.js
217
+ // 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/sends/journal.js
163
218
  import { appendFileSync, mkdirSync as mkdirSync3, readFileSync as readFileSync2 } from "node:fs";
164
219
  import { dirname as dirname3, join as join2 } from "node:path";
165
220
 
166
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_2045f8d992dff370989171c93240f8d7/node_modules/@wirecat/cli-core/dist/sends/file-lock.js
167
- import { closeSync, mkdirSync as mkdirSync2, openSync, statSync, unlinkSync } from "node:fs";
221
+ // 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/sends/file-lock.js
222
+ import { closeSync, mkdirSync as mkdirSync2, openSync as openSync2, statSync, unlinkSync } from "node:fs";
168
223
  import { dirname as dirname2 } from "node:path";
169
224
  var LOCK_WAIT_MS = 5e3;
170
225
  var LOCK_STALE_MS = 3e4;
@@ -197,7 +252,7 @@ var lockFor = /* @__PURE__ */ __name((path) => {
197
252
  var taken = /* @__PURE__ */ __name((lock) => {
198
253
  for (; ; ) {
199
254
  try {
200
- closeSync(openSync(lock, "wx", 384));
255
+ closeSync(openSync2(lock, "wx", 384));
201
256
  return true;
202
257
  } catch (error) {
203
258
  if (error.code !== "EEXIST")
@@ -230,7 +285,7 @@ var lockTime = /* @__PURE__ */ __name((lock) => {
230
285
  }
231
286
  }, "lockTime");
232
287
 
233
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_2045f8d992dff370989171c93240f8d7/node_modules/@wirecat/cli-core/dist/sends/journal.js
288
+ // 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/sends/journal.js
234
289
  var sendsPathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join2(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "sends", `${profile}.jsonl`), "sendsPathFor");
235
290
  var SendJournal = class {
236
291
  static {
@@ -307,7 +362,7 @@ var withSendId = /* @__PURE__ */ __name((entry) => {
307
362
  return cid === void 0 || rest.sendId !== void 0 ? rest : { ...rest, sendId: String(cid) };
308
363
  }, "withSendId");
309
364
 
310
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_2045f8d992dff370989171c93240f8d7/node_modules/@wirecat/cli-core/dist/sends/recipients.js
365
+ // 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/sends/recipients.js
311
366
  import { existsSync, readFileSync as readFileSync3, rmSync } from "node:fs";
312
367
  import { join as join3 } from "node:path";
313
368
  var recipientsPathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join3(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "profiles", `${profile}.recipients.json`), "recipientsPathFor");
@@ -419,7 +474,7 @@ var RecipientList = class {
419
474
  }
420
475
  };
421
476
 
422
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_2045f8d992dff370989171c93240f8d7/node_modules/@wirecat/cli-core/dist/sends/guard.js
477
+ // 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/sends/guard.js
423
478
  var HOUR_MS = 60 * 60 * 1e3;
424
479
  var READS_UNDER_HOLD = /* @__PURE__ */ new Set([
425
480
  "attachments.extract",
@@ -612,62 +667,7 @@ var guardFor = /* @__PURE__ */ __name((app, settings, warn, env = process.env, a
612
667
  }), "guardFor");
613
668
  var journalFailure = /* @__PURE__ */ __name((error) => error?.code ?? (error instanceof Error ? error.name : "error"), "journalFailure");
614
669
 
615
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_2045f8d992dff370989171c93240f8d7/node_modules/@wirecat/cli-core/dist/cli/messenger/ask.js
616
- import { openSync as openSync2 } from "node:fs";
617
- import { createInterface } from "node:readline";
618
- import { ReadStream } from "node:tty";
619
- var fromTerminal = /* @__PURE__ */ __name(async (question) => {
620
- if (!process.stdin.isTTY || !process.stderr.isTTY)
621
- return null;
622
- let input;
623
- try {
624
- input = new ReadStream(openSync2("/dev/tty", "r"));
625
- } catch {
626
- return null;
627
- }
628
- const reader = createInterface({ input, output: process.stderr, terminal: true });
629
- try {
630
- return await new Promise((resolve, reject) => {
631
- const cancel = /* @__PURE__ */ __name(() => reject(new CliError("cancelled", "cancelled \u2014 nothing was done")), "cancel");
632
- reader.once("SIGINT", cancel);
633
- reader.once("close", cancel);
634
- reader.question(question, resolve);
635
- });
636
- } finally {
637
- reader.close();
638
- input.destroy();
639
- }
640
- }, "fromTerminal");
641
- var what = /* @__PURE__ */ __name((key, { chatId, count, personIds, forEveryone }) => [
642
- key,
643
- forEveryone ? "for everyone" : void 0,
644
- count !== void 0 ? `${count} ${count === 1 ? "item" : "items"}` : void 0,
645
- personIds?.length ? `${personIds.length} ${personIds.length === 1 ? "person" : "people"}` : void 0,
646
- chatId !== null ? `in chat ${chatId}` : void 0
647
- ].filter(Boolean).join(", "), "what");
648
- var answerOf = /* @__PURE__ */ __name(async (command, question) => {
649
- const given = command.optsWithGlobals();
650
- if (given.json === true || given.jsonl === true)
651
- return null;
652
- return (environmentOf(command).answer ?? fromTerminal)(question);
653
- }, "answerOf");
654
- var terminalAsker = /* @__PURE__ */ __name((command) => async (key, request) => {
655
- if (environmentOf(command).agent)
656
- return;
657
- const flag = skipFlagFor(key);
658
- const given = command.optsWithGlobals();
659
- if (flag === "--yes" ? given.yes === true : given.allowDangerous === true)
660
- return;
661
- const machine = given.json === true || given.jsonl === true;
662
- const answer = machine ? null : await (environmentOf(command).answer ?? fromTerminal)(`${what(key, request)} \u2014 go ahead? [y/N] `);
663
- if (answer === null) {
664
- throw new CliError("confirmation_required", `${key} asks before it acts (its permission level is ask), and nobody is at a terminal to answer \u2014 add ${flag} to go ahead`, { permission: key });
665
- }
666
- if (!/^\s*y(es)?\s*$/i.test(answer))
667
- throw new CliError("cancelled", `${key}: not done \u2014 the answer was no`);
668
- }, "terminalAsker");
669
-
670
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_2045f8d992dff370989171c93240f8d7/node_modules/@wirecat/cli-core/dist/sends/pace.js
670
+ // 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/sends/pace.js
671
671
  import { readFileSync as readFileSync4, renameSync as renameSync2, writeFileSync as writeFileSync2 } from "node:fs";
672
672
  import { join as join4 } from "node:path";
673
673
  var DEFAULT_PACE = { perMinute: 60, burst: 20 };
@@ -757,7 +757,7 @@ var waitForTurn = /* @__PURE__ */ __name(async (pacer, options) => {
757
757
  await (options.sleep ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms))))(waitMs);
758
758
  }, "waitForTurn");
759
759
 
760
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_2045f8d992dff370989171c93240f8d7/node_modules/@wirecat/cli-core/dist/cli/permission-keys.js
760
+ // 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/cli/permission-keys.js
761
761
  var HOUSEKEEPING = /* @__PURE__ */ new Set([
762
762
  "help",
763
763
  "guide",
@@ -837,7 +837,7 @@ var refuseUnknownPermissionKeys = /* @__PURE__ */ __name((command, settings, too
837
837
  throw new CliError("validation_error", `--permission ${key} names no command`, { permission: key });
838
838
  }, "refuseUnknownPermissionKeys");
839
839
 
840
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_2045f8d992dff370989171c93240f8d7/node_modules/@wirecat/cli-core/dist/cli/messenger/flooded.js
840
+ // 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/cli/messenger/flooded.js
841
841
  var LONG_LIVED = /* @__PURE__ */ new Set(["self", "newSendId", "close", "formatMarkdown", "formatHtml", "storedChats"]);
842
842
  var LISTENING = /* @__PURE__ */ new Set(["watch", "feed", "listen", "listenHistory"]);
843
843
  var BLOCKING = /* @__PURE__ */ new Set(["frozen", "limited", "banned"]);
@@ -934,7 +934,7 @@ var flooded = /* @__PURE__ */ __name((messenger, memory, { name, warn, pacer })
934
934
  });
935
935
  }, "flooded");
936
936
 
937
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_2045f8d992dff370989171c93240f8d7/node_modules/@wirecat/cli-core/dist/cli/messenger/observed.js
937
+ // 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/cli/messenger/observed.js
938
938
  var observed = /* @__PURE__ */ __name((messenger, events) => {
939
939
  const timed = /* @__PURE__ */ __name(async (operation, named, work, after) => {
940
940
  const write = currentOperation();
@@ -1033,7 +1033,7 @@ var byPart = /* @__PURE__ */ __name((batch, counts) => {
1033
1033
  counts[part] = (counts[part] ?? 0) + items.length;
1034
1034
  }, "byPart");
1035
1035
 
1036
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_2045f8d992dff370989171c93240f8d7/node_modules/@wirecat/cli-core/dist/cli/messenger/stored.js
1036
+ // 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/cli/messenger/stored.js
1037
1037
  var REKEY_PACING = { lockMs: 50, pauseMs: 25 };
1038
1038
  var stored = /* @__PURE__ */ __name((messenger, { account, store, warn, events, pending, announcing, deletedWithoutChat, profile, rekeyed, rekeyPacing = REKEY_PACING, closing, namesFromStore, recipientIds, countsUnread = false, historyLimits, command = "cli" }) => {
1039
1039
  let warned = false;
@@ -1609,7 +1609,7 @@ var keep = /* @__PURE__ */ __name(async (store, account, event, seenAt, among, c
1609
1609
  }
1610
1610
  }, "keep");
1611
1611
 
1612
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_2045f8d992dff370989171c93240f8d7/node_modules/@wirecat/cli-core/dist/cli/messenger/context.js
1612
+ // 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/cli/messenger/context.js
1613
1613
  var lazyStore = /* @__PURE__ */ __name((env, command, version) => {
1614
1614
  let opened;
1615
1615
  return {
@@ -2007,11 +2007,16 @@ var messengerContext = /* @__PURE__ */ __name((command, messenger, resolving = {
2007
2007
  }, "messengerContext");
2008
2008
 
2009
2009
  export {
2010
+ sendsPathFor,
2011
+ SendJournal,
2012
+ answerOf,
2013
+ terminalAsker,
2010
2014
  holdEnd,
2011
2015
  floodPathFor,
2012
2016
  FloodMemory,
2013
- sendsPathFor,
2014
- SendJournal,
2017
+ DEFAULT_PACE,
2018
+ pacePathFor,
2019
+ Pacer,
2015
2020
  recipientsPathFor,
2016
2021
  RecipientList,
2017
2022
  ceilingRefusal,
@@ -2023,11 +2028,6 @@ export {
2023
2028
  knownBeside,
2024
2029
  unknownPermissionIssues,
2025
2030
  refuseUnknownPermissionKeys,
2026
- answerOf,
2027
- terminalAsker,
2028
- DEFAULT_PACE,
2029
- pacePathFor,
2030
- Pacer,
2031
2031
  connectedFor,
2032
2032
  refuseLocalWrite,
2033
2033
  messengerContext
@@ -8,12 +8,12 @@ import {
8
8
  ACCESS_SECONDS,
9
9
  REFRESH_SECONDS,
10
10
  readStored
11
- } from "./chunk-SCIC2CJS.js";
11
+ } from "./chunk-UA4BOLIY.js";
12
12
  import {
13
13
  __name
14
14
  } from "./chunk-ZVVMGPBJ.js";
15
15
 
16
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_2045f8d992dff370989171c93240f8d7/node_modules/@wirecat/cli-core/dist/mcp/http/oauth.js
16
+ // 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/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";
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_2045f8d992dff370989171c93240f8d7/node_modules/@wirecat/cli-core/dist/runs/secrets.js
7
+ // 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/runs/secrets.js
8
8
  var SECRET_WORDS = /* @__PURE__ */ new Set([
9
9
  "authorization",
10
10
  "cookie",
@@ -2,10 +2,10 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  storePath
5
- } from "./chunk-RPCKBXKN.js";
5
+ } from "./chunk-5Y2WRUYP.js";
6
6
  import {
7
7
  resolvePaths
8
- } from "./chunk-BMV56JCL.js";
8
+ } from "./chunk-LLYVBO3R.js";
9
9
  import {
10
10
  CliError,
11
11
  singleLine
@@ -14,11 +14,11 @@ import {
14
14
  __name
15
15
  } from "./chunk-ZVVMGPBJ.js";
16
16
 
17
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_2045f8d992dff370989171c93240f8d7/node_modules/@wirecat/cli-core/dist/store/shared-config.js
17
+ // 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/store/shared-config.js
18
18
  import { mkdirSync, readFileSync, renameSync, statSync, writeFileSync } from "node:fs";
19
19
  import { dirname, join, resolve } from "node:path";
20
20
 
21
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_2045f8d992dff370989171c93240f8d7/node_modules/@wirecat/cli-core/dist/domain/task-categories.js
21
+ // 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/domain/task-categories.js
22
22
  var DEFAULT_TASK_CATEGORIES = [
23
23
  {
24
24
  name: "taxes",
@@ -773,7 +773,7 @@ var storedTaskCategories = /* @__PURE__ */ __name((json) => {
773
773
  }
774
774
  }, "storedTaskCategories");
775
775
 
776
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_2045f8d992dff370989171c93240f8d7/node_modules/@wirecat/cli-core/dist/store/shared-config.js
776
+ // 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/store/shared-config.js
777
777
  var SECTION = "task_categories";
778
778
  var sharedConfigPath = /* @__PURE__ */ __name((store, env = process.env) => {
779
779
  const paths = resolvePaths({ appName: "WireCat", prefix: "WIRECAT", env });
@@ -3,7 +3,7 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  readSharedSection,
5
5
  writeSharedSection
6
- } from "./chunk-3HDQVTND.js";
6
+ } from "./chunk-ETIUB2DF.js";
7
7
  import {
8
8
  CliError
9
9
  } from "./chunk-DALBYUPC.js";
@@ -11,7 +11,7 @@ import {
11
11
  __name
12
12
  } from "./chunk-ZVVMGPBJ.js";
13
13
 
14
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_2045f8d992dff370989171c93240f8d7/node_modules/@wirecat/cli-core/dist/cli/setup-answers.js
14
+ // 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/cli/setup-answers.js
15
15
  var PERMISSION_ANSWERS = ["readonly", "allow"];
16
16
  var QUESTIONS = ["languages", "tools", "permissions"];
17
17
  var SECTION = "setup";
@@ -2,16 +2,16 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  alive
5
- } from "./chunk-T3DTYJTG.js";
5
+ } from "./chunk-JO4BJYVE.js";
6
6
  import {
7
7
  resolvePaths,
8
8
  writeSecurely
9
- } from "./chunk-BMV56JCL.js";
9
+ } from "./chunk-LLYVBO3R.js";
10
10
  import {
11
11
  __name
12
12
  } from "./chunk-ZVVMGPBJ.js";
13
13
 
14
- // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_2045f8d992dff370989171c93240f8d7/node_modules/@wirecat/cli-core/dist/background/lock.js
14
+ // 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/background/lock.js
15
15
  import { existsSync, linkSync, mkdirSync, readdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
16
16
  import { dirname, join } from "node:path";
17
17
  var lockPath = /* @__PURE__ */ __name((app, profile, env) => join(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "serve", `${profile}.lock`), "lockPath");