@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,57 @@
|
|
|
1
|
+
export declare function runWebuiServerLifecycle({ host, httpPort, setupEvents, opts, wsPort, accessUrl, wsToken, webuiInstanceRegistered, wss, httpServer, requireToken, publicHostnames, publicWsUrl, clients, currentSessionId, goalHandler, specsHandler, sddBoardHandler, sddWizardHandler, worktreeHandler, terminalHandler, rateLimitMax, send, sessionPayload, handleMessage, pendingConfirms, buildSessionStartPayload, sessionAgents, lifecycleState, abortControllers, flushAllStreamBuffers, eventUnsubscribers, releaseSessionSalvage, autoWakeHost, stopEmptySessionCleanup, credentialWatcherClose, kanbanRunMirror, kanbanSupervisor, stopKanbanSupervisorMemoryStats, unregisterWebuiClient, ipv6LoopbackServer, registryBaseDir, stopLiveStatusLogger, terminalLogView, }: {
|
|
2
|
+
host: string;
|
|
3
|
+
httpPort: number;
|
|
4
|
+
setupEvents: () => void;
|
|
5
|
+
opts: import('./webui-server-options.js').CliWebUIOptions;
|
|
6
|
+
wsPort: number;
|
|
7
|
+
accessUrl: string;
|
|
8
|
+
wsToken: string;
|
|
9
|
+
webuiInstanceRegistered: boolean;
|
|
10
|
+
wss: import('ws').Server<typeof import('ws').default, typeof import('http').IncomingMessage>;
|
|
11
|
+
httpServer: import('@wrongstack/webui-server').StaticServeHandle | null;
|
|
12
|
+
requireToken: boolean;
|
|
13
|
+
publicHostnames: string[];
|
|
14
|
+
publicWsUrl: string | undefined;
|
|
15
|
+
clients: Map<import('ws').default, import('./webui-server/connection-handler.js').ConnectedClient>;
|
|
16
|
+
currentSessionId: () => string;
|
|
17
|
+
goalHandler: import('@wrongstack/webui-server').GoalWebSocketHandler;
|
|
18
|
+
specsHandler: import('@wrongstack/webui-server').SpecsWebSocketHandler;
|
|
19
|
+
sddBoardHandler: import('@wrongstack/webui-server').SddBoardWebSocketHandler;
|
|
20
|
+
sddWizardHandler: import('@wrongstack/webui-server').SddWizardWebSocketHandler | null;
|
|
21
|
+
worktreeHandler: import('@wrongstack/webui-server').WorktreeWebSocketHandler;
|
|
22
|
+
terminalHandler: import('@wrongstack/webui-server').TerminalWebSocketHandler;
|
|
23
|
+
rateLimitMax: number;
|
|
24
|
+
send: (ws: import('ws').default, msg: import('./webui-server/contracts.js').WSServerMessage) => void;
|
|
25
|
+
sessionPayload: <T extends Record<string, unknown>>(payload: T) => T & {
|
|
26
|
+
sessionId: string;
|
|
27
|
+
};
|
|
28
|
+
handleMessage: import('@wrongstack/webui-server').EmbeddedMessageRouter;
|
|
29
|
+
pendingConfirms: Map<string, import('@wrongstack/webui-server').PendingConfirm>;
|
|
30
|
+
buildSessionStartPayload: import('./webui-server/session-start-payload.js').BuildSessionStartPayload;
|
|
31
|
+
sessionAgents: import('@wrongstack/webui-server').SessionAgentRegistry;
|
|
32
|
+
lifecycleState: {
|
|
33
|
+
signalShutdown: (() => void) | undefined;
|
|
34
|
+
embeddedAutoHealDispose: (() => void | Promise<void>) | null;
|
|
35
|
+
};
|
|
36
|
+
abortControllers: Map<string, AbortController>;
|
|
37
|
+
flushAllStreamBuffers: () => void;
|
|
38
|
+
eventUnsubscribers: (() => void)[];
|
|
39
|
+
releaseSessionSalvage: () => void;
|
|
40
|
+
autoWakeHost: import('@wrongstack/webui-server').WebuiLeaderAutoWakeHost | undefined;
|
|
41
|
+
stopEmptySessionCleanup: {
|
|
42
|
+
dispose: () => Promise<void>;
|
|
43
|
+
runNow: () => Promise<unknown>;
|
|
44
|
+
} | null;
|
|
45
|
+
credentialWatcherClose: (() => void) | undefined;
|
|
46
|
+
kanbanRunMirror: import('@wrongstack/webui-server').KanbanRunMirror | null;
|
|
47
|
+
kanbanSupervisor: import('@wrongstack/webui-server').KanbanSupervisor | null;
|
|
48
|
+
stopKanbanSupervisorMemoryStats: (() => Promise<void>) | undefined;
|
|
49
|
+
unregisterWebuiClient: () => void;
|
|
50
|
+
ipv6LoopbackServer: import('http').Server<typeof import('http').IncomingMessage, typeof import('http').ServerResponse> | null;
|
|
51
|
+
registryBaseDir: string;
|
|
52
|
+
stopLiveStatusLogger: () => void;
|
|
53
|
+
terminalLogView: import('@wrongstack/webui-server').TerminalDashboard;
|
|
54
|
+
}): {
|
|
55
|
+
stopped: Promise<void>;
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=webui-server-lifecycle.d.ts.map
|
|
@@ -69,6 +69,16 @@ export interface CliWebUIOptions {
|
|
|
69
69
|
* stopping one must never reach into another's fleet.
|
|
70
70
|
*/
|
|
71
71
|
stopSessionFleet?: ((sessionId: string) => void | Promise<void>) | undefined;
|
|
72
|
+
/**
|
|
73
|
+
* The host's interrupt seam. HQ addresses the root conversation through the
|
|
74
|
+
* CLI host's own publisher, whose "abort leader" calls `abortLeader()`; the
|
|
75
|
+
* embedded server binds it to that conversation's run controller.
|
|
76
|
+
*/
|
|
77
|
+
interruptController?: {
|
|
78
|
+
abortLeader: () => boolean;
|
|
79
|
+
} | undefined;
|
|
80
|
+
/** HQ fleet commands for a tab's session (abort fleet / agent, spawn). */
|
|
81
|
+
hqFleetControl?: import('./hq-fleet-control.js').HqFleetControl | undefined;
|
|
72
82
|
/**
|
|
73
83
|
* A tab was closed: release the host-side helpers pinned to its
|
|
74
84
|
* conversation (explore companion, shadow-review bookkeeping).
|
package/dist/webui-server.d.ts
CHANGED
|
@@ -1,17 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CLI embedded WebUI server — the backend behind `wrongstack --webui`.
|
|
3
|
-
*
|
|
4
|
-
* `runWebUI(opts)` boots a WebSocket bridge (and, when the webui package
|
|
5
|
-
* is built, the static HTTP frontend) over the *same* agent/events/
|
|
6
|
-
* session instances the REPL and eternal-autonomy loop use, then routes
|
|
7
|
-
* browser messages through a `handleMessage` switch.
|
|
8
|
-
*
|
|
9
|
-
* Most self-contained concerns live under `webui-server/*`; this file now
|
|
10
|
-
* assembles CLI-owned instances, route contexts, WebSocket lifecycle, and the
|
|
11
|
-
* embedded shared router.
|
|
12
|
-
*
|
|
13
|
-
* Public surface: `runWebUI` plus WS message shapes.
|
|
14
|
-
*/
|
|
15
1
|
import type { WSClientMessage as EmbeddedWSClientMessage, WSServerMessage as EmbeddedWSServerMessage } from './webui-server/contracts.js';
|
|
16
2
|
import type { CliWebUIOptions } from './webui-server-options.js';
|
|
17
3
|
export type WSClientMessage = EmbeddedWSClientMessage;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BrainDecisionQueue, type BrainEscalationMode, ObservableBrainArbiter } from '@wrongstack/core/coordination';
|
|
2
2
|
import { type BrainAutoRisk, type BrainRuntime } from '@wrongstack/core/execution';
|
|
3
3
|
import type { ToolRegistry } from '@wrongstack/core/registry';
|
|
4
|
-
import { type Config, type Provider, type SecretVault, type SessionWriter } from '@wrongstack/core/types';
|
|
4
|
+
import { type Config, type Provider, type SecretVault, type SessionWriter, type Tracer } from '@wrongstack/core/types';
|
|
5
5
|
import { MultiAgentHost } from '../multi-agent.js';
|
|
6
6
|
type AnyObj = any;
|
|
7
7
|
/**
|
|
@@ -21,6 +21,8 @@ interface BrainRuntimeSettings {
|
|
|
21
21
|
readonly ledgerPath?: string | undefined;
|
|
22
22
|
}
|
|
23
23
|
interface BrainOrchestrationDeps {
|
|
24
|
+
/** OTLP tracer; subagent runs nest under the leader turn that spawned them. */
|
|
25
|
+
tracer?: Tracer | undefined;
|
|
24
26
|
events: AnyObj;
|
|
25
27
|
config: Config;
|
|
26
28
|
/** Secret vault for the global-config persist path of Brain settings. */
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ToolRegistry } from '@wrongstack/core/registry';
|
|
2
2
|
import type { VectorMemoryStore } from '@wrongstack/vector-memory';
|
|
3
|
+
import { type ToolRestriction } from '../boot/tool-restriction-flags.js';
|
|
3
4
|
type AnyObj = any;
|
|
4
5
|
export declare function setupCliPromptAndTools(params: {
|
|
5
6
|
container: AnyObj;
|
|
@@ -28,6 +29,14 @@ export declare function setupCliPromptAndTools(params: {
|
|
|
28
29
|
* Omit (or pass `undefined`) to keep the CLI on the SAGE-only surface.
|
|
29
30
|
*/
|
|
30
31
|
vectorMemoryStore?: VectorMemoryStore | undefined;
|
|
32
|
+
/** Resolved `--append-system-prompt[-file]` text, appended to the host prompt. */
|
|
33
|
+
appendedInstructions?: string | undefined;
|
|
34
|
+
/** `--only-tools` / `--disallowed-tools`, already validated at boot. */
|
|
35
|
+
toolRestriction?: ToolRestriction | undefined;
|
|
36
|
+
/** Where to warn about restriction names that match no tool. */
|
|
37
|
+
warn?: ((message: string) => void) | undefined;
|
|
38
|
+
/** `--safe-mode`: no skills, no instruction override files. */
|
|
39
|
+
safeMode?: boolean | undefined;
|
|
31
40
|
}): Promise<{
|
|
32
41
|
toolRegistry: ToolRegistry;
|
|
33
42
|
}>;
|
|
@@ -110,6 +110,7 @@ export declare function setupCliSlashCommands(params: {
|
|
|
110
110
|
onGoalStart: NonNullable<B['onGoalStart']>;
|
|
111
111
|
onGoalPause: NonNullable<B['onGoalPause']>;
|
|
112
112
|
onGoalResume: NonNullable<B['onGoalResume']>;
|
|
113
|
+
onGoalResumeFromGraph: NonNullable<B['onGoalResumeFromGraph']>;
|
|
113
114
|
onGoalStop: NonNullable<B['onGoalStop']>;
|
|
114
115
|
getGoalRunner: NonNullable<B['getGoalRunner']>;
|
|
115
116
|
onGoalMoveTask: NonNullable<B['onGoalMoveTask']>;
|
|
@@ -15,6 +15,8 @@ interface CommandHostStateInput {
|
|
|
15
15
|
setConfig: (config: Config) => void;
|
|
16
16
|
getDirector: () => Director | null;
|
|
17
17
|
hqCommandController: HqCommandController;
|
|
18
|
+
/** Several conversations share the Director (WebUI host): see `HqFleetScope`. */
|
|
19
|
+
hqMultiConversation?: boolean | undefined;
|
|
18
20
|
multiAgentHost: MultiAgentHost;
|
|
19
21
|
events: EventBus;
|
|
20
22
|
sessionRef: {
|
|
@@ -36,6 +36,18 @@ interface SetupHqTelemetryDeps {
|
|
|
36
36
|
*/
|
|
37
37
|
approvalMirror?: ApprovalMirrorRef | undefined;
|
|
38
38
|
mcpRegistry: Pick<MCPRegistry, 'onOperation' | 'operationalHealth'>;
|
|
39
|
+
/**
|
|
40
|
+
* The LIVE conversation writer. An in-process `/resume` and an in-place
|
|
41
|
+
* project switch replace `ctx.session`; `session` above is only the boot
|
|
42
|
+
* writer. Defaults to it for hosts that never swap.
|
|
43
|
+
*/
|
|
44
|
+
liveSession?: (() => SessionWriter) | undefined;
|
|
45
|
+
/** The LIVE project root (an in-place project switch re-roots the process). */
|
|
46
|
+
liveProjectRoot?: (() => string) | undefined;
|
|
47
|
+
/** How often the live session/project is compared to what HQ is bound to. */
|
|
48
|
+
scopeCheckIntervalMs?: number | undefined;
|
|
49
|
+
/** The LIVE app config, so `/hq` changes re-point the running connection. */
|
|
50
|
+
getConfig?: (() => Config) | undefined;
|
|
39
51
|
}
|
|
40
52
|
interface HqTelemetryResult {
|
|
41
53
|
hqCommandController: HqCommandController;
|
|
@@ -2,8 +2,8 @@ import { type RemoteMailbox } from '@wrongstack/core/coordination';
|
|
|
2
2
|
import { HookRegistry, HookRunner } from '@wrongstack/core/hooks';
|
|
3
3
|
import type { PluginHostHandle } from '@wrongstack/core/plugin';
|
|
4
4
|
import { type ProviderAuthRegistry, type ProviderRegistry, SlashCommandRegistry, type ToolRegistry } from '@wrongstack/core/registry';
|
|
5
|
-
import type { Config, HealthRegistry, Logger, MetricsRuntimeStatus, ModelsRegistry, PromptLoader, Provider, ProviderConfig, SecretVault, SessionWriter, SkillLoader } from '@wrongstack/core/types';
|
|
6
|
-
import type
|
|
5
|
+
import type { Config, HealthRegistry, Logger, MetricsRuntimeStatus, ModelsRegistry, PromptLoader, Provider, ProviderConfig, SecretVault, SessionWriter, SkillLoader, Tracer } from '@wrongstack/core/types';
|
|
6
|
+
import { type WstackPaths } from '@wrongstack/core/utils';
|
|
7
7
|
import { MCPRegistry } from '@wrongstack/mcp';
|
|
8
8
|
import type { EventWiring } from '../boot/event-wiring.js';
|
|
9
9
|
import type { MaxContextBranch } from '../context-limit.js';
|
|
@@ -36,6 +36,8 @@ interface LifecyclePluginsDeps {
|
|
|
36
36
|
vault: SecretVault;
|
|
37
37
|
metricsSink: any;
|
|
38
38
|
metricsStatus?: MetricsRuntimeStatus | undefined;
|
|
39
|
+
/** OTLP tracer for the leader's turns, provider and tool calls. */
|
|
40
|
+
tracer?: Tracer | undefined;
|
|
39
41
|
renderer: any;
|
|
40
42
|
buildProviderForIdRuntime: any;
|
|
41
43
|
}
|
package/dist/wiring/metrics.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { EventBus } from '@wrongstack/core/kernel';
|
|
2
2
|
import { type MetricsServerHandle } from '@wrongstack/core/observability';
|
|
3
|
-
import type { HealthRegistry, MetricsRuntimeStatus, MetricsSink } from '@wrongstack/core/types';
|
|
3
|
+
import type { HealthRegistry, MetricsRuntimeStatus, MetricsSink, ObservabilityConfig, Tracer } from '@wrongstack/core/types';
|
|
4
4
|
import { type WstackPaths } from '@wrongstack/core/utils';
|
|
5
5
|
import type { MCPRegistry, MCPServerOperationalHealth } from '@wrongstack/mcp';
|
|
6
6
|
interface MetricsWiringDeps {
|
|
@@ -15,12 +15,20 @@ interface MetricsWiringDeps {
|
|
|
15
15
|
provider: string;
|
|
16
16
|
model: string;
|
|
17
17
|
};
|
|
18
|
+
/** `observability.otlp` export; its tracer comes back in the result. */
|
|
19
|
+
observability?: {
|
|
20
|
+
config: ObservabilityConfig | undefined;
|
|
21
|
+
serviceVersion: string;
|
|
22
|
+
teardownHandlers: Array<() => void>;
|
|
23
|
+
} | undefined;
|
|
18
24
|
}
|
|
19
25
|
interface MetricsWiringResult {
|
|
20
26
|
metricsSink: MetricsSink | undefined;
|
|
21
27
|
healthRegistry: HealthRegistry | undefined;
|
|
22
28
|
metricsServerHandle: MetricsServerHandle | undefined;
|
|
23
29
|
metricsStatus: MetricsRuntimeStatus;
|
|
30
|
+
/** OTLP tracer when `observability.otlp` export is on. */
|
|
31
|
+
tracer?: Tracer | undefined;
|
|
24
32
|
dispose?: (() => void) | undefined;
|
|
25
33
|
}
|
|
26
34
|
type McpHealthSource = Pick<MCPRegistry, 'describe'> & {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Agent, type AgentPipelines, type Context } from '@wrongstack/core/agent';
|
|
2
|
-
import { AutoCompactionMiddleware } from '@wrongstack/core/execution';
|
|
2
|
+
import { AutoCompactionMiddleware, createModelRuntimeMiddleware } from '@wrongstack/core/execution';
|
|
3
3
|
import { type EventBus } from '@wrongstack/core/kernel';
|
|
4
4
|
import type { ProviderRegistry, ToolRegistry } from '@wrongstack/core/registry';
|
|
5
5
|
import type { SessionEventBridge } from '@wrongstack/core/storage';
|
|
@@ -13,12 +13,7 @@ export declare function setupPipelines(params: {
|
|
|
13
13
|
* model-runtime middleware to map shared reasoning/cache settings into the
|
|
14
14
|
* provider `Request`, gated by the active model's capabilities.
|
|
15
15
|
*/
|
|
16
|
-
modelRuntime?:
|
|
17
|
-
getSettings(): import('@wrongstack/core/types').ModelRuntimeConfig | undefined;
|
|
18
|
-
getReasoningConfig(): import('@wrongstack/core/types').ReasoningConfig | undefined;
|
|
19
|
-
getCapabilities?(): import('@wrongstack/core/types').Capabilities | undefined;
|
|
20
|
-
onWarning?: ((message: string) => void) | undefined;
|
|
21
|
-
} | undefined;
|
|
16
|
+
modelRuntime?: Parameters<typeof createModelRuntimeMiddleware>[0] | undefined;
|
|
22
17
|
}): AgentPipelines;
|
|
23
18
|
export declare function setupCompaction(params: {
|
|
24
19
|
compactor: CompactionDriver;
|
package/dist/wiring/plugins.d.ts
CHANGED
|
@@ -43,6 +43,8 @@ export interface PluginsWiringDeps {
|
|
|
43
43
|
};
|
|
44
44
|
/** Lifecycle hook registry — injected so plugins can register in-process hooks. */
|
|
45
45
|
hookRegistry?: import('@wrongstack/core/hooks').HookRegistry | undefined;
|
|
46
|
+
/** `--safe-mode`: built-in plugins still load, third-party ones do not. */
|
|
47
|
+
safeMode?: boolean | undefined;
|
|
46
48
|
sessionWriter: SessionWriter;
|
|
47
49
|
metricsSink?: MetricsSinkView | undefined;
|
|
48
50
|
metricsStatus?: MetricsRuntimeStatus | undefined;
|
|
@@ -123,5 +125,6 @@ export interface PluginsWiringDeps {
|
|
|
123
125
|
* Override for tests by mocking this module's `BUILTIN_PLUGIN_FACTORIES`.
|
|
124
126
|
*/
|
|
125
127
|
export declare const BUILTIN_PLUGIN_FACTORIES: (() => Promise<Plugin>)[];
|
|
128
|
+
export declare const BUILTIN_PLUGIN_NAME_HINTS: readonly string[];
|
|
126
129
|
export declare function setupPlugins(params: PluginsWiringDeps): Promise<PluginHostHandle | undefined>;
|
|
127
130
|
//# sourceMappingURL=plugins.d.ts.map
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** Persistent provider/model waiting-room state for the CLI runtime. */
|
|
1
2
|
import type { FallbackProfileManager } from '@wrongstack/core/agent';
|
|
2
3
|
import { ProviderModelStatusTracker } from '@wrongstack/core/coordination';
|
|
3
4
|
import type { EventBus } from '@wrongstack/core/kernel';
|
|
@@ -4,7 +4,7 @@ import type { ProviderModelStatusTracker } from '@wrongstack/core/coordination';
|
|
|
4
4
|
import { type CouncilPersonaRegistry, type CouncilProfileRegistry } from '@wrongstack/core/execution';
|
|
5
5
|
import { createContextManagerTool } from '@wrongstack/core/infrastructure';
|
|
6
6
|
import type { ToolRegistry } from '@wrongstack/core/registry';
|
|
7
|
-
import type { Config, CouncilToolConfig, OneShotModelRouter, Provider } from '@wrongstack/core/types';
|
|
7
|
+
import type { Config, CouncilToolConfig, ModelsRegistry, OneShotModelRouter, Provider } from '@wrongstack/core/types';
|
|
8
8
|
interface ProviderUtilityToolsInput {
|
|
9
9
|
toolRegistry: ToolRegistry;
|
|
10
10
|
buildProvider: (providerId: string) => Provider;
|
|
@@ -13,6 +13,8 @@ interface ProviderUtilityToolsInput {
|
|
|
13
13
|
statusTracker: ProviderModelStatusTracker;
|
|
14
14
|
wrapProviderCall: NonNullable<import('@wrongstack/core/types').OneShotOrchestratorOptions['wrapProviderCall']>;
|
|
15
15
|
compactor: NonNullable<Parameters<typeof createContextManagerTool>[0]>['compactor'];
|
|
16
|
+
/** Catalog the image tool reads image models from. */
|
|
17
|
+
modelsRegistry: Pick<ModelsRegistry, 'getProvider'>;
|
|
16
18
|
}
|
|
17
19
|
export declare function adoptResumedProvider(input: {
|
|
18
20
|
resumedProvider?: string | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wrongstack/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.27",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "WrongStack CLI — terminal AI coding agent with provider catalog from models.dev. Provides `wrongstack` and `wstack` binaries.",
|
|
6
6
|
"keywords": [
|
|
@@ -41,40 +41,41 @@
|
|
|
41
41
|
"data"
|
|
42
42
|
],
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@wrongstack/acp": "1.0.
|
|
45
|
-
"@wrongstack/bench": "1.0.
|
|
46
|
-
"@wrongstack/core": "1.0.
|
|
47
|
-
"@wrongstack/kanban": "1.0.
|
|
48
|
-
"@wrongstack/mcp": "1.0.
|
|
49
|
-
"@wrongstack/persistence": "1.0.
|
|
50
|
-
"@wrongstack/plug-lsp": "1.0.
|
|
51
|
-
"@wrongstack/plugins": "1.0.
|
|
52
|
-
"@wrongstack/primitives": "1.0.
|
|
53
|
-
"@wrongstack/providers": "1.0.
|
|
54
|
-
"@wrongstack/requirement-intake": "1.0.
|
|
55
|
-
"@wrongstack/runtime": "1.0.
|
|
56
|
-
"@wrongstack/sage": "1.0.
|
|
57
|
-
"@wrongstack/sdd": "1.0.
|
|
58
|
-
"@wrongstack/security-scanner": "1.0.
|
|
59
|
-
"@wrongstack/simpleui": "1.0.
|
|
60
|
-
"@wrongstack/techstack": "1.0.
|
|
61
|
-
"@wrongstack/telegram": "1.0.
|
|
62
|
-
"@wrongstack/tools": "1.0.
|
|
63
|
-
"@wrongstack/tui": "1.0.
|
|
64
|
-
"@wrongstack/vector-memory": "1.0.
|
|
65
|
-
"@wrongstack/webui": "1.0.
|
|
66
|
-
"@wrongstack/webui-hq": "1.0.
|
|
67
|
-
"@wrongstack/webui-protocol": "1.0.
|
|
68
|
-
"@wrongstack/webui-server": "1.0.
|
|
69
|
-
"@wrongstack/wrongtrace": "1.0.
|
|
44
|
+
"@wrongstack/acp": "1.0.27",
|
|
45
|
+
"@wrongstack/bench": "1.0.27",
|
|
46
|
+
"@wrongstack/core": "1.0.27",
|
|
47
|
+
"@wrongstack/kanban": "1.0.27",
|
|
48
|
+
"@wrongstack/mcp": "1.0.27",
|
|
49
|
+
"@wrongstack/persistence": "1.0.27",
|
|
50
|
+
"@wrongstack/plug-lsp": "1.0.27",
|
|
51
|
+
"@wrongstack/plugins": "1.0.27",
|
|
52
|
+
"@wrongstack/primitives": "1.0.27",
|
|
53
|
+
"@wrongstack/providers": "1.0.27",
|
|
54
|
+
"@wrongstack/requirement-intake": "1.0.27",
|
|
55
|
+
"@wrongstack/runtime": "1.0.27",
|
|
56
|
+
"@wrongstack/sage": "1.0.27",
|
|
57
|
+
"@wrongstack/sdd": "1.0.27",
|
|
58
|
+
"@wrongstack/security-scanner": "1.0.27",
|
|
59
|
+
"@wrongstack/simpleui": "1.0.27",
|
|
60
|
+
"@wrongstack/techstack": "1.0.27",
|
|
61
|
+
"@wrongstack/telegram": "1.0.27",
|
|
62
|
+
"@wrongstack/tools": "1.0.27",
|
|
63
|
+
"@wrongstack/tui": "1.0.27",
|
|
64
|
+
"@wrongstack/vector-memory": "1.0.27",
|
|
65
|
+
"@wrongstack/webui": "1.0.27",
|
|
66
|
+
"@wrongstack/webui-hq": "1.0.27",
|
|
67
|
+
"@wrongstack/webui-protocol": "1.0.27",
|
|
68
|
+
"@wrongstack/webui-server": "1.0.27",
|
|
69
|
+
"@wrongstack/wrongtrace": "1.0.27",
|
|
70
70
|
"ws": "^8.21.3"
|
|
71
71
|
},
|
|
72
72
|
"optionalDependencies": {
|
|
73
|
-
"@wrongstack/desktop": "1.0.
|
|
73
|
+
"@wrongstack/desktop": "1.0.27"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
76
|
"@types/node": "^26.5.1",
|
|
77
77
|
"@types/ws": "^8.18.1",
|
|
78
|
+
"@wrongstack/governance": "1.0.27",
|
|
78
79
|
"jsdom": "^30.0.1",
|
|
79
80
|
"typescript": "^7.0.2"
|
|
80
81
|
},
|
package/dist/chunk-2BKFWIER.js
DELETED
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
API_VERSION,
|
|
3
|
-
CLI_VERSION
|
|
4
|
-
} from "./chunk-YBUCXXYZ.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
|
-
var helpCmd = async (_args, deps) => {
|
|
19
|
-
const lines = [
|
|
20
|
-
color.bold("WrongStack \u2014 usage"),
|
|
21
|
-
"",
|
|
22
|
-
" wstack Start REPL",
|
|
23
|
-
' wstack "<task>" Run task and exit',
|
|
24
|
-
" wstack desktop Open WrongStack Desktop (alias: --desktop)",
|
|
25
|
-
" wstack webui Serve the project WebUI (alias: --webui)",
|
|
26
|
-
" wstack simpleui Serve the minimal chat UI (alias: --simpleui)",
|
|
27
|
-
" wstack hq Start HQ command center (alias: --hq)",
|
|
28
|
-
' wstack --eternal "<mission>" Launch eternal-autonomy loop against a goal \u2014 Ctrl+C to stop',
|
|
29
|
-
" wstack resume [<id>] Resume a session",
|
|
30
|
-
" wstack sessions List recent sessions",
|
|
31
|
-
" wstack auth Interactive setup + key manager (add/edit/delete)",
|
|
32
|
-
" wstack auth list Quick listing of saved providers and keys",
|
|
33
|
-
" wstack auth status <id> Detailed view of one provider",
|
|
34
|
-
" wstack auth remove <id> Delete a provider (asks for confirmation)",
|
|
35
|
-
" wstack auth <provider> Add a key for a provider (--label, --family, \u2026)",
|
|
36
|
-
" wstack auth local [...] Quick-configure local Ollama / vLLM / LM Studio",
|
|
37
|
-
" wstack config [show|edit] Show or edit effective config",
|
|
38
|
-
" wstack tools List registered tools",
|
|
39
|
-
" wstack skills List discovered skills",
|
|
40
|
-
" wstack typesafe TypeSafe account: status, login, test, lint-conventions",
|
|
41
|
-
" wstack skill-suggest Preview/tune the TypeSafe skill suggester",
|
|
42
|
-
" wstack providers [--all] List providers from models.dev",
|
|
43
|
-
" wstack models [<provider>] List models",
|
|
44
|
-
" wstack models refresh Force-refresh cache",
|
|
45
|
-
" wstack models add <mid> Add/override custom model (--max-context, --tools, --vision, \u2026)",
|
|
46
|
-
" wstack models remove <mid> Remove a custom model",
|
|
47
|
-
" wstack models list List all custom models",
|
|
48
|
-
" wstack mcp [list|add|serve] Manage MCP servers",
|
|
49
|
-
" wstack plugin [list|install|toggle|remove|enable|disable] Manage plugins",
|
|
50
|
-
" wstack project id|init|rekey Manage the committed repository identity",
|
|
51
|
-
" wstack governance status Show advisory project-daemon governance health",
|
|
52
|
-
" wstack projects List tracked projects",
|
|
53
|
-
" wstack audit [<id>] [--list] Tamper-evident session audit log",
|
|
54
|
-
" wstack replay [<id>] [--list] Recorded provider responses log",
|
|
55
|
-
" wstack rewind [<id>] [opts] Rewind a session to an earlier point",
|
|
56
|
-
" wstack chronicle [opts] Chronological session metrics and timeline",
|
|
57
|
-
" wstack mailbox serve [opts] Start external-agent mailbox HTTP bridge",
|
|
58
|
-
" wstack permissions explain Explain tool permission policy decisions",
|
|
59
|
-
" wstack modeldiag [test] Model benchmarks and capability diagnostics",
|
|
60
|
-
" wstack bench [run|compare] Agentic benchmarks against standard suites",
|
|
61
|
-
" wstack acp [serve] Agent Client Protocol (ACP) server",
|
|
62
|
-
" wstack update [--check-only] Self-update the CLI",
|
|
63
|
-
" wstack diag Full diagnostics",
|
|
64
|
-
" wstack doctor Health checks",
|
|
65
|
-
" wstack export <id> [opts] Render a session",
|
|
66
|
-
" wstack usage Token + cost summary",
|
|
67
|
-
" wstack version Print version",
|
|
68
|
-
"",
|
|
69
|
-
color.bold("Common flags"),
|
|
70
|
-
" --yolo / --no-yolo Force auto-approval on or off at startup",
|
|
71
|
-
" --confirm-destructive Deprecated \u2014 YOLO no longer prompts by destructiveness",
|
|
72
|
-
" --yolo-destructive Let YOLO run every destructive kind it is allowed to (see /yolo confirm)",
|
|
73
|
-
" --tui / --no-tui Force or disable TUI mode",
|
|
74
|
-
" --mouse Full mouse mode in the TUI (in-app scroll + clickable UI)",
|
|
75
|
-
" --desktop Open WrongStack Desktop (requires @wrongstack/desktop)",
|
|
76
|
-
" --hq [--host <h>] [--port <n>] [--password <secret>] [--hq-allowlist <ip,cidr,...>] [--tunnel] [--hq-public-url <https-origin>] [--open]",
|
|
77
|
-
" Start HQ; publish through a temporary tunnel or persistent TLS proxy",
|
|
78
|
-
" --webui [--host <h>] [--port <n>] [--webui-token <t>] [--open]",
|
|
79
|
-
" [--webui-public-url <url>] [--webui-public-ws-url <url>] [--webui-require-token]",
|
|
80
|
-
" Serve the browser UI + WS bridge (prints a token URL,",
|
|
81
|
-
" --open pops the browser; shares this terminal's agent)",
|
|
82
|
-
" --simpleui [same network flags as --webui] [--open]",
|
|
83
|
-
" Serve the independent minimal chat UI",
|
|
84
|
-
" --full-auto SimpleUI: runtime-only YOLO + Director + autonomy override",
|
|
85
|
-
' --eternal "<mission>" Start an eternal-autonomy loop',
|
|
86
|
-
" --skip-index Skip codebase indexing on startup",
|
|
87
|
-
" --chimera-auto-fix off|ask|auto",
|
|
88
|
-
" How to handle Chimera review findings (default: config value)"
|
|
89
|
-
];
|
|
90
|
-
deps.renderer.write(lines.join("\n") + "\n");
|
|
91
|
-
return 0;
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
export {
|
|
95
|
-
versionCmd,
|
|
96
|
-
helpCmd
|
|
97
|
-
};
|
|
98
|
-
//# sourceMappingURL=chunk-2BKFWIER.js.map
|
package/dist/chunk-424ORSE7.js
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
// src/subcommands/index.ts
|
|
3
|
-
var loaders = {
|
|
4
|
-
acp: async () => (await import("./acp-AJWSKWE5.js")).acpCmd,
|
|
5
|
-
init: async () => (await import("./init-DRMMFG2G.js")).initCmd,
|
|
6
|
-
auth: async () => (await import("./auth-GRBZ7Y3D.js")).authCmd,
|
|
7
|
-
update: async () => (await import("./update-7XIOEXTD.js")).updateCmd,
|
|
8
|
-
sessions: async () => (await import("./sessions-config-IQUH2GXT.js")).sessionsCmd,
|
|
9
|
-
config: async () => (await import("./sessions-config-IQUH2GXT.js")).configCmd,
|
|
10
|
-
"config-export": async () => (await import("./config-transfer-RUWLDCNK.js")).configExportCmd,
|
|
11
|
-
"config-import": async () => (await import("./config-transfer-RUWLDCNK.js")).configImportCmd,
|
|
12
|
-
rewind: async () => (await import("./rewind-JA3ZLCNM.js")).rewindCmd,
|
|
13
|
-
replay: async () => (await import("./replay-JJ2NOWD6.js")).replayCmd,
|
|
14
|
-
audit: async () => (await import("./audit-46YK5DSC.js")).auditCmd,
|
|
15
|
-
tools: async () => (await import("./tools-skills-GH24UCBY.js")).toolsCmd,
|
|
16
|
-
skills: async () => (await import("./tools-skills-GH24UCBY.js")).skillsCmd,
|
|
17
|
-
"skill-suggest": async () => (await import("./skill-suggest-L2EVWB6R.js")).skillSuggestCmd,
|
|
18
|
-
typesafe: async () => (await import("./typesafe-HVEVPA6R.js")).typesafeCmd,
|
|
19
|
-
providers: async () => (await import("./providers-models-2CFG46RD.js")).providersCmd,
|
|
20
|
-
models: async () => (await import("./providers-models-2CFG46RD.js")).modelsCmd,
|
|
21
|
-
mcp: async () => (await import("./mcp-LBS45HWZ.js")).mcpCmd,
|
|
22
|
-
plugin: async () => (await import("./plugin-usage-S5LVGMBW.js")).pluginCmd,
|
|
23
|
-
plugins: async () => (await import("./plugin-usage-S5LVGMBW.js")).pluginCmd,
|
|
24
|
-
diag: async () => (await import("./diag-doctor-WIFJH3XH.js")).diagCmd,
|
|
25
|
-
doctor: async () => (await import("./diag-doctor-WIFJH3XH.js")).doctorCmd,
|
|
26
|
-
"proxy-status": async () => (await import("./diag-doctor-WIFJH3XH.js")).proxyCmd,
|
|
27
|
-
export: async () => (await import("./export-VVRIOWFV.js")).exportCmd,
|
|
28
|
-
usage: async () => (await import("./plugin-usage-S5LVGMBW.js")).usageCmd,
|
|
29
|
-
version: async () => (await import("./version-help-WZ623NWM.js")).versionCmd,
|
|
30
|
-
help: async () => (await import("./version-help-WZ623NWM.js")).helpCmd,
|
|
31
|
-
projects: async () => (await import("./projects-LMNAGGEU.js")).projectsCmd,
|
|
32
|
-
modeldiag: async () => (await import("./modeldiag-36OGAL5C.js")).modeldiagCmd,
|
|
33
|
-
quick: async () => (await import("./quick-CNB4Z3HS.js")).quickCmd,
|
|
34
|
-
bench: async () => (await import("./bench-N5K7Z5O3.js")).benchCmd,
|
|
35
|
-
chronicle: async () => (await import("./chronicle-UTFETHP6.js")).chronicleCmd,
|
|
36
|
-
hq: async () => (await import("./hq-JTUTFI4L.js")).hqCmd,
|
|
37
|
-
mailbox: async () => (await import("./mailbox-serve-WDOCH6KR.js")).mailboxServeCmd,
|
|
38
|
-
permissions: async () => (await import("./permissions-CFDLXETM.js")).permissionsCmd,
|
|
39
|
-
project: async () => (await import("./project-AOQI5XTK.js")).projectCmd,
|
|
40
|
-
governance: async () => (await import("./governance-RYSHV675.js")).governanceCmd
|
|
41
|
-
};
|
|
42
|
-
var subcommands = Object.fromEntries(
|
|
43
|
-
Object.entries(loaders).map(
|
|
44
|
-
([name, load]) => [
|
|
45
|
-
name,
|
|
46
|
-
async (args, deps) => (await load())(args, deps)
|
|
47
|
-
]
|
|
48
|
-
)
|
|
49
|
-
);
|
|
50
|
-
var subcommandNames = Object.keys(loaders);
|
|
51
|
-
|
|
52
|
-
export {
|
|
53
|
-
subcommands,
|
|
54
|
-
subcommandNames
|
|
55
|
-
};
|
|
56
|
-
//# sourceMappingURL=chunk-424ORSE7.js.map
|
package/dist/chunk-OWNC7LMD.js
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
// src/services/suggestion-store.ts
|
|
3
|
-
var sharedSuggestions = [];
|
|
4
|
-
var sharedAutoSuggestions = [];
|
|
5
|
-
function setSuggestions(suggestions) {
|
|
6
|
-
sharedSuggestions = suggestions;
|
|
7
|
-
}
|
|
8
|
-
function setAutoSuggestions(suggestions) {
|
|
9
|
-
sharedAutoSuggestions = suggestions;
|
|
10
|
-
}
|
|
11
|
-
function getSuggestions() {
|
|
12
|
-
return sharedSuggestions;
|
|
13
|
-
}
|
|
14
|
-
function removeSuggestions(indices) {
|
|
15
|
-
if (indices.length === 0) return;
|
|
16
|
-
const set = new Set(indices);
|
|
17
|
-
sharedSuggestions = sharedSuggestions.filter((_, i) => !set.has(i));
|
|
18
|
-
sharedAutoSuggestions = [];
|
|
19
|
-
}
|
|
20
|
-
function clearSuggestions() {
|
|
21
|
-
sharedSuggestions = [];
|
|
22
|
-
sharedAutoSuggestions = [];
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
// src/tui-thinking-word.ts
|
|
26
|
-
var DEFAULT_TUI_THINKING_WORD = "thinking";
|
|
27
|
-
var MAX_TUI_THINKING_WORD_LENGTH = 16;
|
|
28
|
-
function normalizeTuiThinkingWord(value) {
|
|
29
|
-
if (typeof value !== "string") return DEFAULT_TUI_THINKING_WORD;
|
|
30
|
-
const word = value.trim();
|
|
31
|
-
if (word.length === 0 || word.length > MAX_TUI_THINKING_WORD_LENGTH) {
|
|
32
|
-
return DEFAULT_TUI_THINKING_WORD;
|
|
33
|
-
}
|
|
34
|
-
if (!/^[\p{L}\p{N}_-]+$/u.test(word)) return DEFAULT_TUI_THINKING_WORD;
|
|
35
|
-
return word;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// src/services/run-git.ts
|
|
39
|
-
import { spawn } from "node:child_process";
|
|
40
|
-
import { toErrorMessage } from "@wrongstack/core/utils";
|
|
41
|
-
async function runGit(args, cwd) {
|
|
42
|
-
try {
|
|
43
|
-
return await new Promise((resolve, reject) => {
|
|
44
|
-
const child = spawn("git", args, {
|
|
45
|
-
cwd,
|
|
46
|
-
stdio: ["ignore", "pipe", "pipe"],
|
|
47
|
-
signal: AbortSignal.timeout(3e4),
|
|
48
|
-
windowsHide: true
|
|
49
|
-
});
|
|
50
|
-
let stdout = "";
|
|
51
|
-
let stderr = "";
|
|
52
|
-
child.stdout?.on("data", (d) => {
|
|
53
|
-
stdout += d;
|
|
54
|
-
});
|
|
55
|
-
child.stderr?.on("data", (d) => {
|
|
56
|
-
stderr += d;
|
|
57
|
-
});
|
|
58
|
-
child.on("error", (err) => {
|
|
59
|
-
reject(new Error(`Failed to run git: ${err.message}`));
|
|
60
|
-
});
|
|
61
|
-
child.on("close", (code) => resolve({ stdout, stderr, code: code ?? 1 }));
|
|
62
|
-
});
|
|
63
|
-
} catch (err) {
|
|
64
|
-
throw new Error(toErrorMessage(err));
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export {
|
|
69
|
-
setSuggestions,
|
|
70
|
-
setAutoSuggestions,
|
|
71
|
-
getSuggestions,
|
|
72
|
-
removeSuggestions,
|
|
73
|
-
clearSuggestions,
|
|
74
|
-
MAX_TUI_THINKING_WORD_LENGTH,
|
|
75
|
-
normalizeTuiThinkingWord,
|
|
76
|
-
runGit
|
|
77
|
-
};
|
|
78
|
-
//# sourceMappingURL=chunk-OWNC7LMD.js.map
|