@wirecat/bitrix24-cli 0.4.0 → 0.5.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 (248) hide show
  1. package/CHANGELOG.md +78 -0
  2. package/README.md +84 -9
  3. package/dist/api-keys.d.ts +18 -13
  4. package/dist/api-keys.d.ts.map +1 -1
  5. package/dist/api-keys.js +79 -22
  6. package/dist/api-keys.js.map +1 -1
  7. package/dist/bin/b24.js +2 -2
  8. package/dist/bitrix/errors.js +1 -1
  9. package/dist/bitrix/errors.js.map +1 -1
  10. package/dist/bitrix/transport.d.ts +1 -1
  11. package/dist/bitrix/transport.d.ts.map +1 -1
  12. package/dist/bitrix/transport.js +20 -6
  13. package/dist/bitrix/transport.js.map +1 -1
  14. package/dist/body.d.ts +14 -0
  15. package/dist/body.d.ts.map +1 -0
  16. package/dist/body.js +44 -0
  17. package/dist/body.js.map +1 -0
  18. package/dist/bundle/{chunk-JAS3OZSP.js → all-profiles-CANIDIDS.js} +12 -7
  19. package/dist/bundle/{anthropic-QCYLKSJJ.js → anthropic-JUJB4DCF.js} +5 -5
  20. package/dist/bundle/{app-server-FSLZ2Y6N.js → app-server-3V5Z4PTK.js} +68 -54
  21. package/dist/bundle/b24.js +18 -12
  22. package/dist/bundle/{bun-UYRQXF33.js → bun-LKMV5TY7.js} +2 -2
  23. package/dist/bundle/{bun-sqlite-GXME7EMT.js → bun-sqlite-S56EF74S.js} +3 -3
  24. package/dist/bundle/{chunk-D2IRPC5I.js → chunk-2I4KWS3H.js} +6 -6
  25. package/dist/bundle/chunk-36PO5NWY.js +147 -0
  26. package/dist/bundle/{chunk-COOOXDKZ.js → chunk-42F7Q7V6.js} +3 -3
  27. package/dist/bundle/{chunk-POUSZWMP.js → chunk-4D3K6GZW.js} +18 -4
  28. package/dist/bundle/chunk-5D4MJQ6X.js +22 -0
  29. package/dist/bundle/chunk-5JOPERVF.js +84 -0
  30. package/dist/bundle/chunk-6A4UPWDC.js +15 -0
  31. package/dist/bundle/{chunk-O7FVOICH.js → chunk-6MGWIZG4.js} +1 -1
  32. package/dist/bundle/{chunk-B252WFK7.js → chunk-6YJTNZ7U.js} +13 -13
  33. package/dist/bundle/{chunk-2D5W4LWL.js → chunk-7FBFJ6B4.js} +4 -2
  34. package/dist/bundle/chunk-7VCMOTQP.js +55 -0
  35. package/dist/bundle/{chunk-6BLVBGRK.js → chunk-A5IMMGYU.js} +36 -34
  36. package/dist/bundle/{chunk-66QLBRIT.js → chunk-ASEHTBNK.js} +1 -1
  37. package/dist/bundle/{chunk-MY6FAZRA.js → chunk-B6LPJYPQ.js} +2 -2
  38. package/dist/bundle/{chunk-EQLWU6ZB.js → chunk-BHEE2K6C.js} +7 -7
  39. package/dist/bundle/chunk-BYZQBE63.js +971 -0
  40. package/dist/bundle/{chunk-J7OMY6EO.js → chunk-COKGNTDQ.js} +1477 -723
  41. package/dist/bundle/{chunk-QVZSLBR6.js → chunk-DVFYRQGE.js} +1 -1
  42. package/dist/bundle/{chunk-Q7Z5IMVY.js → chunk-DVSIBZ3G.js} +1 -1
  43. package/dist/bundle/chunk-EJEIXC6Y.js +273 -0
  44. package/dist/bundle/chunk-EYTGCM44.js +130 -0
  45. package/dist/bundle/{chunk-SBW2Y7AZ.js → chunk-EYYOKT23.js} +26 -26
  46. package/dist/bundle/{chunk-Y5PPMGCS.js → chunk-FCWPIWSR.js} +2 -2
  47. package/dist/bundle/{chunk-AOUNT22U.js → chunk-FSWRMQWX.js} +2 -2
  48. package/dist/bundle/{chunk-ADLS6FVG.js → chunk-FXBHOCJK.js} +1 -1
  49. package/dist/bundle/chunk-G5MW6RCM.js +723 -0
  50. package/dist/bundle/{chunk-4OVK5XW2.js → chunk-GLTKRLFT.js} +8 -8
  51. package/dist/bundle/chunk-GUUZQ7NE.js +581 -0
  52. package/dist/bundle/{chunk-XOPMSWFC.js → chunk-H6RIPOOI.js} +36 -3
  53. package/dist/bundle/{chunk-GTMCLOYY.js → chunk-HGFNC4CR.js} +1447 -430
  54. package/dist/bundle/{chunk-IF27EQN6.js → chunk-IERYD2N2.js} +6 -6
  55. package/dist/bundle/{chunk-Q4ILKTV4.js → chunk-IGCLMEMB.js} +3 -3
  56. package/dist/bundle/{chunk-2IZ6GGU2.js → chunk-J7WCSZ2Q.js} +410 -918
  57. package/dist/bundle/{chunk-CR3TLGM4.js → chunk-JZYHQ4HB.js} +3 -3
  58. package/dist/bundle/{chunk-XR5SUCAC.js → chunk-K4QM3X5F.js} +4 -4
  59. package/dist/bundle/{chunk-OWILUBCI.js → chunk-KFSMY7SZ.js} +2 -2
  60. package/dist/bundle/{chunk-AMVRNYD6.js → chunk-KPEDH5T4.js} +1 -1
  61. package/dist/bundle/{chunk-NEK7LKC6.js → chunk-KUY7LII2.js} +4 -4
  62. package/dist/bundle/{chunk-NDSOBIR3.js → chunk-LFXDHLFR.js} +3 -3
  63. package/dist/bundle/{chunk-ZU4HXKEW.js → chunk-LGLT4JB6.js} +3 -3
  64. package/dist/bundle/{chunk-EIGPMMGC.js → chunk-LM4OOBAW.js} +3 -3
  65. package/dist/bundle/chunk-M74BSKMA.js +234 -0
  66. package/dist/bundle/{chunk-MPI2FDJ4.js → chunk-MMMT6ORT.js} +11 -11
  67. package/dist/bundle/{chunk-F5NH3UJQ.js → chunk-NGYD6QTE.js} +2 -2
  68. package/dist/bundle/{chunk-6ERX33NC.js → chunk-NO6QOPVT.js} +10 -19
  69. package/dist/bundle/chunk-O6XC7DZI.js +804 -0
  70. package/dist/bundle/chunk-OE3NFB53.js +64 -0
  71. package/dist/bundle/{chunk-VTIUWHZ3.js → chunk-OUMFNB34.js} +13 -149
  72. package/dist/bundle/{chunk-VMQL4GNH.js → chunk-P2RQTNVJ.js} +806 -850
  73. package/dist/bundle/{chunk-XKQZLR2X.js → chunk-PBIBGIZ7.js} +1 -1
  74. package/dist/bundle/{chunk-YFZXI3NN.js → chunk-Q6VQHTRW.js} +2 -2
  75. package/dist/bundle/{chunk-OKDC6CLH.js → chunk-QHBCNVUG.js} +5 -5
  76. package/dist/bundle/{chunk-WJRBX5QB.js → chunk-QNOXAQ6Y.js} +4 -4
  77. package/dist/bundle/{chunk-GTFRSYYJ.js → chunk-R5F2O5GX.js} +7 -269
  78. package/dist/bundle/{chunk-OCRCVLZQ.js → chunk-R5PBSKJL.js} +1 -1
  79. package/dist/bundle/{chunk-JB7OXYAU.js → chunk-RS2BARUU.js} +4 -4
  80. package/dist/bundle/chunk-TG3DSPT5.js +14 -0
  81. package/dist/bundle/{chunk-UH56WLDS.js → chunk-U22JMKUO.js} +6 -125
  82. package/dist/bundle/chunk-U66Q5TVK.js +106 -0
  83. package/dist/bundle/{chunk-NWKXMMON.js → chunk-UCHMQWON.js} +136 -33
  84. package/dist/bundle/{chunk-DQIQIZQS.js → chunk-VMJS7FJZ.js} +451 -433
  85. package/dist/bundle/{chunk-IWEWDVZ6.js → chunk-VMVAQHDC.js} +77 -615
  86. package/dist/bundle/{chunk-M5XMAUGZ.js → chunk-WWMCJFMT.js} +2 -2
  87. package/dist/bundle/{chunk-OYLJHX74.js → chunk-XTA5TN3H.js} +1 -1
  88. package/dist/bundle/{chunk-ELBOQHJA.js → chunk-XUHHBEA7.js} +652 -131
  89. package/dist/bundle/{chunk-BHZ5VDDY.js → chunk-YDZHO4LT.js} +13 -13
  90. package/dist/bundle/{chunk-NKLLI4B2.js → chunk-ZKINZFIT.js} +6 -6
  91. package/dist/bundle/{chunk-GTDOUP6L.js → chunk-ZSQXSIFQ.js} +85 -38
  92. package/dist/bundle/{chunk-LAYH344Y.js → chunk-ZZEHDIEG.js} +58 -54
  93. package/dist/bundle/command-contract-OQV6H7SR.js +36 -0
  94. package/dist/bundle/{decode-IF2F2SFC.js → decode-QSTBX4MG.js} +3 -3
  95. package/dist/bundle/{echarts-WDDVEJO2.js → echarts-JZELFH2N.js} +2 -2
  96. package/dist/bundle/{embed-VDUGYEAR.js → embed-4RIW2LVH.js} +4 -4
  97. package/dist/bundle/{embedder-DUN62H3Z.js → embedder-SW7DTWSL.js} +7 -7
  98. package/dist/bundle/{first-run-NDGYBQEN.js → first-run-7AISOSOM.js} +8 -8
  99. package/dist/bundle/first-screen-NMHNFZ2B.js +34 -0
  100. package/dist/bundle/{instructions-JIIKWS7X.js → instructions-BZE5YUGG.js} +1 -1
  101. package/dist/bundle/{mcp-33JX6KP4.js → mcp-SDWHDJTY.js} +2 -2
  102. package/dist/bundle/{node-P4E63KXA.js → node-KM3CUABH.js} +9 -9
  103. package/dist/bundle/{node-K57WT42O.js → node-LTKZIO4U.js} +2 -2
  104. package/dist/bundle/{node-sqlite-KS6ORRIG.js → node-sqlite-HQ5PN2RH.js} +4 -4
  105. package/dist/bundle/{oauth-SLSANN37.js → oauth-UH6FOZQL.js} +5 -5
  106. package/dist/bundle/{open-WJPHADEX.js → open-TSUP3XGL.js} +3 -3
  107. package/dist/bundle/{openai-HXB3GTOD.js → openai-GVEE52E3.js} +14 -14
  108. package/dist/bundle/{process-P73TFAXT.js → process-AGXY76ZE.js} +1 -1
  109. package/dist/bundle/{program-7BMG5NIN.js → program-BI4A4HFJ.js} +1045 -1048
  110. package/dist/bundle/{prompt-WDPV37R4.js → prompt-NRSUY7FA.js} +3 -3
  111. package/dist/bundle/{recognize-CXIFL6IV.js → recognize-NPDPQ6PJ.js} +2 -2
  112. package/dist/bundle/{remote-Q4VJ4OQW.js → remote-HFASMVLB.js} +5 -5
  113. package/dist/bundle/{rerank-SUFYK63I.js → rerank-TL6Z6F7K.js} +5 -5
  114. package/dist/bundle/{chunk-XG6QKS7L.js → serve-VB4DHDZQ.js} +8 -6
  115. package/dist/bundle/server-T5EDRPJI.js +68 -0
  116. package/dist/bundle/{chunk-K7XWCZF6.js → server-Z6MW6C37.js} +50 -14
  117. package/dist/bundle/source-4IGO5J7E.js +237 -0
  118. package/dist/bundle/sqlite-runtime-YS4POY3W.js +17 -0
  119. package/dist/bundle/{state-EZCCXQV7.js → state-ISZVVZGR.js} +4 -4
  120. package/dist/bundle/store-IZJBAKJV.js +58 -0
  121. package/dist/bundle/{store-MZ7JBYR6.js → store-L76MSQC3.js} +17 -12
  122. package/dist/bundle/store-PBTIB7BD.js +207 -0
  123. package/dist/bundle/store-maintenance-command-YFKII7TF.js +58 -0
  124. package/dist/bundle/writer-3O5EYMFE.js +214 -0
  125. package/dist/commands/api.d.ts.map +1 -1
  126. package/dist/commands/api.js +34 -33
  127. package/dist/commands/api.js.map +1 -1
  128. package/dist/commands/crm-shared.d.ts +4 -0
  129. package/dist/commands/crm-shared.d.ts.map +1 -0
  130. package/dist/commands/crm-shared.js +94 -0
  131. package/dist/commands/crm-shared.js.map +1 -0
  132. package/dist/commands/crm-writes.d.ts +0 -1
  133. package/dist/commands/crm-writes.d.ts.map +1 -1
  134. package/dist/commands/crm-writes.js +31 -92
  135. package/dist/commands/crm-writes.js.map +1 -1
  136. package/dist/commands/crm.d.ts.map +1 -1
  137. package/dist/commands/crm.js +1 -45
  138. package/dist/commands/crm.js.map +1 -1
  139. package/dist/commands/session.d.ts.map +1 -1
  140. package/dist/commands/session.js +1 -0
  141. package/dist/commands/session.js.map +1 -1
  142. package/dist/commands/write.d.ts +1 -6
  143. package/dist/commands/write.d.ts.map +1 -1
  144. package/dist/commands/write.js +7 -16
  145. package/dist/commands/write.js.map +1 -1
  146. package/dist/config.d.ts +0 -5
  147. package/dist/config.d.ts.map +1 -1
  148. package/dist/config.js +6 -9
  149. package/dist/config.js.map +1 -1
  150. package/dist/crm/capabilities.d.ts +7 -0
  151. package/dist/crm/capabilities.d.ts.map +1 -0
  152. package/dist/crm/capabilities.js +7 -0
  153. package/dist/crm/capabilities.js.map +1 -0
  154. package/dist/crm/conditions.d.ts +1 -1
  155. package/dist/crm/conditions.d.ts.map +1 -1
  156. package/dist/crm/conditions.js +3 -5
  157. package/dist/crm/conditions.js.map +1 -1
  158. package/dist/crm/custom-query.d.ts +1 -1
  159. package/dist/crm/custom-query.d.ts.map +1 -1
  160. package/dist/crm/custom-query.js +2 -2
  161. package/dist/crm/custom-query.js.map +1 -1
  162. package/dist/crm/deal.d.ts +4 -28
  163. package/dist/crm/deal.d.ts.map +1 -1
  164. package/dist/crm/deal.js +15 -48
  165. package/dist/crm/deal.js.map +1 -1
  166. package/dist/crm/fields.d.ts +2 -26
  167. package/dist/crm/fields.d.ts.map +1 -1
  168. package/dist/crm/fields.js +2 -67
  169. package/dist/crm/fields.js.map +1 -1
  170. package/dist/crm/items.d.ts.map +1 -1
  171. package/dist/crm/items.js +6 -5
  172. package/dist/crm/items.js.map +1 -1
  173. package/dist/crm/lead.d.ts +5 -37
  174. package/dist/crm/lead.d.ts.map +1 -1
  175. package/dist/crm/lead.js +15 -61
  176. package/dist/crm/lead.js.map +1 -1
  177. package/dist/crm/pipelines.d.ts +5 -0
  178. package/dist/crm/pipelines.d.ts.map +1 -0
  179. package/dist/crm/pipelines.js +54 -0
  180. package/dist/crm/pipelines.js.map +1 -0
  181. package/dist/crm/product.d.ts.map +1 -1
  182. package/dist/crm/product.js +2 -2
  183. package/dist/crm/product.js.map +1 -1
  184. package/dist/crm/rest3-fields.d.ts +3 -0
  185. package/dist/crm/rest3-fields.d.ts.map +1 -0
  186. package/dist/crm/rest3-fields.js +38 -0
  187. package/dist/crm/rest3-fields.js.map +1 -0
  188. package/dist/crm/source.d.ts +15 -0
  189. package/dist/crm/source.d.ts.map +1 -0
  190. package/dist/crm/source.js +122 -0
  191. package/dist/crm/source.js.map +1 -0
  192. package/dist/crm/user.d.ts.map +1 -1
  193. package/dist/crm/user.js +2 -2
  194. package/dist/crm/user.js.map +1 -1
  195. package/dist/crm/values.d.ts +19 -4
  196. package/dist/crm/values.d.ts.map +1 -1
  197. package/dist/crm/values.js +28 -2
  198. package/dist/crm/values.js.map +1 -1
  199. package/dist/crm/writer.d.ts +9 -0
  200. package/dist/crm/writer.d.ts.map +1 -0
  201. package/dist/crm/writer.js +119 -0
  202. package/dist/crm/writer.js.map +1 -0
  203. package/dist/program.d.ts.map +1 -1
  204. package/dist/program.js +51 -6
  205. package/dist/program.js.map +1 -1
  206. package/dist/store.d.ts +15 -0
  207. package/dist/store.d.ts.map +1 -0
  208. package/dist/store.js +33 -0
  209. package/dist/store.js.map +1 -0
  210. package/dist/version.d.ts +1 -1
  211. package/dist/version.js +1 -1
  212. package/package.json +4 -6
  213. package/skills/bitrix24-cli/SKILL.md +16 -15
  214. package/dist/bundle/all-profiles-MBQZCOVK.js +0 -24
  215. package/dist/bundle/chunk-UCLWWSQK.js +0 -48
  216. package/dist/bundle/command-contract-UON4EIC4.js +0 -30
  217. package/dist/bundle/first-screen-QAVKP5RF.js +0 -28
  218. package/dist/bundle/mcp-57EQ6QJO.js +0 -171
  219. package/dist/bundle/mcp-PFJER2DE.js +0 -87
  220. package/dist/bundle/serve-B7PGFOC2.js +0 -19
  221. package/dist/bundle/server-4DBNJWW6.js +0 -58
  222. package/dist/bundle/server-OKE7SXJ2.js +0 -45
  223. package/dist/bundle/store-maintenance-command-T5QZMENJ.js +0 -47
  224. package/dist/commands/doctor.d.ts +0 -77
  225. package/dist/commands/doctor.d.ts.map +0 -1
  226. package/dist/commands/doctor.js +0 -74
  227. package/dist/commands/doctor.js.map +0 -1
  228. package/dist/commands/fields.d.ts +0 -3
  229. package/dist/commands/fields.d.ts.map +0 -1
  230. package/dist/commands/fields.js +0 -45
  231. package/dist/commands/fields.js.map +0 -1
  232. package/dist/commands/mcp.d.ts +0 -3
  233. package/dist/commands/mcp.d.ts.map +0 -1
  234. package/dist/commands/mcp.js +0 -97
  235. package/dist/commands/mcp.js.map +0 -1
  236. package/dist/crm/pipeline.d.ts +0 -17
  237. package/dist/crm/pipeline.d.ts.map +0 -1
  238. package/dist/crm/pipeline.js +0 -42
  239. package/dist/crm/pipeline.js.map +0 -1
  240. package/dist/crm/stage.d.ts +0 -20
  241. package/dist/crm/stage.d.ts.map +0 -1
  242. package/dist/crm/stage.js +0 -65
  243. package/dist/crm/stage.js.map +0 -1
  244. package/dist/mcp.d.ts +0 -29
  245. package/dist/mcp.d.ts.map +0 -1
  246. package/dist/mcp.js +0 -102
  247. package/dist/mcp.js.map +0 -1
  248. /package/dist/bundle/{chunk-NDTJE6JQ.js → chunk-ZQ3GWKDQ.js} +0 -0
