@wirecat/tg-cli 0.113.0 → 0.115.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 (118) hide show
  1. package/dist/bin/tg.js +6 -2
  2. package/dist/bin/tg.js.map +1 -1
  3. package/dist/bundle/{adapter-EQKEFGPB.js → adapter-ODK7R4LY.js} +56 -53
  4. package/dist/bundle/{all-profiles-TTBFF663.js → all-profiles-AQYM65BS.js} +9 -8
  5. package/dist/bundle/{anthropic-XPZS7267.js → anthropic-VBDSVNIM.js} +6 -5
  6. package/dist/bundle/{app-server-ZSZ7KRAY.js → app-server-YOIHLBNS.js} +47 -43
  7. package/dist/bundle/{bot-api-X7BOVNIO.js → bot-api-TRYLGQKK.js} +51 -47
  8. package/dist/bundle/{bot-history-DWIUIPN5.js → bot-history-7DTJLBBJ.js} +18 -16
  9. package/dist/bundle/{bun-ZGZVAJU2.js → bun-XIMM6EHD.js} +2 -2
  10. package/dist/bundle/{bun-sqlite-UN2UJ6SI.js → bun-sqlite-6B3BL5IV.js} +5 -4
  11. package/dist/bundle/{chunk-K3F46QVN.js → chunk-2TC76TLJ.js} +4 -4
  12. package/dist/bundle/{chunk-JRTZ5I6M.js → chunk-5ROWSRK7.js} +2 -2
  13. package/dist/bundle/{chunk-PHYDBR5M.js → chunk-63YKD7YA.js} +2 -2
  14. package/dist/bundle/{chunk-PCRLXJRH.js → chunk-77M3IAVU.js} +193 -129
  15. package/dist/bundle/{chunk-VDATXIO4.js → chunk-A4BQGSKI.js} +9 -9
  16. package/dist/bundle/{chunk-HO53POQG.js → chunk-AICS3TSF.js} +8 -41
  17. package/dist/bundle/{chunk-AVUIWZTP.js → chunk-AVWPMJ6E.js} +2 -2
  18. package/dist/bundle/{chunk-G74QMORP.js → chunk-BEQPZA3S.js} +2 -2
  19. package/dist/bundle/{chunk-JO45BOYE.js → chunk-BIEBJLYO.js} +8 -3
  20. package/dist/bundle/{chunk-J6USEBA6.js → chunk-BPPRR7TV.js} +2200 -945
  21. package/dist/bundle/chunk-CCHHEMPM.js +71 -0
  22. package/dist/bundle/{chunk-T4TTRFP5.js → chunk-CNO3R4O4.js} +10 -8
  23. package/dist/bundle/{chunk-IDUYRTPF.js → chunk-D4E345BC.js} +2 -2
  24. package/dist/bundle/{chunk-OYNSFQ7K.js → chunk-D72URWJE.js} +1 -39
  25. package/dist/bundle/{chunk-T5RM4Y35.js → chunk-DIABP7ZP.js} +3 -3
  26. package/dist/bundle/chunk-EW3XTUPB.js +166 -0
  27. package/dist/bundle/{chunk-KOWQVHXI.js → chunk-GCFU6WBE.js} +3 -3
  28. package/dist/bundle/{chunk-6WJ5M2Q4.js → chunk-GWDMKEDY.js} +4 -4
  29. package/dist/bundle/{chunk-TQ6EA7TB.js → chunk-GX4DMI4H.js} +17 -16
  30. package/dist/bundle/{chunk-KK3JVOOV.js → chunk-HZKWB6WS.js} +36 -35
  31. package/dist/bundle/chunk-ILHTNOIV.js +23 -0
  32. package/dist/bundle/{chunk-JDQSX2JQ.js → chunk-IUDIRZVU.js} +8443 -7398
  33. package/dist/bundle/{chunk-TUD4MU7S.js → chunk-JZXQZW2D.js} +2 -2
  34. package/dist/bundle/{chunk-Q264PYGE.js → chunk-KDOBY524.js} +55 -20
  35. package/dist/bundle/{chunk-OQR442B6.js → chunk-KIZT2MI6.js} +1 -1
  36. package/dist/bundle/chunk-L4CMCC3V.js +34 -0
  37. package/dist/bundle/{chunk-IYKRHDX6.js → chunk-LUIPXRKN.js} +188 -57
  38. package/dist/bundle/{chunk-GX4LRLVD.js → chunk-M7B5IMH3.js} +5103 -937
  39. package/dist/bundle/{chunk-4GLMEES6.js → chunk-MUZ4KYGY.js} +4 -2
  40. package/dist/bundle/{chunk-KQ23JWLJ.js → chunk-NTW5ZE47.js} +164 -276
  41. package/dist/bundle/{chunk-UIVLDKWT.js → chunk-O7CBGHI7.js} +1 -1
  42. package/dist/bundle/{chunk-KVLCIZUK.js → chunk-OMP6ALBT.js} +3 -3
  43. package/dist/bundle/{chunk-VVA4555T.js → chunk-OSP335AJ.js} +8 -8
  44. package/dist/bundle/{chunk-EGR5IJCG.js → chunk-OUX3QMYI.js} +39 -31
  45. package/dist/bundle/{chunk-VDEXNNMH.js → chunk-PEJHI7QO.js} +6 -4
  46. package/dist/bundle/{chunk-6F6K3LWV.js → chunk-PEKTB3FQ.js} +18 -15
  47. package/dist/bundle/{chunk-Z6TRIW2O.js → chunk-POKTQZOM.js} +11 -9
  48. package/dist/bundle/chunk-PQLBPYJR.js +46 -0
  49. package/dist/bundle/{chunk-BI5YJZJB.js → chunk-PZAEI4NM.js} +115 -29
  50. package/dist/bundle/{chunk-HNN7EKIM.js → chunk-QK6VLKG5.js} +338 -169
  51. package/dist/bundle/{chunk-5NF7M4MN.js → chunk-RFRI2HFT.js} +1 -1
  52. package/dist/bundle/{chunk-OC4RRFKH.js → chunk-RHUNMU4Q.js} +6 -6
  53. package/dist/bundle/{chunk-PHPNA2HU.js → chunk-TMATSEP5.js} +14 -12
  54. package/dist/bundle/{chunk-JW7BMJ6O.js → chunk-TQYMLXDS.js} +5 -3
  55. package/dist/bundle/{chunk-MTX5EDYJ.js → chunk-U67TSAAO.js} +1136 -535
  56. package/dist/bundle/{chunk-7IWDS2CM.js → chunk-UBQ3LOF6.js} +4 -4
  57. package/dist/bundle/{chunk-UE75KPAC.js → chunk-UY7GJRGY.js} +4 -4
  58. package/dist/bundle/{chunk-OSBAISA5.js → chunk-VQCWVZWG.js} +8 -13
  59. package/dist/bundle/{chunk-XZ2ZHIAO.js → chunk-VVKEWWSO.js} +1 -1
  60. package/dist/bundle/{chunk-ENXO43TV.js → chunk-WDNNN3J4.js} +8 -8
  61. package/dist/bundle/{chunk-AGUCXSSM.js → chunk-WINKEV4F.js} +7 -20
  62. package/dist/bundle/{chunk-XXNJF3ZM.js → chunk-WMG4IGEB.js} +75 -33
  63. package/dist/bundle/{chunk-6OKGHHRL.js → chunk-WMRFAK5B.js} +35 -35
  64. package/dist/bundle/{chunk-4SQB5VKL.js → chunk-WOQGUIXE.js} +1 -1
  65. package/dist/bundle/{chunk-U3MJQLZQ.js → chunk-XIYRHIBK.js} +13 -13
  66. package/dist/bundle/{chunk-ZID2Y4XU.js → chunk-XY7IGVVS.js} +2 -2
  67. package/dist/bundle/{chunk-3MAYYFKY.js → chunk-Y3AQHPAJ.js} +1 -1
  68. package/dist/bundle/{chunk-WSAHUQ6K.js → chunk-YCUQKFGD.js} +3 -3
  69. package/dist/bundle/command-contract-YF4KGFXC.js +32 -0
  70. package/dist/bundle/{decode-AMQVTEMW.js → decode-2GATBZGH.js} +7 -6
  71. package/dist/bundle/dispatch-MJMW7WDH.js +411 -0
  72. package/dist/bundle/{echarts-ECYONFQJ.js → echarts-GKEZEAL7.js} +2 -2
  73. package/dist/bundle/{embed-VZYBZEWI.js → embed-TBQPLA4Y.js} +6 -5
  74. package/dist/bundle/{embedder-GSWBGHRK.js → embedder-B5DTNCRO.js} +11 -10
  75. package/dist/bundle/entry-A6DEW2TD.js +18 -0
  76. package/dist/bundle/failure-TLF3SISS.js +24 -0
  77. package/dist/bundle/first-run-3N5AABEY.js +27 -0
  78. package/dist/bundle/first-screen-HANARM67.js +30 -0
  79. package/dist/bundle/{instructions-AXLQQS3G.js → instructions-P5E34PQR.js} +1 -1
  80. package/dist/bundle/{mcp-VVMPUDSL.js → mcp-MNI62HHE.js} +5 -3
  81. package/dist/bundle/{node-7JHC5K77.js → node-GKPRXS5Y.js} +2 -2
  82. package/dist/bundle/{node-sqlite-LYJEK46T.js → node-sqlite-GIDPALK3.js} +11 -4
  83. package/dist/bundle/{oauth-BROPKI3K.js → oauth-C57W4IMD.js} +7 -6
  84. package/dist/bundle/{open-C6XQ46JK.js → open-E6Q4WRPU.js} +5 -3
  85. package/dist/bundle/{openai-VWSU7ZDD.js → openai-5WMXY2KP.js} +15 -14
  86. package/dist/bundle/{process-QKEFL5HL.js → process-U2P5Z6UF.js} +1 -1
  87. package/dist/bundle/{program-ACY7O33O.js → program-FEUDU6GF.js} +62 -57
  88. package/dist/bundle/{prompt-EGULVW2F.js → prompt-4NGAZGHE.js} +5 -4
  89. package/dist/bundle/{proxy-transport-KIMADLQ2.js → proxy-transport-MGCJ7JAW.js} +5 -4
  90. package/dist/bundle/{recognize-UMTKLWVR.js → recognize-EUHRBA7V.js} +4 -3
  91. package/dist/bundle/{remote-DABI7PSQ.js → remote-3JHLB2FV.js} +7 -6
  92. package/dist/bundle/{rerank-ZFATWWBE.js → rerank-ZZ45SZPC.js} +7 -6
  93. package/dist/bundle/{serve-B7YYCMGN.js → serve-XOGX5FC5.js} +12 -10
  94. package/dist/bundle/server-DRE5MJ76.js +59 -0
  95. package/dist/bundle/{server-DGKZISZH.js → server-I6O72XP5.js} +36 -34
  96. package/dist/bundle/{state-AQ2PABA5.js → state-BIUYTGH6.js} +6 -5
  97. package/dist/bundle/{store-46GJTFLJ.js → store-FOJFYOMR.js} +12 -10
  98. package/dist/bundle/store-maintenance-command-YKV2C34N.js +49 -0
  99. package/dist/bundle/tg.js +159 -14
  100. package/dist/commands/context.d.ts.map +1 -1
  101. package/dist/commands/context.js +6 -4
  102. package/dist/commands/context.js.map +1 -1
  103. package/dist/reasons.d.ts.map +1 -1
  104. package/dist/reasons.js +5 -0
  105. package/dist/reasons.js.map +1 -1
  106. package/dist/version.d.ts +1 -1
  107. package/dist/version.js +1 -1
  108. package/package.json +5 -4
  109. package/skills/tg-cli/SKILL.md +2 -0
  110. package/dist/bundle/chunk-452UZ2PU.js +0 -3603
  111. package/dist/bundle/command-contract-GV67H22L.js +0 -32
  112. package/dist/bundle/entry-LALZILY4.js +0 -14
  113. package/dist/bundle/first-run-LEAI623Q.js +0 -24
  114. package/dist/bundle/first-screen-MOCVLE23.js +0 -30
  115. package/dist/bundle/identity-54HA5GN6.js +0 -11
  116. package/dist/bundle/server-UC7UWUIS.js +0 -56
  117. package/dist/bundle/store-maintenance-command-FCFKHGRM.js +0 -45
  118. /package/dist/bundle/{chunk-HPXYN7F3.js → chunk-NUN6OGOV.js} +0 -0
