@wrongstack/core 0.119.1 → 0.148.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 (65) hide show
  1. package/dist/{agent-bridge-PRAbEX-9.d.ts → agent-bridge-r9y6gdn4.d.ts} +1 -1
  2. package/dist/{agent-subagent-runner-DXWImnNV.d.ts → agent-subagent-runner-1GeQE_L0.d.ts} +7 -7
  3. package/dist/{brain-NZZqL8sn.d.ts → brain-Cp_3GIS2.d.ts} +14 -3
  4. package/dist/{compactor-C3stu664.d.ts → compactor-BueGt7LG.d.ts} +9 -1
  5. package/dist/{config-DZV9VK9n.d.ts → config-BaVThgnT.d.ts} +1 -1
  6. package/dist/{context-hvXINa6a.d.ts → context-C7G_MtLV.d.ts} +7 -0
  7. package/dist/coordination/index.d.ts +12 -12
  8. package/dist/coordination/index.js +35 -21
  9. package/dist/coordination/index.js.map +1 -1
  10. package/dist/defaults/index.d.ts +24 -24
  11. package/dist/defaults/index.js +869 -788
  12. package/dist/defaults/index.js.map +1 -1
  13. package/dist/execution/index.d.ts +14 -14
  14. package/dist/execution/index.js +454 -321
  15. package/dist/execution/index.js.map +1 -1
  16. package/dist/extension/index.d.ts +6 -6
  17. package/dist/{goal-preamble-COpt55W8.d.ts → goal-preamble-CYJLg0wk.d.ts} +55 -17
  18. package/dist/{index-Cj3le7TI.d.ts → index-BZdezm3g.d.ts} +8 -8
  19. package/dist/{index-4VVHuTZF.d.ts → index-CPweVoFM.d.ts} +5 -5
  20. package/dist/index.d.ts +48 -48
  21. package/dist/index.js +612 -513
  22. package/dist/index.js.map +1 -1
  23. package/dist/infrastructure/index.d.ts +6 -6
  24. package/dist/infrastructure/index.js +64 -19
  25. package/dist/infrastructure/index.js.map +1 -1
  26. package/dist/kernel/index.d.ts +9 -9
  27. package/dist/kernel/index.js.map +1 -1
  28. package/dist/{llm-selector-Bmx4PsVM.d.ts → llm-selector-CP72f1lC.d.ts} +2 -2
  29. package/dist/{mcp-servers-CofNHOqn.d.ts → mcp-servers-Bl5LTvQg.d.ts} +3 -3
  30. package/dist/models/index.d.ts +5 -5
  31. package/dist/models/index.js +53 -20
  32. package/dist/models/index.js.map +1 -1
  33. package/dist/{models-registry-BzlsjKcy.d.ts → models-registry-D90K9UnM.d.ts} +1 -1
  34. package/dist/{multi-agent-coordinator-CmDmUgq2.d.ts → multi-agent-coordinator-QWEzJDlm.d.ts} +1 -1
  35. package/dist/{null-fleet-bus-CyH2YqP4.d.ts → null-fleet-bus-BUyfqh23.d.ts} +13 -10
  36. package/dist/observability/index.d.ts +2 -2
  37. package/dist/{parallel-eternal-engine-uxVm4y4V.d.ts → parallel-eternal-engine-C75QuhAI.d.ts} +33 -11
  38. package/dist/{path-resolver-gfoGxpdd.d.ts → path-resolver-DRjQBkoO.d.ts} +3 -3
  39. package/dist/{permission-DhLrgA30.d.ts → permission-B7nKnEvQ.d.ts} +1 -1
  40. package/dist/{permission-policy-DGOvne7i.d.ts → permission-policy-8-6zBmfA.d.ts} +2 -13
  41. package/dist/{pipeline-CqF7uju2.d.ts → pipeline-BG7UgbDc.d.ts} +2 -2
  42. package/dist/{plan-templates-DoKhzenv.d.ts → plan-templates-CkKNPU3I.d.ts} +5 -5
  43. package/dist/{provider-runner-BPlI5sPZ.d.ts → provider-runner-BNpuIyOL.d.ts} +3 -3
  44. package/dist/{retry-policy-B4Q-FZgE.d.ts → retry-policy-rutAfVeR.d.ts} +1 -1
  45. package/dist/sdd/index.d.ts +8 -8
  46. package/dist/sdd/index.js +10 -1
  47. package/dist/sdd/index.js.map +1 -1
  48. package/dist/{secret-vault-B7GnL6o9.d.ts → secret-vault-BTcC_T5v.d.ts} +3 -2
  49. package/dist/security/index.d.ts +5 -7
  50. package/dist/security/index.js +5 -36
  51. package/dist/security/index.js.map +1 -1
  52. package/dist/{selector-BakeMnWR.d.ts → selector-4vDFZKt3.d.ts} +1 -1
  53. package/dist/{session-event-bridge-DE5Oekwx.d.ts → session-event-bridge-DWlvglC2.d.ts} +2 -2
  54. package/dist/{session-reader-DFC81-4p.d.ts → session-reader-BAtCxdaw.d.ts} +1 -1
  55. package/dist/storage/index.d.ts +13 -13
  56. package/dist/storage/index.js +100 -103
  57. package/dist/storage/index.js.map +1 -1
  58. package/dist/types/index.d.ts +18 -18
  59. package/dist/types/index.js +276 -103
  60. package/dist/types/index.js.map +1 -1
  61. package/dist/utils/index.d.ts +37 -13
  62. package/dist/utils/index.js +63 -35
  63. package/dist/utils/index.js.map +1 -1
  64. package/package.json +2 -2
  65. package/skills/tech-stack/SKILL.md +253 -97
@@ -1,8 +1,8 @@
1
- export { i as AfterIterationHook, j as AfterRunHook, k as AfterToolExecutionHook, l as AgentExtension, B as BeforeIterationHook, m as BeforeRunHook, n as BeforeToolExecutionHook, E as ExtensionRegistry, O as OnErrorHook, v as ProviderRunnerFn, t as ProviderRunnerWrapper } from '../index-4VVHuTZF.js';
2
- import '../context-hvXINa6a.js';
1
+ export { i as AfterIterationHook, j as AfterRunHook, k as AfterToolExecutionHook, l as AgentExtension, B as BeforeIterationHook, m as BeforeRunHook, n as BeforeToolExecutionHook, E as ExtensionRegistry, O as OnErrorHook, v as ProviderRunnerFn, t as ProviderRunnerWrapper } from '../index-CPweVoFM.js';
2
+ import '../context-C7G_MtLV.js';
3
3
  import '../logger-B63L5bTg.js';
4
- import '../pipeline-CqF7uju2.js';
5
- import '../config-DZV9VK9n.js';
4
+ import '../pipeline-BG7UgbDc.js';
5
+ import '../config-BaVThgnT.js';
6
6
  import '../observability-D-HZN_mF.js';
7
- import '../brain-NZZqL8sn.js';
8
- import '../permission-DhLrgA30.js';
7
+ import '../brain-Cp_3GIS2.js';
8
+ import '../permission-B7nKnEvQ.js';
@@ -1,14 +1,14 @@
1
1
  import { S as SkillLoader, a as SkillManifest, b as SkillEntry } from './skill-Bj6Ezqb8.js';
2
2
  import { W as WstackPaths } from './wstack-paths-DD50Omgn.js';
3
- import { P as Provider, C as Context } from './context-hvXINa6a.js';
4
- import { C as Compactor, a as CompactReport } from './compactor-C3stu664.js';
5
- import { M as MessageSelector } from './selector-BakeMnWR.js';
6
- import { E as EventBus } from './brain-NZZqL8sn.js';
7
- import { M as MiddlewareHandler } from './pipeline-CqF7uju2.js';
8
- import { S as SessionEventBridge } from './session-event-bridge-DE5Oekwx.js';
9
- import { C as ContextWindowAggressiveOn, g as ContextWindowPolicy } from './config-DZV9VK9n.js';
10
- import { g as Agent, D as DoneCondition } from './agent-subagent-runner-DXWImnNV.js';
11
- import { R as RunResult, S as SystemPromptContributor } from './index-4VVHuTZF.js';
3
+ import { P as Provider, C as Context } from './context-C7G_MtLV.js';
4
+ import { C as Compactor, a as CompactReport } from './compactor-BueGt7LG.js';
5
+ import { M as MessageSelector } from './selector-4vDFZKt3.js';
6
+ import { E as EventBus } from './brain-Cp_3GIS2.js';
7
+ import { M as MiddlewareHandler } from './pipeline-BG7UgbDc.js';
8
+ import { S as SessionEventBridge } from './session-event-bridge-DWlvglC2.js';
9
+ import { C as ContextWindowAggressiveOn, g as ContextWindowPolicy } from './config-BaVThgnT.js';
10
+ import { g as Agent, D as DoneCondition } from './agent-subagent-runner-1GeQE_L0.js';
11
+ import { R as RunResult, S as SystemPromptContributor } from './index-CPweVoFM.js';
12
12
 
