@wrongstack/core 0.89.1 → 0.104.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 (87) hide show
  1. package/dist/{agent-bridge-B8F2ORwg.d.ts → agent-bridge-mOxbpFcg.d.ts} +1 -1
  2. package/dist/{agent-subagent-runner-CQaLFNnA.d.ts → agent-subagent-runner-DukQLUcS.d.ts} +433 -433
  3. package/dist/{events-DzyLtja6.d.ts → brain-Dfv4Y82E.d.ts} +179 -92
  4. package/dist/{compactor-CJq7LQev.d.ts → compactor-DXLxLcmU.d.ts} +2 -2
  5. package/dist/{config-_DZ7dN-T.d.ts → config-BSU-6vah.d.ts} +45 -38
  6. package/dist/{context-ToHAp4-U.d.ts → context-CNRYfhUv.d.ts} +1 -1
  7. package/dist/coordination/index.d.ts +16 -17
  8. package/dist/coordination/index.js +128 -37
  9. package/dist/coordination/index.js.map +1 -1
  10. package/dist/defaults/index.d.ts +34 -35
  11. package/dist/defaults/index.js +752 -218
  12. package/dist/defaults/index.js.map +1 -1
  13. package/dist/{director-state-CgIc30qi.d.ts → director-state-BfeCUbmk.d.ts} +1 -1
  14. package/dist/execution/index.d.ts +65 -370
  15. package/dist/execution/index.js +446 -53
  16. package/dist/execution/index.js.map +1 -1
  17. package/dist/extension/index.d.ts +9 -10
  18. package/dist/extension/index.js +8 -6
  19. package/dist/extension/index.js.map +1 -1
  20. package/dist/goal-preamble-CI8lxeY1.d.ts +378 -0
  21. package/dist/{goal-store-DvWLNu52.d.ts → goal-store-ht0VmR1A.d.ts} +63 -21
  22. package/dist/{index-Ca_lOmKl.d.ts → index-BWRN6wOb.d.ts} +13 -15
  23. package/dist/{index-Dx-CnrDN.d.ts → index-DIKEcfgC.d.ts} +9 -10
  24. package/dist/index.d.ts +188 -176
  25. package/dist/index.js +1508 -407
  26. package/dist/index.js.map +1 -1
  27. package/dist/infrastructure/index.d.ts +9 -9
  28. package/dist/infrastructure/index.js +4 -2
  29. package/dist/infrastructure/index.js.map +1 -1
  30. package/dist/kernel/index.d.ts +14 -16
  31. package/dist/kernel/index.js.map +1 -1
  32. package/dist/{logger-B72yyPc6.d.ts → logger-B63L5bTg.d.ts} +1 -1
  33. package/dist/{logger-C_27pj9i.d.ts → logger-B9J5puGM.d.ts} +1 -1
  34. package/dist/{mcp-servers-Dck3T85_.d.ts → mcp-servers-CXCsANdY.d.ts} +3 -3
  35. package/dist/{mode-CHo2XtHs.d.ts → mode-ARA3HrkY.d.ts} +1 -1
  36. package/dist/models/index.d.ts +5 -5
  37. package/dist/models/index.js +8 -6
  38. package/dist/models/index.js.map +1 -1
  39. package/dist/{models-registry-Be3osGt5.d.ts → models-registry-B6_KfS65.d.ts} +1 -1
  40. package/dist/{models-registry-Boz639EI.d.ts → models-registry-DU64QxQa.d.ts} +1 -1
  41. package/dist/{multi-agent-coordinator-Da9nd8Ic.d.ts → multi-agent-coordinator-51LvnXkD.d.ts} +2 -2
  42. package/dist/{null-fleet-bus-CHJOXv3t.d.ts → null-fleet-bus-D09hMzFQ.d.ts} +32 -31
  43. package/dist/observability/index.d.ts +3 -3
  44. package/dist/{observability-CoSNZdhX.d.ts → observability-D-HZN_mF.d.ts} +1 -1
  45. package/dist/{parallel-eternal-engine-DyMCj2Pw.d.ts → parallel-eternal-engine-CUtmM_0V.d.ts} +54 -35
  46. package/dist/{path-resolver-TjBlRKyH.d.ts → path-resolver-DDJiMAtX.d.ts} +3 -3
  47. package/dist/{permission-14CChMmO.d.ts → permission-BDv7z0mk.d.ts} +7 -2
  48. package/dist/{permission-policy-gW5htOo1.d.ts → permission-policy-dF74EpDp.d.ts} +2 -2
  49. package/dist/{system-prompt-C0rLCeyn.d.ts → pipeline-BqiA_UMr.d.ts} +73 -73
  50. package/dist/{plan-templates-D9UhwoGh.d.ts → plan-templates-BdDxl9cI.d.ts} +79 -11
  51. package/dist/{provider-runner-BEPWwkxH.d.ts → provider-runner-BUunikwY.d.ts} +5 -5
  52. package/dist/{retry-policy-DSu6O6rD.d.ts → retry-policy-BcmuT_V0.d.ts} +2 -2
  53. package/dist/sdd/index.d.ts +17 -33
  54. package/dist/sdd/index.js +145 -36
  55. package/dist/sdd/index.js.map +1 -1
  56. package/dist/{secret-scrubber-yGBFQYju.d.ts → secret-vault-DrOhc2i5.d.ts} +7 -7
  57. package/dist/security/index.d.ts +4 -5
  58. package/dist/security/index.js +4 -2
  59. package/dist/security/index.js.map +1 -1
  60. package/dist/{selector-11-fm95U.d.ts → selector-C7wcdqMA.d.ts} +1 -1
  61. package/dist/{session-event-bridge-D0u-x576.d.ts → session-event-bridge-BpJ5trO9.d.ts} +2 -2
  62. package/dist/{session-reader-BQU-toaN.d.ts → session-reader-DDz1Ek4V.d.ts} +2 -2
  63. package/dist/{skill-BJeF2DwY.d.ts → skill-Bj6Ezqb8.d.ts} +1 -1
  64. package/dist/skills/index.d.ts +1 -1
  65. package/dist/skills/index.js +3 -9
  66. package/dist/skills/index.js.map +1 -1
  67. package/dist/spec-TBi3Jr6T.d.ts +78 -0
  68. package/dist/storage/index.d.ts +145 -13
  69. package/dist/storage/index.js +990 -172
  70. package/dist/storage/index.js.map +1 -1
  71. package/dist/task-format-vGOIftmK.d.ts +23 -0
  72. package/dist/task-graph-u1q9Jkyk.d.ts +84 -0
  73. package/dist/types/index.d.ts +27 -28
  74. package/dist/types/index.js +19 -31
  75. package/dist/types/index.js.map +1 -1
  76. package/dist/utils/expect-defined.d.ts +7 -0
  77. package/dist/utils/expect-defined.js +11 -0
  78. package/dist/utils/expect-defined.js.map +1 -0
  79. package/dist/utils/index.d.ts +8 -20
  80. package/dist/utils/index.js +120 -41
  81. package/dist/utils/index.js.map +1 -1
  82. package/dist/{wstack-paths-BQMvEllz.d.ts → wstack-paths-_lqjzErq.d.ts} +1 -1
  83. package/package.json +5 -1
  84. package/skills/tech-stack/SKILL.md +177 -0
  85. package/dist/memory-CEXuo7sz.d.ts +0 -16
  86. package/dist/secret-scrubber-3MHDDAtm.d.ts +0 -6
  87. package/dist/task-graph-CikNdRTG.d.ts +0 -161
