@wrongstack/cli 0.306.4 → 0.307.1

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.
Files changed (73) hide show
  1. package/dist/{auth-L3WGSGDX.js → auth-TVOOHL4Q.js} +45 -106
  2. package/dist/boot/short-circuit-flags.d.ts +2 -2
  3. package/dist/chimera-cascade-evidence.d.ts +1 -1
  4. package/dist/chimera-reviewer-policy.d.ts +1 -1
  5. package/dist/chunk-2VMJ3E5Z.js +71 -0
  6. package/dist/{chunk-RHLQT3EV.js → chunk-CB35UVXO.js} +1636 -1528
  7. package/dist/{chunk-YKBRFSGL.js → chunk-DOJLAULS.js} +28 -28
  8. package/dist/{chunk-KXN5HZDL.js → chunk-PKHGLWUJ.js} +24 -6
  9. package/dist/{chunk-HITHEXE3.js → chunk-TOG7OMKJ.js} +2 -2
  10. package/dist/{chunk-ARWGQUB3.js → chunk-XSG33WHN.js} +15 -5
  11. package/dist/{cli-main-4TZCCZR6.js → cli-main-DD3I7KOO.js} +29198 -28411
  12. package/dist/cli-main.d.ts +0 -20
  13. package/dist/{execution-547PM3NI.js → execution-4ASWJ7EY.js} +309 -273
  14. package/dist/fleet/host-learning-scheduler.d.ts +27 -0
  15. package/dist/fleet/host-shadow-manager.d.ts +64 -0
  16. package/dist/fleet/host.d.ts +5 -140
  17. package/dist/{hq-ZK6PGN3W.js → hq-PA6RH2UW.js} +2 -2
  18. package/dist/hq-server/mailbox-gateway-manager.d.ts +32 -0
  19. package/dist/hq-server/routes/auth/bootstrap-routes.d.ts +5 -0
  20. package/dist/hq-server/routes/auth/common.d.ts +11 -0
  21. package/dist/hq-server/routes/auth/password-routes.d.ts +9 -0
  22. package/dist/hq-server/routes/auth/session-audit-routes.d.ts +6 -0
  23. package/dist/hq-server/routes/auth/totp-routes.d.ts +9 -0
  24. package/dist/hq-server/routes/auth-handlers.d.ts +5 -132
  25. package/dist/hq-server/routes/command-handlers.d.ts +7 -0
  26. package/dist/hq-server/routes/data-handlers.d.ts +8 -0
  27. package/dist/hq-server/routes/mailbox-handlers.d.ts +22 -0
  28. package/dist/hq-server/routes.d.ts +3 -3
  29. package/dist/hq-server/server-lifecycle.d.ts +37 -0
  30. package/dist/hq-server/snapshot.d.ts +6 -5
  31. package/dist/hq-server/types.d.ts +4 -0
  32. package/dist/hq-server/upgrade-handler.d.ts +34 -0
  33. package/dist/hq-server/ws-client-events.d.ts +25 -0
  34. package/dist/hq-server/ws-leader.d.ts +47 -0
  35. package/dist/hq-server/ws-resume.d.ts +27 -0
  36. package/dist/hq-server/ws.d.ts +4 -71
  37. package/dist/{hq-server-IVZLVCFV.js → hq-server-PBRU275L.js} +2 -2
  38. package/dist/hq-server.d.ts +0 -38
  39. package/dist/index.js +1267 -122
  40. package/dist/{mcp-W7HHN7IA.js → mcp-CMLFHRG2.js} +14 -7
  41. package/dist/mcp-serve.d.ts +12 -1
  42. package/dist/{modeldiag-6VS5KDP5.js → modeldiag-ICMPHT5L.js} +868 -831
  43. package/dist/{providers-models-HQN3AT3K.js → providers-models-4FAKM2WO.js} +4 -4
  44. package/dist/repl-eternal-loop.d.ts +8 -0
  45. package/dist/repl-goal-banner.d.ts +21 -0
  46. package/dist/slash-commands/brain-council.d.ts +36 -0
  47. package/dist/slash-commands/brain-status.d.ts +12 -0
  48. package/dist/slash-commands/kanban-board-handlers.d.ts +13 -0
  49. package/dist/slash-commands/kanban-lifecycle-diagnostics.d.ts +16 -0
  50. package/dist/slash-commands/kanban-task-subcommands.d.ts +8 -0
  51. package/dist/slash-commands/memory-audience.d.ts +14 -0
  52. package/dist/slash-commands/memory-gather.d.ts +9 -0
  53. package/dist/slash-commands/memory-stats.d.ts +5 -0
  54. package/dist/slash-commands/settings-mutations.d.ts +6 -0
  55. package/dist/slash-commands/settings-view.d.ts +5 -0
  56. package/dist/subcommands/handlers/modeldiag-bench.d.ts +10 -0
  57. package/dist/subcommands/handlers/modeldiag-eval.d.ts +27 -0
  58. package/dist/subcommands/handlers/modeldiag-test.d.ts +8 -0
  59. package/dist/{version-help-ASKQYXDJ.js → version-help-TFD6VPF3.js} +2 -2
  60. package/dist/vibe-protocol-wiring.d.ts +2 -0
  61. package/dist/webui-server/credential-watcher.d.ts +15 -0
  62. package/dist/webui-server/domain-handlers.d.ts +21 -0
  63. package/dist/webui-server/route-contexts.d.ts +41 -0
  64. package/dist/{webui-server-FTG7JAZU.js → webui-server-IPHGJGXE.js} +515 -437
  65. package/dist/wiring/cli-execute-builder.d.ts +88 -0
  66. package/dist/wiring/cli-heap-watchdog.d.ts +33 -0
  67. package/dist/wiring/cli-prompt-and-tools-setup.d.ts +25 -0
  68. package/dist/wiring/cli-slash-commands-setup.d.ts +79 -0
  69. package/dist/wiring/heap-watchdog-setup.d.ts +53 -0
  70. package/dist/wiring/metrics.d.ts +1 -0
  71. package/dist/wiring/prompt-journal-recorder.d.ts +45 -0
  72. package/dist/wiring/replay-governance-setup.d.ts +31 -0
  73. package/package.json +27 -27
