@wirecat/tg-cli 0.101.0 → 0.103.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 (126) hide show
  1. package/dist/bin/tg.js +31 -19
  2. package/dist/bot/transport.d.ts.map +1 -1
  3. package/dist/bot/transport.js +14 -17
  4. package/dist/bot/transport.js.map +1 -1
  5. package/dist/bundle/{adapter-A3VD4Y6Z.js → adapter-QG3YFFOY.js} +101 -38
  6. package/dist/bundle/{all-profiles-UPVNHXB2.js → all-profiles-ECXH3TBF.js} +32 -11
  7. package/dist/bundle/{anthropic-IRKNWPIB.js → anthropic-5MKO3QX7.js} +10 -10
  8. package/dist/bundle/{bot-api-UNTQG2M5.js → bot-api-4DQPIOMK.js} +55 -58
  9. package/dist/bundle/{bot-history-V4RTY5K7.js → bot-history-UN74XXLU.js} +19 -19
  10. package/dist/bundle/{bun-2JZPG2NL.js → bun-PS73VF2C.js} +5 -5
  11. package/dist/bundle/{bun-sqlite-TZHKM225.js → bun-sqlite-RAWGPH23.js} +8 -8
  12. package/dist/bundle/{chunk-ZZLKX62Z.js → chunk-2ABQZVK4.js} +3 -3
  13. package/dist/bundle/{chunk-MLLJ74LM.js → chunk-3CP7RK5R.js} +4 -4
  14. package/dist/bundle/{chunk-BXQS5RCE.js → chunk-3IXKDIPH.js} +258 -83
  15. package/dist/bundle/{chunk-W2336E7Y.js → chunk-3QX6SOEO.js} +9 -9
  16. package/dist/bundle/{chunk-F7TDFWXY.js → chunk-537O7OVE.js} +6 -6
  17. package/dist/bundle/{chunk-N5UFBWDM.js → chunk-57XGUIXA.js} +9 -11
  18. package/dist/bundle/{chunk-3KHKYYCR.js → chunk-5D4AEUVA.js} +4 -3
  19. package/dist/bundle/{chunk-ODSVNH3H.js → chunk-5HPAPVCB.js} +2415 -1292
  20. package/dist/bundle/{chunk-OEJ5DMCX.js → chunk-67SRVSPU.js} +10 -10
  21. package/dist/bundle/{chunk-XCKD54TN.js → chunk-6N25NZOE.js} +9 -9
  22. package/dist/bundle/chunk-AAMJZJYC.js +922 -0
  23. package/dist/bundle/{chunk-AVWK4NCW.js → chunk-ADLS6FVG.js} +13 -13
  24. package/dist/bundle/{chunk-ZV24I2UJ.js → chunk-AUKAZRF6.js} +5 -5
  25. package/dist/bundle/{chunk-S7ZNLLY5.js → chunk-BV4N333Y.js} +6 -6
  26. package/dist/bundle/{chunk-UN6CKIBN.js → chunk-BYYSVINK.js} +11 -8
  27. package/dist/bundle/{chunk-54R2GDQ3.js → chunk-CMQ34EZL.js} +6 -6
  28. package/dist/bundle/{chunk-G2US6LJB.js → chunk-COZ74WW4.js} +4 -4
  29. package/dist/bundle/{chunk-7BFO3DY6.js → chunk-DFDN6AUB.js} +2 -2
  30. package/dist/bundle/{chunk-VA5YEJS3.js → chunk-DLF3H6NP.js} +7 -7
  31. package/dist/bundle/{chunk-QOWSVDPZ.js → chunk-DWQ4QT6X.js} +111 -100
  32. package/dist/bundle/chunk-EMC57SOZ.js +440 -0
  33. package/dist/bundle/{chunk-RVCS7Q3A.js → chunk-EQHQ2AX3.js} +1390 -522
  34. package/dist/bundle/{chunk-64DK7S4F.js → chunk-F27OI4J2.js} +4 -4
  35. package/dist/bundle/{chunk-2XBSVRT2.js → chunk-FG2QTYEF.js} +4 -4
  36. package/dist/bundle/{chunk-BX6HH4F6.js → chunk-FSPDODVT.js} +14 -14
  37. package/dist/bundle/{chunk-4ZS73HTJ.js → chunk-G5IMOOPB.js} +4 -4
  38. package/dist/bundle/{chunk-VCGL2ETF.js → chunk-GO354DJ5.js} +4 -4
  39. package/dist/bundle/{chunk-5TPT2S2Z.js → chunk-H2UTBYFC.js} +4 -4
  40. package/dist/bundle/{chunk-U46UNBMT.js → chunk-HCDZWFXO.js} +244 -21
  41. package/dist/bundle/{chunk-TGREFJVA.js → chunk-KCVDWZWS.js} +11 -11
  42. package/dist/bundle/{chunk-PUBS2F5J.js → chunk-KQ5BUI5T.js} +248 -248
  43. package/dist/bundle/{chunk-ACGTFLEB.js → chunk-LAYPLF7G.js} +35 -282
  44. package/dist/bundle/{chunk-5KU4UQBM.js → chunk-MFS52LTZ.js} +4 -4
  45. package/dist/bundle/{chunk-DYNSP6FW.js → chunk-MHHDVR4G.js} +1449 -832
  46. package/dist/bundle/{chunk-S2JSZWEC.js → chunk-NIVZHTN4.js} +15 -15
  47. package/dist/bundle/{chunk-A5JSTZZZ.js → chunk-NKN54EDN.js} +6 -6
  48. package/dist/bundle/chunk-O5EHUB2V.js +2 -0
  49. package/dist/bundle/{chunk-5GKXETRP.js → chunk-OGVBRRWY.js} +615 -56
  50. package/dist/bundle/{chunk-VYDTI254.js → chunk-Q2LBOPKO.js} +99 -50
  51. package/dist/bundle/{chunk-LPB2MDUW.js → chunk-QF7VVIF4.js} +11 -11
  52. package/dist/bundle/{chunk-VRSN7VLO.js → chunk-RD7SSY7H.js} +4 -4
  53. package/dist/bundle/{chunk-ZEOCU24Z.js → chunk-RKQIEJFR.js} +5 -5
  54. package/dist/bundle/chunk-RMC2S3F4.js +264 -0
  55. package/dist/bundle/{chunk-2DGOFLDA.js → chunk-S5M4HFOZ.js} +6 -6
  56. package/dist/bundle/{chunk-X4Y2ROJI.js → chunk-SSALGKMJ.js} +94 -5
  57. package/dist/bundle/{chunk-G3ZRY436.js → chunk-SSV37M5T.js} +59 -59
  58. package/dist/bundle/{chunk-DG62L57H.js → chunk-T4SDOYPY.js} +20 -20
  59. package/dist/bundle/{chunk-6IPY2QRG.js → chunk-TEO2KP52.js} +5 -5
  60. package/dist/bundle/{chunk-G77QOTXE.js → chunk-TPFLD4OM.js} +5 -5
  61. package/dist/bundle/{chunk-PYTOIDSM.js → chunk-VMU4SGCE.js} +7 -7
  62. package/dist/bundle/{chunk-QYVVRQTN.js → chunk-VZN5LD26.js} +6 -6
  63. package/dist/bundle/{chunk-ZJVZXJOG.js → chunk-WAGDZB62.js} +5 -5
  64. package/dist/bundle/{chunk-7CBUCTB6.js → chunk-WULARSC4.js} +33 -39
  65. package/dist/bundle/{chunk-BJG6JA5U.js → chunk-Y5E2WNWB.js} +4 -4
  66. package/dist/bundle/{chunk-H6OXALTJ.js → chunk-YI72UVTJ.js} +5 -5
  67. package/dist/bundle/{chunk-NC5WS7OP.js → chunk-Z2DPNTSU.js} +5 -5
  68. package/dist/bundle/{chunk-RF54YDBB.js → chunk-ZHXSRYJ5.js} +6 -6
  69. package/dist/bundle/{chunk-AFV74GK3.js → chunk-ZVVMGPBJ.js} +2 -2
  70. package/dist/bundle/command-contract-ZGFJTLB2.js +32 -0
  71. package/dist/bundle/{dist-RJMT44PL.js → dist-I7OZPHAZ.js} +3 -3
  72. package/dist/bundle/{echarts-QZ6PR3VC.js → echarts-UEQDIHVQ.js} +5 -5
  73. package/dist/bundle/{embed-UBXCXSRD.js → embed-5DPZKRW5.js} +9 -8
  74. package/dist/bundle/{embedder-B4ZTKC23.js → embedder-NBQXDXAO.js} +12 -11
  75. package/dist/bundle/entry-EE6YRAP4.js +14 -0
  76. package/dist/bundle/first-run-OSEVVWNT.js +24 -0
  77. package/dist/bundle/first-screen-753THOU6.js +30 -0
  78. package/dist/bundle/identity-LNH33PN3.js +11 -0
  79. package/dist/bundle/instructions-PYGVIT7I.js +9 -0
  80. package/dist/bundle/{mcp-4Y37G2UY.js → mcp-OQBZXELQ.js} +5 -5
  81. package/dist/bundle/{node-LZZX22VR.js → node-3OBKCX6M.js} +5 -5
  82. package/dist/bundle/{node-IUL5HSYI.js → node-P4E63KXA.js} +5 -5
  83. package/dist/bundle/node-TLZSIHIJ.js +21 -0
  84. package/dist/bundle/{node-sqlite-BPGT6T5U.js → node-sqlite-DMMTDRFB.js} +8 -8
  85. package/dist/bundle/oauth-FX5DDCRS.js +18 -0
  86. package/dist/bundle/open-G6QRQAAL.js +20 -0
  87. package/dist/bundle/{process-GPUXC4PG.js → process-47MMIFIJ.js} +5 -5
  88. package/dist/bundle/{program-NEXEAL7T.js → program-LBHBWRK5.js} +67 -71
  89. package/dist/bundle/prompt-CJ6Y4JYC.js +13 -0
  90. package/dist/bundle/proxy-transport-YSBYG26I.js +17 -0
  91. package/dist/bundle/{recognize-UJBXORVD.js → recognize-7BLTOI45.js} +9 -9
  92. package/dist/bundle/remote-Q4A4JY6U.js +27 -0
  93. package/dist/bundle/{rerank-3Y2VZM3J.js → rerank-CQAR46L3.js} +10 -9
  94. package/dist/bundle/{serve-VDZIVOPR.js → serve-2UO2YMMG.js} +13 -13
  95. package/dist/bundle/{server-BERXP4GW.js → server-6XYURULQ.js} +80 -68
  96. package/dist/bundle/{server-ZFHN4GUF.js → server-FMKC4RLL.js} +46 -41
  97. package/dist/bundle/{state-DGR4EE3E.js → state-RNWN2RDY.js} +9 -9
  98. package/dist/bundle/{store-MRCFSCZD.js → store-BBHTR477.js} +14 -14
  99. package/dist/bundle/store-maintenance-command-GD6OLRXH.js +44 -0
  100. package/dist/bundle/tg.js +8 -8
  101. package/dist/telegram/sending.d.ts.map +1 -1
  102. package/dist/telegram/sending.js +52 -3
  103. package/dist/telegram/sending.js.map +1 -1
  104. package/dist/version.d.ts +1 -1
  105. package/dist/version.js +1 -1
  106. package/package.json +4 -4
  107. package/dist/bundle/chunk-22PQUX72.js +0 -190
  108. package/dist/bundle/chunk-2SJOUK6J.js +0 -2
  109. package/dist/bundle/chunk-CJ6IYCYP.js +0 -583
  110. package/dist/bundle/chunk-NKJJJAIJ.js +0 -237
  111. package/dist/bundle/chunk-NMGO6LW6.js +0 -1950
  112. package/dist/bundle/chunk-OILBDLWL.js +0 -724
  113. package/dist/bundle/chunk-OPBTNQ35.js +0 -1007
  114. package/dist/bundle/command-contract-TKDI7E56.js +0 -31
  115. package/dist/bundle/entry-BTUTHO5M.js +0 -14
  116. package/dist/bundle/first-run-UC4HRIFV.js +0 -24
  117. package/dist/bundle/first-screen-SMCX6YKY.js +0 -29
  118. package/dist/bundle/identity-QSDEGDH7.js +0 -11
  119. package/dist/bundle/instructions-BBGLZKO3.js +0 -9
  120. package/dist/bundle/node-UPPL626U.js +0 -21
  121. package/dist/bundle/oauth-XNE2KPKJ.js +0 -18
  122. package/dist/bundle/open-SXGYZLB5.js +0 -20
  123. package/dist/bundle/prompt-SORGLEYI.js +0 -13
  124. package/dist/bundle/proxy-transport-G4MA6BGU.js +0 -17
  125. package/dist/bundle/remote-W72AR7KH.js +0 -26
  126. package/dist/bundle/store-maintenance-command-DCMZDMYS.js +0 -46
