@wirecat/mail-cli 0.30.0 → 0.31.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 (105) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/bin/mail.js +2 -2
  3. package/dist/bundle/{all-profiles-523GLORJ.js → all-profiles-XL62TNUO.js} +19 -29
  4. package/dist/bundle/{anthropic-KKYGROQR.js → anthropic-3MSWVYCE.js} +2 -2
  5. package/dist/bundle/{app-server-RJR7U5NT.js → app-server-RRNR5XFA.js} +45 -60
  6. package/dist/bundle/{bun-EBQHHLKR.js → bun-E3F3PEQQ.js} +2 -2
  7. package/dist/bundle/{bun-sqlite-LTG2RRSL.js → bun-sqlite-UOFN77LO.js} +3 -3
  8. package/dist/bundle/{chunk-IIV43UIC.js → chunk-3CJ4C6BB.js} +12 -12
  9. package/dist/bundle/{chunk-ZG2XBWFT.js → chunk-3V6J7VPF.js} +3 -3
  10. package/dist/bundle/{chunk-U7VYDTXN.js → chunk-4BW5JACS.js} +16 -16
  11. package/dist/bundle/{chunk-MP572GP7.js → chunk-4ME2NHNJ.js} +2 -2
  12. package/dist/bundle/{chunk-JKWNPRZD.js → chunk-5YRR52NH.js} +1 -1
  13. package/dist/bundle/{chunk-QGIQ62KV.js → chunk-6UOUDIXL.js} +382 -366
  14. package/dist/bundle/{chunk-KE2RQUQO.js → chunk-7E7YXQ52.js} +17 -17
  15. package/dist/bundle/{chunk-ENKZEQ4Y.js → chunk-BKRIIZPV.js} +2 -2
  16. package/dist/bundle/{chunk-54JKDFOV.js → chunk-BNP7WLDQ.js} +1 -1
  17. package/dist/bundle/{chunk-WXQK5RO5.js → chunk-BS6WYCNZ.js} +32 -22
  18. package/dist/bundle/{chunk-B3NXAN6J.js → chunk-BXMLIKUM.js} +146 -146
  19. package/dist/bundle/{chunk-NMN7RTX5.js → chunk-D6D6JLXG.js} +16 -16
  20. package/dist/bundle/{chunk-S2KKQA7O.js → chunk-DCR3IWC7.js} +38 -47
  21. package/dist/bundle/{chunk-LN2LWPN2.js → chunk-DDCDOBZS.js} +1 -1
  22. package/dist/bundle/{chunk-XGEPAJBY.js → chunk-DPDS6IZJ.js} +1 -1
  23. package/dist/bundle/{chunk-Q23EEGPC.js → chunk-DWBY7DMF.js} +1 -1
  24. package/dist/bundle/{chunk-SNZFQ5SS.js → chunk-DZSS2IUK.js} +14 -2
  25. package/dist/bundle/{chunk-26H2HVJD.js → chunk-E3IOR37T.js} +2 -2
  26. package/dist/bundle/{chunk-5X5A3CAX.js → chunk-EMVLCION.js} +1 -1
  27. package/dist/bundle/{chunk-F22PLRCG.js → chunk-EV5SR3OC.js} +7 -7
  28. package/dist/bundle/{chunk-SPWKGRTO.js → chunk-FRXDSR45.js} +1 -1
  29. package/dist/bundle/{chunk-YMJXGIYG.js → chunk-FYP2M6IT.js} +23 -23
  30. package/dist/bundle/{chunk-FYXGD6R6.js → chunk-GWKGZOSO.js} +2 -2
  31. package/dist/bundle/{chunk-ONA3UI3R.js → chunk-GXBNTKJW.js} +2 -2
  32. package/dist/bundle/{chunk-KIZYN3NG.js → chunk-GZLCZU5B.js} +5 -5
  33. package/dist/bundle/{chunk-MVDP7VL6.js → chunk-H2QTUZ3C.js} +1 -1
  34. package/dist/bundle/{chunk-4F7WQHDO.js → chunk-HZCINHHS.js} +1 -1
  35. package/dist/bundle/{chunk-A3YXTDTP.js → chunk-HZL3X4XR.js} +15 -15
  36. package/dist/bundle/{chunk-D3J4T5OZ.js → chunk-I3BQ2QIY.js} +12 -12
  37. package/dist/bundle/{chunk-YNI57LTZ.js → chunk-I5Y6Y7Q5.js} +1 -1
  38. package/dist/bundle/{chunk-FL2TKSZY.js → chunk-ITU6K7LU.js} +1 -1
  39. package/dist/bundle/{chunk-T7A6HSBF.js → chunk-JLIVJSCF.js} +1 -1
  40. package/dist/bundle/{chunk-J5PUHGK2.js → chunk-JYGFEMTR.js} +1 -1
  41. package/dist/bundle/{chunk-2M7PPII5.js → chunk-KPFB2VUY.js} +745 -336
  42. package/dist/bundle/{chunk-3ECFSRLQ.js → chunk-LGDJDD5J.js} +3 -3
  43. package/dist/bundle/{chunk-GCSFZTRI.js → chunk-MS5XYEYW.js} +9 -5
  44. package/dist/bundle/{chunk-3HCEKXXB.js → chunk-NEJU74O4.js} +6 -6
  45. package/dist/bundle/{chunk-E2SL7HIZ.js → chunk-NUN7DBR4.js} +9 -9
  46. package/dist/bundle/{chunk-TIMBTN5Z.js → chunk-NV3WPD3B.js} +5 -5
  47. package/dist/bundle/{chunk-DBI22GQL.js → chunk-NYQPKZWL.js} +500 -322
  48. package/dist/bundle/{chunk-6C7SA4LD.js → chunk-OP5ZLH53.js} +57 -54
  49. package/dist/bundle/{chunk-SN5V6CKH.js → chunk-OXHQNEXU.js} +98 -6
  50. package/dist/bundle/{chunk-HZUUVNWC.js → chunk-P6CYVOL6.js} +1 -1
  51. package/dist/bundle/{chunk-GDFJKUMK.js → chunk-PIXFZZUZ.js} +6 -6
  52. package/dist/bundle/{chunk-WHS3CTTM.js → chunk-PZL7DHVJ.js} +7 -7
  53. package/dist/bundle/{chunk-CWAA73PJ.js → chunk-QANXOKYQ.js} +5 -5
  54. package/dist/bundle/{chunk-LM4K6K2R.js → chunk-QSXJ2BVQ.js} +4 -4
  55. package/dist/bundle/{chunk-HVJ2WQI7.js → chunk-QVGCHTTU.js} +10 -10
  56. package/dist/bundle/{chunk-R3IFRHZ2.js → chunk-S2QO6KUI.js} +2 -2
  57. package/dist/bundle/{chunk-BOGGQOVO.js → chunk-SQA5JI7Q.js} +1 -1
  58. package/dist/bundle/{chunk-K5FTIIYR.js → chunk-T72DWT37.js} +4 -4
  59. package/dist/bundle/{chunk-GXKFRZUP.js → chunk-THZHNCJP.js} +3 -3
  60. package/dist/bundle/{chunk-RLPWLGP6.js → chunk-TUXNILKR.js} +7 -7
  61. package/dist/bundle/{chunk-L2D5QYI3.js → chunk-UFMR2TB3.js} +2 -2
  62. package/dist/bundle/{chunk-NV2REPY6.js → chunk-WZGFC7D5.js} +1 -1
  63. package/dist/bundle/{command-contract-ETECA2AC.js → command-contract-YRNKDQDL.js} +15 -15
  64. package/dist/bundle/{command-server-entry-BFXRYTBC.js → command-server-entry-A3FCP24M.js} +21 -21
  65. package/dist/bundle/{decode-4QRYNPD5.js → decode-FI2ISRNZ.js} +2 -2
  66. package/dist/bundle/{dist-MHJPECI4.js → dist-NLOOZJ64.js} +15 -11
  67. package/dist/bundle/{echarts-EJXBKCJT.js → echarts-PMAJUJFE.js} +2 -2
  68. package/dist/bundle/{embed-46WZZMUQ.js → embed-OIMT6SAX.js} +3 -3
  69. package/dist/bundle/{embedder-56WHJKJE.js → embedder-Q5IF5WIM.js} +6 -6
  70. package/dist/bundle/{first-run-CATDBOBV.js → first-run-4L53QWOT.js} +6 -6
  71. package/dist/bundle/first-screen-ZPQLAAIS.js +34 -0
  72. package/dist/bundle/{instructions-Z7GVGWXS.js → instructions-ZJGGGXOA.js} +1 -1
  73. package/dist/bundle/mail.js +2 -2
  74. package/dist/bundle/{node-L2PVEW3N.js → node-DCSOHRD6.js} +2 -2
  75. package/dist/bundle/{node-sqlite-RIGII7U7.js → node-sqlite-7F77K5JA.js} +4 -4
  76. package/dist/bundle/{oauth-OWT6NYRS.js → oauth-LVPMEN6M.js} +4 -4
  77. package/dist/bundle/{open-D3SPYL7O.js → open-XM5LWEN6.js} +2 -2
  78. package/dist/bundle/{openai-IPTZDMFD.js → openai-H2LCGK22.js} +12 -12
  79. package/dist/bundle/{process-MNZTQ2DA.js → process-MFC5VSPT.js} +1 -1
  80. package/dist/bundle/{program-QCHTCOCR.js → program-ZQ43ZYKZ.js} +485 -438
  81. package/dist/bundle/{prompt-BN6AKRWN.js → prompt-3LZAZNQ4.js} +2 -2
  82. package/dist/bundle/{recognize-I5TH7OEW.js → recognize-GYQMHFY2.js} +1 -1
  83. package/dist/bundle/{remote-R324LAUL.js → remote-P2MD5G64.js} +6 -6
  84. package/dist/bundle/{rerank-ZMGZCUJV.js → rerank-A5X6THV6.js} +4 -4
  85. package/dist/bundle/{serve-YUFZSNJC.js → serve-IEC3EUKS.js} +6 -6
  86. package/dist/bundle/{server-54ULZ3RA.js → server-3REPXFNI.js} +43 -41
  87. package/dist/bundle/server-E2QTFURI.js +67 -0
  88. package/dist/bundle/{sqlite-runtime-AYQTUQXM.js → sqlite-runtime-AOLQGC5J.js} +3 -3
  89. package/dist/bundle/{state-PHEBOYYI.js → state-D3P5IXXA.js} +3 -3
  90. package/dist/bundle/{store-4PHDSXEV.js → store-DIN6OY3K.js} +13 -13
  91. package/dist/bundle/{store-NGX3A5XT.js → store-MZCQXBVW.js} +15 -15
  92. package/dist/bundle/store-maintenance-command-UMVFI6M6.js +58 -0
  93. package/dist/commands/rules.d.ts.map +1 -1
  94. package/dist/commands/rules.js +73 -22
  95. package/dist/commands/rules.js.map +1 -1
  96. package/dist/mail/rules/apply.d.ts.map +1 -1
  97. package/dist/mail/rules/apply.js +1 -9
  98. package/dist/mail/rules/apply.js.map +1 -1
  99. package/dist/version.d.ts +1 -1
  100. package/dist/version.js +1 -1
  101. package/package.json +2 -2
  102. package/dist/bundle/chunk-IJONJTST.js +0 -76
  103. package/dist/bundle/first-screen-WCDR3QUR.js +0 -34
  104. package/dist/bundle/server-UD75CYDG.js +0 -68
  105. package/dist/bundle/store-maintenance-command-WHBIV6HC.js +0 -58
