@wrongstack/core 0.264.0 → 0.265.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 (87) hide show
  1. package/dist/{agent-bridge-D8sa1vtv.d.ts → agent-bridge-DrkBxszZ.d.ts} +1 -1
  2. package/dist/{agent-subagent-runner-c9DLkaas.d.ts → agent-subagent-runner-DM2pP-B6.d.ts} +113 -11
  3. package/dist/{brain-O1IdKPaK.d.ts → brain-BXd_61kQ.d.ts} +31 -2
  4. package/dist/{compactor-BBy0rCtB.d.ts → compactor-B8pOf45Y.d.ts} +1 -1
  5. package/dist/{config-Dz2F3H2K.d.ts → config-BMCj_XDs.d.ts} +80 -12
  6. package/dist/{context-BGSpZNSE.d.ts → context-MRk5PhNv.d.ts} +26 -12
  7. package/dist/coordination/index.d.ts +77 -21
  8. package/dist/coordination/index.js +557 -159
  9. package/dist/coordination/index.js.map +1 -1
  10. package/dist/{default-config-CXsDvOmP.d.ts → default-config-B0cj-Hry.d.ts} +11 -1
  11. package/dist/defaults/index.d.ts +28 -28
  12. package/dist/defaults/index.js +609 -195
  13. package/dist/defaults/index.js.map +1 -1
  14. package/dist/execution/index.d.ts +16 -16
  15. package/dist/execution/index.js +394 -155
  16. package/dist/execution/index.js.map +1 -1
  17. package/dist/execution/prompt-enhancer.d.ts +2 -2
  18. package/dist/execution/prompt-enhancer.js +1 -1
  19. package/dist/execution/prompt-enhancer.js.map +1 -1
  20. package/dist/extension/index.d.ts +6 -6
  21. package/dist/{goal-preamble-DzjFuN3p.d.ts → goal-preamble-DvHDSKSe.d.ts} +14 -10
  22. package/dist/{goal-store-CxWmCGbH.d.ts → goal-store-DtLMySNb.d.ts} +1 -1
  23. package/dist/{index-CYIQrXVF.d.ts → index-B-ch8K9C.d.ts} +8 -8
  24. package/dist/{index-CbLSI66_.d.ts → index-CEDeNodM.d.ts} +5 -5
  25. package/dist/index.d.ts +183 -52
  26. package/dist/index.js +1779 -673
  27. package/dist/index.js.map +1 -1
  28. package/dist/infrastructure/index.d.ts +6 -6
  29. package/dist/infrastructure/index.js +12 -8
  30. package/dist/infrastructure/index.js.map +1 -1
  31. package/dist/kernel/index.d.ts +9 -9
  32. package/dist/kernel/index.js +1 -1
  33. package/dist/kernel/index.js.map +1 -1
  34. package/dist/{llm-selector-DzxuZnNz.d.ts → llm-selector-C0tfTCUe.d.ts} +14 -2
  35. package/dist/{mcp-servers-DC4QRPUI.d.ts → mcp-servers-2x4w6Jn9.d.ts} +3 -3
  36. package/dist/models/index.d.ts +5 -5
  37. package/dist/models/index.js +74 -30
  38. package/dist/models/index.js.map +1 -1
  39. package/dist/{models-registry-B_siPxqN.d.ts → models-registry-DmJlKuNp.d.ts} +1 -1
  40. package/dist/{multi-agent-coordinator-CK5Jdj9K.d.ts → multi-agent-coordinator-DyCkCZnU.d.ts} +1 -1
  41. package/dist/{null-fleet-bus-DgvD4SCO.d.ts → null-fleet-bus-CG9QY2aP.d.ts} +6 -6
  42. package/dist/observability/index.d.ts +2 -2
  43. package/dist/{parallel-eternal-engine-bK0JQBR_.d.ts → parallel-eternal-engine-Jw9uhEoT.d.ts} +9 -9
  44. package/dist/{path-resolver-BPEDlN38.d.ts → path-resolver-Dy2ej-gE.d.ts} +3 -3
  45. package/dist/{permission-4yvGmMRB.d.ts → permission-B9SB45lp.d.ts} +1 -1
  46. package/dist/{permission-policy-C6XpsBOy.d.ts → permission-policy-CkjSXabK.d.ts} +2 -2
  47. package/dist/{pipeline-CXCeMz8J.d.ts → pipeline-DPDxH_7m.d.ts} +3 -3
  48. package/dist/{plan-templates-BvzRBkJc.d.ts → plan-templates-CzD9GnAU.d.ts} +32 -8
  49. package/dist/{provider-runner-C5aQpDWE.d.ts → provider-runner-DMa70ODu.d.ts} +3 -3
  50. package/dist/{retry-policy-CFhdtRzz.d.ts → retry-policy-CN0khdlj.d.ts} +1 -1
  51. package/dist/sdd/index.d.ts +8 -8
  52. package/dist/sdd/index.js +274 -93
  53. package/dist/sdd/index.js.map +1 -1
  54. package/dist/{secret-vault-CxiVLbt1.d.ts → secret-vault-B2yw84VT.d.ts} +43 -4
  55. package/dist/secret-vault-BAKpgFw_.d.ts +57 -0
  56. package/dist/security/index.d.ts +5 -5
  57. package/dist/security/index.js +204 -23
  58. package/dist/security/index.js.map +1 -1
  59. package/dist/{selector-gIuhRTkN.d.ts → selector-CzHh_igB.d.ts} +1 -1
  60. package/dist/{session-event-bridge-DkvvrpDt.d.ts → session-event-bridge-BUI6Jf-4.d.ts} +1 -1
  61. package/dist/{session-reader-KdfVwkKP.d.ts → session-reader-CMgdMSRP.d.ts} +1 -1
  62. package/dist/storage/index.d.ts +112 -15
  63. package/dist/storage/index.js +419 -81
  64. package/dist/storage/index.js.map +1 -1
  65. package/dist/tools/index.d.ts +2 -2
  66. package/dist/types/index.d.ts +21 -21
  67. package/dist/types/index.js +261 -53
  68. package/dist/types/index.js.map +1 -1
  69. package/dist/utils/index.d.ts +3 -3
  70. package/dist/utils/index.js +3 -5
  71. package/dist/utils/index.js.map +1 -1
  72. package/dist/{wstack-paths-CJjEwPXn.d.ts → wstack-paths-hOpNLmvf.d.ts} +2 -0
  73. package/package.json +1 -1
  74. package/skills/api-design/SKILL.md +1 -1
  75. package/skills/audit-log/SKILL.md +6 -6
  76. package/skills/bug-hunter/SKILL.md +5 -5
  77. package/skills/chimera/SKILL.md +4 -4
  78. package/skills/docker-deploy/SKILL.md +1 -1
  79. package/skills/git-flow/SKILL.md +3 -3
  80. package/skills/multi-agent/SKILL.md +3 -3
  81. package/skills/node-modern/SKILL.md +1 -0
  82. package/skills/observability/SKILL.md +2 -2
  83. package/skills/output-standards/SKILL.md +51 -28
  84. package/skills/refactor-planner/SKILL.md +3 -3
  85. package/skills/security-scanner/SKILL.md +4 -3
  86. package/skills/tech-stack/SKILL.md +1 -2
  87. package/dist/secret-vault-BJDY28ev.d.ts +0 -25