package/dist/index.d.ts CHANGED
@@ -1,73 +1,73 @@
1
- import { S as SystemPromptBuilder, c as ModelCapabilities, a as BuildContext, C as Container, H as HookRegistry } from './system-prompt-C0rLCeyn.js';
2
- export { B as BindOptions, D as Decorator, F as Factory, M as Middleware, b as MiddlewareHandler, N as NextFn, P as Pipeline, d as PipelineOptions, e as Renderer, T as Token, h as hookMatcherMatches } from './system-prompt-C0rLCeyn.js';
3
- import { E as EventBus, k as EventName, L as Listener, B as BrainArbiter } from './events-DzyLtja6.js';
4
- export { a as BrainDecision, b as BrainDecisionOption, c as BrainDecisionQueue, d as BrainDecisionRequest, e as BrainDecisionSource, f as BrainFallback, g as BrainRisk, D as DefaultBrainArbiter, h as DefaultBrainArbiterOptions, i as EventLogger, j as EventMap, H as HumanEscalatingBrainArbiter, O as ObservableBrainArbiter, S as ScopedEventBus, l as formatHumanPrompt } from './events-DzyLtja6.js';
5
- import { d as WorktreeManager } from './index-Ca_lOmKl.js';
6
- export { A as AllocateOpts, M as MergeOpts, a as MergeResult, R as RunController, b as RunControllerOptions, T as TOKENS, W as WorktreeHandle, e as WorktreeManagerOptions, c as WorktreeRunResult, f as WorktreeStatus, g as assertSafePath } from './index-Ca_lOmKl.js';
7
- import { d as Context, m as Provider, Q as Tool, p as Request, q as Response, c as ContentBlock, T as TextBlock, M as Message } from './context-ToHAp4-U.js';
8
- export { A as AgentError, a as Capabilities, b as ConfigError, e as ContextInit, f as ConversationState, E as ERROR_CODES, g as ErrorCode, h as ErrorSeverity, i as ErrorSubsystem, F as FileSnapshot, j as FsError, I as ImageBlock, J as JSONSchema, k as MessageRole, P as Permission, l as PluginError, n as ProviderError, o as ProviderErrorBody, R as ReadonlyConversationState, r as ResumedSession, s as RiskTier, t as RunEnv, u as RunOptions, S as SessionData, v as SessionError, w as SessionEvent, x as SessionMetadata, y as SessionStore, z as SessionSummary, B as SessionWriter, D as StateChange, G as StateChangeHandler, H as StopReason, K as StreamEvent, L as ThinkingBlock, N as TodoItem, O as TokenCounter, U as ToolCallContext, V as ToolError, W as ToolFinalEvent, X as ToolProgressEvent, Y as ToolResultBlock, Z as ToolStreamEvent, _ as ToolUseBlock, $ as Usage, a0 as WrongStackError, a1 as asBlocks, a2 as asText, a3 as extractRunEnv, a4 as isAgentError, a5 as isConfigError, a6 as isFsError, a7 as isImageBlock, a8 as isPluginError, a9 as isSessionError, aa as isTextBlock, ab as isThinkingBlock, ac as isToolError, ad as isToolResultBlock, ae as isToolUseBlock, af as isWrongStackError, ag as toWrongStackError, ah as wrapAsState } from './context-ToHAp4-U.js';
9
- import { P as ProviderRunner, R as RunProviderOptions$1 } from './provider-runner-BEPWwkxH.js';
10
- import { M as MCPServerConfig, a as Config, m as HookInput, o as HookOutcome, l as HookEvent, n as HookMatcher, I as InProcessHook, r as ModelMatrixEntry, c as ConfigStore } from './config-_DZ7dN-T.js';
11
- export { A as AutonomyConfig, C as CONTEXT_WINDOW_MODES, b as ConfigLoader, d as ContextConfig, e as ContextWindowAggressiveOn, f as ContextWindowConfigLike, g as ContextWindowMode, h as ContextWindowModeId, i as ContextWindowPolicy, j as ContextWindowThresholds, k as CustomModelDefinition, D as DEFAULT_CONTEXT_WINDOW_MODE_ID, F as FeaturesConfig, H as HookEntry, p as IndexingConfig, L as LaunchConfig, q as LogConfig, P as PluginConfig, s as ProviderApiKey, t as ProviderConfig, S as SessionLoggingConfig, u as ShellHook, v as SyncCategory, w as SyncConfig, T as ToolsConfig, x as formatContextWindowModeList, y as getContextWindowMode, z as isContextWindowModeId, B as listContextWindowModes, E as resolveContextWindowPolicy } from './config-_DZ7dN-T.js';
12
- export { C as CompactReport, a as Compactor } from './compactor-CJq7LQev.js';
13
- export { P as PermissionDecision, a as PermissionPolicy, T as TrustPolicy } from './permission-14CChMmO.js';
1
+ import { S as SystemPromptBuilder, b as ModelCapabilities, B as BuildContext, C as Container, H as HookRegistry } from './pipeline-BqiA_UMr.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-BqiA_UMr.js';
3
+ import { E as EventBus, l as MemoryStore, c as EventName, L as Listener, b as BrainArbiter } from './brain-Dfv4Y82E.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-Dfv4Y82E.js';
5
+ import { W as WorktreeManager } from './index-BWRN6wOb.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-BWRN6wOb.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-CNRYfhUv.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 ThinkingBlock, s as TodoItem, c as TokenCounter, Y as ToolCallContext, Z as ToolError, _ as ToolFinalEvent, j as ToolProgressEvent, n as ToolResultBlock, $ as ToolStreamEvent, m as ToolUseBlock, U as Usage, a0 as WrongStackError, a1 as asBlocks, a2 as asText, a3 as extractRunEnv, a4 as isAgentError, a5 as isConfigError, a6 as isFsError, a7 as isImageBlock, a8 as isPluginError, a9 as isSessionError, aa as isTextBlock, ab as isThinkingBlock, ac as isToolError, ad as isToolResultBlock, ae as isToolUseBlock, af as isWrongStackError, ag as toWrongStackError, ah as wrapAsState } from './context-CNRYfhUv.js';
9
+ import { P as ProviderRunner, R as RunProviderOptions$1 } from './provider-runner-BUunikwY.js';
10
+ import { M as MCPServerConfig, d as Config, i as HookInput, j as HookOutcome, H as HookEvent, a as HookMatcher, I as InProcessHook, h as ModelMatrixEntry, e as ConfigStore } from './config-BSU-6vah.js';
11
+ export { A as AutonomyConfig, k as CONTEXT_WINDOW_MODES, f as ConfigLoader, l as ContextConfig, C as ContextWindowAggressiveOn, m as ContextWindowConfigLike, n as ContextWindowMode, o as ContextWindowModeId, c as ContextWindowPolicy, p as ContextWindowThresholds, q as CustomModelDefinition, D as DEFAULT_CONTEXT_WINDOW_MODE_ID, F as FeaturesConfig, b as HookEntry, r as IndexingConfig, L as LaunchConfig, s as LogConfig, P as PluginConfig, t as ProviderApiKey, u as ProviderConfig, v as SessionLoggingConfig, S as ShellHook, w as SyncCategory, g as SyncConfig, T as ToolsConfig, x as formatContextWindowModeList, y as getContextWindowMode, z as isContextWindowModeId, B as listContextWindowModes, E as resolveContextWindowPolicy } from './config-BSU-6vah.js';
12
+ export { a as CompactReport, C as Compactor } from './compactor-DXLxLcmU.js';
13
+ export { a as PermissionDecision, P as PermissionPolicy, S as SecretScrubber, T as TrustPolicy } from './permission-BDv7z0mk.js';
14
14
  export { C as CheckpointInfo, R as RewindResult, a as RewindResultExtended, S as SessionRewinder } from './session-rewinder-C9HnMkhP.js';
15
- import { e as AttachmentStore, d as AttachmentRef, A as AddAttachmentInput } from './session-reader-BQU-toaN.js';
16
- export { a as Attachment, b as AttachmentKind, c as AttachmentMeta, D as DefaultSessionReader, f as DefaultSessionReaderOptions, S as SessionReader } from './session-reader-BQU-toaN.js';
15
+ import { A as AttachmentStore, b as AttachmentRef, a as AddAttachmentInput } from './session-reader-DDz1Ek4V.js';
16
+ export { c as Attachment, d as AttachmentKind, e as AttachmentMeta, D as DefaultSessionReader, f as DefaultSessionReaderOptions, S as SessionReader } from './session-reader-DDz1Ek4V.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-scrubber-yGBFQYju.js';
19
- export { D as DefaultSecretScrubber, S as SecretVaultOptions, d as decryptConfigSecrets, e as encryptConfigSecrets, m as migratePlaintextSecrets, r as rewriteConfigEncrypted } from './secret-scrubber-yGBFQYju.js';
20
- import { D as DefaultLogger } from './logger-C_27pj9i.js';
21
- export { a as DefaultLoggerOptions } from './logger-C_27pj9i.js';
22
- import { D as DefaultPathResolver } from './path-resolver-TjBlRKyH.js';
23
- export { a as DefaultTokenCounter } from './path-resolver-TjBlRKyH.js';
24
- import { b as MemoryStore } from './memory-CEXuo7sz.js';
25
- export { M as MemoryEntry, a as MemoryScope } from './memory-CEXuo7sz.js';
26
- 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-DyMCj2Pw.js';
27
- import { a as SkillLoader } from './skill-BJeF2DwY.js';
28
- export { S as SkillEntry, b as SkillManifest } from './skill-BJeF2DwY.js';
18
+ import { a as DefaultSecretVault } from './secret-vault-DrOhc2i5.js';
19
+ export { D as DefaultSecretScrubber, S as SecretVaultOptions, d as decryptConfigSecrets, e as encryptConfigSecrets, m as migratePlaintextSecrets, r as rewriteConfigEncrypted } from './secret-vault-DrOhc2i5.js';
20
+ import { D as DefaultLogger } from './logger-B9J5puGM.js';
21
+ export { a as DefaultLoggerOptions } from './logger-B9J5puGM.js';
22
+ import { D as DefaultPathResolver } from './path-resolver-DDJiMAtX.js';
23
+ export { a as DefaultTokenCounter } from './path-resolver-DDJiMAtX.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-CUtmM_0V.js';
25
+ import { S as SkillLoader } from './skill-Bj6Ezqb8.js';
26
+ export { b as SkillEntry, a as SkillManifest } from './skill-Bj6Ezqb8.js';
29
27
  export { I as InputReader, P as PromptOption } from './input-reader-E-ffP2ee.js';