@@ -0,0 +1,88 @@
1
+ export declare function runCliExecution(params: {
2
+ agent: any;
3
+ events: any;
4
+ slashRegistry: any;
5
+ tokenCounter: any;
6
+ sessionRef: any;
7
+ activateSession: any;
8
+ config: any;
9
+ configStore: any;
10
+ wpaths: any;
11
+ projectRoot: string;
12
+ flags: any;
13
+ positional: any;
14
+ webuiSessionChild: any;
15
+ updateInfo: any;
16
+ attachments: any;
17
+ brainMailbox: any;
18
+ session: any;
19
+ mcpRegistry: any;
20
+ queueStore: any;
21
+ context: any;
22
+ detachTodosCheckpoint: any;
23
+ sessResult: any;
24
+ sessionStore: any;
25
+ memoryStore: any;
26
+ modeStore: any;
27
+ needsSetup: any;
28
+ statusTracker: any;
29
+ multiAgentHost: any;
30
+ modelsRegistry: any;
31
+ savedProviderCfg: any;
32
+ resolvedProvider: any;
33
+ logger: any;
34
+ switchProviderAndModel: any;
35
+ applyMaxContext: any;
36
+ renderer: any;
37
+ reader: any;
38
+ secretInputController: any;
39
+ effectiveMaxContextRef: any;
40
+ stats: any;
41
+ skillLoader: any;
42
+ promptLoader: any;
43
+ modeId: any;
44
+ director: any;
45
+ coordinatorController: any;
46
+ fleetStreamController: any;
47
+ agentTranscripts?: any;
48
+ agentMonitor?: any;
49
+ vault: any;
50
+ profileConfigPath: string;
51
+ onPanelOpen: any;
52
+ interruptController: any;
53
+ enhanceController: any;
54
+ activeReasoningConfig: any;
55
+ configRef: any;
56
+ buildProviderForModel: any;
57
+ statuslineHiddenItems: any;
58
+ setStatuslineHiddenItems: any;
59
+ saveStatuslineHiddenItems: any;
60
+ setYoloMode: any;
61
+ autonomyMode: any;
62
+ setAutonomyMode: any;
63
+ nextPredictEnabled: any;
64
+ setNextPredict: any;
65
+ container: any;
66
+ sessionBridge: any;
67
+ autoCompactor: any;
68
+ getPluginPickerItems: any;
69
+ togglePluginFromPicker: any;
70
+ getToolPickerItems: any;
71
+ brain: any;
72
+ brainSettings: any;
73
+ brainRuntime: any;
74
+ brainLog: any;
75
+ currentSuggestions: any;
76
+ setCurrentSuggestions: any;
77
+ eternalEngine: any;
78
+ parallelEngine: any;
79
+ sddRunRegistry: any;
80
+ eternalListeners: any;
81
+ stageListeners: any;
82
+ runSageSessionHygiene: any;
83
+ pluginHost: any;
84
+ teardownHandlers: any;
85
+ governanceHandle: any;
86
+ setConfig: (cfg: any) => void;
87
+ }): Promise<number>;
88
+ //# sourceMappingURL=cli-execute-builder.d.ts.map
@@ -0,0 +1,33 @@
1
+ export interface CliHeapWatchdogParams {
2
+ flags: {
3
+ simpleui?: boolean;
4
+ webui?: boolean;
5
+ [key: string]: unknown;
6
+ };
7
+ tuiOwnsScreen: boolean;
8
+ context: {
9
+ session: {
10
+ id: string;
11
+ };
12
+ state: {
13
+ messages: ReadonlyArray<{
14
+ _estTokens?: number | undefined;
15
+ }>;
16
+ };
17
+ };
18
+ hqPublisherRef: {
19
+ current?: {
20
+ getQueueStats: () => any;
21
+ } | null | undefined;
22
+ getKanbanSyncStats?: (() => any) | undefined;
23
+ };
24
+ brainMailbox: {
25
+ getHqSnapshotStats: () => any;
26
+ };
27
+ metricsSink?: {
28
+ droppedObservations: () => number;
29
+ } | undefined;
30
+ teardownHandlers: Array<() => void>;
31
+ }
32
+ export declare function startCliHeapWatchdog(params: CliHeapWatchdogParams): void;
33
+ //# sourceMappingURL=cli-heap-watchdog.d.ts.map
@@ -0,0 +1,25 @@
1
+ import { ToolRegistry } from '@wrongstack/core/registry';
2
+ export declare function setupCliPromptAndTools(params: {
3
+ container: any;
4
+ modeStore: any;
5
+ memoryStore: any;
6
+ skillLoader: any;
7
+ sessionRef: {
8
+ current: import('@wrongstack/core/types').SessionWriter | undefined;
9
+ };
10
+ autonomyModeRef: {
11
+ current: import('../services/autonomy-mode.js').AutonomyMode;
12
+ };
13
+ modeId: string;
14
+ modePrompt?: string | undefined;
15
+ modelCapabilitiesRef: {
16
+ current: any;
17
+ };
18
+ config: any;
19
+ wpaths: any;
20
+ projectRoot: string;
21
+ events: any;
22
+ }): Promise<{
23
+ toolRegistry: ToolRegistry;
24
+ }>;
25
+ //# sourceMappingURL=cli-prompt-and-tools-setup.d.ts.map
@@ -0,0 +1,79 @@
1
+ export declare function setupCliSlashCommands(params: {
2
+ slashRegistry: any;
3
+ toolRegistry: any;
4
+ agent: any;
5
+ interruptController: any;
6
+ reader: any;
7
+ wpaths: any;
8
+ container: any;
9
+ sessionStore: any;
10
+ skillLoader: any;
11
+ tokenCounter: any;
12
+ renderer: any;
13
+ events: any;
14
+ memoryStore: any;
15
+ context: any;
16
+ cwd: string;
17
+ projectRoot: string;
18
+ metricsSink: any;
19
+ healthRegistry: any;
20
+ metricsStatus: any;
21
+ planPath: string;
22
+ modeStore: any;
23
+ fleetStreamController: any;
24
+ enhanceController: any;
25
+ provider: any;
26
+ config: any;
27
+ buildProviderForId: (pid: string) => any;
28
+ statuslineConfigDeps: any;
29
+ getCurrentHiddenItems: () => any[];
30
+ setStatuslineHiddenItems: any;
31
+ saveStatuslineHiddenItems: any;
32
+ agentsMonitorController: any;
33
+ agentMonitor: any;
34
+ onPanelOpen: any;
35
+ configStore: any;
36
+ secretInputController: any;
37
+ vault: any;
38
+ brain: any;
39
+ brainSettings: any;
40
+ brainRuntime: any;
41
+ brainLog: any;
42
+ coordinatorController: any;
43
+ statusTracker: any;
44
+ shadowController: any;
45
+ multiAgentHost: any;
46
+ director: any;
47
+ sessionRef: any;
48
+ session: any;
49
+ fleetRootForPromotion: string;
50
+ profileConfigPath: string;
51
+ effectiveMaxContextRef: any;
52
+ autoCompactor: any;
53
+ eventWiring: any;
54
+ mcpRegistry: any;
55
+ setYoloMode: (setTo?: boolean) => boolean;
56
+ getNextPredict: () => boolean;
57
+ setNextPredict: (enabled: boolean) => void;
58
+ getCurrentSuggestions: () => any;
59
+ setCurrentSuggestions: (s: any) => void;
60
+ teardownHandlers: Array<() => void>;
61
+ pluginHost: any;
62
+ logger: any;
63
+ flags: any;
64
+ errorRing: any;
65
+ stats: any;
66
+ broadcastEternalIteration: any;
67
+ broadcastAutonomyStage: any;
68
+ getAutonomyMode: () => any;
69
+ setAutonomyMode: (m: any) => void;
70
+ autonomyModeRef: any;
71
+ getEternalEngine: () => any;
72
+ setEternalEngine: (e: any) => void;
73
+ getParallelEngine: () => any;
74
+ setParallelEngine: (e: any) => void;
75
+ sddRunRegistry: any;
76
+ goalHost: any;
77
+ setConfig: (cfg: any) => void;
78
+ }): void;
79
+ //# sourceMappingURL=cli-slash-commands-setup.d.ts.map
@@ -0,0 +1,53 @@
1
+ export interface SetupCliHeapWatchdogOptions {
2
+ flags: Record<string, unknown>;
3
+ tuiOwnsScreen: boolean;
4
+ context: {
5
+ session: {
6
+ id: string;
7
+ };
8
+ state: {
9
+ messages: readonly {
10
+ _estTokens?: number | undefined;
11
+ }[];
12
+ };
13
+ };
14
+ metricsSink?: {
15
+ droppedObservations: () => number;
16
+ } | undefined;
17
+ hqPublisherRef: {
18
+ current?: {
19
+ getQueueStats: () => {
20
+ entries: number;
21
+ bytes: number;
22
+ maxBytes: number;
23
+ droppedFrames: number;
24
+ droppedBytes: number;
25
+ coalescedFrames: number;
26
+ coalescedBytes: number;
27
+ };
28
+ } | undefined;
29
+ getKanbanSyncStats?: (() => {
30
+ localPublishActive: boolean;
31
+ pendingBoardIds: number;
32
+ fullRescanPending: boolean;
33
+ remoteApplyQueued: boolean;
34
+ pendingRemoteBoards: number;
35
+ localPublishRuns: number;
36
+ coalescedLocalRefreshes: number;
37
+ } | undefined) | undefined;
38
+ };
39
+ brainMailbox: {
40
+ getHqSnapshotStats: () => {
41
+ inFlight: boolean;
42
+ pending: boolean;
43
+ timerScheduled: boolean;
44
+ eventInFlight: boolean;
45
+ pendingEvents: number;
46
+ coalescedEvents: number;
47
+ droppedEvents: number;
48
+ };
49
+ };
50
+ teardownHandlers: Array<() => void>;
51
+ }
52
+ export declare function setupCliHeapWatchdog({ flags, tuiOwnsScreen, context, metricsSink, hqPublisherRef, brainMailbox, teardownHandlers, }: SetupCliHeapWatchdogOptions): void;
53
+ //# sourceMappingURL=heap-watchdog-setup.d.ts.map
@@ -21,6 +21,7 @@ export interface MetricsWiringResult {
21
21
  healthRegistry: HealthRegistry | undefined;
22
22
  metricsServerHandle: MetricsServerHandle | undefined;
23
23
  metricsStatus: MetricsRuntimeStatus;
24
+ dispose?: (() => void) | undefined;
24
25
  }
