@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
package/CHANGELOG.md CHANGED
@@ -2,6 +2,30 @@
2
2
 
3
3
  Notable changes to `@wirecat/mail-cli`. One section per version, newest first.
4
4
 
5
+ ## 0.22.0 — 08.11.2026
6
+
7
+ ### Added
8
+
9
+ - **`session start --method oauth` signs a new Gmail profile in with WireCat's Google app.** No Google Cloud client of
10
+ your own is needed; `--client-file` still names yours. Google may show an "unverified app" screen until it finishes
11
+ its review. `--method app-password` asks for the app password, the default for Gmail. `--method` sets only a new
12
+ profile's way; an existing one is switched with `config set auth`.
13
+ - **`mail <profile> account remove --keep-data|--delete-data`** removes a profile from this computer: it signs out
14
+ (a Gmail OAuth sign-in is also revoked at Google, which can end other sign-ins of the same Google app, as
15
+ `session end --revoke` does), deletes the app password or sign-in from the keyring, forgets the profile in the settings and its sign-in record, and, with `--delete-data`,
16
+ deletes its stored mail and its change logs. `--keep-data` leaves the mail searchable. The old Himalaya keyring
17
+ entry is not touched, and other profiles stay as they are.
18
+
19
+ ### Fixed
20
+
21
+ - **`account remove` no longer revokes a Gmail grant that another profile uses.** Google ends a grant for the whole
22
+ Google account and app, so when another profile signs in to the same address (any letter case) with Google OAuth,
23
+ the revoke is skipped: the answer gives `revoked: false` and says "Google access kept: profile <name> uses the same
24
+ address".
25
+ - **The Gmail hints point to the app-password page and call the password 16 letters.** `session start` now links
26
+ <https://myaccount.google.com/apppasswords> instead of the help article (kept under "Sources"), and says
27
+ "16-letter password", since Gmail app passwords are letters.
28
+
5
29
  ## 0.21.0 — 08.11.2026
6
30
 
7
31
  ### Added
package/README.md CHANGED
@@ -110,7 +110,8 @@ as data, never as instructions.
110
110
  A profile is a name you choose for one mailbox and the first word of every command that uses it: `mail personal sync`.
111
111
  `session start` creates the profile and signs it in, `session status` says where the password comes from (`--check`
112
112
  logs in to prove it works), `session end` forgets the password and keeps the mail, and `mail session list` lists the
113
- profiles.
113
+ profiles. `account remove --keep-data` or `--delete-data` signs a profile out and forgets it on this computer, and
114
+ `--delete-data` also deletes its stored mail.
114
115
 
115
116
  `mail` signs in with an app password, a password made only for this program, which the OS keyring keeps. For a domain
116
117
  it does not know, `session start` looks for the server through the MX record, Thunderbird's ISPDB and the domain's
@@ -137,8 +138,9 @@ mail personal config show # every setting and where i
137
138
  `folders delete --allow-dangerous` of a folder that holds mail (outside Gmail, its mail is gone).
138
139
  Undoing `messages copy` outside Gmail removes the copy for good, never the original.
139
140
  - Text and headers only: the text of attachments is stored, not the files, nor the original message.
