@wirecat/zoom-cli 0.75.0 → 0.77.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 (217) hide show
  1. package/README.md +12 -11
  2. package/contracts/wirecat.json +53 -105
  3. package/dist/answer-entities.d.ts +1 -141
  4. package/dist/answer-entities.d.ts.map +1 -1
  5. package/dist/answer-entities.js +0 -31
  6. package/dist/answer-entities.js.map +1 -1
  7. package/dist/api.d.ts +18 -1
  8. package/dist/api.d.ts.map +1 -1
  9. package/dist/api.js +179 -54
  10. package/dist/api.js.map +1 -1
  11. package/dist/archive-commands.d.ts +0 -3
  12. package/dist/archive-commands.d.ts.map +1 -1
  13. package/dist/archive-commands.js +1 -54
  14. package/dist/archive-commands.js.map +1 -1
  15. package/dist/bin/zm.js +2 -2
  16. package/dist/bundle/{all-profiles-WFLKFKJC.js → all-profiles-PMCFNDMA.js} +11 -11
  17. package/dist/bundle/answer-policy-XU7KEW2V.js +121 -0
  18. package/dist/bundle/{anthropic-H45W4P22.js → anthropic-TGJOKLUS.js} +6 -6
  19. package/dist/bundle/{app-server-I4FPLBIX.js → app-server-OAODUFM3.js} +73 -63
  20. package/dist/bundle/{bun-V5QLYBZU.js → bun-HJHVHJJV.js} +2 -2
  21. package/dist/bundle/{bun-sqlite-X2YZPHDS.js → bun-sqlite-PLBOY6FP.js} +7 -7
  22. package/dist/bundle/{chunk-P6MQ6FS4.js → chunk-2QDD6S2R.js} +8 -8
  23. package/dist/bundle/{chunk-ZMHZ6CQS.js → chunk-2QRGJSKO.js} +2 -2
  24. package/dist/bundle/{chunk-DQBLDZ7M.js → chunk-36SI35XZ.js} +5 -5
  25. package/dist/bundle/{chunk-HKPNQL52.js → chunk-375BH5OD.js} +4 -4
  26. package/dist/bundle/{chunk-T4FMXDDV.js → chunk-3TLQF3DN.js} +3 -3
  27. package/dist/bundle/{chunk-EA2OB75T.js → chunk-4QNW4NK6.js} +1 -1
  28. package/dist/bundle/{chunk-4XDWV6VJ.js → chunk-4Z4VOQRR.js} +17 -17
  29. package/dist/bundle/{chunk-VLK3X53X.js → chunk-5A5W322G.js} +6 -2
  30. package/dist/bundle/chunk-5C5UEKUJ.js +170 -0
  31. package/dist/bundle/chunk-5C6CRSEM.js +389 -0
  32. package/dist/bundle/{chunk-3YKAFLXY.js → chunk-5KHCFIWI.js} +2 -2
  33. package/dist/bundle/{chunk-NQQVNLO6.js → chunk-635GRAO5.js} +12 -12
  34. package/dist/bundle/{chunk-RKI4BGWG.js → chunk-6JRBMNRN.js} +3 -3
  35. package/dist/bundle/{chunk-Y5J5CAG2.js → chunk-6YCFDDRO.js} +1 -1
  36. package/dist/bundle/{chunk-ZVVRRMLW.js → chunk-77JQIY2V.js} +3 -3
  37. package/dist/bundle/{chunk-IW245Q5B.js → chunk-7AFYZOHU.js} +36 -32
  38. package/dist/bundle/{chunk-V3UK6E5B.js → chunk-7CMYNW3W.js} +4 -4
  39. package/dist/bundle/chunk-7DTU7QZP.js +72 -0
  40. package/dist/bundle/chunk-7ILGYNWX.js +773 -0
  41. package/dist/bundle/{chunk-XUHQ7DVT.js → chunk-7S3N5CTA.js} +1 -1
  42. package/dist/bundle/chunk-7SNU7RFU.js +229 -0
  43. package/dist/bundle/{chunk-4YNUQGDP.js → chunk-A6LK2W5J.js} +1 -1
  44. package/dist/bundle/{chunk-MHXZ62CU.js → chunk-ADJIYY33.js} +1 -1
  45. package/dist/bundle/{chunk-WUWF4EXZ.js → chunk-B7XFDMFV.js} +22 -12
  46. package/dist/bundle/{chunk-2Q4CB4EI.js → chunk-BOJCRTQW.js} +2 -2
  47. package/dist/bundle/{chunk-GPVSGZ4R.js → chunk-CJL5GHTQ.js} +1010 -617
  48. package/dist/bundle/{chunk-BY2YPKZZ.js → chunk-CL6QAZGT.js} +39 -67
  49. package/dist/bundle/{chunk-GU4FVTJV.js → chunk-CUJJZJ4R.js} +44 -9
  50. package/dist/bundle/{chunk-FBYGBR4Q.js → chunk-CZ6OO66B.js} +4 -4
  51. package/dist/bundle/chunk-DCEQIKFD.js +259 -0
  52. package/dist/bundle/{chunk-QBKKTTA3.js → chunk-DDUNPLET.js} +279 -588
  53. package/dist/bundle/{chunk-CAQ5GW3A.js → chunk-DYIRJINE.js} +1 -1
  54. package/dist/bundle/{chunk-L5UILROP.js → chunk-E3UPMPUV.js} +8 -8
  55. package/dist/bundle/{chunk-F6RB5FHZ.js → chunk-ECRFXQHA.js} +1 -1
  56. package/dist/bundle/{chunk-AVCYD4WQ.js → chunk-F4ROWGLU.js} +68 -38
  57. package/dist/bundle/{chunk-6XNTELM5.js → chunk-FDQE2CLT.js} +1 -1
  58. package/dist/bundle/{chunk-PCJRHC5Y.js → chunk-FRC5QIPQ.js} +8 -8
  59. package/dist/bundle/{chunk-4RJL32PF.js → chunk-FS5HPXQN.js} +26 -9
  60. package/dist/bundle/{chunk-ZBYKCVSV.js → chunk-GHBDYYPO.js} +2 -2
  61. package/dist/bundle/{chunk-OUM4ZO53.js → chunk-H2EVYY5Z.js} +1 -1
  62. package/dist/bundle/{chunk-VPSQZ2YR.js → chunk-I3QMPQYD.js} +49 -49
  63. package/dist/bundle/{chunk-3U3W6YY5.js → chunk-ICZVSVTW.js} +71 -252
  64. package/dist/bundle/{chunk-QEO3XTIE.js → chunk-IJTBB23F.js} +32 -33
  65. package/dist/bundle/{chunk-FT7X74RT.js → chunk-IS6MUPN2.js} +4 -4
  66. package/dist/bundle/{chunk-NL6AZ6S2.js → chunk-IUOKIZZN.js} +2 -2
  67. package/dist/bundle/{chunk-3HTJBGNP.js → chunk-IZMRQ3MV.js} +21 -16
  68. package/dist/bundle/{chunk-X2FILY5F.js → chunk-JFVZVPRW.js} +3 -3
  69. package/dist/bundle/{chunk-MNVT7EJS.js → chunk-JMU3E2WA.js} +2 -2
  70. package/dist/bundle/{chunk-T25PR26L.js → chunk-JQUYHPQD.js} +7 -7
  71. package/dist/bundle/{chunk-JDTZCZ5K.js → chunk-KHBSQROH.js} +5 -5
  72. package/dist/bundle/{chunk-HCZYJMBP.js → chunk-KYKW2W6X.js} +1 -1
  73. package/dist/bundle/chunk-LMZUC4CS.js +101 -0
  74. package/dist/bundle/{chunk-PPM7UTCT.js → chunk-LUAS73NT.js} +18 -18
  75. package/dist/bundle/{chunk-P4ZQQLZF.js → chunk-LWMDLXEO.js} +2384 -3000
  76. package/dist/bundle/{chunk-W2AC2RAG.js → chunk-LYVHQ6DJ.js} +14 -14
  77. package/dist/bundle/{chunk-DUPFAY35.js → chunk-MCLZ74II.js} +7 -7
  78. package/dist/bundle/chunk-MIG4RLDB.js +555 -0
  79. package/dist/bundle/{chunk-3URYKAJP.js → chunk-MMAZUJBO.js} +1 -1
  80. package/dist/bundle/{chunk-B6Q53CVA.js → chunk-MTH3JJHF.js} +24 -22
  81. package/dist/bundle/{chunk-7ZVWV33Z.js → chunk-NJJEUG4C.js} +35 -13
  82. package/dist/bundle/{chunk-SEJBS7SI.js → chunk-NKKVVPL5.js} +1 -1
  83. package/dist/bundle/{chunk-TSHUBGN4.js → chunk-NOF6LABG.js} +6 -6
  84. package/dist/bundle/{chunk-F7K2V6OA.js → chunk-NPDPD2H3.js} +12 -12
  85. package/dist/bundle/{chunk-2PYZTRRC.js → chunk-NPIVV52M.js} +1 -1
  86. package/dist/bundle/{chunk-WQOGHND4.js → chunk-OOIU36FA.js} +1 -1
  87. package/dist/bundle/{chunk-XCJGDPMN.js → chunk-OXXJW3A5.js} +22320 -22886
  88. package/dist/bundle/chunk-PM3MB3E7.js +295 -0
  89. package/dist/bundle/{chunk-VUPWDCYV.js → chunk-PO4RZ4XZ.js} +1 -1
  90. package/dist/bundle/{chunk-K5E5MB4C.js → chunk-Q7ZW7XAX.js} +31 -87
  91. package/dist/bundle/{chunk-HNWDEDMU.js → chunk-QAGECFHL.js} +22 -22
  92. package/dist/bundle/{chunk-JTYWSXJG.js → chunk-QE4L2QQZ.js} +9 -9
  93. package/dist/bundle/{chunk-4J5GJJ2I.js → chunk-QKNO3JTG.js} +2 -2
  94. package/dist/bundle/{chunk-IMDTC4MD.js → chunk-QUGESVOE.js} +22 -35
  95. package/dist/bundle/{chunk-ELD5AC7Q.js → chunk-RQS3W4P6.js} +7 -6
  96. package/dist/bundle/{chunk-A3Q3PG54.js → chunk-SFPUSEOT.js} +2 -2
  97. package/dist/bundle/{chunk-SR5X7YKB.js → chunk-SP5OMHOO.js} +3 -3
  98. package/dist/bundle/chunk-STNZQBY4.js +335 -0
  99. package/dist/bundle/{chunk-EOZAJGB4.js → chunk-SVJQRG5N.js} +16 -16
  100. package/dist/bundle/{chunk-IDGWBKMH.js → chunk-SY5NGYKA.js} +12 -12
  101. package/dist/bundle/{chunk-NE4GYKQA.js → chunk-T4CI3YXW.js} +6 -6
  102. package/dist/bundle/{chunk-3YRPDNWK.js → chunk-T6RSYDFA.js} +1075 -443
  103. package/dist/bundle/{chunk-QXQUANWE.js → chunk-TY4FFK2P.js} +6 -6
  104. package/dist/bundle/chunk-UGRGYLEI.js +224 -0
  105. package/dist/bundle/{chunk-C5WQ57AB.js → chunk-VGERRRDC.js} +1 -1
  106. package/dist/bundle/{chunk-NQLL4KRN.js → chunk-VJ2TLU7R.js} +6 -6
  107. package/dist/bundle/{chunk-PX4IMYVB.js → chunk-W7UCN7MF.js} +3 -3
  108. package/dist/bundle/{chunk-RBYVQE3S.js → chunk-WD5OL5JB.js} +81 -5
  109. package/dist/bundle/{chunk-LRCSDAYK.js → chunk-XC3MWABM.js} +4 -4
  110. package/dist/bundle/{chunk-MAE5UGRQ.js → chunk-XCA5N63N.js} +6 -6
  111. package/dist/bundle/chunk-XVHDT4CO.js +31 -0
  112. package/dist/bundle/{chunk-532H3KT3.js → chunk-YFN5A7OP.js} +4 -4
  113. package/dist/bundle/{chunk-IJCUAKR5.js → chunk-YJIGGUPI.js} +4 -4
  114. package/dist/bundle/{chunk-FIVFP53N.js → chunk-YVI5SQPY.js} +1 -1
  115. package/dist/bundle/{chunk-IO3BQ6JU.js → chunk-ZRNNMBPC.js} +31 -577
  116. package/dist/bundle/{chunk-RABCFGT3.js → chunk-ZUMKZOHR.js} +3 -3
  117. package/dist/bundle/{chunk-M4OP5ASJ.js → chunk-ZZ32DXTH.js} +1 -1
  118. package/dist/bundle/{cli-NPRYCWFH.js → cli-Y27PHKBV.js} +105 -84
  119. package/dist/bundle/command-contract-GB7YA3KW.js +45 -0
  120. package/dist/bundle/{command-server-entry-BV4SUPUI.js → command-server-entry-AXQSW2X6.js} +35 -31
  121. package/dist/bundle/config-2OOABHR7.js +108 -0
  122. package/dist/bundle/{decode-PRMKCHHC.js → decode-ZRNOOTUZ.js} +16 -8
  123. package/dist/bundle/{dispatch-EU67WGME.js → dispatch-2GHGPAYH.js} +9 -9
  124. package/dist/bundle/{dist-HGLDGKUW.js → dist-MUFVAMKB.js} +25 -22
  125. package/dist/bundle/{echarts-QIXLXS3G.js → echarts-F4PHDYET.js} +2 -2
  126. package/dist/bundle/{embed-OZN2BIJY.js → embed-KWHCKPCV.js} +7 -7
  127. package/dist/bundle/{embedder-RBDHO6Z6.js → embedder-U3R3RY54.js} +10 -10
  128. package/dist/bundle/{failure-CTJLEB2R.js → failure-S2YXEN4A.js} +3 -3
  129. package/dist/bundle/first-run-F4YR2E2C.js +29 -0
  130. package/dist/bundle/first-screen-HPRHD3VK.js +43 -0
  131. package/dist/bundle/{folders-MSBTAPAG.js → folders-DVTRFQKW.js} +5 -5
  132. package/dist/bundle/{instructions-MD2RZT5Z.js → instructions-JU4YW6QY.js} +1 -1
  133. package/dist/bundle/{main-FPMCCRIQ.js → main-5UCRPACH.js} +24 -24
  134. package/dist/bundle/{mcp-TDKGDB4V.js → mcp-O6ACR2DX.js} +2 -2
  135. package/dist/bundle/meeting-combined-IWU5SPAH.js +26 -0
  136. package/dist/bundle/meeting-model-ILIUJECZ.js +26 -0
  137. package/dist/bundle/meeting-semantic-5DKRGZFS.js +23 -0
  138. package/dist/bundle/{meetings-WYCVHAIP.js → meetings-T2UY35DV.js} +43 -7
  139. package/dist/bundle/{node-IEVT2FSJ.js → node-MAVRAF4M.js} +2 -2
  140. package/dist/bundle/{node-sqlite-O4C6IWSM.js → node-sqlite-TFBQ5NDI.js} +8 -8
  141. package/dist/bundle/{oauth-6VXOUXSE.js → oauth-7IG5HWSY.js} +8 -8
  142. package/dist/bundle/{open-AMUIWV3Y.js → open-3R3N7L3X.js} +6 -6
  143. package/dist/bundle/openai-DD5I3DWC.js +28 -0
  144. package/dist/bundle/{output-file-VDOCYH2G.js → output-file-KKHHAYWF.js} +6 -6
  145. package/dist/bundle/{process-6Q23D3TO.js → process-OIO254NR.js} +1 -1
  146. package/dist/bundle/{program-CF2NKA2A.js → program-IBYRU76H.js} +428 -250
  147. package/dist/bundle/{prompt-N3UZE4ZR.js → prompt-LNEOO7PN.js} +6 -6
  148. package/dist/bundle/{recognize-I5F3K3CZ.js → recognize-2WYLT3PC.js} +5 -5
  149. package/dist/bundle/{remote-CJF5KMMY.js → remote-7EAJEIV7.js} +11 -11
  150. package/dist/bundle/{rerank-6WLY6MKY.js → rerank-DZBZ744F.js} +8 -8
  151. package/dist/bundle/run-log-CCIVRSHP.js +135 -0
  152. package/dist/bundle/{serve-FOQJ3WMX.js → serve-T3KQV5SS.js} +15 -15
  153. package/dist/bundle/{server-OEEGRSQD.js → server-2QQAQZ2J.js} +59 -49
  154. package/dist/bundle/server-OJQMPF2R.js +84 -0
  155. package/dist/bundle/{services-Q6SFESMS.js → services-DETAKMC3.js} +80 -54
  156. package/dist/bundle/{speech-PBVEIG4N.js → speech-HD57JNTK.js} +34 -18
  157. package/dist/bundle/{sqlite-runtime-IWR65V6I.js → sqlite-runtime-OCETZSEZ.js} +7 -7
  158. package/dist/bundle/{state-G54C2N6U.js → state-ZKVQ4DBI.js} +7 -7
  159. package/dist/bundle/{store-D5OLXIFW.js → store-7IZ2WMHF.js} +24 -20
  160. package/dist/bundle/{store-7EWMPTTW.js → store-GEAQ7V5R.js} +26 -22
  161. package/dist/bundle/store-connection-BALCZW7P.js +101 -0
  162. package/dist/bundle/store-maintenance-command-SBT4LDSI.js +76 -0
  163. package/dist/bundle/{streaming-PQEXKTE5.js → streaming-CLBAO3MG.js} +7 -7
  164. package/dist/bundle/{tokens-J7TFHLEG.js → tokens-WH73ZWFI.js} +10 -10
  165. package/dist/bundle/zm.js +9 -9
  166. package/dist/bundle/{zoom-app-SULPMVN4.js → zoom-app-ZDTYMJET.js} +8 -8
  167. package/dist/commands.d.ts.map +1 -1
  168. package/dist/commands.js +3 -0
  169. package/dist/commands.js.map +1 -1
  170. package/dist/first-screen.d.ts.map +1 -1
  171. package/dist/first-screen.js +3 -5
  172. package/dist/first-screen.js.map +1 -1
  173. package/dist/meeting-integration-commands.d.ts.map +1 -1
  174. package/dist/meeting-integration-commands.js +46 -28
  175. package/dist/meeting-integration-commands.js.map +1 -1
  176. package/dist/meeting-search-commands.d.ts.map +1 -1
  177. package/dist/meeting-search-commands.js +6 -5
  178. package/dist/meeting-search-commands.js.map +1 -1
  179. package/dist/meeting-source.d.ts.map +1 -1
  180. package/dist/meeting-source.js +15 -1
  181. package/dist/meeting-source.js.map +1 -1
  182. package/dist/permissions.d.ts +8 -4
  183. package/dist/permissions.d.ts.map +1 -1
  184. package/dist/permissions.js +25 -24
  185. package/dist/permissions.js.map +1 -1
  186. package/dist/program-bindings.d.ts.map +1 -1
  187. package/dist/program-bindings.js +10 -6
  188. package/dist/program-bindings.js.map +1 -1
  189. package/dist/program.d.ts +2 -1
  190. package/dist/program.d.ts.map +1 -1
  191. package/dist/program.js.map +1 -1
  192. package/dist/remote-meetings.d.ts +38 -8
  193. package/dist/remote-meetings.d.ts.map +1 -1
  194. package/dist/remote-meetings.js +52 -29
  195. package/dist/remote-meetings.js.map +1 -1
  196. package/dist/run.d.ts.map +1 -1
  197. package/dist/run.js +4 -2
  198. package/dist/run.js.map +1 -1
  199. package/dist/version.d.ts +1 -1
  200. package/dist/version.js +1 -1
  201. package/dist/zoom-app.d.ts.map +1 -1
  202. package/dist/zoom-app.js +1 -0
  203. package/dist/zoom-app.js.map +1 -1
  204. package/package.json +3 -3
  205. package/skills/zoom-cli/SKILL.md +2 -2
  206. package/dist/bundle/answer-policy-XCKC2LLN.js +0 -110
  207. package/dist/bundle/chunk-NU4FSSMN.js +0 -161
  208. package/dist/bundle/command-contract-OJYRKQHR.js +0 -41
  209. package/dist/bundle/config-UMEV24OE.js +0 -97
  210. package/dist/bundle/first-run-HNCD7U3B.js +0 -29
  211. package/dist/bundle/first-screen-374BBMO6.js +0 -39
  212. package/dist/bundle/openai-MEDN6FSK.js +0 -28
  213. package/dist/bundle/run-log-FKF4ZX4M.js +0 -124
  214. package/dist/bundle/server-BAGY5HEZ.js +0 -74
  215. package/dist/bundle/store-connection-34747SCC.js +0 -90
  216. package/dist/bundle/store-maintenance-command-QBO67F7Z.js +0 -65
  217. /package/dist/bundle/{chunk-XWBPP2HX.js → chunk-VKE77B3F.js} +0 -0