package/CHANGELOG.md CHANGED
@@ -2,6 +2,24 @@
2
2
 
3
3
  Notable changes to `@wirecat/mail-cli`. One section per version, newest first.
4
4
 
5
+ ## 0.31.0 — 14.11.2026
6
+
7
+ ### Fixed
8
+
9
+ - **`rules import --format gmail` takes `--yes` over MCP.** An agent could only preview the rules Gmail's filters
10
+ suggest: the tool offered only the command's own options, and `--yes` was the program's.
11
+ - **`rules export` answers over MCP.** The call failed with "the command printed its answer instead of handing it
12
+ over". An agent now gets the rules file as the answer; in a terminal and in a pipe it still prints the file itself,
13
+ so `rules export > rules.json` imports back.
14
+ - **`rules apply` no longer offers a run that read nothing to run again under the same time limit.** Over MCP the
15
+ step said to pass a longer `--timeout`, which an agent cannot, and was marked safe to run unasked, so a resumed run
16
+ could repeat with no progress. Over MCP it now tells the owner to give the server a longer `MAIL_TIMEOUT` or to run
17
+ it in a terminal; in a terminal the step adds `--timeout 30m` and waits for the owner.
18
+ - **`messages delete --rules` keeps mail from a sender the owner wrote to.** It judged senders from the stored mail,
19
+ where the owner's own mail from an IMAP Sent folder looked received. So an envelope from someone the owner
20
+ answered could be offered for Trash, and a preset rule could still catch that sender. cli-core now labels the
21
+ owner's stored mail Sent, and the cleanup's "replied" and "sent" reasons hold for IMAP mailboxes too.
22
+
5
23
  ## 0.30.0 — 14.11.2026
