@wrongstack/cli 1.1.4 → 1.1.6
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-MZ5MQBFN.js → acp-CZBSFQB7.js} +6 -5
- package/dist/acp-leader/acp-leader-confirm.d.ts +2 -0
- package/dist/acp-leader/acp-leader-host-binding.d.ts +1 -0
- package/dist/acp-leader/acp-leader-host.d.ts +9 -0
- package/dist/acp-leader/acp-leader-picker.d.ts +6 -3
- package/dist/acp-leader/acp-leader-provider.d.ts +10 -0
- package/dist/acp-leader/acp-leader-skills.d.ts +5 -0
- package/dist/acp-leader/acp-leader-stream.d.ts +9 -0
- package/dist/{auth-IHQS6AFW.js → auth-2ZG5DBHS.js} +4 -4
- package/dist/boot/launch-menu-arrow.d.ts +20 -0
- package/dist/boot/launch-menu-types.d.ts +36 -0
- package/dist/boot/launch-menu.d.ts +1 -57
- package/dist/boot/tui-session-resume-rollback.d.ts +31 -0
- package/dist/{boot-auto-thin-7D4OVEWA.js → boot-auto-thin-N2CIGTXE.js} +3 -3
- package/dist/{chunk-TZPKOS5G.js → chunk-2XQ6SRKG.js} +2 -2
- package/dist/{chunk-3EXRPTAU.js → chunk-5TQ65PXQ.js} +17 -17
- package/dist/{chunk-VAQXOZKP.js → chunk-AJM4EFCM.js} +139 -136
- package/dist/{chunk-C2BBH4S4.js → chunk-E3MJFAFR.js} +2 -2
- package/dist/{chunk-COGI7EQU.js → chunk-EAATL6FL.js} +713 -21
- package/dist/{chunk-AWRZWPJ3.js → chunk-FWUIKCCO.js} +152 -123
- package/dist/{chunk-TAE3EGBM.js → chunk-H5DCQFUI.js} +5 -5
- package/dist/{chunk-BIGSVBPI.js → chunk-KNYIEQAY.js} +64 -61
- package/dist/chunk-LYWOV4OX.js +252 -0
- package/dist/{chunk-75OLD563.js → chunk-M7PSENGF.js} +3 -1
- package/dist/{chunk-I5LJLKA3.js → chunk-MKMM5RIW.js} +12 -5
- package/dist/{chunk-ZF4HRR5F.js → chunk-P7MEEUGT.js} +275 -250
- package/dist/chunk-PGC44T7N.js +255 -0
- package/dist/chunk-QLYPIJ7X.js +258 -0
- package/dist/{chunk-JKTJSLUT.js → chunk-QRWXHGLB.js} +242 -18
- package/dist/chunk-RN5CFAVQ.js +292 -0
- package/dist/{chunk-WDXNBYGD.js → chunk-TDP7CZGE.js} +6 -1
- package/dist/{chunk-6VPWQ4TG.js → chunk-UROB7MK5.js} +2 -1
- package/dist/{chunk-IJLIAPCW.js → chunk-VPSAKGLK.js} +47 -47
- package/dist/{chunk-2LTHDKZX.js → chunk-W7X23HI6.js} +18 -18
- package/dist/{chunk-GKGWPFW2.js → chunk-X4DEQLAZ.js} +1 -1
- package/dist/{cli-context-E44HQ4ZO.js → cli-context-6KS3HV5R.js} +247 -236
- package/dist/{cli-main-OT63I2FX.js → cli-main-NF3YGDME.js} +1779 -1494
- package/dist/cli-main-boot.d.ts +1 -1
- package/dist/config-doctor-known-keys.d.ts +33 -0
- package/dist/config-doctor.d.ts +2 -47
- package/dist/config-history-support.d.ts +36 -0
- package/dist/config-history.d.ts +1 -1
- package/dist/{config-transfer-Y7XJMJRN.js → config-transfer-B4GOZTFC.js} +2 -2
- package/dist/{execution-OK34CJKJ.js → execution-RVDUXLNT.js} +6522 -6426
- package/dist/execution-tui.d.ts +30 -0
- package/dist/fleet/acp-wrongstack-bridge.d.ts +11 -3
- package/dist/fleet/host-acp.d.ts +3 -0
- package/dist/fleet/wrongforge-client.d.ts +116 -0
- package/dist/fleet/wrongforge-gateway.d.ts +20 -0
- package/dist/fleet/wrongforge-info.d.ts +32 -0
- package/dist/fleet/wrongforge-quota.d.ts +10 -0
- package/dist/fleet/wrongforge-runner.d.ts +37 -0
- package/dist/fleet/wrongforge-runtime.d.ts +10 -0
- package/dist/{hq-JD5AZVMG.js → hq-V2M4IYCI.js} +320 -306
- package/dist/hq-server/login-attempt-store.d.ts +2 -0
- package/dist/hq-server/sweeps.d.ts +28 -0
- package/dist/{hq-server-BI23EPM7.js → hq-server-QM7EIVGJ.js} +3 -3
- package/dist/index.js +5 -5
- package/dist/mcp-22CFBX4H.js +236 -0
- package/dist/mcp-serve.d.ts +0 -63
- package/dist/{modeldiag-HDIKG37X.js → modeldiag-5PBB777J.js} +4 -4
- package/dist/{per-subcommand-help-4GYSCMLU.js → per-subcommand-help-MQGERD4E.js} +2 -2
- package/dist/plugin-llm-command.d.ts +9 -0
- package/dist/{plugin-usage-TYF5HY4K.js → plugin-usage-UWKYMNQU.js} +3 -3
- package/dist/{plugins-XGAXDLPT.js → plugins-VP7JQH47.js} +4 -4
- package/dist/{sdd-runtime-6MFUXWJK.js → sdd-runtime-HIJ4Z5TF.js} +2 -2
- package/dist/services/sdd/state.d.ts +2 -0
- package/dist/session-event-wiring-types.d.ts +62 -0
- package/dist/session-event-wiring.d.ts +2 -52
- package/dist/{sessions-config-SJVQXCIE.js → sessions-config-7MK742OW.js} +2 -2
- package/dist/short-circuit-flags-276OLPIN.js +11 -0
- package/dist/slash-commands/command-context-fleet.d.ts +187 -0
- package/dist/slash-commands/command-context-sdd-goal.d.ts +102 -0
- package/dist/slash-commands/command-context.d.ts +3 -282
- package/dist/slash-commands/project-switch-interactive.d.ts +11 -0
- package/dist/slash-commands/setmodel-helpers.d.ts +36 -0
- package/dist/subcommands/handlers/hq-token.d.ts +3 -0
- package/dist/subcommands/handlers/hq.d.ts +0 -21
- package/dist/subcommands/handlers/per-subcommand-help-operations.d.ts +8 -0
- package/dist/subcommands/handlers/tools-cli-args.d.ts +57 -0
- package/dist/subcommands/handlers/tools-cli.d.ts +5 -0
- package/dist/subcommands/handlers/tools-serve.d.ts +4 -0
- package/dist/{subcommands-YADUV7IJ.js → subcommands-SKJPUJ7N.js} +2 -2
- package/dist/tool-gateway-http.d.ts +30 -0
- package/dist/tool-gateway.d.ts +185 -0
- package/dist/tools-cli-44MLIUQO.js +509 -0
- package/dist/tools-serve-TRCET2M7.js +102 -0
- package/dist/{tools-skills-55QVTMSK.js → tools-skills-WDTMCE46.js} +7 -2
- package/dist/tuneup-runtime-checks.d.ts +7 -0
- package/dist/tuneup-types.d.ts +118 -0
- package/dist/tuneup.d.ts +3 -122
- package/dist/{typesafe-YBEADNAH.js → typesafe-QLSMFU7J.js} +1 -1
- package/dist/{version-help-RBZC5GZZ.js → version-help-X6CC4CFY.js} +2 -2
- package/dist/{webui-server-CB64CFDG.js → webui-server-6I6QOECV.js} +44 -6
- package/dist/wiring/provider-runtime-setup.d.ts +3 -1
- package/dist/wiring/session-runtime.d.ts +1 -1
- package/dist/wrongforge-gateway-UOFBK56J.js +92 -0
- package/dist/wrongforge-leader/wrongforge-leader-gateway.d.ts +9 -0
- package/dist/wrongforge-leader/wrongforge-leader-picker.d.ts +12 -0
- package/dist/wrongforge-leader/wrongforge-leader-provider.d.ts +56 -0
- package/package.json +1 -1
- package/dist/mcp-W7A5HUXV.js +0 -560
- package/dist/short-circuit-flags-QEXUS3BY.js +0 -11
package/dist/cli-main-boot.d.ts
CHANGED
|
@@ -80,7 +80,7 @@ export declare function bootCliRuntime(cliCtx: CliContext, state: CliConfigState
|
|
|
80
80
|
effectiveMaxContextRef: {
|
|
81
81
|
current: number;
|
|
82
82
|
};
|
|
83
|
-
errorRing: import("./session-event-wiring.js").ErrorEntry[];
|
|
83
|
+
errorRing: import("./session-event-wiring-types.js").ErrorEntry[];
|
|
84
84
|
evOn: (event: string, handler: (...args: unknown[]) => void) => void;
|
|
85
85
|
eventWiring: import("./boot/event-wiring.js").EventWiring;
|
|
86
86
|
getActiveReasoningConfig: () => import("@wrongstack/core/types").ReasoningConfig | undefined;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { Config } from '@wrongstack/core/types';
|
|
2
|
+
/** Every key that may legitimately appear in a persisted config file.
|
|
3
|
+
* Mirrors the `Config` interface in @wrongstack/core types/config.ts.
|
|
4
|
+
*
|
|
5
|
+
* Kept honest by `ConfigKeyCoverage` below, which is the guard this list
|
|
6
|
+
* went without for its whole life. It had drifted in BOTH directions:
|
|
7
|
+
* eight real fields — `systemPrompt`, `themePreset`, `modelTiers`,
|
|
8
|
+
* `chronicle`, `cloudSync`, `activeProfile`, `fallbackProfile`,
|
|
9
|
+
* `fallbackGateSeconds` — were reported to the user as "unknown key" even
|
|
10
|
+
* though WrongStack writes them itself (`/theme` writes `themePreset` on
|
|
11
|
+
* every theme change), and a phantom `agents` entry (that field is nested
|
|
12
|
+
* under `acp`, never top-level) waved a stray top-level `agents` block
|
|
13
|
+
* through. Add a field to `Config` and `tsc` now names it here. */
|
|
14
|
+
export declare const KNOWN_TOP_LEVEL_KEYS: readonly ['version', 'activeProfile', 'provider', 'model', 'apiKey', 'baseUrl', 'maxConcurrent', 'uiLocale', 'themePreset', 'providers', 'models', 'modelMatrix', 'modelTiers', 'favoriteModels', 'disabledModels', 'disabledProviders', 'favoriteModelsOnly', 'modelAvailabilitySchedule', 'context', 'tools', 'mcpServers', 'acp', 'fallbackModels', 'fallbackBridge', 'fallbackProfiles', 'fallbackProfile', 'fallbackAuto', 'fallbackMaxLastResortCandidates', 'fallbackStickiness', 'fallbackGateSeconds', 'hooks', 'plugins', 'pluginManager', 'log', 'features', 'Sage', 'skills', 'yolo', 'nextPrediction', 'cwd', 'autonomy', 'hints', 'debugStream', 'configScope', 'indexing', 'circuitBreaker', 'adaptiveConcurrency', 'launch', 'session', 'chronicle', 'modelRuntime', 'systemPrompt', 'hq', 'typesafe', 'fleet', 'brain', 'sync', 'cloudSync', 'git', 'observability', 'update', 'limits', 'extensions'];
|
|
15
|
+
/** Compile-time `never` assertion: instantiating it with a non-empty union
|
|
16
|
+
* fails and the TS error text spells out the offending key names. */
|
|
17
|
+
type AssertNever<T extends never> = T;
|
|
18
|
+
/** `Config` fields the doctor would report as unknown. Must be `never`. */
|
|
19
|
+
type UncoveredConfigKey = Exclude<keyof Config, (typeof KNOWN_TOP_LEVEL_KEYS)[number]>;
|
|
20
|
+
/** Keys the list invents that `Config` does not have. Must be `never`. */
|
|
21
|
+
type PhantomDoctorKey = Exclude<(typeof KNOWN_TOP_LEVEL_KEYS)[number], keyof Config>;
|
|
22
|
+
/**
|
|
23
|
+
* The drift gate. Exported so `noUnusedVariables` keeps it, and because the
|
|
24
|
+
* name is what a future reader greps for when `tsc` points here.
|
|
25
|
+
*
|
|
26
|
+
* A runtime test cannot do this job: `keyof Config` does not survive to
|
|
27
|
+
* runtime, so the previous safety net was a hand-written list of keys inside
|
|
28
|
+
* `slash-doctor.test.ts` — which drifted alongside the list it was meant to
|
|
29
|
+
* pin. This resolves to `never` only while both directions are clean.
|
|
30
|
+
*/
|
|
31
|
+
export type ConfigKeyCoverage = AssertNever<UncoveredConfigKey> | AssertNever<PhantomDoctorKey>;
|
|
32
|
+
export {};
|
|
33
|
+
//# sourceMappingURL=config-doctor-known-keys.d.ts.map
|
package/dist/config-doctor.d.ts
CHANGED
|
@@ -1,19 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* config files (the active profile config and the per-project config).
|
|
4
|
-
*
|
|
5
|
-
* Pure module: `diagnoseConfig` never touches the filesystem. The /doctor
|
|
6
|
-
* slash command owns file IO, backups, and persistence so the engine stays
|
|
7
|
-
* trivially testable.
|
|
8
|
-
*
|
|
9
|
-
* Repair philosophy: a removed key is always safe — built-in defaults (and,
|
|
10
|
-
* for `extensions`, each plugin's `defaultConfig`) are merged underneath user
|
|
11
|
-
* values at load time, so deleting an invalid value falls back to a known-good
|
|
12
|
-
* default. Values are only rewritten when the intent is unambiguous (e.g. the
|
|
13
|
-
* string "true" for a boolean field); anything ambiguous is reported as a
|
|
14
|
-
* non-fixable finding instead of guessed at.
|
|
15
|
-
*/
|
|
16
|
-
import { type Config, type JSONSchema } from '@wrongstack/core/types';
|
|
1
|
+
import { type JSONSchema } from '@wrongstack/core/types';
|
|
2
|
+
export type { ConfigKeyCoverage } from './config-doctor-known-keys.js';
|
|
17
3
|
type DoctorSeverity = 'error' | 'warning';
|
|
18
4
|
export interface DoctorFinding {
|
|
19
5
|
/** Dot path of the offending value, e.g. `autonomy.defaultMode`. */
|
|
@@ -35,36 +21,6 @@ export interface PluginSchemaInfo {
|
|
|
35
21
|
name: string;
|
|
36
22
|
configSchema?: JSONSchema | undefined;
|
|
37
23
|
}
|
|
38
|
-
/** Every key that may legitimately appear in a persisted config file.
|
|
39
|
-
* Mirrors the `Config` interface in @wrongstack/core types/config.ts.
|
|
40
|
-
*
|
|
41
|
-
* Kept honest by `ConfigKeyCoverage` below, which is the guard this list
|
|
42
|
-
* went without for its whole life. It had drifted in BOTH directions:
|
|
43
|
-
* eight real fields — `systemPrompt`, `themePreset`, `modelTiers`,
|
|
44
|
-
* `chronicle`, `cloudSync`, `activeProfile`, `fallbackProfile`,
|
|
45
|
-
* `fallbackGateSeconds` — were reported to the user as "unknown key" even
|
|
46
|
-
* though WrongStack writes them itself (`/theme` writes `themePreset` on
|
|
47
|
-
* every theme change), and a phantom `agents` entry (that field is nested
|
|
48
|
-
* under `acp`, never top-level) waved a stray top-level `agents` block
|
|
49
|
-
* through. Add a field to `Config` and `tsc` now names it here. */
|
|
50
|
-
declare const KNOWN_TOP_LEVEL_KEYS: readonly ['version', 'activeProfile', 'provider', 'model', 'apiKey', 'baseUrl', 'maxConcurrent', 'uiLocale', 'themePreset', 'providers', 'models', 'modelMatrix', 'modelTiers', 'favoriteModels', 'disabledModels', 'disabledProviders', 'favoriteModelsOnly', 'modelAvailabilitySchedule', 'context', 'tools', 'mcpServers', 'acp', 'fallbackModels', 'fallbackBridge', 'fallbackProfiles', 'fallbackProfile', 'fallbackAuto', 'fallbackMaxLastResortCandidates', 'fallbackStickiness', 'fallbackGateSeconds', 'hooks', 'plugins', 'pluginManager', 'log', 'features', 'Sage', 'skills', 'yolo', 'nextPrediction', 'cwd', 'autonomy', 'hints', 'debugStream', 'configScope', 'indexing', 'circuitBreaker', 'adaptiveConcurrency', 'launch', 'session', 'chronicle', 'modelRuntime', 'systemPrompt', 'hq', 'typesafe', 'fleet', 'brain', 'sync', 'cloudSync', 'git', 'observability', 'update', 'limits', 'extensions'];
|
|
51
|
-
/** Compile-time `never` assertion: instantiating it with a non-empty union
|
|
52
|
-
* fails and the TS error text spells out the offending key names. */
|
|
53
|
-
type AssertNever<T extends never> = T;
|
|
54
|
-
/** `Config` fields the doctor would report as unknown. Must be `never`. */
|
|
55
|
-
type UncoveredConfigKey = Exclude<keyof Config, (typeof KNOWN_TOP_LEVEL_KEYS)[number]>;
|
|
56
|
-
/** Keys the list invents that `Config` does not have. Must be `never`. */
|
|
57
|
-
type PhantomDoctorKey = Exclude<(typeof KNOWN_TOP_LEVEL_KEYS)[number], keyof Config>;
|
|
58
|
-
/**
|
|
59
|
-
* The drift gate. Exported so `noUnusedVariables` keeps it, and because the
|
|
60
|
-
* name is what a future reader greps for when `tsc` points here.
|
|
61
|
-
*
|
|
62
|
-
* A runtime test cannot do this job: `keyof Config` does not survive to
|
|
63
|
-
* runtime, so the previous safety net was a hand-written list of keys inside
|
|
64
|
-
* `slash-doctor.test.ts` — which drifted alongside the list it was meant to
|
|
65
|
-
* pin. This resolves to `never` only while both directions are clean.
|
|
66
|
-
*/
|
|
67
|
-
export type ConfigKeyCoverage = AssertNever<UncoveredConfigKey> | AssertNever<PhantomDoctorKey>;
|
|
68
24
|
export declare function diagnoseConfig(cfg: Record<string, unknown>, plugins?: PluginSchemaInfo[],
|
|
69
25
|
/**
|
|
70
26
|
* Environment consulted by rules whose verdict depends on it — currently
|
|
@@ -74,5 +30,4 @@ export declare function diagnoseConfig(cfg: Record<string, unknown>, plugins?: P
|
|
|
74
30
|
* environment because every production caller means that one.
|
|
75
31
|
*/
|
|
76
32
|
env?: NodeJS.ProcessEnv): DoctorReport;
|
|
77
|
-
export {};
|
|
78
33
|
//# sourceMappingURL=config-doctor.d.ts.map
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
type UidFn = () => string | number | undefined;
|
|
2
|
+
export declare const defaultUidFn: UidFn;
|
|
3
|
+
/**
|
|
4
|
+
* Verify the calling process owns config.json before allowing a write operation.
|
|
5
|
+
* Guards against one user on a shared multi-user system overwriting another's config.
|
|
6
|
+
*
|
|
7
|
+
* On Windows, .uid is always undefined on the UserInfo object, and the NT ACL
|
|
8
|
+
* model already restricts writes — so we skip the check on win32.
|
|
9
|
+
* On Unix, we compare the process euid against the file's uid.
|
|
10
|
+
* If config.json doesn't exist yet, we allow the write (first-time setup).
|
|
11
|
+
*/
|
|
12
|
+
export declare function checkConfigOwnership(homeFn: HomeDirFn, uidFn?: UidFn, targetConfigPath?: string): Promise<boolean>;
|
|
13
|
+
/**
|
|
14
|
+
* Guard: throw if `filename` is a protected file or lives inside a protected
|
|
15
|
+
* directory. Used before any unlink / rm call to make accidentally deleting
|
|
16
|
+
* critical files impossible.
|
|
17
|
+
*/
|
|
18
|
+
export declare function assertSafeToDelete(filename: string, parentDir: string): void;
|
|
19
|
+
export declare function maskConfigSecrets(cfg: Record<string, unknown>): Record<string, unknown>;
|
|
20
|
+
/**
|
|
21
|
+
* Rebuild a writable config from a masked history snapshot.
|
|
22
|
+
*
|
|
23
|
+
* History deliberately never stores secrets, so a snapshot cannot restore them
|
|
24
|
+
* — but writing it back verbatim replaced every live credential with the
|
|
25
|
+
* literal `"[REDACTED]"`, which the next boot reads as a plaintext key and
|
|
26
|
+
* every request 401s. Instead: take the structure from the snapshot and carry
|
|
27
|
+
* each masked value over from the config that is on disk right now. When the
|
|
28
|
+
* current config has no value at that path the key is dropped rather than
|
|
29
|
+
* materialising the placeholder.
|
|
30
|
+
*/
|
|
31
|
+
export declare function reviveSecrets(masked: unknown, current: unknown): unknown;
|
|
32
|
+
export type HomeDirFn = () => string;
|
|
33
|
+
export declare const defaultHomeDir: HomeDirFn;
|
|
34
|
+
export declare function configPath(homeFn?: HomeDirFn, targetConfigPath?: string): string;
|
|
35
|
+
export {};
|
|
36
|
+
//# sourceMappingURL=config-history-support.d.ts.map
|
package/dist/config-history.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { HomeDirFn } from './config-history-support.js';
|
|
1
2
|
export declare const MAX_CONFIG_HISTORY_ENTRIES = 50;
|
|
2
3
|
export interface HistoryEntry {
|
|
3
4
|
id: string;
|
|
@@ -14,7 +15,6 @@ interface HistoryIndex {
|
|
|
14
15
|
description: string;
|
|
15
16
|
}>;
|
|
16
17
|
}
|
|
17
|
-
type HomeDirFn = () => string;
|
|
18
18
|
/**
|
|
19
19
|
* Backup current config.json → config.json.last and timestamped .bak files.
|
|
20
20
|
* Safe to call even if config.json doesn't exist. Never throws.
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
appendHistory,
|
|
7
7
|
backupCurrent
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-KNYIEQAY.js";
|
|
9
9
|
import "./chunk-W23PY4IJ.js";
|
|
10
10
|
|
|
11
11
|
// src/subcommands/handlers/config-transfer.ts
|
|
@@ -120,4 +120,4 @@ export {
|
|
|
120
120
|
configExportCmd,
|
|
121
121
|
configImportCmd
|
|
122
122
|
};
|
|
123
|
-
//# sourceMappingURL=config-transfer-
|
|
123
|
+
//# sourceMappingURL=config-transfer-B4GOZTFC.js.map
|