package/dist/index.d.ts CHANGED
@@ -1,83 +1,83 @@
1
- import { S as SystemPromptBuilder, b as ModelCapabilities, B as BuildContext, C as Container, H as HookRegistry, c as Mailbox, d as MailboxMessage, a as Renderer } from './pipeline-CXCeMz8J.js';
2
- export { A as AgentHeartbeatInput, e as AgentRegistrationInput, f as BindOptions, D as Decorator, F as Factory, g as MailboxAckInput, h as MailboxAgentStatus, i as MailboxMessageType, j as MailboxQuery, k as MailboxSendInput, l as MailboxTaskContext, m as Middleware, M as MiddlewareHandler, N as NextFn, P as Pipeline, n as PipelineOptions, o as ReadReceipts, p as RegisteredAgent, T as Token, q as hookMatcherMatches, r as normalizeRecipient } from './pipeline-CXCeMz8J.js';
3
- import { E as EventBus, c as MemoryStore, a as EventName, L as Listener, B as BrainArbiter } from './brain-O1IdKPaK.js';
4
- export { e as BrainDecision, f as BrainDecisionOption, g as BrainDecisionQueue, h as BrainDecisionRequest, i as BrainDecisionSource, j as BrainFallback, k as BrainRisk, D as DefaultBrainArbiter, l as DefaultBrainArbiterOptions, m as EventLogger, n as EventMap, H as HumanEscalatingBrainArbiter, o as MEMORY_TYPE_LABELS, p as MemoryClearedPayload, q as MemoryConsolidatedPayload, b as MemoryEntry, r as MemoryForgottenPayload, s as MemoryPriority, d as MemoryRelevanceContext, t as MemoryRememberedPayload, M as MemoryScope, u as MemoryType, O as ObservableBrainArbiter, v as ScopedEventBus, S as ScoredEntry, w as formatHumanPrompt } from './brain-O1IdKPaK.js';
5
- import { W as WorktreeManager } from './index-CYIQrXVF.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-CYIQrXVF.js';
7
- import { C as Context, P as Provider, T as Tool, R as Request, b as Response, M as Message, g as ContentBlock, n as TextBlock } from './context-BGSpZNSE.js';
8
- export { A as AgentError, d as CacheStats, 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, N as SddError, q as SessionData, O as SessionError, S as SessionEvent, h as SessionMetadata, i as SessionStore, r as SessionSummary, a as SessionWriter, Q as StateChange, V as StateChangeHandler, W as StopReason, X as StreamEvent, Y as StreamHangError, Z as ThinkingBlock, s as TodoItem, c as TokenCounter, _ as ToolCallContext, $ as ToolError, a0 as ToolFinalEvent, j as ToolProgressEvent, m as ToolResultBlock, a1 as ToolStreamEvent, l as ToolUseBlock, U as Usage, a2 as WrongStackError, a3 as asBlocks, a4 as asText, a5 as extractRunEnv, a6 as isAgentError, a7 as isConfigError, a8 as isFsError, a9 as isImageBlock, aa as isPluginError, ab as isSddError, ac as isSessionError, ad as isTextBlock, ae as isThinkingBlock, af as isToolError, ag as isToolResultBlock, ah as isToolUseBlock, ai as isWrongStackError, aj as toWrongStackError, ak as wrapAsState } from './context-BGSpZNSE.js';
9
- import { P as ProviderRunner, R as RunProviderOptions$1 } from './provider-runner-C5aQpDWE.js';
10
- import { l as HookInput, m as HookOutcome, h as Config, H as HookEvent, e as HookMatcher, I as InProcessHook, d as ModelMatrixEntry, i as ConfigStore } from './config-Dz2F3H2K.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, c as MCPServerConfig, w as ModelsDevModel, a as ModelsDevPayload, x as ModelsDevProvider, M as ModelsRegistry, y as PluginConfig, z as ProviderApiKey, P as ProviderConfig, b as ResolvedModel, R as ResolvedProvider, B as SessionLoggingConfig, S as ShellHook, E as SyncCategory, k as SyncConfig, T as ToolsConfig, W as WireFamily, G as formatContextWindowModeList, J as getContextWindowMode, K as isContextWindowModeId, N as listContextWindowModes, O as resolveContextWindowPolicy } from './config-Dz2F3H2K.js';
12
- export { a as CompactReport, C as Compactor } from './compactor-BBy0rCtB.js';
13
- import { P as PermissionPolicy } from './permission-4yvGmMRB.js';
14
- export { a as PermissionDecision, S as SecretScrubber, T as TrustPolicy } from './permission-4yvGmMRB.js';
1
+ import { S as SystemPromptBuilder, b as ModelCapabilities, B as BuildContext, C as Container, H as HookRegistry, c as Mailbox, d as MailboxMessage, a as Renderer } from './pipeline-DPDxH_7m.js';
2
+ export { A as AgentHeartbeatInput, e as AgentRegistrationInput, f as BindOptions, D as Decorator, F as Factory, g as MailboxAckInput, h as MailboxAgentStatus, i as MailboxMessageType, j as MailboxQuery, k as MailboxSendInput, l as MailboxTaskContext, m as Middleware, M as MiddlewareHandler, N as NextFn, P as Pipeline, n as PipelineOptions, o as ReadReceipts, p as RegisteredAgent, T as Token, q as hookMatcherMatches, r as normalizeRecipient } from './pipeline-DPDxH_7m.js';
3
+ import { E as EventBus, c as MemoryStore, a as EventName, L as Listener, B as BrainArbiter } from './brain-BXd_61kQ.js';
4
+ export { e as BrainDecision, f as BrainDecisionOption, g as BrainDecisionQueue, h as BrainDecisionRequest, i as BrainDecisionSource, j as BrainFallback, k as BrainRisk, D as DefaultBrainArbiter, l as DefaultBrainArbiterOptions, m as EventLogger, n as EventMap, H as HumanEscalatingBrainArbiter, o as MEMORY_TYPE_LABELS, p as MemoryClearedPayload, q as MemoryConsolidatedPayload, b as MemoryEntry, r as MemoryForgottenPayload, s as MemoryPriority, d as MemoryRelevanceContext, t as MemoryRememberedPayload, M as MemoryScope, u as MemoryType, O as ObservableBrainArbiter, v as ScopedEventBus, S as ScoredEntry, w as formatHumanPrompt } from './brain-BXd_61kQ.js';
5
+ import { W as WorktreeManager } from './index-B-ch8K9C.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-B-ch8K9C.js';
7
+ import { C as Context, P as Provider, T as Tool, R as Request, b as Response, M as Message, g as ContentBlock, n as TextBlock, J as JSONSchema } from './context-MRk5PhNv.js';
8
+ export { A as AgentError, d as CacheStats, 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, 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, N as SddError, q as SessionData, O as SessionError, S as SessionEvent, h as SessionMetadata, i as SessionStore, r as SessionSummary, a as SessionWriter, Q as StateChange, V as StateChangeHandler, W as StopReason, X as StreamEvent, Y as StreamHangError, Z as ThinkingBlock, s as TodoItem, c as TokenCounter, _ as ToolCallContext, $ as ToolError, a0 as ToolFinalEvent, a1 as ToolIconId, j as ToolProgressEvent, m as ToolResultBlock, a2 as ToolStreamEvent, l as ToolUseBlock, U as Usage, a3 as WrongStackError, a4 as asBlocks, a5 as asText, a6 as extractRunEnv, a7 as isAgentError, a8 as isConfigError, a9 as isFsError, aa as isImageBlock, ab as isPluginError, ac as isSddError, ad as isSessionError, ae as isTextBlock, af as isThinkingBlock, ag as isToolError, ah as isToolResultBlock, ai as isToolUseBlock, aj as isWrongStackError, ak as toWrongStackError, al as wrapAsState } from './context-MRk5PhNv.js';
9
+ import { P as ProviderRunner, R as RunProviderOptions$1 } from './provider-runner-DMa70ODu.js';
10
+ import { l as HookInput, m as HookOutcome, h as Config, T as TokenSavingTier, H as HookEvent, e as HookMatcher, I as InProcessHook, d as ModelMatrixEntry, i as ConfigStore } from './config-BMCj_XDs.js';
11
+ export { A as AutonomyConfig, n as CONTEXT_WINDOW_MODES, o as CircuitBreakerRuntimeConfig, j as ConfigLoader, p as ContextConfig, C as ContextWindowAggressiveOn, q as ContextWindowConfigLike, r as ContextWindowMode, s as ContextWindowModeId, g as ContextWindowPolicy, t as ContextWindowThresholds, u as CustomModelDefinition, D as DEFAULT_CONTEXT_WINDOW_MODE_ID, F as FeaturesConfig, f as HookEntry, v as IndexingConfig, L as LaunchConfig, w as LogConfig, c as MCPServerConfig, x as ModelsDevModel, a as ModelsDevPayload, y as ModelsDevProvider, M as ModelsRegistry, z as PluginConfig, B as ProviderApiKey, P as ProviderConfig, b as ResolvedModel, R as ResolvedProvider, E as SessionLoggingConfig, S as ShellHook, G as SyncCategory, k as SyncConfig, J as ToolsConfig, W as WireFamily, K as formatContextWindowModeList, N as getContextWindowMode, O as isContextWindowModeId, Q as listContextWindowModes, U as normalizeTokenSavingTier, V as resolveContextWindowPolicy } from './config-BMCj_XDs.js';
12
+ export { a as CompactReport, C as Compactor } from './compactor-B8pOf45Y.js';
13
+ import { P as PermissionPolicy } from './permission-B9SB45lp.js';
14
+ export { a as PermissionDecision, S as SecretScrubber, T as TrustPolicy } from './permission-B9SB45lp.js';
15
15
  export { C as CheckpointInfo, R as RewindResult, a as RewindResultExtended, S as SessionRewinder } from './session-rewinder-C9HnMkhP.js';