@@ -8,12 +8,12 @@ import {
8
8
  ACCESS_SECONDS,
9
9
  REFRESH_SECONDS,
10
10
  readStored
11
- } from "./chunk-UE75KPAC.js";
11
+ } from "./chunk-UY7GJRGY.js";
12
12
  import {
13
13
  __name
14
14
  } from "./chunk-ZVVMGPBJ.js";
15
15
 
16
- // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/mcp/http/oauth.js
16
+ // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/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: {
@@ -3,10 +3,10 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  proxyError,
5
5
  proxyLabel
6
- } from "./chunk-4GLMEES6.js";
6
+ } from "./chunk-MUZ4KYGY.js";
7
7
  import {
8
8
  CliError
9
- } from "./chunk-PCRLXJRH.js";
9
+ } from "./chunk-CCHHEMPM.js";
10
10
  import {
11
11
  __name
12
12
  } from "./chunk-ZVVMGPBJ.js";
@@ -2,12 +2,12 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  resolvePaths
5
- } from "./chunk-KQ23JWLJ.js";
5
+ } from "./chunk-NTW5ZE47.js";
6
6
  import {
7
7
  __name
8
8
  } from "./chunk-ZVVMGPBJ.js";
9
9
 
10
- // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/path.js
10
+ // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/store/path.js
11
11
  import { join } from "node:path";