@@ -4,15 +4,15 @@ import {
4
4
  MAX_SECRET_INPUT,
5
5
  bufferedInput,
6
6
  inputPolicy
7
- } from "./chunk-YFZXI3NN.js";
7
+ } from "./chunk-Q6VQHTRW.js";
8
8
  import {
9
9
  CliError
10
- } from "./chunk-SBW2Y7AZ.js";
10
+ } from "./chunk-EYYOKT23.js";
11
11
  import {
12
12
  __name
13
13
  } from "./chunk-ZVVMGPBJ.js";
14
14
 
15
- // node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.80.1_commander@15.0.0_esbuild@0.28.2_type_4c7167080feb2ba6356a64767981f5fd/node_modules/@wirecat/cli-core/dist/terminal/prompt.js
15
+ // node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/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 readSecret = /* @__PURE__ */ __name(async (prompt, { input = process.stdin, output = process.stderr, echo = false, signal: givenSignal } = {}) => {
@@ -2,7 +2,7 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  CliError
5
- } from "./chunk-SBW2Y7AZ.js";
5
+ } from "./chunk-EYYOKT23.js";
6
6
  import {
7
7
  importFrom
8
8
  } from "./chunk-Y5E2WNWB.js";
@@ -10,10 +10,10 @@ import {
10
10
  __name
11
11
  } from "./chunk-ZVVMGPBJ.js";
