@wirecat/drive-cli 0.58.0 → 0.60.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/drive.js +6 -2
- package/dist/bin/drive.js.map +1 -1
- package/dist/bundle/{all-profiles-ANDWOJDL.js → all-profiles-537I27Z4.js} +14 -13
- package/dist/bundle/{anthropic-EZPZUWGS.js → anthropic-X4NWVHDF.js} +9 -9
- package/dist/bundle/{app-server-67WL423B.js → app-server-KSHJKKS7.js} +53 -51
- package/dist/bundle/{bun-NIIYUR5F.js → bun-WTBGGCUC.js} +2 -2
- package/dist/bundle/{bun-sqlite-A5ZKTIYC.js → bun-sqlite-T7Y3JFFD.js} +8 -8
- package/dist/bundle/{chunk-5NPFHWLP.js → chunk-22ATLSNK.js} +5 -5
- package/dist/bundle/{chunk-ALTG7BZQ.js → chunk-246P2DCT.js} +19 -19
- package/dist/bundle/{chunk-NYINLKWT.js → chunk-2AXA5SKP.js} +1 -1
- package/dist/bundle/{chunk-BAEIAQWH.js → chunk-3TQHIHZI.js} +2 -2
- package/dist/bundle/{chunk-MBNKNWOG.js → chunk-4CBZEAQ7.js} +35 -34
- package/dist/bundle/{chunk-SWFA36F3.js → chunk-4VHBDVY2.js} +20 -14
- package/dist/bundle/{chunk-Z5GDNCTJ.js → chunk-4XZXH2NM.js} +2 -2
- package/dist/bundle/{chunk-A4DHPOFQ.js → chunk-57QVQGBE.js} +53 -39
- package/dist/bundle/{chunk-SPVPKHBQ.js → chunk-5AMRCBMP.js} +78 -40
- package/dist/bundle/{chunk-ED5JNYN5.js → chunk-5XHLQZAG.js} +30 -28
- package/dist/bundle/{chunk-BLJVCJZU.js → chunk-67QXMO2G.js} +26 -26
- package/dist/bundle/{chunk-EFEI724Z.js → chunk-6HTKB4WC.js} +1 -1
- package/dist/bundle/{chunk-U2RSVKR5.js → chunk-73MNUSP3.js} +1 -1
- package/dist/bundle/{chunk-4UU4ONKY.js → chunk-73TTP6ET.js} +5326 -636
- package/dist/bundle/{chunk-4ICWGMHN.js → chunk-77C5XRH3.js} +7 -7
- package/dist/bundle/{chunk-W6KMNO3C.js → chunk-77YTRBL6.js} +11 -11
- package/dist/bundle/{chunk-YHRJUZ3O.js → chunk-ALWTUDZF.js} +6 -4
- package/dist/bundle/{chunk-ESF2B22R.js → chunk-AXWXQNTC.js} +14 -11
- package/dist/bundle/{chunk-FD7A6745.js → chunk-CKGHRWVR.js} +4 -4
- package/dist/bundle/{chunk-X4F3M6L6.js → chunk-D6WIWOQC.js} +4 -4
- package/dist/bundle/{chunk-TCJRJ3TE.js → chunk-DMHGWL5D.js} +13 -13
- package/dist/bundle/{chunk-AFZ33AC7.js → chunk-DQDKLZAK.js} +179 -50
- package/dist/bundle/{chunk-ITD7WI23.js → chunk-EBLA7GXY.js} +1 -1
- package/dist/bundle/{chunk-UTDL7MKT.js → chunk-EHAI773E.js} +2 -2
- package/dist/bundle/{chunk-RRHC5SBB.js → chunk-FO4TCH6P.js} +2 -2
- package/dist/bundle/{chunk-7VFD3UJQ.js → chunk-FTZNUZO7.js} +3 -3
- package/dist/bundle/{chunk-JEMKSWVI.js → chunk-FZOCQQ66.js} +12 -12
- package/dist/bundle/{chunk-P5MCZ635.js → chunk-GD6TQ6U4.js} +11 -88
- package/dist/bundle/{chunk-PYPLD7JO.js → chunk-GVRS5AIH.js} +2 -2
- package/dist/bundle/{chunk-2TASMYGM.js → chunk-HCJG7ENG.js} +3 -3
- package/dist/bundle/{chunk-TIXIB32T.js → chunk-HFGR33KD.js} +153 -101
- package/dist/bundle/{chunk-ASPIEEXN.js → chunk-HIP43OGZ.js} +1 -1
- package/dist/bundle/{chunk-IBJOO5FG.js → chunk-HQVIK6PM.js} +37 -19
- package/dist/bundle/{chunk-AL7MY7MW.js → chunk-IRZ7OF3F.js} +1 -1
- package/dist/bundle/{chunk-OOR6PEHV.js → chunk-IXN7Y6JA.js} +1 -1
- package/dist/bundle/{chunk-4EEOJ54H.js → chunk-JGUJJNGZ.js} +5930 -3061
- package/dist/bundle/{chunk-6THTUYPT.js → chunk-JQLIM6BH.js} +5 -5
- package/dist/bundle/{chunk-LSSIVBQI.js → chunk-K6XVRA6U.js} +1 -1
- package/dist/bundle/chunk-KEXTTZJM.js +35 -0
- package/dist/bundle/{chunk-3RG27IWA.js → chunk-LJ77Y3TK.js} +5 -5
- package/dist/bundle/{chunk-I4VUHZSD.js → chunk-LQSRVQ3V.js} +4 -3
- package/dist/bundle/{chunk-NKL5XXOM.js → chunk-MVNPE5FZ.js} +8 -8
- package/dist/bundle/{chunk-6SARLV3Z.js → chunk-MXP35VPO.js} +4 -4
- package/dist/bundle/{chunk-J36Z6BDZ.js → chunk-N7S2UPF3.js} +652 -373
- package/dist/bundle/{chunk-4GZLX2ME.js → chunk-O37ESNAP.js} +40 -33
- package/dist/bundle/{chunk-OZEJA67C.js → chunk-OMKUBCNN.js} +8 -8
- package/dist/bundle/{chunk-XQMMB6ST.js → chunk-OYNUBWD2.js} +2 -22
- package/dist/bundle/{chunk-OUQVZTF5.js → chunk-PDYHEWKG.js} +7 -42
- package/dist/bundle/{chunk-QVIJMV22.js → chunk-PETFPXLU.js} +3 -3
- package/dist/bundle/{chunk-TNX77VPM.js → chunk-PPL5ASW2.js} +4908 -1588
- package/dist/bundle/{chunk-GDRO4YMH.js → chunk-QIJWSKZL.js} +4 -4
- package/dist/bundle/{chunk-EFX6FIDM.js → chunk-S36HRPNS.js} +1 -1
- package/dist/bundle/{chunk-WICYDOVL.js → chunk-SBHSNOU4.js} +91 -23
- package/dist/bundle/{chunk-7YUZAEBG.js → chunk-SZXI4OXX.js} +2 -2
- package/dist/bundle/{chunk-O3K46QRL.js → chunk-TKW4QWCY.js} +20 -6
- package/dist/bundle/{chunk-UBZ2LH7N.js → chunk-TVQDMP2F.js} +1533 -602
- package/dist/bundle/{chunk-7AL57FCK.js → chunk-TXMTMEHW.js} +4 -4
- package/dist/bundle/{chunk-X5XWUQNU.js → chunk-UNJE63JK.js} +2 -2
- package/dist/bundle/chunk-UTFATA4K.js +93 -0
- package/dist/bundle/{chunk-34XHR5FL.js → chunk-UVLSWLPZ.js} +16 -16
- package/dist/bundle/chunk-UVYVIHEA.js +34 -0
- package/dist/bundle/{chunk-IH4UCM5K.js → chunk-V2VMBM7O.js} +2 -2
- package/dist/bundle/{chunk-KCBHOYNZ.js → chunk-V7QMHMR3.js} +8 -13
- package/dist/bundle/{chunk-IXXQZCNK.js → chunk-VRW6ZDTH.js} +32 -19
- package/dist/bundle/{chunk-VXI67T7U.js → chunk-VVCZS42A.js} +1 -1
- package/dist/bundle/{chunk-A7FMNTCK.js → chunk-W62CON5K.js} +4 -4
- package/dist/bundle/{chunk-BKM2CGG2.js → chunk-XDIEQ2CE.js} +3 -3
- package/dist/bundle/{chunk-OG5ERX4S.js → chunk-XFXRGQXJ.js} +2 -2
- package/dist/bundle/{chunk-UMJLXAJI.js → chunk-YDN2RH5S.js} +2 -2
- package/dist/bundle/{chunk-TMW526H3.js → chunk-YGG7UA3C.js} +5 -5
- package/dist/bundle/{chunk-D72FL3L3.js → chunk-YYHKVOVK.js} +35 -35
- package/dist/bundle/{chunk-3GXNODTB.js → chunk-ZPQS7XJA.js} +4 -4
- package/dist/bundle/{chunk-JZ67M3HR.js → chunk-ZYCLPJ7U.js} +1 -1
- package/dist/bundle/command-contract-NUIWUVYB.js +39 -0
- package/dist/bundle/{decode-2R6DTGRX.js → decode-35N57AFW.js} +8 -8
- package/dist/bundle/{dispatch-DEXAEMIN.js → dispatch-CWXZW3PL.js} +9 -9
- package/dist/bundle/drive.js +12 -12
- package/dist/bundle/{echarts-CLB22SZS.js → echarts-3P3QZWMU.js} +2 -2
- package/dist/bundle/{embed-RJJWOLKN.js → embed-Q6Q5IOJQ.js} +9 -9
- package/dist/bundle/{embedder-DWYS5JYJ.js → embedder-D44JDTAA.js} +12 -12
- package/dist/bundle/entry-ZHCNI7XO.js +22 -0
- package/dist/bundle/{failure-GBZ4L5QO.js → failure-GRMMSDCZ.js} +4 -4
- package/dist/bundle/first-run-3DC2SDWM.js +30 -0
- package/dist/bundle/first-screen-YJF4YODC.js +37 -0
- package/dist/bundle/{google-L776ETP4.js → google-6ZZDKFBN.js} +13 -13
- package/dist/bundle/{google-api-AI5ZJJ2M.js → google-api-E6MOJ4ZD.js} +57 -56
- package/dist/bundle/grants-GWXDH5GM.js +105 -0
- package/dist/bundle/{identity-MDLWK2TX.js → identity-TID7S5NE.js} +6 -6
- package/dist/bundle/{instructions-BXZZNAMS.js → instructions-ANJN4HV3.js} +1 -1
- package/dist/bundle/{login-6HHQLRHY.js → login-BGMK2ABH.js} +65 -66
- package/dist/bundle/{mcp-ZZUYI44D.js → mcp-WBHKX5E3.js} +2 -2
- package/dist/bundle/{node-R6ZNQ3NT.js → node-VOB45ES2.js} +2 -2
- package/dist/bundle/{node-sqlite-AVNHGMVL.js → node-sqlite-TSX6XQY2.js} +14 -8
- package/dist/bundle/oauth-CEOYXW6C.js +22 -0
- package/dist/bundle/{open-BXPLXJC2.js → open-3USWHGNR.js} +8 -7
- package/dist/bundle/{openai-CRO5GDBY.js → openai-YZ5VGPIP.js} +17 -17
- package/dist/bundle/{process-P36JP33R.js → process-44JS2W7L.js} +1 -1
- package/dist/bundle/{program-4DWVWSGQ.js → program-TZLAFKJV.js} +158 -103
- package/dist/bundle/prompt-SG7LAOXW.js +17 -0
- package/dist/bundle/{reasons-IHPNUP5W.js → reasons-ZK3U3CIN.js} +5 -5
- package/dist/bundle/{recognize-NAISVA56.js → recognize-OFW7HWTM.js} +7 -7
- package/dist/bundle/{remote-KCUHG5HV.js → remote-YBDRZQZ5.js} +10 -10
- package/dist/bundle/{rerank-Q3POCDSK.js → rerank-TQQNS5FJ.js} +10 -10
- package/dist/bundle/{serve-5CUOYLSG.js → serve-OPZXMVLH.js} +14 -13
- package/dist/bundle/{server-FXW3GARV.js → server-2D6DDIK5.js} +44 -43
- package/dist/bundle/server-R6G2O772.js +70 -0
- package/dist/bundle/{services-PEYBXZ3R.js → services-34WKT3NN.js} +101 -31
- package/dist/bundle/{sqlite-runtime-YMPWN5PM.js → sqlite-runtime-WPUMKLUV.js} +9 -8
- package/dist/bundle/{start-PFWEF44R.js → start-ZXUJZ4JV.js} +7 -7
- package/dist/bundle/{state-5TQ7IOJH.js → state-AV2RB3AQ.js} +9 -9
- package/dist/bundle/{store-P4OYYFW5.js → store-3M7N2Q5T.js} +20 -16
- package/dist/bundle/{store-E2VWY4O6.js → store-YKV4GAMS.js} +49 -22
- package/dist/bundle/store-maintenance-command-WDXNY4ZF.js +60 -0
- package/dist/bundle/tokens-F63RXXEF.js +103 -0
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +14 -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/documents.d.ts +1 -0
- package/dist/commands/documents.d.ts.map +1 -1
- package/dist/commands/documents.js +14 -1
- package/dist/commands/documents.js.map +1 -1
- package/dist/commands/knowledge.d.ts +4 -0
- package/dist/commands/knowledge.d.ts.map +1 -1
- package/dist/commands/knowledge.js +8 -7
- package/dist/commands/knowledge.js.map +1 -1
- package/dist/commands/session.d.ts.map +1 -1
- package/dist/commands/session.js +5 -2
- package/dist/commands/session.js.map +1 -1
- package/dist/config.d.ts +7 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +22 -3
- package/dist/config.js.map +1 -1
- package/dist/contract-overrides.js +5 -5
- package/dist/contract-overrides.js.map +1 -1
- package/dist/errors.js +4 -4
- package/dist/errors.js.map +1 -1
- package/dist/knowledge-query.d.ts +2 -0
- package/dist/knowledge-query.d.ts.map +1 -1
- package/dist/login.d.ts.map +1 -1
- package/dist/login.js +3 -5
- package/dist/login.js.map +1 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +13 -4
- package/dist/program.js.map +1 -1
- package/dist/provider-json.d.ts +2 -0
- package/dist/provider-json.d.ts.map +1 -1
- package/dist/provider-json.js +13 -0
- package/dist/provider-json.js.map +1 -1
- package/dist/reasons.d.ts +1 -1
- package/dist/reasons.d.ts.map +1 -1
- package/dist/reasons.js +2 -22
- package/dist/reasons.js.map +1 -1
- package/dist/registry.d.ts +1 -1
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +2 -1
- package/dist/registry.js.map +1 -1
- package/dist/store.d.ts +2 -0
- package/dist/store.d.ts.map +1 -1
- package/dist/store.js +9 -0
- package/dist/store.js.map +1 -1
- package/dist/tokens.js +5 -5
- package/dist/tokens.js.map +1 -1
- package/dist/upload.js +1 -1
- package/dist/upload.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/skills/drive-cli/SKILL.md +2 -1
- package/dist/bundle/chunk-7VUHY5LP.js +0 -18
- package/dist/bundle/chunk-Y6M2G7JK.js +0 -3609
- package/dist/bundle/command-contract-ZCXFT764.js +0 -39
- package/dist/bundle/entry-E6H7IUPV.js +0 -21
- package/dist/bundle/first-run-DI2JIG44.js +0 -30
- package/dist/bundle/first-screen-X5N4TCKD.js +0 -37
- package/dist/bundle/grants-HKGYAWL6.js +0 -104
- package/dist/bundle/oauth-UVU52X57.js +0 -22
- package/dist/bundle/prompt-AFWVGRDG.js +0 -17
- package/dist/bundle/server-FTLPSLRU.js +0 -69
- package/dist/bundle/store-maintenance-command-MWVERNK7.js +0 -58
- package/dist/bundle/tokens-OVG4CJO4.js +0 -102
- /package/dist/bundle/{chunk-HPXYN7F3.js → chunk-LK2E2ELG.js} +0 -0
|
@@ -5,28 +5,28 @@ import {
|
|
|
5
5
|
readSetupAnswers,
|
|
6
6
|
unanswered,
|
|
7
7
|
writeSetupAnswers
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-D6WIWOQC.js";
|
|
9
9
|
import {
|
|
10
10
|
updateCommand
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-CKGHRWVR.js";
|
|
12
12
|
import {
|
|
13
13
|
DEFAULT_STEMMERS,
|
|
14
14
|
LANGUAGES
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-MVNPE5FZ.js";
|
|
16
16
|
import {
|
|
17
17
|
sharedConfigPath
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-77C5XRH3.js";
|
|
19
19
|
import {
|
|
20
20
|
storePath
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-KEXTTZJM.js";
|
|
22
22
|
import {
|
|
23
23
|
installerOf
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-2AXA5SKP.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.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/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-3M7N2Q5T.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-3USWHGNR.js"),
|
|
117
|
+
import("./store-maintenance-command-WDXNY4ZF.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-YJF4YODC.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-SG7LAOXW.js")).readSecret(prompt, { input, echo: true }), "ask"),
|
|
203
203
|
say: /* @__PURE__ */ __name((text) => process.stderr.write(`${text}
|
|
204
204
|
`), "say")
|
|
205
205
|
}
|
|
@@ -2,22 +2,26 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
isCliFailure
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-YDN2RH5S.js";
|
|
6
|
+
import {
|
|
7
|
+
secretNamed,
|
|
8
|
+
withoutSecrets
|
|
9
|
+
} from "./chunk-UTFATA4K.js";
|
|
6
10
|
import {
|
|
7
11
|
isContentKey
|
|
8
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-FO4TCH6P.js";
|
|
9
13
|
import {
|
|
10
14
|
__name
|
|
11
15
|
} from "./chunk-ZVVMGPBJ.js";
|
|
12
16
|
|
|
13
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/runs/run-context.js
|
|
14
18
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
15
19
|
import { createHash } from "node:crypto";
|
|
16
20
|
|
|
17
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/runs/error-detail.js
|
|
18
22
|
import { homedir } from "node:os";
|
|
19
23
|
|
|
20
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/runs/events.js
|
|
21
25
|
var providerErrorKey = /* @__PURE__ */ __name((value) => typeof value === "string" && /^[A-Za-z][A-Za-z0-9._-]{0,63}$/.test(value) ? value : void 0, "providerErrorKey");
|
|
22
26
|
var renderEvent = /* @__PURE__ */ __name((event) => {
|
|
23
27
|
if (event.event === "warning") {
|
|
@@ -65,88 +69,7 @@ var MARK = { request: "\u2192", response: "\u2190", cache: "\u2022", warning: "!
|
|
|
65
69
|
var age = /* @__PURE__ */ __name((ms) => ms < 1e3 ? `${ms}ms` : `${Math.round(ms / 1e3)}s`, "age");
|
|
66
70
|
var size = /* @__PURE__ */ __name((bytes) => bytes < 1e3 ? `${bytes} B` : `${(bytes / 1e3).toFixed(1)} kB`, "size");
|
|
67
71
|
|
|
68
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
69
|
-
var SECRET_WORDS = /* @__PURE__ */ new Set([
|
|
70
|
-
"authorization",
|
|
71
|
-
"cookie",
|
|
72
|
-
"credential",
|
|
73
|
-
"credentials",
|
|
74
|
-
"passphrase",
|
|
75
|
-
"password",
|
|
76
|
-
"passwd",
|
|
77
|
-
"pwd",
|
|
78
|
-
"pass",
|
|
79
|
-
"passcode",
|
|
80
|
-
"pin",
|
|
81
|
-
"otp",
|
|
82
|
-
"2fa",
|
|
83
|
-
"secret",
|
|
84
|
-
"token",
|
|
85
|
-
"contrase\xF1a",
|
|
86
|
-
"contrasena",
|
|
87
|
-
"clave",
|
|
88
|
-
"\u043F\u0430\u0440\u043E\u043B\u044C",
|
|
89
|
-
"\u043F\u0438\u043D",
|
|
90
|
-
"\u043A\u043E\u0434",
|
|
91
|
-
...["api", "auth", "service", "account", "db", "database", "priv", "private", "client"].map((word) => `${word}key`),
|
|
92
|
-
...["db", "database", "key"].map((word) => `${word}pass`)
|
|
93
|
-
]);
|
|
94
|
-
var secretNamed = /* @__PURE__ */ __name((name) => {
|
|
95
|
-
const words = name.replace(/([a-z0-9])([A-Z])/g, "$1 $2").split(/[\s_.-]+/).map((word) => word.toLowerCase());
|
|
96
|
-
return words.some((word, at) => SECRET_WORDS.has(word) || SECRET_WORDS.has(word + (words[at + 1] ?? "")));
|
|
97
|
-
}, "secretNamed");
|
|
98
|
-
var START = "(?<![A-Za-z0-9_-])";
|
|
99
|
-
var END = "(?![A-Za-z0-9_-])";
|
|
100
|
-
var KNOWN_TOKENS = new RegExp(`${[
|
|
101
|
-
"gh[pousr]_[A-Za-z0-9]{36,}",
|
|
102
|
-
"github_pat_[A-Za-z0-9_]{22,}",
|
|
103
|
-
"sk-[A-Za-z0-9_-]{20,}",
|
|
104
|
-
"xox[abprs]-[A-Za-z0-9-]{10,}",
|
|
105
|
-
"(?:AKIA|ASIA)[A-Z0-9]{16}",
|
|
106
|
-
"AIza[A-Za-z0-9_-]{35}",
|
|
107
|
-
"(?:sk|rk)_(?:live|test)_[A-Za-z0-9]{10,}",
|
|
108
|
-
"npm_[A-Za-z0-9]{36}",
|
|
109
|
-
"eyJ[A-Za-z0-9_-]{5,}\\.eyJ[A-Za-z0-9_-]{5,}\\.[A-Za-z0-9_-]*"
|
|
110
|
-
].map((pattern) => `${START}${pattern}${END}`).join("|")}|(?<!\\d)\\d{8,10}:[A-Za-z0-9_-]{35}${END}`, "g");
|
|
111
|
-
var PRIVATE_KEY = /-----BEGIN[A-Z ]* PRIVATE KEY-----[\s\S]*?(?:-----END[A-Z ]* PRIVATE KEY-----|$)/g;
|
|
112
|
-
var SCHEME = /(?<![A-Za-z])(Bearer|Basic)(\s+)(?![A-Z]?[a-z]+(?![A-Za-z0-9]))[A-Za-z0-9._~+/=-]{8,}/g;
|
|
113
|
-
var NAMED_PAIR = /(?<![\p{L}\p{N}])([\p{L}\p{N}_.-]*(?:token|pass|pwd|pin|otp|2fa|secret|credential|cookie|authorization|key|contrase|clave|пароль|пин|код)[\p{L}\p{N}_.-]*)(["']?\s*(?:=>|[:=])\s*["']?|\s+(?![\p{L}]+(?![\p{L}\p{N}])))((?:Bearer\s+|Basic\s+)?)([^\s"'&,;]+)/giu;
|
|
114
|
-
var looksRandom = /* @__PURE__ */ __name((run) => {
|
|
115
|
-
if (run.length < 20)
|
|
116
|
-
return false;
|
|
117
|
-
const classes = [/[a-z]/, /[A-Z]/, /\d/, /[^A-Za-z0-9]/].filter((kind) => kind.test(run)).length;
|
|
118
|
-
if (classes < 3)
|
|
119
|
-
return false;
|
|
120
|
-
let switches = 0;
|
|
121
|
-
for (let at = 1; at < run.length; at++) {
|
|
122
|
-
const [before, after] = [run[at - 1], run[at]];
|
|
123
|
-
if (/[a-z]/.test(before) && /[A-Z]/.test(after) || /[A-Z]/.test(before) && /[a-z]/.test(after))
|
|
124
|
-
switches += 1;
|
|
125
|
-
}
|
|
126
|
-
if (switches / run.length < 0.15)
|
|
127
|
-
return false;
|
|
128
|
-
const pieces = run.match(/[A-Z]?[a-z]+|[A-Z]+(?![a-z])|\d+/g) ?? [];
|
|
129
|
-
if (pieces.join("").length / Math.max(pieces.length, 1) >= 2.75)
|
|
130
|
-
return false;
|
|
131
|
-
return entropy(run) >= 3.5;
|
|
132
|
-
}, "looksRandom");
|
|
133
|
-
var entropy = /* @__PURE__ */ __name((text) => {
|
|
134
|
-
const counts = /* @__PURE__ */ new Map();
|
|
135
|
-
for (const char of text)
|
|
136
|
-
counts.set(char, (counts.get(char) ?? 0) + 1);
|
|
137
|
-
let bits = 0;
|
|
138
|
-
for (const count of counts.values())
|
|
139
|
-
bits -= count / text.length * Math.log2(count / text.length);
|
|
140
|
-
return bits;
|
|
141
|
-
}, "entropy");
|
|
142
|
-
var withoutSecrets = /* @__PURE__ */ __name((text, mark = "[redacted]") => text.replace(PRIVATE_KEY, mark).replace(KNOWN_TOKENS, mark).replace(SCHEME, `$1$2${mark}`).replace(NAMED_PAIR, (whole, name, separator, scheme) => secretNamed(name) ? `${name}${separator}${scheme}${mark}` : whole).replace(/[!-~]{20,}/g, (token) => (
|
|
143
|
-
// A URL or a path is somebody's address, not a key; a credential in one is caught by the rules above.
|
|
144
|
-
token.includes("://") || /^(?:\/|~\/|\.\.?\/)/.test(token) ? token : token.replace(RUN, (run) => looksRandom(run) ? mark : run.replace(HEX, (hex) => entropy(hex) >= 3 ? mark : hex))
|
|
145
|
-
)), "withoutSecrets");
|
|
146
|
-
var RUN = /(?<![A-Za-z0-9_+/-])[A-Za-z0-9_+/-]{20,}/g;
|
|
147
|
-
var HEX = /(?<![A-Za-z0-9])(?=[0-9]*[a-f])[0-9a-f]{20,}(?![A-Za-z0-9])/g;
|
|
148
|
-
|
|
149
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.546.0_@wirecat+cli-base@0.73.0_commander@15.0.0_esbuild@0.28.2_type_6245070bff0a7c29971e74a96fde145c/node_modules/@wirecat/cli-core/dist/runs/error-detail.js
|
|
72
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/runs/error-detail.js
|
|
150
73
|
var MESSAGE_AT_MOST = 500;
|
|
151
74
|
var CAUSES_AT_MOST = 5;
|
|
152
75
|
var FRAMES_AT_MOST = 15;
|
|
@@ -255,7 +178,7 @@ var redactText = /* @__PURE__ */ __name((text) => {
|
|
|
255
178
|
return out.length > MESSAGE_AT_MOST ? `${out.slice(0, MESSAGE_AT_MOST)}\u2026` : out;
|
|
256
179
|
}, "redactText");
|
|
257
180
|
|
|
258
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
181
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/runs/run-context.js
|
|
259
182
|
var REDACTED = "[redacted]";
|
|
260
183
|
var keepsSuccess = /* @__PURE__ */ __name(({ record, fromFlag, env, caller, persistent = false }) => {
|
|
261
184
|
if (!record)
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
agentOf,
|
|
30
30
|
clientHash,
|
|
31
31
|
currentCaller
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-GD6TQ6U4.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.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/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")
|
|
@@ -9,15 +9,15 @@ import {
|
|
|
9
9
|
optional,
|
|
10
10
|
pipe,
|
|
11
11
|
safeParse
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-TKW4QWCY.js";
|
|
13
13
|
import {
|
|
14
14
|
CliError
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-EBLA7GXY.js";
|
|
16
16
|
import {
|
|
17
17
|
__name
|
|
18
18
|
} from "./chunk-ZVVMGPBJ.js";
|
|
19
19
|
|
|
20
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/models/options.js
|
|
21
21
|
var checkedOptions = /* @__PURE__ */ __name((provider, schema, options) => {
|
|
22
22
|
const parsed = safeParse(schema, options);
|
|
23
23
|
if (!parsed.success) {
|
|
@@ -3,28 +3,28 @@ const require = __bundleRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
filesPresent,
|
|
5
5
|
sharedModelsDirectory
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ALWTUDZF.js";
|
|
7
7
|
import {
|
|
8
8
|
count,
|
|
9
9
|
id,
|
|
10
10
|
text,
|
|
11
11
|
time
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-YYHKVOVK.js";
|
|
13
13
|
import {
|
|
14
14
|
PRIORITY_LABELS,
|
|
15
15
|
TAG_TYPES,
|
|
16
16
|
TASK_ORIGINS,
|
|
17
17
|
TASK_STATES,
|
|
18
18
|
TASK_TYPES
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-N7S2UPF3.js";
|
|
20
20
|
import {
|
|
21
21
|
createRecordLog,
|
|
22
22
|
resolvePaths,
|
|
23
23
|
writeSecurely
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-246P2DCT.js";
|
|
25
25
|
import {
|
|
26
26
|
traceIdOf
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-FO4TCH6P.js";
|
|
28
28
|
import {
|
|
29
29
|
array,
|
|
30
30
|
boolean,
|
|
@@ -34,26 +34,26 @@ import {
|
|
|
34
34
|
picklist,
|
|
35
35
|
reference,
|
|
36
36
|
strictObject
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-TKW4QWCY.js";
|
|
38
38
|
import {
|
|
39
39
|
CliError,
|
|
40
40
|
isCliError
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-EBLA7GXY.js";
|
|
42
42
|
import {
|
|
43
43
|
__name
|
|
44
44
|
} from "./chunk-ZVVMGPBJ.js";
|
|
45
45
|
|
|
46
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/runs/scope.js
|
|
47
47
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
48
48
|
import { randomBytes } from "node:crypto";
|
|
49
49
|
|
|
50
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/runs/run.js
|
|
51
51
|
import { randomUUID } from "node:crypto";
|
|
52
52
|
import { appendFileSync, mkdirSync, readdirSync, readFileSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
53
53
|
import { userInfo } from "node:os";
|
|
54
54
|
import { join, sep } from "node:path";
|
|
55
55
|
|
|
56
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
56
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/runs/log-keys.js
|
|
57
57
|
var snake = /* @__PURE__ */ __name((key) => key.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`), "snake");
|
|
58
58
|
var camel = /* @__PURE__ */ __name((key) => key.replace(/_([a-z0-9])/g, (_, letter) => letter.toUpperCase()), "camel");
|
|
59
59
|
var renamed = /* @__PURE__ */ __name((record, name) => Object.fromEntries(Object.entries(record).map(([key, value]) => [name(key), value])), "renamed");
|
|
@@ -66,7 +66,7 @@ var snakeLogger = /* @__PURE__ */ __name((logger) => ({
|
|
|
66
66
|
error: /* @__PURE__ */ __name((event, message) => logger.error(logAttributes(event), message), "error")
|
|
67
67
|
}), "snakeLogger");
|
|
68
68
|
|
|
69
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
69
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/runs/log-attributes.js
|
|
70
70
|
var diagnostic = {
|
|
71
71
|
event: true,
|
|
72
72
|
operation: true,
|
|
@@ -136,7 +136,7 @@ var LOG_ATTRIBUTES = [
|
|
|
136
136
|
...new Set([...Object.keys(diagnostic), ...Object.keys(send), ...background, ...crash, ...dropped].map((key) => Object.keys(logAttributes({ [key]: true }))[0]))
|
|
137
137
|
].sort();
|
|
138
138
|
|
|
139
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
139
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/runs/run.js
|
|
140
140
|
var KEEP_RUNS_FOR_DAYS = 30;
|
|
141
141
|
var KEEP_SUCCESSFUL_RUNS_FOR_DAYS = 7;
|
|
142
142
|
var RUNS_SIZE_LIMIT_MB = 200;
|
|
@@ -489,7 +489,7 @@ var metadataOf = /* @__PURE__ */ __name((parsed) => {
|
|
|
489
489
|
};
|
|
490
490
|
}, "metadataOf");
|
|
491
491
|
|
|
492
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
492
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/runs/scope.js
|
|
493
493
|
var scopes = new AsyncLocalStorage();
|
|
494
494
|
var processScope;
|
|
495
495
|
var currentRun = /* @__PURE__ */ __name(() => {
|
|
@@ -525,7 +525,7 @@ var attempts = new AsyncLocalStorage();
|
|
|
525
525
|
var withAttempt = /* @__PURE__ */ __name((attempt, work) => attempts.run(attempt, work), "withAttempt");
|
|
526
526
|
var currentAttempt = /* @__PURE__ */ __name(() => attempts.getStore(), "currentAttempt");
|
|
527
527
|
|
|
528
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
528
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/domain/duration.js
|
|
529
529
|
var DURATION = /^(\d+)(ms|s|m|h|d)$/;
|
|
530
530
|
var UNIT_MS = { ms: 1, s: 1e3, m: 6e4, h: 36e5, d: 864e5 };
|
|
531
531
|
var parseDuration = /* @__PURE__ */ __name((value, source) => {
|
|
@@ -539,7 +539,7 @@ var parseDuration = /* @__PURE__ */ __name((value, source) => {
|
|
|
539
539
|
return ms;
|
|
540
540
|
}, "parseDuration");
|
|
541
541
|
|
|
542
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
542
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/sends/permissions.js
|
|
543
543
|
var LEVELS = ["deny", "readonly", "ask", "allow"];
|
|
544
544
|
var DANGEROUS = /* @__PURE__ */ new Set(["messages.delete", "bot.messages.delete", "topics.delete", "chats.delete", "chats.clear"]);
|
|
545
545
|
var skipFlagFor = /* @__PURE__ */ __name((key) => DANGEROUS.has(key) ? "--allow-dangerous" : "--yes", "skipFlagFor");
|
|
@@ -785,6 +785,7 @@ var NAMED_WRITE_KEYS = [
|
|
|
785
785
|
"mentions.reject",
|
|
786
786
|
"tags.add",
|
|
787
787
|
"tags.remove",
|
|
788
|
+
"tasks.acknowledge",
|
|
788
789
|
"tasks.add",
|
|
789
790
|
"tasks.claim",
|
|
790
791
|
"tasks.close",
|
|
@@ -934,7 +935,7 @@ var assertRetentionEvidenceRead = /* @__PURE__ */ __name((permissions) => {
|
|
|
934
935
|
}
|
|
935
936
|
}, "assertRetentionEvidenceRead");
|
|
936
937
|
|
|
937
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
938
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/sends/guarded.js
|
|
938
939
|
import { AsyncLocalStorage as AsyncLocalStorage2 } from "node:async_hooks";
|
|
939
940
|
var sentIds = /* @__PURE__ */ __name((typed, message) => ({
|
|
940
941
|
messageId: message.id,
|
|
@@ -1040,7 +1041,7 @@ var guardedWrite = /* @__PURE__ */ __name(async (guard, attempt, act, settled =
|
|
|
1040
1041
|
}, "guardedWrite");
|
|
1041
1042
|
var codeOf = /* @__PURE__ */ __name((error) => typeof error?.code === "string" ? error.code : "unknown", "codeOf");
|
|
1042
1043
|
|
|
1043
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1044
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/embeddings/models.js
|
|
1044
1045
|
var huggingFace = /* @__PURE__ */ __name((repository, commit) => (name) => `https://huggingface.co/${repository}/resolve/${commit}/${name}`, "huggingFace");
|
|
1045
1046
|
var e5 = huggingFace("Xenova/multilingual-e5-small", "761b726dd34fb83930e26aab4e9ac3899aa1fa78");
|
|
1046
1047
|
var gemma = huggingFace("onnx-community/embeddinggemma-300m-ONNX", "5090578d9565bb06545b4552f76e6bc2c93e4a66");
|
|
@@ -1199,61 +1200,54 @@ var rerankModel = /* @__PURE__ */ __name((id2) => {
|
|
|
1199
1200
|
var vectorModelKey = /* @__PURE__ */ __name((model) => `local:${model.id}:${model.dims}`, "vectorModelKey");
|
|
1200
1201
|
var meaningFloor = /* @__PURE__ */ __name((key) => key === "local:e5-small:384" ? 0.8 : 0, "meaningFloor");
|
|
1201
1202
|
|
|
1202
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1203
|
-
|
|
1204
|
-
var
|
|
1205
|
-
var
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
}
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
throw new CliError("validation_error", `no image model ${id2} \u2014 one of: ${IMAGE_MODELS.map((model) => model.id).join(", ")}`);
|
|
1249
|
-
}
|
|
1250
|
-
return found;
|
|
1251
|
-
}, "imageModel");
|
|
1252
|
-
var imageModelsDirectory = /* @__PURE__ */ __name((env = process.env) => sharedModelsDirectory("image", env), "imageModelsDirectory");
|
|
1253
|
-
var placedImage = /* @__PURE__ */ __name((model, directory) => model.files.map((file) => [file, join2(directory, model.id, file.name)]), "placedImage");
|
|
1254
|
-
var isImageModelInstalled = /* @__PURE__ */ __name((model, directory) => filesPresent(placedImage(model, directory)), "isImageModelInstalled");
|
|
1203
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/services/history-limits.js
|
|
1204
|
+
var HISTORY_MAX_DAYS = 1095;
|
|
1205
|
+
var DEFAULT_HISTORY_LIMITS = { dialogDays: 1095, groupDays: 365, groupMembersMax: 50 };
|
|
1206
|
+
var DAY_MS2 = 24 * 60 * 60 * 1e3;
|
|
1207
|
+
var historyWindow = /* @__PURE__ */ __name((shape, limits, now) => {
|
|
1208
|
+
const group = shape !== void 0 && shape.kind !== "dialog" && shape.kind !== "saved";
|
|
1209
|
+
if (group && (shape.participantsCount ?? 0) > limits.groupMembersMax)
|
|
1210
|
+
return { skip: "group_too_large", members: shape.participantsCount ?? 0 };
|
|
1211
|
+
const days2 = group ? limits.groupDays : limits.dialogDays;
|
|
1212
|
+
return { keepFrom: now - Math.min(days2, HISTORY_MAX_DAYS) * DAY_MS2 };
|
|
1213
|
+
}, "historyWindow");
|
|
1214
|
+
var limitBatch = /* @__PURE__ */ __name((batch, shapes, included, limits, now = Date.now()) => {
|
|
1215
|
+
const skipped = /* @__PURE__ */ new Map();
|
|
1216
|
+
if (!batch.messages?.length)
|
|
1217
|
+
return { batch, skipped };
|
|
1218
|
+
const named = new Map((batch.chats ?? []).map((chat) => [chat.id, chat]));
|
|
1219
|
+
const windows = /* @__PURE__ */ new Map();
|
|
1220
|
+
const windowOf = /* @__PURE__ */ __name((chatId) => {
|
|
1221
|
+
if (!windows.has(chatId)) {
|
|
1222
|
+
const chat = named.get(chatId);
|
|
1223
|
+
const shape = chat ? { kind: chat.kind, participantsCount: chat.participantsCount ?? null } : shapes(chatId);
|
|
1224
|
+
windows.set(chatId, included(chatId) ? void 0 : historyWindow(shape, limits, now));
|
|
1225
|
+
}
|
|
1226
|
+
return windows.get(chatId);
|
|
1227
|
+
}, "windowOf");
|
|
1228
|
+
const messages = batch.messages.filter((message) => {
|
|
1229
|
+
const window = windowOf(message.chatId);
|
|
1230
|
+
if (window === void 0)
|
|
1231
|
+
return true;
|
|
1232
|
+
const at = Date.parse(message.timestamp);
|
|
1233
|
+
if ("keepFrom" in window && !(at < window.keepFrom))
|
|
1234
|
+
return true;
|
|
1235
|
+
const reason = "skip" in window ? window.skip : "older_than_window";
|
|
1236
|
+
const held = skipped.get(message.chatId);
|
|
1237
|
+
const iso = new Date(at).toISOString();
|
|
1238
|
+
skipped.set(message.chatId, {
|
|
1239
|
+
reason,
|
|
1240
|
+
messages: (held?.messages ?? 0) + 1,
|
|
1241
|
+
oldestAt: held && held.oldestAt < iso ? held.oldestAt : iso,
|
|
1242
|
+
newestAt: held && held.newestAt > iso ? held.newestAt : iso,
|
|
1243
|
+
..."skip" in window ? { members: window.members } : { keptFrom: new Date(window.keepFrom).toISOString() }
|
|
1244
|
+
});
|
|
1245
|
+
return false;
|
|
1246
|
+
});
|
|
1247
|
+
return { batch: { ...batch, messages }, skipped };
|
|
1248
|
+
}, "limitBatch");
|
|
1255
1249
|
|
|
1256
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1250
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/entities/task.js
|
|
1257
1251
|
var closeSuggestion = strictObject({
|
|
1258
1252
|
as: picklist(["done", "dismissed"]),
|
|
1259
1253
|
/** The agent's name. */
|
|
@@ -1311,7 +1305,7 @@ var task = strictObject({
|
|
|
1311
1305
|
updated_at: optional(time)
|
|
1312
1306
|
});
|
|
1313
1307
|
|
|
1314
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1308
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/entities/agenda.js
|
|
1315
1309
|
var agendaChat = strictObject({
|
|
1316
1310
|
chat: reference,
|
|
1317
1311
|
title: nullable(text),
|
|
@@ -1381,22 +1375,7 @@ var agenda = strictObject({
|
|
|
1381
1375
|
unlisted_categories: array(strictObject({ name: text, open_tasks: number() }))
|
|
1382
1376
|
});
|
|
1383
1377
|
|
|
1384
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1385
|
-
var conversation = strictObject({
|
|
1386
|
-
id,
|
|
1387
|
-
chat: reference,
|
|
1388
|
-
/** The message it starts with. */
|
|
1389
|
-
first_message: reference,
|
|
1390
|
-
started_at: time,
|
|
1391
|
-
ended_at: time,
|
|
1392
|
-
messages_count: count,
|
|
1393
|
-
/** How many people wrote in it. */
|
|
1394
|
-
senders_count: count,
|
|
1395
|
-
built_at: time,
|
|
1396
|
-
rules_version: count
|
|
1397
|
-
});
|
|
1398
|
-
|
|
1399
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.546.0_@wirecat+cli-base@0.73.0_commander@15.0.0_esbuild@0.28.2_type_6245070bff0a7c29971e74a96fde145c/node_modules/@wirecat/cli-core/dist/entities/attachment.js
|
|
1378
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/entities/attachment.js
|
|
1400
1379
|
var attachment = strictObject({
|
|
1401
1380
|
/** The message it came with, as a locator; absent inside that message. */
|
|
1402
1381
|
message: optional(reference),
|
|
@@ -1434,7 +1413,22 @@ var attachment = strictObject({
|
|
|
1434
1413
|
});
|
|
1435
1414
|
var hitFile = strictObject({ position: count, kind: text, name: optional(text), size: optional(count) });
|
|
1436
1415
|
|
|
1437
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1416
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/entities/conversation.js
|
|
1417
|
+
var conversation = strictObject({
|
|
1418
|
+
id,
|
|
1419
|
+
chat: reference,
|
|
1420
|
+
/** The message it starts with. */
|
|
1421
|
+
first_message: reference,
|
|
1422
|
+
started_at: time,
|
|
1423
|
+
ended_at: time,
|
|
1424
|
+
messages_count: count,
|
|
1425
|
+
/** How many people wrote in it. */
|
|
1426
|
+
senders_count: count,
|
|
1427
|
+
built_at: time,
|
|
1428
|
+
rules_version: count
|
|
1429
|
+
});
|
|
1430
|
+
|
|
1431
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/entities/tagging.js
|
|
1438
1432
|
var tagging = strictObject({
|
|
1439
1433
|
tag: text,
|
|
1440
1434
|
type: picklist(TAG_TYPES),
|
|
@@ -1447,7 +1441,61 @@ var tagging = strictObject({
|
|
|
1447
1441
|
created_at: time
|
|
1448
1442
|
});
|
|
1449
1443
|
|
|
1450
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1444
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/images/picture/models.js
|
|
1445
|
+
import { join as join2 } from "node:path";
|
|
1446
|
+
var clip = /* @__PURE__ */ __name((name) => `https://huggingface.co/Xenova/clip-vit-base-patch32/resolve/d15189d7028b43f1d3e65039190477f6af591c2a/${name}`, "clip");
|
|
1447
|
+
var IMAGE_MODELS = [
|
|
1448
|
+
{
|
|
1449
|
+
id: "clip-b32",
|
|
1450
|
+
title: "CLIP ViT-B/32, 8-bit",
|
|
1451
|
+
languages: "English only: translate a query before searching",
|
|
1452
|
+
licence: "MIT",
|
|
1453
|
+
dims: 512,
|
|
1454
|
+
key: "local:clip-b32:512",
|
|
1455
|
+
maxTokens: 77,
|
|
1456
|
+
vision: "onnx/vision_model_quantized.onnx",
|
|
1457
|
+
text: "onnx/text_model_quantized.onnx",
|
|
1458
|
+
files: [
|
|
1459
|
+
{
|
|
1460
|
+
name: "onnx/vision_model_quantized.onnx",
|
|
1461
|
+
url: clip("onnx/vision_model_quantized.onnx"),
|
|
1462
|
+
sha256: "583fd1110a514667812fee7d684952aaf82a99b959760c8d7dca7e0ab9839299",
|
|
1463
|
+
bytes: 89117001
|
|
1464
|
+
},
|
|
1465
|
+
{
|
|
1466
|
+
name: "onnx/text_model_quantized.onnx",
|
|
1467
|
+
url: clip("onnx/text_model_quantized.onnx"),
|
|
1468
|
+
sha256: "73baab855d406190da9faa498cfedf65f15cf309f4cc7385b7b032e6d08e5c3a",
|
|
1469
|
+
bytes: 64504507
|
|
1470
|
+
},
|
|
1471
|
+
{
|
|
1472
|
+
name: "tokenizer.json",
|
|
1473
|
+
url: clip("tokenizer.json"),
|
|
1474
|
+
sha256: "f7f3b7af117d467b58374797691a6438d3e6b9e9cef800dfd5dced7f697a90cd",
|
|
1475
|
+
bytes: 2224119
|
|
1476
|
+
},
|
|
1477
|
+
{
|
|
1478
|
+
name: "tokenizer_config.json",
|
|
1479
|
+
url: clip("tokenizer_config.json"),
|
|
1480
|
+
sha256: "60ba2912bc6344c94bc16bbdec27fa1209409167b6f2fdf3cfe9e65462ea3967",
|
|
1481
|
+
bytes: 775
|
|
1482
|
+
}
|
|
1483
|
+
]
|
|
1484
|
+
}
|
|
1485
|
+
];
|
|
1486
|
+
var DEFAULT_IMAGE_MODEL = "clip-b32";
|
|
1487
|
+
var imageModel = /* @__PURE__ */ __name((id2) => {
|
|
1488
|
+
const found = IMAGE_MODELS.find((model) => model.id === id2);
|
|
1489
|
+
if (!found) {
|
|
1490
|
+
throw new CliError("validation_error", `no image model ${id2} \u2014 one of: ${IMAGE_MODELS.map((model) => model.id).join(", ")}`);
|
|
1491
|
+
}
|
|
1492
|
+
return found;
|
|
1493
|
+
}, "imageModel");
|
|
1494
|
+
var imageModelsDirectory = /* @__PURE__ */ __name((env = process.env) => sharedModelsDirectory("image", env), "imageModelsDirectory");
|
|
1495
|
+
var placedImage = /* @__PURE__ */ __name((model, directory) => model.files.map((file) => [file, join2(directory, model.id, file.name)]), "placedImage");
|
|
1496
|
+
var isImageModelInstalled = /* @__PURE__ */ __name((model, directory) => filesPresent(placedImage(model, directory)), "isImageModelInstalled");
|
|
1497
|
+
|
|
1498
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/botcheck/reasons.js
|
|
1451
1499
|
var WEIGHTS = {
|
|
1452
1500
|
bot: 3,
|
|
1453
1501
|
scam: 3,
|
|
@@ -1535,20 +1583,24 @@ export {
|
|
|
1535
1583
|
permissionOverrides,
|
|
1536
1584
|
assertOverridesTighten,
|
|
1537
1585
|
assertRetentionEvidenceRead,
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
placedImage,
|
|
1543
|
-
isImageModelInstalled,
|
|
1544
|
-
WEIGHTS,
|
|
1545
|
-
LINK,
|
|
1546
|
-
oddName,
|
|
1586
|
+
HISTORY_MAX_DAYS,
|
|
1587
|
+
DEFAULT_HISTORY_LIMITS,
|
|
1588
|
+
historyWindow,
|
|
1589
|
+
limitBatch,
|
|
1547
1590
|
closeSuggestion,
|
|
1548
1591
|
task,
|
|
1549
1592
|
agenda,
|
|
1550
|
-
conversation,
|
|
1551
1593
|
attachment,
|
|
1552
1594
|
hitFile,
|
|
1553
|
-
|
|
1595
|
+
WEIGHTS,
|
|
1596
|
+
LINK,
|
|
1597
|
+
oddName,
|
|
1598
|
+
conversation,
|
|
1599
|
+
tagging,
|
|
1600
|
+
IMAGE_MODELS,
|
|
1601
|
+
DEFAULT_IMAGE_MODEL,
|
|
1602
|
+
imageModel,
|
|
1603
|
+
imageModelsDirectory,
|
|
1604
|
+
placedImage,
|
|
1605
|
+
isImageModelInstalled
|
|
1554
1606
|
};
|