30
- import { H as SlashCommand, w as PluginAPI, z as PluginPipelines, Z as ToolRegistryView, G as ProviderRegistryView, M as MCPRegistryView, I as SlashCommandRegistryView, S as SessionWriterView, t as MetricsSinkView, P as Plugin } from './agent-subagent-runner-CQaLFNnA.js';
31
- export { A as Agent, c as AgentFactory, d as AgentFactoryResult, e as AgentRunnerOptions, g as BudgetExceededError, h as BudgetKind, i as BudgetLimits, n as BudgetUsage, C as CoordinatorEvents, o as CoordinatorStatus, D as DoneCondition, F as FleetBus, p as FleetEvent, q as FleetHandler, r as FleetUsage, s as FleetUsageAggregator, u as MultiAgentConfig, v as MultiAgentCoordinator, x as PluginCapabilities, y as PluginDependency, J as SpawnResult, K as SubagentBudget, L as SubagentConfig, N as SubagentContext, O as SubagentError, Q as SubagentErrorKind, R as SubagentRunContext, T as SubagentRunOutcome, U as SubagentRunner, V as SubagentUsageSnapshot, W as TaskDelegation, X as TaskResult, Y as TaskSpec, _ as makeAgentSubagentRunner } from './agent-subagent-runner-CQaLFNnA.js';
32
- export { D as DefaultModelsRegistry, a as DefaultModelsRegistryOptions, c as classifyFamily } from './models-registry-Boz639EI.js';
33
- import { c as ModeStore } from './mode-CHo2XtHs.js';
34
- export { D as DEFAULT_MODES, M as Mode, a as ModeConfig, b as ModeManifest } from './mode-CHo2XtHs.js';
35
- export { I as InMemoryAgentBridge, a as InMemoryBridgeTransport, c as createMessage } from './agent-bridge-B8F2ORwg.js';
36
- import { l as TaskGraph, r as TaskType, n as TaskPriority, m as TaskNode } from './task-graph-CikNdRTG.js';
37
- export { C as CriticalPathResult, 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, T as TaskAssignment, i as TaskDependency, j as TaskEdge, k as TaskFilter, o as TaskProgress, p as TaskSort, q as TaskStatus, s as computeTaskProgress, t as findCriticalPath, u as topologicalSort } from './task-graph-CikNdRTG.js';
38
- import { T as Tracer, e as MetricsSink, b as HealthRegistry } from './observability-CoSNZdhX.js';
39
- export { A as AggregateHealth, H as HealthCheck, a as HealthCheckResult, c as HealthStatus, M as MetricLabels, d as MetricSeries, f as MetricsSnapshot, S as Span } from './observability-CoSNZdhX.js';
40
- import { S as SystemPromptContributor, E as ExtensionRegistry, t as ToolRegistry, m as ProviderRegistry, p as ToolCallPipelinePayload } from './index-Dx-CnrDN.js';
41
- export { A as AfterIterationHook, a as AfterRunHook, b as AfterToolExecutionHook, c as AgentExtension, d as AgentInit, e as AgentInput, f as AgentPipelines, B as BeforeIterationHook, g as BeforeRunHook, h as BeforeToolExecutionHook, D as DEFAULT_MAX_ITERATIONS, H as HookRunEnv, i as HookRunner, j as HookRunnerOptions, O as OnErrorHook, P as PreToolUseResult, k as PromptResult, l as ProviderFactory, o as ProviderRunnerWrapper, R as RunResult, u as ToolWrapper, U as UserInputPayload, v as createDefaultPipelines } from './index-Dx-CnrDN.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-DukQLUcS.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-DukQLUcS.js';
30
+ export { D as DefaultModelsRegistry, a as DefaultModelsRegistryOptions, c as classifyFamily } from './models-registry-DU64QxQa.js';
31
+ import { M as ModeStore } from './mode-ARA3HrkY.js';
32
+ export { D as DEFAULT_MODES, a as Mode, b as ModeConfig, c as ModeManifest } from './mode-ARA3HrkY.js';
33
+ export { I as InMemoryAgentBridge, a as InMemoryBridgeTransport, c as createMessage } from './agent-bridge-mOxbpFcg.js';
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
+ import { d as TaskGraph, T as TaskType, a as TaskPriority, e as TaskNode } from './task-graph-u1q9Jkyk.js';
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
+ import { T as Tracer, M as MetricsSink, H as HealthRegistry } from './observability-D-HZN_mF.js';
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-DIKEcfgC.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-DIKEcfgC.js';
42
41
  export { AutonomyStage } from './types/index.js';
43
- 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, expectDefined, 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';
44
- import { a as WstackPaths } from './wstack-paths-BQMvEllz.js';
45
- export { W as WstackPathOptions, p as projectHash, b as projectSlug, r as resolveWstackPaths } from './wstack-paths-BQMvEllz.js';
46
- 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, M as MemoryStoreOptions, j as MigrationContext, k as MigrationResult, P as PersistedQueueItem, l as PlanFile, m as PlanItem, n as PlanTemplate, Q as QueueStore, R as RecoveryLock, o as RecoveryLockOptions, S as SessionAnalyzer, p as SessionStoreOptions, T as TodosCheckpointFile, q as addPlanItem, r as attachPlanCheckpoint, s as attachTodosCheckpoint, t as clearPlan, u as deriveTodosFromPlanItem, v as emptyPlan, w as formatPlan, x as formatPlanTemplates, y as getPlanTemplate, z as listPlanTemplates, B as loadPlan, E as loadTodosCheckpoint, F as removePlanItem, G as runConfigMigrations, H as savePlan, I as saveTodosCheckpoint, J as setPlanItemStatus } from './plan-templates-D9UhwoGh.js';
47
- export { A as AuditLevel, C as CORE_RECONSTRUCT_EVENTS, S as STANDARD_AUDIT_EVENTS, a as SessionEventBridge, b as SessionEventBridgeOptions, c as SessionSamplingOptions, T as ToolProgressSamplingOptions, d as createSessionEventBridge, r as resolveAuditLevel, e as resolveSessionLoggingConfig } from './session-event-bridge-D0u-x576.js';
48
- export { D as DirectorStateCheckpoint, a as DirectorStateSnapshot, b as DirectorSubagentState, c as DirectorTaskState, l as loadDirectorState } from './director-state-CgIc30qi.js';
49
- export { A as AutoApprovePermissionPolicy, D as DefaultPermissionPolicy, P as PermissionPolicyOptions } from './permission-policy-gW5htOo1.js';
50
- export { AutoCompactionMiddleware, AutonomousRunner, AutonomousRunnerOptions, AutonomyPromptContributorOptions, DefaultSkillLoader, DoneCheckResult, DoneConditionChecker, IntelligentCompactor, IntelligentCompactorOptions, SelectiveCompactor, SelectiveCompactorOptions, SkillLoaderOptions, buildGoalPreamble, makeAutonomyPromptContributor } from './execution/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';
43
+ export { T as TaskItem, c as computeTaskItemProgress, f as formatTaskList, a as formatTaskProgress } from './task-format-vGOIftmK.js';
44
+ import { W as WstackPaths } from './wstack-paths-_lqjzErq.js';
45
+ export { a as WstackPathOptions, p as projectHash, b as projectSlug, r as resolveWstackPaths } from './wstack-paths-_lqjzErq.js';
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-BdDxl9cI.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-BpJ5trO9.js';
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-dF74EpDp.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-CI8lxeY1.js';
51
52
  export { DefaultProviderRunner } from './defaults/index.js';