16
- import { A as AttachmentStore, b as AttachmentRef, a as AddAttachmentInput } from './session-reader-KdfVwkKP.js';
17
- export { c as Attachment, d as AttachmentKind, e as AttachmentMeta, D as DefaultSessionReader, f as DefaultSessionReaderOptions, S as SessionReader } from './session-reader-KdfVwkKP.js';
18
- 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';
19
- import { a as DefaultSecretVault } from './secret-vault-CxiVLbt1.js';
20
- 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-CxiVLbt1.js';
16
+ import { A as AttachmentStore, b as AttachmentRef, a as AddAttachmentInput } from './session-reader-CMgdMSRP.js';
17
+ export { c as Attachment, d as AttachmentKind, e as AttachmentMeta, D as DefaultSessionReader, f as DefaultSessionReaderOptions, S as SessionReader } from './session-reader-CMgdMSRP.js';
18
+ export { D as DEFAULT_AUTONOMY_CONFIG, a as DEFAULT_CIRCUIT_BREAKER_CONFIG, b as DEFAULT_CONTEXT_CONFIG, c as DEFAULT_SESSION_LOGGING_CONFIG, d as DEFAULT_SESSION_PRUNE_DAYS, e as DEFAULT_TOOLS_CONFIG } from './default-config-B0cj-Hry.js';
19
+ import { a as DefaultSecretVault } from './secret-vault-B2yw84VT.js';
20
+ export { D as DefaultSecretScrubber, S as SecretVaultOptions, d as decryptConfigSecrets, e as encryptConfigSecrets, i as isSecretField, m as migratePlaintextSecrets, r as rewriteConfigEncrypted, b as rotateConfigKeys } from './secret-vault-B2yw84VT.js';
21
21
  import { D as DefaultLogger } from './logger-DmmQhf4P.js';
22
22
  export { a as DefaultLoggerOptions, L as LogFormat, n as noOpLogger } from './logger-DmmQhf4P.js';
23
- import { D as DefaultPathResolver } from './path-resolver-BPEDlN38.js';
24
- export { a as DefaultTokenCounter } from './path-resolver-BPEDlN38.js';
25
- export { C as CompactorOptions, D as DEFAULT_RECOVERY_STRATEGIES, a as DefaultErrorHandler, b as DefaultRetryPolicy, E as EternalAutonomyEngine, c as EternalAutonomyOptions, d as EternalEngineState, H as HybridCompactor, I as IterationStage, P as ParallelEngineState, e as ParallelEternalEngine, f as ParallelEternalOptions, g as ParallelIterationStage, R as RecoveryStrategy, T as ToolExecutor, h as buildRecoveryStrategies } from './parallel-eternal-engine-bK0JQBR_.js';
23
+ import { D as DefaultPathResolver } from './path-resolver-Dy2ej-gE.js';
24
+ export { a as DefaultTokenCounter } from './path-resolver-Dy2ej-gE.js';
25
+ export { C as CompactorOptions, D as DEFAULT_RECOVERY_STRATEGIES, a as DefaultErrorHandler, b as DefaultRetryPolicy, E as EternalAutonomyEngine, c as EternalAutonomyOptions, d as EternalEngineState, H as HybridCompactor, I as IterationStage, P as ParallelEngineState, e as ParallelEternalEngine, f as ParallelEternalOptions, g as ParallelIterationStage, R as RecoveryStrategy, T as ToolExecutor, h as buildRecoveryStrategies } from './parallel-eternal-engine-Jw9uhEoT.js';
26
26
  import { S as SkillLoader } from './skill-DGIXCtdv.js';
27
27
  export { b as SkillEntry, a as SkillManifest } from './skill-DGIXCtdv.js';
28
28
  export { I as InputReader, P as PromptOption } from './input-reader-E-ffP2ee.js';
29
- import { k as SlashCommand, P as PluginAPI, l as PluginPipelines, m as ToolRegistryView, n as ProviderRegistryView, o as MCPRegistryView, p as SlashCommandRegistryView, q as SessionWriterView, r as MetricsSinkView, s as PluginCapabilities, t as Plugin } from './agent-subagent-runner-c9DLkaas.js';
30
- export { g as Agent, h as AgentFactory, u as AgentFactoryResult, v as AgentRunnerOptions, w as BudgetExceededError, x as BudgetKind, y as BudgetLimits, z as BudgetNegotiationMode, E as BudgetThresholdDecision, G as BudgetThresholdHandler, H as BudgetThresholdSignal, I as BudgetUsage, J as CoordinatorEvents, C as CoordinatorStatus, D as DoneCondition, F as FleetBus, K as FleetEvent, L as FleetHandler, i as FleetUsage, j as FleetUsageAggregator, c as MultiAgentConfig, M as MultiAgentCoordinator, N as PluginDependency, e as SpawnResult, O as SubagentBudget, S as SubagentConfig, Q as SubagentContext, R as SubagentError, U as SubagentErrorKind, V as SubagentRunContext, W as SubagentRunOutcome, d as SubagentRunner, X as SubagentUsageSnapshot, Y as TaskDelegation, f as TaskResult, T as TaskSpec, Z as makeAgentSubagentRunner, _ as withDisabledToolFiltering } from './agent-subagent-runner-c9DLkaas.js';
31
- export { D as DefaultModelsRegistry, a as DefaultModelsRegistryOptions, c as classifyFamily } from './models-registry-B_siPxqN.js';
29
+ import { k as SlashCommand, P as PluginAPI, l as PluginPipelines, m as ToolRegistryView, n as ProviderRegistryView, o as MCPRegistryView, p as SlashCommandRegistryView, q as SessionWriterView, r as MetricsSinkView, s as PluginCapabilities, t as PluginDependency, u as Plugin } from './agent-subagent-runner-DM2pP-B6.js';
30
+ export { g as Agent, h as AgentFactory, v as AgentFactoryResult, w as AgentRunnerOptions, x as BudgetExceededError, y as BudgetKind, z as BudgetLimits, E as BudgetNegotiationMode, G as BudgetThresholdDecision, H as BudgetThresholdHandler, I as BudgetThresholdSignal, J as BudgetUsage, K as CoordinatorEvents, C as CoordinatorStatus, L as DECISION_TIMEOUT_MS, D as DoneCondition, F as FleetBus, N as FleetEvent, O as FleetHandler, i as FleetUsage, j as FleetUsageAggregator, c as MultiAgentConfig, M as MultiAgentCoordinator, e as SpawnResult, Q as SubagentBudget, S as SubagentConfig, R as SubagentContext, U as SubagentError, V as SubagentErrorKind, W as SubagentRunContext, X as SubagentRunOutcome, d as SubagentRunner, Y as SubagentUsageSnapshot, Z as TIMEOUT_PREEMPT_FRACTION, _ as TaskDelegation, f as TaskResult, T as TaskSpec, $ as makeAgentSubagentRunner, a0 as withDisabledToolFiltering } from './agent-subagent-runner-DM2pP-B6.js';
31
+ export { D as DefaultModelsRegistry, a as DefaultModelsRegistryOptions, c as classifyFamily } from './models-registry-DmJlKuNp.js';
32
32
  import { M as ModeStore } from './mode-CZlO9iU1.js';
