@wirecat/zoom-cli 0.75.0 → 0.77.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 +12 -11
- package/contracts/wirecat.json +53 -105
- package/dist/answer-entities.d.ts +1 -141
- package/dist/answer-entities.d.ts.map +1 -1
- package/dist/answer-entities.js +0 -31
- package/dist/answer-entities.js.map +1 -1
- package/dist/api.d.ts +18 -1
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +179 -54
- package/dist/api.js.map +1 -1
- package/dist/archive-commands.d.ts +0 -3
- package/dist/archive-commands.d.ts.map +1 -1
- package/dist/archive-commands.js +1 -54
- package/dist/archive-commands.js.map +1 -1
- package/dist/bin/zm.js +2 -2
- package/dist/bundle/{all-profiles-WFLKFKJC.js → all-profiles-PMCFNDMA.js} +11 -11
- package/dist/bundle/answer-policy-XU7KEW2V.js +121 -0
- package/dist/bundle/{anthropic-H45W4P22.js → anthropic-TGJOKLUS.js} +6 -6
- package/dist/bundle/{app-server-I4FPLBIX.js → app-server-OAODUFM3.js} +73 -63
- package/dist/bundle/{bun-V5QLYBZU.js → bun-HJHVHJJV.js} +2 -2
- package/dist/bundle/{bun-sqlite-X2YZPHDS.js → bun-sqlite-PLBOY6FP.js} +7 -7
- package/dist/bundle/{chunk-P6MQ6FS4.js → chunk-2QDD6S2R.js} +8 -8
- package/dist/bundle/{chunk-ZMHZ6CQS.js → chunk-2QRGJSKO.js} +2 -2
- package/dist/bundle/{chunk-DQBLDZ7M.js → chunk-36SI35XZ.js} +5 -5
- package/dist/bundle/{chunk-HKPNQL52.js → chunk-375BH5OD.js} +4 -4
- package/dist/bundle/{chunk-T4FMXDDV.js → chunk-3TLQF3DN.js} +3 -3
- package/dist/bundle/{chunk-EA2OB75T.js → chunk-4QNW4NK6.js} +1 -1
- package/dist/bundle/{chunk-4XDWV6VJ.js → chunk-4Z4VOQRR.js} +17 -17
- package/dist/bundle/{chunk-VLK3X53X.js → chunk-5A5W322G.js} +6 -2
- package/dist/bundle/chunk-5C5UEKUJ.js +170 -0
- package/dist/bundle/chunk-5C6CRSEM.js +389 -0
- package/dist/bundle/{chunk-3YKAFLXY.js → chunk-5KHCFIWI.js} +2 -2
- package/dist/bundle/{chunk-NQQVNLO6.js → chunk-635GRAO5.js} +12 -12
- package/dist/bundle/{chunk-RKI4BGWG.js → chunk-6JRBMNRN.js} +3 -3
- package/dist/bundle/{chunk-Y5J5CAG2.js → chunk-6YCFDDRO.js} +1 -1
- package/dist/bundle/{chunk-ZVVRRMLW.js → chunk-77JQIY2V.js} +3 -3
- package/dist/bundle/{chunk-IW245Q5B.js → chunk-7AFYZOHU.js} +36 -32
- package/dist/bundle/{chunk-V3UK6E5B.js → chunk-7CMYNW3W.js} +4 -4
- package/dist/bundle/chunk-7DTU7QZP.js +72 -0
- package/dist/bundle/chunk-7ILGYNWX.js +773 -0
- package/dist/bundle/{chunk-XUHQ7DVT.js → chunk-7S3N5CTA.js} +1 -1
- package/dist/bundle/chunk-7SNU7RFU.js +229 -0
- package/dist/bundle/{chunk-4YNUQGDP.js → chunk-A6LK2W5J.js} +1 -1
- package/dist/bundle/{chunk-MHXZ62CU.js → chunk-ADJIYY33.js} +1 -1
- package/dist/bundle/{chunk-WUWF4EXZ.js → chunk-B7XFDMFV.js} +22 -12
- package/dist/bundle/{chunk-2Q4CB4EI.js → chunk-BOJCRTQW.js} +2 -2
- package/dist/bundle/{chunk-GPVSGZ4R.js → chunk-CJL5GHTQ.js} +1010 -617
- package/dist/bundle/{chunk-BY2YPKZZ.js → chunk-CL6QAZGT.js} +39 -67
- package/dist/bundle/{chunk-GU4FVTJV.js → chunk-CUJJZJ4R.js} +44 -9
- package/dist/bundle/{chunk-FBYGBR4Q.js → chunk-CZ6OO66B.js} +4 -4
- package/dist/bundle/chunk-DCEQIKFD.js +259 -0
- package/dist/bundle/{chunk-QBKKTTA3.js → chunk-DDUNPLET.js} +279 -588
- package/dist/bundle/{chunk-CAQ5GW3A.js → chunk-DYIRJINE.js} +1 -1
- package/dist/bundle/{chunk-L5UILROP.js → chunk-E3UPMPUV.js} +8 -8
- package/dist/bundle/{chunk-F6RB5FHZ.js → chunk-ECRFXQHA.js} +1 -1
- package/dist/bundle/{chunk-AVCYD4WQ.js → chunk-F4ROWGLU.js} +68 -38
- package/dist/bundle/{chunk-6XNTELM5.js → chunk-FDQE2CLT.js} +1 -1
- package/dist/bundle/{chunk-PCJRHC5Y.js → chunk-FRC5QIPQ.js} +8 -8
- package/dist/bundle/{chunk-4RJL32PF.js → chunk-FS5HPXQN.js} +26 -9
- package/dist/bundle/{chunk-ZBYKCVSV.js → chunk-GHBDYYPO.js} +2 -2
- package/dist/bundle/{chunk-OUM4ZO53.js → chunk-H2EVYY5Z.js} +1 -1
- package/dist/bundle/{chunk-VPSQZ2YR.js → chunk-I3QMPQYD.js} +49 -49
- package/dist/bundle/{chunk-3U3W6YY5.js → chunk-ICZVSVTW.js} +71 -252
- package/dist/bundle/{chunk-QEO3XTIE.js → chunk-IJTBB23F.js} +32 -33
- package/dist/bundle/{chunk-FT7X74RT.js → chunk-IS6MUPN2.js} +4 -4
- package/dist/bundle/{chunk-NL6AZ6S2.js → chunk-IUOKIZZN.js} +2 -2
- package/dist/bundle/{chunk-3HTJBGNP.js → chunk-IZMRQ3MV.js} +21 -16
- package/dist/bundle/{chunk-X2FILY5F.js → chunk-JFVZVPRW.js} +3 -3
- package/dist/bundle/{chunk-MNVT7EJS.js → chunk-JMU3E2WA.js} +2 -2
- package/dist/bundle/{chunk-T25PR26L.js → chunk-JQUYHPQD.js} +7 -7
- package/dist/bundle/{chunk-JDTZCZ5K.js → chunk-KHBSQROH.js} +5 -5
- package/dist/bundle/{chunk-HCZYJMBP.js → chunk-KYKW2W6X.js} +1 -1
- package/dist/bundle/chunk-LMZUC4CS.js +101 -0
- package/dist/bundle/{chunk-PPM7UTCT.js → chunk-LUAS73NT.js} +18 -18
- package/dist/bundle/{chunk-P4ZQQLZF.js → chunk-LWMDLXEO.js} +2384 -3000
- package/dist/bundle/{chunk-W2AC2RAG.js → chunk-LYVHQ6DJ.js} +14 -14
- package/dist/bundle/{chunk-DUPFAY35.js → chunk-MCLZ74II.js} +7 -7
- package/dist/bundle/chunk-MIG4RLDB.js +555 -0
- package/dist/bundle/{chunk-3URYKAJP.js → chunk-MMAZUJBO.js} +1 -1
- package/dist/bundle/{chunk-B6Q53CVA.js → chunk-MTH3JJHF.js} +24 -22
- package/dist/bundle/{chunk-7ZVWV33Z.js → chunk-NJJEUG4C.js} +35 -13
- package/dist/bundle/{chunk-SEJBS7SI.js → chunk-NKKVVPL5.js} +1 -1
- package/dist/bundle/{chunk-TSHUBGN4.js → chunk-NOF6LABG.js} +6 -6
- package/dist/bundle/{chunk-F7K2V6OA.js → chunk-NPDPD2H3.js} +12 -12
- package/dist/bundle/{chunk-2PYZTRRC.js → chunk-NPIVV52M.js} +1 -1
- package/dist/bundle/{chunk-WQOGHND4.js → chunk-OOIU36FA.js} +1 -1
- package/dist/bundle/{chunk-XCJGDPMN.js → chunk-OXXJW3A5.js} +22320 -22886
- package/dist/bundle/chunk-PM3MB3E7.js +295 -0
- package/dist/bundle/{chunk-VUPWDCYV.js → chunk-PO4RZ4XZ.js} +1 -1
- package/dist/bundle/{chunk-K5E5MB4C.js → chunk-Q7ZW7XAX.js} +31 -87
- package/dist/bundle/{chunk-HNWDEDMU.js → chunk-QAGECFHL.js} +22 -22
- package/dist/bundle/{chunk-JTYWSXJG.js → chunk-QE4L2QQZ.js} +9 -9
- package/dist/bundle/{chunk-4J5GJJ2I.js → chunk-QKNO3JTG.js} +2 -2
- package/dist/bundle/{chunk-IMDTC4MD.js → chunk-QUGESVOE.js} +22 -35
- package/dist/bundle/{chunk-ELD5AC7Q.js → chunk-RQS3W4P6.js} +7 -6
- package/dist/bundle/{chunk-A3Q3PG54.js → chunk-SFPUSEOT.js} +2 -2
- package/dist/bundle/{chunk-SR5X7YKB.js → chunk-SP5OMHOO.js} +3 -3
- package/dist/bundle/chunk-STNZQBY4.js +335 -0
- package/dist/bundle/{chunk-EOZAJGB4.js → chunk-SVJQRG5N.js} +16 -16
- package/dist/bundle/{chunk-IDGWBKMH.js → chunk-SY5NGYKA.js} +12 -12
- package/dist/bundle/{chunk-NE4GYKQA.js → chunk-T4CI3YXW.js} +6 -6
- package/dist/bundle/{chunk-3YRPDNWK.js → chunk-T6RSYDFA.js} +1075 -443
- package/dist/bundle/{chunk-QXQUANWE.js → chunk-TY4FFK2P.js} +6 -6
- package/dist/bundle/chunk-UGRGYLEI.js +224 -0
- package/dist/bundle/{chunk-C5WQ57AB.js → chunk-VGERRRDC.js} +1 -1
- package/dist/bundle/{chunk-NQLL4KRN.js → chunk-VJ2TLU7R.js} +6 -6
- package/dist/bundle/{chunk-PX4IMYVB.js → chunk-W7UCN7MF.js} +3 -3
- package/dist/bundle/{chunk-RBYVQE3S.js → chunk-WD5OL5JB.js} +81 -5
- package/dist/bundle/{chunk-LRCSDAYK.js → chunk-XC3MWABM.js} +4 -4
- package/dist/bundle/{chunk-MAE5UGRQ.js → chunk-XCA5N63N.js} +6 -6
- package/dist/bundle/chunk-XVHDT4CO.js +31 -0
- package/dist/bundle/{chunk-532H3KT3.js → chunk-YFN5A7OP.js} +4 -4
- package/dist/bundle/{chunk-IJCUAKR5.js → chunk-YJIGGUPI.js} +4 -4
- package/dist/bundle/{chunk-FIVFP53N.js → chunk-YVI5SQPY.js} +1 -1
- package/dist/bundle/{chunk-IO3BQ6JU.js → chunk-ZRNNMBPC.js} +31 -577
- package/dist/bundle/{chunk-RABCFGT3.js → chunk-ZUMKZOHR.js} +3 -3
- package/dist/bundle/{chunk-M4OP5ASJ.js → chunk-ZZ32DXTH.js} +1 -1
- package/dist/bundle/{cli-NPRYCWFH.js → cli-Y27PHKBV.js} +105 -84
- package/dist/bundle/command-contract-GB7YA3KW.js +45 -0
- package/dist/bundle/{command-server-entry-BV4SUPUI.js → command-server-entry-AXQSW2X6.js} +35 -31
- package/dist/bundle/config-2OOABHR7.js +108 -0
- package/dist/bundle/{decode-PRMKCHHC.js → decode-ZRNOOTUZ.js} +16 -8
- package/dist/bundle/{dispatch-EU67WGME.js → dispatch-2GHGPAYH.js} +9 -9
- package/dist/bundle/{dist-HGLDGKUW.js → dist-MUFVAMKB.js} +25 -22
- package/dist/bundle/{echarts-QIXLXS3G.js → echarts-F4PHDYET.js} +2 -2
- package/dist/bundle/{embed-OZN2BIJY.js → embed-KWHCKPCV.js} +7 -7
- package/dist/bundle/{embedder-RBDHO6Z6.js → embedder-U3R3RY54.js} +10 -10
- package/dist/bundle/{failure-CTJLEB2R.js → failure-S2YXEN4A.js} +3 -3
- package/dist/bundle/first-run-F4YR2E2C.js +29 -0
- package/dist/bundle/first-screen-HPRHD3VK.js +43 -0
- package/dist/bundle/{folders-MSBTAPAG.js → folders-DVTRFQKW.js} +5 -5
- package/dist/bundle/{instructions-MD2RZT5Z.js → instructions-JU4YW6QY.js} +1 -1
- package/dist/bundle/{main-FPMCCRIQ.js → main-5UCRPACH.js} +24 -24
- package/dist/bundle/{mcp-TDKGDB4V.js → mcp-O6ACR2DX.js} +2 -2
- package/dist/bundle/meeting-combined-IWU5SPAH.js +26 -0
- package/dist/bundle/meeting-model-ILIUJECZ.js +26 -0
- package/dist/bundle/meeting-semantic-5DKRGZFS.js +23 -0
- package/dist/bundle/{meetings-WYCVHAIP.js → meetings-T2UY35DV.js} +43 -7
- package/dist/bundle/{node-IEVT2FSJ.js → node-MAVRAF4M.js} +2 -2
- package/dist/bundle/{node-sqlite-O4C6IWSM.js → node-sqlite-TFBQ5NDI.js} +8 -8
- package/dist/bundle/{oauth-6VXOUXSE.js → oauth-7IG5HWSY.js} +8 -8
- package/dist/bundle/{open-AMUIWV3Y.js → open-3R3N7L3X.js} +6 -6
- package/dist/bundle/openai-DD5I3DWC.js +28 -0
- package/dist/bundle/{output-file-VDOCYH2G.js → output-file-KKHHAYWF.js} +6 -6
- package/dist/bundle/{process-6Q23D3TO.js → process-OIO254NR.js} +1 -1
- package/dist/bundle/{program-CF2NKA2A.js → program-IBYRU76H.js} +428 -250
- package/dist/bundle/{prompt-N3UZE4ZR.js → prompt-LNEOO7PN.js} +6 -6
- package/dist/bundle/{recognize-I5F3K3CZ.js → recognize-2WYLT3PC.js} +5 -5
- package/dist/bundle/{remote-CJF5KMMY.js → remote-7EAJEIV7.js} +11 -11
- package/dist/bundle/{rerank-6WLY6MKY.js → rerank-DZBZ744F.js} +8 -8
- package/dist/bundle/run-log-CCIVRSHP.js +135 -0
- package/dist/bundle/{serve-FOQJ3WMX.js → serve-T3KQV5SS.js} +15 -15
- package/dist/bundle/{server-OEEGRSQD.js → server-2QQAQZ2J.js} +59 -49
- package/dist/bundle/server-OJQMPF2R.js +84 -0
- package/dist/bundle/{services-Q6SFESMS.js → services-DETAKMC3.js} +80 -54
- package/dist/bundle/{speech-PBVEIG4N.js → speech-HD57JNTK.js} +34 -18
- package/dist/bundle/{sqlite-runtime-IWR65V6I.js → sqlite-runtime-OCETZSEZ.js} +7 -7
- package/dist/bundle/{state-G54C2N6U.js → state-ZKVQ4DBI.js} +7 -7
- package/dist/bundle/{store-D5OLXIFW.js → store-7IZ2WMHF.js} +24 -20
- package/dist/bundle/{store-7EWMPTTW.js → store-GEAQ7V5R.js} +26 -22
- package/dist/bundle/store-connection-BALCZW7P.js +101 -0
- package/dist/bundle/store-maintenance-command-SBT4LDSI.js +76 -0
- package/dist/bundle/{streaming-PQEXKTE5.js → streaming-CLBAO3MG.js} +7 -7
- package/dist/bundle/{tokens-J7TFHLEG.js → tokens-WH73ZWFI.js} +10 -10
- package/dist/bundle/zm.js +9 -9
- package/dist/bundle/{zoom-app-SULPMVN4.js → zoom-app-ZDTYMJET.js} +8 -8
- package/dist/commands.d.ts.map +1 -1
- package/dist/commands.js +3 -0
- package/dist/commands.js.map +1 -1
- package/dist/first-screen.d.ts.map +1 -1
- package/dist/first-screen.js +3 -5
- package/dist/first-screen.js.map +1 -1
- package/dist/meeting-integration-commands.d.ts.map +1 -1
- package/dist/meeting-integration-commands.js +46 -28
- package/dist/meeting-integration-commands.js.map +1 -1
- package/dist/meeting-search-commands.d.ts.map +1 -1
- package/dist/meeting-search-commands.js +6 -5
- package/dist/meeting-search-commands.js.map +1 -1
- package/dist/meeting-source.d.ts.map +1 -1
- package/dist/meeting-source.js +15 -1
- package/dist/meeting-source.js.map +1 -1
- package/dist/permissions.d.ts +8 -4
- package/dist/permissions.d.ts.map +1 -1
- package/dist/permissions.js +25 -24
- package/dist/permissions.js.map +1 -1
- package/dist/program-bindings.d.ts.map +1 -1
- package/dist/program-bindings.js +10 -6
- package/dist/program-bindings.js.map +1 -1
- package/dist/program.d.ts +2 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js.map +1 -1
- package/dist/remote-meetings.d.ts +38 -8
- package/dist/remote-meetings.d.ts.map +1 -1
- package/dist/remote-meetings.js +52 -29
- package/dist/remote-meetings.js.map +1 -1
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +4 -2
- package/dist/run.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/zoom-app.d.ts.map +1 -1
- package/dist/zoom-app.js +1 -0
- package/dist/zoom-app.js.map +1 -1
- package/package.json +3 -3
- package/skills/zoom-cli/SKILL.md +2 -2
- package/dist/bundle/answer-policy-XCKC2LLN.js +0 -110
- package/dist/bundle/chunk-NU4FSSMN.js +0 -161
- package/dist/bundle/command-contract-OJYRKQHR.js +0 -41
- package/dist/bundle/config-UMEV24OE.js +0 -97
- package/dist/bundle/first-run-HNCD7U3B.js +0 -29
- package/dist/bundle/first-screen-374BBMO6.js +0 -39
- package/dist/bundle/openai-MEDN6FSK.js +0 -28
- package/dist/bundle/run-log-FKF4ZX4M.js +0 -124
- package/dist/bundle/server-BAGY5HEZ.js +0 -74
- package/dist/bundle/store-connection-34747SCC.js +0 -90
- package/dist/bundle/store-maintenance-command-QBO67F7Z.js +0 -65
- /package/dist/bundle/{chunk-XWBPP2HX.js → chunk-VKE77B3F.js} +0 -0
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { createRequire as __bundleRequire } from "node:module";
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
checkedClientId
|
|
5
|
+
} from "./chunk-RQS3W4P6.js";
|
|
3
6
|
import {
|
|
4
7
|
commandsCommand,
|
|
5
8
|
formatSuggestions,
|
|
6
9
|
meetingResultItem,
|
|
7
10
|
runsCommand,
|
|
8
11
|
suggest
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import {
|
|
11
|
-
checkedClientId
|
|
12
|
-
} from "./chunk-ELD5AC7Q.js";
|
|
12
|
+
} from "./chunk-CJL5GHTQ.js";
|
|
13
13
|
import {
|
|
14
14
|
sharedStoreCommand
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-ICZVSVTW.js";
|
|
16
16
|
import {
|
|
17
17
|
NO_EFFECTS,
|
|
18
18
|
REMOTE_READ,
|
|
@@ -37,37 +37,37 @@ import {
|
|
|
37
37
|
snakeKeys,
|
|
38
38
|
usableProfileName,
|
|
39
39
|
withSettingDefaults
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-DDUNPLET.js";
|
|
41
41
|
import {
|
|
42
42
|
readOnlyLockOf,
|
|
43
43
|
readOnlyRefusal
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-GHBDYYPO.js";
|
|
45
45
|
import {
|
|
46
46
|
setupPermissionCeiling
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-375BH5OD.js";
|
|
48
48
|
import {
|
|
49
49
|
CEILING_KEY,
|
|
50
50
|
DEFAULT_PERMISSIONS,
|
|
51
51
|
LEVELS,
|
|
52
52
|
keyForCommand,
|
|
53
53
|
levelFor
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-2QDD6S2R.js";
|
|
55
55
|
import {
|
|
56
56
|
KEEP_RUNS_FOR_DAYS,
|
|
57
57
|
KEEP_SUCCESSFUL_RUNS_FOR_DAYS,
|
|
58
58
|
RUNS_SIZE_LIMIT_MB
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-MIG4RLDB.js";
|
|
60
60
|
import {
|
|
61
61
|
ZM
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-ECRFXQHA.js";
|
|
63
63
|
import {
|
|
64
64
|
MEETING_RESULT_ENTITIES
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-T6RSYDFA.js";
|
|
66
66
|
import {
|
|
67
67
|
createRenderer,
|
|
68
68
|
projectFields,
|
|
69
69
|
saveConfigFile
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-QAGECFHL.js";
|
|
71
71
|
import {
|
|
72
72
|
array,
|
|
73
73
|
boolean,
|
|
@@ -92,10 +92,10 @@ import {
|
|
|
92
92
|
strictObject,
|
|
93
93
|
string,
|
|
94
94
|
union
|
|
95
|
-
} from "./chunk-
|
|
95
|
+
} from "./chunk-FS5HPXQN.js";
|
|
96
96
|
import {
|
|
97
97
|
CliError
|
|
98
|
-
} from "./chunk-
|
|
98
|
+
} from "./chunk-4QNW4NK6.js";
|
|
99
99
|
import {
|
|
100
100
|
__name
|
|
101
101
|
} from "./chunk-ZVVMGPBJ.js";
|
|
@@ -305,27 +305,6 @@ var archiveReceipt = strictObject({
|
|
|
305
305
|
availability: optional(literal("unknown")),
|
|
306
306
|
checkpoint_revision: optional(nullable(count))
|
|
307
307
|
});
|
|
308
|
-
var remote = strictObject({
|
|
309
|
-
id: text,
|
|
310
|
-
uuid: nullableText,
|
|
311
|
-
title: nullableText,
|
|
312
|
-
type: nullable(number()),
|
|
313
|
-
started_at: nullableText,
|
|
314
|
-
duration_minutes: nullable(number()),
|
|
315
|
-
timezone: nullableText,
|
|
316
|
-
agenda: nullableText,
|
|
317
|
-
join_url: nullableText
|
|
318
|
-
});
|
|
319
|
-
var remoteChange = strictObject({
|
|
320
|
-
action: picklist(["create", "update", "cancel"]),
|
|
321
|
-
applied: flag,
|
|
322
|
-
request: strictObject({
|
|
323
|
-
method: picklist(["POST", "PATCH", "DELETE"]),
|
|
324
|
-
path: text,
|
|
325
|
-
body: optional(record(text, union([text, number()])))
|
|
326
|
-
}),
|
|
327
|
-
meeting: optional(remote)
|
|
328
|
-
});
|
|
329
308
|
var schedule = strictObject({
|
|
330
309
|
version: literal(1),
|
|
331
310
|
id: text,
|
|
@@ -411,15 +390,6 @@ var ZOOM_ANSWER_ENTITIES = {
|
|
|
411
390
|
"recordings schedule create": { name: "zoom_archive_schedule_change", schema: scheduleReceipt },
|
|
412
391
|
"recordings schedule disable": { name: "zoom_archive_schedule_change", schema: scheduleReceipt },
|
|
413
392
|
"recordings schedule run": { name: "zoom_archive_receipt", schema: archiveReceipt },
|
|
414
|
-
"remote-meetings list": { name: "zoom_remote_meeting", schema: remote },
|
|
415
|
-
"remote-meetings show": { name: "zoom_remote_meeting", schema: remote },
|
|
416
|
-
"remote-meetings invitation": {
|
|
417
|
-
name: "zoom_remote_invitation",
|
|
418
|
-
schema: strictObject({ id: text, invitation: text })
|
|
419
|
-
},
|
|
420
|
-
"remote-meetings create": { name: "zoom_remote_change", schema: remoteChange },
|
|
421
|
-
"remote-meetings update": { name: "zoom_remote_change", schema: remoteChange },
|
|
422
|
-
"remote-meetings cancel": { name: "zoom_remote_change", schema: remoteChange },
|
|
423
393
|
"zoom search": { name: "zoom_search_hit", schema: searchHit },
|
|
424
394
|
"meetings embeddings": { name: "meeting_embedding", schema: MEETING_RESULT_ENTITIES.meeting_embedding, shared: true },
|
|
425
395
|
"meetings sync": { name: "meeting_ingestion", schema: MEETING_RESULT_ENTITIES.meeting_ingestion, shared: true },
|
|
@@ -431,7 +401,6 @@ var ZOOM_ANSWER_ENTITIES = {
|
|
|
431
401
|
},
|
|
432
402
|
watch: { name: "meeting_ingestion", schema: MEETING_RESULT_ENTITIES.meeting_ingestion, shared: true },
|
|
433
403
|
"meetings export": { name: "meeting_export", schema: MEETING_RESULT_ENTITIES.meeting_export, shared: true },
|
|
434
|
-
"meetings update": { name: "meeting_association", schema: MEETING_RESULT_ENTITIES.meeting_association, shared: true },
|
|
435
404
|
"meetings link": { name: "meeting_association", schema: MEETING_RESULT_ENTITIES.meeting_association, shared: true },
|
|
436
405
|
"meetings transcribe": {
|
|
437
406
|
name: "meeting_transcription",
|
|
@@ -650,17 +619,17 @@ var exampleFor = /* @__PURE__ */ __name((path) => {
|
|
|
650
619
|
"meetings export": "1 --format markdown",
|
|
651
620
|
"meetings people": '"Alice Example"',
|
|
652
621
|
"meetings projects evidence": 'RES "identity_id:12"',
|
|
653
|
-
"meetings import": "./downloaded-transcripts"
|
|
622
|
+
"meetings import": "./downloaded-transcripts",
|
|
623
|
+
"meetings update": '123456789 --title "Example review" --dry-run',
|
|
624
|
+
"meetings cancel": "123456789 --dry-run",
|
|
625
|
+
"meetings invitation": "123456789"
|
|
654
626
|
};
|
|
655
627
|
return `zm ${profile}${path}${argumentsByPath[path] ? ` ${argumentsByPath[path]}` : ""} --json`;
|
|
656
628
|
}, "exampleFor");
|
|
657
629
|
var addStandardCommands = addStandardCommandsDefinition;
|
|
658
630
|
|
|
659
631
|
// dist/permissions.js
|
|
660
|
-
var DEFAULT_PERMISSIONS2 =
|
|
661
|
-
...DEFAULT_PERMISSIONS,
|
|
662
|
-
"remote-meetings": "ask"
|
|
663
|
-
};
|
|
632
|
+
var DEFAULT_PERMISSIONS2 = DEFAULT_PERMISSIONS;
|
|
664
633
|
var discoveryLevels = /* @__PURE__ */ __name((own, env) => {
|
|
665
634
|
const ceiling = setupPermissionCeiling(env);
|
|
666
635
|
return {
|
|
@@ -699,10 +668,10 @@ var parsePermissions = /* @__PURE__ */ __name((value, known) => {
|
|
|
699
668
|
try {
|
|
700
669
|
parsed = JSON.parse(value);
|
|
701
670
|
} catch {
|
|
702
|
-
throw new CliError("validation_error", 'permissions must be a JSON object: {"
|
|
671
|
+
throw new CliError("validation_error", 'permissions must be a JSON object: {"meetings.create": "allow"}');
|
|
703
672
|
}
|
|
704
673
|
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed))
|
|
705
|
-
throw new CliError("validation_error", 'permissions must be a JSON object: {"
|
|
674
|
+
throw new CliError("validation_error", 'permissions must be a JSON object: {"meetings.create": "allow"}');
|
|
706
675
|
for (const [key, level] of Object.entries(parsed)) {
|
|
707
676
|
if (!known.has(key))
|
|
708
677
|
throw new CliError("validation_error", `no command is called ${key}; a key is a command path, dotted`, {
|
|
@@ -731,22 +700,24 @@ var checkPermission = /* @__PURE__ */ __name((command, context) => {
|
|
|
731
700
|
throw new CliError("permission_error", `refused to ${changes}: the WireCat setup answer keeps every tool read-only \u2014 \`tg setup\`, \`max setup\` or \`wa setup\` at a terminal changes it`, { key, level });
|
|
732
701
|
if (level === "readonly" && changes)
|
|
733
702
|
throw refuse(at, level, profile, `refused to ${changes}`);
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
if (!
|
|
703
|
+
}, "checkPermission");
|
|
704
|
+
var askOwner = /* @__PURE__ */ __name(async (command, at, profile, confirm) => {
|
|
705
|
+
if (!confirm)
|
|
706
|
+
throw new CliError("confirmation_required", `${at} asks first for profile ${profile}: add --yes to apply, or --dry-run to preview`, { key: at });
|
|
707
|
+
if (!await confirm(`zm: ${pathOf3(command).join(" ")} changes Zoom for profile ${profile}. Apply?`))
|
|
708
|
+
throw new CliError("cancelled", "not applied");
|
|
709
|
+
}, "askOwner");
|
|
710
|
+
var askBeforeWrite = /* @__PURE__ */ __name(async (command, context) => {
|
|
711
|
+
const key = permissionKeyOf(command);
|
|
712
|
+
if (!key)
|
|
737
713
|
return;
|
|
738
|
-
|
|
739
|
-
|
|
714
|
+
const named = context.profile();
|
|
715
|
+
const own = named === void 0 ? {} : context.config().permissions[named] ?? {};
|
|
716
|
+
const { level, key: by } = levelFor(own, key, DEFAULT_PERMISSIONS2);
|
|
717
|
+
if (level !== "ask" || command.optsWithGlobals().yes)
|
|
740
718
|
return;
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
throw new CliError("confirmation_required", `${at} asks first for profile ${profile}: add --yes to apply, or --dry-run to preview`, { key: at });
|
|
744
|
-
return context.confirm(`zm: ${pathOf3(command).join(" ")} changes Zoom for profile ${profile}. Apply?`).then((yes) => {
|
|
745
|
-
if (!yes)
|
|
746
|
-
throw new CliError("cancelled", "not applied");
|
|
747
|
-
command.setOptionValue("yes", true);
|
|
748
|
-
});
|
|
749
|
-
}, "checkPermission");
|
|
719
|
+
await askOwner(command, by ?? key, named ?? "<profile>", context.confirm);
|
|
720
|
+
}, "askBeforeWrite");
|
|
750
721
|
var guardCommand = /* @__PURE__ */ __name((command, env, context, confirm) => {
|
|
751
722
|
refuseChangeWhenReadOnly(command, env);
|
|
752
723
|
const ceiling = setupPermissionCeiling(env);
|
|
@@ -983,6 +954,7 @@ export {
|
|
|
983
954
|
discoveryLevels,
|
|
984
955
|
permissionKeyForPath,
|
|
985
956
|
permissionKeys,
|
|
957
|
+
askBeforeWrite,
|
|
986
958
|
guardCommand,
|
|
987
959
|
ZOOM_SETTINGS,
|
|
988
960
|
inspectConfig,
|
|
@@ -2,15 +2,15 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
QUERY_REASONS
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-IZMRQ3MV.js";
|
|
6
6
|
import {
|
|
7
7
|
defineReasons
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-FS5HPXQN.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.667.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_0b2555be96e01c2163d7c05aae2e84c1/node_modules/@wirecat/cli-core/dist/errors/reasons.js
|
|
14
14
|
var validation = /* @__PURE__ */ __name((reason, message) => [reason, "validation_error", message], "validation");
|
|
15
15
|
var QUERY = [
|
|
16
16
|
["query.aborted", "the search was stopped before it finished"],
|
|
@@ -32,6 +32,7 @@ var SIGN_IN = [
|
|
|
32
32
|
["oauth.timeout", "timeout", "the sign-in was not finished in time"],
|
|
33
33
|
["oauth.mismatch", "authentication_error", "the pasted sign-in result belongs to another sign-in"],
|
|
34
34
|
["session.missing", "authentication_error", "this profile is not signed in: no saved sign-in or API token"],
|
|
35
|
+
["session.unreadable", "configuration_error", "the profile's stored secrets cannot be read; sign in again"],
|
|
35
36
|
["oauth.locked", "provider_unavailable", "another process holds this sign-in's lock"],
|
|
36
37
|
["oauth.no-response", "outcome_unknown", "the token request did not finish"],
|
|
37
38
|
["oauth.unavailable", "provider_unavailable", "the provider's token endpoint is unavailable"],
|
|
@@ -67,7 +68,8 @@ var PROVIDER_API = [
|
|
|
67
68
|
["item.not-found", "not_found", "the provider has no item by this id, or this account cannot see it"],
|
|
68
69
|
["file.not-found", "not_found", "the file named, or its folder, does not exist"],
|
|
69
70
|
validation("file.not-a-file", "the path names a folder or another thing that is not a file"),
|
|
70
|
-
["file.denied", "permission_error", "the file cannot be opened: permission denied"]
|
|
71
|
+
["file.denied", "permission_error", "the file cannot be opened: permission denied"],
|
|
72
|
+
validation("file.too-large", "the file is larger than the limit set for this read")
|
|
71
73
|
];
|
|
72
74
|
var SFTP = [
|
|
73
75
|
["sftp.host-key-missing", "configuration_error", "no host key is pinned for the SFTP server"],
|
|
@@ -77,7 +79,21 @@ var SFTP = [
|
|
|
77
79
|
["sftp.library-missing", "configuration_error", "SFTP needs the ssh2 package in the CLI's dependencies"],
|
|
78
80
|
["sftp.timeout", "timeout", "the SFTP server did not answer in time"],
|
|
79
81
|
validation("sftp.too-large", "the file is larger than the read's byte limit"),
|
|
80
|
-
validation("sftp.closed", "the SFTP connection was closed before the operation")
|
|
82
|
+
validation("sftp.closed", "the SFTP connection was closed before the operation"),
|
|
83
|
+
validation("sftp.file-changed", "the file changed on the server while a stream read it; read it again"),
|
|
84
|
+
["ssh.forward-refused", "permission_error", "the SSH server does not allow forwarding to that address"],
|
|
85
|
+
["ssh.forward-failed", "network_error", "the SSH server could not reach the address behind it"]
|
|
86
|
+
];
|
|
87
|
+
var SQL = [
|
|
88
|
+
validation("sql.bad-identifier", "a table or column name is not a plain identifier"),
|
|
89
|
+
["sql.library-missing", "configuration_error", "this database needs the mysql2 or pg package in the CLI"],
|
|
90
|
+
["db.refused", "authentication_error", "the database server refused the user or password"],
|
|
91
|
+
["db.no-database", "not_found", "the database server has no such database"],
|
|
92
|
+
["db.no-table", "not_found", "the database has no such table"],
|
|
93
|
+
["db.no-select", "permission_error", "the database user may not read the table; grant it SELECT"],
|
|
94
|
+
["db.read-only", "permission_error", "the database refused a write: the connection only reads"],
|
|
95
|
+
["db.timeout", "timeout", "the database server did not answer in time"],
|
|
96
|
+
["db.failed", "provider_error", "the database server failed the query"]
|
|
81
97
|
];
|
|
82
98
|
var OTHERS = [
|
|
83
99
|
validation("doctor.report-exists", "the report's file exists; a problem report never overwrites a file"),
|
|
@@ -109,6 +125,13 @@ var OTHERS = [
|
|
|
109
125
|
["ai.images-not-allowed", "permission_error", "the AI model may not read pictures; models ai set --allow-remote"],
|
|
110
126
|
["picture-reading.off", "permission_error", "picture reading is never; models picture-reading set request"],
|
|
111
127
|
["picture-reading.owner-only", "permission_error", "only the owner turns picture reading on, not an agent"],
|
|
128
|
+
[
|
|
129
|
+
"chat-sending.denied",
|
|
130
|
+
"permission_error",
|
|
131
|
+
"models chats is denied: chat text never goes to a model off this computer, even with --yes"
|
|
132
|
+
],
|
|
133
|
+
["chat-sending.ask", "confirmation_required", "models chats is ask: pass --yes, or the owner sets it to allowed"],
|
|
134
|
+
["chat-sending.owner-only", "permission_error", "only the owner makes models chats less strict, not an agent"],
|
|
112
135
|
validation("picture-reading.agent-missing", "choose the agent that reads: --agent claude or --agent codex"),
|
|
113
136
|
validation("picture-reading.not-a-picture", "the file is not a PNG, JPEG or WebP picture"),
|
|
114
137
|
["picture-reading.unavailable-file", "not_found", "the picture could not be fetched, or is over the size limit"],
|
|
@@ -164,6 +187,7 @@ var OTHERS = [
|
|
|
164
187
|
["document.not-imported", "not_found", "the document is not imported in this source account"],
|
|
165
188
|
["document.not-found", "not_found", "no listed document has that reference"],
|
|
166
189
|
["meeting.not-found", "not_found", "no meeting row has that event or meeting reference"],
|
|
190
|
+
["listing.too-large", "provider_error", "the listing is over its bound; the checkpoint was kept"],
|
|
167
191
|
["listing.source-not-found", "not_found", "a source: term names no account holding what is listed"],
|
|
168
192
|
validation("query.empty-window", "the time window ends before it starts, so no row can fall in it"),
|
|
169
193
|
["extraction.invalid-proposals", "invalid_response", "the model's memory proposals could not be used"],
|
|
@@ -181,6 +205,15 @@ var OTHERS = [
|
|
|
181
205
|
"the email could not be read again, so its skipped attachments have no text"
|
|
182
206
|
],
|
|
183
207
|
["mirror.partial", "provider_error", "some mirrored files were not synced"],
|
|
208
|
+
["mirror.none", "not_found", "the profile has no mirrors; add one with mirrors add"],
|
|
209
|
+
["mirror.not-found", "not_found", "no such mirror in this profile; see mirrors list"],
|
|
210
|
+
validation("mirror.not-folder", "the path to mirror is not a folder"),
|
|
211
|
+
["catalog.unavailable", "configuration_error", "the store has no shared catalog for this account"],
|
|
212
|
+
["catalog.not-found", "not_found", "the file or folder is not in the local catalog; run catalog import or sync"],
|
|
213
|
+
validation("catalog.depth-invalid", "tree depth must be between 0 and 50"),
|
|
214
|
+
["catalog.cycle", "invalid_response", "local folder ancestry contains a cycle"],
|
|
215
|
+
validation("catalog.tree-limit", "the tree is over 10000 entries; name a smaller folder or lower --depth"),
|
|
216
|
+
validation("export.exists", "the output file already exists"),
|
|
184
217
|
["profile.wrong-account", "authentication_error", "the signed-in source account does not match this profile"],
|
|
185
218
|
validation("push.too-many-files", "the folder holds more files than one push takes"),
|
|
186
219
|
validation("push.unreadable", "the folder to push could not be read"),
|
|
@@ -191,7 +224,7 @@ var OTHERS = [
|
|
|
191
224
|
"the settings file's damage has more than one reading; nothing was changed, so it is fixed by hand"
|
|
192
225
|
],
|
|
193
226
|
["state.invalid", "configuration_error", "the saved sync state is unreadable or invalid; it is kept, not reset"],
|
|
194
|
-
["sync.partial", "provider_error", "some
|
|
227
|
+
["sync.partial", "provider_error", "some sources did not sync; the next sync retries them"],
|
|
195
228
|
validation("event.conflict", "the event changed at the provider since the last sync; sync and try again"),
|
|
196
229
|
validation("event.notify-required", "the event has other attendees; say whether to notify them"),
|
|
197
230
|
validation("remind.window", "--due-within is outside 1m to 1d"),
|
|
@@ -202,6 +235,7 @@ var OTHERS = [
|
|
|
202
235
|
"the reminder program failed for some events; the next run retries them"
|
|
203
236
|
],
|
|
204
237
|
["sync.failed", "provider_error", "the sync failed; the answer comes from what the store already holds"],
|
|
238
|
+
validation("event.conference-exists", "the event has a meeting link already, which its attendees use"),
|
|
205
239
|
validation("event.repeat-invalid", "the repeat rule is outside the RFC 5545 subset the calendars take"),
|
|
206
240
|
validation("event.repeat-kind", "the series' rule holds a date or a time of the kind the event is leaving"),
|
|
207
241
|
validation("event.repeat-split", "the series cannot be split at this occurrence, or was split there already"),
|
|
@@ -318,7 +352,6 @@ var OTHERS = [
|
|
|
318
352
|
],
|
|
319
353
|
["store.vector-extension-failed", "configuration_error", "the sqlite-vec extension did not load; reinstall the CLI"],
|
|
320
354
|
validation("store.vector-invalid", "a vector to store had a non-finite value"),
|
|
321
|
-
validation("catalog.scope-limit", "the selected catalog exceeds its entry limit"),
|
|
322
355
|
validation("evidence.quote-length", "a quote from the evidence is empty or over 500 characters"),
|
|
323
356
|
validation("evidence.quote-not-found", "the cited source does not say the quoted words"),
|
|
324
357
|
validation("evidence.row-too-large", "one evidence row is over its size limit"),
|
|
@@ -613,7 +646,7 @@ var INPUT_FIELD_REASONS = defineReasons([
|
|
|
613
646
|
var REASONS = defineReasons([
|
|
614
647
|
...QUERY_REASONS,
|
|
615
648
|
...INPUT_FIELD_REASONS,
|
|
616
|
-
...[...QUERY, ...SIGN_IN, ...PROVIDER_API, ...SFTP, ...OTHERS].map(([reason, code, message]) => ({
|
|
649
|
+
...[...QUERY, ...SIGN_IN, ...PROVIDER_API, ...SFTP, ...SQL, ...OTHERS].map(([reason, code, message]) => ({
|
|
617
650
|
reason,
|
|
618
651
|
code,
|
|
619
652
|
message,
|
|
@@ -690,6 +723,8 @@ var DETAILS = [
|
|
|
690
723
|
];
|
|
691
724
|
var SHARED = { reasons: REASONS, details: DETAILS };
|
|
692
725
|
var merged = /* @__PURE__ */ new WeakMap();
|
|
726
|
+
var coreCodes = new Map(REASONS.map((entry) => [entry.reason, entry.code]));
|
|
727
|
+
var sameAsCore = /* @__PURE__ */ __name((entry) => coreCodes.get(entry.reason) === entry.code, "sameAsCore");
|
|
693
728
|
var failureContext = /* @__PURE__ */ __name((errors) => {
|
|
694
729
|
if (!errors)
|
|
695
730
|
return SHARED;
|
|
@@ -700,7 +735,7 @@ var failureContext = /* @__PURE__ */ __name((errors) => {
|
|
|
700
735
|
if (unnamed.length > 0)
|
|
701
736
|
throw new Error(`error details must be snake_case: ${unnamed.join(", ")}`);
|
|
702
737
|
const context = {
|
|
703
|
-
reasons: defineReasons([...REASONS, ...errors.reasons ?? []]),
|
|
738
|
+
reasons: defineReasons([...REASONS, ...(errors.reasons ?? []).filter((entry) => !sameAsCore(entry))]),
|
|
704
739
|
details: [.../* @__PURE__ */ new Set([...DETAILS, ...errors.details ?? []])]
|
|
705
740
|
};
|
|
706
741
|
merged.set(errors, context);
|
|
@@ -2,15 +2,15 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
wirecatDirectory
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-SFPUSEOT.js";
|
|
6
6
|
import {
|
|
7
7
|
CliError
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-4QNW4NK6.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.667.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_0b2555be96e01c2163d7c05aae2e84c1/node_modules/@wirecat/cli-core/dist/speech/models.js
|
|
14
14
|
var huggingFace = /* @__PURE__ */ __name((repository, commit) => (name) => `https://huggingface.co/csukuangfj/${repository}/resolve/${commit}/${name}`, "huggingFace");
|
|
15
15
|
var gigaam = huggingFace("sherpa-onnx-nemo-transducer-punct-giga-am-v3-russian-2025-12-16", "a6039be7cee829a9044a69ac0ebaf1c191217c97");
|
|
16
16
|
var gigaamCtc = huggingFace("sherpa-onnx-nemo-ctc-punct-giga-am-v3-russian-2025-12-16", "4fb5407ff028a69fec516cdf4c10fac9ddea7c16");
|
|
@@ -137,7 +137,7 @@ var speechModel = /* @__PURE__ */ __name((id) => {
|
|
|
137
137
|
return model;
|
|
138
138
|
}, "speechModel");
|
|
139
139
|
|
|
140
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
140
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.667.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_0b2555be96e01c2163d7c05aae2e84c1/node_modules/@wirecat/cli-core/dist/speech/install.js
|
|
141
141
|
import { createHash, randomUUID } from "node:crypto";
|
|
142
142
|
import { createReadStream, createWriteStream, mkdirSync, statSync } from "node:fs";
|
|
143
143
|
import { rename, rm } from "node:fs/promises";
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
OPENAI_URL,
|
|
5
|
+
openRemote,
|
|
6
|
+
remoteKey,
|
|
7
|
+
remoteModel
|
|
8
|
+
} from "./chunk-QE4L2QQZ.js";
|
|
9
|
+
import {
|
|
10
|
+
isTextModelInstalled,
|
|
11
|
+
openEmbedder,
|
|
12
|
+
textModelsDirectory
|
|
13
|
+
} from "./chunk-T4CI3YXW.js";
|
|
14
|
+
import {
|
|
15
|
+
textModel,
|
|
16
|
+
vectorModelKey
|
|
17
|
+
} from "./chunk-STNZQBY4.js";
|
|
18
|
+
import {
|
|
19
|
+
endpointFetch
|
|
20
|
+
} from "./chunk-SP5OMHOO.js";
|
|
21
|
+
import {
|
|
22
|
+
CliError
|
|
23
|
+
} from "./chunk-4QNW4NK6.js";
|
|
24
|
+
import {
|
|
25
|
+
__name
|
|
26
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
27
|
+
|
|
28
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.667.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_0b2555be96e01c2163d7c05aae2e84c1/node_modules/@wirecat/cli-core/dist/services/meeting-model.js
|
|
29
|
+
var integer = /* @__PURE__ */ __name((value, name, max) => {
|
|
30
|
+
if (!Number.isSafeInteger(value) || value < 1 || value > max)
|
|
31
|
+
throw new CliError("validation_error", `Invalid ${name}`);
|
|
32
|
+
return value;
|
|
33
|
+
}, "integer");
|
|
34
|
+
var cancelled = /* @__PURE__ */ __name((signal) => {
|
|
35
|
+
if (signal?.aborted)
|
|
36
|
+
throw new CliError("cancelled", "Meeting embedding was cancelled");
|
|
37
|
+
}, "cancelled");
|
|
38
|
+
var validatedRemote = /* @__PURE__ */ __name((remote) => {
|
|
39
|
+
let url;
|
|
40
|
+
try {
|
|
41
|
+
url = new URL(remote.baseUrl);
|
|
42
|
+
} catch {
|
|
43
|
+
throw new CliError("validation_error", "Invalid embedding endpoint");
|
|
44
|
+
}
|
|
45
|
+
if (!["http:", "https:"].includes(url.protocol) || url.username || url.password || url.search || url.hash)
|
|
46
|
+
throw new CliError("validation_error", "Embedding endpoint requires HTTP/S without credentials, query or fragment");
|
|
47
|
+
if (typeof remote.model !== "string" || !/^[\w./:-]{1,200}$/.test(remote.model))
|
|
48
|
+
throw new CliError("validation_error", "Invalid embedding model name");
|
|
49
|
+
const dims = integer(remote.dims, "embedding dimensions", 8192);
|
|
50
|
+
const baseUrl = remote.baseUrl.replace(/\/+$/, "");
|
|
51
|
+
const result = remoteModel({ model: remote.model, dims, ...baseUrl === OPENAI_URL ? {} : { baseUrl } });
|
|
52
|
+
return result;
|
|
53
|
+
}, "validatedRemote");
|
|
54
|
+
var meetingEmbeddingModel = /* @__PURE__ */ __name((choice, env) => {
|
|
55
|
+
if (typeof choice === "string") {
|
|
56
|
+
const model = textModel(choice, env);
|
|
57
|
+
return { key: vectorModelKey(model), dims: model.dims, kind: "local", model: model.id };
|
|
58
|
+
}
|
|
59
|
+
if (!choice || typeof choice !== "object" || !choice.remote)
|
|
60
|
+
throw new CliError("validation_error", "An explicit embedding model is required");
|
|
61
|
+
const remote = validatedRemote(choice.remote);
|
|
62
|
+
if (choice.concurrency !== void 0 && choice.concurrency !== 1)
|
|
63
|
+
throw new CliError("validation_error", "Meeting embedding supports one remote request worker");
|
|
64
|
+
return { key: remoteKey(remote), dims: remote.dims, kind: "remote", model: remote.model };
|
|
65
|
+
}, "meetingEmbeddingModel");
|
|
66
|
+
var createMeetingRemoteModel = /* @__PURE__ */ __name((input) => {
|
|
67
|
+
try {
|
|
68
|
+
return validatedRemote(remoteModel(input));
|
|
69
|
+
} catch (error) {
|
|
70
|
+
if (error instanceof CliError)
|
|
71
|
+
throw error;
|
|
72
|
+
throw new CliError("validation_error", "Invalid embedding endpoint");
|
|
73
|
+
}
|
|
74
|
+
}, "createMeetingRemoteModel");
|
|
75
|
+
var withAbort = /* @__PURE__ */ __name(async (pending, signal) => {
|
|
76
|
+
cancelled(signal);
|
|
77
|
+
if (!signal)
|
|
78
|
+
return pending;
|
|
79
|
+
let onAbort = /* @__PURE__ */ __name(() => {
|
|
80
|
+
}, "onAbort");
|
|
81
|
+
const interrupted = new Promise((_, reject) => {
|
|
82
|
+
onAbort = /* @__PURE__ */ __name(() => reject(new CliError("cancelled", "Meeting embedding was cancelled")), "onAbort");
|
|
83
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
84
|
+
});
|
|
85
|
+
try {
|
|
86
|
+
return await Promise.race([pending, interrupted]);
|
|
87
|
+
} finally {
|
|
88
|
+
signal.removeEventListener("abort", onAbort);
|
|
89
|
+
}
|
|
90
|
+
}, "withAbort");
|
|
91
|
+
var boundedResponse = /* @__PURE__ */ __name(async (response, maxBytes, signal) => {
|
|
92
|
+
const length = response.headers.get("content-length");
|
|
93
|
+
if (length !== null && (!/^\d+$/.test(length) || Number(length) > maxBytes)) {
|
|
94
|
+
void response.body?.cancel().catch(() => {
|
|
95
|
+
});
|
|
96
|
+
throw new CliError("invalid_response", "Embedding response exceeds the byte budget");
|
|
97
|
+
}
|
|
98
|
+
if (!response.body)
|
|
99
|
+
throw new CliError("invalid_response", "Embedding response has no body");
|
|
100
|
+
const reader = response.body.getReader();
|
|
101
|
+
const chunks = [];
|
|
102
|
+
let bytes = 0;
|
|
103
|
+
try {
|
|
104
|
+
for (; ; ) {
|
|
105
|
+
cancelled(signal);
|
|
106
|
+
const part = await withAbort(reader.read(), signal);
|
|
107
|
+
cancelled(signal);
|
|
108
|
+
if (part.done)
|
|
109
|
+
break;
|
|
110
|
+
bytes += part.value.byteLength;
|
|
111
|
+
if (bytes > maxBytes)
|
|
112
|
+
throw new CliError("invalid_response", "Embedding response exceeds the byte budget");
|
|
113
|
+
chunks.push(part.value);
|
|
114
|
+
}
|
|
115
|
+
const body = Buffer.concat(chunks, bytes).toString("utf8");
|
|
116
|
+
try {
|
|
117
|
+
return JSON.parse(body);
|
|
118
|
+
} catch {
|
|
119
|
+
throw new CliError("invalid_response", "Embedding response is not JSON");
|
|
120
|
+
}
|
|
121
|
+
} finally {
|
|
122
|
+
void reader.cancel().catch(() => {
|
|
123
|
+
});
|
|
124
|
+
reader.releaseLock();
|
|
125
|
+
}
|
|
126
|
+
}, "boundedResponse");
|
|
127
|
+
var openMeetingEmbedder = /* @__PURE__ */ __name(async (choice, options = {}) => {
|
|
128
|
+
const descriptor = meetingEmbeddingModel(choice, options.env);
|
|
129
|
+
const { signal } = options;
|
|
130
|
+
cancelled(signal);
|
|
131
|
+
const maxInputBytes = integer(options.maxInputBytes ?? 1024 * 1024, "input byte budget", 16 * 1024 * 1024);
|
|
132
|
+
const maxResponseBytes = integer(options.maxResponseBytes ?? 8 * 1024 * 1024, "response byte budget", 64 * 1024 * 1024);
|
|
133
|
+
if (options.threads !== void 0)
|
|
134
|
+
integer(options.threads, "embedding threads", 128);
|
|
135
|
+
let engine;
|
|
136
|
+
let remoteFailure;
|
|
137
|
+
if (typeof choice === "string") {
|
|
138
|
+
const model = textModel(choice, options.env);
|
|
139
|
+
const directory = options.directory ?? textModelsDirectory(options.env);
|
|
140
|
+
if (!isTextModelInstalled(model, directory))
|
|
141
|
+
throw new CliError("configuration_error", "The explicit local embedding model is not installed");
|
|
142
|
+
engine = await openEmbedder(model, directory, {
|
|
143
|
+
...options.threads === void 0 ? {} : { threads: options.threads }
|
|
144
|
+
});
|
|
145
|
+
} else {
|
|
146
|
+
const remote = validatedRemote(choice.remote);
|
|
147
|
+
const key = choice.apiKey ?? (remote.provider === "openai" ? (options.env ?? process.env).OPENAI_API_KEY : void 0);
|
|
148
|
+
if (remote.provider === "openai" && !key)
|
|
149
|
+
throw new CliError("authentication_error", "The explicit remote embedding model requires an API key");
|
|
150
|
+
const post = options.fetch ?? endpointFetch(remote.baseUrl, 12e4);
|
|
151
|
+
const guarded = /* @__PURE__ */ __name(async (url, init) => {
|
|
152
|
+
try {
|
|
153
|
+
cancelled(signal);
|
|
154
|
+
const responseTask = post(url, { ...init, redirect: "manual", ...signal ? { signal } : {} }).then((response2) => {
|
|
155
|
+
if (signal?.aborted) {
|
|
156
|
+
void response2.body?.cancel().catch(() => {
|
|
157
|
+
});
|
|
158
|
+
cancelled(signal);
|
|
159
|
+
}
|
|
160
|
+
return response2;
|
|
161
|
+
});
|
|
162
|
+
const response = await withAbort(responseTask, signal);
|
|
163
|
+
if (signal?.aborted) {
|
|
164
|
+
void response.body?.cancel().catch(() => {
|
|
165
|
+
});
|
|
166
|
+
cancelled(signal);
|
|
167
|
+
}
|
|
168
|
+
if (response.status >= 300 && response.status < 400) {
|
|
169
|
+
void response.body?.cancel().catch(() => {
|
|
170
|
+
});
|
|
171
|
+
throw new CliError("invalid_response", "Embedding redirects are refused");
|
|
172
|
+
}
|
|
173
|
+
if (!response.ok) {
|
|
174
|
+
void response.body?.cancel().catch(() => {
|
|
175
|
+
});
|
|
176
|
+
return new Response("{}", { status: response.status });
|
|
177
|
+
}
|
|
178
|
+
const body = await boundedResponse(response, maxResponseBytes, signal);
|
|
179
|
+
if (!body || typeof body !== "object" || !("data" in body) || !Array.isArray(body.data) || body.data.length > 256)
|
|
180
|
+
throw new CliError("invalid_response", "Embedding response lacks vector data");
|
|
181
|
+
for (const entry of body.data) {
|
|
182
|
+
if (!entry || typeof entry !== "object" || !Number.isSafeInteger(entry.index) || entry.index < 0 || !Array.isArray(entry.embedding) || entry.embedding.length !== remote.dims || entry.embedding.some((value) => typeof value !== "number" || !Number.isFinite(value) || !Number.isFinite(Math.fround(value))))
|
|
183
|
+
throw new CliError("invalid_response", "Embedding response contains invalid vectors");
|
|
184
|
+
}
|
|
185
|
+
const indices = body.data.map((entry) => entry.index).sort((a, b) => a - b);
|
|
186
|
+
if (indices.some((index, position) => index !== position))
|
|
187
|
+
throw new CliError("invalid_response", "Embedding response contains invalid vector indices");
|
|
188
|
+
return new Response(JSON.stringify({ data: body.data.map((entry) => ({ index: entry.index, embedding: entry.embedding })) }), { status: response.status });
|
|
189
|
+
} catch (error) {
|
|
190
|
+
remoteFailure = error;
|
|
191
|
+
throw error;
|
|
192
|
+
}
|
|
193
|
+
}, "guarded");
|
|
194
|
+
engine = openRemote(remote, key, { concurrency: 1, fetch: guarded, tries: 1, env: options.env ?? process.env });
|
|
195
|
+
}
|
|
196
|
+
if (signal?.aborted) {
|
|
197
|
+
await engine.close();
|
|
198
|
+
cancelled(signal);
|
|
199
|
+
}
|
|
200
|
+
let closed = false;
|
|
201
|
+
let running = false;
|
|
202
|
+
let active = null;
|
|
203
|
+
let closing = null;
|
|
204
|
+
return {
|
|
205
|
+
...descriptor,
|
|
206
|
+
async embed(texts, kind) {
|
|
207
|
+
cancelled(signal);
|
|
208
|
+
if (closed)
|
|
209
|
+
throw new CliError("configuration_error", "Meeting embedder is closed");
|
|
210
|
+
if (!Array.isArray(texts) || texts.length > 1e3 || texts.some((text) => typeof text !== "string") || !["query", "passage"].includes(kind))
|
|
211
|
+
throw new CliError("validation_error", "Invalid meeting embedding inputs");
|
|
212
|
+
if (Buffer.byteLength(JSON.stringify(texts), "utf8") > maxInputBytes || texts.length * descriptor.dims * 4 > maxResponseBytes)
|
|
213
|
+
throw new CliError("validation_error", "Meeting embedding input or vector payload exceeds its byte budget");
|
|
214
|
+
if (running)
|
|
215
|
+
throw new CliError("validation_error", "A meeting embedding request is already running");
|
|
216
|
+
running = true;
|
|
217
|
+
let settled = /* @__PURE__ */ __name(() => {
|
|
218
|
+
}, "settled");
|
|
219
|
+
active = new Promise((resolve) => {
|
|
220
|
+
settled = resolve;
|
|
221
|
+
});
|
|
222
|
+
remoteFailure = void 0;
|
|
223
|
+
try {
|
|
224
|
+
const vectors = await engine.embed([...texts], kind);
|
|
225
|
+
cancelled(signal);
|
|
226
|
+
if (vectors.length !== texts.length || vectors.some((vector) => vector.length !== descriptor.dims || !vector.some((value) => value !== 0) || [...vector].some((value) => !Number.isFinite(value))))
|
|
227
|
+
throw new CliError("invalid_response", "Meeting embedder returned invalid vectors");
|
|
228
|
+
return vectors;
|
|
229
|
+
} catch (error) {
|
|
230
|
+
cancelled(signal);
|
|
231
|
+
if (remoteFailure instanceof CliError)
|
|
232
|
+
throw remoteFailure;
|
|
233
|
+
if (error instanceof CliError)
|
|
234
|
+
throw error;
|
|
235
|
+
throw new CliError("provider_error", "Meeting embedding failed");
|
|
236
|
+
} finally {
|
|
237
|
+
running = false;
|
|
238
|
+
settled();
|
|
239
|
+
active = null;
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
async close() {
|
|
243
|
+
if (!closing) {
|
|
244
|
+
closed = true;
|
|
245
|
+
closing = (async () => {
|
|
246
|
+
await active;
|
|
247
|
+
await engine.close();
|
|
248
|
+
})();
|
|
249
|
+
}
|
|
250
|
+
await closing;
|
|
251
|
+
}
|
|
252
|
+
};
|
|
253
|
+
}, "openMeetingEmbedder");
|
|
254
|
+
|
|
255
|
+
export {
|
|
256
|
+
meetingEmbeddingModel,
|
|
257
|
+
createMeetingRemoteModel,
|
|
258
|
+
openMeetingEmbedder
|
|
259
|
+
};
|