@wirecat/zoom-cli 0.66.0 → 0.68.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.
- package/README.md +2 -1
- package/constants.json +7 -0
- package/dist/answer-entities.d.ts +18 -0
- package/dist/answer-entities.d.ts.map +1 -1
- package/dist/answer-entities.js +12 -0
- package/dist/answer-entities.js.map +1 -1
- package/dist/answer-policy.d.ts.map +1 -1
- package/dist/answer-policy.js +2 -1
- package/dist/answer-policy.js.map +1 -1
- package/dist/answers.d.ts +4 -4
- package/dist/bin/main.js +3 -2
- package/dist/bin/main.js.map +1 -1
- package/dist/bin/zm.js +2 -2
- package/dist/bundle/{all-profiles-D5CFH2OK.js → all-profiles-R66UM3HM.js} +12 -11
- package/dist/bundle/answer-policy-UCGUO53A.js +104 -0
- package/dist/bundle/{anthropic-K2E2JS4S.js → anthropic-4ZI2BPLG.js} +7 -7
- package/dist/bundle/{app-server-TVXDG6HZ.js → app-server-64O5IQI5.js} +61 -57
- package/dist/bundle/{bun-O4WHGL2F.js → bun-HUHQD76Z.js} +2 -2
- package/dist/bundle/{bun-sqlite-HGBEHQI3.js → bun-sqlite-VOVHPTIF.js} +6 -6
- package/dist/bundle/{chunk-N6JMJN5A.js → chunk-2OSBCYJT.js} +39 -26
- package/dist/bundle/{chunk-7JMBEPW2.js → chunk-2T6XHWDX.js} +2 -2
- package/dist/bundle/chunk-32FPA7P2.js +35 -0
- package/dist/bundle/{chunk-NO24PJNW.js → chunk-355PHJYX.js} +1 -1
- package/dist/bundle/{chunk-NMQUCHTX.js → chunk-3BRV2YU2.js} +3 -3
- package/dist/bundle/{chunk-GNGBG5BT.js → chunk-474WF55M.js} +95 -48
- package/dist/bundle/{chunk-O5FKJV3T.js → chunk-4TLPOY22.js} +12 -12
- package/dist/bundle/{chunk-CR4CXOLX.js → chunk-4YFJYSSK.js} +205 -59
- package/dist/bundle/chunk-5JAYUG3X.js +261 -0
- package/dist/bundle/{chunk-5HPALDUO.js → chunk-65T3PU75.js} +3 -2
- package/dist/bundle/{chunk-QAPU2JNO.js → chunk-6CJ7NHIP.js} +13 -13
- package/dist/bundle/{chunk-LN2S3RA3.js → chunk-6T3P226D.js} +4 -4
- package/dist/bundle/{chunk-P3XVLHIQ.js → chunk-6TJ62LZQ.js} +22 -14
- package/dist/bundle/{chunk-FWFFQV4D.js → chunk-6XO7RTJY.js} +129 -9
- package/dist/bundle/{chunk-K5CIN4JP.js → chunk-77I67HWF.js} +8 -8
- package/dist/bundle/{chunk-3B7L2UX4.js → chunk-77KFLU5F.js} +3 -3
- package/dist/bundle/{chunk-2YLNUZ3T.js → chunk-7AUP2WT3.js} +3 -3
- package/dist/bundle/{chunk-7PF56S6U.js → chunk-7DUYFITC.js} +25 -23
- package/dist/bundle/{chunk-ZKTXUDSR.js → chunk-7QNJICKZ.js} +30 -26
- package/dist/bundle/{chunk-XWDSEJWP.js → chunk-A63ZFOQJ.js} +18 -4
- package/dist/bundle/{chunk-A2SCXNA7.js → chunk-AJ7CMUGD.js} +1396 -326
- package/dist/bundle/{chunk-Z6U3MEGJ.js → chunk-AVEIQMHZ.js} +4 -2
- package/dist/bundle/chunk-AYEVBAGO.js +178 -0
- package/dist/bundle/{chunk-SU4WPBQE.js → chunk-B6JMVB6R.js} +22 -23
- package/dist/bundle/{chunk-YLEQN6PB.js → chunk-BL36NSV5.js} +3 -3
- package/dist/bundle/{chunk-RMKHYUHK.js → chunk-BOAMDYLY.js} +4 -4
- package/dist/bundle/chunk-BSM43OMN.js +31 -0
- package/dist/bundle/{chunk-67RNZGAG.js → chunk-DGNPJGD3.js} +16 -10
- package/dist/bundle/{chunk-Y3EIK4XW.js → chunk-DVA6MQWK.js} +1 -1
- package/dist/bundle/{chunk-AU4JHT3R.js → chunk-DWSUSWAX.js} +98 -13
- package/dist/bundle/{chunk-H5ZVZAOD.js → chunk-EH5QGQFR.js} +3 -3
- package/dist/bundle/chunk-EJDV5IIF.js +93 -0
- package/dist/bundle/{chunk-3WTKZ2ZS.js → chunk-EWIBLDQQ.js} +8 -8
- package/dist/bundle/{chunk-GHAPWKG2.js → chunk-EZRPSZJS.js} +3 -3
- package/dist/bundle/{chunk-QJHRYUMJ.js → chunk-FBLUKCIR.js} +1 -1
- package/dist/bundle/{chunk-S6S3KVJI.js → chunk-FEM2JQN2.js} +2 -1
- package/dist/bundle/{chunk-P2G4KGTR.js → chunk-FMQS7HCC.js} +12 -12
- package/dist/bundle/{chunk-ZNFPDTQM.js → chunk-FNQASORM.js} +2 -2
- package/dist/bundle/{chunk-GKXFL35E.js → chunk-GOXDBCDM.js} +728 -130
- package/dist/bundle/{chunk-U3ZUT557.js → chunk-HXOAPH47.js} +1 -1
- package/dist/bundle/{chunk-QV5ZGRK3.js → chunk-JO4YADNV.js} +7 -7
- package/dist/bundle/{chunk-5A26IBAR.js → chunk-JRCYFCPL.js} +30 -28
- package/dist/bundle/{chunk-ZTL7ANSG.js → chunk-K67V24AT.js} +5 -5
- package/dist/bundle/{chunk-BXSAROQP.js → chunk-KAPJQGHE.js} +2 -2
- package/dist/bundle/{chunk-TFDVFD4N.js → chunk-KNE6VFHZ.js} +97 -38
- package/dist/bundle/{chunk-AZ7ICKIA.js → chunk-KUB2U5NT.js} +6 -6
- package/dist/bundle/{chunk-GI6QVSCW.js → chunk-L4WVLRXM.js} +4 -4
- package/dist/bundle/{chunk-756RS4PH.js → chunk-LBOSTBAY.js} +2541 -1355
- package/dist/bundle/{chunk-62GOOZO3.js → chunk-LV7QRR5S.js} +6 -6
- package/dist/bundle/{chunk-J4EZL6HY.js → chunk-LYWUG43B.js} +33 -33
- package/dist/bundle/{chunk-N67BLTBV.js → chunk-NRRI37NJ.js} +28 -9
- package/dist/bundle/{chunk-N5JRRBEG.js → chunk-NUJMJQXV.js} +281 -10
- package/dist/bundle/{chunk-UYV2JGLQ.js → chunk-OE7EIP5L.js} +1 -1
- package/dist/bundle/{chunk-U4RVOSX3.js → chunk-P2TISY3R.js} +1 -1
- package/dist/bundle/{chunk-ILHTNOIV.js → chunk-P3ASN72F.js} +1 -1
- package/dist/bundle/{chunk-UOIXBEFR.js → chunk-PIHBD3YS.js} +16 -6
- package/dist/bundle/{chunk-BLT3LR3U.js → chunk-PUTGTW6W.js} +4 -2
- package/dist/bundle/{chunk-TUEEXECZ.js → chunk-QXTREL2M.js} +3 -3
- package/dist/bundle/{chunk-2VPHQFO5.js → chunk-R7LFGEDE.js} +2 -2
- package/dist/bundle/{chunk-IDWHJ35K.js → chunk-RGJ7OWHU.js} +4 -4
- package/dist/bundle/{chunk-3Y2F65AY.js → chunk-RP3U3J53.js} +10 -89
- package/dist/bundle/{chunk-JX3V35A5.js → chunk-RRYUD2EF.js} +3 -3
- package/dist/bundle/{chunk-XFUID5NY.js → chunk-SRP6SFFD.js} +2 -2
- package/dist/bundle/{chunk-7SQJCKR6.js → chunk-SSPSNSC5.js} +1 -1
- package/dist/bundle/{chunk-Q47C3QZW.js → chunk-TDGZMC6K.js} +510 -318
- package/dist/bundle/{chunk-EXXM4RNI.js → chunk-TN3FH2GQ.js} +11 -11
- package/dist/bundle/chunk-TUNQ6NE2.js +64 -0
- package/dist/bundle/{chunk-CAW6IMFZ.js → chunk-TZUKDM72.js} +72 -20
- package/dist/bundle/{chunk-S4GDDO5S.js → chunk-UDJTRFRV.js} +1 -1
- package/dist/bundle/{chunk-5GD2XZ6X.js → chunk-US5C3WAY.js} +63 -53
- package/dist/bundle/{chunk-7KCTPGOF.js → chunk-UU5PLDRA.js} +2 -2
- package/dist/bundle/{chunk-6TIKPRVQ.js → chunk-VLD7Y4SY.js} +7 -7
- package/dist/bundle/{chunk-PQLBPYJR.js → chunk-VW6BF6M7.js} +1 -1
- package/dist/bundle/chunk-W42BJ65M.js +37 -0
- package/dist/bundle/{chunk-KDKFGQWG.js → chunk-Y5LP5SHV.js} +15 -12
- package/dist/bundle/{chunk-TMVKZMDO.js → chunk-YJY3W2ZT.js} +232 -88
- package/dist/bundle/{chunk-6GSJLNP4.js → chunk-YOAEZSDG.js} +2 -2
- package/dist/bundle/{chunk-IKQ73INC.js → chunk-YQRNFG2E.js} +15849 -1674
- package/dist/bundle/{chunk-RO44LANT.js → chunk-YTF2WPV4.js} +1880 -778
- package/dist/bundle/{chunk-CZ4KLUJG.js → chunk-ZRD3NDOX.js} +2 -2
- package/dist/bundle/{cli-HWQIL2AC.js → cli-VQJ7ZRYR.js} +124 -69
- package/dist/bundle/command-contract-JPUWWYIV.js +41 -0
- package/dist/bundle/config-YGLLR77A.js +90 -0
- package/dist/bundle/{decode-XPAPPUGE.js → decode-L3ENO2XH.js} +6 -6
- package/dist/bundle/{dispatch-AKVJGP2S.js → dispatch-5MGDLOK4.js} +9 -9
- package/dist/bundle/{dist-LDIUQBM7.js → dist-WQLS7U23.js} +66 -17
- package/dist/bundle/{echarts-FMACRZQC.js → echarts-5LLJ6JXC.js} +2 -2
- package/dist/bundle/{embed-LK45GRQ7.js → embed-37MYTCU7.js} +7 -7
- package/dist/bundle/{embedder-QPBC5XBY.js → embedder-GNGHVJAO.js} +10 -10
- package/dist/bundle/{failure-7OULAOWQ.js → failure-CR64C4XA.js} +3 -3
- package/dist/bundle/{first-run-J5FG773Q.js → first-run-NR5JKYP3.js} +12 -12
- package/dist/bundle/first-screen-RCR7ATO2.js +39 -0
- package/dist/bundle/{folders-RHPUVMDI.js → folders-VU4IN35Y.js} +5 -5
- package/dist/bundle/{instructions-E5FXYCWF.js → instructions-P72XX4AK.js} +1 -1
- package/dist/bundle/{main-FJHE5YHU.js → main-QYFCYSTW.js} +23 -24
- package/dist/bundle/{mcp-MNI62HHE.js → mcp-M4QN2E7R.js} +2 -2
- package/dist/bundle/{meetings-MYIDGYGW.js → meetings-66UQINKI.js} +37 -7
- package/dist/bundle/{node-4SNKUPXT.js → node-ZB4RNICS.js} +2 -2
- package/dist/bundle/{node-sqlite-SYZUTVPC.js → node-sqlite-XPRKBDF3.js} +7 -7
- package/dist/bundle/{oauth-QPS5VTN6.js → oauth-WJRDUU5J.js} +8 -8
- package/dist/bundle/{open-OVCASRSJ.js → open-S2YSIEOW.js} +6 -6
- package/dist/bundle/openai-CRNZFNZD.js +25 -0
- package/dist/bundle/{output-file-K5JEL33Z.js → output-file-6COFGPUL.js} +6 -6
- package/dist/bundle/{process-HQZOTT6U.js → process-XNN4WG6N.js} +1 -1
- package/dist/bundle/{program-A546WC4F.js → program-BRPJKRCX.js} +181 -205
- package/dist/bundle/{prompt-CYBKP7S5.js → prompt-7RQOL25I.js} +6 -6
- package/dist/bundle/{recognize-3H3YDCFI.js → recognize-N5WADGQB.js} +5 -5
- package/dist/bundle/{remote-VAYVTJBS.js → remote-WHYV35IF.js} +8 -8
- package/dist/bundle/{rerank-XA4GA5PS.js → rerank-FBMZVWSH.js} +8 -8
- package/dist/bundle/{run-log-XAFHMI3F.js → run-log-TOCHREH2.js} +59 -57
- package/dist/bundle/{serve-KGHEDUHB.js → serve-4BABX4WS.js} +10 -10
- package/dist/bundle/{server-ZYTSMDTP.js → server-CDVI6LOB.js} +47 -46
- package/dist/bundle/server-XOFQKFVO.js +72 -0
- package/dist/bundle/{services-ZHMZC2OQ.js → services-PIY33I7R.js} +59 -32
- package/dist/bundle/{speech-7CJEFKM3.js → speech-LS5Q4FL2.js} +14 -14
- package/dist/bundle/{state-U6KSYVOH.js → state-YUX5R2R7.js} +7 -7
- package/dist/bundle/{store-DJE3LAEG.js → store-BD7HAXAA.js} +22 -17
- package/dist/bundle/{store-WS4CQGYU.js → store-ERMGBF2B.js} +59 -30
- package/dist/bundle/store-connection-JBR6CMTJ.js +83 -0
- package/dist/bundle/store-maintenance-command-I5DUSO2C.js +62 -0
- package/dist/bundle/{streaming-QMHH7L6N.js → streaming-O53PIORL.js} +7 -7
- package/dist/bundle/{tokens-PWQ56OXO.js → tokens-QKNEP2GJ.js} +7 -7
- package/dist/bundle/zm.js +9 -10
- package/dist/bundle/zoom-app-XJXZ4ZBX.js +41 -0
- package/dist/commands.d.ts.map +1 -1
- package/dist/commands.js +1 -0
- package/dist/commands.js.map +1 -1
- package/dist/config.d.ts +9 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +48 -10
- package/dist/config.js.map +1 -1
- package/dist/identity.d.ts +1 -0
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +11 -0
- package/dist/identity.js.map +1 -1
- package/dist/meeting-source.d.ts.map +1 -1
- package/dist/meeting-source.js +2 -1
- package/dist/meeting-source.js.map +1 -1
- package/dist/meeting-stats-commands.d.ts +4 -2
- package/dist/meeting-stats-commands.d.ts.map +1 -1
- package/dist/meeting-stats-commands.js +27 -2
- package/dist/meeting-stats-commands.js.map +1 -1
- package/dist/program-bindings.d.ts.map +1 -1
- package/dist/program-bindings.js +10 -4
- package/dist/program-bindings.js.map +1 -1
- package/dist/recording-schedule-setup.d.ts.map +1 -1
- package/dist/recording-schedule-setup.js +5 -5
- package/dist/recording-schedule-setup.js.map +1 -1
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +2 -6
- package/dist/run.js.map +1 -1
- package/dist/setup-commands.d.ts +7 -1
- package/dist/setup-commands.d.ts.map +1 -1
- package/dist/setup-commands.js +45 -8
- package/dist/setup-commands.js.map +1 -1
- package/dist/store-commands.d.ts.map +1 -1
- package/dist/store-commands.js +6 -0
- package/dist/store-commands.js.map +1 -1
- package/dist/store-connection.d.ts +2 -1
- package/dist/store-connection.d.ts.map +1 -1
- package/dist/store-connection.js +4 -0
- package/dist/store-connection.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/watch-service.d.ts +1 -1
- package/dist/watch-service.d.ts.map +1 -1
- package/dist/watch-service.js +5 -3
- package/dist/watch-service.js.map +1 -1
- package/dist/zoom-app.d.ts +49 -0
- package/dist/zoom-app.d.ts.map +1 -0
- package/dist/zoom-app.js +83 -0
- package/dist/zoom-app.js.map +1 -0
- package/package.json +4 -3
- package/skills/zoom-cli/SKILL.md +4 -1
- package/dist/bundle/answer-policy-YAYMKRRD.js +0 -101
- package/dist/bundle/chunk-2T5BOLBS.js +0 -132
- package/dist/bundle/chunk-HKQWV3KT.js +0 -31
- package/dist/bundle/chunk-L7IK4FOA.js +0 -18
- package/dist/bundle/chunk-P2SYZNM4.js +0 -19
- package/dist/bundle/chunk-TN7K66PU.js +0 -9
- package/dist/bundle/command-contract-CQFJXWX6.js +0 -40
- package/dist/bundle/config-R2Y6ZVQS.js +0 -83
- package/dist/bundle/first-screen-MULOBUHN.js +0 -38
- package/dist/bundle/openai-VEVT7D7L.js +0 -25
- package/dist/bundle/server-IDNSJXF3.js +0 -71
- package/dist/bundle/store-connection-T5WGOOPH.js +0 -81
- package/dist/bundle/store-maintenance-command-5CBQCEQQ.js +0 -61
- /package/dist/bundle/{chunk-NUN6OGOV.js → chunk-VOXIGICJ.js} +0 -0
|
@@ -1,20 +1,27 @@
|
|
|
1
1
|
import { createRequire as __bundleRequire } from "node:module";
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
moneyLabel
|
|
5
|
+
} from "./chunk-AYEVBAGO.js";
|
|
6
|
+
import {
|
|
7
|
+
holdsCredential,
|
|
8
|
+
secretNamed
|
|
9
|
+
} from "./chunk-EJDV5IIF.js";
|
|
3
10
|
import {
|
|
4
11
|
formatMeetingReference,
|
|
5
12
|
parseMeetingReference
|
|
6
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-TDGZMC6K.js";
|
|
7
14
|
import {
|
|
8
15
|
CliError
|
|
9
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-FEM2JQN2.js";
|
|
10
17
|
import {
|
|
11
18
|
singleLine
|
|
12
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-OE7EIP5L.js";
|
|
13
20
|
import {
|
|
14
21
|
__name
|
|
15
22
|
} from "./chunk-ZVVMGPBJ.js";
|
|
16
23
|
|
|
17
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/domain/locator.js
|
|
18
25
|
var SCHEME = "msg:";
|
|
19
26
|
var formatLocator = /* @__PURE__ */ __name(({ provider, account, chat, message }) => SCHEME + [provider, account, chat, message].map(encodeURIComponent).join("/"), "formatLocator");
|
|
20
27
|
var isLocator = /* @__PURE__ */ __name((reference) => reference.trim().startsWith(SCHEME), "isLocator");
|
|
@@ -28,7 +35,7 @@ var parseLocator = /* @__PURE__ */ __name((reference) => {
|
|
|
28
35
|
return { provider, account, chat, message };
|
|
29
36
|
}, "parseLocator");
|
|
30
37
|
|
|
31
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/domain/references.js
|
|
32
39
|
var SIMPLE_REFERENCES = [
|
|
33
40
|
"note",
|
|
34
41
|
"document",
|
|
@@ -40,6 +47,12 @@ var SIMPLE_REFERENCES = [
|
|
|
40
47
|
"fact",
|
|
41
48
|
"bot",
|
|
42
49
|
"event",
|
|
50
|
+
"invoice",
|
|
51
|
+
"payment",
|
|
52
|
+
"order",
|
|
53
|
+
"deal",
|
|
54
|
+
"lead",
|
|
55
|
+
"pipeline",
|
|
43
56
|
"entity"
|
|
44
57
|
];
|
|
45
58
|
var malformed = /* @__PURE__ */ __name((text, shape) => new CliError("validation_error", `"${singleLine(text)}" is not a reference \u2014 expected ${shape}`, {
|
|
@@ -173,9 +186,10 @@ var looksLikeReference = /* @__PURE__ */ __name((text) => {
|
|
|
173
186
|
return match !== null && byPrefix.has(match[1]);
|
|
174
187
|
}, "looksLikeReference");
|
|
175
188
|
|
|
176
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
177
|
-
var KINDS = ["messages", "mail", "notes", "documents", "meetings", "events"];
|
|
189
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/domain/providers.js
|
|
190
|
+
var KINDS = ["messages", "mail", "notes", "documents", "meetings", "events", "crm"];
|
|
178
191
|
var MESSENGER_OPENS = { chat: "messages list", message: "messages show", contact: "contacts show" };
|
|
192
|
+
var CRM_OPENS = { deal: "deals show", lead: "leads show", pipeline: "pipelines show" };
|
|
179
193
|
var PROVIDERS = [
|
|
180
194
|
{ name: "telegram", kind: "messages", aliases: ["tg"], command: "tg", opens: MESSENGER_OPENS },
|
|
181
195
|
{ name: "telegram-bot", kind: "messages", aliases: ["tg-bot"] },
|
|
@@ -292,7 +306,7 @@ var providerNamed = /* @__PURE__ */ __name((word) => {
|
|
|
292
306
|
var kindIn = /* @__PURE__ */ __name((provider) => isFolderProvider(provider) ? "notes" : registry.find(({ name }) => name === provider)?.kind, "kindIn");
|
|
293
307
|
var kindOf = /* @__PURE__ */ __name((provider) => kindIn(provider) ?? "messages", "kindOf");
|
|
294
308
|
|
|
295
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
309
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/domain/counters.js
|
|
296
310
|
var COUNTER_FIELDS = ["views", "reactions", "comments"];
|
|
297
311
|
var validCounter = /* @__PURE__ */ __name((value) => typeof value === "number" && Number.isFinite(value) && value >= 0, "validCounter");
|
|
298
312
|
var counterValue = /* @__PURE__ */ __name((message, field) => {
|
|
@@ -329,7 +343,17 @@ var counterFreshness = /* @__PURE__ */ __name((states) => {
|
|
|
329
343
|
return states.some((one) => one.freshness === "stale") ? "stale" : "fresh";
|
|
330
344
|
}, "counterFreshness");
|
|
331
345
|
|
|
332
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
346
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/domain/deals.js
|
|
347
|
+
var DEAL_KINDS = ["deal", "lead"];
|
|
348
|
+
var DEAL_STATUSES = ["open", "won", "lost"];
|
|
349
|
+
var STAGE_OUTCOMES = DEAL_STATUSES;
|
|
350
|
+
var DEAL_ROLES = ["owner", "contact", "decision-maker"];
|
|
351
|
+
var dealLine = /* @__PURE__ */ __name((deal) => {
|
|
352
|
+
const money = deal.amount === null || deal.currency === null ? "" : `, ${moneyLabel(deal.amount, deal.currency)}`;
|
|
353
|
+
return `${deal.title} \xB7 ${deal.stage}${money}${deal.status === "open" ? "" : ` (${deal.status})`}`;
|
|
354
|
+
}, "dealLine");
|
|
355
|
+
|
|
356
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/domain/rankings-options.js
|
|
333
357
|
var MESSAGE_MEASURES = ["views", "reactions", "forwards", "comments", "replies", "thread-size"];
|
|
334
358
|
var AUTHOR_MEASURES = [
|
|
335
359
|
"messages",
|
|
@@ -469,6 +493,238 @@ var withoutUrls = /* @__PURE__ */ __name((text) => text.replace(/\S+/gu, (token)
|
|
|
469
493
|
var rankingWords = /* @__PURE__ */ __name((text) => withoutUrls(text).match(/[\p{L}\p{N}]+/gu)?.length ?? 0, "rankingWords");
|
|
470
494
|
var rankingQuestion = /* @__PURE__ */ __name((text) => withoutUrls(text).includes("?"), "rankingQuestion");
|
|
471
495
|
|
|
496
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/domain/records.js
|
|
497
|
+
import { createHash } from "node:crypto";
|
|
498
|
+
var RECORDS_SCHEMA_VERSION = 1;
|
|
499
|
+
var RECORD_OPERATIONS = ["upsert", "delete"];
|
|
500
|
+
var RECORD_ENTITY_TYPES = ["invoice", "payment", "person", "organization", "project"];
|
|
501
|
+
var WORD2 = "^[a-z0-9][a-z0-9_-]{0,62}$";
|
|
502
|
+
var TYPE = "^(invoice|payment|person|organization|project|custom:[a-z0-9][a-z0-9_-]{0,62})$";
|
|
503
|
+
var MAX_ID = 512;
|
|
504
|
+
var MAX_FIELDS_BYTES = 65536;
|
|
505
|
+
var MAX_RELATIONS = 100;
|
|
506
|
+
var DECIMAL = "^[0-9]{1,16}(\\.[0-9]{1,6})?$";
|
|
507
|
+
var RECORDS_ENVELOPE_SCHEMA = {
|
|
508
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
509
|
+
title: "WireCat records envelope, version 1",
|
|
510
|
+
description: "Records one source sends to the store. JSONL is the same model: the first line holds schema_version and source, each further line one record.",
|
|
511
|
+
type: "object",
|
|
512
|
+
required: ["schema_version", "source", "records"],
|
|
513
|
+
additionalProperties: false,
|
|
514
|
+
properties: {
|
|
515
|
+
schema_version: { const: RECORDS_SCHEMA_VERSION },
|
|
516
|
+
source: { $ref: "#/$defs/source" },
|
|
517
|
+
records: { type: "array", items: { $ref: "#/$defs/record" } }
|
|
518
|
+
},
|
|
519
|
+
$defs: {
|
|
520
|
+
source: {
|
|
521
|
+
type: "object",
|
|
522
|
+
required: ["provider", "account", "batch_id"],
|
|
523
|
+
additionalProperties: false,
|
|
524
|
+
properties: {
|
|
525
|
+
provider: { type: "string", pattern: WORD2, description: "The system the records come from" },
|
|
526
|
+
account: { type: "string", minLength: 1, maxLength: MAX_ID, description: "The account in that system" },
|
|
527
|
+
batch_id: { type: "string", minLength: 1, maxLength: MAX_ID, description: "This import, for the receipt" }
|
|
528
|
+
}
|
|
529
|
+
},
|
|
530
|
+
record: {
|
|
531
|
+
type: "object",
|
|
532
|
+
required: ["key", "type", "external_id", "operation"],
|
|
533
|
+
additionalProperties: false,
|
|
534
|
+
properties: {
|
|
535
|
+
key: { type: "string", minLength: 1, maxLength: MAX_ID },
|
|
536
|
+
type: { type: "string", pattern: TYPE },
|
|
537
|
+
external_id: { type: "string", minLength: 1, maxLength: MAX_ID },
|
|
538
|
+
operation: { enum: [...RECORD_OPERATIONS] },
|
|
539
|
+
fields: {
|
|
540
|
+
type: "object",
|
|
541
|
+
description: "What the source says, as data: never secrets, never instructions"
|
|
542
|
+
},
|
|
543
|
+
revision: { type: "integer", minimum: 0, maximum: Number.MAX_SAFE_INTEGER },
|
|
544
|
+
relations: { type: "array", maxItems: MAX_RELATIONS, items: { $ref: "#/$defs/relation" } }
|
|
545
|
+
}
|
|
546
|
+
},
|
|
547
|
+
relation: {
|
|
548
|
+
type: "object",
|
|
549
|
+
required: ["role", "type", "external_id"],
|
|
550
|
+
additionalProperties: false,
|
|
551
|
+
properties: {
|
|
552
|
+
role: { type: "string", pattern: WORD2 },
|
|
553
|
+
type: { type: "string", pattern: TYPE },
|
|
554
|
+
external_id: { type: "string", minLength: 1, maxLength: MAX_ID },
|
|
555
|
+
amount: {
|
|
556
|
+
type: "string",
|
|
557
|
+
pattern: DECIMAL,
|
|
558
|
+
description: "A settles relation's share of the payment, a decimal in its currency"
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
};
|
|
564
|
+
var wordPattern = new RegExp(WORD2);
|
|
565
|
+
var typePattern = new RegExp(TYPE);
|
|
566
|
+
var decimalPattern = new RegExp(DECIMAL);
|
|
567
|
+
var isObject = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null && !Array.isArray(value), "isObject");
|
|
568
|
+
var escapePointer = /* @__PURE__ */ __name((segment) => String(segment).replaceAll("~", "~0").replaceAll("/", "~1"), "escapePointer");
|
|
569
|
+
var pointerOf = /* @__PURE__ */ __name((...segments) => segments.map((s) => `/${escapePointer(s)}`).join(""), "pointerOf");
|
|
570
|
+
var idText = /* @__PURE__ */ __name((value) => typeof value === "string" && value.trim() !== "" && value.length <= MAX_ID && !value.includes("\0"), "idText");
|
|
571
|
+
var extraKeys = /* @__PURE__ */ __name((value, allowed) => Object.keys(value).filter((key) => !allowed.includes(key)), "extraKeys");
|
|
572
|
+
var secretIn = /* @__PURE__ */ __name((value, at) => {
|
|
573
|
+
if (typeof value === "string")
|
|
574
|
+
return holdsCredential(value) ? at : void 0;
|
|
575
|
+
if (Array.isArray(value)) {
|
|
576
|
+
for (const [index, item] of value.entries()) {
|
|
577
|
+
const found = secretIn(item, [...at, index]);
|
|
578
|
+
if (found)
|
|
579
|
+
return found;
|
|
580
|
+
}
|
|
581
|
+
return void 0;
|
|
582
|
+
}
|
|
583
|
+
if (!isObject(value))
|
|
584
|
+
return void 0;
|
|
585
|
+
for (const [key, item] of Object.entries(value)) {
|
|
586
|
+
if (secretNamed(key))
|
|
587
|
+
return [...at, key];
|
|
588
|
+
const found = secretIn(item, [...at, key]);
|
|
589
|
+
if (found)
|
|
590
|
+
return found;
|
|
591
|
+
}
|
|
592
|
+
return void 0;
|
|
593
|
+
}, "secretIn");
|
|
594
|
+
var relationErrors = /* @__PURE__ */ __name((relations, at) => {
|
|
595
|
+
if (relations === void 0)
|
|
596
|
+
return [];
|
|
597
|
+
if (!Array.isArray(relations) || relations.length > MAX_RELATIONS)
|
|
598
|
+
return [invalid3(at, `relations is a list of at most ${MAX_RELATIONS}`)];
|
|
599
|
+
return relations.flatMap((relation, index) => {
|
|
600
|
+
const here = [...at, index];
|
|
601
|
+
if (!isObject(relation))
|
|
602
|
+
return [invalid3(here, "a relation is an object")];
|
|
603
|
+
const extra = extraKeys(relation, ["role", "type", "external_id", "amount"]);
|
|
604
|
+
if (extra.length > 0)
|
|
605
|
+
return [invalid3([...here, extra[0]], "a relation holds role, type, external_id and amount")];
|
|
606
|
+
if (typeof relation.role !== "string" || !wordPattern.test(relation.role))
|
|
607
|
+
return [invalid3([...here, "role"], "a role is lowercase letters, digits, - and _")];
|
|
608
|
+
if (typeof relation.type !== "string" || !typePattern.test(relation.type))
|
|
609
|
+
return [invalid3([...here, "type"], `a type is one of ${RECORD_ENTITY_TYPES.join(", ")} or custom:<name>`)];
|
|
610
|
+
if (!idText(relation.external_id))
|
|
611
|
+
return [invalid3([...here, "external_id"], `an external id takes 1\u2013${MAX_ID} characters`)];
|
|
612
|
+
if (relation.amount !== void 0 && (typeof relation.amount !== "string" || !decimalPattern.test(relation.amount)))
|
|
613
|
+
return [invalid3([...here, "amount"], 'an amount is a decimal string, such as "13000.00"')];
|
|
614
|
+
if (relation.amount !== void 0 && relation.role !== "settles")
|
|
615
|
+
return [invalid3([...here, "amount"], "only a settles relation carries an amount")];
|
|
616
|
+
return [];
|
|
617
|
+
});
|
|
618
|
+
}, "relationErrors");
|
|
619
|
+
var invalid3 = /* @__PURE__ */ __name((at, message, code = "record.invalid") => ({
|
|
620
|
+
pointer: pointerOf(...at),
|
|
621
|
+
code,
|
|
622
|
+
message
|
|
623
|
+
}), "invalid");
|
|
624
|
+
var recordErrors = /* @__PURE__ */ __name((record, index) => {
|
|
625
|
+
const at = ["records", index];
|
|
626
|
+
if (!isObject(record))
|
|
627
|
+
return [invalid3(at, "a record is an object")];
|
|
628
|
+
const key = typeof record.key === "string" ? record.key : void 0;
|
|
629
|
+
const withKey = /* @__PURE__ */ __name((errors) => errors.map((error) => key === void 0 ? error : { ...error, key }), "withKey");
|
|
630
|
+
const extra = extraKeys(record, ["key", "type", "external_id", "operation", "fields", "revision", "relations"]);
|
|
631
|
+
if (extra.length > 0)
|
|
632
|
+
return withKey([invalid3([...at, extra[0]], `a record has no ${extra[0]}`)]);
|
|
633
|
+
if (!idText(record.key))
|
|
634
|
+
return [invalid3([...at, "key"], `a key takes 1\u2013${MAX_ID} characters`)];
|
|
635
|
+
if (typeof record.type !== "string" || !typePattern.test(record.type))
|
|
636
|
+
return withKey([
|
|
637
|
+
invalid3([...at, "type"], `a type is one of ${RECORD_ENTITY_TYPES.join(", ")} or custom:<name>`, "record.type")
|
|
638
|
+
]);
|
|
639
|
+
if (!idText(record.external_id))
|
|
640
|
+
return withKey([invalid3([...at, "external_id"], `an external id takes 1\u2013${MAX_ID} characters`)]);
|
|
641
|
+
if (!RECORD_OPERATIONS.includes(record.operation))
|
|
642
|
+
return withKey([invalid3([...at, "operation"], "an operation is upsert or delete")]);
|
|
643
|
+
if (record.revision !== void 0 && (typeof record.revision !== "number" || !Number.isSafeInteger(record.revision) || record.revision < 0))
|
|
644
|
+
return withKey([invalid3([...at, "revision"], "a revision is a whole number, 0 or more")]);
|
|
645
|
+
if (record.operation === "upsert" && !isObject(record.fields))
|
|
646
|
+
return withKey([invalid3([...at, "fields"], "an upsert carries its fields as an object")]);
|
|
647
|
+
if (record.fields !== void 0 && !isObject(record.fields))
|
|
648
|
+
return withKey([invalid3([...at, "fields"], "fields is an object")]);
|
|
649
|
+
if (record.fields !== void 0 && Buffer.byteLength(JSON.stringify(record.fields)) > MAX_FIELDS_BYTES)
|
|
650
|
+
return withKey([invalid3([...at, "fields"], `fields take at most ${MAX_FIELDS_BYTES} bytes`, "record.too-large")]);
|
|
651
|
+
const secret = record.fields === void 0 ? void 0 : secretIn(record.fields, [...at, "fields"]);
|
|
652
|
+
if (secret)
|
|
653
|
+
return withKey([
|
|
654
|
+
invalid3(secret, "a secret never goes into the store: drop this field at the source", "record.secret-field")
|
|
655
|
+
]);
|
|
656
|
+
return withKey(relationErrors(record.relations, [...at, "relations"]));
|
|
657
|
+
}, "recordErrors");
|
|
658
|
+
var envelopeErrors = /* @__PURE__ */ __name((envelope, account) => {
|
|
659
|
+
if (!isObject(envelope))
|
|
660
|
+
return [invalid3([], "an envelope is an object", "envelope.invalid")];
|
|
661
|
+
const extra = extraKeys(envelope, ["schema_version", "source", "records"]);
|
|
662
|
+
if (extra.length > 0)
|
|
663
|
+
return [invalid3([extra[0]], `an envelope has no ${extra[0]}`, "envelope.invalid")];
|
|
664
|
+
if (envelope.schema_version !== RECORDS_SCHEMA_VERSION)
|
|
665
|
+
return [
|
|
666
|
+
invalid3(["schema_version"], `this build reads schema_version ${RECORDS_SCHEMA_VERSION}, not ${JSON.stringify(envelope.schema_version)}`, "envelope.schema-version")
|
|
667
|
+
];
|
|
668
|
+
const { source } = envelope;
|
|
669
|
+
if (!isObject(source))
|
|
670
|
+
return [invalid3(["source"], "source is an object", "envelope.invalid")];
|
|
671
|
+
const sourceExtra = extraKeys(source, ["provider", "account", "batch_id"]);
|
|
672
|
+
if (sourceExtra.length > 0)
|
|
673
|
+
return [
|
|
674
|
+
invalid3(["source", sourceExtra[0]], "source holds provider, account and batch_id", "envelope.invalid")
|
|
675
|
+
];
|
|
676
|
+
if (typeof source.provider !== "string" || !wordPattern.test(source.provider))
|
|
677
|
+
return [invalid3(["source", "provider"], "a provider is lowercase letters, digits, - and _", "envelope.invalid")];
|
|
678
|
+
if (!idText(source.account))
|
|
679
|
+
return [invalid3(["source", "account"], `an account takes 1\u2013${MAX_ID} characters`, "envelope.invalid")];
|
|
680
|
+
if (!idText(source.batch_id))
|
|
681
|
+
return [invalid3(["source", "batch_id"], `a batch id takes 1\u2013${MAX_ID} characters`, "envelope.invalid")];
|
|
682
|
+
if (source.account !== account)
|
|
683
|
+
return [
|
|
684
|
+
invalid3(["source", "account"], `the envelope is for account ${JSON.stringify(source.account)}, the import for ${JSON.stringify(account)}`, "envelope.account-mismatch")
|
|
685
|
+
];
|
|
686
|
+
if (!Array.isArray(envelope.records))
|
|
687
|
+
return [invalid3(["records"], "records is a list", "envelope.invalid")];
|
|
688
|
+
return [];
|
|
689
|
+
}, "envelopeErrors");
|
|
690
|
+
var canonical = /* @__PURE__ */ __name((value) => {
|
|
691
|
+
if (Array.isArray(value))
|
|
692
|
+
return value.map(canonical);
|
|
693
|
+
if (!isObject(value))
|
|
694
|
+
return value;
|
|
695
|
+
return Object.fromEntries(Object.keys(value).sort().map((key) => [key, canonical(value[key])]));
|
|
696
|
+
}, "canonical");
|
|
697
|
+
var recordFingerprint = /* @__PURE__ */ __name((fields, relations) => createHash("sha256").update(JSON.stringify(canonical({
|
|
698
|
+
fields,
|
|
699
|
+
relations: relations.map((relation) => [
|
|
700
|
+
relation.role,
|
|
701
|
+
relation.type,
|
|
702
|
+
relation.external_id,
|
|
703
|
+
...relation.amount === void 0 ? [] : [relation.amount]
|
|
704
|
+
]).sort((a, b) => a.join("\0").localeCompare(b.join("\0")))
|
|
705
|
+
}))).digest("hex"), "recordFingerprint");
|
|
706
|
+
var envelopeOfJsonl = /* @__PURE__ */ __name((text) => {
|
|
707
|
+
const lines = text.split(/\r?\n/);
|
|
708
|
+
const first = lines.findIndex((line) => line.trim() !== "");
|
|
709
|
+
if (first < 0)
|
|
710
|
+
return {};
|
|
711
|
+
const parse = /* @__PURE__ */ __name((line) => {
|
|
712
|
+
try {
|
|
713
|
+
return JSON.parse(line);
|
|
714
|
+
} catch {
|
|
715
|
+
return line;
|
|
716
|
+
}
|
|
717
|
+
}, "parse");
|
|
718
|
+
const header = parse(lines[first]);
|
|
719
|
+
const records = [];
|
|
720
|
+
for (let at = first + 1; at < lines.length; at++) {
|
|
721
|
+
const line = lines[at];
|
|
722
|
+
if (line.trim() !== "")
|
|
723
|
+
records.push(parse(line));
|
|
724
|
+
}
|
|
725
|
+
return isObject(header) ? { ...header, records } : header;
|
|
726
|
+
}, "envelopeOfJsonl");
|
|
727
|
+
|
|
472
728
|
export {
|
|
473
729
|
formatLocator,
|
|
474
730
|
isLocator,
|
|
@@ -479,6 +735,7 @@ export {
|
|
|
479
735
|
canonicalReference,
|
|
480
736
|
looksLikeReference,
|
|
481
737
|
KINDS,
|
|
738
|
+
CRM_OPENS,
|
|
482
739
|
PROVIDERS,
|
|
483
740
|
providerLabel,
|
|
484
741
|
FOLDER_PROVIDERS,
|
|
@@ -505,6 +762,11 @@ export {
|
|
|
505
762
|
counterObservationTime,
|
|
506
763
|
observedCounters,
|
|
507
764
|
counterFreshness,
|
|
765
|
+
DEAL_KINDS,
|
|
766
|
+
DEAL_STATUSES,
|
|
767
|
+
STAGE_OUTCOMES,
|
|
768
|
+
DEAL_ROLES,
|
|
769
|
+
dealLine,
|
|
508
770
|
MESSAGE_MEASURES,
|
|
509
771
|
AUTHOR_MEASURES,
|
|
510
772
|
needsRankingContext,
|
|
@@ -512,5 +774,14 @@ export {
|
|
|
512
774
|
rankingScore,
|
|
513
775
|
RANKING_TOKENIZER_VERSION,
|
|
514
776
|
rankingWords,
|
|
515
|
-
rankingQuestion
|
|
777
|
+
rankingQuestion,
|
|
778
|
+
RECORDS_SCHEMA_VERSION,
|
|
779
|
+
RECORD_OPERATIONS,
|
|
780
|
+
RECORD_ENTITY_TYPES,
|
|
781
|
+
RECORDS_ENVELOPE_SCHEMA,
|
|
782
|
+
pointerOf,
|
|
783
|
+
recordErrors,
|
|
784
|
+
envelopeErrors,
|
|
785
|
+
recordFingerprint,
|
|
786
|
+
envelopeOfJsonl
|
|
516
787
|
};
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
__name
|
|
5
5
|
} from "./chunk-ZVVMGPBJ.js";
|
|
6
6
|
|
|
7
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
7
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/sanitize.js
|
|
8
8
|
var CONTROL = (
|
|
9
9
|
// biome-ignore lint/suspicious/noControlCharactersInRegex: matching them is the whole point
|
|
10
10
|
/[\u0000-\u0008\u000B-\u001F\u007F-\u009F\u200B\u200E\u200F\u202A-\u202E\u2066-\u2069\uFEFF\u{E0000}-\u{E007F}]/gu
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
__name
|
|
5
5
|
} from "./chunk-ZVVMGPBJ.js";
|
|
6
6
|
|
|
7
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/shared-55XJMTPA.js
|
|
8
8
|
var entityKind = /* @__PURE__ */ Symbol.for("drizzle:entityKind");
|
|
9
9
|
var kindsByConstructor = /* @__PURE__ */ new WeakMap();
|
|
10
10
|
function collectKinds(ctor) {
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
__name
|
|
5
5
|
} from "./chunk-ZVVMGPBJ.js";
|
|
6
6
|
|
|
7
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
7
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/installer.js
|
|
8
8
|
var installerOf = /* @__PURE__ */ __name((scriptPath) => {
|
|
9
9
|
const path = scriptPath.replaceAll("\\", "/");
|
|
10
10
|
if (path.includes("/_npx/"))
|
|
@@ -7,15 +7,15 @@ import {
|
|
|
7
7
|
modelsDirectory,
|
|
8
8
|
speechModel,
|
|
9
9
|
vadPath
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-6TJ62LZQ.js";
|
|
11
11
|
import {
|
|
12
12
|
CliError
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-FEM2JQN2.js";
|
|
14
14
|
import {
|
|
15
15
|
__name
|
|
16
16
|
} from "./chunk-ZVVMGPBJ.js";
|
|
17
17
|
|
|
18
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/speech/local.js
|
|
19
19
|
import { createHash } from "node:crypto";
|
|
20
20
|
import { isAbsolute } from "node:path";
|
|
21
21
|
import { setImmediate } from "node:timers/promises";
|
|
@@ -50,12 +50,22 @@ var recognizeLocalPieces = /* @__PURE__ */ __name(async (id, audio, options = {}
|
|
|
50
50
|
const directory = options.directory ?? modelsDirectory(options.env);
|
|
51
51
|
if (!isInstalled(model, directory))
|
|
52
52
|
throw notInstalled(model.id);
|
|
53
|
-
const { openRecognizer, toModelRate } = await import("./recognize-
|
|
53
|
+
const { openRecognizer, toModelRate } = await import("./recognize-N5WADGQB.js");
|
|
54
54
|
const engine = (options.open ?? openRecognizer)(model, modelPath(directory, model), vadPath(directory));
|
|
55
55
|
try {
|
|
56
56
|
if (!engine.pieces)
|
|
57
57
|
throw new CliError("configuration_error", "this speech backend gives no timed pieces");
|
|
58
|
-
|
|
58
|
+
const pcm = toModelRate(audio.samples, audio.rate);
|
|
59
|
+
const { signal } = options;
|
|
60
|
+
if (!signal)
|
|
61
|
+
return engine.pieces(pcm);
|
|
62
|
+
cancelled(signal);
|
|
63
|
+
try {
|
|
64
|
+
return engine.piecesUntil ? await engine.piecesUntil(pcm, signal) : engine.pieces(pcm);
|
|
65
|
+
} catch (error) {
|
|
66
|
+
cancelled(signal);
|
|
67
|
+
throw error;
|
|
68
|
+
}
|
|
59
69
|
} finally {
|
|
60
70
|
engine.free();
|
|
61
71
|
}
|
|
@@ -71,7 +81,7 @@ var openLocalSpeechRecognizer = /* @__PURE__ */ __name(async (id, input = {}) =>
|
|
|
71
81
|
cancelled(options.signal);
|
|
72
82
|
if (!isInstalled(model, directory))
|
|
73
83
|
throw notInstalled(description.model);
|
|
74
|
-
const { openRecognizer, toModelRate } = await import("./recognize-
|
|
84
|
+
const { openRecognizer, toModelRate } = await import("./recognize-N5WADGQB.js");
|
|
75
85
|
cancelled(options.signal);
|
|
76
86
|
const engine = (options.open ?? openRecognizer)(model, modelPath(directory, model), vadPath(directory));
|
|
77
87
|
let closing = false;
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
__name
|
|
5
5
|
} from "./chunk-ZVVMGPBJ.js";
|
|
6
6
|
|
|
7
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/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
|
};
|
|
@@ -3,18 +3,18 @@ const require = __bundleRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
SAMPLE_RATE,
|
|
5
5
|
decodeOgg
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-A63ZFOQJ.js";
|
|
7
7
|
import {
|
|
8
8
|
importFrom
|
|
9
9
|
} from "./chunk-Y5E2WNWB.js";
|
|
10
10
|
import {
|
|
11
11
|
CliError
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-FEM2JQN2.js";
|
|
13
13
|
import {
|
|
14
14
|
__name
|
|
15
15
|
} from "./chunk-ZVVMGPBJ.js";
|
|
16
16
|
|
|
17
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/speech/decode.js
|
|
18
18
|
import { spawn } from "node:child_process";
|
|
19
19
|
import { mkdtemp, rm, writeFile } from "node:fs/promises";
|
|
20
20
|
import { createRequire } from "node:module";
|
|
@@ -8,12 +8,12 @@ import {
|
|
|
8
8
|
ACCESS_SECONDS,
|
|
9
9
|
REFRESH_SECONDS,
|
|
10
10
|
readStored
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-6T3P226D.js";
|
|
12
12
|
import {
|
|
13
13
|
__name
|
|
14
14
|
} from "./chunk-ZVVMGPBJ.js";
|
|
15
15
|
|
|
16
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/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";
|
|
@@ -2,12 +2,12 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
singleLine
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-OE7EIP5L.js";
|
|
6
6
|
import {
|
|
7
7
|
__name
|
|
8
8
|
} from "./chunk-ZVVMGPBJ.js";
|
|
9
9
|
|
|
10
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
10
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/names.js
|
|
11
11
|
var FIRST_PARTY_TOOLS = [
|
|
12
12
|
{ name: "tg", package: "@wirecat/tg-cli" },
|
|
13
13
|
{ name: "max", package: "@wirecat/max-cli" },
|
|
@@ -30,7 +30,7 @@ var PROGRAM_PREFIX = "wcat-";
|
|
|
30
30
|
var DESCRIBE_FLAG = "--wcat-describe";
|
|
31
31
|
var DISPATCH_FLAG = "--wcat-dispatch";
|
|
32
32
|
|
|
33
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
33
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/describe.js
|
|
34
34
|
var DESCRIBE_FORMAT = 1;
|
|
35
35
|
var describeAnswer = /* @__PURE__ */ __name((tool) => ({
|
|
36
36
|
wcat_describe: DESCRIBE_FORMAT,
|
|
@@ -59,7 +59,7 @@ var parseDescribe = /* @__PURE__ */ __name((text) => {
|
|
|
59
59
|
};
|
|
60
60
|
}, "parseDescribe");
|
|
61
61
|
|
|
62
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
62
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/shim.js
|
|
63
63
|
import { lstatSync, readFileSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
64
64
|
import { join } from "node:path";
|
|
65
65
|
var SHIM_FORMAT = 1;
|