@wirecat/zoom-cli 0.60.1 → 0.61.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 (178) hide show
  1. package/README.md +3 -3
  2. package/dist/answers.d.ts +16 -0
  3. package/dist/answers.d.ts.map +1 -1
  4. package/dist/bin/zm.js +2 -2
  5. package/dist/bundle/{chunk-3R437ICM.js → all-profiles-HZLIU6RZ.js} +11 -7
  6. package/dist/bundle/answer-policy-GRODO2DY.js +96 -0
  7. package/dist/bundle/{anthropic-CSLAACWX.js → anthropic-O2YYPCVK.js} +4 -4
  8. package/dist/bundle/{app-server-RYYXX6QV.js → app-server-YYCANTUE.js} +50 -50
  9. package/dist/bundle/{bun-JVDJVDHL.js → bun-UEFRULAT.js} +2 -2
  10. package/dist/bundle/{bun-sqlite-B5CZHAV4.js → bun-sqlite-VVYKOY7S.js} +3 -3
  11. package/dist/bundle/{chunk-KNAS4VEA.js → chunk-2M2U43IF.js} +2 -2
  12. package/dist/bundle/{chunk-QKSCDALS.js → chunk-35X6G276.js} +1 -1
  13. package/dist/bundle/{chunk-PPHUBORC.js → chunk-3TGR4RDD.js} +32 -34
  14. package/dist/bundle/{chunk-WEUXLXOZ.js → chunk-4XI4PDEH.js} +31 -21
  15. package/dist/bundle/{chunk-W5EUHV3J.js → chunk-4XPIOW5L.js} +1 -1
  16. package/dist/bundle/{chunk-XS72YFPV.js → chunk-5NRBNGR3.js} +2 -2
  17. package/dist/bundle/{chunk-VVKHF6VJ.js → chunk-67WW33JB.js} +49 -24
  18. package/dist/bundle/{chunk-KYUIU5UR.js → chunk-6LHTWR3X.js} +2 -2
  19. package/dist/bundle/{chunk-K6NPOZUP.js → chunk-6RV7KXDF.js} +7 -7
  20. package/dist/bundle/{chunk-46R2JTGO.js → chunk-6SLGIPLT.js} +2 -2
  21. package/dist/bundle/{chunk-IQENQXUJ.js → chunk-77GJITSU.js} +2 -2
  22. package/dist/bundle/{chunk-BO7J5Z3T.js → chunk-7ATLKYBN.js} +17 -17
  23. package/dist/bundle/{chunk-VJBVNDFR.js → chunk-7DMMNCY2.js} +3 -3
  24. package/dist/bundle/chunk-ABCHE4YP.js +217 -0
  25. package/dist/bundle/{chunk-Y3YURIZF.js → chunk-AOSIU5T6.js} +51 -38
  26. package/dist/bundle/{chunk-HYZ545ON.js → chunk-B3PTSX5D.js} +2 -2
  27. package/dist/bundle/{chunk-GEVHI226.js → chunk-B45MFBBF.js} +6 -6
  28. package/dist/bundle/{chunk-6BJQBVMN.js → chunk-BNUNZTOU.js} +25 -25
  29. package/dist/bundle/{chunk-ZDRDCANC.js → chunk-BPQNTYLN.js} +388 -299
  30. package/dist/bundle/{chunk-VLE3FWE3.js → chunk-CMG54Q4X.js} +120 -32
  31. package/dist/bundle/{chunk-RACSKYNX.js → chunk-COU66X3X.js} +7 -5
  32. package/dist/bundle/{chunk-AOZGGGUK.js → chunk-CUSGSXSR.js} +2 -2
  33. package/dist/bundle/{chunk-MFS52LTZ.js → chunk-DLAFGSTN.js} +1 -1
  34. package/dist/bundle/{chunk-V53IB5AU.js → chunk-E4QPLXZT.js} +47 -47
  35. package/dist/bundle/{chunk-EUHQ5D4K.js → chunk-E4T7IJJO.js} +26 -26
  36. package/dist/bundle/{chunk-3LBA63D5.js → chunk-F32GKBMF.js} +22 -5
  37. package/dist/bundle/{chunk-YEZQ7SD7.js → chunk-FAOVUALC.js} +13 -13
  38. package/dist/bundle/{chunk-EF2RCQ3L.js → chunk-FBJC7OCI.js} +1 -1
  39. package/dist/bundle/{chunk-HIAO4MPA.js → chunk-FQ54A7GI.js} +1 -1
  40. package/dist/bundle/{chunk-ES6UWVTM.js → chunk-FXY45HU7.js} +6 -6
  41. package/dist/bundle/{chunk-REC3AZP6.js → chunk-GNHPYQMM.js} +2 -2
  42. package/dist/bundle/{chunk-TY5PBEH2.js → chunk-H5EAHMQN.js} +11 -11
  43. package/dist/bundle/chunk-HF233RN4.js +335 -0
  44. package/dist/bundle/{chunk-RUEPZTNA.js → chunk-HTGBUE2U.js} +2 -2
  45. package/dist/bundle/{chunk-HAUAEGGI.js → chunk-IKZFR645.js} +10 -10
  46. package/dist/bundle/chunk-JKWYXBGK.js +380 -0
  47. package/dist/bundle/{chunk-EN5DBDKW.js → chunk-KGZHRJ7H.js} +4 -4
  48. package/dist/bundle/{chunk-ZK7Y5K63.js → chunk-KPZIQKOF.js} +1 -1
  49. package/dist/bundle/{chunk-PAEBFJUC.js → chunk-KXYURHVE.js} +118 -95
  50. package/dist/bundle/{chunk-IRX2YVAH.js → chunk-KZGHGU2M.js} +4 -4
  51. package/dist/bundle/{chunk-ZXQCA3ZW.js → chunk-KZV5GU7G.js} +8 -8
  52. package/dist/bundle/{chunk-R4SRXI7M.js → chunk-L7VIPVHL.js} +166 -102
  53. package/dist/bundle/{chunk-XLJV3ZOH.js → chunk-LPJ3S6GE.js} +1 -1
  54. package/dist/bundle/{chunk-HBYE4EP2.js → chunk-LX6DO44O.js} +1 -1
  55. package/dist/bundle/{chunk-N27LOY3D.js → chunk-LXOSBFWW.js} +7 -7
  56. package/dist/bundle/{chunk-KXEC5FVT.js → chunk-M3EVVGR6.js} +2 -2
  57. package/dist/bundle/{chunk-YLATWUE7.js → chunk-MBMDF5EL.js} +6 -6
  58. package/dist/bundle/{chunk-AZZPMHP2.js → chunk-MTAVA2LS.js} +2 -2
  59. package/dist/bundle/{chunk-7IDNHVJS.js → chunk-MVRCLMQL.js} +2 -2
  60. package/dist/bundle/{chunk-LVHZQCP4.js → chunk-NVN4O5IC.js} +14 -10
  61. package/dist/bundle/{chunk-4TCQT57W.js → chunk-O3WVOAT7.js} +408 -420
  62. package/dist/bundle/{chunk-UWVNY5CA.js → chunk-OLZE27RS.js} +2 -2
  63. package/dist/bundle/{chunk-XX7KVQIG.js → chunk-OMUX4LSS.js} +4 -4
  64. package/dist/bundle/{chunk-IQSBMAYB.js → chunk-OU46OTTE.js} +3 -3
  65. package/dist/bundle/{chunk-Z4D6M62I.js → chunk-OVVDOVLN.js} +2 -2
  66. package/dist/bundle/{chunk-WB7MQHUI.js → chunk-P2NRA7E5.js} +2 -2
  67. package/dist/bundle/{chunk-PEMLI3T7.js → chunk-PCUPOGKR.js} +6 -4
  68. package/dist/bundle/{chunk-OEEMCNAO.js → chunk-QHT2LZRW.js} +6 -6
  69. package/dist/bundle/{decode-CTQJQYNU.js → chunk-RGOBGHWE.js} +21 -18
  70. package/dist/bundle/{chunk-Q7U627RY.js → chunk-RSXLI5GP.js} +79 -59
  71. package/dist/bundle/{chunk-LPY2ISJK.js → chunk-S726LZCH.js} +6 -6
  72. package/dist/bundle/{chunk-PATM7JGR.js → chunk-SVBM6F4Z.js} +1 -1
  73. package/dist/bundle/{chunk-X7YPTYM4.js → chunk-T7IQMYPW.js} +15 -3
  74. package/dist/bundle/{chunk-WFT2GGFH.js → chunk-TD4Y5LXG.js} +25 -22
  75. package/dist/bundle/{chunk-FZMRHNOP.js → chunk-U4Y2QQ2D.js} +3 -3
  76. package/dist/bundle/{chunk-CGCJ6P3A.js → chunk-UPWHCUVA.js} +617 -380
  77. package/dist/bundle/{chunk-FWJ3Q7NO.js → chunk-UYAKSUT5.js} +5 -5
  78. package/dist/bundle/{chunk-LPDYI5GR.js → chunk-VARX3SBT.js} +1 -1
  79. package/dist/bundle/{chunk-WWNZS7ZY.js → chunk-WVYSOV3C.js} +16 -4
  80. package/dist/bundle/{chunk-VKUS2V4L.js → chunk-XOJGXWTK.js} +8 -8
  81. package/dist/bundle/{chunk-OBUKZ2ZM.js → chunk-XX2PDQ54.js} +31 -211
  82. package/dist/bundle/{chunk-43BX56ZI.js → chunk-XZ4OVTA5.js} +9 -9
  83. package/dist/bundle/{chunk-Z5H47R4G.js → chunk-YESOQEOB.js} +735 -826
  84. package/dist/bundle/{cli-CYKEKT5P.js → cli-O4LAGYXI.js} +60 -54
  85. package/dist/bundle/command-contract-67QKBY6M.js +38 -0
  86. package/dist/bundle/config-ABURZDD2.js +78 -0
  87. package/dist/bundle/decode-WRMZJJCR.js +20 -0
  88. package/dist/bundle/{dist-YLSQKPPY.js → dist-SQK4GIJT.js} +14 -14
  89. package/dist/bundle/{echarts-4OQHS575.js → echarts-3DOOJSQR.js} +2 -2
  90. package/dist/bundle/{embed-P2BKRRJD.js → embed-OYRHTMFI.js} +4 -4
  91. package/dist/bundle/{embedder-HC6ZARP5.js → embedder-ZAYCL22W.js} +7 -7
  92. package/dist/bundle/{first-run-UERFFXBV.js → first-run-QXSPIXOQ.js} +8 -8
  93. package/dist/bundle/first-screen-MD6HWIJW.js +36 -0
  94. package/dist/bundle/{folders-RSLPTZLJ.js → folders-EXQLKXVK.js} +2 -2
  95. package/dist/bundle/{instructions-3QZBKKPF.js → instructions-GFEOB7XJ.js} +1 -1
  96. package/dist/bundle/{main-2T6D77JC.js → main-RADF3CRI.js} +16 -16
  97. package/dist/bundle/{mcp-OQBZXELQ.js → mcp-WSGVVZWI.js} +2 -2
  98. package/dist/bundle/{meetings-ZIDSQZBJ.js → meetings-6BIIT42H.js} +4 -4
  99. package/dist/bundle/{node-R2BLYUSB.js → node-A3B2YRQI.js} +2 -2
  100. package/dist/bundle/{node-sqlite-7CGHAHIS.js → node-sqlite-XRP5FUDY.js} +3 -3
  101. package/dist/bundle/{oauth-UBCYXTWV.js → oauth-YICY4AN4.js} +5 -5
  102. package/dist/bundle/{open-AWUB4Q7Z.js → open-4CNKSQRB.js} +2 -2
  103. package/dist/bundle/openai-YYRO3X7I.js +22 -0
  104. package/dist/bundle/{output-file-SN22HAVL.js → output-file-7BXYV6OL.js} +3 -3
  105. package/dist/bundle/{process-IX5YWGDP.js → process-A45QXKID.js} +1 -1
  106. package/dist/bundle/{program-STYPTNT3.js → program-DTP7BRTW.js} +415 -428
  107. package/dist/bundle/{prompt-MAYUHEGN.js → prompt-5LMKO7SE.js} +3 -3
  108. package/dist/bundle/{recognize-FVTNXRTF.js → recognize-MB6WRGUD.js} +4 -2
  109. package/dist/bundle/{remote-WCPRU73L.js → remote-PD7WMTTS.js} +5 -5
  110. package/dist/bundle/{rerank-6CBLZBCV.js → rerank-7E6GQ5Y6.js} +5 -5
  111. package/dist/bundle/{run-log-G4WZTOBW.js → run-log-TCFK4LEC.js} +53 -53
  112. package/dist/bundle/{chunk-XNUFDYR6.js → serve-JBT2BWHK.js} +8 -6
  113. package/dist/bundle/server-CFIKEPLG.js +66 -0
  114. package/dist/bundle/{chunk-INARC5O7.js → server-H2UPGGBI.js} +43 -10
  115. package/dist/bundle/{services-326Z3TNE.js → services-SJOTKL5V.js} +33 -26
  116. package/dist/bundle/{speech-KSZ7RKM3.js → speech-4SL25GSC.js} +28 -5
  117. package/dist/bundle/{state-EPB3L2JM.js → state-FVMTDZ6B.js} +4 -4
  118. package/dist/bundle/{store-KO242JBK.js → store-DNPKBUVO.js} +13 -13
  119. package/dist/bundle/{store-7WX7SW2R.js → store-TI77SCNL.js} +15 -15
  120. package/dist/bundle/store-connection-GIFWWMNO.js +76 -0
  121. package/dist/bundle/store-maintenance-command-WBKGF2CZ.js +55 -0
  122. package/dist/bundle/{streaming-M6VDKBBH.js → streaming-UHAHGPH5.js} +4 -4
  123. package/dist/bundle/{tokens-BTNXHR7T.js → tokens-Y2MX6JBL.js} +4 -4
  124. package/dist/bundle/zm.js +1 -1
  125. package/dist/commands.d.ts +1 -2
  126. package/dist/commands.d.ts.map +1 -1
  127. package/dist/commands.js +3 -16
  128. package/dist/commands.js.map +1 -1
  129. package/dist/contract-overrides.d.ts +0 -2
  130. package/dist/contract-overrides.d.ts.map +1 -1
  131. package/dist/contract-overrides.js +0 -158
  132. package/dist/contract-overrides.js.map +1 -1
  133. package/dist/program-bindings.d.ts +1 -1
  134. package/dist/program-bindings.d.ts.map +1 -1
  135. package/dist/program-bindings.js +16 -18
  136. package/dist/program-bindings.js.map +1 -1
  137. package/dist/program.d.ts +2 -4
  138. package/dist/program.d.ts.map +1 -1
  139. package/dist/program.js.map +1 -1
  140. package/dist/read-only.d.ts.map +1 -1
  141. package/dist/read-only.js +3 -0
  142. package/dist/read-only.js.map +1 -1
  143. package/dist/run.d.ts.map +1 -1
  144. package/dist/run.js +82 -32
  145. package/dist/run.js.map +1 -1
  146. package/dist/setup-commands.d.ts.map +1 -1
  147. package/dist/setup-commands.js +8 -46
  148. package/dist/setup-commands.js.map +1 -1
  149. package/dist/store-commands.d.ts.map +1 -1
  150. package/dist/store-commands.js +4 -1
  151. package/dist/store-commands.js.map +1 -1
  152. package/dist/version.d.ts +1 -1
  153. package/dist/version.js +1 -1
  154. package/package.json +3 -3
  155. package/dist/bundle/all-profiles-E6KXASLY.js +0 -25
  156. package/dist/bundle/answer-policy-YWCC55NB.js +0 -96
  157. package/dist/bundle/chunk-DBSWVZES.js +0 -48
  158. package/dist/bundle/chunk-WYRYLBST.js +0 -390
  159. package/dist/bundle/chunk-YLBNPI7H.js +0 -2
  160. package/dist/bundle/command-contract-P45QCCXM.js +0 -38
  161. package/dist/bundle/config-JYKTLEA3.js +0 -79
  162. package/dist/bundle/first-screen-VFIS7FX3.js +0 -36
  163. package/dist/bundle/mcp-4VHVUMCR.js +0 -92
  164. package/dist/bundle/mcp-6CLW2IZM.js +0 -189
  165. package/dist/bundle/serve-3IDUVTZL.js +0 -19
  166. package/dist/bundle/server-7GU36TER.js +0 -66
  167. package/dist/bundle/server-VHRS5UAL.js +0 -53
  168. package/dist/bundle/store-connection-K3MNDCQQ.js +0 -76
  169. package/dist/bundle/store-maintenance-command-GJDJYI2U.js +0 -54
  170. package/dist/mcp-command.d.ts +0 -33
  171. package/dist/mcp-command.d.ts.map +0 -1
  172. package/dist/mcp-command.js +0 -143
  173. package/dist/mcp-command.js.map +0 -1
  174. package/dist/mcp.d.ts +0 -30
  175. package/dist/mcp.d.ts.map +0 -1
  176. package/dist/mcp.js +0 -110
  177. package/dist/mcp.js.map +0 -1
  178. /package/dist/bundle/{chunk-O5EHUB2V.js → chunk-62EDJKGP.js} +0 -0
