@wirecat/mail-cli 0.25.0 → 0.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (157) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/README.md +3 -0
  3. package/contracts/wirecat.json +1325 -0
  4. package/dist/bin/mail.js +2 -2
  5. package/dist/bin/mail.js.map +1 -1
  6. package/dist/bundle/{all-profiles-QEV2PSOR.js → all-profiles-5XWH7TBM.js} +11 -11
  7. package/dist/bundle/{anthropic-5NKQXIHM.js → anthropic-QEQGUEPW.js} +5 -5
  8. package/dist/bundle/{app-server-G2CJNT4R.js → app-server-YWDU56NR.js} +55 -51
  9. package/dist/bundle/{bun-6HBYWQIX.js → bun-PWMM6L45.js} +2 -2
  10. package/dist/bundle/{bun-sqlite-DXIQ7BVR.js → bun-sqlite-S4QD5YUO.js} +6 -6
  11. package/dist/bundle/{chunk-37F6QYTO.js → chunk-255RGG5W.js} +6 -6
  12. package/dist/bundle/{chunk-DIA56CS7.js → chunk-2FZMIJW7.js} +11 -7
  13. package/dist/bundle/{chunk-S2QRAKQI.js → chunk-4VDWQKDI.js} +17 -17
  14. package/dist/bundle/{chunk-QB3DP2TN.js → chunk-572NWJUN.js} +2 -2
  15. package/dist/bundle/{chunk-PHHH2NQP.js → chunk-5BPOEPYL.js} +15 -113
  16. package/dist/bundle/{chunk-VL6H2BND.js → chunk-5DLPM5AV.js} +18 -17
  17. package/dist/bundle/{chunk-HEIDAHRC.js → chunk-77J5ID2O.js} +2 -2
  18. package/dist/bundle/{chunk-5ZYFV6FD.js → chunk-7BXOFLWJ.js} +129 -74
  19. package/dist/bundle/{chunk-L4QVOEOB.js → chunk-7C6FGWDH.js} +4 -4
  20. package/dist/bundle/{chunk-VUBZFMGP.js → chunk-7KCBPAQS.js} +2 -2
  21. package/dist/bundle/{chunk-TY644DKQ.js → chunk-7MEVD5PI.js} +57 -28
  22. package/dist/bundle/{chunk-WOAYHCM2.js → chunk-AIEMFRBU.js} +1 -1
  23. package/dist/bundle/{chunk-WX6OYVCH.js → chunk-AIZ225IA.js} +379 -270
  24. package/dist/bundle/{chunk-K2OGF7KC.js → chunk-APLVXHFG.js} +2 -2
  25. package/dist/bundle/{chunk-GY4XCLCO.js → chunk-BZCXAVGP.js} +8 -8
  26. package/dist/bundle/{chunk-434YOD6A.js → chunk-CKFVKHTB.js} +4 -4
  27. package/dist/bundle/{chunk-B7SWTH5O.js → chunk-CZRMT6XV.js} +2 -2
  28. package/dist/bundle/{chunk-Z5T6OW3V.js → chunk-DQO2LX5I.js} +4 -4
  29. package/dist/bundle/{chunk-OLKCJBZY.js → chunk-DSUOYJUL.js} +5 -5
  30. package/dist/bundle/{chunk-IZOYW4Z4.js → chunk-ECZSYLSL.js} +24 -9
  31. package/dist/bundle/{chunk-YNS2YVUR.js → chunk-ELPH22W6.js} +9 -9
  32. package/dist/bundle/{chunk-JG4MNYG2.js → chunk-EXWZCI5G.js} +1 -1
  33. package/dist/bundle/{chunk-MCPOZNWG.js → chunk-FIVFP53N.js} +1 -1
  34. package/dist/bundle/{chunk-HLXVUMZJ.js → chunk-FOTP6QLO.js} +2 -2
  35. package/dist/bundle/{chunk-SMTBV62X.js → chunk-FVVSBQGK.js} +29 -25
  36. package/dist/bundle/{chunk-XQYKIZMG.js → chunk-HBK6MRAL.js} +12 -9
  37. package/dist/bundle/{chunk-5QYK3LWS.js → chunk-IDOHT4Z3.js} +123 -42
  38. package/dist/bundle/{chunk-4W4EVVL4.js → chunk-IX3GUNGV.js} +4 -4
  39. package/dist/bundle/{chunk-7GLJSJ7M.js → chunk-KHBZ4OEP.js} +1 -1
  40. package/dist/bundle/{chunk-RX5CJ55S.js → chunk-M4OP5ASJ.js} +1 -1
  41. package/dist/bundle/{chunk-CBYBZCQP.js → chunk-MY4LVD64.js} +3 -2
  42. package/dist/bundle/{chunk-OLLIWNFG.js → chunk-NZG6IRDW.js} +3 -3
  43. package/dist/bundle/{chunk-ND5H5ADM.js → chunk-OC3U2JAK.js} +4 -4
  44. package/dist/bundle/{chunk-KFB2X6KE.js → chunk-OCUKQRJ3.js} +201 -160
  45. package/dist/bundle/{chunk-PQMJ5BXH.js → chunk-OEPNLKHI.js} +4 -4
  46. package/dist/bundle/{chunk-GJRYZXBN.js → chunk-OPOEAGVB.js} +9 -9
  47. package/dist/bundle/{chunk-VFU7PVPQ.js → chunk-PA7LDYVX.js} +62 -60
  48. package/dist/bundle/{chunk-NMZQTYKJ.js → chunk-PJ3FKBXG.js} +1 -1
  49. package/dist/bundle/{chunk-A6BPOX5O.js → chunk-PRSXMM4I.js} +3825 -3516
  50. package/dist/bundle/{chunk-HEYVMAAQ.js → chunk-QQTSPQ2D.js} +2 -2
  51. package/dist/bundle/{chunk-IXO4SCKE.js → chunk-QVJMFZFW.js} +1 -1
  52. package/dist/bundle/{chunk-J4OYK4WL.js → chunk-R3A65A4D.js} +12 -12
  53. package/dist/bundle/{chunk-QQUY4MZY.js → chunk-R5FTCNLJ.js} +1 -1
  54. package/dist/bundle/{chunk-XMDEM6BZ.js → chunk-RGQFVVBB.js} +276 -254
  55. package/dist/bundle/{chunk-FZZD4AFY.js → chunk-ROLHKFKB.js} +26 -18
  56. package/dist/bundle/{chunk-PP3YOAWG.js → chunk-RRLAFEPQ.js} +3 -3
  57. package/dist/bundle/{chunk-3XVR2ROR.js → chunk-S2QRW647.js} +35 -31
  58. package/dist/bundle/{chunk-G5LHHAW2.js → chunk-S7H7TAC3.js} +6 -6
  59. package/dist/bundle/{chunk-U6IQ6YQ2.js → chunk-SXKKOOA7.js} +8 -2
  60. package/dist/bundle/{chunk-MBFPFWCO.js → chunk-T7VERZP5.js} +27 -27
  61. package/dist/bundle/{chunk-ADKMBXY4.js → chunk-TI2OANJZ.js} +1 -1
  62. package/dist/bundle/{chunk-EXVY76VO.js → chunk-TKOZCIHU.js} +19 -18
  63. package/dist/bundle/{chunk-BC7PFQL7.js → chunk-UBH4UPZ7.js} +40 -2
  64. package/dist/bundle/{chunk-P6GXNT7Z.js → chunk-UEJVXUIO.js} +13 -13
  65. package/dist/bundle/{chunk-IACWKZWS.js → chunk-UIKVP23D.js} +1 -1
  66. package/dist/bundle/{chunk-LGZPKKBN.js → chunk-VYZ37D2Q.js} +3 -2
  67. package/dist/bundle/{chunk-HJSJBNCJ.js → chunk-WMXUFUV3.js} +28 -9
  68. package/dist/bundle/{chunk-CIWWNBVW.js → chunk-WRHAX53U.js} +8 -8
  69. package/dist/bundle/{chunk-LVGX7VTD.js → chunk-XBL46B4V.js} +63 -5
  70. package/dist/bundle/{chunk-KK4HD3SI.js → chunk-XCYDTIVK.js} +7 -7
  71. package/dist/bundle/{chunk-PGC5TRH6.js → chunk-XM2THVMR.js} +3 -3
  72. package/dist/bundle/{chunk-MWGH3M46.js → chunk-ZSWSFKNE.js} +5 -7
  73. package/dist/bundle/{chunk-T27IMG6X.js → chunk-ZVQDOKDY.js} +1 -1
  74. package/dist/bundle/command-contract-MIJONVVG.js +36 -0
  75. package/dist/bundle/{command-server-entry-XMSSY5ID.js → command-server-entry-VHUFW3OZ.js} +25 -25
  76. package/dist/bundle/{decode-RYGB4PGT.js → decode-TIMTSVXM.js} +5 -5
  77. package/dist/bundle/{dispatch-PLQOIZG5.js → dispatch-DSVN7MNG.js} +8 -8
  78. package/dist/bundle/{dist-GY2AQETI.js → dist-IP25JFTN.js} +19 -15
  79. package/dist/bundle/{echarts-7CM2MCMW.js → echarts-SDZA2SWG.js} +2 -2
  80. package/dist/bundle/{embed-FTBDPOPT.js → embed-4W527BCE.js} +6 -6
  81. package/dist/bundle/{embedder-B43WGNBD.js → embedder-LQE2SBJ3.js} +9 -9
  82. package/dist/bundle/{failure-XP5QYV2T.js → failure-COTPFUP4.js} +2 -2
  83. package/dist/bundle/{first-run-XIIUARNM.js → first-run-KZTKMEI4.js} +12 -12
  84. package/dist/bundle/first-screen-4LG5SJ6D.js +34 -0
  85. package/dist/bundle/{instructions-R7OHVAWH.js → instructions-7T6JJIFS.js} +1 -1
  86. package/dist/bundle/mail.js +15 -20
  87. package/dist/bundle/{mcp-7KQUJNFN.js → mcp-TDKGDB4V.js} +2 -2
  88. package/dist/bundle/{node-3N2JGZ7V.js → node-BZDMUFTW.js} +2 -2
  89. package/dist/bundle/{node-sqlite-WFJXW3CZ.js → node-sqlite-PVSKI4OS.js} +7 -7
  90. package/dist/bundle/{oauth-SVJLQTWV.js → oauth-TGYGAVGF.js} +7 -7
  91. package/dist/bundle/{open-ZDONVKSX.js → open-5YED4Q4C.js} +5 -5
  92. package/dist/bundle/{openai-XVEW6XOU.js → openai-XVJTML22.js} +21 -20
  93. package/dist/bundle/{process-YAHHUFR5.js → process-756VBE7E.js} +1 -1
  94. package/dist/bundle/{program-HU2UVMJE.js → program-TDHDXAQA.js} +1499 -998
  95. package/dist/bundle/{prompt-JAJ2CUJI.js → prompt-HPZANASN.js} +5 -5
  96. package/dist/bundle/{recognize-UFBWUNFR.js → recognize-PP5XQQHH.js} +4 -4
  97. package/dist/bundle/{remote-2GFOVLCR.js → remote-C2LU2WYG.js} +9 -9
  98. package/dist/bundle/{rerank-BGPSMXTL.js → rerank-WRHNOM4Z.js} +7 -7
  99. package/dist/bundle/{serve-CB3XJTH3.js → serve-RE3IV2QB.js} +9 -9
  100. package/dist/bundle/server-43V7HNFY.js +68 -0
  101. package/dist/bundle/{server-M7FQY7TX.js → server-52BJ7UTO.js} +44 -42
  102. package/dist/bundle/{sqlite-runtime-AEV6PGDR.js → sqlite-runtime-CRRL3MYX.js} +6 -6
  103. package/dist/bundle/{state-YLBEQLBI.js → state-YGJRPMWD.js} +6 -6
  104. package/dist/bundle/{store-EKWKY6GG.js → store-6AZ5LVJL.js} +21 -19
  105. package/dist/bundle/{store-CDUL3HKK.js → store-ESQE4VHP.js} +17 -17
  106. package/dist/bundle/store-maintenance-command-AKQMKUYO.js +58 -0
  107. package/dist/commands/rules.d.ts.map +1 -1
  108. package/dist/commands/rules.js +57 -19
  109. package/dist/commands/rules.js.map +1 -1
  110. package/dist/commands/session-start.d.ts.map +1 -1
  111. package/dist/commands/session-start.js +1 -1
  112. package/dist/commands/session-start.js.map +1 -1
  113. package/dist/config.d.ts +1 -0
  114. package/dist/config.d.ts.map +1 -1
  115. package/dist/config.js +13 -12
  116. package/dist/config.js.map +1 -1
  117. package/dist/discovery.d.ts.map +1 -1
  118. package/dist/discovery.js +7 -2
  119. package/dist/discovery.js.map +1 -1
  120. package/dist/identity.d.ts +2 -0
  121. package/dist/identity.d.ts.map +1 -1
  122. package/dist/identity.js +34 -0
  123. package/dist/identity.js.map +1 -1
  124. package/dist/mail/domain-age.d.ts +1 -1
  125. package/dist/mail/domain-age.d.ts.map +1 -1
  126. package/dist/mail/domain-age.js +9 -3
  127. package/dist/mail/domain-age.js.map +1 -1
  128. package/dist/mail/rules/file.d.ts.map +1 -1
  129. package/dist/mail/rules/file.js +4 -1
  130. package/dist/mail/rules/file.js.map +1 -1
  131. package/dist/mail/rules/query.d.ts +2 -1
  132. package/dist/mail/rules/query.d.ts.map +1 -1
  133. package/dist/mail/rules/query.js +16 -3
  134. package/dist/mail/rules/query.js.map +1 -1
  135. package/dist/oauth.d.ts +3 -1
  136. package/dist/oauth.d.ts.map +1 -1
  137. package/dist/oauth.js +48 -34
  138. package/dist/oauth.js.map +1 -1
  139. package/dist/reasons.d.ts.map +1 -1
  140. package/dist/reasons.js +5 -0
  141. package/dist/reasons.js.map +1 -1
  142. package/dist/store.d.ts.map +1 -1
  143. package/dist/store.js +2 -21
  144. package/dist/store.js.map +1 -1
  145. package/dist/version.d.ts +1 -1
  146. package/dist/version.js +1 -1
  147. package/dist/wcat.d.ts +3 -0
  148. package/dist/wcat.d.ts.map +1 -0
  149. package/dist/wcat.js +4 -0
  150. package/dist/wcat.js.map +1 -0
  151. package/package.json +10 -9
  152. package/dist/bundle/chunk-K6HR6HCO.js +0 -32
  153. package/dist/bundle/command-contract-XSW2Q33S.js +0 -36
  154. package/dist/bundle/first-screen-Z7HC6PQU.js +0 -34
  155. package/dist/bundle/server-34GEF22R.js +0 -68
  156. package/dist/bundle/store-maintenance-command-XH2JUM5F.js +0 -58
  157. /package/dist/bundle/{chunk-YVNHQFLC.js → chunk-XWBPP2HX.js} +0 -0
