@wrongstack/core 0.32.0 → 0.51.3

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 (45) hide show
  1. package/dist/{agent-bridge-D_XcS2HL.d.ts → agent-bridge-CjbD-i7-.d.ts} +1 -1
  2. package/dist/{agent-subagent-runner-DpZTLdBe.d.ts → agent-subagent-runner-DfvlBx5N.d.ts} +3 -3
  3. package/dist/{config-BUEGM4JP.d.ts → config-ZRCf7sTu.d.ts} +21 -1
  4. package/dist/coordination/index.d.ts +10 -10
  5. package/dist/coordination/index.js +3310 -3056
  6. package/dist/coordination/index.js.map +1 -1
  7. package/dist/defaults/index.d.ts +13 -13
  8. package/dist/defaults/index.js +1544 -1390
  9. package/dist/defaults/index.js.map +1 -1
  10. package/dist/{events-BrQiweXN.d.ts → events-Bt44ikPN.d.ts} +135 -1
  11. package/dist/execution/index.d.ts +35 -9
  12. package/dist/execution/index.js +61 -28
  13. package/dist/execution/index.js.map +1 -1
  14. package/dist/extension/index.d.ts +3 -3
  15. package/dist/{index-pXJdVLe0.d.ts → index-OzA1XjHL.d.ts} +35 -3
  16. package/dist/{index-ysfO_DlX.d.ts → index-mAWBdLyJ.d.ts} +2 -2
  17. package/dist/index.d.ts +221 -25
  18. package/dist/index.js +1670 -1017
  19. package/dist/index.js.map +1 -1
  20. package/dist/infrastructure/index.d.ts +4 -4
  21. package/dist/infrastructure/index.js +17 -3
  22. package/dist/infrastructure/index.js.map +1 -1
  23. package/dist/kernel/index.d.ts +4 -4
  24. package/dist/kernel/index.js +3 -1
  25. package/dist/kernel/index.js.map +1 -1
  26. package/dist/{mcp-servers-BzB3r7_c.d.ts → mcp-servers-DONdo-XM.d.ts} +1 -1
  27. package/dist/models/index.js +5 -2
  28. package/dist/models/index.js.map +1 -1
  29. package/dist/{multi-agent-C8Z1i__e.d.ts → multi-agent-Ba9Ni2hC.d.ts} +1 -1
  30. package/dist/{multi-agent-coordinator-DOXSgtom.d.ts → multi-agent-coordinator-BuKq0q89.d.ts} +2 -2
  31. package/dist/{null-fleet-bus-DLsUjOyB.d.ts → null-fleet-bus-C0xd73YP.d.ts} +169 -138
  32. package/dist/observability/index.d.ts +1 -1
  33. package/dist/{path-resolver-DumKAi0n.d.ts → path-resolver-nkmdiFgi.d.ts} +1 -1
  34. package/dist/{plan-templates-BZMi-VpU.d.ts → plan-templates-BmDdJ7UL.d.ts} +2 -2
  35. package/dist/{provider-runner-Dlv8Fvw9.d.ts → provider-runner-BGro2qQB.d.ts} +1 -1
  36. package/dist/sdd/index.d.ts +5 -5
  37. package/dist/storage/index.d.ts +3 -3
  38. package/dist/{tool-executor-BAi4WI2d.d.ts → tool-executor-p4tP9tGF.d.ts} +1 -1
  39. package/dist/types/index.d.ts +8 -8
  40. package/dist/types/index.js +22 -5
  41. package/dist/types/index.js.map +1 -1
  42. package/dist/utils/index.d.ts +107 -1
  43. package/dist/utils/index.js +53 -2
  44. package/dist/utils/index.js.map +1 -1
  45. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { b as BridgeTransport, B as BridgeMessage, A as AgentBridge, a as AgentBridgeConfig } from './multi-agent-C8Z1i__e.js';
1
+ import { b as BridgeTransport, B as BridgeMessage, A as AgentBridge, a as AgentBridgeConfig } from './multi-agent-Ba9Ni2hC.js';
2
2
 
3
3
  /**
4
4
  * In-memory pub/sub transport for agent-to-agent messaging.
@@ -1,6 +1,6 @@
1
- import { c as Agent, f as AgentInput } from './index-ysfO_DlX.js';
2
- import { E as EventBus } from './events-BrQiweXN.js';
3
- import { n as SubagentConfig, v as TaskSpec, t as SubagentRunner } from './multi-agent-C8Z1i__e.js';
1
+ import { c as Agent, f as AgentInput } from './index-mAWBdLyJ.js';
2
+ import { E as EventBus } from './events-Bt44ikPN.js';
3
+ import { n as SubagentConfig, v as TaskSpec, t as SubagentRunner } from './multi-agent-Ba9Ni2hC.js';
4
4
 
5
5
  /**
6
6
  * Single fleet-wide event with subagent attribution. Whatever a child
@@ -116,6 +116,19 @@ interface ProviderConfig {
116
116
  /** Optional list of models the user wants visible for this provider. */
