@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,8 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
TELEGRAM_BOT
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-YBOVL25O.js";
|
|
6
|
+
import "./chunk-LVGX7VTD.js";
|
|
6
7
|
import {
|
|
7
8
|
BotTokenStore,
|
|
8
9
|
apiPlainJson,
|
|
@@ -11,24 +12,24 @@ import {
|
|
|
11
12
|
checkApiParameter,
|
|
12
13
|
generatedApiCommand,
|
|
13
14
|
prepareRpcApiBody
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
15
|
+
} from "./chunk-DQTQO6PB.js";
|
|
16
|
+
import "./chunk-KW6JZGG3.js";
|
|
17
|
+
import "./chunk-FATTEYZH.js";
|
|
18
|
+
import "./chunk-D2WNQJUQ.js";
|
|
19
|
+
import "./chunk-DE7QIEUP.js";
|
|
20
|
+
import "./chunk-7VNV426X.js";
|
|
21
|
+
import "./chunk-U2TPRUWK.js";
|
|
22
|
+
import "./chunk-H5XC2WYO.js";
|
|
22
23
|
import {
|
|
23
24
|
newOperationId,
|
|
24
25
|
readUpload,
|
|
25
26
|
uploadBytes
|
|
26
|
-
} from "./chunk-
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
29
|
-
import "./chunk-
|
|
27
|
+
} from "./chunk-7WS3ULOO.js";
|
|
28
|
+
import "./chunk-CLTMVPGT.js";
|
|
29
|
+
import "./chunk-YDROJG2Y.js";
|
|
30
|
+
import "./chunk-7N4IUEX3.js";
|
|
30
31
|
import "./chunk-2ABQZVK4.js";
|
|
31
|
-
import "./chunk-
|
|
32
|
+
import "./chunk-LLCGOZ44.js";
|
|
32
33
|
import {
|
|
33
34
|
ChatRegistry,
|
|
34
35
|
DEFAULT_PERMISSIONS,
|
|
@@ -36,38 +37,37 @@ import {
|
|
|
36
37
|
levelFor,
|
|
37
38
|
overrideSharedContract,
|
|
38
39
|
ownerOnlyOption
|
|
39
|
-
} from "./chunk-
|
|
40
|
-
import "./chunk-
|
|
41
|
-
import "./chunk-
|
|
42
|
-
import "./chunk-
|
|
43
|
-
import "./chunk-
|
|
44
|
-
import "./chunk-
|
|
45
|
-
import "./chunk-
|
|
46
|
-
import "./chunk-
|
|
47
|
-
import "./chunk-
|
|
48
|
-
import "./chunk-
|
|
49
|
-
import "./chunk-
|
|
50
|
-
import "./chunk-
|
|
51
|
-
import "./chunk-
|
|
52
|
-
import "./chunk-
|
|
53
|
-
import "./chunk-
|
|
54
|
-
import "./chunk-
|
|
55
|
-
import "./chunk-
|
|
56
|
-
import "./chunk-
|
|
57
|
-
import "./chunk-
|
|
58
|
-
import "./chunk-
|
|
59
|
-
import "./chunk-
|
|
60
|
-
import "./chunk-
|
|
61
|
-
import "./chunk-
|
|
62
|
-
import "./chunk-
|
|
63
|
-
import "./chunk-
|
|
64
|
-
import "./chunk-
|
|
65
|
-
import "./chunk-
|
|
66
|
-
import "./chunk-VOXIGICJ.js";
|
|
40
|
+
} from "./chunk-THJHYMFR.js";
|
|
41
|
+
import "./chunk-4JATS2J5.js";
|
|
42
|
+
import "./chunk-3FPFRDG2.js";
|
|
43
|
+
import "./chunk-3GLLWDM6.js";
|
|
44
|
+
import "./chunk-7DPWVKYS.js";
|
|
45
|
+
import "./chunk-MCPOZNWG.js";
|
|
46
|
+
import "./chunk-HDSKBXAF.js";
|
|
47
|
+
import "./chunk-FPWXG53C.js";
|
|
48
|
+
import "./chunk-DDKFAUQD.js";
|
|
49
|
+
import "./chunk-CYWV2RLN.js";
|
|
50
|
+
import "./chunk-ZON7K5QE.js";
|
|
51
|
+
import "./chunk-JQLGS3SG.js";
|
|
52
|
+
import "./chunk-ZRRZTPSB.js";
|
|
53
|
+
import "./chunk-KP26Y5OA.js";
|
|
54
|
+
import "./chunk-WLBPNLDF.js";
|
|
55
|
+
import "./chunk-WQ55F4Y3.js";
|
|
56
|
+
import "./chunk-CLURRDNU.js";
|
|
57
|
+
import "./chunk-JJY3TQTM.js";
|
|
58
|
+
import "./chunk-KTV5Y5EX.js";
|
|
59
|
+
import "./chunk-S6OC367D.js";
|
|
60
|
+
import "./chunk-3SANNNWS.js";
|
|
61
|
+
import "./chunk-4OWY7QBE.js";
|
|
62
|
+
import "./chunk-DH7VKHTZ.js";
|
|
63
|
+
import "./chunk-MMPISXSU.js";
|
|
64
|
+
import "./chunk-KRCMKFUV.js";
|
|
65
|
+
import "./chunk-RX5CJ55S.js";
|
|
66
|
+
import "./chunk-YVNHQFLC.js";
|
|
67
67
|
import "./chunk-D72URWJE.js";
|
|
68
|
-
import "./chunk-
|
|
69
|
-
import "./chunk-
|
|
70
|
-
import "./chunk-
|
|
68
|
+
import "./chunk-PDYTNTQI.js";
|
|
69
|
+
import "./chunk-KLHOQ6XQ.js";
|
|
70
|
+
import "./chunk-U6HEZPCR.js";
|
|
71
71
|
import {
|
|
72
72
|
array,
|
|
73
73
|
boolean,
|
|
@@ -82,12 +82,12 @@ import {
|
|
|
82
82
|
string,
|
|
83
83
|
transform,
|
|
84
84
|
union
|
|
85
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-WGGSFGNZ.js";
|
|
86
86
|
import "./chunk-Y5E2WNWB.js";
|
|
87
87
|
import {
|
|
88
88
|
CliError
|
|
89
|
-
} from "./chunk-
|
|
90
|
-
import "./chunk-
|
|
89
|
+
} from "./chunk-VUBZFMGP.js";
|
|
90
|
+
import "./chunk-HIBYYKGO.js";
|
|
91
91
|
import {
|
|
92
92
|
__name
|
|
93
93
|
} from "./chunk-ZVVMGPBJ.js";
|
|
@@ -34551,7 +34551,7 @@ If you'd like to make sure that the webhook was set by you, you can specify secr
|
|
|
34551
34551
|
}
|
|
34552
34552
|
];
|
|
34553
34553
|
|
|
34554
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
34554
|
+
// 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/codegen/runtime.js
|
|
34555
34555
|
var isLossless = /* @__PURE__ */ __name((input) => typeof input === "object" && input !== null && input.isLosslessNumber === true && typeof input.value === "string", "isLossless");
|
|
34556
34556
|
var INTEGER = /^-?\d+$/;
|
|
34557
34557
|
var INT64_MIN = -(2n ** 63n);
|
|
@@ -5,30 +5,30 @@ import {
|
|
|
5
5
|
toCliError,
|
|
6
6
|
toHistoryChannel,
|
|
7
7
|
toHistoryMessages
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-B7B65ZLU.js";
|
|
9
9
|
import {
|
|
10
10
|
proxiedTransport
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-7I6YVQHW.js";
|
|
12
|
+
import "./chunk-FATTEYZH.js";
|
|
13
|
+
import "./chunk-YDROJG2Y.js";
|
|
14
|
+
import "./chunk-4JATS2J5.js";
|
|
15
|
+
import "./chunk-ZRRZTPSB.js";
|
|
16
|
+
import "./chunk-KP26Y5OA.js";
|
|
17
|
+
import "./chunk-WLBPNLDF.js";
|
|
18
|
+
import "./chunk-WQ55F4Y3.js";
|
|
19
|
+
import "./chunk-CLURRDNU.js";
|
|
20
|
+
import "./chunk-MMPISXSU.js";
|
|
21
|
+
import "./chunk-YVNHQFLC.js";
|
|
22
|
+
import "./chunk-PDYTNTQI.js";
|
|
23
|
+
import "./chunk-KLHOQ6XQ.js";
|
|
24
|
+
import "./chunk-U6HEZPCR.js";
|
|
25
|
+
import "./chunk-WGGSFGNZ.js";
|
|
26
26
|
import "./chunk-Y5E2WNWB.js";
|
|
27
27
|
import {
|
|
28
28
|
CliError,
|
|
29
29
|
isCliError
|
|
30
|
-
} from "./chunk-
|
|
31
|
-
import "./chunk-
|
|
30
|
+
} from "./chunk-VUBZFMGP.js";
|
|
31
|
+
import "./chunk-HIBYYKGO.js";
|
|
32
32
|
import {
|
|
33
33
|
__name
|
|
34
34
|
} from "./chunk-ZVVMGPBJ.js";
|
|
@@ -18,12 +18,12 @@ import {
|
|
|
18
18
|
jitCompatCheck,
|
|
19
19
|
refineSqliteCodecs,
|
|
20
20
|
sql
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-HIBYYKGO.js";
|
|
22
22
|
import {
|
|
23
23
|
__name
|
|
24
24
|
} from "./chunk-ZVVMGPBJ.js";
|
|
25
25
|
|
|
26
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26
|
+
// 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/drizzle/bun.js
|
|
27
27
|
import { Database } from "bun:sqlite";
|
|
28
28
|
var bunSQLiteCodecs = refineSqliteCodecs({
|
|
29
29
|
"integer:boolean": { normalize: booleanFromInteger },
|
|
@@ -3,18 +3,18 @@ const require = __bundleRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
loadVectorExtension,
|
|
5
5
|
vectorExtension
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-CGUDXNJE.js";
|
|
7
|
+
import "./chunk-U6HEZPCR.js";
|
|
8
|
+
import "./chunk-WGGSFGNZ.js";
|
|
9
9
|
import {
|
|
10
10
|
importFrom
|
|
11
11
|
} from "./chunk-Y5E2WNWB.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-VUBZFMGP.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.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/store/drivers/bun-sqlite.js
|
|
18
18
|
var customised = false;
|
|
19
19
|
var ownLibrary = /* @__PURE__ */ __name(async () => {
|
|
20
20
|
try {
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
agentOf,
|
|
30
30
|
clientHash,
|
|
31
31
|
currentCaller
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-3FPFRDG2.js";
|
|
33
33
|
import {
|
|
34
34
|
__name
|
|
35
35
|
} from "./chunk-ZVVMGPBJ.js";
|
|
@@ -541,7 +541,7 @@ function toError(value) {
|
|
|
541
541
|
}
|
|
542
542
|
__name(toError, "toError");
|
|
543
543
|
|
|
544
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
544
|
+
// 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/caller.js
|
|
545
545
|
var callingAgent = /* @__PURE__ */ __name((fallback, caller = currentCaller()) => {
|
|
546
546
|
const client = caller?.agent?.client?.name;
|
|
547
547
|
if (client && client !== "unknown")
|
|
@@ -4,24 +4,26 @@ import {
|
|
|
4
4
|
isCliFailure,
|
|
5
5
|
secretNamed,
|
|
6
6
|
withoutSecrets
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-WLBPNLDF.js";
|
|
8
8
|
import {
|
|
9
9
|
isContentKey
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-U6HEZPCR.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.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/runs/run-context.js
|
|
16
16
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
17
17
|
import { createHash } from "node:crypto";
|
|
18
18
|
|
|
19
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19
|
+
// 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/runs/error-detail.js
|
|
20
20
|
import { homedir } from "node:os";
|
|
21
21
|
|
|
22
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22
|
+
// 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/runs/events.js
|
|
23
23
|
var providerErrorKey = /* @__PURE__ */ __name((value) => typeof value === "string" && /^[A-Za-z][A-Za-z0-9._-]{0,63}$/.test(value) ? value : void 0, "providerErrorKey");
|
|
24
24
|
var renderEvent = /* @__PURE__ */ __name((event) => {
|
|
25
|
+
if (event.event === "store")
|
|
26
|
+
return `${MARK.store} ${event.operation.padEnd(16)} ${event.table} ${event.op} ${event.n}`;
|
|
25
27
|
if (event.event === "warning") {
|
|
26
28
|
const counts = Object.entries(event.counts ?? {}).map(([field, count]) => `${count} ${field}`);
|
|
27
29
|
return [`${MARK.warning} ${(event.operation ?? "").padEnd(16)} ${event.code}`, ...counts, event.detail].filter(Boolean).join(" ");
|
|
@@ -63,11 +65,11 @@ var renderEvent = /* @__PURE__ */ __name((event) => {
|
|
|
63
65
|
}
|
|
64
66
|
return `${MARK[event.event]} ${event.operation.padEnd(16)} ${parts.join(" ")}`.trimEnd();
|
|
65
67
|
}, "renderEvent");
|
|
66
|
-
var MARK = { request: "\u2192", response: "\u2190", cache: "\u2022", warning: "!" };
|
|
68
|
+
var MARK = { request: "\u2192", response: "\u2190", cache: "\u2022", warning: "!", store: "+" };
|
|
67
69
|
var age = /* @__PURE__ */ __name((ms) => ms < 1e3 ? `${ms}ms` : `${Math.round(ms / 1e3)}s`, "age");
|
|
68
70
|
var size = /* @__PURE__ */ __name((bytes) => bytes < 1e3 ? `${bytes} B` : `${(bytes / 1e3).toFixed(1)} kB`, "size");
|
|
69
71
|
|
|
70
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
72
|
+
// 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/runs/error-detail.js
|
|
71
73
|
var MESSAGE_AT_MOST = 500;
|
|
72
74
|
var CAUSES_AT_MOST = 5;
|
|
73
75
|
var FRAMES_AT_MOST = 15;
|
|
@@ -176,7 +178,7 @@ var redactText = /* @__PURE__ */ __name((text) => {
|
|
|
176
178
|
return out.length > MESSAGE_AT_MOST ? `${out.slice(0, MESSAGE_AT_MOST)}\u2026` : out;
|
|
177
179
|
}, "redactText");
|
|
178
180
|
|
|
179
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
181
|
+
// 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/runs/run-context.js
|
|
180
182
|
var REDACTED = "[redacted]";
|
|
181
183
|
var keepsSuccess = /* @__PURE__ */ __name(({ record, fromFlag, env, caller, persistent = false }) => {
|
|
182
184
|
if (!record)
|
|
@@ -2,31 +2,31 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
updateCommand
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-7DPWVKYS.js";
|
|
6
6
|
import {
|
|
7
7
|
QUESTIONS,
|
|
8
8
|
readSetupAnswers,
|
|
9
9
|
unanswered,
|
|
10
10
|
writeSetupAnswers
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-HDSKBXAF.js";
|
|
12
12
|
import {
|
|
13
13
|
DEFAULT_STEMMERS,
|
|
14
14
|
LANGUAGES
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-WQ55F4Y3.js";
|
|
16
16
|
import {
|
|
17
17
|
sharedConfigPath
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-CLURRDNU.js";
|
|
19
19
|
import {
|
|
20
20
|
storePath
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-MMPISXSU.js";
|
|
22
22
|
import {
|
|
23
23
|
installerOf
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-RX5CJ55S.js";
|
|
25
25
|
import {
|
|
26
26
|
__name
|
|
27
27
|
} from "./chunk-ZVVMGPBJ.js";
|
|
28
28
|
|
|
29
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29
|
+
// 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/first-run.js
|
|
30
30
|
import { spawnSync } from "node:child_process";
|
|
31
31
|
import { accessSync, constants, realpathSync } from "node:fs";
|
|
32
32
|
import { delimiter, join } from "node:path";
|
|
@@ -84,7 +84,7 @@ var suggested = /* @__PURE__ */ __name((env, contentLanguages) => {
|
|
|
84
84
|
return (own.length ? own : LANGUAGES.filter(({ code }) => code === "en" || code === system)).map(({ name }) => name);
|
|
85
85
|
}, "suggested");
|
|
86
86
|
var askLanguages = /* @__PURE__ */ __name(async ({ command, env, io, contentLanguages }) => {
|
|
87
|
-
const { openStore } = await import("./store-
|
|
87
|
+
const { openStore } = await import("./store-EVNI2MHZ.js");
|
|
88
88
|
const store = await openStore({ env });
|
|
89
89
|
let rebuild = false;
|
|
90
90
|
try {
|
|
@@ -113,8 +113,8 @@ var askLanguages = /* @__PURE__ */ __name(async ({ command, env, io, contentLang
|
|
|
113
113
|
if (!rebuild)
|
|
114
114
|
return;
|
|
115
115
|
const [{ openCache }, { buildStems }] = await Promise.all([
|
|
116
|
-
import("./open-
|
|
117
|
-
import("./store-maintenance-command-
|
|
116
|
+
import("./open-HLL55C5S.js"),
|
|
117
|
+
import("./store-maintenance-command-XPQE47RE.js")
|
|
118
118
|
]);
|
|
119
119
|
const database = await openCache(storePath(env));
|
|
120
120
|
try {
|
|
@@ -126,7 +126,7 @@ var askLanguages = /* @__PURE__ */ __name(async ({ command, env, io, contentLang
|
|
|
126
126
|
var askTools = /* @__PURE__ */ __name(async (run) => {
|
|
127
127
|
const { command, env, io } = run;
|
|
128
128
|
const installed = run.installed ?? ((name) => onPath(name, env));
|
|
129
|
-
const { WIRECAT_TOOLS } = await import("./first-screen-
|
|
129
|
+
const { WIRECAT_TOOLS } = await import("./first-screen-BVQLF4LN.js");
|
|
130
130
|
const others = WIRECAT_TOOLS.filter((tool) => tool.command !== command);
|
|
131
131
|
const missing = others.filter((tool) => !installed(tool.command));
|
|
132
132
|
io.say("Other WireCat tools \u2014 they share this store, so one search finds everything:");
|
|
@@ -199,7 +199,7 @@ var setupAtStart = /* @__PURE__ */ __name(async (start) => {
|
|
|
199
199
|
contentLanguages: start.contentLanguages,
|
|
200
200
|
all: start.path[0] === "setup",
|
|
201
201
|
io: {
|
|
202
|
-
ask: /* @__PURE__ */ __name(async (prompt) => (await import("./prompt-
|
|
202
|
+
ask: /* @__PURE__ */ __name(async (prompt) => (await import("./prompt-B5FYE2DQ.js")).readSecret(prompt, { input, echo: true }), "ask"),
|
|
203
203
|
say: /* @__PURE__ */ __name((text) => process.stderr.write(`${text}
|
|
204
204
|
`), "say")
|
|
205
205
|
}
|
|
@@ -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-4OWY7QBE.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/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 = {
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
id,
|
|
6
6
|
text,
|
|
7
7
|
time
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-KP26Y5OA.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-WGGSFGNZ.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/entities/note.js
|
|
22
22
|
var link = {
|
|
23
23
|
target_text: nullable(text),
|
|
24
24
|
kind: text,
|
|
@@ -5,23 +5,23 @@ import {
|
|
|
5
5
|
installFiles,
|
|
6
6
|
megabytes,
|
|
7
7
|
sharedModelsDirectory
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-DH7VKHTZ.js";
|
|
9
9
|
import {
|
|
10
10
|
importFrom
|
|
11
11
|
} from "./chunk-Y5E2WNWB.js";
|
|
12
12
|
import {
|
|
13
13
|
CliError
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-VUBZFMGP.js";
|
|
15
15
|
import {
|
|
16
16
|
__name
|
|
17
17
|
} from "./chunk-ZVVMGPBJ.js";
|
|
18
18
|
|
|
19
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19
|
+
// 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/embeddings/embed.js
|
|
20
20
|
import { readFileSync as readFileSync2 } from "node:fs";
|
|
21
21
|
import { availableParallelism } from "node:os";
|
|
22
22
|
import { basename, join as join2 } from "node:path";
|
|
23
23
|
|
|
24
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24
|
+
// 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/embeddings/onnx-runtime.js
|
|
25
25
|
import { createHash } from "node:crypto";
|
|
26
26
|
import { copyFileSync, mkdirSync, mkdtempSync, readFileSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
27
27
|
import { join } from "node:path";
|
|
@@ -678,7 +678,7 @@ var Unzip = /* @__PURE__ */ (function() {
|
|
|
678
678
|
return Unzip2;
|
|
679
679
|
})();
|
|
680
680
|
|
|
681
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
681
|
+
// 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/embeddings/onnx-runtime.js
|
|
682
682
|
var ONNX_RUNTIME_VERSION = "1.30.0";
|
|
683
683
|
var release = /* @__PURE__ */ __name((name, sha256, bytes) => ({
|
|
684
684
|
name,
|
|
@@ -858,7 +858,7 @@ var openSession = /* @__PURE__ */ __name(async (bytes, threads, options = {}) =>
|
|
|
858
858
|
return { ort, session: await ort.InferenceSession.create(bytes, options) };
|
|
859
859
|
}, "openSession");
|
|
860
860
|
|
|
861
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
861
|
+
// 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/embeddings/embed.js
|
|
862
862
|
var textModelsDirectory = /* @__PURE__ */ __name((env = process.env) => sharedModelsDirectory("text", env), "textModelsDirectory");
|
|
863
863
|
var placedText = /* @__PURE__ */ __name((model, directory) => model.files.map((file) => [file, join2(directory, model.id, file.name)]), "placedText");
|
|
864
864
|
var isTextModelInstalled = /* @__PURE__ */ __name((model, directory) => filesPresent(placedText(model, directory)), "isTextModelInstalled");
|
|
@@ -2,12 +2,12 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
singleLine
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-VUBZFMGP.js";
|
|
6
6
|
import {
|
|
7
7
|
__name
|
|
8
8
|
} from "./chunk-ZVVMGPBJ.js";
|
|
9
9
|
|
|
10
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
10
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/names.js
|
|
11
11
|
var FIRST_PARTY_TOOLS = [
|
|
12
12
|
{ name: "tg", package: "@wirecat/tg-cli" },
|
|
13
13
|
{ name: "max", package: "@wirecat/max-cli" },
|
|
@@ -28,17 +28,31 @@ var RESERVED_NAMES = [
|
|
|
28
28
|
var TOOL_NAME = /^[a-z][a-z0-9-]{0,39}$/;
|
|
29
29
|
var PROGRAM_PREFIX = "wcat-";
|
|
30
30
|
var DESCRIBE_FLAG = "--wcat-describe";
|
|
31
|
+
var DESCRIBE_MAX_BYTES = 64 * 1024;
|
|
31
32
|
var DISPATCH_FLAG = "--wcat-dispatch";
|
|
32
33
|
|
|
33
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
34
|
+
// 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/wcat/describe.js
|
|
34
35
|
var DESCRIBE_FORMAT = 1;
|
|
35
|
-
var
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
36
|
+
var DESCRIBE_MANIFEST_FORMAT = 2;
|
|
37
|
+
var describeAnswer = /* @__PURE__ */ __name((tool, manifest) => {
|
|
38
|
+
const answer = {
|
|
39
|
+
wcat_describe: DESCRIBE_FORMAT,
|
|
40
|
+
name: tool.command,
|
|
41
|
+
version: tool.version,
|
|
42
|
+
description: tool.description,
|
|
43
|
+
...tool.docs ? { docs_url: tool.docs } : {}
|
|
44
|
+
};
|
|
45
|
+
if (!manifest)
|
|
46
|
+
return answer;
|
|
47
|
+
const full = {
|
|
48
|
+
...answer,
|
|
49
|
+
wcat_describe: DESCRIBE_MANIFEST_FORMAT,
|
|
50
|
+
desktop: manifest.desktop,
|
|
51
|
+
manifest_sha256: manifest.sha256
|
|
52
|
+
};
|
|
53
|
+
return Buffer.byteLength(`${JSON.stringify(full)}
|
|
54
|
+
`) > DESCRIBE_MAX_BYTES ? answer : full;
|
|
55
|
+
}, "describeAnswer");
|
|
42
56
|
var MAX_TEXT = 200;
|
|
43
57
|
var clean = /* @__PURE__ */ __name((value) => typeof value === "string" && value.trim() !== "" ? singleLine(value.trim()).slice(0, MAX_TEXT) : void 0, "clean");
|
|
44
58
|
var parseDescribe = /* @__PURE__ */ __name((text) => {
|
|
@@ -50,25 +64,48 @@ var parseDescribe = /* @__PURE__ */ __name((text) => {
|
|
|
50
64
|
}
|
|
51
65
|
if (typeof answer !== "object" || answer === null || !("wcat_describe" in answer))
|
|
52
66
|
return void 0;
|
|
53
|
-
const { version, description, docs_url: docs } = answer;
|
|
67
|
+
const { version, description, docs_url: docs, manifest_sha256: sha } = answer;
|
|
54
68
|
const url = clean(docs);
|
|
55
69
|
return {
|
|
56
70
|
version: clean(version) ?? "",
|
|
57
71
|
description: clean(description) ?? "",
|
|
58
|
-
...url && /^https?:\/\//.test(url) ? { docs: url } : {}
|
|
72
|
+
...url && /^https?:\/\//.test(url) ? { docs: url } : {},
|
|
73
|
+
...typeof sha === "string" && /^[0-9a-f]{64}$/.test(sha) ? { manifestSha256: sha } : {}
|
|
59
74
|
};
|
|
60
75
|
}, "parseDescribe");
|
|
61
76
|
|
|
62
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
77
|
+
// 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/wcat/shim.js
|
|
63
78
|
import { lstatSync, readFileSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
64
79
|
import { join } from "node:path";
|
|
65
|
-
var SHIM_FORMAT =
|
|
80
|
+
var SHIM_FORMAT = 2;
|
|
66
81
|
var MARK = /^(?:#|REM) wirecat-shim (\d+) (launcher|shortcut) (\S+)\r?$/m;
|
|
67
82
|
var NOTE = {
|
|
68
83
|
launcher: "Written by @wirecat/cli-base. Any WireCat tool rewrites it when it breaks; it is safe to delete.",
|
|
69
84
|
shortcut: "Made by `wcat shortcuts add`; `wcat shortcuts remove` takes it out."
|
|
70
85
|
};
|
|
71
86
|
var shellQuote = /* @__PURE__ */ __name((text) => `'${text.replaceAll("'", `'\\''`)}'`, "shellQuote");
|
|
87
|
+
var launcherBody = /* @__PURE__ */ __name((dir, target, name) => [
|
|
88
|
+
'ok() { [ -f "$1" ] && [ -x "$1" ]; }',
|
|
89
|
+
`dir=${shellQuote(dir)}`,
|
|
90
|
+
`target=${shellQuote(join(dir, target))}`,
|
|
91
|
+
'if ! ok "$target"; then',
|
|
92
|
+
' for t in "$dir"/wcat-*; do',
|
|
93
|
+
' if ok "$t"; then target=$t; break; fi',
|
|
94
|
+
" done",
|
|
95
|
+
"fi",
|
|
96
|
+
`if ok "$target"; then exec "$target" ${DISPATCH_FLAG} "$@"; fi`,
|
|
97
|
+
'if [ -z "$WIRECAT_LAUNCHER_SKIP" ]; then',
|
|
98
|
+
" WIRECAT_LAUNCHER_SKIP=1; export WIRECAT_LAUNCHER_SKIP",
|
|
99
|
+
" set -f; oldifs=$IFS; IFS=:",
|
|
100
|
+
" for d in $PATH; do",
|
|
101
|
+
` if [ -n "$d" ] && [ "$d" != "$dir" ] && ok "$d/${name}"; then IFS=$oldifs; exec "$d/${name}" "$@"; fi`,
|
|
102
|
+
" done",
|
|
103
|
+
" IFS=$oldifs; set +f",
|
|
104
|
+
"fi",
|
|
105
|
+
`printf '%s\\n' "${name}: $target is missing and no other ${name}-* program was found in $dir or on PATH." \\`,
|
|
106
|
+
` "This launcher is safe to delete: $dir/${name}" >&2`,
|
|
107
|
+
"exit 127"
|
|
108
|
+
], "launcherBody");
|
|
72
109
|
var shimFiles = /* @__PURE__ */ __name((kind, { dir, name, target, platform }) => {
|
|
73
110
|
const mark = `wirecat-shim ${SHIM_FORMAT} ${kind} ${target}`;
|
|
74
111
|
const extra = kind === "launcher" ? ` ${DISPATCH_FLAG}` : "";
|
|
@@ -76,11 +113,13 @@ var shimFiles = /* @__PURE__ */ __name((kind, { dir, name, target, platform }) =
|
|
|
76
113
|
return [
|
|
77
114
|
{
|
|
78
115
|
path: join(dir, name),
|
|
79
|
-
text:
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
`
|
|
116
|
+
text: [
|
|
117
|
+
"#!/bin/sh",
|
|
118
|
+
`# ${mark}`,
|
|
119
|
+
`# ${NOTE[kind]}`,
|
|
120
|
+
...kind === "launcher" ? launcherBody(dir, target, name) : [`exec ${shellQuote(join(dir, target))} "$@"`],
|
|
121
|
+
""
|
|
122
|
+
].join("\n")
|
|
84
123
|
}
|
|
85
124
|
];
|
|
86
125
|
return [
|
|
@@ -150,14 +189,15 @@ var writeShim = /* @__PURE__ */ __name(({ path, text }) => {
|
|
|
150
189
|
}, "writeShim");
|
|
151
190
|
|
|
152
191
|
export {
|
|
153
|
-
describeAnswer,
|
|
154
|
-
parseDescribe,
|
|
155
192
|
FIRST_PARTY_TOOLS,
|
|
156
193
|
BUILT_IN_COMMANDS,
|
|
157
194
|
TOOL_NAME,
|
|
158
195
|
PROGRAM_PREFIX,
|
|
159
196
|
DESCRIBE_FLAG,
|
|
197
|
+
DESCRIBE_MAX_BYTES,
|
|
160
198
|
DISPATCH_FLAG,
|
|
199
|
+
describeAnswer,
|
|
200
|
+
parseDescribe,
|
|
161
201
|
SHIM_FORMAT,
|
|
162
202
|
shimFiles,
|
|
163
203
|
fileState,
|