@@ -2,15 +2,15 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  QUERY_REASONS
5
- } from "./chunk-5ZYFV6FD.js";
5
+ } from "./chunk-7BXOFLWJ.js";
6
6
  import {
7
7
  defineReasons
8
- } from "./chunk-IZOYW4Z4.js";
8
+ } from "./chunk-ECZSYLSL.js";
9
9
  import {
10
10
  __name
11
11
  } from "./chunk-ZVVMGPBJ.js";
12
12
 
13
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/errors/reasons.js
13
+ // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/errors/reasons.js
14
14
  var validation = /* @__PURE__ */ __name((reason, message) => [reason, "validation_error", message], "validation");
15
15
  var QUERY = [
16
16
  ["query.aborted", "the search was stopped before it finished"],
@@ -31,8 +31,7 @@ var SIGN_IN = [
31
31
  ["oauth.declined", "authentication_error", "the provider's consent was declined"],
32
32
  ["oauth.timeout", "timeout", "the sign-in was not finished in time"],
33
33
  ["oauth.mismatch", "authentication_error", "the pasted sign-in result belongs to another sign-in"],
34
- ["oauth.missing", "authentication_error", "this profile is not signed in to the provider"],
35
- ["session.missing", "authentication_error", "this profile has no API token saved"],
34
+ ["session.missing", "authentication_error", "this profile is not signed in: no saved sign-in or API token"],
36
35
  ["oauth.locked", "provider_unavailable", "another process holds this sign-in's lock"],
37
36
  ["oauth.no-response", "outcome_unknown", "the token request did not finish"],
38
37
  ["oauth.unavailable", "provider_unavailable", "the provider's token endpoint is unavailable"],
@@ -49,6 +48,7 @@ var SIGN_IN = [
49
48
  ["sign-in.secret-without-id", "configuration_error", "an OAuth client secret is set without its client id"],
50
49
  validation("account-remove.no-choice", "account remove needs --keep-data or --delete-data, one of them"),
51
50
  ["account-remove.unknown-profile", "not_found", "no profile by this name on this computer"],
51
+ ["profile.unknown", "not_found", "no profile by this name on this computer; details.profiles lists the ones here"],
52
52
  ["account-remove.busy", "conflict", "a serve or a sync runs for this profile; stop it first"],
53
53
  ["account-remove.unconfirmed", "confirmation_required", "removing an account asks first; add --yes"],
54
54
  ["account-remove.path-outside", "configuration_error", "the tool named a path outside its own folders"],
@@ -67,7 +67,20 @@ var PROVIDER_API = [
67
67
  validation("file.not-a-file", "the path names a folder or another thing that is not a file"),
68
68
  ["file.denied", "permission_error", "the file cannot be opened: permission denied"]
69
69
  ];
70
+ var SFTP = [
71
+ ["sftp.host-key-missing", "configuration_error", "no host key is pinned for the SFTP server"],
72
+ ["sftp.host-key-mismatch", "authentication_error", "the SFTP server's host key is not the pinned one"],
73
+ ["sftp.auth-missing", "configuration_error", "an SFTP connection needs a password or a private key"],
74
+ ["sftp.key-invalid", "configuration_error", "the SFTP private key or its passphrase cannot be read"],
75
+ ["sftp.library-missing", "configuration_error", "SFTP needs the ssh2 package in the CLI's dependencies"],
76
+ ["sftp.timeout", "timeout", "the SFTP server did not answer in time"],
77
+ validation("sftp.too-large", "the file is larger than the read's byte limit"),
78
+ validation("sftp.closed", "the SFTP connection was closed before the operation")
79
+ ];
70
80
  var OTHERS = [
81
+ validation("doctor.report-exists", "the report's file exists; a problem report never overwrites a file"),
82
+ validation("usage.unknown-command", "no command by this name; the CLI's help lists them"),
83
+ validation("usage.unknown-option", "the command takes no option by this name; its help lists them"),
71
84
  ["query.time-limit", "timeout", "the search took longer than its time limit; the query itself is valid"],
72
85
  ["enrichment.owner-only", "permission_error", "only the owner turns enrichment on, not an agent"],
73
86
  ["search-harder.owner-only", "permission_error", "only the owner allows search all --harder, not an agent"],
@@ -79,7 +92,12 @@ var OTHERS = [
79
92
  "invalid_response",
80
93
  "the model answered nothing; given a picture, it may not read pictures \u2014 choose a vision model"
81
94
  ],
82
- validation("model.address-refused", "the model address must be https, or http only on this computer"),
95
+ validation("model.address-refused", "the model address is refused: https, or plain http and Ollama only on this computer"),
96
+ [
97
+ "network.host-undeclared",
98
+ "configuration_error",
99
+ "the request went to a host the CLI does not declare, or not the model address's own; nothing was sent"
100
+ ],
83
101
  [
84
102
  "local-only.refused",
85
103
  "permission_error",
@@ -101,7 +119,6 @@ var OTHERS = [
101
119
  "only the owner chooses, unsets, checks or removes the AI model and its key, or revokes its consent"
102
120
  ],
103
121
  ["ai.setting-invalid", "configuration_error", "the ai section or the model given is not one WireCat can use"],
104
- validation("ai.address-refused", "the AI model setting names an address WireCat refuses: plain http to another computer, or Ollama off this computer"),
105
122
  ["ai.not-set", "configuration_error", "no AI model is chosen; models ai set chooses one"],
106
123
  ["ai.key-missing", "configuration_error", "no API key is stored for the AI model's address"],
107
124
  ["ai.ok", "invalid_response", "models ai check: the model answered (a result, never raised)"],
@@ -258,6 +275,7 @@ var OTHERS = [
258
275
  "another program deleted or replaced the store's journal file while it was open; store recover says what to do"
259
276
  ],
260
277
  validation("store.file-damaged", "the named store file is damaged or not a database"),
278
+ ["store.unopenable", "configuration_error", "the store file cannot be opened at its path; details.path names it"],
261
279
  [
262
280
  "store.unreadable",
263
281
  "configuration_error",
@@ -293,7 +311,7 @@ var OTHERS = [
293
311
  validation("input.empty", "a hidden prompt got an empty answer three times"),
294
312
  validation("input.required", "the command needs an answer and cannot ask for one"),
295
313
  validation("input.too-large", "the input is over its size limit"),
296
- ["meeting-project.stale", "configuration_error", "the meeting's project changed meanwhile"],
314
+ ["meeting-project.stale", "conflict", "the meeting's project changed meanwhile"],
297
315
  validation("fact.not-accepted", "only an accepted fact can be revoked"),
298
316
  validation("fact.owner-written", "the owner wrote this fact; it was never proposed, so it cannot be revoked"),
299
317
  validation("fact.payment-retired", "a payment is a payments row in store.finance, not a fact"),
@@ -383,6 +401,7 @@ var OTHERS = [
383
401
  validation("crm.reference-unknown", "a CRM row names a contact, company or user the store does not hold; that link was not made"),
384
402
  validation("crm.pending-dropped", "relationships waited too long for an end that never came; they were dropped"),
385
403
  validation("crm.activities-failed", "the activities and tasks could not be read; the deals and leads were synced"),
404
+ validation("crm.stage-history-failed", "the CRM's stage history could not be read; stage tasks wait for the next sync"),
386
405
  validation("crm.email-ambiguous", "a CRM contact's email belongs to more than one person; the owner decides"),
387
406
  validation("crm.own-unknown", "no own company of the CRM account is stored, so its users are no one's employees yet"),
388
407
  validation("relationship.reference-unknown", "a reported relationship names something the store does not hold"),
@@ -578,7 +597,7 @@ var INPUT_FIELD_REASONS = defineReasons([
578
597
  var REASONS = defineReasons([
579
598
  ...QUERY_REASONS,
580
599
  ...INPUT_FIELD_REASONS,
581
- ...[...QUERY, ...SIGN_IN, ...PROVIDER_API, ...OTHERS].map(([reason, code, message]) => ({
600
+ ...[...QUERY, ...SIGN_IN, ...PROVIDER_API, ...SFTP, ...OTHERS].map(([reason, code, message]) => ({
582
601
  reason,
583
602
  code,
584
603
  message,
@@ -2,33 +2,33 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  stdinFieldOf
5
- } from "./chunk-NMZQTYKJ.js";
5
+ } from "./chunk-PJ3FKBXG.js";
6
6
  import {
7
7
  commandPathOf
8
- } from "./chunk-OLKCJBZY.js";
8
+ } from "./chunk-DSUOYJUL.js";
9
9
  import {
10
10
  commandServerRequest,
11
11
  metaOf
12
- } from "./chunk-KFB2X6KE.js";
12
+ } from "./chunk-OCUKQRJ3.js";
13
13
  import {
14
14
  errorObjectOf,
15
15
  renderError
16
- } from "./chunk-IZOYW4Z4.js";
16
+ } from "./chunk-ECZSYLSL.js";
17
17
  import {
18
18
  CliError
19
- } from "./chunk-VUBZFMGP.js";
19
+ } from "./chunk-7KCBPAQS.js";
20
20
  import {
21
21
  __name
22
22
  } from "./chunk-ZVVMGPBJ.js";
23
23
 
24
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/cli/command-server.js
24
+ // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/cli/command-server.js
25
25
  import { createInterface } from "node:readline";
26
26
 
27
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/cli/command-server-argv.js
27
+ // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/cli/command-server-argv.js
28
28
  var COMMAND_SERVER_ARGV = ["commands", "--serve"];
29
29
  var isCommandServer = /* @__PURE__ */ __name((args) => args.length === COMMAND_SERVER_ARGV.length && COMMAND_SERVER_ARGV.every((word, at) => args[at] === word), "isCommandServer");
30
30
 
31
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/cli/command-server.js
31
+ // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/cli/command-server.js
32
32
  var COMMAND_SERVER_PROTOCOL = 1;
33
33
  var COMMAND_SERVER_IDLE_MS = 10 * 6e4;
34
34
  var COMMAND_SERVER_CONCURRENT = 8;
@@ -3,12 +3,12 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  CliError,
5
5
  isCliError
6
- } from "./chunk-VUBZFMGP.js";
6
+ } from "./chunk-7KCBPAQS.js";
7
7
  import {
8
8
  __name
9
9
  } from "./chunk-ZVVMGPBJ.js";
10
10
 
11
- // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/http/hosts.js
11
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/http/hosts.js
12
12
  var LABEL = "[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?";
13
13
  var HOST_PATTERN = new RegExp(`^(?:${LABEL}(?:\\.${LABEL})*|\\*\\.${LABEL}(?:\\.${LABEL})+)$`);
14
14
  var hostProblems = /* @__PURE__ */ __name((hosts) => [
@@ -20,7 +20,7 @@ var hostCovered = /* @__PURE__ */ __name((hostname, hosts) => {
20
20
  return hosts.some((host) => host.startsWith("*.") ? name.endsWith(host.slice(1)) : name === host);
21
21
  }, "hostCovered");
22
22
 
23
- // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/http/fetch.js
23
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/http/fetch.js
24
24
  var HOST_FETCH_TIMEOUT_MS = 3e4;
25
25
  var REDIRECTS = 5;
26
26
  var REDIRECT_STATUSES = /* @__PURE__ */ new Set([301, 302, 303, 307, 308]);
@@ -108,7 +108,7 @@ var hostFetch = /* @__PURE__ */ __name((options) => {
108
108
  };
109
109
  }, "hostFetch");
110
110
 
111
- // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/http/index.js
111
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/http/index.js
112
112
  var parseRetryAfter = /* @__PURE__ */ __name((header, now) => {
113
113
  if (!header)
114
114
  return void 0;
@@ -132,7 +132,65 @@ var parseRateLimitReset = /* @__PURE__ */ __name((header, now) => {
132
132
  }, "parseRateLimitReset");
133
133
  var providerWaitMs = /* @__PURE__ */ __name((headers, now) => parseRetryAfter(headers.get("retry-after"), now) ?? parseRateLimitReset(headers.get("x-ratelimit-reset"), now), "providerWaitMs");
134
134
 
135
+ // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/models/endpoint.js
136
+ var endpoint = /* @__PURE__ */ __name((value) => {
137
+ try {
138
+ const url = new URL(value);
139
+ return ["https:", "http:"].includes(url.protocol) && !url.username && !url.password && !url.search && !url.hash;
140
+ } catch {
141
+ return false;
142
+ }
143
+ }, "endpoint");
144
+ var loopback = /* @__PURE__ */ __name((hostname) => hostname === "localhost" || hostname === "[::1]" || /^127(\.\d{1,3}){3}$/.test(hostname), "loopback");
145
+ var onThisComputer = /* @__PURE__ */ __name((value) => {
146
+ try {
147
+ return loopback(new URL(value).hostname);
148
+ } catch {
149
+ return false;
150
+ }
151
+ }, "onThisComputer");
152
+ var modelAddressAllowed = /* @__PURE__ */ __name((value) => endpoint(value) && (new URL(value).protocol === "https:" || onThisComputer(value)), "modelAddressAllowed");
153
+ var PLAIN_HTTP_REFUSED = "this address is not allowed: use https, or http only on this computer";
154
+ var literalFetch = /* @__PURE__ */ __name((hostname, timeoutMs) => async (input, init = {}) => {
155
+ const url = new URL(input instanceof Request ? input.url : String(input));
156
+ if (url.hostname !== hostname)
157
+ throw new CliError("configuration_error", `${url.hostname} is not the model address's host, ${hostname}`, {
158
+ reason: "network.host-undeclared",
159
+ sent: false
160
+ });
161
+ const deadline2 = AbortSignal.timeout(timeoutMs);
162
+ const signal = init.signal ? AbortSignal.any([init.signal, deadline2]) : deadline2;
163
+ try {
164
+ const response = await fetch(input, { ...init, signal, redirect: "manual" });
165
+ if (response.status >= 300 && response.status < 400) {
166
+ void response.body?.cancel().catch(() => {
167
+ });
168
+ throw new CliError("invalid_response", `${hostname} answered with a redirect, which is not followed`);
169
+ }
170
+ return response;
171
+ } catch (error) {
172
+ if (isCliError(error))
173
+ throw error;
174
+ if (init.signal?.aborted)
175
+ throw new CliError("cancelled", "request cancelled");
176
+ if (deadline2.aborted)
177
+ throw new CliError("timeout", `${hostname} did not answer within ${timeoutMs} ms`, { retryable: true });
178
+ throw new CliError("network_error", `${hostname} could not be reached`, { retryable: true });
179
+ }
180
+ }, "literalFetch");
181
+ var endpointFetch = /* @__PURE__ */ __name((address, timeoutMs) => {
182
+ const { hostname } = new URL(address);
183
+ if (hostname === "[::1]")
184
+ return fetch;
185
+ return hostname.startsWith("[") ? literalFetch(hostname, timeoutMs) : hostFetch({ hosts: [hostname], timeoutMs });
186
+ }, "endpointFetch");
187
+
135
188
  export {
136
189
  hostFetch,
137
- providerWaitMs
190
+ providerWaitMs,
191
+ endpoint,
192
+ onThisComputer,
193
+ modelAddressAllowed,
194
+ PLAIN_HTTP_REFUSED,
195
+ endpointFetch
138
196
  };
@@ -2,23 +2,23 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  storePath
5
- } from "./chunk-LGZPKKBN.js";
5
+ } from "./chunk-VYZ37D2Q.js";
6
6
  import {
7
7
  resolvePaths
8
- } from "./chunk-TY644DKQ.js";
8
+ } from "./chunk-7MEVD5PI.js";
9
9
  import {
10
10
  CliError,
11
11
  singleLine
12
- } from "./chunk-VUBZFMGP.js";
12
+ } from "./chunk-7KCBPAQS.js";
13
13
  import {
14
14
  __name
15
15
  } from "./chunk-ZVVMGPBJ.js";
16
16
 
17
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/store/shared-config.js
17
+ // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/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.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/domain/task-categories.js
21
+ // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/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.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/store/shared-config.js
776
+ // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/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 });
@@ -792,7 +792,7 @@ var readJson = /* @__PURE__ */ __name((path) => {
792
792
  }
793
793
  let parsed;
794
794
  try {
795
- parsed = JSON.parse(text);
795
+ parsed = JSON.parse(text.replace(/^\uFEFF/u, ""));
796
796
  } catch (error) {
797
797
  throw new CliError("configuration_error", `${path} is not valid JSON: ${error.message}`);
798
798
  }
@@ -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-IACWKZWS.js";
5
+ } from "./chunk-UIKVP23D.js";
6
6
  import {
7
7
  resolvePaths,
8
8
  writeSecurely
9
- } from "./chunk-TY644DKQ.js";
9
+ } from "./chunk-7MEVD5PI.js";
10
10
  import {
11
11
  __name
12
12
  } from "./chunk-ZVVMGPBJ.js";
13
13
 
14
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/background/lock.js
14
+ // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/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");
@@ -3,15 +3,15 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  readSharedSection,
5
5
  writeSharedSection
6
- } from "./chunk-KK4HD3SI.js";
6
+ } from "./chunk-XCYDTIVK.js";
7
7
  import {
8
8
  CliError
9
- } from "./chunk-VUBZFMGP.js";
9
+ } from "./chunk-7KCBPAQS.js";
10
10
  import {
11
11
  __name
12
12
  } from "./chunk-ZVVMGPBJ.js";
13
13
 
14
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/cli/setup-answers.js
14
+ // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/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";
@@ -36,13 +36,11 @@ var writeSetupAnswers = /* @__PURE__ */ __name((path, answers) => {
36
36
  writeSharedSection(path, SECTION, { ...kept, ...answers });
37
37
  }, "writeSetupAnswers");
38
38
  var permissionCeiling = /* @__PURE__ */ __name((path) => {
39
- let answer;
40
39
  try {
41
- answer = readSetupAnswers(path).permissions;
40
+ return readSetupAnswers(path).permissions === "readonly" ? "readonly" : void 0;
42
41
  } catch {
43
- return "readonly";
42
+ return void 0;
44
43
  }
45
- return answer === "allow" ? void 0 : answer;
46
44
  }, "permissionCeiling");
47
45
 
48
46
  export {
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/store/driver.js
7
+ // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/store/driver.js
8
8
  var TIME_LIMIT_FUNCTION = "wc_time_limit";
9
9
  var TimeLimitReached = class extends Error {
10
10
  static {
@@ -0,0 +1,36 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ SCHEMA_DIALECT,
5
+ commandContract,
6
+ commandPathOf,
7
+ findCommand,
8
+ outputOf
9
+ } from "./chunk-DSUOYJUL.js";
10
+ import "./chunk-OCUKQRJ3.js";
11
+ import "./chunk-2FZMIJW7.js";
12
+ import "./chunk-HBK6MRAL.js";
13
+ import "./chunk-UIKVP23D.js";
14
+ import "./chunk-ZSWSFKNE.js";
15
+ import "./chunk-NZG6IRDW.js";
16
+ import "./chunk-T7VERZP5.js";
17
+ import "./chunk-7BXOFLWJ.js";
18
+ import "./chunk-SXKKOOA7.js";
19
+ import "./chunk-MY4LVD64.js";
20
+ import "./chunk-XBL46B4V.js";
21
+ import "./chunk-XCYDTIVK.js";
22
+ import "./chunk-CKFVKHTB.js";
23
+ import "./chunk-XWBPP2HX.js";
24
+ import "./chunk-VYZ37D2Q.js";
25
+ import "./chunk-7MEVD5PI.js";
26
+ import "./chunk-ECZSYLSL.js";
27
+ import "./chunk-Y5E2WNWB.js";
28
+ import "./chunk-7KCBPAQS.js";
29
+ import "./chunk-ZVVMGPBJ.js";
30
+ export {
31
+ SCHEMA_DIALECT,
32
+ commandContract,
33
+ commandPathOf,
34
+ findCommand,
35
+ outputOf
36
+ };
@@ -4,48 +4,48 @@ import {
4
4
  COMMAND_SERVER_CONCURRENT,
5
5
  enterCommandServer,
6
6
  serveCommands
7
- } from "./chunk-CIWWNBVW.js";
8
- import "./chunk-NMZQTYKJ.js";
7
+ } from "./chunk-WRHAX53U.js";
9
8
  import {
10
9
  ensureSqlite
11
- } from "./chunk-HEIDAHRC.js";
12
- import "./chunk-OLKCJBZY.js";
10
+ } from "./chunk-77J5ID2O.js";
11
+ import "./chunk-PJ3FKBXG.js";
12
+ import "./chunk-DSUOYJUL.js";
13
13
  import {
14
14
  commandServerRequest,
15
15
  exitCodeSet,
16
16
  inCommandServerRequest
17
- } from "./chunk-KFB2X6KE.js";
18
- import "./chunk-DIA56CS7.js";
19
- import "./chunk-XQYKIZMG.js";
20
- import "./chunk-IACWKZWS.js";
21
- import "./chunk-MWGH3M46.js";
22
- import "./chunk-OLLIWNFG.js";
17
+ } from "./chunk-OCUKQRJ3.js";
18
+ import "./chunk-2FZMIJW7.js";
19
+ import "./chunk-HBK6MRAL.js";
20
+ import "./chunk-UIKVP23D.js";
21
+ import "./chunk-ZSWSFKNE.js";
22
+ import "./chunk-NZG6IRDW.js";
23
23
  import {
24
24
  asOwnProcess
25
- } from "./chunk-MBFPFWCO.js";
26
- import "./chunk-5ZYFV6FD.js";
27
- import "./chunk-U6IQ6YQ2.js";
28
- import "./chunk-CBYBZCQP.js";
29
- import "./chunk-K6HR6HCO.js";
30
- import "./chunk-KK4HD3SI.js";
31
- import "./chunk-434YOD6A.js";
32
- import "./chunk-YVNHQFLC.js";
33
- import "./chunk-LGZPKKBN.js";
34
- import "./chunk-37F6QYTO.js";
35
- import "./chunk-T27IMG6X.js";
36
- import "./chunk-TY644DKQ.js";
25
+ } from "./chunk-T7VERZP5.js";
26
+ import "./chunk-7BXOFLWJ.js";
27
+ import "./chunk-SXKKOOA7.js";
28
+ import "./chunk-MY4LVD64.js";
29
+ import "./chunk-XBL46B4V.js";
30
+ import "./chunk-XCYDTIVK.js";
31
+ import "./chunk-CKFVKHTB.js";
32
+ import "./chunk-XWBPP2HX.js";
33
+ import "./chunk-VYZ37D2Q.js";
34
+ import "./chunk-255RGG5W.js";
35
+ import "./chunk-ZVQDOKDY.js";
36
+ import "./chunk-7MEVD5PI.js";
37
37
  import {
38
38
  catchCrashes
39
- } from "./chunk-IZOYW4Z4.js";
39
+ } from "./chunk-ECZSYLSL.js";
40
40
  import "./chunk-Y5E2WNWB.js";
41
41
  import {
42
42
  CliError
43
- } from "./chunk-VUBZFMGP.js";
43
+ } from "./chunk-7KCBPAQS.js";
44
44
  import {
45
45
  __name
46
46
  } from "./chunk-ZVVMGPBJ.js";
47
47
 
48
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/cli/command-server-entry.js
48
+ // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/cli/command-server-entry.js
49
49
  import { PassThrough } from "node:stream";
50
50
  var route = /* @__PURE__ */ __name((stream, sink) => {
51
51
  const original = stream.write;
@@ -3,20 +3,20 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  SAMPLE_RATE,
5
5
  decodeOgg
6
- } from "./chunk-ND5H5ADM.js";
7
- import "./chunk-TY644DKQ.js";
8
- import "./chunk-IZOYW4Z4.js";
6
+ } from "./chunk-OC3U2JAK.js";
7
+ import "./chunk-7MEVD5PI.js";
8
+ import "./chunk-ECZSYLSL.js";
9
9
  import {
10
10
  importFrom
11
11
  } from "./chunk-Y5E2WNWB.js";
12
12
  import {
13
13
  CliError
14
- } from "./chunk-VUBZFMGP.js";
14
+ } from "./chunk-7KCBPAQS.js";
15
15
  import {
16
16
  __name
17
17
  } from "./chunk-ZVVMGPBJ.js";