117
117
  models?: string[];
118
118
  }
119
+ /**
120
+ * One entry in the per-task model matrix. Pins a catalog role, a phase, or
121
+ * the `*` default to a specific model (and, optionally, a specific provider).
122
+ * Resolved at subagent-spawn time so e.g. `security-scanner` can run a
123
+ * different model than `documentation` while the leader stays on its own.
124
+ */
125
+ interface ModelMatrixEntry {
126
+ /** Provider registry id (e.g. "anthropic", "minimax", "zai"). When omitted,
127
+ * the leader's provider is used with this entry's model. */
128
+ provider?: string;
129
+ /** Model id to run for the matched role/phase/default. */
130
+ model: string;
131
+ }
119
132
  interface MCPServerConfig {
120
133
  /** Human-readable description shown in `wstack mcp list`. */
121
134
  description?: string;
@@ -212,6 +225,13 @@ interface Config {
212
225
  apiKey?: string;
213
226
  baseUrl?: string;
214
227
  providers?: Record<string, ProviderConfig>;
228
+ /**
229
+ * Per-task model matrix. Keys are catalog roles (e.g. "security-scanner"),
230
+ * phase names (e.g. "review"), or the `*` default. Resolution precedence at
231
+ * subagent spawn: exact role → the role's phase → `*` → leader model. Set via
232
+ * the `/setmodel` slash command; persisted to ~/.wrongstack/config.json.
233
+ */
234
+ modelMatrix?: Record<string, ModelMatrixEntry>;
215
235
  context: ContextConfig;
216
236
  tools: ToolsConfig;
217
237
  mcpServers?: Record<string, MCPServerConfig>;
@@ -290,4 +310,4 @@ interface ConfigStore {
290
310
  watch(cb: (next: Readonly<Config>, prev: Readonly<Config>) => void): () => void;
291
311
  }
292
312
 
293
- export { type AutonomyConfig as A, CONTEXT_WINDOW_MODES as C, DEFAULT_CONTEXT_WINDOW_MODE_ID as D, type FeaturesConfig as F, type LogConfig as L, type MCPServerConfig as M, type PluginConfig as P, type SessionLoggingConfig as S, type ToolsConfig as T, type Config as a, type ConfigLoader as b, type ConfigStore as c, type ContextConfig as d, type ContextWindowAggressiveOn as e, type ContextWindowConfigLike as f, type ContextWindowMode as g, type ContextWindowModeId as h, type ContextWindowPolicy as i, type ContextWindowThresholds as j, type ProviderApiKey as k, type ProviderConfig as l, type SyncCategory as m, type SyncConfig as n, formatContextWindowModeList as o, getContextWindowMode as p, isContextWindowModeId as q, listContextWindowModes as r, resolveContextWindowPolicy as s };
313
+ export { type AutonomyConfig as A, CONTEXT_WINDOW_MODES as C, DEFAULT_CONTEXT_WINDOW_MODE_ID as D, type FeaturesConfig as F, type LogConfig as L, type MCPServerConfig as M, type PluginConfig as P, type SessionLoggingConfig as S, type ToolsConfig as T, type Config as a, type ConfigLoader as b, type ConfigStore as c, type ContextConfig as d, type ContextWindowAggressiveOn as e, type ContextWindowConfigLike as f, type ContextWindowMode as g, type ContextWindowModeId as h, type ContextWindowPolicy as i, type ContextWindowThresholds as j, type ModelMatrixEntry as k, type ProviderApiKey as l, type ProviderConfig as m, type SyncCategory as n, type SyncConfig as o, formatContextWindowModeList as p, getContextWindowMode as q, isContextWindowModeId as r, listContextWindowModes as s, resolveContextWindowPolicy as t };
@@ -1,21 +1,21 @@
1
- export { A as ACP_AGENTS, a as AGENTS_BY_PHASE, b as AGENT_CATALOG, c as ALL_AGENT_DEFINITIONS, d as ALL_FLEET_AGENTS, e as AUDIT_LOG_AGENT, f as AutoExtendCeiling, g as AutoExtendPolicy, B as BUG_HUNTER_AGENT, h as BugFinding, C as CollabBudgetConfig, i as CollabBudgetOverrides, j as CollabBudgetWarningPayload, k as CollabDebugReport, l as CollabSession, m as CollabSessionOptions, n as CreateDelegateToolOptions, o as CriticConcern, p as CriticEvaluation, D as DEFAULT_DIRECTOR_PREAMBLE, q as DEFAULT_SUBAGENT_BASELINE, r as DelegateHost, s as Director, t as DirectorAlert, u as DirectorAlertLevel, v as DirectorCancelCollabPayload, w as DirectorPromptParts, x as DirectorSessionFactory, y as DirectorSessionFactoryOptions, F as FLEET_ROSTER, z as FLEET_ROSTER_BUDGETS, E as FLEET_ROSTER_WITHACP, G as FleetCostCapError, H as FleetManager, I as FleetManagerOptions, J as FleetRosterBudget, K as FleetSpawnBudgetError, L as ICoordinator, M as IFleetManager, N as LargeAnswerStore, O as NULL_FLEET_BUS, R as REFACTOR_PLANNER_AGENT, P as RefactorPhase, Q as RefactorPlan, S as SECURITY_SCANNER_AGENT, T as SharedFileEntry, U as SharedFileSnapshot, V as SubagentPromptParts, W as applyRosterBudget, X as attachAutoExtend, Y as composeDirectorPrompt, Z as composeSubagentPrompt, _ as createDelegateTool, $ as getAgentDefinition, a0 as makeAskResultTool, a1 as makeAskTool, a2 as makeAssignTool, a3 as makeAwaitTasksTool, a4 as makeCollabDebugTool, a5 as makeDirectorSessionFactory, a6 as makeFleetEmitTool, a7 as makeFleetHealthTool, a8 as makeFleetSessionTool, a9 as makeFleetStatusTool, aa as makeFleetUsageTool, ab as makeRollUpTool, ac as makeSpawnTool, ad as makeTerminateTool, ae as makeWorkCompleteTool, af as rosterSummaryFromConfigs } from '../null-fleet-bus-DLsUjOyB.js';
2
- import { b as AgentDefinition } from '../multi-agent-coordinator-DOXSgtom.js';
3
- export { T as AGENT_TOOL_PRESETS, A as AgentBudgetTier, a as AgentCapability, c as AgentPhase, D as DEFAULT_DISPATCH_ROLE, d as DefaultMultiAgentCoordinator, e as DispatchCandidate, f as DispatchClassifier, g as DispatchMethod, h as DispatchOptions, i as DispatchResult, H as HEAVY_BUDGET, L as LIGHT_BUDGET, M as MEDIUM_BUDGET, j as MultiAgentCoordinatorOptions, k as dispatchAgent, m as makeLLMClassifier, s as scoreAgents } from '../multi-agent-coordinator-DOXSgtom.js';
4
- export { c as BudgetExceededError, d as BudgetKind, e as BudgetLimits, f as BudgetNegotiationMode, g as BudgetThresholdDecision, h as BudgetThresholdHandler, i as BudgetThresholdSignal, j as BudgetUsage, m as SubagentBudget } from '../multi-agent-C8Z1i__e.js';
5
- export { A as AgentFactory, a as AgentFactoryResult, b as AgentRunnerOptions, F as FleetBus, c as FleetEvent, d as FleetHandler, e as FleetUsage, f as FleetUsageAggregator, S as SubagentUsageSnapshot, m as makeAgentSubagentRunner } from '../agent-subagent-runner-DpZTLdBe.js';
6
- export { I as InMemoryAgentBridge, a as InMemoryBridgeTransport, c as createMessage } from '../agent-bridge-D_XcS2HL.js';
1
+ export { B as BrainArbiter, a as BrainDecision, b as BrainDecisionOption, c as BrainDecisionQueue, d as BrainDecisionRequest, e as BrainDecisionSource, f as BrainFallback, g as BrainRisk, D as DefaultBrainArbiter, h as DefaultBrainArbiterOptions, H as HumanEscalatingBrainArbiter, O as ObservableBrainArbiter, l as formatHumanPrompt } from '../events-Bt44ikPN.js';
2
+ export { A as ACP_AGENTS, a as AGENTS_BY_PHASE, b as AGENT_CATALOG, c as ALL_AGENT_DEFINITIONS, d as ALL_FLEET_AGENTS, e as AUDIT_LOG_AGENT, f as AutoExtendCeiling, g as AutoExtendPolicy, B as BUG_HUNTER_AGENT, h as BugFinding, C as CollabBudgetConfig, i as CollabBudgetOverrides, j as CollabBudgetWarningPayload, k as CollabDebugReport, l as CollabSession, m as CollabSessionOptions, n as CreateDelegateToolOptions, o as CriticConcern, p as CriticEvaluation, D as DEFAULT_DIRECTOR_PREAMBLE, q as DEFAULT_SUBAGENT_BASELINE, r as DelegateHost, s as Director, t as DirectorAlert, u as DirectorAlertLevel, v as DirectorCancelCollabPayload, w as DirectorPromptParts, x as DirectorSessionFactory, y as DirectorSessionFactoryOptions, F as FLEET_ROSTER, z as FLEET_ROSTER_BUDGETS, E as FLEET_ROSTER_WITHACP, G as FleetCostCapError, H as FleetManager, I as FleetManagerOptions, J as FleetRosterBudget, K as FleetSpawnBudgetError, L as ICoordinator, M as IFleetManager, N as LargeAnswerStore, O as NULL_FLEET_BUS, R as REFACTOR_PLANNER_AGENT, P as RefactorPhase, Q as RefactorPlan, S as SECURITY_SCANNER_AGENT, T as SharedFileEntry, U as SharedFileSnapshot, V as SubagentPromptParts, W as applyRosterBudget, X as attachAutoExtend, Y as composeDirectorPrompt, Z as composeSubagentPrompt, _ as createDelegateTool, $ as getAgentDefinition, a0 as makeAskResultTool, a1 as makeAskTool, a2 as makeAssignTool, a3 as makeAwaitTasksTool, a4 as makeCollabDebugTool, a5 as makeDirectorSessionFactory, a6 as makeFleetEmitTool, a7 as makeFleetHealthTool, a8 as makeFleetSessionTool, a9 as makeFleetStatusTool, aa as makeFleetUsageTool, ab as makeRollUpTool, ac as makeSpawnTool, ad as makeTerminateTool, ae as makeWorkCompleteTool, af as rosterSummaryFromConfigs } from '../null-fleet-bus-C0xd73YP.js';
3
+ import { b as AgentDefinition } from '../multi-agent-coordinator-BuKq0q89.js';
4
+ export { T as AGENT_TOOL_PRESETS, A as AgentBudgetTier, a as AgentCapability, c as AgentPhase, D as DEFAULT_DISPATCH_ROLE, d as DefaultMultiAgentCoordinator, e as DispatchCandidate, f as DispatchClassifier, g as DispatchMethod, h as DispatchOptions, i as DispatchResult, H as HEAVY_BUDGET, L as LIGHT_BUDGET, M as MEDIUM_BUDGET, j as MultiAgentCoordinatorOptions, k as dispatchAgent, m as makeLLMClassifier, s as scoreAgents } from '../multi-agent-coordinator-BuKq0q89.js';
5
+ export { c as BudgetExceededError, d as BudgetKind, e as BudgetLimits, f as BudgetNegotiationMode, g as BudgetThresholdDecision, h as BudgetThresholdHandler, i as BudgetThresholdSignal, j as BudgetUsage, m as SubagentBudget } from '../multi-agent-Ba9Ni2hC.js';
6
+ export { A as AgentFactory, a as AgentFactoryResult, b as AgentRunnerOptions, F as FleetBus, c as FleetEvent, d as FleetHandler, e as FleetUsage, f as FleetUsageAggregator, S as SubagentUsageSnapshot, m as makeAgentSubagentRunner } from '../agent-subagent-runner-DfvlBx5N.js';
7
+ export { I as InMemoryAgentBridge, a as InMemoryBridgeTransport, c as createMessage } from '../agent-bridge-CjbD-i7-.js';
7
8
  import '../context-7u93AcGD.js';
8
9
  import 'node:events';
9
10
  import '../director-state-BmYi3DGA.js';
10
- import '../events-BrQiweXN.js';
11
- import '../index-ysfO_DlX.js';
11
+ import '../config-ZRCf7sTu.js';
12
+ import '../models-registry-BcYJDKLm.js';
13
+ import '../index-mAWBdLyJ.js';
12
14
  import '../logger-DDd5C--Z.js';
13
15
  import '../system-prompt-CM6zOhd2.js';
14
16
  import '../observability-BhnVLBLS.js';
15
17
  import '../secret-scrubber-3MHDDAtm.js';
16
18
  import '../permission-B6sldrSp.js';
17
- import '../config-BUEGM4JP.js';
18
- import '../models-registry-BcYJDKLm.js';
19
19
 
20
20
  /** Phase 1 · Discovery — map the territory before any work begins. */
21
21
  declare const DISCOVERY_AGENTS: AgentDefinition[];