@wirecat/cli-template 0.13.2 → 0.15.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/.github/workflows/changelog-guard.yml +1 -1
  2. package/.github/workflows/ci.yml +1 -1
  3. package/.github/workflows/monthly.yml +1 -1
  4. package/.github/workflows/release.yml +1 -1
  5. package/CHANGELOG.md +35 -0
  6. package/config/parity-groups.json +32 -1
  7. package/contracts/mcp-tools.json +100 -0
  8. package/dist/bin/clidev.js +6 -2
  9. package/dist/bundle/{all-profiles-MJ6XSFOO.js → all-profiles-NVB2HT2S.js} +6 -6
  10. package/dist/bundle/{anthropic-W5UKBZUB.js → anthropic-ICTW7CNQ.js} +4 -4
  11. package/dist/bundle/{app-server-EZ46JAHB.js → app-server-OW5LT5XV.js} +40 -38
  12. package/dist/bundle/{bun-HB6O2TTT.js → bun-ILPS6AYA.js} +2 -2
  13. package/dist/bundle/{bun-sqlite-KBXOW2ES.js → bun-sqlite-JE6FJFQT.js} +3 -3
  14. package/dist/bundle/{chunk-KJTNT4SW.js → chunk-2DAXUNTS.js} +2 -2
  15. package/dist/bundle/chunk-3MDNAYQA.js +34 -0
  16. package/dist/bundle/chunk-3WDYHOAF.js +91 -0
  17. package/dist/bundle/{chunk-EGRB55FF.js → chunk-45244QQ6.js} +14 -12
  18. package/dist/bundle/{chunk-JHO2LL2J.js → chunk-4MU2UM4C.js} +7 -7
  19. package/dist/bundle/{chunk-N2Z3MCOF.js → chunk-5GTMQTQH.js} +37 -35
  20. package/dist/bundle/chunk-62JRF2JA.js +35 -0
  21. package/dist/bundle/{chunk-TGB5F7NC.js → chunk-66VMJGV6.js} +4 -4
  22. package/dist/bundle/{chunk-V3ZTQ24B.js → chunk-6AW4DDK4.js} +4 -4
  23. package/dist/bundle/{chunk-PJOVK7PG.js → chunk-7F5VMLVK.js} +49 -24
  24. package/dist/bundle/{chunk-YJNUDHJD.js → chunk-7UPBPE3Z.js} +139 -35
  25. package/dist/bundle/{chunk-MFS52LTZ.js → chunk-7Z4HR6GO.js} +1 -1
  26. package/dist/bundle/{chunk-E42W72PQ.js → chunk-AS2PJNQ2.js} +7 -5
  27. package/dist/bundle/{chunk-Z7MSIRSQ.js → chunk-CGFQT3LQ.js} +1 -1
  28. package/dist/bundle/{chunk-QKWRL4OD.js → chunk-DQIBGCF3.js} +6 -6
  29. package/dist/bundle/{chunk-RUKDZEID.js → chunk-DZLHY4IA.js} +3 -3
  30. package/dist/bundle/{chunk-TAYOKLGF.js → chunk-EMHCXXNJ.js} +7 -6
  31. package/dist/bundle/{chunk-AK257OMS.js → chunk-EX2FV7YJ.js} +209 -78
  32. package/dist/bundle/{chunk-IBBN7Z3A.js → chunk-F34HGYWF.js} +12 -3
  33. package/dist/bundle/{chunk-KRCCGWWS.js → chunk-FC53WQHG.js} +1 -1
  34. package/dist/bundle/{chunk-ERGB4NJA.js → chunk-G45R7M42.js} +1 -1
  35. package/dist/bundle/{chunk-ZLY6GUAS.js → chunk-G7W53MQP.js} +3 -3
  36. package/dist/bundle/{chunk-FZZIU4B7.js → chunk-GHF72SHT.js} +8196 -5601
  37. package/dist/bundle/{chunk-JAOGZMKQ.js → chunk-GUFPQZUA.js} +2 -2
  38. package/dist/bundle/{chunk-EFHLQXG6.js → chunk-IOJ2DTCY.js} +162 -55
  39. package/dist/bundle/{chunk-7IXL4UFK.js → chunk-KJ3UADR3.js} +8 -8
  40. package/dist/bundle/{chunk-L5WWMP5M.js → chunk-KLFYY7KC.js} +144 -31
  41. package/dist/bundle/{chunk-NOVLCHDV.js → chunk-LATYBJ4T.js} +2 -2
  42. package/dist/bundle/{chunk-QBP7OMN5.js → chunk-LFLSV353.js} +2 -2
  43. package/dist/bundle/{chunk-HDY5X3WQ.js → chunk-LU4A2T7Y.js} +4 -4
  44. package/dist/bundle/{chunk-SVDF6NJF.js → chunk-MWUHBEDN.js} +14 -14
  45. package/dist/bundle/{chunk-JRK73FOW.js → chunk-NENYWEXF.js} +1 -1
  46. package/dist/bundle/{chunk-ERKR3VJ5.js → chunk-NG7MOJBT.js} +141 -46
  47. package/dist/bundle/{chunk-2B5U4Z5H.js → chunk-NH6LZ3H3.js} +8 -13
  48. package/dist/bundle/{chunk-IGHEW777.js → chunk-NRZV7K4M.js} +5 -40
  49. package/dist/bundle/{chunk-4LURWBVV.js → chunk-NVGOHYTE.js} +188 -22
  50. package/dist/bundle/{chunk-OV6PHTAY.js → chunk-NVNUUHT5.js} +17130 -2232
  51. package/dist/bundle/chunk-PIJUGF5F.js +392 -0
  52. package/dist/bundle/{chunk-PBN4RBHS.js → chunk-R2JKPHH5.js} +8 -8
  53. package/dist/bundle/{chunk-PDGXMKJS.js → chunk-R5RYPD23.js} +2 -2
  54. package/dist/bundle/{chunk-35KYY65W.js → chunk-SOYOOU2D.js} +3 -3
  55. package/dist/bundle/{chunk-FDBINRWA.js → chunk-TJJ2XSJP.js} +5 -5
  56. package/dist/bundle/{chunk-O3UXNU3S.js → chunk-U6QD3J3F.js} +3 -3
  57. package/dist/bundle/{chunk-VYSUKHKL.js → chunk-VOTEB3AN.js} +1 -1
  58. package/dist/bundle/{chunk-IN3FVRPK.js → chunk-VS5LGSTM.js} +1 -1
  59. package/dist/bundle/{chunk-QJ6XW4DM.js → chunk-VVGPAHUN.js} +6211 -1207
  60. package/dist/bundle/{chunk-MJRSEUKG.js → chunk-VXOR76ZL.js} +13 -89
  61. package/dist/bundle/{chunk-CXQXVKUY.js → chunk-YIVY2WI3.js} +1 -1
  62. package/dist/bundle/{chunk-VLNKTMV7.js → chunk-YOJLIVGO.js} +959 -350
  63. package/dist/bundle/clidev.js +3 -3
  64. package/dist/bundle/command-contract-3MPKXBVL.js +28 -0
  65. package/dist/bundle/{decode-AMXUVKNY.js → decode-NXB5UKMO.js} +18 -16
  66. package/dist/bundle/{echarts-GJDMQ2AQ.js → echarts-DRDGGHJT.js} +2 -2
  67. package/dist/bundle/{embed-L4CRZ2XQ.js → embed-IKZ24BMC.js} +4 -4
  68. package/dist/bundle/{embedder-IBGV4M2K.js → embedder-GMQ24DOQ.js} +7 -7
  69. package/dist/bundle/{first-run-VTKC2IBV.js → first-run-PURIGDLD.js} +8 -8
  70. package/dist/bundle/first-screen-B2CF2CET.js +26 -0
  71. package/dist/bundle/{instructions-YJECS4KN.js → instructions-EOQOXY6V.js} +1 -1
  72. package/dist/bundle/{mcp-OQBZXELQ.js → mcp-7HBLFGCW.js} +2 -2
  73. package/dist/bundle/{mcp-GBSAK3VW.js → mcp-ASNYBQ5B.js} +38 -37
  74. package/dist/bundle/mcp-EY2NUYDQ.js +82 -0
  75. package/dist/bundle/{node-NQG4EVZR.js → node-52WF2326.js} +2 -2
  76. package/dist/bundle/{node-sqlite-BR7F3BLB.js → node-sqlite-73Z4SFOA.js} +9 -3
  77. package/dist/bundle/{oauth-J7UAWNIK.js → oauth-EVTPAMZP.js} +5 -5
  78. package/dist/bundle/{open-BR47R5UE.js → open-46WZAPJ3.js} +3 -2
  79. package/dist/bundle/openai-GWRDAHDU.js +248 -0
  80. package/dist/bundle/{process-66I7RDPJ.js → process-YIQPKLZI.js} +1 -1
  81. package/dist/bundle/{program-EM4FKOCK.js → program-37NVH5YJ.js} +11354 -9564
  82. package/dist/bundle/{prompt-NE5JJ7UP.js → prompt-IVEYRLS5.js} +3 -3
  83. package/dist/bundle/{recognize-GC3YFVIA.js → recognize-WVEKHODM.js} +4 -2
  84. package/dist/bundle/{remote-QELOMKQM.js → remote-4K5VPMC7.js} +5 -5
  85. package/dist/bundle/{rerank-BH6TZ2SP.js → rerank-V24UJZYJ.js} +5 -5
  86. package/dist/bundle/{serve-WWLRNDT2.js → serve-PJWSOV7F.js} +7 -7
  87. package/dist/bundle/server-3TPCEZ6P.js +40 -0
  88. package/dist/bundle/server-GQX5MZTT.js +53 -0
  89. package/dist/bundle/{state-2BEGXAMO.js → state-ZPYGECVP.js} +4 -4
  90. package/dist/bundle/{store-AH6WZMCF.js → store-6JQCLPQF.js} +14 -9
  91. package/dist/bundle/store-maintenance-command-ND4ADMGC.js +42 -0
  92. package/dist/config.d.ts +2 -0
  93. package/dist/config.d.ts.map +1 -1
  94. package/dist/config.js +4 -2
  95. package/dist/config.js.map +1 -1
  96. package/dist/program.d.ts.map +1 -1
  97. package/dist/program.js +2 -1
  98. package/dist/program.js.map +1 -1
  99. package/dist/version.d.ts +1 -1
  100. package/dist/version.js +1 -1
  101. package/docs/commands.md +37 -11
  102. package/docs/dev/reference-clis.md +1 -1
  103. package/docs/dev/skills/design-interview/SKILL.md +2 -2
  104. package/docs/dev/test-matrix.md +5 -1
  105. package/kit/dist/interview.js +1 -0
  106. package/kit/dist/new.js +8 -3
  107. package/package.json +3 -3
  108. package/src/config.ts +5 -2
  109. package/src/program.test.ts +86 -1
  110. package/src/program.ts +2 -1
  111. package/src/version.ts +1 -1
  112. package/dist/bundle/chunk-IDWW4TU2.js +0 -18
  113. package/dist/bundle/chunk-MUSYGFCY.js +0 -3556
  114. package/dist/bundle/chunk-O5EHUB2V.js +0 -2
  115. package/dist/bundle/command-contract-75VJ36U4.js +0 -29
  116. package/dist/bundle/first-screen-X5IJKBSU.js +0 -27
  117. package/dist/bundle/mcp-RDZGYPSY.js +0 -78
  118. package/dist/bundle/server-DE6NLNUF.js +0 -52
  119. package/dist/bundle/server-ZPSQKOAH.js +0 -39
  120. package/dist/bundle/store-maintenance-command-PBXX3IEV.js +0 -40
  121. /package/dist/bundle/{chunk-GOO67PDU.js → chunk-NL2DQPT7.js} +0 -0