12
12
 
13
- // node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.80.1_commander@15.0.0_esbuild@0.28.2_type_4c7167080feb2ba6356a64767981f5fd/node_modules/@wirecat/cli-core/dist/speech/recognize.js
13
+ // node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/speech/recognize.js
14
14
  import { createRequire } from "node:module";
15
15
 
16
- // node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.80.1_commander@15.0.0_esbuild@0.28.2_type_4c7167080feb2ba6356a64767981f5fd/node_modules/@wirecat/cli-core/dist/speech/ogg-limit.js
16
+ // node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/speech/ogg-limit.js
17
17
  var invalid = /* @__PURE__ */ __name(() => new CliError("validation_error", "local transcription needs a complete mono or stereo Ogg Opus recording"), "invalid");
18
18
  var checkOggDuration = /* @__PURE__ */ __name((bytes) => {
19
19
  const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
@@ -70,7 +70,7 @@ var checkOggDuration = /* @__PURE__ */ __name((bytes) => {
70
70
  throw invalid();
71
71
  }, "checkOggDuration");
72
72
 
73
- // node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.80.1_commander@15.0.0_esbuild@0.28.2_type_4c7167080feb2ba6356a64767981f5fd/node_modules/@wirecat/cli-core/dist/speech/recognize.js
73
+ // node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/speech/recognize.js
74
74
  var SAMPLE_RATE = 16e3;
75
75
  var LEAD = SAMPLE_RATE / 2;
76
76
  var toModelRate = /* @__PURE__ */ __name((samples, rate) => {
@@ -195,9 +195,23 @@ var openRecognizer = /* @__PURE__ */ __name((model, path, vadModel) => {
195
195
  });
196
196
  return heard;
197
197
  }, "pieces");
198
+ const piecesUntil = /* @__PURE__ */ __name(async (pcm, signal) => {
199
+ const spans = [];
200
+ cut(vad, pcm, (span) => spans.push(span));
201
+ const heard = [];
202
+ for (const { start, end, samples } of spans) {
203
+ await new Promise((resolve) => setImmediate(resolve));
204
+ signal.throwIfAborted();
205
+ const text = piece(samples);
206
+ if (text)
207
+ heard.push({ start, end, text });
208
+ }
209
+ return heard;
210
+ }, "piecesUntil");
198
211
  return {
199
212
  recognize: /* @__PURE__ */ __name((pcm) => pieces(pcm).map(({ text }) => text).join(" "), "recognize"),
200
213
  pieces,
214
+ piecesUntil,
201
215
  free: /* @__PURE__ */ __name(() => {
202
216
  vad.free();
203
217
  engine.free();
@@ -0,0 +1,22 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ errorCodes
5
+ } from "./chunk-EYYOKT23.js";
6
+ import {
7
+ __name
8
+ } from "./chunk-ZVVMGPBJ.js";
9
+
10
+ // node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/errors/failures.js
11
+ var isCliFailure = /* @__PURE__ */ __name((value) => value instanceof Error && value.name === "CliError" && errorCodes.includes(value.code), "isCliFailure");
12
+ var isCommanderFailure = /* @__PURE__ */ __name((value) => {
13
+ const { code, exitCode } = value ?? {};
14
+ return value instanceof Error && typeof code === "string" && code.startsWith("commander.") && typeof exitCode === "number";
15
+ }, "isCommanderFailure");
16
+ var failureKey = /* @__PURE__ */ __name((error) => isCliFailure(error) ? error.code : error instanceof Error ? error.name : "error", "failureKey");
17
+
18
+ export {
19
+ isCliFailure,
20
+ isCommanderFailure,
21
+ failureKey
22
+ };
@@ -0,0 +1,84 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ moneyLabel
5
+ } from "./chunk-P2RQTNVJ.js";
6
+ import {
7
+ CliError,
8
+ singleLine
9
+ } from "./chunk-EYYOKT23.js";
10
+ import {
11
+ __name
12
+ } from "./chunk-ZVVMGPBJ.js";
13
+
14
+ // node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/domain/finance.js
15
+ var INVOICE_DIRECTIONS = ["receivable", "payable"];
16
+ var INVOICE_STATUSES = ["draft", "issued", "partly_paid", "paid", "void"];
17
+ var MONEY_DIRECTIONS = ["in", "out"];
18
+ var FINANCE_REVIEWS = ["proposed", "confirmed", "rejected"];
19
+ var settledStatus = /* @__PURE__ */ __name((current, total, paid) => {
20
+ if (current === "draft" || current === "void")
21
+ return current;
22
+ if (paid <= 0)
23
+ return "issued";
24
+ return paid < total ? "partly_paid" : "paid";
25
+ }, "settledStatus");
26
+ var dayMonth = /* @__PURE__ */ __name((date) => date === null ? null : `${date.slice(8, 10)}.${date.slice(5, 7)}`, "dayMonth");
27
+ var notes = /* @__PURE__ */ __name((...words) => {
28
+ const kept = words.filter((word) => word !== null);
29
+ return kept.length === 0 ? "" : ` (${kept.join(", ")})`;
30
+ }, "notes");
31
+ var invoiceLine = /* @__PURE__ */ __name((invoice) => {
32
+ const party = invoice.counterpartyName === null ? "" : `${invoice.direction === "receivable" ? " to" : " from"} ${invoice.counterpartyName}`;
33
+ const due = invoice.dueDate === null ? "" : `, due ${dayMonth(invoice.dueDate)}`;
34
+ return `${invoice.number ?? `#${invoice.id}`} \xB7 ${moneyLabel(invoice.total, invoice.currency)}${party}${due}` + notes(invoice.status.replace("_", " "), invoice.review === "confirmed" ? null : invoice.review);
35
+ }, "invoiceLine");
36
+ var paymentLine = /* @__PURE__ */ __name((payment) => {
37
+ const party = payment.partyName === null ? "" : `${payment.direction === "in" ? " from" : " to"} ${payment.partyName}`;
38
+ return `${moneyLabel(payment.amount, payment.currency)}${party}, ${dayMonth(payment.date)}` + notes(payment.review === "confirmed" ? null : payment.review);
39
+ }, "paymentLine");
40
+ var invoiceTitle = /* @__PURE__ */ __name((invoice) => `Invoice ${invoiceLine(invoice)}`, "invoiceTitle");
41
+ var paymentEntryTitle = /* @__PURE__ */ __name((payment) => `Payment \xB7 ${paymentLine(payment)}`, "paymentEntryTitle");
42
+
43
+ // node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/domain/orders.js
44
+ var ORDER_STATUSES = ["placed", "shipped", "delivered", "cancelled", "returned"];
45
+ var ORDER_PURPOSES = ["personal", "business", "client", "other"];
46
+ var orderLine = /* @__PURE__ */ __name((order) => {
47
+ const money = order.total === null || order.currency === null ? "" : `, ${moneyLabel(order.total, order.currency)}`;
48
+ const notes2 = [order.status, order.review === "confirmed" ? null : order.review].filter(Boolean).join(", ");
49
+ return `${order.number ?? `#${order.id}`} \xB7 ${order.supplierName}${money} (${notes2})`;
50
+ }, "orderLine");
51
+ var orderTitle = /* @__PURE__ */ __name((order) => `Order ${orderLine(order)}`, "orderTitle");
52
+
53
+ // node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/domain/tags.js
54
+ var TAG_TYPES = ["chat", "contact", "message", "task"];
55
+ var TAG = /^[a-z0-9-]{1,32}$/;
56
+ var tagOf = /* @__PURE__ */ __name((value) => {
57
+ const tag = value.trim().toLowerCase();
58
+ return TAG.test(tag) ? tag : void 0;
59
+ }, "tagOf");
60
+ var normalizeTag = /* @__PURE__ */ __name((value) => {
61
+ const tag = tagOf(value);
62
+ if (tag === void 0)
63
+ throw new CliError("validation_error", `"${singleLine(value)}" is not a tag \u2014 use 1\u201332 letters a\u2013z, digits and hyphens`, { reason: "tag.invalid" });
64
+ return tag;
65
+ }, "normalizeTag");
66
+
67
+ export {
68
+ INVOICE_DIRECTIONS,
69
+ INVOICE_STATUSES,
70
+ MONEY_DIRECTIONS,
71
+ FINANCE_REVIEWS,
72
+ settledStatus,
73
+ invoiceLine,
74
+ paymentLine,
75
+ invoiceTitle,
76
+ paymentEntryTitle,
77
+ ORDER_STATUSES,
78
+ ORDER_PURPOSES,
79
+ orderLine,
80
+ orderTitle,
81
+ TAG_TYPES,
82
+ tagOf,
83
+ normalizeTag
84
+ };
@@ -0,0 +1,15 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ __name
5
+ } from "./chunk-ZVVMGPBJ.js";
6
+
7
+ // node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/sends/send-id.js
8
+ import { randomBytes } from "node:crypto";
9
+ var newSendId = /* @__PURE__ */ __name(() => randomBytes(8).readBigInt64BE().toString(), "newSendId");
10
+ var newOperationId = newSendId;
11
+
12
+ export {
13
+ newSendId,
14
+ newOperationId
15
+ };
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.80.1_commander@15.0.0_esbuild@0.28.2_type_4c7167080feb2ba6356a64767981f5fd/node_modules/@wirecat/cli-core/dist/http/listen.js
7
+ // node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/http/listen.js
8
8
  import { createServer } from "node:http";
9
9
  import { Readable } from "node:stream";
10
10
  var MAX_BODY = 4 * 1024 * 1024;
@@ -2,12 +2,12 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  CliError
5
- } from "./chunk-SBW2Y7AZ.js";
5
+ } from "./chunk-EYYOKT23.js";
6
6
  import {
7
7
  __name
8
8
  } from "./chunk-ZVVMGPBJ.js";