@@ -1,10 +1,10 @@
1
- import { createRequire as __tgRequire } from "node:module";
2
- const require = __tgRequire(import.meta.url);
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  __commonJS,
5
5
  __name,
6
6
  __toESM
7
- } from "./chunk-AFV74GK3.js";
7
+ } from "./chunk-ZVVMGPBJ.js";
8
8
 
9
9
  // node_modules/.pnpm/@stablelib+base64@1.0.1/node_modules/@stablelib/base64/lib/base64.js
10
10
  var require_base64 = __commonJS({
@@ -3615,7 +3615,7 @@ __name(redactSensitive, "redactSensitive");
3615
3615
  async function checkCredentialsFileSafety(path2, onWarn = (m) => console.warn(`anthropic-sdk: ${m}`)) {
3616
3616
  if (typeof process === "undefined" || process.platform === "win32")
3617
3617
  return;
3618
- const { fs } = await import("./node-UPPL626U.js");
3618
+ const { fs } = await import("./node-TLZSIHIJ.js");
3619
3619
  let resolved = path2;
3620
3620
  let st;
3621
3621
  try {
@@ -3637,7 +3637,7 @@ async function checkCredentialsFileSafety(path2, onWarn = (m) => console.warn(`a
3637
3637
  }
3638
3638
  __name(checkCredentialsFileSafety, "checkCredentialsFileSafety");
3639
3639
  async function writeCredentialsFileAtomic(targetPath, data) {
3640
- const { fs, path: path2 } = await import("./node-UPPL626U.js");
3640
+ const { fs, path: path2 } = await import("./node-TLZSIHIJ.js");
3641
3641
  const dir = path2.dirname(targetPath);
3642
3642
  await fs.promises.mkdir(dir, { recursive: true, mode: 448 });
3643
3643
  const tmpPath = `${targetPath}.${process.pid}.${Math.random().toString(36).slice(2)}.tmp`;
@@ -4713,7 +4713,7 @@ var loadConfigWithSource = /* @__PURE__ */ __name(async (profile) => {
4713
4713
  return null;
4714
4714
  }
4715
4715
  validateProfileName(profileName);
4716
- const { fs, path: path2 } = await import("./node-UPPL626U.js");
4716
+ const { fs, path: path2 } = await import("./node-TLZSIHIJ.js");
4717
4717
  const configPath = path2.join(rootConfigPath, "configs", `${profileName}.json`);
4718
4718
  let configRaw;
4719
4719
  try {
@@ -4774,14 +4774,14 @@ var getCredentialsPath = /* @__PURE__ */ __name(async (config, profile) => {
4774
4774
  return null;
4775
4775
  }
4776
4776
  validateProfileName(profileName);
4777
- const { path: path2 } = await import("./node-UPPL626U.js");
4777
+ const { path: path2 } = await import("./node-TLZSIHIJ.js");
4778
4778
  return path2.join(rootConfigPath, "credentials", `${profileName}.json`);
4779
4779
  }, "getCredentialsPath");
4780
4780
  var getRootConfigPath = /* @__PURE__ */ __name(async () => {
4781
4781
  if (!supportsLocalConfigFiles()) {
4782
4782
  return null;
4783
4783
  }
4784
- const { path: path2 } = await import("./node-UPPL626U.js");
4784
+ const { path: path2 } = await import("./node-TLZSIHIJ.js");
4785
4785
  const configDir = readEnv("ANTHROPIC_CONFIG_DIR");
4786
4786
  if (configDir) {
4787
4787
  return configDir;
@@ -4821,7 +4821,7 @@ var getActiveProfileName = /* @__PURE__ */ __name(async () => {
4821
4821
  if (profileName) {
4822
4822
  return profileName;
4823
4823
  }
4824
- const { fs, path: path2 } = await import("./node-UPPL626U.js");
4824
+ const { fs, path: path2 } = await import("./node-TLZSIHIJ.js");
4825
4825
  const filePath = path2.join(rootConfigPath, "active_config");
4826
4826
  try {
4827
4827
  return (await fs.promises.readFile(filePath, "utf-8")).trim() || "default";
@@ -4839,7 +4839,7 @@ function identityTokenFromFile(path2) {
4839
4839
  throw new AnthropicError("Identity token file path is empty");
4840
4840
  }
4841
4841
  return async () => {
4842
- const { fs } = await import("./node-UPPL626U.js");
4842
+ const { fs } = await import("./node-TLZSIHIJ.js");
4843
4843
  let content;
4844
4844
  try {
4845
4845
  content = await fs.promises.readFile(path2, "utf-8");
@@ -4925,7 +4925,7 @@ __name(oidcFederationProvider, "oidcFederationProvider");
4925
4925
  // node_modules/.pnpm/@anthropic-ai+sdk@1.3.0_zod@4.6.7/node_modules/@anthropic-ai/sdk/lib/credentials/user-oauth.mjs
4926
4926
  function userOAuthProvider(config) {
4927
4927
  return async (opts) => {
4928
- const { fs } = await import("./node-UPPL626U.js");
4928
+ const { fs } = await import("./node-TLZSIHIJ.js");
4929
4929
  await checkCredentialsFileSafety(config.credentialsPath, config.onSafetyWarning);
4930
4930
  let raw;
4931
4931
  try {
@@ -5099,7 +5099,7 @@ function resolveIdentityTokenProvider(auth) {
5099
5099
  __name(resolveIdentityTokenProvider, "resolveIdentityTokenProvider");
5100
5100
  function cachedExchangeProvider(exchange, credentialsPath, onCacheWriteError, onSafetyWarning) {
5101
5101
  return async (opts) => {
5102
- const { fs } = await import("./node-UPPL626U.js");
5102
+ const { fs } = await import("./node-TLZSIHIJ.js");
5103
5103
  await checkCredentialsFileSafety(credentialsPath, onSafetyWarning);
5104
5104
  let existing;
5105
5105
  try {
@@ -9424,7 +9424,7 @@ var EnvironmentWorker = /* @__PURE__ */ (() => {
9424
9424
  const ctrl = new AbortController();
9425
9425
  const detachExternal = linkAbort(externalSignal, ctrl);
9426
9426
  const lease = new Lease(ctrl);
9427
- const agentToolset = await import("./node-IUL5HSYI.js");
9427
+ const agentToolset = await import("./node-P4E63KXA.js");
9428
9428
  let leaseTtlMs;
9429
9429
  let runner;
9430
9430
  const heartbeatPromise = heartbeatLoop(sessionClient, work, lease, log, this.requestOptions, (ttlMs) => {
@@ -1,13 +1,13 @@
1
- import { createRequire as __tgRequire } from "node:module";
2
- const require = __tgRequire(import.meta.url);
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  CliError
5
- } from "./chunk-OEJ5DMCX.js";
5
+ } from "./chunk-67SRVSPU.js";
6
6
  import {
7
7
  __name
8
- } from "./chunk-AFV74GK3.js";
8
+ } from "./chunk-ZVVMGPBJ.js";
9
9
 
10
- // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/ports/app.js
10
+ // node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/ports/app.js
11
11
  var envName = /* @__PURE__ */ __name((app, name) => `${app.envPrefix}_${name}`, "envName");
12
12
  var readOnlyLockOf = /* @__PURE__ */ __name((app, env) => {
13
13
  const name = envName(app, "READ_ONLY");
@@ -1,17 +1,17 @@
1
- import { createRequire as __tgRequire } from "node:module";
2
- const require = __tgRequire(import.meta.url);
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  readSharedSection,
5
5
  writeSharedSection
6
- } from "./chunk-W2336E7Y.js";
6
+ } from "./chunk-3QX6SOEO.js";
7
7
  import {
8
8
  CliError
9
- } from "./chunk-OEJ5DMCX.js";
9
+ } from "./chunk-67SRVSPU.js";
10
10
  import {
11
11
  __name
12
- } from "./chunk-AFV74GK3.js";
12
+ } from "./chunk-ZVVMGPBJ.js";
13
13
 
14
- // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/cli/setup-answers.js
14
+ // node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/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";
@@ -1,19 +1,19 @@
1
- import { createRequire as __tgRequire } from "node:module";
2
- const require = __tgRequire(import.meta.url);
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  OAuthError,
5
5
  OAuthErrorCode
6
- } from "./chunk-3KHKYYCR.js";
6
+ } from "./chunk-5D4AEUVA.js";
7
7
  import {
8
8
  ACCESS_SECONDS,
9
9
  REFRESH_SECONDS,
10
10
  readStored
11
- } from "./chunk-VA5YEJS3.js";
11
+ } from "./chunk-DLF3H6NP.js";
12
12
  import {
13
13
  __name
14
- } from "./chunk-AFV74GK3.js";
14
+ } from "./chunk-ZVVMGPBJ.js";
15
15
 
16
- // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/mcp/http/oauth.js
16
+ // node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/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";
@@ -250,15 +250,18 @@ var ownerLogin = /* @__PURE__ */ __name(({ issuer, resource, file, appName, onCo
250
250
  const verifier = {
251
251
  verifyAccessToken: /* @__PURE__ */ __name(async (presented) => {
252
252
  const seconds = Math.floor(now() / 1e3);
253
- const found = store.read().tokens.find((one) => one.kind === "access" && one.hash === hash(presented));
253
+ const stored = store.read();
254
+ const found = stored.tokens.find((one) => one.kind === "access" && one.hash === hash(presented));
254
255
  if (!found || found.expiresAt <= seconds)
255
256
  throw new OAuthError(OAuthErrorCode.InvalidToken, "the token is unknown or expired");
257
+ const clientName = stored.clients.find((one) => one.id === found.clientId)?.name;
256
258
  return {
257
259
  token: presented,
258
260
  clientId: found.clientId,
259
261
  scopes: [],
260
262
  expiresAt: found.expiresAt,
261
- resource
263
+ resource,
264
+ ...clientName ? { extra: { clientName } } : {}
262
265
  };
263
266
  }, "verifyAccessToken")
264
267
  };
@@ -1,5 +1,5 @@
1
- import { createRequire as __tgRequire } from "node:module";
2
- const require = __tgRequire(import.meta.url);
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  array,
5
5
  integer,
@@ -17,9 +17,9 @@ import {
17
17
  strictObject,
18
18
  string,
19
19
  unknown
20
- } from "./chunk-OEJ5DMCX.js";
20
+ } from "./chunk-67SRVSPU.js";
21
21
 
22
- // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/fields.js
22
+ // node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/entities/fields.js
23
23
  var text = string();
24
24
  var id = pipe(string(), minLength(1));
25
25
  var time = isoTime;
@@ -33,7 +33,7 @@ var author = strictObject({
33
33
  name: nullable(text)
34
34
  });
35
35
 
36
- // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/note.js
36
+ // node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/entities/note.js
37
37
  var link = {
38
38
  target_text: nullable(text),
39
39
  kind: text,
@@ -74,7 +74,7 @@ var note = strictObject({
74
74
  backlinks: optional(array(strictObject({ from: reference, ...link })))
75
75
  });
76
76
 
77
- // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/entities/knowledge-lists.js
77
+ // node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/entities/knowledge-lists.js
78
78
  var organization = strictObject({
79
79
  id,
80
80
  ref: reference,
@@ -1,10 +1,10 @@
1
- import { createRequire as __tgRequire } from "node:module";
2
- const require = __tgRequire(import.meta.url);
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  __name
5
- } from "./chunk-AFV74GK3.js";
5
+ } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/mcp/instructions.js
7
+ // node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/mcp/instructions.js
8
8
  var instructions = /* @__PURE__ */ __name(({ command, name, profile, writes, skill }) => {
9
9
  const all = typeof profile !== "string";
10
10
  const offers = /* @__PURE__ */ __name((key) => all || writes.includes(key), "offers");
@@ -1,5 +1,5 @@
1
- import { createRequire as __tgRequire } from "node:module";
2
- const require = __tgRequire(import.meta.url);
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
3
 
4
4
  // node_modules/.pnpm/@anthropic-ai+sdk@1.3.0_zod@4.6.7/node_modules/@anthropic-ai/sdk/internal/node.mjs
5
5
  import * as child_process from "node:child_process";
@@ -1,19 +1,19 @@
1
- import { createRequire as __tgRequire } from "node:module";
2
- const require = __tgRequire(import.meta.url);
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  holdLock,
5
5
  readLock,
6
6
  releaseLock,
7
7
  takeLock
8
- } from "./chunk-QYVVRQTN.js";
8
+ } from "./chunk-VZN5LD26.js";
9
9
  import {
10
10
  __name
11
- } from "./chunk-AFV74GK3.js";
11
+ } from "./chunk-ZVVMGPBJ.js";
12
12
 
13
- // node_modules/.pnpm/@wirecat+cli-core@0.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/mcp/http/state.js
13
+ // node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/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.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/mcp/http/activity.js
16
+ // node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/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.466.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._f7e4048410ccbe1e801fd184c043d197/node_modules/@wirecat/cli-core/dist/mcp/http/state.js
89
+ // node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/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");