140
- - Gmail over OAuth signs in with WireCat's Google app. Making a shared Google app public for mail is complex, so
141
- Google may refuse it; then use a Google app of your own ([steps](https://github.com/WireCatLabs/mail-cli/blob/main/docs/oauth-google.md)).
141
+ - Gmail over OAuth (`session start --method oauth`) signs in with WireCat's Google app. Until Google finishes its review,
142
+ Google may show an "unverified app" screen and lets 100 new users in, shared with `gcal` and `drive`; then use a
143
+ Google app of your own ([steps](https://github.com/WireCatLabs/mail-cli/blob/main/docs/oauth-google.md)).
142
144
  - Gmail caps IMAP downloads at 2,500 MB a day; a new Yandex app password can take 2 to 3 hours to work.
143
145
  - Search reads the store and asks the mail server for mail `sync` has not read yet; `--backend archive` keeps to
144
146
  the store.
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.21.0\n")
12
+ process.stdout.write("0.23.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-DTUWUCQQ.js","../bundle/anthropic-YJAEQSNT.js","../bundle/app-server-3ZXSTBA3.js","../bundle/bun-34VBM7C5.js","../bundle/bun-sqlite-GCT7ROCK.js","../bundle/decode-BIOOL5E4.js","../bundle/dispatch-R5OF2FVZ.js","../bundle/dist-HFUVURJG.js","../bundle/dist-TJVIRLE5.js","../bundle/echarts-ECPGMKXO.js","../bundle/embed-F7JFSLHN.js","../bundle/embedder-U4G74HV3.js","../bundle/failure-WYKVF6RH.js","../bundle/first-screen-W6RWTAU7.js","../bundle/instructions-WNCGZ7OJ.js","../bundle/mcp-CFVG2OUS.js","../bundle/node-KM3CUABH.js","../bundle/node-TLZSIHIJ.js","../bundle/node-UIRGGMGT.js","../bundle/node-sqlite-4ZM7OPRF.js","../bundle/oauth-5RAJZPBW.js","../bundle/open-7ORCHOAI.js","../bundle/openai-XSJNXJA7.js","../bundle/process-ZLO72UVZ.js","../bundle/program-LBLGFZWU.js","../bundle/prompt-IDUPCUGM.js","../bundle/recognize-OS3EZKIM.js","../bundle/remote-PF4LZR65.js","../bundle/rerank-CQNZF3JI.js","../bundle/serve-Y2DDLGBT.js","../bundle/server-I3IALQMC.js","../bundle/server-TVRT7YEY.js","../bundle/sqlite-runtime-5343C3OE.js","../bundle/state-4GBTMPIV.js","../bundle/store-OLBLTQPT.js","../bundle/store-QA6QJ5BB.js","../bundle/store-maintenance-command-LB6CMGP4.js"]
31
+ const chunks = ["../bundle/all-profiles-CI32WFEV.js","../bundle/anthropic-ICSOMJIN.js","../bundle/app-server-3F4ZB7DH.js","../bundle/bun-7AHNFZMZ.js","../bundle/bun-sqlite-UIWRS4HI.js","../bundle/decode-BJXABRAN.js","../bundle/dispatch-G4CYFWQ2.js","../bundle/dist-HFUVURJG.js","../bundle/dist-LLEA6R4V.js","../bundle/echarts-YPTKBOZV.js","../bundle/embed-DMROTI5M.js","../bundle/embedder-DWMHXCHJ.js","../bundle/failure-FFPK2WYB.js","../bundle/first-screen-B6LF5464.js","../bundle/instructions-OGKMROLD.js","../bundle/mcp-CFVG2OUS.js","../bundle/node-HIKYE546.js","../bundle/node-KM3CUABH.js","../bundle/node-TLZSIHIJ.js","../bundle/node-sqlite-3GJAG7VO.js","../bundle/oauth-H3DB6IHI.js","../bundle/open-DJ2PRG74.js","../bundle/openai-MDBRYB55.js","../bundle/process-4LBD72JH.js","../bundle/program-F6WK6RX4.js","../bundle/prompt-UNPUG6SO.js","../bundle/recognize-DMIO4PDB.js","../bundle/remote-24HJA72D.js","../bundle/rerank-PTNCHHIU.js","../bundle/serve-T6JHM2YD.js","../bundle/server-BWEYRUR3.js","../bundle/server-VUQNR5ZD.js","../bundle/sqlite-runtime-ZJ4EH5ZM.js","../bundle/state-KSN4OFYW.js","../bundle/store-GVBW2ZFK.js","../bundle/store-OIEZJEA7.js","../bundle/store-maintenance-command-KJ54HLUQ.js"]
32
32
  if (((words) => words
33
33
  .filter((word) => !word.startsWith("-"))
34
34
  .slice(0, 2)
@@ -2,30 +2,30 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  answeredWire
5
- } from "./chunk-QE72KTS7.js";
5
+ } from "./chunk-7SIWMF77.js";
6
6
  import {
7
7
  CALLER_META_KEY,
8
8
  PROXY_CLIENT_NAME,
9
9
  StdioServerTransport,
10
10
  callerOf,
11
11
  serveStdio
12
- } from "./chunk-FTI73RLC.js";
12
+ } from "./chunk-HGV7DSSA.js";
13
13
  import {
14
14
  McpServer
15
15
  } from "./chunk-5D4AEUVA.js";
16
- import "./chunk-B74SOC4R.js";
17
- import "./chunk-SYEICLTR.js";
18
- import "./chunk-4FWJNIPH.js";
16
+ import "./chunk-ZYHBMDNU.js";
17
+ import "./chunk-6FSLEARF.js";
18
+ import "./chunk-ELGEHZK2.js";
19
19
  import "./chunk-QZLK2ISN.js";
20
- import "./chunk-BMV56JCL.js";
21
- import "./chunk-BHNBWFT5.js";
20
+ import "./chunk-LLYVBO3R.js";
21
+ import "./chunk-GOMJNH56.js";
22
22
  import "./chunk-Y5E2WNWB.js";
23
23
  import "./chunk-DALBYUPC.js";
24
24
  import {
25
25
  __name
26
26
  } from "./chunk-ZVVMGPBJ.js";
27
27
 
28
- // 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/all-profiles.js
28
+ // 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/all-profiles.js
29
29
  import { spawn } from "node:child_process";
30
30
  import { randomUUID } from "node:crypto";
31
31
  var PROTOCOL = "2025-06-18";
@@ -259,7 +259,7 @@ var serveAllProfilesOverStdio = /* @__PURE__ */ __name(async (options, io = {})
259
259
  }, "serveAllProfilesOverStdio");
260
260
  var serveAllProfilesOverHttp = /* @__PURE__ */ __name(async (options, http) => {
261
261
  const { build, close } = allProfilesServer(options);
262
- const { serveOverHttp } = await import("./serve-Y2DDLGBT.js");
262
+ const { serveOverHttp } = await import("./serve-T6JHM2YD.js");
263
263
  const listening = await serveOverHttp(build, {
264
264
  ...http,
265
265
  appName: options.command,
@@ -4,26 +4,24 @@ import {
4
4
  Anthropic
5
5
  } from "./chunk-XQUUANA2.js";
6
6
  import {
7
- checkedOptions
8
- } from "./chunk-QPRXTLMD.js";
9
- import {
7
+ checkedOptions,
10
8
  messagesFor,
11
9
  systemFor
12
- } from "./chunk-TCCN5TON.js";
13
- import "./chunk-BMV56JCL.js";
10
+ } from "./chunk-NEDYKKJJ.js";
11
+ import "./chunk-LLYVBO3R.js";
14
12
  import {
15
13
  array,
16
14
  optional,
17
15
  strictObject,
18
16
  string
19
- } from "./chunk-BHNBWFT5.js";
17
+ } from "./chunk-GOMJNH56.js";
20
18
  import "./chunk-Y5E2WNWB.js";
21
19
  import "./chunk-DALBYUPC.js";
22
20
  import {
23
21
  __name
24
22
  } from "./chunk-ZVVMGPBJ.js";
25
23
 
26
- // 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/models/anthropic.js
24
+ // 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/models/anthropic.js
27
25
  var options = strictObject({
28
26
  stop_sequences: optional(array(string()))
29
27
  });
@@ -63,6 +61,10 @@ var anthropic = {
63
61
  throw new Error("incomplete response");
64
62
  return {
65
63
  text: response.content.filter((block) => block.type === "text").map((block) => block.text).join(""),
64
+ usage: {
65
+ input: response.usage.input_tokens + (response.usage.cache_creation_input_tokens ?? 0) + (response.usage.cache_read_input_tokens ?? 0),
66
+ output: response.usage.output_tokens
67
+ },
66
68
  tokens: response.usage.input_tokens + response.usage.output_tokens + (response.usage.cache_creation_input_tokens ?? 0) + (response.usage.cache_read_input_tokens ?? 0)
67
69
  };
68
70
  }, "complete")
@@ -3,42 +3,46 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  PER_RUN,
5
5
  envelope
6
- } from "./chunk-2PPEDB67.js";
6
+ } from "./chunk-JDKC7EXM.js";
7
7
  import {
8
8
  answered,
9
9
  failed,
10
10
  registerCommands,
11
11
  runCommandForAgent,
12
12
  toolsFromCommands
13
- } from "./chunk-P6FT6YYT.js";
13
+ } from "./chunk-R4RAWEMV.js";
14
14
  import {
15
15
  mcpUrlOf
16
- } from "./chunk-HN43G27G.js";
16
+ } from "./chunk-4PNIZUEC.js";
17
17
  import {
18
18
  agentJson,
19
19
  skillResource
20
- } from "./chunk-WBAA2X3E.js";
21
- import "./chunk-7XLOWYGD.js";
20
+ } from "./chunk-5J4WNTTM.js";
21
+ import "./chunk-S2U5BXWS.js";
22
22
  import {
23
23
  appInstructions
24
- } from "./chunk-P2QJA7S5.js";
24
+ } from "./chunk-OMW37FXK.js";
25
25
  import {
26
26
  answeredWire
27
- } from "./chunk-QE72KTS7.js";
27
+ } from "./chunk-7SIWMF77.js";
28
28
  import {
29
29
  StdioServerTransport,
30
30
  serveStdio
31
- } from "./chunk-FTI73RLC.js";
31
+ } from "./chunk-HGV7DSSA.js";
32
32
  import {
33
33
  McpServer
34
34
  } from "./chunk-5D4AEUVA.js";