18
18
 
19
- // node_modules/.pnpm/@wirecat+cli-core@0.647.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_a46df5420a4458268e3f15f3e8c41b99/node_modules/@wirecat/cli-core/dist/speech/decode.js
19
+ // node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/speech/decode.js
20
20
  import { spawn } from "node:child_process";
21
21
  import { mkdtemp, rm, writeFile } from "node:fs/promises";
22
22
  import { createRequire } from "node:module";
@@ -14,22 +14,22 @@ import {
14
14
  parseDescribe,
15
15
  shimFiles,
16
16
  writeShim
17
- } from "./chunk-4W4EVVL4.js";
17
+ } from "./chunk-IX3GUNGV.js";
18
18
  import "./chunk-Y5E2WNWB.js";
19
19
  import {
20
20
  CliError
21
- } from "./chunk-VUBZFMGP.js";
21
+ } from "./chunk-7KCBPAQS.js";
22
22
  import {
23
23
  __name,
24
24
  __toESM
25
25
  } from "./chunk-ZVVMGPBJ.js";
26
26
 
27
- // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/dispatch.js
27
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/dispatch.js
28
28
  var import_cross_spawn2 = __toESM(require_cross_spawn(), 1);
29
29
  import { randomUUID } from "node:crypto";
30
30
  import { constants } from "node:os";