25
26
  type McpHealthSource = Pick<MCPRegistry, 'describe'> & {
26
27
  operationalHealth?: (() => MCPServerOperationalHealth[]) | undefined;
@@ -0,0 +1,45 @@
1
+ import { PROMPT_JOURNAL_RAW_MARKER } from '@wrongstack/core/prompts';
2
+ import type { ToolCallPipelinePayload, UserInputPayload } from '@wrongstack/core/agent';
3
+ /**
4
+ * userInput-pipeline middleware that records every submitted user prompt into
5
+ * the project's hierarchical prompt journal (`<projectRoot>/.wrongstack/prompts/`).
6
+ *
7
+ * The TUI's submit path stamps the raw (unrefined) text under
8
+ * `ctx.meta[PROMPT_JOURNAL_RAW_MARKER]` when the refiner rewrote the prompt;
9
+ * this middleware consumes the marker and labels the turn `refined_user` with
10
+ * `rawContent` set. Unmarked turns are `raw_user`. The session's system prompt
11
+ * is recorded once per session as `system_prompt`.
12
+ *
13
+ * Best-effort by design: recording must never block or fail a turn, so writes
14
+ * are fire-and-forget and failures are swallowed (the core writer already
15
+ * treats journal I/O as non-fatal).
16
+ */
17
+ export { PROMPT_JOURNAL_RAW_MARKER };
18
+ export interface PromptJournalRecorder {
19
+ name: string;
20
+ handler: (payload: UserInputPayload, next: (v: UserInputPayload) => Promise<UserInputPayload>) => Promise<UserInputPayload>;
21
+ }
22
+ export declare function createPromptJournalRecorder(): PromptJournalRecorder;
23
+ /**
24
+ * toolCall-pipeline middleware that records the agent-driven journal
25
+ * categories — `clarify_interaction`, `subagent_delegation` and
26
+ * `autonomous_next_step` — by recognising the tools that produce them.
27
+ *
28
+ * This complements the userInput recorder (raw/refined/system prompts) so the
29
+ * journal captures more than user submissions. Every executed tool call flows
30
+ * through the `toolCall` pipeline (`agent-tools.ts`), so one middleware sees
31
+ * all three emission points:
32
+ *
33
+ * - `clarify` → `clarify_interaction` (content: question)
34
+ * - `delegate` → `subagent_delegation` (content: task)
35
+ * - `continue_to_next_iteration` → `autonomous_next_step` (content: marker)
36
+ *
37
+ * Best-effort by design, same as the userInput recorder: writes are
38
+ * fire-and-forget and failures are swallowed.
39
+ */
40
+ export interface PromptJournalToolCallRecorder {
41
+ name: string;
42
+ handler: (payload: ToolCallPipelinePayload, next: (v: ToolCallPipelinePayload) => Promise<ToolCallPipelinePayload>) => Promise<ToolCallPipelinePayload>;
43
+ }
44
+ export declare function createPromptJournalToolCallRecorder(): PromptJournalToolCallRecorder;
45
+ //# sourceMappingURL=prompt-journal-recorder.d.ts.map
@@ -0,0 +1,31 @@
1
+ import type { Container, EventBus } from '@wrongstack/core/kernel';
2
+ import type { WstackPaths } from '@wrongstack/core/utils';
3
+ import type { Logger, MemoryPort, SessionStore } from '@wrongstack/core/types';
4
+ import { type CliFlags } from '../boot/simpleui-full-auto.js';
5
+ export interface SetupReplayAndGovernanceOptions {
6
+ flags: CliFlags;
7
+ container: Container;
8
+ wpaths: WstackPaths;
9
+ projectRoot: string;
10
+ session: {
11
+ id: string;
12
+ };
13
+ sessionRef: {
14
+ current: {
15
+ id: string;
16
+ } | undefined;
17
+ };
18
+ logger: Logger;
19
+ events: EventBus;
20
+ planPath: string;
21
+ sessionStore: SessionStore;
22
+ context: {
23
+ meta: Record<string, unknown>;
24
+ };
25
+ traceId?: string | undefined;
26
+ memoryStore: MemoryPort;
27
+ }
28
+ export declare function setupReplayAndGovernance({ flags, container, wpaths, projectRoot, session, sessionRef, logger, events, planPath, sessionStore, context, traceId, memoryStore, }: SetupReplayAndGovernanceOptions): Promise<{
29
+ governanceHandle: import("../cli-main-helpers.js").CliGovernanceRuntimeHandle | undefined;
30
+ }>;
31
+ //# sourceMappingURL=replay-governance-setup.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wrongstack/cli",
3
- "version": "0.306.4",
3
+ "version": "0.307.1",
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,37 +41,37 @@
41
41
  "data"
42
42
  ],