@@ -0,0 +1,91 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ __name
5
+ } from "./chunk-ZVVMGPBJ.js";
6
+
7
+ // node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ab8c0b68b8b4768d5b87d6e249ef10da/node_modules/@wirecat/cli-core/dist/runs/secrets.js
8
+ var SECRET_WORDS = /* @__PURE__ */ new Set([
9
+ "authorization",
10
+ "cookie",
11
+ "credential",
12
+ "credentials",
13
+ "passphrase",
14
+ "password",
15
+ "passwd",
16
+ "pwd",
17
+ "pass",
18
+ "passcode",
19
+ "pin",
20
+ "otp",
21
+ "2fa",
22
+ "secret",
23
+ "token",
24
+ "contrase\xF1a",
25
+ "contrasena",
26
+ "clave",
27
+ "\u043F\u0430\u0440\u043E\u043B\u044C",
28
+ "\u043F\u0438\u043D",
29
+ "\u043A\u043E\u0434",
30
+ ...["api", "auth", "service", "account", "db", "database", "priv", "private", "client"].map((word) => `${word}key`),
31
+ ...["db", "database", "key"].map((word) => `${word}pass`)
32
+ ]);
33
+ var secretNamed = /* @__PURE__ */ __name((name) => {
34
+ const words = name.replace(/([a-z0-9])([A-Z])/g, "$1 $2").split(/[\s_.-]+/).map((word) => word.toLowerCase());
35
+ return words.some((word, at) => SECRET_WORDS.has(word) || SECRET_WORDS.has(word + (words[at + 1] ?? "")));
36
+ }, "secretNamed");
37
+ var START = "(?<![A-Za-z0-9_-])";
38
+ var END = "(?![A-Za-z0-9_-])";
39
+ var KNOWN_TOKENS = new RegExp(`${[
40
+ "gh[pousr]_[A-Za-z0-9]{36,}",
41
+ "github_pat_[A-Za-z0-9_]{22,}",
42
+ "sk-[A-Za-z0-9_-]{20,}",
43
+ "xox[abprs]-[A-Za-z0-9-]{10,}",
44
+ "(?:AKIA|ASIA)[A-Z0-9]{16}",
45
+ "AIza[A-Za-z0-9_-]{35}",
46
+ "(?:sk|rk)_(?:live|test)_[A-Za-z0-9]{10,}",
47
+ "npm_[A-Za-z0-9]{36}",
48
+ "eyJ[A-Za-z0-9_-]{5,}\\.eyJ[A-Za-z0-9_-]{5,}\\.[A-Za-z0-9_-]*"
49
+ ].map((pattern) => `${START}${pattern}${END}`).join("|")}|(?<!\\d)\\d{8,10}:[A-Za-z0-9_-]{35}${END}`, "g");
50
+ var PRIVATE_KEY = /-----BEGIN[A-Z ]* PRIVATE KEY-----[\s\S]*?(?:-----END[A-Z ]* PRIVATE KEY-----|$)/g;
51
+ var SCHEME = /(?<![A-Za-z])(Bearer|Basic)(\s+)(?![A-Z]?[a-z]+(?![A-Za-z0-9]))[A-Za-z0-9._~+/=-]{8,}/g;
52
+ var NAMED_PAIR = /(?<![\p{L}\p{N}])([\p{L}\p{N}_.-]*(?:token|pass|pwd|pin|otp|2fa|secret|credential|cookie|authorization|key|contrase|clave|пароль|пин|код)[\p{L}\p{N}_.-]*)(["']?\s*(?:=>|[:=])\s*["']?|\s+(?![\p{L}]+(?![\p{L}\p{N}])))((?:Bearer\s+|Basic\s+)?)([^\s"'&,;]+)/giu;
53
+ var looksRandom = /* @__PURE__ */ __name((run) => {
54
+ if (run.length < 20)
55
+ return false;
56
+ const classes = [/[a-z]/, /[A-Z]/, /\d/, /[^A-Za-z0-9]/].filter((kind) => kind.test(run)).length;
57
+ if (classes < 3)
58
+ return false;
59
+ let switches = 0;
60
+ for (let at = 1; at < run.length; at++) {
61
+ const [before, after] = [run[at - 1], run[at]];
62
+ if (/[a-z]/.test(before) && /[A-Z]/.test(after) || /[A-Z]/.test(before) && /[a-z]/.test(after))
63
+ switches += 1;
64
+ }
65
+ if (switches / run.length < 0.15)
66
+ return false;
67
+ const pieces = run.match(/[A-Z]?[a-z]+|[A-Z]+(?![a-z])|\d+/g) ?? [];
68
+ if (pieces.join("").length / Math.max(pieces.length, 1) >= 2.75)
69
+ return false;
70
+ return entropy(run) >= 3.5;
71
+ }, "looksRandom");
72
+ var entropy = /* @__PURE__ */ __name((text) => {
73
+ const counts = /* @__PURE__ */ new Map();
74
+ for (const char of text)
75
+ counts.set(char, (counts.get(char) ?? 0) + 1);
76
+ let bits = 0;
77
+ for (const count of counts.values())
78
+ bits -= count / text.length * Math.log2(count / text.length);
79
+ return bits;
80
+ }, "entropy");
81
+ var withoutSecrets = /* @__PURE__ */ __name((text, mark = "[redacted]") => text.replace(PRIVATE_KEY, mark).replace(KNOWN_TOKENS, mark).replace(SCHEME, `$1$2${mark}`).replace(NAMED_PAIR, (whole, name, separator, scheme) => secretNamed(name) ? `${name}${separator}${scheme}${mark}` : whole).replace(/[!-~]{20,}/g, (token) => (
82
+ // A URL or a path is somebody's address, not a key; a credential in one is caught by the rules above.
83
+ token.includes("://") || /^(?:\/|~\/|\.\.?\/)/.test(token) ? token : token.replace(RUN, (run) => looksRandom(run) ? mark : run.replace(HEX, (hex) => entropy(hex) >= 3 ? mark : hex))
84
+ )), "withoutSecrets");
85
+ var RUN = /(?<![A-Za-z0-9_+/-])[A-Za-z0-9_+/-]{20,}/g;
86
+ var HEX = /(?<![A-Za-z0-9])(?=[0-9]*[a-f])[0-9a-f]{20,}(?![A-Za-z0-9])/g;
87
+
88
+ export {
89
+ secretNamed,
90
+ withoutSecrets
91
+ };
@@ -2,23 +2,15 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  wirecatDirectory
5
- } from "./chunk-IDWW4TU2.js";
5
+ } from "./chunk-62JRF2JA.js";
6
6
  import {
7
7
  CliError
8
- } from "./chunk-EFHLQXG6.js";
8
+ } from "./chunk-IOJ2DTCY.js";
9
9
  import {
10
10
  __name
11
11
  } from "./chunk-ZVVMGPBJ.js";
