@wirecat/drive-cli 0.57.0 → 0.58.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/drive.js +2 -2
- package/dist/bin/drive.js.map +1 -1
- package/dist/bundle/{all-profiles-7LSZ3CC3.js → all-profiles-ANDWOJDL.js} +10 -6
- package/dist/bundle/{anthropic-3QRM4QXB.js → anthropic-EZPZUWGS.js} +10 -6
- package/dist/bundle/{app-server-WWNMUHID.js → app-server-67WL423B.js} +57 -51
- package/dist/bundle/{bun-sqlite-GSLSN3OT.js → bun-sqlite-A5ZKTIYC.js} +7 -3
- package/dist/bundle/{chunk-L4BBK7UX.js → chunk-2TASMYGM.js} +4 -2
- package/dist/bundle/{chunk-VTJF2L5E.js → chunk-34XHR5FL.js} +5 -5
- package/dist/bundle/{chunk-JIGMCW4C.js → chunk-3GXNODTB.js} +3 -3
- package/dist/bundle/chunk-3RG27IWA.js +201 -0
- package/dist/bundle/{chunk-KHNDZNQA.js → chunk-4EEOJ54H.js} +40 -36
- package/dist/bundle/{chunk-Q3TMNETS.js → chunk-4GZLX2ME.js} +27 -21
- package/dist/bundle/{chunk-B3TPS7BW.js → chunk-4ICWGMHN.js} +6 -4
- package/dist/bundle/{chunk-4F2VRJZE.js → chunk-4UU4ONKY.js} +31 -23
- package/dist/bundle/{chunk-IJ2S53WJ.js → chunk-5NPFHWLP.js} +7 -7
- package/dist/bundle/{chunk-566W4Q6L.js → chunk-6SARLV3Z.js} +1 -1
- package/dist/bundle/{chunk-AKPFH3KC.js → chunk-6THTUYPT.js} +1 -1
- package/dist/bundle/{chunk-GKHUHRSL.js → chunk-7AL57FCK.js} +1 -1
- package/dist/bundle/{chunk-SRNXTXJN.js → chunk-7VFD3UJQ.js} +1 -1
- package/dist/bundle/{chunk-CGCQNYB3.js → chunk-7VUHY5LP.js} +1 -1
- package/dist/bundle/{chunk-TZHCS5MG.js → chunk-7YUZAEBG.js} +1 -1
- package/dist/bundle/{chunk-JUKVJ7M2.js → chunk-A4DHPOFQ.js} +7 -5
- package/dist/bundle/chunk-A7FMNTCK.js +166 -0
- package/dist/bundle/{chunk-2QLLKDE5.js → chunk-AFZ33AC7.js} +47 -43
- package/dist/bundle/{chunk-XGNADVIA.js → chunk-ALTG7BZQ.js} +14 -215
- package/dist/bundle/chunk-ASPIEEXN.js +34 -0
- package/dist/bundle/{chunk-WJOKTIOJ.js → chunk-BAEIAQWH.js} +1 -1
- package/dist/bundle/{chunk-W6FYYQ2J.js → chunk-BKM2CGG2.js} +2 -2
- package/dist/bundle/{chunk-G34Y5RAC.js → chunk-BLJVCJZU.js} +5 -5
- package/dist/bundle/{chunk-7SNS443B.js → chunk-D72FL3L3.js} +1 -1
- package/dist/bundle/{chunk-OYNSFQ7K.js → chunk-D72URWJE.js} +1 -39
- package/dist/bundle/{chunk-B64EY2SC.js → chunk-ED5JNYN5.js} +27 -27
- package/dist/bundle/{chunk-64E6QXXQ.js → chunk-ESF2B22R.js} +7 -7
- package/dist/bundle/{chunk-5KNIVHP6.js → chunk-FD7A6745.js} +6 -19
- package/dist/bundle/{chunk-ADLS6FVG.js → chunk-FXBHOCJK.js} +1 -1
- package/dist/bundle/{chunk-TKVSJV5P.js → chunk-GDRO4YMH.js} +5 -3
- package/dist/bundle/{chunk-KYNTSA6K.js → chunk-I4VUHZSD.js} +5 -5
- package/dist/bundle/{chunk-O5KDIVGE.js → chunk-IBJOO5FG.js} +17 -15
- package/dist/bundle/{chunk-J2HGHSLX.js → chunk-IH4UCM5K.js} +3 -3
- package/dist/bundle/chunk-ITD7WI23.js +45 -0
- package/dist/bundle/{chunk-EN7OZ5JH.js → chunk-IXXQZCNK.js} +13 -11
- package/dist/bundle/{chunk-R5GJZPRF.js → chunk-J36Z6BDZ.js} +6 -4
- package/dist/bundle/{chunk-6CFSDU56.js → chunk-JEMKSWVI.js} +15 -13
- package/dist/bundle/chunk-JZ67M3HR.js +46 -0
- package/dist/bundle/{chunk-WJPVGXKA.js → chunk-KCBHOYNZ.js} +3 -3
- package/dist/bundle/{chunk-QAT6UXZZ.js → chunk-MBNKNWOG.js} +43 -39
- package/dist/bundle/{chunk-AHBUTDS7.js → chunk-NKL5XXOM.js} +1 -1
- package/dist/bundle/chunk-NYINLKWT.js +23 -0
- package/dist/bundle/{chunk-GIQFBXQN.js → chunk-O3K46QRL.js} +5 -120
- package/dist/bundle/{chunk-NLLWLCUZ.js → chunk-OG5ERX4S.js} +2 -2
- package/dist/bundle/{chunk-RAEKC6TV.js → chunk-OUQVZTF5.js} +7 -5
- package/dist/bundle/{chunk-W5FOPSJZ.js → chunk-OZEJA67C.js} +6 -4
- package/dist/bundle/{chunk-4UQLL6RJ.js → chunk-P5MCZ635.js} +2 -2
- package/dist/bundle/{chunk-YZ6SYLDC.js → chunk-PYPLD7JO.js} +1 -1
- package/dist/bundle/{chunk-6ZA4NR5H.js → chunk-QVIJMV22.js} +2 -2
- package/dist/bundle/chunk-RRHC5SBB.js +106 -0
- package/dist/bundle/{chunk-WBYCUBYM.js → chunk-SPVPKHBQ.js} +25 -23
- package/dist/bundle/{chunk-XJVK7ETL.js → chunk-SWFA36F3.js} +5 -3
- package/dist/bundle/{chunk-HNUSPNUQ.js → chunk-TCJRJ3TE.js} +1 -1
- package/dist/bundle/{chunk-TR5656OS.js → chunk-TIXIB32T.js} +16 -12
- package/dist/bundle/{chunk-KM4Y55ZE.js → chunk-TMW526H3.js} +4 -4
- package/dist/bundle/{chunk-WAVJWGUC.js → chunk-TNX77VPM.js} +35 -33
- package/dist/bundle/{chunk-EE7R457T.js → chunk-UBZ2LH7N.js} +229 -221
- package/dist/bundle/{chunk-2ULJW5BA.js → chunk-UMJLXAJI.js} +1 -1
- package/dist/bundle/{chunk-ELIYJXIY.js → chunk-UTDL7MKT.js} +1 -1
- package/dist/bundle/{chunk-ISK4K7UE.js → chunk-VXI67T7U.js} +1 -1
- package/dist/bundle/{chunk-LBFFI6FE.js → chunk-W6KMNO3C.js} +9 -7
- package/dist/bundle/{chunk-RB674T6L.js → chunk-WICYDOVL.js} +15 -11
- package/dist/bundle/{chunk-UKMFPBAO.js → chunk-X4F3M6L6.js} +3 -3
- package/dist/bundle/{chunk-373WJIHE.js → chunk-X5XWUQNU.js} +1 -1
- package/dist/bundle/{chunk-CD736BG3.js → chunk-XQMMB6ST.js} +1 -1
- package/dist/bundle/{chunk-3BXSLNWW.js → chunk-Y6M2G7JK.js} +12 -10
- package/dist/bundle/{chunk-OZJMZSFB.js → chunk-YHRJUZ3O.js} +2 -2
- package/dist/bundle/{chunk-JLKNUFL2.js → chunk-Z5GDNCTJ.js} +1 -1
- package/dist/bundle/command-contract-ZCXFT764.js +39 -0
- package/dist/bundle/{decode-5MHMPYKE.js → decode-2R6DTGRX.js} +9 -5
- package/dist/bundle/dispatch-DEXAEMIN.js +412 -0
- package/dist/bundle/drive.js +40 -22
- package/dist/bundle/{embed-TF66ODAR.js → embed-RJJWOLKN.js} +9 -5
- package/dist/bundle/{embedder-EDWOIAC2.js → embedder-DWYS5JYJ.js} +11 -7
- package/dist/bundle/entry-E6H7IUPV.js +21 -0
- package/dist/bundle/failure-GBZ4L5QO.js +26 -0
- package/dist/bundle/first-run-DI2JIG44.js +30 -0
- package/dist/bundle/first-screen-X5N4TCKD.js +37 -0
- package/dist/bundle/{google-A4F2WFO4.js → google-L776ETP4.js} +13 -9
- package/dist/bundle/{google-api-ZXGQOJUI.js → google-api-AI5ZJJ2M.js} +54 -48
- package/dist/bundle/grants-HKGYAWL6.js +104 -0
- package/dist/bundle/{identity-4IO7WGG4.js → identity-MDLWK2TX.js} +5 -3
- package/dist/bundle/{login-A4QHJ5DA.js → login-6HHQLRHY.js} +60 -54
- package/dist/bundle/{mcp-VVMPUDSL.js → mcp-ZZUYI44D.js} +4 -2
- package/dist/bundle/{node-P4E63KXA.js → node-KM3CUABH.js} +9 -9
- package/dist/bundle/{node-sqlite-AFQTE4XZ.js → node-sqlite-AVNHGMVL.js} +7 -3
- package/dist/bundle/{oauth-46XBJBML.js → oauth-UVU52X57.js} +9 -5
- package/dist/bundle/{open-WJCRBIP7.js → open-BXPLXJC2.js} +7 -3
- package/dist/bundle/{openai-3TIBDWZA.js → openai-CRO5GDBY.js} +14 -10
- package/dist/bundle/{program-AHZH65IT.js → program-4DWVWSGQ.js} +135 -127
- package/dist/bundle/prompt-AFWVGRDG.js +17 -0
- package/dist/bundle/{reasons-VHCVYH54.js → reasons-IHPNUP5W.js} +4 -2
- package/dist/bundle/{recognize-4EAKIMON.js → recognize-NAISVA56.js} +7 -3
- package/dist/bundle/{remote-HX3JP4EH.js → remote-KCUHG5HV.js} +10 -6
- package/dist/bundle/{rerank-BW3A4PUU.js → rerank-Q3POCDSK.js} +9 -5
- package/dist/bundle/{serve-YYOOLIBS.js → serve-5CUOYLSG.js} +10 -6
- package/dist/bundle/server-FTLPSLRU.js +69 -0
- package/dist/bundle/{server-G6XTEEFI.js → server-FXW3GARV.js} +42 -36
- package/dist/bundle/{services-OAPILZOW.js → services-PEYBXZ3R.js} +30 -24
- package/dist/bundle/{sqlite-runtime-GTXDK4PE.js → sqlite-runtime-YMPWN5PM.js} +8 -4
- package/dist/bundle/start-PFWEF44R.js +138 -0
- package/dist/bundle/{state-XG335LGZ.js → state-5TQ7IOJH.js} +8 -4
- package/dist/bundle/{store-N53SJOPS.js → store-E2VWY4O6.js} +18 -14
- package/dist/bundle/{store-7KOXJNQP.js → store-P4OYYFW5.js} +15 -11
- package/dist/bundle/store-maintenance-command-MWVERNK7.js +58 -0
- package/dist/bundle/tokens-OVG4CJO4.js +102 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -2
- package/dist/bundle/command-contract-XIACCAZL.js +0 -35
- package/dist/bundle/entry-CWYCQ53A.js +0 -17
- package/dist/bundle/first-run-YIH7EHJI.js +0 -24
- package/dist/bundle/first-screen-THH3XD5Y.js +0 -33
- package/dist/bundle/grants-3Z7DG3W3.js +0 -98
- package/dist/bundle/prompt-FFGBIT4A.js +0 -13
- package/dist/bundle/server-YKYEUIJT.js +0 -63
- package/dist/bundle/store-maintenance-command-W3TI52X2.js +0 -52
- package/dist/bundle/tokens-P7TEHKDD.js +0 -96
package/dist/bin/drive.js
CHANGED
|
@@ -9,7 +9,7 @@ if (
|
|
|
9
9
|
(words[0] === "--version" || words[0] === "-V") &&
|
|
10
10
|
!Object.keys(process.env).some((key) => key.endsWith("_TEST_ARGV_LOG"))
|
|
11
11
|
) {
|
|
12
|
-
process.stdout.write("0.
|
|
12
|
+
process.stdout.write("0.58.0\n")
|
|
13
13
|
} else {
|
|
14
14
|
// Before the bundle compiles: the bundle's own call comes after its chunks.
|
|
15
15
|
module.enableCompileCache()
|
|
@@ -29,7 +29,7 @@ if (
|
|
|
29
29
|
})
|
|
30
30
|
}
|
|
31
31
|
const running = import("../bundle/drive.js")
|
|
32
|
-
const chunks = ["../bundle/all-profiles-
|
|
32
|
+
const chunks = ["../bundle/all-profiles-ANDWOJDL.js","../bundle/anthropic-EZPZUWGS.js","../bundle/app-server-67WL423B.js","../bundle/bun-NIIYUR5F.js","../bundle/bun-sqlite-A5ZKTIYC.js","../bundle/command-contract-ZCXFT764.js","../bundle/decode-2R6DTGRX.js","../bundle/dispatch-DEXAEMIN.js","../bundle/dist-MWTMOYWT.js","../bundle/dist-PY3MVR3G.js","../bundle/echarts-CLB22SZS.js","../bundle/embed-RJJWOLKN.js","../bundle/embedder-DWYS5JYJ.js","../bundle/entry-E6H7IUPV.js","../bundle/failure-GBZ4L5QO.js","../bundle/first-run-DI2JIG44.js","../bundle/first-screen-X5N4TCKD.js","../bundle/google-L776ETP4.js","../bundle/google-api-AI5ZJJ2M.js","../bundle/grants-HKGYAWL6.js","../bundle/identity-MDLWK2TX.js","../bundle/instructions-BXZZNAMS.js","../bundle/login-6HHQLRHY.js","../bundle/mcp-ZZUYI44D.js","../bundle/mdast-util-from-markdown-FXEPSNER.js","../bundle/mdast-util-gfm-SZM5GBDF.js","../bundle/micromark-extension-gfm-GRL24TU6.js","../bundle/node-KM3CUABH.js","../bundle/node-R6ZNQ3NT.js","../bundle/node-TLZSIHIJ.js","../bundle/node-sqlite-AVNHGMVL.js","../bundle/oauth-UVU52X57.js","../bundle/open-BXPLXJC2.js","../bundle/openai-CRO5GDBY.js","../bundle/process-P36JP33R.js","../bundle/program-4DWVWSGQ.js","../bundle/prompt-AFWVGRDG.js","../bundle/reasons-IHPNUP5W.js","../bundle/recognize-NAISVA56.js","../bundle/remote-KCUHG5HV.js","../bundle/rerank-Q3POCDSK.js","../bundle/serve-5CUOYLSG.js","../bundle/server-FTLPSLRU.js","../bundle/server-FXW3GARV.js","../bundle/services-PEYBXZ3R.js","../bundle/sqlite-runtime-YMPWN5PM.js","../bundle/start-PFWEF44R.js","../bundle/state-5TQ7IOJH.js","../bundle/store-E2VWY4O6.js","../bundle/store-P4OYYFW5.js","../bundle/store-maintenance-command-MWVERNK7.js","../bundle/terminal-DHJ4D3BC.js","../bundle/tokens-OVG4CJO4.js"]
|
|
33
33
|
// After the server answers its first request, so it starts no later.
|
|
34
34
|
if (serves) setTimeout(() => void Promise.allSettled(chunks.map((chunk) => import(chunk))), 2000).unref()
|
|
35
35
|
await running
|
package/dist/bin/drive.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drive.js","sourceRoot":"","sources":["../../src/bin/drive.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAChD,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAE/F,oGAAoG;AACpG,kBAAkB,EAAE,CAAA;AACpB,mDAAmD;AACnD,MAAM,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"drive.js","sourceRoot":"","sources":["../../src/bin/drive.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAChD,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAE/F,oGAAoG;AACpG,kBAAkB,EAAE,CAAA;AACpB,mDAAmD;AACnD,MAAM,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS,EAAE,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;IACvD,MAAM,CAAC,8BAA8B,CAAC;IACtC,MAAM,CAAC,gBAAgB,CAAC;CACzB,CAAC,CAAA;AACF,MAAM,IAAI,GAAG,MAAM,SAAS,CAAC;IAC3B,OAAO,EAAE,SAAS,CAAC,OAAO;IAC1B,OAAO,EAAE,SAAS,CAAC,OAAO;IAC1B,WAAW,EAAE,SAAS,CAAC,WAAW;IAClC,IAAI,EAAE,iDAAiD;CACxD,CAAC,CAAA;AACF,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;IAC5B,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAA;AAC9B,CAAC;KAAM,CAAC;IACN,MAAM,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,aAAa,EAAE,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QACvE,MAAM,CAAC,6BAA6B,CAAC;QACrC,MAAM,CAAC,eAAe,CAAC;QACvB,MAAM,CAAC,gBAAgB,CAAC;KACzB,CAAC,CAAA;IAEF,MAAM,QAAQ,CAAC;QACb,GAAG,EAAE,SAAS;QACd,WAAW,EAAE,aAAa;QAC1B,OAAO,EAAE,OAAO;QAChB,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,CACnB,CAAC,MAAM,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE;YAC9C,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,GAAG,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,SAAS,GAAG,GAAG,CAAC;YACxC,WAAW,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC;SAC7C,CAAC;QACJ,IAAI,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;YACrB,MAAM,MAAM,GAAG,aAAa,CAAC,KAAK,CAAC,CAAA;YACnC,cAAc,CAAC,UAAU,CACvB,WAAW,CAAC,MAAM,EAAE,EAAE,GAAG,EAAE,SAAS,CAAC,OAAO,EAAE,WAAW,EAAE,aAAa,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,CACnG,CAAA;YACD,OAAO,eAAe,CAAC,MAAM,CAAC,CAAA;QAChC,CAAC;KACF,CAAC,CAAA;AACJ,CAAC"}
|
|
@@ -9,16 +9,20 @@ import {
|
|
|
9
9
|
StdioServerTransport,
|
|
10
10
|
callerOf,
|
|
11
11
|
serveStdio
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-PYPLD7JO.js";
|
|
13
13
|
import {
|
|
14
14
|
McpServer
|
|
15
15
|
} from "./chunk-5D4AEUVA.js";
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-P5MCZ635.js";
|
|
17
|
+
import "./chunk-UMJLXAJI.js";
|
|
18
18
|
import "./chunk-HPXYN7F3.js";
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-ALTG7BZQ.js";
|
|
20
|
+
import "./chunk-3RG27IWA.js";
|
|
21
21
|
import "./chunk-Y5E2WNWB.js";
|
|
22
|
+
import "./chunk-ASPIEEXN.js";
|
|
23
|
+
import "./chunk-RRHC5SBB.js";
|
|
24
|
+
import "./chunk-O3K46QRL.js";
|
|
25
|
+
import "./chunk-ITD7WI23.js";
|
|
22
26
|
import {
|
|
23
27
|
__name
|
|
24
28
|
} from "./chunk-ZVVMGPBJ.js";
|
|
@@ -257,7 +261,7 @@ var serveAllProfilesOverStdio = /* @__PURE__ */ __name(async (options, io = {})
|
|
|
257
261
|
}, "serveAllProfilesOverStdio");
|
|
258
262
|
var serveAllProfilesOverHttp = /* @__PURE__ */ __name(async (options, http) => {
|
|
259
263
|
const { build, close } = allProfilesServer(options);
|
|
260
|
-
const { serveOverHttp } = await import("./serve-
|
|
264
|
+
const { serveOverHttp } = await import("./serve-5CUOYLSG.js");
|
|
261
265
|
const listening = await serveOverHttp(build, {
|
|
262
266
|
...http,
|
|
263
267
|
appName: options.command,
|
|
@@ -2,22 +2,26 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
checkedOptions
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-2TASMYGM.js";
|
|
6
6
|
import {
|
|
7
7
|
messagesFor,
|
|
8
8
|
systemFor
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-UTDL7MKT.js";
|
|
10
10
|
import {
|
|
11
11
|
Anthropic
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-FXBHOCJK.js";
|
|
13
|
+
import "./chunk-ALTG7BZQ.js";
|
|
14
|
+
import "./chunk-3RG27IWA.js";
|
|
15
|
+
import "./chunk-Y5E2WNWB.js";
|
|
16
|
+
import "./chunk-ASPIEEXN.js";
|
|
17
|
+
import "./chunk-RRHC5SBB.js";
|
|
14
18
|
import {
|
|
15
19
|
array,
|
|
16
20
|
optional,
|
|
17
21
|
strictObject,
|
|
18
22
|
string
|
|
19
|
-
} from "./chunk-
|
|
20
|
-
import "./chunk-
|
|
23
|
+
} from "./chunk-O3K46QRL.js";
|
|
24
|
+
import "./chunk-ITD7WI23.js";
|
|
21
25
|
import {
|
|
22
26
|
__name
|
|
23
27
|
} from "./chunk-ZVVMGPBJ.js";
|
|
@@ -3,46 +3,35 @@ const require = __bundleRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
PER_RUN,
|
|
5
5
|
envelope
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-MBNKNWOG.js";
|
|
7
7
|
import {
|
|
8
8
|
mcpUrlOf
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import {
|
|
11
|
-
answeredWire
|
|
12
|
-
} from "./chunk-EFX6FIDM.js";
|
|
9
|
+
} from "./chunk-SPVPKHBQ.js";
|
|
13
10
|
import {
|
|
14
11
|
answered,
|
|
15
12
|
failed,
|
|
16
13
|
registerCommands,
|
|
17
14
|
runCommandForAgent,
|
|
18
15
|
toolsFromCommands
|
|
19
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-4GZLX2ME.js";
|
|
20
17
|
import {
|
|
21
18
|
agentJson,
|
|
22
19
|
skillResource
|
|
23
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-WICYDOVL.js";
|
|
21
|
+
import {
|
|
22
|
+
answeredWire
|
|
23
|
+
} from "./chunk-EFX6FIDM.js";
|
|
24
24
|
import {
|
|
25
25
|
StdioServerTransport,
|
|
26
26
|
serveStdio
|
|
27
|
-
} from "./chunk-
|
|
28
|
-
import {
|
|
29
|
-
appInstructions
|
|
30
|
-
} from "./chunk-EFEI724Z.js";
|
|
27
|
+
} from "./chunk-PYPLD7JO.js";
|
|
31
28
|
import {
|
|
32
29
|
McpServer
|
|
33
30
|
} from "./chunk-5D4AEUVA.js";
|
|
34
|
-
import
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
import "./chunk-
|
|
38
|
-
import "./chunk-EN7OZ5JH.js";
|
|
39
|
-
import "./chunk-SRNXTXJN.js";
|
|
40
|
-
import "./chunk-KHNDZNQA.js";
|
|
41
|
-
import "./chunk-HNUSPNUQ.js";
|
|
42
|
-
import "./chunk-G34Y5RAC.js";
|
|
43
|
-
import "./chunk-VTJF2L5E.js";
|
|
44
|
-
import "./chunk-RAEKC6TV.js";
|
|
45
|
-
import "./chunk-3BXSLNWW.js";
|
|
31
|
+
import "./chunk-ED5JNYN5.js";
|
|
32
|
+
import "./chunk-IXXQZCNK.js";
|
|
33
|
+
import "./chunk-OUQVZTF5.js";
|
|
34
|
+
import "./chunk-Y6M2G7JK.js";
|
|
46
35
|
import {
|
|
47
36
|
DEFAULT_OUTPUT_BYTES,
|
|
48
37
|
changesAuthorityAt,
|
|
@@ -51,41 +40,58 @@ import {
|
|
|
51
40
|
judgedTargets,
|
|
52
41
|
readsOverMcpAt,
|
|
53
42
|
rootOf2 as rootOf
|
|
54
|
-
} from "./chunk-
|
|
55
|
-
import "./chunk-
|
|
56
|
-
import "./chunk-
|
|
57
|
-
import "./chunk-TR5656OS.js";
|
|
58
|
-
import "./chunk-2ULJW5BA.js";
|
|
59
|
-
import "./chunk-7SNS443B.js";
|
|
60
|
-
import "./chunk-5KNIVHP6.js";
|
|
61
|
-
import "./chunk-OYNSFQ7K.js";
|
|
62
|
-
import "./chunk-UKMFPBAO.js";
|
|
43
|
+
} from "./chunk-4UU4ONKY.js";
|
|
44
|
+
import "./chunk-P5MCZ635.js";
|
|
45
|
+
import "./chunk-X4F3M6L6.js";
|
|
63
46
|
import {
|
|
64
47
|
readOnlyLockOf
|
|
65
|
-
} from "./chunk-
|
|
66
|
-
import
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
import "./chunk-
|
|
48
|
+
} from "./chunk-Z5GDNCTJ.js";
|
|
49
|
+
import {
|
|
50
|
+
mcpHttpMarker
|
|
51
|
+
} from "./chunk-7AL57FCK.js";
|
|
52
|
+
import "./chunk-7VFD3UJQ.js";
|
|
53
|
+
import "./chunk-U2RSVKR5.js";
|
|
54
|
+
import {
|
|
55
|
+
appInstructions
|
|
56
|
+
} from "./chunk-EFEI724Z.js";
|
|
57
|
+
import "./chunk-4EEOJ54H.js";
|
|
58
|
+
import "./chunk-BLJVCJZU.js";
|
|
59
|
+
import "./chunk-TCJRJ3TE.js";
|
|
60
|
+
import "./chunk-TIXIB32T.js";
|
|
61
|
+
import "./chunk-UMJLXAJI.js";
|
|
62
|
+
import "./chunk-FD7A6745.js";
|
|
63
|
+
import "./chunk-JZ67M3HR.js";
|
|
64
|
+
import "./chunk-UTDL7MKT.js";
|
|
65
|
+
import "./chunk-QVIJMV22.js";
|
|
66
|
+
import "./chunk-TMW526H3.js";
|
|
70
67
|
import "./chunk-5DPV7X27.js";
|
|
71
|
-
import "./chunk-
|
|
72
|
-
import "./chunk-
|
|
73
|
-
import "./chunk-
|
|
74
|
-
import "./chunk-
|
|
75
|
-
import "./chunk-
|
|
68
|
+
import "./chunk-YHRJUZ3O.js";
|
|
69
|
+
import "./chunk-34XHR5FL.js";
|
|
70
|
+
import "./chunk-D72FL3L3.js";
|
|
71
|
+
import "./chunk-TNX77VPM.js";
|
|
72
|
+
import "./chunk-X5XWUQNU.js";
|
|
73
|
+
import "./chunk-J36Z6BDZ.js";
|
|
74
|
+
import "./chunk-SWFA36F3.js";
|
|
75
|
+
import "./chunk-NKL5XXOM.js";
|
|
76
|
+
import "./chunk-4ICWGMHN.js";
|
|
77
|
+
import "./chunk-7VUHY5LP.js";
|
|
78
|
+
import "./chunk-KCBHOYNZ.js";
|
|
79
|
+
import "./chunk-LSSIVBQI.js";
|
|
80
|
+
import "./chunk-7YUZAEBG.js";
|
|
81
|
+
import "./chunk-D72URWJE.js";
|
|
82
|
+
import "./chunk-NYINLKWT.js";
|
|
76
83
|
import "./chunk-HPXYN7F3.js";
|
|
77
|
-
import "./chunk-
|
|
78
|
-
import "./chunk-B3TPS7BW.js";
|
|
79
|
-
import "./chunk-CGCQNYB3.js";
|
|
80
|
-
import "./chunk-WJPVGXKA.js";
|
|
84
|
+
import "./chunk-ALTG7BZQ.js";
|
|
81
85
|
import {
|
|
82
86
|
mcpErrorResult
|
|
83
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-3RG27IWA.js";
|
|
88
|
+
import "./chunk-Y5E2WNWB.js";
|
|
89
|
+
import "./chunk-ASPIEEXN.js";
|
|
90
|
+
import "./chunk-RRHC5SBB.js";
|
|
91
|
+
import "./chunk-O3K46QRL.js";
|
|
84
92
|
import {
|
|
85
93
|
CliError
|
|
86
|
-
} from "./chunk-
|
|
87
|
-
import "./chunk-Y5E2WNWB.js";
|
|
88
|
-
import "./chunk-LSSIVBQI.js";
|
|
94
|
+
} from "./chunk-ITD7WI23.js";
|
|
89
95
|
import {
|
|
90
96
|
__name
|
|
91
97
|
} from "./chunk-ZVVMGPBJ.js";
|
|
@@ -205,7 +211,7 @@ var serveAppOverStdio = /* @__PURE__ */ __name(async (command, context, options)
|
|
|
205
211
|
var serveAppOverHttp = /* @__PURE__ */ __name(async (command, context, options, http) => {
|
|
206
212
|
const { app } = options;
|
|
207
213
|
const { build } = createAppServer(command, context, options);
|
|
208
|
-
const { serveOverHttp } = await import("./serve-
|
|
214
|
+
const { serveOverHttp } = await import("./serve-5CUOYLSG.js");
|
|
209
215
|
const listening = await serveOverHttp(build, {
|
|
210
216
|
...http,
|
|
211
217
|
appName: app.command,
|
|
@@ -3,12 +3,16 @@ 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-IH4UCM5K.js";
|
|
7
|
+
import "./chunk-ALTG7BZQ.js";
|
|
8
|
+
import "./chunk-3RG27IWA.js";
|
|
9
9
|
import {
|
|
10
10
|
importFrom
|
|
11
11
|
} from "./chunk-Y5E2WNWB.js";
|
|
12
|
+
import "./chunk-ASPIEEXN.js";
|
|
13
|
+
import "./chunk-RRHC5SBB.js";
|
|
14
|
+
import "./chunk-O3K46QRL.js";
|
|
15
|
+
import "./chunk-ITD7WI23.js";
|
|
12
16
|
import {
|
|
13
17
|
__name
|
|
14
18
|
} from "./chunk-ZVVMGPBJ.js";
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { createRequire as __bundleRequire } from "node:module";
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
|
-
CliError,
|
|
5
4
|
finite,
|
|
6
5
|
getDotPath,
|
|
7
6
|
maxValue,
|
|
@@ -10,7 +9,10 @@ import {
|
|
|
10
9
|
optional,
|
|
11
10
|
pipe,
|
|
12
11
|
safeParse
|
|
13
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-O3K46QRL.js";
|
|
13
|
+
import {
|
|
14
|
+
CliError
|
|
15
|
+
} from "./chunk-ITD7WI23.js";
|
|
14
16
|
import {
|
|
15
17
|
__name
|
|
16
18
|
} from "./chunk-ZVVMGPBJ.js";
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
organization,
|
|
5
5
|
project,
|
|
6
6
|
reminder
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-D72FL3L3.js";
|
|
8
8
|
import {
|
|
9
9
|
MIGRATIONS,
|
|
10
10
|
SnapshotBudget,
|
|
@@ -32,16 +32,16 @@ import {
|
|
|
32
32
|
tagMemberIds,
|
|
33
33
|
thingOf,
|
|
34
34
|
write
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-TNX77VPM.js";
|
|
36
36
|
import {
|
|
37
37
|
queryFieldsOf
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-SWFA36F3.js";
|
|
39
39
|
import {
|
|
40
40
|
fold
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-NKL5XXOM.js";
|
|
42
42
|
import {
|
|
43
43
|
CliError
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-ITD7WI23.js";
|
|
45
45
|
import {
|
|
46
46
|
__name
|
|
47
47
|
} from "./chunk-ZVVMGPBJ.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { createRequire as __bundleRequire } from "node:module";
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
|
-
import {
|
|
4
|
-
CliError
|
|
5
|
-
} from "./chunk-GIQFBXQN.js";
|
|
6
3
|
import {
|
|
7
4
|
importFrom
|
|
8
5
|
} from "./chunk-Y5E2WNWB.js";
|
|
6
|
+
import {
|
|
7
|
+
CliError
|
|
8
|
+
} from "./chunk-ITD7WI23.js";
|
|
9
9
|
import {
|
|
10
10
|
__name
|
|
11
11
|
} from "./chunk-ZVVMGPBJ.js";
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
visibleControls
|
|
5
|
+
} from "./chunk-ASPIEEXN.js";
|
|
6
|
+
import {
|
|
7
|
+
BASE_REASONS,
|
|
8
|
+
COMMON_DETAILS,
|
|
9
|
+
CRASH_CODE,
|
|
10
|
+
CRASH_REASON,
|
|
11
|
+
stepOf,
|
|
12
|
+
writes
|
|
13
|
+
} from "./chunk-O3K46QRL.js";
|
|
14
|
+
import {
|
|
15
|
+
errorCodes,
|
|
16
|
+
isCliError
|
|
17
|
+
} from "./chunk-ITD7WI23.js";
|
|
18
|
+
import {
|
|
19
|
+
__name
|
|
20
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
21
|
+
|
|
22
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.73.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/exit-codes.js
|
|
23
|
+
var EXIT_CODES = {
|
|
24
|
+
validation_error: 2,
|
|
25
|
+
configuration_error: 3,
|
|
26
|
+
authentication_error: 4,
|
|
27
|
+
permission_error: 5,
|
|
28
|
+
not_found: 6,
|
|
29
|
+
confirmation_required: 7,
|
|
30
|
+
rate_limited: 8,
|
|
31
|
+
timeout: 9,
|
|
32
|
+
network_error: 10,
|
|
33
|
+
provider_error: 11,
|
|
34
|
+
provider_unavailable: 12,
|
|
35
|
+
invalid_response: 13,
|
|
36
|
+
outcome_unknown: 14,
|
|
37
|
+
cancelled: 130
|
|
38
|
+
};
|
|
39
|
+
var exitCodeFor = /* @__PURE__ */ __name((code) => EXIT_CODES[code], "exitCodeFor");
|
|
40
|
+
var GENERIC_FAILURE = 1;
|
|
41
|
+
|
|
42
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.73.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/failure.js
|
|
43
|
+
var recognise = /* @__PURE__ */ __name((failure) => {
|
|
44
|
+
if (isCliError(failure))
|
|
45
|
+
return failure;
|
|
46
|
+
if (!(failure instanceof Error) || failure.name !== "CliError")
|
|
47
|
+
return void 0;
|
|
48
|
+
const { code, details } = failure;
|
|
49
|
+
if (!errorCodes.includes(code))
|
|
50
|
+
return void 0;
|
|
51
|
+
return {
|
|
52
|
+
code,
|
|
53
|
+
message: failure.message,
|
|
54
|
+
details: typeof details === "object" && details !== null ? details : {}
|
|
55
|
+
};
|
|
56
|
+
}, "recognise");
|
|
57
|
+
var reasonFor = /* @__PURE__ */ __name((code, named, reasons) => reasons.find((entry) => entry.reason === named && entry.code === code) ?? BASE_REASONS.find((entry) => entry.reason === named && entry.code === code) ?? // The first base reason for each code is its fallback.
|
|
58
|
+
BASE_REASONS.find((entry) => entry.code === code), "reasonFor");
|
|
59
|
+
var nextFor = /* @__PURE__ */ __name((reason, details, context) => {
|
|
60
|
+
const definition = reason.step ? context.steps?.find((step) => step.id === reason.step) : void 0;
|
|
61
|
+
if (!definition)
|
|
62
|
+
return [];
|
|
63
|
+
const known = new Set(definition.kind === "command" ? definition.args.map((arg) => arg.name) : []);
|
|
64
|
+
const args = Object.fromEntries(Object.entries(details).filter(([key, value]) => known.has(key) && value !== void 0));
|
|
65
|
+
try {
|
|
66
|
+
return [stepOf(definition, { args, ...context.targets ? { targets: context.targets } : {} })];
|
|
67
|
+
} catch {
|
|
68
|
+
return [];
|
|
69
|
+
}
|
|
70
|
+
}, "nextFor");
|
|
71
|
+
var TRANSIENT = [
|
|
72
|
+
"rate_limited",
|
|
73
|
+
"timeout",
|
|
74
|
+
"network_error",
|
|
75
|
+
"provider_unavailable"
|
|
76
|
+
];
|
|
77
|
+
var retryOf = /* @__PURE__ */ __name((code, details, effects) => {
|
|
78
|
+
const transient = details.retryable !== false && (TRANSIENT.includes(code) || code === "provider_error" && details.retryable === true);
|
|
79
|
+
const safe = code !== "outcome_unknown" && transient && (!writes(effects) || details.sent === false);
|
|
80
|
+
const after = details.retry_after_ms;
|
|
81
|
+
return safe && typeof after === "number" && Number.isInteger(after) && after >= 0 ? { safe, after_ms: after } : { safe };
|
|
82
|
+
}, "retryOf");
|
|
83
|
+
var errorObjectOf = /* @__PURE__ */ __name((failure, context = {}) => {
|
|
84
|
+
const reasons = context.reasons ?? [];
|
|
85
|
+
const recognised = recognise(failure);
|
|
86
|
+
if (!recognised) {
|
|
87
|
+
const reason2 = reasonFor(CRASH_CODE, CRASH_REASON, reasons);
|
|
88
|
+
return {
|
|
89
|
+
error: {
|
|
90
|
+
code: CRASH_CODE,
|
|
91
|
+
reason: reason2.reason,
|
|
92
|
+
message: reason2.message,
|
|
93
|
+
retry: { safe: false },
|
|
94
|
+
...context.runId ? { run_id: context.runId } : {}
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
const { code, message, details } = recognised;
|
|
99
|
+
const reason = reasonFor(code, details.reason, reasons);
|
|
100
|
+
const allowed = /* @__PURE__ */ new Set([...COMMON_DETAILS, ...context.details ?? [], ...reason.details]);
|
|
101
|
+
allowed.delete("cause");
|
|
102
|
+
const kept = Object.fromEntries(Object.entries(details).filter(([key, value]) => allowed.has(key) && value !== void 0));
|
|
103
|
+
const next = nextFor(reason, details, context);
|
|
104
|
+
const runId = context.runId ?? (typeof details.run_id === "string" ? details.run_id : void 0);
|
|
105
|
+
return {
|
|
106
|
+
error: {
|
|
107
|
+
code,
|
|
108
|
+
reason: reason.reason,
|
|
109
|
+
message,
|
|
110
|
+
...typeof details.param === "string" ? { param: details.param } : {},
|
|
111
|
+
...Object.keys(kept).length > 0 ? { details: kept } : {},
|
|
112
|
+
...next.length > 0 ? { next } : {},
|
|
113
|
+
retry: retryOf(code, details, context.effects),
|
|
114
|
+
...runId ? { run_id: runId } : {}
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
}, "errorObjectOf");
|
|
118
|
+
var exitCodeOfError = /* @__PURE__ */ __name(({ error }) => error.code === CRASH_CODE ? GENERIC_FAILURE : EXIT_CODES[error.code], "exitCodeOfError");
|
|
119
|
+
var exitCodeOfAnswer = /* @__PURE__ */ __name((meta, partial = false) => {
|
|
120
|
+
if (meta.complete || partial)
|
|
121
|
+
return 0;
|
|
122
|
+
const code = meta.issues?.[0]?.code;
|
|
123
|
+
return code === void 0 ? GENERIC_FAILURE : EXIT_CODES[code];
|
|
124
|
+
}, "exitCodeOfAnswer");
|
|
125
|
+
var kebab = /* @__PURE__ */ __name((name) => name.replaceAll("_", "-"), "kebab");
|
|
126
|
+
var commandLine = /* @__PURE__ */ __name((cli, step) => [
|
|
127
|
+
cli,
|
|
128
|
+
step.command,
|
|
129
|
+
...Object.entries(step.args).map(([name, value]) => value === true ? `--${kebab(name)}` : `--${kebab(name)} ${JSON.stringify(value)}`)
|
|
130
|
+
].join(" "), "commandLine");
|
|
131
|
+
var STACK_FRAMES = 10;
|
|
132
|
+
var errorRecordOf = /* @__PURE__ */ __name((failure, object, options) => {
|
|
133
|
+
const thrown = failure instanceof Error ? failure : void 0;
|
|
134
|
+
const { cause, ...details } = recognise(failure)?.details ?? {};
|
|
135
|
+
const stack = thrown?.stack?.split("\n").slice(1, STACK_FRAMES + 1).map((line) => visibleControls(line.trim()));
|
|
136
|
+
const reason = thrown?.cause ?? cause;
|
|
137
|
+
return {
|
|
138
|
+
time: (options.time ?? /* @__PURE__ */ new Date()).toISOString(),
|
|
139
|
+
severity: "error",
|
|
140
|
+
body: "command.failed",
|
|
141
|
+
...object.error.run_id ? { run_id: object.error.run_id } : {},
|
|
142
|
+
command: options.command,
|
|
143
|
+
attributes: {
|
|
144
|
+
code: object.error.code,
|
|
145
|
+
reason: object.error.reason,
|
|
146
|
+
message: object.error.message,
|
|
147
|
+
...Object.keys(details).length > 0 ? { details } : {},
|
|
148
|
+
...thrown ? { name: thrown.name, thrown_message: visibleControls(thrown.message) } : { thrown: String(failure) },
|
|
149
|
+
...reason === void 0 ? {} : { cause: visibleControls(reason instanceof Error ? reason.message : String(reason)) },
|
|
150
|
+
...stack && stack.length > 0 ? { stack } : {}
|
|
151
|
+
},
|
|
152
|
+
resource: { service: options.service, version: options.version }
|
|
153
|
+
};
|
|
154
|
+
}, "errorRecordOf");
|
|
155
|
+
var renderError = /* @__PURE__ */ __name((object, options) => {
|
|
156
|
+
if (!options.interactive)
|
|
157
|
+
return [JSON.stringify(object), ...options.record ? [JSON.stringify(options.record)] : []].join("\n");
|
|
158
|
+
const { message, next, run_id: runId } = object.error;
|
|
159
|
+
const step = next?.[0];
|
|
160
|
+
return [
|
|
161
|
+
`\u2717 ${visibleControls(message)}`,
|
|
162
|
+
...step?.kind === "command" ? [`\u2192 ${visibleControls(step.why)}: ${visibleControls(step.line ?? commandLine(options.cli, step))}`] : step ? [`\u2192 ${visibleControls(step.why)}`] : [],
|
|
163
|
+
...options.record ? [JSON.stringify(options.record, null, 2)] : runId ? [`details: ${options.cli} runs show ${runId}`] : []
|
|
164
|
+
].join("\n");
|
|
165
|
+
}, "renderError");
|
|
166
|
+
var mcpErrorResult = /* @__PURE__ */ __name((object) => ({
|
|
167
|
+
content: [{ type: "text", text: JSON.stringify(object) }],
|
|
168
|
+
structuredContent: object,
|
|
169
|
+
isError: true
|
|
170
|
+
}), "mcpErrorResult");
|
|
171
|
+
var catchCrashes = /* @__PURE__ */ __name((options) => {
|
|
172
|
+
const target = options.target ?? process;
|
|
173
|
+
const write = options.write ?? ((text) => process.stderr.write(`${text}
|
|
174
|
+
`));
|
|
175
|
+
const exit = options.exit ?? ((code) => process.exit(code));
|
|
176
|
+
const crashed = /* @__PURE__ */ __name((failure) => {
|
|
177
|
+
const object = errorObjectOf(failure, options);
|
|
178
|
+
write(renderError(object, { cli: options.cli, interactive: options.interactive }));
|
|
179
|
+
exit(exitCodeOfError(object));
|
|
180
|
+
}, "crashed");
|
|
181
|
+
target.on("uncaughtException", crashed);
|
|
182
|
+
target.on("unhandledRejection", crashed);
|
|
183
|
+
return () => {
|
|
184
|
+
target.off("uncaughtException", crashed);
|
|
185
|
+
target.off("unhandledRejection", crashed);
|
|
186
|
+
};
|
|
187
|
+
}, "catchCrashes");
|
|
188
|
+
|
|
189
|
+
export {
|
|
190
|
+
EXIT_CODES,
|
|
191
|
+
exitCodeFor,
|
|
192
|
+
GENERIC_FAILURE,
|
|
193
|
+
retryOf,
|
|
194
|
+
errorObjectOf,
|
|
195
|
+
exitCodeOfError,
|
|
196
|
+
exitCodeOfAnswer,
|
|
197
|
+
errorRecordOf,
|
|
198
|
+
renderError,
|
|
199
|
+
mcpErrorResult,
|
|
200
|
+
catchCrashes
|
|
201
|
+
};
|