@wirecat/drive-cli 0.52.1 → 0.54.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 (218) hide show
  1. package/dist/bin/drive.js +2 -2
  2. package/dist/bin/drive.js.map +1 -1
  3. package/dist/bundle/{chunk-ZWSG7OCA.js → all-profiles-LFIPUPZI.js} +13 -8
  4. package/dist/bundle/{anthropic-KW6KU36Y.js → anthropic-G5ZRRWG4.js} +5 -5
  5. package/dist/bundle/{app-server-TCJZ333E.js → app-server-UVWATOQC.js} +48 -56
  6. package/dist/bundle/{bun-7SYKSCLA.js → bun-DNEFTPTR.js} +2 -2
  7. package/dist/bundle/{bun-sqlite-RI7DR6RZ.js → bun-sqlite-FWBYHIXB.js} +4 -4
  8. package/dist/bundle/{chunk-CM7GAXGD.js → chunk-2CQT2WWN.js} +5 -5
  9. package/dist/bundle/{chunk-HQVJK5E7.js → chunk-2D6AAGBP.js} +246 -383
  10. package/dist/bundle/{chunk-FG4XXZZE.js → chunk-2FFXRWI2.js} +2 -2
  11. package/dist/bundle/{chunk-2UIMEMWU.js → chunk-2HQPJ366.js} +3 -3
  12. package/dist/bundle/{chunk-CB7SBYLO.js → chunk-2HWOGSTA.js} +57 -37
  13. package/dist/bundle/{chunk-7XKAVMCF.js → chunk-2MSJVFAS.js} +8 -8
  14. package/dist/bundle/{chunk-NSIFQ5OP.js → chunk-2NWFZ43Q.js} +1 -1
  15. package/dist/bundle/{chunk-H47W2J6S.js → chunk-2Q3S47BC.js} +1312 -626
  16. package/dist/bundle/{chunk-O6IOL6RX.js → chunk-47MEPBWG.js} +21 -21
  17. package/dist/bundle/{chunk-725OHXKR.js → chunk-4RDXCE45.js} +2226 -37
  18. package/dist/bundle/{chunk-UR32UWTQ.js → chunk-5BPOAHVD.js} +13 -2
  19. package/dist/bundle/{chunk-5FONRUG6.js → chunk-5D4AEUVA.js} +1 -23
  20. package/dist/bundle/{chunk-VZ2I62HN.js → chunk-5LNOVPOR.js} +2 -2
  21. package/dist/bundle/{chunk-EKFEY3KP.js → chunk-5WQN2TUM.js} +1 -1
  22. package/dist/bundle/{chunk-ALJWBGD5.js → chunk-6MGSFYGL.js} +1 -1
  23. package/dist/bundle/{chunk-WUX7AUOQ.js → chunk-6RAEXK7Y.js} +26 -26
  24. package/dist/bundle/{chunk-BSSCTWWK.js → chunk-6SOQJRGI.js} +4 -4
  25. package/dist/bundle/{chunk-CKBHR7QO.js → chunk-75DSLCPC.js} +1 -1
  26. package/dist/bundle/{chunk-VSOLLTYT.js → chunk-76JIVDKC.js} +7 -2
  27. package/dist/bundle/{chunk-33NVQGUY.js → chunk-7WCZ2OZ5.js} +6 -6
  28. package/dist/bundle/{chunk-IDUNJCFO.js → chunk-7XU3TR7K.js} +2 -2
  29. package/dist/bundle/{chunk-7SH4JHYW.js → chunk-A4FTLORC.js} +12 -12
  30. package/dist/bundle/{chunk-CITFEQ6S.js → chunk-AACQA2CO.js} +1 -1
  31. package/dist/bundle/{chunk-PSNHPFSK.js → chunk-AAHIBA36.js} +1 -1
  32. package/dist/bundle/{chunk-PEOCBV2Z.js → chunk-BWBVBW5T.js} +8 -8
  33. package/dist/bundle/{chunk-A4UNTWAX.js → chunk-CVALO727.js} +99 -30
  34. package/dist/bundle/{chunk-G6QF5KWF.js → chunk-FHW4ENRF.js} +37 -43
  35. package/dist/bundle/{chunk-LONV6HIK.js → chunk-HAHARAJD.js} +455 -40
  36. package/dist/bundle/{chunk-2623YE5I.js → chunk-IBRXVPBI.js} +97 -99
  37. package/dist/bundle/{chunk-IWFBAWZK.js → chunk-IKODUUQG.js} +292 -19
  38. package/dist/bundle/{chunk-PQJYM5ES.js → chunk-IOMSC4ZG.js} +3 -3
  39. package/dist/bundle/{chunk-YKZ4IPLB.js → chunk-JKEAZBEZ.js} +7 -7
  40. package/dist/bundle/{chunk-FCJAHD4R.js → chunk-KIQIF5M7.js} +3 -3
  41. package/dist/bundle/{chunk-KYVXMEBC.js → chunk-KT5G3KVS.js} +3 -3
  42. package/dist/bundle/{chunk-W7IK7E4B.js → chunk-L3RV42O3.js} +20 -22
  43. package/dist/bundle/{chunk-NHBUTCNR.js → chunk-LQXLWHKM.js} +9 -9
  44. package/dist/bundle/{chunk-WBTVGFXI.js → chunk-MATUQFYL.js} +11 -11
  45. package/dist/bundle/{chunk-54O62JWP.js → chunk-MULPNGM2.js} +29 -10
  46. package/dist/bundle/{chunk-FJW3DDCF.js → chunk-N4OO3SPQ.js} +5 -5
  47. package/dist/bundle/{chunk-6DHQTUB2.js → chunk-NDWWGBSM.js} +1 -1
  48. package/dist/bundle/{chunk-DLAFGSTN.js → chunk-NHDSJMAR.js} +1 -1
  49. package/dist/bundle/{chunk-PQYVPCJ2.js → chunk-O6YYFVDD.js} +38 -37
  50. package/dist/bundle/{chunk-I7UH5CTA.js → chunk-OYGEBFFO.js} +12 -14
  51. package/dist/bundle/chunk-P7E7K467.js +110 -0
  52. package/dist/bundle/{chunk-ZNZUZGSV.js → chunk-PKNTBZXN.js} +176 -49
  53. package/dist/bundle/{chunk-YNFELLNQ.js → chunk-PU4GANCD.js} +3 -3
  54. package/dist/bundle/{chunk-5PLJKSG4.js → chunk-Q46JLJ5O.js} +7 -9
  55. package/dist/bundle/{chunk-R276546S.js → chunk-QKHFQHE7.js} +1 -1
  56. package/dist/bundle/{chunk-RNSP57TC.js → chunk-QUJCD5U7.js} +4 -4
  57. package/dist/bundle/{chunk-43QVYW3K.js → chunk-RIYXQFKU.js} +262 -88
  58. package/dist/bundle/{chunk-2AUXBJRX.js → chunk-RWEFKLXJ.js} +104 -29
  59. package/dist/bundle/{chunk-WQJBAWQP.js → chunk-SBOTSSYV.js} +879 -508
  60. package/dist/bundle/{chunk-PAXKALHV.js → chunk-U3BOQ63L.js} +118 -7
  61. package/dist/bundle/{chunk-VJZST5RD.js → chunk-UBJX5D2O.js} +2 -2
  62. package/dist/bundle/{chunk-HX7Y2ASG.js → chunk-VCGQMTHW.js} +26318 -15143
  63. package/dist/bundle/{chunk-7YMDL4JQ.js → chunk-VKYCMXEQ.js} +8 -5
  64. package/dist/bundle/{chunk-ZSXRDF6I.js → chunk-VX4RAT3A.js} +1 -1
  65. package/dist/bundle/{chunk-NYOPEHEU.js → chunk-W5SYBHRX.js} +8 -3
  66. package/dist/bundle/{chunk-XOLQSCMF.js → chunk-WGSTTWM5.js} +6 -6
  67. package/dist/bundle/{chunk-WLFUBNFX.js → chunk-WJRE45Z6.js} +4 -4
  68. package/dist/bundle/{chunk-IEXPOEEO.js → chunk-WQPTZHHR.js} +17 -26
  69. package/dist/bundle/{chunk-JEOYFKUK.js → chunk-WSX5UQNT.js} +2 -2
  70. package/dist/bundle/{chunk-LJAX6YCF.js → chunk-WYDYSQ7T.js} +2 -2
  71. package/dist/bundle/{chunk-C6Z25IBJ.js → chunk-XCUUYQN7.js} +4 -4
  72. package/dist/bundle/{chunk-GVCN3GLZ.js → chunk-YOHOQ6ZR.js} +4 -4
  73. package/dist/bundle/chunk-YZ5VMR2S.js +5305 -0
  74. package/dist/bundle/{chunk-ZDLIO76S.js → chunk-ZMMOVTUB.js} +2 -2
  75. package/dist/bundle/command-contract-VZ3ZJLEF.js +35 -0
  76. package/dist/bundle/{decode-EDN2ARXZ.js → decode-DN2DDFET.js} +4 -4
  77. package/dist/bundle/drive.js +11 -22
  78. package/dist/bundle/{echarts-GXY34GHA.js → echarts-VMHZ2UYP.js} +2 -2
  79. package/dist/bundle/{embed-3GSQIQXE.js → embed-MDN7R7BA.js} +5 -5
  80. package/dist/bundle/{embedder-6ULWRG3R.js → embedder-KEVEDNDJ.js} +8 -8
  81. package/dist/bundle/{entry-IPRJLFHO.js → entry-HTNK5TJQ.js} +6 -6
  82. package/dist/bundle/{first-run-FGHGWHC2.js → first-run-QNMCMP67.js} +9 -9
  83. package/dist/bundle/first-screen-RQBEHUQC.js +33 -0
  84. package/dist/bundle/{google-BD3ZNFVJ.js → google-QAKMV57Q.js} +9 -9
  85. package/dist/bundle/{chunk-GR5GGZKH.js → google-api-UJJS7ECO.js} +62 -6
  86. package/dist/bundle/grants-VMPKFEC2.js +98 -0
  87. package/dist/bundle/{identity-U7IHZEMR.js → identity-UODE3QAL.js} +4 -2
  88. package/dist/bundle/{instructions-K5BEQM4C.js → instructions-IWLHCDC7.js} +1 -1
  89. package/dist/bundle/{login-7HRYPZMM.js → login-GIZXEN7I.js} +60 -68
  90. package/dist/bundle/{mcp-WSGVVZWI.js → mcp-RUYPQVYS.js} +2 -2
  91. package/dist/bundle/{node-ZYWB7IET.js → node-25IJLDBZ.js} +2 -2
  92. package/dist/bundle/{node-sqlite-J3OODPYK.js → node-sqlite-DYR4FEI4.js} +4 -4
  93. package/dist/bundle/{oauth-L4VTCBLF.js → oauth-FLHXEDDY.js} +7 -7
  94. package/dist/bundle/{open-SGUN7ZVF.js → open-FWDZB7KX.js} +3 -3
  95. package/dist/bundle/{openai-RLVISEDH.js → openai-HB7UGKPW.js} +13 -13
  96. package/dist/bundle/{process-ZXO2MWRJ.js → process-P6TW37HQ.js} +1 -1
  97. package/dist/bundle/{program-YVLXSKZV.js → program-DVUNLXXS.js} +730 -919
  98. package/dist/bundle/{prompt-AUWTBLO7.js → prompt-MKWMYO3B.js} +4 -4
  99. package/dist/bundle/{reasons-J57GSRWN.js → reasons-25BEO2NE.js} +3 -3
  100. package/dist/bundle/{recognize-ORX2UBQW.js → recognize-VXGNPROM.js} +3 -3
  101. package/dist/bundle/{remote-AGIJY73X.js → remote-H5ZWLJHR.js} +6 -6
  102. package/dist/bundle/{rerank-R6PE44M5.js → rerank-5A3JDK7O.js} +6 -6
  103. package/dist/bundle/{chunk-G7DCVJ4F.js → serve-QNPNEZVR.js} +10 -7
  104. package/dist/bundle/{chunk-F7UUZATI.js → server-GWBVIRLY.js} +42 -15
  105. package/dist/bundle/server-QJU3HEGM.js +63 -0
  106. package/dist/bundle/{services-HZFTTZSF.js → services-PFXEWHJG.js} +30 -31
  107. package/dist/bundle/{sqlite-runtime-DTGPR2T2.js → sqlite-runtime-RGFISYXM.js} +4 -4
  108. package/dist/bundle/{state-WG3JKJM3.js → state-BUSX5BXF.js} +5 -5
  109. package/dist/bundle/{store-EV72MT5U.js → store-FIEE5HHG.js} +14 -16
  110. package/dist/bundle/{store-33VHIMEO.js → store-HFF5KQ44.js} +12 -14
  111. package/dist/bundle/store-maintenance-command-Z4SPEQUM.js +52 -0
  112. package/dist/bundle/{chunk-GNI7INK6.js → terminal-DHJ4D3BC.js} +2 -3
  113. package/dist/bundle/tokens-B6MUZRFM.js +96 -0
  114. package/dist/commands/context.d.ts +14 -13
  115. package/dist/commands/context.d.ts.map +1 -1
  116. package/dist/commands/context.js.map +1 -1
  117. package/dist/commands/documents.d.ts.map +1 -1
  118. package/dist/commands/documents.js +1 -4
  119. package/dist/commands/documents.js.map +1 -1
  120. package/dist/commands/mirrors.d.ts.map +1 -1
  121. package/dist/commands/mirrors.js +1 -2
  122. package/dist/commands/mirrors.js.map +1 -1
  123. package/dist/commands/upgrade.d.ts +1 -1
  124. package/dist/commands/upgrade.d.ts.map +1 -1
  125. package/dist/commands/upgrade.js +4 -9
  126. package/dist/commands/upgrade.js.map +1 -1
  127. package/dist/config.d.ts +182 -0
  128. package/dist/config.d.ts.map +1 -1
  129. package/dist/config.js +38 -3
  130. package/dist/config.js.map +1 -1
  131. package/dist/contract-overrides.d.ts +0 -3
  132. package/dist/contract-overrides.d.ts.map +1 -1
  133. package/dist/contract-overrides.js +0 -234
  134. package/dist/contract-overrides.js.map +1 -1
  135. package/dist/first-screen.d.ts +3 -2
  136. package/dist/first-screen.d.ts.map +1 -1
  137. package/dist/first-screen.js +17 -22
  138. package/dist/first-screen.js.map +1 -1
  139. package/dist/grants.d.ts +9 -0
  140. package/dist/grants.d.ts.map +1 -0
  141. package/dist/grants.js +30 -0
  142. package/dist/grants.js.map +1 -0
  143. package/dist/identity.d.ts.map +1 -1
  144. package/dist/identity.js +2 -0
  145. package/dist/identity.js.map +1 -1
  146. package/dist/login.d.ts.map +1 -1
  147. package/dist/login.js +2 -4
  148. package/dist/login.js.map +1 -1
  149. package/dist/policy-keys.d.ts +12 -0
  150. package/dist/policy-keys.d.ts.map +1 -0
  151. package/dist/policy-keys.js +107 -0
  152. package/dist/policy-keys.js.map +1 -0
  153. package/dist/policy.d.ts +1 -8
  154. package/dist/policy.d.ts.map +1 -1
  155. package/dist/policy.js +2 -105
  156. package/dist/policy.js.map +1 -1
  157. package/dist/program.d.ts +8 -4
  158. package/dist/program.d.ts.map +1 -1
  159. package/dist/program.js +251 -222
  160. package/dist/program.js.map +1 -1
  161. package/dist/testing/mcp.d.ts +28 -0
  162. package/dist/testing/mcp.d.ts.map +1 -0
  163. package/dist/testing/mcp.js +56 -0
  164. package/dist/testing/mcp.js.map +1 -0
  165. package/dist/tokens.d.ts.map +1 -1
  166. package/dist/tokens.js +0 -9
  167. package/dist/tokens.js.map +1 -1
  168. package/dist/version.d.ts +1 -1
  169. package/dist/version.js +1 -1
  170. package/package.json +6 -5
  171. package/scenarios/agent-access.md +4 -2
  172. package/dist/bundle/all-profiles-CYW6XBBS.js +0 -26
  173. package/dist/bundle/chunk-234MHU76.js +0 -384
  174. package/dist/bundle/chunk-BBYD2FA3.js +0 -9
  175. package/dist/bundle/chunk-DO4PDQY5.js +0 -48
  176. package/dist/bundle/chunk-FDWYPONW.js +0 -1988
  177. package/dist/bundle/chunk-FQRJWVEB.js +0 -2
  178. package/dist/bundle/chunk-GJN5B5JK.js +0 -522
  179. package/dist/bundle/chunk-NPSZPUK6.js +0 -193
  180. package/dist/bundle/chunk-PDGECM5D.js +0 -138
  181. package/dist/bundle/chunk-Q765VPZY.js +0 -421
  182. package/dist/bundle/chunk-QYUHS6DE.js +0 -1714
  183. package/dist/bundle/chunk-WQRGA75U.js +0 -256
  184. package/dist/bundle/chunk-YVPHJHIL.js +0 -15572
  185. package/dist/bundle/chunk-Z47LOJUS.js +0 -484
  186. package/dist/bundle/command-contract-I2YB5IXI.js +0 -38
  187. package/dist/bundle/failure-IXS2ZHA5.js +0 -37
  188. package/dist/bundle/first-screen-M62KTPZG.js +0 -36
  189. package/dist/bundle/google-api-BDUWZMRV.js +0 -83
  190. package/dist/bundle/mcp-F67RATLF.js +0 -502
  191. package/dist/bundle/mcp-JZSYPQA4.js +0 -96
  192. package/dist/bundle/serve-VOBAQHAQ.js +0 -20
  193. package/dist/bundle/server-24PS4M7U.js +0 -70
  194. package/dist/bundle/server-G6HFZ2CK.js +0 -57
  195. package/dist/bundle/store-maintenance-command-ZTUEI4EC.js +0 -58
  196. package/dist/bundle/terminal-TFCTWLOS.js +0 -11
  197. package/dist/bundle/tokens-XMOGQFI6.js +0 -102
  198. package/dist/commands/doctor.d.ts +0 -56
  199. package/dist/commands/doctor.d.ts.map +0 -1
  200. package/dist/commands/doctor.js +0 -75
  201. package/dist/commands/doctor.js.map +0 -1
  202. package/dist/commands/mcp.d.ts +0 -6
  203. package/dist/commands/mcp.d.ts.map +0 -1
  204. package/dist/commands/mcp.js +0 -156
  205. package/dist/commands/mcp.js.map +0 -1
  206. package/dist/commands/skill.d.ts +0 -6
  207. package/dist/commands/skill.d.ts.map +0 -1
  208. package/dist/commands/skill.js +0 -34
  209. package/dist/commands/skill.js.map +0 -1
  210. package/dist/failure.d.ts +0 -88
  211. package/dist/failure.d.ts.map +0 -1
  212. package/dist/failure.js +0 -60
  213. package/dist/failure.js.map +0 -1
  214. package/dist/mcp.d.ts +0 -175
  215. package/dist/mcp.d.ts.map +0 -1
  216. package/dist/mcp.js +0 -412
  217. package/dist/mcp.js.map +0 -1
  218. /package/dist/bundle/{chunk-62EDJKGP.js → chunk-HEA3XVAJ.js} +0 -0