33
33
  export { D as DEFAULT_MODES, b as Mode, a as ModeConfig, c as ModeManifest } from './mode-CZlO9iU1.js';
34
- export { I as InMemoryAgentBridge, a as InMemoryBridgeTransport, c as createMessage } from './agent-bridge-D8sa1vtv.js';
34
+ export { I as InMemoryAgentBridge, a as InMemoryBridgeTransport, c as createMessage } from './agent-bridge-DrkBxszZ.js';
35
35
  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';
36
36
  import { d as TaskGraph, T as TaskType, a as TaskPriority, e as TaskNode } from './task-graph-u1q9Jkyk.js';
37
37
  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';
38
38
  import { T as Tracer, M as MetricsSink, H as HealthRegistry } from './observability-D-HZN_mF.js';
39
39
  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';
40
- import { e as ToolRegistry, S as SystemPromptContributor, E as ExtensionRegistry, P as ProviderRegistry, A as AgentPipelines, f as ToolExecutorLike, c as ToolCallPipelinePayload } from './index-CbLSI66_.js';
41
- export { i as AfterIterationHook, j as AfterRunHook, k as AfterToolExecutionHook, l as AgentExtension, g as AgentInit, h as AgentInput, 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-CbLSI66_.js';
40
+ import { e as ToolRegistry, S as SystemPromptContributor, E as ExtensionRegistry, P as ProviderRegistry, A as AgentPipelines, f as ToolExecutorLike, c as ToolCallPipelinePayload } from './index-CEDeNodM.js';
41
+ export { i as AfterIterationHook, j as AfterRunHook, k as AfterToolExecutionHook, l as AgentExtension, g as AgentInit, h as AgentInput, 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-CEDeNodM.js';
42
42
  export { AutonomyStage, DistributiveOmit, DistributivePick } from './types/index.js';
43
43
  import { estimateMessageTokens } from './utils/index.js';
44
44
  export { AtomicWriteOptions, BuildChildEnvOptions, CompileFail, CompileResult, DeepMergeOptions, FORBIDDEN_PROTO_KEYS, FileLockOptions, MessageRepairReport, MessageRepairResult, NewlineStyle, OutputLineGuard, RequestTokenBreakdown, SafeParseResult, ToolOutputSerializerOptions, UnifiedDiffOptions, ValidationError, ValidationResult, assertNever, assertNotPrivateHost, atomicWrite, buildChildEnv, color, compileGlob, compileUserRegex, completePartialObject, computeMessageTokens, createToolOutputSerializer, deepMerge, detectNewlineStyle, ensureDir, estimateRequestTokens, estimateRequestTokensCalibrated, estimateTextTokens, estimateToolDefTokens, estimateToolInputTokens, estimateToolResultTokens, expandGlob, expandIPv6, formatTodosList, getCalibrationState, getTermSize, isInteractive, isPrimitiveArray, isPrivateIPv4, isPrivateIPv6, isStdinTTY, isStdoutTTY, matchAny, matchGlob, mergeCustomModelDefs, mergeModelsPayload, normalizeToLf, onResize, recordActualUsage, repairToolUseAdjacency, resetCalibration, safeParse, safeStringify, sanitizeJsonString, setOutputLineGuard, setRawMode, sleep, stripAnsi, toStyle, truncate, unifiedDiff, validateAgainstSchema, withFileLock, writeErr, writeOut } from './utils/index.js';
45
45
  export { T as TaskItem, c as computeTaskItemProgress, f as formatTaskList, a as formatTaskProgress } from './task-format-vGOIftmK.js';
46
- import { W as WstackPaths } from './wstack-paths-CJjEwPXn.js';
47
- export { a as WstackPathOptions, p as projectHash, b as projectSlug, r as resolveWstackPaths, w as wstackGlobalRoot } from './wstack-paths-CJjEwPXn.js';
46
+ import { W as WstackPaths } from './wstack-paths-hOpNLmvf.js';
47
+ export { a as WstackPathOptions, p as projectHash, b as projectSlug, r as resolveWstackPaths, w as wstackGlobalRoot } from './wstack-paths-hOpNLmvf.js';
48
48
  export { expectDefined } from './utils/expect-defined.js';
49
49
  export { toErrorMessage } from './utils/error.js';
50
50
  export { H as HttpDispatcher, a as HttpsAgentAsDispatcher } from './dispatcher-types.d-BBeXBQgS.js';
51
- 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 mutatePlan, J as parseEntries, K as removePlanItem, L as runConfigMigrations, N as savePlan, O as saveTodosCheckpoint, U as setPlanItemStatus } from './plan-templates-BvzRBkJc.js';
52
- 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-DkvvrpDt.js';
51
+ 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 mutatePlan, J as parseEntries, K as removePlanItem, L as runConfigMigrations, N as savePlan, O as saveTodosCheckpoint, U as setPlanItemStatus } from './plan-templates-CzD9GnAU.js';
52
+ 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-BUI6Jf-4.js';
53
53
  export { a as DirectorStateCheckpoint, D as DirectorStateSnapshot, b as DirectorSubagentState, c as DirectorTaskState, l as loadDirectorState } from './director-state-BfeCUbmk.js';
54
- export { A as AutoApprovePermissionPolicy, D as DefaultPermissionPolicy, P as PermissionPolicyOptions } from './permission-policy-C6XpsBOy.js';
55
- 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-DzjFuN3p.js';
54
+ export { A as AutoApprovePermissionPolicy, D as DefaultPermissionPolicy, P as PermissionPolicyOptions } from './permission-policy-CkjSXabK.js';
55
+ 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-DvHDSKSe.js';
56
56
  export { DefaultProviderRunner } from './defaults/index.js';
57
- 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-DgvD4SCO.js';
58
- export { T as AGENT_TOOL_PRESETS, c as AgentBudgetTier, d as AgentCapability, b as AgentDefinition, A 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, 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-CK5Jdj9K.js';
59
- export { D as DefaultModeStore, L as LLMSelector, a as LLMSelectorOptions, M as ModeLoaderOptions, l as loadProjectModes, b as loadUserModes } from './llm-selector-DzxuZnNz.js';
57
+ 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-CG9QY2aP.js';
58
+ export { T as AGENT_TOOL_PRESETS, c as AgentBudgetTier, d as AgentCapability, b as AgentDefinition, A 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, 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-DyCkCZnU.js';
59
+ export { D as DefaultModeStore, L as LLMSelector, a as LLMSelectorOptions, M as ModeLoaderOptions, l as loadProjectModes, b as loadUserModes } from './llm-selector-C0tfTCUe.js';
60
60
  import { TaskStore } from './sdd/index.js';
61
61
  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';
62
62
  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';
63
- 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, q as slackServer, z as zaiVisionServer } from './mcp-servers-DC4QRPUI.js';
63
+ 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, q as slackServer, z as zaiVisionServer } from './mcp-servers-2x4w6Jn9.js';
64
64
  export { DownloadResult, InstallResult, InstalledSkillEntry, ManifestData, ParsedRef, SkillInstaller, SkillInstallerOptions, SkillManifestStore, UpdateResult, downloadGitHubTarball, parseSkillRef } from './skills/index.js';
