@wrongstack/cli 0.300.0 → 0.301.0

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 (56) hide show
  1. package/dist/{acp-IDNS2YVE.js → acp-DATHHPNT.js} +34 -15
  2. package/dist/acp-server-agent.d.ts +1 -1
  3. package/dist/{audit-2ZSFGNIF.js → audit-QRCLEHHW.js} +5 -1
  4. package/dist/{auth-6T6ZOT2R.js → auth-JASC4K3F.js} +150 -37
  5. package/dist/boot/launch-menu.d.ts +2 -4
  6. package/dist/boot/tool-registry.d.ts +3 -0
  7. package/dist/chimera-reviewer-policy.d.ts +10 -3
  8. package/dist/chimera-work-registry.d.ts +19 -0
  9. package/dist/{chronicle-QQEQFSSE.js → chronicle-63MFCZN6.js} +26 -5
  10. package/dist/{chunk-YWUPHRGB.js → chunk-263G3FMB.js} +33 -10
  11. package/dist/{chunk-GYDQABMA.js → chunk-2KDOFTTM.js} +44 -32
  12. package/dist/chunk-CSAPOCBP.js +24 -0
  13. package/dist/{chunk-N7ULWBO5.js → chunk-ETOEGL3V.js} +3 -7
  14. package/dist/{chunk-3MWUZMOL.js → chunk-GUHQQG63.js} +14 -3
  15. package/dist/chunk-KE7E7DPX.js +38 -0
  16. package/dist/{chunk-PEMN4T5O.js → chunk-MHF2IJDE.js} +21 -4
  17. package/dist/{chunk-V76R7DC5.js → chunk-O7XNGCRT.js} +311 -309
  18. package/dist/{chunk-DPJZQCVP.js → chunk-YMXXOOFN.js} +1 -1
  19. package/dist/{chunk-4WJKVQJY.js → chunk-ZECLGUTF.js} +15 -3
  20. package/dist/{cli-main-7B3G2YSG.js → cli-main-XWC57MGE.js} +333 -98
  21. package/dist/{execution-SHGM7BVC.js → execution-LHMSMDHB.js} +126 -52
  22. package/dist/execution-chimera-cascade.d.ts +3 -4
  23. package/dist/execution-chimera-review.d.ts +2 -3
  24. package/dist/execution-cleanup.d.ts +3 -2
  25. package/dist/execution.d.ts +1 -1
  26. package/dist/{export-TPORYVRZ.js → export-DOBGPY23.js} +12 -1
  27. package/dist/fleet/host-context.d.ts +1 -1
  28. package/dist/fleet/host-helpers.d.ts +14 -0
  29. package/dist/fleet/status-broadcast.d.ts +1 -1
  30. package/dist/{hq-DVDD4XPV.js → hq-LN5CJHCM.js} +2 -2
  31. package/dist/hq-server/routes.d.ts +10 -1
  32. package/dist/hq-server/ws.d.ts +17 -6
  33. package/dist/{hq-server-DQHLNHDL.js → hq-server-S7HZG3PA.js} +3 -2
  34. package/dist/index.js +63 -98
  35. package/dist/live-settings-input.d.ts +5 -0
  36. package/dist/{mcp-CYLPUEHC.js → mcp-OHPJH73U.js} +6 -2
  37. package/dist/{modeldiag-YOQZHBQV.js → modeldiag-3DOK4BWW.js} +2 -2
  38. package/dist/{plugin-usage-EOG4ET4S.js → plugin-usage-YEVLOR33.js} +7 -3
  39. package/dist/{plugins-56CMWMPR.js → plugins-K3BAUP4D.js} +3 -3
  40. package/dist/profile-config-path.d.ts +0 -2
  41. package/dist/provider-helpers.d.ts +0 -5
  42. package/dist/{providers-models-K6RT7ABI.js → providers-models-WEZ4EGLL.js} +6 -5
  43. package/dist/{replay-KCTXNMZQ.js → replay-FCBNHW3K.js} +5 -1
  44. package/dist/{rewind-EJMVFVLS.js → rewind-AOD3JIYX.js} +5 -1
  45. package/dist/{sessions-config-NLCMK3BY.js → sessions-config-XXN7267N.js} +8 -3
  46. package/dist/subcommands/flags.d.ts +23 -0
  47. package/dist/terminal-format.d.ts +15 -0
  48. package/dist/{webui-server-G3EKFXLL.js → webui-server-DD35QFNO.js} +5 -13
  49. package/dist/wiring/brain-and-orchestration.d.ts +1 -1
  50. package/dist/wiring/mailbox-bridge-bootstrap.d.ts +3 -1
  51. package/dist/wiring/management-tools.d.ts +9 -1
  52. package/dist/wiring/pipeline.d.ts +5 -5
  53. package/dist/wiring/plugins.d.ts +2 -3
  54. package/dist/wiring/provider-utility-tools.d.ts +1 -0
  55. package/dist/wiring/tools.d.ts +4 -5
  56. package/package.json +23 -23