12
12
  var wirecatDirectory = /* @__PURE__ */ __name((env = process.env, platform) => resolvePaths({ appName: "WireCat", prefix: "WIRECAT", env, ...platform ? { platform } : {} }).state, "wirecatDirectory");
13
13
  var storePath = /* @__PURE__ */ __name((env = process.env) => env.MESSAGING_STORE ?? join(wirecatDirectory(env), "wirecat.db"), "storePath");
@@ -1,42 +1,33 @@
1
1
  import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ errorCodes,
5
+ isCliError,
6
+ visibleControls
7
+ } from "./chunk-CCHHEMPM.js";
3
8
  import {
4
9
  __name
5
10
  } from "./chunk-ZVVMGPBJ.js";
6
11
 
7
- // node_modules/.pnpm/@wirecat+cli-base@0.73.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/errors.js
8
- var errorCodes = [
9
- "validation_error",
10
- "configuration_error",
11
- "authentication_error",
12
- "permission_error",
13
- "not_found",
14
- "confirmation_required",
15
- "rate_limited",
16
- "timeout",
17
- "network_error",
18
- "provider_error",
19
- "provider_unavailable",
20
- "invalid_response",
21
- "outcome_unknown",
22
- "cancelled"
23
- ];
24
- var BRAND = /* @__PURE__ */ Symbol.for("@wirecat/cli-base/CliError");
25
- var CliError = class extends Error {
26
- static {
27
- __name(this, "CliError");
28
- }
29
- code;
30
- details;
31
- constructor(code, message, details = {}) {
32
- super(message);
33
- this.name = "CliError";
34
- this.code = code;
35
- this.details = details;
36
- Object.defineProperty(this, BRAND, { value: true });
37
- }
12
+ // node_modules/.pnpm/@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/exit-codes.js
13
+ var EXIT_CODES = {
14
+ validation_error: 2,
15
+ configuration_error: 3,
16
+ authentication_error: 4,
17
+ permission_error: 5,
18
+ not_found: 6,
19
+ confirmation_required: 7,
20
+ rate_limited: 8,
21
+ timeout: 9,
22
+ network_error: 10,
23
+ provider_error: 11,
24
+ provider_unavailable: 12,
25
+ invalid_response: 13,
26
+ outcome_unknown: 14,
27
+ cancelled: 130
38
28
  };
39
- var isCliError = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null && value[BRAND] === true, "isCliError");
29
+ var exitCodeFor = /* @__PURE__ */ __name((code) => EXIT_CODES[code], "exitCodeFor");
30
+ var GENERIC_FAILURE = 1;
40
31
 
