@wirecat/tg-cli 0.123.0 → 0.125.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 +54 -5
- package/dist/bin/tg.js +2 -2
- package/dist/bundle/{adapter-GAOG65O2.js → adapter-H2LTOLOA.js} +54 -53
- package/dist/bundle/{all-profiles-HLE6PHNI.js → all-profiles-75HGEFL7.js} +10 -10
- package/dist/bundle/{anthropic-FZC4BS7T.js → anthropic-N54MKE4C.js} +17 -10
- package/dist/bundle/{app-server-SHZNMV27.js → app-server-3N5INKKI.js} +62 -52
- package/dist/bundle/{bot-api-LRS2KMDE.js → bot-api-V65KTEAH.js} +53 -52
- package/dist/bundle/{bot-history-IJ7ZZKW5.js → bot-history-TT2EAHEE.js} +18 -18
- package/dist/bundle/{bun-FACL53HM.js → bun-LN4J7PA7.js} +2 -2
- package/dist/bundle/{bun-sqlite-B2MD7RTL.js → bun-sqlite-6PDBFBUI.js} +6 -6
- package/dist/bundle/{chunk-BGUYYKS3.js → chunk-37SZHAEA.js} +343 -112
- package/dist/bundle/{chunk-UB6J5HRW.js → chunk-3GILMKQ2.js} +3 -3
- package/dist/bundle/{chunk-WSLTW6MI.js → chunk-4KIOWSDL.js} +3 -3
- package/dist/bundle/{chunk-VVRWH5VH.js → chunk-4TCBRKWQ.js} +14 -9
- package/dist/bundle/{chunk-MFN5MSIL.js → chunk-6HLB73UN.js} +3 -3
- package/dist/bundle/{chunk-DEMGDKCX.js → chunk-6Y6SSZ34.js} +2406 -2371
- package/dist/bundle/{chunk-Z5HHBTS5.js → chunk-77Z3OGAT.js} +23 -4
- package/dist/bundle/{chunk-VUBZFMGP.js → chunk-7KCBPAQS.js} +2 -2
- package/dist/bundle/{chunk-ZJPXRW65.js → chunk-7OBSIDBJ.js} +4 -4
- package/dist/bundle/{chunk-OOWE2O5U.js → chunk-AI2J3WJT.js} +1 -1
- package/dist/bundle/{chunk-EABZ2CUG.js → chunk-AMPHPP4P.js} +34 -29
- package/dist/bundle/{chunk-STPYSD6W.js → chunk-B252D7V4.js} +3 -3
- package/dist/bundle/{chunk-V4722KYX.js → chunk-BLNMM3AX.js} +2 -2
- package/dist/bundle/{chunk-SWGGYBCW.js → chunk-CNEJQQMD.js} +40 -21
- package/dist/bundle/{chunk-4DCFLHLN.js → chunk-DI3RJ3MJ.js} +4 -4
- package/dist/bundle/{chunk-7EFJHLKW.js → chunk-DNCOELTM.js} +1 -1
- package/dist/bundle/chunk-DYOZ7CUV.js +71 -0
- package/dist/bundle/{chunk-E2Z4C6CQ.js → chunk-E4HDE5DN.js} +6 -6
- package/dist/bundle/chunk-EIGV2JKX.js +13 -0
- package/dist/bundle/{chunk-6KT5BTWL.js → chunk-FHPEUAHQ.js} +367 -184
- package/dist/bundle/{chunk-MCPOZNWG.js → chunk-FIVFP53N.js} +1 -1
- package/dist/bundle/{chunk-SNEJK4SN.js → chunk-FSP74THJ.js} +4 -4
- package/dist/bundle/{chunk-PAHSIORC.js → chunk-FUYCAROL.js} +6 -6
- package/dist/bundle/{chunk-WA7YED3Y.js → chunk-GRDVBJCR.js} +1 -1
- package/dist/bundle/{chunk-OE5JMZSM.js → chunk-GUPMDMFM.js} +9 -9
- package/dist/bundle/{chunk-6FK2Z75N.js → chunk-HHG5FR5H.js} +2 -2
- package/dist/bundle/{chunk-U5FILNK6.js → chunk-IN3NAFUN.js} +69 -6
- package/dist/bundle/{chunk-3BUQXB7B.js → chunk-INZAZMUF.js} +15 -117
- package/dist/bundle/{chunk-4W4EVVL4.js → chunk-IX3GUNGV.js} +4 -4
- package/dist/bundle/{chunk-SCGCDLI7.js → chunk-JB4BO5XZ.js} +1 -1
- package/dist/bundle/{chunk-XDL4L3OI.js → chunk-JC6HMPL7.js} +14229 -12041
- package/dist/bundle/chunk-JCNKGZQG.js +1068 -0
- package/dist/bundle/{chunk-PZQ2MQFX.js → chunk-JKF7LZBU.js} +6 -6
- package/dist/bundle/{chunk-5R5HGV2J.js → chunk-LD42OGKK.js} +4 -4
- package/dist/bundle/{chunk-3P7HWXDJ.js → chunk-LU2CHHPC.js} +14 -5
- package/dist/bundle/{chunk-RX5CJ55S.js → chunk-M4OP5ASJ.js} +1 -1
- package/dist/bundle/{chunk-3JISIGLP.js → chunk-MK4IKICN.js} +2 -2
- package/dist/bundle/{chunk-3S6KZCZ7.js → chunk-NM5GBJME.js} +57 -28
- package/dist/bundle/{chunk-KKMNMQMW.js → chunk-NTHALPDT.js} +2 -2
- package/dist/bundle/{chunk-B6G3TNN4.js → chunk-OG2ONSH6.js} +156 -43
- package/dist/bundle/{chunk-EOUUI5FI.js → chunk-PCC7GWOS.js} +4 -4
- package/dist/bundle/{chunk-ADI5R2MM.js → chunk-QVK7NF3A.js} +51 -51
- package/dist/bundle/{chunk-Q74XVJFT.js → chunk-QYT6HDCL.js} +1 -1
- package/dist/bundle/{chunk-EISV5YWD.js → chunk-RX5GU7GQ.js} +6994 -6232
- package/dist/bundle/{chunk-NYRAW4M5.js → chunk-RZ7KBWDQ.js} +4 -7
- package/dist/bundle/{chunk-V23X3W2W.js → chunk-S4SOS27T.js} +8 -8
- package/dist/bundle/{chunk-V4JEZFW5.js → chunk-SGHF75RQ.js} +2 -2
- package/dist/bundle/{chunk-T5OO7VDT.js → chunk-TAFH5K5D.js} +3900 -3425
- package/dist/bundle/{chunk-QLB3BFSN.js → chunk-TVQBOIWC.js} +1 -1
- package/dist/bundle/{chunk-QLXKWAET.js → chunk-UG66U2T7.js} +88 -21
- package/dist/bundle/{chunk-ZOBRYIUG.js → chunk-URFBZNLU.js} +2 -2
- package/dist/bundle/{chunk-ZQ3WGGKK.js → chunk-UTNK2PFE.js} +13 -13
- package/dist/bundle/{chunk-LVGX7VTD.js → chunk-VG3EQJYV.js} +34 -5
- package/dist/bundle/{chunk-FFHX7VKP.js → chunk-VHD4V64E.js} +1 -1
- package/dist/bundle/{chunk-BAB3ALHZ.js → chunk-VUBSGQ2O.js} +30 -26
- package/dist/bundle/{chunk-UBFDPLFQ.js → chunk-VZDAVZYX.js} +6 -6
- package/dist/bundle/{chunk-QVMAZVSN.js → chunk-WH4T44L3.js} +1 -1
- package/dist/bundle/{chunk-RDKPKS2P.js → chunk-X6436BYW.js} +2 -2
- package/dist/bundle/{chunk-SMFUKHG2.js → chunk-XS5C5TQ7.js} +24 -9
- package/dist/bundle/{chunk-ENEMZAIJ.js → chunk-XTNOBJRP.js} +14 -12
- package/dist/bundle/{chunk-HJLTWT52.js → chunk-YRZXOQOB.js} +2 -2
- package/dist/bundle/{chunk-5IHYZ6ED.js → chunk-ZX5OSZHH.js} +12 -12
- package/dist/bundle/command-contract-JP6SCP7U.js +34 -0
- package/dist/bundle/{command-server-entry-5LKDRLEX.js → command-server-entry-BLSFT3T6.js} +24 -22
- package/dist/bundle/{decode-L4DQDHXA.js → decode-NNLEQU7B.js} +5 -5
- package/dist/bundle/{dispatch-PQSCFHEX.js → dispatch-PRAIGIFS.js} +8 -8
- package/dist/bundle/{echarts-6LES2JIV.js → echarts-XAZHGDOM.js} +2 -2
- package/dist/bundle/{embed-T5MLKX75.js → embed-Q7ZCVSCO.js} +6 -6
- package/dist/bundle/{embedder-56NMRLC5.js → embedder-MVS3PVWQ.js} +9 -9
- package/dist/bundle/{entry-U5GV6Y46.js → entry-XN3ZZAOK.js} +9 -8
- package/dist/bundle/{failure-BX5HJAQE.js → failure-7Y34AUJT.js} +2 -2
- package/dist/bundle/{first-run-ISQ52V3I.js → first-run-G4EFTONI.js} +11 -11
- package/dist/bundle/first-screen-RIDJEPC3.js +32 -0
- package/dist/bundle/{instructions-CJEXDI7E.js → instructions-QDHYYZBU.js} +1 -1
- package/dist/bundle/{mcp-7KQUJNFN.js → mcp-TDKGDB4V.js} +2 -2
- package/dist/bundle/{node-QLWTGZW7.js → node-3Y7OVY2U.js} +2 -2
- package/dist/bundle/{node-sqlite-X2C3RR2Q.js → node-sqlite-R2SBROJM.js} +7 -7
- package/dist/bundle/{oauth-VP3KMHLX.js → oauth-WSPWMWTV.js} +7 -7
- package/dist/bundle/{open-GLR5EUZS.js → open-VFLF4HRQ.js} +5 -5
- package/dist/bundle/{openai-6CDCJ5LQ.js → openai-DFCKZZDV.js} +23 -18
- package/dist/bundle/{process-7FABZ3T2.js → process-VZKFAGNP.js} +1 -1
- package/dist/bundle/{program-KUIAHJDX.js → program-2LB3CUZX.js} +86 -67
- package/dist/bundle/{prompt-XPHIZMD2.js → prompt-RVLA2PEY.js} +5 -5
- package/dist/bundle/{proxy-transport-IIB7ZXIS.js → proxy-transport-DP7SIMIC.js} +5 -5
- package/dist/bundle/{recognize-FVFYI3XX.js → recognize-LEKNA3G5.js} +4 -4
- package/dist/bundle/{remote-3AMCG2P4.js → remote-WG5V2I2G.js} +9 -7
- package/dist/bundle/{rerank-XV4E25ML.js → rerank-ONAEQVJ6.js} +7 -7
- package/dist/bundle/{serve-NVSZA4UN.js → serve-BL2X6FZG.js} +14 -14
- package/dist/bundle/{server-MBMPHRJE.js → server-3LSC4BMK.js} +36 -35
- package/dist/bundle/server-7EYEEGJT.js +62 -0
- package/dist/bundle/sqlite-runtime-RQXPRH6C.js +19 -0
- package/dist/bundle/{state-JBMB2QUR.js → state-O7LRA526.js} +6 -6
- package/dist/bundle/store-7C4UAND2.js +276 -0
- package/dist/bundle/{store-T4SCYTY2.js → store-HMJUPK45.js} +15 -13
- package/dist/bundle/store-maintenance-command-I7PSA3SZ.js +52 -0
- package/dist/bundle/tg.js +13 -13
- package/dist/commands/account-removal.d.ts.map +1 -1
- package/dist/commands/account-removal.js +5 -3
- package/dist/commands/account-removal.js.map +1 -1
- package/dist/commands/session.d.ts.map +1 -1
- package/dist/commands/session.js +21 -3
- package/dist/commands/session.js.map +1 -1
- package/dist/paths.d.ts +6 -0
- package/dist/paths.d.ts.map +1 -1
- package/dist/paths.js +23 -2
- package/dist/paths.js.map +1 -1
- package/dist/program.d.ts +4 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +5 -2
- package/dist/program.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +4 -4
- package/skills/tg-cli/SKILL.md +6 -2
- package/dist/bundle/chunk-I7K4OR5Q.js +0 -265
- package/dist/bundle/chunk-PZJXQMSZ.js +0 -27
- package/dist/bundle/command-contract-HWSWHMO4.js +0 -33
- package/dist/bundle/first-screen-7L4AMZDO.js +0 -31
- package/dist/bundle/server-MHVGYRQZ.js +0 -61
- package/dist/bundle/store-maintenance-command-F7WQMTMP.js +0 -49
- /package/dist/bundle/{chunk-YVNHQFLC.js → chunk-XWBPP2HX.js} +0 -0
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
__name
|
|
5
5
|
} from "./chunk-ZVVMGPBJ.js";
|
|
6
6
|
|
|
7
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
7
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/executable.js
|
|
8
8
|
import { existsSync } from "node:fs";
|
|
9
9
|
import { win32 } from "node:path";
|
|
10
10
|
var variable = /* @__PURE__ */ __name((env, name) => Object.entries(env).find(([key]) => key.toUpperCase() === name)?.[1], "variable");
|
|
@@ -5,15 +5,15 @@ import {
|
|
|
5
5
|
readLock,
|
|
6
6
|
releaseLock,
|
|
7
7
|
takeLock
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-6HLB73UN.js";
|
|
9
9
|
import {
|
|
10
10
|
__name
|
|
11
11
|
} from "./chunk-ZVVMGPBJ.js";
|
|
12
12
|
|
|
13
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.650.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._f55ccfac747d9da64edfb69ea8dcc45a/node_modules/@wirecat/cli-core/dist/mcp/http/state.js
|
|
14
14
|
import { existsSync as existsSync2, readFileSync as readFileSync2 } from "node:fs";
|
|
15
15
|
|
|
16
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.650.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._f55ccfac747d9da64edfb69ea8dcc45a/node_modules/@wirecat/cli-core/dist/mcp/http/activity.js
|
|
17
17
|
import { randomBytes } from "node:crypto";
|
|
18
18
|
import { chmodSync, existsSync, mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
19
19
|
import { dirname } from "node:path";
|
|
@@ -86,7 +86,7 @@ var activityRecorder = /* @__PURE__ */ __name((path, now = Date.now) => {
|
|
|
86
86
|
};
|
|
87
87
|
}, "activityRecorder");
|
|
88
88
|
|
|
89
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
89
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.650.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._f55ccfac747d9da64edfb69ea8dcc45a/node_modules/@wirecat/cli-core/dist/mcp/http/state.js
|
|
90
90
|
var ACCESS_SECONDS = 60 * 60;
|
|
91
91
|
var REFRESH_SECONDS = 30 * 24 * 60 * 60;
|
|
92
92
|
var readStored = /* @__PURE__ */ __name((path) => existsSync2(path) ? JSON.parse(readFileSync2(path, "utf8")) : { clients: [], tokens: [] }, "readStored");
|
|
@@ -2,23 +2,23 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
storePath
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-NTHALPDT.js";
|
|
6
6
|
import {
|
|
7
7
|
resolvePaths
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-NM5GBJME.js";
|
|
9
9
|
import {
|
|
10
10
|
CliError,
|
|
11
11
|
singleLine
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-7KCBPAQS.js";
|
|
13
13
|
import {
|
|
14
14
|
__name
|
|
15
15
|
} from "./chunk-ZVVMGPBJ.js";
|
|
16
16
|
|
|
17
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.650.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._f55ccfac747d9da64edfb69ea8dcc45a/node_modules/@wirecat/cli-core/dist/store/shared-config.js
|
|
18
18
|
import { mkdirSync, readFileSync, renameSync, statSync, writeFileSync } from "node:fs";
|
|
19
19
|
import { dirname, join, resolve } from "node:path";
|
|
20
20
|
|
|
21
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.650.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._f55ccfac747d9da64edfb69ea8dcc45a/node_modules/@wirecat/cli-core/dist/domain/task-categories.js
|
|
22
22
|
var DEFAULT_TASK_CATEGORIES = [
|
|
23
23
|
{
|
|
24
24
|
name: "taxes",
|
|
@@ -773,7 +773,7 @@ var storedTaskCategories = /* @__PURE__ */ __name((json) => {
|
|
|
773
773
|
}
|
|
774
774
|
}, "storedTaskCategories");
|
|
775
775
|
|
|
776
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
776
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.650.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._f55ccfac747d9da64edfb69ea8dcc45a/node_modules/@wirecat/cli-core/dist/store/shared-config.js
|
|
777
777
|
var SECTION = "task_categories";
|
|
778
778
|
var sharedConfigPath = /* @__PURE__ */ __name((store, env = process.env) => {
|
|
779
779
|
const paths = resolvePaths({ appName: "WireCat", prefix: "WIRECAT", env });
|
|
@@ -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_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._f55ccfac747d9da64edfb69ea8dcc45a/node_modules/@wirecat/cli-core/dist/mcp/bot/instructions.js
|
|
8
8
|
var botInstructions = /* @__PURE__ */ __name(({ command, name, profile, writes, skill }) => [
|
|
9
9
|
`The owner's ${name} bot "${profile}", through the official Bot API \u2014 not the owner's personal account. What it writes, people see as the bot.`,
|
|
10
10
|
"Use these tools to read the chats this bot is in, find a message or a person, and \u2014 when the profile allows \u2014 write as the bot.",
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import { createRequire as __bundleRequire } from "node:module";
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
|
-
import {
|
|
4
|
-
stdinFieldOf
|
|
5
|
-
} from "./chunk-QVMAZVSN.js";
|
|
6
3
|
import {
|
|
7
4
|
isCommandServer
|
|
8
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-EIGV2JKX.js";
|
|
6
|
+
import {
|
|
7
|
+
stdinFieldOf
|
|
8
|
+
} from "./chunk-WH4T44L3.js";
|
|
9
9
|
import {
|
|
10
10
|
commandPathOf
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-7OBSIDBJ.js";
|
|
12
12
|
import {
|
|
13
13
|
commandServerRequest,
|
|
14
14
|
metaOf
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-FHPEUAHQ.js";
|
|
16
16
|
import {
|
|
17
17
|
errorObjectOf,
|
|
18
18
|
renderError
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-XS5C5TQ7.js";
|
|
20
20
|
import {
|
|
21
21
|
CliError
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-7KCBPAQS.js";
|
|
23
23
|
import {
|
|
24
24
|
__name
|
|
25
25
|
} from "./chunk-ZVVMGPBJ.js";
|
|
26
26
|
|
|
27
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.650.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._f55ccfac747d9da64edfb69ea8dcc45a/node_modules/@wirecat/cli-core/dist/cli/command-server.js
|
|
28
28
|
import { createInterface } from "node:readline";
|
|
29
29
|
var COMMAND_SERVER_PROTOCOL = 1;
|
|
30
30
|
var COMMAND_SERVER_IDLE_MS = 10 * 6e4;
|
|
@@ -2,7 +2,7 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
defineReasons
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-XS5C5TQ7.js";
|
|
6
6
|
|
|
7
7
|
// dist/reasons.js
|
|
8
8
|
var REASONS = defineReasons([
|
|
@@ -26,7 +26,7 @@ var REASONS = defineReasons([
|
|
|
26
26
|
].map(([reason, code, message]) => ({ reason, code, message, details: [] })));
|
|
27
27
|
|
|
28
28
|
// dist/version.js
|
|
29
|
-
var VERSION = "0.
|
|
29
|
+
var VERSION = "0.125.0";
|
|
30
30
|
|
|
31
31
|
// dist/identity.js
|
|
32
32
|
var TG = {
|
|
@@ -2,16 +2,73 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
unit
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-JKF7LZBU.js";
|
|
6
|
+
import {
|
|
7
|
+
PLAIN_HTTP_REFUSED,
|
|
8
|
+
modelAddressAllowed,
|
|
9
|
+
onThisComputer
|
|
10
|
+
} from "./chunk-VG3EQJYV.js";
|
|
11
|
+
import {
|
|
12
|
+
readSharedSection,
|
|
13
|
+
sharedConfigPath,
|
|
14
|
+
writeSharedSection
|
|
15
|
+
} from "./chunk-FUYCAROL.js";
|
|
16
|
+
import {
|
|
17
|
+
storePath
|
|
18
|
+
} from "./chunk-NTHALPDT.js";
|
|
19
|
+
import {
|
|
20
|
+
boolean,
|
|
21
|
+
isoTimestamp,
|
|
22
|
+
pipe,
|
|
23
|
+
safeParse,
|
|
24
|
+
strictObject,
|
|
25
|
+
string
|
|
26
|
+
} from "./chunk-XS5C5TQ7.js";
|
|
6
27
|
import {
|
|
7
28
|
CliError
|
|
8
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-7KCBPAQS.js";
|
|
9
30
|
import {
|
|
10
31
|
__name
|
|
11
32
|
} from "./chunk-ZVVMGPBJ.js";
|
|
12
33
|
|
|
13
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.650.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._f55ccfac747d9da64edfb69ea8dcc45a/node_modules/@wirecat/cli-core/dist/embeddings/remote.js
|
|
14
35
|
import { setTimeout } from "node:timers/promises";
|
|
36
|
+
|
|
37
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.650.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._f55ccfac747d9da64edfb69ea8dcc45a/node_modules/@wirecat/cli-core/dist/models/local-only.js
|
|
38
|
+
var SECTION = "local_only";
|
|
39
|
+
var Setting = strictObject({
|
|
40
|
+
on: boolean(),
|
|
41
|
+
at: pipe(string(), isoTimestamp())
|
|
42
|
+
});
|
|
43
|
+
var pathOf = /* @__PURE__ */ __name((env) => sharedConfigPath(storePath(env), env), "pathOf");
|
|
44
|
+
var readLocalOnly = /* @__PURE__ */ __name((env) => {
|
|
45
|
+
const section = readSharedSection(pathOf(env), SECTION);
|
|
46
|
+
if (section === void 0 || section === null)
|
|
47
|
+
return void 0;
|
|
48
|
+
const checked = safeParse(Setting, section);
|
|
49
|
+
return checked.success ? checked.output : { on: true, at: (/* @__PURE__ */ new Date(0)).toISOString() };
|
|
50
|
+
}, "readLocalOnly");
|
|
51
|
+
var localOnly = /* @__PURE__ */ __name((env) => readLocalOnly(env)?.on === true, "localOnly");
|
|
52
|
+
var writeLocalOnly = /* @__PURE__ */ __name((env, on) => writeSharedSection(pathOf(env), SECTION, on ? { on: true, at: (/* @__PURE__ */ new Date()).toISOString() } : void 0), "writeLocalOnly");
|
|
53
|
+
var localOnlyRefusal = /* @__PURE__ */ __name((what, where) => new CliError("permission_error", `local only is on: ${what} would go to ${where}, which is not this computer; nothing was sent. Choose a model on this computer, or turn local only off with \`models local-only set off\``, { reason: "local-only.refused" }), "localOnlyRefusal");
|
|
54
|
+
var refuseOffComputer = /* @__PURE__ */ __name((env, address, what) => {
|
|
55
|
+
if (!onThisComputer(address) && localOnly(env))
|
|
56
|
+
throw localOnlyRefusal(what, hostOf(address));
|
|
57
|
+
}, "refuseOffComputer");
|
|
58
|
+
var hostOf = /* @__PURE__ */ __name((address) => {
|
|
59
|
+
try {
|
|
60
|
+
return new URL(address).host;
|
|
61
|
+
} catch {
|
|
62
|
+
return address;
|
|
63
|
+
}
|
|
64
|
+
}, "hostOf");
|
|
65
|
+
var refuseModelAddress = /* @__PURE__ */ __name((env, address, what) => {
|
|
66
|
+
if (!modelAddressAllowed(address))
|
|
67
|
+
throw new CliError("validation_error", PLAIN_HTTP_REFUSED, { reason: "model.address-refused" });
|
|
68
|
+
refuseOffComputer(env, address, what);
|
|
69
|
+
}, "refuseModelAddress");
|
|
70
|
+
|
|
71
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.650.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._f55ccfac747d9da64edfb69ea8dcc45a/node_modules/@wirecat/cli-core/dist/embeddings/remote.js
|
|
15
72
|
var OPENAI_URL = "https://api.openai.com/v1";
|
|
16
73
|
var OPENAI_MODELS = {
|
|
17
74
|
"text-embedding-3-small": { dims: 1536, perMillion: 0.02 },
|
|
@@ -19,8 +76,7 @@ var OPENAI_MODELS = {
|
|
|
19
76
|
};
|
|
20
77
|
var DEFAULT_OPENAI_MODEL = "text-embedding-3-small";
|
|
21
78
|
var PER_REQUEST = 256;
|
|
22
|
-
var
|
|
23
|
-
var isLocal = /* @__PURE__ */ __name((baseUrl) => LOCAL.has(new URL(baseUrl).hostname), "isLocal");
|
|
79
|
+
var isLocal = /* @__PURE__ */ __name((baseUrl) => onThisComputer(baseUrl), "isLocal");
|
|
24
80
|
var remoteModel = /* @__PURE__ */ __name(({ model = DEFAULT_OPENAI_MODEL, baseUrl, dims }) => {
|
|
25
81
|
const known = baseUrl === void 0 ? OPENAI_MODELS[model] : void 0;
|
|
26
82
|
if (baseUrl === void 0 && !known) {
|
|
@@ -39,7 +95,8 @@ var remoteModel = /* @__PURE__ */ __name(({ model = DEFAULT_OPENAI_MODEL, baseUr
|
|
|
39
95
|
};
|
|
40
96
|
}, "remoteModel");
|
|
41
97
|
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
|
|
98
|
+
var openRemote = /* @__PURE__ */ __name((remote, apiKey, { concurrency = 4, fetch: post = fetch, tries = 5, env }) => {
|
|
99
|
+
refuseModelAddress(env ?? process.env, remote.baseUrl, "text to embed");
|
|
43
100
|
const request = /* @__PURE__ */ __name(async (input) => {
|
|
44
101
|
for (let attempt = 1; ; attempt++) {
|
|
45
102
|
let response;
|
|
@@ -112,6 +169,12 @@ var errorCode = /* @__PURE__ */ __name(async (response) => {
|
|
|
112
169
|
}, "errorCode");
|
|
113
170
|
|
|
114
171
|
export {
|
|
172
|
+
readLocalOnly,
|
|
173
|
+
localOnly,
|
|
174
|
+
writeLocalOnly,
|
|
175
|
+
localOnlyRefusal,
|
|
176
|
+
refuseOffComputer,
|
|
177
|
+
refuseModelAddress,
|
|
115
178
|
OPENAI_URL,
|
|
116
179
|
OPENAI_MODELS,
|
|
117
180
|
DEFAULT_OPENAI_MODEL,
|
|
@@ -5,9 +5,8 @@ import {
|
|
|
5
5
|
} from "./chunk-2ABQZVK4.js";
|
|
6
6
|
import {
|
|
7
7
|
commandPathOf,
|
|
8
|
-
findCommand,
|
|
9
8
|
outputOf
|
|
10
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-7OBSIDBJ.js";
|
|
11
10
|
import {
|
|
12
11
|
Command,
|
|
13
12
|
Help,
|
|
@@ -18,123 +17,18 @@ import {
|
|
|
18
17
|
environmentOf,
|
|
19
18
|
metaOf,
|
|
20
19
|
takesProfile
|
|
21
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-FHPEUAHQ.js";
|
|
22
21
|
import {
|
|
23
22
|
writes
|
|
24
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-XS5C5TQ7.js";
|
|
25
24
|
import {
|
|
26
25
|
CliError
|
|
27
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-7KCBPAQS.js";
|
|
28
27
|
import {
|
|
29
28
|
__name
|
|
30
29
|
} from "./chunk-ZVVMGPBJ.js";
|
|
31
30
|
|
|
32
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33
|
-
var SECTIONS = {
|
|
34
|
-
read: "Read",
|
|
35
|
-
write: "Write",
|
|
36
|
-
organise: "Organise",
|
|
37
|
-
automate: "Automate",
|
|
38
|
-
setup: "Set up",
|
|
39
|
-
other: "Other"
|
|
40
|
-
};
|
|
41
|
-
var sections = /* @__PURE__ */ new WeakMap();
|
|
42
|
-
var inSection = /* @__PURE__ */ __name((command, section) => {
|
|
43
|
-
sections.set(command, section);
|
|
44
|
-
return command;
|
|
45
|
-
}, "inSection");
|
|
46
|
-
var sectionOf = /* @__PURE__ */ __name((command) => {
|
|
47
|
-
for (let at = command; at; at = at.parent) {
|
|
48
|
-
const section = sections.get(at) ?? (at.parent && !at.parent.parent ? CORE_SECTIONS[at.name()] : void 0);
|
|
49
|
-
if (section)
|
|
50
|
-
return section;
|
|
51
|
-
}
|
|
52
|
-
return "other";
|
|
53
|
-
}, "sectionOf");
|
|
54
|
-
var CORE_SECTIONS = {
|
|
55
|
-
attachments: "read",
|
|
56
|
-
chats: "read",
|
|
57
|
-
contacts: "read",
|
|
58
|
-
conversations: "read",
|
|
59
|
-
images: "read",
|
|
60
|
-
inbox: "read",
|
|
61
|
-
meetings: "read",
|
|
62
|
-
mentions: "read",
|
|
63
|
-
messages: "read",
|
|
64
|
-
review: "read",
|
|
65
|
-
search: "read",
|
|
66
|
-
stats: "read",
|
|
67
|
-
topics: "read",
|
|
68
|
-
watch: "read",
|
|
69
|
-
flood: "write",
|
|
70
|
-
polls: "write",
|
|
71
|
-
reactions: "write",
|
|
72
|
-
recipients: "write",
|
|
73
|
-
sends: "write",
|
|
74
|
-
metadata: "organise",
|
|
75
|
-
searches: "organise",
|
|
76
|
-
tags: "organise",
|
|
77
|
-
tasks: "organise",
|
|
78
|
-
bot: "automate",
|
|
79
|
-
mcp: "automate",
|
|
80
|
-
replies: "automate",
|
|
81
|
-
runs: "automate",
|
|
82
|
-
schedule: "automate",
|
|
83
|
-
templates: "automate",
|
|
84
|
-
serve: "automate",
|
|
85
|
-
server: "automate",
|
|
86
|
-
account: "setup",
|
|
87
|
-
commands: "setup",
|
|
88
|
-
complete: "setup",
|
|
89
|
-
config: "setup",
|
|
90
|
-
doctor: "setup",
|
|
91
|
-
guide: "setup",
|
|
92
|
-
models: "setup",
|
|
93
|
-
skill: "setup",
|
|
94
|
-
store: "setup",
|
|
95
|
-
upgrade: "setup"
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.633.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._d745f308dd36458ab3f46a9ad7a22686/node_modules/@wirecat/cli-core/dist/cli/help/commands-text.js
|
|
99
|
-
var DESCRIPTION = 90;
|
|
100
|
-
var COLUMN = 52;
|
|
101
|
-
var short = /* @__PURE__ */ __name((text) => {
|
|
102
|
-
const line = text.replace(/\s+/g, " ").trim();
|
|
103
|
-
if (line.length <= DESCRIPTION)
|
|
104
|
-
return line;
|
|
105
|
-
const cut = line.slice(0, DESCRIPTION);
|
|
106
|
-
return `${cut.slice(0, Math.max(cut.lastIndexOf(" "), DESCRIPTION / 2))}\u2026`;
|
|
107
|
-
}, "short");
|
|
108
|
-
var commandsText = /* @__PURE__ */ __name((root, commands, scope) => {
|
|
109
|
-
const cli = root.name();
|
|
110
|
-
const runs = /* @__PURE__ */ __name((info) => [
|
|
111
|
-
...info.commands.length === 0 || info.runnable ? [info] : [],
|
|
112
|
-
...info.commands.flatMap(runs)
|
|
113
|
-
], "runs");
|
|
114
|
-
const bySection = new Map(Object.keys(SECTIONS).map((key) => [key, []]));
|
|
115
|
-
for (const info of commands.flatMap(runs))
|
|
116
|
-
bySection.get(sectionOf(findCommand(root, info.path)))?.push(info);
|
|
117
|
-
const where = scope ? `${cli} ${scope.join(" ")}` : cli;
|
|
118
|
-
const lines = [
|
|
119
|
-
`${where} commands, by section. One command's arguments and options: ${cli} <command> --help.`,
|
|
120
|
-
`As JSON: ${cli} commands${scope ? ` ${scope.join(" ")}` : ""} --json. (writes) marks a command that changes something.`
|
|
121
|
-
];
|
|
122
|
-
for (const [section, infos] of bySection) {
|
|
123
|
-
if (infos.length === 0)
|
|
124
|
-
continue;
|
|
125
|
-
lines.push("", SECTIONS[section]);
|
|
126
|
-
for (const { usage, summary, description, effects, availability } of infos) {
|
|
127
|
-
const what = short(summary ?? description);
|
|
128
|
-
const mark = effects === void 0 || writes(effects) ? " (writes)" : "";
|
|
129
|
-
const access = availability?.available === false ? ` [unavailable: ${availability.reason}]` : "";
|
|
130
|
-
lines.push(` ${usage.padEnd(COLUMN)} ${what}${mark}${access}`.trimEnd());
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
return `${lines.join("\n")}
|
|
134
|
-
`;
|
|
135
|
-
}, "commandsText");
|
|
136
|
-
|
|
137
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.633.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._d745f308dd36458ab3f46a9ad7a22686/node_modules/@wirecat/cli-core/dist/cli/help/command-help.js
|
|
31
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.650.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._f55ccfac747d9da64edfb69ea8dcc45a/node_modules/@wirecat/cli-core/dist/cli/help/command-help.js
|
|
138
32
|
var ARGUMENT_KINDS = {
|
|
139
33
|
chat: "chat",
|
|
140
34
|
chats: "chat",
|
|
@@ -208,7 +102,8 @@ var SAMPLES = {
|
|
|
208
102
|
var MAX_NEXT = 3;
|
|
209
103
|
var choices = /* @__PURE__ */ new WeakMap();
|
|
210
104
|
var kindOfArgument = /* @__PURE__ */ __name((argument) => ARGUMENT_KINDS[argument.name()], "kindOfArgument");
|
|
211
|
-
var
|
|
105
|
+
var runs = /* @__PURE__ */ __name((command) => command.commands.length === 0 || Boolean(command._actionHandler), "runs");
|
|
106
|
+
var leaves = /* @__PURE__ */ __name((command) => command.commands.filter((child) => !child._hidden).flatMap((child) => [...runs(child) ? [child] : [], ...leaves(child)]), "leaves");
|
|
212
107
|
var rootOf = /* @__PURE__ */ __name((command) => {
|
|
213
108
|
let at = command;
|
|
214
109
|
while (at.parent)
|
|
@@ -231,7 +126,7 @@ var returnsOf = /* @__PURE__ */ __name((command) => {
|
|
|
231
126
|
const output = metaOf(command).output;
|
|
232
127
|
const { item, coverage } = outputOf(command);
|
|
233
128
|
if (!output || coverage !== "declared-entity")
|
|
234
|
-
return
|
|
129
|
+
return "";
|
|
235
130
|
const fields = [...new Set(fieldsOf(item))];
|
|
236
131
|
const noun = (output.view ? `${output.entity} ${output.view}` : output.entity).replaceAll("_", " ");
|
|
237
132
|
const more = fields.length > 8 ? `, and ${fields.length - 8} more` : "";
|
|
@@ -313,7 +208,7 @@ var commandHelpText = /* @__PURE__ */ __name((command) => {
|
|
|
313
208
|
return [
|
|
314
209
|
"",
|
|
315
210
|
...access,
|
|
316
|
-
...rows("Returns:", [returns]),
|
|
211
|
+
...rows("Returns:", returns ? [returns] : []),
|
|
317
212
|
...rows("Next usually:", next),
|
|
318
213
|
...rows("Example:", examples),
|
|
319
214
|
""
|
|
@@ -326,7 +221,7 @@ var installCommandHelp = /* @__PURE__ */ __name((program, { profile = true } = {
|
|
|
326
221
|
command.addHelpText("after", () => commandHelpText(command));
|
|
327
222
|
}, "installCommandHelp");
|
|
328
223
|
|
|
329
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
224
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.650.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._f55ccfac747d9da64edfb69ea8dcc45a/node_modules/@wirecat/cli-core/dist/cli/help/first-screen.js
|
|
330
225
|
var WIRECAT_TOOLS = [
|
|
331
226
|
{
|
|
332
227
|
command: "tg",
|
|
@@ -368,6 +263,11 @@ var WIRECAT_TOOLS = [
|
|
|
368
263
|
command: "mail",
|
|
369
264
|
package: "@wirecat/mail-cli",
|
|
370
265
|
does: "IMAP mail in the same local store: search your mailbox offline, next to your other WireCat data"
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
command: "b24",
|
|
269
|
+
package: "@wirecat/bitrix24-cli",
|
|
270
|
+
does: "Bitrix24 CRM: deals, leads and pipelines, searchable with your other WireCat data"
|
|
371
271
|
}
|
|
372
272
|
];
|
|
373
273
|
var WIDTH = 100;
|
|
@@ -459,8 +359,6 @@ var installHelp = /* @__PURE__ */ __name((program, screen = {}) => {
|
|
|
459
359
|
}, "installHelp");
|
|
460
360
|
|
|
461
361
|
export {
|
|
462
|
-
inSection,
|
|
463
|
-
commandsText,
|
|
464
362
|
WIRECAT_TOOLS,
|
|
465
363
|
firstScreen,
|
|
466
364
|
installHelp
|
|
@@ -2,12 +2,12 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
singleLine
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-7KCBPAQS.js";
|
|
6
6
|
import {
|
|
7
7
|
__name
|
|
8
8
|
} from "./chunk-ZVVMGPBJ.js";
|
|
9
9
|
|
|
10
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
10
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/names.js
|
|
11
11
|
var FIRST_PARTY_TOOLS = [
|
|
12
12
|
{ name: "tg", package: "@wirecat/tg-cli" },
|
|
13
13
|
{ name: "max", package: "@wirecat/max-cli" },
|
|
@@ -31,7 +31,7 @@ var DESCRIBE_FLAG = "--wcat-describe";
|
|
|
31
31
|
var DESCRIBE_MAX_BYTES = 64 * 1024;
|
|
32
32
|
var DISPATCH_FLAG = "--wcat-dispatch";
|
|
33
33
|
|
|
34
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
34
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/describe.js
|
|
35
35
|
var DESCRIBE_FORMAT = 1;
|
|
36
36
|
var DESCRIBE_MANIFEST_FORMAT = 2;
|
|
37
37
|
var describeAnswer = /* @__PURE__ */ __name((tool, manifest) => {
|
|
@@ -74,7 +74,7 @@ var parseDescribe = /* @__PURE__ */ __name((text) => {
|
|
|
74
74
|
};
|
|
75
75
|
}, "parseDescribe");
|
|
76
76
|
|
|
77
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
77
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/shim.js
|
|
78
78
|
import { lstatSync, readFileSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
79
79
|
import { join } from "node:path";
|
|
80
80
|
var SHIM_FORMAT = 2;
|
|
@@ -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_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._f55ccfac747d9da64edfb69ea8dcc45a/node_modules/@wirecat/cli-core/dist/http/listen.js
|
|
8
8
|
import { createServer } from "node:http";
|
|
9
9
|
import { Readable } from "node:stream";
|
|
10
10
|
var MAX_BODY = 4 * 1024 * 1024;
|