@wirecat/zoom-cli 0.65.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/bin/zm.js.map +1 -1
- package/dist/bundle/{all-profiles-SKMLZJSY.js → all-profiles-SEW2VL76.js} +12 -8
- package/dist/bundle/answer-policy-5OYUL6UF.js +103 -0
- package/dist/bundle/{anthropic-TVHK7CY2.js → anthropic-FSNASJML.js} +7 -4
- package/dist/bundle/{app-server-44ASFH47.js → app-server-EVSRYJ3H.js} +66 -59
- package/dist/bundle/{bun-O4WHGL2F.js → bun-DACL5SVO.js} +2 -2
- package/dist/bundle/{bun-sqlite-NS32GMM4.js → bun-sqlite-HQ2KOXSI.js} +6 -3
- package/dist/bundle/chunk-2UW533HQ.js +166 -0
- package/dist/bundle/{chunk-FYJL276J.js → chunk-3GO3KME7.js} +3 -3
- package/dist/bundle/{chunk-Z5424QL6.js → chunk-3ZIHUSMM.js} +2 -2
- package/dist/bundle/{chunk-MRWIXUYT.js → chunk-4GCKDO2H.js} +5 -3
- package/dist/bundle/{chunk-7SQJCKR6.js → chunk-4KDZ22RA.js} +1 -1
- package/dist/bundle/{chunk-25IDWPEN.js → chunk-4U2555EQ.js} +35 -31
- package/dist/bundle/{chunk-UKU6MYUI.js → chunk-4UVT2QCO.js} +9 -20
- package/dist/bundle/{chunk-ZOGYTDHG.js → chunk-4ZR5DJ26.js} +5 -3
- package/dist/bundle/{chunk-CVCRQW3A.js → chunk-54RTMQL6.js} +4 -4
- package/dist/bundle/chunk-6AJDVJVZ.js +35 -0
- package/dist/bundle/chunk-6IBM4Z3V.js +34 -0
- package/dist/bundle/{chunk-CNEE6TPE.js → chunk-6TZF2JP7.js} +13 -13
- package/dist/bundle/{chunk-QLCYAQ66.js → chunk-6UFWFKFH.js} +2 -2
- package/dist/bundle/chunk-6VFORXL3.js +101 -0
- package/dist/bundle/{chunk-M6IDHQ7N.js → chunk-7HAIM7GV.js} +1633 -683
- package/dist/bundle/{chunk-FYM27FCG.js → chunk-7K5TDTZY.js} +13 -7
- package/dist/bundle/{chunk-NO24PJNW.js → chunk-7LLUUXJB.js} +1 -1
- package/dist/bundle/{chunk-VJTGYBJJ.js → chunk-7VU5UGRR.js} +37 -29
- package/dist/bundle/{chunk-ZH743WNV.js → chunk-AAZFLJSH.js} +25 -24
- package/dist/bundle/{chunk-DYJXAY7Q.js → chunk-ASCHAVNW.js} +35 -27
- package/dist/bundle/{chunk-EA63UGWE.js → chunk-B3KWAULD.js} +2 -2
- package/dist/bundle/{chunk-H7762LDA.js → chunk-B5Z4XPVS.js} +2 -2
- package/dist/bundle/{chunk-UPJXN2CO.js → chunk-BKY4XVB4.js} +1787 -1224
- package/dist/bundle/{chunk-QI7BZS2G.js → chunk-C6UKW7JO.js} +6 -6
- package/dist/bundle/{chunk-U3ZUT557.js → chunk-CLEZE65P.js} +1 -1
- package/dist/bundle/{chunk-37PHGASE.js → chunk-CRLBTNC4.js} +5 -3
- package/dist/bundle/{chunk-VH4F2EK4.js → chunk-D4KBD63W.js} +1 -1
- package/dist/bundle/{chunk-DNCKH7CO.js → chunk-D6OXI2NV.js} +17 -17
- package/dist/bundle/{chunk-LPUFOWL3.js → chunk-D72URWJE.js} +1 -39
- package/dist/bundle/{chunk-GMTXCFI7.js → chunk-DFUPETW7.js} +449 -308
- package/dist/bundle/{chunk-VW2SW7ME.js → chunk-DG4DWAU7.js} +3 -3
- package/dist/bundle/{chunk-U5ASRBBF.js → chunk-EPDRF66S.js} +4 -4
- package/dist/bundle/{chunk-BNXH73OU.js → chunk-EQ7XRRKV.js} +14 -12
- package/dist/bundle/{chunk-5NGOP4EZ.js → chunk-ESFMHBHH.js} +38 -35
- package/dist/bundle/{chunk-GEX4V5TM.js → chunk-EUPZSR2G.js} +4 -4
- package/dist/bundle/{chunk-KZE3G4ZT.js → chunk-FGTPREAZ.js} +58 -54
- package/dist/bundle/{chunk-MH7AWCB4.js → chunk-FWU3ZYHE.js} +68 -64
- package/dist/bundle/{chunk-MPKKIL3U.js → chunk-FXQPK742.js} +63 -21
- package/dist/bundle/{chunk-PV3UDPCI.js → chunk-GP4NSYDU.js} +20 -14
- package/dist/bundle/{chunk-ZFNM3FNI.js → chunk-I7SOXH64.js} +75 -38
- package/dist/bundle/{chunk-S4GDDO5S.js → chunk-IFDO3YPJ.js} +1 -1
- package/dist/bundle/{chunk-LOL6JYYN.js → chunk-J3ZBEWQY.js} +375 -9
- package/dist/bundle/chunk-JVCHGI7W.js +37 -0
- package/dist/bundle/{chunk-MZ6U6HNJ.js → chunk-KANH7GBB.js} +2 -2
- package/dist/bundle/{chunk-3CZIWGZ6.js → chunk-KIJLM5UL.js} +1 -1
- package/dist/bundle/chunk-KV4267S4.js +23 -0
- package/dist/bundle/{chunk-266WOOB3.js → chunk-KWRSC6O6.js} +6 -6
- package/dist/bundle/{chunk-C6BG57FA.js → chunk-L643D4RJ.js} +14 -12
- package/dist/bundle/{chunk-IPTI3Y2E.js → chunk-L6CAUVMU.js} +7 -5
- package/dist/bundle/{chunk-MIB5X2XW.js → chunk-L6WUAGPN.js} +5 -5
- package/dist/bundle/{chunk-BWRBALXG.js → chunk-LFQ73UFK.js} +3 -3
- package/dist/bundle/{chunk-GBZF4IIP.js → chunk-LKJXTACE.js} +10 -89
- package/dist/bundle/{chunk-T3KICUOK.js → chunk-LM26DJOK.js} +8 -8
- package/dist/bundle/{chunk-GXCNCMUY.js → chunk-M43MBWJX.js} +3260 -1263
- package/dist/bundle/{chunk-TC7PD3LH.js → chunk-MWEOVTIF.js} +4 -4
- package/dist/bundle/chunk-NTZDM5SJ.js +2462 -0
- package/dist/bundle/{chunk-ERPRAYA7.js → chunk-OTMGAKUM.js} +11 -7
- package/dist/bundle/chunk-OZEYFJX2.js +93 -0
- package/dist/bundle/{chunk-NJSIHMAE.js → chunk-Q65SDEFN.js} +4 -4
- package/dist/bundle/{chunk-UMHJZWZU.js → chunk-QEI55M2F.js} +12 -10
- package/dist/bundle/{chunk-SQWRZZOQ.js → chunk-QX2MAT6I.js} +3 -3
- package/dist/bundle/{chunk-ZXGRK44F.js → chunk-RAMPYIO2.js} +17 -12
- package/dist/bundle/{chunk-BLT3LR3U.js → chunk-RYKG6AEH.js} +1 -1
- package/dist/bundle/{chunk-WLSF3GCC.js → chunk-SCFFCIIP.js} +4 -2
- package/dist/bundle/{chunk-2H5SXK7K.js → chunk-SMVO5R3T.js} +21 -19
- package/dist/bundle/{chunk-Y3EIK4XW.js → chunk-SOZVC3SV.js} +1 -1
- package/dist/bundle/{chunk-6CS7ETBK.js → chunk-SSXCOUP3.js} +1114 -282
- package/dist/bundle/{chunk-R5BAF5XE.js → chunk-SXFODCYK.js} +1 -1
- package/dist/bundle/{chunk-JF7ZEUXU.js → chunk-T6CZWSHF.js} +136 -2540
- package/dist/bundle/{chunk-KYLS5QGC.js → chunk-TBRG2DPE.js} +2 -2
- package/dist/bundle/{chunk-K6ATTKQR.js → chunk-V33VGWT3.js} +5 -5
- package/dist/bundle/{chunk-RZLNHNSS.js → chunk-VFIEYRYD.js} +8 -8
- package/dist/bundle/{chunk-OXUHTKO2.js → chunk-VNIBTNV4.js} +3 -2
- package/dist/bundle/{chunk-ZREFYKUB.js → chunk-VQTAU4DV.js} +13 -11
- package/dist/bundle/{chunk-NNNEVWFF.js → chunk-WHQ4ZCJI.js} +57 -34
- package/dist/bundle/chunk-WZ5XK74U.js +46 -0
- package/dist/bundle/{chunk-XJQB47IL.js → chunk-X67YD3QI.js} +6 -6
- package/dist/bundle/chunk-YPF6OS37.js +46 -0
- package/dist/bundle/{chunk-AMMD6YCJ.js → chunk-YRNZT4GQ.js} +7 -7
- package/dist/bundle/{chunk-TUIEDVI6.js → chunk-Z3WXI4DK.js} +5 -3
- package/dist/bundle/{chunk-U4RVOSX3.js → chunk-ZMPTO2WB.js} +1 -1
- package/dist/bundle/{chunk-24F7JBLY.js → chunk-ZRMZBMOF.js} +69 -9
- package/dist/bundle/{cli-FDO6CP6R.js → cli-YUATSOLA.js} +113 -81
- package/dist/bundle/command-contract-UWHY55UE.js +41 -0
- package/dist/bundle/config-TGF6E6ZD.js +89 -0
- package/dist/bundle/{decode-7SZI3TGZ.js → decode-IL44LNC3.js} +6 -3
- package/dist/bundle/dispatch-3BGIXSJR.js +412 -0
- package/dist/bundle/{dist-5GWUXW27.js → dist-3W27UQ2S.js} +48 -16
- package/dist/bundle/{echarts-FMACRZQC.js → echarts-CO4D26JF.js} +2 -2
- package/dist/bundle/{embed-24YSXHLP.js → embed-XH2X4DFM.js} +7 -4
- package/dist/bundle/{embedder-MEXN2TFB.js → embedder-WTFWDXBJ.js} +12 -9
- package/dist/bundle/failure-HTIS3NLS.js +25 -0
- package/dist/bundle/first-run-5RBH7FDO.js +28 -0
- package/dist/bundle/first-screen-PGFIXJAX.js +39 -0
- package/dist/bundle/{folders-DBAAMU26.js → folders-F4DNQPIY.js} +5 -2
- package/dist/bundle/{instructions-E5FXYCWF.js → instructions-EPPBL6TT.js} +1 -1
- package/dist/bundle/{main-EIUCXXDW.js → main-LVQTCDZS.js} +31 -25
- package/dist/bundle/{mcp-FUSDPAOL.js → mcp-PPVOM4SE.js} +5 -3
- package/dist/bundle/{meetings-JDTRGXZJ.js → meetings-BMELXRTR.js} +31 -4
- package/dist/bundle/{node-4SNKUPXT.js → node-CQVMWVIG.js} +2 -2
- package/dist/bundle/{node-sqlite-O4BAODFR.js → node-sqlite-QQEX7LZT.js} +7 -4
- package/dist/bundle/{oauth-3YLHXGUW.js → oauth-AYGX7CQS.js} +8 -5
- package/dist/bundle/{open-QGRMSNM2.js → open-MIL2TOT6.js} +6 -3
- package/dist/bundle/openai-7QZZXQW5.js +25 -0
- package/dist/bundle/{output-file-J26UQKRA.js → output-file-4XADZPYH.js} +7 -4
- package/dist/bundle/{process-HQZOTT6U.js → process-NJVQK6GB.js} +1 -1
- package/dist/bundle/{program-47DT7SHE.js → program-WUYRS6H7.js} +191 -135
- package/dist/bundle/{prompt-IUD7HCDC.js → prompt-J4QPFLEA.js} +6 -3
- package/dist/bundle/{recognize-DMJJHHXF.js → recognize-OLJZVNWW.js} +5 -2
- package/dist/bundle/{remote-5WFSOVVB.js → remote-JPUXNYLV.js} +8 -5
- package/dist/bundle/{rerank-UKQ65ECH.js → rerank-XVV3X5TT.js} +8 -5
- package/dist/bundle/run-log-DJXBEVS5.js +118 -0
- package/dist/bundle/{serve-WAOSED3I.js → serve-NYYUO3MR.js} +16 -13
- package/dist/bundle/{server-NWZFNXC5.js → server-4Z5E4YTT.js} +48 -42
- package/dist/bundle/server-VW5UVCH7.js +72 -0
- package/dist/bundle/{services-VPANRE72.js → services-EKWM76HP.js} +50 -28
- package/dist/bundle/{speech-O6UNUDRW.js → speech-WFJ44ACJ.js} +14 -11
- package/dist/bundle/{state-BNE7I65A.js → state-VIRCT4VW.js} +7 -4
- package/dist/bundle/{store-4IIVSCJ4.js → store-2Q4GEZJS.js} +30 -18
- package/dist/bundle/{store-QQH4FJXJ.js → store-ZTDZ6UY5.js} +20 -14
- package/dist/bundle/store-connection-FKVVQLEF.js +83 -0
- package/dist/bundle/store-maintenance-command-AU73UVUQ.js +62 -0
- package/dist/bundle/{streaming-S4EZB6P2.js → streaming-7BPKIGAS.js} +7 -4
- package/dist/bundle/{tokens-VCXIH7WZ.js → tokens-CQHMMKNX.js} +7 -4
- package/dist/bundle/zm.js +150 -1
- 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 +6 -4
- package/skills/zoom-cli/SKILL.md +4 -1
- package/dist/bundle/answer-policy-BHDNSJWX.js +0 -96
- package/dist/bundle/chunk-A6OA2EH2.js +0 -18
- package/dist/bundle/command-contract-O4FDXM4U.js +0 -37
- package/dist/bundle/config-UBHKZG3J.js +0 -78
- package/dist/bundle/first-run-OCVEJH63.js +0 -23
- package/dist/bundle/first-screen-KJIU25MH.js +0 -35
- package/dist/bundle/openai-7PSCSTH7.js +0 -22
- package/dist/bundle/run-log-UGYL6NW2.js +0 -111
- package/dist/bundle/server-HAXN772R.js +0 -66
- package/dist/bundle/store-connection-PPEQK2K3.js +0 -76
- package/dist/bundle/store-maintenance-command-JZXCT6NY.js +0 -56
- /package/dist/bundle/{chunk-NUN6OGOV.js → chunk-LU3WKZBA.js} +0 -0
|
@@ -1,18 +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";
|
|
11
|
+
import {
|
|
12
|
+
CliError
|
|
13
|
+
} from "./chunk-WZ5XK74U.js";
|
|
7
14
|
import {
|
|
8
|
-
CliError,
|
|
9
15
|
singleLine
|
|
10
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-6IBM4Z3V.js";
|
|
11
17
|
import {
|
|
12
18
|
__name
|
|
13
19
|
} from "./chunk-ZVVMGPBJ.js";
|
|
14
20
|
|
|
15
|
-
// 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
|
|
16
22
|
var SCHEME = "msg:";
|
|
17
23
|
var formatLocator = /* @__PURE__ */ __name(({ provider, account, chat, message }) => SCHEME + [provider, account, chat, message].map(encodeURIComponent).join("/"), "formatLocator");
|
|
18
24
|
var isLocator = /* @__PURE__ */ __name((reference) => reference.trim().startsWith(SCHEME), "isLocator");
|
|
@@ -26,7 +32,7 @@ var parseLocator = /* @__PURE__ */ __name((reference) => {
|
|
|
26
32
|
return { provider, account, chat, message };
|
|
27
33
|
}, "parseLocator");
|
|
28
34
|
|
|
29
|
-
// 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
|
|
30
36
|
var SIMPLE_REFERENCES = [
|
|
31
37
|
"note",
|
|
32
38
|
"document",
|
|
@@ -38,6 +44,8 @@ var SIMPLE_REFERENCES = [
|
|
|
38
44
|
"fact",
|
|
39
45
|
"bot",
|
|
40
46
|
"event",
|
|
47
|
+
"invoice",
|
|
48
|
+
"payment",
|
|
41
49
|
"entity"
|
|
42
50
|
];
|
|
43
51
|
var malformed = /* @__PURE__ */ __name((text, shape) => new CliError("validation_error", `"${singleLine(text)}" is not a reference \u2014 expected ${shape}`, {
|
|
@@ -171,7 +179,7 @@ var looksLikeReference = /* @__PURE__ */ __name((text) => {
|
|
|
171
179
|
return match !== null && byPrefix.has(match[1]);
|
|
172
180
|
}, "looksLikeReference");
|
|
173
181
|
|
|
174
|
-
// 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
|
|
175
183
|
var KINDS = ["messages", "mail", "notes", "documents", "meetings", "events"];
|
|
176
184
|
var MESSENGER_OPENS = { chat: "messages list", message: "messages show", contact: "contacts show" };
|
|
177
185
|
var PROVIDERS = [
|
|
@@ -290,7 +298,7 @@ var providerNamed = /* @__PURE__ */ __name((word) => {
|
|
|
290
298
|
var kindIn = /* @__PURE__ */ __name((provider) => isFolderProvider(provider) ? "notes" : registry.find(({ name }) => name === provider)?.kind, "kindIn");
|
|
291
299
|
var kindOf = /* @__PURE__ */ __name((provider) => kindIn(provider) ?? "messages", "kindOf");
|
|
292
300
|
|
|
293
|
-
// 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
|
|
294
302
|
var COUNTER_FIELDS = ["views", "reactions", "comments"];
|
|
295
303
|
var validCounter = /* @__PURE__ */ __name((value) => typeof value === "number" && Number.isFinite(value) && value >= 0, "validCounter");
|
|
296
304
|
var counterValue = /* @__PURE__ */ __name((message, field) => {
|
|
@@ -327,7 +335,121 @@ var counterFreshness = /* @__PURE__ */ __name((states) => {
|
|
|
327
335
|
return states.some((one) => one.freshness === "stale") ? "stale" : "fresh";
|
|
328
336
|
}, "counterFreshness");
|
|
329
337
|
|
|
330
|
-
// 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
|
|
331
453
|
var MESSAGE_MEASURES = ["views", "reactions", "forwards", "comments", "replies", "thread-size"];
|
|
332
454
|
var AUTHOR_MEASURES = [
|
|
333
455
|
"messages",
|
|
@@ -467,6 +589,222 @@ var withoutUrls = /* @__PURE__ */ __name((text) => text.replace(/\S+/gu, (token)
|
|
|
467
589
|
var rankingWords = /* @__PURE__ */ __name((text) => withoutUrls(text).match(/[\p{L}\p{N}]+/gu)?.length ?? 0, "rankingWords");
|
|
468
590
|
var rankingQuestion = /* @__PURE__ */ __name((text) => withoutUrls(text).includes("?"), "rankingQuestion");
|
|
469
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
|
+
|
|
470
808
|
export {
|
|
471
809
|
formatLocator,
|
|
472
810
|
isLocator,
|
|
@@ -503,6 +841,25 @@ export {
|
|
|
503
841
|
counterObservationTime,
|
|
504
842
|
observedCounters,
|
|
505
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,
|
|
506
863
|
MESSAGE_MEASURES,
|
|
507
864
|
AUTHOR_MEASURES,
|
|
508
865
|
needsRankingContext,
|
|
@@ -510,5 +867,14 @@ export {
|
|
|
510
867
|
rankingScore,
|
|
511
868
|
RANKING_TOKENIZER_VERSION,
|
|
512
869
|
rankingWords,
|
|
513
|
-
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
|
|
514
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")
|
|
@@ -0,0 +1,23 @@
|
|
|
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-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
|
+
var installerOf = /* @__PURE__ */ __name((scriptPath) => {
|
|
9
|
+
const path = scriptPath.replaceAll("\\", "/");
|
|
10
|
+
if (path.includes("/_npx/"))
|
|
11
|
+
return "npx";
|
|
12
|
+
if (path.includes("/install/global/node_modules/"))
|
|
13
|
+
return "bun";
|
|
14
|
+
if (/\/\.?pnpm\//.test(path))
|
|
15
|
+
return "pnpm";
|
|
16
|
+
if (path.includes("/node_modules/"))
|
|
17
|
+
return "npm";
|
|
18
|
+
return path.includes("/dist/") ? "checkout" : "unknown";
|
|
19
|
+
}, "installerOf");
|
|
20
|
+
|
|
21
|
+
export {
|
|
22
|
+
installerOf
|
|
23
|
+
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { createRequire as __bundleRequire } from "node:module";
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
|
-
import {
|
|
4
|
-
CliError
|
|
5
|
-
} from "./chunk-JF7ZEUXU.js";
|
|
6
3
|
import {
|
|
7
4
|
importFrom
|
|
8
5
|
} from "./chunk-Y5E2WNWB.js";
|
|
6
|
+
import {
|
|
7
|
+
CliError
|
|
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) => {
|
|
@@ -1,30 +1,32 @@
|
|
|
1
1
|
import { createRequire as __bundleRequire } from "node:module";
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
|
-
installerOf,
|
|
5
4
|
updateCommand
|
|
6
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-4UVT2QCO.js";
|
|
7
6
|
import {
|
|
8
7
|
QUESTIONS,
|
|
9
8
|
readSetupAnswers,
|
|
10
9
|
unanswered,
|
|
11
10
|
writeSetupAnswers
|
|
12
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-EUPZSR2G.js";
|
|
13
12
|
import {
|
|
14
13
|
DEFAULT_STEMMERS,
|
|
15
14
|
LANGUAGES
|
|
16
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-VFIEYRYD.js";
|
|
17
16
|
import {
|
|
18
17
|
sharedConfigPath
|
|
19
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-OTMGAKUM.js";
|
|
20
19
|
import {
|
|
21
20
|
storePath
|
|
22
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-6AJDVJVZ.js";
|
|
22
|
+
import {
|
|
23
|
+
installerOf
|
|
24
|
+
} from "./chunk-KV4267S4.js";
|
|
23
25
|
import {
|
|
24
26
|
__name
|
|
25
27
|
} from "./chunk-ZVVMGPBJ.js";
|
|
26
28
|
|
|
27
|
-
// 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
|
|
28
30
|
import { spawnSync } from "node:child_process";
|
|
29
31
|
import { accessSync, constants, realpathSync } from "node:fs";
|
|
30
32
|
import { delimiter, join } from "node:path";
|
|
@@ -82,7 +84,7 @@ var suggested = /* @__PURE__ */ __name((env, contentLanguages) => {
|
|
|
82
84
|
return (own.length ? own : LANGUAGES.filter(({ code }) => code === "en" || code === system)).map(({ name }) => name);
|
|
83
85
|
}, "suggested");
|
|
84
86
|
var askLanguages = /* @__PURE__ */ __name(async ({ command, env, io, contentLanguages }) => {
|
|
85
|
-
const { openStore } = await import("./store-
|
|
87
|
+
const { openStore } = await import("./store-ZTDZ6UY5.js");
|
|
86
88
|
const store = await openStore({ env });
|
|
87
89
|
let rebuild = false;
|
|
88
90
|
try {
|
|
@@ -111,8 +113,8 @@ var askLanguages = /* @__PURE__ */ __name(async ({ command, env, io, contentLang
|
|
|
111
113
|
if (!rebuild)
|
|
112
114
|
return;
|
|
113
115
|
const [{ openCache }, { buildStems }] = await Promise.all([
|
|
114
|
-
import("./open-
|
|
115
|
-
import("./store-maintenance-command-
|
|
116
|
+
import("./open-MIL2TOT6.js"),
|
|
117
|
+
import("./store-maintenance-command-AU73UVUQ.js")
|
|
116
118
|
]);
|
|
117
119
|
const database = await openCache(storePath(env));
|
|
118
120
|
try {
|
|
@@ -124,7 +126,7 @@ var askLanguages = /* @__PURE__ */ __name(async ({ command, env, io, contentLang
|
|
|
124
126
|
var askTools = /* @__PURE__ */ __name(async (run) => {
|
|
125
127
|
const { command, env, io } = run;
|
|
126
128
|
const installed = run.installed ?? ((name) => onPath(name, env));
|
|
127
|
-
const { WIRECAT_TOOLS } = await import("./first-screen-
|
|
129
|
+
const { WIRECAT_TOOLS } = await import("./first-screen-PGFIXJAX.js");
|
|
128
130
|
const others = WIRECAT_TOOLS.filter((tool) => tool.command !== command);
|
|
129
131
|
const missing = others.filter((tool) => !installed(tool.command));
|
|
130
132
|
io.say("Other WireCat tools \u2014 they share this store, so one search finds everything:");
|
|
@@ -197,7 +199,7 @@ var setupAtStart = /* @__PURE__ */ __name(async (start) => {
|
|
|
197
199
|
contentLanguages: start.contentLanguages,
|
|
198
200
|
all: start.path[0] === "setup",
|
|
199
201
|
io: {
|
|
200
|
-
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"),
|
|
201
203
|
say: /* @__PURE__ */ __name((text) => process.stderr.write(`${text}
|
|
202
204
|
`), "say")
|
|
203
205
|
}
|