@@ -4,7 +4,7 @@ import {
4
4
  organization,
5
5
  project,
6
6
  reminder
7
- } from "./chunk-WWNZS7ZY.js";
7
+ } from "./chunk-WVYSOV3C.js";
8
8
  import {
9
9
  MIGRATIONS,
10
10
  SnapshotBudget,
@@ -28,31 +28,31 @@ import {
28
28
  tagMemberIds,
29
29
  thingOf,
30
30
  write
31
- } from "./chunk-CGCJ6P3A.js";
31
+ } from "./chunk-UPWHCUVA.js";
32
32
  import {
33
33
  fold
34
- } from "./chunk-ZXQCA3ZW.js";
34
+ } from "./chunk-KZV5GU7G.js";
35
35
  import {
36
36
  filesAccountSql,
37
37
  folderProviderOf,
38
38
  folderProviderSql,
39
39
  isDocumentAccountProvider
40
- } from "./chunk-ES6UWVTM.js";
40
+ } from "./chunk-FXY45HU7.js";
41
41
  import {
42
42
  queryFieldsOf
43
- } from "./chunk-LVHZQCP4.js";
43
+ } from "./chunk-NVN4O5IC.js";
44
44
  import {
45
45
  CliError
46
- } from "./chunk-R4SRXI7M.js";
46
+ } from "./chunk-L7VIPVHL.js";
47
47
  import {
48
48
  __name
49
49
  } from "./chunk-ZVVMGPBJ.js";