35
- import "./chunk-72N26BQM.js";
36
- import "./chunk-QTMVGOSF.js";
37
- import "./chunk-NOVBK4SY.js";
38
- import "./chunk-SFC46MP2.js";
39
- import "./chunk-TCCN5TON.js";
40
- import "./chunk-MDDB7M7Z.js";
41
- import "./chunk-ZZSHGCRC.js";
35
+ import {
36
+ mcpHttpMarker
37
+ } from "./chunk-UA4BOLIY.js";
38
+ import "./chunk-CNYQ3TTZ.js";
39
+ import "./chunk-7DFWXIY5.js";
40
+ import "./chunk-2BAO4T4Z.js";
41
+ import "./chunk-AFPETMXZ.js";
42
+ import "./chunk-NEDYKKJJ.js";
43
+ import "./chunk-FIZWQTUC.js";
44
+ import "./chunk-IMIY7HQB.js";
45
+ import "./chunk-WQRX4RQS.js";
42
46
  import {
43
47
  DEFAULT_OUTPUT_BYTES,
44
48
  changesAuthorityAt,
@@ -48,50 +52,46 @@ import {
48
52
  readOnlyLockOf,
49
53
  readsOverMcpAt,
50
54
  rootOf2 as rootOf
51
- } from "./chunk-HSBGNVEL.js";
52
- import "./chunk-HRRSTIGP.js";
53
- import "./chunk-B74SOC4R.js";
54
- import "./chunk-UWL2IOII.js";
55
+ } from "./chunk-4YTX5YAU.js";
56
+ import "./chunk-B6GITVDX.js";
57
+ import "./chunk-ZYHBMDNU.js";
58
+ import "./chunk-JO4BJYVE.js";
59
+ import "./chunk-3QVGB2CI.js";
55
60
  import "./chunk-3DQYO7FB.js";
