@wrongstack/cli 1.0.24 → 1.0.27
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-M4565YUW.js} +33 -20
- 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 +12 -1
- package/dist/boot/dispatch-webui.d.ts +2 -0
- package/dist/boot/goal-tui-default.d.ts +10 -0
- 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-CZTXF6HY.js +140 -0
- package/dist/{chunk-DRM7PSW7.js → chunk-ENRYW73H.js} +527 -381
- package/dist/{chunk-SKPDE62W.js → chunk-EPR42SWM.js} +36 -6
- package/dist/{chunk-YBUCXXYZ.js → chunk-F5DCFAKI.js} +1 -1
- package/dist/chunk-HDMFKTT3.js +157 -0
- package/dist/{chunk-PGKJ2OQP.js → chunk-HFZH2XJN.js} +5 -5
- package/dist/chunk-HLSHFXTO.js +97 -0
- 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-N57IU5FG.js +58 -0
- package/dist/{chunk-2EBVTYJR.js → chunk-NRXWOMK7.js} +17 -3
- package/dist/chunk-PZQBGUVZ.js +18 -0
- package/dist/{chunk-MHEBWVXL.js → chunk-Q4INH2DG.js} +46 -2
- package/dist/{chunk-5SEYGOCH.js → chunk-RDGGWMTI.js} +2 -2
- package/dist/{chunk-BLD5DSVA.js → chunk-RGFWGUAB.js} +27 -15
- package/dist/{chunk-ZZRSG7VK.js → chunk-RZ4ZDRYA.js} +3 -3
- package/dist/{chunk-S4FFHDJG.js → chunk-SDJCLEK6.js} +6 -2
- package/dist/{chunk-U46QR4WR.js → chunk-TI7KLHYX.js} +132 -3
- 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-C7RBSWHF.js} +434 -327
- package/dist/{cli-main-AELJDBGU.js → cli-main-TQTH73ZK.js} +2948 -2315
- 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-3STBD2U7.js} +2167 -1831
- package/dist/execution-chimera-review.d.ts +18 -1
- 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-44F4OQH2.js} +9 -8
- package/dist/hq-fleet-control.d.ts +36 -0
- package/dist/hq-live-status.d.ts +22 -0
- package/dist/hq-publisher.d.ts +18 -0
- package/dist/hq-server/routes/command-handlers.d.ts +12 -1
- package/dist/hq-server/routes/data-handlers.d.ts +1 -1
- package/dist/hq-server/socket-credentials.d.ts +63 -0
- package/dist/hq-server/upgrade-handler.d.ts +2 -0
- package/dist/hq-server/ws.d.ts +24 -0
- package/dist/{hq-server-PC7GZMPT.js → hq-server-UIB24LU6.js} +2 -2
- package/dist/{hq-service-NW56MUP2.js → hq-service-BMMJAHRT.js} +4 -4
- package/dist/import-claude-code-AYG24RG2.js +268 -0
- package/dist/index.js +12 -8
- package/dist/live-settings-input.d.ts +1 -0
- package/dist/{mailbox-serve-WDOCH6KR.js → mailbox-serve-GNGXEQ2R.js} +3 -3
- package/dist/{modeldiag-36OGAL5C.js → modeldiag-W7XAE625.js} +9 -9
- 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-GB5VXCCT.js +576 -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-XHLXJ5C3.js} +109 -10
- package/dist/short-circuit-flags-5TNTJPQR.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/slash-commands/theme.d.ts +15 -1
- 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 +52 -0
- package/dist/subcommands/handlers/permissions.d.ts +9 -3
- package/dist/subcommands/handlers/remote.d.ts +6 -0
- package/dist/subcommands/handlers/sessions-fleet.d.ts +0 -12
- package/dist/subcommands/handlers/version-help.d.ts +5 -0
- package/dist/{subcommands-ZTSIN7LG.js → subcommands-BHQYLDSD.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-GCXIO3JY.js} +515 -365
- package/dist/webui-server-lifecycle.d.ts +57 -0
- package/dist/webui-server-options.d.ts +10 -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/command-host-state.d.ts +2 -0
- package/dist/wiring/hq-telemetry.d.ts +12 -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 +29 -28
- package/dist/chunk-2BKFWIER.js +0 -98
- package/dist/chunk-424ORSE7.js +0 -56
- package/dist/chunk-OWNC7LMD.js +0 -78
- 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
|
@@ -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,
|
|
@@ -2,14 +2,7 @@ import {
|
|
|
2
2
|
hasApiKey,
|
|
3
3
|
isKeylessLocalProvider,
|
|
4
4
|
visibleModelIds
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import {
|
|
7
|
-
appendHistory,
|
|
8
|
-
backupCurrent
|
|
9
|
-
} from "./chunk-WSTVGC2C.js";
|
|
10
|
-
import {
|
|
11
|
-
openBrowser
|
|
12
|
-
} from "./chunk-DAKVBMD4.js";
|
|
5
|
+
} from "./chunk-5UZBUV2H.js";
|
|
13
6
|
import {
|
|
14
7
|
activeLabel,
|
|
15
8
|
loadConfigProviders,
|
|
@@ -20,6 +13,13 @@ import {
|
|
|
20
13
|
resolveActiveApiKey,
|
|
21
14
|
writeKeysBack
|
|
22
15
|
} from "./chunk-LUMETJFO.js";
|
|
16
|
+
import {
|
|
17
|
+
openBrowser
|
|
18
|
+
} from "./chunk-DAKVBMD4.js";
|
|
19
|
+
import {
|
|
20
|
+
appendHistory,
|
|
21
|
+
backupCurrent
|
|
22
|
+
} from "./chunk-WSTVGC2C.js";
|
|
23
23
|
|
|
24
24
|
// src/auth-menu/auth-menu-audit.ts
|
|
25
25
|
import { appendFileSync } from "node:fs";
|
|
@@ -427,10 +427,8 @@ ${color2.bold("WrongStack")} ${color2.dim("\u2014 API key manager")}
|
|
|
427
427
|
);
|
|
428
428
|
renderer.write(` ${color2.bold("c")} Add a custom provider
|
|
429
429
|
`);
|
|
430
|
-
renderer.write(
|
|
431
|
-
|
|
432
|
-
`
|
|
433
|
-
);
|
|
430
|
+
renderer.write(` ${color2.bold("s")} Login with provider OAuth
|
|
431
|
+
`);
|
|
434
432
|
if (ids.length > 0) {
|
|
435
433
|
renderer.write(
|
|
436
434
|
` ${color2.dim("1-")}${color2.dim(String(ids.length))} ${color2.bold("Manage a provider")}
|
|
@@ -1946,4 +1944,4 @@ export {
|
|
|
1946
1944
|
addCustomProvider,
|
|
1947
1945
|
addKeyForProvider
|
|
1948
1946
|
};
|
|
1949
|
-
//# sourceMappingURL=chunk-
|
|
1947
|
+
//# sourceMappingURL=chunk-2ERX3RPN.js.map
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
|
|
2
|
+
// src/permission-rules-view.ts
|
|
3
|
+
import {
|
|
4
|
+
compilePermissionRules,
|
|
5
|
+
matchedPermissionRule,
|
|
6
|
+
withExecutorGate
|
|
7
|
+
} from "@wrongstack/core/security";
|
|
8
|
+
async function explainCall(policy, tool, input, ctx, yolo) {
|
|
9
|
+
if (!policy.explain) throw new Error("This permission policy cannot explain its decisions.");
|
|
10
|
+
const trace = withExecutorGate(await policy.explain(tool, input, ctx), tool, yolo);
|
|
11
|
+
const rules = await compilePermissionRules(policy, ctx, { yolo });
|
|
12
|
+
return { trace, rules, rule: matchedPermissionRule(rules, trace) };
|
|
13
|
+
}
|
|
14
|
+
function actionText(rule) {
|
|
15
|
+
return rule.action === "*" ? "any tool" : rule.action;
|
|
16
|
+
}
|
|
17
|
+
function resourceText(rule) {
|
|
18
|
+
return rule.resource === "*" ? "any input" : rule.resource;
|
|
19
|
+
}
|
|
20
|
+
function describePermissionRule(rule) {
|
|
21
|
+
return `#${rule.n} ${rule.effect} ${actionText(rule)} \u2192 ${resourceText(rule)} (${rule.source})`;
|
|
22
|
+
}
|
|
23
|
+
function formatPermissionRules(rules) {
|
|
24
|
+
const width = String(rules.length).length;
|
|
25
|
+
const lines = ["Permission rules, in the order they are checked; the first match decides:", ""];
|
|
26
|
+
for (const rule of rules) {
|
|
27
|
+
lines.push(
|
|
28
|
+
` ${String(rule.n).padStart(width)}. ${rule.effect.padEnd(5)} ${rule.source.padEnd(15)} ${actionText(rule)} \u2192 ${resourceText(rule)}`
|
|
29
|
+
);
|
|
30
|
+
if (rule.note) lines.push(` ${" ".repeat(width)} ${" ".repeat(22)}${rule.note}`);
|
|
31
|
+
}
|
|
32
|
+
return lines.join("\n");
|
|
33
|
+
}
|
|
34
|
+
function formatExplainedCall({ trace, rule }) {
|
|
35
|
+
const lines = [];
|
|
36
|
+
lines.push(`Permission trace for "${trace.toolName}"`);
|
|
37
|
+
lines.push(`Subject: ${trace.subject ?? "(none)"}`);
|
|
38
|
+
lines.push("");
|
|
39
|
+
for (let i = 0; i < trace.steps.length; i++) {
|
|
40
|
+
const step = trace.steps[i];
|
|
41
|
+
if (!step) continue;
|
|
42
|
+
const winner = i === trace.winnerIndex ? " \u2190 WINNER" : "";
|
|
43
|
+
const matched = step.matched ? "\u2713" : " ";
|
|
44
|
+
lines.push(` ${matched} [${i}] ${step.rule}${winner}`);
|
|
45
|
+
lines.push(` decision: ${step.decision} source: ${step.source}`);
|
|
46
|
+
lines.push(` ${step.detail}`);
|
|
47
|
+
if (i < trace.steps.length - 1) lines.push("");
|
|
48
|
+
}
|
|
49
|
+
lines.push("");
|
|
50
|
+
lines.push(`Effective: ${trace.decision.permission} (source: ${trace.decision.source})`);
|
|
51
|
+
if (rule) lines.push(`Rule: ${describePermissionRule(rule)}`);
|
|
52
|
+
if (trace.decision.reason) lines.push(`Reason: ${trace.decision.reason}`);
|
|
53
|
+
if (trace.decision.riskTier) lines.push(`Risk tier: ${trace.decision.riskTier}`);
|
|
54
|
+
return lines.join("\n");
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export {
|
|
58
|
+
explainCall,
|
|
59
|
+
formatPermissionRules,
|
|
60
|
+
formatExplainedCall
|
|
61
|
+
};
|
|
62
|
+
//# sourceMappingURL=chunk-4TVYGG6G.js.map
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import {
|
|
2
|
+
API_VERSION,
|
|
3
|
+
CLI_VERSION
|
|
4
|
+
} from "./chunk-F5DCFAKI.js";
|
|
5
|
+
|
|
6
|
+
// src/subcommands/handlers/version-help.ts
|
|
7
|
+
import * as os from "node:os";
|
|
8
|
+
import { color } from "@wrongstack/core/utils";
|
|
9
|
+
var versionCmd = async (_args, deps) => {
|
|
10
|
+
const bunVersion = globalThis.Bun?.version;
|
|
11
|
+
const runtime = bunVersion ? `bun v${bunVersion}` : `node ${process.version}`;
|
|
12
|
+
deps.renderer.write(
|
|
13
|
+
`WrongStack ${CLI_VERSION} (apiVersion ${API_VERSION}, ${runtime}, ${os.platform()})
|
|
14
|
+
`
|
|
15
|
+
);
|
|
16
|
+
return 0;
|
|
17
|
+
};
|
|
18
|
+
function row(left, description) {
|
|
19
|
+
const pad = 31;
|
|
20
|
+
return left.length < pad - 2 ? ` ${left.padEnd(pad - 2)}${description}` : ` ${left}
|
|
21
|
+
${" ".repeat(pad)}${description}`;
|
|
22
|
+
}
|
|
23
|
+
function section(title, rows) {
|
|
24
|
+
return ["", color.bold(title), ...rows.map(([left, description]) => row(left, description))];
|
|
25
|
+
}
|
|
26
|
+
var helpCmd = async (_args, deps) => {
|
|
27
|
+
const lines = [
|
|
28
|
+
color.bold("WrongStack \u2014 usage"),
|
|
29
|
+
"",
|
|
30
|
+
' wstack [flags] ["<task>"] With a task: run it and exit. Without: start a session.',
|
|
31
|
+
" wstack <command> --help Details for one command",
|
|
32
|
+
...section("Start", [
|
|
33
|
+
["wstack", "Interactive session (REPL or TUI, picked at launch)"],
|
|
34
|
+
['wstack "<task>"', 'Run one task and exit (also: --prompt "<task>")'],
|
|
35
|
+
["wstack quick", "Straight into the TUI with saved defaults"],
|
|
36
|
+
["wstack webui | simpleui", "Browser UI / minimal chat UI for this project"],
|
|
37
|
+
["wstack desktop", "WrongStack Desktop (requires @wrongstack/desktop)"],
|
|
38
|
+
["wstack hq", "HQ command center across projects and machines"],
|
|
39
|
+
["wstack remote <user@host:/path>", "Run on a remote machine over SSH; WebUI tunneled here"],
|
|
40
|
+
['wstack --eternal "<mission>"', "Eternal-autonomy loop against a goal (Ctrl+C stops)"],
|
|
41
|
+
["wstack acp [serve]", "Agent Client Protocol server for editors"]
|
|
42
|
+
]),
|
|
43
|
+
...section("Sessions", [
|
|
44
|
+
["wstack sessions", "List recent sessions (also: fork, doctor, fleet)"],
|
|
45
|
+
["wstack resume [<id>]", "Resume a session (same as -r)"],
|
|
46
|
+
["wstack rewind [<id>]", "Rewind a session to an earlier point"],
|
|
47
|
+
["wstack export <id>", "Render a session as markdown, JSON or text"],
|
|
48
|
+
["wstack audit | replay [<id>]", "Tamper-evident audit log / recorded provider responses"],
|
|
49
|
+
["wstack chronicle", "Cross-session timeline and metrics"],
|
|
50
|
+
["wstack usage", "Token and cost summary"]
|
|
51
|
+
]),
|
|
52
|
+
...section("Setup", [
|
|
53
|
+
["wstack auth", "Provider keys: add/edit/remove, list, status, local"],
|
|
54
|
+
["wstack providers | models", "Browse providers and models; models add|remove|refresh"],
|
|
55
|
+
["wstack config", "Show, edit, back up or restore the active profile config"],
|
|
56
|
+
["wstack config-export | config-import", "Move behaviour settings via ./wstack-config.json"],
|
|
57
|
+
["wstack mcp", "MCP servers: list, add, remove, serve"],
|
|
58
|
+
["wstack import-claude-code", "Import MCP servers from Claude Code (preview; --apply)"],
|
|
59
|
+
["wstack plugin", "Plugins: list, install, enable, disable, remove"],
|
|
60
|
+
["wstack tools | skills", "List registered tools / discovered skills"],
|
|
61
|
+
["wstack typesafe", "TypeSafe account: status, login, test"],
|
|
62
|
+
["wstack update", "Self-update (--check-only)"]
|
|
63
|
+
]),
|
|
64
|
+
...section("Project & diagnostics", [
|
|
65
|
+
["wstack project | projects", "Committed project identity / tracked projects"],
|
|
66
|
+
["wstack permissions explain", "Why a tool call is allowed, asked or denied"],
|
|
67
|
+
["wstack doctor | diag", "Health checks / full diagnostic dump"],
|
|
68
|
+
["wstack governance status", "Project-daemon health"],
|
|
69
|
+
["wstack modeldiag | bench", "Model capability diagnostics / agentic benchmarks"],
|
|
70
|
+
["wstack mailbox serve", "HTTP bridge for external agents"],
|
|
71
|
+
["wstack version", "Print version"]
|
|
72
|
+
]),
|
|
73
|
+
...section("Session flags", [
|
|
74
|
+
["-c, --continue", "Resume the most recent session"],
|
|
75
|
+
["-r, --resume [<id>]", "Resume a session (latest when no id)"],
|
|
76
|
+
["--recover", "Reopen the last session that never closed (crash, kill)"],
|
|
77
|
+
["--fork-session", "With -c/-r/--recover: continue a copy, keep the original"],
|
|
78
|
+
["--provider <id> --model <id>", "Provider and model for this run"],
|
|
79
|
+
["--fallback-model <a,b,...>", "Models to fall back to when the primary is unavailable"],
|
|
80
|
+
["--effort <level>", "Reasoning effort: none|minimal|low|medium|high|xhigh|max"],
|
|
81
|
+
["--system-prompt lite|pro|default", "Bundled system-prompt variant"],
|
|
82
|
+
[
|
|
83
|
+
"--append-system-prompt <text> | --append-system-prompt-file <path>",
|
|
84
|
+
"Add instructions to the host agent prompt for this run"
|
|
85
|
+
],
|
|
86
|
+
['--goal "<goal>" | --ask "<q>"', "Open the TUI with a goal or a question queued"]
|
|
87
|
+
]),
|
|
88
|
+
...section("Tools & permissions", [
|
|
89
|
+
["--yolo | --no-yolo", "Auto-approve on or off (gated destructive kinds still ask)"],
|
|
90
|
+
["--yolo-destructive", "Let YOLO run every destructive kind you may un-gate"],
|
|
91
|
+
["--restricted", "Untrusted repo: no shell/network/MCP tools, stay in project, no YOLO"],
|
|
92
|
+
["--safe-mode", "Troubleshoot: no 3rd-party plugins, hooks, MCP, skills, overrides"],
|
|
93
|
+
["--only-tools <a,b,...>", "Expose only these tools (trailing * = prefix: mcp__gh__*)"],
|
|
94
|
+
["--disallowed-tools <a,b,...>", "Hide these tools, subagents included"],
|
|
95
|
+
["--allowed-tools <a,b,...>", "Run these without a prompt (destructive calls still ask)"],
|
|
96
|
+
["--mcp-config <file|json>", "Extra MCP servers for this run (.mcp.json accepted)"],
|
|
97
|
+
["--strict-mcp-config", "Start only the --mcp-config servers"],
|
|
98
|
+
["--no-hooks", "Skip user and plugin hooks (policy hooks still run)"]
|
|
99
|
+
]),
|
|
100
|
+
...section("Scripting (with a task)", [
|
|
101
|
+
["<stdin>", 'Piped input becomes context: git diff | wstack "review this"'],
|
|
102
|
+
["--output-json", "One JSON result line: status, finalText, sessionId, usage"],
|
|
103
|
+
[
|
|
104
|
+
"--output-format text|json|stream-json",
|
|
105
|
+
"stream-json: init, assistant, tool_result, result lines"
|
|
106
|
+
],
|
|
107
|
+
["--include-partial-messages", "stream-json: add text_delta lines"],
|
|
108
|
+
["--json-schema <file|json>", "Answer must be JSON matching the schema (structuredOutput)"],
|
|
109
|
+
["--max-budget-usd <amount>", "Stop once spend (leader + subagents) passes the amount"],
|
|
110
|
+
["", "Exit: 0 done, 1 failed/limit/budget/schema, 130 aborted, 2 usage"]
|
|
111
|
+
]),
|
|
112
|
+
...section("Interfaces", [
|
|
113
|
+
["--tui | --no-tui", "Force or disable the TUI"],
|
|
114
|
+
["--mouse", "Full mouse mode in the TUI"],
|
|
115
|
+
["--ascii", "Plain-ASCII symbols, borders and spinners (no emoji or box drawing)"],
|
|
116
|
+
["--desktop", "Same as wstack desktop"],
|
|
117
|
+
[
|
|
118
|
+
"--webui [--host <h>] [--port <n>] [--open]",
|
|
119
|
+
"Browser UI (+ --webui-token, --webui-public-url, ...)"
|
|
120
|
+
],
|
|
121
|
+
[
|
|
122
|
+
"--simpleui [same flags] [--full-auto]",
|
|
123
|
+
"Minimal chat UI; --full-auto = YOLO + autonomy for this run only"
|
|
124
|
+
],
|
|
125
|
+
[
|
|
126
|
+
"--hq [--host <h>] [--port <n>] [--password <p>] [--tunnel] [--open]",
|
|
127
|
+
"HQ server (+ --hq-allowlist, --hq-public-url)"
|
|
128
|
+
]
|
|
129
|
+
]),
|
|
130
|
+
...section("Startup & tuning", [
|
|
131
|
+
["--skip", "Skip every startup prompt; use saved choices"],
|
|
132
|
+
["--skip-index", "Skip codebase indexing at startup"],
|
|
133
|
+
["--no-models-refresh", "Use the cached model catalog"],
|
|
134
|
+
["--token-saving-tier <tier>", "auto|off|minimal|light|medium|aggressive"],
|
|
135
|
+
["--max-concurrent <n> | --max-spawns <n>", "Fleet concurrency / lifetime subagent spawns"],
|
|
136
|
+
["--chimera-auto-fix off|ask|auto", "How to handle Chimera review findings"],
|
|
137
|
+
["--cwd <dir>", "Run as if started in <dir>"],
|
|
138
|
+
["--verbose | --trace | --log-level <l>", "Log verbosity"],
|
|
139
|
+
["--metrics [--metrics-port <n>]", "Metrics and health; Prometheus endpoint on the port"],
|
|
140
|
+
[
|
|
141
|
+
"--record | --replay <session-id>",
|
|
142
|
+
"Record provider responses / serve them back (test harnesses; a changed prompt misses)"
|
|
143
|
+
]
|
|
144
|
+
])
|
|
145
|
+
];
|
|
146
|
+
deps.renderer.write(lines.join("\n") + "\n");
|
|
147
|
+
return 0;
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
export {
|
|
151
|
+
versionCmd,
|
|
152
|
+
helpCmd
|
|
153
|
+
};
|
|
154
|
+
//# sourceMappingURL=chunk-5JYDKG5B.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
// src/provider-helpers.ts
|
|
3
|
-
import { hasProviderCredential } from "@wrongstack/core/models";
|
|
3
|
+
import { hasProviderCredential, isKeylessLocalProvider } from "@wrongstack/core/models";
|
|
4
4
|
import { catalogProviderIdFor } from "@wrongstack/providers";
|
|
5
5
|
function uniqueModelIds(primary, fallback) {
|
|
6
6
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -18,22 +18,6 @@ function visibleModelIds(providerId, config, catalogModelIds, cfg) {
|
|
|
18
18
|
if (entry?.models === void 0) return [...catalogModelIds];
|
|
19
19
|
return uniqueModelIds(entry.models, catalogModelIds);
|
|
20
20
|
}
|
|
21
|
-
function isLoopbackUrl(apiBase) {
|
|
22
|
-
if (!apiBase) return false;
|
|
23
|
-
let host;
|
|
24
|
-
try {
|
|
25
|
-
host = new URL(apiBase).hostname.toLowerCase();
|
|
26
|
-
} catch {
|
|
27
|
-
return false;
|
|
28
|
-
}
|
|
29
|
-
host = host.replace(/^\[|\]$/g, "");
|
|
30
|
-
if (host === "localhost" || host === "::1" || host === "0.0.0.0") return true;
|
|
31
|
-
return /^127\.\d{1,3}\.\d{1,3}\.\d{1,3}$/.test(host);
|
|
32
|
-
}
|
|
33
|
-
function isKeylessLocalProvider(provider) {
|
|
34
|
-
if (provider.envVars && provider.envVars.length > 0) return false;
|
|
35
|
-
return isLoopbackUrl(provider.apiBase);
|
|
36
|
-
}
|
|
37
21
|
function hasApiKey(provider, config) {
|
|
38
22
|
return hasProviderCredential(provider, config);
|
|
39
23
|
}
|
|
@@ -122,9 +106,9 @@ function modelDetails(models) {
|
|
|
122
106
|
}
|
|
123
107
|
|
|
124
108
|
export {
|
|
125
|
-
visibleModelIds,
|
|
126
109
|
isKeylessLocalProvider,
|
|
110
|
+
visibleModelIds,
|
|
127
111
|
hasApiKey,
|
|
128
112
|
buildPickableProviders
|
|
129
113
|
};
|
|
130
|
-
//# sourceMappingURL=chunk-
|
|
114
|
+
//# sourceMappingURL=chunk-5UZBUV2H.js.map
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
|
|
2
|
+
// src/context-limit.ts
|
|
3
|
+
import { refreshCatalogIfStale } from "@wrongstack/core/models";
|
|
4
|
+
import { mergeCustomModelDefs, toErrorMessage } from "@wrongstack/core/utils";
|
|
5
|
+
import { capabilitiesFor } from "@wrongstack/providers";
|
|
6
|
+
var SIBLING_CATALOG = {
|
|
7
|
+
"anthropic-oauth": "anthropic",
|
|
8
|
+
"openai-codex": "openai",
|
|
9
|
+
"github-copilot": "openai",
|
|
10
|
+
"google-antigravity": "google"
|
|
11
|
+
};
|
|
12
|
+
async function resolveRuntimeMaxContextDetailed(input) {
|
|
13
|
+
const providerConfig = input.runtimeProviderConfig ?? input.config.providers?.[input.providerId];
|
|
14
|
+
const providerOverride = positiveNumber(readConfiguredMaxContext(providerConfig));
|
|
15
|
+
if (providerOverride) return { maxContext: providerOverride, branch: "provider-override" };
|
|
16
|
+
const catalogId = providerConfig?.type && providerConfig.type !== input.providerId ? providerConfig.type : input.providerId;
|
|
17
|
+
const sibling = providerConfig?.family ? SIBLING_CATALOG[providerConfig.family] : void 0;
|
|
18
|
+
if (sibling && input.modelsRegistry) {
|
|
19
|
+
const mergedModels = mergeCustomModelDefs(providerConfig?.customModels, input.config.models);
|
|
20
|
+
const ownModel = await input.modelsRegistry.getModel(catalogId, input.modelId).catch(() => void 0);
|
|
21
|
+
if (ownModel) {
|
|
22
|
+
const ownCaps = await capabilitiesFor(
|
|
23
|
+
input.modelsRegistry,
|
|
24
|
+
catalogId,
|
|
25
|
+
input.modelId,
|
|
26
|
+
mergedModels
|
|
27
|
+
).catch(() => void 0);
|
|
28
|
+
const ownMax = positiveNumber(ownCaps?.maxContext) ?? positiveNumber(ownModel.capabilities.maxContext);
|
|
29
|
+
if (ownMax) return { maxContext: ownMax, branch: "catalog-capabilities" };
|
|
30
|
+
}
|
|
31
|
+
const caps = await capabilitiesFor(
|
|
32
|
+
input.modelsRegistry,
|
|
33
|
+
sibling,
|
|
34
|
+
input.modelId,
|
|
35
|
+
mergedModels
|
|
36
|
+
).catch(() => void 0);
|
|
37
|
+
const siblingMax = positiveNumber(caps?.maxContext);
|
|
38
|
+
if (siblingMax) return { maxContext: siblingMax, branch: "sibling-capabilities" };
|
|
39
|
+
const directModel = await input.modelsRegistry.getModel(sibling, input.modelId).catch(() => void 0);
|
|
40
|
+
const directMax = positiveNumber(directModel?.capabilities.maxContext);
|
|
41
|
+
if (directMax) return { maxContext: directMax, branch: "sibling-direct-model" };
|
|
42
|
+
}
|
|
43
|
+
let divergedFromCatalog = false;
|
|
44
|
+
if (input.modelsRegistry) {
|
|
45
|
+
const topLevelBaseUrlApplies = input.providerId === input.config.provider;
|
|
46
|
+
const configuredBaseUrl = providerConfig?.baseUrl ?? (topLevelBaseUrlApplies ? input.config.baseUrl : void 0);
|
|
47
|
+
let divergesFromCatalog = false;
|
|
48
|
+
if (configuredBaseUrl) {
|
|
49
|
+
const resolved = await safeGetProvider(input.modelsRegistry, catalogId);
|
|
50
|
+
divergesFromCatalog = normalizeBaseUrl(configuredBaseUrl) !== normalizeBaseUrl(resolved?.apiBase);
|
|
51
|
+
}
|
|
52
|
+
divergedFromCatalog = divergesFromCatalog;
|
|
53
|
+
if (!divergesFromCatalog) {
|
|
54
|
+
const mergedModels = mergeCustomModelDefs(providerConfig?.customModels, input.config.models);
|
|
55
|
+
const caps = await capabilitiesFor(
|
|
56
|
+
input.modelsRegistry,
|
|
57
|
+
catalogId,
|
|
58
|
+
input.modelId,
|
|
59
|
+
mergedModels
|
|
60
|
+
).catch(() => void 0);
|
|
61
|
+
const catalogMax = positiveNumber(caps?.maxContext);
|
|
62
|
+
if (catalogMax) return { maxContext: catalogMax, branch: "catalog-capabilities" };
|
|
63
|
+
const directModel = await input.modelsRegistry.getModel(catalogId, input.modelId).catch(() => void 0);
|
|
64
|
+
const directMax = positiveNumber(directModel?.capabilities.maxContext);
|
|
65
|
+
if (directMax) return { maxContext: directMax, branch: "catalog-direct-model" };
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
const explicitContext = positiveNumber(input.config.context?.effectiveMaxContext);
|
|
69
|
+
if (explicitContext) {
|
|
70
|
+
return { maxContext: explicitContext, branch: "explicit-config-fallback" };
|
|
71
|
+
}
|
|
72
|
+
const familyDefault = positiveNumber(input.provider.capabilities.maxContext) ?? 0;
|
|
73
|
+
const branch = familyDefault === 0 ? "unknown" : divergedFromCatalog ? "diverging-baseurl-family-default" : "family-default";
|
|
74
|
+
return { maxContext: familyDefault, branch };
|
|
75
|
+
}
|
|
76
|
+
async function resolveRuntimeMaxContext(input) {
|
|
77
|
+
const { maxContext } = await resolveRuntimeMaxContextDetailed(input);
|
|
78
|
+
return maxContext;
|
|
79
|
+
}
|
|
80
|
+
var SUSPICIOUS_SHRINK_BRANCHES = /* @__PURE__ */ new Set([
|
|
81
|
+
"family-default",
|
|
82
|
+
"diverging-baseurl-family-default"
|
|
83
|
+
]);
|
|
84
|
+
function describeMaxContextChange(params) {
|
|
85
|
+
const { previous, current, providerId, modelId } = params;
|
|
86
|
+
if (current === previous) return void 0;
|
|
87
|
+
const branch = params.branch ?? "unknown";
|
|
88
|
+
const shrank = previous > 0 && current > 0 && current < previous;
|
|
89
|
+
const suspicious = SUSPICIOUS_SHRINK_BRANCHES.has(branch);
|
|
90
|
+
const detail = `max-context ${previous} \u2192 ${current} for ${providerId}/${modelId} (branch=${branch}${shrank ? ", DECREASED" : ""})`;
|
|
91
|
+
return shrank && suspicious ? {
|
|
92
|
+
level: "warn",
|
|
93
|
+
message: `Context window shrank via a non-catalog branch: ${detail}`,
|
|
94
|
+
shrank,
|
|
95
|
+
branch
|
|
96
|
+
} : { level: "debug", message: detail, shrank, branch };
|
|
97
|
+
}
|
|
98
|
+
async function refreshRuntimeModelCatalog(input) {
|
|
99
|
+
if (!input.modelsRegistry) return false;
|
|
100
|
+
try {
|
|
101
|
+
if (await refreshCatalogIfStale(input.modelsRegistry) === "recent") return false;
|
|
102
|
+
input.logger?.debug?.(
|
|
103
|
+
`models.dev catalog refreshed${input.reason ? ` (${input.reason})` : ""}`
|
|
104
|
+
);
|
|
105
|
+
return true;
|
|
106
|
+
} catch (err) {
|
|
107
|
+
input.logger?.warn?.(
|
|
108
|
+
`models.dev refresh failed${input.reason ? ` (${input.reason})` : ""}: ${toErrorMessage(err)}; using cached catalog`
|
|
109
|
+
);
|
|
110
|
+
return false;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
async function safeGetProvider(registry, id) {
|
|
114
|
+
try {
|
|
115
|
+
return await registry.getProvider(id);
|
|
116
|
+
} catch {
|
|
117
|
+
return void 0;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
function normalizeBaseUrl(url) {
|
|
121
|
+
if (!url) return "";
|
|
122
|
+
return url.trim().toLowerCase().replace(/\/+$/, "");
|
|
123
|
+
}
|
|
124
|
+
function readConfiguredMaxContext(providerConfig) {
|
|
125
|
+
if (!providerConfig || typeof providerConfig !== "object") return void 0;
|
|
126
|
+
const capabilities = providerConfig.capabilities;
|
|
127
|
+
if (!capabilities || typeof capabilities !== "object") return void 0;
|
|
128
|
+
return capabilities.maxContext;
|
|
129
|
+
}
|
|
130
|
+
function positiveNumber(value) {
|
|
131
|
+
return typeof value === "number" && Number.isFinite(value) && value > 0 ? value : void 0;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export {
|
|
135
|
+
resolveRuntimeMaxContextDetailed,
|
|
136
|
+
resolveRuntimeMaxContext,
|
|
137
|
+
describeMaxContextChange,
|
|
138
|
+
refreshRuntimeModelCatalog
|
|
139
|
+
};
|
|
140
|
+
//# sourceMappingURL=chunk-CZTXF6HY.js.map
|