9
9
 
10
- // node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.80.1_commander@15.0.0_esbuild@0.28.2_type_4c7167080feb2ba6356a64767981f5fd/node_modules/@wirecat/cli-core/dist/files/ordinary-file.js
10
+ // node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/files/ordinary-file.js
11
11
  import { constants } from "node:fs";
12
12
  import { lstat, open } from "node:fs/promises";
13
13
  var deviceOf = /* @__PURE__ */ __name((dev) => process.platform === "win32" ? BigInt.asUintN(32, dev) : dev, "deviceOf");
@@ -73,7 +73,7 @@ var syncDirectory = /* @__PURE__ */ __name(async (path) => {
73
73
  }
74
74
  }, "syncDirectory");
75
75
 
76
- // node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.80.1_commander@15.0.0_esbuild@0.28.2_type_4c7167080feb2ba6356a64767981f5fd/node_modules/@wirecat/cli-core/dist/files/atomic-write.js
76
+ // node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/files/atomic-write.js
77
77
  import { randomUUID } from "node:crypto";
78
78
  import { constants as constants2 } from "node:fs";
79
79
  import { link, open as open2, realpath, rename, unlink } from "node:fs/promises";
@@ -111,7 +111,7 @@ var writeFileAtomic = /* @__PURE__ */ __name(async (path, content, { mode = 384,
111
111
  }
112
112
  }, "writeFileAtomic");