@@ -0,0 +1,555 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ createRecordLog,
5
+ resolvePaths,
6
+ traceIdOf,
7
+ writeSecurely
8
+ } from "./chunk-QAGECFHL.js";
9
+ import {
10
+ __name
11
+ } from "./chunk-ZVVMGPBJ.js";
12
+
13
+ // node_modules/.pnpm/@wirecat+cli-core@0.667.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_0b2555be96e01c2163d7c05aae2e84c1/node_modules/@wirecat/cli-core/dist/runs/run.js
14
+ import { randomUUID } from "node:crypto";
15
+ import { appendFileSync, mkdirSync, readdirSync, readFileSync, rmSync, statSync, writeFileSync } from "node:fs";
16
+ import { userInfo } from "node:os";
17
+ import { join, sep } from "node:path";
18
+
19
+ // node_modules/.pnpm/@wirecat+cli-core@0.667.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_0b2555be96e01c2163d7c05aae2e84c1/node_modules/@wirecat/cli-core/dist/runs/log-keys.js
20
+ var snake = /* @__PURE__ */ __name((key) => key.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`), "snake");
21
+ var camel = /* @__PURE__ */ __name((key) => key.replace(/_([a-z0-9])/g, (_, letter) => letter.toUpperCase()), "camel");
22
+ var renamed = /* @__PURE__ */ __name((record, name) => Object.fromEntries(Object.entries(record).map(([key, value]) => [name(key), value])), "renamed");
23
+ var logAttributes = /* @__PURE__ */ __name((event) => renamed(event, snake), "logAttributes");
24
+ var fromLogAttributes = /* @__PURE__ */ __name((attributes) => renamed(attributes, camel), "fromLogAttributes");
25
+ var snakeLogger = /* @__PURE__ */ __name((logger) => ({
26
+ debug: /* @__PURE__ */ __name((event, message) => logger.debug(logAttributes(event), message), "debug"),
27
+ info: /* @__PURE__ */ __name((event, message) => logger.info(logAttributes(event), message), "info"),
28
+ warn: /* @__PURE__ */ __name((event, message) => logger.warn(logAttributes(event), message), "warn"),
29
+ error: /* @__PURE__ */ __name((event, message) => logger.error(logAttributes(event), message), "error")
30
+ }), "snakeLogger");
31
+
32
+ // node_modules/.pnpm/@wirecat+cli-core@0.667.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_0b2555be96e01c2163d7c05aae2e84c1/node_modules/@wirecat/cli-core/dist/runs/log-attributes.js
33
+ var diagnostic = {
34
+ event: true,
35
+ operation: true,
36
+ opcode: true,
37
+ seq: true,
38
+ status: true,
39
+ method: true,
40
+ endpointTemplate: true,
41
+ bytes: true,
42
+ ids: true,
43
+ counts: true,
44
+ durationMs: true,
45
+ outcome: true,
46
+ errorCode: true,
47
+ providerError: true,
48
+ level: true,
49
+ transport: true,
50
+ attempt: true,
51
+ waitMs: true,
52
+ code: true,
53
+ detail: true,
54
+ reason: true,
55
+ ageMs: true,
56
+ kind: true,
57
+ table: true,
58
+ op: true,
59
+ n: true
60
+ };
61
+ var send = {
62
+ profile: true,
63
+ chatId: true,
64
+ outcome: true,
65
+ kind: true,
66
+ action: true,
67
+ people: true,
68
+ messageId: true,
69
+ key: true,
70
+ count: true,
71
+ forEveryone: true,
72
+ sendId: true,
73
+ operationId: true,
74
+ parentOperationId: true,
75
+ replyTo: true,
76
+ threadId: true,
77
+ sendAs: true,
78
+ resultChatId: true,
79
+ length: true,
80
+ attachments: true,
81
+ scheduledFor: true,
82
+ notify: true,
83
+ origin: true,
84
+ reservation: true,
85
+ errorCode: true
86
+ };
87
+ var background = [
88
+ "job",
89
+ "pid",
90
+ "schedule",
91
+ "exitCode",
92
+ "tool",
93
+ "tier",
94
+ "actorType",
95
+ "actorId",
96
+ "agent",
97
+ "targetType",
98
+ "targetId"
99
+ ];
100
+ var crash = ["errorClass", "frames"];
101
+ var dropped = ["dropped"];
102
+ var LOG_ATTRIBUTES = [
103
+ ...new Set([...Object.keys(diagnostic), ...Object.keys(send), ...background, ...crash, ...dropped].map((key) => Object.keys(logAttributes({ [key]: true }))[0]))
104
+ ].sort();
105
+
106
+ // node_modules/.pnpm/@wirecat+cli-core@0.667.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_0b2555be96e01c2163d7c05aae2e84c1/node_modules/@wirecat/cli-core/dist/runs/run.js
107
+ var KEEP_RUNS_FOR_DAYS = 30;
108
+ var KEEP_SUCCESSFUL_RUNS_FOR_DAYS = 7;
109
+ var KEEP_STORE_RUNS_FOR_DAYS = 3;
110
+ var RUNS_SIZE_LIMIT_MB = 200;
111
+ var runsDirFor = /* @__PURE__ */ __name((app, env = process.env) => join(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "runs"), "runsDirFor");
112
+ var startRun = /* @__PURE__ */ __name((options) => {
113
+ const now = options.now ?? (() => /* @__PURE__ */ new Date());
114
+ const startedAt = options.startedAt ?? now();
115
+ const id = options.runId ?? newRunId(startedAt, options.command);
116
+ const dir = join(options.runsDir, day(startedAt), id);
117
+ pruneRuns(options.runsDir, {
118
+ keepDays: options.keepDays ?? KEEP_RUNS_FOR_DAYS,
119
+ keepSuccessDays: options.keepSuccessDays ?? KEEP_SUCCESSFUL_RUNS_FOR_DAYS,
120
+ keepStoreDays: options.keepStoreDays ?? KEEP_STORE_RUNS_FOR_DAYS,
121
+ maxBytes: options.maxBytes ?? RUNS_SIZE_LIMIT_MB * 1024 * 1024,
122
+ now: startedAt
123
+ });
124
+ refuseRealStateInTests(dir);
125
+ const metadata = {
126
+ runId: id,
127
+ command: options.command,
128
+ ...options.profile === void 0 ? {} : { profile: options.profile },
129
+ startedAt: startedAt.toISOString(),
130
+ status: "running",
131
+ cliVersion: options.cliVersion,
132
+ runtime: runtime(),
133
+ platform: process.platform,
134
+ arch: process.arch,
135
+ ...options.traceId === void 0 ? {} : { traceId: options.traceId },
136
+ ...options.context
137
+ };
138
+ let file;
139
+ const opened = /* @__PURE__ */ __name(() => {
140
+ if (file)
141
+ return file;
142
+ mkdirSync(dir, { recursive: true, mode: 448 });
143
+ const events = join(dir, "events.jsonl");
144
+ writeFileSync(events, "", { flag: "a", mode: 384 });
145
+ file = snakeLogger(createRecordLog({
146
+ to: events,
147
+ runId: id,
148
+ command: options.command,
149
+ resource: { service: options.service, version: options.cliVersion },
150
+ allow: LOG_ATTRIBUTES,
151
+ ...options.traceId === void 0 ? {} : { traceId: options.traceId },
152
+ ...options.onError === void 0 ? {} : { onError: options.onError }
153
+ }));
154
+ writeRunFile(dir, metadata);
155
+ return file;
156
+ }, "opened");
157
+ if (!options.lazy)
158
+ opened();
159
+ let finished = false;
160
+ const operations = /* @__PURE__ */ new Set();
161
+ const codes = /* @__PURE__ */ new Set();
162
+ const tables = /* @__PURE__ */ new Set();
163
+ const noted = /* @__PURE__ */ __name((level) => (event, message) => {
164
+ const { operation, errorCode, error_code, code, kind, table } = event;
165
+ if (typeof operation === "string")
166
+ operations.add(operation);
167
+ if (kind === "store" && typeof table === "string")
168
+ tables.add(table);
169
+ for (const value of [errorCode, error_code, code])
170
+ if (typeof value === "string")
171
+ codes.add(value);
172
+ if (finished)
173
+ return;
174
+ opened()[level](event, message);
175
+ }, "noted");
176
+ const logger = { debug: noted("debug"), info: noted("info"), warn: noted("warn"), error: noted("error") };
177
+ return {
178
+ id,
179
+ dir,
180
+ logger,
181
+ finish: /* @__PURE__ */ __name(async (status, extra = {}) => {
182
+ if (finished)
183
+ return;
184
+ finished = true;
185
+ const completedAt = now();
186
+ const final = {
187
+ ...metadata,
188
+ ...extra,
189
+ status,
190
+ completedAt: completedAt.toISOString(),
191
+ durationMs: completedAt.getTime() - startedAt.getTime(),
192
+ operations: [...operations].sort(),
193
+ codes: [...codes].sort(),
194
+ ...tables.size > 0 ? { tables: [...tables].sort() } : {}
195
+ };
196
+ if (file || status !== "success") {
197
+ opened();
198
+ writeRunFile(dir, final);
199
+ return;
200
+ }
201
+ try {
202
+ mkdirSync(join(dir, ".."), { recursive: true, mode: 448 });
203
+ appendIndex(join(dir, ".."), runFileOf(final));
204
+ } catch (error) {
205
+ options.onError?.(error);
206
+ }
207
+ }, "finish")
208
+ };
209
+ }, "startRun");
210
+ var refuseRealStateInTests = /* @__PURE__ */ __name((dir, env = process.env) => {
211
+ if (env.VITEST === void 0)
212
+ return;
213
+ let home;
214
+ try {
215
+ home = userInfo().homedir;
216
+ } catch {
217
+ return;
218
+ }
219
+ if (dir.startsWith(join(home, ".local", "share") + sep))
220
+ throw new Error(`a test opened a run in the real data folder: ${dir}`);
221
+ }, "refuseRealStateInTests");
222
+ var runtime = /* @__PURE__ */ __name(() => {
223
+ const bun = process.versions.bun;
224
+ return bun ? `bun ${bun}` : `node ${process.versions.node}`;
225
+ }, "runtime");
226
+ var newRunId = /* @__PURE__ */ __name((startedAt, command) => {
227
+ const stamp = startedAt.toISOString().replace(/[-:]/g, "").replace(/\.\d+Z$/, "Z");
228
+ const slug = command.replace(/[^a-z0-9]+/gi, "-").toLowerCase();
229
+ return `${stamp}-${slug}-${randomUUID().slice(0, 6)}`;
230
+ }, "newRunId");
231
+ var INDEX = "index.jsonl";
232
+ var appendIndex = /* @__PURE__ */ __name((dayDir, written) => {
233
+ appendFileSync(join(dayDir, INDEX), `${JSON.stringify(written)}
234
+ `, { mode: 384 });
235
+ }, "appendIndex");
236
+ var writeRunFile = /* @__PURE__ */ __name((dir, metadata) => {
237
+ const written = runFileOf(metadata);
238
+ writeSecurely(join(dir, "run.json"), `${JSON.stringify(written, null, 2)}
239
+ `, 384);
240
+ try {
241
+ appendIndex(join(dir, ".."), written);
242
+ } catch {
243
+ }
244
+ }, "writeRunFile");
245
+ var matchesListFilter = /* @__PURE__ */ __name((run, filter) => (filter.runId === void 0 || run.runId === filter.runId) && (filter.command === void 0 || run.command === filter.command) && (filter.profile === void 0 || run.profile === filter.profile) && (filter.status === void 0 || run.status === filter.status) && (filter.errorCode === void 0 || run.errorCode === filter.errorCode), "matchesListFilter");
246
+ var listRuns = /* @__PURE__ */ __name((runsDir, { since, atLeast = Number.POSITIVE_INFINITY, filter = {} } = {}) => {
247
+ const first = since === void 0 ? void 0 : day(new Date(since));
248
+ const runs = [];
249
+ for (const date of days(runsDir).sort().reverse()) {
250
+ if (first !== void 0 && date < first || runs.length >= atLeast)
251
+ break;
252
+ for (const metadata of runsOfDay(join(runsDir, date))) {
253
+ if (matchesListFilter(metadata, filter))
254
+ runs.push(metadata);
255
+ }
256
+ }
257
+ return runs;
258
+ }, "listRuns");
259
+ var indexedRuns = /* @__PURE__ */ __name((dayDir) => {
260
+ const latest = /* @__PURE__ */ new Map();
261
+ let raw = "";
262
+ try {
263
+ raw = readFileSync(join(dayDir, INDEX), "utf8");
264
+ } catch {
265
+ }
266
+ for (const line of raw.split("\n")) {
267
+ if (line.trim() === "")
268
+ continue;
269
+ try {
270
+ const metadata = metadataOf(JSON.parse(line));
271
+ if (typeof metadata.runId === "string")
272
+ latest.set(metadata.runId, metadata);
273
+ } catch {
274
+ }
275
+ }
276
+ return latest;
277
+ }, "indexedRuns");
278
+ var runsOfDay = /* @__PURE__ */ __name((dayDir) => {
279
+ const latest = indexedRuns(dayDir);
280
+ for (const entry of safeReaddir(dayDir)) {
281
+ if (entry === INDEX || entry.startsWith(".") || latest.has(entry))
282
+ continue;
283
+ const metadata = readRun(join(dayDir, entry));
284
+ if (metadata)
285
+ latest.set(metadata.runId, metadata);
286
+ }
287
+ return [...latest.values()].sort((a, b) => a.runId < b.runId ? 1 : a.runId > b.runId ? -1 : 0);
288
+ }, "runsOfDay");
289
+ var findRun = /* @__PURE__ */ __name((runsDir, id) => {
290
+ const stamped = /^(\d{4})(\d{2})(\d{2})T/.exec(id);
291
+ const likely = stamped ? [`${stamped[1]}-${stamped[2]}-${stamped[3]}`] : [];
292
+ const dates = [.../* @__PURE__ */ new Set([...likely, ...days(runsDir)])];
293
+ for (const date of dates) {
294
+ const dir = join(runsDir, date, id);
295
+ const metadata = readRun(dir);
296
+ if (metadata)
297
+ return { dir, metadata };
298
+ }
299
+ for (const date of dates) {
300
+ const metadata = indexedRuns(join(runsDir, date)).get(id);
301
+ if (metadata)
302
+ return { dir: join(runsDir, date, id), metadata };
303
+ }
304
+ return void 0;
305
+ }, "findRun");
306
+ var readEvents = /* @__PURE__ */ __name((dir) => {
307
+ let raw;
308
+ try {
309
+ raw = readFileSync(join(dir, "events.jsonl"), "utf8");
310
+ } catch {
311
+ return [];
312
+ }
313
+ const events = [];
314
+ for (const line of raw.split("\n")) {
315
+ if (line.trim() === "")
316
+ continue;
317
+ try {
318
+ const parsed = JSON.parse(line);
319
+ if (parsed !== null && typeof parsed === "object")
320
+ events.push(eventOf(parsed));
321
+ } catch {
322
+ }
323
+ }
324
+ return events;
325
+ }, "readEvents");
326
+ var eventOf = /* @__PURE__ */ __name((line) => {
327
+ const { attributes, time, severity } = line;
328
+ if (attributes === null || typeof attributes !== "object")
329
+ return logAttributes(line);
330
+ return { time, severity, ...logAttributes(attributes) };
331
+ }, "eventOf");
332
+ var pruneRuns = /* @__PURE__ */ __name((runsDir, { keepDays, keepSuccessDays = keepDays, keepStoreDays = KEEP_STORE_RUNS_FOR_DAYS, maxBytes, now }) => {
333
+ const cutoff = day(new Date(now.getTime() - keepDays * DAY_MS));
334
+ const before = /* @__PURE__ */ __name((days2) => day(new Date(now.getTime() - Math.min(days2, keepDays) * DAY_MS)), "before");
335
+ const successCutoff = before(keepSuccessDays);
336
+ const storeCutoff = before(keepStoreDays);
337
+ const keptFor = /* @__PURE__ */ __name((metadata) => metadata.keptBecauseStore ? keepStoreDays : metadata.operations?.includes(STORE_WRITE) ? Math.max(keepSuccessDays, keepStoreDays) : keepSuccessDays, "keptFor");
338
+ let removed = 0;
339
+ for (const date of days(runsDir)) {
340
+ if (date >= cutoff) {
341
+ if (date < storeCutoff)
342
+ dropSuccesses(join(runsDir, date), STORE_RUNS_DROPPED, (metadata) => keptFor(metadata) <= keepStoreDays);
343
+ if (date < successCutoff)
344
+ dropSuccesses(join(runsDir, date), SUCCESSES_DROPPED, (metadata) => keptFor(metadata) <= keepSuccessDays);
345
+ continue;
346
+ }
347
+ try {
348
+ rmSync(join(runsDir, date), { recursive: true, force: true });
349
+ removed += 1;
350
+ } catch {
351
+ }
352
+ }
353
+ if (maxBytes !== void 0)
354
+ removed += fitSize(runsDir, maxBytes, now);
355
+ return removed;
356
+ }, "pruneRuns");
357
+ var DAY_MS = 24 * 60 * 60 * 1e3;
358
+ var STORE_WRITE = "store.write";
359
+ var SUCCESSES_DROPPED = ".successes-dropped";
360
+ var STORE_RUNS_DROPPED = ".store-runs-dropped";
361
+ var SIZE_CHECKED = ".size-checked";
362
+ var dropSuccesses = /* @__PURE__ */ __name((dayDir, marker = SUCCESSES_DROPPED, drops = () => true) => {
363
+ const done = join(dayDir, marker);
364
+ try {
365
+ statSync(done);
366
+ return;
367
+ } catch {
368
+ }
369
+ const dropped2 = /* @__PURE__ */ __name((metadata) => metadata?.status === "success" && drops(metadata), "dropped");
370
+ try {
371
+ const kept = [];
372
+ for (const [id, metadata] of indexedRuns(dayDir)) {
373
+ if (dropped2(metadata))
374
+ rmSync(join(dayDir, id), { recursive: true, force: true });
375
+ else
376
+ kept.push(JSON.stringify(runFileOf(metadata)));
377
+ }
378
+ for (const entry of safeReaddir(dayDir)) {
379
+ if (entry === INDEX || entry.startsWith("."))
380
+ continue;
381
+ if (dropped2(readRun(join(dayDir, entry))))
382
+ rmSync(join(dayDir, entry), { recursive: true, force: true });
383
+ }
384
+ writeSecurely(join(dayDir, INDEX), kept.map((line) => `${line}
385
+ `).join(""), 384);
386
+ writeFileSync(done, "", { mode: 384 });
387
+ } catch {
388
+ }
389
+ }, "dropSuccesses");
390
+ var sizeOf = /* @__PURE__ */ __name((path) => {
391
+ let total = 0;
392
+ for (const entry of safeReaddir(path)) {
393
+ const full = join(path, entry);
394
+ try {
395
+ const stat = statSync(full);
396
+ total += stat.isDirectory() ? sizeOf(full) : stat.size;
397
+ } catch {
398
+ }
399
+ }
400
+ return total;
401
+ }, "sizeOf");
402
+ var fitSize = /* @__PURE__ */ __name((runsDir, maxBytes, now) => {
403
+ const stamp = join(runsDir, SIZE_CHECKED);
404
+ const today = day(now);
405
+ try {
406
+ if (readFileSync(stamp, "utf8").trim() === today)
407
+ return 0;
408
+ } catch {
409
+ }
410
+ const dates = days(runsDir).sort();
411
+ const sizes = new Map(dates.map((date) => [date, sizeOf(join(runsDir, date))]));
412
+ let total = [...sizes.values()].reduce((sum, size) => sum + size, 0);
413
+ let removed = 0;
414
+ for (const date of dates) {
415
+ if (total <= maxBytes || date === today)
416
+ break;
417
+ dropSuccesses(join(runsDir, date));
418
+ const after = sizeOf(join(runsDir, date));
419
+ total -= (sizes.get(date) ?? 0) - after;
420
+ sizes.set(date, after);
421
+ }
422
+ for (const date of dates) {
423
+ if (total <= maxBytes || date === today)
424
+ break;
425
+ try {
426
+ rmSync(join(runsDir, date), { recursive: true, force: true });
427
+ total -= sizes.get(date) ?? 0;
428
+ removed += 1;
429
+ } catch {
430
+ }
431
+ }
432
+ try {
433
+ mkdirSync(runsDir, { recursive: true, mode: 448 });
434
+ writeFileSync(stamp, today, { mode: 384 });
435
+ } catch {
436
+ }
437
+ return removed;
438
+ }, "fitSize");
439
+ var day = /* @__PURE__ */ __name((date) => date.toISOString().slice(0, 10), "day");
440
+ var days = /* @__PURE__ */ __name((runsDir) => safeReaddir(runsDir).filter((entry) => /^\d{4}-\d{2}-\d{2}$/.test(entry)), "days");
441
+ var readRun = /* @__PURE__ */ __name((dir) => {
442
+ try {
443
+ return metadataOf(JSON.parse(readFileSync(join(dir, "run.json"), "utf8")));
444
+ } catch {
445
+ return void 0;
446
+ }
447
+ }, "readRun");
448
+ var safeReaddir = /* @__PURE__ */ __name((dir) => {
449
+ try {
450
+ return readdirSync(dir);
451
+ } catch {
452
+ return [];
453
+ }
454
+ }, "safeReaddir");
455
+ var runFileOf = /* @__PURE__ */ __name(({ partial, ...metadata }) => ({
456
+ ...logAttributes(metadata),
457
+ ...partial ? { partial: { ...logAttributes(partial), failures: partial.failures.map((failure) => logAttributes(failure)) } } : {}
458
+ }), "runFileOf");
459
+ var metadataOf = /* @__PURE__ */ __name((parsed) => {
460
+ const { partial, ...metadata } = fromLogAttributes(parsed);
461
+ if (partial === null || typeof partial !== "object")
462
+ return metadata;
463
+ const { failures, ...rest } = fromLogAttributes(partial);
464
+ return {
465
+ ...metadata,
466
+ partial: {
467
+ ...rest,
468
+ failures: Array.isArray(failures) ? failures.map((failure) => fromLogAttributes(failure)) : []
469
+ }
470
+ };
471
+ }, "metadataOf");
472
+
473
+ // node_modules/.pnpm/@wirecat+cli-core@0.667.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_0b2555be96e01c2163d7c05aae2e84c1/node_modules/@wirecat/cli-core/dist/runs/scope.js
474
+ import { AsyncLocalStorage } from "node:async_hooks";
475
+ import { randomBytes } from "node:crypto";
476
+ var scopes = new AsyncLocalStorage();
477
+ var processScope;
478
+ var ownProcesses = new AsyncLocalStorage();
479
+ var asOwnProcess = /* @__PURE__ */ __name((body) => ownProcesses.run({}, body), "asOwnProcess");
480
+ var currentRun = /* @__PURE__ */ __name(() => {
481
+ const scope = scopes.getStore();
482
+ if (scope)
483
+ return scope;
484
+ const own = ownProcesses.getStore();
485
+ const fresh = /* @__PURE__ */ __name(() => ({
486
+ runId: newRunId(/* @__PURE__ */ new Date(), "process"),
487
+ command: "",
488
+ startedAt: Date.now(),
489
+ ...traceOf(process.env)
490
+ }), "fresh");
491
+ if (own) {
492
+ own.scope ??= fresh();
493
+ return own.scope;
494
+ }
495
+ processScope ??= fresh();
496
+ return processScope;
497
+ }, "currentRun");
498
+ var inRun = /* @__PURE__ */ __name((scope, body) => scopes.run(scope, body), "inRun");
499
+ var runEvent = /* @__PURE__ */ __name((event) => scopes.getStore()?.events?.(event), "runEvent");
500
+ var typedCommand = /* @__PURE__ */ __name((tool, words, profile = currentRun().profile) => [tool, profile, words].filter((part) => part !== void 0 && part !== "").join(" "), "typedCommand");
501
+ var useAsProcessRun = /* @__PURE__ */ __name((scope) => {
502
+ const own = ownProcesses.getStore();
503
+ if (own)
504
+ own.scope = scope;
505
+ else
506
+ processScope = scope;
507
+ }, "useAsProcessRun");
508
+ var processRun = /* @__PURE__ */ __name(() => {
509
+ const own = ownProcesses.getStore();
510
+ return own ? own.scope : processScope;
511
+ }, "processRun");
512
+ var enclosingTraceId = /* @__PURE__ */ __name(() => scopes.getStore()?.traceId, "enclosingTraceId");
513
+ var traceOf = /* @__PURE__ */ __name((env) => {
514
+ const traceId = traceIdOf(env.TRACEPARENT);
515
+ return traceId === void 0 ? {} : { traceId };
516
+ }, "traceOf");
517
+ var childTrace = /* @__PURE__ */ __name(() => {
518
+ const hex = /* @__PURE__ */ __name((bytes) => randomBytes(bytes).toString("hex"), "hex");
519
+ const traceId = hex(16);
520
+ return { traceId, traceparent: `00-${traceId}-${hex(8)}-01` };
521
+ }, "childTrace");
522
+ var attempts = new AsyncLocalStorage();
523
+ var withAttempt = /* @__PURE__ */ __name((attempt, work) => attempts.run(attempt, work), "withAttempt");
524
+ var currentAttempt = /* @__PURE__ */ __name(() => attempts.getStore(), "currentAttempt");
525
+
526
+ export {
527
+ logAttributes,
528
+ fromLogAttributes,
529
+ snakeLogger,
530
+ LOG_ATTRIBUTES,
531
+ KEEP_RUNS_FOR_DAYS,
532
+ KEEP_SUCCESSFUL_RUNS_FOR_DAYS,
533
+ KEEP_STORE_RUNS_FOR_DAYS,
534
+ RUNS_SIZE_LIMIT_MB,
535
+ runsDirFor,
536
+ startRun,
537
+ runtime,
538
+ newRunId,
539
+ listRuns,
540
+ findRun,
541
+ readEvents,
542
+ pruneRuns,
543
+ asOwnProcess,
544
+ currentRun,
545
+ inRun,
546
+ runEvent,
547
+ typedCommand,
548
+ useAsProcessRun,
549
+ processRun,
550
+ enclosingTraceId,
551
+ traceOf,
552
+ childTrace,
553
+ withAttempt,
554
+ currentAttempt
555
+ };
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/shared-55XJMTPA.js
7
+ // node_modules/.pnpm/@wirecat+cli-core@0.667.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_0b2555be96e01c2163d7c05aae2e84c1/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/shared-5XR7K42U.js
8
8
  var entityKind = /* @__PURE__ */ Symbol.for("drizzle:entityKind");
9
9
  var kindsByConstructor = /* @__PURE__ */ new WeakMap();
10
10
  function collectKinds(ctor) {