12
12
 
13
- // node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/speech/install.js
14
- import { createHash, randomUUID } from "node:crypto";
15
- import { createReadStream, createWriteStream, mkdirSync, statSync } from "node:fs";
16
- import { rename, rm } from "node:fs/promises";
17
- import { dirname, join } from "node:path";
18
- import { Readable, Transform } from "node:stream";
19
- import { pipeline } from "node:stream/promises";
20
-
21
- // node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/speech/models.js
13
+ // node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ab8c0b68b8b4768d5b87d6e249ef10da/node_modules/@wirecat/cli-core/dist/speech/models.js
22
14
  var huggingFace = /* @__PURE__ */ __name((repository, commit) => (name) => `https://huggingface.co/csukuangfj/${repository}/resolve/${commit}/${name}`, "huggingFace");
23
15
  var gigaam = huggingFace("sherpa-onnx-nemo-transducer-punct-giga-am-v3-russian-2025-12-16", "a6039be7cee829a9044a69ac0ebaf1c191217c97");
24
16
  var gigaamCtc = huggingFace("sherpa-onnx-nemo-ctc-punct-giga-am-v3-russian-2025-12-16", "4fb5407ff028a69fec516cdf4c10fac9ddea7c16");
@@ -28,6 +20,7 @@ var MODELS = [
28
20
  id: "gigaam-v3",
29
21
  title: "GigaAM v3, with punctuation",
30
22
  languages: "Russian \u2014 the best of the three for Russian",
23
+ language: "ru",
31
24
  featureDim: 64,
32
25
  files: [
33
26
  {
@@ -65,6 +58,7 @@ var MODELS = [
65
58
  id: "gigaam-v3-ctc",
66
59
  title: "GigaAM v3 CTC, with punctuation \u2014 a little faster",
67
60
  languages: "Russian \u2014 a little faster, rougher with capital letters",
61
+ language: "ru",
68
62
  featureDim: 64,
69
63
  files: [
70
64
  {
@@ -125,6 +119,7 @@ var MODELS = [
125
119
  }), "config")
126
120
  }
127
121
  ];
122
+ var OPENAI_TRANSCRIBE_MODEL = "gpt-transcribe";
128
123
  var VAD = {
129
124
  name: "silero_vad.onnx",
130
125
  url: "https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/silero_vad.onnx",
@@ -142,7 +137,13 @@ var speechModel = /* @__PURE__ */ __name((id) => {
142
137
  return model;
143
138
  }, "speechModel");
144
139
 
145
- // node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/speech/install.js
140
+ // node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ab8c0b68b8b4768d5b87d6e249ef10da/node_modules/@wirecat/cli-core/dist/speech/install.js
141
+ import { createHash, randomUUID } from "node:crypto";
142
+ import { createReadStream, createWriteStream, mkdirSync, statSync } from "node:fs";
143
+ import { rename, rm } from "node:fs/promises";
144
+ import { dirname, join } from "node:path";
145
+ import { Readable, Transform } from "node:stream";
146
+ import { pipeline } from "node:stream/promises";
146
147
  var sharedModelsDirectory = /* @__PURE__ */ __name((kind, env = process.env) => join(wirecatDirectory(env), "models", kind), "sharedModelsDirectory");
147
148
  var modelsDirectory = /* @__PURE__ */ __name((env = process.env) => sharedModelsDirectory("audio", env), "modelsDirectory");
148
149
  var STALL_MS = 6e4;
@@ -247,6 +248,7 @@ var fetchInto = /* @__PURE__ */ __name(async (file, path, get, stalled) => {
247
248
  var megabytes = /* @__PURE__ */ __name((bytes) => bytes < 1e6 ? "under 1 MB" : `${Math.round(bytes / 1e6)} MB`, "megabytes");
248
249
 
249
250
  export {
251
+ OPENAI_TRANSCRIBE_MODEL,
250
252
  VAD,
251
253
  DEFAULT_ORDER,
252
254
  orderedModels,
@@ -7,7 +7,7 @@ import {
7
7
  commandPathOf,
8
8
  findCommand,
9
9
  outputOf
10
- } from "./chunk-IGHEW777.js";
10
+ } from "./chunk-NRZV7K4M.js";
11
11
  import {
12
12
  Command,
13
13
  Help,
@@ -18,16 +18,16 @@ import {
18
18
  environmentOf,
19
19
  metaOf,
20
20
  takesProfile
21
- } from "./chunk-QJ6XW4DM.js";
21
+ } from "./chunk-VVGPAHUN.js";
22
22
  import {
23
23
  CliError,
24
24
  writes
25
- } from "./chunk-EFHLQXG6.js";
25
+ } from "./chunk-IOJ2DTCY.js";
26
26
  import {
27
27
  __name
28
28
  } from "./chunk-ZVVMGPBJ.js";
29
29
 
30
- // node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/cli/help/sections.js
30
+ // node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ab8c0b68b8b4768d5b87d6e249ef10da/node_modules/@wirecat/cli-core/dist/cli/help/sections.js
31
31
  var SECTIONS = {
32
32
  read: "Read",
33
33
  write: "Write",
@@ -88,7 +88,7 @@ var CORE_SECTIONS = {
88
88
  upgrade: "setup"
89
89
  };
90
90
 
91
- // node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/cli/help/commands-text.js
91
+ // node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ab8c0b68b8b4768d5b87d6e249ef10da/node_modules/@wirecat/cli-core/dist/cli/help/commands-text.js
92
92
  var DESCRIPTION = 90;
93
93
  var COLUMN = 52;
94
94
  var short = /* @__PURE__ */ __name((text) => {
@@ -127,7 +127,7 @@ var commandsText = /* @__PURE__ */ __name((root, commands, scope) => {
127
127
  `;
128
128
  }, "commandsText");
129
129
 
130
- // node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/cli/help/command-help.js
130
+ // node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ab8c0b68b8b4768d5b87d6e249ef10da/node_modules/@wirecat/cli-core/dist/cli/help/command-help.js
131
131
  var ARGUMENT_KINDS = {
132
132
  chat: "chat",
133
133
  chats: "chat",
@@ -319,7 +319,7 @@ var installCommandHelp = /* @__PURE__ */ __name((program, { profile = true } = {
319
319
  command.addHelpText("after", () => commandHelpText(command));
320
320
  }, "installCommandHelp");
321
321
 
322
- // node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/cli/help/first-screen.js
322
+ // node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ab8c0b68b8b4768d5b87d6e249ef10da/node_modules/@wirecat/cli-core/dist/cli/help/first-screen.js
323
323
  var WIRECAT_TOOLS = [
324
324
  {
325
325
  command: "tg",
@@ -12,13 +12,13 @@ import {
12
12
  registerPrompts,
13
13
  stdinFieldOf,
14
14
  syncsFirst
15
- } from "./chunk-ERKR3VJ5.js";
15
+ } from "./chunk-NG7MOJBT.js";
16
16
  import {
17
17
  mcpUrlOf
18
- } from "./chunk-JAOGZMKQ.js";
18
+ } from "./chunk-GUFPQZUA.js";
19
19
  import {
20
20
  answeredWire
21
- } from "./chunk-IN3FVRPK.js";
21
+ } from "./chunk-VS5LGSTM.js";
22
22
  import {
23
23
  BinaryResource,
24
24
  Picture,
@@ -39,20 +39,21 @@ import {
39
39
  tool,
40
40
  toolKey,
41
41
  toolsFromCommands
42
- } from "./chunk-YJNUDHJD.js";
42
+ } from "./chunk-7UPBPE3Z.js";
43
43
  import {
44
44
  agentJson,
45
45
  skillResource
46
- } from "./chunk-4LURWBVV.js";
46
+ } from "./chunk-NVGOHYTE.js";
47
47
  import {
48
48
  StdioServerTransport,
49
49
  callerOf,
50
+ callingAgent,
50
51
  serveStdio
51
- } from "./chunk-IBBN7Z3A.js";
52
+ } from "./chunk-F34HGYWF.js";
52
53
  import {
53
54
  connectedFor,
54
55
  guardFor
55
- } from "./chunk-L5WWMP5M.js";
56
+ } from "./chunk-KLFYY7KC.js";
56
57
  import {
57
58
  capability,
58
59
  dateWindow,
@@ -61,51 +62,51 @@ import {
61
62
  servicesFor,
62
63
  storedDeps,
63
64
  wholeList
64
- } from "./chunk-FZZIU4B7.js";
65
+ } from "./chunk-GHF72SHT.js";
65
66
  import {
66
67
  instructions
67
- } from "./chunk-ERGB4NJA.js";
68
+ } from "./chunk-G45R7M42.js";
68
69
  import {
69
70
  McpServer,
70
71
  ResourceTemplate
71
72
  } from "./chunk-5D4AEUVA.js";
72
73
  import {
73
74
  mcpHttpMarker
74
- } from "./chunk-V3ZTQ24B.js";
75
- import {
76
- openStore,
77
- pdfPreviewLimits
78
- } from "./chunk-OV6PHTAY.js";
75
+ } from "./chunk-6AW4DDK4.js";
79
76
  import {
80
77
  findCommand
81
- } from "./chunk-IGHEW777.js";
78
+ } from "./chunk-NRZV7K4M.js";
82
79
  import {
83
80
  DEFAULT_OUTPUT_BYTES,
84
81
  changesAuthorityAt,
85
82
  describeProgram,
86
83
  environmentOf,
87
- fetchesOnlyAt,
88
84
  itemOf,
89
85
  judgedTargets,
90
86
  levelFor,
91
87
  readKeysForCommand,
92
88
  readOnlyLockOf,
89
+ readsOverMcpAt,
93
90
  recalledAccount,
94
91
  rootOf2 as rootOf,
95
92
  sealed,
96
93
  snakeKeys,
97
94
  typedCommand
98
- } from "./chunk-QJ6XW4DM.js";
95
+ } from "./chunk-VVGPAHUN.js";
99
96
  import {
100
97
  isCliFailure,
101
98
  withCaller
102
- } from "./chunk-MJRSEUKG.js";
99
+ } from "./chunk-VXOR76ZL.js";
100
+ import {
101
+ openStore,
102
+ pdfPreviewLimits
103
+ } from "./chunk-NVNUUHT5.js";
103
104
  import {
104
105
  timezoneOf
105
- } from "./chunk-VLNKTMV7.js";
106
+ } from "./chunk-YOJLIVGO.js";
106
107
  import {
107
108
  warmEmbedders
108
- } from "./chunk-QKWRL4OD.js";
109
+ } from "./chunk-DQIBGCF3.js";
109
110
  import {
110
111
  CliError,
111
112
  description,
@@ -123,15 +124,15 @@ import {
123
124
  strictObject,
124
125
  string,
125
126
  visibleControls
126
- } from "./chunk-EFHLQXG6.js";
127
+ } from "./chunk-IOJ2DTCY.js";
127
128
  import {
128
129
  __name
129
130
  } from "./chunk-ZVVMGPBJ.js";
130
131
 
131
- // node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/mcp/server.js
132
+ // node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ab8c0b68b8b4768d5b87d6e249ef10da/node_modules/@wirecat/cli-core/dist/mcp/server.js
132
133
  import { randomUUID } from "node:crypto";
133
134
 
134
- // node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/mcp/agent-log.js
135
+ // node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ab8c0b68b8b4768d5b87d6e249ef10da/node_modules/@wirecat/cli-core/dist/mcp/agent-log.js
135
136
  var agentLog = /* @__PURE__ */ __name((open) => {
136
137
  let held;
137
138
  return {
@@ -150,7 +151,7 @@ var agentLog = /* @__PURE__ */ __name((open) => {
150
151
  };
151
152
  }, "agentLog");
152
153
 
153
- // node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/mcp/resources.js
154
+ // node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ab8c0b68b8b4768d5b87d6e249ef10da/node_modules/@wirecat/cli-core/dist/mcp/resources.js
154
155
  var LISTED = 100;
155
156
  var registerResources = /* @__PURE__ */ __name((server, session, { command, name, limit, recorded, withStore, messenger, guard, assertRead }) => {
156
157
  server.registerResource("chat", new ResourceTemplate(`${command}://chat/{id}`, {
@@ -188,7 +189,7 @@ var registerResources = /* @__PURE__ */ __name((server, session, { command, name
188
189
  });
189
190
  }, "registerResources");
190
191
 
191
- // node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/mcp/session.js
192
+ // node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ab8c0b68b8b4768d5b87d6e249ef10da/node_modules/@wirecat/cli-core/dist/mcp/session.js
192
193
  var HARMLESS = /* @__PURE__ */ new Set(["validation_error", "not_found", "permission_error", "confirmation_required", "rate_limited"]);
193
194
  var harmless = /* @__PURE__ */ __name((code) => HARMLESS.has(code), "harmless");
194
195
  var MessengerSession = class {
@@ -263,7 +264,7 @@ var MessengerSession = class {
263
264
  }
264
265
  };
265
266
 
266
- // node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/mcp/tools/attachments.js
267
+ // node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ab8c0b68b8b4768d5b87d6e249ef10da/node_modules/@wirecat/cli-core/dist/mcp/tools/attachments.js
267
268
  var attachmentsTools = /* @__PURE__ */ __name((messenger) => {
268
269
  const _command = messenger.app.command;
269
270
  return {
@@ -317,7 +318,7 @@ var attachmentsTools = /* @__PURE__ */ __name((messenger) => {
317
318
  };
318
319
  }, "attachmentsTools");
319
320
 
320
- // node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/mcp/tools/messages-photo.js
321
+ // node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ab8c0b68b8b4768d5b87d6e249ef10da/node_modules/@wirecat/cli-core/dist/mcp/tools/messages-photo.js
321
322
  var PHOTO_LIMIT = 512 * 1024;
322
323
  var IMAGE_TYPES = [
323
324
  ["image/jpeg", (b) => b[0] === 255 && b[1] === 216 && b[2] === 255],
@@ -371,7 +372,7 @@ var readUpTo = /* @__PURE__ */ __name(async (file, limit, saveIt) => {
371
372
  return new Uint8Array(Buffer.concat(chunks));
372
373
  }, "readUpTo");
373
374
 
374
- // node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/mcp/tools/stats.js
375
+ // node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ab8c0b68b8b4768d5b87d6e249ef10da/node_modules/@wirecat/cli-core/dist/mcp/tools/stats.js
375
376
  var statsTools = /* @__PURE__ */ __name((messenger) => ({
376
377
  stats_charts: tool({
377
378
  title: "A chart from a chat's statistics",
@@ -408,14 +409,14 @@ var statsTools = /* @__PURE__ */ __name((messenger) => ({
408
409
  })
409
410
  }), "statsTools");
410
411
 
411
- // node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/mcp/tools.js
412
+ // node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ab8c0b68b8b4768d5b87d6e249ef10da/node_modules/@wirecat/cli-core/dist/mcp/tools.js
412
413
  var pictureTools = /* @__PURE__ */ __name((messenger) => Object.fromEntries(Object.entries({
413
414
  ...messagesPhotoTools(messenger),
414
415
  ...attachmentsTools(messenger),
415
416
  ...statsTools(messenger)
416
417
  }).map(([name, definition]) => [name, { ...definition, input: strictObject(definition.input.entries) }])), "pictureTools");
417
418
 
418
- // node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/mcp/server.js
419
+ // node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ab8c0b68b8b4768d5b87d6e249ef10da/node_modules/@wirecat/cli-core/dist/mcp/server.js
419
420
  var PER_RUN = /* @__PURE__ */ new Set([
420
421
  "streams",
421
422
  "stdin",
@@ -485,7 +486,7 @@ var createServer = /* @__PURE__ */ __name((command, context, messenger, sessionO
485
486
  readOnly: readOnlyLockOf(app, context.env) !== void 0,
486
487
  keyOf,
487
488
  authority,
488
- fetchOnly: fetchesOnlyAt(root),
489
+ fetchOnly: readsOverMcpAt(root),
489
490
  offline: true,
490
491
  stdin
491
492
  }).map((one) => "sync_first" in one.input.entries && !syncAllowed(one.path) ? {
@@ -533,10 +534,10 @@ var createServer = /* @__PURE__ */ __name((command, context, messenger, sessionO
533
534
  });
534
535
  const skill = messenger.skill ? skillResource(app, messenger.skill) : void 0;
535
536
  const log = agentLog(() => openStore({ env: context.env, command: app.command, version: app.version }));
536
- const audit = /* @__PURE__ */ __name(async (call) => {
537
+ const audit = /* @__PURE__ */ __name(async (call, caller) => {
537
538
  if (!recalledAccount(app, provider, settings.profile, context.env))
538
539
  return;
539
- await log.record({ actor: { bot: `${app.command}-mcp` }, ...call });
540
+ await log.record({ actor: { bot: callingAgent(`${app.command}-mcp`, caller) }, ...call });
540
541
  }, "audit");
541
542
  const targets = judgedTargets(root);
542
543
  const passed = Object.fromEntries(Object.entries(environment).filter(([key]) => !PER_RUN.has(key)));
@@ -608,7 +609,7 @@ var createServer = /* @__PURE__ */ __name((command, context, messenger, sessionO
608
609
  ...outcomeOf(result),
609
610
  startedAt,
610
611
  finishedAt: Date.now()
611
- }).catch(() => void 0);
612
+ }, caller).catch(() => void 0);
612
613
  return result;
613
614
  }, "run")
614
615
  }), "asCommand");
@@ -739,12 +740,13 @@ var serveOverStdio = /* @__PURE__ */ __name(async (command, context, messenger,
739
740
  }, "serveOverStdio");
740
741
  var serveOverHttpUntilStopped = /* @__PURE__ */ __name(async (command, context, messenger, options, http) => {
741
742
  const { session, embedders, build, log } = createServer(command, context, messenger, options);
742
- const { serveOverHttp } = await import("./serve-WWLRNDT2.js");
743
+ const { serveOverHttp } = await import("./serve-PJWSOV7F.js");
743
744
  const appName = messenger.app.command;
744
745
  const appEnvPrefix = messenger.app.envPrefix;
745
746
  const listening = await serveOverHttp(build, {
746
747
  ...http,
747
748
  appName,
749
+ reaches: "your messages",
748
750
  // In the background its log is a file; the code goes only to the lock that `mcp server status` reads.
749
751
  onCode: /* @__PURE__ */ __name((code, expires) => context.renderer.note(context.env[mcpHttpMarker(appEnvPrefix)] === void 0 ? `login code for a new browser app: ${code} (until ${expires.toTimeString().slice(0, 5)}; a new one after each login)` : `a new login code for a browser app: \`${appName} ${context.settings.profile} mcp server status\``), "onCode"),
750
752
  onError: /* @__PURE__ */ __name((error) => context.renderer.note(`mcp: ${error.message}`), "onError")
@@ -0,0 +1,35 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ resolvePaths
5
+ } from "./chunk-IOJ2DTCY.js";
6
+ import {
7
+ __name
8
+ } from "./chunk-ZVVMGPBJ.js";
9
+
10
+ // node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ab8c0b68b8b4768d5b87d6e249ef10da/node_modules/@wirecat/cli-core/dist/store/path.js
11
+ import { userInfo } from "node:os";
12
+ import { isAbsolute, join, relative, resolve } from "node:path";
13
+ var wirecatDirectory = /* @__PURE__ */ __name((env = process.env, platform) => resolvePaths({ appName: "WireCat", prefix: "WIRECAT", env, ...platform ? { platform } : {} }).state, "wirecatDirectory");
14
+ var storePath = /* @__PURE__ */ __name((env = process.env) => env.MESSAGING_STORE ?? join(wirecatDirectory(env), "wirecat.db"), "storePath");
15
+ var accountHome = /* @__PURE__ */ __name(() => {
16
+ try {
17
+ return userInfo().homedir;
18
+ } catch {
19
+ return void 0;
20
+ }
21
+ }, "accountHome");
22
+ var refuseOwnerStoreInTests = /* @__PURE__ */ __name((file, env = process.env, home = accountHome()) => {
23
+ if (!env.VITEST || !home || file === ":memory:")
24
+ return;
25
+ const inside = relative(wirecatDirectory({ HOME: home, USERPROFILE: home }), resolve(file));
26
+ if (inside.startsWith("..") || isAbsolute(inside))
27
+ return;
28
+ throw new Error(`a test tried to open ${file}, in the owner's real WireCat folder; give it a MESSAGING_STORE or HOME of its own`);
29
+ }, "refuseOwnerStoreInTests");
30
+
31
+ export {
32
+ wirecatDirectory,
33
+ storePath,
34
+ refuseOwnerStoreInTests
35
+ };
@@ -8,12 +8,12 @@ import {
8
8
  ACCESS_SECONDS,
9
9
  REFRESH_SECONDS,
10
10
  readStored
11
- } from "./chunk-V3ZTQ24B.js";
11
+ } from "./chunk-6AW4DDK4.js";
12
12
  import {
13
13
  __name
14
14
  } from "./chunk-ZVVMGPBJ.js";
15
15
 
16
- // node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/mcp/http/oauth.js
16
+ // node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ab8c0b68b8b4768d5b87d6e249ef10da/node_modules/@wirecat/cli-core/dist/mcp/http/oauth.js
17
17
  import { createHash, randomBytes, randomInt, timingSafeEqual } from "node:crypto";
18
18
  import { chmodSync, mkdirSync, renameSync, rmSync, writeFileSync } from "node:fs";
19
19
  import { dirname } from "node:path";
@@ -57,7 +57,7 @@ var redirectAllowed = /* @__PURE__ */ __name((uri) => {
57
57
  return false;
58
58
  }
59
59
  }, "redirectAllowed");
60
- var ownerLogin = /* @__PURE__ */ __name(({ issuer, resource, file, appName, onCode, now = /* @__PURE__ */ __name(() => Date.now(), "now") }) => {
60
+ var ownerLogin = /* @__PURE__ */ __name(({ issuer, resource, file, appName, reaches = `your ${appName} data`, onCode, now = /* @__PURE__ */ __name(() => Date.now(), "now") }) => {
61
61
  const store = tokenFile(file);
62
62
  const codes = /* @__PURE__ */ new Map();
63
63
  let login = { value: "", expires: 0 };
@@ -153,7 +153,7 @@ var ownerLogin = /* @__PURE__ */ __name(({ issuer, resource, file, appName, onCo
153
153
  const hidden = ["response_type", "client_id", "redirect_uri", "code_challenge", "code_challenge_method", "state"].map((name) => `<input type="hidden" name="${name}" value="${escapeHtml(params.get(name) ?? "")}">`).join("");
154
154
  const who = escapeHtml(client.name ?? "an application");
155
155
  const target = new URL(params.get("redirect_uri") ?? "");
156
- const html = `<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>${escapeHtml(appName)} login</title><style>body{font:16px system-ui,sans-serif;max-width:28rem;margin:3rem auto;padding:0 1rem;color:#1d2430}input[type=text]{font:20px ui-monospace,monospace;letter-spacing:.1em;width:100%;padding:.5rem;margin:.5rem 0 1rem;box-sizing:border-box}button{font:inherit;padding:.5rem 1rem}.error{color:#b42318}</style></head><body><h1>${escapeHtml(appName)}</h1><p>An app that calls itself <strong>${who}</strong> asks to reach your messages through <code>${escapeHtml(appName)} mcp --http</code>.</p><p>After you allow it, the login goes to <strong>${escapeHtml(target.host)}</strong>. Allow only if that is the app you are connecting, such as chatgpt.com or claude.ai.</p><p>Type the code shown in WireCat Desktop, or in the terminal where the server runs. If you did not start this login, close this page.</p>${message ? `<p class="error">${escapeHtml(message)}</p>` : ""}<form method="post" action="${escapeHtml(`${base}/authorize`)}">${hidden}<label>Login code<input type="text" name="login_code" autocomplete="off" autofocus required></label><button type="submit">Allow</button></form></body></html>`;
156
+ const html = `<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>${escapeHtml(appName)} login</title><style>body{font:16px system-ui,sans-serif;max-width:28rem;margin:3rem auto;padding:0 1rem;color:#1d2430}input[type=text]{font:20px ui-monospace,monospace;letter-spacing:.1em;width:100%;padding:.5rem;margin:.5rem 0 1rem;box-sizing:border-box}button{font:inherit;padding:.5rem 1rem}.error{color:#b42318}</style></head><body><h1>${escapeHtml(appName)}</h1><p>An app that calls itself <strong>${who}</strong> asks to reach ${escapeHtml(reaches)} through <code>${escapeHtml(appName)} mcp serve --http</code>.</p><p>After you allow it, the login goes to <strong>${escapeHtml(target.host)}</strong>. Allow only if that is the app you are connecting, such as chatgpt.com or claude.ai.</p><p>Type the code shown in WireCat Desktop, or in the terminal where the server runs. If you did not start this login, close this page.</p>${message ? `<p class="error">${escapeHtml(message)}</p>` : ""}<form method="post" action="${escapeHtml(`${base}/authorize`)}">${hidden}<label>Login code<input type="text" name="login_code" autocomplete="off" autofocus required></label><button type="submit">Allow</button></form></body></html>`;
157
157
  return new Response(html, {
158
158
  status: message ? 400 : 200,
159
159
  headers: {
@@ -5,15 +5,15 @@ import {
5
5
  readLock,
6
6
  releaseLock,
7
7
  takeLock
8
- } from "./chunk-RUKDZEID.js";
8
+ } from "./chunk-DZLHY4IA.js";
9
9
  import {
10
10
  __name
11
11
  } from "./chunk-ZVVMGPBJ.js";
12
12
 
13
- // node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/mcp/http/state.js
13
+ // node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ab8c0b68b8b4768d5b87d6e249ef10da/node_modules/@wirecat/cli-core/dist/mcp/http/state.js
14
14
  import { existsSync as existsSync2, readFileSync as readFileSync2 } from "node:fs";
15
15
 
16
- // node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/mcp/http/activity.js
16
+ // node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ab8c0b68b8b4768d5b87d6e249ef10da/node_modules/@wirecat/cli-core/dist/mcp/http/activity.js
17
17
  import { randomBytes } from "node:crypto";
18
18
  import { chmodSync, existsSync, mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
19
19
  import { dirname } from "node:path";
@@ -86,7 +86,7 @@ var activityRecorder = /* @__PURE__ */ __name((path, now = Date.now) => {
86
86
  };
87
87
  }, "activityRecorder");
88
88
 
89
- // node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/mcp/http/state.js
89
+ // node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ab8c0b68b8b4768d5b87d6e249ef10da/node_modules/@wirecat/cli-core/dist/mcp/http/state.js
90
90
  var ACCESS_SECONDS = 60 * 60;
91
91
  var REFRESH_SECONDS = 30 * 24 * 60 * 60;
92
92
  var readStored = /* @__PURE__ */ __name((path) => existsSync2(path) ? JSON.parse(readFileSync2(path, "utf8")) : { clients: [], tokens: [] }, "readStored");