113
113
 
114
- // node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.80.1_commander@15.0.0_esbuild@0.28.2_type_4c7167080feb2ba6356a64767981f5fd/node_modules/@wirecat/cli-core/dist/files/bounded-utf8.js
114
+ // node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/files/bounded-utf8.js
115
115
  var readBoundedUtf8File = /* @__PURE__ */ __name(async (path, { maxBytes }) => {
116
116
  if (!Number.isSafeInteger(maxBytes) || maxBytes < 1 || maxBytes > 16 * 1024 * 1024)
117
117
  throw new CliError("validation_error", "file maxBytes takes 1\u201316777216 bytes");
@@ -140,21 +140,21 @@ var readBoundedUtf8File = /* @__PURE__ */ __name(async (path, { maxBytes }) => {
140
140
  }
141
141
  }, "readBoundedUtf8File");
142
142
 
143
- // node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.80.1_commander@15.0.0_esbuild@0.28.2_type_4c7167080feb2ba6356a64767981f5fd/node_modules/@wirecat/cli-core/dist/files/lock.js
143
+ // node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/files/lock.js
144
144
  import { mkdir as mkdir2 } from "node:fs/promises";
145
145
  import { basename as basename2, dirname as dirname2 } from "node:path";
146
146
 
147
- // node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.80.1_commander@15.0.0_esbuild@0.28.2_type_4c7167080feb2ba6356a64767981f5fd/node_modules/@wirecat/cli-core/dist/files/native-writer-lease.js
147
+ // node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/files/native-writer-lease.js
148
148
  import { randomUUID as randomUUID2 } from "node:crypto";
149
149
  import { lstat as lstat3, mkdir, open as open3, realpath as realpath3, rmdir as rmdir2, unlink as unlink4 } from "node:fs/promises";
150
150
  import { hostname as hostname2 } from "node:os";
151
151
  import { join as join3 } from "node:path";
152
152
 
153
- // node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.80.1_commander@15.0.0_esbuild@0.28.2_type_4c7167080feb2ba6356a64767981f5fd/node_modules/@wirecat/cli-core/dist/files/native-lease-inspection.js
153
+ // node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/files/native-lease-inspection.js
154
154
  import { lstat as lstat2, readdir, realpath as realpath2, unlink as unlink2 } from "node:fs/promises";
155
155
  import { join as join2 } from "node:path";
156
156
 
157
- // node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.80.1_commander@15.0.0_esbuild@0.28.2_type_4c7167080feb2ba6356a64767981f5fd/node_modules/@wirecat/cli-core/dist/files/native-lease-owner.js
157
+ // node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/files/native-lease-owner.js
158
158
  import { hostname } from "node:os";
159
159
  var missingLeaseFile = /* @__PURE__ */ __name((error) => typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT", "missingLeaseFile");
160
160
  var readLeaseOwner = /* @__PURE__ */ __name(async (path, name, signal) => {
@@ -199,7 +199,7 @@ var leaseOwnerStatus = /* @__PURE__ */ __name((owner) => {
199
199
  }
200
200
  }, "leaseOwnerStatus");
201
201
 
202
- // node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.80.1_commander@15.0.0_esbuild@0.28.2_type_4c7167080feb2ba6356a64767981f5fd/node_modules/@wirecat/cli-core/dist/files/native-lease-inspection.js
202
+ // node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/files/native-lease-inspection.js
203
203
  var leaseInspection = /* @__PURE__ */ __name((markerDirectory) => {
204
204
  const inspect = /* @__PURE__ */ __name(async (destination, options = {}) => {
205
205
  options.signal?.throwIfAborted();
@@ -258,7 +258,7 @@ var leaseInspection = /* @__PURE__ */ __name((markerDirectory) => {
258
258
  return { inspect, recover };
259
259
  }, "leaseInspection");
260
260
 
261
- // node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.80.1_commander@15.0.0_esbuild@0.28.2_type_4c7167080feb2ba6356a64767981f5fd/node_modules/@wirecat/cli-core/dist/files/native-lease-release.js
261
+ // node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/files/native-lease-release.js
262
262
  import { rmdir, unlink as unlink3 } from "node:fs/promises";
263
263
  var ownedNativeLease = /* @__PURE__ */ __name((path, name, owner, folder, identity) => {
264
264
  let releasing;
@@ -283,7 +283,7 @@ var ownedNativeLease = /* @__PURE__ */ __name((path, name, owner, folder, identi
283
283
  };
284
284
  }, "ownedNativeLease");
285
285
 
286
- // node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.80.1_commander@15.0.0_esbuild@0.28.2_type_4c7167080feb2ba6356a64767981f5fd/node_modules/@wirecat/cli-core/dist/files/native-writer-lease.js
286
+ // node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/files/native-writer-lease.js
287
287
  var validName = /* @__PURE__ */ __name((value) => typeof value === "string" && value.length > 0 && value !== "." && value !== ".." && !/[\\/\0:]/.test(value), "validName");
288
288
  var nativeWriterLeaseStore = /* @__PURE__ */ __name((layout) => {
289
289
  const { markerDirectory, legacyMarker } = layout;
@@ -354,7 +354,7 @@ var nativeWriterLeaseStore = /* @__PURE__ */ __name((layout) => {
354
354
  };
355
355
  }, "nativeWriterLeaseStore");
356
356
 
357
- // node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.80.1_commander@15.0.0_esbuild@0.28.2_type_4c7167080feb2ba6356a64767981f5fd/node_modules/@wirecat/cli-core/dist/files/lock.js
357
+ // node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/files/lock.js
358
358
  var acquireLock = /* @__PURE__ */ __name(async (path, { signal } = {}) => {
359
359
  const folder = dirname2(path);
360
360
  await mkdir2(folder, { recursive: true, mode: 448 });
@@ -369,7 +369,7 @@ var acquireLock = /* @__PURE__ */ __name(async (path, { signal } = {}) => {
369
369
  });
370
370
  }, "acquireLock");
371
371
 
372
- // node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.80.1_commander@15.0.0_esbuild@0.28.2_type_4c7167080feb2ba6356a64767981f5fd/node_modules/@wirecat/cli-core/dist/files/safe-name.js
372
+ // node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/files/safe-name.js
373
373
  import { basename as basename3 } from "node:path";
374
374
  var safeName = /* @__PURE__ */ __name((name, platform = process.platform) => {
375
375
  let plain = name === void 0 ? "" : basename3(name.replaceAll("\\", "/")).replace(/[\p{Cc}​-‏‪-‮⁦-⁩]/gu, "").replace(/^\.+/, "");
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.80.1_commander@15.0.0_esbuild@0.28.2_type_4c7167080feb2ba6356a64767981f5fd/node_modules/@wirecat/cli-core/dist/store/driver.js
7
+ // node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/store/driver.js
8
8
  var TIME_LIMIT_FUNCTION = "wc_time_limit";
9
9
  var TimeLimitReached = class extends Error {
10
10
  static {
@@ -25,10 +25,12 @@ var PRAGMAS = `
25
25
  PRAGMA journal_mode = WAL;
26
26
  PRAGMA foreign_keys = ON;
27
27
  `;
28
+ var isQueryOnly = /* @__PURE__ */ __name((database) => Number(Object.values(database.prepare("PRAGMA query_only").get() ?? {})[0]) === 1, "isQueryOnly");
28
29
 
29
30
  export {
30
31
  TIME_LIMIT_FUNCTION,
31
32
  TimeLimitReached,
32
33
  beforeTimeLimit,
33
- PRAGMAS
34
+ PRAGMAS,
35
+ isQueryOnly
34
36
  };
@@ -0,0 +1,55 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ amountOf,
5
+ epoch,
6
+ id,
7
+ ids,
8
+ text
9
+ } from "./chunk-O6XC7DZI.js";
10
+ import {
11
+ __name
12
+ } from "./chunk-ZVVMGPBJ.js";
13
+
14
+ // dist/crm/lead.js
15
+ var LEAD_PIPELINE = { externalId: "0", name: "Leads" };
16
+ var fromBitrixLead = /* @__PURE__ */ __name((raw, metadata) => ({
17
+ externalId: id(raw.id) ?? "",
18
+ title: text(raw.title) ?? "",
19
+ pipeline: LEAD_PIPELINE.externalId,
20
+ stage: text(raw.stageId) ?? "",
21
+ ...amountOf(raw.opportunity, raw.currencyId),
22
+ organization: id(raw.companyId),
23
+ people: ids(raw.contactsId).map((externalId) => ({ externalId, role: "contact" })),
24
+ createdAt: epoch(raw.createdTime),
25
+ updatedAt: epoch(raw.updatedTime),
26
+ url: text(raw.url),
27
+ assignee: id(raw.assignedById),
28
+ ...metadata ? { metadata } : {}
29
+ }), "fromBitrixLead");
30
+ var LEAD = {
31
+ type: "lead",
32
+ entityTypeId: 1,
33
+ word: "lead",
34
+ select: [
35
+ "id",
36
+ "title",
37
+ "stageId",
38
+ "opportunity",
39
+ "currencyId",
40
+ "companyId",
41
+ "contactsId",
42
+ "createdTime",
43
+ "updatedTime",
44
+ "url",
45
+ "assignedById"
46
+ ],
47
+ words: ["title"],
48
+ nameOf: /* @__PURE__ */ __name((lead) => lead.title, "nameOf"),
49
+ map: fromBitrixLead
50
+ };
51
+
52
+ export {
53
+ LEAD_PIPELINE,
54
+ LEAD
55
+ };
@@ -19,12 +19,12 @@ import {
19
19
  strictObject,
20
20
  string,
21
21
  unknown
22
- } from "./chunk-SBW2Y7AZ.js";
22
+ } from "./chunk-EYYOKT23.js";
23
23
  import {
24
24
  __name
25
25
  } from "./chunk-ZVVMGPBJ.js";
26
26
 
27
- // node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.80.1_commander@15.0.0_esbuild@0.28.2_type_4c7167080feb2ba6356a64767981f5fd/node_modules/@wirecat/cli-core/dist/tasks/model.js
27
+ // node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/tasks/model.js
28
28
  var TASK_KINDS = ["question", "request", "mention", "promise"];
29
29
  var TASK_STATES = ["open", "todo", "in_progress", "done", "dismissed"];
30
30
  var CLOSED_STATES = ["done", "dismissed"];
@@ -39,13 +39,7 @@ function closeTask(task, state, by, at, reason) {
39
39
  }
40
40
  __name(closeTask, "closeTask");
41
41
 
42
- // node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.80.1_commander@15.0.0_esbuild@0.28.2_type_4c7167080feb2ba6356a64767981f5fd/node_modules/@wirecat/cli-core/dist/tasks/store.js
43
- function matches(task, filter) {
44
- return (filter.account === void 0 || task.account === filter.account) && (filter.state === void 0 || task.state === filter.state) && (filter.group === void 0 || task.group === filter.group) && (filter.kind === void 0 || task.kind === filter.kind) && (filter.createdBefore === void 0 || task.createdAt < filter.createdBefore);
45
- }
46
- __name(matches, "matches");
47
-
48
- // node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.80.1_commander@15.0.0_esbuild@0.28.2_type_4c7167080feb2ba6356a64767981f5fd/node_modules/@wirecat/cli-core/dist/tasks/priority.js
42
+ // node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/tasks/priority.js
49
43
  var PRIORITY_LABELS = ["low", "medium", "high", "critical"];
50
44
  var MIDDLE = { low: 0.125, medium: 0.375, high: 0.625, critical: 0.875 };
51
45
  var LEGACY_PRIORITY_SCORES = [0.875, 0.625, 0.375, 0.1875, 0.0625];
@@ -74,7 +68,7 @@ var priorityOf = /* @__PURE__ */ __name((value) => {
74
68
  }, "priorityOf");
75
69
  var priorityOption = /* @__PURE__ */ __name((value) => priorityOf(value) ?? "none", "priorityOption");
76
70
 
77
- // node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.80.1_commander@15.0.0_esbuild@0.28.2_type_4c7167080feb2ba6356a64767981f5fd/node_modules/@wirecat/cli-core/dist/tasks/service.js
71
+ // node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/tasks/service.js
78
72
  function createTaskService({ store, now = /* @__PURE__ */ __name(() => /* @__PURE__ */ new Date(), "now"), newId = /* @__PURE__ */ __name(() => crypto.randomUUID(), "newId") }) {
79
73
  async function find(id2) {
80
74
  const task = await store.get(id2);
@@ -134,7 +128,13 @@ function median(values) {
134
128
  }
135
129
  __name(median, "median");
136
130
 
137
- // node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.80.1_commander@15.0.0_esbuild@0.28.2_type_4c7167080feb2ba6356a64767981f5fd/node_modules/@wirecat/cli-core/dist/domain/knowledge.js
131
+ // node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/tasks/store.js
132
+ function matches(task, filter) {
133
+ return (filter.account === void 0 || task.account === filter.account) && (filter.state === void 0 || task.state === filter.state) && (filter.group === void 0 || task.group === filter.group) && (filter.kind === void 0 || task.kind === filter.kind) && (filter.createdBefore === void 0 || task.createdAt < filter.createdBefore);
134
+ }
135
+ __name(matches, "matches");
136
+
137
+ // node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/domain/knowledge.js
138
138
  var FACT_STATUSES = ["proposed", "accepted", "superseded", "reversed", "rejected"];
139
139
  var MEMORY_KINDS = ["summary", "digest", "preference"];
140
140
  var MEMORY_STATUSES = ["proposed", "confirmed", "stale", "superseded"];
@@ -142,28 +142,7 @@ var MEMORY_SCOPES = ["personal", "work"];
142
142
  var WORK_TASK_TYPES = ["bug", "feature", "chore"];
143
143
  var TASK_TYPES = [...WORK_TASK_TYPES, ...TASK_KINDS];
144
144
 
145
- // node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.80.1_commander@15.0.0_esbuild@0.28.2_type_4c7167080feb2ba6356a64767981f5fd/node_modules/@wirecat/cli-core/dist/store/sqlite/link-kinds.js
146
- var LINK_KINDS = [
147
- "links-to",
148
- "blocked-by",
149
- "follow-up-of",
150
- "about",
151
- "member-of",
152
- "labelled",
153
- "answered-by",
154
- "evidence",
155
- "created-from",
156
- "duplicate-of",
157
- "related-to",
158
- "assigned-to",
159
- "attached"
160
- ];
161
- var LINK_ORIGINS = ["file", "owner", "suggested", "message"];
162
- var LINK_SOURCES = [...LINK_ORIGINS, "calendar"];
163
- var RELATION_KINDS = ["member-of", "related-to"];
164
- var linkKind = /* @__PURE__ */ __name((kind) => `'${kind}'`, "linkKind");
165
-
166
- // node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.80.1_commander@15.0.0_esbuild@0.28.2_type_4c7167080feb2ba6356a64767981f5fd/node_modules/@wirecat/cli-core/dist/entities/fields.js
145
+ // node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/entities/fields.js
167
146
  var text = string();
168
147
  var id = pipe(string(), minLength(1));
169
148
  var time = isoTime;
@@ -187,7 +166,7 @@ var author = strictObject({
187
166
  name: nullable(text)
188
167
  });
189
168
 
190
- // node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.80.1_commander@15.0.0_esbuild@0.28.2_type_4c7167080feb2ba6356a64767981f5fd/node_modules/@wirecat/cli-core/dist/entities/knowledge-lists.js
169
+ // node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/entities/knowledge-lists.js
191
170
  var organization = strictObject({
192
171
  id,
193
172
  ref: reference,
@@ -217,6 +196,27 @@ var reminder = strictObject({
217
196
  receipt: nullable(text)
218
197
  });
219
198
 
199
+ // node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/store/sqlite/link-kinds.js
200
+ var LINK_KINDS = [
201
+ "links-to",
202
+ "blocked-by",
203
+ "follow-up-of",
204
+ "about",
205
+ "member-of",
206
+ "labelled",
207
+ "answered-by",
208
+ "evidence",
209
+ "created-from",
210
+ "duplicate-of",
211
+ "related-to",
212
+ "assigned-to",
213
+ "attached"
214
+ ];
215
+ var LINK_ORIGINS = ["file", "owner", "suggested", "message"];
216
+ var LINK_SOURCES = [...LINK_ORIGINS, "calendar"];
217
+ var RELATION_KINDS = ["member-of", "related-to"];
218
+ var linkKind = /* @__PURE__ */ __name((kind) => `'${kind}'`, "linkKind");
219
+
220
220
  export {
221
221
  text,
222
222
  id,
@@ -229,6 +229,7 @@ export {
229
229
  author,
230
230
  TASK_KINDS,
231
231
  TASK_STATES,
232
+ CLOSED_STATES,
232
233
  TASK_ORIGINS,
233
234
  TASK_VERDICTS,
234
235
  isClosedState,
@@ -237,6 +238,7 @@ export {
237
238
  priorityBand,
238
239
  legacyPriority,
239
240
  checkedScore,
241
+ priorityOf,
240
242
  priorityOption,
241
243
  createTaskService,
242
244
  matches,
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.80.1_commander@15.0.0_esbuild@0.28.2_type_4c7167080feb2ba6356a64767981f5fd/node_modules/@wirecat/cli-core/dist/mcp/bot/instructions.js
7
+ // node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/mcp/bot/instructions.js
8
8
  var botInstructions = /* @__PURE__ */ __name(({ command, name, profile, writes, skill }) => [
9
9
  `The owner's ${name} bot "${profile}", through the official Bot API \u2014 not the owner's personal account. What it writes, people see as the bot.`,
10
10
  "Use these tools to read the chats this bot is in, find a message or a person, and \u2014 when the profile allows \u2014 write as the bot.",
@@ -8,12 +8,12 @@ import {
8
8
  ACCESS_SECONDS,
9
9
  REFRESH_SECONDS,
10
10
  readStored
11
- } from "./chunk-JB7OXYAU.js";
11
+ } from "./chunk-RS2BARUU.js";
12
12
  import {
13
13
  __name
14
14
  } from "./chunk-ZVVMGPBJ.js";
15
15
 
16
- // node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.80.1_commander@15.0.0_esbuild@0.28.2_type_4c7167080feb2ba6356a64767981f5fd/node_modules/@wirecat/cli-core/dist/mcp/http/oauth.js
16
+ // node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/mcp/http/oauth.js
17
17
  import { createHash, randomBytes, randomInt, timingSafeEqual } from "node:crypto";
18
18
  import { chmodSync, mkdirSync, renameSync, rmSync, writeFileSync } from "node:fs";
19
19
  import { dirname } from "node:path";
@@ -4,7 +4,7 @@ import {
4
4
  commandPathOf,
5
5
  findCommand,
6
6
  outputOf
7
- } from "./chunk-NEK7LKC6.js";
7
+ } from "./chunk-KUY7LII2.js";
8
8
  import {
9
9
  Command,
10
10
  Help,
@@ -15,19 +15,19 @@ import {
15
15
  environmentOf,
16
16
  metaOf,
17
17
  takesProfile
18
- } from "./chunk-2IZ6GGU2.js";
18
+ } from "./chunk-J7WCSZ2Q.js";
19
19
  import {
20
20
  wrapAnsi
21
21
  } from "./chunk-INFYLWUA.js";
22
22
  import {
23
23
  CliError,
24
24
  writes
25
- } from "./chunk-SBW2Y7AZ.js";
25
+ } from "./chunk-EYYOKT23.js";
26
26
  import {
27
27
  __name
28
28
  } from "./chunk-ZVVMGPBJ.js";
29
29
 
30
- // node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.80.1_commander@15.0.0_esbuild@0.28.2_type_4c7167080feb2ba6356a64767981f5fd/node_modules/@wirecat/cli-core/dist/cli/help/sections.js
30
+ // node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/cli/help/sections.js
31
31
  var SECTIONS = {
32
32
  read: "Read",
33
33
  write: "Write",
@@ -88,7 +88,7 @@ var CORE_SECTIONS = {
88
88
  upgrade: "setup"
89
89
  };
90
90
 
91
- // node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.80.1_commander@15.0.0_esbuild@0.28.2_type_4c7167080feb2ba6356a64767981f5fd/node_modules/@wirecat/cli-core/dist/cli/help/commands-text.js
91
+ // node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/cli/help/commands-text.js
92
92
  var DESCRIPTION = 90;
93
93
  var COLUMN = 52;
94
94
  var short = /* @__PURE__ */ __name((text) => {
@@ -127,7 +127,7 @@ var commandsText = /* @__PURE__ */ __name((root, commands, scope) => {
127
127
  `;
128
128
  }, "commandsText");
129
129
 
130
- // node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.80.1_commander@15.0.0_esbuild@0.28.2_type_4c7167080feb2ba6356a64767981f5fd/node_modules/@wirecat/cli-core/dist/cli/help/command-help.js
130
+ // node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/cli/help/command-help.js
131
131
  var ARGUMENT_KINDS = {
132
132
  chat: "chat",
133
133
  chats: "chat",
@@ -319,7 +319,7 @@ var installCommandHelp = /* @__PURE__ */ __name((program, { profile = true } = {
319
319
  command.addHelpText("after", () => commandHelpText(command));
320
320
  }, "installCommandHelp");
321
321
 
322
- // node_modules/.pnpm/@wirecat+cli-core@0.590.0_@wirecat+cli-base@0.80.1_commander@15.0.0_esbuild@0.28.2_type_4c7167080feb2ba6356a64767981f5fd/node_modules/@wirecat/cli-core/dist/cli/help/first-screen.js
322
+ // node_modules/.pnpm/@wirecat+cli-core@0.601.0_@wirecat+cli-base@0.80.9_commander@15.0.0_esbuild@0.28.2_type_4fddd50439ae4e4f952967ea26554e7b/node_modules/@wirecat/cli-core/dist/cli/help/first-screen.js
323
323
  var WIRECAT_TOOLS = [
324
324
  {
325
325
  command: "tg",