@wirecat/tg-cli 0.102.0 → 0.103.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 +31 -19
- package/dist/bundle/{adapter-M2HRSFFL.js → adapter-QG3YFFOY.js} +49 -48
- package/dist/bundle/{all-profiles-GOD2QNTK.js → all-profiles-ECXH3TBF.js} +13 -13
- package/dist/bundle/{anthropic-LKU7RWMA.js → anthropic-5MKO3QX7.js} +10 -10
- package/dist/bundle/{bot-api-X3MPFVPL.js → bot-api-4DQPIOMK.js} +50 -49
- package/dist/bundle/{bot-history-OUMVVG22.js → bot-history-UN74XXLU.js} +19 -19
- package/dist/bundle/{bun-LIZ6MKFS.js → bun-PS73VF2C.js} +5 -5
- package/dist/bundle/{bun-sqlite-2IFQYQ44.js → bun-sqlite-RAWGPH23.js} +8 -8
- package/dist/bundle/{chunk-ZZLKX62Z.js → chunk-2ABQZVK4.js} +3 -3
- package/dist/bundle/{chunk-5D6OJREA.js → chunk-3CP7RK5R.js} +4 -4
- package/dist/bundle/{chunk-QL7CQ6VZ.js → chunk-3IXKDIPH.js} +48 -48
- package/dist/bundle/{chunk-F2TG3BA2.js → chunk-3QX6SOEO.js} +9 -9
- package/dist/bundle/{chunk-MGG7JSNO.js → chunk-537O7OVE.js} +6 -6
- package/dist/bundle/{chunk-M5UH5CF3.js → chunk-57XGUIXA.js} +8 -8
- package/dist/bundle/{chunk-WMOEOVWZ.js → chunk-5D4AEUVA.js} +3 -3
- package/dist/bundle/{chunk-ENE5CSVY.js → chunk-5HPAPVCB.js} +276 -260
- package/dist/bundle/{chunk-OEJ5DMCX.js → chunk-67SRVSPU.js} +10 -10
- package/dist/bundle/{chunk-CLWYQNSC.js → chunk-6N25NZOE.js} +9 -9
- package/dist/bundle/{chunk-4QB4WDLT.js → chunk-AAMJZJYC.js} +15 -15
- package/dist/bundle/{chunk-AVWK4NCW.js → chunk-ADLS6FVG.js} +13 -13
- package/dist/bundle/{chunk-2SUTCDGO.js → chunk-AUKAZRF6.js} +5 -5
- package/dist/bundle/{chunk-OHBHHBYL.js → chunk-BV4N333Y.js} +6 -6
- package/dist/bundle/{chunk-UR6ASUSG.js → chunk-BYYSVINK.js} +6 -6
- package/dist/bundle/{chunk-Y4XSWI22.js → chunk-CMQ34EZL.js} +6 -6
- package/dist/bundle/{chunk-ERQDBK5I.js → chunk-COZ74WW4.js} +4 -4
- package/dist/bundle/{chunk-7BFO3DY6.js → chunk-DFDN6AUB.js} +2 -2
- package/dist/bundle/{chunk-264DAFJV.js → chunk-DLF3H6NP.js} +7 -7
- package/dist/bundle/{chunk-BQYTIYGB.js → chunk-DWQ4QT6X.js} +96 -96
- package/dist/bundle/{chunk-DE7LFMY2.js → chunk-EMC57SOZ.js} +11 -11
- package/dist/bundle/{chunk-GSKFAE3I.js → chunk-EQHQ2AX3.js} +148 -55
- package/dist/bundle/{chunk-XXTJUZMB.js → chunk-F27OI4J2.js} +4 -4
- package/dist/bundle/{chunk-2XBSVRT2.js → chunk-FG2QTYEF.js} +4 -4
- package/dist/bundle/{chunk-334UBWOB.js → chunk-FSPDODVT.js} +14 -14
- package/dist/bundle/{chunk-YHB57PFN.js → chunk-G5IMOOPB.js} +4 -4
- package/dist/bundle/{chunk-AUOXTGTU.js → chunk-GO354DJ5.js} +4 -4
- package/dist/bundle/{chunk-FOUE7XLK.js → chunk-H2UTBYFC.js} +4 -4
- package/dist/bundle/{chunk-V52SBQYF.js → chunk-HCDZWFXO.js} +17 -17
- package/dist/bundle/{chunk-5VSR5ENL.js → chunk-KCVDWZWS.js} +11 -11
- package/dist/bundle/{chunk-TV5DGHBT.js → chunk-KQ5BUI5T.js} +248 -248
- package/dist/bundle/{chunk-U4RRZUNP.js → chunk-LAYPLF7G.js} +35 -282
- package/dist/bundle/{chunk-5KU4UQBM.js → chunk-MFS52LTZ.js} +4 -4
- package/dist/bundle/{chunk-FBWOQMPE.js → chunk-MHHDVR4G.js} +227 -283
- package/dist/bundle/{chunk-VUJ34PEQ.js → chunk-NIVZHTN4.js} +15 -15
- package/dist/bundle/{chunk-JFSVXMN6.js → chunk-NKN54EDN.js} +6 -6
- package/dist/bundle/chunk-O5EHUB2V.js +2 -0
- package/dist/bundle/{chunk-PSH7K6TL.js → chunk-OGVBRRWY.js} +25 -25
- package/dist/bundle/{chunk-Q2NYEX4A.js → chunk-Q2LBOPKO.js} +57 -27
- package/dist/bundle/{chunk-UK3GAN7Q.js → chunk-QF7VVIF4.js} +11 -11
- package/dist/bundle/{chunk-WVEHUKCZ.js → chunk-RD7SSY7H.js} +4 -4
- package/dist/bundle/{chunk-TXBUDJ3P.js → chunk-RKQIEJFR.js} +5 -5
- package/dist/bundle/chunk-RMC2S3F4.js +264 -0
- package/dist/bundle/{chunk-4PDEQL6T.js → chunk-S5M4HFOZ.js} +6 -6
- package/dist/bundle/{chunk-BBC546ZA.js → chunk-SSALGKMJ.js} +6 -6
- package/dist/bundle/{chunk-QEPZUFPL.js → chunk-SSV37M5T.js} +59 -59
- package/dist/bundle/{chunk-DG62L57H.js → chunk-T4SDOYPY.js} +20 -20
- package/dist/bundle/{chunk-HLAZ65AW.js → chunk-TEO2KP52.js} +5 -5
- package/dist/bundle/{chunk-ZRNRQFTF.js → chunk-TPFLD4OM.js} +5 -5
- package/dist/bundle/{chunk-PYTOIDSM.js → chunk-VMU4SGCE.js} +7 -7
- package/dist/bundle/{chunk-W5EB4JLV.js → chunk-VZN5LD26.js} +6 -6
- package/dist/bundle/{chunk-ZJVZXJOG.js → chunk-WAGDZB62.js} +5 -5
- package/dist/bundle/{chunk-CRZPQQHE.js → chunk-WULARSC4.js} +26 -26
- package/dist/bundle/{chunk-BJG6JA5U.js → chunk-Y5E2WNWB.js} +4 -4
- package/dist/bundle/{chunk-OCWARAFE.js → chunk-YI72UVTJ.js} +5 -5
- package/dist/bundle/{chunk-SRU3OF4R.js → chunk-Z2DPNTSU.js} +5 -5
- package/dist/bundle/{chunk-5DFGJPT6.js → chunk-ZHXSRYJ5.js} +6 -6
- package/dist/bundle/{chunk-AFV74GK3.js → chunk-ZVVMGPBJ.js} +2 -2
- package/dist/bundle/command-contract-ZGFJTLB2.js +32 -0
- package/dist/bundle/{dist-RJMT44PL.js → dist-I7OZPHAZ.js} +3 -3
- package/dist/bundle/{echarts-27W2CIBD.js → echarts-UEQDIHVQ.js} +5 -5
- package/dist/bundle/{embed-FGJ273X2.js → embed-5DPZKRW5.js} +9 -8
- package/dist/bundle/{embedder-7ELL3CQ3.js → embedder-NBQXDXAO.js} +12 -11
- package/dist/bundle/entry-EE6YRAP4.js +14 -0
- package/dist/bundle/first-run-OSEVVWNT.js +24 -0
- package/dist/bundle/first-screen-753THOU6.js +30 -0
- package/dist/bundle/identity-LNH33PN3.js +11 -0
- package/dist/bundle/instructions-PYGVIT7I.js +9 -0
- package/dist/bundle/{mcp-4Y37G2UY.js → mcp-OQBZXELQ.js} +5 -5
- package/dist/bundle/{node-RSL3HANO.js → node-3OBKCX6M.js} +5 -5
- package/dist/bundle/{node-IUL5HSYI.js → node-P4E63KXA.js} +5 -5
- package/dist/bundle/node-TLZSIHIJ.js +21 -0
- package/dist/bundle/{node-sqlite-7R3PYQGJ.js → node-sqlite-DMMTDRFB.js} +8 -8
- package/dist/bundle/oauth-FX5DDCRS.js +18 -0
- package/dist/bundle/open-G6QRQAAL.js +20 -0
- package/dist/bundle/{process-RMV3AKLB.js → process-47MMIFIJ.js} +5 -5
- package/dist/bundle/{program-PIUYQHBF.js → program-LBHBWRK5.js} +52 -51
- package/dist/bundle/prompt-CJ6Y4JYC.js +13 -0
- package/dist/bundle/proxy-transport-YSBYG26I.js +17 -0
- package/dist/bundle/{recognize-3GMOLZF4.js → recognize-7BLTOI45.js} +9 -9
- package/dist/bundle/remote-Q4A4JY6U.js +27 -0
- package/dist/bundle/{rerank-W3OSXXBN.js → rerank-CQAR46L3.js} +10 -9
- package/dist/bundle/{serve-ZCPO44NO.js → serve-2UO2YMMG.js} +13 -13
- package/dist/bundle/{server-YWL4HDOP.js → server-6XYURULQ.js} +53 -50
- package/dist/bundle/{server-FXU4QFRB.js → server-FMKC4RLL.js} +37 -35
- package/dist/bundle/{state-MJPTDIB5.js → state-RNWN2RDY.js} +9 -9
- package/dist/bundle/{store-6VNQG56O.js → store-BBHTR477.js} +14 -14
- package/dist/bundle/store-maintenance-command-GD6OLRXH.js +44 -0
- package/dist/bundle/tg.js +8 -8
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +4 -4
- package/dist/bundle/chunk-2SJOUK6J.js +0 -2
- package/dist/bundle/command-contract-A6VZN3ZR.js +0 -31
- package/dist/bundle/entry-SEE5YWIX.js +0 -14
- package/dist/bundle/first-run-BD7FEC3W.js +0 -24
- package/dist/bundle/first-screen-ASZV6LSA.js +0 -29
- package/dist/bundle/identity-QR4F42T6.js +0 -11
- package/dist/bundle/instructions-L74K64PV.js +0 -9
- package/dist/bundle/node-UPPL626U.js +0 -21
- package/dist/bundle/oauth-4ESGXF6U.js +0 -18
- package/dist/bundle/open-DFYEUGTA.js +0 -20
- package/dist/bundle/prompt-H7GYQQLL.js +0 -13
- package/dist/bundle/proxy-transport-G4MA6BGU.js +0 -17
- package/dist/bundle/remote-IRWTCI2B.js +0 -26
- package/dist/bundle/store-maintenance-command-62TQTMER.js +0 -43
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { createRequire as
|
|
2
|
-
const require =
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
count,
|
|
5
5
|
id,
|
|
6
6
|
text,
|
|
7
7
|
time
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-CMQ34EZL.js";
|
|
9
9
|
import {
|
|
10
10
|
currentCaller,
|
|
11
11
|
endpointTemplate,
|
|
@@ -16,15 +16,19 @@ import {
|
|
|
16
16
|
providerErrorKey,
|
|
17
17
|
renderEvent,
|
|
18
18
|
runContextOf
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-EMC57SOZ.js";
|
|
20
20
|
import {
|
|
21
21
|
permissionCeiling
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-BV4N333Y.js";
|
|
23
23
|
import {
|
|
24
24
|
envName,
|
|
25
25
|
readOnlyLockOf,
|
|
26
26
|
readOnlyRefusal
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-AUKAZRF6.js";
|
|
28
|
+
import {
|
|
29
|
+
filesPresent,
|
|
30
|
+
sharedModelsDirectory
|
|
31
|
+
} from "./chunk-RMC2S3F4.js";
|
|
28
32
|
import {
|
|
29
33
|
FIELD_TYPES,
|
|
30
34
|
QUERY_BACKENDS,
|
|
@@ -33,13 +37,13 @@ import {
|
|
|
33
37
|
TASK_STATES,
|
|
34
38
|
TASK_TYPES,
|
|
35
39
|
describeQuery
|
|
36
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-SSV37M5T.js";
|
|
37
41
|
import {
|
|
38
42
|
sharedConfigPath
|
|
39
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-3QX6SOEO.js";
|
|
40
44
|
import {
|
|
41
45
|
storePath
|
|
42
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-TPFLD4OM.js";
|
|
43
47
|
import {
|
|
44
48
|
configFilePath,
|
|
45
49
|
createRecordLog,
|
|
@@ -52,7 +56,7 @@ import {
|
|
|
52
56
|
saveConfigFile,
|
|
53
57
|
singleLine,
|
|
54
58
|
writeSecurely
|
|
55
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-T4SDOYPY.js";
|
|
56
60
|
import {
|
|
57
61
|
CliError,
|
|
58
62
|
MAX_NEXT_STEPS,
|
|
@@ -94,12 +98,12 @@ import {
|
|
|
94
98
|
union,
|
|
95
99
|
unknown,
|
|
96
100
|
writes
|
|
97
|
-
} from "./chunk-
|
|
101
|
+
} from "./chunk-67SRVSPU.js";
|
|
98
102
|
import {
|
|
99
103
|
__name
|
|
100
|
-
} from "./chunk-
|
|
104
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
101
105
|
|
|
102
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
106
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/commands/registry.js
|
|
103
107
|
var labels = /* @__PURE__ */ new WeakMap();
|
|
104
108
|
var annotate = /* @__PURE__ */ __name((command, meta) => {
|
|
105
109
|
labels.set(command, { ...labels.get(command), ...meta });
|
|
@@ -3600,7 +3604,7 @@ __name(useColor, "useColor");
|
|
|
3600
3604
|
// node_modules/.pnpm/commander@15.0.0/node_modules/commander/index.js
|
|
3601
3605
|
var program = new Command();
|
|
3602
3606
|
|
|
3603
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
3607
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/commands/contracts.js
|
|
3604
3608
|
import { isDeepStrictEqual } from "node:util";
|
|
3605
3609
|
var protectedCommands = /* @__PURE__ */ new WeakMap();
|
|
3606
3610
|
var hasSharedContract = /* @__PURE__ */ __name((command) => protectedCommands.has(command), "hasSharedContract");
|
|
@@ -3802,7 +3806,7 @@ var customizeSharedCommand = /* @__PURE__ */ __name((reference2, reason, build,
|
|
|
3802
3806
|
return command;
|
|
3803
3807
|
}, "customizeSharedCommand");
|
|
3804
3808
|
|
|
3805
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
3809
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/commands/document.js
|
|
3806
3810
|
var argumentInfoSchema = object({
|
|
3807
3811
|
name: string(),
|
|
3808
3812
|
required: boolean(),
|
|
@@ -3875,7 +3879,7 @@ var commandsDocumentSchema = strictObject({
|
|
|
3875
3879
|
exit_codes: record(string(), pipe(number(), integer()))
|
|
3876
3880
|
});
|
|
3877
3881
|
|
|
3878
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
3882
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/commands/index.js
|
|
3879
3883
|
var refuseJoinedPath = /* @__PURE__ */ __name((root, args, prefix = []) => {
|
|
3880
3884
|
let command = root;
|
|
3881
3885
|
const path2 = [];
|
|
@@ -3893,7 +3897,7 @@ var refuseJoinedPath = /* @__PURE__ */ __name((root, args, prefix = []) => {
|
|
|
3893
3897
|
}
|
|
3894
3898
|
}, "refuseJoinedPath");
|
|
3895
3899
|
|
|
3896
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3900
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/sends/guarded.js
|
|
3897
3901
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
3898
3902
|
var sentIds = /* @__PURE__ */ __name((typed, message) => ({
|
|
3899
3903
|
messageId: message.id,
|
|
@@ -3999,7 +4003,7 @@ var guardedWrite = /* @__PURE__ */ __name(async (guard, attempt, act, settled2 =
|
|
|
3999
4003
|
}, "guardedWrite");
|
|
4000
4004
|
var codeOf = /* @__PURE__ */ __name((error) => typeof error?.code === "string" ? error.code : "unknown", "codeOf");
|
|
4001
4005
|
|
|
4002
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4006
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/cli/result-fields.js
|
|
4003
4007
|
var named = /* @__PURE__ */ __name((work) => {
|
|
4004
4008
|
try {
|
|
4005
4009
|
return work();
|
|
@@ -4026,7 +4030,7 @@ var projectFields2 = /* @__PURE__ */ __name((value, fields) => named(() => {
|
|
|
4026
4030
|
return projectFields(value, fields);
|
|
4027
4031
|
}), "projectFields");
|
|
4028
4032
|
|
|
4029
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4033
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/cli/execution.js
|
|
4030
4034
|
var DEFAULT_COMMAND_MS = 3e4;
|
|
4031
4035
|
var DEFAULT_COOPERATIVE_MS = 5 * 6e4;
|
|
4032
4036
|
var DEFAULT_AGENT_COOPERATIVE_MS = 45e3;
|
|
@@ -4207,7 +4211,7 @@ var withAbort = /* @__PURE__ */ __name(async (signal, body) => {
|
|
|
4207
4211
|
}
|
|
4208
4212
|
}, "withAbort");
|
|
4209
4213
|
|
|
4210
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4214
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/sends/permissions.js
|
|
4211
4215
|
var LEVELS = ["deny", "readonly", "ask", "allow"];
|
|
4212
4216
|
var DANGEROUS = /* @__PURE__ */ new Set(["messages.delete", "bot.messages.delete", "topics.delete", "chats.delete", "chats.clear"]);
|
|
4213
4217
|
var skipFlagFor = /* @__PURE__ */ __name((key) => DANGEROUS.has(key) ? "--allow-dangerous" : "--yes", "skipFlagFor");
|
|
@@ -4596,7 +4600,7 @@ var assertRetentionEvidenceRead = /* @__PURE__ */ __name((permissions) => {
|
|
|
4596
4600
|
}
|
|
4597
4601
|
}, "assertRetentionEvidenceRead");
|
|
4598
4602
|
|
|
4599
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4603
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/cli/messenger/accounts.js
|
|
4600
4604
|
import { existsSync, readdirSync, readFileSync } from "node:fs";
|
|
4601
4605
|
import { join } from "node:path";
|
|
4602
4606
|
var accountFileFor = /* @__PURE__ */ __name((app, profile, env) => join(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "accounts", `${profile}.json`), "accountFileFor");
|
|
@@ -4618,7 +4622,7 @@ var profilesWithAccounts = /* @__PURE__ */ __name((app, env) => {
|
|
|
4618
4622
|
}, "profilesWithAccounts");
|
|
4619
4623
|
var profilesHere = /* @__PURE__ */ __name((app, configured, env) => [.../* @__PURE__ */ new Set([...configured, ...profilesWithAccounts(app, env)])].sort(), "profilesHere");
|
|
4620
4624
|
|
|
4621
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4625
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/output-detail.js
|
|
4622
4626
|
var RARELY_SET = ["editedAt", "replyTo", "forwardedFrom", "reactions"];
|
|
4623
4627
|
var BRIEF = ["locator", "chatTitle", "timestamp", "senderName", "excerpt", "score"];
|
|
4624
4628
|
var isHit = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null && typeof value.locator === "string" && typeof value.text === "string", "isHit");
|
|
@@ -4648,7 +4652,7 @@ var atDetail = /* @__PURE__ */ __name((value, detail = "default") => {
|
|
|
4648
4652
|
return value;
|
|
4649
4653
|
}, "atDetail");
|
|
4650
4654
|
|
|
4651
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4655
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/output.js
|
|
4652
4656
|
var resolveOutput = /* @__PURE__ */ __name(({ json, jsonl, quiet, streams = processStreams, tty, color, fields, hitDetail, env = process.env, capture } = {}) => {
|
|
4653
4657
|
const interactive = tty ?? process.stdout.isTTY === true;
|
|
4654
4658
|
const format = jsonl ? "jsonl" : json || !interactive ? "json" : "pretty";
|
|
@@ -4696,7 +4700,7 @@ var silence = /* @__PURE__ */ __name((renderer) => ({
|
|
|
4696
4700
|
}, "warn")
|
|
4697
4701
|
}), "silence");
|
|
4698
4702
|
|
|
4699
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4703
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/runs/log-events.js
|
|
4700
4704
|
var CORE_LOG_EVENTS = defineLogEvents([
|
|
4701
4705
|
{ id: "provider.request", meaning: "a request went to the messenger", keys: ["operation"] },
|
|
4702
4706
|
{ id: "provider.response", meaning: "the messenger answered the request, or it failed", keys: ["operation"] },
|
|
@@ -4730,7 +4734,7 @@ var DIAGNOSTIC_LOG_EVENTS = {
|
|
|
4730
4734
|
cache: "cache.answered"
|
|
4731
4735
|
};
|
|
4732
4736
|
|
|
4733
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4737
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/runs/log-keys.js
|
|
4734
4738
|
var snake2 = /* @__PURE__ */ __name((key) => key.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`), "snake");
|
|
4735
4739
|
var camel = /* @__PURE__ */ __name((key) => key.replace(/_([a-z0-9])/g, (_, letter) => letter.toUpperCase()), "camel");
|
|
4736
4740
|
var renamed = /* @__PURE__ */ __name((record2, name) => Object.fromEntries(Object.entries(record2).map(([key, value]) => [name(key), value])), "renamed");
|
|
@@ -4743,13 +4747,13 @@ var snakeLogger = /* @__PURE__ */ __name((logger) => ({
|
|
|
4743
4747
|
error: /* @__PURE__ */ __name((event, message) => logger.error(logAttributes(event), message), "error")
|
|
4744
4748
|
}), "snakeLogger");
|
|
4745
4749
|
|
|
4746
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4750
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/runs/run.js
|
|
4747
4751
|
import { randomUUID } from "node:crypto";
|
|
4748
4752
|
import { appendFileSync, mkdirSync, readdirSync as readdirSync2, readFileSync as readFileSync2, rmSync, statSync, writeFileSync } from "node:fs";
|
|
4749
4753
|
import { userInfo } from "node:os";
|
|
4750
4754
|
import { join as join2, sep } from "node:path";
|
|
4751
4755
|
|
|
4752
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4756
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/runs/log-attributes.js
|
|
4753
4757
|
var diagnostic = {
|
|
4754
4758
|
event: true,
|
|
4755
4759
|
operation: true,
|
|
@@ -4819,7 +4823,7 @@ var LOG_ATTRIBUTES = [
|
|
|
4819
4823
|
...new Set([...Object.keys(diagnostic), ...Object.keys(send), ...background, ...crash, ...dropped].map((key) => Object.keys(logAttributes({ [key]: true }))[0]))
|
|
4820
4824
|
].sort();
|
|
4821
4825
|
|
|
4822
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4826
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/runs/run.js
|
|
4823
4827
|
var KEEP_RUNS_FOR_DAYS = 30;
|
|
4824
4828
|
var KEEP_SUCCESSFUL_RUNS_FOR_DAYS = 7;
|
|
4825
4829
|
var RUNS_SIZE_LIMIT_MB = 200;
|
|
@@ -5172,7 +5176,7 @@ var metadataOf = /* @__PURE__ */ __name((parsed) => {
|
|
|
5172
5176
|
};
|
|
5173
5177
|
}, "metadataOf");
|
|
5174
5178
|
|
|
5175
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5179
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/runs/scope.js
|
|
5176
5180
|
import { AsyncLocalStorage as AsyncLocalStorage2 } from "node:async_hooks";
|
|
5177
5181
|
import { randomBytes } from "node:crypto";
|
|
5178
5182
|
var scopes = new AsyncLocalStorage2();
|
|
@@ -5210,7 +5214,7 @@ var attempts = new AsyncLocalStorage2();
|
|
|
5210
5214
|
var withAttempt = /* @__PURE__ */ __name((attempt, work) => attempts.run(attempt, work), "withAttempt");
|
|
5211
5215
|
var currentAttempt = /* @__PURE__ */ __name(() => attempts.getStore(), "currentAttempt");
|
|
5212
5216
|
|
|
5213
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5217
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/runs/recording.js
|
|
5214
5218
|
var recorded = /* @__PURE__ */ __name(async (options, body) => {
|
|
5215
5219
|
const recording = startRecording(options);
|
|
5216
5220
|
try {
|
|
@@ -5395,7 +5399,7 @@ var partialOutcome = /* @__PURE__ */ __name((answer) => {
|
|
|
5395
5399
|
return void 0;
|
|
5396
5400
|
}, "partialOutcome");
|
|
5397
5401
|
|
|
5398
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5402
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/cli/deadline.js
|
|
5399
5403
|
var withDeadline = /* @__PURE__ */ __name(async (ms, closeables, body) => {
|
|
5400
5404
|
if (ms === void 0)
|
|
5401
5405
|
return body();
|
|
@@ -5421,7 +5425,7 @@ var withDeadline = /* @__PURE__ */ __name(async (ms, closeables, body) => {
|
|
|
5421
5425
|
}
|
|
5422
5426
|
}, "withDeadline");
|
|
5423
5427
|
|
|
5424
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5428
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/cli/profile.js
|
|
5425
5429
|
var asFirstWord = /* @__PURE__ */ __name((profile) => `${profile} `, "asFirstWord");
|
|
5426
5430
|
var PLAIN_NAME = /^[A-Za-z0-9][A-Za-z0-9._-]*$/;
|
|
5427
5431
|
var isProfileName = /* @__PURE__ */ __name((word) => PLAIN_NAME.test(word), "isProfileName");
|
|
@@ -5486,10 +5490,10 @@ var sampleCommand = /* @__PURE__ */ __name((commands) => {
|
|
|
5486
5490
|
return void 0;
|
|
5487
5491
|
}, "sampleCommand");
|
|
5488
5492
|
|
|
5489
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5493
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/cli/settings.js
|
|
5490
5494
|
import { existsSync as existsSync3 } from "node:fs";
|
|
5491
5495
|
|
|
5492
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5496
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/models/endpoint.js
|
|
5493
5497
|
var endpoint = /* @__PURE__ */ __name((value) => {
|
|
5494
5498
|
try {
|
|
5495
5499
|
const url2 = new URL(value);
|
|
@@ -5499,7 +5503,7 @@ var endpoint = /* @__PURE__ */ __name((value) => {
|
|
|
5499
5503
|
}
|
|
5500
5504
|
}, "endpoint");
|
|
5501
5505
|
|
|
5502
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5506
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/models/settings.js
|
|
5503
5507
|
var MODEL_FIELDS = ["provider", "model", "base_url"];
|
|
5504
5508
|
var modelSettingsShape = record(pipe(string(), regex(/^[a-z][a-z0-9-]*$/)), strictObject({
|
|
5505
5509
|
provider: optional(picklist(["off", "openai", "anthropic"])),
|
|
@@ -5568,7 +5572,7 @@ var modelTarget = /* @__PURE__ */ __name((settings, purpose) => {
|
|
|
5568
5572
|
};
|
|
5569
5573
|
}, "modelTarget");
|
|
5570
5574
|
|
|
5571
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5575
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/analysis/settings.js
|
|
5572
5576
|
var model = pipe(string(), trim(), minLength(1), maxLength(200));
|
|
5573
5577
|
var url = pipe(string(), check(endpoint, "use an HTTP/S endpoint without credentials, query or fragment"));
|
|
5574
5578
|
var AI_FIELDS = {
|
|
@@ -5612,7 +5616,7 @@ var resolveAISettings = /* @__PURE__ */ __name((prefix, layers, env) => {
|
|
|
5612
5616
|
};
|
|
5613
5617
|
}, "resolveAISettings");
|
|
5614
5618
|
|
|
5615
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5619
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/domain/duration.js
|
|
5616
5620
|
var DURATION = /^(\d+)(ms|s|m|h|d)$/;
|
|
5617
5621
|
var UNIT_MS = { ms: 1, s: 1e3, m: 6e4, h: 36e5, d: 864e5 };
|
|
5618
5622
|
var parseDuration = /* @__PURE__ */ __name((value, source) => {
|
|
@@ -5626,7 +5630,7 @@ var parseDuration = /* @__PURE__ */ __name((value, source) => {
|
|
|
5626
5630
|
return ms;
|
|
5627
5631
|
}, "parseDuration");
|
|
5628
5632
|
|
|
5629
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5633
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/embeddings/models.js
|
|
5630
5634
|
var huggingFace = /* @__PURE__ */ __name((repository, commit) => (name) => `https://huggingface.co/${repository}/resolve/${commit}/${name}`, "huggingFace");
|
|
5631
5635
|
var e5 = huggingFace("Xenova/multilingual-e5-small", "761b726dd34fb83930e26aab4e9ac3899aa1fa78");
|
|
5632
5636
|
var gemma = huggingFace("onnx-community/embeddinggemma-300m-ONNX", "5090578d9565bb06545b4552f76e6bc2c93e4a66");
|
|
@@ -5785,7 +5789,7 @@ var rerankModel = /* @__PURE__ */ __name((id2) => {
|
|
|
5785
5789
|
var vectorModelKey = /* @__PURE__ */ __name((model2) => `local:${model2.id}:${model2.dims}`, "vectorModelKey");
|
|
5786
5790
|
var meaningFloor = /* @__PURE__ */ __name((key) => key === "local:e5-small:384" ? 0.8 : 0, "meaningFloor");
|
|
5787
5791
|
|
|
5788
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5792
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/cli/config-issues.js
|
|
5789
5793
|
import { readFileSync as readFileSync3 } from "node:fs";
|
|
5790
5794
|
var isNode = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null && !Array.isArray(value), "isNode");
|
|
5791
5795
|
var SECTIONS = ["personal", "bot"];
|
|
@@ -6075,7 +6079,7 @@ var readConfigFile = /* @__PURE__ */ __name((path2) => {
|
|
|
6075
6079
|
return "issue" in parsed ? { issue: publicIssue(parsed.issue) } : parsed;
|
|
6076
6080
|
}, "readConfigFile");
|
|
6077
6081
|
|
|
6078
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6082
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/cli/default-config.js
|
|
6079
6083
|
import { existsSync as existsSync2, linkSync, mkdirSync as mkdirSync2, mkdtempSync, rmSync as rmSync2, writeFileSync as writeFileSync2 } from "node:fs";
|
|
6080
6084
|
import { dirname, join as join3 } from "node:path";
|
|
6081
6085
|
var DEFAULT_CONFIG = {
|
|
@@ -6104,7 +6108,7 @@ function ensureDefaultConfig(path2, config = DEFAULT_CONFIG) {
|
|
|
6104
6108
|
}
|
|
6105
6109
|
__name(ensureDefaultConfig, "ensureDefaultConfig");
|
|
6106
6110
|
|
|
6107
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6111
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/cli/settings.js
|
|
6108
6112
|
var DEFAULT_LIMIT = DEFAULT_CONFIG.defaults.limit;
|
|
6109
6113
|
var DEFAULT_KEEP_RUNS_FOR_DAYS = DEFAULT_CONFIG.defaults.keep_runs_for_days;
|
|
6110
6114
|
var DEFAULT_SENDS_PER_HOUR = DEFAULT_CONFIG.defaults.sends_per_hour;
|
|
@@ -6155,6 +6159,13 @@ var SHARED_PROFILE_ENTRIES = {
|
|
|
6155
6159
|
var BOT_ONLY_ENTRIES = {
|
|
6156
6160
|
read_other_bots: optional(union([flag, array(string(), plain("has to be a list of profile names"))], plain("has to be true, false or a list of profile names")))
|
|
6157
6161
|
};
|
|
6162
|
+
var MESSENGER_ONLY_SETTINGS = [
|
|
6163
|
+
"sender_colors",
|
|
6164
|
+
"sends_per_hour",
|
|
6165
|
+
"transcribe_with",
|
|
6166
|
+
"search_catch_up",
|
|
6167
|
+
"read_other_bots"
|
|
6168
|
+
];
|
|
6158
6169
|
var SHARED_DEFAULTS_ONLY = {
|
|
6159
6170
|
update_check: optional(flag),
|
|
6160
6171
|
skill_hint: optional(flag)
|
|
@@ -6210,7 +6221,7 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
|
|
|
6210
6221
|
const schema = strictOf(configEntries);
|
|
6211
6222
|
const defaultsOnlyKeys = Object.keys(defaultsOnly);
|
|
6212
6223
|
const botOnlyKeys = Object.keys(BOT_ONLY_ENTRIES);
|
|
6213
|
-
const allSettings = [...Object.keys(profileEntries), ...botOnlyKeys, ...defaultsOnlyKeys];
|
|
6224
|
+
const allSettings = [...Object.keys(profileEntries), ...botOnlyKeys, ...defaultsOnlyKeys].filter((setting) => app.messenger !== false || !MESSENGER_ONLY_SETTINGS.includes(setting));
|
|
6214
6225
|
const PROFILE = envName(app, "PROFILE");
|
|
6215
6226
|
const PROFILE_LOCK = envName(app, "PROFILE_LOCK");
|
|
6216
6227
|
const TIMEOUT = envName(app, "TIMEOUT");
|
|
@@ -6487,7 +6498,7 @@ var given = /* @__PURE__ */ __name((value) => {
|
|
|
6487
6498
|
return trimmed === void 0 || trimmed === "" ? void 0 : trimmed;
|
|
6488
6499
|
}, "given");
|
|
6489
6500
|
|
|
6490
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6501
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/cli/context.js
|
|
6491
6502
|
var setExitCode = /* @__PURE__ */ __name((command, code) => {
|
|
6492
6503
|
const slot = environmentOf(command).exit;
|
|
6493
6504
|
if (slot)
|
|
@@ -6594,7 +6605,7 @@ var commandPath = /* @__PURE__ */ __name((command) => {
|
|
|
6594
6605
|
return words.join(" ");
|
|
6595
6606
|
}, "commandPath");
|
|
6596
6607
|
|
|
6597
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6608
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/cli/effects.js
|
|
6598
6609
|
var REMOTE_READ = { remote: "read", local: "read" };
|
|
6599
6610
|
var FETCH = { remote: "read", local: "write" };
|
|
6600
6611
|
var REMOTE_WRITE = { remote: "write", local: "write" };
|
|
@@ -6635,6 +6646,17 @@ var changesStore = /* @__PURE__ */ __name((command) => {
|
|
|
6635
6646
|
STORE_WRITES.add(command);
|
|
6636
6647
|
return command;
|
|
6637
6648
|
}, "changesStore");
|
|
6649
|
+
var savesFiles = /* @__PURE__ */ __name((command) => command.name() === "download" || [...command.options.map((option) => option.attributeName()), ...command.registeredArguments.map((one) => one.name())].map((name) => name.toLowerCase()).some((name) => name === "dir" || name.endsWith("dir") || name === "output"), "savesFiles");
|
|
6650
|
+
var fetchesOnly = /* @__PURE__ */ __name((command) => {
|
|
6651
|
+
const effects = metaOf(command).effects;
|
|
6652
|
+
return effects?.remote === "read" && effects.local === "write" && !STORE_WRITES.has(command) && !changesAuthority(command) && !OTHER_SERVICE.has(command) && !savesFiles(command);
|
|
6653
|
+
}, "fetchesOnly");
|
|
6654
|
+
var fetchesOnlyAt = /* @__PURE__ */ __name((root) => (path2) => {
|
|
6655
|
+
let at = root;
|
|
6656
|
+
for (const word of path2)
|
|
6657
|
+
at = at?.commands.find((one) => one.name() === word);
|
|
6658
|
+
return at !== void 0 && fetchesOnly(at);
|
|
6659
|
+
}, "fetchesOnlyAt");
|
|
6638
6660
|
var isStoreChange = /* @__PURE__ */ __name((command) => {
|
|
6639
6661
|
const effects = metaOf(command).effects;
|
|
6640
6662
|
return (effects?.remote === "none" || STORE_WRITES.has(command)) && effects?.local === "write" && !KEPT_UNDER_LOCK.has(command) && !changesAuthority(command);
|
|
@@ -6685,7 +6707,61 @@ var refuseUnderReadOnly = /* @__PURE__ */ __name((command, what) => {
|
|
|
6685
6707
|
throw readOnlyRefusal(lock, what);
|
|
6686
6708
|
}, "refuseUnderReadOnly");
|
|
6687
6709
|
|
|
6688
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6710
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/images/picture/models.js
|
|
6711
|
+
import { join as join4 } from "node:path";
|
|
6712
|
+
var clip = /* @__PURE__ */ __name((name) => `https://huggingface.co/Xenova/clip-vit-base-patch32/resolve/d15189d7028b43f1d3e65039190477f6af591c2a/${name}`, "clip");
|
|
6713
|
+
var IMAGE_MODELS = [
|
|
6714
|
+
{
|
|
6715
|
+
id: "clip-b32",
|
|
6716
|
+
title: "CLIP ViT-B/32, 8-bit",
|
|
6717
|
+
languages: "English only: translate a query before searching",
|
|
6718
|
+
licence: "MIT",
|
|
6719
|
+
dims: 512,
|
|
6720
|
+
key: "local:clip-b32:512",
|
|
6721
|
+
maxTokens: 77,
|
|
6722
|
+
vision: "onnx/vision_model_quantized.onnx",
|
|
6723
|
+
text: "onnx/text_model_quantized.onnx",
|
|
6724
|
+
files: [
|
|
6725
|
+
{
|
|
6726
|
+
name: "onnx/vision_model_quantized.onnx",
|
|
6727
|
+
url: clip("onnx/vision_model_quantized.onnx"),
|
|
6728
|
+
sha256: "583fd1110a514667812fee7d684952aaf82a99b959760c8d7dca7e0ab9839299",
|
|
6729
|
+
bytes: 89117001
|
|
6730
|
+
},
|
|
6731
|
+
{
|
|
6732
|
+
name: "onnx/text_model_quantized.onnx",
|
|
6733
|
+
url: clip("onnx/text_model_quantized.onnx"),
|
|
6734
|
+
sha256: "73baab855d406190da9faa498cfedf65f15cf309f4cc7385b7b032e6d08e5c3a",
|
|
6735
|
+
bytes: 64504507
|
|
6736
|
+
},
|
|
6737
|
+
{
|
|
6738
|
+
name: "tokenizer.json",
|
|
6739
|
+
url: clip("tokenizer.json"),
|
|
6740
|
+
sha256: "f7f3b7af117d467b58374797691a6438d3e6b9e9cef800dfd5dced7f697a90cd",
|
|
6741
|
+
bytes: 2224119
|
|
6742
|
+
},
|
|
6743
|
+
{
|
|
6744
|
+
name: "tokenizer_config.json",
|
|
6745
|
+
url: clip("tokenizer_config.json"),
|
|
6746
|
+
sha256: "60ba2912bc6344c94bc16bbdec27fa1209409167b6f2fdf3cfe9e65462ea3967",
|
|
6747
|
+
bytes: 775
|
|
6748
|
+
}
|
|
6749
|
+
]
|
|
6750
|
+
}
|
|
6751
|
+
];
|
|
6752
|
+
var DEFAULT_IMAGE_MODEL = "clip-b32";
|
|
6753
|
+
var imageModel = /* @__PURE__ */ __name((id2) => {
|
|
6754
|
+
const found = IMAGE_MODELS.find((model2) => model2.id === id2);
|
|
6755
|
+
if (!found) {
|
|
6756
|
+
throw new CliError("validation_error", `no image model ${id2} \u2014 one of: ${IMAGE_MODELS.map((model2) => model2.id).join(", ")}`);
|
|
6757
|
+
}
|
|
6758
|
+
return found;
|
|
6759
|
+
}, "imageModel");
|
|
6760
|
+
var imageModelsDirectory = /* @__PURE__ */ __name((env = process.env) => sharedModelsDirectory("image", env), "imageModelsDirectory");
|
|
6761
|
+
var placedImage = /* @__PURE__ */ __name((model2, directory) => model2.files.map((file) => [file, join4(directory, model2.id, file.name)]), "placedImage");
|
|
6762
|
+
var isImageModelInstalled = /* @__PURE__ */ __name((model2, directory) => filesPresent(placedImage(model2, directory)), "isImageModelInstalled");
|
|
6763
|
+
|
|
6764
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/cli/steps.js
|
|
6689
6765
|
var STEPS2 = defineSteps([
|
|
6690
6766
|
...STEPS,
|
|
6691
6767
|
{
|
|
@@ -6916,6 +6992,15 @@ var commandAt = /* @__PURE__ */ __name((root, path2) => {
|
|
|
6916
6992
|
return at === root ? void 0 : at;
|
|
6917
6993
|
}, "commandAt");
|
|
6918
6994
|
var runnable = /* @__PURE__ */ __name((root, steps) => withSafety((steps ?? []).filter((step) => step.kind === "user_action" || commandAt(root, step.command) !== void 0).slice(0, MAX_NEXT_STEPS), judgedTargets(root)), "runnable");
|
|
6995
|
+
var failureSteps = /* @__PURE__ */ __name((root, error) => {
|
|
6996
|
+
const model2 = error.details?.model;
|
|
6997
|
+
const own = error.reason === "model.not-downloaded" && typeof model2 === "string" ? [
|
|
6998
|
+
nextStep(IMAGE_MODELS.some((one) => one.id === model2) ? "models.download-image" : "models.download", {
|
|
6999
|
+
args: { model: model2 }
|
|
7000
|
+
})
|
|
7001
|
+
] : [];
|
|
7002
|
+
return runnable(root, [...error.next ?? [], ...own]);
|
|
7003
|
+
}, "failureSteps");
|
|
6919
7004
|
var withSafety = /* @__PURE__ */ __name((steps, targets) => steps.map((step) => {
|
|
6920
7005
|
if (step.kind === "user_action")
|
|
6921
7006
|
return step;
|
|
@@ -6942,7 +7027,7 @@ var stepLine = /* @__PURE__ */ __name((root, step) => {
|
|
|
6942
7027
|
].join(" ");
|
|
6943
7028
|
}, "stepLine");
|
|
6944
7029
|
|
|
6945
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7030
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/cli/provider-refs.js
|
|
6946
7031
|
var HIDDEN = /* @__PURE__ */ new Set(["providerRef", "provider_ref"]);
|
|
6947
7032
|
var withoutProviderRefs = /* @__PURE__ */ __name((value) => strip(value), "withoutProviderRefs");
|
|
6948
7033
|
var strip = /* @__PURE__ */ __name((value) => {
|
|
@@ -6956,7 +7041,7 @@ var strip = /* @__PURE__ */ __name((value) => {
|
|
|
6956
7041
|
return Object.fromEntries(Object.entries(value).flatMap(([key, inner]) => HIDDEN.has(key) ? [] : [[key, strip(inner)]]));
|
|
6957
7042
|
}, "strip");
|
|
6958
7043
|
|
|
6959
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7044
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/cli/envelope.js
|
|
6960
7045
|
var answerSchema = /* @__PURE__ */ __name((item = unknown()) => union([listEnvelopeSchema(item), itemEnvelopeSchema(item)]), "answerSchema");
|
|
6961
7046
|
var capped2 = /* @__PURE__ */ __name((steps) => steps.length > 0 ? { next: steps.slice(0, MAX_NEXT_STEPS) } : {}, "capped");
|
|
6962
7047
|
var listOf = /* @__PURE__ */ __name((command, input) => {
|
|
@@ -7078,7 +7163,7 @@ var printItem = /* @__PURE__ */ __name(({ renderer, format }, item) => {
|
|
|
7078
7163
|
renderer.result(item);
|
|
7079
7164
|
}, "printItem");
|
|
7080
7165
|
|
|
7081
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7166
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/entities/store-table.js
|
|
7082
7167
|
var TABLE_KINDS = ["data", "search_index", "search_index_part", "internal"];
|
|
7083
7168
|
var storeTable = strictObject({
|
|
7084
7169
|
name: text,
|
|
@@ -7087,7 +7172,7 @@ var storeTable = strictObject({
|
|
|
7087
7172
|
bytes: optional(nullable(count))
|
|
7088
7173
|
});
|
|
7089
7174
|
|
|
7090
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7175
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/botcheck/reasons.js
|
|
7091
7176
|
var WEIGHTS = {
|
|
7092
7177
|
bot: 3,
|
|
7093
7178
|
scam: 3,
|
|
@@ -7112,7 +7197,7 @@ var LINK = /https?:\/\/|t\.me\/|www\./i;
|
|
|
7112
7197
|
var DIGITS = /\d{5,}/;
|
|
7113
7198
|
var oddName = /* @__PURE__ */ __name((name) => !name?.trim() || DIGITS.test(name) || LINK.test(name), "oddName");
|
|
7114
7199
|
|
|
7115
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7200
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/entities/task.js
|
|
7116
7201
|
var closeSuggestion = strictObject({
|
|
7117
7202
|
as: picklist(["done", "dismissed"]),
|
|
7118
7203
|
/** The agent's name. */
|
|
@@ -7154,7 +7239,7 @@ var task = strictObject({
|
|
|
7154
7239
|
updated_at: optional(time)
|
|
7155
7240
|
});
|
|
7156
7241
|
|
|
7157
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7242
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/entities/agenda.js
|
|
7158
7243
|
var agendaChat = strictObject({
|
|
7159
7244
|
chat: reference,
|
|
7160
7245
|
title: nullable(text),
|
|
@@ -7214,7 +7299,7 @@ var agenda = strictObject({
|
|
|
7214
7299
|
unlisted_categories: array(strictObject({ name: text, open_tasks: number() }))
|
|
7215
7300
|
});
|
|
7216
7301
|
|
|
7217
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7302
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/entities/conversation.js
|
|
7218
7303
|
var conversation = strictObject({
|
|
7219
7304
|
id,
|
|
7220
7305
|
chat: reference,
|
|
@@ -7229,7 +7314,7 @@ var conversation = strictObject({
|
|
|
7229
7314
|
rules_version: count
|
|
7230
7315
|
});
|
|
7231
7316
|
|
|
7232
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7317
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/entities/attachment.js
|
|
7233
7318
|
var attachment = strictObject({
|
|
7234
7319
|
/** The message it came with, as a locator; absent inside that message. */
|
|
7235
7320
|
message: optional(reference),
|
|
@@ -7258,7 +7343,7 @@ var attachment = strictObject({
|
|
|
7258
7343
|
}))))
|
|
7259
7344
|
});
|
|
7260
7345
|
|
|
7261
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7346
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/entities/tagging.js
|
|
7262
7347
|
var tagging = strictObject({
|
|
7263
7348
|
tag: text,
|
|
7264
7349
|
type: picklist(TAG_TYPES),
|
|
@@ -7271,7 +7356,7 @@ var tagging = strictObject({
|
|
|
7271
7356
|
created_at: time
|
|
7272
7357
|
});
|
|
7273
7358
|
|
|
7274
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7359
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/runs/record-log.js
|
|
7275
7360
|
var recordLogFor = /* @__PURE__ */ __name((to, app, { traceId, command } = {}) => {
|
|
7276
7361
|
const run = currentRun();
|
|
7277
7362
|
const trace = traceId ?? run.traceId;
|
|
@@ -7403,6 +7488,7 @@ export {
|
|
|
7403
7488
|
isLogin,
|
|
7404
7489
|
destroysNothing,
|
|
7405
7490
|
changesStore,
|
|
7491
|
+
fetchesOnlyAt,
|
|
7406
7492
|
isStoreChange,
|
|
7407
7493
|
previewFlag,
|
|
7408
7494
|
storeChangeRefusal,
|
|
@@ -7415,11 +7501,18 @@ export {
|
|
|
7415
7501
|
judgedTargets,
|
|
7416
7502
|
refuseUnderReadOnly,
|
|
7417
7503
|
withoutProviderRefs,
|
|
7504
|
+
IMAGE_MODELS,
|
|
7505
|
+
DEFAULT_IMAGE_MODEL,
|
|
7506
|
+
imageModel,
|
|
7507
|
+
imageModelsDirectory,
|
|
7508
|
+
placedImage,
|
|
7509
|
+
isImageModelInstalled,
|
|
7418
7510
|
nextStep,
|
|
7419
7511
|
lineOf,
|
|
7420
7512
|
rootOf2,
|
|
7421
7513
|
commandAt,
|
|
7422
7514
|
runnable,
|
|
7515
|
+
failureSteps,
|
|
7423
7516
|
withLines,
|
|
7424
7517
|
stepLine,
|
|
7425
7518
|
answerSchema,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { createRequire as
|
|
2
|
-
const require =
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
__name
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
6
6
|
|
|
7
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/mcp/stdio-wire.js
|
|
8
8
|
import { PassThrough, Writable } from "node:stream";
|
|
9
9
|
var lineReader = /* @__PURE__ */ __name((onMessage) => {
|
|
10
10
|
let rest = "";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { createRequire as
|
|
2
|
-
const require =
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
CliError,
|
|
5
5
|
check,
|
|
6
6
|
pipe,
|
|
7
7
|
string
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-67SRVSPU.js";
|
|
9
9
|
import {
|
|
10
10
|
__name
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
12
12
|
|
|
13
13
|
// dist/proxy.js
|
|
14
14
|
var SHAPES = "socks5://host:port, http://host:port, https://host:port or an MTProxy link (tg://proxy?server=\u2026)";
|