6
24
 
7
25
  ### Changed — may break callers
package/dist/bin/mail.js CHANGED
@@ -9,7 +9,7 @@ if (
9
9
  (words[0] === "--version" || words[0] === "-V") &&
10
10
  !Object.keys(process.env).some((key) => key.endsWith("_TEST_ARGV_LOG"))
11
11
  ) {
12
- process.stdout.write("0.30.0\n")
12
+ process.stdout.write("0.31.0\n")
13
13
  } else {
14
14
  // Before the bundle compiles: the bundle's own call comes after its chunks.
15
15
  module.enableCompileCache()
@@ -28,7 +28,7 @@ if (
28
28
  : next(specifier, context),
29
29
  })
30
30
  }
31
- const chunks = ["../bundle/all-profiles-523GLORJ.js","../bundle/anthropic-KKYGROQR.js","../bundle/app-server-RJR7U5NT.js","../bundle/bun-EBQHHLKR.js","../bundle/bun-sqlite-LTG2RRSL.js","../bundle/decode-4QRYNPD5.js","../bundle/dispatch-DSVN7MNG.js","../bundle/dist-HFUVURJG.js","../bundle/dist-MHJPECI4.js","../bundle/echarts-EJXBKCJT.js","../bundle/embed-46WZZMUQ.js","../bundle/embedder-56WHJKJE.js","../bundle/failure-COTPFUP4.js","../bundle/first-screen-WCDR3QUR.js","../bundle/instructions-Z7GVGWXS.js","../bundle/mcp-TDKGDB4V.js","../bundle/node-KM3CUABH.js","../bundle/node-L2PVEW3N.js","../bundle/node-TLZSIHIJ.js","../bundle/node-sqlite-RIGII7U7.js","../bundle/oauth-OWT6NYRS.js","../bundle/open-D3SPYL7O.js","../bundle/openai-IPTZDMFD.js","../bundle/process-MNZTQ2DA.js","../bundle/program-QCHTCOCR.js","../bundle/prompt-BN6AKRWN.js","../bundle/recognize-I5TH7OEW.js","../bundle/remote-R324LAUL.js","../bundle/rerank-ZMGZCUJV.js","../bundle/serve-YUFZSNJC.js","../bundle/server-54ULZ3RA.js","../bundle/server-UD75CYDG.js","../bundle/sqlite-runtime-AYQTUQXM.js","../bundle/state-PHEBOYYI.js","../bundle/store-4PHDSXEV.js","../bundle/store-NGX3A5XT.js","../bundle/store-maintenance-command-WHBIV6HC.js"]
31
+ const chunks = ["../bundle/all-profiles-XL62TNUO.js","../bundle/anthropic-3MSWVYCE.js","../bundle/app-server-RRNR5XFA.js","../bundle/bun-E3F3PEQQ.js","../bundle/bun-sqlite-UOFN77LO.js","../bundle/decode-FI2ISRNZ.js","../bundle/dispatch-DSVN7MNG.js","../bundle/dist-HFUVURJG.js","../bundle/dist-NLOOZJ64.js","../bundle/echarts-PMAJUJFE.js","../bundle/embed-OIMT6SAX.js","../bundle/embedder-Q5IF5WIM.js","../bundle/failure-COTPFUP4.js","../bundle/first-screen-ZPQLAAIS.js","../bundle/instructions-ZJGGGXOA.js","../bundle/mcp-TDKGDB4V.js","../bundle/node-DCSOHRD6.js","../bundle/node-KM3CUABH.js","../bundle/node-TLZSIHIJ.js","../bundle/node-sqlite-7F77K5JA.js","../bundle/oauth-LVPMEN6M.js","../bundle/open-XM5LWEN6.js","../bundle/openai-H2LCGK22.js","../bundle/process-MFC5VSPT.js","../bundle/program-ZQ43ZYKZ.js","../bundle/prompt-3LZAZNQ4.js","../bundle/recognize-GYQMHFY2.js","../bundle/remote-P2MD5G64.js","../bundle/rerank-A5X6THV6.js","../bundle/serve-IEC3EUKS.js","../bundle/server-3REPXFNI.js","../bundle/server-E2QTFURI.js","../bundle/sqlite-runtime-AOLQGC5J.js","../bundle/state-D3P5IXXA.js","../bundle/store-DIN6OY3K.js","../bundle/store-MZCQXBVW.js","../bundle/store-maintenance-command-UMVFI6M6.js"]
32
32
  if (((words) => words
33
33
  .filter((word) => !word.startsWith("-"))
34
34
  .slice(0, 2)
@@ -1,31 +1,34 @@
1
1
  import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
- import {
4
- answeredWire
5
- } from "./chunk-IJONJTST.js";
6
3
  import {
7
4
  CALLER_META_KEY,
8
5
  PROXY_CLIENT_NAME,
9
6
  StdioServerTransport,
7
+ answeredWire,
10
8
  callerOf,
11
9
  serveStdio
12
- } from "./chunk-SN5V6CKH.js";
10
+ } from "./chunk-OXHQNEXU.js";
13
11
  import {
14
12
  McpServer
15
13
  } from "./chunk-5D4AEUVA.js";
16
- import "./chunk-RLPWLGP6.js";
17
- import "./chunk-JKWNPRZD.js";
18
- import "./chunk-MVDP7VL6.js";
14
+ import "./chunk-TUXNILKR.js";
15
+ import "./chunk-5YRR52NH.js";
16
+ import "./chunk-H2QTUZ3C.js";
19
17
  import "./chunk-XWBPP2HX.js";
20
18
  import "./chunk-7MEVD5PI.js";
21
- import "./chunk-ECZSYLSL.js";
19
+ import {
20
+ errorObjectOf,
21
+ mcpErrorResult
22
+ } from "./chunk-ECZSYLSL.js";
22
23
  import "./chunk-Y5E2WNWB.js";
23
- import "./chunk-7KCBPAQS.js";
24
+ import {
25
+ CliError
26
+ } from "./chunk-7KCBPAQS.js";
24
27
  import {
25
28
  __name
26
29
  } from "./chunk-ZVVMGPBJ.js";
27
30
 
28
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/mcp/all-profiles.js
31
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/mcp/all-profiles.js
29
32
  import { spawn } from "node:child_process";
30
33
  import { randomUUID } from "node:crypto";
31
34
  var PROTOCOL = "2025-06-18";
@@ -181,10 +184,7 @@ var withProfile = /* @__PURE__ */ __name((tool, profiles, name, signedIn = () =>
181
184
  }
182
185
  };
183
186
  }, "withProfile");