31
31
 
32
- // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/path.js
32
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/path.js
33
33
  import { readdirSync, statSync } from "node:fs";
34
34
  import { join } from "node:path";
35
35
  var variable = /* @__PURE__ */ __name((env, name, platform) => platform === "win32" ? Object.entries(env).find(([key]) => key.toUpperCase() === name)?.[1] : env[name], "variable");
@@ -101,7 +101,7 @@ var findTools = /* @__PURE__ */ __name((search) => {
101
101
  }, "findTools");
102
102
  var isBuiltIn = /* @__PURE__ */ __name((name) => name === "wcat" || BUILT_IN_COMMANDS.includes(name), "isBuiltIn");
103
103
 
104
- // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/probe.js
104
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/probe.js
105
105
  var import_cross_spawn = __toESM(require_cross_spawn(), 1);
106
106
  import { readFileSync } from "node:fs";
107
107
  var probeDescribe = /* @__PURE__ */ __name((path, { env, timeoutMs }) => new Promise((resolve) => {
@@ -149,7 +149,7 @@ var baseVersion = /* @__PURE__ */ __name(() => {
149
149
  }
150
150
  }, "baseVersion");
151
151
 
152
- // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/shortcuts.js
152
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/shortcuts.js
153
153
  import { closeSync, openSync, readSync, realpathSync, rmSync } from "node:fs";
154
154
  import { basename, dirname } from "node:path";
155
155
  var WIRECAT_PACKAGE = /node_modules[\\/]+@wirecat[\\/]/;
@@ -241,7 +241,7 @@ var removeShortcuts = /* @__PURE__ */ __name((search, names) => listShortcuts(se
241
241
  return { ...statusOf(shortcut.name, shortcut.program, search), changed: true };
242
242
  }), "removeShortcuts");
243
243
 
244
- // node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/dispatch.js
244
+ // node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/dispatch.js
245
245
  var DEFAULT_DESCRIBE_TIMEOUT_MS = 2e3;
246
246
  var listTools = /* @__PURE__ */ __name(async (context) => {
247
247
  const installed = installedPrograms(context);
@@ -338,7 +338,7 @@ var runTool = /* @__PURE__ */ __name((path, args, context) => new Promise((resol
338
338
  });
339
339
  }), "runTool");
340
340
  var fail = /* @__PURE__ */ __name(async (error, json, context) => {
341
- const { errorObjectOf, exitCodeOfError, renderError } = await import("./failure-XP5QYV2T.js");
341
+ const { errorObjectOf, exitCodeOfError, renderError } = await import("./failure-COTPFUP4.js");
342
342
  const object = errorObjectOf(error);
343
343
  context.stderr.write(`${renderError(object, { cli: "wcat", interactive: !json })}
344
344
  `);