50
50
 
51
- // node_modules/.pnpm/@wirecat+cli-core@0.491.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_1193098e908042dfe6f4070222ac0245/node_modules/@wirecat/cli-core/dist/store/document-transfer/index.js
51
+ // node_modules/.pnpm/@wirecat+cli-core@0.503.0_@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_type_e5d4ab9592406842b4a214ba16b749bd/node_modules/@wirecat/cli-core/dist/store/document-transfer/index.js
52
52
  import { realpathSync, statSync } from "node:fs";
53
53
  import { resolve } from "node:path";
54
54
 
55
- // node_modules/.pnpm/@wirecat+cli-core@0.491.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_1193098e908042dfe6f4070222ac0245/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/people.js
55
+ // node_modules/.pnpm/@wirecat+cli-core@0.503.0_@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_type_e5d4ab9592406842b4a214ba16b749bd/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/people.js
56
56
  var planPeople = /* @__PURE__ */ __name((database, snapshot, mappings, bindings, conflicts) => {
57
57
  const creatable = /* @__PURE__ */ new Set();
58
58
  let people = 0, identities = 0;
@@ -115,11 +115,11 @@ var copyPeople = /* @__PURE__ */ __name((database, snapshot, mappings, now) => {
115
115
  }
116
116
  }, "copyPeople");
117
117
 
118
- // node_modules/.pnpm/@wirecat+cli-core@0.491.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_1193098e908042dfe6f4070222ac0245/node_modules/@wirecat/cli-core/dist/store/document-transfer/digest.js
118
+ // node_modules/.pnpm/@wirecat+cli-core@0.503.0_@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_type_e5d4ab9592406842b4a214ba16b749bd/node_modules/@wirecat/cli-core/dist/store/document-transfer/digest.js
119
119
  import { createHash } from "node:crypto";
120
120
  var digest = /* @__PURE__ */ __name((value) => createHash("sha256").update(JSON.stringify(value)).digest("hex"), "digest");
121
121
 
122
- // node_modules/.pnpm/@wirecat+cli-core@0.491.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_1193098e908042dfe6f4070222ac0245/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/collection.js
122
+ // node_modules/.pnpm/@wirecat+cli-core@0.503.0_@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_type_e5d4ab9592406842b4a214ba16b749bd/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/collection.js
123
123
  var documentsKeyOf = /* @__PURE__ */ __name((collection) => {
124
124
  const colon = collection.indexOf(":");
125
125
  const provider = collection.slice(0, colon);
@@ -163,7 +163,7 @@ var currentCollection = /* @__PURE__ */ __name((row) => {
163
163
  };
164
164
  }, "currentCollection");
165
165
 
166
- // node_modules/.pnpm/@wirecat+cli-core@0.491.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_1193098e908042dfe6f4070222ac0245/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/plan.js
166
+ // node_modules/.pnpm/@wirecat+cli-core@0.503.0_@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_type_e5d4ab9592406842b4a214ba16b749bd/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/plan.js
167
167
  var planTransfer = /* @__PURE__ */ __name((database, snapshot, sourceKey, bindings) => {
168
168
  const mappings = /* @__PURE__ */ new Map();
169
169
  const missing = /* @__PURE__ */ new Set(), conflicts = /* @__PURE__ */ new Set();
@@ -330,7 +330,7 @@ var planTransfer = /* @__PURE__ */ __name((database, snapshot, sourceKey, bindin
330
330
  };
331
331
  }, "planTransfer");
332
332
 
333
- // node_modules/.pnpm/@wirecat+cli-core@0.491.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_1193098e908042dfe6f4070222ac0245/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/snapshot.js
333
+ // node_modules/.pnpm/@wirecat+cli-core@0.503.0_@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_type_e5d4ab9592406842b4a214ba16b749bd/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/snapshot.js
334
334
  var TRANSFER_TABLES = { document: "documents", note: "notes", memory: "memories", fact: "facts" };
335
335
  var MAX_ENTITIES = 1e3;
336
336
  var MAX_AUXILIARY = 1e4;
@@ -492,7 +492,7 @@ var transferSnapshot = /* @__PURE__ */ __name((database, collection) => read(dat
492
492
  };
493
493
  }), "transferSnapshot");
494
494
 
495
- // node_modules/.pnpm/@wirecat+cli-core@0.491.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_1193098e908042dfe6f4070222ac0245/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/apply.js
495
+ // node_modules/.pnpm/@wirecat+cli-core@0.503.0_@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_type_e5d4ab9592406842b4a214ba16b749bd/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/apply.js
496
496
  var providerHere = /* @__PURE__ */ __name(({ provider, name, settings }) => {
497
497
  if (provider !== "folder" || String(name ?? "").startsWith("google-drive:"))
498
498
  return provider ?? null;
@@ -664,7 +664,7 @@ var remapEntity = /* @__PURE__ */ __name((database, entity, id, mappings) => {
664
664
  database.prepare(`UPDATE ${TRANSFER_TABLES[entity.kind]} SET ${columns.join(",")} WHERE id=?`).run(...values, id);
665
665
  }, "remapEntity");
666
666
 
667
- // node_modules/.pnpm/@wirecat+cli-core@0.491.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_1193098e908042dfe6f4070222ac0245/node_modules/@wirecat/cli-core/dist/store/document-transfer/index.js
667
+ // node_modules/.pnpm/@wirecat+cli-core@0.503.0_@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_type_e5d4ab9592406842b4a214ba16b749bd/node_modules/@wirecat/cli-core/dist/store/document-transfer/index.js
668
668
  var locations = /* @__PURE__ */ __name((options) => {
669
669
  for (const value of [options.source, options.destination, options.collection])
670
670
  if (typeof value !== "string" || !value.trim())
@@ -760,7 +760,7 @@ var applyDocumentTransfer = /* @__PURE__ */ __name(async (options) => {
760
760
  }
761
761
  }, "applyDocumentTransfer");
762
762
 
763
- // node_modules/.pnpm/@wirecat+cli-core@0.491.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_1193098e908042dfe6f4070222ac0245/node_modules/@wirecat/cli-core/dist/store/knowledge-query.js
763
+ // node_modules/.pnpm/@wirecat+cli-core@0.503.0_@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_type_e5d4ab9592406842b4a214ba16b749bd/node_modules/@wirecat/cli-core/dist/store/knowledge-query.js
764
764
  var ORGANIZATIONS_QUERY = {
765
765
  entity: "organization",
766
766
  backend: "sql",
@@ -795,7 +795,7 @@ var REMINDERS_QUERY = {
795
795
  })
796
796
  };
797
797
 
798
- // node_modules/.pnpm/@wirecat+cli-core@0.491.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_1193098e908042dfe6f4070222ac0245/node_modules/@wirecat/cli-core/dist/store/project-transfer/preview.js
798
+ // node_modules/.pnpm/@wirecat+cli-core@0.503.0_@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_type_e5d4ab9592406842b4a214ba16b749bd/node_modules/@wirecat/cli-core/dist/store/project-transfer/preview.js
799
799
  var previewProjectAnnotationSnapshot = /* @__PURE__ */ __name(async (options) => {
800
800
  if (!options || typeof options !== "object" || Array.isArray(options))
801
801
  throw new CliError("validation_error", "project preview options are required");
@@ -817,7 +817,7 @@ var previewProjectAnnotationSnapshot = /* @__PURE__ */ __name(async (options) =>
817
817
  }
818
818
  }, "previewProjectAnnotationSnapshot");
819
819
 
820
- // node_modules/.pnpm/@wirecat+cli-core@0.491.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_1193098e908042dfe6f4070222ac0245/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot.js
820
+ // node_modules/.pnpm/@wirecat+cli-core@0.503.0_@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_type_e5d4ab9592406842b4a214ba16b749bd/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot.js
821
821
  var snapshotProjectAnnotations = /* @__PURE__ */ __name(async (options) => {
822
822
  if (!options || typeof options !== "object" || Array.isArray(options))
823
823
  throw new CliError("validation_error", "snapshot options are required");
@@ -4,15 +4,15 @@ import {
4
4
  MAX_SECRET_INPUT,
5
5
  bufferedInput,
6
6
  inputPolicy
7
- } from "./chunk-AZZPMHP2.js";
7
+ } from "./chunk-MTAVA2LS.js";
8
8
  import {
9
9
  CliError
10
- } from "./chunk-R4SRXI7M.js";
10
+ } from "./chunk-L7VIPVHL.js";
11
11
  import {
12
12
  __name
13
13
  } from "./chunk-ZVVMGPBJ.js";
14
14
 
15
- // node_modules/.pnpm/@wirecat+cli-core@0.491.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_1193098e908042dfe6f4070222ac0245/node_modules/@wirecat/cli-core/dist/terminal/prompt.js
15
+ // node_modules/.pnpm/@wirecat+cli-core@0.503.0_@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_type_e5d4ab9592406842b4a214ba16b749bd/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 } = {}) => {
@@ -0,0 +1,217 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ openOrdinaryFile
5
+ } from "./chunk-JKWYXBGK.js";
6
+ import {
7
+ CliError
8
+ } from "./chunk-L7VIPVHL.js";
9
+ import {
10
+ __name
11
+ } from "./chunk-ZVVMGPBJ.js";
12
+
13
+ // node_modules/.pnpm/@wirecat+cli-core@0.503.0_@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_type_e5d4ab9592406842b4a214ba16b749bd/node_modules/@wirecat/cli-core/dist/speech/wav.js
14
+ import { createHash } from "node:crypto";
15
+ import { basename, resolve } from "node:path";
16
+ var prepared = /* @__PURE__ */ new WeakMap();
17
+ var checkCancelled = /* @__PURE__ */ __name((signal) => {
18
+ if (!signal?.aborted)
19
+ return;
20
+ if (signal.reason instanceof CliError)
21
+ throw signal.reason;
22
+ const timedOut = signal.reason instanceof Error && signal.reason.name === "TimeoutError";
23
+ throw new CliError(timedOut ? "timeout" : "cancelled", timedOut ? "command timed out" : "command cancelled");
24
+ }, "checkCancelled");
25
+ var invalid = /* @__PURE__ */ __name(() => {
26
+ throw new CliError("validation_error", "local transcription requires PCM16 mono/stereo WAV at 16 or 48 kHz; convert the media locally to PCM WAV first");
27
+ }, "invalid");
28
+ var validate = /* @__PURE__ */ __name((options) => {
29
+ if (!Number.isSafeInteger(options.maxBytes) || options.maxBytes < 1 || options.maxBytes > 4 * 1024 ** 3 || !Number.isSafeInteger(options.maxDurationMs) || options.maxDurationMs < 1 || options.maxDurationMs > 24 * 36e5)
30
+ throw new CliError("validation_error", "audio byte and duration budgets must be positive bounded integers");
31
+ checkCancelled(options.signal);
32
+ }, "validate");
33
+ var exact = /* @__PURE__ */ __name(async (file, offset, size, signal) => {
34
+ const bytes = Buffer.alloc(size);
35
+ let read = 0;
36
+ while (read < size) {
37
+ checkCancelled(signal);
38
+ const result = await file.read(bytes, read, size - read, offset + read);
39
+ if (!result.bytesRead)
40
+ throw new CliError("validation_error", "WAV changed or was truncated while reading");
41
+ read += result.bytesRead;
42
+ }
43
+ return bytes;
44
+ }, "exact");
45
+ var layoutOf = /* @__PURE__ */ __name(async (file, size, options) => {
46
+ if (size < 44 || size > options.maxBytes)
47
+ invalid();
48
+ const header = await exact(file, 0, 12, options.signal);
49
+ if (header.toString("ascii", 0, 4) !== "RIFF" || header.toString("ascii", 8, 12) !== "WAVE" || header.readUInt32LE(4) + 8 !== size)
50
+ invalid();
51
+ let format;
52
+ let data;
53
+ let at = 12;
54
+ let chunks = 0;
55
+ while (at < size) {
56
+ checkCancelled(options.signal);
57
+ if (++chunks > 1024 || size - at < 8)
58
+ invalid();
59
+ const chunk = await exact(file, at, 8, options.signal);
60
+ const kind = chunk.toString("ascii", 0, 4);
61
+ const length = chunk.readUInt32LE(4);
62
+ const start = at + 8;
63
+ const next = start + length + length % 2;
64
+ if (next > size)
65
+ invalid();
66
+ if (kind === "fmt ") {
67
+ if (format || ![16, 18].includes(length))
68
+ invalid();
69
+ const bytes = await exact(file, start, length, options.signal);
70
+ const channels = bytes.readUInt16LE(2);
71
+ const sampleRate = bytes.readUInt32LE(4);
72
+ if (bytes.readUInt16LE(0) !== 1 || ![1, 2].includes(channels) || ![16e3, 48e3].includes(sampleRate) || bytes.readUInt16LE(14) !== 16 || bytes.readUInt16LE(12) !== channels * 2 || bytes.readUInt32LE(8) !== sampleRate * channels * 2 || length === 18 && bytes.readUInt16LE(16) !== 0)
73
+ invalid();
74
+ format = { sampleRate, channels };
75
+ } else if (kind === "data") {
76
+ if (data || !length)
77
+ invalid();
78
+ data = { offset: start, size: length };
79
+ }
80
+ at = next;
81
+ }
82
+ if (!format || !data || data.size % (format.channels * 2) !== 0)
83
+ return invalid();
84
+ const frames = data.size / (format.channels * 2);
85
+ if (Math.ceil(frames * 1e3 / format.sampleRate) > options.maxDurationMs)
86
+ throw new CliError("validation_error", "WAV exceeds the configured duration limit");
87
+ return { ...format, dataOffset: data.offset, dataSize: data.size, frames };
88
+ }, "layoutOf");
89
+ var hashRange = /* @__PURE__ */ __name(async (file, hash, start, end, signal) => {
90
+ let at = start;
91
+ while (at < end) {
92
+ const bytes = await exact(file, at, Math.min(65536, end - at), signal);
93
+ hash.update(bytes);
94
+ at += bytes.length;
95
+ }
96
+ }, "hashRange");
97
+ var hashFile = /* @__PURE__ */ __name(async (file, size, signal) => {
98
+ const hash = createHash("sha256");
99
+ await hashRange(file, hash, 0, size, signal);
100
+ if ((await file.stat()).size !== size)
101
+ throw new CliError("validation_error", "WAV changed while verifying its content");
102
+ return hash.digest("hex");
103
+ }, "hashFile");
104
+ var preflightWavAudio = /* @__PURE__ */ __name(async (path, input) => {
105
+ const options = { ...input };
106
+ validate(options);
107
+ if (typeof path !== "string" || !path.trim() || /\0/.test(path))
108
+ throw new CliError("validation_error", "local audio file is required");
109
+ const absolute = resolve(path);
110
+ const file = await openOrdinaryFile(absolute);
111
+ try {
112
+ const stat = await file.stat({ bigint: true });
113
+ const size = Number(stat.size);
114
+ const layout = await layoutOf(file, size, options);
115
+ const contentHash = await hashFile(file, size, options.signal);
116
+ const after = await file.stat({ bigint: true });
117
+ if (stat.size !== after.size || stat.mtimeNs !== after.mtimeNs)
118
+ throw new CliError("validation_error", "WAV changed while preparing the transcription");
119
+ const media = Object.freeze({
120
+ id: createHash("sha256").update(basename(absolute)).digest("hex"),
121
+ contentHash,
122
+ size,
123
+ durationMs: Math.ceil(layout.frames * 1e3 / layout.sampleRate),
124
+ format: "wav",
125
+ sampleRate: layout.sampleRate,
126
+ channels: layout.channels
127
+ });
128
+ const plan = Object.freeze({ media });
129
+ prepared.set(plan, { path: absolute, dev: stat.dev, ino: stat.ino, layout });
130
+ return plan;
131
+ } finally {
132
+ await file.close();
133
+ }
134
+ }, "preflightWavAudio");
135
+ var openWavAudio = /* @__PURE__ */ __name(async (plan, input) => {
136
+ const options = { ...input };
137
+ validate(options);
138
+ const known = prepared.get(plan);
139
+ if (!known)
140
+ throw new CliError("validation_error", "audio plan was not prepared by this adapter");
141
+ const file = await openOrdinaryFile(known.path);
142
+ try {
143
+ const stat = await file.stat({ bigint: true });
144
+ if (stat.dev !== known.dev || stat.ino !== known.ino || Number(stat.size) !== plan.media.size)
145
+ throw new CliError("validation_error", "WAV identity changed before transcription");
146
+ const layout = await layoutOf(file, plan.media.size, options);
147
+ if (JSON.stringify(layout) !== JSON.stringify(known.layout) || await hashFile(file, plan.media.size, options.signal) !== plan.media.contentHash)
148
+ throw new CliError("validation_error", "WAV content changed before transcription");
149
+ let closed = false;
150
+ let consumed = false;
151
+ return {
152
+ async *windows() {
153
+ if (closed || consumed)
154
+ throw new CliError("configuration_error", "audio source can be consumed once before closing");
155
+ consumed = true;
156
+ const hash = createHash("sha256");
157
+ await hashRange(file, hash, 0, layout.dataOffset, options.signal);
158
+ const step = layout.sampleRate / 16e3;
159
+ for (let frame = 0; frame < layout.frames; ) {
160
+ checkCancelled(options.signal);
161
+ const count = Math.min(layout.sampleRate * 30, layout.frames - frame);
162
+ const bytes = await exact(file, layout.dataOffset + frame * layout.channels * 2, count * layout.channels * 2, options.signal);
163
+ hash.update(bytes);
164
+ const samples = new Float32Array(Math.floor(count / step));
165
+ for (let index = 0; index < samples.length; index++) {
166
+ let sum = 0;
167
+ for (let offset = 0; offset < step; offset++)
168
+ for (let channel = 0; channel < layout.channels; channel++)
169
+ sum += bytes.readInt16LE(((index * step + offset) * layout.channels + channel) * 2);
170
+ samples[index] = sum / (32768 * step * layout.channels);
171
+ }
172
+ const startMs = Math.floor(frame * 1e3 / layout.sampleRate);
173
+ frame += count;
174
+ if (samples.length)
175
+ yield { startMs, endMs: Math.ceil(frame * 1e3 / layout.sampleRate), samples };
176
+ }
177
+ await hashRange(file, hash, layout.dataOffset + layout.dataSize, plan.media.size, options.signal);
178
+ if (hash.digest("hex") !== plan.media.contentHash || (await file.stat()).size !== plan.media.size)
179
+ throw new CliError("validation_error", "WAV changed during recognition; no transcript may be stored");
180
+ },
181
+ async close() {
182
+ if (!closed) {
183
+ closed = true;
184
+ await file.close();
185
+ }
186
+ }
187
+ };
188
+ } catch (error) {
189
+ await file.close();
190
+ throw error;
191
+ }
192
+ }, "openWavAudio");
193
+ var encodeWav = /* @__PURE__ */ __name((samples, sampleRate = 16e3) => {
194
+ const bytes = Buffer.alloc(44 + samples.length * 2);
195
+ bytes.write("RIFF", 0, "ascii");
196
+ bytes.writeUInt32LE(bytes.length - 8, 4);
197
+ bytes.write("WAVEfmt ", 8, "ascii");
198
+ bytes.writeUInt32LE(16, 16);
199
+ bytes.writeUInt16LE(1, 20);
200
+ bytes.writeUInt16LE(1, 22);
201
+ bytes.writeUInt32LE(sampleRate, 24);
202
+ bytes.writeUInt32LE(sampleRate * 2, 28);
203
+ bytes.writeUInt16LE(2, 32);
204
+ bytes.writeUInt16LE(16, 34);
205
+ bytes.write("data", 36, "ascii");
206
+ bytes.writeUInt32LE(samples.length * 2, 40);
207
+ samples.forEach((sample, index) => {
208
+ bytes.writeInt16LE(Math.round(Math.max(-1, Math.min(1, sample || 0)) * 32767), 44 + index * 2);
209
+ });
210
+ return new Uint8Array(bytes.buffer, bytes.byteOffset, bytes.length);
211
+ }, "encodeWav");
212
+
213
+ export {
214
+ preflightWavAudio,
215
+ openWavAudio,
216
+ encodeWav
217
+ };