184
- var refusal = /* @__PURE__ */ __name((text) => ({
185
- isError: true,
186
- content: [{ type: "text", text }]
187
- }), "refusal");
187
+ var refusal = /* @__PURE__ */ __name((code, text, details) => mcpErrorResult(errorObjectOf(new CliError(code, text, details), { effects: { remote: "none", local: "none" } })), "refusal");
188
188
  var allProfilesServer = /* @__PURE__ */ __name((options) => {
189
189
  const children = pool(options);
190
190
  let listed;
@@ -211,9 +211,9 @@ var allProfilesServer = /* @__PURE__ */ __name((options) => {
211
211
  const { name, arguments: given = {}, _meta } = request.params;
212
212
  const { profile, ...rest } = given;
213
213
  if (typeof profile !== "string" || !profiles.includes(profile))
214
- return refusal(`${name} needs "profile", one of: ${profiles.join(", ")}. If the owner did not say which account, ask.`);
214
+ return refusal("validation_error", `${name} needs "profile", one of: ${profiles.join(", ")}. If the owner did not say which account, ask.`);
215
215
  if (!signedIn(profile))
216
- return refusal(options.signIn?.(profile) ?? `profile ${profile} is not signed in.`);
216
+ return refusal("authentication_error", options.signIn?.(profile) ?? `profile ${profile} is not signed in.`);
217
217
  try {
218
218
  return await children.use(profile, (child) => (
219
219
  // Children are shared by every session, so each call names its own caller.
@@ -224,7 +224,7 @@ var allProfilesServer = /* @__PURE__ */ __name((options) => {
224
224
  })
225
225
  ));
226
226
  } catch (error) {
227
- return refusal(`profile ${profile}: ${error instanceof Error ? error.message : String(error)}`);
227
+ return refusal("outcome_unknown", `profile ${profile}: ${error instanceof Error ? error.message : String(error)}`);
228
228
  }
229
229
  });
230
230
  return server;
@@ -239,18 +239,8 @@ var serveAllProfilesOverStdio = /* @__PURE__ */ __name(async (options, io = {})
239
239
  transport: new StdioServerTransport(wire.input, wire.output),
240
240
  onerror: /* @__PURE__ */ __name((error) => options.note?.(`mcp: ${error.message}`), "onerror")
241
241
  });
242
- const ended = await new Promise((resolve) => {
243
- wire.ended.then(() => resolve("input"));
244
- if (own)
245
- io.signal?.addEventListener("abort", () => resolve("stopped"), { once: true });
246
- else {
247
- process.once("SIGINT", () => resolve("stopped"));
248
- process.once("SIGTERM", () => resolve("stopped"));
249
- }
250
- });
242
+ await wire.finished(own ? io.signal : void 0);
251
243
  try {
252
- if (ended === "input")
253
- await wire.answered();
254
244
  wire.release();
255
245
  await handle.close();
256
246
  } finally {
@@ -259,7 +249,7 @@ var serveAllProfilesOverStdio = /* @__PURE__ */ __name(async (options, io = {})
259
249
  }, "serveAllProfilesOverStdio");
260
250
  var serveAllProfilesOverHttp = /* @__PURE__ */ __name(async (options, http) => {
261
251
  const { build, close } = allProfilesServer(options);
262
- const { serveOverHttp } = await import("./serve-YUFZSNJC.js");
252
+ const { serveOverHttp } = await import("./serve-IEC3EUKS.js");
263
253
  const listening = await serveOverHttp(build, {
264
254
  ...http,
265
255
  appName: options.command,
@@ -8,7 +8,7 @@ import {
8
8
  checkedOptions,
9
9
  messagesFor,
10
10
  systemFor
11
- } from "./chunk-26H2HVJD.js";
11
+ } from "./chunk-E3IOR37T.js";
12
12
  import "./chunk-7MEVD5PI.js";
13
13
  import {
14
14
  array,
@@ -26,7 +26,7 @@ import {
26
26
  __name
27
27
  } from "./chunk-ZVVMGPBJ.js";
28
28
 
29
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/models/anthropic.js
29
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/models/anthropic.js
30
30
  var options = strictObject({
31
31
  stop_sequences: optional(array(string())),
32
32
  thinking: optional(strictObject({ type: picklist(["disabled", "adaptive"]) })),
@@ -3,47 +3,45 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  PER_RUN,
5
5
  envelope
6
- } from "./chunk-S2KKQA7O.js";
6
+ } from "./chunk-DCR3IWC7.js";
7
7
  import {
8
8
  mcpUrlOf
9
- } from "./chunk-WXQK5RO5.js";
10
- import "./chunk-HZUUVNWC.js";
9
+ } from "./chunk-BS6WYCNZ.js";
10
+ import "./chunk-P6CYVOL6.js";
11
11
  import {
12
12
  answered,
13
13
  failed,
14
14
  registerCommands,
15
15
  runCommandForAgent,
16
16
  toolsFromCommands
17
- } from "./chunk-NMN7RTX5.js";
17
+ } from "./chunk-D6D6JLXG.js";
18
18
  import {
19
19
  agentJson,
20
20
  skillResource
21
- } from "./chunk-E2SL7HIZ.js";
22
- import "./chunk-SNZFQ5SS.js";
21
+ } from "./chunk-NUN7DBR4.js";
22
+ import "./chunk-DZSS2IUK.js";
23
23
  import {
24
24
  appInstructions
25
- } from "./chunk-FL2TKSZY.js";
26
- import {
27
- answeredWire
28
- } from "./chunk-IJONJTST.js";
25
+ } from "./chunk-ITU6K7LU.js";
29
26
  import {
30
27
  StdioServerTransport,
28
+ answeredWire,
31
29
  serveStdio
32
- } from "./chunk-SN5V6CKH.js";
30
+ } from "./chunk-OXHQNEXU.js";
33
31
  import {
34
32
  McpServer
35
33
  } from "./chunk-5D4AEUVA.js";
