@wirecat/zoom-cli 0.66.0 → 0.67.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/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-SEW2VL76.js} +12 -11
- package/dist/bundle/answer-policy-5OYUL6UF.js +103 -0
- package/dist/bundle/{anthropic-K2E2JS4S.js → anthropic-FSNASJML.js} +7 -7
- package/dist/bundle/{app-server-TVXDG6HZ.js → app-server-EVSRYJ3H.js} +55 -54
- package/dist/bundle/{bun-O4WHGL2F.js → bun-DACL5SVO.js} +2 -2
- package/dist/bundle/{bun-sqlite-HGBEHQI3.js → bun-sqlite-HQ2KOXSI.js} +6 -6
- package/dist/bundle/{chunk-IDWHJ35K.js → chunk-2UW533HQ.js} +4 -4
- package/dist/bundle/{chunk-NMQUCHTX.js → chunk-3GO3KME7.js} +3 -3
- package/dist/bundle/{chunk-6GSJLNP4.js → chunk-3ZIHUSMM.js} +2 -2
- package/dist/bundle/{chunk-2YLNUZ3T.js → chunk-4GCKDO2H.js} +3 -3
- package/dist/bundle/{chunk-7SQJCKR6.js → chunk-4KDZ22RA.js} +1 -1
- package/dist/bundle/{chunk-5A26IBAR.js → chunk-4U2555EQ.js} +23 -23
- package/dist/bundle/{chunk-RMKHYUHK.js → chunk-4UVT2QCO.js} +4 -4
- package/dist/bundle/{chunk-GHAPWKG2.js → chunk-4ZR5DJ26.js} +3 -3
- package/dist/bundle/{chunk-2T5BOLBS.js → chunk-54RTMQL6.js} +4 -4
- package/dist/bundle/chunk-6AJDVJVZ.js +35 -0
- package/dist/bundle/{chunk-UYV2JGLQ.js → chunk-6IBM4Z3V.js} +1 -1
- package/dist/bundle/{chunk-QAPU2JNO.js → chunk-6TZF2JP7.js} +13 -13
- package/dist/bundle/{chunk-CZ4KLUJG.js → chunk-6UFWFKFH.js} +2 -2
- package/dist/bundle/chunk-6VFORXL3.js +101 -0
- package/dist/bundle/{chunk-RO44LANT.js → chunk-7HAIM7GV.js} +1577 -633
- package/dist/bundle/{chunk-QV5ZGRK3.js → chunk-7K5TDTZY.js} +7 -7
- package/dist/bundle/{chunk-NO24PJNW.js → chunk-7LLUUXJB.js} +1 -1
- package/dist/bundle/{chunk-7PF56S6U.js → chunk-7VU5UGRR.js} +24 -22
- package/dist/bundle/{chunk-SU4WPBQE.js → chunk-AAZFLJSH.js} +22 -23
- package/dist/bundle/{chunk-ZKTXUDSR.js → chunk-ASCHAVNW.js} +30 -26
- package/dist/bundle/{chunk-BXSAROQP.js → chunk-B3KWAULD.js} +2 -2
- package/dist/bundle/{chunk-ZNFPDTQM.js → chunk-B5Z4XPVS.js} +2 -2
- package/dist/bundle/{chunk-756RS4PH.js → chunk-BKY4XVB4.js} +1688 -1133
- package/dist/bundle/{chunk-62GOOZO3.js → chunk-C6UKW7JO.js} +6 -6
- package/dist/bundle/{chunk-U3ZUT557.js → chunk-CLEZE65P.js} +1 -1
- package/dist/bundle/{chunk-YLEQN6PB.js → chunk-CRLBTNC4.js} +3 -3
- package/dist/bundle/{chunk-P2SYZNM4.js → chunk-D4KBD63W.js} +1 -1
- package/dist/bundle/{chunk-CR4CXOLX.js → chunk-D6OXI2NV.js} +17 -17
- package/dist/bundle/{chunk-Q47C3QZW.js → chunk-DFUPETW7.js} +444 -307
- package/dist/bundle/{chunk-JX3V35A5.js → chunk-DG4DWAU7.js} +3 -3
- package/dist/bundle/{chunk-P3XVLHIQ.js → chunk-EPDRF66S.js} +4 -4
- package/dist/bundle/{chunk-EXXM4RNI.js → chunk-EQ7XRRKV.js} +11 -11
- package/dist/bundle/{chunk-5GD2XZ6X.js → chunk-ESFMHBHH.js} +30 -29
- package/dist/bundle/{chunk-GI6QVSCW.js → chunk-EUPZSR2G.js} +4 -4
- package/dist/bundle/{chunk-J4EZL6HY.js → chunk-FGTPREAZ.js} +33 -33
- package/dist/bundle/{chunk-GKXFL35E.js → chunk-FWU3ZYHE.js} +50 -50
- package/dist/bundle/{chunk-CAW6IMFZ.js → chunk-FXQPK742.js} +55 -17
- package/dist/bundle/{chunk-P2G4KGTR.js → chunk-GP4NSYDU.js} +11 -11
- package/dist/bundle/{chunk-GNGBG5BT.js → chunk-I7SOXH64.js} +71 -38
- package/dist/bundle/{chunk-S4GDDO5S.js → chunk-IFDO3YPJ.js} +1 -1
- package/dist/bundle/{chunk-N5JRRBEG.js → chunk-J3ZBEWQY.js} +373 -9
- package/dist/bundle/chunk-JVCHGI7W.js +37 -0
- package/dist/bundle/{chunk-7KCTPGOF.js → chunk-KANH7GBB.js} +2 -2
- package/dist/bundle/{chunk-QJHRYUMJ.js → chunk-KIJLM5UL.js} +1 -1
- package/dist/bundle/{chunk-ILHTNOIV.js → chunk-KV4267S4.js} +1 -1
- package/dist/bundle/{chunk-XWDSEJWP.js → chunk-KWRSC6O6.js} +4 -4
- package/dist/bundle/{chunk-O5FKJV3T.js → chunk-L643D4RJ.js} +12 -12
- package/dist/bundle/{chunk-ZTL7ANSG.js → chunk-L6CAUVMU.js} +5 -5
- package/dist/bundle/{chunk-TUEEXECZ.js → chunk-L6WUAGPN.js} +3 -3
- package/dist/bundle/{chunk-H5ZVZAOD.js → chunk-LFQ73UFK.js} +3 -3
- package/dist/bundle/{chunk-3Y2F65AY.js → chunk-LKJXTACE.js} +10 -89
- package/dist/bundle/{chunk-AZ7ICKIA.js → chunk-LM26DJOK.js} +6 -6
- package/dist/bundle/{chunk-IKQ73INC.js → chunk-M43MBWJX.js} +3229 -1236
- package/dist/bundle/{chunk-LN2S3RA3.js → chunk-MWEOVTIF.js} +4 -4
- package/dist/bundle/{chunk-N67BLTBV.js → chunk-NTZDM5SJ.js} +28 -9
- package/dist/bundle/{chunk-6TIKPRVQ.js → chunk-OTMGAKUM.js} +7 -7
- package/dist/bundle/chunk-OZEYFJX2.js +93 -0
- package/dist/bundle/{chunk-XFUID5NY.js → chunk-Q65SDEFN.js} +2 -2
- package/dist/bundle/{chunk-67RNZGAG.js → chunk-QEI55M2F.js} +10 -10
- package/dist/bundle/{chunk-3B7L2UX4.js → chunk-QX2MAT6I.js} +3 -3
- package/dist/bundle/{chunk-KDKFGQWG.js → chunk-RAMPYIO2.js} +15 -12
- package/dist/bundle/{chunk-BLT3LR3U.js → chunk-RYKG6AEH.js} +1 -1
- package/dist/bundle/{chunk-Z6U3MEGJ.js → chunk-SCFFCIIP.js} +4 -2
- package/dist/bundle/{chunk-N6JMJN5A.js → chunk-SMVO5R3T.js} +19 -19
- package/dist/bundle/{chunk-Y3EIK4XW.js → chunk-SOZVC3SV.js} +1 -1
- package/dist/bundle/{chunk-A2SCXNA7.js → chunk-SSXCOUP3.js} +1084 -258
- package/dist/bundle/{chunk-TN7K66PU.js → chunk-SXFODCYK.js} +1 -1
- package/dist/bundle/{chunk-TFDVFD4N.js → chunk-T6CZWSHF.js} +97 -38
- package/dist/bundle/{chunk-7JMBEPW2.js → chunk-TBRG2DPE.js} +2 -2
- package/dist/bundle/{chunk-UOIXBEFR.js → chunk-V33VGWT3.js} +5 -5
- package/dist/bundle/{chunk-K5CIN4JP.js → chunk-VFIEYRYD.js} +8 -8
- package/dist/bundle/{chunk-5HPALDUO.js → chunk-VNIBTNV4.js} +3 -2
- package/dist/bundle/{chunk-3WTKZ2ZS.js → chunk-VQTAU4DV.js} +8 -8
- package/dist/bundle/{chunk-TMVKZMDO.js → chunk-WHQ4ZCJI.js} +49 -30
- package/dist/bundle/{chunk-S6S3KVJI.js → chunk-WZ5XK74U.js} +2 -1
- package/dist/bundle/{chunk-2VPHQFO5.js → chunk-X67YD3QI.js} +2 -2
- package/dist/bundle/{chunk-PQLBPYJR.js → chunk-YPF6OS37.js} +1 -1
- package/dist/bundle/{chunk-AU4JHT3R.js → chunk-YRNZT4GQ.js} +7 -7
- package/dist/bundle/{chunk-HKQWV3KT.js → chunk-Z3WXI4DK.js} +3 -3
- package/dist/bundle/{chunk-U4RVOSX3.js → chunk-ZMPTO2WB.js} +1 -1
- package/dist/bundle/{chunk-FWFFQV4D.js → chunk-ZRMZBMOF.js} +69 -9
- package/dist/bundle/{cli-HWQIL2AC.js → cli-YUATSOLA.js} +94 -67
- package/dist/bundle/command-contract-UWHY55UE.js +41 -0
- package/dist/bundle/config-TGF6E6ZD.js +89 -0
- package/dist/bundle/{decode-XPAPPUGE.js → decode-IL44LNC3.js} +6 -6
- package/dist/bundle/{dispatch-AKVJGP2S.js → dispatch-3BGIXSJR.js} +9 -9
- package/dist/bundle/{dist-LDIUQBM7.js → dist-3W27UQ2S.js} +46 -17
- package/dist/bundle/{echarts-FMACRZQC.js → echarts-CO4D26JF.js} +2 -2
- package/dist/bundle/{embed-LK45GRQ7.js → embed-XH2X4DFM.js} +7 -7
- package/dist/bundle/{embedder-QPBC5XBY.js → embedder-WTFWDXBJ.js} +10 -10
- package/dist/bundle/{failure-7OULAOWQ.js → failure-HTIS3NLS.js} +3 -3
- package/dist/bundle/{first-run-J5FG773Q.js → first-run-5RBH7FDO.js} +12 -12
- package/dist/bundle/first-screen-PGFIXJAX.js +39 -0
- package/dist/bundle/{folders-RHPUVMDI.js → folders-F4DNQPIY.js} +5 -5
- package/dist/bundle/{instructions-E5FXYCWF.js → instructions-EPPBL6TT.js} +1 -1
- package/dist/bundle/{main-FJHE5YHU.js → main-LVQTCDZS.js} +23 -22
- package/dist/bundle/{mcp-MNI62HHE.js → mcp-PPVOM4SE.js} +2 -2
- package/dist/bundle/{meetings-MYIDGYGW.js → meetings-BMELXRTR.js} +31 -7
- package/dist/bundle/{node-4SNKUPXT.js → node-CQVMWVIG.js} +2 -2
- package/dist/bundle/{node-sqlite-SYZUTVPC.js → node-sqlite-QQEX7LZT.js} +7 -7
- package/dist/bundle/{oauth-QPS5VTN6.js → oauth-AYGX7CQS.js} +8 -8
- package/dist/bundle/{open-OVCASRSJ.js → open-MIL2TOT6.js} +6 -6
- package/dist/bundle/openai-7QZZXQW5.js +25 -0
- package/dist/bundle/{output-file-K5JEL33Z.js → output-file-4XADZPYH.js} +6 -6
- package/dist/bundle/{process-HQZOTT6U.js → process-NJVQK6GB.js} +1 -1
- package/dist/bundle/{program-A546WC4F.js → program-WUYRS6H7.js} +152 -104
- package/dist/bundle/{prompt-CYBKP7S5.js → prompt-J4QPFLEA.js} +6 -6
- package/dist/bundle/{recognize-3H3YDCFI.js → recognize-OLJZVNWW.js} +5 -5
- package/dist/bundle/{remote-VAYVTJBS.js → remote-JPUXNYLV.js} +8 -8
- package/dist/bundle/{rerank-XA4GA5PS.js → rerank-XVV3X5TT.js} +8 -8
- package/dist/bundle/{run-log-XAFHMI3F.js → run-log-DJXBEVS5.js} +59 -57
- package/dist/bundle/{serve-KGHEDUHB.js → serve-NYYUO3MR.js} +10 -10
- package/dist/bundle/{server-ZYTSMDTP.js → server-4Z5E4YTT.js} +47 -46
- package/dist/bundle/server-VW5UVCH7.js +72 -0
- package/dist/bundle/{services-ZHMZC2OQ.js → services-EKWM76HP.js} +49 -32
- package/dist/bundle/{speech-7CJEFKM3.js → speech-WFJ44ACJ.js} +14 -14
- package/dist/bundle/{state-U6KSYVOH.js → state-VIRCT4VW.js} +7 -7
- package/dist/bundle/{store-WS4CQGYU.js → store-2Q4GEZJS.js} +30 -21
- package/dist/bundle/{store-DJE3LAEG.js → store-ZTDZ6UY5.js} +20 -17
- package/dist/bundle/store-connection-FKVVQLEF.js +83 -0
- package/dist/bundle/store-maintenance-command-AU73UVUQ.js +62 -0
- package/dist/bundle/{streaming-QMHH7L6N.js → streaming-7BPKIGAS.js} +7 -7
- package/dist/bundle/{tokens-PWQ56OXO.js → tokens-CQHMMKNX.js} +7 -7
- package/dist/bundle/zm.js +10 -10
- package/dist/bundle/zoom-app-OEKFMJS6.js +25 -0
- package/dist/config.d.ts +9 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +46 -7
- package/dist/config.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 +3 -2
- 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 +1 -1
- package/dist/setup-commands.d.ts.map +1 -1
- package/dist/setup-commands.js +30 -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 +17 -0
- package/dist/zoom-app.d.ts.map +1 -0
- package/dist/zoom-app.js +22 -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-L7IK4FOA.js +0 -18
- 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-LU3WKZBA.js} +0 -0
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
import { createRequire as __bundleRequire } from "node:module";
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
holdsCredential,
|
|
5
|
+
secretNamed
|
|
6
|
+
} from "./chunk-OZEYFJX2.js";
|
|
3
7
|
import {
|
|
4
8
|
formatMeetingReference,
|
|
5
9
|
parseMeetingReference
|
|
6
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-DFUPETW7.js";
|
|
7
11
|
import {
|
|
8
12
|
CliError
|
|
9
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-WZ5XK74U.js";
|
|
10
14
|
import {
|
|
11
15
|
singleLine
|
|
12
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-6IBM4Z3V.js";
|
|
13
17
|
import {
|
|
14
18
|
__name
|
|
15
19
|
} from "./chunk-ZVVMGPBJ.js";
|
|
16
20
|
|
|
17
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.570.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_093219d088c44dcb3d8868e1fe992f3e/node_modules/@wirecat/cli-core/dist/domain/locator.js
|
|
18
22
|
var SCHEME = "msg:";
|
|
19
23
|
var formatLocator = /* @__PURE__ */ __name(({ provider, account, chat, message }) => SCHEME + [provider, account, chat, message].map(encodeURIComponent).join("/"), "formatLocator");
|
|
20
24
|
var isLocator = /* @__PURE__ */ __name((reference) => reference.trim().startsWith(SCHEME), "isLocator");
|
|
@@ -28,7 +32,7 @@ var parseLocator = /* @__PURE__ */ __name((reference) => {
|
|
|
28
32
|
return { provider, account, chat, message };
|
|
29
33
|
}, "parseLocator");
|
|
30
34
|
|
|
31
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.570.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_093219d088c44dcb3d8868e1fe992f3e/node_modules/@wirecat/cli-core/dist/domain/references.js
|
|
32
36
|
var SIMPLE_REFERENCES = [
|
|
33
37
|
"note",
|
|
34
38
|
"document",
|
|
@@ -40,6 +44,8 @@ var SIMPLE_REFERENCES = [
|
|
|
40
44
|
"fact",
|
|
41
45
|
"bot",
|
|
42
46
|
"event",
|
|
47
|
+
"invoice",
|
|
48
|
+
"payment",
|
|
43
49
|
"entity"
|
|
44
50
|
];
|
|
45
51
|
var malformed = /* @__PURE__ */ __name((text, shape) => new CliError("validation_error", `"${singleLine(text)}" is not a reference \u2014 expected ${shape}`, {
|
|
@@ -173,7 +179,7 @@ var looksLikeReference = /* @__PURE__ */ __name((text) => {
|
|
|
173
179
|
return match !== null && byPrefix.has(match[1]);
|
|
174
180
|
}, "looksLikeReference");
|
|
175
181
|
|
|
176
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
182
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.570.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_093219d088c44dcb3d8868e1fe992f3e/node_modules/@wirecat/cli-core/dist/domain/providers.js
|
|
177
183
|
var KINDS = ["messages", "mail", "notes", "documents", "meetings", "events"];
|
|
178
184
|
var MESSENGER_OPENS = { chat: "messages list", message: "messages show", contact: "contacts show" };
|
|
179
185
|
var PROVIDERS = [
|
|
@@ -292,7 +298,7 @@ var providerNamed = /* @__PURE__ */ __name((word) => {
|
|
|
292
298
|
var kindIn = /* @__PURE__ */ __name((provider) => isFolderProvider(provider) ? "notes" : registry.find(({ name }) => name === provider)?.kind, "kindIn");
|
|
293
299
|
var kindOf = /* @__PURE__ */ __name((provider) => kindIn(provider) ?? "messages", "kindOf");
|
|
294
300
|
|
|
295
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
301
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.570.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_093219d088c44dcb3d8868e1fe992f3e/node_modules/@wirecat/cli-core/dist/domain/counters.js
|
|
296
302
|
var COUNTER_FIELDS = ["views", "reactions", "comments"];
|
|
297
303
|
var validCounter = /* @__PURE__ */ __name((value) => typeof value === "number" && Number.isFinite(value) && value >= 0, "validCounter");
|
|
298
304
|
var counterValue = /* @__PURE__ */ __name((message, field) => {
|
|
@@ -329,7 +335,121 @@ var counterFreshness = /* @__PURE__ */ __name((states) => {
|
|
|
329
335
|
return states.some((one) => one.freshness === "stale") ? "stale" : "fresh";
|
|
330
336
|
}, "counterFreshness");
|
|
331
337
|
|
|
332
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
338
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.570.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_093219d088c44dcb3d8868e1fe992f3e/node_modules/@wirecat/cli-core/dist/domain/money.js
|
|
339
|
+
var CURRENCY_SCALES = {
|
|
340
|
+
AED: 2,
|
|
341
|
+
AMD: 2,
|
|
342
|
+
AUD: 2,
|
|
343
|
+
BHD: 3,
|
|
344
|
+
BYN: 2,
|
|
345
|
+
CAD: 2,
|
|
346
|
+
CHF: 2,
|
|
347
|
+
CLP: 0,
|
|
348
|
+
CNY: 2,
|
|
349
|
+
CZK: 2,
|
|
350
|
+
DKK: 2,
|
|
351
|
+
EUR: 2,
|
|
352
|
+
GBP: 2,
|
|
353
|
+
GEL: 2,
|
|
354
|
+
HUF: 2,
|
|
355
|
+
ILS: 2,
|
|
356
|
+
INR: 2,
|
|
357
|
+
ISK: 0,
|
|
358
|
+
JPY: 0,
|
|
359
|
+
KGS: 2,
|
|
360
|
+
KRW: 0,
|
|
361
|
+
KWD: 3,
|
|
362
|
+
KZT: 2,
|
|
363
|
+
NOK: 2,
|
|
364
|
+
PLN: 2,
|
|
365
|
+
RSD: 2,
|
|
366
|
+
RUB: 2,
|
|
367
|
+
SEK: 2,
|
|
368
|
+
THB: 2,
|
|
369
|
+
TRY: 2,
|
|
370
|
+
UAH: 2,
|
|
371
|
+
USD: 2,
|
|
372
|
+
UZS: 2,
|
|
373
|
+
VND: 0
|
|
374
|
+
};
|
|
375
|
+
var refuse = /* @__PURE__ */ __name((message, reason) => {
|
|
376
|
+
throw new CliError("validation_error", message, { reason });
|
|
377
|
+
}, "refuse");
|
|
378
|
+
var DECIMAL = /^(\d{1,15})(?:\.(\d+))?$/;
|
|
379
|
+
var parseDecimal = /* @__PURE__ */ __name((text, scale) => {
|
|
380
|
+
const match = DECIMAL.exec(text.trim());
|
|
381
|
+
if (!match || (match[2] ?? "").length > scale)
|
|
382
|
+
return void 0;
|
|
383
|
+
return BigInt(`${match[1]}${(match[2] ?? "").padEnd(scale, "0")}`);
|
|
384
|
+
}, "parseDecimal");
|
|
385
|
+
var formatDecimal = /* @__PURE__ */ __name((units, scale) => {
|
|
386
|
+
const digits = BigInt(units).toString().padStart(scale + 1, "0");
|
|
387
|
+
return scale === 0 ? digits : `${digits.slice(0, -scale)}.${digits.slice(-scale)}`;
|
|
388
|
+
}, "formatDecimal");
|
|
389
|
+
var groupDigits = /* @__PURE__ */ __name((decimal) => {
|
|
390
|
+
const [whole = "0", fraction] = decimal.split(".");
|
|
391
|
+
const grouped = whole.replace(/\B(?=(\d{3})+(?!\d))/g, " ");
|
|
392
|
+
return fraction === void 0 ? grouped : `${grouped}.${fraction}`;
|
|
393
|
+
}, "groupDigits");
|
|
394
|
+
var currencyOf = /* @__PURE__ */ __name((text) => {
|
|
395
|
+
const code = typeof text === "string" ? text.trim().toUpperCase() : "";
|
|
396
|
+
if (CURRENCY_SCALES[code] === void 0)
|
|
397
|
+
return refuse(`${typeof text === "string" && text.trim() ? text.trim() : "an empty currency"} is not a currency the store keeps; use one of ${Object.keys(CURRENCY_SCALES).join(", ")}`, "money.currency");
|
|
398
|
+
return code;
|
|
399
|
+
}, "currencyOf");
|
|
400
|
+
var scaleOf = /* @__PURE__ */ __name((currency) => CURRENCY_SCALES[currencyOf(currency)], "scaleOf");
|
|
401
|
+
var minorUnits = /* @__PURE__ */ __name((amount, currency, what = "an amount") => {
|
|
402
|
+
const scale = scaleOf(currency);
|
|
403
|
+
const units = typeof amount === "string" ? parseDecimal(amount, scale) : void 0;
|
|
404
|
+
if (units === void 0 || units > BigInt(Number.MAX_SAFE_INTEGER))
|
|
405
|
+
return refuse(`${what} is a decimal string with at most ${scale} decimal${scale === 1 ? "" : "s"} for ${currency}, such as "${formatDecimal(5e3 * 10 ** scale, scale)}"`, "money.amount");
|
|
406
|
+
return Number(units);
|
|
407
|
+
}, "minorUnits");
|
|
408
|
+
var moneyOf = /* @__PURE__ */ __name((units, currency) => ({
|
|
409
|
+
amount: formatDecimal(units, scaleOf(currency)),
|
|
410
|
+
currency
|
|
411
|
+
}), "moneyOf");
|
|
412
|
+
var moneyLabel = /* @__PURE__ */ __name((units, currency) => `${groupDigits(formatDecimal(units, scaleOf(currency)))} ${currency}`, "moneyLabel");
|
|
413
|
+
var QUANTITY_SCALE = 3;
|
|
414
|
+
var quantityOf = /* @__PURE__ */ __name((text) => {
|
|
415
|
+
const thousandths = typeof text === "string" ? parseDecimal(text, QUANTITY_SCALE) : void 0;
|
|
416
|
+
if (thousandths === void 0 || thousandths === 0n)
|
|
417
|
+
return refuse('a quantity is a decimal string above 0 with at most 3 decimals, such as "1.5"', "money.quantity");
|
|
418
|
+
const plain = formatDecimal(thousandths, QUANTITY_SCALE).replace(/\.?0+$/, "");
|
|
419
|
+
return { text: plain, thousandths };
|
|
420
|
+
}, "quantityOf");
|
|
421
|
+
var lineUnits = /* @__PURE__ */ __name((thousandths, unitPrice) => Number((thousandths * BigInt(unitPrice) + 500n) / 1000n), "lineUnits");
|
|
422
|
+
|
|
423
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.570.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_093219d088c44dcb3d8868e1fe992f3e/node_modules/@wirecat/cli-core/dist/domain/finance.js
|
|
424
|
+
var INVOICE_DIRECTIONS = ["receivable", "payable"];
|
|
425
|
+
var INVOICE_STATUSES = ["draft", "issued", "partly_paid", "paid", "void"];
|
|
426
|
+
var MONEY_DIRECTIONS = ["in", "out"];
|
|
427
|
+
var FINANCE_REVIEWS = ["proposed", "confirmed", "rejected"];
|
|
428
|
+
var settledStatus = /* @__PURE__ */ __name((current, total, paid) => {
|
|
429
|
+
if (current === "draft" || current === "void")
|
|
430
|
+
return current;
|
|
431
|
+
if (paid <= 0)
|
|
432
|
+
return "issued";
|
|
433
|
+
return paid < total ? "partly_paid" : "paid";
|
|
434
|
+
}, "settledStatus");
|
|
435
|
+
var dayMonth = /* @__PURE__ */ __name((date) => date === null ? null : `${date.slice(8, 10)}.${date.slice(5, 7)}`, "dayMonth");
|
|
436
|
+
var notes = /* @__PURE__ */ __name((...words) => {
|
|
437
|
+
const kept = words.filter((word) => word !== null);
|
|
438
|
+
return kept.length === 0 ? "" : ` (${kept.join(", ")})`;
|
|
439
|
+
}, "notes");
|
|
440
|
+
var invoiceLine = /* @__PURE__ */ __name((invoice) => {
|
|
441
|
+
const party = invoice.counterpartyName === null ? "" : `${invoice.direction === "receivable" ? " to" : " from"} ${invoice.counterpartyName}`;
|
|
442
|
+
const due = invoice.dueDate === null ? "" : `, due ${dayMonth(invoice.dueDate)}`;
|
|
443
|
+
return `${invoice.number ?? `#${invoice.id}`} \xB7 ${moneyLabel(invoice.total, invoice.currency)}${party}${due}` + notes(invoice.status.replace("_", " "), invoice.review === "confirmed" ? null : invoice.review);
|
|
444
|
+
}, "invoiceLine");
|
|
445
|
+
var paymentLine = /* @__PURE__ */ __name((payment) => {
|
|
446
|
+
const party = payment.partyName === null ? "" : `${payment.direction === "in" ? " from" : " to"} ${payment.partyName}`;
|
|
447
|
+
return `${moneyLabel(payment.amount, payment.currency)}${party}, ${dayMonth(payment.date)}` + notes(payment.review === "confirmed" ? null : payment.review);
|
|
448
|
+
}, "paymentLine");
|
|
449
|
+
var invoiceTitle = /* @__PURE__ */ __name((invoice) => `Invoice ${invoiceLine(invoice)}`, "invoiceTitle");
|
|
450
|
+
var paymentEntryTitle = /* @__PURE__ */ __name((payment) => `Payment \xB7 ${paymentLine(payment)}`, "paymentEntryTitle");
|
|
451
|
+
|
|
452
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.570.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_093219d088c44dcb3d8868e1fe992f3e/node_modules/@wirecat/cli-core/dist/domain/rankings-options.js
|
|
333
453
|
var MESSAGE_MEASURES = ["views", "reactions", "forwards", "comments", "replies", "thread-size"];
|
|
334
454
|
var AUTHOR_MEASURES = [
|
|
335
455
|
"messages",
|
|
@@ -469,6 +589,222 @@ var withoutUrls = /* @__PURE__ */ __name((text) => text.replace(/\S+/gu, (token)
|
|
|
469
589
|
var rankingWords = /* @__PURE__ */ __name((text) => withoutUrls(text).match(/[\p{L}\p{N}]+/gu)?.length ?? 0, "rankingWords");
|
|
470
590
|
var rankingQuestion = /* @__PURE__ */ __name((text) => withoutUrls(text).includes("?"), "rankingQuestion");
|
|
471
591
|
|
|
592
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.570.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_093219d088c44dcb3d8868e1fe992f3e/node_modules/@wirecat/cli-core/dist/domain/records.js
|
|
593
|
+
import { createHash } from "node:crypto";
|
|
594
|
+
var RECORDS_SCHEMA_VERSION = 1;
|
|
595
|
+
var RECORD_OPERATIONS = ["upsert", "delete"];
|
|
596
|
+
var RECORD_ENTITY_TYPES = ["invoice", "payment", "person", "organization", "project"];
|
|
597
|
+
var WORD2 = "^[a-z0-9][a-z0-9_-]{0,62}$";
|
|
598
|
+
var TYPE = "^(invoice|payment|person|organization|project|custom:[a-z0-9][a-z0-9_-]{0,62})$";
|
|
599
|
+
var MAX_ID = 512;
|
|
600
|
+
var MAX_FIELDS_BYTES = 65536;
|
|
601
|
+
var MAX_RELATIONS = 100;
|
|
602
|
+
var RECORDS_ENVELOPE_SCHEMA = {
|
|
603
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
604
|
+
title: "WireCat records envelope, version 1",
|
|
605
|
+
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.",
|
|
606
|
+
type: "object",
|
|
607
|
+
required: ["schema_version", "source", "records"],
|
|
608
|
+
additionalProperties: false,
|
|
609
|
+
properties: {
|
|
610
|
+
schema_version: { const: RECORDS_SCHEMA_VERSION },
|
|
611
|
+
source: { $ref: "#/$defs/source" },
|
|
612
|
+
records: { type: "array", items: { $ref: "#/$defs/record" } }
|
|
613
|
+
},
|
|
614
|
+
$defs: {
|
|
615
|
+
source: {
|
|
616
|
+
type: "object",
|
|
617
|
+
required: ["provider", "account", "batch_id"],
|
|
618
|
+
additionalProperties: false,
|
|
619
|
+
properties: {
|
|
620
|
+
provider: { type: "string", pattern: WORD2, description: "The system the records come from" },
|
|
621
|
+
account: { type: "string", minLength: 1, maxLength: MAX_ID, description: "The account in that system" },
|
|
622
|
+
batch_id: { type: "string", minLength: 1, maxLength: MAX_ID, description: "This import, for the receipt" }
|
|
623
|
+
}
|
|
624
|
+
},
|
|
625
|
+
record: {
|
|
626
|
+
type: "object",
|
|
627
|
+
required: ["key", "type", "external_id", "operation"],
|
|
628
|
+
additionalProperties: false,
|
|
629
|
+
properties: {
|
|
630
|
+
key: { type: "string", minLength: 1, maxLength: MAX_ID },
|
|
631
|
+
type: { type: "string", pattern: TYPE },
|
|
632
|
+
external_id: { type: "string", minLength: 1, maxLength: MAX_ID },
|
|
633
|
+
operation: { enum: [...RECORD_OPERATIONS] },
|
|
634
|
+
fields: {
|
|
635
|
+
type: "object",
|
|
636
|
+
description: "What the source says, as data: never secrets, never instructions"
|
|
637
|
+
},
|
|
638
|
+
revision: { type: "integer", minimum: 0, maximum: Number.MAX_SAFE_INTEGER },
|
|
639
|
+
relations: { type: "array", maxItems: MAX_RELATIONS, items: { $ref: "#/$defs/relation" } }
|
|
640
|
+
}
|
|
641
|
+
},
|
|
642
|
+
relation: {
|
|
643
|
+
type: "object",
|
|
644
|
+
required: ["role", "type", "external_id"],
|
|
645
|
+
additionalProperties: false,
|
|
646
|
+
properties: {
|
|
647
|
+
role: { type: "string", pattern: WORD2 },
|
|
648
|
+
type: { type: "string", pattern: TYPE },
|
|
649
|
+
external_id: { type: "string", minLength: 1, maxLength: MAX_ID }
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
};
|
|
654
|
+
var wordPattern = new RegExp(WORD2);
|
|
655
|
+
var typePattern = new RegExp(TYPE);
|
|
656
|
+
var isObject = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null && !Array.isArray(value), "isObject");
|
|
657
|
+
var escapePointer = /* @__PURE__ */ __name((segment) => String(segment).replaceAll("~", "~0").replaceAll("/", "~1"), "escapePointer");
|
|
658
|
+
var pointerOf = /* @__PURE__ */ __name((...segments) => segments.map((s) => `/${escapePointer(s)}`).join(""), "pointerOf");
|
|
659
|
+
var idText = /* @__PURE__ */ __name((value) => typeof value === "string" && value.trim() !== "" && value.length <= MAX_ID && !value.includes("\0"), "idText");
|
|
660
|
+
var extraKeys = /* @__PURE__ */ __name((value, allowed) => Object.keys(value).filter((key) => !allowed.includes(key)), "extraKeys");
|
|
661
|
+
var secretIn = /* @__PURE__ */ __name((value, at) => {
|
|
662
|
+
if (typeof value === "string")
|
|
663
|
+
return holdsCredential(value) ? at : void 0;
|
|
664
|
+
if (Array.isArray(value)) {
|
|
665
|
+
for (const [index, item] of value.entries()) {
|
|
666
|
+
const found = secretIn(item, [...at, index]);
|
|
667
|
+
if (found)
|
|
668
|
+
return found;
|
|
669
|
+
}
|
|
670
|
+
return void 0;
|
|
671
|
+
}
|
|
672
|
+
if (!isObject(value))
|
|
673
|
+
return void 0;
|
|
674
|
+
for (const [key, item] of Object.entries(value)) {
|
|
675
|
+
if (secretNamed(key))
|
|
676
|
+
return [...at, key];
|
|
677
|
+
const found = secretIn(item, [...at, key]);
|
|
678
|
+
if (found)
|
|
679
|
+
return found;
|
|
680
|
+
}
|
|
681
|
+
return void 0;
|
|
682
|
+
}, "secretIn");
|
|
683
|
+
var relationErrors = /* @__PURE__ */ __name((relations, at) => {
|
|
684
|
+
if (relations === void 0)
|
|
685
|
+
return [];
|
|
686
|
+
if (!Array.isArray(relations) || relations.length > MAX_RELATIONS)
|
|
687
|
+
return [invalid3(at, `relations is a list of at most ${MAX_RELATIONS}`)];
|
|
688
|
+
return relations.flatMap((relation, index) => {
|
|
689
|
+
const here = [...at, index];
|
|
690
|
+
if (!isObject(relation))
|
|
691
|
+
return [invalid3(here, "a relation is an object")];
|
|
692
|
+
const extra = extraKeys(relation, ["role", "type", "external_id"]);
|
|
693
|
+
if (extra.length > 0)
|
|
694
|
+
return [invalid3([...here, extra[0]], "a relation holds role, type and external_id")];
|
|
695
|
+
if (typeof relation.role !== "string" || !wordPattern.test(relation.role))
|
|
696
|
+
return [invalid3([...here, "role"], "a role is lowercase letters, digits, - and _")];
|
|
697
|
+
if (typeof relation.type !== "string" || !typePattern.test(relation.type))
|
|
698
|
+
return [invalid3([...here, "type"], `a type is one of ${RECORD_ENTITY_TYPES.join(", ")} or custom:<name>`)];
|
|
699
|
+
if (!idText(relation.external_id))
|
|
700
|
+
return [invalid3([...here, "external_id"], `an external id takes 1\u2013${MAX_ID} characters`)];
|
|
701
|
+
return [];
|
|
702
|
+
});
|
|
703
|
+
}, "relationErrors");
|
|
704
|
+
var invalid3 = /* @__PURE__ */ __name((at, message, code = "record.invalid") => ({
|
|
705
|
+
pointer: pointerOf(...at),
|
|
706
|
+
code,
|
|
707
|
+
message
|
|
708
|
+
}), "invalid");
|
|
709
|
+
var recordErrors = /* @__PURE__ */ __name((record, index) => {
|
|
710
|
+
const at = ["records", index];
|
|
711
|
+
if (!isObject(record))
|
|
712
|
+
return [invalid3(at, "a record is an object")];
|
|
713
|
+
const key = typeof record.key === "string" ? record.key : void 0;
|
|
714
|
+
const withKey = /* @__PURE__ */ __name((errors) => errors.map((error) => key === void 0 ? error : { ...error, key }), "withKey");
|
|
715
|
+
const extra = extraKeys(record, ["key", "type", "external_id", "operation", "fields", "revision", "relations"]);
|
|
716
|
+
if (extra.length > 0)
|
|
717
|
+
return withKey([invalid3([...at, extra[0]], `a record has no ${extra[0]}`)]);
|
|
718
|
+
if (!idText(record.key))
|
|
719
|
+
return [invalid3([...at, "key"], `a key takes 1\u2013${MAX_ID} characters`)];
|
|
720
|
+
if (typeof record.type !== "string" || !typePattern.test(record.type))
|
|
721
|
+
return withKey([
|
|
722
|
+
invalid3([...at, "type"], `a type is one of ${RECORD_ENTITY_TYPES.join(", ")} or custom:<name>`, "record.type")
|
|
723
|
+
]);
|
|
724
|
+
if (!idText(record.external_id))
|
|
725
|
+
return withKey([invalid3([...at, "external_id"], `an external id takes 1\u2013${MAX_ID} characters`)]);
|
|
726
|
+
if (!RECORD_OPERATIONS.includes(record.operation))
|
|
727
|
+
return withKey([invalid3([...at, "operation"], "an operation is upsert or delete")]);
|
|
728
|
+
if (record.revision !== void 0 && (typeof record.revision !== "number" || !Number.isSafeInteger(record.revision) || record.revision < 0))
|
|
729
|
+
return withKey([invalid3([...at, "revision"], "a revision is a whole number, 0 or more")]);
|
|
730
|
+
if (record.operation === "upsert" && !isObject(record.fields))
|
|
731
|
+
return withKey([invalid3([...at, "fields"], "an upsert carries its fields as an object")]);
|
|
732
|
+
if (record.fields !== void 0 && !isObject(record.fields))
|
|
733
|
+
return withKey([invalid3([...at, "fields"], "fields is an object")]);
|
|
734
|
+
if (record.fields !== void 0 && Buffer.byteLength(JSON.stringify(record.fields)) > MAX_FIELDS_BYTES)
|
|
735
|
+
return withKey([invalid3([...at, "fields"], `fields take at most ${MAX_FIELDS_BYTES} bytes`, "record.too-large")]);
|
|
736
|
+
const secret = record.fields === void 0 ? void 0 : secretIn(record.fields, [...at, "fields"]);
|
|
737
|
+
if (secret)
|
|
738
|
+
return withKey([
|
|
739
|
+
invalid3(secret, "a secret never goes into the store: drop this field at the source", "record.secret-field")
|
|
740
|
+
]);
|
|
741
|
+
return withKey(relationErrors(record.relations, [...at, "relations"]));
|
|
742
|
+
}, "recordErrors");
|
|
743
|
+
var envelopeErrors = /* @__PURE__ */ __name((envelope, account) => {
|
|
744
|
+
if (!isObject(envelope))
|
|
745
|
+
return [invalid3([], "an envelope is an object", "envelope.invalid")];
|
|
746
|
+
const extra = extraKeys(envelope, ["schema_version", "source", "records"]);
|
|
747
|
+
if (extra.length > 0)
|
|
748
|
+
return [invalid3([extra[0]], `an envelope has no ${extra[0]}`, "envelope.invalid")];
|
|
749
|
+
if (envelope.schema_version !== RECORDS_SCHEMA_VERSION)
|
|
750
|
+
return [
|
|
751
|
+
invalid3(["schema_version"], `this build reads schema_version ${RECORDS_SCHEMA_VERSION}, not ${JSON.stringify(envelope.schema_version)}`, "envelope.schema-version")
|
|
752
|
+
];
|
|
753
|
+
const { source } = envelope;
|
|
754
|
+
if (!isObject(source))
|
|
755
|
+
return [invalid3(["source"], "source is an object", "envelope.invalid")];
|
|
756
|
+
const sourceExtra = extraKeys(source, ["provider", "account", "batch_id"]);
|
|
757
|
+
if (sourceExtra.length > 0)
|
|
758
|
+
return [
|
|
759
|
+
invalid3(["source", sourceExtra[0]], "source holds provider, account and batch_id", "envelope.invalid")
|
|
760
|
+
];
|
|
761
|
+
if (typeof source.provider !== "string" || !wordPattern.test(source.provider))
|
|
762
|
+
return [invalid3(["source", "provider"], "a provider is lowercase letters, digits, - and _", "envelope.invalid")];
|
|
763
|
+
if (!idText(source.account))
|
|
764
|
+
return [invalid3(["source", "account"], `an account takes 1\u2013${MAX_ID} characters`, "envelope.invalid")];
|
|
765
|
+
if (!idText(source.batch_id))
|
|
766
|
+
return [invalid3(["source", "batch_id"], `a batch id takes 1\u2013${MAX_ID} characters`, "envelope.invalid")];
|
|
767
|
+
if (source.account !== account)
|
|
768
|
+
return [
|
|
769
|
+
invalid3(["source", "account"], `the envelope is for account ${JSON.stringify(source.account)}, the import for ${JSON.stringify(account)}`, "envelope.account-mismatch")
|
|
770
|
+
];
|
|
771
|
+
if (!Array.isArray(envelope.records))
|
|
772
|
+
return [invalid3(["records"], "records is a list", "envelope.invalid")];
|
|
773
|
+
return [];
|
|
774
|
+
}, "envelopeErrors");
|
|
775
|
+
var canonical = /* @__PURE__ */ __name((value) => {
|
|
776
|
+
if (Array.isArray(value))
|
|
777
|
+
return value.map(canonical);
|
|
778
|
+
if (!isObject(value))
|
|
779
|
+
return value;
|
|
780
|
+
return Object.fromEntries(Object.keys(value).sort().map((key) => [key, canonical(value[key])]));
|
|
781
|
+
}, "canonical");
|
|
782
|
+
var recordFingerprint = /* @__PURE__ */ __name((fields, relations) => createHash("sha256").update(JSON.stringify(canonical({
|
|
783
|
+
fields,
|
|
784
|
+
relations: relations.map((relation) => [relation.role, relation.type, relation.external_id]).sort((a, b) => a.join("\0").localeCompare(b.join("\0")))
|
|
785
|
+
}))).digest("hex"), "recordFingerprint");
|
|
786
|
+
var envelopeOfJsonl = /* @__PURE__ */ __name((text) => {
|
|
787
|
+
const lines = text.split(/\r?\n/);
|
|
788
|
+
const first = lines.findIndex((line) => line.trim() !== "");
|
|
789
|
+
if (first < 0)
|
|
790
|
+
return {};
|
|
791
|
+
const parse = /* @__PURE__ */ __name((line) => {
|
|
792
|
+
try {
|
|
793
|
+
return JSON.parse(line);
|
|
794
|
+
} catch {
|
|
795
|
+
return line;
|
|
796
|
+
}
|
|
797
|
+
}, "parse");
|
|
798
|
+
const header = parse(lines[first]);
|
|
799
|
+
const records = [];
|
|
800
|
+
for (let at = first + 1; at < lines.length; at++) {
|
|
801
|
+
const line = lines[at];
|
|
802
|
+
if (line.trim() !== "")
|
|
803
|
+
records.push(parse(line));
|
|
804
|
+
}
|
|
805
|
+
return isObject(header) ? { ...header, records } : header;
|
|
806
|
+
}, "envelopeOfJsonl");
|
|
807
|
+
|
|
472
808
|
export {
|
|
473
809
|
formatLocator,
|
|
474
810
|
isLocator,
|
|
@@ -505,6 +841,25 @@ export {
|
|
|
505
841
|
counterObservationTime,
|
|
506
842
|
observedCounters,
|
|
507
843
|
counterFreshness,
|
|
844
|
+
CURRENCY_SCALES,
|
|
845
|
+
parseDecimal,
|
|
846
|
+
formatDecimal,
|
|
847
|
+
currencyOf,
|
|
848
|
+
scaleOf,
|
|
849
|
+
minorUnits,
|
|
850
|
+
moneyOf,
|
|
851
|
+
moneyLabel,
|
|
852
|
+
quantityOf,
|
|
853
|
+
lineUnits,
|
|
854
|
+
INVOICE_DIRECTIONS,
|
|
855
|
+
INVOICE_STATUSES,
|
|
856
|
+
MONEY_DIRECTIONS,
|
|
857
|
+
FINANCE_REVIEWS,
|
|
858
|
+
settledStatus,
|
|
859
|
+
invoiceLine,
|
|
860
|
+
paymentLine,
|
|
861
|
+
invoiceTitle,
|
|
862
|
+
paymentEntryTitle,
|
|
508
863
|
MESSAGE_MEASURES,
|
|
509
864
|
AUTHOR_MEASURES,
|
|
510
865
|
needsRankingContext,
|
|
@@ -512,5 +867,14 @@ export {
|
|
|
512
867
|
rankingScore,
|
|
513
868
|
RANKING_TOKENIZER_VERSION,
|
|
514
869
|
rankingWords,
|
|
515
|
-
rankingQuestion
|
|
870
|
+
rankingQuestion,
|
|
871
|
+
RECORDS_SCHEMA_VERSION,
|
|
872
|
+
RECORD_OPERATIONS,
|
|
873
|
+
RECORD_ENTITY_TYPES,
|
|
874
|
+
RECORDS_ENVELOPE_SCHEMA,
|
|
875
|
+
pointerOf,
|
|
876
|
+
recordErrors,
|
|
877
|
+
envelopeErrors,
|
|
878
|
+
recordFingerprint,
|
|
879
|
+
envelopeOfJsonl
|
|
516
880
|
};
|
|
@@ -0,0 +1,37 @@
|
|
|
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.570.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_093219d088c44dcb3d8868e1fe992f3e/node_modules/@wirecat/cli-core/dist/cli/messenger/private-files.js
|
|
8
|
+
import { existsSync, statSync } from "node:fs";
|
|
9
|
+
var shellQuoted = /* @__PURE__ */ __name((path) => `'${path.replaceAll("'", `'\\''`)}'`, "shellQuoted");
|
|
10
|
+
var privateFiles = /* @__PURE__ */ __name(({ files, dirs }, platform = process.platform) => {
|
|
11
|
+
if (platform === "win32")
|
|
12
|
+
return { checked: false, reason: "Windows has no Unix file modes" };
|
|
13
|
+
const problems = [];
|
|
14
|
+
const check = /* @__PURE__ */ __name((path, want, folder) => {
|
|
15
|
+
if (!existsSync(path))
|
|
16
|
+
return;
|
|
17
|
+
const stat = statSync(path);
|
|
18
|
+
if (stat.isDirectory() !== folder)
|
|
19
|
+
return;
|
|
20
|
+
const mode = stat.mode & 511;
|
|
21
|
+
if ((mode & 63) === 0)
|
|
22
|
+
return;
|
|
23
|
+
const octal = /* @__PURE__ */ __name((value) => `0${value.toString(8)}`, "octal");
|
|
24
|
+
problems.push({ path, mode: octal(mode), want: octal(want), fix: `chmod ${want.toString(8)} ${shellQuoted(path)}` });
|
|
25
|
+
}, "check");
|
|
26
|
+
for (const file of files)
|
|
27
|
+
check(file, 384, false);
|
|
28
|
+
for (const dir of dirs)
|
|
29
|
+
check(dir, 448, true);
|
|
30
|
+
return { checked: true, ok: problems.length === 0, problems };
|
|
31
|
+
}, "privateFiles");
|
|
32
|
+
var withSqliteSidecars = /* @__PURE__ */ __name((path) => [path, `${path}-wal`, `${path}-shm`], "withSqliteSidecars");
|
|
33
|
+
|
|
34
|
+
export {
|
|
35
|
+
privateFiles,
|
|
36
|
+
withSqliteSidecars
|
|
37
|
+
};
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
agentOf,
|
|
30
30
|
clientHash,
|
|
31
31
|
currentCaller
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-LKJXTACE.js";
|
|
33
33
|
import {
|
|
34
34
|
__name
|
|
35
35
|
} from "./chunk-ZVVMGPBJ.js";
|
|
@@ -541,7 +541,7 @@ function toError(value) {
|
|
|
541
541
|
}
|
|
542
542
|
__name(toError, "toError");
|
|
543
543
|
|
|
544
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
544
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.570.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_093219d088c44dcb3d8868e1fe992f3e/node_modules/@wirecat/cli-core/dist/mcp/caller.js
|
|
545
545
|
var callingAgent = /* @__PURE__ */ __name((fallback, caller = currentCaller()) => {
|
|
546
546
|
const client = caller?.agent?.client?.name;
|
|
547
547
|
if (client && client !== "unknown")
|
|
@@ -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.77.1_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/"))
|
|
@@ -5,15 +5,15 @@ import {
|
|
|
5
5
|
} from "./chunk-Y5E2WNWB.js";
|
|
6
6
|
import {
|
|
7
7
|
CliError
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-WZ5XK74U.js";
|
|
9
9
|
import {
|
|
10
10
|
__name
|
|
11
11
|
} from "./chunk-ZVVMGPBJ.js";
|
|
12
12
|
|
|
13
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.570.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_093219d088c44dcb3d8868e1fe992f3e/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.
|
|
16
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.570.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_093219d088c44dcb3d8868e1fe992f3e/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.
|
|
73
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.570.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_093219d088c44dcb3d8868e1fe992f3e/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) => {
|
|
@@ -2,31 +2,31 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
updateCommand
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-4UVT2QCO.js";
|
|
6
6
|
import {
|
|
7
7
|
QUESTIONS,
|
|
8
8
|
readSetupAnswers,
|
|
9
9
|
unanswered,
|
|
10
10
|
writeSetupAnswers
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-EUPZSR2G.js";
|
|
12
12
|
import {
|
|
13
13
|
DEFAULT_STEMMERS,
|
|
14
14
|
LANGUAGES
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-VFIEYRYD.js";
|
|
16
16
|
import {
|
|
17
17
|
sharedConfigPath
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-OTMGAKUM.js";
|
|
19
19
|
import {
|
|
20
20
|
storePath
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-6AJDVJVZ.js";
|
|
22
22
|
import {
|
|
23
23
|
installerOf
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-KV4267S4.js";
|
|
25
25
|
import {
|
|
26
26
|
__name
|
|
27
27
|
} from "./chunk-ZVVMGPBJ.js";
|
|
28
28
|
|
|
29
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.570.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_093219d088c44dcb3d8868e1fe992f3e/node_modules/@wirecat/cli-core/dist/cli/first-run.js
|
|
30
30
|
import { spawnSync } from "node:child_process";
|
|
31
31
|
import { accessSync, constants, realpathSync } from "node:fs";
|
|
32
32
|
import { delimiter, join } from "node:path";
|
|
@@ -84,7 +84,7 @@ var suggested = /* @__PURE__ */ __name((env, contentLanguages) => {
|
|
|
84
84
|
return (own.length ? own : LANGUAGES.filter(({ code }) => code === "en" || code === system)).map(({ name }) => name);
|
|
85
85
|
}, "suggested");
|
|
86
86
|
var askLanguages = /* @__PURE__ */ __name(async ({ command, env, io, contentLanguages }) => {
|
|
87
|
-
const { openStore } = await import("./store-
|
|
87
|
+
const { openStore } = await import("./store-ZTDZ6UY5.js");
|
|
88
88
|
const store = await openStore({ env });
|
|
89
89
|
let rebuild = false;
|
|
90
90
|
try {
|
|
@@ -113,8 +113,8 @@ var askLanguages = /* @__PURE__ */ __name(async ({ command, env, io, contentLang
|
|
|
113
113
|
if (!rebuild)
|
|
114
114
|
return;
|
|
115
115
|
const [{ openCache }, { buildStems }] = await Promise.all([
|
|
116
|
-
import("./open-
|
|
117
|
-
import("./store-maintenance-command-
|
|
116
|
+
import("./open-MIL2TOT6.js"),
|
|
117
|
+
import("./store-maintenance-command-AU73UVUQ.js")
|
|
118
118
|
]);
|
|
119
119
|
const database = await openCache(storePath(env));
|
|
120
120
|
try {
|
|
@@ -126,7 +126,7 @@ var askLanguages = /* @__PURE__ */ __name(async ({ command, env, io, contentLang
|
|
|
126
126
|
var askTools = /* @__PURE__ */ __name(async (run) => {
|
|
127
127
|
const { command, env, io } = run;
|
|
128
128
|
const installed = run.installed ?? ((name) => onPath(name, env));
|
|
129
|
-
const { WIRECAT_TOOLS } = await import("./first-screen-
|
|
129
|
+
const { WIRECAT_TOOLS } = await import("./first-screen-PGFIXJAX.js");
|
|
130
130
|
const others = WIRECAT_TOOLS.filter((tool) => tool.command !== command);
|
|
131
131
|
const missing = others.filter((tool) => !installed(tool.command));
|
|
132
132
|
io.say("Other WireCat tools \u2014 they share this store, so one search finds everything:");
|
|
@@ -199,7 +199,7 @@ var setupAtStart = /* @__PURE__ */ __name(async (start) => {
|
|
|
199
199
|
contentLanguages: start.contentLanguages,
|
|
200
200
|
all: start.path[0] === "setup",
|
|
201
201
|
io: {
|
|
202
|
-
ask: /* @__PURE__ */ __name(async (prompt) => (await import("./prompt-
|
|
202
|
+
ask: /* @__PURE__ */ __name(async (prompt) => (await import("./prompt-J4QPFLEA.js")).readSecret(prompt, { input, echo: true }), "ask"),
|
|
203
203
|
say: /* @__PURE__ */ __name((text) => process.stderr.write(`${text}
|
|
204
204
|
`), "say")
|
|
205
205
|
}
|