@@ -5,24 +5,22 @@ import {
5
5
  id,
6
6
  text,
7
7
  time
8
- } from "./chunk-GVCN3GLZ.js";
8
+ } from "./chunk-YOHOQ6ZR.js";
9
9
  import {
10
10
  filesPresent,
11
11
  sharedModelsDirectory
12
- } from "./chunk-BSSCTWWK.js";
12
+ } from "./chunk-6SOQJRGI.js";
13
13
  import {
14
+ TAG_TYPES,
14
15
  TASK_ORIGINS,
15
16
  TASK_STATES,
16
17
  TASK_TYPES
17
- } from "./chunk-PDGECM5D.js";
18
- import {
19
- TAG_TYPES
20
- } from "./chunk-ZNZUZGSV.js";
18
+ } from "./chunk-PKNTBZXN.js";
21
19
  import {
22
20
  createRecordLog,
23
21
  resolvePaths,
24
22
  writeSecurely
25
- } from "./chunk-HQVJK5E7.js";
23
+ } from "./chunk-2D6AAGBP.js";
26
24
  import {
27
25
  CliError,
28
26
  array,
@@ -35,26 +33,22 @@ import {
35
33
  reference,
36
34
  strictObject,
37
35
  traceIdOf
38
- } from "./chunk-YKZ4IPLB.js";
36
+ } from "./chunk-JKEAZBEZ.js";
39
37
  import {
40
38
  __name
41
39
  } from "./chunk-ZVVMGPBJ.js";