@@ -41,11 +41,12 @@ import {
41
41
  resolveAuthToken,
42
42
  SddBoardWebSocketHandler,
43
43
  SddWizardWebSocketHandler,
44
+ sendSerialized,
44
45
  SpecsWebSocketHandler,
45
46
  TerminalWebSocketHandler,
46
47
  WorktreeWebSocketHandler
47
48
  } from "@wrongstack/webui-server";
48
- import { WebSocket, WebSocketServer } from "ws";
49
+ import { WebSocketServer } from "ws";
49
50
 
50
51
  // src/webui-server/client-registration.ts
51
52
  import { createWebuiClientPresence } from "@wrongstack/webui-server";
@@ -1535,20 +1536,11 @@ async function runWebUI(opts) {
1535
1536
  registerWebuiSignalHandlers(signalShutdown);
1536
1537
  });
1537
1538
  function send(ws, msg) {
1538
- if (ws.readyState === WebSocket.OPEN) {
1539
- ws.send(JSON.stringify(msg));
1540
- }
1539
+ sendSerialized(ws, JSON.stringify(msg));
1541
1540
  }
1542
1541
  function broadcast(msg) {
1543
1542
  const data = JSON.stringify(msg);
1544
- for (const [ws] of clients) {
1545
- if (ws.readyState === WebSocket.OPEN) {
1546
- try {
1547
- ws.send(data);
1548
- } catch {
1549
- }
1550
- }
1551
- }
1543
+ for (const [ws] of clients) sendSerialized(ws, data);
1552
1544
  }
