@wirecat/tg-cli 0.112.0 → 0.113.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/tg.js +2 -2
- package/dist/bundle/{adapter-ILDV2YSZ.js → adapter-EQKEFGPB.js} +45 -45
- package/dist/bundle/{all-profiles-4SH2Q4WV.js → all-profiles-TTBFF663.js} +8 -8
- package/dist/bundle/{anthropic-64SM23YO.js → anthropic-XPZS7267.js} +5 -5
- package/dist/bundle/{app-server-SSYZWCDJ.js → app-server-ZSZ7KRAY.js} +42 -42
- package/dist/bundle/{bot-api-OHAGQMES.js → bot-api-X7BOVNIO.js} +46 -46
- package/dist/bundle/{bot-history-AUFO7UL2.js → bot-history-DWIUIPN5.js} +15 -15
- package/dist/bundle/{bun-AHZX63TR.js → bun-ZGZVAJU2.js} +2 -2
- package/dist/bundle/{bun-sqlite-KBIIODPV.js → bun-sqlite-UN2UJ6SI.js} +4 -4
- package/dist/bundle/{chunk-DFUTZGEV.js → chunk-3MAYYFKY.js} +1 -1
- package/dist/bundle/{chunk-B3Y2KZRS.js → chunk-452UZ2PU.js} +110 -95
- package/dist/bundle/{chunk-SC2DUQAK.js → chunk-4GLMEES6.js} +1 -1
- package/dist/bundle/{chunk-BTAET4U3.js → chunk-4SQB5VKL.js} +1 -1
- package/dist/bundle/{chunk-GM44UNGL.js → chunk-5NF7M4MN.js} +1 -1
- package/dist/bundle/{chunk-JXTYTAWE.js → chunk-6F6K3LWV.js} +11 -11
- package/dist/bundle/{chunk-XSYJKEA5.js → chunk-6OKGHHRL.js} +4 -4
- package/dist/bundle/{chunk-DNYGJAEP.js → chunk-6WJ5M2Q4.js} +4 -4
- package/dist/bundle/{chunk-NQKPXVLX.js → chunk-7IWDS2CM.js} +2 -2
- package/dist/bundle/{chunk-3AJO4GER.js → chunk-AGUCXSSM.js} +5 -5
- package/dist/bundle/{chunk-E4EJ2UTT.js → chunk-AVUIWZTP.js} +2 -2
- package/dist/bundle/{chunk-JIGYVVWA.js → chunk-BI5YJZJB.js} +31 -27
- package/dist/bundle/{chunk-MCXVGHL6.js → chunk-EGR5IJCG.js} +32 -25
- package/dist/bundle/{chunk-K7VOCHVS.js → chunk-ENXO43TV.js} +6 -6
- package/dist/bundle/{chunk-D5JP2YWG.js → chunk-G74QMORP.js} +2 -2
- package/dist/bundle/{chunk-4JXZKMXV.js → chunk-GX4LRLVD.js} +68 -59
- package/dist/bundle/{chunk-EO7PQE3J.js → chunk-HNN7EKIM.js} +90 -73
- package/dist/bundle/{chunk-UXCWUEN7.js → chunk-HO53POQG.js} +5 -5
- package/dist/bundle/{chunk-2IGZLBTE.js → chunk-IDUYRTPF.js} +2 -2
- package/dist/bundle/{chunk-JPRYFDOJ.js → chunk-IYKRHDX6.js} +44 -44
- package/dist/bundle/{chunk-BIERCQVG.js → chunk-J6USEBA6.js} +313 -258
- package/dist/bundle/{chunk-KYYAHIG2.js → chunk-JDQSX2JQ.js} +416 -337
- package/dist/bundle/{chunk-EPAOLRUL.js → chunk-JO45BOYE.js} +2 -2
- package/dist/bundle/{chunk-SFJFBIYP.js → chunk-JRTZ5I6M.js} +2 -2
- package/dist/bundle/{chunk-6KGENDPF.js → chunk-JW7BMJ6O.js} +2 -2
- package/dist/bundle/{chunk-5BNYW5RA.js → chunk-K3F46QVN.js} +2 -2
- package/dist/bundle/{chunk-JYOQMYNJ.js → chunk-KK3JVOOV.js} +30 -30
- package/dist/bundle/{chunk-GW7JRFTF.js → chunk-KOWQVHXI.js} +3 -3
- package/dist/bundle/{chunk-KLNQXUDX.js → chunk-KQ23JWLJ.js} +20 -18
- package/dist/bundle/{chunk-UVRD447S.js → chunk-KVLCIZUK.js} +3 -3
- package/dist/bundle/{chunk-UQOSZ2XX.js → chunk-MTX5EDYJ.js} +636 -473
- package/dist/bundle/{chunk-RANORATG.js → chunk-OC4RRFKH.js} +4 -4
- package/dist/bundle/{chunk-3GL4AOOG.js → chunk-OQR442B6.js} +1 -1
- package/dist/bundle/{chunk-3W7BU2BL.js → chunk-OSBAISA5.js} +6 -6
- package/dist/bundle/{chunk-COTC7HF3.js → chunk-OYNSFQ7K.js} +1 -1
- package/dist/bundle/{chunk-QL4WBCL5.js → chunk-PCRLXJRH.js} +11 -7
- package/dist/bundle/{chunk-PXUHQO66.js → chunk-PHPNA2HU.js} +11 -11
- package/dist/bundle/{chunk-RHYMEHYK.js → chunk-PHYDBR5M.js} +2 -2
- package/dist/bundle/{chunk-NKACHGB2.js → chunk-Q264PYGE.js} +40 -14
- package/dist/bundle/{chunk-ICEJKOKO.js → chunk-T4TTRFP5.js} +7 -7
- package/dist/bundle/{chunk-JLB5LEXJ.js → chunk-T5RM4Y35.js} +3 -3
- package/dist/bundle/{chunk-TOBJGMMA.js → chunk-TQ6EA7TB.js} +11 -11
- package/dist/bundle/{chunk-RPNRCFEE.js → chunk-TUD4MU7S.js} +2 -2
- package/dist/bundle/{chunk-TUJEJ4D5.js → chunk-U3MJQLZQ.js} +13 -13
- package/dist/bundle/{chunk-4IDJ7QCG.js → chunk-UE75KPAC.js} +4 -4
- package/dist/bundle/{chunk-7MFJFVUN.js → chunk-UIVLDKWT.js} +1 -1
- package/dist/bundle/{chunk-WI2S6INJ.js → chunk-VDATXIO4.js} +6 -6
- package/dist/bundle/{chunk-WWKXTKCE.js → chunk-VDEXNNMH.js} +4 -4
- package/dist/bundle/{chunk-5W72OARG.js → chunk-VVA4555T.js} +8 -8
- package/dist/bundle/{chunk-QMJGHSGN.js → chunk-WSAHUQ6K.js} +3 -3
- package/dist/bundle/{chunk-KGYPSBTI.js → chunk-XXNJF3ZM.js} +32 -26
- package/dist/bundle/{chunk-GSGS62LX.js → chunk-XZ2ZHIAO.js} +1 -1
- package/dist/bundle/{chunk-RC7EBLHM.js → chunk-Z6TRIW2O.js} +8 -8
- package/dist/bundle/{chunk-PDVSMGWO.js → chunk-ZID2Y4XU.js} +2 -2
- package/dist/bundle/command-contract-GV67H22L.js +32 -0
- package/dist/bundle/{decode-FR3QHHJI.js → decode-AMQVTEMW.js} +4 -4
- package/dist/bundle/{echarts-VTV4C2OS.js → echarts-ECYONFQJ.js} +2 -2
- package/dist/bundle/{embed-US7X5P5D.js → embed-VZYBZEWI.js} +5 -5
- package/dist/bundle/{embedder-63Z7ZBYG.js → embedder-GSWBGHRK.js} +8 -8
- package/dist/bundle/{entry-B4J7IAG3.js → entry-LALZILY4.js} +5 -5
- package/dist/bundle/{first-run-MXPPUGII.js → first-run-LEAI623Q.js} +9 -9
- package/dist/bundle/first-screen-MOCVLE23.js +30 -0
- package/dist/bundle/{identity-AQWKU7SM.js → identity-54HA5GN6.js} +3 -3
- package/dist/bundle/{instructions-GBR6DJTK.js → instructions-AXLQQS3G.js} +1 -1
- package/dist/bundle/{mcp-YJEQYYTR.js → mcp-VVMPUDSL.js} +2 -2
- package/dist/bundle/{node-QXGPMDH2.js → node-7JHC5K77.js} +2 -2
- package/dist/bundle/{node-sqlite-L6CAMXQ2.js → node-sqlite-LYJEK46T.js} +4 -4
- package/dist/bundle/{oauth-5RK6J4SG.js → oauth-BROPKI3K.js} +6 -6
- package/dist/bundle/{open-A3IAG7U6.js → open-C6XQ46JK.js} +3 -3
- package/dist/bundle/{openai-YKNGCHVV.js → openai-VWSU7ZDD.js} +13 -13
- package/dist/bundle/{process-CGLNXFIU.js → process-QKEFL5HL.js} +1 -1
- package/dist/bundle/{program-AEDR6R5P.js → program-ACY7O33O.js} +48 -48
- package/dist/bundle/{prompt-65CSCL2T.js → prompt-EGULVW2F.js} +4 -4
- package/dist/bundle/{proxy-transport-U3QOYMQF.js → proxy-transport-KIMADLQ2.js} +4 -4
- package/dist/bundle/{recognize-ECRO6CFK.js → recognize-UMTKLWVR.js} +3 -3
- package/dist/bundle/{remote-6IEFZFGO.js → remote-DABI7PSQ.js} +6 -6
- package/dist/bundle/{rerank-23GXWT2V.js → rerank-ZFATWWBE.js} +6 -6
- package/dist/bundle/{serve-S65YTPZN.js → serve-B7YYCMGN.js} +8 -8
- package/dist/bundle/{server-MVTBK7GV.js → server-DGKZISZH.js} +32 -32
- package/dist/bundle/server-UC7UWUIS.js +56 -0
- package/dist/bundle/{state-TH3UVQAW.js → state-AQ2PABA5.js} +5 -5
- package/dist/bundle/{store-2WFTUSNG.js → store-46GJTFLJ.js} +10 -10
- package/dist/bundle/store-maintenance-command-FCFKHGRM.js +45 -0
- package/dist/bundle/tg.js +4 -4
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/dist/bundle/command-contract-4KVJJZ46.js +0 -32
- package/dist/bundle/first-screen-GFYHUBBD.js +0 -30
- package/dist/bundle/server-IH24WEAC.js +0 -56
- package/dist/bundle/store-maintenance-command-PUOU2CL6.js +0 -45
- /package/dist/bundle/{chunk-WJWLHLQ7.js → chunk-HPXYN7F3.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-core@0.
|
|
7
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/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.",
|
|
@@ -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.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/mcp/instructions.js
|
|
8
8
|
var instructions = /* @__PURE__ */ __name(({ command, name, profile, writes, skill }) => {
|
|
9
9
|
const all = typeof profile !== "string";
|
|
10
10
|
const offers = /* @__PURE__ */ __name((key) => all || writes.includes(key), "offers");
|
|
@@ -13,40 +13,40 @@ import {
|
|
|
13
13
|
privateFiles,
|
|
14
14
|
providerRequest,
|
|
15
15
|
withSqliteSidecars
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-MTX5EDYJ.js";
|
|
17
17
|
import {
|
|
18
18
|
parseProxy,
|
|
19
19
|
proxyAddress,
|
|
20
20
|
proxyError,
|
|
21
21
|
proxyLabel,
|
|
22
22
|
proxySetting
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-4GLMEES6.js";
|
|
24
24
|
import {
|
|
25
25
|
messengerContext
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-BI5YJZJB.js";
|
|
27
27
|
import {
|
|
28
28
|
uploadBlob
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-JDQSX2JQ.js";
|
|
30
30
|
import {
|
|
31
31
|
asFirstWord,
|
|
32
32
|
currentAttempt,
|
|
33
33
|
environmentOf,
|
|
34
34
|
fromFile,
|
|
35
35
|
settingsFor
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-GX4LRLVD.js";
|
|
37
37
|
import {
|
|
38
38
|
TG
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-JO45BOYE.js";
|
|
40
40
|
import {
|
|
41
41
|
Credentials,
|
|
42
42
|
pathsAreOverridden,
|
|
43
43
|
resolvePaths
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-KQ23JWLJ.js";
|
|
45
45
|
import {
|
|
46
46
|
CliError,
|
|
47
47
|
isCliError,
|
|
48
48
|
optional
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-PCRLXJRH.js";
|
|
50
50
|
import {
|
|
51
51
|
importFrom
|
|
52
52
|
} from "./chunk-Y5E2WNWB.js";
|
|
@@ -178,7 +178,7 @@ var telegramOf = /* @__PURE__ */ __name((command, base) => {
|
|
|
178
178
|
throw new CliError(unreachable, loggedIn ? `no Telegram app credentials found for profile "${profile}", although it has logged in on this machine \u2014 the keyring is probably out of reach (cron, ssh, an MCP client that trims the environment: set XDG_RUNTIME_DIR); \`tg ${asFirstWord(profile)}doctor\` shows it. Log in again only if they were removed` : `no Telegram app credentials for profile "${profile}" \u2014 run ${setup} in a local terminal first, or sign in from ${desktop}; agents: read \`tg skill show\``);
|
|
179
179
|
}
|
|
180
180
|
const options = { credentials: resolved, sessionPath, ...connecting };
|
|
181
|
-
return environment.adapter ? await environment.adapter(options) : await (await import("./adapter-
|
|
181
|
+
return environment.adapter ? await environment.adapter(options) : await (await import("./adapter-EQKEFGPB.js")).TelegramAdapter.open({
|
|
182
182
|
...options,
|
|
183
183
|
...proxyOption(proxy()),
|
|
184
184
|
diagnostic: /* @__PURE__ */ __name((line) => base.streams.diagnostic(line), "diagnostic"),
|
|
@@ -864,7 +864,7 @@ var TELEGRAM_BOT = {
|
|
|
864
864
|
const botId = token.split(":", 1)[0] ?? "";
|
|
865
865
|
if (!/^\d+$/.test(botId))
|
|
866
866
|
throw new CliError("authentication_error", "the bot token has no valid bot id");
|
|
867
|
-
const reader = await (environment.botHistory ?? (await import("./bot-history-
|
|
867
|
+
const reader = await (environment.botHistory ?? (await import("./bot-history-DWIUIPN5.js")).openBotHistory)({
|
|
868
868
|
credentials,
|
|
869
869
|
sessionPath: botSessionFile(profile, botId, env),
|
|
870
870
|
token,
|
|
@@ -884,7 +884,7 @@ var TELEGRAM_BOT = {
|
|
|
884
884
|
return void 0;
|
|
885
885
|
let personal;
|
|
886
886
|
try {
|
|
887
|
-
personal = environment.adapter ? await environment.adapter({ credentials, sessionPath: personalPath }) : await (await import("./adapter-
|
|
887
|
+
personal = environment.adapter ? await environment.adapter({ credentials, sessionPath: personalPath }) : await (await import("./adapter-EQKEFGPB.js")).TelegramAdapter.open({
|
|
888
888
|
credentials,
|
|
889
889
|
sessionPath: personalPath,
|
|
890
890
|
checks: words,
|
|
@@ -18,9 +18,9 @@ import {
|
|
|
18
18
|
strictObject,
|
|
19
19
|
string,
|
|
20
20
|
unknown
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-PCRLXJRH.js";
|
|
22
22
|
|
|
23
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/entities/fields.js
|
|
24
24
|
var text = string();
|
|
25
25
|
var id = pipe(string(), minLength(1));
|
|
26
26
|
var time = isoTime;
|
|
@@ -44,7 +44,7 @@ var author = strictObject({
|
|
|
44
44
|
name: nullable(text)
|
|
45
45
|
});
|
|
46
46
|
|
|
47
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/entities/note.js
|
|
48
48
|
var link = {
|
|
49
49
|
target_text: nullable(text),
|
|
50
50
|
kind: text,
|
|
@@ -85,7 +85,7 @@ var note = strictObject({
|
|
|
85
85
|
backlinks: optional(array(strictObject({ from: reference, ...link })))
|
|
86
86
|
});
|
|
87
87
|
|
|
88
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
88
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/entities/knowledge-lists.js
|
|
89
89
|
var organization = strictObject({
|
|
90
90
|
id,
|
|
91
91
|
ref: reference,
|
|
@@ -4,15 +4,15 @@ import {
|
|
|
4
4
|
organization,
|
|
5
5
|
project,
|
|
6
6
|
reminder
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-6OKGHHRL.js";
|
|
8
8
|
import {
|
|
9
9
|
queryFieldsOf
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-HNN7EKIM.js";
|
|
11
11
|
|
|
12
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/snapshot.js
|
|
13
13
|
var MAX_BYTES = 16 * 1024 * 1024;
|
|
14
14
|
|
|
15
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/knowledge-query.js
|
|
16
16
|
var ORGANIZATIONS_QUERY = {
|
|
17
17
|
entity: "organization",
|
|
18
18
|
backend: "sql",
|
|
@@ -2,7 +2,7 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
CliError
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-PCRLXJRH.js";
|
|
6
6
|
import {
|
|
7
7
|
importFrom
|
|
8
8
|
} from "./chunk-Y5E2WNWB.js";
|
|
@@ -10,7 +10,7 @@ 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.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/store/vector-extension.js
|
|
14
14
|
import { readFileSync } from "node:fs";
|
|
15
15
|
var musl = /* @__PURE__ */ __name(() => {
|
|
16
16
|
if (process.platform !== "linux")
|
|
@@ -4,23 +4,23 @@ import {
|
|
|
4
4
|
executableEnvironment,
|
|
5
5
|
executableOnPath,
|
|
6
6
|
require_cross_spawn
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-OYNSFQ7K.js";
|
|
8
8
|
import {
|
|
9
9
|
loadConfigFile,
|
|
10
10
|
saveConfigFile
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-KQ23JWLJ.js";
|
|
12
12
|
import {
|
|
13
13
|
number,
|
|
14
14
|
object,
|
|
15
15
|
optional,
|
|
16
16
|
string
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-PCRLXJRH.js";
|
|
18
18
|
import {
|
|
19
19
|
__name,
|
|
20
20
|
__toESM
|
|
21
21
|
} from "./chunk-ZVVMGPBJ.js";
|
|
22
22
|
|
|
23
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
23
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.73.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/installer.js
|
|
24
24
|
var installerOf = /* @__PURE__ */ __name((scriptPath) => {
|
|
25
25
|
const path = scriptPath.replaceAll("\\", "/");
|
|
26
26
|
if (path.includes("/_npx/"))
|
|
@@ -34,7 +34,7 @@ var installerOf = /* @__PURE__ */ __name((scriptPath) => {
|
|
|
34
34
|
return path.includes("/dist/") ? "checkout" : "unknown";
|
|
35
35
|
}, "installerOf");
|
|
36
36
|
|
|
37
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
37
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.73.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/update/index.js
|
|
38
38
|
var import_cross_spawn = __toESM(require_cross_spawn(), 1);
|
|
39
39
|
import { existsSync } from "node:fs";
|
|
40
40
|
var updateCommand = /* @__PURE__ */ __name((installer, packageName) => {
|
|
@@ -2,12 +2,12 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
CliError
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-PCRLXJRH.js";
|
|
6
6
|
import {
|
|
7
7
|
__name
|
|
8
8
|
} from "./chunk-ZVVMGPBJ.js";
|
|
9
9
|
|
|
10
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/cli/input-policy.js
|
|
11
11
|
var MAX_BUFFERED_INPUT = 16 * 1024 * 1024;
|
|
12
12
|
var MAX_SECRET_INPUT = 64 * 1024;
|
|
13
13
|
var policies = /* @__PURE__ */ new WeakMap();
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
refuseLacking,
|
|
11
11
|
servicesFor,
|
|
12
12
|
throughWrapper
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-JDQSX2JQ.js";
|
|
14
14
|
import {
|
|
15
15
|
CEILING_KEY,
|
|
16
16
|
LOG_ATTRIBUTES,
|
|
@@ -34,35 +34,35 @@ import {
|
|
|
34
34
|
rememberAccount,
|
|
35
35
|
rootOf2 as rootOf,
|
|
36
36
|
skipFlagFor
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-GX4LRLVD.js";
|
|
38
38
|
import {
|
|
39
39
|
isCliFailure,
|
|
40
40
|
providerErrorKey
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-Z6TRIW2O.js";
|
|
42
42
|
import {
|
|
43
43
|
MESSENGER_CHANGE_REFUSAL,
|
|
44
44
|
readOnlyRefusal
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-IDUYRTPF.js";
|
|
46
46
|
import {
|
|
47
47
|
servingProfiles
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-KOWQVHXI.js";
|
|
49
49
|
import {
|
|
50
50
|
openStore
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-J6USEBA6.js";
|
|
52
52
|
import {
|
|
53
53
|
logRecordOf,
|
|
54
54
|
realSleep,
|
|
55
55
|
resolvePaths,
|
|
56
56
|
writeSecurely
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-KQ23JWLJ.js";
|
|
58
58
|
import {
|
|
59
59
|
CliError
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-PCRLXJRH.js";
|
|
61
61
|
import {
|
|
62
62
|
__name
|
|
63
63
|
} from "./chunk-ZVVMGPBJ.js";
|
|
64
64
|
|
|
65
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
65
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/cli/messenger/ask.js
|
|
66
66
|
import { openSync } from "node:fs";
|
|
67
67
|
import { createInterface } from "node:readline";
|
|
68
68
|
import { ReadStream } from "node:tty";
|
|
@@ -117,10 +117,10 @@ var terminalAsker = /* @__PURE__ */ __name((command) => async (key, request) =>
|
|
|
117
117
|
throw new CliError("cancelled", `${key}: not done \u2014 the answer was no`);
|
|
118
118
|
}, "terminalAsker");
|
|
119
119
|
|
|
120
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
120
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/sends/guard.js
|
|
121
121
|
import { randomUUID } from "node:crypto";
|
|
122
122
|
|
|
123
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
123
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/sends/flood.js
|
|
124
124
|
import { mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
125
125
|
import { dirname, join } from "node:path";
|
|
126
126
|
var MOST_DEADLINES = 50;
|
|
@@ -204,11 +204,11 @@ var FloodMemory = class {
|
|
|
204
204
|
}
|
|
205
205
|
};
|
|
206
206
|
|
|
207
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
207
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/sends/journal.js
|
|
208
208
|
import { appendFileSync, mkdirSync as mkdirSync3, readFileSync as readFileSync2 } from "node:fs";
|
|
209
209
|
import { dirname as dirname3, join as join2 } from "node:path";
|
|
210
210
|
|
|
211
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
211
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/sends/file-lock.js
|
|
212
212
|
import { closeSync, mkdirSync as mkdirSync2, openSync as openSync2, statSync, unlinkSync } from "node:fs";
|
|
213
213
|
import { dirname as dirname2 } from "node:path";
|
|
214
214
|
var LOCK_WAIT_MS = 5e3;
|
|
@@ -275,7 +275,7 @@ var lockTime = /* @__PURE__ */ __name((lock) => {
|
|
|
275
275
|
}
|
|
276
276
|
}, "lockTime");
|
|
277
277
|
|
|
278
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
278
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/sends/journal.js
|
|
279
279
|
var sendsPathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join2(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "sends", `${profile}.jsonl`), "sendsPathFor");
|
|
280
280
|
var SendJournal = class {
|
|
281
281
|
static {
|
|
@@ -352,7 +352,7 @@ var withSendId = /* @__PURE__ */ __name((entry) => {
|
|
|
352
352
|
return cid === void 0 || rest.sendId !== void 0 ? rest : { ...rest, sendId: String(cid) };
|
|
353
353
|
}, "withSendId");
|
|
354
354
|
|
|
355
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
355
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/sends/recipients.js
|
|
356
356
|
import { existsSync, readFileSync as readFileSync3, rmSync } from "node:fs";
|
|
357
357
|
import { join as join3 } from "node:path";
|
|
358
358
|
var recipientsPathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join3(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "profiles", `${profile}.recipients.json`), "recipientsPathFor");
|
|
@@ -464,7 +464,7 @@ var RecipientList = class {
|
|
|
464
464
|
}
|
|
465
465
|
};
|
|
466
466
|
|
|
467
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
467
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/sends/guard.js
|
|
468
468
|
var HOUR_MS = 60 * 60 * 1e3;
|
|
469
469
|
var READS_UNDER_HOLD = /* @__PURE__ */ new Set([
|
|
470
470
|
"attachments.extract",
|
|
@@ -657,7 +657,7 @@ var guardFor = /* @__PURE__ */ __name((app, settings, warn, env = process.env, a
|
|
|
657
657
|
}), "guardFor");
|
|
658
658
|
var journalFailure = /* @__PURE__ */ __name((error) => error?.code ?? (error instanceof Error ? error.name : "error"), "journalFailure");
|
|
659
659
|
|
|
660
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
660
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/sends/pace.js
|
|
661
661
|
import { readFileSync as readFileSync4, renameSync as renameSync2, writeFileSync as writeFileSync2 } from "node:fs";
|
|
662
662
|
import { join as join4 } from "node:path";
|
|
663
663
|
var DEFAULT_PACE = { perMinute: 60, burst: 20 };
|
|
@@ -716,7 +716,7 @@ var Pacer = class {
|
|
|
716
716
|
}
|
|
717
717
|
};
|
|
718
718
|
|
|
719
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
719
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/cli/permission-keys.js
|
|
720
720
|
var pathOf = /* @__PURE__ */ __name((command) => {
|
|
721
721
|
const words = [];
|
|
722
722
|
for (let at = command; at?.parent; at = at.parent)
|
|
@@ -776,7 +776,7 @@ var refuseUnknownPermissionKeys = /* @__PURE__ */ __name((command, settings, too
|
|
|
776
776
|
throw new CliError("validation_error", `--permission ${key} names no command`, { permission: key });
|
|
777
777
|
}, "refuseUnknownPermissionKeys");
|
|
778
778
|
|
|
779
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
779
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/cli/messenger/flooded.js
|
|
780
780
|
var LONG_LIVED = /* @__PURE__ */ new Set(["self", "newSendId", "close", "formatMarkdown", "formatHtml", "storedChats"]);
|
|
781
781
|
var LISTENING = /* @__PURE__ */ new Set(["watch", "feed", "listen", "listenHistory"]);
|
|
782
782
|
var BLOCKING = /* @__PURE__ */ new Set(["frozen", "limited", "banned"]);
|
|
@@ -895,7 +895,7 @@ var flooded = /* @__PURE__ */ __name((messenger, memory, { name, warn, pacer })
|
|
|
895
895
|
});
|
|
896
896
|
}, "flooded");
|
|
897
897
|
|
|
898
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
898
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/cli/messenger/observed.js
|
|
899
899
|
var observed = /* @__PURE__ */ __name((messenger, events) => {
|
|
900
900
|
const timed = /* @__PURE__ */ __name(async (operation, named, work, after) => {
|
|
901
901
|
const write = currentOperation();
|
|
@@ -933,7 +933,7 @@ var observed = /* @__PURE__ */ __name((messenger, events) => {
|
|
|
933
933
|
const counts = {};
|
|
934
934
|
await timed(operation, {}, () => work((item) => {
|
|
935
935
|
count(item, counts);
|
|
936
|
-
onItem(item);
|
|
936
|
+
return onItem(item);
|
|
937
937
|
}), () => ({ counts }));
|
|
938
938
|
}, "counted");
|
|
939
939
|
const mint = messenger.newSendId;
|
|
@@ -994,7 +994,7 @@ var byPart = /* @__PURE__ */ __name((batch, counts) => {
|
|
|
994
994
|
counts[part] = (counts[part] ?? 0) + items.length;
|
|
995
995
|
}, "byPart");
|
|
996
996
|
|
|
997
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
997
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/cli/messenger/stored.js
|
|
998
998
|
var REKEY_PACING = { lockMs: 50, pauseMs: 25 };
|
|
999
999
|
var stored = /* @__PURE__ */ __name((messenger, { account, store, warn, events, pending, announcing, deletedWithoutChat, profile, rekeyed, rekeyPacing = REKEY_PACING, closing, namesFromStore, recipientIds, countsUnread = false }) => {
|
|
1000
1000
|
let warned = false;
|
|
@@ -1009,15 +1009,18 @@ var stored = /* @__PURE__ */ __name((messenger, { account, store, warn, events,
|
|
|
1009
1009
|
const attempt = /* @__PURE__ */ __name(async (operation, write) => {
|
|
1010
1010
|
try {
|
|
1011
1011
|
const opened = await store();
|
|
1012
|
-
if (opened)
|
|
1013
|
-
|
|
1012
|
+
if (!opened)
|
|
1013
|
+
return false;
|
|
1014
|
+
await write(opened);
|
|
1014
1015
|
if (opened && !recorded && profile) {
|
|
1015
1016
|
recorded = true;
|
|
1016
1017
|
await Promise.resolve().then(() => opened.accounts.saveProfile(profile.app, profile.name, account)).catch(() => {
|
|
1017
1018
|
});
|
|
1018
1019
|
}
|
|
1020
|
+
return true;
|
|
1019
1021
|
} catch (error) {
|
|
1020
1022
|
notWritten(operation, error);
|
|
1023
|
+
return false;
|
|
1021
1024
|
}
|
|
1022
1025
|
}, "attempt");
|
|
1023
1026
|
const save = /* @__PURE__ */ __name((operation, writing) => {
|
|
@@ -1115,7 +1118,7 @@ var stored = /* @__PURE__ */ __name((messenger, { account, store, warn, events,
|
|
|
1115
1118
|
rekeysQueued += rekeys.length;
|
|
1116
1119
|
const saving = previous.then(async () => {
|
|
1117
1120
|
await saveRekeys(rekeys, round);
|
|
1118
|
-
|
|
1121
|
+
return attempt(operation, (opened) => fill(opened, account, batch));
|
|
1119
1122
|
});
|
|
1120
1123
|
previous = saving;
|
|
1121
1124
|
pending?.add(saving);
|
|
@@ -1125,7 +1128,8 @@ var stored = /* @__PURE__ */ __name((messenger, { account, store, warn, events,
|
|
|
1125
1128
|
pending?.delete(saving);
|
|
1126
1129
|
rekeysOnly.delete(saving);
|
|
1127
1130
|
});
|
|
1128
|
-
onBatch(batch);
|
|
1131
|
+
void onBatch(batch);
|
|
1132
|
+
return saving;
|
|
1129
1133
|
};
|
|
1130
1134
|
}, "saveBatches");
|
|
1131
1135
|
return throughWrapper(messenger, {
|
|
@@ -1486,7 +1490,7 @@ var keep = /* @__PURE__ */ __name(async (store, account, event, seenAt, among, c
|
|
|
1486
1490
|
}
|
|
1487
1491
|
}, "keep");
|
|
1488
1492
|
|
|
1489
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1493
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/cli/messenger/context.js
|
|
1490
1494
|
var lazyStore = /* @__PURE__ */ __name((env, command, version) => {
|
|
1491
1495
|
let opened;
|
|
1492
1496
|
return {
|
|
@@ -7,20 +7,21 @@ import {
|
|
|
7
7
|
agentJson,
|
|
8
8
|
commandAvailability,
|
|
9
9
|
failureContext
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-Q264PYGE.js";
|
|
11
11
|
import {
|
|
12
12
|
callerOf
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-ZID2Y4XU.js";
|
|
14
14
|
import {
|
|
15
|
+
QUERY_ARGUMENT,
|
|
15
16
|
lentConnection,
|
|
16
17
|
onlineDeps,
|
|
17
18
|
refuseLacking,
|
|
18
19
|
servicesFor,
|
|
19
20
|
storeModeDeps
|
|
20
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-JDQSX2JQ.js";
|
|
21
22
|
import {
|
|
22
23
|
ENTITIES
|
|
23
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-452UZ2PU.js";
|
|
24
25
|
import {
|
|
25
26
|
DEFAULT_OUTPUT_BYTES,
|
|
26
27
|
LOCAL_WRITE,
|
|
@@ -43,21 +44,24 @@ import {
|
|
|
43
44
|
sealed,
|
|
44
45
|
startRecording,
|
|
45
46
|
traceOf
|
|
46
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-GX4LRLVD.js";
|
|
47
48
|
import {
|
|
48
49
|
currentCaller,
|
|
49
50
|
keepsSuccess,
|
|
50
51
|
runContextOf,
|
|
51
52
|
withCaller
|
|
52
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-Z6TRIW2O.js";
|
|
54
|
+
import {
|
|
55
|
+
queryDescription
|
|
56
|
+
} from "./chunk-HNN7EKIM.js";
|
|
53
57
|
import {
|
|
54
58
|
MAX_BUFFERED_INPUT
|
|
55
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-AVUIWZTP.js";
|
|
56
60
|
import {
|
|
57
61
|
captureStreams,
|
|
58
62
|
errorObjectOf,
|
|
59
63
|
mcpErrorResult
|
|
60
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-KQ23JWLJ.js";
|
|
61
65
|
import {
|
|
62
66
|
CliError,
|
|
63
67
|
SNAKE_CASE,
|
|
@@ -96,15 +100,15 @@ import {
|
|
|
96
100
|
unknown,
|
|
97
101
|
word,
|
|
98
102
|
writes
|
|
99
|
-
} from "./chunk-
|
|
103
|
+
} from "./chunk-PCRLXJRH.js";
|
|
100
104
|
import {
|
|
101
105
|
__name
|
|
102
106
|
} from "./chunk-ZVVMGPBJ.js";
|
|
103
107
|
|
|
104
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
108
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/mcp/agent.js
|
|
105
109
|
import { Readable } from "node:stream";
|
|
106
110
|
|
|
107
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
111
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.73.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/lint.js
|
|
108
112
|
var LINT_SEVERITIES = ["high", "medium", "low"];
|
|
109
113
|
var lintRuleSchema = strictObject({
|
|
110
114
|
id: word,
|
|
@@ -231,7 +235,7 @@ var overridesSchema = array(strictObject({
|
|
|
231
235
|
review_after: pipe(string(), isoDate("a date, YYYY-MM-DD"))
|
|
232
236
|
}));
|
|
233
237
|
|
|
234
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
238
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.73.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/audit.js
|
|
235
239
|
var auditRuleSchema = strictObject({ id: word, severity: picklist(LINT_SEVERITIES), summary: text });
|
|
236
240
|
var defineAuditRules = /* @__PURE__ */ __name((input) => parseRegistry("audit rules", array(auditRuleSchema), input, (rules) => duplicates(rules.map((rule) => rule.id)).map((id) => `"${id}" is listed twice`)), "defineAuditRules");
|
|
237
241
|
var AUDIT_RULES = defineAuditRules([
|
|
@@ -340,7 +344,7 @@ var REQUIRED_ROOTS = defineRequiredRoots([
|
|
|
340
344
|
{ path: ["upgrade"], meaning: "updates the CLI" }
|
|
341
345
|
]);
|
|
342
346
|
|
|
343
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
347
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.73.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/fields.js
|
|
344
348
|
var fieldRuleSchema = strictObject({ id: word, rule: text });
|
|
345
349
|
var defineFieldRules = /* @__PURE__ */ __name((input) => parseRegistry("output field rules", array(fieldRuleSchema), input, (rules) => duplicates(rules.map((rule) => rule.id)).map((id) => `"${id}" is listed twice`)), "defineFieldRules");
|
|
346
350
|
var FIELD_RULES = defineFieldRules([
|
|
@@ -356,7 +360,7 @@ var FIELD_RULES = defineFieldRules([
|
|
|
356
360
|
}
|
|
357
361
|
]);
|
|
358
362
|
|
|
359
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
363
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.73.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/identifiers.js
|
|
360
364
|
var key = pipe(string(), regex(SNAKE_CASE, "a snake_case key"));
|
|
361
365
|
var identifierSchema = strictObject({ key, meaning: text, replaces: optional(array(key)) });
|
|
362
366
|
var defineIdentifiers = /* @__PURE__ */ __name((input) => parseRegistry("identifiers", array(identifierSchema), input, (identifiers) => {
|
|
@@ -378,7 +382,7 @@ var IDENTIFIERS = defineIdentifiers([
|
|
|
378
382
|
{ key: "trace_id", meaning: "the distributed trace a run belongs to, from `traceparent`" }
|
|
379
383
|
]);
|
|
380
384
|
|
|
381
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
385
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.73.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/flags-calendar.js
|
|
382
386
|
var CALENDAR_FLAGS = [
|
|
383
387
|
{ name: "--end-time", value: "<time>", role: "value", type: "time", meaning: "when it ends" },
|
|
384
388
|
{
|
|
@@ -452,7 +456,7 @@ var CALENDAR_FLAGS = [
|
|
|
452
456
|
}
|
|
453
457
|
];
|
|
454
458
|
|
|
455
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
459
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.73.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/flags-how.js
|
|
456
460
|
var HOW_FLAGS = [
|
|
457
461
|
{
|
|
458
462
|
name: "--limit",
|
|
@@ -1439,7 +1443,7 @@ var HOW_FLAGS = [
|
|
|
1439
1443
|
}
|
|
1440
1444
|
];
|
|
1441
1445
|
|
|
1442
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
1446
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.73.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/flags-mail.js
|
|
1443
1447
|
var MAIL_FLAGS = [
|
|
1444
1448
|
{
|
|
1445
1449
|
name: "--cc",
|
|
@@ -1463,7 +1467,7 @@ var MAIL_FLAGS = [
|
|
|
1463
1467
|
}
|
|
1464
1468
|
];
|
|
1465
1469
|
|
|
1466
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
1470
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.73.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/flags-what.js
|
|
1467
1471
|
var WHAT_FLAGS = [
|
|
1468
1472
|
{
|
|
1469
1473
|
name: "--analysis-provider",
|
|
@@ -2461,7 +2465,7 @@ var WHAT_FLAGS = [
|
|
|
2461
2465
|
}
|
|
2462
2466
|
];
|
|
2463
2467
|
|
|
2464
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
2468
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.73.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/vocabulary.js
|
|
2465
2469
|
var FLAG_TYPES = [
|
|
2466
2470
|
"switch",
|
|
2467
2471
|
"count",
|
|
@@ -2617,6 +2621,7 @@ var verbs = [
|
|
|
2617
2621
|
["vote", "answer a poll"],
|
|
2618
2622
|
["answer", "reply to a button someone pressed under a bot's message"],
|
|
2619
2623
|
["respond", "answer an invitation: accept, tentatively accept or decline it"],
|
|
2624
|
+
["remind", "tell the owner once about what starts soon: print it, or run the owner's own program for it"],
|
|
2620
2625
|
["press", "press a button under a bot's message; the bot sees who pressed it"],
|
|
2621
2626
|
["action", "show what a bot is doing in a chat, such as typing, for a few seconds"],
|
|
2622
2627
|
["watch", "follow new events as they come, and keep them"],
|
|
@@ -2821,7 +2826,7 @@ var VOCABULARY = defineVocabulary({
|
|
|
2821
2826
|
flags: [...HOW_FLAGS, ...WHAT_FLAGS, ...CALENDAR_FLAGS, ...MAIL_FLAGS]
|
|
2822
2827
|
});
|
|
2823
2828
|
|
|
2824
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2829
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/mcp/agent.js
|
|
2825
2830
|
var TYPES = new Map(VOCABULARY.flags.map((flag) => [flag.name, flag.type]));
|
|
2826
2831
|
var snake = /* @__PURE__ */ __name((name) => name.replaceAll("|", "_or_").replace(/[^a-z0-9]+/gi, "_"), "snake");
|
|
2827
2832
|
var longOf = /* @__PURE__ */ __name((option) => option.flags.match(/--[a-z0-9][a-z0-9-]*/)?.[0], "longOf");
|
|
@@ -2880,8 +2885,10 @@ var optionField = /* @__PURE__ */ __name((option, long, negated) => {
|
|
|
2880
2885
|
}, "argv")
|
|
2881
2886
|
};
|
|
2882
2887
|
}, "optionField");
|
|
2883
|
-
var argumentField = /* @__PURE__ */ __name((argument) => {
|
|
2884
|
-
const
|
|
2888
|
+
var argumentField = /* @__PURE__ */ __name((argument, query) => {
|
|
2889
|
+
const own = argument.description || argument.name;
|
|
2890
|
+
const about = query && argument.name === "query" ? own === QUERY_ARGUMENT ? queryDescription(query) : `${own}; ${queryDescription(query)}` : own;
|
|
2891
|
+
const one = argument.choices ? pipe(picklist(argument.choices), description(argument.description)) : text2(about);
|
|
2885
2892
|
return {
|
|
2886
2893
|
name: snake(argument.name),
|
|
2887
2894
|
required: argument.required,
|
|
@@ -2907,7 +2914,7 @@ var stdinField = /* @__PURE__ */ __name(({ name, description: description2, json
|
|
|
2907
2914
|
argv: /* @__PURE__ */ __name(() => [], "argv")
|
|
2908
2915
|
}), "stdinField");
|
|
2909
2916
|
var fieldsOf = /* @__PURE__ */ __name((info, { omit = [], offline = false, stdin }) => {
|
|
2910
|
-
const fields = info.arguments.map(argumentField);
|
|
2917
|
+
const fields = info.arguments.map((argument) => argumentField(argument, info.query));
|
|
2911
2918
|
const read = stdin?.(info.path);
|
|
2912
2919
|
if (read)
|
|
2913
2920
|
fields.push(stdinField(read));
|
|
@@ -3042,7 +3049,7 @@ var runCommandForAgent = /* @__PURE__ */ __name(async (program, path, input, ctx
|
|
|
3042
3049
|
}
|
|
3043
3050
|
}, "runCommandForAgent");
|
|
3044
3051
|
|
|
3045
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3052
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/mcp/tool.js
|
|
3046
3053
|
var limit = optional(pipe(number(), integer(), minValue(1), maxValue(100), description("how many")));
|
|
3047
3054
|
var page = optional(pipe(number(), integer(), minValue(1), description("which page, from 1")));
|
|
3048
3055
|
var message = pipe(
|
|
@@ -3301,7 +3308,7 @@ var failed = /* @__PURE__ */ __name((error, errors, effects) => {
|
|
|
3301
3308
|
return mcpErrorResult(JSON.parse(agentJson(errorObjectOf(error, context))));
|
|
3302
3309
|
}, "failed");
|
|
3303
3310
|
|
|
3304
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3311
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.544.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.73.0_commander@15._14d279ae6bc0fc41a3606e009c109ba5/node_modules/@wirecat/cli-core/dist/mcp/surface.js
|
|
3305
3312
|
import { randomUUID } from "node:crypto";
|
|
3306
3313
|
var MATCHES = 8;
|
|
3307
3314
|
var ANSWER = answerSchema();
|