42
40
 
43
- // node_modules/.pnpm/@wirecat+cli-core@0.501.0_@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_type_e6af10c98f87b1454255e560646d3ddf/node_modules/@wirecat/cli-core/dist/domain/duration.js
44
- var DURATION = /^(\d+)(ms|s|m|h|d)$/;
45
- var UNIT_MS = { ms: 1, s: 1e3, m: 6e4, h: 36e5, d: 864e5 };
46
- var parseDuration = /* @__PURE__ */ __name((value, source) => {
47
- const match = DURATION.exec(value.trim());
48
- if (!match?.[1] || !match[2]) {
49
- throw new CliError("validation_error", `${source} takes a duration with a unit \u2014 500ms, 30s, 2m, 4h or 1d \u2014 not "${value}"`);
50
- }
51
- const ms = Number(match[1]) * (UNIT_MS[match[2]] ?? 0);
52
- if (ms <= 0)
53
- throw new CliError("validation_error", `${source} has to be more than zero, and "${value}" is not`);
54
- return ms;
55
- }, "parseDuration");
41
+ // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/runs/scope.js
42
+ import { AsyncLocalStorage } from "node:async_hooks";
43
+ import { randomBytes } from "node:crypto";
44
+
45
+ // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/runs/run.js
46
+ import { randomUUID } from "node:crypto";
47
+ import { appendFileSync, mkdirSync, readdirSync, readFileSync, rmSync, statSync, writeFileSync } from "node:fs";
48
+ import { userInfo } from "node:os";
49
+ import { join, sep } from "node:path";
56
50
 