36
34
  import {
37
35
  mcpHttpMarker
38
- } from "./chunk-K5FTIIYR.js";
39
- import "./chunk-A3YXTDTP.js";
40
- import "./chunk-DBI22GQL.js";
41
- import "./chunk-IIV43UIC.js";
42
- import "./chunk-GDFJKUMK.js";
43
- import "./chunk-26H2HVJD.js";
44
- import "./chunk-ONA3UI3R.js";
45
- import "./chunk-4F7WQHDO.js";
46
- import "./chunk-ZG2XBWFT.js";
36
+ } from "./chunk-T72DWT37.js";
37
+ import "./chunk-HZL3X4XR.js";
38
+ import "./chunk-NYQPKZWL.js";
39
+ import "./chunk-3CJ4C6BB.js";
40
+ import "./chunk-PIXFZZUZ.js";
41
+ import "./chunk-E3IOR37T.js";
42
+ import "./chunk-GXBNTKJW.js";
43
+ import "./chunk-HZCINHHS.js";
44
+ import "./chunk-3V6J7VPF.js";
47
45
  import {
48
46
  DEFAULT_OUTPUT_BYTES,
49
47
  changesAuthorityAt,
@@ -54,34 +52,34 @@ import {
54
52
  readOnlyLockOf,
55
53
  readsOverMcpAt,
56
54
  rootOf2 as rootOf
57
- } from "./chunk-B3NXAN6J.js";
58
- import "./chunk-GCSFZTRI.js";
59
- import "./chunk-RLPWLGP6.js";
60
- import "./chunk-BOGGQOVO.js";
55
+ } from "./chunk-BXMLIKUM.js";
56
+ import "./chunk-MS5XYEYW.js";
57
+ import "./chunk-TUXNILKR.js";
58
+ import "./chunk-SQA5JI7Q.js";
61
59
  import "./chunk-7C6FGWDH.js";
62
60
  import "./chunk-FIVFP53N.js";
63
- import "./chunk-MP572GP7.js";
64
- import "./chunk-U7VYDTXN.js";
65
- import "./chunk-ENKZEQ4Y.js";
66
- import "./chunk-QGIQ62KV.js";
67
- import "./chunk-KE2RQUQO.js";
68
- import "./chunk-YMJXGIYG.js";
69
- import "./chunk-2M7PPII5.js";
70
- import "./chunk-JKWNPRZD.js";
71
- import "./chunk-MVDP7VL6.js";
72
- import "./chunk-F22PLRCG.js";
73
- import "./chunk-SPWKGRTO.js";
74
- import "./chunk-WHS3CTTM.js";
75
- import "./chunk-Q23EEGPC.js";
76
- import "./chunk-KIZYN3NG.js";
77
- import "./chunk-CWAA73PJ.js";
78
- import "./chunk-3ECFSRLQ.js";
61
+ import "./chunk-4ME2NHNJ.js";
62
+ import "./chunk-4BW5JACS.js";
63
+ import "./chunk-BKRIIZPV.js";
64
+ import "./chunk-6UOUDIXL.js";
65
+ import "./chunk-7E7YXQ52.js";
66
+ import "./chunk-FYP2M6IT.js";
67
+ import "./chunk-KPFB2VUY.js";
68
+ import "./chunk-5YRR52NH.js";
69
+ import "./chunk-H2QTUZ3C.js";
70
+ import "./chunk-EV5SR3OC.js";
71
+ import "./chunk-FRXDSR45.js";
72
+ import "./chunk-PZL7DHVJ.js";
73
+ import "./chunk-DWBY7DMF.js";
74
+ import "./chunk-GZLCZU5B.js";
75
+ import "./chunk-QANXOKYQ.js";
76
+ import "./chunk-LGDJDD5J.js";
79
77
  import "./chunk-M4OP5ASJ.js";
80
78
  import "./chunk-XWBPP2HX.js";
81
79
  import "./chunk-D72URWJE.js";
