@wirecat/drive-cli 0.64.0 → 0.66.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/contracts/wirecat.json +2871 -0
- package/dist/bin/drive.js +2 -2
- package/dist/bin/drive.js.map +1 -1
- package/dist/browse.d.ts +1 -1
- package/dist/browse.d.ts.map +1 -1
- package/dist/browse.js +1 -1
- package/dist/bundle/{all-profiles-BPPT2AK5.js → all-profiles-WCQLIHUG.js} +14 -13
- package/dist/bundle/{anthropic-JW6GOJUD.js → anthropic-5RJMB6O7.js} +32 -16
- package/dist/bundle/{app-server-KAQIOJMZ.js → app-server-3RGYXPKG.js} +72 -58
- package/dist/bundle/{bun-UT7GNTPV.js → bun-L34VEKGG.js} +2 -2
- package/dist/bundle/{bun-sqlite-2OIVV3LS.js → bun-sqlite-H6IAXQXI.js} +12 -8
- package/dist/bundle/chunk-2AF77WMH.js +13 -0
- package/dist/bundle/{chunk-KVW4XNKB.js → chunk-2S3E2HVV.js} +107 -48
- package/dist/bundle/{chunk-IX7NQJLY.js → chunk-3NYH756U.js} +49 -116
- package/dist/bundle/chunk-3QFUDXMQ.js +53 -0
- package/dist/bundle/{chunk-5ZBR55US.js → chunk-3SDJIMZB.js} +1 -1
- package/dist/bundle/{chunk-AHB4OJCI.js → chunk-4UHBJSMI.js} +21735 -27143
- package/dist/bundle/chunk-5HVJK3ZJ.js +101 -0
- package/dist/bundle/{chunk-GSMYXGFR.js → chunk-5K54RZBK.js} +13 -5
- package/dist/bundle/{chunk-LOMW6F2E.js → chunk-5PLINHEY.js} +5403 -4847
- package/dist/bundle/{chunk-J62DI53V.js → chunk-5VDVGDOC.js} +1 -1
- package/dist/bundle/{chunk-66AF4FBW.js → chunk-5XLU4NN6.js} +4 -4
- package/dist/bundle/{chunk-4CNTID2X.js → chunk-6UJCCOZC.js} +4 -4
- package/dist/bundle/{chunk-G4KEKKDE.js → chunk-6X3KUFRQ.js} +60 -29
- package/dist/bundle/{chunk-QEAD2LF4.js → chunk-7EP4AU6A.js} +3 -3
- package/dist/bundle/{chunk-ZRZ4HTCK.js → chunk-7LT2G5BC.js} +171 -174
- package/dist/bundle/{chunk-2W464HAE.js → chunk-7ZGJRVBH.js} +7 -5
- package/dist/bundle/{chunk-FXBHOCJK.js → chunk-ADLS6FVG.js} +1 -1
- package/dist/bundle/{chunk-KG2XKEHL.js → chunk-ALE67WRR.js} +5 -5
- package/dist/bundle/{chunk-ZSZJLJIA.js → chunk-AP4MX247.js} +38 -28
- package/dist/bundle/{chunk-EWGVDFPT.js → chunk-BIJW6AYA.js} +41873 -36466
- package/dist/bundle/{chunk-B7XBIOMR.js → chunk-BQXSE645.js} +16 -16
- package/dist/bundle/{chunk-F2VDAG32.js → chunk-COGWKO2T.js} +3 -3
- package/dist/bundle/{chunk-EZ6O3ST3.js → chunk-D4MIMH2N.js} +12 -6
- package/dist/bundle/{chunk-4YRENUB5.js → chunk-D7KOAPG6.js} +2 -2
- package/dist/bundle/chunk-E2F2XIX6.js +224 -0
- package/dist/bundle/{chunk-36GPBPWM.js → chunk-FA2TNA5X.js} +3 -1
- package/dist/bundle/{chunk-SIOIMO62.js → chunk-FHBTQPA3.js} +69 -63
- package/dist/bundle/{chunk-34BIDKF4.js → chunk-FKKPVPZR.js} +649 -212
- package/dist/bundle/chunk-G4TNKBDX.js +185 -0
- package/dist/bundle/{chunk-2FEZ24DK.js → chunk-GVA3KTCD.js} +20 -20
- package/dist/bundle/chunk-GY4DAJSK.js +167 -0
- package/dist/bundle/{chunk-5OFA5EXE.js → chunk-H7XL6WTW.js} +2 -2
- package/dist/bundle/{chunk-K6BSB53R.js → chunk-HHRJPLFO.js} +1 -1
- package/dist/bundle/{chunk-P7DEGRZA.js → chunk-HPKE2GDP.js} +49 -28
- package/dist/bundle/{chunk-QXCKJUZY.js → chunk-HPSHQVJU.js} +633 -465
- package/dist/bundle/{chunk-BEZJA44H.js → chunk-HQBLJLYH.js} +7 -7
- package/dist/bundle/{chunk-JRXFW7HE.js → chunk-I5R5CMQR.js} +5 -5
- package/dist/bundle/{chunk-EJ4PNHPP.js → chunk-IIHZTV6V.js} +1 -1
- package/dist/bundle/{chunk-G3NULXOM.js → chunk-IRNDYNQX.js} +4 -4
- package/dist/bundle/{chunk-N622LRPM.js → chunk-JCHF7LZT.js} +4 -4
- package/dist/bundle/{chunk-WWCYTMAV.js → chunk-JHMEETXI.js} +2 -2
- package/dist/bundle/{chunk-ZF6GUZCE.js → chunk-JLCR24UM.js} +1 -1
- package/dist/bundle/{chunk-IDAK4DDK.js → chunk-JQXK3M5M.js} +1 -1
- package/dist/bundle/{chunk-KIN6PDFE.js → chunk-KOY5HUBY.js} +14 -5
- package/dist/bundle/{chunk-5HSRQ53R.js → chunk-KRG5X5PH.js} +2 -2
- package/dist/bundle/{chunk-VIJ6ACYB.js → chunk-LVAPSAHF.js} +8 -8
- package/dist/bundle/{chunk-OEVHZOHC.js → chunk-M7543RUJ.js} +50 -18
- package/dist/bundle/{chunk-BZ2ZKILM.js → chunk-MZWXTJ4O.js} +3 -3
- package/dist/bundle/{chunk-EC2XGDKJ.js → chunk-NK4GVFJH.js} +4 -4
- package/dist/bundle/chunk-NYECVHFH.js +10283 -0
- package/dist/bundle/{chunk-HW4UPST2.js → chunk-NYZS2LKF.js} +2 -2
- package/dist/bundle/chunk-O53WLYX3.js +72 -0
- package/dist/bundle/{chunk-IK6KH3RE.js → chunk-OIF4B526.js} +1 -1
- package/dist/bundle/{chunk-UJR272CP.js → chunk-OT7SQQJK.js} +359 -903
- package/dist/bundle/chunk-OZOQLAWK.js +72 -0
- package/dist/bundle/{chunk-VT2UFYPJ.js → chunk-P7HQFII6.js} +22 -15
- package/dist/bundle/{chunk-6G53ZFUT.js → chunk-PJGOQSE5.js} +1 -1
- package/dist/bundle/{chunk-OH3K2E7X.js → chunk-PKM55ZRR.js} +704 -1214
- package/dist/bundle/{chunk-GW3U6OLD.js → chunk-PUMDOCAF.js} +1 -1
- package/dist/bundle/{chunk-EQEGJVO2.js → chunk-QF7VL4C3.js} +1 -1
- package/dist/bundle/{chunk-CPMRM3GQ.js → chunk-QJ57PV55.js} +1941 -662
- package/dist/bundle/{chunk-O2QO5UZC.js → chunk-QSELSDWE.js} +13 -13
- package/dist/bundle/{chunk-BEUAICUD.js → chunk-SOOU5WO6.js} +2 -2
- package/dist/bundle/{chunk-46CD64J2.js → chunk-SZ6JFOL4.js} +269 -64
- package/dist/bundle/{chunk-UD55VB2N.js → chunk-T3ULDA7C.js} +3 -3
- package/dist/bundle/{chunk-E2LBCCTG.js → chunk-TAHISPDE.js} +5 -5
- package/dist/bundle/{chunk-6B37XO6B.js → chunk-TYLEICTX.js} +3 -3
- package/dist/bundle/{chunk-TNV2FXVK.js → chunk-UAKX6DP4.js} +5 -5
- package/dist/bundle/{chunk-VPLFD5RJ.js → chunk-UG3GHFGY.js} +4 -4
- package/dist/bundle/{chunk-B67BLRAI.js → chunk-ULXEW6FT.js} +3 -60
- package/dist/bundle/{chunk-C7WBNOYW.js → chunk-UNTIVT47.js} +26 -2
- package/dist/bundle/chunk-UQPW42HF.js +18 -0
- package/dist/bundle/{chunk-USLZE36C.js → chunk-V2WXTILT.js} +6 -6
- package/dist/bundle/{chunk-BDYWZ7JE.js → chunk-VQKNKJYL.js} +46 -7
- package/dist/bundle/{chunk-XPXKD63J.js → chunk-VR3YKXHL.js} +93 -31
- package/dist/bundle/{chunk-UIEA6FIV.js → chunk-VUUPFDRU.js} +27 -28
- package/dist/bundle/{chunk-KE4XPPRQ.js → chunk-WYTYHUFH.js} +1750 -138
- package/dist/bundle/{chunk-PBMSBCVB.js → chunk-XLGDNI4S.js} +1 -1
- package/dist/bundle/{chunk-3J5KAFNA.js → chunk-XVZNFA2P.js} +4935 -3623
- package/dist/bundle/chunk-Y5U4HIZS.js +71 -0
- package/dist/bundle/chunk-YTIPTHEE.js +47 -0
- package/dist/bundle/cli-KW6QQVS5.js +1101 -0
- package/dist/bundle/command-contract-CE543JBN.js +41 -0
- package/dist/bundle/command-server-entry-OC4E4DED.js +171 -0
- package/dist/bundle/{decode-HTOQ6S3V.js → decode-AH5ZLLDK.js} +8 -8
- package/dist/bundle/{dispatch-SH5SP6LA.js → dispatch-CDWZZ54Q.js} +9 -9
- package/dist/bundle/drive.js +13 -13
- package/dist/bundle/{echarts-KFHB6SLX.js → echarts-VC7MTXWY.js} +2 -2
- package/dist/bundle/{embed-YATFB2PN.js → embed-EPSQY6QG.js} +9 -9
- package/dist/bundle/{embedder-MQPDFGTJ.js → embedder-TK4U4TJR.js} +12 -12
- package/dist/bundle/entry-3VN23M7M.js +25 -0
- package/dist/bundle/{failure-4FQL4XJI.js → failure-WSVZOPFE.js} +4 -4
- package/dist/bundle/first-run-7ZYJ7EB3.js +30 -0
- package/dist/bundle/first-screen-CZDH7QY3.js +39 -0
- package/dist/bundle/google-OBZMWA7J.js +45 -0
- package/dist/bundle/{google-api-QMFGCXBM.js → google-api-AV4X2JH3.js} +68 -57
- package/dist/bundle/grants-WTRLN4ZI.js +111 -0
- package/dist/bundle/{identity-FYVDK4M2.js → identity-CGHHF7AK.js} +8 -6
- package/dist/bundle/{instructions-D3GF3B7M.js → instructions-24PHDBBE.js} +1 -1
- package/dist/bundle/{login-COFZ2IWP.js → login-XHFESAFM.js} +73 -64
- package/dist/bundle/{mcp-RKJG22KM.js → mcp-M5YCSWJJ.js} +2 -2
- package/dist/bundle/{node-OFICOKX3.js → node-GIDULTV5.js} +2 -2
- package/dist/bundle/{node-KM3CUABH.js → node-P4E63KXA.js} +9 -9
- package/dist/bundle/{node-sqlite-DNBTDOXD.js → node-sqlite-LINBOAWK.js} +13 -9
- package/dist/bundle/oauth-JHUX3KE3.js +22 -0
- package/dist/bundle/{open-PTPR2YWX.js → open-RYFKPNCJ.js} +8 -8
- package/dist/bundle/{openai-2KV5LUW4.js → openai-Q7YYUHJF.js} +28 -42
- package/dist/bundle/{process-EAW6NST2.js → process-VPIZTIJR.js} +1 -1
- package/dist/bundle/{program-6UV5Q5YN.js → program-IUXFRBZA.js} +419 -604
- package/dist/bundle/{prompt-634TPMJK.js → prompt-LF4KX3XL.js} +8 -8
- package/dist/bundle/{reasons-DDWCEYSQ.js → reasons-JPYOU5GV.js} +5 -5
- package/dist/bundle/{recognize-SJO6QUDW.js → recognize-KEWTJXFH.js} +7 -7
- package/dist/bundle/{remote-6JXZITKF.js → remote-HGGLB76S.js} +13 -10
- package/dist/bundle/{rerank-MD5VOPQ6.js → rerank-TDUKETFT.js} +10 -10
- package/dist/bundle/{serve-LZTROA2M.js → serve-XFYMKW5W.js} +12 -12
- package/dist/bundle/server-BDEV3CZJ.js +74 -0
- package/dist/bundle/{server-NSA3UAFY.js → server-PXIPSGFP.js} +48 -44
- package/dist/bundle/{services-F5A6XQCV.js → services-2BOCGMJU.js} +111 -41
- package/dist/bundle/{sqlite-runtime-7YF6REKS.js → sqlite-runtime-R7M5XUMW.js} +9 -9
- package/dist/bundle/{start-MUFLE6FA.js → start-YRLT4MQZ.js} +7 -7
- package/dist/bundle/{state-UC54F3YZ.js → state-NZ7WRJWH.js} +9 -9
- package/dist/bundle/{store-F5FJGWMR.js → store-7LCVDO7G.js} +63 -28
- package/dist/bundle/{store-J53YNAH6.js → store-ICDGPSEN.js} +27 -18
- package/dist/bundle/store-maintenance-command-SJPLY6IH.js +65 -0
- package/dist/bundle/tokens-FGTBE7VW.js +111 -0
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +6 -5
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/context.d.ts +4 -2
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/discovery.d.ts +0 -1
- package/dist/commands/discovery.d.ts.map +1 -1
- package/dist/commands/discovery.js +6 -26
- package/dist/commands/discovery.js.map +1 -1
- package/dist/commands/documents.d.ts +2 -0
- package/dist/commands/documents.d.ts.map +1 -1
- package/dist/commands/documents.js +39 -3
- package/dist/commands/documents.js.map +1 -1
- package/dist/commands/knowledge.d.ts.map +1 -1
- package/dist/commands/knowledge.js +7 -6
- package/dist/commands/knowledge.js.map +1 -1
- package/dist/commands/search.d.ts.map +1 -1
- package/dist/commands/search.js +11 -8
- package/dist/commands/search.js.map +1 -1
- package/dist/config.d.ts +14 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +35 -4
- package/dist/config.js.map +1 -1
- package/dist/contract-overrides.d.ts +16 -4
- package/dist/contract-overrides.d.ts.map +1 -1
- package/dist/contract-overrides.js +86 -410
- package/dist/contract-overrides.js.map +1 -1
- package/dist/documents-add.d.ts +49 -0
- package/dist/documents-add.d.ts.map +1 -0
- package/dist/documents-add.js +122 -0
- package/dist/documents-add.js.map +1 -0
- package/dist/errors.d.ts +1 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +13 -1
- package/dist/errors.js.map +1 -1
- package/dist/google-api.d.ts.map +1 -1
- package/dist/google-api.js +4 -1
- package/dist/google-api.js.map +1 -1
- package/dist/identity.d.ts +4 -0
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +22 -0
- package/dist/identity.js.map +1 -1
- package/dist/knowledge.d.ts +1 -1
- package/dist/knowledge.d.ts.map +1 -1
- package/dist/knowledge.js +17 -19
- package/dist/knowledge.js.map +1 -1
- package/dist/login.d.ts.map +1 -1
- package/dist/login.js +2 -2
- package/dist/login.js.map +1 -1
- package/dist/model.d.ts +3 -0
- package/dist/model.d.ts.map +1 -1
- package/dist/model.js.map +1 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +30 -21
- package/dist/program.js.map +1 -1
- package/dist/reasons.d.ts.map +1 -1
- package/dist/reasons.js +25 -1
- package/dist/reasons.js.map +1 -1
- package/dist/store-transition.js +2 -2
- package/dist/store-transition.js.map +1 -1
- package/dist/store.d.ts.map +1 -1
- package/dist/store.js +27 -7
- package/dist/store.js.map +1 -1
- package/dist/tokens.d.ts +9 -2
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js +18 -15
- package/dist/tokens.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/wcat.d.ts +3 -0
- package/dist/wcat.d.ts.map +1 -0
- package/dist/wcat.js +4 -0
- package/dist/wcat.js.map +1 -0
- package/package.json +8 -8
- package/dist/bundle/chunk-3NULZGQU.js +0 -27
- package/dist/bundle/chunk-DD7EFG6B.js +0 -35
- package/dist/bundle/chunk-M73NNJ3X.js +0 -26
- package/dist/bundle/chunk-SBZB7HMU.js +0 -1055
- package/dist/bundle/command-contract-H5OYJOPF.js +0 -38
- package/dist/bundle/dist-PY3MVR3G.js +0 -21
- package/dist/bundle/entry-YZBB647C.js +0 -22
- package/dist/bundle/first-run-5JT3UQZB.js +0 -30
- package/dist/bundle/first-screen-BEMDEWO7.js +0 -36
- package/dist/bundle/google-DVADVICN.js +0 -36
- package/dist/bundle/grants-WKB2E4TA.js +0 -103
- package/dist/bundle/oauth-PDQHWFBF.js +0 -22
- package/dist/bundle/server-GT7X666D.js +0 -69
- package/dist/bundle/store-maintenance-command-GJVXLBAB.js +0 -58
- package/dist/bundle/tokens-H2EJKGA5.js +0 -101
- package/dist/bundle/{chunk-SW6C6WH5.js → chunk-HVJJWJYQ.js} +0 -0
- package/dist/bundle/{mdast-util-from-markdown-FXEPSNER.js → mdast-util-from-markdown-CE73EWJ2.js} +3 -3
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import { createRequire as __bundleRequire } from "node:module";
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
updateCommand
|
|
5
|
+
} from "./chunk-JCHF7LZT.js";
|
|
3
6
|
import {
|
|
4
7
|
QUESTIONS,
|
|
5
8
|
readSetupAnswers,
|
|
6
9
|
unanswered,
|
|
7
10
|
writeSetupAnswers
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import {
|
|
10
|
-
updateCommand
|
|
11
|
-
} from "./chunk-N622LRPM.js";
|
|
11
|
+
} from "./chunk-UG3GHFGY.js";
|
|
12
12
|
import {
|
|
13
13
|
DEFAULT_STEMMERS,
|
|
14
14
|
LANGUAGES
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-LVAPSAHF.js";
|
|
16
16
|
import {
|
|
17
17
|
sharedConfigPath
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import {
|
|
20
|
-
storePath
|
|
21
|
-
} from "./chunk-DD7EFG6B.js";
|
|
18
|
+
} from "./chunk-HQBLJLYH.js";
|
|
22
19
|
import {
|
|
23
20
|
installerOf
|
|
24
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-OIF4B526.js";
|
|
22
|
+
import {
|
|
23
|
+
storePath
|
|
24
|
+
} from "./chunk-3QFUDXMQ.js";
|
|
25
25
|
import {
|
|
26
26
|
__name
|
|
27
27
|
} from "./chunk-ZVVMGPBJ.js";
|
|
28
28
|
|
|
29
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/cli/first-run.js
|
|
30
30
|
import { spawnSync } from "node:child_process";
|
|
31
31
|
import { accessSync, constants, realpathSync } from "node:fs";
|
|
32
32
|
import { delimiter, join } from "node:path";
|
|
@@ -84,7 +84,7 @@ var suggested = /* @__PURE__ */ __name((env, contentLanguages) => {
|
|
|
84
84
|
return (own.length ? own : LANGUAGES.filter(({ code }) => code === "en" || code === system)).map(({ name }) => name);
|
|
85
85
|
}, "suggested");
|
|
86
86
|
var askLanguages = /* @__PURE__ */ __name(async ({ command, env, io, contentLanguages }) => {
|
|
87
|
-
const { openStore } = await import("./store-
|
|
87
|
+
const { openStore } = await import("./store-ICDGPSEN.js");
|
|
88
88
|
const store = await openStore({ env });
|
|
89
89
|
let rebuild = false;
|
|
90
90
|
try {
|
|
@@ -113,8 +113,8 @@ var askLanguages = /* @__PURE__ */ __name(async ({ command, env, io, contentLang
|
|
|
113
113
|
if (!rebuild)
|
|
114
114
|
return;
|
|
115
115
|
const [{ openCache }, { buildStems }] = await Promise.all([
|
|
116
|
-
import("./open-
|
|
117
|
-
import("./store-maintenance-command-
|
|
116
|
+
import("./open-RYFKPNCJ.js"),
|
|
117
|
+
import("./store-maintenance-command-SJPLY6IH.js")
|
|
118
118
|
]);
|
|
119
119
|
const database = await openCache(storePath(env));
|
|
120
120
|
try {
|
|
@@ -126,7 +126,7 @@ var askLanguages = /* @__PURE__ */ __name(async ({ command, env, io, contentLang
|
|
|
126
126
|
var askTools = /* @__PURE__ */ __name(async (run) => {
|
|
127
127
|
const { command, env, io } = run;
|
|
128
128
|
const installed = run.installed ?? ((name) => onPath(name, env));
|
|
129
|
-
const { WIRECAT_TOOLS } = await import("./first-screen-
|
|
129
|
+
const { WIRECAT_TOOLS } = await import("./first-screen-CZDH7QY3.js");
|
|
130
130
|
const others = WIRECAT_TOOLS.filter((tool) => tool.command !== command);
|
|
131
131
|
const missing = others.filter((tool) => !installed(tool.command));
|
|
132
132
|
io.say("Other WireCat tools \u2014 they share this store, so one search finds everything:");
|
|
@@ -199,7 +199,7 @@ var setupAtStart = /* @__PURE__ */ __name(async (start) => {
|
|
|
199
199
|
contentLanguages: start.contentLanguages,
|
|
200
200
|
all: start.path[0] === "setup",
|
|
201
201
|
io: {
|
|
202
|
-
ask: /* @__PURE__ */ __name(async (prompt) => (await import("./prompt-
|
|
202
|
+
ask: /* @__PURE__ */ __name(async (prompt) => (await import("./prompt-LF4KX3XL.js")).readSecret(prompt, { input, echo: true }), "ask"),
|
|
203
203
|
say: /* @__PURE__ */ __name((text) => process.stderr.write(`${text}
|
|
204
204
|
`), "say")
|
|
205
205
|
}
|
|
@@ -2,16 +2,16 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
alive
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-5VDVGDOC.js";
|
|
6
6
|
import {
|
|
7
7
|
resolvePaths,
|
|
8
8
|
writeSecurely
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-6X3KUFRQ.js";
|
|
10
10
|
import {
|
|
11
11
|
__name
|
|
12
12
|
} from "./chunk-ZVVMGPBJ.js";
|
|
13
13
|
|
|
14
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/background/lock.js
|
|
15
15
|
import { existsSync, linkSync, mkdirSync, readdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
16
16
|
import { dirname, join } from "node:path";
|
|
17
17
|
var lockPath = /* @__PURE__ */ __name((app, profile, env) => join(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "serve", `${profile}.lock`), "lockPath");
|
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
import { createRequire as __bundleRequire } from "node:module";
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
refuseModelAddress
|
|
5
|
+
} from "./chunk-OZOQLAWK.js";
|
|
3
6
|
import {
|
|
4
7
|
unit
|
|
5
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-I5R5CMQR.js";
|
|
9
|
+
import {
|
|
10
|
+
onThisComputer
|
|
11
|
+
} from "./chunk-GY4DAJSK.js";
|
|
6
12
|
import {
|
|
7
13
|
CliError
|
|
8
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-IIHZTV6V.js";
|
|
9
15
|
import {
|
|
10
16
|
__name
|
|
11
17
|
} from "./chunk-ZVVMGPBJ.js";
|
|
12
18
|
|
|
13
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/embeddings/remote.js
|
|
14
20
|
import { setTimeout } from "node:timers/promises";
|
|
15
21
|
var OPENAI_URL = "https://api.openai.com/v1";
|
|
16
22
|
var OPENAI_MODELS = {
|
|
@@ -19,8 +25,7 @@ var OPENAI_MODELS = {
|
|
|
19
25
|
};
|
|
20
26
|
var DEFAULT_OPENAI_MODEL = "text-embedding-3-small";
|
|
21
27
|
var PER_REQUEST = 256;
|
|
22
|
-
var
|
|
23
|
-
var isLocal = /* @__PURE__ */ __name((baseUrl) => LOCAL.has(new URL(baseUrl).hostname), "isLocal");
|
|
28
|
+
var isLocal = /* @__PURE__ */ __name((baseUrl) => onThisComputer(baseUrl), "isLocal");
|
|
24
29
|
var remoteModel = /* @__PURE__ */ __name(({ model = DEFAULT_OPENAI_MODEL, baseUrl, dims }) => {
|
|
25
30
|
const known = baseUrl === void 0 ? OPENAI_MODELS[model] : void 0;
|
|
26
31
|
if (baseUrl === void 0 && !known) {
|
|
@@ -39,7 +44,8 @@ var remoteModel = /* @__PURE__ */ __name(({ model = DEFAULT_OPENAI_MODEL, baseUr
|
|
|
39
44
|
};
|
|
40
45
|
}, "remoteModel");
|
|
41
46
|
var remoteKey = /* @__PURE__ */ __name(({ provider, model, dims }) => `${provider}:${model}:${dims}`, "remoteKey");
|
|
42
|
-
var openRemote = /* @__PURE__ */ __name((remote, apiKey, { concurrency = 4, fetch: post = fetch, tries = 5
|
|
47
|
+
var openRemote = /* @__PURE__ */ __name((remote, apiKey, { concurrency = 4, fetch: post = fetch, tries = 5, env }) => {
|
|
48
|
+
refuseModelAddress(env ?? process.env, remote.baseUrl, "text to embed");
|
|
43
49
|
const request = /* @__PURE__ */ __name(async (input) => {
|
|
44
50
|
for (let attempt = 1; ; attempt++) {
|
|
45
51
|
let response;
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
agentOf,
|
|
30
30
|
clientHash,
|
|
31
31
|
currentCaller
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-P7HQFII6.js";
|
|
33
33
|
import {
|
|
34
34
|
__name
|
|
35
35
|
} from "./chunk-ZVVMGPBJ.js";
|
|
@@ -541,7 +541,7 @@ function toError(value) {
|
|
|
541
541
|
}
|
|
542
542
|
__name(toError, "toError");
|
|
543
543
|
|
|
544
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
544
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/mcp/caller.js
|
|
545
545
|
var callingAgent = /* @__PURE__ */ __name((fallback, caller = currentCaller()) => {
|
|
546
546
|
const client = caller?.agent?.client?.name;
|
|
547
547
|
if (client && client !== "unknown")
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
embeddingKeys,
|
|
5
|
+
endpointKeyName,
|
|
6
|
+
modelGateway
|
|
7
|
+
} from "./chunk-WYTYHUFH.js";
|
|
8
|
+
import {
|
|
9
|
+
modelAddressAllowed,
|
|
10
|
+
onThisComputer
|
|
11
|
+
} from "./chunk-GY4DAJSK.js";
|
|
12
|
+
import {
|
|
13
|
+
readSharedSection,
|
|
14
|
+
sharedConfigPath,
|
|
15
|
+
writeSharedSection
|
|
16
|
+
} from "./chunk-HQBLJLYH.js";
|
|
17
|
+
import {
|
|
18
|
+
storePath
|
|
19
|
+
} from "./chunk-3QFUDXMQ.js";
|
|
20
|
+
import {
|
|
21
|
+
Credentials,
|
|
22
|
+
isMovedRun,
|
|
23
|
+
resolvePaths
|
|
24
|
+
} from "./chunk-6X3KUFRQ.js";
|
|
25
|
+
import {
|
|
26
|
+
check,
|
|
27
|
+
getDotPath,
|
|
28
|
+
maxLength,
|
|
29
|
+
minLength,
|
|
30
|
+
optional,
|
|
31
|
+
picklist,
|
|
32
|
+
pipe,
|
|
33
|
+
safeParse,
|
|
34
|
+
strictObject,
|
|
35
|
+
string,
|
|
36
|
+
trim
|
|
37
|
+
} from "./chunk-VQKNKJYL.js";
|
|
38
|
+
import {
|
|
39
|
+
CliError
|
|
40
|
+
} from "./chunk-IIHZTV6V.js";
|
|
41
|
+
import {
|
|
42
|
+
__name
|
|
43
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
44
|
+
|
|
45
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/models/ai.js
|
|
46
|
+
var AI_PROVIDERS = ["anthropic", "openai", "ollama"];
|
|
47
|
+
var DEFAULT_BASE_URL = {
|
|
48
|
+
anthropic: "https://api.anthropic.com",
|
|
49
|
+
openai: "https://api.openai.com/v1",
|
|
50
|
+
ollama: "http://127.0.0.1:11434/v1"
|
|
51
|
+
};
|
|
52
|
+
var OFFICIAL = {
|
|
53
|
+
"https://api.openai.com": "openai",
|
|
54
|
+
"https://api.anthropic.com": "anthropic"
|
|
55
|
+
};
|
|
56
|
+
var SECTION = "ai";
|
|
57
|
+
var aiAddressAllowed = modelAddressAllowed;
|
|
58
|
+
var consentShape = strictObject({
|
|
59
|
+
origin: string(),
|
|
60
|
+
model: string(),
|
|
61
|
+
at: string()
|
|
62
|
+
});
|
|
63
|
+
var settingShape = strictObject({
|
|
64
|
+
provider: picklist(AI_PROVIDERS),
|
|
65
|
+
model: pipe(string(), trim(), minLength(1), maxLength(200)),
|
|
66
|
+
base_url: optional(pipe(string(), check(aiAddressAllowed, "use https, or http only on this computer"))),
|
|
67
|
+
images: optional(consentShape)
|
|
68
|
+
});
|
|
69
|
+
var aiSettingPath = /* @__PURE__ */ __name((env) => sharedConfigPath(storePath(env), env), "aiSettingPath");
|
|
70
|
+
var readAiSetting = /* @__PURE__ */ __name((path) => {
|
|
71
|
+
const section = readSharedSection(path, SECTION);
|
|
72
|
+
if (section === void 0)
|
|
73
|
+
return void 0;
|
|
74
|
+
const checked = safeParse(settingShape, section);
|
|
75
|
+
if (!checked.success)
|
|
76
|
+
throw new CliError("configuration_error", `${path}: ai.${getDotPath(checked.issues[0]) ?? "setting"} is invalid`, {
|
|
77
|
+
reason: "ai.setting-invalid"
|
|
78
|
+
});
|
|
79
|
+
return checked.output;
|
|
80
|
+
}, "readAiSetting");
|
|
81
|
+
var writeAiSetting = /* @__PURE__ */ __name((path, setting) => writeSharedSection(path, SECTION, setting), "writeAiSetting");
|
|
82
|
+
var aiSettingOf = /* @__PURE__ */ __name((given) => {
|
|
83
|
+
const draft = {
|
|
84
|
+
provider: given.provider,
|
|
85
|
+
model: given.model,
|
|
86
|
+
...given.baseUrl?.trim() ? { base_url: given.baseUrl.trim().replace(/\/+$/, "") } : {}
|
|
87
|
+
};
|
|
88
|
+
const checked = safeParse(settingShape, draft);
|
|
89
|
+
if (!checked.success) {
|
|
90
|
+
const field = getDotPath(checked.issues[0]);
|
|
91
|
+
throw new CliError("validation_error", field === "provider" ? `the provider is one of ${AI_PROVIDERS.join(", ")}` : field === "base_url" ? "this address is not allowed: use https, or http only on this computer" : "name the model, 1 to 200 characters", { reason: field === "base_url" ? "model.address-refused" : "ai.setting-invalid" });
|
|
92
|
+
}
|
|
93
|
+
if (checked.output.provider === "ollama" && !onThisComputer(aiBaseUrl(checked.output)))
|
|
94
|
+
throw new CliError("validation_error", "Ollama is read only on this computer", { reason: "model.address-refused" });
|
|
95
|
+
return given.allowImages ? {
|
|
96
|
+
...checked.output,
|
|
97
|
+
images: { origin: aiOrigin(checked.output), model: checked.output.model, at: (/* @__PURE__ */ new Date()).toISOString() }
|
|
98
|
+
} : checked.output;
|
|
99
|
+
}, "aiSettingOf");
|
|
100
|
+
var aiBaseUrl = /* @__PURE__ */ __name((setting) => setting.base_url ?? DEFAULT_BASE_URL[setting.provider], "aiBaseUrl");
|
|
101
|
+
var aiOrigin = /* @__PURE__ */ __name((setting) => new URL(aiBaseUrl(setting)).origin, "aiOrigin");
|
|
102
|
+
var aiTarget = /* @__PURE__ */ __name((setting) => ({
|
|
103
|
+
provider: setting.provider === "anthropic" ? "anthropic" : "openai",
|
|
104
|
+
model: setting.model,
|
|
105
|
+
baseUrl: aiBaseUrl(setting)
|
|
106
|
+
}), "aiTarget");
|
|
107
|
+
var aiImagesAllowed = /* @__PURE__ */ __name((setting) => setting.images?.origin === aiOrigin(setting) && setting.images.model === setting.model, "aiImagesAllowed");
|
|
108
|
+
var aiKeys = /* @__PURE__ */ __name((app, env, keyring) => {
|
|
109
|
+
const where = { appName: "WireCat", prefix: "WIRECAT", env };
|
|
110
|
+
const credentials = new Credentials({
|
|
111
|
+
configDir: resolvePaths(where).config,
|
|
112
|
+
service: "WireCat",
|
|
113
|
+
// A tool run with its own folders moved (MEMO_CONFIG_DIR…) is a test or a sandbox, not the owner.
|
|
114
|
+
isolated: isMovedRun(where) || isMovedRun({ appName: app.appName, prefix: app.envPrefix, env }),
|
|
115
|
+
env,
|
|
116
|
+
...keyring ? { keyring } : {},
|
|
117
|
+
warn: /* @__PURE__ */ __name((message) => process.stderr.write(`${message}
|
|
118
|
+
`), "warn")
|
|
119
|
+
});
|
|
120
|
+
const account = /* @__PURE__ */ __name((origin) => `ai:${origin}`, "account");
|
|
121
|
+
return {
|
|
122
|
+
read: /* @__PURE__ */ __name((origin) => {
|
|
123
|
+
const stored = credentials.read(account(origin));
|
|
124
|
+
if (stored)
|
|
125
|
+
return { key: stored.secret, source: stored.source };
|
|
126
|
+
const official = OFFICIAL[origin];
|
|
127
|
+
const legacy = official ?? (origin.startsWith("https://") ? endpointKeyName(origin) : void 0);
|
|
128
|
+
const found = legacy === void 0 ? void 0 : embeddingKeys(app, env, keyring).read(legacy);
|
|
129
|
+
return found ? { key: found.key, source: found.source === "env" ? "environment" : found.source } : void 0;
|
|
130
|
+
}, "read"),
|
|
131
|
+
write: /* @__PURE__ */ __name((origin, key) => credentials.write(account(origin), key, { signIn: true }), "write"),
|
|
132
|
+
remove: /* @__PURE__ */ __name((origin) => credentials.remove(account(origin)), "remove")
|
|
133
|
+
};
|
|
134
|
+
}, "aiKeys");
|
|
135
|
+
var aiNeedsKey = /* @__PURE__ */ __name((setting) => aiLeavesComputer(setting), "aiNeedsKey");
|
|
136
|
+
var aiTakesKey = /* @__PURE__ */ __name((setting) => setting.provider !== "ollama", "aiTakesKey");
|
|
137
|
+
var keyFor = /* @__PURE__ */ __name((setting, deps) => aiTakesKey(setting) ? aiKeys(deps.app, deps.env, deps.keyring).read(aiOrigin(setting))?.key : void 0, "keyFor");
|
|
138
|
+
var gatewayFor = /* @__PURE__ */ __name((setting, deps, key) => modelGateway({
|
|
139
|
+
resolve: /* @__PURE__ */ __name(() => aiTarget(setting), "resolve"),
|
|
140
|
+
consent: /* @__PURE__ */ __name(() => true, "consent"),
|
|
141
|
+
key: /* @__PURE__ */ __name(() => key, "key"),
|
|
142
|
+
env: deps.env,
|
|
143
|
+
...deps.fetch ? { fetch: deps.fetch } : {},
|
|
144
|
+
...deps.signal ? { signal: deps.signal } : {}
|
|
145
|
+
}), "gatewayFor");
|
|
146
|
+
var aiLeavesComputer = /* @__PURE__ */ __name((setting) => !onThisComputer(aiBaseUrl(setting)), "aiLeavesComputer");
|
|
147
|
+
var sharedModel = /* @__PURE__ */ __name((deps) => {
|
|
148
|
+
const setting = readAiSetting(aiSettingPath(deps.env));
|
|
149
|
+
if (!setting)
|
|
150
|
+
return void 0;
|
|
151
|
+
return { target: { ...aiTarget(setting), baseUrl: aiBaseUrl(setting) }, key: keyFor(setting, deps), setting };
|
|
152
|
+
}, "sharedModel");
|
|
153
|
+
var aiTextReader = /* @__PURE__ */ __name((deps) => {
|
|
154
|
+
const setting = readAiSetting(aiSettingPath(deps.env));
|
|
155
|
+
if (!setting)
|
|
156
|
+
return { refused: "ai.not-set" };
|
|
157
|
+
const key = keyFor(setting, deps);
|
|
158
|
+
if (aiNeedsKey(setting) && !key)
|
|
159
|
+
return { refused: "ai.key-missing" };
|
|
160
|
+
const gateway = gatewayFor(setting, deps, key);
|
|
161
|
+
return {
|
|
162
|
+
by: `${setting.provider}/${setting.model}`,
|
|
163
|
+
leavesComputer: aiLeavesComputer(setting),
|
|
164
|
+
complete: /* @__PURE__ */ __name(async (request) => (await gateway.complete(request)).text, "complete")
|
|
165
|
+
};
|
|
166
|
+
}, "aiTextReader");
|
|
167
|
+
var reasonOf = /* @__PURE__ */ __name((error) => {
|
|
168
|
+
if (!(error instanceof CliError))
|
|
169
|
+
return "ai.failed";
|
|
170
|
+
if (error.code === "rate_limited")
|
|
171
|
+
return "ai.rate-limited";
|
|
172
|
+
const { reason, status } = error.details;
|
|
173
|
+
if (reason === "model.key-rejected")
|
|
174
|
+
return "ai.key-rejected";
|
|
175
|
+
if (reason === "model.unreachable")
|
|
176
|
+
return "ai.unreachable";
|
|
177
|
+
if (reason === "model.empty-answer")
|
|
178
|
+
return "ai.empty-answer";
|
|
179
|
+
if (status === 402)
|
|
180
|
+
return "ai.no-credit";
|
|
181
|
+
if (status === 404)
|
|
182
|
+
return "ai.model-unknown";
|
|
183
|
+
if (typeof status === "number" && status >= 500)
|
|
184
|
+
return "ai.provider-error";
|
|
185
|
+
return "ai.failed";
|
|
186
|
+
}, "reasonOf");
|
|
187
|
+
var checkAi = /* @__PURE__ */ __name(async (deps) => {
|
|
188
|
+
const setting = readAiSetting(aiSettingPath(deps.env));
|
|
189
|
+
if (!setting)
|
|
190
|
+
return { ok: false, reason: "ai.not-set", ms: null };
|
|
191
|
+
const key = keyFor(setting, deps);
|
|
192
|
+
if (aiNeedsKey(setting) && !key)
|
|
193
|
+
return { ok: false, reason: "ai.key-missing", ms: null };
|
|
194
|
+
const started = Date.now();
|
|
195
|
+
try {
|
|
196
|
+
await gatewayFor(setting, deps, key).complete({
|
|
197
|
+
purpose: "check",
|
|
198
|
+
system: "Reply with the word OK.",
|
|
199
|
+
prompt: "OK?",
|
|
200
|
+
// Reasoning models spend tokens before they answer; too low a cap reads as a broken setup.
|
|
201
|
+
maxTokens: 2048
|
|
202
|
+
});
|
|
203
|
+
return { ok: true, reason: "ai.ok", ms: Date.now() - started };
|
|
204
|
+
} catch (error) {
|
|
205
|
+
return { ok: false, reason: reasonOf(error), ms: null };
|
|
206
|
+
}
|
|
207
|
+
}, "checkAi");
|
|
208
|
+
|
|
209
|
+
export {
|
|
210
|
+
AI_PROVIDERS,
|
|
211
|
+
aiSettingPath,
|
|
212
|
+
readAiSetting,
|
|
213
|
+
writeAiSetting,
|
|
214
|
+
aiSettingOf,
|
|
215
|
+
aiBaseUrl,
|
|
216
|
+
aiOrigin,
|
|
217
|
+
aiImagesAllowed,
|
|
218
|
+
aiKeys,
|
|
219
|
+
aiTakesKey,
|
|
220
|
+
aiLeavesComputer,
|
|
221
|
+
sharedModel,
|
|
222
|
+
aiTextReader,
|
|
223
|
+
checkAi
|
|
224
|
+
};
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
__name
|
|
5
5
|
} from "./chunk-ZVVMGPBJ.js";
|
|
6
6
|
|
|
7
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/store/driver.js
|
|
8
8
|
var TIME_LIMIT_FUNCTION = "wc_time_limit";
|
|
9
9
|
var TimeLimitReached = class extends Error {
|
|
10
10
|
static {
|
|
@@ -20,9 +20,11 @@ var beforeTimeLimit = /* @__PURE__ */ __name((until) => {
|
|
|
20
20
|
throw new TimeLimitReached();
|
|
21
21
|
return 1;
|
|
22
22
|
}, "beforeTimeLimit");
|
|
23
|
+
var JOURNAL_SIZE_LIMIT = 64 * 1024 * 1024;
|
|
23
24
|
var PRAGMAS = `
|
|
24
25
|
PRAGMA busy_timeout = 5000;
|
|
25
26
|
PRAGMA journal_mode = WAL;
|
|
27
|
+
PRAGMA journal_size_limit = ${JOURNAL_SIZE_LIMIT};
|
|
26
28
|
PRAGMA foreign_keys = ON;
|
|
27
29
|
`;
|
|
28
30
|
var isQueryOnly = /* @__PURE__ */ __name((database) => Number(Object.values(database.prepare("PRAGMA query_only").get() ?? {})[0]) === 1, "isQueryOnly");
|
|
@@ -1,19 +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
|
-
stdinFieldOf,
|
|
15
|
-
syncsFirst
|
|
16
|
-
} from "./chunk-ZRZ4HTCK.js";
|
|
17
3
|
import {
|
|
18
4
|
BinaryResource,
|
|
19
5
|
Picture,
|
|
@@ -34,35 +20,69 @@ import {
|
|
|
34
20
|
tool,
|
|
35
21
|
toolKey,
|
|
36
22
|
toolsFromCommands
|
|
37
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-SZ6JFOL4.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-7LT2G5BC.js";
|
|
38
37
|
import {
|
|
39
38
|
agentJson,
|
|
40
39
|
skillResource
|
|
41
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-HPSHQVJU.js";
|
|
41
|
+
import {
|
|
42
|
+
instructions
|
|
43
|
+
} from "./chunk-3SDJIMZB.js";
|
|
42
44
|
import {
|
|
43
45
|
answeredWire
|
|
44
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-JLCR24UM.js";
|
|
45
47
|
import {
|
|
46
48
|
StdioServerTransport,
|
|
47
49
|
callerOf,
|
|
48
50
|
callingAgent,
|
|
49
51
|
serveStdio
|
|
50
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-D7KOAPG6.js";
|
|
51
53
|
import {
|
|
52
54
|
McpServer,
|
|
53
55
|
ResourceTemplate
|
|
54
56
|
} from "./chunk-5D4AEUVA.js";
|
|
55
57
|
import {
|
|
56
|
-
connectedFor
|
|
57
|
-
|
|
58
|
-
} from "./chunk-UJR272CP.js";
|
|
58
|
+
connectedFor
|
|
59
|
+
} from "./chunk-OT7SQQJK.js";
|
|
59
60
|
import {
|
|
60
61
|
lackedNeed,
|
|
61
62
|
wholeList
|
|
62
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-HPKE2GDP.js";
|
|
64
|
+
import {
|
|
65
|
+
capability,
|
|
66
|
+
dateWindow,
|
|
67
|
+
guardFor,
|
|
68
|
+
servicesFor,
|
|
69
|
+
storedDeps
|
|
70
|
+
} from "./chunk-XVZNFA2P.js";
|
|
71
|
+
import {
|
|
72
|
+
imageSize
|
|
73
|
+
} from "./chunk-WYTYHUFH.js";
|
|
74
|
+
import {
|
|
75
|
+
mcpHttpMarker
|
|
76
|
+
} from "./chunk-6UJCCOZC.js";
|
|
77
|
+
import {
|
|
78
|
+
warmEmbedders
|
|
79
|
+
} from "./chunk-I5R5CMQR.js";
|
|
80
|
+
import {
|
|
81
|
+
stdinFieldOf
|
|
82
|
+
} from "./chunk-UQPW42HF.js";
|
|
63
83
|
import {
|
|
64
84
|
findCommand
|
|
65
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-UAKX6DP4.js";
|
|
66
86
|
import {
|
|
67
87
|
DEFAULT_OUTPUT_BYTES,
|
|
68
88
|
changesAuthorityAt,
|
|
@@ -75,52 +95,38 @@ import {
|
|
|
75
95
|
rootOf2 as rootOf,
|
|
76
96
|
sealed,
|
|
77
97
|
snakeKeys
|
|
78
|
-
} from "./chunk-
|
|
98
|
+
} from "./chunk-5PLINHEY.js";
|
|
79
99
|
import {
|
|
80
100
|
withCaller
|
|
81
|
-
} from "./chunk-
|
|
82
|
-
import {
|
|
83
|
-
mcpHttpMarker
|
|
84
|
-
} from "./chunk-4CNTID2X.js";
|
|
85
|
-
import {
|
|
86
|
-
instructions
|
|
87
|
-
} from "./chunk-5ZBR55US.js";
|
|
88
|
-
import {
|
|
89
|
-
capability,
|
|
90
|
-
dateWindow,
|
|
91
|
-
imageSize,
|
|
92
|
-
servicesFor,
|
|
93
|
-
storedDeps
|
|
94
|
-
} from "./chunk-3J5KAFNA.js";
|
|
101
|
+
} from "./chunk-P7HQFII6.js";
|
|
95
102
|
import {
|
|
96
103
|
levelFor,
|
|
97
|
-
readKeysForCommand
|
|
98
|
-
|
|
99
|
-
} from "./chunk-OH3K2E7X.js";
|
|
104
|
+
readKeysForCommand
|
|
105
|
+
} from "./chunk-PKM55ZRR.js";
|
|
100
106
|
import {
|
|
101
107
|
readOnlyLockOf
|
|
102
|
-
} from "./chunk-
|
|
103
|
-
import {
|
|
104
|
-
warmEmbedders
|
|
105
|
-
} from "./chunk-JRXFW7HE.js";
|
|
108
|
+
} from "./chunk-Y5U4HIZS.js";
|
|
106
109
|
import {
|
|
107
110
|
openStore
|
|
108
|
-
} from "./chunk-
|
|
111
|
+
} from "./chunk-BIJW6AYA.js";
|
|
109
112
|
import {
|
|
110
113
|
pdfPreviewLimits
|
|
111
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-T3ULDA7C.js";
|
|
115
|
+
import {
|
|
116
|
+
typedCommand
|
|
117
|
+
} from "./chunk-QJ57PV55.js";
|
|
112
118
|
import {
|
|
113
119
|
timezoneOf
|
|
114
|
-
} from "./chunk-
|
|
120
|
+
} from "./chunk-GVA3KTCD.js";
|
|
115
121
|
import {
|
|
116
122
|
isCliFailure
|
|
117
|
-
} from "./chunk-
|
|
123
|
+
} from "./chunk-O53WLYX3.js";
|
|
118
124
|
import {
|
|
119
125
|
mcpErrorResult
|
|
120
|
-
} from "./chunk-
|
|
126
|
+
} from "./chunk-ALE67WRR.js";
|
|
121
127
|
import {
|
|
122
128
|
visibleControls
|
|
123
|
-
} from "./chunk-
|
|
129
|
+
} from "./chunk-JQXK3M5M.js";
|
|
124
130
|
import {
|
|
125
131
|
description,
|
|
126
132
|
integer,
|
|
@@ -135,18 +141,18 @@ import {
|
|
|
135
141
|
regex,
|
|
136
142
|
strictObject,
|
|
137
143
|
string
|
|
138
|
-
} from "./chunk-
|
|
144
|
+
} from "./chunk-VQKNKJYL.js";
|
|
139
145
|
import {
|
|
140
146
|
CliError
|
|
141
|
-
} from "./chunk-
|
|
147
|
+
} from "./chunk-IIHZTV6V.js";
|
|
142
148
|
import {
|
|
143
149
|
__name
|
|
144
150
|
} from "./chunk-ZVVMGPBJ.js";
|
|
145
151
|
|
|
146
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
152
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/mcp/server.js
|
|
147
153
|
import { randomUUID } from "node:crypto";
|
|
148
154
|
|
|
149
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
155
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/mcp/agent-log.js
|
|
150
156
|
var agentLog = /* @__PURE__ */ __name((open) => {
|
|
151
157
|
let held;
|
|
152
158
|
return {
|
|
@@ -165,7 +171,7 @@ var agentLog = /* @__PURE__ */ __name((open) => {
|
|
|
165
171
|
};
|
|
166
172
|
}, "agentLog");
|
|
167
173
|
|
|
168
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
174
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/mcp/resources.js
|
|
169
175
|
var LISTED = 100;
|
|
170
176
|
var registerResources = /* @__PURE__ */ __name((server, session, { command, name, limit, recorded, withStore, messenger, guard, assertRead }) => {
|
|
171
177
|
server.registerResource("chat", new ResourceTemplate(`${command}://chat/{id}`, {
|
|
@@ -203,7 +209,7 @@ var registerResources = /* @__PURE__ */ __name((server, session, { command, name
|
|
|
203
209
|
});
|
|
204
210
|
}, "registerResources");
|
|
205
211
|
|
|
206
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
212
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/mcp/session.js
|
|
207
213
|
var HARMLESS = /* @__PURE__ */ new Set(["validation_error", "not_found", "permission_error", "confirmation_required", "rate_limited"]);
|
|
208
214
|
var harmless = /* @__PURE__ */ __name((code) => HARMLESS.has(code), "harmless");
|
|
209
215
|
var MessengerSession = class {
|
|
@@ -278,7 +284,7 @@ var MessengerSession = class {
|
|
|
278
284
|
}
|
|
279
285
|
};
|
|
280
286
|
|
|
281
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
287
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/mcp/tools/attachments.js
|
|
282
288
|
var attachmentsTools = /* @__PURE__ */ __name((messenger) => {
|
|
283
289
|
const _command = messenger.app.command;
|
|
284
290
|
return {
|
|
@@ -332,7 +338,7 @@ var attachmentsTools = /* @__PURE__ */ __name((messenger) => {
|
|
|
332
338
|
};
|
|
333
339
|
}, "attachmentsTools");
|
|
334
340
|
|
|
335
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
341
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/mcp/tools/messages-photo.js
|
|
336
342
|
var PHOTO_LIMIT = 512 * 1024;
|
|
337
343
|
var IMAGE_TYPES = [
|
|
338
344
|
["image/jpeg", (b) => b[0] === 255 && b[1] === 216 && b[2] === 255],
|
|
@@ -386,7 +392,7 @@ var readUpTo = /* @__PURE__ */ __name(async (file, limit, saveIt) => {
|
|
|
386
392
|
return new Uint8Array(Buffer.concat(chunks));
|
|
387
393
|
}, "readUpTo");
|
|
388
394
|
|
|
389
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
395
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/mcp/tools/stats.js
|
|
390
396
|
var statsTools = /* @__PURE__ */ __name((messenger) => ({
|
|
391
397
|
stats_charts: tool({
|
|
392
398
|
title: "A chart from a chat's statistics",
|
|
@@ -423,14 +429,14 @@ var statsTools = /* @__PURE__ */ __name((messenger) => ({
|
|
|
423
429
|
})
|
|
424
430
|
}), "statsTools");
|
|
425
431
|
|
|
426
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
432
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/mcp/tools.js
|
|
427
433
|
var pictureTools = /* @__PURE__ */ __name((messenger) => Object.fromEntries(Object.entries({
|
|
428
434
|
...messagesPhotoTools(messenger),
|
|
429
435
|
...attachmentsTools(messenger),
|
|
430
436
|
...statsTools(messenger)
|
|
431
437
|
}).map(([name, definition]) => [name, { ...definition, input: strictObject(definition.input.entries) }])), "pictureTools");
|
|
432
438
|
|
|
433
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
439
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.650.0_@wirecat+cli-base@0.98.0_commander@15.0.0_esbuild@0.28.2_type_7618ae642a1b316105e0e055c769f604/node_modules/@wirecat/cli-core/dist/mcp/server.js
|
|
434
440
|
var PER_RUN = /* @__PURE__ */ new Set([
|
|
435
441
|
"streams",
|
|
436
442
|
"stdin",
|
|
@@ -754,7 +760,7 @@ var serveOverStdio = /* @__PURE__ */ __name(async (command, context, messenger,
|
|
|
754
760
|
}, "serveOverStdio");
|
|
755
761
|
var serveOverHttpUntilStopped = /* @__PURE__ */ __name(async (command, context, messenger, options, http) => {
|
|
756
762
|
const { session, embedders, build, log } = createServer(command, context, messenger, options);
|
|
757
|
-
const { serveOverHttp } = await import("./serve-
|
|
763
|
+
const { serveOverHttp } = await import("./serve-XFYMKW5W.js");
|
|
758
764
|
const appName = messenger.app.command;
|
|
759
765
|
const appEnvPrefix = messenger.app.envPrefix;
|
|
760
766
|
const listening = await serveOverHttp(build, {
|