@wrongstack/cli 1.0.24 → 1.0.26
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/data/providers.json +44 -0
- package/dist/{acp-AJWSKWE5.js → acp-LI665LO2.js} +5 -5
- package/dist/ascii-mode-SG4PRNLP.js +7 -0
- package/dist/{auth-GRBZ7Y3D.js → auth-TE55JF4Z.js} +14 -14
- package/dist/{bench-N5K7Z5O3.js → bench-GTLPM22B.js} +2 -2
- package/dist/boot/append-system-prompt.d.ts +10 -0
- package/dist/boot/ascii-mode.d.ts +12 -0
- package/dist/boot/container-wiring.d.ts +4 -2
- package/dist/boot/dispatch-singleshot.d.ts +4 -1
- package/dist/boot/mcp-config-flag.d.ts +22 -0
- package/dist/boot/piped-stdin.d.ts +40 -0
- package/dist/boot/restricted-mode.d.ts +15 -0
- package/dist/boot/safe-mode.d.ts +30 -0
- package/dist/boot/single-shot-budget.d.ts +30 -0
- package/dist/boot/stream-json.d.ts +36 -0
- package/dist/boot/structured-output.d.ts +16 -0
- package/dist/boot/system-prompt-builder.d.ts +2 -0
- package/dist/boot/tool-restriction-flags.d.ts +36 -0
- package/dist/boot/worktree-sessions.d.ts +21 -0
- package/dist/boot-provider-selection.d.ts +67 -0
- package/dist/boot.d.ts +1 -38
- package/dist/{chunk-LFMVHT3R.js → chunk-2ERX3RPN.js} +11 -13
- package/dist/chunk-4TVYGG6G.js +62 -0
- package/dist/chunk-5JYDKG5B.js +154 -0
- package/dist/{chunk-3VXYY5JC.js → chunk-5UZBUV2H.js} +3 -19
- package/dist/chunk-BEHGRNOQ.js +58 -0
- package/dist/chunk-CZTXF6HY.js +140 -0
- package/dist/{chunk-SKPDE62W.js → chunk-EPR42SWM.js} +36 -6
- package/dist/{chunk-YBUCXXYZ.js → chunk-F5DCFAKI.js} +1 -1
- package/dist/chunk-HLSHFXTO.js +97 -0
- package/dist/{chunk-BLD5DSVA.js → chunk-KJS5543T.js} +2 -2
- package/dist/{chunk-QFPQXKCG.js → chunk-KOEO4CJG.js} +21 -6
- package/dist/chunk-LBPLTTZ6.js +105 -0
- package/dist/{chunk-3OCUS3VN.js → chunk-LDCGZJTC.js} +4 -4
- package/dist/chunk-LKPEBZBE.js +143 -0
- package/dist/{chunk-DRM7PSW7.js → chunk-OAVBM55Q.js} +3 -3
- package/dist/chunk-PZQBGUVZ.js +18 -0
- package/dist/{chunk-MHEBWVXL.js → chunk-Q4INH2DG.js} +46 -2
- package/dist/{chunk-ZZRSG7VK.js → chunk-RZ4ZDRYA.js} +3 -3
- package/dist/{chunk-U46QR4WR.js → chunk-TI7KLHYX.js} +132 -3
- package/dist/{chunk-PGKJ2OQP.js → chunk-WQV2NP57.js} +5 -5
- package/dist/chunk-X756ZS72.js +329 -0
- package/dist/{chunk-JF2MULWF.js → chunk-YHYINL47.js} +47 -15
- package/dist/{cli-context-34Q5IJRA.js → cli-context-UVGAN3NO.js} +407 -327
- package/dist/{cli-main-AELJDBGU.js → cli-main-TN3KZ2P6.js} +2652 -1978
- package/dist/cli-update-notice.d.ts +2 -1
- package/dist/config-doctor.d.ts +1 -1
- package/dist/{diag-doctor-WIFJH3XH.js → diag-doctor-BIZAFIAT.js} +2 -2
- package/dist/{execution-PYC5FCS4.js → execution-7QIP6GRY.js} +1948 -1666
- package/dist/fleet/host-types.d.ts +3 -1
- package/dist/goal-commands.d.ts +47 -0
- package/dist/goal-host.d.ts +1 -14
- package/dist/{hq-JTUTFI4L.js → hq-GLZ7QESM.js} +6 -6
- package/dist/{hq-server-PC7GZMPT.js → hq-server-YTKDVQPY.js} +2 -2
- package/dist/{hq-service-NW56MUP2.js → hq-service-BMMJAHRT.js} +4 -4
- package/dist/import-claude-code-32PCSIQI.js +236 -0
- package/dist/index.js +12 -8
- package/dist/{mailbox-serve-WDOCH6KR.js → mailbox-serve-NW5VZG7R.js} +3 -3
- package/dist/{modeldiag-36OGAL5C.js → modeldiag-36VODVIH.js} +8 -8
- package/dist/{per-subcommand-help-XE77MTGJ.js → per-subcommand-help-QDAQASPZ.js} +2 -2
- package/dist/permission-prompt.d.ts +14 -0
- package/dist/permission-rules-view.d.ts +18 -0
- package/dist/{permissions-CFDLXETM.js → permissions-PL27UHYD.js} +67 -45
- package/dist/{plugin-usage-S5LVGMBW.js → plugin-usage-CIGOOTX3.js} +2 -2
- package/dist/{plugins-RHBIVLI7.js → plugins-HQTXUD6A.js} +4 -2
- package/dist/preflight.d.ts +1 -1
- package/dist/{projects-LMNAGGEU.js → projects-T4CZCA25.js} +3 -6
- package/dist/provider-helpers.d.ts +7 -11
- package/dist/{providers-models-2CFG46RD.js → providers-models-5Z2PJTEW.js} +5 -5
- package/dist/release-asset-download.d.ts +10 -0
- package/dist/release-attestation.d.ts +28 -0
- package/dist/remote/remote-session.d.ts +64 -0
- package/dist/remote/remote-target.d.ts +69 -0
- package/dist/remote-O5WXHLWV.js +561 -0
- package/dist/{replay-Z3FTJEMM.js → replay-DEI566CW.js} +2 -2
- package/dist/services/commit-message.d.ts +2 -1
- package/dist/session-move-P2EC2COA.js +44 -0
- package/dist/session-move.d.ts +20 -0
- package/dist/session-stats.d.ts +10 -0
- package/dist/{sessions-config-IQUH2GXT.js → sessions-config-SXTTLNXA.js} +35 -5
- package/dist/short-circuit-flags-74Y5N6CF.js +10 -0
- package/dist/slash-commands/command-context.d.ts +15 -5
- package/dist/slash-commands/goal-refiner.d.ts +4 -49
- package/dist/slash-commands/mcp.d.ts +2 -1
- package/dist/slash-commands/permissions.d.ts +4 -0
- package/dist/slash-commands/settings-context-mutations.d.ts +5 -0
- package/dist/slash-commands/settings-limits-mutations.d.ts +12 -0
- package/dist/standalone-auto-update-TOTRGCSA.js +249 -0
- package/dist/standalone-auto-update.d.ts +65 -0
- package/dist/standalone-update-LZO3MNLH.js +24 -0
- package/dist/standalone-update.d.ts +37 -1
- package/dist/subcommands/handlers/import-claude-code.d.ts +42 -0
- package/dist/subcommands/handlers/permissions.d.ts +9 -3
- package/dist/subcommands/handlers/remote.d.ts +6 -0
- package/dist/subcommands/handlers/version-help.d.ts +5 -0
- package/dist/{subcommands-ZTSIN7LG.js → subcommands-Q6ORSB2E.js} +2 -2
- package/dist/tui-resume-callback.d.ts +18 -0
- package/dist/{typesafe-HVEVPA6R.js → typesafe-U7YB2RRV.js} +5 -5
- package/dist/{typesafe-topic-replay-4W73BOLV.js → typesafe-topic-replay-ZILIU3WS.js} +18 -2
- package/dist/{update-7XIOEXTD.js → update-TDZX4IL2.js} +4 -4
- package/dist/{update-check-2POMBHFB.js → update-check-J5ZVKS73.js} +3 -3
- package/dist/version-JB2UAV2A.js +11 -0
- package/dist/version-help-XJJQ7YSH.js +10 -0
- package/dist/webui-server/route-contexts.d.ts +1 -1
- package/dist/webui-server/session-start-payload.d.ts +5 -1
- package/dist/{webui-server-L2SICPTB.js → webui-server-YTHLRFD2.js} +509 -366
- package/dist/webui-server-lifecycle.d.ts +57 -0
- package/dist/webui-server.d.ts +0 -14
- package/dist/wiring/brain-and-orchestration.d.ts +3 -1
- package/dist/wiring/cli-prompt-and-tools-setup.d.ts +9 -0
- package/dist/wiring/cli-slash-commands-setup.d.ts +1 -0
- package/dist/wiring/lifecycle-plugins.d.ts +4 -2
- package/dist/wiring/metrics.d.ts +9 -1
- package/dist/wiring/pipeline.d.ts +2 -7
- package/dist/wiring/plugins.d.ts +3 -0
- package/dist/wiring/provider-status.d.ts +1 -0
- package/dist/wiring/provider-utility-tools.d.ts +3 -1
- package/package.json +28 -28
- package/dist/chunk-2BKFWIER.js +0 -98
- package/dist/chunk-424ORSE7.js +0 -56
- package/dist/chunk-QBBF7GIK.js +0 -65
- package/dist/short-circuit-flags-SDT53OML.js +0 -10
- package/dist/standalone-update-MW47J3AK.js +0 -164
- package/dist/version-help-WZ623NWM.js +0 -10
package/data/providers.json
CHANGED
|
@@ -26,6 +26,50 @@
|
|
|
26
26
|
"output": 128000
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
|
+
"gpt-6-sol": {
|
|
30
|
+
"id": "gpt-6-sol",
|
|
31
|
+
"name": "GPT-6 Sol",
|
|
32
|
+
"description": "Built to power complex coding and agentic workflows.",
|
|
33
|
+
"reasoning": true,
|
|
34
|
+
"reasoningConfig": {
|
|
35
|
+
"default": "enabled",
|
|
36
|
+
"disableSupported": false,
|
|
37
|
+
"effortSupported": true,
|
|
38
|
+
"effortLevels": ["low", "medium", "high", "xhigh", "max"],
|
|
39
|
+
"preserveThinking": "unsupported"
|
|
40
|
+
},
|
|
41
|
+
"tool_call": true,
|
|
42
|
+
"modalities": {
|
|
43
|
+
"input": ["text", "image"],
|
|
44
|
+
"output": ["text"]
|
|
45
|
+
},
|
|
46
|
+
"limit": {
|
|
47
|
+
"context": 872000,
|
|
48
|
+
"output": 128000
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"gpt-6-luna": {
|
|
52
|
+
"id": "gpt-6-luna",
|
|
53
|
+
"name": "GPT-6 Luna",
|
|
54
|
+
"description": "Most efficient model for focused, high-volume tasks.",
|
|
55
|
+
"reasoning": true,
|
|
56
|
+
"reasoningConfig": {
|
|
57
|
+
"default": "enabled",
|
|
58
|
+
"disableSupported": false,
|
|
59
|
+
"effortSupported": true,
|
|
60
|
+
"effortLevels": ["low", "medium", "high", "xhigh", "max"],
|
|
61
|
+
"preserveThinking": "unsupported"
|
|
62
|
+
},
|
|
63
|
+
"tool_call": true,
|
|
64
|
+
"modalities": {
|
|
65
|
+
"input": ["text", "image"],
|
|
66
|
+
"output": ["text"]
|
|
67
|
+
},
|
|
68
|
+
"limit": {
|
|
69
|
+
"context": 872000,
|
|
70
|
+
"output": 128000
|
|
71
|
+
}
|
|
72
|
+
},
|
|
29
73
|
"gpt-5.6-sol": {
|
|
30
74
|
"id": "gpt-5.6-sol",
|
|
31
75
|
"name": "GPT-5.6 Sol",
|
|
@@ -10,12 +10,12 @@ import {
|
|
|
10
10
|
} from "./chunk-2EBVTYJR.js";
|
|
11
11
|
import {
|
|
12
12
|
startCliHqConnection
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-KJS5543T.js";
|
|
14
14
|
import "./chunk-S4FFHDJG.js";
|
|
15
|
+
import "./chunk-F5DCFAKI.js";
|
|
15
16
|
import "./chunk-SIGUWXAA.js";
|
|
16
|
-
import "./chunk-DAKVBMD4.js";
|
|
17
17
|
import "./chunk-LUMETJFO.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-DAKVBMD4.js";
|
|
19
19
|
|
|
20
20
|
// src/subcommands/handlers/acp.ts
|
|
21
21
|
import { randomBytes } from "node:crypto";
|
|
@@ -592,7 +592,7 @@ var acpCmd = async (args, deps) => {
|
|
|
592
592
|
const sub = args[0];
|
|
593
593
|
const loginIndex = sub === "auth" ? 0 : (sub === "server" || sub === "serve") && args[1] === "auth" ? 1 : -1;
|
|
594
594
|
if (loginIndex >= 0) {
|
|
595
|
-
const { authCmd } = await import("./auth-
|
|
595
|
+
const { authCmd } = await import("./auth-TE55JF4Z.js");
|
|
596
596
|
return authCmd(args.slice(loginIndex + 1), deps);
|
|
597
597
|
}
|
|
598
598
|
if (!sub || sub === "server" || sub === "serve") {
|
|
@@ -1179,4 +1179,4 @@ ${renderAcpBenchText(result)}
|
|
|
1179
1179
|
export {
|
|
1180
1180
|
acpCmd
|
|
1181
1181
|
};
|
|
1182
|
-
//# sourceMappingURL=acp-
|
|
1182
|
+
//# sourceMappingURL=acp-LI665LO2.js.map
|
|
@@ -16,24 +16,13 @@ import {
|
|
|
16
16
|
runOAuthLoginKind,
|
|
17
17
|
runOAuthLoginMenu,
|
|
18
18
|
validateFamily
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-2ERX3RPN.js";
|
|
20
20
|
import {
|
|
21
21
|
renderAuthLocalHelpToString,
|
|
22
22
|
wantsLocalHelp
|
|
23
23
|
} from "./chunk-YTEOAWOJ.js";
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import {
|
|
26
|
-
activeProfileConfigPath
|
|
27
|
-
} from "./chunk-YMXXOOFN.js";
|
|
28
|
-
import "./chunk-WSTVGC2C.js";
|
|
29
|
-
import {
|
|
30
|
-
restoreFlags
|
|
31
|
-
} from "./chunk-CSAPOCBP.js";
|
|
32
|
-
import {
|
|
33
|
-
parseAuthFlags
|
|
34
|
-
} from "./chunk-MHEBWVXL.js";
|
|
24
|
+
import "./chunk-5UZBUV2H.js";
|
|
35
25
|
import "./chunk-SIGUWXAA.js";
|
|
36
|
-
import "./chunk-DAKVBMD4.js";
|
|
37
26
|
import {
|
|
38
27
|
loadConfigProviders,
|
|
39
28
|
maskedKey,
|
|
@@ -42,6 +31,17 @@ import {
|
|
|
42
31
|
nowIso,
|
|
43
32
|
writeKeysBack
|
|
44
33
|
} from "./chunk-LUMETJFO.js";
|
|
34
|
+
import "./chunk-DAKVBMD4.js";
|
|
35
|
+
import {
|
|
36
|
+
activeProfileConfigPath
|
|
37
|
+
} from "./chunk-YMXXOOFN.js";
|
|
38
|
+
import {
|
|
39
|
+
restoreFlags
|
|
40
|
+
} from "./chunk-CSAPOCBP.js";
|
|
41
|
+
import "./chunk-WSTVGC2C.js";
|
|
42
|
+
import {
|
|
43
|
+
parseAuthFlags
|
|
44
|
+
} from "./chunk-Q4INH2DG.js";
|
|
45
45
|
|
|
46
46
|
// src/subcommands/handlers/auth.ts
|
|
47
47
|
import { color as color5 } from "@wrongstack/core/utils";
|
|
@@ -671,4 +671,4 @@ async function runAuthRemove(deps, providerId) {
|
|
|
671
671
|
export {
|
|
672
672
|
authCmd
|
|
673
673
|
};
|
|
674
|
-
//# sourceMappingURL=auth-
|
|
674
|
+
//# sourceMappingURL=auth-TE55JF4Z.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CLI_VERSION
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-F5DCFAKI.js";
|
|
4
4
|
|
|
5
5
|
// src/subcommands/handlers/bench.ts
|
|
6
6
|
import * as fs from "node:fs/promises";
|
|
@@ -414,4 +414,4 @@ async function benchList(_args, deps) {
|
|
|
414
414
|
export {
|
|
415
415
|
benchCmd
|
|
416
416
|
};
|
|
417
|
-
//# sourceMappingURL=bench-
|
|
417
|
+
//# sourceMappingURL=bench-GTLPM22B.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolve `--append-system-prompt <text>` and `--append-system-prompt-file
|
|
3
|
+
* <path>` into the text appended to the host system prompt. Both may be given;
|
|
4
|
+
* the inline text comes first. Returns `undefined` when neither carries text.
|
|
5
|
+
*
|
|
6
|
+
* An unreadable file throws: silently dropping instructions the operator asked
|
|
7
|
+
* for would run the session under a prompt they did not intend.
|
|
8
|
+
*/
|
|
9
|
+
export declare function resolveAppendedSystemPrompt(flags: Readonly<Record<string, string | boolean>>, cwd: string): Promise<string | undefined>;
|
|
10
|
+
//# sourceMappingURL=append-system-prompt.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `--ascii` (or `WRONGSTACK_TUI_ICON_STYLE=ascii`): plain-ASCII output for
|
|
3
|
+
* terminals and fonts without box drawing, emoji or Nerd Font glyphs.
|
|
4
|
+
*
|
|
5
|
+
* The flag sets the env var so the lazily loaded TUI (its glyph set and Ink
|
|
6
|
+
* wrapper read it at module load) and child `wstack` processes see the same
|
|
7
|
+
* choice. stdout/stderr are wrapped so the plain REPL, one-shot output and
|
|
8
|
+
* anything the TUI did not route through its `Text` wrapper come out ASCII too.
|
|
9
|
+
* Runs before any surface is loaded.
|
|
10
|
+
*/
|
|
11
|
+
export declare function applyAsciiMode(flags: Record<string, unknown>, env?: NodeJS.ProcessEnv, streams?: readonly NodeJS.WriteStream[]): boolean;
|
|
12
|
+
//# sourceMappingURL=ascii-mode.d.ts.map
|
|
@@ -3,16 +3,18 @@ import type { EventBus } from '@wrongstack/core/kernel';
|
|
|
3
3
|
import type { Config, Logger, ModelsRegistry, Renderer } from '@wrongstack/core/types';
|
|
4
4
|
import type { WstackPaths } from '@wrongstack/core/utils';
|
|
5
5
|
import { createDefaultContainer } from '@wrongstack/runtime';
|
|
6
|
-
import {
|
|
6
|
+
import { makeStdinPromptDelegate } from '../permission-prompt.js';
|
|
7
7
|
import { type ApprovalMirrorRef } from '../permission-prompt-mirror.js';
|
|
8
8
|
interface WireContainerDeps {
|
|
9
9
|
config: Config;
|
|
10
10
|
wpaths: WstackPaths;
|
|
11
11
|
cwd: string;
|
|
12
12
|
logger: Logger;
|
|
13
|
-
reader: Parameters<typeof
|
|
13
|
+
reader: Parameters<typeof makeStdinPromptDelegate>[0];
|
|
14
14
|
renderer: Renderer;
|
|
15
15
|
modelsRegistry: ModelsRegistry;
|
|
16
|
+
/** `--allowed-tools`, already validated at boot. */
|
|
17
|
+
launchAllowedTools?: readonly string[] | undefined;
|
|
16
18
|
}
|
|
17
19
|
/**
|
|
18
20
|
* Build the PathResolver, create the EventBus, call
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
* closure mutation.
|
|
13
13
|
*/
|
|
14
14
|
import type { Agent } from '@wrongstack/core/agent';
|
|
15
|
+
import type { EventBus } from '@wrongstack/core/kernel';
|
|
15
16
|
import type { TokenCounter } from '@wrongstack/core/types';
|
|
16
17
|
import type { TerminalRenderer } from '../renderer.js';
|
|
17
18
|
interface SingleShotDispatchContext {
|
|
@@ -19,12 +20,14 @@ interface SingleShotDispatchContext {
|
|
|
19
20
|
agent: Agent;
|
|
20
21
|
/** Joined positional args forming the query string. */
|
|
21
22
|
query: string;
|
|
22
|
-
/** Parsed top-level CLI flags (e.g. `--output-json`). */
|
|
23
|
+
/** Parsed top-level CLI flags (e.g. `--output-json`, `--output-format`). */
|
|
23
24
|
flags: Record<string, string | boolean>;
|
|
24
25
|
/** Token counter for usage delta computation. */
|
|
25
26
|
tokenCounter: TokenCounter;
|
|
26
27
|
/** Terminal renderer for output. */
|
|
27
28
|
renderer: TerminalRenderer;
|
|
29
|
+
/** Host event bus; required for `--max-budget-usd` to see spend as it lands. */
|
|
30
|
+
events?: Pick<EventBus, 'on'> | undefined;
|
|
28
31
|
}
|
|
29
32
|
/**
|
|
30
33
|
* Run a single `agent.run()` turn and render the result.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { MCPServerConfig } from '@wrongstack/core/types';
|
|
2
|
+
export type LaunchMcpServers = Record<string, Partial<MCPServerConfig>>;
|
|
3
|
+
/**
|
|
4
|
+
* Normalize one server entry (Claude Code `type` or WrongStack `transport`
|
|
5
|
+
* form). Throws with the server name on anything unusable. The result carries
|
|
6
|
+
* no `enabled` decision — callers own that.
|
|
7
|
+
*/
|
|
8
|
+
export declare function normalizeMcpServerEntry(name: string, raw: unknown): Partial<MCPServerConfig>;
|
|
9
|
+
/** Parse a document already read from disk or given inline. */
|
|
10
|
+
export declare function parseLaunchMcpServers(text: string, source: string): LaunchMcpServers;
|
|
11
|
+
/**
|
|
12
|
+
* Resolve the flag: inline JSON when the value starts with `{`, otherwise a
|
|
13
|
+
* path relative to `cwd`. `undefined` when the flag is absent.
|
|
14
|
+
*/
|
|
15
|
+
export declare function resolveLaunchMcpServers(flags: Readonly<Record<string, string | boolean>>, cwd: string): Promise<LaunchMcpServers | undefined>;
|
|
16
|
+
/**
|
|
17
|
+
* The server set this process starts: config servers (unless strict) with the
|
|
18
|
+
* launch servers layered on top — a launch entry replaces a config entry of the
|
|
19
|
+
* same name rather than merging into it.
|
|
20
|
+
*/
|
|
21
|
+
export declare function effectiveMcpServers(configured: Readonly<Record<string, Partial<MCPServerConfig>>> | undefined, launch: LaunchMcpServers | undefined, strict: boolean): Record<string, Partial<MCPServerConfig>>;
|
|
22
|
+
//# sourceMappingURL=mcp-config-flag.d.ts.map
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Piped-stdin context for single-shot runs: `git diff | wstack "review this"`.
|
|
3
|
+
*
|
|
4
|
+
* The prompt still comes from argv; whatever was piped in is appended to it as
|
|
5
|
+
* context. Only single-shot mode reads it — the REPL and TUI own stdin.
|
|
6
|
+
*
|
|
7
|
+
* A parent process can hand us an open pipe it never writes to (a harness
|
|
8
|
+
* spawning `wstack` with default stdio), which would block forever waiting for
|
|
9
|
+
* EOF. So the read gives up if no first byte arrives within
|
|
10
|
+
* `firstByteTimeoutMs`; once data starts flowing it reads to EOF, capped at
|
|
11
|
+
* `maxBytes` so a runaway producer cannot blow the context window.
|
|
12
|
+
*/
|
|
13
|
+
import type { Readable } from 'node:stream';
|
|
14
|
+
/** `process.stdin` in production; any readable in tests. */
|
|
15
|
+
export type PipedStdinSource = Readable & {
|
|
16
|
+
readonly isTTY?: boolean | undefined;
|
|
17
|
+
unref?: (() => unknown) | undefined;
|
|
18
|
+
};
|
|
19
|
+
export interface PipedStdinResult {
|
|
20
|
+
/** Piped text, trimmed of trailing whitespace. Empty when nothing arrived. */
|
|
21
|
+
text: string;
|
|
22
|
+
/** True when the input exceeded `maxBytes` and was cut. */
|
|
23
|
+
truncated: boolean;
|
|
24
|
+
/** True when no first byte arrived in time and the read was abandoned. */
|
|
25
|
+
timedOut: boolean;
|
|
26
|
+
}
|
|
27
|
+
export interface ReadPipedStdinOptions {
|
|
28
|
+
firstByteTimeoutMs?: number | undefined;
|
|
29
|
+
maxBytes?: number | undefined;
|
|
30
|
+
}
|
|
31
|
+
export declare const PIPED_STDIN_FIRST_BYTE_TIMEOUT_MS = 3000;
|
|
32
|
+
export declare const PIPED_STDIN_MAX_BYTES: number;
|
|
33
|
+
/**
|
|
34
|
+
* Read piped stdin. Resolves `EMPTY` immediately for a TTY — an interactive
|
|
35
|
+
* terminal is never "piped input".
|
|
36
|
+
*/
|
|
37
|
+
export declare function readPipedStdin(source: PipedStdinSource, opts?: ReadPipedStdinOptions): Promise<PipedStdinResult>;
|
|
38
|
+
/** Join the argv prompt with piped context. The prompt stays first: it is the instruction. */
|
|
39
|
+
export declare function appendPipedStdin(query: string, piped: string): string;
|
|
40
|
+
//# sourceMappingURL=piped-stdin.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ToolRestriction } from './tool-restriction-flags.js';
|
|
2
|
+
export declare const RESTRICTED_ENV = "WRONGSTACK_RESTRICTED";
|
|
3
|
+
export declare const RESTRICTED_DENY_CAPABILITIES: readonly string[];
|
|
4
|
+
export declare function isRestrictedMode(flags: Readonly<Record<string, unknown>>): boolean;
|
|
5
|
+
/** Throws on a conflicting flag. Returns whether restricted mode is on. */
|
|
6
|
+
export declare function validateRestrictedMode(flags: Readonly<Record<string, unknown>>): boolean;
|
|
7
|
+
/** Fold `--restricted` into the launch tool restriction (if any). */
|
|
8
|
+
export declare function withRestrictedTools(restriction: ToolRestriction | undefined, restricted: boolean): ToolRestriction | undefined;
|
|
9
|
+
export declare const RESTRICTED_NOTICE = "Restricted mode: no shell, network, installs or MCP tools; files stay inside the project; YOLO is off.";
|
|
10
|
+
/**
|
|
11
|
+
* Validate, engage the process-wide locks, export the env switch and — once
|
|
12
|
+
* per process — tell the user. Throws on a conflicting flag.
|
|
13
|
+
*/
|
|
14
|
+
export declare function activateRestrictedMode(flags: Readonly<Record<string, unknown>>, write: (line: string) => void): boolean;
|
|
15
|
+
//# sourceMappingURL=restricted-mode.d.ts.map
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `--safe-mode`: start with the user's and the project's customizations off,
|
|
3
|
+
* to tell a broken setup apart from a broken WrongStack.
|
|
4
|
+
*
|
|
5
|
+
* Off: third-party plugins, hooks (policy hooks stay, as with `--no-hooks` —
|
|
6
|
+
* they are enforcement, not customization), configured MCP servers, skills,
|
|
7
|
+
* and instruction override files (`instructions/` under the profile and the
|
|
8
|
+
* project). Unchanged: config itself, auth, model selection, permissions,
|
|
9
|
+
* built-in tools and built-in plugins. Servers named with `--mcp-config` still
|
|
10
|
+
* start: the flag is an explicit request for them.
|
|
11
|
+
*
|
|
12
|
+
* Every decision is read at its consumption point instead of being patched
|
|
13
|
+
* into config: a patched config can be saved back by any settings write, and
|
|
14
|
+
* one troubleshooting launch would then silently disable plugins for good.
|
|
15
|
+
*
|
|
16
|
+
* `WRONGSTACK_SAFE_MODE=1` is equivalent and is exported to child processes
|
|
17
|
+
* (WebUI session children, spawned tools) so they start the same way.
|
|
18
|
+
*/
|
|
19
|
+
export declare const SAFE_MODE_ENV = "WRONGSTACK_SAFE_MODE";
|
|
20
|
+
export declare function isSafeMode(flags: Readonly<Record<string, unknown>>): boolean;
|
|
21
|
+
/** Called once at boot: makes `--safe-mode` visible to child processes. */
|
|
22
|
+
export declare function propagateSafeMode(flags: Readonly<Record<string, unknown>>): boolean;
|
|
23
|
+
export declare const SAFE_MODE_NOTICE = "Safe mode: third-party plugins, hooks, configured MCP servers, skills and instruction overrides are off.";
|
|
24
|
+
/**
|
|
25
|
+
* Propagate and, once per process, tell the user. Without the guard a real
|
|
26
|
+
* `--safe-mode` launch printed the notice twice, which reads like a second
|
|
27
|
+
* mode switch.
|
|
28
|
+
*/
|
|
29
|
+
export declare function announceSafeMode(flags: Readonly<Record<string, unknown>>, write: (line: string) => void): boolean;
|
|
30
|
+
//# sourceMappingURL=safe-mode.d.ts.map
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `--max-budget-usd` for single-shot runs.
|
|
3
|
+
*
|
|
4
|
+
* Spend is the leader's cost delta since the run started plus every subagent's
|
|
5
|
+
* cumulative cost. Subagents run on their own token counters, so the leader's
|
|
6
|
+
* counter alone would let a delegating run blow straight past the cap.
|
|
7
|
+
*
|
|
8
|
+
* The check fires after each accounted request; the request that crosses the
|
|
9
|
+
* line has already been paid for, so the cap bounds the overshoot to one
|
|
10
|
+
* request rather than preventing it.
|
|
11
|
+
*/
|
|
12
|
+
import type { EventBus } from '@wrongstack/core/kernel';
|
|
13
|
+
import type { TokenCounter } from '@wrongstack/core/types';
|
|
14
|
+
/** Parse the flag. `undefined` = not set; throws on a value that is set but unusable. */
|
|
15
|
+
export declare function parseMaxBudgetUsd(value: string | boolean | undefined): number | undefined;
|
|
16
|
+
export interface SingleShotBudget {
|
|
17
|
+
/** Spend so far, in USD. */
|
|
18
|
+
spent(): number;
|
|
19
|
+
/** True once the limit was crossed and `onExceeded` fired. */
|
|
20
|
+
readonly exceeded: boolean;
|
|
21
|
+
/** Detach the event listeners. */
|
|
22
|
+
dispose(): void;
|
|
23
|
+
}
|
|
24
|
+
export declare function watchSingleShotBudget(opts: {
|
|
25
|
+
limitUsd: number;
|
|
26
|
+
tokenCounter: Pick<TokenCounter, 'estimateCost'>;
|
|
27
|
+
events: Pick<EventBus, 'on'>;
|
|
28
|
+
onExceeded: () => void;
|
|
29
|
+
}): SingleShotBudget;
|
|
30
|
+
//# sourceMappingURL=single-shot-budget.d.ts.map
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `--output-format stream-json`: single-shot progress as JSON Lines on stdout.
|
|
3
|
+
*
|
|
4
|
+
* One object per line, each with a `type`:
|
|
5
|
+
* init session id, provider/model, cwd, tool names — first line
|
|
6
|
+
* text_delta streamed answer text (only with --include-partial-messages)
|
|
7
|
+
* assistant one model response: text and tool_use blocks, stop reason, usage
|
|
8
|
+
* tool_result one finished tool call: id, name, ok, duration, output preview
|
|
9
|
+
* result the `--output-json` payload — always the last line
|
|
10
|
+
*
|
|
11
|
+
* Only the leader's own activity is streamed. Subagents report through their
|
|
12
|
+
* `subagent.*` events; the ones that reach the host bus under the plain names
|
|
13
|
+
* carry a non-leader `agentId` and are dropped, so a delegating run does not
|
|
14
|
+
* interleave several conversations on one stream.
|
|
15
|
+
*/
|
|
16
|
+
import type { EventBus } from '@wrongstack/core/kernel';
|
|
17
|
+
export type OutputFormat = 'text' | 'json' | 'stream-json';
|
|
18
|
+
/** `undefined` when the flag is absent. Throws on an unknown format. */
|
|
19
|
+
export declare function parseOutputFormat(value: string | boolean | undefined): OutputFormat | undefined;
|
|
20
|
+
export interface StreamJsonOptions {
|
|
21
|
+
events: Pick<EventBus, 'on'>;
|
|
22
|
+
/** Writes one line (the caller adds nothing; this function appends `\n`). */
|
|
23
|
+
write: (line: string) => void;
|
|
24
|
+
includePartialMessages: boolean;
|
|
25
|
+
}
|
|
26
|
+
/** Subscribe and start writing. Returns the unsubscribe function. */
|
|
27
|
+
export declare function startStreamJson(opts: StreamJsonOptions): () => void;
|
|
28
|
+
/** The first line of the stream. */
|
|
29
|
+
export declare function streamJsonInit(info: {
|
|
30
|
+
sessionId: string | null;
|
|
31
|
+
provider: string | null;
|
|
32
|
+
model: string | null;
|
|
33
|
+
cwd: string;
|
|
34
|
+
tools: readonly string[];
|
|
35
|
+
}): string;
|
|
36
|
+
//# sourceMappingURL=stream-json.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { JSONSchema } from '@wrongstack/core/types';
|
|
2
|
+
/** Inline JSON when the value starts with `{`, otherwise a path relative to `cwd`. */
|
|
3
|
+
export declare function resolveJsonSchemaFlag(value: string | boolean | undefined, cwd: string): Promise<JSONSchema | undefined>;
|
|
4
|
+
/** Appended to the user's task. The task stays first: it is the instruction. */
|
|
5
|
+
export declare function withSchemaInstruction(query: string, schema: JSONSchema): string;
|
|
6
|
+
export type StructuredCheck = {
|
|
7
|
+
ok: true;
|
|
8
|
+
value: unknown;
|
|
9
|
+
} | {
|
|
10
|
+
ok: false;
|
|
11
|
+
errors: string[];
|
|
12
|
+
};
|
|
13
|
+
/** Parse and validate a final answer. */
|
|
14
|
+
export declare function checkStructuredAnswer(text: string | undefined, schema: JSONSchema): StructuredCheck;
|
|
15
|
+
export declare function repairPrompt(errors: readonly string[]): string;
|
|
16
|
+
//# sourceMappingURL=structured-output.d.ts.map
|
|
@@ -86,6 +86,8 @@ interface BindSystemPromptBuilderDeps {
|
|
|
86
86
|
tokenSavingMode?: TokenSavingTier | boolean | undefined;
|
|
87
87
|
/** `config.systemPrompt.variant` — selects system.md, system-lite.md, or system-pro.md. */
|
|
88
88
|
systemPromptVariant?: SystemInstructionVariant | undefined;
|
|
89
|
+
/** `--append-system-prompt[-file]` text; appended to the host prompt only. */
|
|
90
|
+
appendedInstructions?: string | undefined;
|
|
89
91
|
paths: SystemPromptBuilderPaths;
|
|
90
92
|
/** Project root, for the Atlas brief. Omit to leave the brief out entirely. */
|
|
91
93
|
projectRoot?: string | undefined;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `--only-tools <names>` and `--disallowed-tools <names>`: a launch-time tool
|
|
3
|
+
* restriction applied to the tool registry (see `ToolRegistry.setSessionRestriction`).
|
|
4
|
+
*
|
|
5
|
+
* `--only-tools` rather than Claude Code's `--tools`: `--tools` is already a
|
|
6
|
+
* boolean of `wstack models add` and the CSV of `wstack mcp serve`, so a value
|
|
7
|
+
* form here would swallow the prompt in `wstack --tools read "task"`.
|
|
8
|
+
*
|
|
9
|
+
* Names are comma- or space-separated; a trailing `*` matches a prefix
|
|
10
|
+
* (`mcp__github__*`). Claude Code's scoped rules (`Bash(git *)`) are refused
|
|
11
|
+
* instead of ignored: dropping a deny rule silently would leave the operator
|
|
12
|
+
* believing a command is blocked when it is not.
|
|
13
|
+
*/
|
|
14
|
+
export interface ToolRestriction {
|
|
15
|
+
only?: string[] | undefined;
|
|
16
|
+
deny: string[];
|
|
17
|
+
/** Set by `--restricted` only (see restricted-mode.ts). */
|
|
18
|
+
denyCapabilities?: readonly string[] | undefined;
|
|
19
|
+
requireDeclaredCapabilities?: boolean | undefined;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* `--allowed-tools <names>`: pre-approve tools (no permission prompt) for this
|
|
23
|
+
* process. Same list syntax and the same refusal of scoped rules — a scoped
|
|
24
|
+
* allow like `Bash(git *)` widened to all of `bash` would approve far more
|
|
25
|
+
* than the operator asked for.
|
|
26
|
+
*/
|
|
27
|
+
export declare function resolveLaunchAllowedTools(flags: Readonly<Record<string, string | boolean>>): string[] | undefined;
|
|
28
|
+
/** `undefined` when neither flag is set. Throws on an unusable value. */
|
|
29
|
+
export declare function resolveToolRestriction(flags: Readonly<Record<string, string | boolean>>): ToolRestriction | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* Names in the restriction that match no registered tool — most likely typos.
|
|
32
|
+
* Globs and MCP-style names (`server__tool`) are skipped: MCP servers
|
|
33
|
+
* register after boot, so their absence here proves nothing.
|
|
34
|
+
*/
|
|
35
|
+
export declare function unknownRestrictedToolNames(restriction: ToolRestriction, isRegistered: (name: string) => boolean): string[];
|
|
36
|
+
//# sourceMappingURL=tool-restriction-flags.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { SessionSummary } from '@wrongstack/core/types';
|
|
2
|
+
import type { GitWorktreeEntry } from '@wrongstack/core/worktree';
|
|
3
|
+
export interface WorktreeRef {
|
|
4
|
+
root: string;
|
|
5
|
+
name: string;
|
|
6
|
+
branch?: string | undefined;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* The other worktree a session belongs to, or undefined when it ran in the
|
|
10
|
+
* current checkout, in a checkout git no longer lists (resuming it here is
|
|
11
|
+
* the only option left), or before checkouts were recorded.
|
|
12
|
+
*/
|
|
13
|
+
export declare function worktreeOfSession(summary: Pick<SessionSummary, 'checkout'>, worktrees: readonly GitWorktreeEntry[]): WorktreeRef | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* Wrap the resume callback: a session that belongs to another worktree
|
|
16
|
+
* (per `lookup`, filled from the last listing) first switches the TUI to that
|
|
17
|
+
* worktree, then resumes there. A failed switch rejects, which the picker
|
|
18
|
+
* shows, and leaves the current project untouched.
|
|
19
|
+
*/
|
|
20
|
+
export declare function withWorktreeSwitch<A extends unknown[], R>(resume: (sessionId: string, ...rest: A) => Promise<R>, lookup: (sessionId: string) => WorktreeRef | undefined, switchProject: (root: string, name: string) => Promise<string | null>): (sessionId: string, ...rest: A) => Promise<R>;
|
|
21
|
+
//# sourceMappingURL=worktree-sessions.d.ts.map
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { Config, ModelsRegistry } from '@wrongstack/core/types';
|
|
2
|
+
import type { ReadlineInputReader } from './input-reader.js';
|
|
3
|
+
import type { TerminalRenderer } from './renderer.js';
|
|
4
|
+
/**
|
|
5
|
+
* Resolve the bundled overlay `providers.json`. It ships at `<pkg>/data/` —
|
|
6
|
+
* a sibling of both `src/` (dev) and `dist/` (published) — so `../data/…`
|
|
7
|
+
* relative to this module resolves in both. Returns undefined if anything
|
|
8
|
+
* about the resolution looks off (the overlay is optional).
|
|
9
|
+
*/
|
|
10
|
+
export declare function resolveBundledOverlayFile(): string | undefined;
|
|
11
|
+
export interface SavedDefaultStatus {
|
|
12
|
+
ok: boolean;
|
|
13
|
+
reason?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare function validateSavedProviderModel(config: Config, modelsRegistry: ModelsRegistry): Promise<SavedDefaultStatus>;
|
|
16
|
+
/**
|
|
17
|
+
* Resolve a usable `{ provider, model }` from saved config when the active
|
|
18
|
+
* pointers are unset — the non-interactive (WebUI / --no-interactive) analogue
|
|
19
|
+
* of the TUI's interactive picker. Mirrors the standalone WebUI's auto-select
|
|
20
|
+
* (packages/webui-server start-webui.ts) so a config whose only entry is a
|
|
21
|
+
* custom provider still boots instead of erroring out. Prefers an already-set
|
|
22
|
+
* `config.provider`, otherwise the first saved provider; the model comes from
|
|
23
|
+
* the provider's saved `models` allowlist, falling back to the catalog's first
|
|
24
|
+
* model. Returns undefined when no provider yields a concrete model.
|
|
25
|
+
*/
|
|
26
|
+
export declare function autoSelectSavedProvider(config: Config, modelsRegistry: ModelsRegistry): Promise<{
|
|
27
|
+
provider: string;
|
|
28
|
+
model: string;
|
|
29
|
+
} | undefined>;
|
|
30
|
+
export declare function resolveBundledSkillsDir(): string | undefined;
|
|
31
|
+
export declare function resolveBundledPromptsDir(): string | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* Determine whether a directory is the user's home directory. Used by the
|
|
34
|
+
* startup guard to refuse launching wstack in `~` — where it would risk
|
|
35
|
+
* creating a `.git` repo at the top of the user's filesystem.
|
|
36
|
+
*
|
|
37
|
+
* Resolves both paths so trailing slashes and relative segments are
|
|
38
|
+
* normalized before the comparison. Case is compared as-is (matches
|
|
39
|
+
* `os.homedir()` and `process.cwd()` output on every platform). Symlinks
|
|
40
|
+
* are NOT followed: the common case (`cwd === os.homedir()` literally) is
|
|
41
|
+
* what this guard targets.
|
|
42
|
+
*
|
|
43
|
+
* Exported for testing — the call site in {@link boot} performs the actual
|
|
44
|
+
* warning + exit.
|
|
45
|
+
*/
|
|
46
|
+
export declare function isHomeDirectory(cwd: string, userHome: string): boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Determine whether the first-run YOLO disclosure notice should be printed
|
|
49
|
+
* to stderr. Exported for testing.
|
|
50
|
+
*
|
|
51
|
+
* @param lastChoices Saved launch preferences from config (undefined = first run)
|
|
52
|
+
* @param yoloPinned Explicit --yolo/--no-yolo flag (undefined = not provided)
|
|
53
|
+
* @param yolo Resolved YOLO state
|
|
54
|
+
*/
|
|
55
|
+
export declare function shouldPrintYoloNotice(lastChoices: unknown, yoloPinned: boolean | undefined, yolo: boolean): boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Check whether the current working directory has a `.git` repository.
|
|
58
|
+
* If not, prompt the user before the path resolver walks up to a parent.
|
|
59
|
+
* When the parent directory contains a `.git`, also inform the user so
|
|
60
|
+
* they know why the project root was resolved to a different directory.
|
|
61
|
+
*/
|
|
62
|
+
export declare function checkGitInCwd(opts: {
|
|
63
|
+
cwd: string;
|
|
64
|
+
renderer: TerminalRenderer;
|
|
65
|
+
reader: ReadlineInputReader;
|
|
66
|
+
}): Promise<void>;
|
|
67
|
+
//# sourceMappingURL=boot-provider-selection.d.ts.map
|
package/dist/boot.d.ts
CHANGED
|
@@ -1,23 +1,10 @@
|
|
|
1
|
+
export { autoSelectSavedProvider, isHomeDirectory, shouldPrintYoloNotice, } from './boot-provider-selection.js';
|
|
1
2
|
import { DefaultLogger } from '@wrongstack/core/infrastructure';
|
|
2
3
|
import type { Config, ModelsRegistry, SecretVault } from '@wrongstack/core/types';
|
|
3
4
|
import { type WstackPaths } from '@wrongstack/core/utils';
|
|
4
5
|
import { ReadlineInputReader } from './input-reader.js';
|
|
5
6
|
import { TerminalRenderer } from './renderer.js';
|
|
6
7
|
import type { UpdateInfo } from './update-check.js';
|
|
7
|
-
/**
|
|
8
|
-
* Resolve a usable `{ provider, model }` from saved config when the active
|
|
9
|
-
* pointers are unset — the non-interactive (WebUI / --no-interactive) analogue
|
|
10
|
-
* of the TUI's interactive picker. Mirrors the standalone WebUI's auto-select
|
|
11
|
-
* (packages/webui-server start-webui.ts) so a config whose only entry is a
|
|
12
|
-
* custom provider still boots instead of erroring out. Prefers an already-set
|
|
13
|
-
* `config.provider`, otherwise the first saved provider; the model comes from
|
|
14
|
-
* the provider's saved `models` allowlist, falling back to the catalog's first
|
|
15
|
-
* model. Returns undefined when no provider yields a concrete model.
|
|
16
|
-
*/
|
|
17
|
-
export declare function autoSelectSavedProvider(config: Config, modelsRegistry: ModelsRegistry): Promise<{
|
|
18
|
-
provider: string;
|
|
19
|
-
model: string;
|
|
20
|
-
} | undefined>;
|
|
21
8
|
export interface BootContext {
|
|
22
9
|
config: Config;
|
|
23
10
|
vault: SecretVault;
|
|
@@ -36,30 +23,6 @@ export interface BootContext {
|
|
|
36
23
|
/** True when running in --webui/--no-interactive mode but provider/model not configured */
|
|
37
24
|
needsSetup?: boolean | undefined;
|
|
38
25
|
}
|
|
39
|
-
/**
|
|
40
|
-
* Determine whether a directory is the user's home directory. Used by the
|
|
41
|
-
* startup guard to refuse launching wstack in `~` — where it would risk
|
|
42
|
-
* creating a `.git` repo at the top of the user's filesystem.
|
|
43
|
-
*
|
|
44
|
-
* Resolves both paths so trailing slashes and relative segments are
|
|
45
|
-
* normalized before the comparison. Case is compared as-is (matches
|
|
46
|
-
* `os.homedir()` and `process.cwd()` output on every platform). Symlinks
|
|
47
|
-
* are NOT followed: the common case (`cwd === os.homedir()` literally) is
|
|
48
|
-
* what this guard targets.
|
|
49
|
-
*
|
|
50
|
-
* Exported for testing — the call site in {@link boot} performs the actual
|
|
51
|
-
* warning + exit.
|
|
52
|
-
*/
|
|
53
|
-
export declare function isHomeDirectory(cwd: string, userHome: string): boolean;
|
|
54
|
-
/**
|
|
55
|
-
* Determine whether the first-run YOLO disclosure notice should be printed
|
|
56
|
-
* to stderr. Exported for testing.
|
|
57
|
-
*
|
|
58
|
-
* @param lastChoices Saved launch preferences from config (undefined = first run)
|
|
59
|
-
* @param yoloPinned Explicit --yolo/--no-yolo flag (undefined = not provided)
|
|
60
|
-
* @param yolo Resolved YOLO state
|
|
61
|
-
*/
|
|
62
|
-
export declare function shouldPrintYoloNotice(lastChoices: unknown, yoloPinned: boolean | undefined, yolo: boolean): boolean;
|
|
63
26
|
/**
|
|
64
27
|
* Boot the CLI: parse args, load config, handle subcommand dispatch
|
|
65
28
|
* (early exit), run interactive prompts (project check, provider picker,
|