@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
@@ -4,10 +4,10 @@ import {
4
4
  QUERY_LIMITS,
5
5
  exhausted,
6
6
  searchError
7
- } from "./chunk-KNVTBDTE.js";
7
+ } from "./chunk-U67XMAEE.js";
8
8
  import {
9
9
  fold
10
- } from "./chunk-26DYRMXE.js";
10
+ } from "./chunk-U3BO342P.js";
11
11
  import {
12
12
  CATALOG_KINDS,
13
13
  CONTRACT_KINDS,
@@ -26,16 +26,16 @@ import {
26
26
  parseReference,
27
27
  providerLabel,
28
28
  providerNamed
29
- } from "./chunk-CKVWAUBW.js";
29
+ } from "./chunk-5TIWO6AR.js";
30
30
  import {
31
31
  CliError,
32
32
  singleLine
33
- } from "./chunk-QQGPV3QN.js";
33
+ } from "./chunk-PMGAU6AP.js";
34
34
  import {
35
35
  __name
36
36
  } from "./chunk-ZVVMGPBJ.js";
37
37
 
38
- // 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/domain/phone-plans.generated.js
38
+ // 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/domain/phone-plans.generated.js
39
39
  var PHONE_PLANS = [
40
40
  {
41
41
  country: "us",
@@ -415,7 +415,7 @@ var PHONE_PLANS = [
415
415
  }
416
416
  ];
417
417
 
418
- // 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/domain/phones.js
418
+ // 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/domain/phones.js
419
419
  var PHONE_COUNTRIES = PHONE_PLANS.map((plan) => plan.country);
420
420
  var DEFAULT_PHONE_COUNTRIES = ["ru"];
421
421
  var parsePhoneCountries = /* @__PURE__ */ __name((value) => {
@@ -490,7 +490,7 @@ var storedPhone = /* @__PURE__ */ __name((raw, provider) => {
490
490
  return found ? `+${found[1]}` : void 0;
491
491
  }, "storedPhone");
492
492
 
493
- // 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/domain/record-fields.js
493
+ // 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/domain/record-fields.js
494
494
  var DECIMAL_PATTERN = "^[0-9]{1,16}(\\.[0-9]{1,6})?$";
495
495
  var SIGNED_DECIMAL = "^-?[0-9]{1,16}(\\.[0-9]{1,6})?$";
496
496
  var DAY = "^[0-9]{4}-[0-9]{2}-[0-9]{2}$";
@@ -540,7 +540,7 @@ var arrayOf = /* @__PURE__ */ __name((item, maxItems, description) => ({
540
540
  }), "arrayOf");
541
541
  var isObject = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null && !Array.isArray(value), "isObject");
542
542
 
543
- // 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/domain/record-types.js
543
+ // 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/domain/record-types.js
544
544
  var kept = /* @__PURE__ */ __name((description) => ({ description }), "kept");
545
545
  var PARTY = ["person", "organization"];
546
546
  var ORGANIZATION = ["organization"];
@@ -935,7 +935,7 @@ var hasV1Roles = /* @__PURE__ */ __name((type) => rolesOf(type).some(([, role])
935
935
  var IDENTITY_TYPES = RECORD_ENTITY_TYPES.filter((type) => RECORD_TYPES[type].review === "identity");
936
936
  var article = /* @__PURE__ */ __name((word) => /^[aeiou]/.test(word) ? "an" : "a", "article");
937
937
 
938
- // 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/domain/ref-arguments.js
938
+ // 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/domain/ref-arguments.js
939
939
  var TAKES = {
940
940
  chat: "a chat: chat:<provider>/<account>/<chat>, its id or its title",
941
941
  message: "a message: msg:<provider>/<account>/<chat>/<message>, or a chat and the message's id"
@@ -995,7 +995,7 @@ var ensureAccount = /* @__PURE__ */ __name(async (reference, scope, profilesOn)
995
995
  throw wrongAccount(reference, scope, profiles);
996
996
  }, "ensureAccount");
997
997
 
998
- // 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/automaton.js
998
+ // 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/automaton.js
999
999
  var any = { kind: "char", ranges: [[0, 1114111]], negate: false };
1000
1000
  var literal = /* @__PURE__ */ __name((c) => ({
1001
1001
  kind: "char",
@@ -1395,7 +1395,7 @@ var foldRegex = /* @__PURE__ */ __name((pattern, span) => {
1395
1395
  return out;
1396
1396
  }, "foldRegex");
1397
1397
 
1398
- // 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/trigrams.js
1398
+ // 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/trigrams.js
1399
1399
  var trigrams = /* @__PURE__ */ __name((term) => {
1400
1400
  const padded = ` ${term} `;
1401
1401
  const pieces = /* @__PURE__ */ new Set();
@@ -1404,7 +1404,7 @@ var trigrams = /* @__PURE__ */ __name((term) => {
1404
1404
  return [...pieces];
1405
1405
  }, "trigrams");
1406
1406
 
1407
- // 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/resolve.js
1407
+ // 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/resolve.js
1408
1408
  var isId = /* @__PURE__ */ __name((reference) => /^-?\d+$/.test(reference.trim()), "isId");
1409
1409
  var foldName = /* @__PURE__ */ __name((name) => name.normalize("NFC").replace(/[\uFE0E\uFE0F\u200D]/g, "").toLowerCase().replaceAll("\u0451", "\u0435"), "foldName");
1410
1410
  var pickChat = /* @__PURE__ */ __name((reference, chats) => {
@@ -1475,7 +1475,7 @@ ${lines}`, { candidates });
1475
1475
  }, "ambiguous");
1476
1476
  var isPresent = /* @__PURE__ */ __name((value) => value !== null && value !== void 0, "isPresent");
1477
1477
 
1478
- // 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/domain/addresses.js
1478
+ // 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/domain/addresses.js
1479
1479
  var EMAIL_ADDRESS = /^[^\s@]+@[^\s@]+\.[^\s@]+$/u;
1480
1480
  var isEmailAddress = /* @__PURE__ */ __name((value) => EMAIL_ADDRESS.test(value), "isEmailAddress");
1481
1481
  var ROLE_ADDRESS_WORDS = {
@@ -1537,7 +1537,7 @@ var PERSON_LIKE = /* @__PURE__ */ new Set(["hr"]);
1537
1537
  var isPersonLikeRoleAddress = /* @__PURE__ */ __name((address) => PERSON_LIKE.has(localWord(address)), "isPersonLikeRoleAddress");
1538
1538
  var isNoReplyAddress = /* @__PURE__ */ __name((address) => NO_REPLY.has(localWord(address)), "isNoReplyAddress");
1539
1539
 
1540
- // 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/domain/display-names.js
1540
+ // 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/domain/display-names.js
1541
1541
  var QUOTES = [
1542
1542
  ['"', '"'],
1543
1543
  ["'", "'"],
@@ -1595,7 +1595,7 @@ var nameKey = /* @__PURE__ */ __name((name) => {
1595
1595
  }, "nameKey");
1596
1596
  var isReadable = /* @__PURE__ */ __name((shown) => shown !== null && READABLE.test(shown), "isReadable");
1597
1597
 
1598
- // 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/domain/counters.js
1598
+ // 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/domain/counters.js
1599
1599
  var COUNTER_FIELDS = ["views", "reactions", "comments"];
1600
1600
  var validCounter = /* @__PURE__ */ __name((value) => typeof value === "number" && Number.isFinite(value) && value >= 0, "validCounter");
1601
1601
  var counterValue = /* @__PURE__ */ __name((message, field) => {
@@ -1632,7 +1632,7 @@ var counterFreshness = /* @__PURE__ */ __name((states) => {
1632
1632
  return states.some((one) => one.freshness === "stale") ? "stale" : "fresh";
1633
1633
  }, "counterFreshness");
1634
1634
 
1635
- // 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/domain/rankings-options.js
1635
+ // 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/domain/rankings-options.js
1636
1636
  var MESSAGE_MEASURES = ["views", "reactions", "forwards", "comments", "replies", "thread-size"];
1637
1637
  var AUTHOR_MEASURES = [
1638
1638
  "messages",
@@ -1772,7 +1772,7 @@ var withoutUrls = /* @__PURE__ */ __name((text2) => text2.replace(/\S+/gu, (toke
1772
1772
  var rankingWords = /* @__PURE__ */ __name((text2) => withoutUrls(text2).match(/[\p{L}\p{N}]+/gu)?.length ?? 0, "rankingWords");
1773
1773
  var rankingQuestion = /* @__PURE__ */ __name((text2) => withoutUrls(text2).includes("?"), "rankingQuestion");
1774
1774
 
1775
- // 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/domain/records.js
1775
+ // 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/domain/records.js
1776
1776
  import { createHash } from "node:crypto";
1777
1777
  var RECORDS_SCHEMA_VERSION = 1;
1778
1778
  var RECORD_OPERATIONS = ["upsert", "delete"];
@@ -1944,7 +1944,7 @@ var fieldReferences = /* @__PURE__ */ __name((record, options = {}) => {
1944
1944
  return found;
1945
1945
  }, "fieldReferences");
1946
1946
 
1947
- // 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/domain/relation-role-labels.js
1947
+ // 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/domain/relation-role-labels.js
1948
1948
  var label = /* @__PURE__ */ __name((en, ru, es) => ({ en, ru, es }), "label");
1949
1949
  var ROLE_LABELS = {
1950
1950
  organization: {
@@ -3,29 +3,29 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  textModel,
5
5
  vectorModelKey
6
- } from "./chunk-FORAOCZ3.js";
6
+ } from "./chunk-MRWV5VNQ.js";
7
7
  import {
8
8
  OPENAI_URL,
9
9
  openRemote,
10
10
  remoteKey,
11
11
  remoteModel
12
- } from "./chunk-PA4GEJXQ.js";
12
+ } from "./chunk-6FZPFNEU.js";
13
13
  import {
14
14
  endpointFetch
15
- } from "./chunk-T2EE5M7O.js";
15
+ } from "./chunk-REWV37HQ.js";
16
16
  import {
17
17
  isTextModelInstalled,
18
18
  openEmbedder,
19
19
  textModelsDirectory
20
- } from "./chunk-KGYK3OI3.js";
20
+ } from "./chunk-L4QLZDBZ.js";
21
21
  import {
22
22
  CliError
23
- } from "./chunk-QQGPV3QN.js";
23
+ } from "./chunk-PMGAU6AP.js";
24
24
  import {
25
25
  __name
26
26
  } from "./chunk-ZVVMGPBJ.js";
27
27
 
28
- // 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/services/meeting-model.js
28
+ // 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/services/meeting-model.js
29
29
  var integer = /* @__PURE__ */ __name((value, name, max) => {
30
30
  if (!Number.isSafeInteger(value) || value < 1 || value > max)
31
31
  throw new CliError("validation_error", `Invalid ${name}`);
@@ -4,15 +4,15 @@ import {
4
4
  MAX_SECRET_INPUT,
5
5
  bufferedInput,
6
6
  inputPolicy
7
- } from "./chunk-NWD7AFOR.js";
7
+ } from "./chunk-YPB5BEAD.js";
8
8
  import {
9
9
  CliError
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/terminal/prompt.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/terminal/prompt.js
16
16
  import { createInterface } from "node:readline";
17
17
  import { Writable } from "node:stream";
18
18
  var EMPTY_TRIES = 3;
@@ -0,0 +1,338 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ throughWrapper
5
+ } from "./chunk-KTVQIKU5.js";
6
+ import {
7
+ environmentOf,
8
+ readOnlyLockOf
9
+ } from "./chunk-ROK7Z5LQ.js";
10
+ import {
11
+ array,
12
+ boolean,
13
+ check,
14
+ pipe,
15
+ record,
16
+ safeParse,
17
+ strictObject,
18
+ string
19
+ } from "./chunk-C3JSQ7UJ.js";
20
+ import {
21
+ CliError
22
+ } from "./chunk-PMGAU6AP.js";
23
+ import {
24
+ __name
25
+ } from "./chunk-ZVVMGPBJ.js";
26
+
27
+ // 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/background/relay.js
28
+ import { createHash } from "node:crypto";
29
+ import { chmodSync, lstatSync, mkdirSync, rmSync } from "node:fs";
30
+ import { createConnection, createServer } from "node:net";
31
+ import { tmpdir } from "node:os";
32
+ import { dirname, isAbsolute, join } from "node:path";
33
+ import { PassThrough, Writable } from "node:stream";
34
+ var RELAY_PROTOCOL = 1;
35
+ var requestSchema = strictObject({
36
+ argv: array(string()),
37
+ env: record(string(), string()),
38
+ cwd: pipe(string(), check((path) => isAbsolute(path))),
39
+ tty: boolean(),
40
+ stdinTty: boolean()
41
+ });
42
+ var MAX_CLIENT_LINE = 1024 * 1024;
43
+ var MAX_SERVE_LINE = 64 * 1024 * 1024;
44
+ var MAX_SOCKET_PATH = 100;
45
+ var relayPath = /* @__PURE__ */ __name((lockPath) => {
46
+ const beside = lockPath.replace(/\.lock$/, ".sock");
47
+ if (beside.length <= MAX_SOCKET_PATH)
48
+ return beside;
49
+ const hash = createHash("sha256").update(beside).digest("hex").slice(0, 16);
50
+ const name = join(`wirecat-relay-${process.getuid?.() ?? "user"}`, `${hash}.sock`);
51
+ const temporary = join(tmpdir(), name);
52
+ if (temporary.length <= MAX_SOCKET_PATH || process.platform === "win32")
53
+ return temporary;
54
+ return join("/tmp", name);
55
+ }, "relayPath");
56
+ var privateDirectory = /* @__PURE__ */ __name((dir) => {
57
+ mkdirSync(dir, { recursive: true, mode: 448 });
58
+ const stat = lstatSync(dir);
59
+ const mine = process.getuid === void 0 || stat.uid === process.getuid();
60
+ if (!stat.isDirectory() || !mine || (stat.mode & 63) !== 0) {
61
+ throw new CliError("permission_error", `${dir} is not a private directory, so serve does not listen there`);
62
+ }
63
+ }, "privateDirectory");
64
+ var lines = /* @__PURE__ */ __name((socket, max, onLine, onTooLong) => {
65
+ let buffered = "";
66
+ socket.setEncoding("utf8");
67
+ socket.on("data", (chunk) => {
68
+ buffered += chunk;
69
+ for (let end = buffered.indexOf("\n"); end >= 0; end = buffered.indexOf("\n")) {
70
+ const line = buffered.slice(0, end);
71
+ buffered = buffered.slice(end + 1);
72
+ if (line)
73
+ onLine(line);
74
+ }
75
+ if (buffered.length > max)
76
+ onTooLong();
77
+ });
78
+ }, "lines");
79
+ var frame = /* @__PURE__ */ __name((socket, value) => {
80
+ if (!socket.destroyed)
81
+ socket.write(`${JSON.stringify(value)}
82
+ `);
83
+ }, "frame");
84
+ var listenRelay = /* @__PURE__ */ __name(async (path, run) => {
85
+ privateDirectory(dirname(path));
86
+ rmSync(path, { force: true });
87
+ const open = /* @__PURE__ */ new Set();
88
+ const running = /* @__PURE__ */ new Set();
89
+ const server = createServer((socket) => {
90
+ open.add(socket);
91
+ const stop = new AbortController();
92
+ const stdin = new PassThrough();
93
+ let started = false;
94
+ socket.on("error", () => {
95
+ });
96
+ socket.on("close", () => {
97
+ open.delete(socket);
98
+ stop.abort(new CliError("cancelled", "the client went away", { retryable: false }));
99
+ if (!stdin.writableEnded)
100
+ stdin.end();
101
+ });
102
+ lines(socket, MAX_CLIENT_LINE, (line) => {
103
+ let message;
104
+ try {
105
+ message = JSON.parse(line);
106
+ } catch {
107
+ socket.destroy();
108
+ return;
109
+ }
110
+ if (!started) {
111
+ started = true;
112
+ if (message.v !== RELAY_PROTOCOL) {
113
+ frame(socket, { diagnostic: `serve speaks relay protocol ${RELAY_PROTOCOL}; restart it`, exit: 1 });
114
+ socket.end();
115
+ return;
116
+ }
117
+ const parsed = safeParse(requestSchema, message.run);
118
+ if (!parsed.success) {
119
+ socket.destroy();
120
+ return;
121
+ }
122
+ stdin.isTTY = parsed.output.stdinTty;
123
+ if (parsed.output.stdinTty)
124
+ stdin.end();
125
+ const job = serve(socket, parsed.output, stdin, stop.signal, run);
126
+ running.add(job);
127
+ void job.then(() => running.delete(job), () => running.delete(job));
128
+ return;
129
+ }
130
+ if (typeof message.stdin === "string" && !stdin.writableEnded)
131
+ stdin.write(Buffer.from(message.stdin, "base64"));
132
+ if (message.stdinEnd === true && !stdin.writableEnded)
133
+ stdin.end();
134
+ }, () => socket.destroy());
135
+ });
136
+ await new Promise((resolve, reject) => {
137
+ server.once("error", reject);
138
+ server.listen(path, () => {
139
+ server.off("error", reject);
140
+ resolve();
141
+ });
142
+ });
143
+ chmodSync(path, 384);
144
+ return {
145
+ close: /* @__PURE__ */ __name(async () => {
146
+ for (const socket of open)
147
+ socket.destroy();
148
+ await new Promise((resolve) => server.close(() => resolve()));
149
+ await Promise.allSettled(running);
150
+ rmSync(path, { force: true });
151
+ }, "close")
152
+ };
153
+ }, "listenRelay");
154
+ var serve = /* @__PURE__ */ __name(async (socket, request, stdin, signal, run) => {
155
+ const streams = {
156
+ data: /* @__PURE__ */ __name((text) => frame(socket, { data: text }), "data"),
157
+ diagnostic: /* @__PURE__ */ __name((text) => frame(socket, { diagnostic: text }), "diagnostic"),
158
+ progress: /* @__PURE__ */ __name((text) => frame(socket, { progress: text }), "progress")
159
+ };
160
+ const stdout = new Writable({
161
+ write: /* @__PURE__ */ __name((chunk, _encoding, done) => {
162
+ frame(socket, { raw: Buffer.from(chunk).toString("base64") });
163
+ done();
164
+ }, "write")
165
+ });
166
+ let code = 1;
167
+ try {
168
+ code = await run(request, { streams, stdin, stdout, signal });
169
+ } finally {
170
+ frame(socket, { exit: code });
171
+ socket.end();
172
+ }
173
+ }, "serve");
174
+ var relayCommand = /* @__PURE__ */ __name((path, request, options) => new Promise((resolve, reject) => {
175
+ const { streams, stdin, stdout, signal, deadlineMs, writes, holder, listens = false } = options;
176
+ const socket = createConnection(path);
177
+ let connected = false;
178
+ let settled = false;
179
+ let timer;
180
+ const forward = /* @__PURE__ */ __name((chunk) => frame(socket, { stdin: Buffer.from(chunk).toString("base64") }), "forward");
181
+ const ended = /* @__PURE__ */ __name(() => frame(socket, { stdinEnd: true }), "ended");
182
+ const brokenPipe = /* @__PURE__ */ __name((error) => {
183
+ if (error.code === "EPIPE")
184
+ finish({ code: 0 });
185
+ }, "brokenPipe");
186
+ const finish = /* @__PURE__ */ __name((outcome) => {
187
+ if (settled)
188
+ return;
189
+ settled = true;
190
+ if (timer)
191
+ clearTimeout(timer);
192
+ stdout.off("error", brokenPipe);
193
+ signal.removeEventListener("abort", aborted);
194
+ stdin.off("data", forward).off("end", ended);
195
+ stdin.pause();
196
+ socket.destroy();
197
+ if ("code" in outcome)
198
+ resolve(outcome.code);
199
+ else
200
+ reject(outcome.error);
201
+ }, "finish");
202
+ const stopped = /* @__PURE__ */ __name(() => writes ? new CliError("outcome_unknown", `${holder} stopped before the command finished; it may have run \u2014 check before repeating it`, { retryable: false }) : new CliError("provider_unavailable", `${holder} stopped before the command finished`, { retryable: true }), "stopped");
203
+ const aborted = /* @__PURE__ */ __name(() => finish(listens ? { code: 0 } : { error: signal.reason }), "aborted");
204
+ if (signal.aborted)
205
+ return aborted();
206
+ signal.addEventListener("abort", aborted, { once: true });
207
+ stdout.on("error", brokenPipe);
208
+ if (deadlineMs !== void 0)
209
+ timer = setTimeout(() => finish({ error: stopped() }), deadlineMs);
210
+ socket.on("connect", () => {
211
+ connected = true;
212
+ frame(socket, { v: RELAY_PROTOCOL, run: request });
213
+ if (request.stdinTty)
214
+ ended();
215
+ else {
216
+ stdin.on("data", forward).once("end", ended);
217
+ stdin.resume();
218
+ }
219
+ });
220
+ socket.on("error", (error) => {
221
+ if (connected)
222
+ return finish({ error: stopped() });
223
+ finish({
224
+ error: new CliError("provider_unavailable", `${holder} holds the connection but does not answer its relay (${error.code ?? error.message}) \u2014 restart it`, { retryable: false, sent: false })
225
+ });
226
+ });
227
+ socket.on("close", () => finish({ error: stopped() }));
228
+ lines(socket, MAX_SERVE_LINE, (line) => {
229
+ let message;
230
+ try {
231
+ message = JSON.parse(line);
232
+ } catch {
233
+ return finish({ error: stopped() });
234
+ }
235
+ if (typeof message.data === "string")
236
+ streams.data(message.data);
237
+ if (typeof message.diagnostic === "string")
238
+ streams.diagnostic(message.diagnostic);
239
+ if (typeof message.progress === "string")
240
+ streams.progress?.(message.progress);
241
+ if (typeof message.raw === "string")
242
+ stdout.write(Buffer.from(message.raw, "base64"));
243
+ if (typeof message.exit === "number")
244
+ finish({ code: message.exit });
245
+ }, () => finish({ error: stopped() }));
246
+ }), "relayCommand");
247
+
248
+ // 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/cli/messenger/serve-relay.js
249
+ var lentConnection = /* @__PURE__ */ __name((connection, watchers) => throughWrapper(connection, {
250
+ close: /* @__PURE__ */ __name(async () => {
251
+ }, "close"),
252
+ feed: void 0,
253
+ storedChats: void 0,
254
+ listen: void 0,
255
+ listenHistory: void 0,
256
+ ...connection.watch && watchers ? {
257
+ // A watcher that throws (its output limit, a closed reader) ends its own watch, never serve's.
258
+ watch: /* @__PURE__ */ __name(async (onEvent, signal, onReady) => {
259
+ let watcher;
260
+ try {
261
+ await new Promise((resolve, reject) => {
262
+ watcher = /* @__PURE__ */ __name((event) => {
263
+ try {
264
+ onEvent(event);
265
+ } catch (error) {
266
+ reject(error);
267
+ }
268
+ }, "watcher");
269
+ watchers.add(watcher);
270
+ signal.addEventListener("abort", () => resolve(), { once: true });
271
+ onReady?.();
272
+ if (signal.aborted)
273
+ resolve();
274
+ });
275
+ } finally {
276
+ if (watcher)
277
+ watchers.delete(watcher);
278
+ }
279
+ }, "watch")
280
+ } : { watch: void 0 }
281
+ }), "lentConnection");
282
+ var serveRelay = /* @__PURE__ */ __name((command, messenger) => {
283
+ let held;
284
+ let relay;
285
+ const watchers = /* @__PURE__ */ new Set();
286
+ const borrowed = /* @__PURE__ */ __name(() => {
287
+ const connection = held;
288
+ if (!connection)
289
+ throw new CliError("provider_unavailable", "serve is not connected yet", { retryable: true });
290
+ return lentConnection(connection, watchers);
291
+ }, "borrowed");
292
+ return {
293
+ messenger: {
294
+ ...messenger,
295
+ connect: /* @__PURE__ */ __name(async (...args) => {
296
+ held = await messenger.connect(...args);
297
+ return held;
298
+ }, "connect")
299
+ },
300
+ arrived: /* @__PURE__ */ __name((event) => {
301
+ for (const watcher of watchers)
302
+ watcher(event);
303
+ }, "arrived"),
304
+ /** Listens beside the lock; the address goes into it, which is how a client finds it. */
305
+ open: /* @__PURE__ */ __name(async (lockPath, profile) => {
306
+ const environment = environmentOf(command);
307
+ const runCommand = environment.runCommand;
308
+ if (!runCommand)
309
+ return void 0;
310
+ const readOnly = readOnlyLockOf(messenger.app, environment.env ?? process.env);
311
+ const path = relayPath(lockPath);
312
+ relay = await listenRelay(path, (request, io) => runCommand(request.argv, {
313
+ env: {
314
+ ...request.env,
315
+ ...readOnly ? { [`${messenger.app.envPrefix}_READ_ONLY`]: "1" } : {}
316
+ },
317
+ streams: io.streams,
318
+ stdin: io.stdin,
319
+ stdout: io.stdout,
320
+ tty: request.tty,
321
+ signal: io.signal,
322
+ answer: /* @__PURE__ */ __name(() => null, "answer"),
323
+ relayed: { profile, cwd: request.cwd, connection: borrowed }
324
+ }));
325
+ return { path, protocol: RELAY_PROTOCOL };
326
+ }, "open"),
327
+ close: /* @__PURE__ */ __name(async () => {
328
+ await relay?.close();
329
+ }, "close")
330
+ };
331
+ }, "serveRelay");
332
+
333
+ export {
334
+ RELAY_PROTOCOL,
335
+ relayCommand,
336
+ lentConnection,
337
+ serveRelay
338
+ };
@@ -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/background/processes.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/background/processes.js
8
8
  import { execFileSync } from "node:child_process";
9
9
  import { readdirSync, readFileSync, readlinkSync } from "node:fs";
10
10
  var alive = /* @__PURE__ */ __name((pid) => {
@@ -3,12 +3,12 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  CliError,
5
5
  errorCodes
6
- } from "./chunk-QQGPV3QN.js";
6
+ } from "./chunk-PMGAU6AP.js";
7
7
  import {
8
8
  __name
9
9
  } from "./chunk-ZVVMGPBJ.js";
10
10
 
11
- // 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/errors/failures.js
11
+ // 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/errors/failures.js
12
12
  var isCliFailure = /* @__PURE__ */ __name((value) => value instanceof Error && value.name === "CliError" && errorCodes.includes(value.code), "isCliFailure");
13
13
  var isCommanderFailure = /* @__PURE__ */ __name((value) => {
14
14
  const { code, exitCode } = value ?? {};
@@ -6,21 +6,21 @@ import {
6
6
  answerSchema,
7
7
  describeOptions,
8
8
  metaOf
9
- } from "./chunk-VBVR6JRC.js";
9
+ } from "./chunk-ROK7Z5LQ.js";
10
10
  import {
11
11
  keyForCommand
12
- } from "./chunk-LKTDW5LH.js";
12
+ } from "./chunk-RJUVWJTA.js";
13
13
  import {
14
14
  jsonSchemaOf
15
- } from "./chunk-LOSYDRJU.js";
15
+ } from "./chunk-C3JSQ7UJ.js";
16
16
  import {
17
17
  CliError
18
- } from "./chunk-QQGPV3QN.js";
18
+ } from "./chunk-PMGAU6AP.js";
19
19
  import {
20
20
  __name
21
21
  } from "./chunk-ZVVMGPBJ.js";
22
22
 
23
- // 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/cli/command-contract.js
23
+ // 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/cli/command-contract.js
24
24
  var SCHEMA_DIALECT = "https://json-schema.org/draft/2020-12/schema";
25
25
  var outputOf = /* @__PURE__ */ __name((command) => {
26
26
  const entity = answerEntitySchema(command);