41
32
  // node_modules/.pnpm/valibot@1.5.0_typescript@7.0.2/node_modules/valibot/dist/index.mjs
42
33
  var store$4;
@@ -1289,6 +1280,14 @@ function unwrap(schema) {
1289
1280
  }
1290
1281
  __name(unwrap, "unwrap");
1291
1282
 
1283
+ // node_modules/.pnpm/@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/effects.js
1284
+ var EFFECT_LEVELS = ["none", "read", "write"];
1285
+ var effectsSchema = strictObject({
1286
+ remote: picklist(EFFECT_LEVELS),
1287
+ local: picklist(EFFECT_LEVELS)
1288
+ });
1289
+ var writes = /* @__PURE__ */ __name((effects) => effects === void 0 || effects.remote === "write" || effects.local === "write", "writes");
1290
+
1292
1291
  // node_modules/.pnpm/@valibot+to-json-schema@1.8.0_valibot@1.5.0_typescript@7.0.2_/node_modules/@valibot/to-json-schema/dist/index.mjs
1293
1292
  function addError(errors, message) {
1294
1293
  if (errors) {
@@ -1918,7 +1917,7 @@ function toStandardJsonSchema(schema) {
1918
1917
  }
1919
1918
  __name(toStandardJsonSchema, "toStandardJsonSchema");
1920
1919
 
1921
- // node_modules/.pnpm/@wirecat+cli-base@0.73.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/registry.js
1920
+ // node_modules/.pnpm/@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/registry.js
1922
1921
  var word = pipe(string(), regex(/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/, "a lower-case word, words joined by -"));
1923
1922
  var SNAKE_CASE = /^[a-z][a-z0-9]*(_[a-z0-9]+)*$/;
1924
1923
  var text = pipe(string(), regex(/\S/, "must not be empty"));
@@ -1960,16 +1959,9 @@ var fill = /* @__PURE__ */ __name((template, values) => template.replace(PLACEHO
1960
1959
  return String(value);
1961
1960
  }), "fill");
1962
1961
 
1963
- // node_modules/.pnpm/@wirecat+cli-base@0.73.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/effects.js
1964
- var EFFECT_LEVELS = ["none", "read", "write"];
1965
- var effectsSchema = strictObject({
1966
- remote: picklist(EFFECT_LEVELS),
1967
- local: picklist(EFFECT_LEVELS)
1968
- });
1969
- var writes = /* @__PURE__ */ __name((effects) => effects === void 0 || effects.remote === "write" || effects.local === "write", "writes");
1970
-
1971
- // node_modules/.pnpm/@wirecat+cli-base@0.73.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/output.js
1962
+ // node_modules/.pnpm/@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/output.js
1972
1963
  var MAX_NEXT_STEPS = 2;
1964
+ var COMPACT_FLAG = "--compact";
1973
1965
  var isoTime = pipe(string(), isoTimestamp("an ISO 8601 time in UTC"), endsWith("Z", "an ISO 8601 time in UTC, ending in `Z`"));
1974
1966
  var localTime = pipe(string(), regex(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}[+-]\d{2}:\d{2}$/, "an ISO 8601 time with its offset"));
1975
1967
  var reference = pipe(string(), regex(/^[a-z]+:\S+$/, "a reference such as `note:42`"));
@@ -2068,7 +2060,7 @@ var jsonlOf = /* @__PURE__ */ __name(({ items, page, meta }) => [
2068
2060
  JSON.stringify({ type: "end", complete: meta.complete, ...meta.issues ? { issues: meta.issues } : {}, page })
2069
2061
  ].join("\n"), "jsonlOf");
2070
2062
 
2071
- // node_modules/.pnpm/@wirecat+cli-base@0.73.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/errors.js
2063
+ // node_modules/.pnpm/@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/errors.js
2072
2064
  var CRASH_CODE = "internal_error";
2073
2065
  var CRASH_REASON = "command.crashed";
