@wrongstack/cli 1.0.35 → 1.0.37
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/{acp-T77EAEDB.js → acp-HCGUTFNE.js} +11 -8
- package/dist/ascii-mode-B6PKLRHM.js +8 -0
- package/dist/{audit-KCBTHUQI.js → audit-NH7NUKBV.js} +3 -2
- package/dist/{auth-M6LXZTDA.js → auth-ANOVZVHE.js} +12 -11
- package/dist/auto-discover-providers-V75ICIBG.js +8 -0
- package/dist/{automation-MCDFCIMV.js → automation-O7ZRZSFS.js} +20 -4
- package/dist/{bench-MMZHFHDL.js → bench-NDYES33Y.js} +3 -2
- package/dist/boot/governance-evidence-candidate.d.ts +1 -1
- package/dist/boot/system-prompt-menu.d.ts +7 -0
- package/dist/boot/tui-settings-adapter.d.ts +0 -12
- package/dist/{boot-auto-thin-YMAZI3QL.js → boot-auto-thin-7D4OVEWA.js} +5 -4
- package/dist/boot-provider-selection.d.ts +9 -0
- package/dist/{chronicle-PBJS7BN6.js → chronicle-WBK3TJRB.js} +2 -1
- package/dist/{chunk-R4QGL6GB.js → chunk-2MV474XR.js} +1 -1
- package/dist/{chunk-AFOH6CHO.js → chunk-3EXRPTAU.js} +1 -1
- package/dist/{chunk-2EZ2DHOW.js → chunk-3R3OADC5.js} +2 -2
- package/dist/{chunk-RKU66D2O.js → chunk-57PSSEBR.js} +1 -1
- package/dist/{chunk-2CMMWRQH.js → chunk-5TRZZHMN.js} +2 -2
- package/dist/{chunk-RWNI5OWT.js → chunk-6KJU6POA.js} +6 -6
- package/dist/{chunk-AKESWZH5.js → chunk-6VPWQ4TG.js} +2 -2
- package/dist/{chunk-CJSHS2K7.js → chunk-75OLD563.js} +1 -1
- package/dist/{chunk-4UWCMBPG.js → chunk-76JE54WD.js} +7 -5
- package/dist/{chunk-7BNBD4PE.js → chunk-7IY2UTBE.js} +2 -2
- package/dist/{chunk-6Z6C6ZHH.js → chunk-AWRZWPJ3.js} +20 -26
- package/dist/{chunk-TXAFIERF.js → chunk-BAWRRA6O.js} +2 -2
- package/dist/{chunk-DAKVBMD4.js → chunk-BCKVNORU.js} +1 -1
- package/dist/{chunk-4BX2YDTQ.js → chunk-BIGSVBPI.js} +45 -4
- package/dist/{chunk-CZTXF6HY.js → chunk-BJ4LDJ4H.js} +1 -1
- package/dist/{chunk-KMU7GF7X.js → chunk-C2BBH4S4.js} +2 -2
- package/dist/chunk-C4654QI2.js +8 -0
- package/dist/{chunk-M4G5FO7F.js → chunk-C5JP6DJN.js} +1 -1
- package/dist/{chunk-LDV4ERNV.js → chunk-CIGEY7NU.js} +5 -5
- package/dist/{chunk-WTJDSTYD.js → chunk-CVVQ5NCN.js} +5 -5
- package/dist/{chunk-D3K4NYQL.js → chunk-DXHQFV5V.js} +1 -1
- package/dist/{chunk-SUDNPYWD.js → chunk-FM7DPSYA.js} +2 -2
- package/dist/{chunk-YL4KCHZG.js → chunk-FPUB5WWP.js} +1 -1
- package/dist/{chunk-P3Q3KMFH.js → chunk-FUJHWQV4.js} +1 -1
- package/dist/{chunk-ERX4BLKP.js → chunk-GFQH77OH.js} +1 -1
- package/dist/{chunk-DIOODAYM.js → chunk-H53EXXAU.js} +3 -3
- package/dist/{chunk-F5DCFAKI.js → chunk-HKMOIIPQ.js} +1 -1
- package/dist/{chunk-AUQDGU5D.js → chunk-HQBY6OFT.js} +1 -1
- package/dist/{chunk-6SIUTX75.js → chunk-IJLIAPCW.js} +1 -2
- package/dist/{chunk-QD544J2B.js → chunk-JTTV2EVA.js} +1 -1
- package/dist/{chunk-UKP7H2U4.js → chunk-KHFFJ2LC.js} +1 -1
- package/dist/{chunk-4TVYGG6G.js → chunk-MKM4X2AM.js} +1 -1
- package/dist/chunk-ML3US333.js +61 -0
- package/dist/{chunk-HLSHFXTO.js → chunk-NL2ABOAS.js} +2 -2
- package/dist/{chunk-Q7E3BPDU.js → chunk-OGVSKS4Q.js} +1 -1
- package/dist/chunk-OZCYZYN2.js +3708 -0
- package/dist/{chunk-EWKESL4L.js → chunk-P24ZPPYH.js} +1 -1
- package/dist/chunk-PY2LMG2V.js +1 -0
- package/dist/{chunk-CSAPOCBP.js → chunk-QC6CLAK7.js} +1 -1
- package/dist/{chunk-HXJYHAR4.js → chunk-QVITQ425.js} +1 -1
- package/dist/{chunk-GZSKLXYG.js → chunk-RAWHRRUJ.js} +10 -10
- package/dist/{chunk-PA4VBCXS.js → chunk-RBZVDWTL.js} +1 -1
- package/dist/{chunk-YMXXOOFN.js → chunk-SPSHEZ46.js} +1 -1
- package/dist/{chunk-TWSQTQKR.js → chunk-T4TGMTH2.js} +3 -3
- package/dist/{chunk-LKFKO4JW.js → chunk-TZPKOS5G.js} +3 -3
- package/dist/{chunk-X4LW5CZM.js → chunk-UBDLNC3N.js} +1 -1
- package/dist/{chunk-SDJCLEK6.js → chunk-UFRVTBV6.js} +1 -1
- package/dist/{chunk-VCYZ3WZV.js → chunk-UOQPDZ5H.js} +1 -1
- package/dist/{chunk-PZQBGUVZ.js → chunk-UVF3BGET.js} +1 -1
- package/dist/{chunk-HHRYIDOW.js → chunk-VAQXOZKP.js} +34 -7
- package/dist/{chunk-4XCBEUBX.js → chunk-VHC47E7U.js} +1 -1
- package/dist/{chunk-LKPEBZBE.js → chunk-VI2HE4A5.js} +1 -1
- package/dist/chunk-W23PY4IJ.js +44 -0
- package/dist/{chunk-AT2A7RJZ.js → chunk-WDXNBYGD.js} +1 -1
- package/dist/{chunk-NRXWOMK7.js → chunk-XT3NAHRX.js} +1 -1
- package/dist/{chunk-ZYACRPLN.js → chunk-ZCXZGYO5.js} +6 -3
- package/dist/{chunk-65VNCAF6.js → chunk-ZNNFEKDZ.js} +2 -2
- package/dist/{chunk-CDY4D5QK.js → chunk-ZTSTMFYW.js} +2 -2
- package/dist/{chunk-YTEOAWOJ.js → chunk-ZXX3MJRL.js} +1 -1
- package/dist/{cli-context-II57EHD2.js → cli-context-V6NKFU2X.js} +166 -100
- package/dist/{cli-main-YR2WJCPL.js → cli-main-LHQTVOYW.js} +963 -246
- package/dist/{config-transfer-VOIFY7U4.js → config-transfer-Y7XJMJRN.js} +8 -5
- package/dist/{diag-doctor-BIZAFIAT.js → diag-doctor-5SVYK2DR.js} +5 -4
- package/dist/execute-deps.d.ts +8 -0
- package/dist/{execution-IBAZ2EIU.js → execution-BAP566QC.js} +103 -33
- package/dist/{export-VVRIOWFV.js → export-W27PTU6Y.js} +3 -2
- package/dist/fleet/host-director-setup.d.ts +2 -0
- package/dist/fleet/host-skill-companion.d.ts +73 -0
- package/dist/fleet/host.d.ts +1 -0
- package/dist/fleet/skill-companion-policy.d.ts +33 -0
- package/dist/{governance-RYSHV675.js → governance-A32M4ILK.js} +2 -1
- package/dist/{hq-5OIEKB4V.js → hq-JD5AZVMG.js} +8 -7
- package/dist/hq-server/snapshot.d.ts +1 -1
- package/dist/hq-server/socket-credentials.d.ts +1 -1
- package/dist/hq-server/ws.d.ts +1 -1
- package/dist/{hq-server-DU3ZH3X7.js → hq-server-BI23EPM7.js} +7 -5
- package/dist/{hq-service-LYZV7EK7.js → hq-service-TQNPIRHL.js} +8 -7
- package/dist/hq-ttl-RKRF7AQX.js +8 -0
- package/dist/{hq-tunnel-NIJ5EP2Y.js → hq-tunnel-6VU4IWV4.js} +2 -1
- package/dist/{import-claude-code-AYG24RG2.js → import-claude-code-D4F6ZE7I.js} +6 -5
- package/dist/index.js +9 -8
- package/dist/{init-DRMMFG2G.js → init-5PLABNLR.js} +2 -1
- package/dist/ip-allowlist-YDOFO7XJ.js +10 -0
- package/dist/{kanban-run-mirror-22HQ5FNG.js → kanban-run-mirror-SZ3S3S3Z.js} +3 -2
- package/dist/kanban-supervisor-55XPUHAM.js +8 -0
- package/dist/live-settings-input.d.ts +8 -0
- package/dist/{mailbox-serve-S536N66F.js → mailbox-serve-MMQCHOHI.js} +5 -3
- package/dist/{mcp-LBS45HWZ.js → mcp-2XWBJEQN.js} +4 -3
- package/dist/{modeldiag-NEPTLFZW.js → modeldiag-ERXYJODJ.js} +8 -7
- package/dist/{per-subcommand-help-VKPV3OEY.js → per-subcommand-help-D6J4ZXW2.js} +4 -3
- package/dist/{permissions-PL27UHYD.js → permissions-6YJ64W65.js} +3 -2
- package/dist/plugin-config.d.ts +6 -0
- package/dist/{plugin-usage-3TZGROK7.js → plugin-usage-TYF5HY4K.js} +6 -5
- package/dist/{plugins-ITH4SLO6.js → plugins-XGAXDLPT.js} +6 -5
- package/dist/pre-launch/launch-prompts.d.ts +21 -2
- package/dist/pre-launch.d.ts +1 -1
- package/dist/{project-AOQI5XTK.js → project-V5KNTLV4.js} +2 -1
- package/dist/{project-manifest-FTFDCCTZ.js → project-manifest-HXCID644.js} +3 -2
- package/dist/{project-picker-NZYJKQQC.js → project-picker-FUSLXKSA.js} +4 -3
- package/dist/{projects-T4CZCA25.js → projects-FWRJHW3S.js} +2 -1
- package/dist/{providers-models-37DUV2GW.js → providers-models-CDI5GVBX.js} +7 -6
- package/dist/{proxy-wiring-K2DORFFL.js → proxy-wiring-FIW6HFJV.js} +4 -3
- package/dist/{quick-CNB4Z3HS.js → quick-NPC3N3ZX.js} +2 -1
- package/dist/{remote-C74BCNND.js → remote-AKKRJEHK.js} +5 -4
- package/dist/{replay-DEI566CW.js → replay-5FOPERB2.js} +2 -1
- package/dist/{replay-JJ2NOWD6.js → replay-URJFMQCU.js} +3 -2
- package/dist/{rewind-7AULJS7F.js → rewind-GAUXWSTU.js} +3 -2
- package/dist/{sage-FFKUOCQL.js → sage-6KKXK2ZS.js} +11 -6
- package/dist/{sage-sync-ZMTHB477.js → sage-sync-IN3WKEBN.js} +5 -3
- package/dist/{sandbox-TYGD6FI2.js → sandbox-EZQ76MNY.js} +2 -1
- package/dist/{sdd-runtime-PF72WHLO.js → sdd-runtime-6MFUXWJK.js} +4 -3
- package/dist/{session-move-P2EC2COA.js → session-move-F3N45UQQ.js} +2 -1
- package/dist/{sessions-config-VE26SB56.js → sessions-config-SJVQXCIE.js} +7 -6
- package/dist/{sessions-doctor-QUL37U32.js → sessions-doctor-DZQTDQRY.js} +2 -1
- package/dist/short-circuit-flags-647S5WBL.js +11 -0
- package/dist/{simpleui-dist-7BQISSEP.js → simpleui-dist-EE3TJRBG.js} +2 -1
- package/dist/{skill-suggest-THANK3LV.js → skill-suggest-LZV2TIPQ.js} +22 -6
- package/dist/slash-commands/browser.d.ts +3 -0
- package/dist/slash-commands/command-context.d.ts +3 -0
- package/dist/slash-commands/doctor.d.ts +0 -9
- package/dist/{standalone-auto-update-VQC4GYCM.js → standalone-auto-update-X5SK4M5B.js} +17 -5
- package/dist/{standalone-update-HZHDZZOR.js → standalone-update-6U4NP5MN.js} +4 -3
- package/dist/subcommands-EGZPBQOO.js +10 -0
- package/dist/{tools-skills-33AI6K6S.js → tools-skills-55QVTMSK.js} +2 -1
- package/dist/{typesafe-NHC322W5.js → typesafe-YBEADNAH.js} +8 -7
- package/dist/{typesafe-brain-replay-C5276FVR.js → typesafe-brain-replay-XBU5RZDY.js} +2 -1
- package/dist/{typesafe-judgment-check-GGYYV5UF.js → typesafe-judgment-check-XRLBF5JV.js} +2 -1
- package/dist/{typesafe-topic-replay-DB2AYL7V.js → typesafe-topic-replay-L6NKFYPM.js} +4 -3
- package/dist/{typesafe-triage-replay-27NDAZ3V.js → typesafe-triage-replay-IRV2HHLN.js} +3 -2
- package/dist/{update-6OEPAEUV.js → update-54W7GUS5.js} +6 -5
- package/dist/{update-check-VLVT4IV2.js → update-check-JBGP4ZFI.js} +4 -3
- package/dist/utils/win32-cmd.d.ts +1 -1
- package/dist/{version-JB2UAV2A.js → version-Q6KJ23GB.js} +3 -2
- package/dist/version-help-RBZC5GZZ.js +11 -0
- package/dist/webui-server/credential-watcher.d.ts +3 -1
- package/dist/webui-server/provider-config.d.ts +12 -5
- package/dist/{webui-server-6IC3SLZG.js → webui-server-HIUY3RHD.js} +59 -49
- package/dist/wiring/management-tools.d.ts +9 -1
- package/dist/wiring/slash-commands.d.ts +3 -0
- package/dist/{wrongtrace-gate-counters-7C2EAAZL.js → wrongtrace-gate-counters-K44XG3H3.js} +3 -2
- package/dist/{wrongtrace-telemetry-3ASFKOZO.js → wrongtrace-telemetry-YS6SUBXK.js} +3 -2
- package/dist/ws-runtime.d.ts +6 -0
- package/package.json +39 -39
- package/LICENSE +0 -21
- package/dist/ascii-mode-SG4PRNLP.js +0 -7
- package/dist/auto-discover-providers-JX346GOM.js +0 -7
- package/dist/chunk-BHXAKTBE.js +0 -10
- package/dist/chunk-LDXXMPMS.js +0 -61
- package/dist/chunk-TGSPCFBT.js +0 -1
- package/dist/hq-ttl-N4DAIAVX.js +0 -7
- package/dist/ip-allowlist-NHXO6AKJ.js +0 -9
- package/dist/kanban-supervisor-67ECABTD.js +0 -7
- package/dist/short-circuit-flags-EXJBJ5GT.js +0 -10
- package/dist/subcommands-DTKBXLPU.js +0 -9
- package/dist/version-help-JQGRPDJW.js +0 -10
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=chunk-PY2LMG2V.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
hasApiKey,
|
|
3
3
|
isKeylessLocalProvider,
|
|
4
4
|
visibleModelIds
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-57PSSEBR.js";
|
|
6
6
|
import {
|
|
7
7
|
activeLabel,
|
|
8
8
|
loadConfigProviders,
|
|
@@ -12,14 +12,14 @@ import {
|
|
|
12
12
|
nowIso,
|
|
13
13
|
resolveActiveApiKey,
|
|
14
14
|
writeKeysBack
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-ZCXZGYO5.js";
|
|
16
16
|
import {
|
|
17
17
|
appendHistory,
|
|
18
18
|
backupCurrent
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-BIGSVBPI.js";
|
|
20
20
|
import {
|
|
21
21
|
openBrowser
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-BCKVNORU.js";
|
|
23
23
|
|
|
24
24
|
// src/auth-menu/auth-menu-audit.ts
|
|
25
25
|
import { appendFileSync } from "node:fs";
|
|
@@ -172,7 +172,7 @@ function decideAuthLocalEvents(opts) {
|
|
|
172
172
|
}
|
|
173
173
|
|
|
174
174
|
// src/auth-menu/provider-auth-login.ts
|
|
175
|
-
import { color } from "@wrongstack/core/utils";
|
|
175
|
+
import { color, toErrorMessage } from "@wrongstack/core/utils";
|
|
176
176
|
import {
|
|
177
177
|
applyProviderAuthOutcome,
|
|
178
178
|
createBuiltinProviderAuthRegistry
|
|
@@ -289,7 +289,7 @@ async function runProviderAuthLogin(deps, strategyId, opts = {}) {
|
|
|
289
289
|
`));
|
|
290
290
|
return 0;
|
|
291
291
|
} catch (error) {
|
|
292
|
-
const message = error instanceof DOMException && error.name === "AbortError" ? "Login cancelled." :
|
|
292
|
+
const message = error instanceof DOMException && error.name === "AbortError" ? "Login cancelled." : toErrorMessage(error);
|
|
293
293
|
deps.renderer.writeError(` Login failed: ${message}`);
|
|
294
294
|
return 1;
|
|
295
295
|
} finally {
|
|
@@ -845,7 +845,7 @@ import {
|
|
|
845
845
|
|
|
846
846
|
// src/picker.ts
|
|
847
847
|
import os from "node:os";
|
|
848
|
-
import { color as color8, expectDefined as expectDefined2, toErrorMessage, withFileLock } from "@wrongstack/core/utils";
|
|
848
|
+
import { color as color8, expectDefined as expectDefined2, toErrorMessage as toErrorMessage2, withFileLock } from "@wrongstack/core/utils";
|
|
849
849
|
|
|
850
850
|
// src/picker-model-picker.ts
|
|
851
851
|
import {
|
|
@@ -1341,7 +1341,7 @@ async function saveToGlobalConfig(configPath, provider, model, options = {}) {
|
|
|
1341
1341
|
JSON.stringify({
|
|
1342
1342
|
level: "warn",
|
|
1343
1343
|
event: "picker.backup_failed",
|
|
1344
|
-
message:
|
|
1344
|
+
message: toErrorMessage2(err),
|
|
1345
1345
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
1346
1346
|
})
|
|
1347
1347
|
);
|
|
@@ -1364,7 +1364,7 @@ async function saveToGlobalConfig(configPath, provider, model, options = {}) {
|
|
|
1364
1364
|
JSON.stringify({
|
|
1365
1365
|
level: "warn",
|
|
1366
1366
|
event: "picker.save_failed",
|
|
1367
|
-
message:
|
|
1367
|
+
message: toErrorMessage2(err),
|
|
1368
1368
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
1369
1369
|
})
|
|
1370
1370
|
);
|
|
@@ -2024,4 +2024,4 @@ export {
|
|
|
2024
2024
|
addCustomProvider,
|
|
2025
2025
|
addKeyForProvider
|
|
2026
2026
|
};
|
|
2027
|
-
//# sourceMappingURL=chunk-
|
|
2027
|
+
//# sourceMappingURL=chunk-RAWHRRUJ.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
mutateConfigProviders
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ZCXZGYO5.js";
|
|
4
4
|
import {
|
|
5
5
|
activeProfileConfigPath
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-SPSHEZ46.js";
|
|
7
7
|
|
|
8
8
|
// src/wiring/provider-persisters.ts
|
|
9
9
|
import {
|
|
@@ -51,4 +51,4 @@ export {
|
|
|
51
51
|
installProviderPersisters,
|
|
52
52
|
applyProviderOAuthRefresh2 as applyProviderOAuthRefresh
|
|
53
53
|
};
|
|
54
|
-
//# sourceMappingURL=chunk-
|
|
54
|
+
//# sourceMappingURL=chunk-T4TGMTH2.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
patchConfig
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-P24ZPPYH.js";
|
|
4
4
|
import {
|
|
5
5
|
PLUGIN_AUDIT_ENTRIES,
|
|
6
6
|
loadExternalPlugins
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-VAQXOZKP.js";
|
|
8
8
|
|
|
9
9
|
// src/wiring/plugins.ts
|
|
10
10
|
import { join } from "node:path";
|
|
@@ -306,4 +306,4 @@ export {
|
|
|
306
306
|
BUILTIN_PLUGIN_NAME_HINTS,
|
|
307
307
|
setupPlugins
|
|
308
308
|
};
|
|
309
|
-
//# sourceMappingURL=chunk-
|
|
309
|
+
//# sourceMappingURL=chunk-TZPKOS5G.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
backupCurrent
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BIGSVBPI.js";
|
|
4
4
|
|
|
5
5
|
// src/wiring/external-plugins.ts
|
|
6
6
|
import { isAbsolute, join, resolve } from "node:path";
|
|
@@ -356,11 +356,25 @@ import { homedir } from "node:os";
|
|
|
356
356
|
import { join as join2 } from "node:path";
|
|
357
357
|
import { updateJsonObjectFile } from "@wrongstack/core/utils";
|
|
358
358
|
async function readConfig(file) {
|
|
359
|
+
let raw;
|
|
359
360
|
try {
|
|
360
|
-
|
|
361
|
+
raw = await fs.readFile(file, "utf8");
|
|
362
|
+
} catch (error) {
|
|
363
|
+
if (error.code === "ENOENT") return {};
|
|
364
|
+
throw error;
|
|
365
|
+
}
|
|
366
|
+
let parsed;
|
|
367
|
+
try {
|
|
368
|
+
parsed = JSON.parse(raw.replace(/^\uFEFF/, ""));
|
|
361
369
|
} catch {
|
|
362
|
-
|
|
370
|
+
throw new Error(
|
|
371
|
+
`Profile config "${file}" is not valid JSON \u2014 fix or remove it before changing plugins`
|
|
372
|
+
);
|
|
363
373
|
}
|
|
374
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
375
|
+
throw new Error(`Profile config "${file}" must contain a JSON object`);
|
|
376
|
+
}
|
|
377
|
+
return parsed;
|
|
364
378
|
}
|
|
365
379
|
function pluginName(p) {
|
|
366
380
|
return typeof p === "string" ? p : p.name;
|
|
@@ -411,6 +425,7 @@ import { execFile } from "node:child_process";
|
|
|
411
425
|
import * as fs2 from "node:fs/promises";
|
|
412
426
|
import { join as join3 } from "node:path";
|
|
413
427
|
import { buildChildEnv } from "@wrongstack/core/utils";
|
|
428
|
+
import { treeKill } from "@wrongstack/core/utils/tree-kill";
|
|
414
429
|
import { resolveExecInvocation } from "@wrongstack/plugins/runtime";
|
|
415
430
|
function detectPackageManager(args) {
|
|
416
431
|
const override = args.find((a) => a.startsWith("--pm="));
|
|
@@ -467,7 +482,10 @@ function runPackageManagerInstall(pm, args, cwd) {
|
|
|
467
482
|
});
|
|
468
483
|
return;
|
|
469
484
|
}
|
|
470
|
-
|
|
485
|
+
let settled = false;
|
|
486
|
+
let timedOut = false;
|
|
487
|
+
let timer;
|
|
488
|
+
const child = execFile(
|
|
471
489
|
invocation.cmd,
|
|
472
490
|
invocation.args,
|
|
473
491
|
{
|
|
@@ -476,20 +494,29 @@ function runPackageManagerInstall(pm, args, cwd) {
|
|
|
476
494
|
// untrusted package lifecycle scripts — with the full inherited
|
|
477
495
|
// environment. Strip credentials via the shared child env.
|
|
478
496
|
env: buildChildEnv(),
|
|
479
|
-
timeout: 3e5,
|
|
480
497
|
maxBuffer: 16 * 1024 * 1024,
|
|
481
498
|
windowsHide: true,
|
|
482
499
|
...invocation.windowsVerbatimArguments ? { windowsVerbatimArguments: true } : {}
|
|
483
500
|
},
|
|
484
501
|
(err, stdout, stderr) => {
|
|
502
|
+
settled = true;
|
|
503
|
+
clearTimeout(timer);
|
|
485
504
|
const code = err ? err.code ?? 1 : 0;
|
|
486
505
|
resolvePromise({
|
|
487
|
-
code: typeof code === "number" ? code : 1,
|
|
506
|
+
code: typeof code === "number" && !timedOut ? code : 1,
|
|
488
507
|
stdout: typeof stdout === "string" ? stdout : "",
|
|
489
508
|
stderr: typeof stderr === "string" ? stderr : ""
|
|
490
509
|
});
|
|
491
510
|
}
|
|
492
511
|
);
|
|
512
|
+
if (!settled) {
|
|
513
|
+
timer = setTimeout(() => {
|
|
514
|
+
timedOut = true;
|
|
515
|
+
treeKill(child);
|
|
516
|
+
child.stdout?.destroy();
|
|
517
|
+
child.stderr?.destroy();
|
|
518
|
+
}, 3e5);
|
|
519
|
+
}
|
|
493
520
|
});
|
|
494
521
|
}
|
|
495
522
|
async function installPluginPackage(spec, args, deps) {
|
|
@@ -1109,4 +1136,4 @@ export {
|
|
|
1109
1136
|
PLUGIN_AUDIT_ENTRIES,
|
|
1110
1137
|
runPluginManagementCommand
|
|
1111
1138
|
};
|
|
1112
|
-
//# sourceMappingURL=chunk-
|
|
1139
|
+
//# sourceMappingURL=chunk-VAQXOZKP.js.map
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { createRequire as __wrongstackWsRequire } from 'node:module';
|
|
2
|
+
const require = __wrongstackWsRequire(import.meta.url);
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
10
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
11
|
+
}) : x)(function(x) {
|
|
12
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
13
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
14
|
+
});
|
|
15
|
+
var __commonJS = (cb, mod) => function __require2() {
|
|
16
|
+
try {
|
|
17
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
18
|
+
} catch (e) {
|
|
19
|
+
throw mod = 0, e;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
var __copyProps = (to, from, except, desc) => {
|
|
23
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
24
|
+
for (let key of __getOwnPropNames(from))
|
|
25
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
26
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
27
|
+
}
|
|
28
|
+
return to;
|
|
29
|
+
};
|
|
30
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
31
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
32
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
33
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
34
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
35
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
36
|
+
mod
|
|
37
|
+
));
|
|
38
|
+
|
|
39
|
+
export {
|
|
40
|
+
__require,
|
|
41
|
+
__commonJS,
|
|
42
|
+
__toESM
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=chunk-W23PY4IJ.js.map
|
|
@@ -58,6 +58,9 @@ function maskedKey(key) {
|
|
|
58
58
|
const tail = key.slice(-4);
|
|
59
59
|
return `${color.dim(head + "\u2026")}${tail}`;
|
|
60
60
|
}
|
|
61
|
+
function stripConfigBom(raw) {
|
|
62
|
+
return raw.replace(/^\uFEFF/, "");
|
|
63
|
+
}
|
|
61
64
|
async function loadConfigProviders(configPath, vault, opts) {
|
|
62
65
|
const warn = opts?.warn;
|
|
63
66
|
const targetPath = opts?.profileConfigPath ?? configPath;
|
|
@@ -72,7 +75,7 @@ async function loadConfigProviders(configPath, vault, opts) {
|
|
|
72
75
|
}
|
|
73
76
|
let parsed;
|
|
74
77
|
try {
|
|
75
|
-
parsed = JSON.parse(raw);
|
|
78
|
+
parsed = JSON.parse(stripConfigBom(raw));
|
|
76
79
|
validateProviderConfigShape(parsed);
|
|
77
80
|
} catch (err) {
|
|
78
81
|
warn?.(`Config at ${targetPath} is not valid JSON: ${err.message}`);
|
|
@@ -118,7 +121,7 @@ async function mutateConfigProviders(configPath, vault, mutator, profileConfigPa
|
|
|
118
121
|
}
|
|
119
122
|
let parsed;
|
|
120
123
|
try {
|
|
121
|
-
parsed = JSON.parse(raw);
|
|
124
|
+
parsed = JSON.parse(stripConfigBom(raw));
|
|
122
125
|
validateProviderConfigShape(parsed);
|
|
123
126
|
} catch (err) {
|
|
124
127
|
if (fileExists) {
|
|
@@ -168,4 +171,4 @@ export {
|
|
|
168
171
|
mutateConfigProviders,
|
|
169
172
|
nowIso
|
|
170
173
|
};
|
|
171
|
-
//# sourceMappingURL=chunk-
|
|
174
|
+
//# sourceMappingURL=chunk-ZCXZGYO5.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveProviderCfgWithProxy
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UFRVTBV6.js";
|
|
4
4
|
|
|
5
5
|
// src/acp-agent-list.ts
|
|
6
6
|
import { REGISTRY_ID_ALIASES } from "@wrongstack/acp";
|
|
@@ -316,4 +316,4 @@ export {
|
|
|
316
316
|
setupProvider,
|
|
317
317
|
createGracefulShutdown
|
|
318
318
|
};
|
|
319
|
-
//# sourceMappingURL=chunk-
|
|
319
|
+
//# sourceMappingURL=chunk-ZNNFEKDZ.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
startProxyProbe
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VHC47E7U.js";
|
|
4
4
|
|
|
5
5
|
// src/wiring/proxy-wiring.ts
|
|
6
6
|
import { applyProxyConfig } from "@wrongstack/core/wiring/proxy-rewrite";
|
|
@@ -53,4 +53,4 @@ export {
|
|
|
53
53
|
bootstrapWrongProxy,
|
|
54
54
|
shutdownWrongProxy
|
|
55
55
|
};
|
|
56
|
-
//# sourceMappingURL=chunk-
|
|
56
|
+
//# sourceMappingURL=chunk-ZTSTMFYW.js.map
|