56
- import "./chunk-VDUGE6TH.js";
57
- import {
58
- mcpHttpMarker
59
- } from "./chunk-SCIC2CJS.js";
60
- import "./chunk-VQZCIDSO.js";
61
- import "./chunk-T3DTYJTG.js";
62
- import "./chunk-RY7PBP4F.js";
63
- import "./chunk-566MEXK5.js";
64
- import "./chunk-KMQAHDBM.js";
65
- import "./chunk-LTXYJAJK.js";
66
- import "./chunk-HJ2CXDKJ.js";
67
- import "./chunk-I2SDXWLR.js";
68
- import "./chunk-SYEICLTR.js";
69
- import "./chunk-4FWJNIPH.js";
70
- import "./chunk-VINSQR4X.js";
71
- import "./chunk-3HDQVTND.js";
72
- import "./chunk-OKO2Q6H6.js";
73
- import "./chunk-Z7N4MGOQ.js";
74
- import "./chunk-O3M2S62X.js";
75
- import "./chunk-RPCKBXKN.js";
61
+ import "./chunk-FHCOGR7S.js";
62
+ import "./chunk-HN6PB7F5.js";
63
+ import "./chunk-SCH3NC5X.js";
64
+ import "./chunk-FVKZ55I2.js";
65
+ import "./chunk-5AQ4S4TZ.js";
66
+ import "./chunk-B4MWHI2V.js";
67
+ import "./chunk-TEL2OMS5.js";
68
+ import "./chunk-6FSLEARF.js";
69
+ import "./chunk-ELGEHZK2.js";
70
+ import "./chunk-UTLJQG6Q.js";
71
+ import "./chunk-ETIUB2DF.js";
72
+ import "./chunk-NKDYHAHP.js";
73
+ import "./chunk-AHRHP2H2.js";
74
+ import "./chunk-KJQZXCNK.js";
75
+ import "./chunk-5Y2WRUYP.js";
76
76
  import "./chunk-UHC5I3JV.js";