52
- 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-CHJOXv3t.js';
53
- export { A as AgentBudgetTier, a as AgentCapability, b as AgentDefinition, c as AgentPhase, D as DEFAULT_DISPATCH_ROLE, d as DefaultMultiAgentCoordinator, e as DispatchCandidate, f as DispatchClassifier, g as DispatchMethod, h as DispatchOptions, i as DispatchResult, j as MultiAgentCoordinatorOptions, k as dispatchAgent, m as makeLLMClassifier, s as scoreAgents } from './multi-agent-coordinator-Da9nd8Ic.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-D09hMzFQ.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-51LvnXkD.js';
54
55
  export { DefaultModeStore, LLMSelector, LLMSelectorOptions, ModeLoaderOptions, loadProjectModes, loadUserModes } from './models/index.js';
55
56
  import { TaskStore } from './sdd/index.js';
56
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';
57
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';
58
- 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-Dck3T85_.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-CXCsANdY.js';
59
60
  export { DownloadResult, InstallResult, InstalledSkillEntry, ManifestData, ParsedRef, SkillInstaller, SkillInstallerOptions, SkillManifestStore, UpdateResult, downloadGitHubTarball, parseSkillRef } from './skills/index.js';
60
61
  import { ReplayLogStore, DefaultPromptStore } from './storage/index.js';
61
- export { ALL_SYNC_CATEGORIES, Annotation, AnnotationsStore, AnnotationsStoreOptions, AuditEntry, CloudSync, DefaultSessionRewinder, PromptEntry, PromptStore, RecoveryPlan, ReplayEntry, ReplayLogStoreOptions, SessionRecovery, SessionRewinderOptions, StaleSession, SyncResult, ToolAuditLog, ToolAuditLogOptions, VerifyResult } from './storage/index.js';
62
- export { G as GoalFile, J as JournalEntry, M as MAX_JOURNAL_ENTRIES, a as appendJournal, e as emptyGoal, f as formatGoal, g as goalFilePath, l as loadGoal, s as saveGoal, b as summarizeUsage } from './goal-store-DvWLNu52.js';
63
- import { a as RetryPolicy, E as ErrorHandler } from './retry-policy-DSu6O6rD.js';
64
- import { a as Logger } from './logger-B72yyPc6.js';
65
- export { L as LogLevel } from './logger-B72yyPc6.js';
66
- export { M as ModelsDevPayload, a as ModelsDevProvider, b as ModelsRegistry, R as ResolvedModel, c as ResolvedProvider, W as WireFamily } from './models-registry-Be3osGt5.js';
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
+ 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-ht0VmR1A.js';
64
+ import { R as RetryPolicy, E as ErrorHandler } from './retry-policy-BcmuT_V0.js';
65
+ import { L as Logger } from './logger-B63L5bTg.js';
66
+ export { a as LogLevel } from './logger-B63L5bTg.js';
67
+ export { a as ModelsDevPayload, c as ModelsDevProvider, M as ModelsRegistry, b as ResolvedModel, R as ResolvedProvider, W as WireFamily } from './models-registry-B6_KfS65.js';
67
68
  export { S as SecretVault } from './secret-vault-DoISxaKO.js';
68
- export { S as SecretScrubber } from './secret-scrubber-3MHDDAtm.js';
69
69
  import './path-resolver-CPRj4bFY.js';
70
- import './selector-11-fm95U.js';
70
+ import './selector-C7wcdqMA.js';
71
71
  import 'node:events';
72
72
 
73
73
  /**
@@ -758,6 +758,8 @@ declare class DefaultSystemPromptBuilder implements SystemPromptBuilder {
758
758
  private skillCache?;
759
759
  /** Cached full skill bodies (after frontmatter), built once per session. */
760
760
  private skillBodyCache?;
761
+ /** Tools from last build — used for memory relevance scoring. */
762
+ private _lastBuildTools?;
761
763
  constructor(opts?: DefaultSystemPromptBuilderOptions);
762
764
  build(ctx: BuildContext): Promise<TextBlock[]>;
763
765
  /**
@@ -981,7 +983,7 @@ declare function unloadPlugins(loadedPlugins: Plugin[], opts: LoadPluginsOptions
981
983
  * `provider.complete()` with a dedicated system prompt — and is deliberately
982
984
  * free of React / TUI dependencies so it can be unit-tested in isolation.
983
985
  */
984
- declare const ENHANCER_SYSTEM_PROMPT = "You are a request refiner embedded in a coding agent. Your ONLY job is to rewrite the user's message into a single, clearer, unambiguous instruction that the coding agent can act on confidently.\n\nRules:\n- Preserve the user's intent and scope EXACTLY. Do not add new requirements, features, constraints, or steps the user did not ask for. Do not remove anything they did ask for.\n- Do NOT answer, solve, or perform the request. Only restate it more clearly.\n- Keep all concrete details verbatim: file paths, identifiers, code, error text, numbers, names, URLs.\n- Resolve obvious ambiguity by making the implied subject explicit, not by inventing specifics. If something is genuinely unspecified, leave it general rather than guessing.\n- Be concise: one tight instruction (a few sentences at most). No preamble, no explanation, no quotes, no markdown headers.\n- If the message is already clear and complete, return it essentially unchanged.\n- Preserve the user's language (if they wrote in Turkish, refine in Turkish).\n\nWhen earlier conversation turns are provided, they are CONTEXT ONLY. Use them to resolve references in the user's latest message \u2014 \"it\", \"that\", \"the same\", \"the other one\", \"this file\", \"again\" \u2014 so the refined instruction is self-contained. Refine ONLY the user's latest message; do not answer it, do not act on or restate earlier turns, and do not summarize the conversation.\n\nOutput ONLY the refined request text \u2014 nothing else.";
986
+ declare const ENHANCER_SYSTEM_PROMPT = "You are a request refiner embedded in a coding agent. Your ONLY job is to rewrite the user's message into clearer, unambiguous instructions that the coding agent can act on confidently.\n\nRules:\n- Preserve the user's intent and scope EXACTLY. Do not add new requirements, features, constraints, or steps the user did not ask for. Do not remove anything they did ask for.\n- Do NOT answer, solve, or perform the request. Only restate it more clearly.\n- Keep all concrete details verbatim: file paths, identifiers, code, error text, numbers, names, URLs.\n- Resolve obvious ambiguity by making the implied subject explicit, not by inventing specifics. If something is genuinely unspecified, leave it general rather than guessing.\n- Be concise: one tight instruction per version (a few sentences at most). No preamble, no explanation, no quotes, no markdown headers.\n- If the message is already clear and complete, return it essentially unchanged.\n\nYou MUST output TWO versions of the refined request, separated by a line containing only \"---\".\n- First version: refined in the SAME LANGUAGE the user wrote in (if Turkish \u2192 Turkish, if Spanish \u2192 Spanish, etc.).\n- Second version: refined in ENGLISH (translate the intent into clear English while preserving all concrete details).\n\nOutput format:\n<refined in user's language>\n---\n<refined in English>\n\nWhen earlier conversation turns are provided, they are CONTEXT ONLY. Use them to resolve references in the user's latest message \u2014 \"it\", \"that\", \"the same\", \"the other one\", \"this file\", \"again\" \u2014 so the refined instruction is self-contained. Refine ONLY the user's latest message; do not answer it, do not act on or restate earlier turns, and do not summarize the conversation.\n\nOutput ONLY the two versions separated by \"---\" \u2014 nothing else.";
985
987
  /**
986
988
  * Heuristic gate: should this raw input be sent through the refiner at all?
987
989
  * Pure + exported for unit testing. Returns false for inputs where refinement
@@ -1000,6 +1002,16 @@ interface ConversationTurn {
1000
1002
  role: 'user' | 'assistant';
1001
1003
  text: string;
1002
1004
  }
1005
+ /**
1006
+ * Result of a successful prompt refinement. Contains both the
1007
+ * original-language and English versions so the UI can offer both.
1008
+ */
1009
+ interface EnhanceResult {
1010
+ /** Refined in the user's original language. */
1011
+ refined: string;
1012
+ /** Refined in English. */
1013
+ english: string;
1014
+ }
1003
1015
  interface EnhanceUserPromptOptions {
1004
1016
  provider: Provider;
1005
1017
  model: string;
@@ -1031,7 +1043,7 @@ interface EnhanceUserPromptOptions {
1031
1043
  * aborted, or returned nothing useful). NEVER throws — refinement is a
1032
1044
  * best-effort convenience and must never block the user from sending.
1033
1045
  */
1034
- declare function enhanceUserPrompt(opts: EnhanceUserPromptOptions): Promise<string | null>;
1046
+ declare function enhanceUserPrompt(opts: EnhanceUserPromptOptions): Promise<EnhanceResult | null>;
1035
1047
  /**
1036
1048
  * Extract the last few user/assistant TEXT turns from a conversation, newest
1037
1049
  * last, for use as refiner context. Skips system messages and tool-only turns
@@ -1044,52 +1056,52 @@ declare function recentTextTurns(messages: Message[], maxTurns?: number, maxChar
1044
1056
  type PhaseStatus = 'pending' | 'ready' | 'running' | 'paused' | 'completed' | 'failed' | 'skipped';
1045
1057
  interface PhaseNode {
1046
1058
  id: string;
1047
- /** Faz adı, örn: "Discovery", "Design", "Implementation", "Testing" */
1059
+ /** Phase name, e.g. "Discovery", "Design", "Implementation", "Testing". */
1048
1060
  name: string;
1049
1061
  description: string;
1050
1062
  status: PhaseStatus;
1051
- /** Bu fazın görev grafiği */
1063
+ /** Task graph for this phase. */
1052
1064
  taskGraph: TaskGraph;
1053
- /** Önceki faz ID'leri bunlar tamamlanmadan bu faz başlayamaz */
1065
+ /** Previous phase IDs; this phase cannot start until they complete. */
1054
1066
  dependsOn: string[];
1055
- /** Sonraki faz ID'leri */
1067
+ /** Next phase IDs. */
1056
1068
  nextPhases: string[];
1057
- /** Bu faz parallel çalışabilir mi? (önceki faz bitmeden başlayabilir) */
1069
+ /** Whether this phase can run in parallel before the previous phase finishes. */
1058
1070
  parallelizable: boolean;
1059
- /** Faz önceliği */
1071
+ /** Phase priority. */
1060
1072
  priority: 'critical' | 'high' | 'medium' | 'low';
1061
- /** Tahmini süre (saat) */
1073
+ /** Estimated duration in hours. */
1062
1074
  estimateHours: number;
1063
- /** Gerçekleşen süre (ms) */
1075
+ /** Actual duration in milliseconds. */
1064
1076
  actualDurationMs?: number | undefined;
1065
- /** Başlangıç zamanı */
1077
+ /** Start time. */
1066
1078
  startedAt?: number | undefined;
1067
- /** Bitiş zamanı */
1079
+ /** Completion time. */
1068
1080
  completedAt?: number | undefined;
1069
- /** Bu fazda atanmış agent'lar */
1081
+ /** Agents assigned to this phase. */
1070
1082
  assignedAgents: string[];
1071
- /** Faz metadata */
1083
+ /** Phase metadata. */
1072
1084
  metadata?: Record<string, unknown> | undefined;
1073
1085
  createdAt: number;
1074
1086
  updatedAt: number;
1075
1087
  }
