@wirecat/zoom-cli 0.76.0 → 0.78.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-AAMFP7IN.js → all-profiles-7JN3N3E6.js} +11 -11
- package/dist/bundle/answer-policy-G2BNMPEX.js +122 -0
- package/dist/bundle/{anthropic-6KIS53QB.js → anthropic-U6O7UYGZ.js} +6 -6
- package/dist/bundle/{app-server-6QYNNYEU.js → app-server-G7BTC6CE.js} +78 -68
- package/dist/bundle/{bun-QVVCH4MJ.js → bun-VLROVUFK.js} +2 -2
- package/dist/bundle/{bun-sqlite-Y2ZFMNQ3.js → bun-sqlite-C5JLANDE.js} +7 -7
- package/dist/bundle/{chunk-25GMFXPF.js → chunk-2AWWMROP.js} +3244 -3674
- package/dist/bundle/{chunk-YESHGC3M.js → chunk-2LMD3JUD.js} +2 -2
- package/dist/bundle/{chunk-LGBLYFKI.js → chunk-2O66KMOR.js} +6 -2
- package/dist/bundle/{chunk-JADBHKBP.js → chunk-2USGT7LE.js} +1 -1
- package/dist/bundle/{chunk-M7WYBGQT.js → chunk-3A3B3JX4.js} +8 -8
- package/dist/bundle/{chunk-RJK5ADMH.js → chunk-3NZJKY7A.js} +103 -42
- package/dist/bundle/chunk-3QWYRZME.js +773 -0
- package/dist/bundle/{chunk-D2TGXSHQ.js → chunk-4QCLPSJ7.js} +5 -5
- package/dist/bundle/{chunk-XC4V6YCS.js → chunk-4XPVRZXE.js} +1 -1
- package/dist/bundle/{chunk-EZJSAYWZ.js → chunk-532FNLON.js} +31 -87
- package/dist/bundle/{chunk-QLUU3BV2.js → chunk-53TV72JG.js} +6 -6
- package/dist/bundle/{chunk-VJANMYEC.js → chunk-5DLK4OXF.js} +3 -3
- package/dist/bundle/chunk-5SM2IOAS.js +389 -0
- package/dist/bundle/{chunk-65VRWNDP.js → chunk-6MFEWAK4.js} +4 -4
- package/dist/bundle/{chunk-IUSY4ZJK.js → chunk-6NTNAEZF.js} +2379 -2114
- package/dist/bundle/{chunk-DQHS336B.js → chunk-7AMKSXMB.js} +7 -6
- package/dist/bundle/{chunk-IXPBSDKB.js → chunk-7EVB4UV7.js} +4 -4
- package/dist/bundle/chunk-7HEZQCHL.js +555 -0
- package/dist/bundle/{chunk-TYAFL66K.js → chunk-7IIQU5RA.js} +15 -31
- package/dist/bundle/{chunk-TK77DCE5.js → chunk-7K5O2VWO.js} +1 -1
- package/dist/bundle/{chunk-VG63EXRC.js → chunk-AEVSVVTP.js} +2 -2
- package/dist/bundle/chunk-B4V4DRVO.js +229 -0
- package/dist/bundle/{chunk-2HKUQ7DR.js → chunk-B6TUEQ4O.js} +3 -3
- package/dist/bundle/chunk-BAHXR4PA.js +259 -0
- package/dist/bundle/{chunk-ZFYNJERV.js → chunk-BGO7IEHY.js} +6 -6
- package/dist/bundle/{chunk-PFLJJQWW.js → chunk-BIUHLXL2.js} +54 -55
- package/dist/bundle/{chunk-5T7TBK5Y.js → chunk-C26V2XNV.js} +1 -1
- package/dist/bundle/chunk-C56OYYFG.js +170 -0
- package/dist/bundle/{chunk-MDTEAKA5.js → chunk-DLJPN47R.js} +8 -6
- package/dist/bundle/{chunk-FBVJGJDM.js → chunk-EV7QCFQR.js} +27 -574
- package/dist/bundle/{chunk-ORM73DZO.js → chunk-F2KZNAFF.js} +2 -2
- package/dist/bundle/{chunk-QY6GE7CL.js → chunk-F7IDYQLM.js} +2 -2
- package/dist/bundle/{chunk-WNXC42IU.js → chunk-FCGRXUAU.js} +9 -9
- package/dist/bundle/{chunk-ELW3LMJZ.js → chunk-FHOQWPQ6.js} +397 -157
- package/dist/bundle/{chunk-NQ356ERO.js → chunk-FMMCGQNT.js} +77 -10
- package/dist/bundle/{chunk-K3K3WKDB.js → chunk-FNLXFQN6.js} +1 -1
- package/dist/bundle/{chunk-YGKM2ZWF.js → chunk-FURKMNC2.js} +3 -3
- package/dist/bundle/{chunk-XRH2NKW4.js → chunk-FXHZHQKU.js} +6 -6
- package/dist/bundle/{chunk-GZYICXO4.js → chunk-GQ6EJDMV.js} +1 -1
- package/dist/bundle/{chunk-VABYJQYE.js → chunk-H34KEXTN.js} +24 -22
- package/dist/bundle/{chunk-HWYSJ4SL.js → chunk-H74NENWA.js} +3 -3
- package/dist/bundle/{chunk-Y2BGABXP.js → chunk-H7SRM26V.js} +3 -3
- package/dist/bundle/{chunk-VRA4RVQU.js → chunk-HGBZBQAE.js} +3 -3
- package/dist/bundle/{chunk-EZXW3ZCR.js → chunk-HI4QICF7.js} +12 -12
- package/dist/bundle/{chunk-LEVOI6Z3.js → chunk-HOJOVUO6.js} +14 -13
- package/dist/bundle/{chunk-XWQKRKMT.js → chunk-HUSIS3XO.js} +71 -252
- package/dist/bundle/chunk-IBINGDYF.js +335 -0
- package/dist/bundle/{chunk-55SWKR6Y.js → chunk-INJK7FNM.js} +337 -597
- package/dist/bundle/{chunk-CXHUOPN5.js → chunk-JOIAE3NO.js} +7 -7
- package/dist/bundle/{chunk-OFODCJ2A.js → chunk-KBTINKQF.js} +3 -3
- package/dist/bundle/{chunk-VCFSUGPE.js → chunk-KEAKNNXU.js} +4 -4
- package/dist/bundle/{chunk-XHVFX74L.js → chunk-LBTANUUH.js} +2 -2
- package/dist/bundle/chunk-LBV4673S.js +72 -0
- package/dist/bundle/chunk-LERF2FIK.js +295 -0
- package/dist/bundle/{chunk-UYZDH5LK.js → chunk-LX532BXO.js} +1 -1
- package/dist/bundle/{chunk-IVFNHIU4.js → chunk-M2M3U4UU.js} +81 -5
- package/dist/bundle/{chunk-JWMOHEDL.js → chunk-M5R2DURM.js} +10 -10
- package/dist/bundle/{chunk-4ERYXY4Y.js → chunk-MJMHUU3J.js} +1 -1
- package/dist/bundle/{chunk-GYTAHH5Y.js → chunk-MSMFYW6N.js} +2 -2
- package/dist/bundle/{chunk-X73YEFQE.js → chunk-MVLLWSV7.js} +20 -118
- package/dist/bundle/{chunk-RXUVXAMM.js → chunk-NO2LIHWA.js} +1 -1
- package/dist/bundle/{chunk-Y4WEAWU7.js → chunk-NS5XSCHC.js} +1 -1
- package/dist/bundle/{chunk-ZETM63M6.js → chunk-OAE6XR7E.js} +9 -60
- package/dist/bundle/{chunk-CS62FET6.js → chunk-OAYAGQ7C.js} +22 -22
- package/dist/bundle/{chunk-T2QVWRJF.js → chunk-OI4563JI.js} +39 -67
- package/dist/bundle/{chunk-WKT5RPSY.js → chunk-OOLNK3Y5.js} +8 -8
- package/dist/bundle/{chunk-EBIK5Q73.js → chunk-ORSTSBWU.js} +1 -1
- package/dist/bundle/{chunk-GB5LI5RM.js → chunk-P5QO7Y3H.js} +6 -6
- package/dist/bundle/{chunk-3D5PETD2.js → chunk-PJMQE4PW.js} +29 -9
- package/dist/bundle/{chunk-KEFDP6NL.js → chunk-Q4AKIAIA.js} +12 -12
- package/dist/bundle/{chunk-CPOFLYPU.js → chunk-Q4CNLEAY.js} +29 -29
- package/dist/bundle/{chunk-UAV74EY4.js → chunk-RJIJR6KH.js} +1 -1
- package/dist/bundle/{chunk-GPIQY4YB.js → chunk-TEFHNXXX.js} +14 -14
- package/dist/bundle/{chunk-FMJ4QSSU.js → chunk-TFDD4Q5Z.js} +10 -10
- package/dist/bundle/{chunk-HUHH25AG.js → chunk-TXDCIM5D.js} +3017 -1599
- package/dist/bundle/{chunk-FGRFIXG2.js → chunk-U2Z35B3W.js} +2 -2
- package/dist/bundle/{chunk-WZJ7ZYR4.js → chunk-UHBQM54J.js} +4 -4
- package/dist/bundle/{chunk-6VCQ4CTK.js → chunk-UIBKGH5P.js} +1 -1
- package/dist/bundle/{chunk-5EII5RIL.js → chunk-UKYO3HNO.js} +1 -1
- package/dist/bundle/{chunk-7RORMNKP.js → chunk-V53TIJLY.js} +2 -2
- package/dist/bundle/{chunk-OOYIPK4F.js → chunk-VMA7SILL.js} +1 -1
- package/dist/bundle/chunk-VW36ZSAE.js +88 -0
- package/dist/bundle/chunk-WEAMGNST.js +31 -0
- package/dist/bundle/{chunk-EPPE6ZTS.js → chunk-WJTXO2EI.js} +1 -1
- package/dist/bundle/{chunk-4JPOELCT.js → chunk-WOYPWXZK.js} +4 -4
- package/dist/bundle/{chunk-OINDAHXC.js → chunk-XCOGI4JE.js} +4 -4
- package/dist/bundle/{chunk-CE5Y7PQU.js → chunk-XOG7B7K5.js} +4 -4
- package/dist/bundle/chunk-XSF5OBVZ.js +224 -0
- package/dist/bundle/{chunk-B7ZREOBD.js → chunk-XXD4YPHQ.js} +12 -12
- package/dist/bundle/{chunk-35AH33VJ.js → chunk-YAPDU3SV.js} +1 -1
- package/dist/bundle/{chunk-R47GYLNN.js → chunk-YHQ3TEGB.js} +29 -27
- package/dist/bundle/{chunk-LOEK6IFQ.js → chunk-YLNUKNGD.js} +87 -35
- package/dist/bundle/{chunk-6SXCGS3A.js → chunk-YNYQGZUW.js} +7 -7
- package/dist/bundle/{chunk-OWZETMRE.js → chunk-YZKVCTZI.js} +8 -8
- package/dist/bundle/{chunk-UG2QDGAH.js → chunk-ZCVO6GAT.js} +1 -1
- package/dist/bundle/{chunk-YEBWRWE3.js → chunk-ZDZASHSQ.js} +17 -17
- package/dist/bundle/chunk-ZZJ5IWNT.js +101 -0
- package/dist/bundle/{cli-FHMLYHUZ.js → cli-YALONJ4V.js} +135 -84
- package/dist/bundle/command-contract-DMR5EOIN.js +45 -0
- package/dist/bundle/{command-server-entry-YEZM52R5.js → command-server-entry-W4XTBUZE.js} +35 -31
- package/dist/bundle/config-4TLDRXRL.js +109 -0
- package/dist/bundle/{decode-SIYRMJOK.js → decode-IFQHVCFX.js} +16 -8
- package/dist/bundle/{dispatch-SMER3WDX.js → dispatch-GOJB4TDK.js} +9 -9
- package/dist/bundle/{dist-BSJETSFE.js → dist-H7XFUMRX.js} +25 -22
- package/dist/bundle/{echarts-UZJ6AREV.js → echarts-HPUHPJCO.js} +2 -2
- package/dist/bundle/{embed-A7DSHVI7.js → embed-ESU3WZYW.js} +7 -7
- package/dist/bundle/{embedder-WQBR4UGS.js → embedder-BV6O76B3.js} +10 -10
- package/dist/bundle/{failure-73UQXQTW.js → failure-SWVCYFQX.js} +3 -3
- package/dist/bundle/first-run-OEJGAQAE.js +29 -0
- package/dist/bundle/first-screen-QLM4IABL.js +45 -0
- package/dist/bundle/{folders-BH4SV6SI.js → folders-VQGKBM3P.js} +5 -5
- package/dist/bundle/{instructions-SDDUBGH4.js → instructions-UUX57I3V.js} +1 -1
- package/dist/bundle/{main-KL4FN5F3.js → main-UIKADOFB.js} +24 -24
- package/dist/bundle/{mcp-GN4FTJX5.js → mcp-VMS6PBCU.js} +2 -2
- package/dist/bundle/meeting-combined-SKJISCC7.js +26 -0
- package/dist/bundle/meeting-model-YG3Z5KCB.js +26 -0
- package/dist/bundle/meeting-semantic-F6GUICB7.js +23 -0
- package/dist/bundle/{meetings-URPXBHV7.js → meetings-KIBUPLPW.js} +37 -7
- package/dist/bundle/{node-ELCNUOCE.js → node-AM3JCAWB.js} +2 -2
- package/dist/bundle/{node-sqlite-QLSNHZBM.js → node-sqlite-VM6VS3RU.js} +8 -8
- package/dist/bundle/{oauth-LZ64S7Y3.js → oauth-AX5Z32H6.js} +8 -8
- package/dist/bundle/{open-WB4HUPQT.js → open-SSGOOOZG.js} +6 -6
- package/dist/bundle/openai-YIP73X2B.js +28 -0
- package/dist/bundle/{output-file-AHPQA5LR.js → output-file-FR226A64.js} +6 -6
- package/dist/bundle/{process-67DAKAAQ.js → process-5ZEK2VFY.js} +1 -1
- package/dist/bundle/{program-CIMACIBE.js → program-ROJAJHCB.js} +424 -251
- package/dist/bundle/{prompt-GG53UBDJ.js → prompt-6Y7A4453.js} +6 -6
- package/dist/bundle/{recognize-CFJ3CAEH.js → recognize-R5W25WKH.js} +5 -5
- package/dist/bundle/{remote-BLEM7C3Q.js → remote-PA4FQUZK.js} +11 -11
- package/dist/bundle/{rerank-ERN6PC66.js → rerank-CYX3UFTM.js} +8 -8
- package/dist/bundle/run-log-FHERL3H6.js +136 -0
- package/dist/bundle/{serve-FJPPTJXH.js → serve-MM5QEZJW.js} +15 -15
- package/dist/bundle/{server-FLUSDUGM.js → server-JQQAH7E5.js} +64 -54
- package/dist/bundle/server-W2BBONCQ.js +85 -0
- package/dist/bundle/{services-LXC6DVUQ.js → services-Y2DOQONM.js} +85 -54
- package/dist/bundle/{speech-WFEZTKXA.js → speech-O6WLX34V.js} +34 -18
- package/dist/bundle/{sqlite-runtime-KN33VSP7.js → sqlite-runtime-LQTBZMFH.js} +7 -7
- package/dist/bundle/{state-TXS4ZHIT.js → state-AIDPZLVH.js} +7 -7
- package/dist/bundle/{store-ZUREZYZB.js → store-BA4FQS5V.js} +26 -20
- package/dist/bundle/{store-MUOXLVL4.js → store-UNDS2TBG.js} +30 -22
- package/dist/bundle/store-connection-ADBJ36T4.js +102 -0
- package/dist/bundle/store-maintenance-command-IB6ML4UI.js +77 -0
- package/dist/bundle/{streaming-ZSCHRC5S.js → streaming-UFHT5MR2.js} +7 -7
- package/dist/bundle/{tokens-YVDOY4EV.js → tokens-Z32UKGQB.js} +10 -10
- package/dist/bundle/zm.js +9 -9
- package/dist/bundle/{zoom-app-O6GIMB7Y.js → zoom-app-6U46XBTG.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-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 +8 -5
- 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.js +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 +5 -4
- package/skills/zoom-cli/SKILL.md +88 -236
- package/skills/zoom-cli/references/archive.md +59 -0
- package/skills/zoom-cli/references/people-and-projects.md +51 -0
- package/skills/zoom-cli/references/prepare.md +78 -0
- package/skills/zoom-cli/references/search.md +71 -0
- package/skills/zoom-cli/references/setup.md +31 -0
- package/skills/zoom-cli/references/zoom-live.md +27 -0
- package/dist/bundle/answer-policy-ETAELI4A.js +0 -110
- package/dist/bundle/chunk-64N7MY3I.js +0 -161
- package/dist/bundle/command-contract-HUZ4I23S.js +0 -41
- package/dist/bundle/config-KVTWN7QZ.js +0 -97
- package/dist/bundle/first-run-SY6XSUZ3.js +0 -29
- package/dist/bundle/first-screen-ZDMODGWS.js +0 -39
- package/dist/bundle/openai-KN6JE4QU.js +0 -28
- package/dist/bundle/run-log-S67YPJF6.js +0 -124
- package/dist/bundle/server-UNJY3TSJ.js +0 -74
- package/dist/bundle/store-connection-NRNEBUPU.js +0 -90
- package/dist/bundle/store-maintenance-command-OBOPYFZ5.js +0 -65
- /package/dist/bundle/{chunk-BDCC2J2Z.js → chunk-SHTHNBHG.js} +0 -0
|
@@ -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-FCGRXUAU.js";
|
|
9
|
+
import {
|
|
10
|
+
isTextModelInstalled,
|
|
11
|
+
openEmbedder,
|
|
12
|
+
textModelsDirectory
|
|
13
|
+
} from "./chunk-P5QO7Y3H.js";
|
|
14
|
+
import {
|
|
15
|
+
textModel,
|
|
16
|
+
vectorModelKey
|
|
17
|
+
} from "./chunk-IBINGDYF.js";
|
|
18
|
+
import {
|
|
19
|
+
endpointFetch
|
|
20
|
+
} from "./chunk-FURKMNC2.js";
|
|
21
|
+
import {
|
|
22
|
+
CliError
|
|
23
|
+
} from "./chunk-FNLXFQN6.js";
|
|
24
|
+
import {
|
|
25
|
+
__name
|
|
26
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
27
|
+
|
|
28
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.681.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_3bf07d813b3b8f6ae0583ce017092c7c/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
|
+
};
|
|
@@ -5,16 +5,16 @@ import {
|
|
|
5
5
|
backoffMs,
|
|
6
6
|
realSleep,
|
|
7
7
|
wallClock
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-OAYAGQ7C.js";
|
|
9
9
|
import {
|
|
10
10
|
CliError,
|
|
11
11
|
isCliError
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-FNLXFQN6.js";
|
|
13
13
|
import {
|
|
14
14
|
__name
|
|
15
15
|
} from "./chunk-ZVVMGPBJ.js";
|
|
16
16
|
|
|
17
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
17
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/http/hosts.js
|
|
18
18
|
var LABEL = "[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?";
|
|
19
19
|
var HOST_PATTERN = new RegExp(`^(?:${LABEL}(?:\\.${LABEL})*|\\*\\.${LABEL}(?:\\.${LABEL})+)$`);
|
|
20
20
|
var hostProblems = /* @__PURE__ */ __name((hosts) => [
|
|
@@ -26,7 +26,7 @@ var hostCovered = /* @__PURE__ */ __name((hostname, hosts) => {
|
|
|
26
26
|
return hosts.some((host) => host.startsWith("*.") ? name.endsWith(host.slice(1)) : name === host);
|
|
27
27
|
}, "hostCovered");
|
|
28
28
|
|
|
29
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
29
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/http/fetch.js
|
|
30
30
|
var HOST_FETCH_TIMEOUT_MS = 3e4;
|
|
31
31
|
var REDIRECTS = 5;
|
|
32
32
|
var REDIRECT_STATUSES = /* @__PURE__ */ new Set([301, 302, 303, 307, 308]);
|
|
@@ -114,7 +114,7 @@ var hostFetch = /* @__PURE__ */ __name((options) => {
|
|
|
114
114
|
};
|
|
115
115
|
}, "hostFetch");
|
|
116
116
|
|
|
117
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
117
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/http/body.js
|
|
118
118
|
var interrupted = /* @__PURE__ */ __name((signal) => isCliError(signal.reason) ? signal.reason : new CliError(signal.reason instanceof Error && signal.reason.name === "TimeoutError" ? "timeout" : "cancelled", "HTTP response read was interrupted"), "interrupted");
|
|
119
119
|
var checked2 = /* @__PURE__ */ __name((signal) => {
|
|
120
120
|
if (signal?.aborted)
|
|
@@ -199,7 +199,7 @@ var readJsonResponse = /* @__PURE__ */ __name(async (response, options) => {
|
|
|
199
199
|
}
|
|
200
200
|
}, "readJsonResponse");
|
|
201
201
|
|
|
202
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
202
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/http/index.js
|
|
203
203
|
var parseRetryAfter = /* @__PURE__ */ __name((header, now) => {
|
|
204
204
|
if (!header)
|
|
205
205
|
return void 0;
|
|
@@ -1,18 +1,5 @@
|
|
|
1
1
|
import { createRequire as __bundleRequire } from "node:module";
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
|
-
import {
|
|
4
|
-
CHART_KINDS,
|
|
5
|
-
CHART_SIZE,
|
|
6
|
-
chartAnswer,
|
|
7
|
-
chartPng,
|
|
8
|
-
chartRenderer,
|
|
9
|
-
chatChart,
|
|
10
|
-
keepRefreshedRefs,
|
|
11
|
-
mcpUrlOf,
|
|
12
|
-
refuseWriteBeforeConnecting,
|
|
13
|
-
registerPrompts,
|
|
14
|
-
syncsFirst
|
|
15
|
-
} from "./chunk-R47GYLNN.js";
|
|
16
3
|
import {
|
|
17
4
|
BinaryResource,
|
|
18
5
|
Picture,
|
|
@@ -33,35 +20,48 @@ import {
|
|
|
33
20
|
tool,
|
|
34
21
|
toolKey,
|
|
35
22
|
toolsFromCommands
|
|
36
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-YLNUKNGD.js";
|
|
24
|
+
import {
|
|
25
|
+
CHART_KINDS,
|
|
26
|
+
CHART_SIZE,
|
|
27
|
+
chartAnswer,
|
|
28
|
+
chartPng,
|
|
29
|
+
chartRenderer,
|
|
30
|
+
chatChart,
|
|
31
|
+
keepRefreshedRefs,
|
|
32
|
+
mcpUrlOf,
|
|
33
|
+
refuseWriteBeforeConnecting,
|
|
34
|
+
registerPrompts,
|
|
35
|
+
syncsFirst
|
|
36
|
+
} from "./chunk-YHQ3TEGB.js";
|
|
37
37
|
import {
|
|
38
38
|
agentJson,
|
|
39
|
-
|
|
40
|
-
} from "./chunk-
|
|
39
|
+
skillResources
|
|
40
|
+
} from "./chunk-3NZJKY7A.js";
|
|
41
|
+
import {
|
|
42
|
+
instructions
|
|
43
|
+
} from "./chunk-UIBKGH5P.js";
|
|
44
|
+
import {
|
|
45
|
+
mcpHttpMarker
|
|
46
|
+
} from "./chunk-7EVB4UV7.js";
|
|
41
47
|
import {
|
|
42
48
|
StdioServerTransport,
|
|
43
49
|
answeredWire,
|
|
44
50
|
callerOf,
|
|
45
51
|
callingAgent,
|
|
46
52
|
serveStdio
|
|
47
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-HGBZBQAE.js";
|
|
48
54
|
import {
|
|
49
55
|
McpServer,
|
|
50
56
|
ResourceTemplate
|
|
51
57
|
} from "./chunk-5D4AEUVA.js";
|
|
52
58
|
import {
|
|
53
59
|
connectedFor
|
|
54
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-MVLLWSV7.js";
|
|
55
61
|
import {
|
|
56
62
|
lackedNeed,
|
|
57
63
|
wholeList
|
|
58
|
-
} from "./chunk-
|
|
59
|
-
import {
|
|
60
|
-
mcpHttpMarker
|
|
61
|
-
} from "./chunk-IXPBSDKB.js";
|
|
62
|
-
import {
|
|
63
|
-
instructions
|
|
64
|
-
} from "./chunk-6VCQ4CTK.js";
|
|
64
|
+
} from "./chunk-HI4QICF7.js";
|
|
65
65
|
import {
|
|
66
66
|
capability,
|
|
67
67
|
dateWindow,
|
|
@@ -69,16 +69,16 @@ import {
|
|
|
69
69
|
imageSize,
|
|
70
70
|
servicesFor,
|
|
71
71
|
storedDeps
|
|
72
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-2AWWMROP.js";
|
|
73
73
|
import {
|
|
74
74
|
warmEmbedders
|
|
75
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-P5QO7Y3H.js";
|
|
76
76
|
import {
|
|
77
77
|
stdinFieldOf
|
|
78
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-RJIJR6KH.js";
|
|
79
79
|
import {
|
|
80
80
|
findCommand
|
|
81
|
-
} from "./chunk-
|
|
81
|
+
} from "./chunk-4QCLPSJ7.js";
|
|
82
82
|
import {
|
|
83
83
|
DEFAULT_OUTPUT_BYTES,
|
|
84
84
|
changesAuthorityAt,
|
|
@@ -92,31 +92,31 @@ import {
|
|
|
92
92
|
rootOf2 as rootOf,
|
|
93
93
|
sealed,
|
|
94
94
|
snakeKeys
|
|
95
|
-
} from "./chunk-
|
|
95
|
+
} from "./chunk-INJK7FNM.js";
|
|
96
96
|
import {
|
|
97
97
|
readOnlyLockOf
|
|
98
|
-
} from "./chunk-
|
|
98
|
+
} from "./chunk-F7IDYQLM.js";
|
|
99
99
|
import {
|
|
100
100
|
withCaller
|
|
101
|
-
} from "./chunk-
|
|
101
|
+
} from "./chunk-JOIAE3NO.js";
|
|
102
102
|
import {
|
|
103
103
|
fetchesAt,
|
|
104
104
|
levelFor,
|
|
105
105
|
readKeysForCommand
|
|
106
|
-
} from "./chunk-
|
|
106
|
+
} from "./chunk-YZKVCTZI.js";
|
|
107
107
|
import {
|
|
108
108
|
openStore,
|
|
109
109
|
pdfPreviewLimits
|
|
110
|
-
} from "./chunk-
|
|
110
|
+
} from "./chunk-6NTNAEZF.js";
|
|
111
111
|
import {
|
|
112
112
|
typedCommand
|
|
113
|
-
} from "./chunk-
|
|
113
|
+
} from "./chunk-7HEZQCHL.js";
|
|
114
114
|
import {
|
|
115
115
|
isCliFailure
|
|
116
|
-
} from "./chunk-
|
|
116
|
+
} from "./chunk-AEVSVVTP.js";
|
|
117
117
|
import {
|
|
118
118
|
timezoneOf
|
|
119
|
-
} from "./chunk-
|
|
119
|
+
} from "./chunk-TFDD4Q5Z.js";
|
|
120
120
|
import {
|
|
121
121
|
description,
|
|
122
122
|
errorObjectOf,
|
|
@@ -133,21 +133,21 @@ import {
|
|
|
133
133
|
regex,
|
|
134
134
|
strictObject,
|
|
135
135
|
string
|
|
136
|
-
} from "./chunk-
|
|
136
|
+
} from "./chunk-PJMQE4PW.js";
|
|
137
137
|
import {
|
|
138
138
|
CliError
|
|
139
|
-
} from "./chunk-
|
|
139
|
+
} from "./chunk-FNLXFQN6.js";
|
|
140
140
|
import {
|
|
141
141
|
visibleControls
|
|
142
|
-
} from "./chunk-
|
|
142
|
+
} from "./chunk-WJTXO2EI.js";
|
|
143
143
|
import {
|
|
144
144
|
__name
|
|
145
145
|
} from "./chunk-ZVVMGPBJ.js";
|
|
146
146
|
|
|
147
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
147
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.681.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_3bf07d813b3b8f6ae0583ce017092c7c/node_modules/@wirecat/cli-core/dist/mcp/server.js
|
|
148
148
|
import { randomUUID } from "node:crypto";
|
|
149
149
|
|
|
150
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
150
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.681.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_3bf07d813b3b8f6ae0583ce017092c7c/node_modules/@wirecat/cli-core/dist/mcp/agent-log.js
|
|
151
151
|
var agentLog = /* @__PURE__ */ __name((open) => {
|
|
152
152
|
let held;
|
|
153
153
|
return {
|
|
@@ -166,7 +166,7 @@ var agentLog = /* @__PURE__ */ __name((open) => {
|
|
|
166
166
|
};
|
|
167
167
|
}, "agentLog");
|
|
168
168
|
|
|
169
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
169
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.681.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_3bf07d813b3b8f6ae0583ce017092c7c/node_modules/@wirecat/cli-core/dist/mcp/resources.js
|
|
170
170
|
var LISTED = 100;
|
|
171
171
|
var registerResources = /* @__PURE__ */ __name((server, session, { command, name, limit, recorded, withStore, messenger, guard, assertRead }) => {
|
|
172
172
|
server.registerResource("chat", new ResourceTemplate(`${command}://chat/{id}`, {
|
|
@@ -204,7 +204,7 @@ var registerResources = /* @__PURE__ */ __name((server, session, { command, name
|
|
|
204
204
|
});
|
|
205
205
|
}, "registerResources");
|
|
206
206
|
|
|
207
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
207
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.681.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_3bf07d813b3b8f6ae0583ce017092c7c/node_modules/@wirecat/cli-core/dist/mcp/session.js
|
|
208
208
|
var HARMLESS = /* @__PURE__ */ new Set(["validation_error", "not_found", "permission_error", "confirmation_required", "rate_limited"]);
|
|
209
209
|
var harmless = /* @__PURE__ */ __name((code) => HARMLESS.has(code), "harmless");
|
|
210
210
|
var MessengerSession = class {
|
|
@@ -279,7 +279,7 @@ var MessengerSession = class {
|
|
|
279
279
|
}
|
|
280
280
|
};
|
|
281
281
|
|
|
282
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
282
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.681.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_3bf07d813b3b8f6ae0583ce017092c7c/node_modules/@wirecat/cli-core/dist/mcp/tools/attachments.js
|
|
283
283
|
var attachmentsTools = /* @__PURE__ */ __name((messenger) => {
|
|
284
284
|
const _command = messenger.app.command;
|
|
285
285
|
return {
|
|
@@ -333,7 +333,7 @@ var attachmentsTools = /* @__PURE__ */ __name((messenger) => {
|
|
|
333
333
|
};
|
|
334
334
|
}, "attachmentsTools");
|
|
335
335
|
|
|
336
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
336
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.681.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_3bf07d813b3b8f6ae0583ce017092c7c/node_modules/@wirecat/cli-core/dist/mcp/tools/messages-photo.js
|
|
337
337
|
var PHOTO_LIMIT = 512 * 1024;
|
|
338
338
|
var IMAGE_TYPES = [
|
|
339
339
|
["image/jpeg", (b) => b[0] === 255 && b[1] === 216 && b[2] === 255],
|
|
@@ -389,7 +389,7 @@ var readUpTo = /* @__PURE__ */ __name(async (file, limit, saveIt) => {
|
|
|
389
389
|
return new Uint8Array(Buffer.concat(chunks));
|
|
390
390
|
}, "readUpTo");
|
|
391
391
|
|
|
392
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
392
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.681.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_3bf07d813b3b8f6ae0583ce017092c7c/node_modules/@wirecat/cli-core/dist/mcp/tools/stats.js
|
|
393
393
|
var statsTools = /* @__PURE__ */ __name((messenger) => ({
|
|
394
394
|
stats_charts: tool({
|
|
395
395
|
title: "A chart from a chat's statistics",
|
|
@@ -426,14 +426,14 @@ var statsTools = /* @__PURE__ */ __name((messenger) => ({
|
|
|
426
426
|
})
|
|
427
427
|
}), "statsTools");
|
|
428
428
|
|
|
429
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
429
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.681.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_3bf07d813b3b8f6ae0583ce017092c7c/node_modules/@wirecat/cli-core/dist/mcp/tools.js
|
|
430
430
|
var pictureTools = /* @__PURE__ */ __name((messenger) => Object.fromEntries(Object.entries({
|
|
431
431
|
...messagesPhotoTools(messenger),
|
|
432
432
|
...attachmentsTools(messenger),
|
|
433
433
|
...statsTools(messenger)
|
|
434
434
|
}).map(([name, definition]) => [name, { ...definition, input: strictObject(definition.input.entries) }])), "pictureTools");
|
|
435
435
|
|
|
436
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
436
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.681.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_3bf07d813b3b8f6ae0583ce017092c7c/node_modules/@wirecat/cli-core/dist/mcp/server.js
|
|
437
437
|
var PER_RUN = /* @__PURE__ */ new Set([
|
|
438
438
|
"streams",
|
|
439
439
|
"stdin",
|
|
@@ -551,7 +551,8 @@ var createServer = /* @__PURE__ */ __name((command, context, messenger, sessionO
|
|
|
551
551
|
...messenger.diagnose ? { [messenger.provider]: await messenger.diagnose(command, context) } : {}
|
|
552
552
|
}), "local")
|
|
553
553
|
});
|
|
554
|
-
const
|
|
554
|
+
const skills = messenger.skill ? skillResources(app, messenger.skill) : [];
|
|
555
|
+
const skill = skills[0];
|
|
555
556
|
const log = agentLog(() => openStore({ env: context.env, command: app.command, version: app.version }));
|
|
556
557
|
const audit = /* @__PURE__ */ __name(async (call, caller) => {
|
|
557
558
|
if (!recalledAccount(app, provider, settings.profile, context.env))
|
|
@@ -721,10 +722,8 @@ var createServer = /* @__PURE__ */ __name((command, context, messenger, sessionO
|
|
|
721
722
|
});
|
|
722
723
|
}, "assertRead")
|
|
723
724
|
});
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
server.registerResource(resource, uri, { title, description: description2, mimeType }, read);
|
|
727
|
-
}
|
|
725
|
+
for (const { uri, name: name2, title, description: description2, mimeType, read } of skills)
|
|
726
|
+
server.registerResource(name2, uri, { title, description: description2, mimeType }, read);
|
|
728
727
|
return server;
|
|
729
728
|
}, "build");
|
|
730
729
|
return { session, embedders, build, log, offered: [...commands.map((one) => one.command), ...pictured] };
|
|
@@ -750,7 +749,7 @@ var serveOverStdio = /* @__PURE__ */ __name(async (command, context, messenger,
|
|
|
750
749
|
}, "serveOverStdio");
|
|
751
750
|
var serveOverHttpUntilStopped = /* @__PURE__ */ __name(async (command, context, messenger, options, http) => {
|
|
752
751
|
const { session, embedders, build, log } = createServer(command, context, messenger, options);
|
|
753
|
-
const { serveOverHttp } = await import("./serve-
|
|
752
|
+
const { serveOverHttp } = await import("./serve-MM5QEZJW.js");
|
|
754
753
|
const appName = messenger.app.command;
|
|
755
754
|
const appEnvPrefix = messenger.app.envPrefix;
|
|
756
755
|
const listening = await serveOverHttp(build, {
|