77
77
  import "./chunk-QZLK2ISN.js";
78
78
  import "./chunk-D72URWJE.js";
79
- import "./chunk-AF62BPIW.js";
80
- import "./chunk-ODFHIXMA.js";
81
- import "./chunk-BMV56JCL.js";
79
+ import "./chunk-5Z7LZAVP.js";
80
+ import "./chunk-5AS5N7V5.js";
81
+ import "./chunk-LLYVBO3R.js";
82
82
  import {
83
83
  mcpErrorResult
84
- } from "./chunk-BHNBWFT5.js";
84
+ } from "./chunk-GOMJNH56.js";
85
85
  import "./chunk-Y5E2WNWB.js";
86
86
  import {
87
87
  CliError
88
88
  } from "./chunk-DALBYUPC.js";
89
- import "./chunk-RT6SLZBI.js";
89
+ import "./chunk-XV3M3NAN.js";
90
90
  import {
91
91
  __name
92
92
  } from "./chunk-ZVVMGPBJ.js";
93
93
 
94
- // 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/app-server.js
94
+ // 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/app-server.js
95
95
  var EXCLUDED = [["mcp"]];
96
96
  var createAppServer = /* @__PURE__ */ __name((command, context, options) => {
97
97
  const { app } = options;
@@ -209,7 +209,7 @@ var serveAppOverStdio = /* @__PURE__ */ __name(async (command, context, options)
209
209
  var serveAppOverHttp = /* @__PURE__ */ __name(async (command, context, options, http) => {
210
210
  const { app } = options;
211
211
  const { build } = createAppServer(command, context, options);
212
- const { serveOverHttp } = await import("./serve-Y2DDLGBT.js");
212
+ const { serveOverHttp } = await import("./serve-T6JHM2YD.js");
213
213
  const listening = await serveOverHttp(build, {
214
214
  ...http,
215
215
  appName: app.command,
@@ -18,12 +18,12 @@ import {
18
18
  jitCompatCheck,
19
19
  refineSqliteCodecs,
20
20
  sql
21
- } from "./chunk-RT6SLZBI.js";
21
+ } from "./chunk-XV3M3NAN.js";
22
22
  import {
23
23
  __name
24
24
  } from "./chunk-ZVVMGPBJ.js";
25
25
 
26
- // 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/sqlite/drizzle/bun.js
26
+ // 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/sqlite/drizzle/bun.js
27
27
  import { Database } from "bun:sqlite";
28
28
  var bunSQLiteCodecs = refineSqliteCodecs({
29
29
  "integer:boolean": { normalize: booleanFromInteger },
@@ -3,9 +3,9 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  loadVectorExtension,
5
5
  vectorExtension
6
- } from "./chunk-LF5XM4HE.js";
7
- import "./chunk-BMV56JCL.js";
8
- import "./chunk-BHNBWFT5.js";
6
+ } from "./chunk-4TKQIXND.js";
7
+ import "./chunk-LLYVBO3R.js";
8
+ import "./chunk-GOMJNH56.js";
9
9
  import {
10
10
  importFrom
11
11
  } from "./chunk-Y5E2WNWB.js";
@@ -14,7 +14,7 @@ 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/drivers/bun-sqlite.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/drivers/bun-sqlite.js
18
18
  var customised = false;
19
19
  var ownLibrary = /* @__PURE__ */ __name(async () => {
20
20
  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.608.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_2045f8d992dff370989171c93240f8d7/node_modules/@wirecat/cli-core/dist/files/ordinary-file.js
10
+ // 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/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.608.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_2045f8d992dff370989171c93240f8d7/node_modules/@wirecat/cli-core/dist/files/atomic-write.js
76
+ // 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/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.608.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_2045f8d992dff370989171c93240f8d7/node_modules/@wirecat/cli-core/dist/files/bounded-utf8.js
114
+ // 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/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.608.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_2045f8d992dff370989171c93240f8d7/node_modules/@wirecat/cli-core/dist/files/lock.js
143
+ // 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/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.608.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_2045f8d992dff370989171c93240f8d7/node_modules/@wirecat/cli-core/dist/files/native-writer-lease.js
147
+ // 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/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.608.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_2045f8d992dff370989171c93240f8d7/node_modules/@wirecat/cli-core/dist/files/native-lease-inspection.js
153
+ // 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/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.608.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_2045f8d992dff370989171c93240f8d7/node_modules/@wirecat/cli-core/dist/files/native-lease-owner.js
157
+ // 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/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.608.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_2045f8d992dff370989171c93240f8d7/node_modules/@wirecat/cli-core/dist/files/native-lease-inspection.js
202
+ // 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/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.608.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_2045f8d992dff370989171c93240f8d7/node_modules/@wirecat/cli-core/dist/files/native-lease-release.js
261
+ // 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/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.608.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_2045f8d992dff370989171c93240f8d7/node_modules/@wirecat/cli-core/dist/files/native-writer-lease.js
286
+ // 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/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.608.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_2045f8d992dff370989171c93240f8d7/node_modules/@wirecat/cli-core/dist/files/lock.js
357
+ // 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/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.608.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_2045f8d992dff370989171c93240f8d7/node_modules/@wirecat/cli-core/dist/files/safe-name.js
372
+ // 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/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(/^\.+/, "");
@@ -10,13 +10,13 @@ import {
10
10
  import {
11
11
  loadConfigFile,
12
12
  saveConfigFile
13
- } from "./chunk-BMV56JCL.js";
13
+ } from "./chunk-LLYVBO3R.js";
14
14
  import {
15
15
  number,
16
16
  object,
17
17
  optional,
18
18
  string
19
- } from "./chunk-BHNBWFT5.js";
19
+ } from "./chunk-GOMJNH56.js";
20
20
  import {
21
21
  __name,
22
22
  __toESM