1553
1545
  function sendResult(ws, success, message) {
1554
1546
  send(ws, { type: "key.operation_result", payload: { success, message } });
@@ -1558,4 +1550,4 @@ async function runWebUI(opts) {
1558
1550
  export {
1559
1551
  runWebUI
1560
1552
  };
1561
- //# sourceMappingURL=webui-server-G3EKFXLL.js.map
1553
+ //# sourceMappingURL=webui-server-DD35QFNO.js.map
@@ -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, Provider, SecretVault, SessionWriter } from '@wrongstack/core/types';
4
+ import { type Config, type Provider, type SecretVault, type SessionWriter } from '@wrongstack/core/types';
5
5
  import { MultiAgentHost } from '../multi-agent.js';
6
6
  type AnyObj = any;
7
7
  /**
@@ -33,7 +33,9 @@ export declare const MAILBOX_BRIDGE_META_KEY = "mailboxBridge";
33
33
  */
34
34
  export declare function bootstrapMailboxBridgeAtStartup(params: {
35
35
  projectRoot: string | undefined;
36
- config: Pick<Config, 'features'> | undefined;
36
+ config: {
37
+ features: Pick<Config['features'], 'mailboxBridge'>;
38
+ } | undefined;
37
39
  logger: Logger;
38
40
  /** Surface label — logged for debugging when something goes wrong. */
39
41
  source: 'cli' | 'webui' | 'eternal';
@@ -1,4 +1,5 @@
1
1
  import type { Config } from '@wrongstack/core/types';
2
+ import { type PluginManagerHookRunner } from '@wrongstack/core/tools';
2
3
  import type { ToolRegistry } from '@wrongstack/core/registry';
3
4
  type ConfigStoreLike = {
4
5
  get(): Config;
@@ -9,7 +10,14 @@ export interface RegisterCliManagementToolsDeps {
9
10
  configStore: ConfigStoreLike;
10
11
  profileConfigPath: string;
11
12
  stdinInteractive: boolean;
13
+ /**
14
+ * Late-bound PreToolUse pipeline for plugin_manager's nested `use` path.
15
+ * The hook runner is created by `setupLifecycleAndPlugins` AFTER the
16
+ * management tools register, so cli-main passes a ref-backed getter that
17
+ * starts null and is filled once wiring completes.
18
+ */
19
+ getHookRunner?: (() => PluginManagerHookRunner | null) | undefined;
12
20
  }
13
- export declare function registerCliManagementTools({ toolRegistry, configStore, profileConfigPath, stdinInteractive, }: RegisterCliManagementToolsDeps): void;
21
+ export declare function registerCliManagementTools({ toolRegistry, configStore, profileConfigPath, stdinInteractive, getHookRunner, }: RegisterCliManagementToolsDeps): void;
14
22
  export {};
15
23
  //# sourceMappingURL=management-tools.d.ts.map
@@ -1,9 +1,9 @@
1
1
  import { Agent, type AgentPipelines, type Context } from '@wrongstack/core/agent';
2
2
  import { AutoCompactionMiddleware } from '@wrongstack/core/execution';
3
- import type { Config, Logger, ModelsRegistry, Provider } from '@wrongstack/core/types';
4
- import type { SessionEventBridge } from '@wrongstack/core/storage';
5
3
  import { type EventBus } from '@wrongstack/core/kernel';
6
4
  import type { ProviderRegistry, ToolRegistry } from '@wrongstack/core/registry';
5
+ import type { SessionEventBridge } from '@wrongstack/core/storage';
6
+ import type { Config, Logger, ModelsRegistry, Provider } from '@wrongstack/core/types';
7
7
  type CompactionDriver = ConstructorParameters<typeof AutoCompactionMiddleware>[0];
8
8
  export declare function setupPipelines(params: {
9
9
  events: EventBus;
@@ -90,9 +90,9 @@ export declare function createAgent(params: {
90
90
  /**
91
91
  * Full Config object, used for `features.mailboxBridge` gating and
92
92
  * forwarded to `bootstrapMailboxBridgeAtStartup`. Optional — when
93
- * omitted, the bootstrap defaults to 'auto' (i.e. always run).
94
- * Tests can pass a stub with just `{ features: { mailboxBridge: 'off' } }`
95
- * to skip the bridge entirely without touching the host config.
93
+ * omitted, the bootstrap defaults to 'off' (i.e. never run), so tests
94
+ * and embedders get no detached bridge process unless they ask for one
95
+ * with `{ features: { mailboxBridge: 'auto' } }`.
96
96
  */
97
97
  fullConfig?: Pick<Config, 'features'> | undefined;
98
98
  /** Surface label for the bootstrap log breadcrumb. */
@@ -1,10 +1,9 @@
1
1
  import type { AgentPipelines } from '@wrongstack/core/agent';
2
- import type { Config, HealthRegistry, Logger, MetricsRuntimeStatus, MetricsSinkView, ModelsRegistry, Plugin, PromptLoader, SkillLoader } from '@wrongstack/core/types';
3
2
  import type { ExtensionRegistry } from '@wrongstack/core/extension';
4
- import type { PluginAPIInit, PluginHostHandle } from '@wrongstack/core/plugin';
5
- import type { ConfigStore, SessionWriter } from '@wrongstack/core/types';
6
3
  import type { Container, EventBus } from '@wrongstack/core/kernel';
4
+ import type { PluginAPIInit, PluginHostHandle } from '@wrongstack/core/plugin';
7
5
  import type { ProviderRegistry, SlashCommandRegistry, ToolRegistry } from '@wrongstack/core/registry';
6
+ import type { Config, ConfigStore, HealthRegistry, Logger, MetricsRuntimeStatus, MetricsSinkView, ModelsRegistry, Plugin, PromptLoader, SessionWriter, SkillLoader } from '@wrongstack/core/types';
8
7
  import type { MCPRegistry } from '@wrongstack/mcp';
9
8
  export declare const DEPRECATED_PLUGIN_NAMES: Record<string, string>;
10
9
  export declare const BUILTIN_PLUGIN_CONFIG_NAMES: Set<string>;
@@ -11,6 +11,7 @@ export interface ProviderUtilityToolsInput {
11
11
  getConfig: () => Config;
12
12
  fallbackProfileManager: FallbackProfileManager;
13
13
  statusTracker: ProviderModelStatusTracker;
14
+ wrapProviderCall: NonNullable<import('@wrongstack/core/types').OneShotOrchestratorOptions['wrapProviderCall']>;
14
15
  compactor: NonNullable<Parameters<typeof createContextManagerTool>[0]>['compactor'];
15
16
  }
16
17
  export declare function adoptResumedProvider(input: {
@@ -1,10 +1,9 @@
1
- import type { TextBlock } from '@wrongstack/core/types';
2
- import type { Config, MemoryPort } from '@wrongstack/core/types';
3
- import { type WstackPaths } from '@wrongstack/core/utils';
4
- import { type DefaultModelsRegistry, DefaultModeStore } from '@wrongstack/core/models';
5
- import { DefaultSkillLoader } from '@wrongstack/core/execution';
6
1
  import { DefaultSystemPromptBuilder } from '@wrongstack/core/agent';
2
+ import { DefaultSkillLoader } from '@wrongstack/core/execution';
3
+ import { type DefaultModelsRegistry, DefaultModeStore } from '@wrongstack/core/models';
7
4
  import type { ToolRegistry } from '@wrongstack/core/registry';
5
+ import type { Config, MemoryPort, TextBlock } from '@wrongstack/core/types';
6
+ import { type WstackPaths } from '@wrongstack/core/utils';
8
7
  export interface ToolsWiringDeps {
9
8
  config: Config;
10
9
  toolRegistry: ToolRegistry;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wrongstack/cli",
3
- "version": "0.300.0",
3
+ "version": "0.301.0",
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": [
@@ -42,30 +42,30 @@
42
42
  ],
43
43
  "dependencies": {
44
44
  "ws": "^8.21.1",
45
- "@wrongstack/core": "0.300.0",
46
- "@wrongstack/bench": "0.300.0",
47
- "@wrongstack/providers": "0.300.0",
48
- "@wrongstack/mcp": "0.300.0",
49
- "@wrongstack/acp": "0.300.0",
50
- "@wrongstack/kanban": "0.300.0",
51
- "@wrongstack/sdd": "0.300.0",
52
- "@wrongstack/plugins": "0.300.0",
53
- "@wrongstack/plug-lsp": "0.300.0",
54
- "@wrongstack/requirement-intake": "0.300.0",
55
- "@wrongstack/security-scanner": "0.300.0",
56
- "@wrongstack/runtime": "0.300.0",
57
- "@wrongstack/sage": "0.300.0",
58
- "@wrongstack/techstack": "0.300.0",
59
- "@wrongstack/telegram": "0.300.0",
60
- "@wrongstack/simpleui": "0.300.0",
61
- "@wrongstack/tools": "0.300.0",
62
- "@wrongstack/webui-hq": "0.300.0",
63
- "@wrongstack/tui": "0.300.0",
64
- "@wrongstack/webui": "0.300.0",
65
- "@wrongstack/webui-server": "0.300.0"
45
+ "@wrongstack/acp": "0.301.0",
46
+ "@wrongstack/mcp": "0.301.0",
47
+ "@wrongstack/bench": "0.301.0",
48
+ "@wrongstack/plug-lsp": "0.301.0",
49
+ "@wrongstack/kanban": "0.301.0",
50
+ "@wrongstack/providers": "0.301.0",
51
+ "@wrongstack/plugins": "0.301.0",
52
+ "@wrongstack/sdd": "0.301.0",
53
+ "@wrongstack/requirement-intake": "0.301.0",
54
+ "@wrongstack/runtime": "0.301.0",
55
+ "@wrongstack/security-scanner": "0.301.0",
56
+ "@wrongstack/core": "0.301.0",
57
+ "@wrongstack/simpleui": "0.301.0",
58
+ "@wrongstack/techstack": "0.301.0",
59
+ "@wrongstack/sage": "0.301.0",
60
+ "@wrongstack/telegram": "0.301.0",
61
+ "@wrongstack/tui": "0.301.0",
62
+ "@wrongstack/tools": "0.301.0",
63
+ "@wrongstack/webui": "0.301.0",
64
+ "@wrongstack/webui-hq": "0.301.0",
65
+ "@wrongstack/webui-server": "0.301.0"
66
66
  },
67
67
  "optionalDependencies": {
68
- "@wrongstack/desktop": "0.300.0"
68
+ "@wrongstack/desktop": "0.301.0"
69
69
  },
70
70
  "devDependencies": {
71
71
  "@types/node": "^26.1.2",