@wirecat/zoom-cli 0.67.0 → 0.68.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/answer-entities.d.ts +18 -0
- package/dist/answer-entities.d.ts.map +1 -1
- package/dist/answer-entities.js +12 -0
- package/dist/answer-entities.js.map +1 -1
- package/dist/answer-policy.d.ts.map +1 -1
- package/dist/answer-policy.js +2 -1
- package/dist/answer-policy.js.map +1 -1
- package/dist/bin/zm.js +2 -2
- package/dist/bundle/{all-profiles-SEW2VL76.js → all-profiles-R66UM3HM.js} +12 -12
- package/dist/bundle/answer-policy-UCGUO53A.js +104 -0
- package/dist/bundle/{anthropic-FSNASJML.js → anthropic-4ZI2BPLG.js} +7 -7
- package/dist/bundle/{app-server-EVSRYJ3H.js → app-server-64O5IQI5.js} +61 -58
- package/dist/bundle/{bun-DACL5SVO.js → bun-HUHQD76Z.js} +2 -2
- package/dist/bundle/{bun-sqlite-HQ2KOXSI.js → bun-sqlite-VOVHPTIF.js} +6 -6
- package/dist/bundle/{chunk-SMVO5R3T.js → chunk-2OSBCYJT.js} +39 -26
- package/dist/bundle/{chunk-TBRG2DPE.js → chunk-2T6XHWDX.js} +2 -2
- package/dist/bundle/{chunk-6AJDVJVZ.js → chunk-32FPA7P2.js} +2 -2
- package/dist/bundle/{chunk-7LLUUXJB.js → chunk-355PHJYX.js} +1 -1
- package/dist/bundle/{chunk-3GO3KME7.js → chunk-3BRV2YU2.js} +3 -3
- package/dist/bundle/{chunk-I7SOXH64.js → chunk-474WF55M.js} +53 -39
- package/dist/bundle/{chunk-L643D4RJ.js → chunk-4TLPOY22.js} +12 -12
- package/dist/bundle/{chunk-D6OXI2NV.js → chunk-4YFJYSSK.js} +205 -59
- package/dist/bundle/chunk-5JAYUG3X.js +261 -0
- package/dist/bundle/{chunk-VNIBTNV4.js → chunk-65T3PU75.js} +2 -2
- package/dist/bundle/{chunk-6TZF2JP7.js → chunk-6CJ7NHIP.js} +13 -13
- package/dist/bundle/{chunk-MWEOVTIF.js → chunk-6T3P226D.js} +4 -4
- package/dist/bundle/{chunk-EPDRF66S.js → chunk-6TJ62LZQ.js} +22 -14
- package/dist/bundle/{chunk-ZRMZBMOF.js → chunk-6XO7RTJY.js} +66 -6
- package/dist/bundle/{chunk-VFIEYRYD.js → chunk-77I67HWF.js} +8 -8
- package/dist/bundle/{chunk-QX2MAT6I.js → chunk-77KFLU5F.js} +3 -3
- package/dist/bundle/{chunk-4GCKDO2H.js → chunk-7AUP2WT3.js} +3 -3
- package/dist/bundle/{chunk-7VU5UGRR.js → chunk-7DUYFITC.js} +16 -16
- package/dist/bundle/{chunk-ASCHAVNW.js → chunk-7QNJICKZ.js} +27 -27
- package/dist/bundle/{chunk-KWRSC6O6.js → chunk-A63ZFOQJ.js} +18 -4
- package/dist/bundle/{chunk-SSXCOUP3.js → chunk-AJ7CMUGD.js} +464 -220
- package/dist/bundle/{chunk-SCFFCIIP.js → chunk-AVEIQMHZ.js} +2 -2
- package/dist/bundle/chunk-AYEVBAGO.js +178 -0
- package/dist/bundle/{chunk-AAZFLJSH.js → chunk-B6JMVB6R.js} +10 -10
- package/dist/bundle/{chunk-CRLBTNC4.js → chunk-BL36NSV5.js} +3 -3
- package/dist/bundle/{chunk-4UVT2QCO.js → chunk-BOAMDYLY.js} +4 -4
- package/dist/bundle/chunk-BSM43OMN.js +31 -0
- package/dist/bundle/{chunk-QEI55M2F.js → chunk-DGNPJGD3.js} +16 -10
- package/dist/bundle/{chunk-SOZVC3SV.js → chunk-DVA6MQWK.js} +1 -1
- package/dist/bundle/{chunk-YRNZT4GQ.js → chunk-DWSUSWAX.js} +98 -13
- package/dist/bundle/{chunk-LFQ73UFK.js → chunk-EH5QGQFR.js} +3 -3
- package/dist/bundle/{chunk-OZEYFJX2.js → chunk-EJDV5IIF.js} +1 -1
- package/dist/bundle/{chunk-VQTAU4DV.js → chunk-EWIBLDQQ.js} +8 -8
- package/dist/bundle/{chunk-4ZR5DJ26.js → chunk-EZRPSZJS.js} +3 -3
- package/dist/bundle/{chunk-KIJLM5UL.js → chunk-FBLUKCIR.js} +1 -1
- package/dist/bundle/{chunk-WZ5XK74U.js → chunk-FEM2JQN2.js} +1 -1
- package/dist/bundle/{chunk-GP4NSYDU.js → chunk-FMQS7HCC.js} +12 -12
- package/dist/bundle/{chunk-B5Z4XPVS.js → chunk-FNQASORM.js} +2 -2
- package/dist/bundle/{chunk-FWU3ZYHE.js → chunk-GOXDBCDM.js} +728 -130
- package/dist/bundle/{chunk-CLEZE65P.js → chunk-HXOAPH47.js} +1 -1
- package/dist/bundle/{chunk-7K5TDTZY.js → chunk-JO4YADNV.js} +7 -7
- package/dist/bundle/{chunk-4U2555EQ.js → chunk-JRCYFCPL.js} +30 -28
- package/dist/bundle/{chunk-L6CAUVMU.js → chunk-K67V24AT.js} +5 -5
- package/dist/bundle/{chunk-B3KWAULD.js → chunk-KAPJQGHE.js} +2 -2
- package/dist/bundle/{chunk-T6CZWSHF.js → chunk-KNE6VFHZ.js} +21 -21
- package/dist/bundle/{chunk-LM26DJOK.js → chunk-KUB2U5NT.js} +6 -6
- package/dist/bundle/{chunk-EUPZSR2G.js → chunk-L4WVLRXM.js} +4 -4
- package/dist/bundle/{chunk-BKY4XVB4.js → chunk-LBOSTBAY.js} +1248 -617
- package/dist/bundle/{chunk-C6UKW7JO.js → chunk-LV7QRR5S.js} +6 -6
- package/dist/bundle/{chunk-FGTPREAZ.js → chunk-LYWUG43B.js} +33 -33
- package/dist/bundle/{chunk-NTZDM5SJ.js → chunk-NRRI37NJ.js} +9 -9
- package/dist/bundle/{chunk-J3ZBEWQY.js → chunk-NUJMJQXV.js} +54 -147
- package/dist/bundle/{chunk-6IBM4Z3V.js → chunk-OE7EIP5L.js} +1 -1
- package/dist/bundle/{chunk-ZMPTO2WB.js → chunk-P2TISY3R.js} +1 -1
- package/dist/bundle/{chunk-KV4267S4.js → chunk-P3ASN72F.js} +1 -1
- package/dist/bundle/{chunk-V33VGWT3.js → chunk-PIHBD3YS.js} +16 -6
- package/dist/bundle/{chunk-RYKG6AEH.js → chunk-PUTGTW6W.js} +4 -2
- package/dist/bundle/{chunk-L6WUAGPN.js → chunk-QXTREL2M.js} +3 -3
- package/dist/bundle/{chunk-X67YD3QI.js → chunk-R7LFGEDE.js} +2 -2
- package/dist/bundle/{chunk-2UW533HQ.js → chunk-RGJ7OWHU.js} +4 -4
- package/dist/bundle/{chunk-LKJXTACE.js → chunk-RP3U3J53.js} +7 -7
- package/dist/bundle/{chunk-DG4DWAU7.js → chunk-RRYUD2EF.js} +3 -3
- package/dist/bundle/{chunk-Q65SDEFN.js → chunk-SRP6SFFD.js} +2 -2
- package/dist/bundle/{chunk-4KDZ22RA.js → chunk-SSPSNSC5.js} +1 -1
- package/dist/bundle/{chunk-DFUPETW7.js → chunk-TDGZMC6K.js} +130 -75
- package/dist/bundle/{chunk-EQ7XRRKV.js → chunk-TN3FH2GQ.js} +11 -11
- package/dist/bundle/chunk-TUNQ6NE2.js +64 -0
- package/dist/bundle/{chunk-FXQPK742.js → chunk-TZUKDM72.js} +29 -15
- package/dist/bundle/{chunk-IFDO3YPJ.js → chunk-UDJTRFRV.js} +1 -1
- package/dist/bundle/{chunk-ESFMHBHH.js → chunk-US5C3WAY.js} +60 -51
- package/dist/bundle/{chunk-KANH7GBB.js → chunk-UU5PLDRA.js} +2 -2
- package/dist/bundle/{chunk-OTMGAKUM.js → chunk-VLD7Y4SY.js} +7 -7
- package/dist/bundle/{chunk-YPF6OS37.js → chunk-VW6BF6M7.js} +1 -1
- package/dist/bundle/{chunk-JVCHGI7W.js → chunk-W42BJ65M.js} +1 -1
- package/dist/bundle/{chunk-RAMPYIO2.js → chunk-Y5LP5SHV.js} +11 -11
- package/dist/bundle/{chunk-WHQ4ZCJI.js → chunk-YJY3W2ZT.js} +210 -85
- package/dist/bundle/{chunk-3ZIHUSMM.js → chunk-YOAEZSDG.js} +2 -2
- package/dist/bundle/{chunk-M43MBWJX.js → chunk-YQRNFG2E.js} +13471 -1289
- package/dist/bundle/{chunk-7HAIM7GV.js → chunk-YTF2WPV4.js} +601 -443
- package/dist/bundle/{chunk-6UFWFKFH.js → chunk-ZRD3NDOX.js} +2 -2
- package/dist/bundle/{cli-YUATSOLA.js → cli-VQJ7ZRYR.js} +89 -61
- package/dist/bundle/command-contract-JPUWWYIV.js +41 -0
- package/dist/bundle/config-YGLLR77A.js +90 -0
- package/dist/bundle/{decode-IL44LNC3.js → decode-L3ENO2XH.js} +6 -6
- package/dist/bundle/{dispatch-3BGIXSJR.js → dispatch-5MGDLOK4.js} +9 -9
- package/dist/bundle/{dist-3W27UQ2S.js → dist-WQLS7U23.js} +47 -27
- package/dist/bundle/{echarts-CO4D26JF.js → echarts-5LLJ6JXC.js} +2 -2
- package/dist/bundle/{embed-XH2X4DFM.js → embed-37MYTCU7.js} +7 -7
- package/dist/bundle/{embedder-WTFWDXBJ.js → embedder-GNGHVJAO.js} +10 -10
- package/dist/bundle/{failure-HTIS3NLS.js → failure-CR64C4XA.js} +3 -3
- package/dist/bundle/{first-run-5RBH7FDO.js → first-run-NR5JKYP3.js} +12 -12
- package/dist/bundle/first-screen-RCR7ATO2.js +39 -0
- package/dist/bundle/{folders-F4DNQPIY.js → folders-VU4IN35Y.js} +5 -5
- package/dist/bundle/{instructions-EPPBL6TT.js → instructions-P72XX4AK.js} +1 -1
- package/dist/bundle/{main-LVQTCDZS.js → main-QYFCYSTW.js} +21 -23
- package/dist/bundle/{mcp-PPVOM4SE.js → mcp-M4QN2E7R.js} +2 -2
- package/dist/bundle/{meetings-BMELXRTR.js → meetings-66UQINKI.js} +13 -7
- package/dist/bundle/{node-CQVMWVIG.js → node-ZB4RNICS.js} +2 -2
- package/dist/bundle/{node-sqlite-QQEX7LZT.js → node-sqlite-XPRKBDF3.js} +7 -7
- package/dist/bundle/{oauth-AYGX7CQS.js → oauth-WJRDUU5J.js} +8 -8
- package/dist/bundle/{open-MIL2TOT6.js → open-S2YSIEOW.js} +6 -6
- package/dist/bundle/openai-CRNZFNZD.js +25 -0
- package/dist/bundle/{output-file-4XADZPYH.js → output-file-6COFGPUL.js} +6 -6
- package/dist/bundle/{process-NJVQK6GB.js → process-XNN4WG6N.js} +1 -1
- package/dist/bundle/{program-WUYRS6H7.js → program-BRPJKRCX.js} +115 -187
- package/dist/bundle/{prompt-J4QPFLEA.js → prompt-7RQOL25I.js} +6 -6
- package/dist/bundle/{recognize-OLJZVNWW.js → recognize-N5WADGQB.js} +5 -5
- package/dist/bundle/{remote-JPUXNYLV.js → remote-WHYV35IF.js} +8 -8
- package/dist/bundle/{rerank-XVV3X5TT.js → rerank-FBMZVWSH.js} +8 -8
- package/dist/bundle/{run-log-DJXBEVS5.js → run-log-TOCHREH2.js} +59 -59
- package/dist/bundle/{serve-NYYUO3MR.js → serve-4BABX4WS.js} +10 -10
- package/dist/bundle/{server-4Z5E4YTT.js → server-CDVI6LOB.js} +47 -47
- package/dist/bundle/server-XOFQKFVO.js +72 -0
- package/dist/bundle/{services-EKWM76HP.js → services-PIY33I7R.js} +43 -33
- package/dist/bundle/{speech-WFJ44ACJ.js → speech-LS5Q4FL2.js} +14 -14
- package/dist/bundle/{state-VIRCT4VW.js → state-YUX5R2R7.js} +7 -7
- package/dist/bundle/{store-ZTDZ6UY5.js → store-BD7HAXAA.js} +20 -18
- package/dist/bundle/{store-2Q4GEZJS.js → store-ERMGBF2B.js} +49 -29
- package/dist/bundle/store-connection-JBR6CMTJ.js +83 -0
- package/dist/bundle/store-maintenance-command-I5DUSO2C.js +62 -0
- package/dist/bundle/{streaming-7BPKIGAS.js → streaming-O53PIORL.js} +7 -7
- package/dist/bundle/{tokens-CQHMMKNX.js → tokens-QKNEP2GJ.js} +7 -7
- package/dist/bundle/zm.js +9 -10
- package/dist/bundle/zoom-app-XJXZ4ZBX.js +41 -0
- package/dist/commands.d.ts.map +1 -1
- package/dist/commands.js +1 -0
- package/dist/commands.js.map +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +2 -3
- package/dist/config.js.map +1 -1
- package/dist/identity.d.ts +1 -0
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +11 -0
- package/dist/identity.js.map +1 -1
- package/dist/program-bindings.d.ts.map +1 -1
- package/dist/program-bindings.js +7 -2
- package/dist/program-bindings.js.map +1 -1
- package/dist/setup-commands.d.ts +6 -0
- package/dist/setup-commands.d.ts.map +1 -1
- package/dist/setup-commands.js +24 -9
- package/dist/setup-commands.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/zoom-app.d.ts +32 -0
- package/dist/zoom-app.d.ts.map +1 -1
- package/dist/zoom-app.js +61 -0
- package/dist/zoom-app.js.map +1 -1
- package/package.json +3 -3
- package/dist/bundle/answer-policy-5OYUL6UF.js +0 -103
- package/dist/bundle/chunk-54RTMQL6.js +0 -132
- package/dist/bundle/chunk-6VFORXL3.js +0 -101
- package/dist/bundle/chunk-D4KBD63W.js +0 -19
- package/dist/bundle/chunk-SXFODCYK.js +0 -9
- package/dist/bundle/chunk-Z3WXI4DK.js +0 -31
- package/dist/bundle/command-contract-UWHY55UE.js +0 -41
- package/dist/bundle/config-TGF6E6ZD.js +0 -89
- package/dist/bundle/first-screen-PGFIXJAX.js +0 -39
- package/dist/bundle/openai-7QZZXQW5.js +0 -25
- package/dist/bundle/server-VW5UVCH7.js +0 -72
- package/dist/bundle/store-connection-FKVVQLEF.js +0 -83
- package/dist/bundle/store-maintenance-command-AU73UVUQ.js +0 -62
- package/dist/bundle/zoom-app-OEKFMJS6.js +0 -25
- /package/dist/bundle/{chunk-LU3WKZBA.js → chunk-VOXIGICJ.js} +0 -0
|
@@ -2,15 +2,15 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
PRAGMAS
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-PUTGTW6W.js";
|
|
6
6
|
import {
|
|
7
7
|
CliError
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-FEM2JQN2.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.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/sqlite-warning.js
|
|
14
14
|
var SQLITE_WARNING = "SQLite is an experimental feature";
|
|
15
15
|
var quieted = /* @__PURE__ */ new WeakSet();
|
|
16
16
|
var quietSqliteWarning = /* @__PURE__ */ __name((host = process) => {
|
|
@@ -31,7 +31,7 @@ var isSqliteWarning = /* @__PURE__ */ __name((warning, options) => {
|
|
|
31
31
|
return name === "ExperimentalWarning" && message.startsWith(SQLITE_WARNING);
|
|
32
32
|
}, "isSqliteWarning");
|
|
33
33
|
|
|
34
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/store/open.js
|
|
35
35
|
var openCache = /* @__PURE__ */ __name(async (path) => {
|
|
36
36
|
const database = await openFile(path);
|
|
37
37
|
try {
|
|
@@ -44,12 +44,12 @@ var openCache = /* @__PURE__ */ __name(async (path) => {
|
|
|
44
44
|
}, "openCache");
|
|
45
45
|
var openFile = /* @__PURE__ */ __name((path) => "Bun" in globalThis ? openUnderBun(path) : openUnderNode(path), "openFile");
|
|
46
46
|
var openUnderBun = /* @__PURE__ */ __name(async (path) => {
|
|
47
|
-
const { openWithBunSqlite } = await import("./bun-sqlite-
|
|
47
|
+
const { openWithBunSqlite } = await import("./bun-sqlite-VOVHPTIF.js");
|
|
48
48
|
return await openWithBunSqlite(path);
|
|
49
49
|
}, "openUnderBun");
|
|
50
50
|
var openUnderNode = /* @__PURE__ */ __name(async (path) => {
|
|
51
51
|
quietSqliteWarning();
|
|
52
|
-
const { openWithNodeSqlite } = await import("./node-sqlite-
|
|
52
|
+
const { openWithNodeSqlite } = await import("./node-sqlite-XPRKBDF3.js");
|
|
53
53
|
return openWithNodeSqlite(path);
|
|
54
54
|
}, "openUnderNode");
|
|
55
55
|
var runtime = /* @__PURE__ */ __name(() => {
|
|
@@ -13,10 +13,10 @@ import {
|
|
|
13
13
|
registerPrompts,
|
|
14
14
|
stdinFieldOf,
|
|
15
15
|
syncsFirst
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-474WF55M.js";
|
|
17
17
|
import {
|
|
18
18
|
answeredWire
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-HXOAPH47.js";
|
|
20
20
|
import {
|
|
21
21
|
BinaryResource,
|
|
22
22
|
Picture,
|
|
@@ -37,45 +37,45 @@ import {
|
|
|
37
37
|
tool,
|
|
38
38
|
toolKey,
|
|
39
39
|
toolsFromCommands
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-YJY3W2ZT.js";
|
|
41
41
|
import {
|
|
42
42
|
agentJson,
|
|
43
43
|
skillResource
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-7DUYFITC.js";
|
|
45
45
|
import {
|
|
46
46
|
StdioServerTransport,
|
|
47
47
|
callerOf,
|
|
48
48
|
callingAgent,
|
|
49
49
|
serveStdio
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-UU5PLDRA.js";
|
|
51
51
|
import {
|
|
52
52
|
instructions
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-UDJTRFRV.js";
|
|
54
54
|
import {
|
|
55
55
|
McpServer,
|
|
56
56
|
ResourceTemplate
|
|
57
57
|
} from "./chunk-5D4AEUVA.js";
|
|
58
58
|
import {
|
|
59
59
|
mcpHttpMarker
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-6T3P226D.js";
|
|
61
61
|
import {
|
|
62
62
|
connectedFor,
|
|
63
63
|
guardFor
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-US5C3WAY.js";
|
|
65
65
|
import {
|
|
66
66
|
lackedNeed,
|
|
67
67
|
wholeList
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-2OSBCYJT.js";
|
|
69
69
|
import {
|
|
70
70
|
capability,
|
|
71
71
|
dateWindow,
|
|
72
72
|
imageSize,
|
|
73
73
|
servicesFor,
|
|
74
74
|
storedDeps
|
|
75
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-YTF2WPV4.js";
|
|
76
76
|
import {
|
|
77
77
|
findCommand
|
|
78
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-K67V24AT.js";
|
|
79
79
|
import {
|
|
80
80
|
DEFAULT_OUTPUT_BYTES,
|
|
81
81
|
changesAuthorityAt,
|
|
@@ -88,33 +88,33 @@ import {
|
|
|
88
88
|
rootOf2 as rootOf,
|
|
89
89
|
sealed,
|
|
90
90
|
snakeKeys
|
|
91
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-AJ7CMUGD.js";
|
|
92
92
|
import {
|
|
93
93
|
readOnlyLockOf
|
|
94
|
-
} from "./chunk-
|
|
94
|
+
} from "./chunk-AVEIQMHZ.js";
|
|
95
95
|
import {
|
|
96
96
|
withCaller
|
|
97
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-RP3U3J53.js";
|
|
98
98
|
import {
|
|
99
99
|
typedCommand
|
|
100
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-JRCYFCPL.js";
|
|
101
101
|
import {
|
|
102
102
|
isCliFailure
|
|
103
|
-
} from "./chunk-
|
|
103
|
+
} from "./chunk-YOAEZSDG.js";
|
|
104
104
|
import {
|
|
105
105
|
levelFor,
|
|
106
106
|
readKeysForCommand
|
|
107
|
-
} from "./chunk-
|
|
107
|
+
} from "./chunk-65T3PU75.js";
|
|
108
108
|
import {
|
|
109
109
|
openStore,
|
|
110
110
|
pdfPreviewLimits
|
|
111
|
-
} from "./chunk-
|
|
111
|
+
} from "./chunk-YQRNFG2E.js";
|
|
112
112
|
import {
|
|
113
113
|
warmEmbedders
|
|
114
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-KUB2U5NT.js";
|
|
115
115
|
import {
|
|
116
116
|
timezoneOf
|
|
117
|
-
} from "./chunk-
|
|
117
|
+
} from "./chunk-B6JMVB6R.js";
|
|
118
118
|
import {
|
|
119
119
|
description,
|
|
120
120
|
integer,
|
|
@@ -130,21 +130,21 @@ import {
|
|
|
130
130
|
regex,
|
|
131
131
|
strictObject,
|
|
132
132
|
string
|
|
133
|
-
} from "./chunk-
|
|
133
|
+
} from "./chunk-NRRI37NJ.js";
|
|
134
134
|
import {
|
|
135
135
|
CliError
|
|
136
|
-
} from "./chunk-
|
|
136
|
+
} from "./chunk-FEM2JQN2.js";
|
|
137
137
|
import {
|
|
138
138
|
visibleControls
|
|
139
|
-
} from "./chunk-
|
|
139
|
+
} from "./chunk-OE7EIP5L.js";
|
|
140
140
|
import {
|
|
141
141
|
__name
|
|
142
142
|
} from "./chunk-ZVVMGPBJ.js";
|
|
143
143
|
|
|
144
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
144
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/mcp/server.js
|
|
145
145
|
import { randomUUID } from "node:crypto";
|
|
146
146
|
|
|
147
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
147
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/mcp/agent-log.js
|
|
148
148
|
var agentLog = /* @__PURE__ */ __name((open) => {
|
|
149
149
|
let held;
|
|
150
150
|
return {
|
|
@@ -163,7 +163,7 @@ var agentLog = /* @__PURE__ */ __name((open) => {
|
|
|
163
163
|
};
|
|
164
164
|
}, "agentLog");
|
|
165
165
|
|
|
166
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
166
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/mcp/resources.js
|
|
167
167
|
var LISTED = 100;
|
|
168
168
|
var registerResources = /* @__PURE__ */ __name((server, session, { command, name, limit, recorded, withStore, messenger, guard, assertRead }) => {
|
|
169
169
|
server.registerResource("chat", new ResourceTemplate(`${command}://chat/{id}`, {
|
|
@@ -201,7 +201,7 @@ var registerResources = /* @__PURE__ */ __name((server, session, { command, name
|
|
|
201
201
|
});
|
|
202
202
|
}, "registerResources");
|
|
203
203
|
|
|
204
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
204
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/mcp/session.js
|
|
205
205
|
var HARMLESS = /* @__PURE__ */ new Set(["validation_error", "not_found", "permission_error", "confirmation_required", "rate_limited"]);
|
|
206
206
|
var harmless = /* @__PURE__ */ __name((code) => HARMLESS.has(code), "harmless");
|
|
207
207
|
var MessengerSession = class {
|
|
@@ -276,7 +276,7 @@ var MessengerSession = class {
|
|
|
276
276
|
}
|
|
277
277
|
};
|
|
278
278
|
|
|
279
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
279
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/mcp/tools/attachments.js
|
|
280
280
|
var attachmentsTools = /* @__PURE__ */ __name((messenger) => {
|
|
281
281
|
const _command = messenger.app.command;
|
|
282
282
|
return {
|
|
@@ -330,7 +330,7 @@ var attachmentsTools = /* @__PURE__ */ __name((messenger) => {
|
|
|
330
330
|
};
|
|
331
331
|
}, "attachmentsTools");
|
|
332
332
|
|
|
333
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
333
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/mcp/tools/messages-photo.js
|
|
334
334
|
var PHOTO_LIMIT = 512 * 1024;
|
|
335
335
|
var IMAGE_TYPES = [
|
|
336
336
|
["image/jpeg", (b) => b[0] === 255 && b[1] === 216 && b[2] === 255],
|
|
@@ -384,7 +384,7 @@ var readUpTo = /* @__PURE__ */ __name(async (file, limit, saveIt) => {
|
|
|
384
384
|
return new Uint8Array(Buffer.concat(chunks));
|
|
385
385
|
}, "readUpTo");
|
|
386
386
|
|
|
387
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
387
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/mcp/tools/stats.js
|
|
388
388
|
var statsTools = /* @__PURE__ */ __name((messenger) => ({
|
|
389
389
|
stats_charts: tool({
|
|
390
390
|
title: "A chart from a chat's statistics",
|
|
@@ -421,14 +421,14 @@ var statsTools = /* @__PURE__ */ __name((messenger) => ({
|
|
|
421
421
|
})
|
|
422
422
|
}), "statsTools");
|
|
423
423
|
|
|
424
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
424
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/mcp/tools.js
|
|
425
425
|
var pictureTools = /* @__PURE__ */ __name((messenger) => Object.fromEntries(Object.entries({
|
|
426
426
|
...messagesPhotoTools(messenger),
|
|
427
427
|
...attachmentsTools(messenger),
|
|
428
428
|
...statsTools(messenger)
|
|
429
429
|
}).map(([name, definition]) => [name, { ...definition, input: strictObject(definition.input.entries) }])), "pictureTools");
|
|
430
430
|
|
|
431
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
431
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/mcp/server.js
|
|
432
432
|
var PER_RUN = /* @__PURE__ */ new Set([
|
|
433
433
|
"streams",
|
|
434
434
|
"stdin",
|
|
@@ -752,7 +752,7 @@ var serveOverStdio = /* @__PURE__ */ __name(async (command, context, messenger,
|
|
|
752
752
|
}, "serveOverStdio");
|
|
753
753
|
var serveOverHttpUntilStopped = /* @__PURE__ */ __name(async (command, context, messenger, options, http) => {
|
|
754
754
|
const { session, embedders, build, log } = createServer(command, context, messenger, options);
|
|
755
|
-
const { serveOverHttp } = await import("./serve-
|
|
755
|
+
const { serveOverHttp } = await import("./serve-4BABX4WS.js");
|
|
756
756
|
const appName = messenger.app.command;
|
|
757
757
|
const appEnvPrefix = messenger.app.envPrefix;
|
|
758
758
|
const listening = await serveOverHttp(build, {
|
|
@@ -3,15 +3,15 @@ const require = __bundleRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
errorCodes,
|
|
5
5
|
isCliError
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-FEM2JQN2.js";
|
|
7
7
|
import {
|
|
8
8
|
visibleControls
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-OE7EIP5L.js";
|
|
10
10
|
import {
|
|
11
11
|
__name
|
|
12
12
|
} from "./chunk-ZVVMGPBJ.js";
|
|
13
13
|
|
|
14
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
14
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/exit-codes.js
|
|
15
15
|
var EXIT_CODES = {
|
|
16
16
|
validation_error: 2,
|
|
17
17
|
configuration_error: 3,
|
|
@@ -1266,7 +1266,7 @@ function unwrap(schema) {
|
|
|
1266
1266
|
}
|
|
1267
1267
|
__name(unwrap, "unwrap");
|
|
1268
1268
|
|
|
1269
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
1269
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/effects.js
|
|
1270
1270
|
var EFFECT_LEVELS = ["none", "read", "write"];
|
|
1271
1271
|
var effectsSchema = strictObject({
|
|
1272
1272
|
remote: picklist(EFFECT_LEVELS),
|
|
@@ -1903,7 +1903,7 @@ function toStandardJsonSchema(schema) {
|
|
|
1903
1903
|
}
|
|
1904
1904
|
__name(toStandardJsonSchema, "toStandardJsonSchema");
|
|
1905
1905
|
|
|
1906
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
1906
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/registry.js
|
|
1907
1907
|
var word = pipe(string(), regex(/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/, "a lower-case word, words joined by -"));
|
|
1908
1908
|
var SNAKE_CASE = /^[a-z][a-z0-9]*(_[a-z0-9]+)*$/;
|
|
1909
1909
|
var text = pipe(string(), regex(/\S/, "must not be empty"));
|
|
@@ -1945,7 +1945,7 @@ var fill = /* @__PURE__ */ __name((template, values) => template.replace(PLACEHO
|
|
|
1945
1945
|
return String(value);
|
|
1946
1946
|
}), "fill");
|
|
1947
1947
|
|
|
1948
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
1948
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/output.js
|
|
1949
1949
|
var MAX_NEXT_STEPS = 2;
|
|
1950
1950
|
var COMPACT_FLAG = "--compact";
|
|
1951
1951
|
var isoTime = pipe(string(), isoTimestamp("an ISO 8601 time in UTC"), endsWith("Z", "an ISO 8601 time in UTC, ending in `Z`"));
|
|
@@ -2057,7 +2057,7 @@ var jsonlOf = /* @__PURE__ */ __name(({ items, page, meta }) => [
|
|
|
2057
2057
|
JSON.stringify({ type: "end", complete: meta.complete, ...meta.issues ? { issues: meta.issues } : {}, page })
|
|
2058
2058
|
].join("\n"), "jsonlOf");
|
|
2059
2059
|
|
|
2060
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2060
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/errors.js
|
|
2061
2061
|
var CRASH_CODE = "internal_error";
|
|
2062
2062
|
var CRASH_REASON = "command.crashed";
|
|
2063
2063
|
var errorObjectSchema = strictObject({
|
|
@@ -2150,7 +2150,7 @@ var BASE_REASONS = defineReasons([
|
|
|
2150
2150
|
{ reason: CRASH_REASON, code: CRASH_CODE, message: "the command failed; this is a bug", details: [] }
|
|
2151
2151
|
]);
|
|
2152
2152
|
|
|
2153
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2153
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/steps.js
|
|
2154
2154
|
var SAME_COMMAND = "*";
|
|
2155
2155
|
var commandPath = pipe(string(), regex(/^[a-z][a-z0-9-]*( [a-z][a-z0-9-]*)*$/, "a command path such as `messages sync`"));
|
|
2156
2156
|
var stepSchema = union([
|
|
@@ -2229,7 +2229,7 @@ var STEPS = defineSteps([
|
|
|
2229
2229
|
}
|
|
2230
2230
|
]);
|
|
2231
2231
|
|
|
2232
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2232
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/failure.js
|
|
2233
2233
|
var recognise = /* @__PURE__ */ __name((failure) => {
|
|
2234
2234
|
if (isCliError(failure))
|
|
2235
2235
|
return failure;
|
|
@@ -1,24 +1,27 @@
|
|
|
1
1
|
import { createRequire as __bundleRequire } from "node:module";
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
moneyLabel
|
|
5
|
+
} from "./chunk-AYEVBAGO.js";
|
|
3
6
|
import {
|
|
4
7
|
holdsCredential,
|
|
5
8
|
secretNamed
|
|
6
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-EJDV5IIF.js";
|
|
7
10
|
import {
|
|
8
11
|
formatMeetingReference,
|
|
9
12
|
parseMeetingReference
|
|
10
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-TDGZMC6K.js";
|
|
11
14
|
import {
|
|
12
15
|
CliError
|
|
13
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-FEM2JQN2.js";
|
|
14
17
|
import {
|
|
15
18
|
singleLine
|
|
16
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-OE7EIP5L.js";
|
|
17
20
|
import {
|
|
18
21
|
__name
|
|
19
22
|
} from "./chunk-ZVVMGPBJ.js";
|
|
20
23
|
|
|
21
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/domain/locator.js
|
|
22
25
|
var SCHEME = "msg:";
|
|
23
26
|
var formatLocator = /* @__PURE__ */ __name(({ provider, account, chat, message }) => SCHEME + [provider, account, chat, message].map(encodeURIComponent).join("/"), "formatLocator");
|
|
24
27
|
var isLocator = /* @__PURE__ */ __name((reference) => reference.trim().startsWith(SCHEME), "isLocator");
|
|
@@ -32,7 +35,7 @@ var parseLocator = /* @__PURE__ */ __name((reference) => {
|
|
|
32
35
|
return { provider, account, chat, message };
|
|
33
36
|
}, "parseLocator");
|
|
34
37
|
|
|
35
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/domain/references.js
|
|
36
39
|
var SIMPLE_REFERENCES = [
|
|
37
40
|
"note",
|
|
38
41
|
"document",
|
|
@@ -46,6 +49,10 @@ var SIMPLE_REFERENCES = [
|
|
|
46
49
|
"event",
|
|
47
50
|
"invoice",
|
|
48
51
|
"payment",
|
|
52
|
+
"order",
|
|
53
|
+
"deal",
|
|
54
|
+
"lead",
|
|
55
|
+
"pipeline",
|
|
49
56
|
"entity"
|
|
50
57
|
];
|
|
51
58
|
var malformed = /* @__PURE__ */ __name((text, shape) => new CliError("validation_error", `"${singleLine(text)}" is not a reference \u2014 expected ${shape}`, {
|
|
@@ -179,9 +186,10 @@ var looksLikeReference = /* @__PURE__ */ __name((text) => {
|
|
|
179
186
|
return match !== null && byPrefix.has(match[1]);
|
|
180
187
|
}, "looksLikeReference");
|
|
181
188
|
|
|
182
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
183
|
-
var KINDS = ["messages", "mail", "notes", "documents", "meetings", "events"];
|
|
189
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/domain/providers.js
|
|
190
|
+
var KINDS = ["messages", "mail", "notes", "documents", "meetings", "events", "crm"];
|
|
184
191
|
var MESSENGER_OPENS = { chat: "messages list", message: "messages show", contact: "contacts show" };
|
|
192
|
+
var CRM_OPENS = { deal: "deals show", lead: "leads show", pipeline: "pipelines show" };
|
|
185
193
|
var PROVIDERS = [
|
|
186
194
|
{ name: "telegram", kind: "messages", aliases: ["tg"], command: "tg", opens: MESSENGER_OPENS },
|
|
187
195
|
{ name: "telegram-bot", kind: "messages", aliases: ["tg-bot"] },
|
|
@@ -298,7 +306,7 @@ var providerNamed = /* @__PURE__ */ __name((word) => {
|
|
|
298
306
|
var kindIn = /* @__PURE__ */ __name((provider) => isFolderProvider(provider) ? "notes" : registry.find(({ name }) => name === provider)?.kind, "kindIn");
|
|
299
307
|
var kindOf = /* @__PURE__ */ __name((provider) => kindIn(provider) ?? "messages", "kindOf");
|
|
300
308
|
|
|
301
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
309
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/domain/counters.js
|
|
302
310
|
var COUNTER_FIELDS = ["views", "reactions", "comments"];
|
|
303
311
|
var validCounter = /* @__PURE__ */ __name((value) => typeof value === "number" && Number.isFinite(value) && value >= 0, "validCounter");
|
|
304
312
|
var counterValue = /* @__PURE__ */ __name((message, field) => {
|
|
@@ -335,121 +343,17 @@ var counterFreshness = /* @__PURE__ */ __name((states) => {
|
|
|
335
343
|
return states.some((one) => one.freshness === "stale") ? "stale" : "fresh";
|
|
336
344
|
}, "counterFreshness");
|
|
337
345
|
|
|
338
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
339
|
-
var
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
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");
|
|
346
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/domain/deals.js
|
|
347
|
+
var DEAL_KINDS = ["deal", "lead"];
|
|
348
|
+
var DEAL_STATUSES = ["open", "won", "lost"];
|
|
349
|
+
var STAGE_OUTCOMES = DEAL_STATUSES;
|
|
350
|
+
var DEAL_ROLES = ["owner", "contact", "decision-maker"];
|
|
351
|
+
var dealLine = /* @__PURE__ */ __name((deal) => {
|
|
352
|
+
const money = deal.amount === null || deal.currency === null ? "" : `, ${moneyLabel(deal.amount, deal.currency)}`;
|
|
353
|
+
return `${deal.title} \xB7 ${deal.stage}${money}${deal.status === "open" ? "" : ` (${deal.status})`}`;
|
|
354
|
+
}, "dealLine");
|
|
422
355
|
|
|
423
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
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
|
|
356
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/domain/rankings-options.js
|
|
453
357
|
var MESSAGE_MEASURES = ["views", "reactions", "forwards", "comments", "replies", "thread-size"];
|
|
454
358
|
var AUTHOR_MEASURES = [
|
|
455
359
|
"messages",
|
|
@@ -589,7 +493,7 @@ var withoutUrls = /* @__PURE__ */ __name((text) => text.replace(/\S+/gu, (token)
|
|
|
589
493
|
var rankingWords = /* @__PURE__ */ __name((text) => withoutUrls(text).match(/[\p{L}\p{N}]+/gu)?.length ?? 0, "rankingWords");
|
|
590
494
|
var rankingQuestion = /* @__PURE__ */ __name((text) => withoutUrls(text).includes("?"), "rankingQuestion");
|
|
591
495
|
|
|
592
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
496
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/domain/records.js
|
|
593
497
|
import { createHash } from "node:crypto";
|
|
594
498
|
var RECORDS_SCHEMA_VERSION = 1;
|
|
595
499
|
var RECORD_OPERATIONS = ["upsert", "delete"];
|
|
@@ -599,6 +503,7 @@ var TYPE = "^(invoice|payment|person|organization|project|custom:[a-z0-9][a-z0-9
|
|
|
599
503
|
var MAX_ID = 512;
|
|
600
504
|
var MAX_FIELDS_BYTES = 65536;
|
|
601
505
|
var MAX_RELATIONS = 100;
|
|
506
|
+
var DECIMAL = "^[0-9]{1,16}(\\.[0-9]{1,6})?$";
|
|
602
507
|
var RECORDS_ENVELOPE_SCHEMA = {
|
|
603
508
|
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
604
509
|
title: "WireCat records envelope, version 1",
|
|
@@ -646,13 +551,19 @@ var RECORDS_ENVELOPE_SCHEMA = {
|
|
|
646
551
|
properties: {
|
|
647
552
|
role: { type: "string", pattern: WORD2 },
|
|
648
553
|
type: { type: "string", pattern: TYPE },
|
|
649
|
-
external_id: { type: "string", minLength: 1, maxLength: MAX_ID }
|
|
554
|
+
external_id: { type: "string", minLength: 1, maxLength: MAX_ID },
|
|
555
|
+
amount: {
|
|
556
|
+
type: "string",
|
|
557
|
+
pattern: DECIMAL,
|
|
558
|
+
description: "A settles relation's share of the payment, a decimal in its currency"
|
|
559
|
+
}
|
|
650
560
|
}
|
|
651
561
|
}
|
|
652
562
|
}
|
|
653
563
|
};
|
|
654
564
|
var wordPattern = new RegExp(WORD2);
|
|
655
565
|
var typePattern = new RegExp(TYPE);
|
|
566
|
+
var decimalPattern = new RegExp(DECIMAL);
|
|
656
567
|
var isObject = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null && !Array.isArray(value), "isObject");
|
|
657
568
|
var escapePointer = /* @__PURE__ */ __name((segment) => String(segment).replaceAll("~", "~0").replaceAll("/", "~1"), "escapePointer");
|
|
658
569
|
var pointerOf = /* @__PURE__ */ __name((...segments) => segments.map((s) => `/${escapePointer(s)}`).join(""), "pointerOf");
|
|
@@ -689,15 +600,19 @@ var relationErrors = /* @__PURE__ */ __name((relations, at) => {
|
|
|
689
600
|
const here = [...at, index];
|
|
690
601
|
if (!isObject(relation))
|
|
691
602
|
return [invalid3(here, "a relation is an object")];
|
|
692
|
-
const extra = extraKeys(relation, ["role", "type", "external_id"]);
|
|
603
|
+
const extra = extraKeys(relation, ["role", "type", "external_id", "amount"]);
|
|
693
604
|
if (extra.length > 0)
|
|
694
|
-
return [invalid3([...here, extra[0]], "a relation holds role, type and
|
|
605
|
+
return [invalid3([...here, extra[0]], "a relation holds role, type, external_id and amount")];
|
|
695
606
|
if (typeof relation.role !== "string" || !wordPattern.test(relation.role))
|
|
696
607
|
return [invalid3([...here, "role"], "a role is lowercase letters, digits, - and _")];
|
|
697
608
|
if (typeof relation.type !== "string" || !typePattern.test(relation.type))
|
|
698
609
|
return [invalid3([...here, "type"], `a type is one of ${RECORD_ENTITY_TYPES.join(", ")} or custom:<name>`)];
|
|
699
610
|
if (!idText(relation.external_id))
|
|
700
611
|
return [invalid3([...here, "external_id"], `an external id takes 1\u2013${MAX_ID} characters`)];
|
|
612
|
+
if (relation.amount !== void 0 && (typeof relation.amount !== "string" || !decimalPattern.test(relation.amount)))
|
|
613
|
+
return [invalid3([...here, "amount"], 'an amount is a decimal string, such as "13000.00"')];
|
|
614
|
+
if (relation.amount !== void 0 && relation.role !== "settles")
|
|
615
|
+
return [invalid3([...here, "amount"], "only a settles relation carries an amount")];
|
|
701
616
|
return [];
|
|
702
617
|
});
|
|
703
618
|
}, "relationErrors");
|
|
@@ -781,7 +696,12 @@ var canonical = /* @__PURE__ */ __name((value) => {
|
|
|
781
696
|
}, "canonical");
|
|
782
697
|
var recordFingerprint = /* @__PURE__ */ __name((fields, relations) => createHash("sha256").update(JSON.stringify(canonical({
|
|
783
698
|
fields,
|
|
784
|
-
relations: relations.map((relation) => [
|
|
699
|
+
relations: relations.map((relation) => [
|
|
700
|
+
relation.role,
|
|
701
|
+
relation.type,
|
|
702
|
+
relation.external_id,
|
|
703
|
+
...relation.amount === void 0 ? [] : [relation.amount]
|
|
704
|
+
]).sort((a, b) => a.join("\0").localeCompare(b.join("\0")))
|
|
785
705
|
}))).digest("hex"), "recordFingerprint");
|
|
786
706
|
var envelopeOfJsonl = /* @__PURE__ */ __name((text) => {
|
|
787
707
|
const lines = text.split(/\r?\n/);
|
|
@@ -815,6 +735,7 @@ export {
|
|
|
815
735
|
canonicalReference,
|
|
816
736
|
looksLikeReference,
|
|
817
737
|
KINDS,
|
|
738
|
+
CRM_OPENS,
|
|
818
739
|
PROVIDERS,
|
|
819
740
|
providerLabel,
|
|
820
741
|
FOLDER_PROVIDERS,
|
|
@@ -841,25 +762,11 @@ export {
|
|
|
841
762
|
counterObservationTime,
|
|
842
763
|
observedCounters,
|
|
843
764
|
counterFreshness,
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
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,
|
|
765
|
+
DEAL_KINDS,
|
|
766
|
+
DEAL_STATUSES,
|
|
767
|
+
STAGE_OUTCOMES,
|
|
768
|
+
DEAL_ROLES,
|
|
769
|
+
dealLine,
|
|
863
770
|
MESSAGE_MEASURES,
|
|
864
771
|
AUTHOR_MEASURES,
|
|
865
772
|
needsRankingContext,
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
__name
|
|
5
5
|
} from "./chunk-ZVVMGPBJ.js";
|
|
6
6
|
|
|
7
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
7
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/sanitize.js
|
|
8
8
|
var CONTROL = (
|
|
9
9
|
// biome-ignore lint/suspicious/noControlCharactersInRegex: matching them is the whole point
|
|
10
10
|
/[\u0000-\u0008\u000B-\u001F\u007F-\u009F\u200B\u200E\u200F\u202A-\u202E\u2066-\u2069\uFEFF\u{E0000}-\u{E007F}]/gu
|