@wirecat/mail-cli 0.34.0 → 0.36.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 (155) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/README.md +4 -1
  3. package/contracts/wirecat.json +52 -2
  4. package/dist/bin/mail.js +2 -2
  5. package/dist/bundle/agent-MW7YWUIY.js +39 -0
  6. package/dist/bundle/{all-profiles-2KUKROHY.js → all-profiles-RS6OV3YO.js} +63 -21
  7. package/dist/bundle/{anthropic-E5KRCEVC.js → anthropic-PPQ7DTXN.js} +5 -5
  8. package/dist/bundle/{app-server-HIQ3QO5K.js → app-server-EBFBMFQC.js} +81 -71
  9. package/dist/bundle/{bun-KARJPE5D.js → bun-J7HAT7MW.js} +2 -2
  10. package/dist/bundle/{bun-sqlite-NHGX6ZUN.js → bun-sqlite-PCSNAXIQ.js} +6 -6
  11. package/dist/bundle/{chunk-WYGDALB3.js → chunk-2RV4V55B.js} +18 -18
  12. package/dist/bundle/{chunk-QXYNDMA6.js → chunk-2UNZ3L2H.js} +6 -6
  13. package/dist/bundle/{chunk-DYQGEZA2.js → chunk-2VEFNFYZ.js} +3 -3
  14. package/dist/bundle/chunk-3BYKGMRM.js +338 -0
  15. package/dist/bundle/{chunk-PRDKEVUL.js → chunk-3NOXZZJV.js} +1 -1
  16. package/dist/bundle/{chunk-4VM3UCSO.js → chunk-3ZKNXKM7.js} +2 -2
  17. package/dist/bundle/{chunk-JVGVLRBA.js → chunk-42XY6D5C.js} +5 -5
  18. package/dist/bundle/{chunk-A2Y2RFNW.js → chunk-437UHSIO.js} +123 -6
  19. package/dist/bundle/{chunk-FNYWC6A3.js → chunk-4WSTWZUB.js} +3 -3
  20. package/dist/bundle/{chunk-V43KEZYA.js → chunk-5G4MDFZ2.js} +9 -60
  21. package/dist/bundle/{chunk-ZZEWQR43.js → chunk-5JEKBYIH.js} +14 -14
  22. package/dist/bundle/{chunk-CKVWAUBW.js → chunk-5TIWO6AR.js} +12 -12
  23. package/dist/bundle/{chunk-X6IGETU6.js → chunk-5VPLQS4S.js} +2 -2
  24. package/dist/bundle/chunk-645FQC4G.js +559 -0
  25. package/dist/bundle/{chunk-PA4GEJXQ.js → chunk-6FZPFNEU.js} +9 -9
  26. package/dist/bundle/{chunk-XWU3A7H6.js → chunk-6LJIENVT.js} +2 -2
  27. package/dist/bundle/{chunk-2GDLJKPT.js → chunk-6NDPOY4N.js} +1 -1
  28. package/dist/bundle/{chunk-QXLYLVEC.js → chunk-6PKMUKUF.js} +1 -1
  29. package/dist/bundle/{chunk-TZJC4AOK.js → chunk-6TT62IUW.js} +53 -33
  30. package/dist/bundle/chunk-6UYIWQLU.js +52 -0
  31. package/dist/bundle/{chunk-MGXYIVVJ.js → chunk-6VMJLOYO.js} +12 -12
  32. package/dist/bundle/{chunk-ZGZADWD7.js → chunk-774VG5WZ.js} +1 -1
  33. package/dist/bundle/chunk-AVR4FPYG.js +192 -0
  34. package/dist/bundle/{chunk-KF6O4RZO.js → chunk-BBQERXQX.js} +3 -3
  35. package/dist/bundle/{chunk-LOSYDRJU.js → chunk-C3JSQ7UJ.js} +53 -11
  36. package/dist/bundle/{chunk-OJ3BI2U4.js → chunk-CJHO6B3M.js} +34 -28
  37. package/dist/bundle/{chunk-VRGEDK4T.js → chunk-CJMZQ2MZ.js} +35 -12
  38. package/dist/bundle/{chunk-4SKE5GYA.js → chunk-CMOO4INK.js} +1 -1
  39. package/dist/bundle/{chunk-DZRP4UCK.js → chunk-DVJPEZGV.js} +30 -15
  40. package/dist/bundle/{chunk-H77ALM2Y.js → chunk-EGR3YUWD.js} +4 -4
  41. package/dist/bundle/{chunk-4VHK5UBM.js → chunk-GBZIWCEP.js} +3 -3
  42. package/dist/bundle/{chunk-2SCQ7Z4I.js → chunk-GCTHVCJU.js} +4 -4
  43. package/dist/bundle/{chunk-4URI6EAV.js → chunk-GEU3WR75.js} +3 -3
  44. package/dist/bundle/{chunk-OX5MCGXL.js → chunk-GI6DNX7Q.js} +63 -54
  45. package/dist/bundle/{chunk-KLI5FKZ2.js → chunk-HH34WRQE.js} +7 -7
  46. package/dist/bundle/chunk-HPSESLOZ.js +7 -0
  47. package/dist/bundle/{chunk-6LFRZDPV.js → chunk-IBOWSQ7X.js} +3 -4
  48. package/dist/bundle/{chunk-XIF75Z7D.js → chunk-JCILSTFK.js} +1 -1
  49. package/dist/bundle/{chunk-OOYRMTX5.js → chunk-KLPFPNZP.js} +12 -26
  50. package/dist/bundle/{chunk-6G4VQFVX.js → chunk-KP7JHJVP.js} +17 -17
  51. package/dist/bundle/chunk-KTVQIKU5.js +726 -0
  52. package/dist/bundle/{chunk-2VBEBPGX.js → chunk-KVFBSOCV.js} +9 -9
  53. package/dist/bundle/{chunk-KGYK3OI3.js → chunk-L4QLZDBZ.js} +43 -64
  54. package/dist/bundle/{chunk-R2GS3GBJ.js → chunk-LQQIYBHN.js} +100 -66
  55. package/dist/bundle/{chunk-I3MS74OF.js → chunk-MQ6DQRRI.js} +4 -4
  56. package/dist/bundle/{chunk-FORAOCZ3.js → chunk-MRWV5VNQ.js} +6 -6
  57. package/dist/bundle/{chunk-NJVJH5MH.js → chunk-MT3LYU4T.js} +3245 -1644
  58. package/dist/bundle/{chunk-5GANGHQI.js → chunk-NCY55XIT.js} +9 -9
  59. package/dist/bundle/{chunk-QFJC6POK.js → chunk-NJZR3OFK.js} +1 -1
  60. package/dist/bundle/chunk-NSH2UHJR.js +353 -0
  61. package/dist/bundle/chunk-NTUP5RCP.js +116 -0
  62. package/dist/bundle/chunk-NYR7PIAG.js +80 -0
  63. package/dist/bundle/{chunk-PC3N3LH3.js → chunk-NYYMMIVW.js} +3 -3
  64. package/dist/bundle/{chunk-NXERDBEK.js → chunk-OEL4DQTT.js} +4 -4
  65. package/dist/bundle/{chunk-RPNQXWRS.js → chunk-PF7ZNIVP.js} +2 -2
  66. package/dist/bundle/{chunk-5D4AEUVA.js → chunk-PL5P7UKW.js} +434 -1
  67. package/dist/bundle/{chunk-QQGPV3QN.js → chunk-PMGAU6AP.js} +2 -2
  68. package/dist/bundle/{chunk-PVZMN3UZ.js → chunk-PMSZBUC7.js} +8 -8
  69. package/dist/bundle/{chunk-HH647UBC.js → chunk-PPIMXOBT.js} +104 -255
  70. package/dist/bundle/{chunk-YWX5X5RI.js → chunk-Q6TPXXOS.js} +19 -17
  71. package/dist/bundle/{chunk-Z6A6QPPW.js → chunk-QDNYJOWJ.js} +1 -1
  72. package/dist/bundle/{chunk-OG5QO5RR.js → chunk-QI2XGTFH.js} +8 -8
  73. package/dist/bundle/{chunk-T2EE5M7O.js → chunk-REWV37HQ.js} +144 -10
  74. package/dist/bundle/{chunk-LKTDW5LH.js → chunk-RJUVWJTA.js} +18 -8
  75. package/dist/bundle/{chunk-MDISZMK4.js → chunk-RMWS7IQ4.js} +4 -4
  76. package/dist/bundle/{chunk-VBVR6JRC.js → chunk-ROK7Z5LQ.js} +275 -174
  77. package/dist/bundle/{chunk-HRDCH2VB.js → chunk-SCJVKWMV.js} +3665 -3339
  78. package/dist/bundle/{chunk-NAENYLIO.js → chunk-SJNFPBPF.js} +2 -2
  79. package/dist/bundle/{chunk-6GGMFL7J.js → chunk-TV634B6T.js} +2 -100
  80. package/dist/bundle/{chunk-26DYRMXE.js → chunk-U3BO342P.js} +1 -1
  81. package/dist/bundle/{chunk-KNVTBDTE.js → chunk-U67XMAEE.js} +3 -3
  82. package/dist/bundle/chunk-V5I7QP4T.js +108 -0
  83. package/dist/bundle/{chunk-NI4GCP2T.js → chunk-VIDPFLFM.js} +2 -2
  84. package/dist/bundle/{chunk-AGZ7SNFF.js → chunk-VIJV474N.js} +1 -1
  85. package/dist/bundle/{chunk-QOQF2TX3.js → chunk-WNQECDIP.js} +338 -299
  86. package/dist/bundle/{chunk-SK3N4CK5.js → chunk-WPPPO427.js} +4 -4
  87. package/dist/bundle/{chunk-EZAX77SM.js → chunk-WZFGZBGD.js} +86 -75
  88. package/dist/bundle/{chunk-EGQJDEFY.js → chunk-XRVZMM5B.js} +158 -562
  89. package/dist/bundle/{chunk-NWD7AFOR.js → chunk-YPB5BEAD.js} +2 -2
  90. package/dist/bundle/{chunk-NHD5BOJU.js → chunk-ZRSLG3B3.js} +6 -6
  91. package/dist/bundle/{chunk-IMQ4CVZJ.js → chunk-ZV57PIPE.js} +2 -2
  92. package/dist/bundle/command-contract-WFTIRPL5.js +39 -0
  93. package/dist/bundle/{command-server-entry-NF45UPEV.js → command-server-entry-73RJELAV.js} +28 -28
  94. package/dist/bundle/{decode-DUZA3EHC.js → decode-7BUWBDPT.js} +5 -5
  95. package/dist/bundle/{dispatch-CDJZAMVP.js → dispatch-IBOMVWZA.js} +8 -8
  96. package/dist/bundle/{dist-RH7EMC4J.js → dist-MULVCVSR.js} +25 -23
  97. package/dist/bundle/dist-PAKDDIBT.js +191 -0
  98. package/dist/bundle/{echarts-GZHZBNRA.js → echarts-VLWFC322.js} +2 -2
  99. package/dist/bundle/{embed-VE3CSJN4.js → embed-W3VH4HPY.js} +6 -6
  100. package/dist/bundle/{embedder-DSJ77DX5.js → embedder-I7ERQZJV.js} +9 -9
  101. package/dist/bundle/{failure-YH6HAGFT.js → failure-QMAPSQ7X.js} +2 -2
  102. package/dist/bundle/{first-run-3L7HLYTI.js → first-run-LCVER6QN.js} +12 -12
  103. package/dist/bundle/first-screen-DCTHI4NQ.js +39 -0
  104. package/dist/bundle/{instructions-OZK3BLIO.js → instructions-BNCVLSYQ.js} +1 -1
  105. package/dist/bundle/mail.js +12 -12
  106. package/dist/bundle/{mcp-YUG4YR4R.js → mcp-Z2KZNCXB.js} +2 -2
  107. package/dist/bundle/meeting-combined-ITU7SZ7E.js +24 -0
  108. package/dist/bundle/{meeting-model-U7LW5WEN.js → meeting-model-BWLSTNXA.js} +11 -11
  109. package/dist/bundle/{meeting-semantic-64IOIQRR.js → meeting-semantic-ZIEHXN2R.js} +6 -6
  110. package/dist/bundle/{node-OS3VWBUZ.js → node-RYFTRSG4.js} +2 -2
  111. package/dist/bundle/{node-sqlite-RQ623VFA.js → node-sqlite-XCHVNTGQ.js} +7 -7
  112. package/dist/bundle/{oauth-CBPAG734.js → oauth-FNUJSKKJ.js} +8 -8
  113. package/dist/bundle/{open-H4DGOMBC.js → open-WVWSJ3WI.js} +5 -5
  114. package/dist/bundle/{openai-EMWRGR54.js → openai-QOUTYYTF.js} +15 -15
  115. package/dist/bundle/{process-3TOIYASI.js → process-W5KPID53.js} +1 -1
  116. package/dist/bundle/{program-WA6RGAJL.js → program-L5UANM3I.js} +3397 -2219
  117. package/dist/bundle/{prompt-22KNCMBI.js → prompt-JSBAPNJE.js} +5 -5
  118. package/dist/bundle/{recognize-UWD4RSCZ.js → recognize-FDX4SJ6Q.js} +4 -4
  119. package/dist/bundle/{remote-LJY7MF2E.js → remote-MYOXOQHM.js} +9 -9
  120. package/dist/bundle/{rerank-JJ6KNJFB.js → rerank-NY5MSZCR.js} +7 -7
  121. package/dist/bundle/{serve-3EPLJYVZ.js → serve-URI6NZA3.js} +10 -10
  122. package/dist/bundle/{server-5JOFO4V4.js → server-HQ25RHQM.js} +75 -64
  123. package/dist/bundle/server-UVYFU2JN.js +84 -0
  124. package/dist/bundle/{sqlite-runtime-MGJA5E27.js → sqlite-runtime-6UUPSSKG.js} +6 -6
  125. package/dist/bundle/{state-UCRDOWOP.js → state-NDDVFPCI.js} +6 -6
  126. package/dist/bundle/{store-265VRRQV.js → store-2RDOICVN.js} +28 -23
  127. package/dist/bundle/{store-HS272YSA.js → store-PKYWPKKR.js} +34 -21
  128. package/dist/bundle/store-maintenance-command-Y5XTO47X.js +71 -0
  129. package/dist/bundle/surface-3XKM3MQ2.js +70 -0
  130. package/dist/commands/read.d.ts +2 -2
  131. package/dist/commands/read.d.ts.map +1 -1
  132. package/dist/commands/read.js +5 -4
  133. package/dist/commands/read.js.map +1 -1
  134. package/dist/commands/session-start.js +1 -1
  135. package/dist/commands/session-start.js.map +1 -1
  136. package/dist/commands/sync.d.ts +2 -1
  137. package/dist/commands/sync.d.ts.map +1 -1
  138. package/dist/commands/sync.js +16 -9
  139. package/dist/commands/sync.js.map +1 -1
  140. package/dist/config.d.ts +5 -0
  141. package/dist/config.d.ts.map +1 -1
  142. package/dist/config.js +16 -1
  143. package/dist/config.js.map +1 -1
  144. package/dist/oauth.d.ts.map +1 -1
  145. package/dist/oauth.js +2 -1
  146. package/dist/oauth.js.map +1 -1
  147. package/dist/version.d.ts +1 -1
  148. package/dist/version.js +1 -1
  149. package/package.json +3 -3
  150. package/dist/bundle/chunk-FEBUZHU3.js +0 -2
  151. package/dist/bundle/command-contract-PZ7VOOXP.js +0 -39
  152. package/dist/bundle/first-screen-MY5KID77.js +0 -37
  153. package/dist/bundle/meeting-combined-RYMUPY54.js +0 -24
  154. package/dist/bundle/server-EOQNS7B7.js +0 -75
  155. package/dist/bundle/store-maintenance-command-IKZM5NRP.js +0 -66