2074
2066
  var errorObjectSchema = strictObject({
@@ -2155,7 +2147,7 @@ var BASE_REASONS = defineReasons([
2155
2147
  { reason: CRASH_REASON, code: CRASH_CODE, message: "the command failed; this is a bug", details: [] }
2156
2148
  ]);
2157
2149
 
2158
- // node_modules/.pnpm/@wirecat+cli-base@0.73.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/steps.js
2150
+ // node_modules/.pnpm/@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/steps.js
2159
2151
  var SAME_COMMAND = "*";
2160
2152
  var commandPath = pipe(string(), regex(/^[a-z][a-z0-9-]*( [a-z][a-z0-9-]*)*$/, "a command path such as `messages sync`"));
2161
2153
  var stepSchema = union([
@@ -2234,88 +2226,157 @@ var STEPS = defineSteps([
2234
2226
  }
2235
2227
  ]);
2236
2228
 
2237
- // node_modules/.pnpm/@wirecat+cli-base@0.73.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/log.js
2238
- var LOG_SEVERITIES = ["trace", "debug", "info", "warn", "error", "fatal"];
2239
- var logRecordSchema = strictObject({
2240
- time: isoTime,
2241
- severity: picklist(LOG_SEVERITIES),
2242
- /** The registered event id, `provider.request.failed`: never a sentence, so never content. */
2243
- body: string(),
2244
- run_id: text,
2245
- /** From an MCP caller's `_meta.traceparent`, when it sent one. */
2246
- trace_id: optional(pipe(string(), regex(/^[0-9a-f]{32}$/, "32 lower-case hex digits"))),
2247
- command: string(),
2248
- attributes: record(string(), unknown()),
2249
- resource: strictObject({ service: text, version: text })
2250
- });
2251
- var logEventSchema = strictObject({
2252
- id: dottedId,
2253
- meaning: text,
2254
- /** Attribute keys every record of this event carries. */
2255
- keys: array(string())
2256
- });
2257
- var defineLogEvents = /* @__PURE__ */ __name((input) => parseRegistry("log events", array(logEventSchema), input, (events) => [
2258
- ...duplicates(events.map((event) => event.id)).map((id) => `"${id}" is listed twice`),
2259
- ...events.flatMap((event) => duplicates(event.keys).map((key) => `${event.id}: key "${key}" is listed twice`))
2260
- ]), "defineLogEvents");
2261
- var LOG_EVENTS = defineLogEvents([
2262
- { id: "command.failed", meaning: "a command ended with an error", keys: ["code", "reason"] }
2263
- ]);
2264
- var LOG_ATTRIBUTE_KEYS = [
2265
- "code",
2266
- "count",
2267
- "durationMs",
2268
- "errorClass",
2269
- "errorCode",
2270
- "event",
2271
- "frames",
2272
- "operation",
2273
- "outcome",
2274
- "reason",
2275
- "status"
2276
- ];
2277
- var CONTENT_WORDS = /* @__PURE__ */ new Set([
2278
- "authorization",
2279
- "body",
2280
- "caption",
2281
- "content",
2282
- "cookie",
2283
- "credential",
2284
- "credentials",
2285
- "email",
2286
- "password",
2287
- "phone",
2288
- "query",
2289
- "secret",
2290
- "text",
2291
- "title",
2292
- "token"
2293
- ]);
2294
- var CONTENT_LAST_WORDS = /* @__PURE__ */ new Set(["message", "name"]);
2295
- var wordsOf = /* @__PURE__ */ __name((key) => key.replace(/([a-z0-9])([A-Z])/g, "$1 $2").split(/[\s_.-]+/).filter(Boolean).map((word2) => word2.toLowerCase()), "wordsOf");
2296
- var isContentKey = /* @__PURE__ */ __name((key) => {
2297
- const words = wordsOf(key);
2298
- return words.some((word2) => CONTENT_WORDS.has(word2)) || CONTENT_LAST_WORDS.has(words.at(-1) ?? "");
2299
- }, "isContentKey");
2300
- var TRACEPARENT = /^([0-9a-f]{2})-([0-9a-f]{32})-([0-9a-f]{16})-([0-9a-f]{2})(-.*)?$/;
2301
- var traceIdOf = /* @__PURE__ */ __name((traceparent) => {
2302
- if (typeof traceparent !== "string")
2229
+ // node_modules/.pnpm/@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/failure.js
2230
+ var recognise = /* @__PURE__ */ __name((failure) => {
2231
+ if (isCliError(failure))
2232
+ return failure;
2233
+ if (!(failure instanceof Error) || failure.name !== "CliError")
2303
2234
  return void 0;
2304
- const match = TRACEPARENT.exec(traceparent.trim());
2305
- if (!match)
2235
+ const { code, details } = failure;
2236
+ if (!errorCodes.includes(code))
2306
2237
  return void 0;
2307
- const [, version, traceId = "", parentId = "", , rest] = match;
2308
- if (version === "ff" || version === "00" && rest !== void 0)
2309
- return void 0;
2310
- if (/^0+$/.test(traceId) || /^0+$/.test(parentId))
2311
- return void 0;
2312
- return traceId;
2313
- }, "traceIdOf");
2238
+ return {
2239
+ code,
2240
+ message: failure.message,
2241
+ details: typeof details === "object" && details !== null ? details : {}
2242
+ };
2243
+ }, "recognise");
2244
+ var reasonFor = /* @__PURE__ */ __name((code, named, reasons) => reasons.find((entry) => entry.reason === named && entry.code === code) ?? BASE_REASONS.find((entry) => entry.reason === named && entry.code === code) ?? // The first base reason for each code is its fallback.
2245
+ BASE_REASONS.find((entry) => entry.code === code), "reasonFor");
2246
+ var nextFor = /* @__PURE__ */ __name((reason, details, context) => {
2247
+ const definition = reason.step ? context.steps?.find((step) => step.id === reason.step) : void 0;
2248
+ if (!definition)
2249
+ return [];
2250
+ const known = new Set(definition.kind === "command" ? definition.args.map((arg) => arg.name) : []);
2251
+ const args = Object.fromEntries(Object.entries(details).filter(([key, value]) => known.has(key) && value !== void 0));
2252
+ try {
2253
+ return [stepOf(definition, { args, ...context.targets ? { targets: context.targets } : {} })];
2254
+ } catch {
2255
+ return [];
2256
+ }
2257
+ }, "nextFor");
2258
+ var TRANSIENT = [
2259
+ "rate_limited",
2260
+ "timeout",
2261
+ "network_error",
2262
+ "provider_unavailable"
2263
+ ];
2264
+ var retryOf = /* @__PURE__ */ __name((code, details, effects) => {
2265
+ const transient = details.retryable !== false && (TRANSIENT.includes(code) || code === "provider_error" && details.retryable === true);
2266
+ const safe = code !== "outcome_unknown" && transient && (!writes(effects) || details.sent === false);
2267
+ const after = details.retry_after_ms;
2268
+ return safe && typeof after === "number" && Number.isInteger(after) && after >= 0 ? { safe, after_ms: after } : { safe };
2269
+ }, "retryOf");
2270
+ var errorObjectOf = /* @__PURE__ */ __name((failure, context = {}) => {
2271
+ const reasons = context.reasons ?? [];
2272
+ const recognised = recognise(failure);
2273
+ if (!recognised) {
2274
+ const reason2 = reasonFor(CRASH_CODE, CRASH_REASON, reasons);
2275
+ return {
2276
+ error: {
2277
+ code: CRASH_CODE,
2278
+ reason: reason2.reason,
2279
+ message: reason2.message,
2280
+ retry: { safe: false },
2281
+ ...context.runId ? { run_id: context.runId } : {}
2282
+ }
2283
+ };
2284
+ }
2285
+ const { code, message, details } = recognised;
2286
+ const reason = reasonFor(code, details.reason, reasons);
2287
+ const allowed = /* @__PURE__ */ new Set([...COMMON_DETAILS, ...context.details ?? [], ...reason.details]);
2288
+ allowed.delete("cause");
2289
+ const kept = Object.fromEntries(Object.entries(details).filter(([key, value]) => allowed.has(key) && value !== void 0));
2290
+ const next = nextFor(reason, details, context);
2291
+ const runId = context.runId ?? (typeof details.run_id === "string" ? details.run_id : void 0);
2292
+ return {
2293
+ error: {
2294
+ code,
2295
+ reason: reason.reason,
2296
+ message,
2297
+ ...typeof details.param === "string" ? { param: details.param } : {},
2298
+ ...Object.keys(kept).length > 0 ? { details: kept } : {},
2299
+ ...next.length > 0 ? { next } : {},
2300
+ retry: retryOf(code, details, context.effects),
2301
+ ...runId ? { run_id: runId } : {}
2302
+ }
2303
+ };
2304
+ }, "errorObjectOf");
2305
+ var exitCodeOfError = /* @__PURE__ */ __name(({ error }) => error.code === CRASH_CODE ? GENERIC_FAILURE : EXIT_CODES[error.code], "exitCodeOfError");
2306
+ var exitCodeOfAnswer = /* @__PURE__ */ __name((meta, partial2 = false) => {
2307
+ if (meta.complete || partial2)
2308
+ return 0;
2309
+ const code = meta.issues?.[0]?.code;
2310
+ return code === void 0 ? GENERIC_FAILURE : EXIT_CODES[code];
2311
+ }, "exitCodeOfAnswer");
2312
+ var kebab = /* @__PURE__ */ __name((name) => name.replaceAll("_", "-"), "kebab");
2313
+ var commandLine = /* @__PURE__ */ __name((cli, step) => [
2314
+ cli,
2315
+ step.command,
2316
+ ...Object.entries(step.args).map(([name, value]) => value === true ? `--${kebab(name)}` : `--${kebab(name)} ${JSON.stringify(value)}`)
2317
+ ].join(" "), "commandLine");
2318
+ var STACK_FRAMES = 10;
2319
+ var errorRecordOf = /* @__PURE__ */ __name((failure, object2, options) => {
2320
+ const thrown = failure instanceof Error ? failure : void 0;
2321
+ const { cause, ...details } = recognise(failure)?.details ?? {};
2322
+ const stack = thrown?.stack?.split("\n").slice(1, STACK_FRAMES + 1).map((line) => visibleControls(line.trim()));
2323
+ const reason = thrown?.cause ?? cause;
2324
+ return {
2325
+ time: (options.time ?? /* @__PURE__ */ new Date()).toISOString(),
2326
+ severity: "error",
2327
+ body: "command.failed",
2328
+ ...object2.error.run_id ? { run_id: object2.error.run_id } : {},
2329
+ command: options.command,
2330
+ attributes: {
2331
+ code: object2.error.code,
2332
+ reason: object2.error.reason,
2333
+ message: object2.error.message,
2334
+ ...Object.keys(details).length > 0 ? { details } : {},
2335
+ ...thrown ? { name: thrown.name, thrown_message: visibleControls(thrown.message) } : { thrown: String(failure) },
2336
+ ...reason === void 0 ? {} : { cause: visibleControls(reason instanceof Error ? reason.message : String(reason)) },
2337
+ ...stack && stack.length > 0 ? { stack } : {}
2338
+ },
2339
+ resource: { service: options.service, version: options.version }
2340
+ };
2341
+ }, "errorRecordOf");
2342
+ var renderError = /* @__PURE__ */ __name((object2, options) => {
2343
+ if (!options.interactive)
2344
+ return [JSON.stringify(object2), ...options.record ? [JSON.stringify(options.record)] : []].join("\n");
2345
+ const { message, next, run_id: runId } = object2.error;
2346
+ const step = next?.[0];
2347
+ return [
2348
+ `\u2717 ${visibleControls(message)}`,
2349
+ ...step?.kind === "command" ? [`\u2192 ${visibleControls(step.why)}: ${visibleControls(step.line ?? commandLine(options.cli, step))}`] : step ? [`\u2192 ${visibleControls(step.why)}`] : [],
2350
+ ...options.record ? [JSON.stringify(options.record, null, 2)] : runId ? [`details: ${options.cli} runs show ${runId}`] : []
2351
+ ].join("\n");
2352
+ }, "renderError");
2353
+ var mcpErrorResult = /* @__PURE__ */ __name((object2) => ({
2354
+ content: [{ type: "text", text: JSON.stringify(object2) }],
2355
+ structuredContent: object2,
2356
+ isError: true
2357
+ }), "mcpErrorResult");
2358
+ var catchCrashes = /* @__PURE__ */ __name((options) => {
2359
+ const target = options.target ?? process;
2360
+ const write = options.write ?? ((text2) => process.stderr.write(`${text2}
2361
+ `));
2362
+ const exit = options.exit ?? ((code) => process.exit(code));
2363
+ const crashed = /* @__PURE__ */ __name((failure) => {
2364
+ const object2 = errorObjectOf(failure, options);
2365
+ write(renderError(object2, { cli: options.cli, interactive: options.interactive }));
2366
+ exit(exitCodeOfError(object2));
2367
+ }, "crashed");
2368
+ target.on("uncaughtException", crashed);
2369
+ target.on("unhandledRejection", crashed);
2370
+ return () => {
2371
+ target.off("uncaughtException", crashed);
2372
+ target.off("unhandledRejection", crashed);
2373
+ };
2374
+ }, "catchCrashes");
2314
2375
 
2315
2376
  export {
2316
- errorCodes,
2317
- CliError,
2318
- isCliError,
2377
+ EXIT_CODES,
2378
+ exitCodeFor,
2379
+ GENERIC_FAILURE,
2319
2380
  getDotPath,
2320
2381
  check,
2321
2382
  description,
@@ -2368,11 +2429,13 @@ export {
2368
2429
  word,
2369
2430
  SNAKE_CASE,
2370
2431
  text,
2432
+ dottedId,
2371
2433
  RegistryError,
2372
2434
  parseRegistry,
2373
2435
  duplicates,
2374
2436
  jsonSchemaOf,
2375
2437
  MAX_NEXT_STEPS,
2438
+ COMPACT_FLAG,
2376
2439
  isoTime,
2377
2440
  reference,
2378
2441
  pageSchema,
@@ -2380,16 +2443,17 @@ export {
2380
2443
  itemEnvelopeSchema,
2381
2444
  jsonlOf,
2382
2445
  CRASH_CODE,
2383
- CRASH_REASON,
2384
2446
  errorObjectSchema,
2385
2447
  defineReasons,
2386
- COMMON_DETAILS,
2387
- BASE_REASONS,
2388
2448
  defineSteps,
2389
2449
  stepOf,
2390
2450
  STEPS,
2391
- defineLogEvents,
2392
- LOG_ATTRIBUTE_KEYS,
2393
- isContentKey,
2394
- traceIdOf
2451
+ retryOf,
2452
+ errorObjectOf,
2453
+ exitCodeOfError,
2454
+ exitCodeOfAnswer,
2455
+ errorRecordOf,
2456
+ renderError,
2457
+ mcpErrorResult,
2458
+ catchCrashes
2395
2459
  };
@@ -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-PHYDBR5M.js";
5
+ } from "./chunk-63YKD7YA.js";
6
6
  import {
7
- resolvePaths,
8
- singleLine
9
- } from "./chunk-KQ23JWLJ.js";
7
+ resolvePaths
8
+ } from "./chunk-NTW5ZE47.js";
10
9
  import {
11
- CliError
12
- } from "./chunk-PCRLXJRH.js";
10
+ CliError,
11
+ singleLine
12
+ } from "./chunk-CCHHEMPM.js";
13
13
  import {
14
14
  __name
15
15
  } from "./chunk-ZVVMGPBJ.js";
16
16
 
17
- // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/shared-config.js
17
+ // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/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.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/domain/task-categories.js
21
+ // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/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.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/shared-config.js
776
+ // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/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 });
@@ -1,54 +1,24 @@
1
1
  import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
- ENTITIES
5
- } from "./chunk-452UZ2PU.js";
6
- import {
7
- annotate,
4
+ answerEntitySchema,
5
+ answerProjectionSchema,
8
6
  answerSchema,
9
7
  describeOptions,
10
8
  keyForCommand,
11
9
  metaOf
12
- } from "./chunk-GX4LRLVD.js";
10
+ } from "./chunk-M7B5IMH3.js";
13
11
  import {
14
- CliError,
15
12
  jsonSchemaOf
16
- } from "./chunk-PCRLXJRH.js";
13
+ } from "./chunk-77M3IAVU.js";
14
+ import {
15
+ CliError
16
+ } from "./chunk-CCHHEMPM.js";
17
17
  import {
18
18
  __name
19
19
  } from "./chunk-ZVVMGPBJ.js";