65
65
  import { ReplayLogStore, DefaultPromptStore } from './storage/index.js';
66
- export { ALL_SYNC_CATEGORIES, AgentEntry, AgentLiveStatus, AgentStatusTracker, AgentStatusTrackerOptions, Annotation, AnnotationsStore, AnnotationsStoreOptions, AuditEntry, CloudSync, ConsolidationOp, DefaultSessionRewinder, GraphMemoryBackend, GraphMemoryBackendOptions, MemoryConsolidatorOptions, PromptEntry, PromptStore, RecoveryPlan, ReplayEntry, ReplayLogStoreOptions, SessionLiveStatus, SessionMemoryConsolidator, SessionRecovery, SessionRegistry, SessionRegistryEntry, SessionRewinderOptions, StaleSession, SyncResult, TaskFile, ToolAuditLog, ToolAuditLogOptions, VerifyResult, emptyTaskFile, getSessionRegistry, hasSessionRegistry, loadTasks, mutateTasks, saveTasks } from './storage/index.js';
67
- 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-CxWmCGbH.js';
68
- import { R as RetryPolicy, E as ErrorHandler } from './retry-policy-CFhdtRzz.js';
66
+ export { ALL_SYNC_CATEGORIES, AgentEntry, AgentLiveStatus, AgentStatusTracker, AgentStatusTrackerOptions, Annotation, AnnotationsStore, AnnotationsStoreOptions, AuditEntry, CloudSync, ConsolidationOp, DefaultSessionRewinder, FleetNotifier, FleetNotifierOptions, GraphMemoryBackend, GraphMemoryBackendOptions, MemoryConsolidatorOptions, PromptEntry, PromptStore, RecoveryPlan, ReplayEntry, ReplayLogStoreOptions, SessionLiveStatus, SessionMemoryConsolidator, SessionRecovery, SessionRegistry, SessionRegistryEntry, SessionRewinderOptions, StaleSession, SyncResult, TaskFile, ToolAuditLog, ToolAuditLogOptions, VerifyResult, emptyTaskFile, getSessionRegistry, hasSessionRegistry, loadTasks, mutateTasks, saveTasks } from './storage/index.js';
67
+ 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-DtLMySNb.js';
68
+ import { R as RetryPolicy, E as ErrorHandler } from './retry-policy-CN0khdlj.js';
69
69
  export { ApplyResult, ApprovalDecision, AutonomousBrain, AutonomousBrainOptions, AutonomousCoordinator, AutonomousCoordinatorOptions, AutonomousDecisionRequest, AutonomousDecisionType, BUILD_AGENTS, BrainInterventionInput, BrainMonitor, BrainMonitorOptions, ChangeFile, ChangeManager, ChangeManagerOptions, ChangeNode, ChangeProposal, ChangeStatus, ConsensusOptions, ConsensusProtocol, ConsensusResult, CoordinatorEvent, CoordinatorStats, DAGEdgeEvent, DAGEdgeHandler, DAGNode, DAGNodeStatus, DEFAULT_QUALITY_CHECKS, DELIVERY_AGENTS, DEPENDENCY_FILE_PATTERNS, DISCOVERY_AGENTS, DOMAIN_AGENTS, DecisionNode, DecisionPrompt, DefaultMailbox, DepWatchEntry, DepWatcherBridgeOptions, DependencyWatcherConfig, EscalationDecision, FactCategory, FactNode, GlobalMailbox, GoalNode, GoalPriority, GoalStatus, GraphSubscription, KNOWLEDGE_AGENTS, KnowledgeGraph, LLMProvider, META_AGENTS, MailToolsOptions, MailboxHooksOptions, MailboxResolver, MailboxToolOptions, NodeFilter, NodeType, OutdatedNotifyMessage, PLANNING_AGENTS, PackageAuthorEntry, PackageAuthorLog, PackageAuthorTrackerOptions, PackageOutdatedEntry, PackageOutdatedResult, PackageOutdatedWatcherOptions, PrioritizationDecision, QualityCheck, QualityGateChecks, QualityGateResult, QuorumRule, REVIEW_AGENTS, RollbackResult, RunnablesHandler, SpawnDecision, TaskAuctionOptions, TaskAuctioneer, TaskBid, TaskDAG, VERIFY_AGENTS, VoteNode, VoteRecord, VoteValue, VoterConfig, attachDepWatcherBridge, createMailboxHooks, detectEcosystem, detectEcosystem as detectPackageEcosystem, getFullPackageLog, getManifestPackages, getPackageAuthor, getPackagesByAgent, mailboxSessionTag, makeDependencyWatcherConfig, makeMailInboxTool, makeMailSendTool, makeMailboxTool, recordPackageAction, resolveMailboxIdentity, resolveProjectDir, startPackageOutdatedWatcher, updatePackageOutdatedStatus } from './coordination/index.js';
70
70
  import { MCPRegistryHandle } from './tools/index.js';
71
71
  export { createMcpControlTool } from './tools/index.js';
72
72
  import { L as Logger } from './logger-B63L5bTg.js';
73
73
  export { a as LogLevel } from './logger-B63L5bTg.js';
74
- export { S as SecretVault, n as noOpVault } from './secret-vault-BJDY28ev.js';
74
+ export { R as RotatableSecretVault, S as SecretVault, e as encryptedPrefixForVersion, n as noOpVault, p as parseEncryptedVersion } from './secret-vault-BAKpgFw_.js';
75
75
  export { ConversationTurn, ENHANCER_SYSTEM_PROMPT, EnhanceResult, EnhanceUserPromptOptions, enhanceUserPrompt, normalizedEqual, recentTextTurns, shouldEnhance } from './execution/prompt-enhancer.js';
76
76
  export { AutonomyBrainOptions, BrainAutoRisk, TieredBrainArbiterOptions, createAutonomyBrain, createTieredBrainArbiter, formatDecisionSummary } from './execution/index.js';
77
77
  import './path-resolver-CPRj4bFY.js';
78
78
  import 'node:https';
79
79
  import 'undici';
80
- import './selector-gIuhRTkN.js';
80
+ import './selector-CzHh_igB.js';
81
81
  import 'node:events';
82
82
 