@@ -7,12 +7,12 @@ import {
7
7
  import {
8
8
  singleLine,
9
9
  visibleControls
10
- } from "./chunk-QQGPV3QN.js";
10
+ } from "./chunk-PMGAU6AP.js";
11
11
  import {
12
12
  __name
13
13
  } from "./chunk-ZVVMGPBJ.js";
14
14
 
15
- // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/render/messages.js
15
+ // node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/render/messages.js
16
16
  import { styleText } from "node:util";
17
17
  var TIME_WIDTH = 8;
18
18
  var INDENT = " ".repeat(TIME_WIDTH + 2);
@@ -1,7 +1,6 @@
1
1
  import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
- CLIENT_INFO_META_KEY,
5
4
  DEFAULT_MAX_SUBSCRIPTIONS,
6
5
  McpServer,
7
6
  ProtocolErrorCode,
@@ -24,12 +23,7 @@ import {
24
23
  serverIdentityOf,
25
24
  setNegotiatedProtocolVersion,
26
25
  validateEnvelopeMeta
27
- } from "./chunk-5D4AEUVA.js";
28
- import {
29
- agentOf,
30
- clientHash,
31
- currentCaller
32
- } from "./chunk-PVZMN3UZ.js";
26
+ } from "./chunk-PL5P7UKW.js";
33
27
  import {
34
28
  __name
35
29
  } from "./chunk-ZVVMGPBJ.js";