13
13
  interface SkillLoaderOptions {
14
14
  paths: WstackPaths;
@@ -66,7 +66,9 @@ interface IntelligentCompactorOptions {
66
66
  * - Generate semantic summaries for old message ranges
67
67
  * - Make intelligent decisions about what to compact
68
68
  *
69
- * It extends HybridCompactor's elision logic with LLM-assisted summarization.
69
+ * It builds on the shared `compaction-core` elision/boundary primitives and
70
+ * adds LLM-assisted summarization on top. When the summarizer call fails it
71
+ * falls back to the same lossless rule-based digest used by HybridCompactor.
70
72
  */
71
73
  declare class IntelligentCompactor implements Compactor {
72
74
  private readonly provider;
@@ -87,15 +89,11 @@ declare class IntelligentCompactor implements Compactor {
87
89
  * This is the accurate figure for context-window pressure monitoring.
88
90
  */
89
91
  private estimateFullRequest;
92
+ /** Run shared tool-result elision and commit through ConversationState. */
93
+ private elide;
90
94
  private summarizeAncientTurns;
91
- private findSafeBoundary;
92
- private findExchangeStart;
93
95
  private callSummarizer;
94
96
  private messagesToText;
95
- private lightweightCompact;
96
- private eliseOldToolResults;
97
- private hasTextContent;
98
- private estimateTokens;
99
97
  }
100
98
 
101
99
  /**
@@ -179,6 +177,46 @@ declare class SelectiveCompactor implements Compactor {
179
177
  private roughTokenEstimate;
180
178
  }
181
179
 
180
+ type CompactorStrategy = 'hybrid' | 'intelligent' | 'selective';
181
+ interface StrategyCompactorOptions {
182
+ /** Which compactor to use. Defaults to 'hybrid' (lossless, no LLM). */
183
+ strategy?: CompactorStrategy | string | undefined;
184
+ /** Recent user/assistant pairs to always preserve. */
185
+ preserveK?: number | undefined;
186
+ /** Token threshold below which tool results are not elided. */
187
+ eliseThreshold?: number | undefined;
188
+ /**
189
+ * Enable content-aware smart digest for 'hybrid' strategy. When true,
190
+ * collapsed ancient turns use buildSmartDigest: critical content (errors,
191
+ * corrections, decisions) stays verbatim; normal exchanges get first-sentence
192
+ * summaries; noise (repeated failures, large tool outputs) is aggressively
193
+ * compressed. Defaults to false (lossless digest).
194
+ */
195
+ smart?: boolean | undefined;
196
+ /** Model used by the LLM-backed strategies for summarization/selection. */
197
+ summarizerModel?: string | undefined;
198
+ /**
199
+ * Legacy shortcut for `strategy: 'selective'`. When `strategy` is unset (or
200
+ * 'hybrid') and this is true, the selective (LLM-driven) compactor is used.
201
+ * An explicit `strategy` always wins.
202
+ */
203
+ llmSelector?: boolean | undefined;
204
+ }
205
+ /**
206
+ * Build the compactor named by `config.context.strategy`.
207
+ *
208
+ * - `hybrid` (default): lossless rule-based — no provider needed.
209
+ * - `intelligent` / `selective`: LLM-backed. These need a `provider`, which is
210
+ * only known per-run, so we return a thin wrapper that resolves the concrete
211
+ * compactor from `ctx` at `compact()`-time. This deliberately avoids the
212
+ * container/provider construction-ordering problem: `TOKENS.Compactor` is
213
+ * resolved (and memoized) before `context.provider` exists, but `ctx.provider`
214
+ * is always present once a run is actually compacting. If no provider is
215
+ * available at compact-time the wrapper degrades to the lossless hybrid rules
216
+ * rather than failing.
217
+ */
218
+ declare function createStrategyCompactor(opts?: StrategyCompactorOptions): Compactor;
219
+
182
220
  type CompactionFailureMode = 'throw' | 'throw_on_hard' | 'continue';
183
221
  interface AutoCompactionOptions {
184
222
  aggressiveOn?: ContextWindowAggressiveOn | undefined;
@@ -375,4 +413,4 @@ declare function makeAutonomyPromptContributor(opts: AutonomyPromptContributorOp
375
413
  */
376
414
  declare function buildGoalPreamble(goal: string, deliverables?: string[]): string;
377
415
 
378
- export { AutoCompactionMiddleware as A, DefaultSkillLoader as D, IntelligentCompactor as I, SelectiveCompactor as S, AutonomousRunner as a, type AutonomousRunnerOptions as b, type AutonomyPromptContributorOptions as c, type DoneCheckResult as d, DoneConditionChecker as e, type IntelligentCompactorOptions as f, type SelectiveCompactorOptions as g, type SkillLoaderOptions as h, buildGoalPreamble as i, makeAutonomyPromptContributor as m };
416
+ export { AutoCompactionMiddleware as A, type CompactorStrategy as C, DefaultSkillLoader as D, IntelligentCompactor as I, SelectiveCompactor as S, AutonomousRunner as a, type AutonomousRunnerOptions as b, type AutonomyPromptContributorOptions as c, type DoneCheckResult as d, DoneConditionChecker as e, type IntelligentCompactorOptions as f, type SelectiveCompactorOptions as g, type SkillLoaderOptions as h, type StrategyCompactorOptions as i, buildGoalPreamble as j, createStrategyCompactor as k, makeAutonomyPromptContributor as m };
@@ -1,15 +1,15 @@
1
- import { T as Token, a as Renderer, S as SystemPromptBuilder, H as HookRegistry } from './pipeline-CqF7uju2.js';
2
- import { E as EventBus, l as MemoryStore, b as BrainArbiter } from './brain-NZZqL8sn.js';
3
- import { C as Compactor } from './compactor-C3stu664.js';
4
- import { j as ConfigLoader, i as ConfigStore, M as ModelsRegistry } from './config-DZV9VK9n.js';
5
- import { E as ErrorHandler, R as RetryPolicy } from './retry-policy-B4Q-FZgE.js';
1
+ import { T as Token, a as Renderer, S as SystemPromptBuilder, H as HookRegistry } from './pipeline-BG7UgbDc.js';
2
+ import { E as EventBus, l as MemoryStore, b as BrainArbiter } from './brain-Cp_3GIS2.js';
3
+ import { C as Compactor } from './compactor-BueGt7LG.js';
4
+ import { j as ConfigLoader, i as ConfigStore, M as ModelsRegistry } from './config-BaVThgnT.js';
5
+ import { E as ErrorHandler, R as RetryPolicy } from './retry-policy-rutAfVeR.js';
6
6
  import { I as InputReader } from './input-reader-E-ffP2ee.js';
7
7
  import { L as Logger } from './logger-B63L5bTg.js';
8
8
  import { M as ModeStore } from './mode-CZlO9iU1.js';
9
9
  import { P as PathResolver } from './path-resolver-CPRj4bFY.js';
10
- import { P as PermissionPolicy, S as SecretScrubber } from './permission-DhLrgA30.js';
11
- import { P as ProviderRunner } from './provider-runner-BPlI5sPZ.js';
12
- import { c as TokenCounter, i as SessionStore } from './context-hvXINa6a.js';
10
+ import { P as PermissionPolicy, S as SecretScrubber } from './permission-B7nKnEvQ.js';
11
+ import { P as ProviderRunner } from './provider-runner-BNpuIyOL.js';
12
+ import { c as TokenCounter, i as SessionStore } from './context-C7G_MtLV.js';
13
13
  import { S as SkillLoader } from './skill-Bj6Ezqb8.js';
14
14
 
15
15
  /**
@@ -1,10 +1,10 @@
1
- import { l as TextBlock, T as Tool, m as ToolUseBlock, C as Context, n as ToolResultBlock, R as Request, b as Response, P as Provider, g as ContentBlock, a1 as WrongStackError } from './context-hvXINa6a.js';
1
+ import { l as TextBlock, T as Tool, m as ToolUseBlock, C as Context, n as ToolResultBlock, R as Request, b as Response, P as Provider, g as ContentBlock, a1 as WrongStackError } from './context-C7G_MtLV.js';
2
2
  import { L as Logger } from './logger-B63L5bTg.js';
3
- import { B as BuildContext, H as HookRegistry, a as Renderer, P as Pipeline, C as Container } from './pipeline-CqF7uju2.js';
4
- import { H as HookEvent, W as WireFamily, P as ProviderConfig } from './config-DZV9VK9n.js';
3
+ import { B as BuildContext, H as HookRegistry, a as Renderer, P as Pipeline, C as Container } from './pipeline-BG7UgbDc.js';
4
+ import { H as HookEvent, W as WireFamily, P as ProviderConfig } from './config-BaVThgnT.js';
5
5
  import { T as Tracer } from './observability-D-HZN_mF.js';
6
- import { E as EventBus } from './brain-NZZqL8sn.js';
7
- import { P as PermissionPolicy, S as SecretScrubber } from './permission-DhLrgA30.js';
6
+ import { E as EventBus } from './brain-Cp_3GIS2.js';
7
+ import { P as PermissionPolicy, S as SecretScrubber } from './permission-B7nKnEvQ.js';
8
8
 
9
9
  /**
10
10
  * A contributor that injects additional TextBlocks into the system prompt.
package/dist/index.d.ts CHANGED
@@ -1,72 +1,72 @@
1
- import { S as SystemPromptBuilder, b as ModelCapabilities, B as BuildContext, C as Container, H as HookRegistry } from './pipeline-CqF7uju2.js';
2
- export { c as BindOptions, D as Decorator, F as Factory, d as Middleware, M as MiddlewareHandler, N as NextFn, P as Pipeline, e as PipelineOptions, a as Renderer, T as Token, h as hookMatcherMatches } from './pipeline-CqF7uju2.js';
3
- import { E as EventBus, l as MemoryStore, c as EventName, L as Listener, b as BrainArbiter } from './brain-NZZqL8sn.js';
4
- export { B as BrainDecision, d as BrainDecisionOption, e as BrainDecisionQueue, a as BrainDecisionRequest, f as BrainDecisionSource, g as BrainFallback, h as BrainRisk, D as DefaultBrainArbiter, i as DefaultBrainArbiterOptions, n as EventLogger, o as EventMap, H as HumanEscalatingBrainArbiter, p as MEMORY_TYPE_LABELS, q as MemoryClearedPayload, r as MemoryConsolidatedPayload, k as MemoryEntry, s as MemoryForgottenPayload, t as MemoryPriority, m as MemoryRelevanceContext, u as MemoryRememberedPayload, M as MemoryScope, v as MemoryType, O as ObservableBrainArbiter, w as ScopedEventBus, S as ScoredEntry, j as formatHumanPrompt } from './brain-NZZqL8sn.js';
5
- import { W as WorktreeManager } from './index-Cj3le7TI.js';
6
- export { A as AllocateOpts, M as MergeOpts, a as MergeResult, R as RunController, b as RunControllerOptions, T as TOKENS, c as WorktreeHandle, d as WorktreeManagerOptions, e as WorktreeRunResult, f as WorktreeStatus, g as assertSafePath } from './index-Cj3le7TI.js';
7
- import { C as Context, P as Provider, T as Tool, R as Request, b as Response, g as ContentBlock, l as TextBlock, M as Message } from './context-hvXINa6a.js';
8
- export { A as AgentError, k as Capabilities, u as ConfigError, v as ContextInit, t as ConversationState, E as ERROR_CODES, w as ErrorCode, x as ErrorSeverity, y as ErrorSubsystem, F as FileSnapshot, z as FsError, I as ImageBlock, J as JSONSchema, B as MessageRole, f as Permission, D as PluginError, e as ProviderError, G as ProviderErrorBody, H as ReadonlyConversationState, p as ResumedSession, K as RiskTier, L as RunEnv, o as RunOptions, q as SessionData, N as SessionError, S as SessionEvent, h as SessionMetadata, i as SessionStore, r as SessionSummary, a as SessionWriter, O as StateChange, Q as StateChangeHandler, V as StopReason, W as StreamEvent, X as StreamHangError, Y as ThinkingBlock, s as TodoItem, c as TokenCounter, Z as ToolCallContext, _ as ToolError, $ as ToolFinalEvent, j as ToolProgressEvent, n as ToolResultBlock, a0 as ToolStreamEvent, m as ToolUseBlock, U as Usage, a1 as WrongStackError, a2 as asBlocks, a3 as asText, a4 as extractRunEnv, a5 as isAgentError, a6 as isConfigError, a7 as isFsError, a8 as isImageBlock, a9 as isPluginError, aa as isSessionError, ab as isTextBlock, ac as isThinkingBlock, ad as isToolError, ae as isToolResultBlock, af as isToolUseBlock, ag as isWrongStackError, ah as toWrongStackError, ai as wrapAsState } from './context-hvXINa6a.js';
9
- import { P as ProviderRunner, R as RunProviderOptions$1 } from './provider-runner-BPlI5sPZ.js';
10
- import { c as MCPServerConfig, h as Config, l as HookInput, m as HookOutcome, H as HookEvent, e as HookMatcher, I as InProcessHook, d as ModelMatrixEntry, i as ConfigStore } from './config-DZV9VK9n.js';
11
- export { A as AutonomyConfig, n as CONTEXT_WINDOW_MODES, j as ConfigLoader, o as ContextConfig, C as ContextWindowAggressiveOn, p as ContextWindowConfigLike, q as ContextWindowMode, r as ContextWindowModeId, g as ContextWindowPolicy, s as ContextWindowThresholds, t as CustomModelDefinition, D as DEFAULT_CONTEXT_WINDOW_MODE_ID, F as FeaturesConfig, f as HookEntry, u as IndexingConfig, L as LaunchConfig, v as LogConfig, a as ModelsDevPayload, w as ModelsDevProvider, M as ModelsRegistry, x as PluginConfig, y as ProviderApiKey, P as ProviderConfig, b as ResolvedModel, R as ResolvedProvider, z as SessionLoggingConfig, S as ShellHook, B as SyncCategory, k as SyncConfig, T as ToolsConfig, W as WireFamily, E as formatContextWindowModeList, G as getContextWindowMode, J as isContextWindowModeId, K as listContextWindowModes, N as resolveContextWindowPolicy } from './config-DZV9VK9n.js';
12
- export { a as CompactReport, C as Compactor } from './compactor-C3stu664.js';
13
- export { a as PermissionDecision, P as PermissionPolicy, S as SecretScrubber, T as TrustPolicy } from './permission-DhLrgA30.js';
1
+ import { S as SystemPromptBuilder, b as ModelCapabilities, B as BuildContext, C as Container, H as HookRegistry } from './pipeline-BG7UgbDc.js';
2
+ export { c as BindOptions, D as Decorator, F as Factory, d as Middleware, M as MiddlewareHandler, N as NextFn, P as Pipeline, e as PipelineOptions, a as Renderer, T as Token, h as hookMatcherMatches } from './pipeline-BG7UgbDc.js';
3
+ import { E as EventBus, l as MemoryStore, c as EventName, L as Listener, b as BrainArbiter } from './brain-Cp_3GIS2.js';
4
+ export { B as BrainDecision, d as BrainDecisionOption, e as BrainDecisionQueue, a as BrainDecisionRequest, f as BrainDecisionSource, g as BrainFallback, h as BrainRisk, D as DefaultBrainArbiter, i as DefaultBrainArbiterOptions, n as EventLogger, o as EventMap, H as HumanEscalatingBrainArbiter, p as MEMORY_TYPE_LABELS, q as MemoryClearedPayload, r as MemoryConsolidatedPayload, k as MemoryEntry, s as MemoryForgottenPayload, t as MemoryPriority, m as MemoryRelevanceContext, u as MemoryRememberedPayload, M as MemoryScope, v as MemoryType, O as ObservableBrainArbiter, w as ScopedEventBus, S as ScoredEntry, j as formatHumanPrompt } from './brain-Cp_3GIS2.js';
5
+ import { W as WorktreeManager } from './index-BZdezm3g.js';
6
+ export { A as AllocateOpts, M as MergeOpts, a as MergeResult, R as RunController, b as RunControllerOptions, T as TOKENS, c as WorktreeHandle, d as WorktreeManagerOptions, e as WorktreeRunResult, f as WorktreeStatus, g as assertSafePath } from './index-BZdezm3g.js';
7
+ import { C as Context, P as Provider, T as Tool, R as Request, b as Response, g as ContentBlock, l as TextBlock, M as Message } from './context-C7G_MtLV.js';
8
+ export { A as AgentError, k as Capabilities, u as ConfigError, v as ContextInit, t as ConversationState, E as ERROR_CODES, w as ErrorCode, x as ErrorSeverity, y as ErrorSubsystem, F as FileSnapshot, z as FsError, I as ImageBlock, J as JSONSchema, B as MessageRole, f as Permission, D as PluginError, e as ProviderError, G as ProviderErrorBody, H as ReadonlyConversationState, p as ResumedSession, K as RiskTier, L as RunEnv, o as RunOptions, q as SessionData, N as SessionError, S as SessionEvent, h as SessionMetadata, i as SessionStore, r as SessionSummary, a as SessionWriter, O as StateChange, Q as StateChangeHandler, V as StopReason, W as StreamEvent, X as StreamHangError, Y as ThinkingBlock, s as TodoItem, c as TokenCounter, Z as ToolCallContext, _ as ToolError, $ as ToolFinalEvent, j as ToolProgressEvent, n as ToolResultBlock, a0 as ToolStreamEvent, m as ToolUseBlock, U as Usage, a1 as WrongStackError, a2 as asBlocks, a3 as asText, a4 as extractRunEnv, a5 as isAgentError, a6 as isConfigError, a7 as isFsError, a8 as isImageBlock, a9 as isPluginError, aa as isSessionError, ab as isTextBlock, ac as isThinkingBlock, ad as isToolError, ae as isToolResultBlock, af as isToolUseBlock, ag as isWrongStackError, ah as toWrongStackError, ai as wrapAsState } from './context-C7G_MtLV.js';
9
+ import { P as ProviderRunner, R as RunProviderOptions$1 } from './provider-runner-BNpuIyOL.js';
10
+ import { c as MCPServerConfig, h as Config, l as HookInput, m as HookOutcome, H as HookEvent, e as HookMatcher, I as InProcessHook, d as ModelMatrixEntry, i as ConfigStore } from './config-BaVThgnT.js';
11
+ export { A as AutonomyConfig, n as CONTEXT_WINDOW_MODES, j as ConfigLoader, o as ContextConfig, C as ContextWindowAggressiveOn, p as ContextWindowConfigLike, q as ContextWindowMode, r as ContextWindowModeId, g as ContextWindowPolicy, s as ContextWindowThresholds, t as CustomModelDefinition, D as DEFAULT_CONTEXT_WINDOW_MODE_ID, F as FeaturesConfig, f as HookEntry, u as IndexingConfig, L as LaunchConfig, v as LogConfig, a as ModelsDevPayload, w as ModelsDevProvider, M as ModelsRegistry, x as PluginConfig, y as ProviderApiKey, P as ProviderConfig, b as ResolvedModel, R as ResolvedProvider, z as SessionLoggingConfig, S as ShellHook, B as SyncCategory, k as SyncConfig, T as ToolsConfig, W as WireFamily, E as formatContextWindowModeList, G as getContextWindowMode, J as isContextWindowModeId, K as listContextWindowModes, N as resolveContextWindowPolicy } from './config-BaVThgnT.js';
12
+ export { a as CompactReport, C as Compactor } from './compactor-BueGt7LG.js';
13
+ export { a as PermissionDecision, P as PermissionPolicy, S as SecretScrubber, T as TrustPolicy } from './permission-B7nKnEvQ.js';
14
14
  export { C as CheckpointInfo, R as RewindResult, a as RewindResultExtended, S as SessionRewinder } from './session-rewinder-C9HnMkhP.js';
15
- import { A as AttachmentStore, b as AttachmentRef, a as AddAttachmentInput } from './session-reader-DFC81-4p.js';
16
- export { c as Attachment, d as AttachmentKind, e as AttachmentMeta, D as DefaultSessionReader, f as DefaultSessionReaderOptions, S as SessionReader } from './session-reader-DFC81-4p.js';
15
+ import { A as AttachmentStore, b as AttachmentRef, a as AddAttachmentInput } from './session-reader-BAtCxdaw.js';
16
+ export { c as Attachment, d as AttachmentKind, e as AttachmentMeta, D as DefaultSessionReader, f as DefaultSessionReaderOptions, S as SessionReader } from './session-reader-BAtCxdaw.js';
17
17
  export { D as DEFAULT_AUTONOMY_CONFIG, a as DEFAULT_CONTEXT_CONFIG, b as DEFAULT_SESSION_LOGGING_CONFIG, c as DEFAULT_SESSION_PRUNE_DAYS, d as DEFAULT_TOOLS_CONFIG } from './default-config-CXsDvOmP.js';
18
- import { a as DefaultSecretVault } from './secret-vault-B7GnL6o9.js';
19
- export { D as DefaultSecretScrubber, S as SecretVaultOptions, d as decryptConfigSecrets, e as encryptConfigSecrets, m as migratePlaintextSecrets, r as rewriteConfigEncrypted } from './secret-vault-B7GnL6o9.js';
18
+ import { a as DefaultSecretVault } from './secret-vault-BTcC_T5v.js';
19
+ export { D as DefaultSecretScrubber, S as SecretVaultOptions, d as decryptConfigSecrets, e as encryptConfigSecrets, i as isSecretField, m as migratePlaintextSecrets, r as rewriteConfigEncrypted } from './secret-vault-BTcC_T5v.js';
20
20
  import { D as DefaultLogger } from './logger-B9J5puGM.js';
21
21
  export { a as DefaultLoggerOptions } from './logger-B9J5puGM.js';
22
- import { D as DefaultPathResolver } from './path-resolver-gfoGxpdd.js';
23
- export { a as DefaultTokenCounter } from './path-resolver-gfoGxpdd.js';
24
- export { C as CompactorOptions, g as DEFAULT_RECOVERY_STRATEGIES, D as DefaultErrorHandler, a as DefaultRetryPolicy, E as EternalAutonomyEngine, b as EternalAutonomyOptions, c as EternalEngineState, H as HybridCompactor, I as IterationStage, P as ParallelEngineState, d as ParallelEternalEngine, e as ParallelEternalOptions, f as ParallelIterationStage, R as RecoveryStrategy, T as ToolExecutor, h as buildRecoveryStrategies } from './parallel-eternal-engine-uxVm4y4V.js';
22
+ import { D as DefaultPathResolver } from './path-resolver-DRjQBkoO.js';
23
+ export { a as DefaultTokenCounter } from './path-resolver-DRjQBkoO.js';
24
+ export { C as CompactorOptions, g as DEFAULT_RECOVERY_STRATEGIES, D as DefaultErrorHandler, a as DefaultRetryPolicy, E as EternalAutonomyEngine, b as EternalAutonomyOptions, c as EternalEngineState, H as HybridCompactor, I as IterationStage, P as ParallelEngineState, d as ParallelEternalEngine, e as ParallelEternalOptions, f as ParallelIterationStage, R as RecoveryStrategy, T as ToolExecutor, h as buildRecoveryStrategies } from './parallel-eternal-engine-C75QuhAI.js';
25
25
  import { S as SkillLoader } from './skill-Bj6Ezqb8.js';
26
26
  export { b as SkillEntry, a as SkillManifest } from './skill-Bj6Ezqb8.js';
27
27
  export { I as InputReader, P as PromptOption } from './input-reader-E-ffP2ee.js';
28
- import { z as SlashCommand, P as PluginAPI, E as PluginPipelines, G as ToolRegistryView, H as ProviderRegistryView, I as MCPRegistryView, J as SlashCommandRegistryView, K as SessionWriterView, L as MetricsSinkView, N as Plugin } from './agent-subagent-runner-DXWImnNV.js';
29
- export { g as Agent, h as AgentFactory, i as AgentFactoryResult, j as AgentRunnerOptions, k as BudgetExceededError, l as BudgetKind, m as BudgetLimits, r as BudgetUsage, O as CoordinatorEvents, C as CoordinatorStatus, D as DoneCondition, F as FleetBus, s as FleetEvent, t as FleetHandler, u as FleetUsage, v as FleetUsageAggregator, c as MultiAgentConfig, M as MultiAgentCoordinator, Q as PluginCapabilities, R as PluginDependency, e as SpawnResult, w as SubagentBudget, S as SubagentConfig, U as SubagentContext, V as SubagentError, W as SubagentErrorKind, X as SubagentRunContext, Y as SubagentRunOutcome, d as SubagentRunner, x as SubagentUsageSnapshot, Z as TaskDelegation, f as TaskResult, T as TaskSpec, y as makeAgentSubagentRunner } from './agent-subagent-runner-DXWImnNV.js';
30
- export { D as DefaultModelsRegistry, a as DefaultModelsRegistryOptions, c as classifyFamily } from './models-registry-BzlsjKcy.js';
28
+ import { z as SlashCommand, P as PluginAPI, E as PluginPipelines, G as ToolRegistryView, H as ProviderRegistryView, I as MCPRegistryView, J as SlashCommandRegistryView, K as SessionWriterView, L as MetricsSinkView, N as Plugin } from './agent-subagent-runner-1GeQE_L0.js';
29
+ export { g as Agent, h as AgentFactory, i as AgentFactoryResult, j as AgentRunnerOptions, k as BudgetExceededError, l as BudgetKind, m as BudgetLimits, r as BudgetUsage, O as CoordinatorEvents, C as CoordinatorStatus, D as DoneCondition, F as FleetBus, s as FleetEvent, t as FleetHandler, u as FleetUsage, v as FleetUsageAggregator, c as MultiAgentConfig, M as MultiAgentCoordinator, Q as PluginCapabilities, R as PluginDependency, e as SpawnResult, w as SubagentBudget, S as SubagentConfig, U as SubagentContext, V as SubagentError, W as SubagentErrorKind, X as SubagentRunContext, Y as SubagentRunOutcome, d as SubagentRunner, x as SubagentUsageSnapshot, Z as TaskDelegation, f as TaskResult, T as TaskSpec, y as makeAgentSubagentRunner } from './agent-subagent-runner-1GeQE_L0.js';
30
+ export { D as DefaultModelsRegistry, a as DefaultModelsRegistryOptions, c as classifyFamily } from './models-registry-D90K9UnM.js';
31
31
  import { M as ModeStore } from './mode-CZlO9iU1.js';
32
32
  export { D as DEFAULT_MODES, b as Mode, a as ModeConfig, c as ModeManifest } from './mode-CZlO9iU1.js';
33
- export { I as InMemoryAgentBridge, a as InMemoryBridgeTransport, c as createMessage } from './agent-bridge-PRAbEX-9.js';
33
+ export { I as InMemoryAgentBridge, a as InMemoryBridgeTransport, c as createMessage } from './agent-bridge-r9y6gdn4.js';
34
34
  export { D as DEFAULT_SPEC_TEMPLATE, S as SpecAnalysis, a as SpecApiEndpoint, b as SpecRequirement, c as SpecSection, d as SpecSectionType, e as SpecStatus, f as SpecTemplate, g as SpecValidationResult, h as Specification } from './spec-TBi3Jr6T.js';
35
35
  import { d as TaskGraph, T as TaskType, a as TaskPriority, e as TaskNode } from './task-graph-u1q9Jkyk.js';
36
36
  export { C as CriticalPathResult, f as TaskAssignment, g as TaskDependency, h as TaskEdge, i as TaskFilter, c as TaskProgress, j as TaskSort, b as TaskStatus, k as computeTaskProgress, l as findCriticalPath, t as topologicalSort } from './task-graph-u1q9Jkyk.js';
37
37
  import { T as Tracer, M as MetricsSink, H as HealthRegistry } from './observability-D-HZN_mF.js';
38
38
  export { A as AggregateHealth, a as HealthCheck, b as HealthCheckResult, c as HealthStatus, d as MetricLabels, e as MetricSeries, f as MetricsSnapshot, S as Span } from './observability-D-HZN_mF.js';
39
- import { S as SystemPromptContributor, E as ExtensionRegistry, e as ToolRegistry, P as ProviderRegistry, c as ToolCallPipelinePayload } from './index-4VVHuTZF.js';
40
- export { i as AfterIterationHook, j as AfterRunHook, k as AfterToolExecutionHook, l as AgentExtension, g as AgentInit, h as AgentInput, A as AgentPipelines, B as BeforeIterationHook, m as BeforeRunHook, n as BeforeToolExecutionHook, D as DEFAULT_MAX_ITERATIONS, H as HookRunEnv, o as HookRunner, p as HookRunnerOptions, O as OnErrorHook, q as PreToolUseResult, r as PromptResult, s as ProviderFactory, t as ProviderRunnerWrapper, R as RunResult, d as ToolWrapper, U as UserInputPayload, u as createDefaultPipelines } from './index-4VVHuTZF.js';
39
+ import { S as SystemPromptContributor, E as ExtensionRegistry, e as ToolRegistry, P as ProviderRegistry, c as ToolCallPipelinePayload } from './index-CPweVoFM.js';
40
+ export { i as AfterIterationHook, j as AfterRunHook, k as AfterToolExecutionHook, l as AgentExtension, g as AgentInit, h as AgentInput, A as AgentPipelines, B as BeforeIterationHook, m as BeforeRunHook, n as BeforeToolExecutionHook, D as DEFAULT_MAX_ITERATIONS, H as HookRunEnv, o as HookRunner, p as HookRunnerOptions, O as OnErrorHook, q as PreToolUseResult, r as PromptResult, s as ProviderFactory, t as ProviderRunnerWrapper, R as RunResult, d as ToolWrapper, U as UserInputPayload, u as createDefaultPipelines } from './index-CPweVoFM.js';
41
41
  export { AutonomyStage } from './types/index.js';
42
- export { AtomicWriteOptions, BuildChildEnvOptions, CompileFail, CompileResult, FileLockOptions, MessageRepairReport, MessageRepairResult, NewlineStyle, OutputLineGuard, RequestTokenBreakdown, SafeParseResult, ToolOutputSerializerOptions, UnifiedDiffOptions, ValidationError, ValidationResult, atomicWrite, buildChildEnv, color, compileGlob, compileUserRegex, completePartialObject, createToolOutputSerializer, detectNewlineStyle, ensureDir, estimateRequestTokens, estimateRequestTokensCalibrated, estimateTextTokens, estimateToolDefTokens, estimateToolInputTokens, estimateToolResultTokens, expandGlob, formatTodosList, getCalibrationState, getTermSize, isInteractive, isStdinTTY, isStdoutTTY, matchAny, matchGlob, mergeCustomModelDefs, mergeModelsPayload, normalizeToLf, onResize, recordActualUsage, repairToolUseAdjacency, resetCalibration, safeParse, safeStringify, sanitizeJsonString, setOutputLineGuard, setRawMode, sleep, stripAnsi, toStyle, unifiedDiff, validateAgainstSchema, withFileLock, writeErr, writeOut } from './utils/index.js';
42
+ export { AtomicWriteOptions, BuildChildEnvOptions, CompileFail, CompileResult, FileLockOptions, MessageRepairReport, MessageRepairResult, NewlineStyle, OutputLineGuard, RequestTokenBreakdown, SafeParseResult, ToolOutputSerializerOptions, UnifiedDiffOptions, ValidationError, ValidationResult, assertNever, atomicWrite, buildChildEnv, color, compileGlob, compileUserRegex, completePartialObject, createToolOutputSerializer, detectNewlineStyle, ensureDir, estimateMessageTokens, estimateRequestTokens, estimateRequestTokensCalibrated, estimateTextTokens, estimateToolDefTokens, estimateToolInputTokens, estimateToolResultTokens, expandGlob, formatTodosList, getCalibrationState, getTermSize, isInteractive, isStdinTTY, isStdoutTTY, matchAny, matchGlob, mergeCustomModelDefs, mergeModelsPayload, normalizeToLf, onResize, recordActualUsage, repairToolUseAdjacency, resetCalibration, safeParse, safeStringify, sanitizeJsonString, setOutputLineGuard, setRawMode, sleep, stripAnsi, toStyle, unifiedDiff, validateAgainstSchema, withFileLock, writeErr, writeOut } from './utils/index.js';
43
43
  export { T as TaskItem, c as computeTaskItemProgress, f as formatTaskList, a as formatTaskProgress } from './task-format-vGOIftmK.js';
44
44
  import { W as WstackPaths } from './wstack-paths-DD50Omgn.js';
45
45
  export { a as WstackPathOptions, p as projectHash, b as projectSlug, r as resolveWstackPaths } from './wstack-paths-DD50Omgn.js';
46
46
  export { expectDefined } from './utils/expect-defined.js';
47
- export { A as AbandonedSession, a as AttachmentStoreOptions, C as ConfigLoaderOptions, b as ConfigMigration, c as ConfigMigrationError, d as ConfigSource, D as DEFAULT_CONFIG_MIGRATIONS, e as DefaultAttachmentStore, f as DefaultConfigLoader, g as DefaultConfigStore, h as DefaultMemoryStore, i as DefaultSessionStore, F as FileMemoryBackend, j as FileMemoryBackendOptions, M as MemoryBackend, k as MemoryStoreOptions, l as MigrationContext, m as MigrationResult, P as PersistedQueueItem, n as PlanFile, o as PlanItem, p as PlanTemplate, Q as QueueStore, R as RecoveryLock, q as RecoveryLockOptions, S as SessionAnalyzer, r as SessionStoreOptions, T as TodosCheckpointFile, s as addPlanItem, t as attachPlanCheckpoint, u as attachTodosCheckpoint, v as clearPlan, w as deriveTodosFromPlanItem, x as emptyPlan, y as formatPlan, z as formatPlanTemplates, B as getPlanTemplate, E as listPlanTemplates, G as loadPlan, H as loadTodosCheckpoint, I as parseEntries, J as removePlanItem, K as runConfigMigrations, L as savePlan, N as saveTodosCheckpoint, O as setPlanItemStatus } from './plan-templates-DoKhzenv.js';
48
- export { A as AuditLevel, C as CORE_RECONSTRUCT_EVENTS, a as STANDARD_AUDIT_EVENTS, S as SessionEventBridge, b as SessionEventBridgeOptions, c as SessionSamplingOptions, T as ToolProgressSamplingOptions, d as createSessionEventBridge, r as resolveAuditLevel, e as resolveSessionLoggingConfig } from './session-event-bridge-DE5Oekwx.js';
47
+ export { A as AbandonedSession, a as AttachmentStoreOptions, C as ConfigLoaderOptions, b as ConfigMigration, c as ConfigMigrationError, d as ConfigSource, D as DEFAULT_CONFIG_MIGRATIONS, e as DefaultAttachmentStore, f as DefaultConfigLoader, g as DefaultConfigStore, h as DefaultMemoryStore, i as DefaultSessionStore, F as FileMemoryBackend, j as FileMemoryBackendOptions, M as MemoryBackend, k as MemoryStoreOptions, l as MigrationContext, m as MigrationResult, P as PersistedQueueItem, n as PlanFile, o as PlanItem, p as PlanTemplate, Q as QueueStore, R as RecoveryLock, q as RecoveryLockOptions, S as SessionAnalyzer, r as SessionStoreOptions, T as TodosCheckpointFile, s as addPlanItem, t as attachPlanCheckpoint, u as attachTodosCheckpoint, v as clearPlan, w as deriveTodosFromPlanItem, x as emptyPlan, y as formatPlan, z as formatPlanTemplates, B as getPlanTemplate, E as listPlanTemplates, G as loadPlan, H as loadTodosCheckpoint, I as parseEntries, J as removePlanItem, K as runConfigMigrations, L as savePlan, N as saveTodosCheckpoint, O as setPlanItemStatus } from './plan-templates-CkKNPU3I.js';
48
+ export { A as AuditLevel, C as CORE_RECONSTRUCT_EVENTS, a as STANDARD_AUDIT_EVENTS, S as SessionEventBridge, b as SessionEventBridgeOptions, c as SessionSamplingOptions, T as ToolProgressSamplingOptions, d as createSessionEventBridge, r as resolveAuditLevel, e as resolveSessionLoggingConfig } from './session-event-bridge-DWlvglC2.js';
49
49
  export { a as DirectorStateCheckpoint, D as DirectorStateSnapshot, b as DirectorSubagentState, c as DirectorTaskState, l as loadDirectorState } from './director-state-BfeCUbmk.js';
50
- export { A as AutoApprovePermissionPolicy, D as DefaultPermissionPolicy, P as PermissionPolicyOptions } from './permission-policy-DGOvne7i.js';
51
- export { A as AutoCompactionMiddleware, a as AutonomousRunner, b as AutonomousRunnerOptions, c as AutonomyPromptContributorOptions, D as DefaultSkillLoader, d as DoneCheckResult, e as DoneConditionChecker, I as IntelligentCompactor, f as IntelligentCompactorOptions, S as SelectiveCompactor, g as SelectiveCompactorOptions, h as SkillLoaderOptions, i as buildGoalPreamble, m as makeAutonomyPromptContributor } from './goal-preamble-COpt55W8.js';
50
+ export { A as AutoApprovePermissionPolicy, D as DefaultPermissionPolicy, P as PermissionPolicyOptions } from './permission-policy-8-6zBmfA.js';
51
+ export { A as AutoCompactionMiddleware, a as AutonomousRunner, b as AutonomousRunnerOptions, c as AutonomyPromptContributorOptions, C as CompactorStrategy, D as DefaultSkillLoader, d as DoneCheckResult, e as DoneConditionChecker, I as IntelligentCompactor, f as IntelligentCompactorOptions, S as SelectiveCompactor, g as SelectiveCompactorOptions, h as SkillLoaderOptions, i as StrategyCompactorOptions, j as buildGoalPreamble, k as createStrategyCompactor, m as makeAutonomyPromptContributor } from './goal-preamble-CYJLg0wk.js';
52
52
  export { DefaultProviderRunner } from './defaults/index.js';
53
- 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, n as CreateDelegateToolOptions, D as DEFAULT_DIRECTOR_PREAMBLE, q as DEFAULT_SUBAGENT_BASELINE, r as DelegateHost, s as Director, 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, O as NULL_FLEET_BUS, R as REFACTOR_PLANNER_AGENT, S as SECURITY_SCANNER_AGENT, V as SubagentPromptParts, W as applyRosterBudget, X as attachAutoExtend, Y as composeDirectorPrompt, Z as composeSubagentPrompt, _ as createDelegateTool, $ as getAgentDefinition, 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, af as rosterSummaryFromConfigs } from './null-fleet-bus-CyH2YqP4.js';
54
- export { b as AgentBudgetTier, c as AgentCapability, A as AgentDefinition, d as AgentPhase, e as DEFAULT_DISPATCH_ROLE, a as DefaultMultiAgentCoordinator, f as DispatchCandidate, D as DispatchClassifier, g as DispatchMethod, h as DispatchOptions, i as DispatchResult, j as MultiAgentCoordinatorOptions, k as dispatchAgent, m as makeLLMClassifier, s as scoreAgents } from './multi-agent-coordinator-CmDmUgq2.js';
55
- export { D as DefaultModeStore, L as LLMSelector, a as LLMSelectorOptions, M as ModeLoaderOptions, l as loadProjectModes, b as loadUserModes } from './llm-selector-Bmx4PsVM.js';
53
+ 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, n as CreateDelegateToolOptions, D as DEFAULT_DIRECTOR_PREAMBLE, q as DEFAULT_SUBAGENT_BASELINE, r as DelegateHost, s as Director, 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, O as NULL_FLEET_BUS, R as REFACTOR_PLANNER_AGENT, S as SECURITY_SCANNER_AGENT, V as SubagentPromptParts, W as applyRosterBudget, X as attachAutoExtend, Y as composeDirectorPrompt, Z as composeSubagentPrompt, _ as createDelegateTool, $ as getAgentDefinition, 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, af as rosterSummaryFromConfigs } from './null-fleet-bus-BUyfqh23.js';
54
+ export { b as AgentBudgetTier, c as AgentCapability, A as AgentDefinition, d as AgentPhase, e as DEFAULT_DISPATCH_ROLE, a as DefaultMultiAgentCoordinator, f as DispatchCandidate, D as DispatchClassifier, g as DispatchMethod, h as DispatchOptions, i as DispatchResult, j as MultiAgentCoordinatorOptions, k as dispatchAgent, m as makeLLMClassifier, s as scoreAgents } from './multi-agent-coordinator-QWEzJDlm.js';
55
+ export { D as DefaultModeStore, L as LLMSelector, a as LLMSelectorOptions, M as ModeLoaderOptions, l as loadProjectModes, b as loadUserModes } from './llm-selector-CP72f1lC.js';
56
56
  import { TaskStore } from './sdd/index.js';
57
57
  export { AISpecBuilder, AISpecBuilderOptions, AISpecPhase, AISpecSession, AutoExecutor, AutoExecutorOptions, BottleneckTask, CollectedAnswer, CriticalPathAnalysis, DefaultTaskStore, ExecutionSummary, GeneratedTask, SPEC_TEMPLATES, SddParallelRun, SddParallelRunOptions, SddProgress, SddTaskDecomposer, SddTaskDecomposerOptions, SpecDiff, SpecDrivenDev, SpecDrivenDevOptions, SpecIndexEntry, SpecParser, SpecStore, SpecStoreOptions, SpecVersion, SpecVersioning, TaskBatch, TaskExecutionContext, TaskExecutionResult, TaskFlow, TaskFlowEventMap, TaskFlowEventName, TaskFlowExecutionContext, TaskFlowOptions, TaskFlowPhase, TaskGenerator, TaskGeneratorOptions, TaskGraphIndexEntry, TaskGraphStore, TaskGraphStoreOptions, TaskTracker, TaskTrackerOptions, TaskTransition, WaveResult, analyzeCriticalPath, createAutoExecutor, getTemplate, listTemplates, renderProgress, renderSpecAnalysis, renderTaskGraph, renderTaskList, templateToMarkdown } from './sdd/index.js';
58
58
  export { DefaultHealthRegistry, InMemoryMetricsSink, MetricsServerHandle, MetricsServerOptions, NoopMetricsSink, NoopTracer, OTelTracer, OtlpMetricsExporterHandle, OtlpMetricsExporterOptions, OtlpTraceExporterHandle, OtlpTraceExporterOptions, PROMETHEUS_CONTENT_TYPE, buildOtlpMetricsRequest, buildOtlpTracesRequest, renderPrometheus, startMetricsServer, startOtlpMetricsExporter, startOtlpTraceExporter, wireMetricsToEvents } from './observability/index.js';
59
- export { C as ContextManagerAction, a as ContextManagerInput, b as ContextManagerResult, c as ContextManagerToolOptions, d as allServers, e as awsServer, f as blockServer, g as braveSearchServer, h as context7Server, i as contextManagerTool, j as createContextManagerTool, k as everArtServer, l as filesystemServer, m as githubServer, n as googleMapsServer, o as miniMaxVisionServer, s as sentinelServer, p as slackServer, z as zaiVisionServer } from './mcp-servers-CofNHOqn.js';
59
+ export { C as ContextManagerAction, a as ContextManagerInput, b as ContextManagerResult, c as ContextManagerToolOptions, d as allServers, e as awsServer, f as blockServer, g as braveSearchServer, h as context7Server, i as contextManagerTool, j as createContextManagerTool, k as everArtServer, l as filesystemServer, m as githubServer, n as googleMapsServer, o as miniMaxVisionServer, s as sentinelServer, p as slackServer, z as zaiVisionServer } from './mcp-servers-Bl5LTvQg.js';
60
60
  export { DownloadResult, InstallResult, InstalledSkillEntry, ManifestData, ParsedRef, SkillInstaller, SkillInstallerOptions, SkillManifestStore, UpdateResult, downloadGitHubTarball, parseSkillRef } from './skills/index.js';
61
61
  import { ReplayLogStore, DefaultPromptStore } from './storage/index.js';
62
62
  export { ALL_SYNC_CATEGORIES, Annotation, AnnotationsStore, AnnotationsStoreOptions, AuditEntry, CloudSync, ConsolidationOp, DefaultSessionRewinder, GraphMemoryBackend, GraphMemoryBackendOptions, MemoryConsolidatorOptions, PromptEntry, PromptStore, RecoveryPlan, ReplayEntry, ReplayLogStoreOptions, SessionMemoryConsolidator, SessionRecovery, SessionRewinderOptions, StaleSession, SyncResult, TaskFile, ToolAuditLog, ToolAuditLogOptions, VerifyResult, emptyTaskFile, loadTasks, saveTasks } from './storage/index.js';
63
63
  export { G as GoalFile, J as JournalEntry, M as MAX_JOURNAL_ENTRIES, a as MAX_PROGRESS_HISTORY, P as ProgressSnapshot, b as appendJournal, e as emptyGoal, f as formatGoal, g as goalFilePath, l as loadGoal, p as parseProgressFromText, r as recordProgress, s as saveGoal, c as setProgress, d as summarizeUsage } from './goal-store-CV9Yz2X_.js';
64
- import { R as RetryPolicy, E as ErrorHandler } from './retry-policy-B4Q-FZgE.js';
64
+ import { R as RetryPolicy, E as ErrorHandler } from './retry-policy-rutAfVeR.js';
65
65
  import { L as Logger } from './logger-B63L5bTg.js';
66
66
  export { a as LogLevel } from './logger-B63L5bTg.js';
67
67
  export { S as SecretVault } from './secret-vault-DoISxaKO.js';
68
68
  import './path-resolver-CPRj4bFY.js';
69
- import './selector-BakeMnWR.js';
69
+ import './selector-4vDFZKt3.js';
70
70
  import 'node:events';
71
71
 
72
72
  /**
@@ -710,7 +710,7 @@ declare class InputBuilder {
710
710
  private shouldCollapse;
711
711
  }
712
712
 
713
- declare const LAYER_1_IDENTITY = "You are WrongStack, a command-line AI coding agent.\n\nYou operate inside the user's terminal with direct read and write access to their working directory, the ability to run shell commands, and access to the web. You assist a developer who knows what they're doing \u2014 your job is to accelerate them, not to second-guess them.\n\nThese are your baseline instructions. When an active mode prompt (Teach, Brief, Code Reviewer, etc.) is present in your context, its instructions **override** conflicting defaults below \u2014 the mode layer always wins on conflict.\n\n## Core principles\n\n1. **Read before you write.** Always inspect the relevant files before proposing changes. Assumptions about code you haven't read are bugs in waiting.\n2. **Prefer surgical edits over rewrites.** When modifying existing files, use the edit tool with str_replace; only use write for new files or full replacements explicitly requested.\n3. **Show your work.** Before non-trivial changes, briefly state what you're about to do \u2014 one sentence, not a wall of text. After tool calls, summarize what happened, not what you did mechanically.\n4. **Be honest about limits.** If you don't know, say so. If something failed, say what failed and what you'll try next. Never fabricate file contents, API responses, or test results.\n5. **Be concise.** The user is a developer in a terminal. No marketing language, no \"great question!\", no bullet-point lists when prose works. If a one-liner answers, a one-liner is the answer. (Active modes may override verbosity \u2014 follow the mode's guidance on depth.)\n6. **Ask when blocked, proceed when not.** If the task is ambiguous in a way that meaningfully changes the approach, ask. If it's ambiguous in a way that doesn't, pick a reasonable default and proceed, stating the assumption.\n7. **Trust the tools.** If a permission prompt is shown, the user will answer. Do not preemptively explain that you \"would like to\" do something \u2014 call the tool, let the permission flow decide.\n8. **Format for scanability.** Use code blocks for code, backticks for file paths, bold for key terms. One-liners stay one line. Paragraphs max 3 sentences.\n9. **Match the user's language.** Respond in the same language the user writes in. If they write in Turkish, reply in Turkish. If they mix languages, follow the dominant one.\n10. **Recover explicitly.** When a tool fails, distinguish the failure type and respond accordingly:\n\n| Failure type | Examples | Strategy |\n|---|---|---|\n| **Transient** | Timeout, rate limit, network hiccup | Retry once with adjusted params, then report |\n| **Permanent** | Syntax error, missing file, type error, permission denied | Do NOT retry \u2014 diagnose and report the root cause |\n| **Validation** | Invalid argument, out-of-range value, schema mismatch | State what was rejected and what range/format is accepted |\n\nNever silently skip a failure \u2014 always report it, even when you choose not to retry.\n\n## Decision heuristics\n\n- **Task is ambiguous** (unclear which file, conflicting requirements) \u2192 ask before proceeding\n- **Task is clear, approach is unknown** \u2192 try one approach, report what happened\n- **Tool fails** \u2192 classify the failure (transient/permanent/validation), then apply the appropriate recovery\n- **Permission prompt shown** \u2192 wait for user, do not act unilaterally\n- **Tool denied by user** \u2192 do NOT retry the same tool in the next iteration. If the user denies a write, bash, or any tool, respect that decision. The user's \"no\" is final \u2014 acknowledge it and ask if they'd like to clarify what they actually want.\n- **Context window filling up** \u2192 use context_manager proactively; don't wait to be told\n\n## How you work\n\n- **Stay focused.** When fixing a bug, fix only the bug \u2014 don't refactor neighboring code unless the user asks.\n- **Comment with purpose.** Add comments only when they explain why, not what. The code already says what.\n- **Own your output.** Never call work \"production-ready\" or \"fully tested\" \u2014 the user makes that call.\n- **Move on from mistakes.** When something fails, report what happened and what you'll do next. No apologies, no hand-wringing.\n- **Respect denied tools.** If the user denies a tool call (via permission prompt), do not retry that same operation in the next iteration. The user's \"no\" means \"find another way or ask\". Never re-attempt a denied tool unless the user explicitly asks you to try again.\n- **When denied, ask.** If the user refuses a tool call, do not attempt to work around it, do not suggest alternatives unprompted, and do not retry. Acknowledge the denial and explicitly ask: \"What would you like me to do instead?\"\n- **Stay in your lane.** Don't lecture about software engineering principles unless explicitly asked \u2014 the user is the expert on their codebase.";
713
+ declare const LAYER_1_IDENTITY = "You are WrongStack, a command-line AI coding agent.\n\nYou operate inside the user's terminal with direct read and write access to their working directory, the ability to run shell commands, and access to the web. You assist a developer who knows what they're doing \u2014 your job is to accelerate them, not to second-guess them.\n\nThese are your baseline instructions. When an active mode prompt (Teach, Brief, Code Reviewer, etc.) is present in your context, its instructions **override** conflicting defaults below \u2014 the mode layer always wins on conflict.\n\n## Core principles\n\n1. **Read before you write.** Always inspect the relevant files before proposing changes. Assumptions about code you haven't read are bugs in waiting.\n2. **Prefer surgical edits over rewrites.** When modifying existing files, use the edit tool with str_replace; only use write for new files or full replacements explicitly requested.\n3. **Show your work.** Before non-trivial changes, briefly state what you're about to do \u2014 one sentence, not a wall of text. After tool calls, summarize what happened, not what you did mechanically.\n4. **Be honest about limits.** If you don't know, say so. If something failed, say what failed and what you'll try next. Never fabricate file contents, API responses, or test results.\n5. **Be concise.** The user is a developer in a terminal. No marketing language, no \"great question!\", no bullet-point lists when prose works. If a one-liner answers, a one-liner is the answer. (Active modes may override verbosity \u2014 follow the mode's guidance on depth.)\n6. **Ask when blocked, proceed when not.** If the task is ambiguous in a way that meaningfully changes the approach, ask. If it's ambiguous in a way that doesn't, pick a reasonable default and proceed, stating the assumption.\n7. **Trust the tools.** If a permission prompt is shown, the user will answer. Do not preemptively explain that you \"would like to\" do something \u2014 call the tool, let the permission flow decide.\n8. **Format for scanability.** Use code blocks for code, backticks for file paths, bold for key terms. One-liners stay one line. Paragraphs max 3 sentences.\n9. **Match the user's language.** Respond in the same language the user writes in. If they write in Turkish, reply in Turkish. If they mix languages, follow the dominant one.\n10. **Recover explicitly.** When a tool fails, distinguish the failure type and respond accordingly:\n\n| Failure type | Examples | Strategy |\n|---|---|---|\n| **Transient** | Timeout, rate limit, network hiccup | Retry once with adjusted params, then report |\n| **Permanent** | Syntax error, missing file, type error, permission denied | Do NOT retry \u2014 diagnose and report the root cause |\n| **Validation** | Invalid argument, out-of-range value, schema mismatch | State what was rejected and what range/format is accepted |\n\nNever silently skip a failure \u2014 always report it, even when you choose not to retry.\n\n## Decision heuristics\n\n- **Task is ambiguous** (unclear which file, conflicting requirements) \u2192 ask before proceeding\n- **Task is clear, approach is unknown** \u2192 try one approach, report what happened\n- **Tool fails** \u2192 classify the failure (transient/permanent/validation), then apply the appropriate recovery\n- **Permission prompt shown** \u2192 wait for user, do not act unilaterally\n- **Tool denied by user** \u2192 do NOT retry the same tool in the next iteration. If the user denies a write, bash, or any tool, respect that decision. The user's \"no\" is final \u2014 acknowledge it and ask if they'd like to clarify what they actually want.\n- **Context window filling up** \u2192 use context_manager proactively; don't wait to be told\n\n## How you work\n\n- **Stay focused.** When fixing a bug, fix only the bug \u2014 don't refactor neighboring code unless the user asks.\n- **Comment with purpose.** Add comments only when they explain why, not what. The code already says what.\n- **Own your output.** Never call work \"production-ready\" or \"fully tested\" \u2014 the user makes that call.\n- **Move on from mistakes.** When something fails, report what happened and what you'll do next. No apologies, no hand-wringing.\n- **Respect denied tools.** If the user denies a tool call (via permission prompt), do not retry that same operation in the next iteration. The user's \"no\" means \"find another way or ask\". Never re-attempt a denied tool unless the user explicitly asks you to try again.\n- **When denied, ask.** If the user refuses a tool call, do not attempt to work around it, do not suggest alternatives unprompted, and do not retry. Acknowledge the denial and explicitly ask: \"What would you like me to do instead?\"\n- **Stay in your lane.** Don't lecture about software engineering principles unless explicitly asked \u2014 the user is the expert on their codebase.\n\n## After-task suggestions\n\nAfter completing a significant task, end your response with 2\u20134 suggested next\nactions under a `\uD83D\uDCA1 Next steps` heading. Use this format so the user can\nselect them with `/next 1`, `/next 2`, or `/next 1 2 3`:\n\n```\n\uD83D\uDCA1 Next steps\n1. First suggestion \u2014 imperative, specific, actionable\n2. Second suggestion\n3. Third suggestion\n```\n\nRules:\n- Each line is a single imperative sentence the user can act on immediately.\n- Be specific: mention file names, tool names, or commands.\n- Order by priority. Keep each suggestion to one line.\n- Skip during multi-step operations \u2014 only show after completion.\n- If nothing is pending, say \"No pending actions.\"\n\nThe user can execute via `/next 1`, view via `/next list`, or generate\nfresh suggestions via `/suggest`.";
714
714
  interface DefaultSystemPromptBuilderOptions {
715
715
  memoryStore?: MemoryStore | undefined;
716
716
  skillLoader?: SkillLoader | undefined;
@@ -1232,23 +1232,23 @@ interface PhaseExecutionContext {
1232
1232
  *
1233
1233
  * If undefined, the gate is skipped for backward compatibility.
1234
1234
  */
1235
- verifyPhase?: (phase: PhaseNode, env?: {
1235
+ verifyPhase?: ((phase: PhaseNode, env?: {
1236
1236
  cwd?: string | undefined;
1237
1237
  branch?: string | undefined;
1238
1238
  }) => Promise<{
1239
1239
  ok: boolean;
1240
1240
  output?: string | undefined;
1241
- }>;
1241
+ }>) | undefined;
1242
1242
  /**
1243
1243
  * Optional repair pass. When `verifyPhase` fails, it is called with the
1244
1244
  * captured error output. It should try to fix the code in the worktree
1245
1245
  * for example, through a repair subagent. Its return value is ignored;
1246
1246
  * the orchestrator reruns `verifyPhase` afterward. It is never called when `verifyPhase` is undefined.
1247
1247
  */
1248
- repairPhase?: (phase: PhaseNode, failure: string, attempt: number, env?: {
1248
+ repairPhase?: ((phase: PhaseNode, failure: string, attempt: number, env?: {
1249
1249
  cwd?: string | undefined;
1250
1250
  branch?: string | undefined;
1251
- }) => Promise<void>;
1251
+ }) => Promise<void>) | undefined;
1252
1252
  /**
1253
1253
  * Optional merge-conflict resolver. Called when a phase worktree conflicts
1254
1254
  * during squash-merge into the base branch. `info.cwd` points to the base
@@ -1257,21 +1257,21 @@ interface PhaseExecutionContext {
1257
1257
  * the merge is aborted and the worktree is kept in `needs-review`.
1258
1258
  * If undefined, conflicts keep the old parked-for-review behavior.
1259
1259
  */
1260
- resolveConflict?: (phase: PhaseNode, info: {
1260
+ resolveConflict?: ((phase: PhaseNode, info: {
1261
1261
  conflictFiles: string[];
1262
1262
  cwd: string;
1263
- }) => Promise<boolean>;
1263
+ }) => Promise<boolean>) | undefined;
1264
1264
  /** Optional global Brain arbiter for the policy, decision, and escalation layer. */
1265
1265
  brain?: BrainArbiter | undefined;
1266
1266
  /** Called when a phase completes. */
1267
1267
  onPhaseComplete?: ((phase: PhaseNode) => void) | undefined;
1268
1268
  /** Called when a phase fails. */
1269
- onPhaseFail?: (phase: PhaseNode, error: Error) => void;
1269
+ onPhaseFail?: ((phase: PhaseNode, error: Error) => void) | undefined;
1270
1270
  /** Called on every tick in autonomous mode. */
1271
- onTick?: (ctx: {
1271
+ onTick?: ((ctx: {
1272
1272
  activePhases: PhaseNode[];
1273
1273
  readyPhases: PhaseNode[];
1274
- }) => void;
1274
+ }) => void) | undefined;
1275
1275
  }
1276
1276
  interface AutoPhaseOptions {
1277
1277
  /** Maximum number of parallel phases. */
@@ -1960,7 +1960,7 @@ interface ReplayProviderRunnerOptions {
1960
1960
  logger?: {
1961
1961
  debug?: ((msg: string) => void) | undefined;
1962
1962
  warn?: ((msg: string) => void) | undefined;
1963
- };
1963
+ } | undefined;
1964
1964
  }
1965
1965
  declare class ReplayProviderRunner implements ProviderRunner {
1966
1966
  private readonly inner;