82
- import "./chunk-54JKDFOV.js";
83
- import "./chunk-TIMBTN5Z.js";
84
- import "./chunk-NV2REPY6.js";
80
+ import "./chunk-BNP7WLDQ.js";
81
+ import "./chunk-NV3WPD3B.js";
82
+ import "./chunk-WZGFC7D5.js";
85
83
  import "./chunk-7MEVD5PI.js";
86
84
  import {
87
85
  mcpErrorResult
@@ -90,12 +88,12 @@ import "./chunk-Y5E2WNWB.js";
90
88
  import {
91
89
  CliError
92
90
  } from "./chunk-7KCBPAQS.js";
93
- import "./chunk-XGEPAJBY.js";
91
+ import "./chunk-DPDS6IZJ.js";
94
92
  import {
95
93
  __name
96
94
  } from "./chunk-ZVVMGPBJ.js";
97
95
 
98
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/mcp/app-server.js
96
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/mcp/app-server.js
99
97
  var EXCLUDED = [["mcp"]];
100
98
  var aliasesOf = /* @__PURE__ */ __name((root, path) => {
101
99
  let at = root;
@@ -205,27 +203,14 @@ var serveAppOverStdio = /* @__PURE__ */ __name(async (command, context, options)
205
203
  transport: new StdioServerTransport(wire.input, wire.output),
206
204
  onerror: /* @__PURE__ */ __name((error) => context.renderer.note(`mcp: ${error.message}`), "onerror")
207
205
  });
208
- const ended = await new Promise((resolve) => {
209
- wire.ended.then(() => resolve("input"));
210
- if (own) {
211
- if (signal?.aborted)
212
- resolve("stopped");
213
- else
214
- signal?.addEventListener("abort", () => resolve("stopped"), { once: true });
215
- } else {
216
- process.once("SIGINT", () => resolve("stopped"));
217
- process.once("SIGTERM", () => resolve("stopped"));
218
- }
219
- });
220
- if (ended === "input")
221
- await wire.answered();
206
+ await wire.finished(own ? signal : void 0);
222
207
  wire.release();
223
208
  await handle.close();
224
209
  }, "serveAppOverStdio");
