@wrongstack/cli 1.0.33 → 1.0.35
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-EDGUWU7N.js → acp-T77EAEDB.js} +469 -465
- package/dist/{auth-SUHKFFO4.js → auth-M6LXZTDA.js} +4 -4
- package/dist/auth-menu/openai-codex-oauth.d.ts +1 -1
- package/dist/auth-menu/panel-provider-edits.d.ts +15 -0
- package/dist/auth-menu/panel-service.d.ts +1 -1
- package/dist/boot/governance-evidence-candidate.d.ts +1 -2
- package/dist/boot/system-prompt-builder.d.ts +1 -1
- package/dist/boot/tui-project-spawn.d.ts +0 -1
- package/dist/boot/tui-session-resume-contracts.d.ts +95 -0
- package/dist/boot/tui-session-resume.d.ts +2 -88
- package/dist/boot/tui-settings-read.d.ts +3 -0
- package/dist/{boot-auto-thin-K2DHHYIW.js → boot-auto-thin-YMAZI3QL.js} +2 -2
- package/dist/boot-launch-choices.d.ts +22 -0
- package/dist/boot-provider-gate.d.ts +28 -0
- package/dist/boot-subcommand-dispatch.d.ts +24 -0
- package/dist/boot.d.ts +1 -1
- package/dist/chimera-cascade-evidence.d.ts +1 -1
- package/dist/{chunk-TI7KLHYX.js → chunk-2CMMWRQH.js} +81 -80
- package/dist/{chunk-3LEFXLAW.js → chunk-6SIUTX75.js} +36 -36
- package/dist/{chunk-RQ4UBKYH.js → chunk-6Z6C6ZHH.js} +3 -3
- package/dist/{chunk-5EA6OTLJ.js → chunk-AFOH6CHO.js} +2 -2
- package/dist/{chunk-WHEYHDIE.js → chunk-AKESWZH5.js} +2 -1
- package/dist/{chunk-JHUJUIOH.js → chunk-AT2A7RJZ.js} +4 -16
- package/dist/{chunk-U3SS4NRH.js → chunk-BHXAKTBE.js} +1 -1
- package/dist/{chunk-MPQCHBDJ.js → chunk-CJSHS2K7.js} +5 -1
- package/dist/{chunk-P3GRLV47.js → chunk-GZSKLXYG.js} +208 -141
- package/dist/{chunk-4MDRHMX4.js → chunk-KMU7GF7X.js} +3 -26
- package/dist/{chunk-SWOPJHXI.js → chunk-LDV4ERNV.js} +4 -4
- package/dist/{chunk-24C6VVLM.js → chunk-LDXXMPMS.js} +12 -12
- package/dist/{chunk-UQUYBDMG.js → chunk-M4G5FO7F.js} +1 -1
- package/dist/{chunk-5UZBUV2H.js → chunk-RKU66D2O.js} +6 -4
- package/dist/{chunk-PGNERAZL.js → chunk-RWNI5OWT.js} +2 -2
- package/dist/chunk-TGSPCFBT.js +1 -0
- package/dist/{cli-context-7HK67B2Z.js → cli-context-II57EHD2.js} +1554 -1450
- package/dist/cli-initial-tools.d.ts +54 -0
- package/dist/{cli-main-TQGLKB6D.js → cli-main-YR2WJCPL.js} +38062 -37035
- package/dist/cli-main-boot.d.ts +133 -0
- package/dist/cli-main-orchestration.d.ts +170 -0
- package/dist/cli-main-state.d.ts +19 -0
- package/dist/config-doctor.d.ts +1 -1
- package/dist/{config-transfer-UE37X4B5.js → config-transfer-VOIFY7U4.js} +2 -2
- package/dist/{execution-C2IECWF7.js → execution-IBAZ2EIU.js} +138 -124
- package/dist/fleet/host-director-setup.d.ts +41 -0
- package/dist/fleet/host-spawn-types.d.ts +17 -0
- package/dist/fleet/host.d.ts +2 -1
- package/dist/goal-host-prompts.d.ts +5 -0
- package/dist/goal-host-types.d.ts +94 -0
- package/dist/goal-host.d.ts +2 -91
- package/dist/{hq-KBFDKTDD.js → hq-5OIEKB4V.js} +5 -6
- package/dist/hq-server/handle-types.d.ts +1 -1
- package/dist/hq-server/routes/auth-handlers.d.ts +1 -1
- package/dist/hq-server/routes.d.ts +1 -13
- package/dist/hq-server/utils.d.ts +1 -1
- package/dist/{hq-server-AVNKZ2PV.js → hq-server-DU3ZH3X7.js} +3 -3
- package/dist/{hq-service-FGB7BY2D.js → hq-service-LYZV7EK7.js} +3 -3
- package/dist/index.js +4 -4
- package/dist/live-settings-input.d.ts +2 -0
- package/dist/mailbox-bridge-bootstrap.d.ts +1 -4
- package/dist/picker-effort.d.ts +32 -0
- package/dist/picker-model-picker.d.ts +13 -2
- package/dist/picker-provider-list.d.ts +66 -0
- package/dist/picker.d.ts +12 -12
- package/dist/{providers-models-O75MKLN2.js → providers-models-37DUV2GW.js} +247 -237
- package/dist/repl-suggestions.d.ts +0 -5
- package/dist/{sdd-runtime-PTOSPYI4.js → sdd-runtime-PF72WHLO.js} +3 -20
- package/dist/services/sdd/task-manager.d.ts +1 -12
- package/dist/services/sdd-runtime.d.ts +3 -4
- package/dist/services/statusline-config.d.ts +0 -2
- package/dist/settings-behavior-sections.d.ts +0 -1
- package/dist/short-circuit-flags-EXJBJ5GT.js +10 -0
- package/dist/{skill-suggest-L2EVWB6R.js → skill-suggest-THANK3LV.js} +1 -1
- package/dist/slash-commands/command-context.d.ts +2 -0
- package/dist/slash-commands/fallback-chain-view.d.ts +3 -0
- package/dist/slash-commands/fallback-ref-validation.d.ts +34 -0
- package/dist/slash-commands/goal-refiner.d.ts +10 -2
- package/dist/slash-commands/goals.d.ts +6 -0
- package/dist/slash-commands/kanban-task-completion.d.ts +17 -0
- package/dist/slash-commands/mcp.d.ts +0 -1
- package/dist/slash-commands/memory-purge-domain-terms.d.ts +5 -0
- package/dist/slash-commands/nextsteps-mode.d.ts +13 -0
- package/dist/slash-commands/session-live-status.d.ts +21 -0
- package/dist/slash-commands/session.d.ts +1 -1
- package/dist/slash-commands/settings-feature-ui-mutations.d.ts +8 -0
- package/dist/slash-commands/settings-hq-autonomy-mutations.d.ts +8 -0
- package/dist/slash-commands/settings-persist-deps.d.ts +10 -0
- package/dist/slash-commands/settings-runtime-mutations.d.ts +12 -0
- package/dist/slash-commands/shadow.d.ts +0 -1
- package/dist/slash-commands/tool-auto-thin-commands.d.ts +15 -0
- package/dist/subcommands/handlers/acp-agents.d.ts +9 -0
- package/dist/subcommands/handlers/acp-server.d.ts +7 -0
- package/dist/subcommands/handlers/hq.d.ts +0 -1
- package/dist/subcommands/handlers/providers-models-custom.d.ts +33 -0
- package/dist/subcommands/handlers/providers-models-visibility.d.ts +29 -0
- package/dist/subcommands/handlers/skill-suggest.d.ts +0 -2
- package/dist/{subcommands-CLI6QTLU.js → subcommands-DTKBXLPU.js} +2 -2
- package/dist/{update-J5WHAFPE.js → update-6OEPAEUV.js} +3 -3
- package/dist/utils/win32-cmd.d.ts +1 -1
- package/dist/{version-help-ATOKGMTK.js → version-help-JQGRPDJW.js} +2 -2
- package/dist/webui-server/host-settings.d.ts +17 -0
- package/dist/webui-server/http-bridge.d.ts +32 -0
- package/dist/webui-server/instance-registration.d.ts +19 -0
- package/dist/webui-server/kanban-services.d.ts +9 -0
- package/dist/webui-server/message-router.d.ts +14 -0
- package/dist/webui-server/prefs-seeding.d.ts +1 -2
- package/dist/webui-server/provider-config.d.ts +0 -1
- package/dist/webui-server/provider-plane.d.ts +14 -0
- package/dist/webui-server/session-agents.d.ts +18 -0
- package/dist/webui-server/session-start-live.d.ts +11 -0
- package/dist/webui-server/stream-coalescer.d.ts +1 -1
- package/dist/webui-server/transport.d.ts +12 -0
- package/dist/{webui-server-GQOVLQS3.js → webui-server-6IC3SLZG.js} +1600 -1435
- package/dist/webui-session-maintenance.d.ts +16 -0
- package/dist/wiring/brain-and-orchestration.d.ts +1 -1
- package/dist/wiring/cli-slash-commands-setup.d.ts +1 -0
- package/dist/wiring/command-host-state.d.ts +11 -2
- package/dist/wiring/dep-watcher-bridge.d.ts +8 -1
- package/dist/wiring/session-command-handlers.d.ts +2 -1
- package/dist/worktree-command-host.d.ts +31 -0
- package/package.json +30 -30
- package/dist/chunk-WHOIR577.js +0 -1
- package/dist/short-circuit-flags-D6VAG47Y.js +0 -10
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
normalizeHqPublicOrigin,
|
|
9
9
|
resolveAuditActor
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-AFOH6CHO.js";
|
|
11
11
|
import {
|
|
12
12
|
parseHqIpAllowlist
|
|
13
13
|
} from "./chunk-Q7E3BPDU.js";
|
|
@@ -316,7 +316,7 @@ var hqCmd = async (args, deps) => {
|
|
|
316
316
|
return hqAlertsCmd(args.slice(1), deps);
|
|
317
317
|
}
|
|
318
318
|
if (sub === "service") {
|
|
319
|
-
const { hqServiceCmd } = await import("./hq-service-
|
|
319
|
+
const { hqServiceCmd } = await import("./hq-service-LYZV7EK7.js");
|
|
320
320
|
return hqServiceCmd(args.slice(1), deps);
|
|
321
321
|
}
|
|
322
322
|
if (sub === "help" || sub === "--help") {
|
|
@@ -329,7 +329,7 @@ var hqCmd = async (args, deps) => {
|
|
|
329
329
|
return 1;
|
|
330
330
|
};
|
|
331
331
|
async function startServer(deps) {
|
|
332
|
-
const { startHqServer } = await import("./hq-server-
|
|
332
|
+
const { startHqServer } = await import("./hq-server-DU3ZH3X7.js");
|
|
333
333
|
const dataDir = resolveDataDir(deps);
|
|
334
334
|
const flags = deps.flags ?? {};
|
|
335
335
|
const rawPublicUrl = typeof flags["hq-public-url"] === "string" ? flags["hq-public-url"] : process.env.WRONGSTACK_HQ_PUBLIC_URL;
|
|
@@ -1007,7 +1007,6 @@ function printTokenHelp(deps) {
|
|
|
1007
1007
|
`);
|
|
1008
1008
|
}
|
|
1009
1009
|
export {
|
|
1010
|
-
hqCmd
|
|
1011
|
-
resolveAuditActor
|
|
1010
|
+
hqCmd
|
|
1012
1011
|
};
|
|
1013
|
-
//# sourceMappingURL=hq-
|
|
1012
|
+
//# sourceMappingURL=hq-5OIEKB4V.js.map
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* `subcommands/handlers/hq.ts`) can depend on the public types without
|
|
6
6
|
* pulling in the HQ server implementation. Breaks a long-standing type-only
|
|
7
7
|
* import edge `handlers/hq.ts → hq-server.ts` that participated in the
|
|
8
|
-
* 33-member CLI SCC (see docs/reports/modularity-assessment-2026-08-22.md).
|
|
8
|
+
* 33-member CLI SCC (see docs/archive/reports/modularity-assessment-2026-08-22.md).
|
|
9
9
|
*
|
|
10
10
|
* This module MUST contain no runtime imports.
|
|
11
11
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { callerCanAdministerAuth, type ApplyHqAuthFile, } from './auth/common.js';
|
|
2
2
|
export { handleApiAuthStatus, handleApiLogin, handleApiLogout, handleApiPassword, } from './auth/password-routes.js';
|
|
3
3
|
export { handleApiLoginVerify, handleApiTotpDisable, handleApiTotpEnable, handleApiTotpSetup, } from './auth/totp-routes.js';
|
|
4
4
|
export { handleApiBootstrap, handleApiTokenUpgrade, } from './auth/bootstrap-routes.js';
|
|
@@ -16,21 +16,12 @@ import * as HqServerAuth from './auth.js';
|
|
|
16
16
|
import type { HqMailboxGatewayHealth } from './mailbox-gateway-health.js';
|
|
17
17
|
import { type ApplyHqAuthFile } from './routes/auth-handlers.js';
|
|
18
18
|
import * as HqServerUtils from './utils.js';
|
|
19
|
-
export declare const setHqSecurityHeaders: typeof HqServerAuth.setHqSecurityHeaders;
|
|
20
19
|
export declare const hasTrustedBrowserOrigin: typeof HqServerAuth.hasTrustedBrowserOrigin;
|
|
21
20
|
export declare const authenticateBrowserRequest: typeof HqServerAuth.authenticateBrowserRequest;
|
|
22
21
|
export declare const isTokenAuth: typeof HqServerAuth.isTokenAuth;
|
|
23
22
|
export declare const isCookieAuth: typeof HqServerAuth.isCookieAuth;
|
|
24
|
-
export declare const hqAuthRequired: typeof HqServerAuth.hqAuthRequired;
|
|
25
|
-
export declare const setHqSessionCookie: typeof HqServerAuth.setHqSessionCookie;
|
|
26
|
-
export declare const clearHqSessionCookie: typeof HqServerAuth.clearHqSessionCookie;
|
|
27
|
-
export declare const serializeHqSessionCookie: typeof HqServerAuth.serializeHqSessionCookie;
|
|
28
23
|
export declare const parseHqSessionCookie: typeof HqServerAuth.parseHqSessionCookie;
|
|
29
|
-
export declare const parseCookieHeader: typeof HqServerAuth.parseCookieHeader;
|
|
30
|
-
export declare const HQ_SESSION_COOKIE = "hq.session";
|
|
31
24
|
export declare const decodePathSegment: typeof HqServerUtils.decodePathSegment;
|
|
32
|
-
export declare const readRequestBody: typeof HqServerUtils.readRequestBody;
|
|
33
|
-
export declare const writeInvalidBody: typeof HqServerUtils.writeInvalidBody;
|
|
34
25
|
export declare const sanitizeApiError: typeof HqServerUtils.sanitizeApiError;
|
|
35
26
|
export declare const buildHttpUrl: typeof HqServerUtils.buildHttpUrl;
|
|
36
27
|
export declare const buildBootstrapHttpUrl: typeof HqServerUtils.buildBootstrapHttpUrl;
|
|
@@ -38,12 +29,9 @@ export declare const buildClientWsUrl: typeof HqServerUtils.buildClientWsUrl;
|
|
|
38
29
|
export declare const agentRingKey: typeof HqServerUtils.agentRingKey;
|
|
39
30
|
export declare const agentMessageToEntry: typeof HqServerUtils.agentMessageToEntry;
|
|
40
31
|
export declare const readLocalSubagentTranscript: typeof HqServerUtils.readLocalSubagentTranscript;
|
|
41
|
-
export declare const lanIPv4Addresses: typeof HqServerUtils.lanIPv4Addresses;
|
|
42
|
-
export declare const hqRuntimeMarkerPath: typeof HqServerUtils.hqRuntimeMarkerPath;
|
|
43
32
|
import type { HqIpAllowlist } from './ip-allowlist.js';
|
|
44
33
|
import type { LoginAttemptStore } from './login-attempt-store.js';
|
|
45
|
-
import type { ConnectedClient, HqRouterMutableAuth, HqSessionEntry,
|
|
46
|
-
export type { ConnectedClient, HqSnapshotBroadcaster, ProjectDetail, TranscriptRing };
|
|
34
|
+
import type { ConnectedClient, HqRouterMutableAuth, HqSessionEntry, TranscriptRing } from './types.js';
|
|
47
35
|
export interface HqRouterMailboxGateway {
|
|
48
36
|
mailbox: Mailbox;
|
|
49
37
|
router: ReturnType<typeof createMailboxHttpRouter>;
|
|
@@ -125,5 +125,5 @@ export declare function recordTimeseriesSignal(persistence: HqPersistence, event
|
|
|
125
125
|
* it and forwarded `String(err)` verbatim instead. One implementation now
|
|
126
126
|
* serves every server surface.
|
|
127
127
|
*/
|
|
128
|
-
export { sanitizeApiError
|
|
128
|
+
export { sanitizeApiError } from '@wrongstack/core/security';
|
|
129
129
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -10,9 +10,9 @@ import {
|
|
|
10
10
|
readLocalSubagentTranscript,
|
|
11
11
|
sanitizeApiError,
|
|
12
12
|
startHqServer
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-6Z6C6ZHH.js";
|
|
14
14
|
import "./chunk-HXJYHAR4.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-AFOH6CHO.js";
|
|
16
16
|
import "./chunk-Q7E3BPDU.js";
|
|
17
17
|
export {
|
|
18
18
|
DEFAULT_HOST,
|
|
@@ -27,4 +27,4 @@ export {
|
|
|
27
27
|
sanitizeApiError,
|
|
28
28
|
startHqServer
|
|
29
29
|
};
|
|
30
|
-
//# sourceMappingURL=hq-server-
|
|
30
|
+
//# sourceMappingURL=hq-server-DU3ZH3X7.js.map
|
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
detectUpdatePackageManager,
|
|
6
6
|
detectUpdatePackageName
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-RWNI5OWT.js";
|
|
8
|
+
import "./chunk-BHXAKTBE.js";
|
|
9
9
|
import "./chunk-DIOODAYM.js";
|
|
10
10
|
import "./chunk-F5DCFAKI.js";
|
|
11
11
|
|
|
@@ -511,4 +511,4 @@ export {
|
|
|
511
511
|
hqServiceCmd,
|
|
512
512
|
renderHqServiceAssets
|
|
513
513
|
};
|
|
514
|
-
//# sourceMappingURL=hq-service-
|
|
514
|
+
//# sourceMappingURL=hq-service-LYZV7EK7.js.map
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
} from "./chunk-WTJDSTYD.js";
|
|
6
6
|
import {
|
|
7
7
|
parseArgs
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-CJSHS2K7.js";
|
|
9
9
|
import {
|
|
10
10
|
CLI_VERSION
|
|
11
11
|
} from "./chunk-F5DCFAKI.js";
|
|
@@ -121,7 +121,7 @@ async function main(argv) {
|
|
|
121
121
|
applyAsciiMode(earlyFlags);
|
|
122
122
|
}
|
|
123
123
|
if (earlyFlags["help"] === true || earlyFlags["version"] === true) {
|
|
124
|
-
const { handleHelpVersionShortCircuit } = await import("./short-circuit-flags-
|
|
124
|
+
const { handleHelpVersionShortCircuit } = await import("./short-circuit-flags-EXJBJ5GT.js");
|
|
125
125
|
const earlyExit = await handleHelpVersionShortCircuit(argv);
|
|
126
126
|
if (earlyExit !== null) return earlyExit;
|
|
127
127
|
}
|
|
@@ -130,7 +130,7 @@ async function main(argv) {
|
|
|
130
130
|
shouldCaptureTuiStartup(parsed.flags, parsed.positional)
|
|
131
131
|
);
|
|
132
132
|
try {
|
|
133
|
-
const { initializeCli } = await import("./cli-context-
|
|
133
|
+
const { initializeCli } = await import("./cli-context-II57EHD2.js");
|
|
134
134
|
const cliCtx = await initializeCli(argv, {
|
|
135
135
|
onNonTuiLaunch: () => startupOutput.stop()
|
|
136
136
|
});
|
|
@@ -140,7 +140,7 @@ async function main(argv) {
|
|
|
140
140
|
} else {
|
|
141
141
|
startupOutput.stop();
|
|
142
142
|
}
|
|
143
|
-
const { runInteractive } = await import("./cli-main-
|
|
143
|
+
const { runInteractive } = await import("./cli-main-YR2WJCPL.js");
|
|
144
144
|
return await runInteractive(cliCtx);
|
|
145
145
|
} finally {
|
|
146
146
|
startupOutput.stop();
|
|
@@ -105,6 +105,8 @@ export interface LiveSettingsInput {
|
|
|
105
105
|
* `tools.nextsteps.enabled`; read at boot, so it applies next session.
|
|
106
106
|
*/
|
|
107
107
|
nextStepsTool?: boolean | undefined;
|
|
108
|
+
/** Persisted as `autonomy.nextSteps` ('required' when true). Read live. */
|
|
109
|
+
nextStepsRequired?: boolean | undefined;
|
|
108
110
|
/** Minimum relation strength for SAGE memory injection. Default: 0.85. */
|
|
109
111
|
sageMemoryInjectThreshold?: number | undefined;
|
|
110
112
|
/**
|
|
@@ -22,8 +22,6 @@
|
|
|
22
22
|
* log a warning, REPL runs without mailbox-bridge. The user
|
|
23
23
|
* can run `wstack mailbox serve` manually later.
|
|
24
24
|
*/
|
|
25
|
-
import { type MailboxBridgeLock, readLiveLock } from '@wrongstack/core/coordination';
|
|
26
|
-
export declare const MAILBOX_BRIDGE_HEALTHZ_PROBE_MS = 500;
|
|
27
25
|
export interface MailboxBridgeHandle {
|
|
28
26
|
/** Bound URL — empty string if we couldn't bring the bridge up. */
|
|
29
27
|
url: string;
|
|
@@ -99,6 +97,5 @@ export type ProbeFn = (url: string, timeoutMs: number) => Promise<boolean>;
|
|
|
99
97
|
* that prefer to log a warning over crashing the host process.
|
|
100
98
|
*/
|
|
101
99
|
export declare function tryAcquireMailboxBridge(opts: BootstrapOptions): Promise<MailboxBridgeHandle>;
|
|
102
|
-
export {
|
|
103
|
-
export declare function readTokenFromFile(tokenPath: string): Promise<string | null>;
|
|
100
|
+
export {};
|
|
104
101
|
//# sourceMappingURL=mailbox-bridge-bootstrap.d.ts.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reasoning-effort strip for the STARTUP model picker — the pre-TUI twin of
|
|
3
|
+
* the `/model` picker's ←/→ strip (tui/components/model-picker-effort.ts).
|
|
4
|
+
*
|
|
5
|
+
* The vocabulary is model-aware the same way: a model whose catalog entry
|
|
6
|
+
* documents its levels offers only those, an undocumented reasoner offers the
|
|
7
|
+
* full canonical set (the runtime resolver drops what the wire cannot carry),
|
|
8
|
+
* and a non-reasoning model — or one documented as having no effort control —
|
|
9
|
+
* offers nothing. The list is always led by {@link EFFORT_KEEP}, so pressing
|
|
10
|
+
* Enter without touching ←/→ keeps the configured effort exactly as before.
|
|
11
|
+
*/
|
|
12
|
+
import { type ModelsDevModel, type ReasoningEffort } from '@wrongstack/core/types';
|
|
13
|
+
/** Sentinel first option: leave the persisted reasoning effort untouched. */
|
|
14
|
+
export declare const EFFORT_KEEP = "default";
|
|
15
|
+
export type StartupEffortChoice = typeof EFFORT_KEEP | ReasoningEffort;
|
|
16
|
+
/** Effort choices for one model, weakest → strongest, led by `default`. */
|
|
17
|
+
export declare function startupEffortOptions(model: Pick<ModelsDevModel, 'reasoning' | 'reasoningConfig'> | undefined): readonly StartupEffortChoice[];
|
|
18
|
+
/** Cycle the current choice by `delta`, wrapping around the list. */
|
|
19
|
+
export declare function cycleStartupEffort(options: readonly StartupEffortChoice[], current: string, delta: number): StartupEffortChoice;
|
|
20
|
+
/**
|
|
21
|
+
* Tri-state effort vocabulary for the settings field-24 gate (the ←/→ cycle
|
|
22
|
+
* in the settings picker): `undefined` — undocumented reasoner, the cycle
|
|
23
|
+
* keeps the full canonical set; `[]` — the model documents
|
|
24
|
+
* `effortSupported === false` (no effort control at all; the runtime resolver
|
|
25
|
+
* drops any effort, so the cycle must go inert); otherwise the documented
|
|
26
|
+
* levels. Mirrors {@link startupEffortOptions}'s tri-state handling.
|
|
27
|
+
*/
|
|
28
|
+
export declare function reasoningEffortVocabulary(rc: {
|
|
29
|
+
effortSupported?: boolean | undefined;
|
|
30
|
+
effortLevels?: readonly string[] | undefined;
|
|
31
|
+
} | undefined): string[] | undefined;
|
|
32
|
+
//# sourceMappingURL=picker-effort.d.ts.map
|
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
import type { ModelsDevModel, ResolvedProvider } from '@wrongstack/core/types';
|
|
2
|
+
import { type StartupEffortChoice } from './picker-effort.js';
|
|
2
3
|
export declare const LIVE_PICKER_MAX_VISIBLE = 15;
|
|
3
4
|
export declare function filterModels(query: string, models: ModelsDevModel[]): ModelsDevModel[];
|
|
4
|
-
|
|
5
|
-
export
|
|
5
|
+
/** Effort strip state for the focused row; omitted → no strip line at all. */
|
|
6
|
+
export interface LiveModelEffortStrip {
|
|
7
|
+
options: readonly StartupEffortChoice[];
|
|
8
|
+
choice: StartupEffortChoice;
|
|
9
|
+
}
|
|
10
|
+
export interface LiveModelPick {
|
|
11
|
+
model: ModelsDevModel;
|
|
12
|
+
/** {@link EFFORT_KEEP} when the user left the configured effort alone. */
|
|
13
|
+
effort: StartupEffortChoice;
|
|
14
|
+
}
|
|
15
|
+
export declare function renderLiveModelList(query: string, filtered: ModelsDevModel[], selectedIdx: number, header: string, effort?: LiveModelEffortStrip): string;
|
|
16
|
+
export declare function runLiveModelPicker(provider: ResolvedProvider, defaultModel?: string): Promise<LiveModelPick | undefined>;
|
|
6
17
|
//# sourceMappingURL=picker-model-picker.d.ts.map
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { ResolvedProvider } from '@wrongstack/core/types';
|
|
2
|
+
/**
|
|
3
|
+
* Filter providers by a free-text query: case-insensitive substring match
|
|
4
|
+
* against the provider id OR display name. An empty/whitespace query returns
|
|
5
|
+
* all providers (as a copy). Input order is preserved. Powers the live
|
|
6
|
+
* type-to-filter provider picker.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Append synthetic entries for the built-in local-server presets
|
|
10
|
+
* (OmniRoute / Ollama / vLLM / LM Studio) that aren't already present in
|
|
11
|
+
* the merged list. These are keyless loopback gateways, so they pass the
|
|
12
|
+
* `isKeylessLocalProvider` filter and become immediately selectable even
|
|
13
|
+
* on a fresh install with no config and no catalog entry — mirroring the
|
|
14
|
+
* `wstack auth local` shortcut. An entry is skipped when an id-match
|
|
15
|
+
* already exists (catalog or saved config), so a user's customized
|
|
16
|
+
* provider always wins over the preset default. Mutates and returns
|
|
17
|
+
* `merged` for call-site convenience. Pure aside from the push.
|
|
18
|
+
*/
|
|
19
|
+
export declare function appendLocalPresetProviders(merged: ResolvedProvider[]): ResolvedProvider[];
|
|
20
|
+
export declare function filterProviders(query: string, providers: ResolvedProvider[]): ResolvedProvider[];
|
|
21
|
+
/** Preferred family display order; remaining families follow in insertion order. */
|
|
22
|
+
export declare const PROVIDER_FAMILY_PREFERRED_ORDER: string[];
|
|
23
|
+
/**
|
|
24
|
+
* Order providers for display: grouped by wire family in preferred order, then
|
|
25
|
+
* alphabetical by id within each family. Pure. Shared by the live render and
|
|
26
|
+
* the raw-stdin loop so the selection index and the rendered cursor always
|
|
27
|
+
* refer to the same provider.
|
|
28
|
+
*/
|
|
29
|
+
export declare function orderProvidersForDisplay(filtered: ResolvedProvider[]): ResolvedProvider[];
|
|
30
|
+
/**
|
|
31
|
+
* Render the live type-to-filter provider view as one string: the query line,
|
|
32
|
+
* providers grouped by wire family (preferred order, alphabetical within each
|
|
33
|
+
* family), the selected provider marked with ▶, and a key hint. Capped to
|
|
34
|
+
* LIVE_PICKER_MAX_VISIBLE rows so a frame always fits the viewport (the raw
|
|
35
|
+
* loop redraws by moving the cursor up and clearing). Pure.
|
|
36
|
+
*/
|
|
37
|
+
export declare function renderLiveProviderList(query: string, filtered: ResolvedProvider[], selectedIdx: number, savedSet?: Set<string>): string;
|
|
38
|
+
/**
|
|
39
|
+
* Interactive provider + model picker. Lists supported providers grouped
|
|
40
|
+
* by wire family — by default only those with an API key (env or stored
|
|
41
|
+
* config), so you see only what you can actually launch into. Falls back
|
|
42
|
+
* to the full catalog when no keys are found anywhere.
|
|
43
|
+
*
|
|
44
|
+
* When `defaultProvider`/`defaultModel` are passed, they're pre-selected
|
|
45
|
+
* so the user can press Enter to accept the previous choice.
|
|
46
|
+
*/
|
|
47
|
+
/**
|
|
48
|
+
* Live type-to-filter provider picker (TTY only). Takes over stdin in raw mode
|
|
49
|
+
* and redraws the filtered, family-grouped list on every keystroke. Thin I/O
|
|
50
|
+
* shell around the pure filterProviders / applyPickerKey / renderLiveProviderList
|
|
51
|
+
* helpers (which are fully unit-tested). Returns the chosen provider, or
|
|
52
|
+
* undefined on cancel. runPicker only calls this when stdin is a TTY; non-TTY
|
|
53
|
+
* callers (CI, piped input, tests) fall through to the numbered readLine picker.
|
|
54
|
+
*/
|
|
55
|
+
export declare const QUERY_MARKER = "Select provider:";
|
|
56
|
+
/**
|
|
57
|
+
* Park the terminal cursor at the end of the live query text inside the
|
|
58
|
+
* boxed frame. The frame is multi-line with a border, so we (1) find which
|
|
59
|
+
* physical line holds the query, (2) move up from the last line to it, then
|
|
60
|
+
* (3) move to the visible column just after the typed query. Visible width
|
|
61
|
+
* is measured with stripAnsi so the box border + accent colors don't offset
|
|
62
|
+
* the cursor.
|
|
63
|
+
*/
|
|
64
|
+
export declare function cursorToQuery(frame: string, query: string): void;
|
|
65
|
+
export declare function runLiveProviderPicker(displayList: ResolvedProvider[], savedSet?: Set<string>): Promise<ResolvedProvider | undefined>;
|
|
66
|
+
//# sourceMappingURL=picker-provider-list.d.ts.map
|
package/dist/picker.d.ts
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import type { Config, ModelsRegistry,
|
|
1
|
+
import type { Config, ModelsRegistry, ReasoningEffort } from '@wrongstack/core/types';
|
|
2
2
|
import type { ReadlineInputReader } from './input-reader.js';
|
|
3
3
|
import type { TerminalRenderer } from './renderer.js';
|
|
4
4
|
export { applyPickerKey, type ProviderPickerState } from './picker-key-state.js';
|
|
5
5
|
export { filterModels, LIVE_PICKER_MAX_VISIBLE, renderLiveModelList, } from './picker-model-picker.js';
|
|
6
|
+
export { filterProviders, renderLiveProviderList, runLiveProviderPicker, } from './picker-provider-list.js';
|
|
6
7
|
export { codexPickerPreamble } from './picker-ui.js';
|
|
7
|
-
export declare function filterProviders(query: string, providers: ResolvedProvider[]): ResolvedProvider[];
|
|
8
|
-
/**
|
|
9
|
-
* Render the live type-to-filter provider view as one string: the query line,
|
|
10
|
-
* providers grouped by wire family (preferred order, alphabetical within each
|
|
11
|
-
* family), the selected provider marked with ▶, and a key hint. Capped to
|
|
12
|
-
* LIVE_PICKER_MAX_VISIBLE rows so a frame always fits the viewport (the raw
|
|
13
|
-
* loop redraws by moving the cursor up and clearing). Pure.
|
|
14
|
-
*/
|
|
15
|
-
export declare function renderLiveProviderList(query: string, filtered: ResolvedProvider[], selectedIdx: number, savedSet?: Set<string>): string;
|
|
16
8
|
/**
|
|
17
9
|
* Save provider + model to the global config file.
|
|
18
10
|
* Creates backups + history entries before writing.
|
|
19
11
|
* Returns true if saved successfully.
|
|
20
12
|
*/
|
|
21
|
-
export declare function saveToGlobalConfig(configPath: string, provider: string, model: string,
|
|
13
|
+
export declare function saveToGlobalConfig(configPath: string, provider: string, model: string, options?: {
|
|
14
|
+
/** Written to `modelRuntime.reasoning.effort` — the key `/effort` and the settings panel own. */
|
|
15
|
+
effort?: ReasoningEffort | undefined;
|
|
16
|
+
homeFn?: (() => string) | undefined;
|
|
17
|
+
}): Promise<boolean>;
|
|
22
18
|
export interface PickerResult {
|
|
23
19
|
provider: string;
|
|
24
20
|
model: string;
|
|
21
|
+
/**
|
|
22
|
+
* Reasoning effort chosen on the model's ←/→ strip. Absent when the user
|
|
23
|
+
* kept `default` (or the model has no strip) — the configured effort stays.
|
|
24
|
+
*/
|
|
25
|
+
effort?: ReasoningEffort | undefined;
|
|
25
26
|
}
|
|
26
|
-
export declare function runLiveProviderPicker(displayList: ResolvedProvider[], savedSet?: Set<string>): Promise<ResolvedProvider | undefined>;
|
|
27
27
|
export declare function runPicker(deps: {
|
|
28
28
|
modelsRegistry: ModelsRegistry;
|
|
29
29
|
renderer: TerminalRenderer;
|