43
43
  "dependencies": {
44
- "ws": "^8.21.1",
45
- "@wrongstack/acp": "0.306.4",
46
- "@wrongstack/mcp": "0.306.4",
47
- "@wrongstack/kanban": "0.306.4",
48
- "@wrongstack/persistence": "0.306.4",
49
- "@wrongstack/core": "0.306.4",
50
- "@wrongstack/bench": "0.306.4",
51
- "@wrongstack/plug-lsp": "0.306.4",
52
- "@wrongstack/requirement-intake": "0.306.4",
53
- "@wrongstack/plugins": "0.306.4",
54
- "@wrongstack/providers": "0.306.4",
55
- "@wrongstack/sage": "0.306.4",
56
- "@wrongstack/sdd": "0.306.4",
57
- "@wrongstack/security-scanner": "0.306.4",
58
- "@wrongstack/runtime": "0.306.4",
59
- "@wrongstack/simpleui": "0.306.4",
60
- "@wrongstack/techstack": "0.306.4",
61
- "@wrongstack/telegram": "0.306.4",
62
- "@wrongstack/tui": "0.306.4",
63
- "@wrongstack/webui": "0.306.4",
64
- "@wrongstack/tools": "0.306.4",
65
- "@wrongstack/webui-server": "0.306.4",
66
- "@wrongstack/webui-hq": "0.306.4"
44
+ "ws": "^8.21.3",
45
+ "@wrongstack/core": "0.307.1",
46
+ "@wrongstack/bench": "0.307.1",
47
+ "@wrongstack/kanban": "0.307.1",
48
+ "@wrongstack/plug-lsp": "0.307.1",
49
+ "@wrongstack/mcp": "0.307.1",
50
+ "@wrongstack/acp": "0.307.1",
51
+ "@wrongstack/providers": "0.307.1",
52
+ "@wrongstack/plugins": "0.307.1",
53
+ "@wrongstack/runtime": "0.307.1",
54
+ "@wrongstack/sage": "0.307.1",
55
+ "@wrongstack/persistence": "0.307.1",
56
+ "@wrongstack/requirement-intake": "0.307.1",
57
+ "@wrongstack/sdd": "0.307.1",
58
+ "@wrongstack/techstack": "0.307.1",
59
+ "@wrongstack/telegram": "0.307.1",
60
+ "@wrongstack/tui": "0.307.1",
61
+ "@wrongstack/tools": "0.307.1",
62
+ "@wrongstack/simpleui": "0.307.1",
63
+ "@wrongstack/webui-hq": "0.307.1",
64
+ "@wrongstack/webui": "0.307.1",
65
+ "@wrongstack/security-scanner": "0.307.1",
66
+ "@wrongstack/webui-server": "0.307.1"
67
67
  },
68
68
  "optionalDependencies": {
69
- "@wrongstack/desktop": "0.306.4"
69
+ "@wrongstack/desktop": "0.307.1"
70
70
  },
71
71
  "devDependencies": {
72
- "@types/node": "^26.1.2",
72
+ "@types/node": "^26.2.0",
73
73
  "@types/ws": "^8.18.1",
74
- "jsdom": "^29.1.1",
74
+ "jsdom": "^30.0.1",
75
75
  "typescript": "^7.0.2"
76
76
  },
77
77
  "publishConfig": {