83
83
  /**
@@ -850,7 +850,7 @@ declare class InputBuilder {
850
850
  private shouldCollapse;
851
851
  }
852
852
 
853
- 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\n**You are the leader agent.** After completing a significant task, end your\nresponse with 2\u20134 suggested next actions in a `<next_steps>` block. Use this\nexact format so the user can select them with `/next 1`, `/next 2`, or\n`/next 1 2 3`:\n\n```\n<next_steps>\n1. First suggestion \u2014 imperative, specific, actionable\n2. Second suggestion\n3. Third suggestion\n</next_steps>\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- **Concrete actions only** \u2014 never write declarations of intent (\"we should fix X\", \"consider refactoring Y\") or manual suggestions (\"manually check Z\"). Write exactly what should be done: \"Fix null deref in auth/session.ts:42\", \"Run pnpm typecheck\".\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\n**After a significant task**, also post a status update to the inter-agent\nmailbox so other agents in the fleet can discover what you finished and\nroute follow-on work. Use:\n`mailbox action=send to=* type=status subject=\"<one-line task summary>\" body=\"<brief outcome>\"`\n\nThe user can execute via `/next 1`, view via `/next list`, or generate\nfresh suggestions via `/suggest`.";
853
+ 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\n**You are the leader agent.** After completing a significant task, you MAY end your\nresponse with 2\u20134 suggested next prompt options in a `<next_steps>` block.\nThe `/next 1`, `/next 2`, `/next 1 2 3` shortcuts let the user select one\nand continue in a new agent session.\n\nFormat:\n\n```\n<next_steps>\n1. Prompt option 1 \u2014 a concrete next action phrased as what to type\n2. Prompt option 2\n3. Prompt option 3 (optional)\n</next_steps>\n```\n\nRules:\n- Each item is a **prompt the user can type** \u2014 not an instruction to a human.\n Write \"pnpm test\" not \"Run the test suite.\"\n- Human-only actions (e.g., \"open DevTools\") go outside the tag as plain text,\n not inside `<next_steps>`.\n- Items marked `auto=\"true\"` must include the exact input content for copy-paste.\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, omit the tag entirely.\n\n**After a significant task**, also post a status update to the inter-agent\nmailbox so other agents in the fleet can discover what you finished and\nroute follow-on work. Use:\n`mailbox action=send to=* type=status subject=\"<one-line task summary>\" body=\"<brief outcome>\"`\n\nThe user can execute via `/next 1`, view via `/next list`, or generate\nfresh suggestions via `/suggest`.";
854
854
  interface DefaultSystemPromptBuilderOptions {
855
855
  memoryStore?: MemoryStore | undefined;
856
856
  skillLoader?: SkillLoader | undefined;
@@ -884,13 +884,22 @@ interface DefaultSystemPromptBuilderOptions {
884
884
  */
885
885
  contributors?: readonly SystemPromptContributor[] | undefined;
886
886
  /**
887
- * Token-saving mode: when enabled, skill bodies are omitted, tool usage
888
- * hints are trimmed, and optional guidance sections (delegation, mailbox,
889
- * context management) use minimal versions to reduce per-request tokens.
890
- * Enabled via `--token-saving-mode` CLI flag or `features.tokenSavingMode`
891
- * in config.
887
+ * Token-saving mode tier. Controls how aggressively the system prompt is
888
+ * compacted: skill bodies are omitted/trimmed, tool hints are shortened,
889
+ * and optional guidance sections (delegation, mailbox, context management)
890
+ * use minimal versions to reduce per-request tokens.
891
+ *
892
+ * - 'off' — Full guidance (no reduction)
893
+ * - 'minimal' — TIER1 tools, stripped guidance
894
+ * - 'light' — TIER1 + memory tools, minimal patterns
895
+ * - 'medium' — TIER1 + TIER2 tools, some guidance
896
+ * - 'aggressive' — Maximum reduction before tools become unusable
897
+ *
898
+ * Boolean values are accepted for backward compatibility:
899
+ * - `true` → 'medium'
900
+ * - `false` → 'off'
892
901
  */
893
- tokenSavingMode?: boolean | undefined;
902
+ tokenSavingMode?: TokenSavingTier | boolean | undefined;
894
903
  }