20
20
 
21
- // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/cli/answer-entity.js
22
- var schemas = /* @__PURE__ */ new WeakMap();
23
- var answerEntity = /* @__PURE__ */ __name((command, name, schema, options = {}) => {
24
- if (Object.hasOwn(ENTITIES, name))
25
- throw new Error(`${name} is a shared entity; use its existing schema`);
26
- if (!/^[a-z][a-z0-9_]*$/.test(name))
27
- throw new Error("an answer entity needs a lowercase name");
28
- if (!("entries" in schema) && schema.type !== "union")
29
- throw new Error("an answer entity needs an object schema or a union of object schemas");
30
- if (options.project && !("entries" in options.project) && options.project.type !== "union")
31
- throw new Error("projection needs an object schema or a union of object schemas");
32
- schemas.set(command, { name, schema, ...options });
33
- return annotate(command, { output: { entity: name } });
34
- }, "answerEntity");
35
- var answerEntitySchema = /* @__PURE__ */ __name((command) => {
36
- const output = command && metaOf(command).output;
37
- if (!output)
38
- return void 0;
39
- const name = output.view ? `${output.entity}.${output.view}` : output.entity;
40
- const shared = ENTITIES[name];
41
- if (shared)
42
- return shared;
43
- const own = schemas.get(command);
44
- return own?.name === name ? own.schema : void 0;
45
- }, "answerEntitySchema");
46
- var answerProjectionSchema = /* @__PURE__ */ __name((command) => {
47
- const own = command && schemas.get(command);
48
- return own && metaOf(command).output?.entity === own.name ? own.project : void 0;
49
- }, "answerProjectionSchema");
50
-
51
- // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/cli/command-contract.js
21
+ // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/cli/command-contract.js
52
22
  var SCHEMA_DIALECT = "https://json-schema.org/draft/2020-12/schema";