225
210
  var serveAppOverHttp = /* @__PURE__ */ __name(async (command, context, options, http) => {
226
211
  const { app } = options;
227
212
  const { build } = createAppServer(command, context, options);
228
- const { serveOverHttp } = await import("./serve-YUFZSNJC.js");
213
+ const { serveOverHttp } = await import("./serve-IEC3EUKS.js");
229
214
  const listening = await serveOverHttp(build, {
230
215
  ...http,
231
216
  appName: app.command,
@@ -18,12 +18,12 @@ import {
18
18
  jitCompatCheck,
19
19
  refineSqliteCodecs,
20
20
  sql
21
- } from "./chunk-XGEPAJBY.js";
21
+ } from "./chunk-DPDS6IZJ.js";
22
22
  import {
23
23
  __name
24
24
  } from "./chunk-ZVVMGPBJ.js";
25
25
 
26
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/bun.js
26
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/bun.js
27
27
  import { Database } from "bun:sqlite";
28
28
  var bunSQLiteCodecs = refineSqliteCodecs({
29
29
  "integer:boolean": { normalize: booleanFromInteger },
@@ -3,10 +3,10 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  loadVectorExtension,
5
5
  vectorExtension
6
- } from "./chunk-5X5A3CAX.js";
6
+ } from "./chunk-EMVLCION.js";
7
7
  import {
8
8
  refuseOwnerStoreInTests
9
- } from "./chunk-54JKDFOV.js";
9
+ } from "./chunk-BNP7WLDQ.js";
10
10
  import "./chunk-7MEVD5PI.js";
11
11
  import "./chunk-ECZSYLSL.js";
12
12
  import {
@@ -17,7 +17,7 @@ import {
17
17
  __name
18
18
  } from "./chunk-ZVVMGPBJ.js";
19
19
 
20
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/store/drivers/bun-sqlite.js
20
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/store/drivers/bun-sqlite.js
21
21
  var customised = false;
22
22
  var ownLibrary = /* @__PURE__ */ __name(async () => {
23
23
  try {
@@ -7,7 +7,7 @@ import {
7
7
  __name
8
8
  } from "./chunk-ZVVMGPBJ.js";
9
9
 
10
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/files/ordinary-file.js
10
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/files/ordinary-file.js
11
11
  import { constants } from "node:fs";
12
12
  import { lstat, open } from "node:fs/promises";
13
13
  var deviceOf = /* @__PURE__ */ __name((dev) => process.platform === "win32" ? BigInt.asUintN(32, dev) : dev, "deviceOf");
@@ -73,7 +73,7 @@ var syncDirectory = /* @__PURE__ */ __name(async (path) => {
73
73
  }
74
74
  }, "syncDirectory");
75
75
 
76
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/files/atomic-write.js
76
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/files/atomic-write.js
77
77
  import { randomUUID } from "node:crypto";
78
78
  import { constants as constants2 } from "node:fs";
79
79
  import { link, open as open2, realpath, rename, unlink } from "node:fs/promises";
@@ -111,7 +111,7 @@ var writeFileAtomic = /* @__PURE__ */ __name(async (path, content, { mode = 384,
111
111
  }
112
112
  }, "writeFileAtomic");
113
113
 
114
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/files/bounded-utf8.js
114
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/files/bounded-utf8.js
115
115
  var readBoundedUtf8File = /* @__PURE__ */ __name(async (path, { maxBytes }) => {
116
116
  if (!Number.isSafeInteger(maxBytes) || maxBytes < 1 || maxBytes > 16 * 1024 * 1024)
117
117
  throw new CliError("validation_error", "file maxBytes takes 1\u201316777216 bytes");
@@ -140,21 +140,21 @@ var readBoundedUtf8File = /* @__PURE__ */ __name(async (path, { maxBytes }) => {
140
140
  }
141
141
  }, "readBoundedUtf8File");
142
142
 
143
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/files/lock.js
143
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/files/lock.js
144
144
  import { mkdir as mkdir2 } from "node:fs/promises";
145
145
  import { basename as basename2, dirname as dirname2 } from "node:path";
146
146
 
147
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/files/native-writer-lease.js
147
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/files/native-writer-lease.js
148
148
  import { randomUUID as randomUUID2 } from "node:crypto";
149
149
  import { lstat as lstat3, mkdir, open as open3, realpath as realpath3, rmdir as rmdir2, unlink as unlink4 } from "node:fs/promises";
150
150
  import { hostname as hostname2 } from "node:os";
151
151
  import { join as join3 } from "node:path";
152
152
 
153
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/files/native-lease-inspection.js
153
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/files/native-lease-inspection.js
154
154
  import { lstat as lstat2, readdir, realpath as realpath2, unlink as unlink2 } from "node:fs/promises";
155
155
  import { join as join2 } from "node:path";
156
156
 
157
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/files/native-lease-owner.js
157
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/files/native-lease-owner.js
158
158
  import { hostname } from "node:os";
159
159
  var missingLeaseFile = /* @__PURE__ */ __name((error) => typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT", "missingLeaseFile");
160
160
  var readLeaseOwner = /* @__PURE__ */ __name(async (path, name, signal) => {
@@ -199,7 +199,7 @@ var leaseOwnerStatus = /* @__PURE__ */ __name((owner) => {
199
199
  }
200
200
  }, "leaseOwnerStatus");
201
201
 
202
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/files/native-lease-inspection.js
202
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/files/native-lease-inspection.js
203
203
  var leaseInspection = /* @__PURE__ */ __name((markerDirectory) => {
204
204
  const inspect = /* @__PURE__ */ __name(async (destination, options = {}) => {
205
205
  options.signal?.throwIfAborted();
@@ -258,7 +258,7 @@ var leaseInspection = /* @__PURE__ */ __name((markerDirectory) => {
258
258
  return { inspect, recover };
259
259
  }, "leaseInspection");
260
260
 
261
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/files/native-lease-release.js
261
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/files/native-lease-release.js
262
262
  import { rmdir, unlink as unlink3 } from "node:fs/promises";
263
263
  var ownedNativeLease = /* @__PURE__ */ __name((path, name, owner, folder, identity) => {
264
264
  let releasing;
@@ -283,7 +283,7 @@ var ownedNativeLease = /* @__PURE__ */ __name((path, name, owner, folder, identi
283
283
  };
284
284
  }, "ownedNativeLease");
285
285
 
286
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/files/native-writer-lease.js
286
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/files/native-writer-lease.js
287
287
  var validName = /* @__PURE__ */ __name((value) => typeof value === "string" && value.length > 0 && value !== "." && value !== ".." && !/[\\/\0:]/.test(value), "validName");
288
288
  var nativeWriterLeaseStore = /* @__PURE__ */ __name((layout) => {
289
289
  const { markerDirectory, legacyMarker } = layout;
@@ -354,7 +354,7 @@ var nativeWriterLeaseStore = /* @__PURE__ */ __name((layout) => {
354
354
  };
355
355
  }, "nativeWriterLeaseStore");
356
356
 
357
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/files/lock.js
357
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/files/lock.js
358
358
  var acquireLock = /* @__PURE__ */ __name(async (path, { signal } = {}) => {
359
359
  const folder = dirname2(path);
360
360
  await mkdir2(folder, { recursive: true, mode: 448 });
@@ -369,7 +369,7 @@ var acquireLock = /* @__PURE__ */ __name(async (path, { signal } = {}) => {
369
369
  });
370
370
  }, "acquireLock");
371
371
 
372
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/files/safe-name.js
372
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/files/safe-name.js
373
373
  import { basename as basename3 } from "node:path";
374
374
  var safeName = /* @__PURE__ */ __name((name, platform = process.platform) => {
375
375
  let plain = name === void 0 ? "" : basename3(name.replaceAll("\\", "/")).replace(/[\p{Cc}​-‏‪-‮⁦-⁩]/gu, "").replace(/^\.+/, "");
@@ -6,10 +6,10 @@ import {
6
6
  answerSchema,
7
7
  describeOptions,
8
8
  metaOf
9
- } from "./chunk-B3NXAN6J.js";
9
+ } from "./chunk-BXMLIKUM.js";
10
10
  import {
11
11
  keyForCommand
12
- } from "./chunk-GCSFZTRI.js";
12
+ } from "./chunk-MS5XYEYW.js";
13
13
  import {
14
14
  jsonSchemaOf
15
15
  } from "./chunk-ECZSYLSL.js";
@@ -20,7 +20,7 @@ import {
20
20
  __name
21
21
  } from "./chunk-ZVVMGPBJ.js";
22
22
 
23
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/cli/command-contract.js
23
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/cli/command-contract.js
24
24
  var SCHEMA_DIALECT = "https://json-schema.org/draft/2020-12/schema";
25
25
  var outputOf = /* @__PURE__ */ __name((command) => {
26
26
  const entity = answerEntitySchema(command);
@@ -23,20 +23,20 @@ import {
23
23
  tagMemberIds,
24
24
  thingOf,
25
25
  write
26
- } from "./chunk-QGIQ62KV.js";
26
+ } from "./chunk-6UOUDIXL.js";
27
27
  import {
28
28
  ADDED_PROVIDER,
29
29
  filesAccountSql,
30
30
  folderProviderOf,
31
31
  folderProviderSql,
32
32
  isDocumentAccountProvider
33
- } from "./chunk-2M7PPII5.js";
33
+ } from "./chunk-KPFB2VUY.js";
34
34
  import {
35
35
  damagedFile
36
- } from "./chunk-JKWNPRZD.js";
36
+ } from "./chunk-5YRR52NH.js";
37
37
  import {
38
38
  fold
39
- } from "./chunk-SPWKGRTO.js";
39
+ } from "./chunk-FRXDSR45.js";
40
40
  import {
41
41
  CliError
42
42
  } from "./chunk-7KCBPAQS.js";
@@ -44,7 +44,7 @@ import {
44
44
  __name
45
45
  } from "./chunk-ZVVMGPBJ.js";
46
46
 
47
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/store/damage.js
47
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/store/damage.js
48
48
  var DERIVED = /* @__PURE__ */ new Set(["mentions", "involvements", "embeddings"]);
49
49
  var named = /* @__PURE__ */ __name((tables) => tables.length <= 5 ? tables.join(", ") : `${tables.slice(0, 5).join(", ")} and ${tables.length - 5} more`, "named");
50
50
  var isDerivedTable = /* @__PURE__ */ __name((table, searchIndexes) => DERIVED.has(table) || table.startsWith("vector_index_") || searchIndexes.some((index) => table === index || table.startsWith(`${index}_`)), "isDerivedTable");
@@ -147,11 +147,11 @@ var storeDamageReport = /* @__PURE__ */ __name(({ health, command, mark = null,
147
147
  };
148
148
  }, "storeDamageReport");
149
149
 
150
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/store/document-transfer/index.js
150
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/store/document-transfer/index.js
151
151
  import { realpathSync, statSync } from "node:fs";
152
152
  import { resolve } from "node:path";
153
153
 
154
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/people.js
154
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/people.js
155
155
  var planPeople = /* @__PURE__ */ __name((database, snapshot, mappings, bindings, conflicts) => {
156
156
  const creatable = /* @__PURE__ */ new Set();
157
157
  let people = 0, identities = 0;
@@ -214,11 +214,11 @@ var copyPeople = /* @__PURE__ */ __name((database, snapshot, mappings, now) => {
214
214
  }
215
215
  }, "copyPeople");
216
216
 
217
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/store/document-transfer/digest.js
217
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/store/document-transfer/digest.js
218
218
  import { createHash } from "node:crypto";
219
219
  var digest = /* @__PURE__ */ __name((value) => createHash("sha256").update(JSON.stringify(value)).digest("hex"), "digest");
220
220
 
221
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/collection.js
221
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/collection.js
222
222
  var documentsKeyOf = /* @__PURE__ */ __name((collection) => {
223
223
  const colon = collection.indexOf(":");
224
224
  const provider = collection.slice(0, colon);
@@ -262,7 +262,7 @@ var currentCollection = /* @__PURE__ */ __name((row) => {
262
262
  };
263
263
  }, "currentCollection");
264
264
 
265
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/plan.js
265
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/plan.js
266
266
  var planTransfer = /* @__PURE__ */ __name((database, snapshot, sourceKey, bindings) => {
267
267
  const mappings = /* @__PURE__ */ new Map();
268
268
  const missing = /* @__PURE__ */ new Set(), conflicts = /* @__PURE__ */ new Set();
@@ -429,7 +429,7 @@ var planTransfer = /* @__PURE__ */ __name((database, snapshot, sourceKey, bindin
429
429
  };
430
430
  }, "planTransfer");
431
431
 
432
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/snapshot.js
432
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/snapshot.js
433
433
  var TRANSFER_TABLES = { document: "documents", note: "notes", memory: "memories", fact: "facts" };
434
434
  var MAX_ENTITIES = 1e3;
435
435
  var MAX_AUXILIARY = 1e4;
@@ -591,7 +591,7 @@ var transferSnapshot = /* @__PURE__ */ __name((database, collection) => read(dat
591
591
  };
592
592
  }), "transferSnapshot");
593
593
 
594
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/apply.js
594
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/apply.js
595
595
  var providerHere = /* @__PURE__ */ __name(({ provider, name, settings }) => {
596
596
  if (provider !== "folder" || String(name ?? "").startsWith("google-drive:"))
597
597
  return provider ?? null;
@@ -763,7 +763,7 @@ var remapEntity = /* @__PURE__ */ __name((database, entity, id, mappings) => {
763
763
  database.prepare(`UPDATE ${TRANSFER_TABLES[entity.kind]} SET ${columns.join(",")} WHERE id=?`).run(...values, id);
764
764
  }, "remapEntity");
765
765
 
766
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/store/document-transfer/index.js
766
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/store/document-transfer/index.js
767
767
  var locations = /* @__PURE__ */ __name((options) => {
768
768
  for (const value of [options.source, options.destination, options.collection])
769
769
  if (typeof value !== "string" || !value.trim())
@@ -865,7 +865,7 @@ var applyWith = /* @__PURE__ */ __name(async (location, options) => {
865
865
  }
866
866
  }, "applyWith");
867
867
 
868
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/store/health.js
868
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/store/health.js
869
869
  import { existsSync, statSync as statSync2 } from "node:fs";
870
870
  var JSON_COLUMNS = {
871
871
  accounts: ["settings"],
@@ -1007,7 +1007,7 @@ var storeHealth = /* @__PURE__ */ __name(async (path, { deep = false } = {}) =>
1007
1007
  }
1008
1008
  }, "storeHealth");
1009
1009
 
1010
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/store/project-transfer/preview.js
1010
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/store/project-transfer/preview.js
1011
1011
  var previewProjectAnnotationSnapshot = /* @__PURE__ */ __name(async (options) => {
1012
1012
  if (!options || typeof options !== "object" || Array.isArray(options))
1013
1013
  throw new CliError("validation_error", "project preview options are required");
@@ -1033,7 +1033,7 @@ var previewProjectAnnotationSnapshot = /* @__PURE__ */ __name(async (options) =>
1033
1033
  });
1034
1034
  }, "previewProjectAnnotationSnapshot");
1035
1035
 
1036
- // node_modules/.pnpm/@wirecat+cli-core@0.659.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_2476fb045fb1ee08e5e46f4aab8c07fa/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot.js
1036
+ // node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot.js
1037
1037
  var snapshotProjectAnnotations = /* @__PURE__ */ __name(async (options) => {
1038
1038
  if (!options || typeof options !== "object" || Array.isArray(options))
1039
1039
  throw new CliError("validation_error", "snapshot options are required");