57
- // node_modules/.pnpm/@wirecat+cli-core@0.501.0_@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_type_e6af10c98f87b1454255e560646d3ddf/node_modules/@wirecat/cli-core/dist/runs/log-keys.js
51
+ // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/runs/log-keys.js
58
52
  var snake = /* @__PURE__ */ __name((key) => key.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`), "snake");
59
53
  var camel = /* @__PURE__ */ __name((key) => key.replace(/_([a-z0-9])/g, (_, letter) => letter.toUpperCase()), "camel");
60
54
  var renamed = /* @__PURE__ */ __name((record, name) => Object.fromEntries(Object.entries(record).map(([key, value]) => [name(key), value])), "renamed");
@@ -67,7 +61,7 @@ var snakeLogger = /* @__PURE__ */ __name((logger) => ({
67
61
  error: /* @__PURE__ */ __name((event, message) => logger.error(logAttributes(event), message), "error")
68
62
  }), "snakeLogger");
69
63
 
70
- // node_modules/.pnpm/@wirecat+cli-core@0.501.0_@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_type_e6af10c98f87b1454255e560646d3ddf/node_modules/@wirecat/cli-core/dist/runs/log-attributes.js
64
+ // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/runs/log-attributes.js
71
65
  var diagnostic = {
72
66
  event: true,
73
67
  operation: true,
@@ -137,11 +131,7 @@ var LOG_ATTRIBUTES = [
137
131
  ...new Set([...Object.keys(diagnostic), ...Object.keys(send), ...background, ...crash, ...dropped].map((key) => Object.keys(logAttributes({ [key]: true }))[0]))
138
132
  ].sort();
139
133
 
140
- // node_modules/.pnpm/@wirecat+cli-core@0.501.0_@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_type_e6af10c98f87b1454255e560646d3ddf/node_modules/@wirecat/cli-core/dist/runs/run.js
141
- import { randomUUID } from "node:crypto";
142
- import { appendFileSync, mkdirSync, readdirSync, readFileSync, rmSync, statSync, writeFileSync } from "node:fs";
143
- import { userInfo } from "node:os";
144
- import { join, sep } from "node:path";
134
+ // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/runs/run.js
145
135
  var KEEP_RUNS_FOR_DAYS = 30;
146
136
  var KEEP_SUCCESSFUL_RUNS_FOR_DAYS = 7;
147
137
  var RUNS_SIZE_LIMIT_MB = 200;
@@ -494,9 +484,7 @@ var metadataOf = /* @__PURE__ */ __name((parsed) => {
494
484
  };
495
485
  }, "metadataOf");
496
486
 
497
- // node_modules/.pnpm/@wirecat+cli-core@0.501.0_@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_type_e6af10c98f87b1454255e560646d3ddf/node_modules/@wirecat/cli-core/dist/runs/scope.js
498
- import { AsyncLocalStorage } from "node:async_hooks";
499
- import { randomBytes } from "node:crypto";
487
+ // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/runs/scope.js
500
488
  var scopes = new AsyncLocalStorage();
501
489
  var processScope;
502
490
  var currentRun = /* @__PURE__ */ __name(() => {
@@ -517,6 +505,7 @@ var typedCommand = /* @__PURE__ */ __name((tool, words, profile = currentRun().p
517
505
  var useAsProcessRun = /* @__PURE__ */ __name((scope) => {
518
506
  processScope = scope;
519
507
  }, "useAsProcessRun");
508
+ var processRun = /* @__PURE__ */ __name(() => processScope, "processRun");
520
509
  var enclosingTraceId = /* @__PURE__ */ __name(() => scopes.getStore()?.traceId, "enclosingTraceId");
521
510
  var traceOf = /* @__PURE__ */ __name((env) => {
522
511
  const traceId = traceIdOf(env.TRACEPARENT);
@@ -531,7 +520,410 @@ var attempts = new AsyncLocalStorage();
531
520
  var withAttempt = /* @__PURE__ */ __name((attempt, work) => attempts.run(attempt, work), "withAttempt");
532
521
  var currentAttempt = /* @__PURE__ */ __name(() => attempts.getStore(), "currentAttempt");
533
522
 
534
- // node_modules/.pnpm/@wirecat+cli-core@0.501.0_@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_type_e6af10c98f87b1454255e560646d3ddf/node_modules/@wirecat/cli-core/dist/sends/guarded.js
523
+ // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/domain/duration.js
524
+ var DURATION = /^(\d+)(ms|s|m|h|d)$/;
525
+ var UNIT_MS = { ms: 1, s: 1e3, m: 6e4, h: 36e5, d: 864e5 };
526
+ var parseDuration = /* @__PURE__ */ __name((value, source) => {
527
+ const match = DURATION.exec(value.trim());
528
+ if (!match?.[1] || !match[2]) {
529
+ throw new CliError("validation_error", `${source} takes a duration with a unit \u2014 500ms, 30s, 2m, 4h or 1d \u2014 not "${value}"`);
530
+ }
531
+ const ms = Number(match[1]) * (UNIT_MS[match[2]] ?? 0);
532
+ if (ms <= 0)
533
+ throw new CliError("validation_error", `${source} has to be more than zero, and "${value}" is not`);
534
+ return ms;
535
+ }, "parseDuration");
536
+
537
+ // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/sends/permissions.js
538
+ var LEVELS = ["deny", "readonly", "ask", "allow"];
539
+ var DANGEROUS = /* @__PURE__ */ new Set(["messages.delete", "bot.messages.delete", "topics.delete", "chats.delete", "chats.clear"]);
540
+ var skipFlagFor = /* @__PURE__ */ __name((key) => DANGEROUS.has(key) ? "--allow-dangerous" : "--yes", "skipFlagFor");
541
+ var DEFAULT_PERMISSIONS = {
542
+ "messages.delete": "ask",
543
+ "account.sessions.end": "ask",
544
+ "bot.messages.delete": "ask",
545
+ "topics.enable": "ask",
546
+ "topics.delete": "ask",
547
+ "chats.delete": "ask",
548
+ "chats.clear": "ask",
549
+ // NEED-568: a rule writes to people with nobody typing a command; it waits for the owner's own allow.
550
+ "replies.send": "deny",
551
+ // NEED-1662: an agent that changes settings, schedules or recipients could lift its own limits; the owner opts in.
552
+ "mcp.authority": "deny",
553
+ // NEED-1663: writes no level stopped before, so MCP could not offer them; over MCP `ask` goes ahead.
554
+ "store.backup": "ask",
555
+ "store.restore": "ask",
556
+ "store.migrate": "ask",
557
+ "store.repair": "ask",
558
+ "store.reset": "ask",
559
+ "store.clear": "ask",
560
+ "store.decrypt": "ask",
561
+ "store.copies.delete": "ask",
562
+ "server.start": "ask",
563
+ "server.stop": "ask",
564
+ "server.restart": "ask",
565
+ "models.download": "ask",
566
+ "images.models.download": "ask",
567
+ "schedule.run": "ask",
568
+ "schedule.exec": "ask",
569
+ "doctor.reports.create": "ask"
570
+ };
571
+ var KEYED_UNDER_HOUSEKEEPING = new Set(Object.keys(DEFAULT_PERMISSIONS).filter((key) => /^(store|server|models|images|schedule|doctor)\./.test(key)));
572
+ var AUTHORITY_KEY = "mcp.authority";
573
+ var authorityAllowed = /* @__PURE__ */ __name((levels) => {
574
+ const { level } = levelFor(levels, AUTHORITY_KEY);
575
+ return level === "allow" || level === "ask";
576
+ }, "authorityAllowed");
577
+ var BOT_API_KEY = "bot.api";
578
+ var isBotApi = /* @__PURE__ */ __name((path) => path[0] === "bot" && path[1] === "api", "isBotApi");
579
+ var botApiAllowed = /* @__PURE__ */ __name((levels) => {
580
+ const { level } = levelFor(levels, BOT_API_KEY, { ...DEFAULT_PERMISSIONS, [BOT_API_KEY]: "deny" });
581
+ return level === "allow" || level === "ask";
582
+ }, "botApiAllowed");
583
+ var RESOURCES = [
584
+ "messages",
585
+ "drafts",
586
+ "reactions",
587
+ "polls",
588
+ "topics",
589
+ "chats",
590
+ "contacts",
591
+ "account",
592
+ "bot",
593
+ "conversations",
594
+ "tags",
595
+ "mentions",
596
+ "search",
597
+ "searches",
598
+ "tasks",
599
+ "replies",
600
+ "attachments",
601
+ "stats",
602
+ "store",
603
+ "metadata",
604
+ "mcp",
605
+ "server",
606
+ "models",
607
+ "schedule",
608
+ "doctor",
609
+ "images"
610
+ ];
611
+ var layerPermissions = /* @__PURE__ */ __name((layers) => {
612
+ const levels = {};
613
+ const sources = {};
614
+ for (const [from, layer] of layers) {
615
+ const nearer = Object.keys(levels);
616
+ for (const [key, level] of Object.entries(layer ?? {})) {
617
+ if (nearer.some((named) => key === named || key.startsWith(`${named}.`)))
618
+ continue;
619
+ levels[key] = level;
620
+ sources[key] = from;
621
+ }
622
+ }
623
+ return { levels, sources };
624
+ }, "layerPermissions");
625
+ var CEILING_KEY = "*";
626
+ var ALLOWED = { level: "allow", key: null };
627
+ var ORDER = { deny: 0, readonly: 1, ask: 2, allow: 3 };
628
+ var nearest = /* @__PURE__ */ __name((levels, key) => {
629
+ for (let parts = key.split("."); parts.length > 0; parts = parts.slice(0, -1)) {
630
+ const named = parts.join(".");
631
+ const level = levels[named];
632
+ if (level)
633
+ return { level, key: named, depth: parts.length };
634
+ }
635
+ return void 0;
636
+ }, "nearest");
637
+ var levelFor = /* @__PURE__ */ __name((permissions, key, defaults = DEFAULT_PERMISSIONS) => {
638
+ const found = profileLevel(permissions, key, defaults);
639
+ const ceiling = permissions[CEILING_KEY];
640
+ return ceiling && ORDER[ceiling] < ORDER[found.level] ? { level: ceiling, key: CEILING_KEY } : found;
641
+ }, "levelFor");
642
+ var profileLevel = /* @__PURE__ */ __name((permissions, key, defaults) => {
643
+ const own = nearest(permissions, key);
644
+ const builtIn = nearest(defaults, key);
645
+ if (!builtIn || own && own.depth >= builtIn.depth)
646
+ return own ? { level: own.level, key: own.key } : ALLOWED;
647
+ if (!own || ORDER[builtIn.level] <= ORDER[own.level])
648
+ return { level: builtIn.level, key: builtIn.key };
649
+ return { level: own.level, key: own.key };
650
+ }, "profileLevel");
651
+ var CHAT_KEYS = {
652
+ settings: "chats.update",
653
+ "requests.accept": "chats.requests.confirm",
654
+ "requests.decline": "chats.requests.reject",
655
+ "link.create": "chats.links.create",
656
+ "link.reset": "chats.links.reset",
657
+ "link.revoke": "chats.links.remove",
658
+ "link.update": "chats.links.update"
659
+ };
660
+ var ACCOUNT_KEYS = {
661
+ "contact-add": "contacts.add",
662
+ "contact-remove": "contacts.remove",
663
+ "contact-import": "contacts.import",
664
+ "contact-rename": "contacts.rename",
665
+ "contact-block": "contacts.block",
666
+ "contact-unblock": "contacts.unblock",
667
+ profile: "account.update",
668
+ "folder-create": "chats.folders.create",
669
+ "folder-update": "chats.folders.update",
670
+ "folder-delete": "chats.folders.delete",
671
+ "folder-order": "chats.folders.order",
672
+ "folder-join": "chats.folders.join",
673
+ "sessions-end": "account.sessions.end",
674
+ "chat-mute": "chats.mute",
675
+ "chat-unmute": "chats.unmute",
676
+ "chat-archive": "chats.archive",
677
+ "chat-unarchive": "chats.unarchive",
678
+ "chat-pin": "chats.pin",
679
+ "chat-unpin": "chats.unpin",
680
+ "chat-mark-unread": "chats.mark-unread",
681
+ "message-star": "messages.star",
682
+ "message-unstar": "messages.unstar",
683
+ privacy: "account.privacy.set"
684
+ };
685
+ var KIND_KEYS = {
686
+ message: "messages.send",
687
+ forward: "messages.forward",
688
+ edit: "messages.edit",
689
+ pin: "messages.pin",
690
+ reaction: "reactions",
691
+ read: "chats.mark-read",
692
+ delete: "messages.delete"
693
+ };
694
+ var keyForWrite = /* @__PURE__ */ __name((kind, action) => {
695
+ if (kind === "chat")
696
+ return CHAT_KEYS[action] ?? `chats.${action ?? "update"}`;
697
+ if (kind === "account") {
698
+ const key = ACCOUNT_KEYS[action];
699
+ if (!key)
700
+ throw new Error(`an account change without a known action: ${action}`);
701
+ return key;
702
+ }
703
+ return KIND_KEYS[kind];
704
+ }, "keyForWrite");
705
+ var writeOfKey = /* @__PURE__ */ __name((key) => {
706
+ const account = Object.entries(ACCOUNT_KEYS).find(([, named]) => named === key)?.[0];
707
+ if (account)
708
+ return { kind: "account", action: account };
709
+ const kind = Object.entries(KIND_KEYS).find(([, named]) => named === key || key.startsWith(`${named}.`))?.[0];
710
+ if (kind)
711
+ return { kind };
712
+ if (key === "messages.unpin")
713
+ return { kind: "pin" };
714
+ if (key.startsWith("chats.")) {
715
+ const action = Object.entries(CHAT_KEYS).find(([, named]) => named === key)?.[0] ?? key.slice("chats.".length);
716
+ return { kind: "chat", action };
717
+ }
718
+ return {};
719
+ }, "writeOfKey");
720
+ var NAMED_WRITE_KEYS = [
721
+ "drafts",
722
+ "store.gaps.repair",
723
+ "messages.sync-first",
724
+ "messages.server-search",
725
+ "messages.press",
726
+ "chats.start",
727
+ "chats.app",
728
+ "stats.messages.counters.sync",
729
+ "stats.messages.show.sync-first",
730
+ "stats.messages.top.sync-first",
731
+ "stats.contacts.top.sync-first",
732
+ "account.sessions.list",
733
+ "attachments.extract",
734
+ "attachments.move",
735
+ "attachments.update",
736
+ "bot.callbacks.answer",
737
+ "bot.chats.action",
738
+ "bot.chats.admins.add",
739
+ "bot.chats.admins.remove",
740
+ "bot.chats.leave",
741
+ "bot.chats.members.remove",
742
+ "bot.chats.moderate",
743
+ "bot.messages.delete",
744
+ "bot.messages.edit",
745
+ "bot.messages.pin",
746
+ "bot.messages.send",
747
+ "bot.messages.unpin",
748
+ "chats.admins.add",
749
+ "chats.admins.remove",
750
+ "chats.links.create",
751
+ "chats.links.reset",
752
+ "chats.links.remove",
753
+ "chats.links.update",
754
+ "chats.members.add",
755
+ "chats.members.remove",
756
+ "chats.moderate",
757
+ "conversations.embeddings",
758
+ "conversations.links",
759
+ "polls.close",
760
+ "polls.create",
761
+ "polls.vote",
762
+ "searches.clear",
763
+ "searches.create",
764
+ "searches.delete",
765
+ "contacts.aliases.set",
766
+ "contacts.aliases.remove",
767
+ "contacts.notes.add",
768
+ "contacts.notes.edit",
769
+ "contacts.notes.remove",
770
+ "tags.rebuild",
771
+ "metadata.sync",
772
+ "mentions.rebuild",
773
+ "mentions.confirm",
774
+ "mentions.reject",
775
+ "tags.add",
776
+ "tags.remove",
777
+ "tasks.add",
778
+ "tasks.claim",
779
+ "tasks.close",
780
+ "tasks.duplicates.defer",
781
+ "tasks.duplicates.reject",
782
+ "tasks.link",
783
+ "tasks.merge",
784
+ "tasks.update",
785
+ "tasks.release",
786
+ "tasks.scan",
787
+ "tasks.unmerge",
788
+ "topics.create",
789
+ "topics.edit",
790
+ "topics.enable"
791
+ ];
792
+ var WRITE_KEYS = [
793
+ .../* @__PURE__ */ new Set([
794
+ ...NAMED_WRITE_KEYS,
795
+ ...Object.keys(DEFAULT_PERMISSIONS),
796
+ ...Object.values(KIND_KEYS),
797
+ ...Object.values(ACCOUNT_KEYS),
798
+ ...Object.values(CHAT_KEYS)
799
+ ])
800
+ ];
801
+ var HOUSEKEEPING = /* @__PURE__ */ new Set([
802
+ "help",
803
+ "guide",
804
+ "config",
805
+ "session",
806
+ "doctor",
807
+ "commands",
808
+ "complete",
809
+ "upgrade",
810
+ "skill",
811
+ "models",
812
+ "server",
813
+ // What a schedule runs is checked by its own key when it runs; an agent runs read-only.
814
+ "schedule",
815
+ "runs",
816
+ "sends",
817
+ "recipients",
818
+ "flood",
819
+ "mcp",
820
+ // Its commands read the rules or flip the pause switch; what a rule sends is checked as `replies.send`.
821
+ "replies"
822
+ ]);
823
+ var BOT_HOUSEKEEPING = /* @__PURE__ */ new Set(["auth", "list", "sends", "recipients", "mcp"]);
824
+ var STORE_MAINTENANCE = /* @__PURE__ */ new Set(["info", "check", "copies"]);
825
+ var SHOW_MESSAGES = /* @__PURE__ */ new Set(["inbox", "review", "watch", "serve", "store", "conversations", "projects"]);
826
+ var readKeysForCommand = /* @__PURE__ */ __name((path) => {
827
+ if (path[0] === "bot")
828
+ return readKeysForCommand(path.slice(1)).map((key2) => `bot.${key2}`);
829
+ const key = keyForCommand(path);
830
+ if (!key)
831
+ return [];
832
+ if (path[0] === "attachments" && path[1] === "download")
833
+ return [key, "messages", "chats"];
834
+ if (path[0] === "attachments" && (path[1] === "extract" || path[1] === "show"))
835
+ return [key, "messages"];
836
+ if (path[0] === "store" && path[1] === "gaps" && path[2] === "repair")
837
+ return [key, "messages"];
838
+ if (path[0] === "store" && ["reset", "clear", "decrypt"].includes(path[1] ?? ""))
839
+ return [key, "messages"];
840
+ if (path[0] === "search") {
841
+ if (path[1] === "notes")
842
+ return [key];
843
+ if (path[1] === "topics")
844
+ return [key, "topics"];
845
+ if (path[1] === "conversations")
846
+ return [key, "messages", "conversations"];
847
+ return [key, "messages"];
848
+ }
849
+ if (path[0] !== "stats")
850
+ return [key];
851
+ const resource = path[1] === "charts" ? "chats" : path[1];
852
+ return [
853
+ .../* @__PURE__ */ new Set([
854
+ key,
855
+ "messages",
856
+ ...["chats", "contacts", "tasks"].includes(resource ?? "") ? [resource] : []
857
+ ])
858
+ ];
859
+ }, "readKeysForCommand");
860
+ var keyForCommand = /* @__PURE__ */ __name((path) => {
861
+ if (path.length === 0)
862
+ return null;
863
+ const [top, next] = path;
864
+ if (top === "bot") {
865
+ if (next === void 0 || BOT_HOUSEKEEPING.has(next))
866
+ return null;
867
+ const inner = keyForCommand(path.slice(1));
868
+ return `bot.${inner ?? path.slice(1).join(".")}`;
869
+ }
870
+ if (KEYED_UNDER_HOUSEKEEPING.has(path.join(".")))
871
+ return path.join(".");
872
+ if (top === void 0 || HOUSEKEEPING.has(top) || top === "search" && next === "runs")
873
+ return null;
874
+ if (top === "images" && next === "models")
875
+ return null;
876
+ if (top === "attachments" && (next === "check" || next === "jobs"))
877
+ return null;
878
+ if (top === "attachments" && next === "download")
879
+ return "messages";
880
+ if (top === "store" && next !== void 0 && STORE_MAINTENANCE.has(next))
881
+ return null;
882
+ if (top === "conversations" && next === "links")
883
+ return path[2] === "rebuild" ? "conversations.links.rebuild" : "conversations.links";
884
+ if (top === "conversations" && (next === "embeddings" || next === "embed") || top === "images" && next === "embed" || top === "conversations" && next === "rebuild")
885
+ return "conversations.embeddings";
886
+ if (top === "attachments" && next === "list" || top === "chats" && next === "documents")
887
+ return "messages";
888
+ if (top === "mentions")
889
+ return next === "rebuild" || next === "confirm" || next === "reject" ? `mentions.${next}` : "messages";
890
+ if (top === "store" && (next === "gaps" || next === "jobs"))
891
+ return path.join(".");
892
+ if (SHOW_MESSAGES.has(top) || top === "contacts" && (next === "context" || next === "prepare" || next === "events"))
893
+ return "messages";
894
+ if (RESOURCES.includes(top))
895
+ return path.join(".");
896
+ return void 0;
897
+ }, "keyForCommand");
898
+ var RESOURCE_KEY = new RegExp(`^(${RESOURCES.join("|")})(\\.[a-z][a-z-]*)*$`);
899
+ var COMMAND_PATH_KEY = /^[a-z][a-z-]*(\.[a-zA-Z][a-zA-Z-]*)*$/;
900
+ var permissionOverrides = /* @__PURE__ */ __name((entries = [], shape = RESOURCE_KEY) => {
901
+ const levels = {};
902
+ const example = shape === RESOURCE_KEY ? "messages.send=allow" : "api=readonly";
903
+ for (const entry of entries) {
904
+ const [key = "", level = "", extra] = entry.split("=");
905
+ if (!shape.test(key) || !LEVELS.includes(level) || extra !== void 0)
906
+ throw new CliError("validation_error", `--permission takes a command path and level, e.g. ${example} (deny, readonly, ask, allow)`);
907
+ levels[key] = level;
908
+ }
909
+ return levels;
910
+ }, "permissionOverrides");
911
+ var assertOverridesTighten = /* @__PURE__ */ __name((overrides, profile, defaults = DEFAULT_PERMISSIONS) => {
912
+ for (const [key, level] of Object.entries(overrides)) {
913
+ const under = Object.keys(profile).filter((named) => named.startsWith(`${key}.`));
914
+ const lifted = [key, ...under].find((named) => ORDER[level] > ORDER[levelFor(profile, named, defaults).level]);
915
+ if (lifted !== void 0)
916
+ throw new CliError("validation_error", `--permission ${key}=${level} would loosen ${lifted} from ${levelFor(profile, lifted, defaults).level}; it only tightens \u2014 change the profile's permissions to loosen it`, { key, lifted });
917
+ }
918
+ }, "assertOverridesTighten");
919
+ var assertRetentionEvidenceRead = /* @__PURE__ */ __name((permissions) => {
920
+ for (const permission of ["stats.chats.retention", "chats"]) {
921
+ if (levelFor(permissions, permission).level === "deny")
922
+ throw new CliError("permission_error", `profile denies ${permission}`, { permission });
923
+ }
924
+ }, "assertRetentionEvidenceRead");
925
+
926
+ // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/sends/guarded.js
535
927
  import { AsyncLocalStorage as AsyncLocalStorage2 } from "node:async_hooks";