@@ -541,95 +535,7 @@ function toError(value) {
541
535
  }
542
536
  __name(toError, "toError");
543
537
 
544
- // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/mcp/caller.js
545
- var callingAgent = /* @__PURE__ */ __name((fallback, caller = currentCaller()) => {
546
- const client = caller?.agent?.client?.name;
547
- if (client && client !== "unknown")
548
- return client;
549
- const kind = caller?.agent?.kind;
550
- return kind && kind !== "mcp-client" ? kind : fallback;
551
- }, "callingAgent");
552
- var CALLER_META_KEY = "wirecat.dev/caller";
553
- var PROXY_CLIENT_NAME = "all-profiles";
554
- var NAME = /^[\w .@()/+-]{1,64}$/;
555
- var plain = /* @__PURE__ */ __name((value) => typeof value === "string" && NAME.test(value.trim()) ? value.trim() : void 0, "plain");
556
- var clientFrom = /* @__PURE__ */ __name((value) => {
557
- if (!value || typeof value !== "object")
558
- return void 0;
559
- const { name, version } = value;
560
- const named = plain(name);
561
- if (!named)
562
- return void 0;
563
- const versioned = plain(version);
564
- return { name: named, ...versioned ? { version: versioned } : {} };
565
- }, "clientFrom");
566
- var callerOf = /* @__PURE__ */ __name((ctx, tool, source) => {
567
- const meta = ctx?.mcpReq?._meta;
568
- const requestId = ctx?.mcpReq?.id;
569
- const initialized = source.client?.();
570
- const proxied = initialized?.name === PROXY_CLIENT_NAME && !ctx?.http ? passedOn(meta?.[CALLER_META_KEY], tool) : void 0;
571
- if (proxied)
572
- return proxied;
573
- const client = clientFrom(meta?.[CLIENT_INFO_META_KEY]) ?? clientFrom(initialized);
574
- const mcp = /* @__PURE__ */ __name((connection) => ({
575
- tool,
576
- ...requestId === void 0 ? {} : { request_id: String(requestId) },
577
- ...connection ? { connection_id: connection } : {}
578
- }), "mcp");
579
- const auth = ctx?.http?.authInfo;
580
- if (auth) {
581
- const registered = plain(auth.extra?.clientName);
582
- return {
583
- via: "mcp-http",
584
- agent: {
585
- kind: "mcp-client",
586
- session_id: ctx?.sessionId ?? null,
587
- client: {
588
- name: registered ?? client?.name ?? "unknown",
589
- ...client?.version ? { version: client.version } : {},
590
- id: clientHash(auth.clientId)
591
- }
592
- },
593
- mcp: mcp(ctx?.sessionId)
594
- };
595
- }
596
- const agent = agentOf(source.env) ?? { kind: "mcp-client", session_id: null };
597
- return { via: "mcp-stdio", agent: { ...agent, ...client ? { client } : {} }, mcp: mcp(source.connectionId) };
598
- }, "callerOf");
599
- var passedOn = /* @__PURE__ */ __name((value, tool) => {
600
- if (!value || typeof value !== "object")
601
- return void 0;
602
- const { via, agent, mcp } = value;
603
- if (via !== "mcp-stdio" && via !== "mcp-http")
604
- return void 0;
605
- const a = agent && typeof agent === "object" ? agent : void 0;
606
- const kind = plain(a?.kind);
607
- const session = typeof a?.session_id === "string" && /^[A-Za-z0-9._:-]{1,128}$/.test(a.session_id) ? a.session_id : null;
608
- const client = clientFrom(a?.client);
609
- const id = a?.client && typeof a.client === "object" ? a.client.id : void 0;
610
- const m = mcp && typeof mcp === "object" ? mcp : {};
611
- const request = plain(m.request_id);
612
- const connection = typeof m.connection_id === "string" && /^[\w-]{1,128}$/.test(m.connection_id) ? m.connection_id : void 0;
613
- return {
614
- via,
615
- ...kind ? {
616
- agent: {
617
- kind,
618
- session_id: session,
619
- ...a?.from_chat === true ? { from_chat: true } : {},
620
- ...client ? { client: { ...client, ...typeof id === "string" && /^[0-9a-f]{8}$/.test(id) ? { id } : {} } } : {}
621
- }
622
- } : {},
623
- mcp: {
624
- tool,
625
- ...request ? { request_id: request } : {},
626
- ...connection ? { connection_id: connection } : {},
627
- proxied: true
628
- }
629
- };
630
- }, "passedOn");
631
-
632
- // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/mcp/stdio-wire.js
538
+ // node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/mcp/stdio-wire.js
633
539
  import { PassThrough, Writable } from "node:stream";
