@wirecat/tg-cli 0.117.0 → 0.119.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 +7621 -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-VNQ72MBK.js → adapter-NEQQOANM.js} +47 -48
- package/dist/bundle/{all-profiles-3W2UQTCK.js → all-profiles-QFT46FTF.js} +10 -10
- package/dist/bundle/{anthropic-DFUW2KTG.js → anthropic-UJ4RYCWU.js} +10 -8
- package/dist/bundle/{app-server-5XJIMLHB.js → app-server-NE3EL5IK.js} +43 -43
- package/dist/bundle/{bot-api-HRRBF3W6.js → bot-api-D4H5SCP5.js} +49 -49
- package/dist/bundle/{bot-history-GBH5XE4N.js → bot-history-KF2PUMWA.js} +18 -18
- package/dist/bundle/{bun-ZMOYGG6F.js → bun-F7MH5YKA.js} +2 -2
- package/dist/bundle/{bun-sqlite-6FZFMA7K.js → bun-sqlite-FYDJXUHF.js} +5 -5
- package/dist/bundle/{chunk-HZZGOLGP.js → chunk-23JGV5FQ.js} +11 -11
- package/dist/bundle/{chunk-PTIB7NEE.js → chunk-2BAJ6ORN.js} +1 -1
- package/dist/bundle/{chunk-L5WNE4WS.js → chunk-3EQ7USKJ.js} +2 -2
- package/dist/bundle/{chunk-YIXXH74F.js → chunk-3K65KTXD.js} +16 -3
- package/dist/bundle/{chunk-66FZBLRJ.js → chunk-4AACB23H.js} +13 -13
- package/dist/bundle/{chunk-NUCDEOFC.js → chunk-5EHJWIW4.js} +2 -2
- package/dist/bundle/{chunk-VW6BF6M7.js → chunk-5FEEFXJA.js} +1 -1
- package/dist/bundle/{chunk-HWYSRB64.js → chunk-65BWMPCI.js} +2 -2
- package/dist/bundle/{chunk-Q7O4CQDO.js → chunk-6ERQJRL2.js} +2 -2
- package/dist/bundle/{chunk-3GRX7WP6.js → chunk-6K5R3YPN.js} +2 -2
- package/dist/bundle/{chunk-KVTLT4V7.js → chunk-6OE5I3PR.js} +6 -6
- package/dist/bundle/{chunk-B2YPB5AE.js → chunk-72QLHHSO.js} +93 -29
- package/dist/bundle/{chunk-FEKXHILZ.js → chunk-7C6POLLO.js} +1 -1
- package/dist/bundle/{chunk-F6KBVIJP.js → chunk-7VUNJDYU.js} +22 -14
- package/dist/bundle/{chunk-EZTYJ43A.js → chunk-BXIPT2BO.js} +1 -1
- package/dist/bundle/{chunk-GFHNQBD2.js → chunk-CIDFV3IT.js} +1 -1
- package/dist/bundle/{chunk-C6TUVV7E.js → chunk-CX2WCEQU.js} +552 -222
- package/dist/bundle/{chunk-UYK5AXSW.js → chunk-D4Y2KL5V.js} +4 -4
- package/dist/bundle/{chunk-EL6I4WTB.js → chunk-D6YTBJY6.js} +1 -1
- package/dist/bundle/{chunk-X3CD475M.js → chunk-DQELQ7BL.js} +419 -198
- package/dist/bundle/{chunk-4JDGN6OD.js → chunk-F223KYWG.js} +1 -1
- package/dist/bundle/{chunk-RDH2QBUE.js → chunk-FJKP6MMP.js} +5 -3
- package/dist/bundle/{chunk-2452HCIV.js → chunk-FQ3C6DFV.js} +3 -3
- package/dist/bundle/{chunk-7Y3RUEVY.js → chunk-FQZSS3AB.js} +6 -6
- package/dist/bundle/{chunk-V47NPSSV.js → chunk-FRW3CWC7.js} +31 -29
- package/dist/bundle/{chunk-AG6HWPQP.js → chunk-G3MQOH6Z.js} +3 -3
- package/dist/bundle/{chunk-RDSLSV4M.js → chunk-HGMMRT4G.js} +2 -2
- package/dist/bundle/{chunk-SQXB5ZUZ.js → chunk-HPQQ76WF.js} +23 -5
- package/dist/bundle/{chunk-3RJYLN5V.js → chunk-HV5YYAJX.js} +158 -20
- package/dist/bundle/{chunk-3MQOLYAN.js → chunk-IAGX5VFL.js} +4 -4
- package/dist/bundle/{chunk-TFBHDIGY.js → chunk-JKKEMVW3.js} +18 -4
- package/dist/bundle/{chunk-P3ASN72F.js → chunk-KBHK5UGL.js} +1 -1
- package/dist/bundle/{chunk-EPCFXKTX.js → chunk-KC4MQRAB.js} +34 -8
- package/dist/bundle/{chunk-VMCQGZIA.js → chunk-L33G5ARH.js} +2801 -718
- package/dist/bundle/{chunk-V2T7NYNU.js → chunk-MDLSI3EN.js} +25 -23
- package/dist/bundle/chunk-NDSRND3E.js +138 -0
- package/dist/bundle/{chunk-HORGORHK.js → chunk-OG2CG2GS.js} +12 -12
- package/dist/bundle/{chunk-ZPILMEFY.js → chunk-QD27C3BG.js} +8 -21
- package/dist/bundle/{chunk-QOGYHU3Q.js → chunk-QG5U6HCI.js} +61 -21
- package/dist/bundle/{chunk-TG6ZYL4B.js → chunk-QQ3QZFFD.js} +8 -8
- package/dist/bundle/{chunk-56Q5JV3Z.js → chunk-QTFXYR5W.js} +24 -2
- package/dist/bundle/{chunk-FAHHERJ7.js → chunk-RGU2G3KL.js} +4 -4
- package/dist/bundle/{chunk-Z4QKLHJW.js → chunk-ROOUBFUW.js} +10148 -3906
- package/dist/bundle/{chunk-MLHKQDUN.js → chunk-RUNFFBJU.js} +872 -562
- package/dist/bundle/{chunk-G7B5UIE7.js → chunk-S3HAFJVC.js} +37 -11
- package/dist/bundle/{chunk-BXTDAGM4.js → chunk-SMHLQEE2.js} +2 -2
- package/dist/bundle/{chunk-JWIUK3SK.js → chunk-TEZKCH5B.js} +2 -2
- package/dist/bundle/{chunk-VRDVXXXD.js → chunk-TKHEVAEG.js} +9 -8
- package/dist/bundle/{chunk-MP7M6FFU.js → chunk-TT4CIXVH.js} +6 -6
- package/dist/bundle/{chunk-M7V5XRM6.js → chunk-UBCLVM7C.js} +3 -3
- package/dist/bundle/{chunk-YHZFGUAP.js → chunk-V5Z2JO6X.js} +19 -19
- package/dist/bundle/{chunk-6GFUL4OU.js → chunk-W2BIBPRU.js} +237 -38
- package/dist/bundle/{chunk-6HRN7BW6.js → chunk-X5PDWCG7.js} +1 -1
- package/dist/bundle/{chunk-AUBRELCM.js → chunk-XDMJVWWR.js} +3 -3
- package/dist/bundle/{chunk-EA2PGDER.js → chunk-XM3P7LLT.js} +2 -2
- package/dist/bundle/{chunk-UGPZCNYC.js → chunk-YMWPRHXG.js} +1411 -809
- package/dist/bundle/{chunk-2XLKZL6K.js → chunk-Z4CGZAFQ.js} +65 -31
- package/dist/bundle/{chunk-XW5C4TI7.js → chunk-ZEQ7ONPZ.js} +47 -1
- package/dist/bundle/command-contract-7TGMZRBE.js +33 -0
- package/dist/bundle/{decode-YMSOY2AY.js → decode-5N4ERCHC.js} +5 -5
- package/dist/bundle/{dispatch-OP27MWX5.js → dispatch-TBGXBDHE.js} +10 -10
- package/dist/bundle/{echarts-7XS55TQY.js → echarts-YDEBAMXT.js} +2 -2
- package/dist/bundle/{embed-QTOE7NN3.js → embed-T7H62XFR.js} +6 -6
- package/dist/bundle/{embedder-KBBRYSNH.js → embedder-AW3O2TR3.js} +9 -9
- package/dist/bundle/{entry-HGEUYYMX.js → entry-L2LJ2VPY.js} +7 -7
- package/dist/bundle/{failure-4JUQFXJT.js → failure-AWHPW2HE.js} +2 -2
- package/dist/bundle/{first-run-CSGMEJXY.js → first-run-6PBZSRZU.js} +11 -11
- package/dist/bundle/first-screen-UKCD7D2R.js +31 -0
- package/dist/bundle/{instructions-S6ZXCTFH.js → instructions-C3NJERO7.js} +1 -1
- package/dist/bundle/{mcp-M4QN2E7R.js → mcp-CWLASTLV.js} +2 -2
- package/dist/bundle/{node-LCIUWXXG.js → node-P3CIIYWU.js} +2 -2
- package/dist/bundle/{node-sqlite-HL4WY4N2.js → node-sqlite-YVHMNRVA.js} +6 -6
- package/dist/bundle/{oauth-U4KIMDKG.js → oauth-5OQYA2SV.js} +7 -7
- package/dist/bundle/{open-EH7OS7M7.js → open-YGWUVSU7.js} +5 -5
- package/dist/bundle/{openai-W5TB3NA5.js → openai-U45JBQ6F.js} +16 -37
- package/dist/bundle/{process-3CVLTCTA.js → process-DCYX5EDG.js} +1 -1
- package/dist/bundle/{program-LOIZTK2P.js → program-UZBFH2EZ.js} +55 -52
- package/dist/bundle/{prompt-IDNH7N3W.js → prompt-HPVTPTFI.js} +7 -5
- package/dist/bundle/{proxy-transport-4DPZB2W2.js → proxy-transport-D7MCHGSV.js} +5 -5
- package/dist/bundle/{recognize-G5EWYXIF.js → recognize-IJCPFJ76.js} +4 -4
- package/dist/bundle/{remote-4XTBZVZD.js → remote-MWDYQWFW.js} +7 -7
- package/dist/bundle/{rerank-OWSTDLZN.js → rerank-SXG64475.js} +7 -7
- package/dist/bundle/{serve-YCPSEWP3.js → serve-KJQENHEH.js} +9 -9
- package/dist/bundle/{server-ODG4A2KK.js → server-MXVXZWN6.js} +35 -35
- package/dist/bundle/server-RTMCRKQF.js +60 -0
- package/dist/bundle/{state-OL2235G5.js → state-CKKJWH27.js} +6 -6
- package/dist/bundle/{store-5AACYNDM.js → store-R3BE4V56.js} +44 -13
- package/dist/bundle/store-maintenance-command-KDGBSBNU.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-7NBUT62O.js +0 -33
- package/dist/bundle/command-contract-KMMHARMR.js +0 -33
- package/dist/bundle/first-screen-K2PBNJNE.js +0 -31
- package/dist/bundle/server-KELKX6S3.js +0 -60
- package/dist/bundle/store-maintenance-command-3J7WZYVN.js +0 -50
- /package/dist/bundle/{chunk-VOXIGICJ.js → chunk-DWX4DE2I.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.618.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.87.0_commander@15._c25084c4731872baba927966435ce31d/node_modules/@wirecat/cli-core/dist/http/listen.js
|
|
8
8
|
import { createServer } from "node:http";
|
|
9
9
|
import { Readable } from "node:stream";
|
|
10
10
|
var MAX_BODY = 4 * 1024 * 1024;
|
|
@@ -2,11 +2,11 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
openCache
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-TT4CIXVH.js";
|
|
6
6
|
import {
|
|
7
7
|
CliError,
|
|
8
8
|
isCliError
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-SMHLQEE2.js";
|
|
10
10
|
import {
|
|
11
11
|
__name
|
|
12
12
|
} from "./chunk-ZVVMGPBJ.js";
|
|
@@ -105,6 +105,7 @@ var kindOf = /* @__PURE__ */ __name((peer) => {
|
|
|
105
105
|
return "channel";
|
|
106
106
|
return "group";
|
|
107
107
|
}, "kindOf");
|
|
108
|
+
var BOTFATHER = 93372553;
|
|
108
109
|
var peerToChat = /* @__PURE__ */ __name((peer, extra = {}) => {
|
|
109
110
|
const metadata = compact({
|
|
110
111
|
isBot: peer.type === "user" ? peer.isBot || null : void 0,
|
|
@@ -120,7 +121,8 @@ var peerToChat = /* @__PURE__ */ __name((peer, extra = {}) => {
|
|
|
120
121
|
unreadCount: null,
|
|
121
122
|
lastMessageAt: null,
|
|
122
123
|
participantsCount: groupMembersCount(peer),
|
|
123
|
-
...metadata ? { providerMetadata: metadata } : {}
|
|
124
|
+
...metadata ? { providerMetadata: metadata } : {},
|
|
125
|
+
...peer.id === BOTFATHER ? { searchable: false } : {}
|
|
124
126
|
};
|
|
125
127
|
}, "peerToChat");
|
|
126
128
|
var toChat = /* @__PURE__ */ __name((dialog) => ({
|
|
@@ -2,15 +2,15 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
unit
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-6OE5I3PR.js";
|
|
6
6
|
import {
|
|
7
7
|
CliError
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-SMHLQEE2.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.618.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.87.0_commander@15._c25084c4731872baba927966435ce31d/node_modules/@wirecat/cli-core/dist/embeddings/remote.js
|
|
14
14
|
import { setTimeout } from "node:timers/promises";
|
|
15
15
|
var OPENAI_URL = "https://api.openai.com/v1";
|
|
16
16
|
var OPENAI_MODELS = {
|
|
@@ -2,23 +2,23 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
storePath
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-6K5R3YPN.js";
|
|
6
6
|
import {
|
|
7
7
|
resolvePaths
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-V5Z2JO6X.js";
|
|
9
9
|
import {
|
|
10
10
|
CliError,
|
|
11
11
|
singleLine
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-SMHLQEE2.js";
|
|
13
13
|
import {
|
|
14
14
|
__name
|
|
15
15
|
} from "./chunk-ZVVMGPBJ.js";
|
|
16
16
|
|
|
17
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.618.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.87.0_commander@15._c25084c4731872baba927966435ce31d/node_modules/@wirecat/cli-core/dist/store/shared-config.js
|
|
18
18
|
import { mkdirSync, readFileSync, renameSync, statSync, writeFileSync } from "node:fs";
|
|
19
19
|
import { dirname, join, resolve } from "node:path";
|
|
20
20
|
|
|
21
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.618.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.87.0_commander@15._c25084c4731872baba927966435ce31d/node_modules/@wirecat/cli-core/dist/domain/task-categories.js
|
|
22
22
|
var DEFAULT_TASK_CATEGORIES = [
|
|
23
23
|
{
|
|
24
24
|
name: "taxes",
|
|
@@ -773,7 +773,7 @@ var storedTaskCategories = /* @__PURE__ */ __name((json) => {
|
|
|
773
773
|
}
|
|
774
774
|
}, "storedTaskCategories");
|
|
775
775
|
|
|
776
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
776
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.618.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.87.0_commander@15._c25084c4731872baba927966435ce31d/node_modules/@wirecat/cli-core/dist/store/shared-config.js
|
|
777
777
|
var SECTION = "task_categories";
|
|
778
778
|
var sharedConfigPath = /* @__PURE__ */ __name((store, env = process.env) => {
|
|
779
779
|
const paths = resolvePaths({ appName: "WireCat", prefix: "WIRECAT", env });
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
tool,
|
|
21
21
|
toolKey,
|
|
22
22
|
toolsFromCommands
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-W2BIBPRU.js";
|
|
24
24
|
import {
|
|
25
25
|
CHART_KINDS,
|
|
26
26
|
CHART_SIZE,
|
|
@@ -34,23 +34,23 @@ import {
|
|
|
34
34
|
registerPrompts,
|
|
35
35
|
stdinFieldOf,
|
|
36
36
|
syncsFirst
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-Z4CGZAFQ.js";
|
|
38
38
|
import {
|
|
39
39
|
agentJson,
|
|
40
40
|
skillResource
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-HV5YYAJX.js";
|
|
42
42
|
import {
|
|
43
43
|
instructions
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-CIDFV3IT.js";
|
|
45
45
|
import {
|
|
46
46
|
answeredWire
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-2BAJ6ORN.js";
|
|
48
48
|
import {
|
|
49
49
|
StdioServerTransport,
|
|
50
50
|
callerOf,
|
|
51
51
|
callingAgent,
|
|
52
52
|
serveStdio
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-XM3P7LLT.js";
|
|
54
54
|
import {
|
|
55
55
|
McpServer,
|
|
56
56
|
ResourceTemplate
|
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
import {
|
|
59
59
|
connectedFor,
|
|
60
60
|
guardFor
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-MDLSI3EN.js";
|
|
62
62
|
import {
|
|
63
63
|
capability,
|
|
64
64
|
dateWindow,
|
|
@@ -67,10 +67,10 @@ import {
|
|
|
67
67
|
servicesFor,
|
|
68
68
|
storedDeps,
|
|
69
69
|
wholeList
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-YMWPRHXG.js";
|
|
71
71
|
import {
|
|
72
72
|
findCommand
|
|
73
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-D4Y2KL5V.js";
|
|
74
74
|
import {
|
|
75
75
|
DEFAULT_OUTPUT_BYTES,
|
|
76
76
|
changesAuthorityAt,
|
|
@@ -86,27 +86,29 @@ import {
|
|
|
86
86
|
sealed,
|
|
87
87
|
snakeKeys,
|
|
88
88
|
typedCommand
|
|
89
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-DQELQ7BL.js";
|
|
90
90
|
import {
|
|
91
|
-
isCliFailure,
|
|
92
91
|
withCaller
|
|
93
|
-
} from "./chunk-
|
|
92
|
+
} from "./chunk-QD27C3BG.js";
|
|
94
93
|
import {
|
|
95
94
|
readOnlyLockOf
|
|
96
|
-
} from "./chunk-
|
|
95
|
+
} from "./chunk-6ERQJRL2.js";
|
|
97
96
|
import {
|
|
98
97
|
mcpHttpMarker
|
|
99
|
-
} from "./chunk-
|
|
98
|
+
} from "./chunk-RGU2G3KL.js";
|
|
100
99
|
import {
|
|
101
100
|
openStore,
|
|
102
101
|
pdfPreviewLimits
|
|
103
|
-
} from "./chunk-
|
|
102
|
+
} from "./chunk-ROOUBFUW.js";
|
|
104
103
|
import {
|
|
105
104
|
timezoneOf
|
|
106
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-CX2WCEQU.js";
|
|
106
|
+
import {
|
|
107
|
+
isCliFailure
|
|
108
|
+
} from "./chunk-ZEQ7ONPZ.js";
|
|
107
109
|
import {
|
|
108
110
|
warmEmbedders
|
|
109
|
-
} from "./chunk-
|
|
111
|
+
} from "./chunk-6OE5I3PR.js";
|
|
110
112
|
import {
|
|
111
113
|
description,
|
|
112
114
|
integer,
|
|
@@ -122,19 +124,19 @@ import {
|
|
|
122
124
|
regex,
|
|
123
125
|
strictObject,
|
|
124
126
|
string
|
|
125
|
-
} from "./chunk-
|
|
127
|
+
} from "./chunk-KC4MQRAB.js";
|
|
126
128
|
import {
|
|
127
129
|
CliError,
|
|
128
130
|
visibleControls
|
|
129
|
-
} from "./chunk-
|
|
131
|
+
} from "./chunk-SMHLQEE2.js";
|
|
130
132
|
import {
|
|
131
133
|
__name
|
|
132
134
|
} from "./chunk-ZVVMGPBJ.js";
|
|
133
135
|
|
|
134
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
136
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.618.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.87.0_commander@15._c25084c4731872baba927966435ce31d/node_modules/@wirecat/cli-core/dist/mcp/server.js
|
|
135
137
|
import { randomUUID } from "node:crypto";
|
|
136
138
|
|
|
137
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
139
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.618.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.87.0_commander@15._c25084c4731872baba927966435ce31d/node_modules/@wirecat/cli-core/dist/mcp/agent-log.js
|
|
138
140
|
var agentLog = /* @__PURE__ */ __name((open) => {
|
|
139
141
|
let held;
|
|
140
142
|
return {
|
|
@@ -153,7 +155,7 @@ var agentLog = /* @__PURE__ */ __name((open) => {
|
|
|
153
155
|
};
|
|
154
156
|
}, "agentLog");
|
|
155
157
|
|
|
156
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
158
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.618.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.87.0_commander@15._c25084c4731872baba927966435ce31d/node_modules/@wirecat/cli-core/dist/mcp/resources.js
|
|
157
159
|
var LISTED = 100;
|
|
158
160
|
var registerResources = /* @__PURE__ */ __name((server, session, { command, name, limit, recorded, withStore, messenger, guard, assertRead }) => {
|
|
159
161
|
server.registerResource("chat", new ResourceTemplate(`${command}://chat/{id}`, {
|
|
@@ -191,7 +193,7 @@ var registerResources = /* @__PURE__ */ __name((server, session, { command, name
|
|
|
191
193
|
});
|
|
192
194
|
}, "registerResources");
|
|
193
195
|
|
|
194
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
196
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.618.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.87.0_commander@15._c25084c4731872baba927966435ce31d/node_modules/@wirecat/cli-core/dist/mcp/session.js
|
|
195
197
|
var HARMLESS = /* @__PURE__ */ new Set(["validation_error", "not_found", "permission_error", "confirmation_required", "rate_limited"]);
|
|
196
198
|
var harmless = /* @__PURE__ */ __name((code) => HARMLESS.has(code), "harmless");
|
|
197
199
|
var MessengerSession = class {
|
|
@@ -266,7 +268,7 @@ var MessengerSession = class {
|
|
|
266
268
|
}
|
|
267
269
|
};
|
|
268
270
|
|
|
269
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
271
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.618.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.87.0_commander@15._c25084c4731872baba927966435ce31d/node_modules/@wirecat/cli-core/dist/mcp/tools/attachments.js
|
|
270
272
|
var attachmentsTools = /* @__PURE__ */ __name((messenger) => {
|
|
271
273
|
const _command = messenger.app.command;
|
|
272
274
|
return {
|
|
@@ -320,7 +322,7 @@ var attachmentsTools = /* @__PURE__ */ __name((messenger) => {
|
|
|
320
322
|
};
|
|
321
323
|
}, "attachmentsTools");
|
|
322
324
|
|
|
323
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
325
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.618.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.87.0_commander@15._c25084c4731872baba927966435ce31d/node_modules/@wirecat/cli-core/dist/mcp/tools/messages-photo.js
|
|
324
326
|
var PHOTO_LIMIT = 512 * 1024;
|
|
325
327
|
var IMAGE_TYPES = [
|
|
326
328
|
["image/jpeg", (b) => b[0] === 255 && b[1] === 216 && b[2] === 255],
|
|
@@ -374,7 +376,7 @@ var readUpTo = /* @__PURE__ */ __name(async (file, limit, saveIt) => {
|
|
|
374
376
|
return new Uint8Array(Buffer.concat(chunks));
|
|
375
377
|
}, "readUpTo");
|
|
376
378
|
|
|
377
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
379
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.618.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.87.0_commander@15._c25084c4731872baba927966435ce31d/node_modules/@wirecat/cli-core/dist/mcp/tools/stats.js
|
|
378
380
|
var statsTools = /* @__PURE__ */ __name((messenger) => ({
|
|
379
381
|
stats_charts: tool({
|
|
380
382
|
title: "A chart from a chat's statistics",
|
|
@@ -411,14 +413,14 @@ var statsTools = /* @__PURE__ */ __name((messenger) => ({
|
|
|
411
413
|
})
|
|
412
414
|
}), "statsTools");
|
|
413
415
|
|
|
414
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
416
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.618.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.87.0_commander@15._c25084c4731872baba927966435ce31d/node_modules/@wirecat/cli-core/dist/mcp/tools.js
|
|
415
417
|
var pictureTools = /* @__PURE__ */ __name((messenger) => Object.fromEntries(Object.entries({
|
|
416
418
|
...messagesPhotoTools(messenger),
|
|
417
419
|
...attachmentsTools(messenger),
|
|
418
420
|
...statsTools(messenger)
|
|
419
421
|
}).map(([name, definition]) => [name, { ...definition, input: strictObject(definition.input.entries) }])), "pictureTools");
|
|
420
422
|
|
|
421
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
423
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.618.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.87.0_commander@15._c25084c4731872baba927966435ce31d/node_modules/@wirecat/cli-core/dist/mcp/server.js
|
|
422
424
|
var PER_RUN = /* @__PURE__ */ new Set([
|
|
423
425
|
"streams",
|
|
424
426
|
"stdin",
|
|
@@ -742,7 +744,7 @@ var serveOverStdio = /* @__PURE__ */ __name(async (command, context, messenger,
|
|
|
742
744
|
}, "serveOverStdio");
|
|
743
745
|
var serveOverHttpUntilStopped = /* @__PURE__ */ __name(async (command, context, messenger, options, http) => {
|
|
744
746
|
const { session, embedders, build, log } = createServer(command, context, messenger, options);
|
|
745
|
-
const { serveOverHttp } = await import("./serve-
|
|
747
|
+
const { serveOverHttp } = await import("./serve-KJQENHEH.js");
|
|
746
748
|
const appName = messenger.app.command;
|
|
747
749
|
const appEnvPrefix = messenger.app.envPrefix;
|
|
748
750
|
const listening = await serveOverHttp(build, {
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
id,
|
|
6
6
|
text,
|
|
7
7
|
time
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-CX2WCEQU.js";
|
|
9
9
|
import {
|
|
10
10
|
array,
|
|
11
11
|
nullable,
|
|
@@ -16,9 +16,9 @@ import {
|
|
|
16
16
|
strictObject,
|
|
17
17
|
string,
|
|
18
18
|
unknown
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-KC4MQRAB.js";
|
|
20
20
|
|
|
21
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.618.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.87.0_commander@15._c25084c4731872baba927966435ce31d/node_modules/@wirecat/cli-core/dist/entities/note.js
|
|
22
22
|
var link = {
|
|
23
23
|
target_text: nullable(text),
|
|
24
24
|
kind: text,
|
|
@@ -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-SMHLQEE2.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.618.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.87.0_commander@15._c25084c4731872baba927966435ce31d/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,17 +4,19 @@ import {
|
|
|
4
4
|
MAX_SECRET_INPUT,
|
|
5
5
|
bufferedInput,
|
|
6
6
|
inputPolicy
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-HGMMRT4G.js";
|
|
8
8
|
import {
|
|
9
9
|
CliError
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-SMHLQEE2.js";
|
|
11
11
|
import {
|
|
12
12
|
__name
|
|
13
13
|
} from "./chunk-ZVVMGPBJ.js";
|
|
14
14
|
|
|
15
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.618.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.87.0_commander@15._c25084c4731872baba927966435ce31d/node_modules/@wirecat/cli-core/dist/terminal/prompt.js
|
|
16
16
|
import { createInterface } from "node:readline";
|
|
17
17
|
import { Writable } from "node:stream";
|
|
18
|
+
var EMPTY_TRIES = 3;
|
|
19
|
+
var pasteHint = /* @__PURE__ */ __name((platform = process.platform) => `Nothing arrived. To paste in a terminal, use ${platform === "darwin" ? "Cmd+V" : "Ctrl+Shift+V (or right-click \u2192 Paste)"}.`, "pasteHint");
|
|
18
20
|
var readSecret = /* @__PURE__ */ __name(async (prompt, { input = process.stdin, output = process.stderr, echo = false, signal: givenSignal } = {}) => {
|
|
19
21
|
const policy = inputPolicy(input);
|
|
20
22
|
const signals = [givenSignal, policy.signal].filter((one) => one !== void 0);
|
|
@@ -65,9 +67,24 @@ var readSecret = /* @__PURE__ */ __name(async (prompt, { input = process.stdin,
|
|
|
65
67
|
reader.once("SIGINT", cancel);
|
|
66
68
|
reader.once("close", cancel);
|
|
67
69
|
signal?.addEventListener("abort", abort, { once: true });
|
|
68
|
-
|
|
69
|
-
|
|
70
|
+
const ask = /* @__PURE__ */ __name((tries) => {
|
|
71
|
+
muted = false;
|
|
72
|
+
reader.question(prompt, (line) => {
|
|
73
|
+
if (echo || line.trim() || tries >= EMPTY_TRIES)
|
|
74
|
+
return resolve(line);
|
|
75
|
+
output.write(`
|
|
76
|
+
${pasteHint()}
|
|
77
|
+
`);
|
|
78
|
+
ask(tries + 1);
|
|
79
|
+
});
|
|
80
|
+
muted = !echo;
|
|
81
|
+
}, "ask");
|
|
82
|
+
ask(1);
|
|
70
83
|
});
|
|
84
|
+
if (!echo && !answer.trim())
|
|
85
|
+
throw new CliError("validation_error", `nothing arrived after ${EMPTY_TRIES} tries. ${pasteHint()}`, {
|
|
86
|
+
reason: "input.empty"
|
|
87
|
+
});
|
|
71
88
|
return answer.trim();
|
|
72
89
|
} finally {
|
|
73
90
|
input.off("data", data).off("error", inputError);
|
|
@@ -78,5 +95,6 @@ var readSecret = /* @__PURE__ */ __name(async (prompt, { input = process.stdin,
|
|
|
78
95
|
}, "readSecret");
|
|
79
96
|
|
|
80
97
|
export {
|
|
98
|
+
pasteHint,
|
|
81
99
|
readSecret
|
|
82
100
|
};
|