536
928
  var sentIds = /* @__PURE__ */ __name((typed, message) => ({
537
929
  messageId: message.id,
@@ -637,7 +1029,7 @@ var guardedWrite = /* @__PURE__ */ __name(async (guard, attempt, act, settled =
637
1029
  }, "guardedWrite");
638
1030
  var codeOf = /* @__PURE__ */ __name((error) => typeof error?.code === "string" ? error.code : "unknown", "codeOf");
639
1031
 
640
- // node_modules/.pnpm/@wirecat+cli-core@0.501.0_@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_type_e6af10c98f87b1454255e560646d3ddf/node_modules/@wirecat/cli-core/dist/embeddings/models.js
1032
+ // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/embeddings/models.js
641
1033
  var huggingFace = /* @__PURE__ */ __name((repository, commit) => (name) => `https://huggingface.co/${repository}/resolve/${commit}/${name}`, "huggingFace");
642
1034
  var e5 = huggingFace("Xenova/multilingual-e5-small", "761b726dd34fb83930e26aab4e9ac3899aa1fa78");
643
1035
  var gemma = huggingFace("onnx-community/embeddinggemma-300m-ONNX", "5090578d9565bb06545b4552f76e6bc2c93e4a66");
@@ -796,7 +1188,7 @@ var rerankModel = /* @__PURE__ */ __name((id2) => {
796
1188
  var vectorModelKey = /* @__PURE__ */ __name((model) => `local:${model.id}:${model.dims}`, "vectorModelKey");
797
1189
  var meaningFloor = /* @__PURE__ */ __name((key) => key === "local:e5-small:384" ? 0.8 : 0, "meaningFloor");
798
1190
 
799
- // node_modules/.pnpm/@wirecat+cli-core@0.501.0_@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_type_e6af10c98f87b1454255e560646d3ddf/node_modules/@wirecat/cli-core/dist/images/picture/models.js
1191
+ // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/images/picture/models.js
800
1192
  import { join as join2 } from "node:path";
801
1193
  var clip = /* @__PURE__ */ __name((name) => `https://huggingface.co/Xenova/clip-vit-base-patch32/resolve/d15189d7028b43f1d3e65039190477f6af591c2a/${name}`, "clip");
802
1194
  var IMAGE_MODELS = [
@@ -850,7 +1242,7 @@ var imageModelsDirectory = /* @__PURE__ */ __name((env = process.env) => sharedM
850
1242
  var placedImage = /* @__PURE__ */ __name((model, directory) => model.files.map((file) => [file, join2(directory, model.id, file.name)]), "placedImage");
851
1243
  var isImageModelInstalled = /* @__PURE__ */ __name((model, directory) => filesPresent(placedImage(model, directory)), "isImageModelInstalled");
852
1244
 
853
- // node_modules/.pnpm/@wirecat+cli-core@0.501.0_@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_type_e6af10c98f87b1454255e560646d3ddf/node_modules/@wirecat/cli-core/dist/entities/task.js
1245
+ // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/entities/task.js
854
1246
  var closeSuggestion = strictObject({
855
1247
  as: picklist(["done", "dismissed"]),
856
1248
  /** The agent's name. */
@@ -892,7 +1284,7 @@ var task = strictObject({
892
1284
  updated_at: optional(time)
893
1285
  });
894
1286
 
895
- // node_modules/.pnpm/@wirecat+cli-core@0.501.0_@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_type_e6af10c98f87b1454255e560646d3ddf/node_modules/@wirecat/cli-core/dist/entities/agenda.js
1287
+ // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/entities/agenda.js
896
1288
  var agendaChat = strictObject({
897
1289
  chat: reference,
898
1290
  title: nullable(text),
@@ -962,7 +1354,7 @@ var agenda = strictObject({
962
1354
  unlisted_categories: array(strictObject({ name: text, open_tasks: number() }))
963
1355
  });
964
1356
 
965
- // node_modules/.pnpm/@wirecat+cli-core@0.501.0_@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_type_e6af10c98f87b1454255e560646d3ddf/node_modules/@wirecat/cli-core/dist/entities/conversation.js
1357
+ // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/entities/conversation.js
966
1358
  var conversation = strictObject({
967
1359
  id,
968
1360
  chat: reference,
@@ -977,7 +1369,7 @@ var conversation = strictObject({
977
1369
  rules_version: count
978
1370
  });
979
1371
 
980
- // node_modules/.pnpm/@wirecat+cli-core@0.501.0_@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_type_e6af10c98f87b1454255e560646d3ddf/node_modules/@wirecat/cli-core/dist/entities/attachment.js
1372
+ // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/entities/attachment.js
981
1373
  var attachment = strictObject({
982
1374
  /** The message it came with, as a locator; absent inside that message. */
983
1375
  message: optional(reference),
@@ -1014,7 +1406,7 @@ var attachment = strictObject({
1014
1406
  }))))
1015
1407
  });
1016
1408
 
1017
- // node_modules/.pnpm/@wirecat+cli-core@0.501.0_@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_type_e6af10c98f87b1454255e560646d3ddf/node_modules/@wirecat/cli-core/dist/entities/tagging.js
1409
+ // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/entities/tagging.js
1018
1410
  var tagging = strictObject({
1019
1411
  tag: text,
1020
1412
  type: picklist(TAG_TYPES),
@@ -1027,7 +1419,7 @@ var tagging = strictObject({
1027
1419
  created_at: time
1028
1420
  });
1029
1421
 
1030
- // node_modules/.pnpm/@wirecat+cli-core@0.501.0_@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_type_e6af10c98f87b1454255e560646d3ddf/node_modules/@wirecat/cli-core/dist/botcheck/reasons.js
1422
+ // node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/botcheck/reasons.js
1031
1423
  var WEIGHTS = {
1032
1424
  bot: 3,
1033
1425
  scam: 3,
@@ -1072,6 +1464,7 @@ export {
1072
1464
  runEvent,
1073
1465
  typedCommand,
1074
1466
  useAsProcessRun,
1467
+ processRun,
1075
1468
  enclosingTraceId,
1076
1469
  traceOf,
1077
1470
  childTrace,
@@ -1092,6 +1485,28 @@ export {
1092
1485
  rerankModel,
1093
1486
  vectorModelKey,
1094
1487
  meaningFloor,
1488
+ LEVELS,
1489
+ skipFlagFor,
1490
+ DEFAULT_PERMISSIONS,
1491
+ AUTHORITY_KEY,
1492
+ authorityAllowed,
1493
+ BOT_API_KEY,
1494
+ isBotApi,
1495
+ botApiAllowed,
1496
+ RESOURCES,
1497
+ layerPermissions,
1498
+ CEILING_KEY,
1499
+ levelFor,
1500
+ keyForWrite,
1501
+ writeOfKey,
1502
+ WRITE_KEYS,
1503
+ readKeysForCommand,
1504
+ keyForCommand,
1505
+ RESOURCE_KEY,
1506
+ COMMAND_PATH_KEY,
1507
+ permissionOverrides,
1508
+ assertOverridesTighten,
1509
+ assertRetentionEvidenceRead,
1095
1510
  IMAGE_MODELS,
1096
1511
  DEFAULT_IMAGE_MODEL,
1097
1512
  imageModel,