53
23
  var outputOf = /* @__PURE__ */ __name((command) => {
54
24
  const entity = answerEntitySchema(command);
@@ -153,9 +123,6 @@ var commandContract = /* @__PURE__ */ __name((command) => {
153
123
  }, "commandContract");
154
124
 
155
125
  export {
156
- answerEntity,
157
- answerEntitySchema,
158
- answerProjectionSchema,
159
126
  SCHEMA_DIALECT,
160
127
  outputOf,
161
128
  commandPathOf,
@@ -2,12 +2,12 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  CliError
5
- } from "./chunk-PCRLXJRH.js";
5
+ } from "./chunk-CCHHEMPM.js";
6
6
  import {
7
7
  __name
8
8
  } from "./chunk-ZVVMGPBJ.js";
9
9
 
10
- // node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/cli/input-policy.js
10
+ // node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/cli/input-policy.js
11
11
  var MAX_BUFFERED_INPUT = 16 * 1024 * 1024;
12
12
  var MAX_SECRET_INPUT = 64 * 1024;
13
13
  var policies = /* @__PURE__ */ new WeakMap();
@@ -2,11 +2,11 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  openCache
5
- } from "./chunk-OSBAISA5.js";
5
+ } from "./chunk-VQCWVZWG.js";
6
6
  import {
7
7
  CliError,
8
8
  isCliError
9
- } from "./chunk-PCRLXJRH.js";
9
+ } from "./chunk-CCHHEMPM.js";
10
10
  import {
11
11
  __name
12
12
  } from "./chunk-ZVVMGPBJ.js";
@@ -2,7 +2,7 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  defineReasons
5
- } from "./chunk-PCRLXJRH.js";
5
+ } from "./chunk-77M3IAVU.js";
6
6
 
7
7
  // dist/reasons.js
8
8
  var REASONS = defineReasons([
@@ -17,11 +17,16 @@ var REASONS = defineReasons([
17
17
  "provider_unavailable",
18
18
  "Telegram's updates stopped arriving although the connection is open"
19
19
  ],
20
- ["write.unanswered", "outcome_unknown", "Telegram did not answer a write, so it may have happened"]
20
+ ["write.unanswered", "outcome_unknown", "Telegram did not answer a write, so it may have happened"],
21
+ [
22
+ "credentials.unreachable",
23
+ "provider_unavailable",
24
+ "this profile has logged in here, but the keyring holding its keys is locked or out of reach"
25
+ ]
21
26
  ].map(([reason, code, message]) => ({ reason, code, message, details: [] })));
22
27
 
23
28
  // dist/version.js
24
- var VERSION = "0.113.0";
29
+ var VERSION = "0.115.0";
25
30
 
26
31
  // dist/identity.js
27
32
  var TG = {