895
904
  declare class DefaultSystemPromptBuilder implements SystemPromptBuilder {
896
905
  private readonly opts;
@@ -912,6 +921,19 @@ declare class DefaultSystemPromptBuilder implements SystemPromptBuilder {
912
921
  /** Cached full buildToolUsage output — keyed by tools array + online agents refs. */
913
922
  private _toolsUsageCache?;
914
923
  constructor(opts?: DefaultSystemPromptBuilderOptions);
924
+ /**
925
+ * Normalizes `tokenSavingMode` to a boolean for backward-compatible boolean checks.
926
+ * - `undefined` / `false` / `'off'` → false
927
+ * - `true` / any tier string other than `'off'` → true
928
+ */
929
+ private get isCompact();
930
+ /** Exposes the normalized `TokenSavingTier` for tier-aware guidance decisions. */
931
+ private get tier();
932
+ /**
933
+ * Returns the max tool description length for the current tier.
934
+ * Per the design doc: off=80, minimal=40, light=50, medium=60, aggressive=70.
935
+ */
936
+ private toolDescLimit;
915
937
  build(ctx: BuildContext): Promise<TextBlock[]>;
916
938
  /**
917
939
  * Cached plan content keyed by (planPath, mtimeMs). The plan is read
@@ -936,6 +958,10 @@ declare class DefaultSystemPromptBuilder implements SystemPromptBuilder {
936
958
  * build turn (hundreds of ms). Reference equality avoids re-stringifying
937
959
  * the same array on every iteration while still being correct when the
938
960
  * caller passes a fresh array.
961
+ *
962
+ * Tier behaviour:
963
+ * - 'off' / 'medium' / 'aggressive' → full list with names, sessions, sources
964
+ * - 'minimal' / 'light' → count only (no list)
939
965
  */
940
966
  private renderOnlineAgents;
941
967
  private buildEnvironment;
@@ -1090,6 +1116,92 @@ declare class DefaultPluginAPI implements PluginAPI {
1090
1116
  registerSystemPromptContributor(c: SystemPromptContributor): () => void;
1091
1117
  registerHook(event: HookEvent, matcher: HookMatcher | undefined, hook: InProcessHook): () => void;
1092
1118
  }
1119
+ /**
1120
+ * Define a plugin with automatic `apiVersion` injection and optional
1121
+ * TypeScript type inference for the plugin options schema.
1122
+ *
1123
+ * The `options` generic is inferred from the `factory` function's second
1124
+ * parameter, so annotating it gives you fully-typed options throughout:
1125
+ *
1126
+ * @example
1127
+ * ```ts
1128
+ * import { definePlugin } from '@wrongstack/core';
1129
+ *
1130
+ * interface MyOptions {
1131
+ * threshold: number;
1132
+ * enabled: boolean;
1133
+ * }
1134
+ *
1135
+ * const myPlugin = definePlugin(
1136
+ * {
1137
+ * name: 'my-plugin',
1138
+ * version: '0.1.0',
1139
+ * description: 'My example plugin',
1140
+ * capabilities: { tools: true },
1141
+ * configSchema: {
1142
+ * type: 'object',
1143
+ * properties: {
1144
+ * threshold: { type: 'number', default: 100 },
1145
+ * enabled: { type: 'boolean', default: true },
1146
+ * },
1147
+ * },
1148
+ * defaultConfig: { threshold: 100, enabled: true },
1149
+ * },
1150
+ * (api, options) => {
1151
+ * // options.threshold is `number` here, not `unknown`
1152
+ * api.tools.register({
1153
+ * name: 'my-tool',
1154
+ * description: `Threshold is ${options.threshold}`,
1155
+ * // ...
1156
+ * });
1157
+ * },
1158
+ * );
1159
+ *
1160
+ * export default myPlugin;
1161
+ * ```
1162
+ *
1163
+ * Plugins that don't need typed options can omit the interface and let
1164
+ * TypeScript infer from `defaultConfig`, or omit `defaultConfig` entirely
1165
+ * (options will be `undefined` at runtime, accessible via `api.config`):
1166
+ *
1167
+ * @example
1168
+ * ```ts
1169
+ * const simplePlugin = definePlugin(
1170
+ * { name: 'simple' },
1171
+ * (api) => {
1172
+ * api.tools.register({ name: 'ping', description: 'Ping the service' });
1173
+ * },
1174
+ * );
1175
+ * ```
1176
+ *
1177
+ * The `apiVersion` is automatically set to the current `KERNEL_API_VERSION`
1178
+ * so plugins are always compatible with the kernel that loaded them.
1179
+ * Plugins that need to pin to a specific kernel version can override it
1180
+ * in the returned object before exporting.
1181
+ */
1182
+ declare function definePlugin<const TOptions extends Record<string, unknown> | undefined>(metadata: {
1183
+ name: string;
1184
+ version?: string | undefined;
1185
+ description?: string | undefined;
1186
+ capabilities?: PluginCapabilities | undefined;
1187
+ configSchema?: JSONSchema | undefined;
1188
+ defaultConfig?: TOptions | undefined;
1189
+ dependsOn?: (string | PluginDependency)[] | undefined;
1190
+ optionalDeps?: (string | PluginDependency)[] | undefined;
1191
+ conflictsWith?: string[] | undefined;
1192
+ }, factory: (api: PluginAPI, options: TOptions) => void | Promise<void>): {
1193
+ name: string;
1194
+ version?: string | undefined;
1195
+ description?: string | undefined;
1196
+ apiVersion: string;
1197
+ capabilities?: PluginCapabilities | undefined;
1198
+ configSchema?: JSONSchema | undefined;
1199
+ defaultConfig?: TOptions | undefined;
1200
+ dependsOn?: (string | PluginDependency)[] | undefined;
1201
+ optionalDeps?: (string | PluginDependency)[] | undefined;
1202
+ conflictsWith?: string[] | undefined;
1203
+ setup: (api: PluginAPI) => void | Promise<void>;
1204
+ };
1093
1205
 
1094
1206
  /**
1095
1207
  * Stable plugin API contract version. This is intentionally independent of
@@ -1131,6 +1243,18 @@ interface LoadPluginsOptions {
1131
1243
  * manifest honesty. Default: false (log-only, backward-compatible).
1132
1244
  */
1133
1245
  enforceCapabilities?: boolean | undefined;
1246
+ /**
1247
+ * Timeout in milliseconds for each plugin's `setup()` call. If the
1248
+ * plugin's setup exceeds this deadline it is treated as a failure
1249
+ * and the plugin is not loaded. Default: 30 000 ms.
1250
+ */
1251
+ setupTimeoutMs?: number | undefined;
1252
+ /**
1253
+ * Timeout in milliseconds for each plugin's `teardown()` call. If the
1254
+ * plugin's teardown exceeds this deadline it is treated as a best-effort
1255
+ * failure (logged but not propagated). Default: 10 000 ms.
1256
+ */
1257
+ teardownTimeoutMs?: number | undefined;
1134
1258
  }
1135
1259
  declare function loadPlugins(plugins: Plugin[], opts: LoadPluginsOptions): Promise<{
1136
1260
  loaded: Plugin[];
@@ -1950,6 +2074,13 @@ declare function buildMailboxBlock(messages: MailboxMessage[]): {
1950
2074
  type: 'text';
1951
2075
  text: string;
1952
2076
  };
2077
+ /** Result of an inject pass — signals an out-of-band control request. */
2078
+ interface MailboxInjectResult {
2079
+ /** A fresh `control:interrupt` message asked this agent to stop. */
2080
+ interrupt: boolean;
2081
+ /** Operator-supplied reason for the interrupt, if any. */
2082
+ interruptReason?: string | undefined;
2083
+ }
1953
2084
  declare function injectPendingMailboxMessages(checkMailbox: () => Promise<MailboxMessage[]>, foldFn: (block: {
1954
2085
  type: 'text';
1955
2086
  text: string;
@@ -1960,7 +2091,7 @@ declare function injectPendingMailboxMessages(checkMailbox: () => Promise<Mailbo
1960
2091
  logger: {
1961
2092
  debug?: (...args: unknown[]) => void;
1962
2093
  };
1963
- }): Promise<void>;
2094
+ }): Promise<MailboxInjectResult>;
1964
2095
 
1965
2096
  /**
1966
2097
  * Minimal interface exposing the Agent fields that the extracted
@@ -2398,4 +2529,4 @@ interface ChimeraReviewNeededPayload {
2398
2529
  declare const CHIMERA_REVIEW_PROMPT = "You are Chimera, a post-session code quality agent. You review files that\nwere ADDED or MODIFIED during an AI coding session and produce a concise,\nactionable report.\n\nRULES\n1. Only review the files provided \u2014 do not expand scope.\n2. Use read/grep/lint tools to inspect files before flagging issues.\n3. Be surgical \u2014 flag real bugs, not style preferences.\n4. Severity-ranked: Critical > High > Medium > Low. Only report Medium+.\n5. One finding per line with severity, file:line, and a one-sentence fix.\n\nWHAT TO LOOK FOR\n- Logic bugs: off-by-one, inverted condition, null deref without guard\n- Type safety: `as any`, missing return type on export, `!` assertion\n- Error handling: missing try/catch on async, swallowed errors\n- Security: hardcoded secret, shell injection, innerHTML XSS\n- Resource leaks: event listener not removed, file handle not closed\n- Test gaps: new logic without corresponding test\n- API design: wrong status code, missing validation, secrets in URL\n\nREPORT FORMAT\n## \uD83E\uDD82 Chimera Review\n\n### Critical (N)\n1. [BUG] `path/file.ts:42` \u2014 description\n \u2192 fix suggestion\n\n### High (N)\n...\n\n### Medium (N)\n...\n\n### Summary\n- Files reviewed: N\n- Findings: C critical, H high, M medium\n- Clean files: N\n\nIf NOTHING worth flagging:\n## \uD83E\uDD82 Chimera Review \u2014 all clear \u2705\nNo issues found in N changed files.";
2399
2530
  declare function createChimeraPlugin(): Plugin;
2400
2531
 
2401
- export { AddAttachmentInput, AgentPipelines, AttachmentRef, AttachmentStore, type AutoPhaseOptions, type AutoPhasePlanResult, AutoPhasePlanner, type AutoPhasePlannerOptions, AutoPhaseRunner, type AutoPhaseRunnerOptions, type BootConfigOptions, type BootConfigResult, BrainArbiter, BuildContext, CHIMERA_REVIEW_PROMPT, type Checkpoint, CheckpointManager, type CheckpointManagerOptions, type ChimeraReviewNeededPayload, type CollabBusState, type InjectedToolResult as CollabInjectedToolResult, type CollabPauseMiddlewareOptions, CollaborationBus, Config, ConfigStore, Container, ContentBlock, type ContentScore, Context, type ContinueDirective, DefaultLogger, DefaultPathResolver, DefaultPluginAPI, DefaultPromptStore, DefaultSecretVault, DefaultSystemPromptBuilder, type DefaultSystemPromptBuilderOptions, type DetectedDependency, type DetectionResult, type EliseResult, EventBus, EventName, ExtensionRegistry, type FileAuthorEntry, type FileAuthorLog, type FileAuthorTrackerOptions, type Finding, type FullScanResult, type GeneratedSecuritySkill, type GeneratedSkill, type GeneratedSkillContent, GitignoreUpdater, HealthRegistry, HookEvent, HookInput, HookMatcher, HookOutcome, HookRegistry, InProcessHook, InputBuilder, type InputBuilderEvent, type InputBuilderOptions, KERNEL_API_VERSION, LAYER_1_IDENTITY, Listener, type LoadPluginsOptions, Logger, MATRIX_PHASE_KEYS, MCPRegistryHandle, MCPRegistryView, Mailbox, type MailboxLoopOptions, MailboxMessage, type MatrixKeyKind, MemoryStore, Message, MetricsSink, MetricsSinkView, ModeStore, ModelCapabilities, ModelMatrixEntry, type PackageManager, PermissionPolicy, type PhaseEventMap, type PhaseEventName, type PhaseExecutionContext, type PhaseFilter, type PhaseGraph, PhaseGraphBuilder, type PhaseGraphBuilderOptions, type PhaseNode, PhaseOrchestrator, type PhaseOrchestratorOptions, type PhaseProgress, type PhaseSort, type PhaseStatus, PhaseStore, type PhaseStoreOptions, type PhaseTemplate, Plugin, PluginAPI, type PluginAPIInit, PluginCapabilities, PluginPipelines, Provider, ProviderRegistry, ProviderRegistryView, ProviderRunner, Renderer, ReplayLogStore, type ReplayMode, ReplayProviderRunner, type ReplayProviderRunnerOptions, ReportGenerator, type ReportOptions, Request, type ResolvedChimeraConfig, Response, RunProviderOptions$1 as RunProviderOptions, type ScanOptions, type ScanResult, type ScanScope, type SecurityPattern, SecurityScanner, type SecurityScannerContext, type SecurityScannerOptions, SecurityScannerOrchestrator, SessionWriterView, type SeverityLevel, type ShellHookSpec, type SkillGenerationContext, SkillGenerator, type SkillGeneratorOptions, SkillLoader, SlashCommand, SlashCommandRegistry, SlashCommandRegistryView, SystemPromptBuilder, SystemPromptContributor, TaskGraph, TaskNode, TaskPriority, TaskStore, TaskType, type TechStack, type TechStackConsumerOptions, TechStackDetector, type TechStackInfo, TextBlock, Tool, ToolCallPipelinePayload, ToolRegistry, ToolRegistryView, Tracer, WorktreeManager, WstackPaths, attachMailboxChecker, bootConfig, buildBtwBlock, buildLosslessDigest, buildMailboxBlock, buildQueuedMessagesBlock, buildSmartDigest, collabInjectMiddleware, collabPauseMiddleware, compactLog, consumeBtwNotes, consumeQueuedMessagesUpdate, createAutoPhaseFromTaskGraph, createChimeraPlugin, createGitPlugin, createMailboxChecker, createMcpUseTool, createObservabilityPlugin, createPlanPlugin, createPromptsPlugin, createSecurityPlugin, createSecuritySlashCommand, createSkillsPlugin, createSyncPlugin, defaultGitignoreUpdater, defaultOrchestrator, defaultReportGenerator, defaultSecurityScanner, defaultSkillGenerator, defaultTechStackDetector, eliseOldToolResults, estimateMessageTokens, estimateMessages, extractText, findPreserveStart, flagsToConfigPatch, getFileHistory, getFilesByAgent, getFullLog, getLastAuthor, hasTextContent, hashRequest, injectPendingMailboxMessages, isValidMatrixKey, loadPlugins, makeContinueToNextIterationTool, matrixKeyKind, parseContinueDirective, peekQueuedMessages, pendingBtwCount, phaseForRole, recordFileAction, resolveChimeraConfig, resolveModelMatrix, runProviderWithRetry, runShellHook, scoreMessage, securitySlashCommand, setBtwNote, setQueuedMessagesSnapshot, stableStringify, startTechStackConsumer, unloadPlugins };
2532
+ export { AddAttachmentInput, AgentPipelines, AttachmentRef, AttachmentStore, type AutoPhaseOptions, type AutoPhasePlanResult, AutoPhasePlanner, type AutoPhasePlannerOptions, AutoPhaseRunner, type AutoPhaseRunnerOptions, type BootConfigOptions, type BootConfigResult, BrainArbiter, BuildContext, CHIMERA_REVIEW_PROMPT, type Checkpoint, CheckpointManager, type CheckpointManagerOptions, type ChimeraReviewNeededPayload, type CollabBusState, type InjectedToolResult as CollabInjectedToolResult, type CollabPauseMiddlewareOptions, CollaborationBus, Config, ConfigStore, Container, ContentBlock, type ContentScore, Context, type ContinueDirective, DefaultLogger, DefaultPathResolver, DefaultPluginAPI, DefaultPromptStore, DefaultSecretVault, DefaultSystemPromptBuilder, type DefaultSystemPromptBuilderOptions, type DetectedDependency, type DetectionResult, type EliseResult, EventBus, EventName, ExtensionRegistry, type FileAuthorEntry, type FileAuthorLog, type FileAuthorTrackerOptions, type Finding, type FullScanResult, type GeneratedSecuritySkill, type GeneratedSkill, type GeneratedSkillContent, GitignoreUpdater, HealthRegistry, HookEvent, HookInput, HookMatcher, HookOutcome, HookRegistry, InProcessHook, InputBuilder, type InputBuilderEvent, type InputBuilderOptions, JSONSchema, KERNEL_API_VERSION, LAYER_1_IDENTITY, Listener, type LoadPluginsOptions, Logger, MATRIX_PHASE_KEYS, MCPRegistryHandle, MCPRegistryView, Mailbox, type MailboxLoopOptions, MailboxMessage, type MatrixKeyKind, MemoryStore, Message, MetricsSink, MetricsSinkView, ModeStore, ModelCapabilities, ModelMatrixEntry, type PackageManager, PermissionPolicy, type PhaseEventMap, type PhaseEventName, type PhaseExecutionContext, type PhaseFilter, type PhaseGraph, PhaseGraphBuilder, type PhaseGraphBuilderOptions, type PhaseNode, PhaseOrchestrator, type PhaseOrchestratorOptions, type PhaseProgress, type PhaseSort, type PhaseStatus, PhaseStore, type PhaseStoreOptions, type PhaseTemplate, Plugin, PluginAPI, type PluginAPIInit, PluginCapabilities, PluginDependency, PluginPipelines, Provider, ProviderRegistry, ProviderRegistryView, ProviderRunner, Renderer, ReplayLogStore, type ReplayMode, ReplayProviderRunner, type ReplayProviderRunnerOptions, ReportGenerator, type ReportOptions, Request, type ResolvedChimeraConfig, Response, RunProviderOptions$1 as RunProviderOptions, type ScanOptions, type ScanResult, type ScanScope, type SecurityPattern, SecurityScanner, type SecurityScannerContext, type SecurityScannerOptions, SecurityScannerOrchestrator, SessionWriterView, type SeverityLevel, type ShellHookSpec, type SkillGenerationContext, SkillGenerator, type SkillGeneratorOptions, SkillLoader, SlashCommand, SlashCommandRegistry, SlashCommandRegistryView, SystemPromptBuilder, SystemPromptContributor, TaskGraph, TaskNode, TaskPriority, TaskStore, TaskType, type TechStack, type TechStackConsumerOptions, TechStackDetector, type TechStackInfo, TextBlock, TokenSavingTier, Tool, ToolCallPipelinePayload, ToolRegistry, ToolRegistryView, Tracer, WorktreeManager, WstackPaths, attachMailboxChecker, bootConfig, buildBtwBlock, buildLosslessDigest, buildMailboxBlock, buildQueuedMessagesBlock, buildSmartDigest, collabInjectMiddleware, collabPauseMiddleware, compactLog, consumeBtwNotes, consumeQueuedMessagesUpdate, createAutoPhaseFromTaskGraph, createChimeraPlugin, createGitPlugin, createMailboxChecker, createMcpUseTool, createObservabilityPlugin, createPlanPlugin, createPromptsPlugin, createSecurityPlugin, createSecuritySlashCommand, createSkillsPlugin, createSyncPlugin, defaultGitignoreUpdater, defaultOrchestrator, defaultReportGenerator, defaultSecurityScanner, defaultSkillGenerator, defaultTechStackDetector, definePlugin, eliseOldToolResults, estimateMessageTokens, estimateMessages, extractText, findPreserveStart, flagsToConfigPatch, getFileHistory, getFilesByAgent, getFullLog, getLastAuthor, hasTextContent, hashRequest, injectPendingMailboxMessages, isValidMatrixKey, loadPlugins, makeContinueToNextIterationTool, matrixKeyKind, parseContinueDirective, peekQueuedMessages, pendingBtwCount, phaseForRole, recordFileAction, resolveChimeraConfig, resolveModelMatrix, runProviderWithRetry, runShellHook, scoreMessage, securitySlashCommand, setBtwNote, setQueuedMessagesSnapshot, stableStringify, startTechStackConsumer, unloadPlugins };