634
540
  var lineReader = /* @__PURE__ */ __name((onMessage) => {
635
541
  let rest = "";
@@ -723,9 +629,5 @@ var answeredWire = /* @__PURE__ */ __name((source, sink) => {
723
629
  export {
724
630
  StdioServerTransport,
725
631
  serveStdio,
726
- callingAgent,
727
- CALLER_META_KEY,
728
- PROXY_CLIENT_NAME,
729
- callerOf,
730
632
  answeredWire
731
633
  };
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/store/normalize.js
7
+ // node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/normalize.js
8
8
  var NORMALIZER_VERSION = 1;
9
9
  var fold = /* @__PURE__ */ __name((text) => text.normalize("NFKD").replace(new RegExp("\\p{M}+", "gu"), "").normalize("NFC").toLowerCase(), "fold");
10
10
  var normalize = /* @__PURE__ */ __name((text) => fold(text).replace(new RegExp("\\p{Cc}", "gu"), " ").replace(/\s+/gu, " ").trim(), "normalize");
@@ -3,16 +3,16 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  QUERY_LIMITS,
5
5
  queryError
6
- } from "./chunk-QOQF2TX3.js";
6
+ } from "./chunk-WNQECDIP.js";
7
7
  import {
8
8
  CliError,
9
9
  isCliError
10
- } from "./chunk-QQGPV3QN.js";
10
+ } from "./chunk-PMGAU6AP.js";
11
11
  import {
12
12
  __name
13
13
  } from "./chunk-ZVVMGPBJ.js";
14
14
 
15
- // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/search/lucene/types.js
15
+ // node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/search/lucene/types.js
16
16
  var QUERY_VERSION = 1;
17
17
  var QUERY_LIMITS2 = {
18
18
  ...QUERY_LIMITS,
@@ -0,0 +1,108 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ CLIENT_INFO_META_KEY
5
+ } from "./chunk-PL5P7UKW.js";
6
+ import {
7
+ agentOf,
8
+ clientHash,
9
+ currentCaller
10
+ } from "./chunk-PMSZBUC7.js";
11
+ import {
12
+ __name
13
+ } from "./chunk-ZVVMGPBJ.js";
14
+
15
+ // node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/mcp/caller.js
16
+ var callingAgent = /* @__PURE__ */ __name((fallback, caller = currentCaller()) => {
17
+ const client = caller?.agent?.client?.name;
18
+ if (client && client !== "unknown")
19
+ return client;
20
+ const kind = caller?.agent?.kind;
21
+ return kind && kind !== "mcp-client" ? kind : fallback;
22
+ }, "callingAgent");
23
+ var CALLER_META_KEY = "wirecat.dev/caller";
24
+ var PROXY_CLIENT_NAME = "all-profiles";
25
+ var NAME = /^[\w .@()/+-]{1,64}$/;
26
+ var plain = /* @__PURE__ */ __name((value) => typeof value === "string" && NAME.test(value.trim()) ? value.trim() : void 0, "plain");
27
+ var clientFrom = /* @__PURE__ */ __name((value) => {
28
+ if (!value || typeof value !== "object")
29
+ return void 0;
30
+ const { name, version } = value;
31
+ const named = plain(name);
32
+ if (!named)
33
+ return void 0;
34
+ const versioned = plain(version);
35
+ return { name: named, ...versioned ? { version: versioned } : {} };
36
+ }, "clientFrom");
37
+ var callerOf = /* @__PURE__ */ __name((ctx, tool, source) => {
38
+ const meta = ctx?.mcpReq?._meta;
39
+ const requestId = ctx?.mcpReq?.id;
40
+ const initialized = source.client?.();
41
+ const proxied = initialized?.name === PROXY_CLIENT_NAME && !ctx?.http ? passedOn(meta?.[CALLER_META_KEY], tool) : void 0;
42
+ if (proxied)
43
+ return proxied;
44
+ const client = clientFrom(meta?.[CLIENT_INFO_META_KEY]) ?? clientFrom(initialized);
45
+ const mcp = /* @__PURE__ */ __name((connection) => ({
46
+ tool,
47
+ ...requestId === void 0 ? {} : { request_id: String(requestId) },
48
+ ...connection ? { connection_id: connection } : {}
49
+ }), "mcp");
50
+ const auth = ctx?.http?.authInfo;
51
+ if (auth) {
52
+ const registered = plain(auth.extra?.clientName);
53
+ return {
54
+ via: "mcp-http",
55
+ agent: {
56
+ kind: "mcp-client",
57
+ session_id: ctx?.sessionId ?? null,
58
+ client: {
59
+ name: registered ?? client?.name ?? "unknown",
60
+ ...client?.version ? { version: client.version } : {},
61
+ id: clientHash(auth.clientId)
62
+ }
63
+ },
64
+ mcp: mcp(ctx?.sessionId)
65
+ };
66
+ }
67
+ const agent = agentOf(source.env) ?? { kind: "mcp-client", session_id: null };
68
+ return { via: "mcp-stdio", agent: { ...agent, ...client ? { client } : {} }, mcp: mcp(source.connectionId) };
69
+ }, "callerOf");
70
+ var passedOn = /* @__PURE__ */ __name((value, tool) => {
71
+ if (!value || typeof value !== "object")
72
+ return void 0;
73
+ const { via, agent, mcp } = value;
74
+ if (via !== "mcp-stdio" && via !== "mcp-http")
75
+ return void 0;
76
+ const a = agent && typeof agent === "object" ? agent : void 0;
77
+ const kind = plain(a?.kind);
78
+ const session = typeof a?.session_id === "string" && /^[A-Za-z0-9._:-]{1,128}$/.test(a.session_id) ? a.session_id : null;
79
+ const client = clientFrom(a?.client);
80
+ const id = a?.client && typeof a.client === "object" ? a.client.id : void 0;
81
+ const m = mcp && typeof mcp === "object" ? mcp : {};
82
+ const request = plain(m.request_id);
83
+ const connection = typeof m.connection_id === "string" && /^[\w-]{1,128}$/.test(m.connection_id) ? m.connection_id : void 0;
84
+ return {
85
+ via,
86
+ ...kind ? {
87
+ agent: {
88
+ kind,
89
+ session_id: session,
90
+ ...a?.from_chat === true ? { from_chat: true } : {},
91
+ ...client ? { client: { ...client, ...typeof id === "string" && /^[0-9a-f]{8}$/.test(id) ? { id } : {} } } : {}
92
+ }
93
+ } : {},
94
+ mcp: {
95
+ tool,
96
+ ...request ? { request_id: request } : {},
97
+ ...connection ? { connection_id: connection } : {},
98
+ proxied: true
99
+ }
100
+ };
101
+ }, "passedOn");
102
+
103
+ export {
104
+ callingAgent,
105
+ CALLER_META_KEY,
106
+ PROXY_CLIENT_NAME,
107
+ callerOf
108
+ };
@@ -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-EZAX77SM.js";
5
+ } from "./chunk-WZFGZBGD.js";
6
6
  import {
7
7
  __name
8
8
  } from "./chunk-ZVVMGPBJ.js";
9
9
 
10
- // node_modules/.pnpm/@wirecat+cli-core@0.674.0_@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typ_fc1e3fbb1256d0776f2342adda6f86ff/node_modules/@wirecat/cli-core/dist/store/path.js
10
+ // node_modules/.pnpm/@wirecat+cli-core@0.713.0_@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typ_29dc9b659505b9f83a43774498347dd2/node_modules/@wirecat/cli-core/dist/store/path.js
11
11
  import { realpathSync } from "node:fs";
12
12
  import { userInfo } from "node:os";
13
13
  import { basename, dirname, isAbsolute, join, relative, resolve } from "node:path";
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-base@0.103.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/installer.js
7
+ // node_modules/.pnpm/@wirecat+cli-base@0.125.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/installer.js
8
8
  var installerOf = /* @__PURE__ */ __name((scriptPath) => {
9
9
  const path = scriptPath.replaceAll("\\", "/");
10
10
  if (path.includes("/_npx/"))