@wirecat/tg-cli 0.118.0 → 0.120.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 +7623 -0
- package/dist/bin/tg.js +2 -2
- package/dist/bot/transport.d.ts.map +1 -1
- package/dist/bot/transport.js +15 -8
- package/dist/bot/transport.js.map +1 -1
- package/dist/bundle/{adapter-4YNP6VCO.js → adapter-OJKHXGBC.js} +49 -50
- package/dist/bundle/{all-profiles-MIQDYAGO.js → all-profiles-URIWNL23.js} +10 -10
- package/dist/bundle/{anthropic-NTASPJYE.js → anthropic-YUKNB63B.js} +10 -8
- package/dist/bundle/{app-server-UJZBJ2SK.js → app-server-H5QNHGH4.js} +43 -43
- package/dist/bundle/{bot-api-JZAD4L3N.js → bot-api-27GN4Y3D.js} +49 -49
- package/dist/bundle/{bot-history-OUDHH3NU.js → bot-history-VVSWLVZM.js} +18 -18
- package/dist/bundle/{bun-EC4HDIRD.js → bun-PAAJX3GU.js} +2 -2
- package/dist/bundle/{bun-sqlite-A4HJR6KO.js → bun-sqlite-TPEBWFZH.js} +5 -5
- package/dist/bundle/{chunk-KEDHX6XG.js → chunk-34DSPJNN.js} +2 -2
- package/dist/bundle/{chunk-JZETEZHC.js → chunk-3FPFRDG2.js} +10 -8
- package/dist/bundle/{chunk-2KQHUBTV.js → chunk-3GLLWDM6.js} +12 -12
- package/dist/bundle/{chunk-NMT2VGEI.js → chunk-3SANNNWS.js} +3 -3
- package/dist/bundle/{chunk-65XV5PPI.js → chunk-4JATS2J5.js} +3 -3
- package/dist/bundle/{chunk-OTQDJUES.js → chunk-4OWY7QBE.js} +6 -6
- package/dist/bundle/{chunk-QOGYHU3Q.js → chunk-4W4EVVL4.js} +61 -21
- package/dist/bundle/{chunk-BNEP5EOV.js → chunk-6XHZV7AQ.js} +4 -4
- package/dist/bundle/{chunk-3MQOLYAN.js → chunk-7DPWVKYS.js} +4 -4
- package/dist/bundle/{chunk-NUCDEOFC.js → chunk-7I6YVQHW.js} +2 -2
- package/dist/bundle/{chunk-HJNRIK5X.js → chunk-7N4IUEX3.js} +9 -8
- package/dist/bundle/{chunk-RG2E7ZQZ.js → chunk-7VNV426X.js} +85 -17
- package/dist/bundle/{chunk-DSZJREEO.js → chunk-7WS3ULOO.js} +2205 -911
- package/dist/bundle/{chunk-TMTEWOQS.js → chunk-B7B65ZLU.js} +5 -3
- package/dist/bundle/{chunk-EPXVRJAX.js → chunk-CGUDXNJE.js} +2 -2
- package/dist/bundle/{chunk-EQJ6NLF5.js → chunk-CLTMVPGT.js} +13 -13
- package/dist/bundle/{chunk-6ZMTEUVU.js → chunk-CLURRDNU.js} +6 -6
- package/dist/bundle/{chunk-ZXXTJF4Z.js → chunk-CYWV2RLN.js} +4 -4
- package/dist/bundle/{chunk-5IIU7X4S.js → chunk-D2WNQJUQ.js} +1 -1
- package/dist/bundle/{chunk-PB252TT3.js → chunk-DDKFAUQD.js} +2 -2
- package/dist/bundle/{chunk-5LDWBEWU.js → chunk-DE7QIEUP.js} +53 -35
- package/dist/bundle/{chunk-JPVFYMSQ.js → chunk-DH7VKHTZ.js} +4 -4
- package/dist/bundle/{chunk-GXCJ47SJ.js → chunk-DQTQO6PB.js} +3265 -1034
- package/dist/bundle/{chunk-JWIUK3SK.js → chunk-FATTEYZH.js} +2 -2
- package/dist/bundle/{chunk-I4TI5HDJ.js → chunk-FPWXG53C.js} +11 -11
- package/dist/bundle/{chunk-PO74BDER.js → chunk-H5XC2WYO.js} +35 -589
- package/dist/bundle/{chunk-ZMUC3UQO.js → chunk-HDSKBXAF.js} +3 -3
- package/dist/bundle/{chunk-PWCQC56A.js → chunk-HIBYYKGO.js} +1 -1
- package/dist/bundle/{chunk-GLRRCKP6.js → chunk-JJY3TQTM.js} +23 -5
- package/dist/bundle/{chunk-YPRUWRKE.js → chunk-JQLGS3SG.js} +1 -1
- package/dist/bundle/{chunk-MBH7IKLT.js → chunk-JSEIT2WO.js} +1 -1
- package/dist/bundle/{chunk-57LKX6N2.js → chunk-KLHOQ6XQ.js} +1 -1
- package/dist/bundle/{chunk-4BV4UMBB.js → chunk-KP26Y5OA.js} +1628 -367
- package/dist/bundle/{chunk-MZNOASAW.js → chunk-KRCMKFUV.js} +16 -3
- package/dist/bundle/{chunk-6AXUEJGL.js → chunk-KTV5Y5EX.js} +2 -2
- package/dist/bundle/{chunk-YEOSV6JC.js → chunk-KW6JZGG3.js} +1 -1
- package/dist/bundle/{chunk-H6S3C3MH.js → chunk-LLCGOZ44.js} +4 -4
- package/dist/bundle/{chunk-CEY43D3A.js → chunk-LS72R7DN.js} +34 -34
- package/dist/bundle/chunk-LVGX7VTD.js +138 -0
- package/dist/bundle/{chunk-VW6BF6M7.js → chunk-MCPOZNWG.js} +1 -1
- package/dist/bundle/{chunk-G3RT2EQI.js → chunk-MMPISXSU.js} +2 -2
- package/dist/bundle/{chunk-6RI4TEIC.js → chunk-MTD6WZKV.js} +2 -2
- package/dist/bundle/{chunk-JLJKGKU2.js → chunk-PDYTNTQI.js} +6 -6
- package/dist/bundle/{chunk-P3ASN72F.js → chunk-RX5CJ55S.js} +1 -1
- package/dist/bundle/{chunk-76EKXFX2.js → chunk-S6OC367D.js} +24 -2
- package/dist/bundle/{chunk-PW3HFIJA.js → chunk-THJHYMFR.js} +1489 -1548
- package/dist/bundle/{chunk-5QYU7B27.js → chunk-U2TPRUWK.js} +689 -482
- package/dist/bundle/{chunk-YHZFGUAP.js → chunk-U6HEZPCR.js} +19 -19
- package/dist/bundle/{chunk-BXTDAGM4.js → chunk-VUBZFMGP.js} +2 -2
- package/dist/bundle/{chunk-2NA5KVP6.js → chunk-VUUR2SRS.js} +264 -45
- package/dist/bundle/{chunk-EPCFXKTX.js → chunk-WGGSFGNZ.js} +34 -8
- package/dist/bundle/{chunk-Y64SI2RO.js → chunk-WLBPNLDF.js} +3 -3
- package/dist/bundle/{chunk-GI4MTNA2.js → chunk-WQ55F4Y3.js} +8 -8
- package/dist/bundle/{chunk-FHMK6OK4.js → chunk-YBOVL25O.js} +96 -30
- package/dist/bundle/{chunk-DKFC5ZZ3.js → chunk-YDROJG2Y.js} +86 -29
- package/dist/bundle/{chunk-NKFTZVQU.js → chunk-YQKEPT22.js} +1 -1
- package/dist/bundle/{chunk-GIM37COQ.js → chunk-ZON7K5QE.js} +3 -3
- package/dist/bundle/{chunk-JWPSVS6C.js → chunk-ZRRZTPSB.js} +19059 -17055
- package/dist/bundle/command-contract-KW6FNOJO.js +33 -0
- package/dist/bundle/{decode-NMNPLKNR.js → decode-RVWSCZW4.js} +5 -5
- package/dist/bundle/{dispatch-OP27MWX5.js → dispatch-U2DW6UI7.js} +10 -10
- package/dist/bundle/{echarts-S46LEIPS.js → echarts-6VNUD3JF.js} +2 -2
- package/dist/bundle/{embed-I5ZYHGYC.js → embed-LWLCQKIK.js} +6 -6
- package/dist/bundle/{embedder-LTJI67N2.js → embedder-CXKHLRJT.js} +9 -9
- package/dist/bundle/{entry-O6BUPXF7.js → entry-HV4NSX3Z.js} +7 -7
- package/dist/bundle/{failure-4JUQFXJT.js → failure-HJD7S5UA.js} +2 -2
- package/dist/bundle/{first-run-PMZNCDGD.js → first-run-OPI6NIWQ.js} +11 -11
- package/dist/bundle/first-screen-BVQLF4LN.js +31 -0
- package/dist/bundle/{instructions-AUEGY3VO.js → instructions-TK4HXL3A.js} +1 -1
- package/dist/bundle/{mcp-M4QN2E7R.js → mcp-7KQUJNFN.js} +2 -2
- package/dist/bundle/{node-XRA7RBCQ.js → node-WFPNBUCU.js} +2 -2
- package/dist/bundle/{node-sqlite-DEZO6LRS.js → node-sqlite-L5BRGJLK.js} +6 -6
- package/dist/bundle/{oauth-DAVC7WCD.js → oauth-CGVWL35B.js} +7 -7
- package/dist/bundle/{open-DE2YO4T7.js → open-HLL55C5S.js} +5 -5
- package/dist/bundle/{openai-5BKGAULH.js → openai-YFCNXIJ4.js} +16 -37
- package/dist/bundle/{process-4ZHPNUIQ.js → process-4A5JP5LO.js} +1 -1
- package/dist/bundle/{program-EGTKSNB4.js → program-IFGQGSUF.js} +56 -53
- package/dist/bundle/{prompt-HWCWHHPE.js → prompt-B5FYE2DQ.js} +7 -5
- package/dist/bundle/{proxy-transport-4DPZB2W2.js → proxy-transport-ENU2SJYT.js} +5 -5
- package/dist/bundle/{recognize-NG6RXNGF.js → recognize-ZHMHGIV3.js} +4 -4
- package/dist/bundle/{remote-ZKXIIGYH.js → remote-A3W5HE52.js} +7 -7
- package/dist/bundle/{rerank-TX5QFURV.js → rerank-HWJAQOZM.js} +7 -7
- package/dist/bundle/{serve-XAS6DECW.js → serve-PP326Q2F.js} +9 -9
- package/dist/bundle/{server-CNPIWBYU.js → server-MV6CL63L.js} +35 -35
- package/dist/bundle/server-TZGGOJ26.js +60 -0
- package/dist/bundle/{state-3HTUETTS.js → state-Y3RJ7ZXB.js} +6 -6
- package/dist/bundle/{store-B5VZWJHN.js → store-EVNI2MHZ.js} +36 -13
- package/dist/bundle/store-maintenance-command-XPQE47RE.js +49 -0
- package/dist/bundle/tg.js +38 -14
- package/dist/commands/account-removal.d.ts +3 -0
- package/dist/commands/account-removal.d.ts.map +1 -0
- package/dist/commands/account-removal.js +57 -0
- package/dist/commands/account-removal.js.map +1 -0
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js +2 -0
- package/dist/commands/context.js.map +1 -1
- package/dist/http.d.ts +6 -0
- package/dist/http.d.ts.map +1 -0
- package/dist/http.js +8 -0
- package/dist/http.js.map +1 -0
- package/dist/identity.d.ts +4 -0
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +14 -0
- package/dist/identity.js.map +1 -1
- package/dist/telegram/map.d.ts.map +1 -1
- package/dist/telegram/map.js +3 -0
- package/dist/telegram/map.js.map +1 -1
- package/dist/telegram/registration.d.ts +1 -1
- package/dist/telegram/registration.d.ts.map +1 -1
- package/dist/telegram/registration.js +4 -1
- package/dist/telegram/registration.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/wcat.d.ts +3 -0
- package/dist/wcat.d.ts.map +1 -0
- package/dist/wcat.js +4 -0
- package/dist/wcat.js.map +1 -0
- package/package.json +7 -6
- package/dist/bundle/chunk-TSTEZNSX.js +0 -33
- package/dist/bundle/command-contract-7GZ6HAA6.js +0 -33
- package/dist/bundle/first-screen-BGML5DSO.js +0 -31
- package/dist/bundle/server-FRTKLHZF.js +0 -60
- package/dist/bundle/store-maintenance-command-VG3CLELA.js +0 -50
- /package/dist/bundle/{chunk-VOXIGICJ.js → chunk-YVNHQFLC.js} +0 -0
|
@@ -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-WGGSFGNZ.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.120.0";
|
|
30
30
|
|
|
31
31
|
// dist/identity.js
|
|
32
32
|
var TG = {
|
|
@@ -39,8 +39,21 @@ var TG = {
|
|
|
39
39
|
locale: "en-GB",
|
|
40
40
|
errors: { reasons: REASONS, details: ["migrated_chat_id", "proxy"] }
|
|
41
41
|
};
|
|
42
|
+
var DESKTOP = {
|
|
43
|
+
...TG,
|
|
44
|
+
docs: "https://github.com/WireCatLabs/tg-cli#readme",
|
|
45
|
+
tagline: "Your Telegram account, searchable on your computer",
|
|
46
|
+
syncs: "chats and their messages",
|
|
47
|
+
signIn: {
|
|
48
|
+
gives: "Lets your agent read your Telegram chats, and send messages when you allow it.",
|
|
49
|
+
asks: "Your phone number and the code Telegram sends, and an app ID from my.telegram.org."
|
|
50
|
+
},
|
|
51
|
+
hosts: ["api.telegram.org", "my.telegram.org"],
|
|
52
|
+
userHosts: "the proxy you set for Telegram, if any"
|
|
53
|
+
};
|
|
42
54
|
|
|
43
55
|
export {
|
|
44
56
|
VERSION,
|
|
45
|
-
TG
|
|
57
|
+
TG,
|
|
58
|
+
DESKTOP
|
|
46
59
|
};
|
|
@@ -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-VUBZFMGP.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.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/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();
|
|
@@ -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.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/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.",
|
|
@@ -7,18 +7,18 @@ import {
|
|
|
7
7
|
describeOptions,
|
|
8
8
|
keyForCommand,
|
|
9
9
|
metaOf
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-THJHYMFR.js";
|
|
11
11
|
import {
|
|
12
12
|
jsonSchemaOf
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-WGGSFGNZ.js";
|
|
14
14
|
import {
|
|
15
15
|
CliError
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-VUBZFMGP.js";
|
|
17
17
|
import {
|
|
18
18
|
__name
|
|
19
19
|
} from "./chunk-ZVVMGPBJ.js";
|
|
20
20
|
|
|
21
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/cli/command-contract.js
|
|
22
22
|
var SCHEMA_DIALECT = "https://json-schema.org/draft/2020-12/schema";
|
|
23
23
|
var outputOf = /* @__PURE__ */ __name((command) => {
|
|
24
24
|
const entity = answerEntitySchema(command);
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
tool,
|
|
21
21
|
toolKey,
|
|
22
22
|
toolsFromCommands
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-VUUR2SRS.js";
|
|
24
24
|
import {
|
|
25
25
|
CHART_KINDS,
|
|
26
26
|
CHART_SIZE,
|
|
@@ -34,43 +34,43 @@ import {
|
|
|
34
34
|
registerPrompts,
|
|
35
35
|
stdinFieldOf,
|
|
36
36
|
syncsFirst
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-DE7QIEUP.js";
|
|
38
38
|
import {
|
|
39
39
|
agentJson,
|
|
40
40
|
skillResource
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-7VNV426X.js";
|
|
42
42
|
import {
|
|
43
43
|
instructions
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-YQKEPT22.js";
|
|
45
45
|
import {
|
|
46
46
|
answeredWire
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-JSEIT2WO.js";
|
|
48
48
|
import {
|
|
49
49
|
StdioServerTransport,
|
|
50
50
|
callerOf,
|
|
51
51
|
callingAgent,
|
|
52
52
|
serveStdio
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-34DSPJNN.js";
|
|
54
54
|
import {
|
|
55
55
|
McpServer,
|
|
56
56
|
ResourceTemplate
|
|
57
57
|
} from "./chunk-5D4AEUVA.js";
|
|
58
58
|
import {
|
|
59
|
-
connectedFor
|
|
60
|
-
|
|
61
|
-
} from "./chunk-PO74BDER.js";
|
|
59
|
+
connectedFor
|
|
60
|
+
} from "./chunk-H5XC2WYO.js";
|
|
62
61
|
import {
|
|
63
62
|
capability,
|
|
64
63
|
dateWindow,
|
|
64
|
+
guardFor,
|
|
65
65
|
imageSize,
|
|
66
66
|
lackedNeed,
|
|
67
67
|
servicesFor,
|
|
68
68
|
storedDeps,
|
|
69
69
|
wholeList
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-7WS3ULOO.js";
|
|
71
71
|
import {
|
|
72
72
|
findCommand
|
|
73
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-LLCGOZ44.js";
|
|
74
74
|
import {
|
|
75
75
|
DEFAULT_OUTPUT_BYTES,
|
|
76
76
|
changesAuthorityAt,
|
|
@@ -84,31 +84,31 @@ import {
|
|
|
84
84
|
recalledAccount,
|
|
85
85
|
rootOf2 as rootOf,
|
|
86
86
|
sealed,
|
|
87
|
-
snakeKeys
|
|
88
|
-
|
|
89
|
-
} from "./chunk-PW3HFIJA.js";
|
|
87
|
+
snakeKeys
|
|
88
|
+
} from "./chunk-THJHYMFR.js";
|
|
90
89
|
import {
|
|
91
90
|
withCaller
|
|
92
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-3FPFRDG2.js";
|
|
93
92
|
import {
|
|
94
93
|
readOnlyLockOf
|
|
95
|
-
} from "./chunk-
|
|
94
|
+
} from "./chunk-DDKFAUQD.js";
|
|
96
95
|
import {
|
|
97
96
|
mcpHttpMarker
|
|
98
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-CYWV2RLN.js";
|
|
99
98
|
import {
|
|
100
99
|
openStore,
|
|
101
100
|
pdfPreviewLimits
|
|
102
|
-
} from "./chunk-
|
|
101
|
+
} from "./chunk-ZRRZTPSB.js";
|
|
103
102
|
import {
|
|
104
|
-
timezoneOf
|
|
105
|
-
|
|
103
|
+
timezoneOf,
|
|
104
|
+
typedCommand
|
|
105
|
+
} from "./chunk-KP26Y5OA.js";
|
|
106
106
|
import {
|
|
107
107
|
isCliFailure
|
|
108
|
-
} from "./chunk-
|
|
108
|
+
} from "./chunk-WLBPNLDF.js";
|
|
109
109
|
import {
|
|
110
110
|
warmEmbedders
|
|
111
|
-
} from "./chunk-
|
|
111
|
+
} from "./chunk-4OWY7QBE.js";
|
|
112
112
|
import {
|
|
113
113
|
description,
|
|
114
114
|
integer,
|
|
@@ -124,19 +124,19 @@ import {
|
|
|
124
124
|
regex,
|
|
125
125
|
strictObject,
|
|
126
126
|
string
|
|
127
|
-
} from "./chunk-
|
|
127
|
+
} from "./chunk-WGGSFGNZ.js";
|
|
128
128
|
import {
|
|
129
129
|
CliError,
|
|
130
130
|
visibleControls
|
|
131
|
-
} from "./chunk-
|
|
131
|
+
} from "./chunk-VUBZFMGP.js";
|
|
132
132
|
import {
|
|
133
133
|
__name
|
|
134
134
|
} from "./chunk-ZVVMGPBJ.js";
|
|
135
135
|
|
|
136
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
136
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/mcp/server.js
|
|
137
137
|
import { randomUUID } from "node:crypto";
|
|
138
138
|
|
|
139
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
139
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/mcp/agent-log.js
|
|
140
140
|
var agentLog = /* @__PURE__ */ __name((open) => {
|
|
141
141
|
let held;
|
|
142
142
|
return {
|
|
@@ -155,7 +155,7 @@ var agentLog = /* @__PURE__ */ __name((open) => {
|
|
|
155
155
|
};
|
|
156
156
|
}, "agentLog");
|
|
157
157
|
|
|
158
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
158
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/mcp/resources.js
|
|
159
159
|
var LISTED = 100;
|
|
160
160
|
var registerResources = /* @__PURE__ */ __name((server, session, { command, name, limit, recorded, withStore, messenger, guard, assertRead }) => {
|
|
161
161
|
server.registerResource("chat", new ResourceTemplate(`${command}://chat/{id}`, {
|
|
@@ -193,7 +193,7 @@ var registerResources = /* @__PURE__ */ __name((server, session, { command, name
|
|
|
193
193
|
});
|
|
194
194
|
}, "registerResources");
|
|
195
195
|
|
|
196
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
196
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/mcp/session.js
|
|
197
197
|
var HARMLESS = /* @__PURE__ */ new Set(["validation_error", "not_found", "permission_error", "confirmation_required", "rate_limited"]);
|
|
198
198
|
var harmless = /* @__PURE__ */ __name((code) => HARMLESS.has(code), "harmless");
|
|
199
199
|
var MessengerSession = class {
|
|
@@ -268,7 +268,7 @@ var MessengerSession = class {
|
|
|
268
268
|
}
|
|
269
269
|
};
|
|
270
270
|
|
|
271
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
271
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/mcp/tools/attachments.js
|
|
272
272
|
var attachmentsTools = /* @__PURE__ */ __name((messenger) => {
|
|
273
273
|
const _command = messenger.app.command;
|
|
274
274
|
return {
|
|
@@ -322,7 +322,7 @@ var attachmentsTools = /* @__PURE__ */ __name((messenger) => {
|
|
|
322
322
|
};
|
|
323
323
|
}, "attachmentsTools");
|
|
324
324
|
|
|
325
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
325
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/mcp/tools/messages-photo.js
|
|
326
326
|
var PHOTO_LIMIT = 512 * 1024;
|
|
327
327
|
var IMAGE_TYPES = [
|
|
328
328
|
["image/jpeg", (b) => b[0] === 255 && b[1] === 216 && b[2] === 255],
|
|
@@ -376,7 +376,7 @@ var readUpTo = /* @__PURE__ */ __name(async (file, limit, saveIt) => {
|
|
|
376
376
|
return new Uint8Array(Buffer.concat(chunks));
|
|
377
377
|
}, "readUpTo");
|
|
378
378
|
|
|
379
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
379
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/mcp/tools/stats.js
|
|
380
380
|
var statsTools = /* @__PURE__ */ __name((messenger) => ({
|
|
381
381
|
stats_charts: tool({
|
|
382
382
|
title: "A chart from a chat's statistics",
|
|
@@ -413,14 +413,14 @@ var statsTools = /* @__PURE__ */ __name((messenger) => ({
|
|
|
413
413
|
})
|
|
414
414
|
}), "statsTools");
|
|
415
415
|
|
|
416
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
416
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/mcp/tools.js
|
|
417
417
|
var pictureTools = /* @__PURE__ */ __name((messenger) => Object.fromEntries(Object.entries({
|
|
418
418
|
...messagesPhotoTools(messenger),
|
|
419
419
|
...attachmentsTools(messenger),
|
|
420
420
|
...statsTools(messenger)
|
|
421
421
|
}).map(([name, definition]) => [name, { ...definition, input: strictObject(definition.input.entries) }])), "pictureTools");
|
|
422
422
|
|
|
423
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
423
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/mcp/server.js
|
|
424
424
|
var PER_RUN = /* @__PURE__ */ new Set([
|
|
425
425
|
"streams",
|
|
426
426
|
"stdin",
|
|
@@ -744,7 +744,7 @@ var serveOverStdio = /* @__PURE__ */ __name(async (command, context, messenger,
|
|
|
744
744
|
}, "serveOverStdio");
|
|
745
745
|
var serveOverHttpUntilStopped = /* @__PURE__ */ __name(async (command, context, messenger, options, http) => {
|
|
746
746
|
const { session, embedders, build, log } = createServer(command, context, messenger, options);
|
|
747
|
-
const { serveOverHttp } = await import("./serve-
|
|
747
|
+
const { serveOverHttp } = await import("./serve-PP326Q2F.js");
|
|
748
748
|
const appName = messenger.app.command;
|
|
749
749
|
const appEnvPrefix = messenger.app.envPrefix;
|
|
750
750
|
const listening = await serveOverHttp(build, {
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
CliError,
|
|
5
|
+
isCliError
|
|
6
|
+
} from "./chunk-VUBZFMGP.js";
|
|
7
|
+
import {
|
|
8
|
+
__name
|
|
9
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
10
|
+
|
|
11
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/http/hosts.js
|
|
12
|
+
var LABEL = "[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?";
|
|
13
|
+
var HOST_PATTERN = new RegExp(`^(?:${LABEL}(?:\\.${LABEL})*|\\*\\.${LABEL}(?:\\.${LABEL})+)$`);
|
|
14
|
+
var hostProblems = /* @__PURE__ */ __name((hosts) => [
|
|
15
|
+
...hosts.filter((host) => !HOST_PATTERN.test(host) || host.length > 253).map((host) => `${JSON.stringify(host)} is not a host: a lower-case hostname with no scheme, port or path, or one leading *. before two labels or more`),
|
|
16
|
+
...hosts.filter((host, at) => hosts.indexOf(host) !== at).map((host) => `${JSON.stringify(host)} is listed twice`)
|
|
17
|
+
], "hostProblems");
|
|
18
|
+
var hostCovered = /* @__PURE__ */ __name((hostname, hosts) => {
|
|
19
|
+
const name = hostname.toLowerCase().replace(/\.$/, "");
|
|
20
|
+
return hosts.some((host) => host.startsWith("*.") ? name.endsWith(host.slice(1)) : name === host);
|
|
21
|
+
}, "hostCovered");
|
|
22
|
+
|
|
23
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/http/fetch.js
|
|
24
|
+
var HOST_FETCH_TIMEOUT_MS = 3e4;
|
|
25
|
+
var REDIRECTS = 5;
|
|
26
|
+
var REDIRECT_STATUSES = /* @__PURE__ */ new Set([301, 302, 303, 307, 308]);
|
|
27
|
+
var CREDENTIAL_HEADERS = ["authorization", "cookie", "proxy-authorization"];
|
|
28
|
+
var NO_BODY = /* @__PURE__ */ new Set([204, 205, 304]);
|
|
29
|
+
var deadline = /* @__PURE__ */ __name((ms) => {
|
|
30
|
+
const controller = new AbortController();
|
|
31
|
+
const timer = setTimeout(() => controller.abort(new DOMException(`no answer within ${ms} ms`, "TimeoutError")), ms);
|
|
32
|
+
timer.unref?.();
|
|
33
|
+
return { signal: controller.signal, clear: /* @__PURE__ */ __name(() => clearTimeout(timer), "clear") };
|
|
34
|
+
}, "deadline");
|
|
35
|
+
var released = /* @__PURE__ */ __name((response, clear) => {
|
|
36
|
+
if (!response.body || NO_BODY.has(response.status) || response.status < 200 || response.status > 599) {
|
|
37
|
+
clear();
|
|
38
|
+
return response;
|
|
39
|
+
}
|
|
40
|
+
const { status, statusText, headers, url, redirected } = response;
|
|
41
|
+
const wrapped = new Response(response.body.pipeThrough(new TransformStream({ flush: clear })), {
|
|
42
|
+
status,
|
|
43
|
+
statusText,
|
|
44
|
+
headers
|
|
45
|
+
});
|
|
46
|
+
return Object.defineProperties(wrapped, { url: { value: url }, redirected: { value: redirected } });
|
|
47
|
+
}, "released");
|
|
48
|
+
var undeclared = /* @__PURE__ */ __name((url) => new CliError("configuration_error", `${url.hostname} is not a host this CLI declares: add "${url.hostname}" to \`hosts\` in its WCAT identity and run cli-dev manifest`, { reason: "network.host-undeclared", sent: false }), "undeclared");
|
|
49
|
+
var checked = /* @__PURE__ */ __name((url, hosts) => {
|
|
50
|
+
if (url.protocol !== "https:" && url.protocol !== "http:")
|
|
51
|
+
throw new CliError("validation_error", `only http and https are fetched, not ${url.protocol.replace(/:$/, "")}`, {
|
|
52
|
+
sent: false
|
|
53
|
+
});
|
|
54
|
+
if (!hostCovered(url.hostname, hosts))
|
|
55
|
+
throw undeclared(url);
|
|
56
|
+
return url;
|
|
57
|
+
}, "checked");
|
|
58
|
+
var hostFetch = /* @__PURE__ */ __name((options) => {
|
|
59
|
+
const problems = hostProblems(options.hosts);
|
|
60
|
+
if (problems.length > 0)
|
|
61
|
+
throw new CliError("configuration_error", problems.join("; "));
|
|
62
|
+
const { hosts, fetch: send = globalThis.fetch, timeoutMs = HOST_FETCH_TIMEOUT_MS, redirects = REDIRECTS } = options;
|
|
63
|
+
return async (input, init = {}) => {
|
|
64
|
+
const request = input instanceof Request ? input : void 0;
|
|
65
|
+
let url = checked(new URL(request?.url ?? String(input)), hosts);
|
|
66
|
+
const caller = init.signal ?? request?.signal;
|
|
67
|
+
const timeout = deadline(timeoutMs);
|
|
68
|
+
const signal = caller ? AbortSignal.any([caller, timeout.signal]) : timeout.signal;
|
|
69
|
+
const follow = (init.redirect ?? request?.redirect ?? "follow") === "follow";
|
|
70
|
+
let method = (init.method ?? request?.method ?? "GET").toUpperCase();
|
|
71
|
+
let body = init.body ?? request?.body ?? void 0;
|
|
72
|
+
const headers = new Headers(init.headers ?? request?.headers);
|
|
73
|
+
try {
|
|
74
|
+
let response = await send(input, { ...init, signal, ...follow ? { redirect: "manual" } : {} });
|
|
75
|
+
for (let hop = 0; follow && REDIRECT_STATUSES.has(response.status); hop += 1) {
|
|
76
|
+
const location = response.headers.get("location");
|
|
77
|
+
if (!location)
|
|
78
|
+
return released(response, timeout.clear);
|
|
79
|
+
if (hop >= redirects)
|
|
80
|
+
throw new CliError("invalid_response", `more than ${redirects} redirects from ${url.hostname}`);
|
|
81
|
+
void response.body?.cancel().catch(() => {
|
|
82
|
+
});
|
|
83
|
+
const next = checked(new URL(location, url), hosts);
|
|
84
|
+
if (response.status === 303 || (response.status === 301 || response.status === 302) && method === "POST") {
|
|
85
|
+
method = method === "HEAD" ? "HEAD" : "GET";
|
|
86
|
+
body = void 0;
|
|
87
|
+
headers.delete("content-type");
|
|
88
|
+
headers.delete("content-length");
|
|
89
|
+
} else if (body instanceof ReadableStream)
|
|
90
|
+
throw new CliError("invalid_response", `${url.hostname} redirected a streamed body, which cannot be sent again`);
|
|
91
|
+
if (next.origin !== url.origin)
|
|
92
|
+
for (const name of CREDENTIAL_HEADERS)
|
|
93
|
+
headers.delete(name);
|
|
94
|
+
url = next;
|
|
95
|
+
response = await send(url, { ...init, method, headers, body, signal, redirect: "manual" });
|
|
96
|
+
}
|
|
97
|
+
return released(response, timeout.clear);
|
|
98
|
+
} catch (error) {
|
|
99
|
+
timeout.clear();
|
|
100
|
+
if (isCliError(error))
|
|
101
|
+
throw error;
|
|
102
|
+
if (caller?.aborted)
|
|
103
|
+
throw isCliError(caller.reason) ? caller.reason : new CliError("cancelled", "request cancelled");
|
|
104
|
+
if (timeout.signal.aborted)
|
|
105
|
+
throw new CliError("timeout", `${url.hostname} did not answer within ${timeoutMs} ms`, { retryable: true });
|
|
106
|
+
throw new CliError("network_error", `${url.hostname} could not be reached`, { retryable: true });
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
}, "hostFetch");
|
|
110
|
+
|
|
111
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/http/index.js
|
|
112
|
+
var parseRetryAfter = /* @__PURE__ */ __name((header, now) => {
|
|
113
|
+
if (!header)
|
|
114
|
+
return void 0;
|
|
115
|
+
const trimmed = header.trim();
|
|
116
|
+
if (/^\d+$/.test(trimmed))
|
|
117
|
+
return Number(trimmed) * 1e3;
|
|
118
|
+
const at = Date.parse(trimmed);
|
|
119
|
+
if (Number.isNaN(at))
|
|
120
|
+
return void 0;
|
|
121
|
+
const delta = at - now().getTime();
|
|
122
|
+
return delta > 0 ? delta : void 0;
|
|
123
|
+
}, "parseRetryAfter");
|
|
124
|
+
var parseRateLimitReset = /* @__PURE__ */ __name((header, now) => {
|
|
125
|
+
if (!header)
|
|
126
|
+
return void 0;
|
|
127
|
+
const seconds = Number(header.trim());
|
|
128
|
+
if (!Number.isFinite(seconds))
|
|
129
|
+
return void 0;
|
|
130
|
+
const delta = seconds * 1e3 - now().getTime();
|
|
131
|
+
return delta > 0 ? delta : void 0;
|
|
132
|
+
}, "parseRateLimitReset");
|
|
133
|
+
var providerWaitMs = /* @__PURE__ */ __name((headers, now) => parseRetryAfter(headers.get("retry-after"), now) ?? parseRateLimitReset(headers.get("x-ratelimit-reset"), now), "providerWaitMs");
|
|
134
|
+
|
|
135
|
+
export {
|
|
136
|
+
hostFetch,
|
|
137
|
+
providerWaitMs
|
|
138
|
+
};
|
|
@@ -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.93.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");
|
|
@@ -2,12 +2,12 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
resolvePaths
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-U6HEZPCR.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.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/store/path.js
|
|
11
11
|
import { userInfo } from "node:os";
|
|
12
12
|
import { isAbsolute, join, relative, resolve } from "node:path";
|
|
13
13
|
var wirecatDirectory = /* @__PURE__ */ __name((env = process.env, platform) => resolvePaths({ appName: "WireCat", prefix: "WIRECAT", env, ...platform ? { platform } : {} }).state, "wirecatDirectory");
|
|
@@ -8,12 +8,12 @@ import {
|
|
|
8
8
|
ACCESS_SECONDS,
|
|
9
9
|
REFRESH_SECONDS,
|
|
10
10
|
readStored
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-CYWV2RLN.js";
|
|
12
12
|
import {
|
|
13
13
|
__name
|
|
14
14
|
} from "./chunk-ZVVMGPBJ.js";
|
|
15
15
|
|
|
16
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/mcp/http/oauth.js
|
|
17
17
|
import { createHash, randomBytes, randomInt, timingSafeEqual } from "node:crypto";
|
|
18
18
|
import { chmodSync, mkdirSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
19
19
|
import { dirname } from "node:path";
|
|
@@ -2,15 +2,15 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
PRAGMAS
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-KLHOQ6XQ.js";
|
|
6
6
|
import {
|
|
7
7
|
CliError
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-VUBZFMGP.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.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/store/sqlite-warning.js
|
|
14
14
|
var SQLITE_WARNING = "SQLite is an experimental feature";
|
|
15
15
|
var quieted = /* @__PURE__ */ new WeakSet();
|
|
16
16
|
var quietSqliteWarning = /* @__PURE__ */ __name((host = process) => {
|
|
@@ -31,7 +31,7 @@ var isSqliteWarning = /* @__PURE__ */ __name((warning, options) => {
|
|
|
31
31
|
return name === "ExperimentalWarning" && message.startsWith(SQLITE_WARNING);
|
|
32
32
|
}, "isSqliteWarning");
|
|
33
33
|
|
|
34
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/store/open.js
|
|
35
35
|
var openCache = /* @__PURE__ */ __name(async (path) => {
|
|
36
36
|
const database = await openFile(path);
|
|
37
37
|
try {
|
|
@@ -44,12 +44,12 @@ var openCache = /* @__PURE__ */ __name(async (path) => {
|
|
|
44
44
|
}, "openCache");
|
|
45
45
|
var openFile = /* @__PURE__ */ __name((path) => "Bun" in globalThis ? openUnderBun(path) : openUnderNode(path), "openFile");
|
|
46
46
|
var openUnderBun = /* @__PURE__ */ __name(async (path) => {
|
|
47
|
-
const { openWithBunSqlite } = await import("./bun-sqlite-
|
|
47
|
+
const { openWithBunSqlite } = await import("./bun-sqlite-TPEBWFZH.js");
|
|
48
48
|
return await openWithBunSqlite(path);
|
|
49
49
|
}, "openUnderBun");
|
|
50
50
|
var openUnderNode = /* @__PURE__ */ __name(async (path) => {
|
|
51
51
|
quietSqliteWarning();
|
|
52
|
-
const { openWithNodeSqlite } = await import("./node-sqlite-
|
|
52
|
+
const { openWithNodeSqlite } = await import("./node-sqlite-L5BRGJLK.js");
|
|
53
53
|
return openWithNodeSqlite(path);
|
|
54
54
|
}, "openUnderNode");
|
|
55
55
|
var runtime = /* @__PURE__ */ __name(() => {
|
|
@@ -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.93.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
|
|
8
8
|
var installerOf = /* @__PURE__ */ __name((scriptPath) => {
|
|
9
9
|
const path = scriptPath.replaceAll("\\", "/");
|
|
10
10
|
if (path.includes("/_npx/"))
|
|
@@ -1,13 +1,33 @@
|
|
|
1
1
|
import { createRequire as __bundleRequire } from "node:module";
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
finite,
|
|
5
|
+
getDotPath,
|
|
6
|
+
maxValue,
|
|
7
|
+
minValue,
|
|
8
|
+
number,
|
|
9
|
+
optional,
|
|
10
|
+
pipe,
|
|
11
|
+
safeParse
|
|
12
|
+
} from "./chunk-WGGSFGNZ.js";
|
|
3
13
|
import {
|
|
4
14
|
CliError
|
|
5
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-VUBZFMGP.js";
|
|
6
16
|
import {
|
|
7
17
|
__name
|
|
8
18
|
} from "./chunk-ZVVMGPBJ.js";
|
|
9
19
|
|
|
10
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/models/options.js
|
|
21
|
+
var checkedOptions = /* @__PURE__ */ __name((provider, schema, options) => {
|
|
22
|
+
const parsed = safeParse(schema, options);
|
|
23
|
+
if (!parsed.success) {
|
|
24
|
+
throw new CliError("validation_error", `${provider} option ${getDotPath(parsed.issues[0]) ?? "options"} is unknown or has the wrong type`);
|
|
25
|
+
}
|
|
26
|
+
return parsed.output;
|
|
27
|
+
}, "checkedOptions");
|
|
28
|
+
var range = /* @__PURE__ */ __name((min, max) => optional(pipe(number(), finite(), minValue(min), maxValue(max))), "range");
|
|
29
|
+
|
|
30
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/models/types.js
|
|
11
31
|
var MAX_MODEL_IMAGE_BYTES = 4 * 1024 * 1024;
|
|
12
32
|
var validateImages = /* @__PURE__ */ __name((images) => {
|
|
13
33
|
if (images === void 0)
|
|
@@ -38,6 +58,8 @@ var systemFor = /* @__PURE__ */ __name((request) => [
|
|
|
38
58
|
].filter((one) => one !== void 0).join("\n"), "systemFor");
|
|
39
59
|
|
|
40
60
|
export {
|
|
61
|
+
checkedOptions,
|
|
62
|
+
range,
|
|
41
63
|
MAX_MODEL_IMAGE_BYTES,
|
|
42
64
|
validateImages,
|
|
43
65
|
messagesFor,
|