1076
1088
  interface PhaseGraph {
1077
1089
  id: string;
1078
- /** Proje başlığı */
1090
+ /** Project title. */
1079
1091
  title: string;
1080
1092
  description: string;
1081
1093
  phases: Map<string, PhaseNode>;
1082
- /** Başlangıç faz ID'leri */
1094
+ /** Starting phase IDs. */
1083
1095
  rootPhaseIds: string[];
1084
- /** Aktif faz ID'leri (running durumunda olanlar) */
1096
+ /** Active phase IDs with running status. */
1085
1097
  activePhaseIds: string[];
1086
- /** Tamamlanan faz ID'leri */
1098
+ /** Completed phase IDs. */
1087
1099
  completedPhaseIds: string[];
1088
- /** Başarısız faz ID'leri */
1100
+ /** Failed phase IDs. */
1089
1101
  failedPhaseIds: string[];
1090
- /** Otonom mod aktif mi? */
1102
+ /** Whether autonomous mode is active. */
1091
1103
  autonomous: boolean;
1092
- /** Tüm fazlar tamamlandığında dur */
1104
+ /** Stop when all phases complete. */
1093
1105
  stopOnComplete: boolean;
1094
1106
  createdAt: number;
1095
1107
  updatedAt: number;
@@ -1205,21 +1217,21 @@ interface PhaseEventMap {
1205
1217
  type PhaseEventName = keyof PhaseEventMap;
1206
1218
  interface PhaseExecutionContext {
1207
1219
  /**
1208
- * Bir görevi çalıştır AI agent tarafından yapılır. `env`, fazın git
1209
- * worktree'sine (varsa) işaret eder; agent izole çalışma dizininde koştur.
1220
+ * Execute a task through an AI agent. `env` points to the phase git
1221
+ * worktree when available, so the agent runs in an isolated working directory.
1210
1222
  */
1211
1223
  executeTask: (task: TaskNode, phaseId: string, env?: {
1212
1224
  cwd?: string | undefined;
1213
1225
  branch?: string | undefined;
1214
1226
  }) => Promise<unknown>;
1215
1227
  /**
1216
- * Opsiyonel doğrulama kapısı. Bir fazın tüm görevleri bittikten *sonra*,
1217
- * faz "completed" işaretlenmeden ve worktree'si ana branch'e merge edilmeden
1218
- * *önce* çağrılır. `env`, fazın worktree'sine (varsa) işaret eder; doğrulama
1219
- * o izole dizinde koşmalıdır (örn. typecheck/test). `ok:false` dönerse merge
1220
- * bloklanır ve (varsa) `repairPhase` ile onarım denenir.
1228
+ * Optional verification gate. Called after all tasks in a phase finish,
1229
+ * but before the phase is marked "completed" and its worktree is merged
1230
+ * back to the base branch. `env` points to the phase worktree when available;
1231
+ * verification should run in that isolated directory, such as typecheck/test.
1232
+ * If `ok:false` is returned, merge is blocked and `repairPhase` is attempted when available.
1221
1233
  *
1222
- * Tanımlanmazsa kapı atlanır (geriye dönük uyumlu eski davranış).
1234
+ * If undefined, the gate is skipped for backward compatibility.
1223
1235
  */
1224
1236
  verifyPhase?: (phase: PhaseNode, env?: {
1225
1237
  cwd?: string | undefined;
@@ -1229,64 +1241,64 @@ interface PhaseExecutionContext {
1229
1241
  output?: string | undefined;
1230
1242
  }>;
1231
1243
  /**
1232
- * Opsiyonel onarım geçişi. `verifyPhase` başarısız olduğunda, yakalanan hata
1233
- * çıktısı ile çağrılır. Worktree'deki kodu düzeltmeye çalışmalıdır (örn. bir
1234
- * onarım subagent'ı). Dönüş beklenmez; orchestrator ardından `verifyPhase`'i
1235
- * yeniden koşar. `verifyPhase` tanımlı değilse hiç çağrılmaz.
1244
+ * Optional repair pass. When `verifyPhase` fails, it is called with the
1245
+ * captured error output. It should try to fix the code in the worktree
1246
+ * for example, through a repair subagent. Its return value is ignored;
1247
+ * the orchestrator reruns `verifyPhase` afterward. It is never called when `verifyPhase` is undefined.
1236
1248
  */
1237
1249
  repairPhase?: (phase: PhaseNode, failure: string, attempt: number, env?: {
1238
1250
  cwd?: string | undefined;
1239
1251
  branch?: string | undefined;
1240
1252
  }) => Promise<void>;
1241
1253
  /**
1242
- * Opsiyonel birleştirme-çakışması çözücü. Bir fazın worktree'si ana branch'e
1243
- * squash-merge edilirken çakışma çıkarsa çağrılır. `info.cwd` ana çalışma
1244
- * ağacına (çakışma işaretçilerinin bulunduğu yer) işaret eder; çözücü oradaki
1245
- * işaretçileri temizlemeli ve `true` döndürmelidir. Başarılı olursa merge
1246
- * commit'lenir; aksi halde merge iptal edilir ve worktree `needs-review`'da
1247
- * saklanır. Tanımlanmazsa çakışma eski davranışla parked-for-review olur.
1254
+ * Optional merge-conflict resolver. Called when a phase worktree conflicts
1255
+ * during squash-merge into the base branch. `info.cwd` points to the base
1256
+ * working tree where conflict markers exist; the resolver should clean those
1257
+ * markers and return `true`. On success the merge is committed; otherwise
1258
+ * the merge is aborted and the worktree is kept in `needs-review`.
1259
+ * If undefined, conflicts keep the old parked-for-review behavior.
1248
1260
  */
1249
1261
  resolveConflict?: (phase: PhaseNode, info: {
1250
1262
  conflictFiles: string[];
1251
1263
  cwd: string;
1252
1264
  }) => Promise<boolean>;
1253
- /** Opsiyonel global Brain arbiter: policy/karar/escalation katmanı. */
1265
+ /** Optional global Brain arbiter for the policy, decision, and escalation layer. */
1254
1266
  brain?: BrainArbiter | undefined;
1255
- /** Bir faz tamamlandığında çağrılır */
1267
+ /** Called when a phase completes. */
1256
1268
  onPhaseComplete?: ((phase: PhaseNode) => void) | undefined;
1257
- /** Bir faz başarısız olduğunda çağrılır */
1269
+ /** Called when a phase fails. */
1258
1270
  onPhaseFail?: (phase: PhaseNode, error: Error) => void;
1259
- /** Her tick'te çağrılır (otonom modda) */
1271
+ /** Called on every tick in autonomous mode. */
1260
1272
  onTick?: (ctx: {
1261
1273
  activePhases: PhaseNode[];
1262
1274
  readyPhases: PhaseNode[];
1263
1275
  }) => void;
1264
1276
  }
1265
1277
  interface AutoPhaseOptions {
1266
- /** Maksimum parallel faz sayısı */
1278
+ /** Maximum number of parallel phases. */
1267
1279
  maxConcurrentPhases?: number | undefined;
1268
- /** Maksimum parallel görev sayısı (faz içinde) */
1280
+ /** Maximum number of parallel tasks within a phase. */
1269
1281
  maxConcurrentTasks?: number | undefined;
1270
- /** Başarısız görev retry sayısı */
1282
+ /** Retry count for failed tasks. */
1271
1283
  maxRetries?: number | undefined;
1272
1284
  /**
1273
- * Doğrulama kapısı başarısız olduğunda yapılacak maksimum onarım denemesi.
1274
- * Toplam doğrulama koşusu = maxVerifyAttempts + 1 (ilk koşu + her onarım
1275
- * sonrası yeniden koşu). Varsayılan 2. `verifyPhase` verilmezse etkisizdir.
1285
+ * Maximum number of repair attempts after the verification gate fails.
1286
+ * Total verification runs = maxVerifyAttempts + 1: the first run plus one
1287
+ * rerun after each repair. Defaults to 2. Has no effect without `verifyPhase`.
1276
1288
  */
1277
1289
  maxVerifyAttempts?: number | undefined;
1278
- /** Otonom mod: faz tamamlandıkça otomatik sonrakine geç */
1290
+ /** Autonomous mode: automatically advance as phases complete. */
1279
1291
  autonomous?: boolean | undefined;
1280
- /** Fazlar arası bekleme süresi (ms) */
1292
+ /** Delay between phases in milliseconds. */
1281
1293
  phaseDelayMs?: number | undefined;
1282
- /** Bir faz failed olursa dur */
1294
+ /** Stop when a phase fails. */
1283
1295
  stopOnFailure?: boolean | undefined;
1284
1296
  /** Event bus */
1285
1297
  events?: EventBus | undefined;
1286
1298
  /**
1287
- * Opsiyonel git-worktree yöneticisi. Verilirse her faz kendi
1288
- * worktree+branch'inde izole çalışır ve tamamlanınca ana branch'e sıralı
1289
- * squash-merge edilir. Yoksa davranış değişmez (paylaşılan working tree).
1299
+ * Optional git-worktree manager. When provided, each phase runs in its own
1300
+ * isolated worktree and branch, then is squash-merged back into the base
1301
+ * branch in order. Without it, behavior is unchanged and uses the shared working tree.
1290
1302
  */
1291
1303
  worktrees?: WorktreeManager | undefined;
1292
1304
  }
@@ -1304,7 +1316,7 @@ interface PhaseTemplate {
1304
1316
  priority: PhaseNode['priority'];
1305
1317
  estimateHours: number;
1306
1318
  parallelizable: boolean;
1307
- /** Otomatik oluşturulacak task şablonları */
1319
+ /** Task templates to create automatically. */
1308
1320
  taskTemplates?: Array<{
1309
1321
  title: string;
1310
1322
  description: string;
@@ -1316,43 +1328,43 @@ interface PhaseTemplate {
1316
1328
  }
1317
1329
 
1318
1330
  interface AutoPhaseRunnerOptions extends AutoPhaseOptions {
1319
- /** Proje başlığı */
1331
+ /** Project title. */
1320
1332
  title: string;
1321
1333
  description?: string | undefined;
1322
- /** Faz şablonları */
1334
+ /** Phase templates. */
1323
1335
  phases: PhaseTemplate[];
1324
- /** Task çalıştırma fonksiyonu */
1336
+ /** Function that executes a task. */
1325
1337
  executeTask: PhaseExecutionContext['executeTask'];
1326
- /** Opsiyonel doğrulama kapısı */
1338
+ /** Optional verification gate. */
1327
1339
  verifyPhase?: PhaseExecutionContext['verifyPhase'] | undefined;
1328
- /** Doğrulama başarısız olduğunda opsiyonel onarım geçişi */
1340
+ /** Optional repair pass after verification failure. */
1329
1341
  repairPhase?: PhaseExecutionContext['repairPhase'] | undefined;
1330
- /** Worktree merge çakışmaları için opsiyonel çözücü */
1342
+ /** Optional resolver for worktree merge conflicts. */
1331
1343
  resolveConflict?: PhaseExecutionContext['resolveConflict'] | undefined;
1332
1344
  /** Opsiyonel Brain arbiter */
1333
1345
  brain?: PhaseExecutionContext['brain'] | undefined;
1334
- /** Faz tamamlandığında */
1346
+ /** Called when a phase completes. */
1335
1347
  onPhaseComplete?: ((phase: PhaseNode) => void) | undefined;
1336
- /** Faz başarısız olduğunda */
1348
+ /** Called when a phase fails. */
1337
1349
  onPhaseFail?: (phase: PhaseNode, error: Error) => void;
1338
1350
  /** Her tick'te */
1339
1351
  onTick?: (ctx: {
1340
1352
  activePhases: PhaseNode[];
1341
1353
  readyPhases: PhaseNode[];
1342
1354
  }) => void;
1343
- /** Progress değiştiğinde */
1355
+ /** Called when progress changes. */
1344
1356
  onProgress?: ((progress: PhaseProgress) => void) | undefined;
1345
1357
  /** Safety net that stops a phase graph if cleanup is bypassed. Default: 24h. */
1346
1358
  maxRunDurationMs?: number | undefined;
1347
- /** Graph tamamlandığında */
1359
+ /** Called when the graph completes. */
1348
1360
  onComplete?: ((graph: PhaseGraph) => void) | undefined;
1349
- /** Graph başarısız olduğunda */
1361
+ /** Called when the graph fails. */
1350
1362
  onFail?: (graph: PhaseGraph, failedPhase: PhaseNode, error: Error) => void;
1351
1363
  }
1352
1364
  /**
1353
- * AutoPhaseRunner Tek bir entry point'ten tüm otonom faz akışını yöneten üst seviye API.
1365
+ * AutoPhaseRunner - high-level API for managing the whole autonomous phase flow from one entry point.
1354
1366
  *
1355
- * Kullanım:
1367
+ * Usage:
1356
1368
  * const runner = new AutoPhaseRunner({
1357
1369
  * title: 'Auth Refactor',
1358
1370
  * phases: [...],
@@ -1386,7 +1398,7 @@ declare class AutoPhaseRunner {
1386
1398
  private cleanup;
1387
1399
  }
1388
1400
  /**
1389
- * Quick-start helper: Var olan bir TaskGraph'tan AutoPhaseRunner oluştur.
1401
+ * Quick-start helper: create an AutoPhaseRunner from an existing TaskGraph.
1390
1402
  */
1391
1403
  declare function createAutoPhaseFromTaskGraph(taskGraph: TaskGraph, options: Omit<AutoPhaseRunnerOptions, 'phases' | 'title'> & {
1392
1404
  title?: string | undefined;
@@ -1398,14 +1410,14 @@ interface PhaseOrchestratorOptions extends AutoPhaseOptions {
1398
1410
  ctx: PhaseExecutionContext;
1399
1411
  }
1400
1412
  /**
1401
- * PhaseOrchestrator Fazları dependency-aware, otonom olarak çalıştıran motor.
1413
+ * PhaseOrchestrator - dependency-aware engine for running phases autonomously.
1402
1414
  *
1403
- * Özellikler:
1404
- * - Bir faz tamamlandıkça sonrakini otomatik başlatır (autonomous mode)
1405
- * - Parallel faz desteği (parallelizable=true)
1406
- * - Agent atama / serbest bırakma
1407
- * - Event bus entegrasyonu
1408
- * - Pause / resume desteği
1415
+ * Features:
1416
+ * - Automatically starts the next phase as each phase completes in autonomous mode
1417
+ * - Supports parallel phases with parallelizable=true
1418
+ * - Assigns and releases agents
1419
+ * - Integrates with the event bus
1420
+ * - Supports pause and resume
1409
1421
  */
1410
1422
  declare class PhaseOrchestrator {
1411
1423
  private graph;
@@ -1427,17 +1439,17 @@ declare class PhaseOrchestrator {
1427
1439
  private readonly phaseMergePromise;
1428
1440
  constructor(opts: PhaseOrchestratorOptions);
1429
1441
  /**
1430
- * Tüm faz akışını başlat.
1431
- * Autonomous mode'da: kök faz(lar)ı başlatır, bitince sonrakini otomatik başlatır.
1442
+ * Start the full phase flow.
1443
+ * In autonomous mode, starts root phases and automatically starts the next phase when they finish.
1432
1444
  */
1433
1445
  start(): Promise<void>;
1434
- /** Bekleyen tüm faz merge'lerini (dep-sıralı + global seri) bekle. */
1446
+ /** Wait for all pending phase merges, dependency-ordered and globally serialized. */
1435
1447
  private drainMerges;
1436
- /** Duraklat aktif fazlar çalışmaya devam eder ama yeni faz başlamaz */
1448
+ /** Pause: active phases continue, but no new phase starts. */
1437
1449
  pause(): void;
1438
- /** Devam et yeni fazlar başlayabilir */
1450
+ /** Resume: new phases may start again. */
1439
1451
  resume(): void;
1440
- /** Tamamen durdur aktif fazlar da durdurulur */
1452
+ /** Stop completely, including active phases. */
1441
1453
  stop(): void;
1442
1454
  private tick;
1443
1455
  private startPhase;
@@ -1500,19 +1512,19 @@ declare class PhaseOrchestrator {
1500
1512
  interface PhaseGraphBuilderOptions {
1501
1513
  title: string;
1502
1514
  description?: string | undefined;
1503
- /** Faz şablonları (sıralı) */
1515
+ /** Ordered phase templates. */
1504
1516
  phases: PhaseTemplate[];
1505
- /** Otonom mod */
1517
+ /** Autonomous mode. */
1506
1518
  autonomous?: boolean | undefined;
1507
- /** Başarısızlıkta dur */
1519
+ /** Stop on failure. */
1508
1520
  stopOnFailure?: boolean | undefined;
1509
- /** Harici TaskStore (opsiyonel) */
1521
+ /** Optional external TaskStore. */
1510
1522
  externalTaskStore?: TaskStore | undefined;
1511
1523
  }
1512
1524
  /**
1513
- * PhaseGraphBuilder Projeyi fazlara bölen ve her faz için task graph oluşturan builder.
1525
+ * PhaseGraphBuilder - builds project phases and a task graph for each phase.
1514
1526
  *
1515
- * Kullanım:
1527
+ * Usage:
1516
1528
  * const builder = new PhaseGraphBuilder({
1517
1529
  * title: 'Auth System Refactor',
1518
1530
  * phases: [
@@ -1530,64 +1542,64 @@ declare class PhaseGraphBuilder {
1530
1542
  constructor(opts: PhaseGraphBuilderOptions);
1531
1543
  build(): Promise<PhaseGraph>;
1532
1544
  /**
1533
- * Var olan bir TaskGraph'tan fazlar oluştur.
1534
- * Task'ları priority/type göre gruplayarak fazlara ayırır.
1545
+ * Create phases from an existing TaskGraph.
1546
+ * Groups tasks into phases by priority and type.
1535
1547
  */
1536
1548
  static fromTaskGraph(taskGraph: TaskGraph, options: Omit<PhaseGraphBuilderOptions, 'phases'> & {
1537
- /** Faz başına düşen task sayısı (default: 5) */
1549
+ /** Number of tasks per phase. Defaults to 5. */
1538
1550
  tasksPerPhase?: number | undefined;
1539
1551
  }): Promise<PhaseGraph>;
1540
1552
  }
1541
1553
 
1542
1554
  /**
1543
- * AutoPhasePlanner Bir hedefi (goal) gerçek bir LLM çağrısıyla faz faz,
1544
- * her fazın altında bir sürü todo içeren büyük bir task listesine dönüştürür.
1555
+ * AutoPhasePlanner - converts a goal into phases using a real LLM call,
1556
+ * producing a large task list with todos under each phase.
1545
1557
  *
1546
- * SDD'nin spectask akışına benzer ama farklı: burada çıktı doğrudan
1547
- * `PhaseTemplate[]` her faz `taskTemplates` taşır, böylece
1548
- * `PhaseGraphBuilder` dolu bir `PhaseGraph` üretir ve `PhaseOrchestrator`
1549
- * her görevi gerçek bir agent koşusuyla çalıştırır.
1558
+ * Similar to SDD's spec-to-task flow, but different: the output is directly
1559
+ * `PhaseTemplate[]`; each phase carries `taskTemplates`, so
1560
+ * `PhaseGraphBuilder` produces a populated `PhaseGraph` and `PhaseOrchestrator`
1561
+ * runs each task through a real agent execution.
1550
1562
  *
1551
- * Planner LLM'e bağımlı değildir: çağıran taraf bir `runOnce(prompt)` fonksiyonu
1552
- * verir (CLI'de bu bir subagent koşusudur, testte bir stub olabilir).
1563
+ * The planner is not tied to a specific LLM: callers provide a `runOnce(prompt)` function
1564
+ * (a subagent run in the CLI, or a deterministic stub in tests).
1553
1565
  */
1554
1566
 
1555
1567
  interface AutoPhasePlannerOptions {
1556
1568
  /**
1557
- * Tek seferlik LLM çağrısı: prompt verir, modelin metin çıktısını döndürür.
1558
- * CLI'de bir subagent.run sarmalayıcısıdır; testte deterministik stub.
1569
+ * One-shot LLM call: receives a prompt and returns the model text output.
1570
+ * In the CLI this wraps subagent.run; in tests it can be a deterministic stub.
1559
1571
  */
1560
1572
  runOnce: (prompt: string) => Promise<string>;
1561
- /** Hedef/proje başlığı. */
1573
+ /** Goal or project title. */
1562
1574
  goal: string;
1563
- /** package.json/dizin yapısı gibi opsiyonel proje bağlamı. */
1575
+ /** Optional project context such as package.json or directory structure. */
1564
1576
  projectContext?: string | undefined;
1565
- /** İstenen minimum faz sayısı (default 3). */
1577
+ /** Requested minimum phase count. Defaults to 3. */
1566
1578
  minPhases?: number | undefined;
1567
- /** İstenen maksimum faz sayısı (default 8). */
1579
+ /** Requested maximum phase count. Defaults to 8. */
1568
1580
  maxPhases?: number | undefined;
1569
- /** Faz başına hedeflenen todo sayısı (default 6). */
1581
+ /** Target todo count per phase. Defaults to 6. */
1570
1582
  todosPerPhase?: number | undefined;
1571
1583
  }
1572
1584
  interface AutoPhasePlanResult {
1573
- /** PhaseGraphBuilder'a verilecek faz şablonları. */
1585
+ /** Phase templates passed to PhaseGraphBuilder. */
1574
1586
  phases: PhaseTemplate[];
1575
- /** Modelin ham çıktısı (debug/log için). */
1587
+ /** Raw model output for debugging and logs. */
1576
1588
  raw: string;
1577
- /** JSON ayrıştırılamadıysa true; bu durumda `phases` boş döner. */
1589
+ /** True when JSON could not be parsed; `phases` is empty in that case. */
1578
1590
  parseFailed: boolean;
1579
1591
  }
1580
1592
  /**
1581
- * AutoPhasePlanner `plan()` çağrısı modeli sürer ve `PhaseTemplate[]` üretir.
1593
+ * AutoPhasePlanner drives the model through `plan()` and produces `PhaseTemplate[]`.
1582
1594
  */
1583
1595
  declare class AutoPhasePlanner {
1584
1596
  private readonly opts;
1585
1597
  constructor(opts: AutoPhasePlannerOptions);
1586
- /** Hedefi faz+todo planına dönüştür. */
1598
+ /** Convert the goal into a phase-and-todo plan. */
1587
1599
  plan(): Promise<AutoPhasePlanResult>;
1588
- /** Modelin üreteceği plan için talimat prompt'u. */
1600
+ /** Instruction prompt for the plan the model should produce. */
1589
1601
  buildPrompt(): string;
1590
- /** Ham çıktıdan JSON'u çıkar, doğrula ve PhaseTemplate[]'e dönüştür. */
1602
+ /** Extract JSON from raw output, validate it, and convert it to PhaseTemplate[]. */
1591
1603
  parse(raw: string): PhaseTemplate[];
1592
1604
  private coercePhase;
1593
1605
  private coerceTask;
@@ -1597,7 +1609,7 @@ interface PhaseStoreOptions {
1597
1609
  baseDir: string;
1598
1610
  }
1599
1611
  /**
1600
- * PhaseStore PhaseGraph'ı diske kaydeden ve yükleyen persistence katmanı.
1612
+ * PhaseStore - persistence layer for saving and loading PhaseGraph objects on disk.
1601
1613
  */
1602
1614
  declare class PhaseStore {
1603
1615
  readonly baseDir: string;
@@ -1640,12 +1652,12 @@ interface CheckpointManagerOptions {
1640
1652
  baseDir?: string | undefined;
1641
1653
  }
1642
1654
  /**
1643
- * CheckpointManager Phase graph'ın anlık görüntülerini alır ve geri yükler.
1655
+ * CheckpointManager - saves and restores snapshots of the phase graph.
1644
1656
  *
1645
- * Kullanım:
1657
+ * Usage:
1646
1658
  * const cm = new CheckpointManager({ store });
1647
1659
  * await cm.saveCheckpoint(graph, 'Before risky refactor');
1648
- * // ... işler ters giderse ...
1660
+ * // ... if something goes wrong ...
1649
1661
  * const restored = await cm.restoreCheckpoint(checkpointId);
1650
1662
  */
1651
1663
  declare class CheckpointManager {
@@ -2045,4 +2057,4 @@ interface PlanPluginOptions {
2045
2057
  */
2046
2058
  declare function createPlanPlugin(opts?: PlanPluginOptions): Plugin;
2047
2059
 
2048
- export { AddAttachmentInput, AttachmentRef, AttachmentStore, type AutoPhaseOptions, type AutoPhasePlanResult, AutoPhasePlanner, type AutoPhasePlannerOptions, AutoPhaseRunner, type AutoPhaseRunnerOptions, type BootConfigOptions, type BootConfigResult, BrainArbiter, BuildContext, type Checkpoint, CheckpointManager, type CheckpointManagerOptions, type CollabBusState, type InjectedToolResult as CollabInjectedToolResult, type CollabPauseMiddlewareOptions, CollaborationBus, Config, ConfigStore, Container, ContentBlock, Context, type ContinueDirective, type ConversationTurn, DefaultLogger, DefaultPathResolver, DefaultPluginAPI, DefaultPromptStore, DefaultSecretVault, DefaultSystemPromptBuilder, type DefaultSystemPromptBuilderOptions, type DetectedDependency, type DetectionResult, ENHANCER_SYSTEM_PROMPT, type EnhanceUserPromptOptions, EventBus, EventName, ExtensionRegistry, 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, type MCPRegistryHandle, MCPRegistryView, MCPServerConfig, type MatrixKeyKind, MemoryStore, Message, MetricsSink, MetricsSinkView, ModeStore, ModelCapabilities, ModelMatrixEntry, type PackageManager, 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, PluginPipelines, Provider, ProviderRegistry, ProviderRegistryView, ProviderRunner, ReplayLogStore, type ReplayMode, ReplayProviderRunner, type ReplayProviderRunnerOptions, ReportGenerator, type ReportOptions, Request, 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, TechStackDetector, type TechStackInfo, TextBlock, Tool, ToolCallPipelinePayload, ToolRegistry, ToolRegistryView, Tracer, WorktreeManager, WstackPaths, bootConfig, buildBtwBlock, collabInjectMiddleware, collabPauseMiddleware, consumeBtwNotes, createAutoPhaseFromTaskGraph, createGitPlugin, createMcpControlTool, createObservabilityPlugin, createPlanPlugin, createPromptsPlugin, createSecurityPlugin, createSecuritySlashCommand, createSkillsPlugin, createSyncPlugin, defaultGitignoreUpdater, defaultOrchestrator, defaultReportGenerator, defaultSecurityScanner, defaultSkillGenerator, defaultTechStackDetector, enhanceUserPrompt, flagsToConfigPatch, hashRequest, isValidMatrixKey, loadPlugins, makeContinueToNextIterationTool, matrixKeyKind, normalizedEqual, parseContinueDirective, pendingBtwCount, phaseForRole, recentTextTurns, resolveModelMatrix, runProviderWithRetry, runShellHook, securitySlashCommand, setBtwNote, shouldEnhance, stableStringify, unloadPlugins };
2060
+ export { AddAttachmentInput, AttachmentRef, AttachmentStore, type AutoPhaseOptions, type AutoPhasePlanResult, AutoPhasePlanner, type AutoPhasePlannerOptions, AutoPhaseRunner, type AutoPhaseRunnerOptions, type BootConfigOptions, type BootConfigResult, BrainArbiter, BuildContext, type Checkpoint, CheckpointManager, type CheckpointManagerOptions, type CollabBusState, type InjectedToolResult as CollabInjectedToolResult, type CollabPauseMiddlewareOptions, CollaborationBus, Config, ConfigStore, Container, ContentBlock, Context, type ContinueDirective, type ConversationTurn, DefaultLogger, DefaultPathResolver, DefaultPluginAPI, DefaultPromptStore, DefaultSecretVault, DefaultSystemPromptBuilder, type DefaultSystemPromptBuilderOptions, type DetectedDependency, type DetectionResult, ENHANCER_SYSTEM_PROMPT, type EnhanceResult, type EnhanceUserPromptOptions, EventBus, EventName, ExtensionRegistry, 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, type MCPRegistryHandle, MCPRegistryView, MCPServerConfig, type MatrixKeyKind, MemoryStore, Message, MetricsSink, MetricsSinkView, ModeStore, ModelCapabilities, ModelMatrixEntry, type PackageManager, 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, PluginPipelines, Provider, ProviderRegistry, ProviderRegistryView, ProviderRunner, ReplayLogStore, type ReplayMode, ReplayProviderRunner, type ReplayProviderRunnerOptions, ReportGenerator, type ReportOptions, Request, 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, TechStackDetector, type TechStackInfo, TextBlock, Tool, ToolCallPipelinePayload, ToolRegistry, ToolRegistryView, Tracer, WorktreeManager, WstackPaths, bootConfig, buildBtwBlock, collabInjectMiddleware, collabPauseMiddleware, consumeBtwNotes, createAutoPhaseFromTaskGraph, createGitPlugin, createMcpControlTool, createObservabilityPlugin, createPlanPlugin, createPromptsPlugin, createSecurityPlugin, createSecuritySlashCommand, createSkillsPlugin, createSyncPlugin, defaultGitignoreUpdater, defaultOrchestrator, defaultReportGenerator, defaultSecurityScanner, defaultSkillGenerator, defaultTechStackDetector, enhanceUserPrompt, flagsToConfigPatch, hashRequest, isValidMatrixKey, loadPlugins, makeContinueToNextIterationTool, matrixKeyKind, normalizedEqual, parseContinueDirective, pendingBtwCount, phaseForRole, recentTextTurns, resolveModelMatrix, runProviderWithRetry, runShellHook, securitySlashCommand, setBtwNote, shouldEnhance, stableStringify, unloadPlugins };