@wrongstack/core 0.3.3 → 0.3.7

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 (52) hide show
  1. package/dist/{agent-bridge-C3DUGjSb.d.ts → agent-bridge-DaOnnHNW.d.ts} +1 -1
  2. package/dist/{compactor-DpJBI1YH.d.ts → compactor-CFky6JKM.d.ts} +1 -1
  3. package/dist/{config-D2qvAxVd.d.ts → config-RlhKLjme.d.ts} +2 -1
  4. package/dist/{context-IovtuTf8.d.ts → context-B1kBj1lY.d.ts} +4 -3
  5. package/dist/coordination/index.d.ts +12 -10
  6. package/dist/coordination/index.js +50 -9
  7. package/dist/coordination/index.js.map +1 -1
  8. package/dist/defaults/index.d.ts +16 -16
  9. package/dist/defaults/index.js +213 -17
  10. package/dist/defaults/index.js.map +1 -1
  11. package/dist/{events-BHIQs4o1.d.ts → events-BBaKeMfb.d.ts} +11 -1
  12. package/dist/execution/index.d.ts +11 -11
  13. package/dist/execution/index.js +54 -1
  14. package/dist/execution/index.js.map +1 -1
  15. package/dist/extension/index.d.ts +6 -6
  16. package/dist/{index-hWNybrNZ.d.ts → index-meJRuQtc.d.ts} +26 -5
  17. package/dist/index.d.ts +26 -26
  18. package/dist/index.js +306 -39
  19. package/dist/index.js.map +1 -1
  20. package/dist/infrastructure/index.d.ts +6 -6
  21. package/dist/kernel/index.d.ts +9 -9
  22. package/dist/kernel/index.js.map +1 -1
  23. package/dist/{mcp-servers-C2OopXOn.d.ts → mcp-servers-Cf4-bJnd.d.ts} +3 -3
  24. package/dist/models/index.d.ts +2 -2
  25. package/dist/models/index.js +1 -0
  26. package/dist/models/index.js.map +1 -1
  27. package/dist/{multi-agent-B9a6sflH.d.ts → multi-agent-D5m66hzB.d.ts} +1 -1
  28. package/dist/observability/index.d.ts +2 -2
  29. package/dist/{path-resolver--59rCou3.d.ts → path-resolver-Bg4OP5fi.d.ts} +2 -2
  30. package/dist/{provider-runner-B39miKRw.d.ts → provider-runner-CU9gnU2E.d.ts} +3 -3
  31. package/dist/sdd/index.d.ts +3 -3
  32. package/dist/secret-scrubber-DyUAWS09.d.ts +54 -0
  33. package/dist/{secret-scrubber-Cuy5afaQ.d.ts → secret-scrubber-Dyh5LVYL.d.ts} +1 -1
  34. package/dist/security/index.d.ts +58 -5
  35. package/dist/security/index.js +95 -6
  36. package/dist/security/index.js.map +1 -1
  37. package/dist/{selector-wT2fv9Fg.d.ts → selector-DBEiwXBk.d.ts} +1 -1
  38. package/dist/{session-reader-CcPi4BQ8.d.ts → session-reader-D-z0AgHs.d.ts} +1 -1
  39. package/dist/{skill-C_7znCIC.d.ts → skill-DayhFUBb.d.ts} +1 -1
  40. package/dist/storage/index.d.ts +5 -5
  41. package/dist/storage/index.js +53 -1
  42. package/dist/storage/index.js.map +1 -1
  43. package/dist/{system-prompt-Dk1qm8ey.d.ts → system-prompt-DNetCecu.d.ts} +1 -1
  44. package/dist/{tool-executor-HsBLGRaA.d.ts → tool-executor-B5bgmEgE.d.ts} +12 -5
  45. package/dist/types/index.d.ts +15 -15
  46. package/dist/types/index.js +59 -2
  47. package/dist/types/index.js.map +1 -1
  48. package/dist/utils/index.d.ts +23 -2
  49. package/dist/utils/index.js +41 -1
  50. package/dist/utils/index.js.map +1 -1
  51. package/package.json +1 -1
  52. package/dist/secret-scrubber-CgG2tV2B.d.ts +0 -31
@@ -1,9 +1,9 @@
1
- export { A as AfterIterationHook, p as AfterRunHook, q as AfterToolExecutionHook, s as AgentExtension, B as BeforeIterationHook, w as BeforeRunHook, x as BeforeToolExecutionHook, E as ExtensionRegistry, O as OnErrorHook, G as ProviderRunnerFn, z as ProviderRunnerWrapper } from '../index-hWNybrNZ.js';
2
- import '../context-IovtuTf8.js';
1
+ export { A as AfterIterationHook, p as AfterRunHook, q as AfterToolExecutionHook, s as AgentExtension, B as BeforeIterationHook, w as BeforeRunHook, x as BeforeToolExecutionHook, E as ExtensionRegistry, O as OnErrorHook, G as ProviderRunnerFn, z as ProviderRunnerWrapper } from '../index-meJRuQtc.js';
2
+ import '../context-B1kBj1lY.js';
3
3
  import '../logger-BMQgxvdy.js';
4
- import '../system-prompt-Dk1qm8ey.js';
4
+ import '../system-prompt-DNetCecu.js';
5
5
  import '../observability-BhnVLBLS.js';
6
- import '../events-BHIQs4o1.js';
7
- import '../secret-scrubber-CgG2tV2B.js';
8
- import '../config-D2qvAxVd.js';
6
+ import '../events-BBaKeMfb.js';
7
+ import '../secret-scrubber-DyUAWS09.js';
8
+ import '../config-RlhKLjme.js';
9
9
  import '../models-registry-Y2xbog0E.js';
@@ -1,10 +1,10 @@
1
- import { u as Tool, z as ToolResultBlock, T as TextBlock, a0 as Context, R as Request, j as Response, D as ToolUseBlock, g as Provider, W as WrongStackError, b as ContentBlock, a7 as RunOptions, J as JSONSchema } from './context-IovtuTf8.js';
1
+ import { u as Tool, z as ToolResultBlock, T as TextBlock, a0 as Context, R as Request, j as Response, D as ToolUseBlock, g as Provider, W as WrongStackError, b as ContentBlock, a7 as RunOptions, J as JSONSchema } from './context-B1kBj1lY.js';
2
2
  import { L as Logger } from './logger-BMQgxvdy.js';
3
- import { R as Renderer, B as BuildContext, C as Container, P as Pipeline, e as ReadonlyPipeline } from './system-prompt-Dk1qm8ey.js';
3
+ import { R as Renderer, B as BuildContext, C as Container, P as Pipeline, e as ReadonlyPipeline } from './system-prompt-DNetCecu.js';
4
4
  import { T as Tracer } from './observability-BhnVLBLS.js';
5
- import { E as EventBus, a as EventName, L as Listener } from './events-BHIQs4o1.js';
6
- import { a as PermissionPolicy, S as SecretScrubber } from './secret-scrubber-CgG2tV2B.js';
7
- import { l as ProviderConfig, a as Config } from './config-D2qvAxVd.js';
5
+ import { E as EventBus, a as EventName, L as Listener } from './events-BBaKeMfb.js';
6
+ import { a as PermissionPolicy, S as SecretScrubber } from './secret-scrubber-DyUAWS09.js';
7
+ import { l as ProviderConfig, a as Config } from './config-RlhKLjme.js';
8
8
  import { W as WireFamily } from './models-registry-Y2xbog0E.js';
9
9
 
10
10
  /**
@@ -516,8 +516,23 @@ declare class Agent {
516
516
  private get permission();
517
517
  private get scrubber();
518
518
  private get renderer();
519
+ /**
520
+ * Switch from inline CLI prompts to event-driven confirmation.
521
+ * Clears both the ToolExecutor's confirmAwaiter (so it returns
522
+ * `ToolConfirmPendingResult`) and the permission policy's
523
+ * promptDelegate (so `evaluate()` returns `confirm`).
524
+ *
525
+ * Call this before entering TUI or any mode where stdin is owned
526
+ * by a UI framework (Ink, WebUI WS bridge). Without this, the
527
+ * inline prompt writes to stdout and blocks on stdin — both of
528
+ * which are owned by the framework — making the prompt invisible
529
+ * and the input deadlocked.
530
+ */
531
+ disableInteractiveConfirmation(): void;
519
532
  register(tool: Tool): void;
520
533
  use(plugin: Plugin, api: PluginAPI): Promise<void>;
534
+ /** Tear down all plugins in reverse order, calling their teardown hooks. */
535
+ teardown(): Promise<void>;
521
536
  run(userInput: AgentInput, opts?: RunOptions): Promise<RunResult>;
522
537
  private runInner;
523
538
  /**
@@ -566,6 +581,12 @@ interface SlashCommand {
566
581
  /** Short aliases — also prefixed automatically: `pluginName:alias`. */
567
582
  aliases?: string[];
568
583
  description: string;
584
+ /**
585
+ * Optional compact argument hint for interactive menus. This is not parsed
586
+ * by the registry; it only helps TUI/REPL surfaces show the expected shape,
587
+ * for example `[list|install <alias>|disable <name>]`.
588
+ */
589
+ argsHint?: string;
569
590
  /**
570
591
  * Optional detailed help shown by `/help <name>`. Use this for usage,
571
592
  * arguments, examples, side-effects — anything that doesn't fit in
package/dist/index.d.ts CHANGED
@@ -1,36 +1,36 @@
1
- import { S as SystemPromptBuilder, M as ModelCapabilities, B as BuildContext, C as Container } from './system-prompt-Dk1qm8ey.js';
2
- export { a as BindOptions, D as Decorator, F as Factory, b as Middleware, c as MiddlewareHandler, N as NextFn, P as Pipeline, d as PipelineOptions, R as Renderer, T as Token } from './system-prompt-Dk1qm8ey.js';
3
- import { E as EventBus, a as EventName, L as Listener } from './events-BHIQs4o1.js';
4
- export { b as EventLogger, c as EventMap } from './events-BHIQs4o1.js';
1
+ import { S as SystemPromptBuilder, M as ModelCapabilities, B as BuildContext, C as Container } from './system-prompt-DNetCecu.js';
2
+ export { a as BindOptions, D as Decorator, F as Factory, b as Middleware, c as MiddlewareHandler, N as NextFn, P as Pipeline, d as PipelineOptions, R as Renderer, T as Token } from './system-prompt-DNetCecu.js';
3
+ import { E as EventBus, a as EventName, L as Listener } from './events-BBaKeMfb.js';
4
+ export { b as EventLogger, c as EventMap } from './events-BBaKeMfb.js';
5
5
  export { RunController, RunControllerOptions, TOKENS } from './kernel/index.js';
6
- import { b as ContentBlock, T as TextBlock, a0 as Context } from './context-IovtuTf8.js';
7
- export { A as AgentError, C as Capabilities, a as ConfigError, a3 as ContextInit, a4 as ConversationState, E as ErrorCode, c as ErrorSeverity, d as ErrorSubsystem, I as ImageBlock, J as JSONSchema, M as Message, e as MessageRole, P as Permission, f as PluginError, g as Provider, h as ProviderError, i as ProviderErrorBody, a5 as ReadonlyConversationState, R as Request, j as Response, k as ResumedSession, a6 as RunEnv, a7 as RunOptions, S as SessionData, l as SessionError, m as SessionEvent, n as SessionMetadata, o as SessionStore, p as SessionSummary, q as SessionWriter, a8 as StateChange, a9 as StateChangeHandler, r as StopReason, s as StreamEvent, t as ThinkingBlock, aa as TodoItem, a1 as TokenCounter, u as Tool, v as ToolCallContext, w as ToolError, x as ToolFinalEvent, y as ToolProgressEvent, z as ToolResultBlock, B as ToolStreamEvent, D as ToolUseBlock, U as Usage, W as WrongStackError, F as asBlocks, G as asText, ab as extractRunEnv, H as isAgentError, K as isConfigError, L as isImageBlock, N as isPluginError, O as isSessionError, Q as isTextBlock, V as isThinkingBlock, X as isToolError, Y as isToolResultBlock, Z as isToolUseBlock, _ as isWrongStackError, $ as toWrongStackError, ac as wrapAsState } from './context-IovtuTf8.js';
8
- export { P as ProviderRunner, R as RunProviderOptions } from './provider-runner-B39miKRw.js';
9
- import { a as Config } from './config-D2qvAxVd.js';
10
- export { C as CONTEXT_WINDOW_MODES, b as ConfigLoader, c as ConfigStore, d as ContextConfig, e as ContextWindowAggressiveOn, f as ContextWindowConfigLike, g as ContextWindowMode, h as ContextWindowModeId, i as ContextWindowPolicy, j as ContextWindowThresholds, D as DEFAULT_CONTEXT_WINDOW_MODE_ID, F as FeaturesConfig, L as LogConfig, M as MCPServerConfig, P as PluginConfig, k as ProviderApiKey, l as ProviderConfig, T as ToolsConfig, m as formatContextWindowModeList, n as getContextWindowMode, o as isContextWindowModeId, p as listContextWindowModes, r as resolveContextWindowPolicy } from './config-D2qvAxVd.js';
11
- export { C as CompactReport, a as Compactor } from './compactor-DpJBI1YH.js';
12
- export { P as PermissionDecision, a as PermissionPolicy, T as TrustPolicy } from './secret-scrubber-CgG2tV2B.js';
13
- import { e as AttachmentStore, d as AttachmentRef, A as AddAttachmentInput } from './session-reader-CcPi4BQ8.js';
14
- export { a as Attachment, b as AttachmentKind, c as AttachmentMeta, D as DefaultSessionReader } from './session-reader-CcPi4BQ8.js';
15
- export { D as DefaultSecretScrubber, a as DefaultSecretVault, S as SecretVaultOptions, d as decryptConfigSecrets, e as encryptConfigSecrets, m as migratePlaintextSecrets, r as rewriteConfigEncrypted } from './secret-scrubber-Cuy5afaQ.js';
6
+ import { b as ContentBlock, T as TextBlock, a0 as Context } from './context-B1kBj1lY.js';
7
+ export { A as AgentError, C as Capabilities, a as ConfigError, a3 as ContextInit, a4 as ConversationState, E as ErrorCode, c as ErrorSeverity, d as ErrorSubsystem, I as ImageBlock, J as JSONSchema, M as Message, e as MessageRole, P as Permission, f as PluginError, g as Provider, h as ProviderError, i as ProviderErrorBody, a5 as ReadonlyConversationState, R as Request, j as Response, k as ResumedSession, a6 as RunEnv, a7 as RunOptions, S as SessionData, l as SessionError, m as SessionEvent, n as SessionMetadata, o as SessionStore, p as SessionSummary, q as SessionWriter, a8 as StateChange, a9 as StateChangeHandler, r as StopReason, s as StreamEvent, t as ThinkingBlock, aa as TodoItem, a1 as TokenCounter, u as Tool, v as ToolCallContext, w as ToolError, x as ToolFinalEvent, y as ToolProgressEvent, z as ToolResultBlock, B as ToolStreamEvent, D as ToolUseBlock, U as Usage, W as WrongStackError, F as asBlocks, G as asText, ab as extractRunEnv, H as isAgentError, K as isConfigError, L as isImageBlock, N as isPluginError, O as isSessionError, Q as isTextBlock, V as isThinkingBlock, X as isToolError, Y as isToolResultBlock, Z as isToolUseBlock, _ as isWrongStackError, $ as toWrongStackError, ac as wrapAsState } from './context-B1kBj1lY.js';
8
+ export { P as ProviderRunner, R as RunProviderOptions } from './provider-runner-CU9gnU2E.js';
9
+ import { a as Config } from './config-RlhKLjme.js';
10
+ export { C as CONTEXT_WINDOW_MODES, b as ConfigLoader, c as ConfigStore, d as ContextConfig, e as ContextWindowAggressiveOn, f as ContextWindowConfigLike, g as ContextWindowMode, h as ContextWindowModeId, i as ContextWindowPolicy, j as ContextWindowThresholds, D as DEFAULT_CONTEXT_WINDOW_MODE_ID, F as FeaturesConfig, L as LogConfig, M as MCPServerConfig, P as PluginConfig, k as ProviderApiKey, l as ProviderConfig, T as ToolsConfig, m as formatContextWindowModeList, n as getContextWindowMode, o as isContextWindowModeId, p as listContextWindowModes, r as resolveContextWindowPolicy } from './config-RlhKLjme.js';
11
+ export { C as CompactReport, a as Compactor } from './compactor-CFky6JKM.js';
12
+ export { P as PermissionDecision, a as PermissionPolicy, T as TrustPolicy } from './secret-scrubber-DyUAWS09.js';
13
+ import { e as AttachmentStore, d as AttachmentRef, A as AddAttachmentInput } from './session-reader-D-z0AgHs.js';
14
+ export { a as Attachment, b as AttachmentKind, c as AttachmentMeta, D as DefaultSessionReader } from './session-reader-D-z0AgHs.js';
15
+ export { D as DefaultSecretScrubber, a as DefaultSecretVault, S as SecretVaultOptions, d as decryptConfigSecrets, e as encryptConfigSecrets, m as migratePlaintextSecrets, r as rewriteConfigEncrypted } from './secret-scrubber-Dyh5LVYL.js';
16
16
  export { D as DefaultLogger, a as DefaultLoggerOptions } from './logger-BH6AE0W9.js';
17
- export { D as DefaultPathResolver, a as DefaultTokenCounter } from './path-resolver--59rCou3.js';
17
+ export { D as DefaultPathResolver, a as DefaultTokenCounter } from './path-resolver-Bg4OP5fi.js';
18
18
  import { b as MemoryStore } from './memory-CEXuo7sz.js';
19
19
  export { M as MemoryEntry, a as MemoryScope } from './memory-CEXuo7sz.js';
20
- export { C as CompactorOptions, D as DEFAULT_RECOVERY_STRATEGIES, a as DefaultErrorHandler, b as DefaultRetryPolicy, H as HybridCompactor, R as RecoveryStrategy, T as ToolExecutor, c as buildRecoveryStrategies } from './tool-executor-HsBLGRaA.js';
21
- import { a as SkillLoader } from './skill-C_7znCIC.js';
22
- export { S as SkillEntry, b as SkillManifest } from './skill-C_7znCIC.js';
20
+ export { C as CompactorOptions, D as DEFAULT_RECOVERY_STRATEGIES, a as DefaultErrorHandler, b as DefaultRetryPolicy, H as HybridCompactor, R as RecoveryStrategy, T as ToolExecutor, c as buildRecoveryStrategies } from './tool-executor-B5bgmEgE.js';
21
+ import { a as SkillLoader } from './skill-DayhFUBb.js';
22
+ export { S as SkillEntry, b as SkillManifest } from './skill-DayhFUBb.js';
23
23
  export { I as InputReader, P as PromptOption } from './input-reader-E-ffP2ee.js';
24
- import { j as SystemPromptContributor, h as SlashCommand, b as PluginAPI, e as PluginPipelines, T as ToolRegistryView, g as ProviderRegistryView, M as MCPRegistryView, i as SlashCommandRegistryView, E as ExtensionRegistry, S as SessionWriterView, a as MetricsSinkView, n as ToolRegistry, o as ProviderRegistry, P as Plugin } from './index-hWNybrNZ.js';
25
- export { A as AfterIterationHook, p as AfterRunHook, q as AfterToolExecutionHook, r as Agent, s as AgentExtension, t as AgentInit, u as AgentInput, v as AgentPipelines, B as BeforeIterationHook, w as BeforeRunHook, x as BeforeToolExecutionHook, D as DEFAULT_MAX_ITERATIONS, O as OnErrorHook, c as PluginCapabilities, d as PluginDependency, y as ProviderFactory, z as ProviderRunnerWrapper, R as RunResult, C as ToolWrapper, U as UserInputPayload, F as createDefaultPipelines } from './index-hWNybrNZ.js';
24
+ import { j as SystemPromptContributor, h as SlashCommand, b as PluginAPI, e as PluginPipelines, T as ToolRegistryView, g as ProviderRegistryView, M as MCPRegistryView, i as SlashCommandRegistryView, E as ExtensionRegistry, S as SessionWriterView, a as MetricsSinkView, n as ToolRegistry, o as ProviderRegistry, P as Plugin } from './index-meJRuQtc.js';
25
+ export { A as AfterIterationHook, p as AfterRunHook, q as AfterToolExecutionHook, r as Agent, s as AgentExtension, t as AgentInit, u as AgentInput, v as AgentPipelines, B as BeforeIterationHook, w as BeforeRunHook, x as BeforeToolExecutionHook, D as DEFAULT_MAX_ITERATIONS, O as OnErrorHook, c as PluginCapabilities, d as PluginDependency, y as ProviderFactory, z as ProviderRunnerWrapper, R as RunResult, C as ToolWrapper, U as UserInputPayload, F as createDefaultPipelines } from './index-meJRuQtc.js';
26
26
  export { D as DefaultModelsRegistry, a as DefaultModelsRegistryOptions, c as classifyFamily } from './models-registry-DqzwpBQy.js';
27
27
  import { c as ModeStore } from './mode-CV077NjV.js';
28
28
  export { D as DEFAULT_MODES, M as Mode, a as ModeConfig, b as ModeManifest } from './mode-CV077NjV.js';
29
- export { I as InMemoryAgentBridge, a as InMemoryBridgeTransport, c as createMessage } from './agent-bridge-C3DUGjSb.js';
30
- export { n as BudgetExceededError, o as BudgetKind, p as BudgetLimits, q as BudgetUsage, C as CoordinatorEvents, a as CoordinatorStatus, D as DoneCondition, M as MultiAgentConfig, b as MultiAgentCoordinator, S as SpawnResult, r as SubagentBudget, c as SubagentConfig, d as SubagentContext, e as SubagentError, f as SubagentErrorKind, g as SubagentRunContext, h as SubagentRunOutcome, i as SubagentRunner, T as TaskDelegation, j as TaskResult, k as TaskSpec } from './multi-agent-B9a6sflH.js';
29
+ export { I as InMemoryAgentBridge, a as InMemoryBridgeTransport, c as createMessage } from './agent-bridge-DaOnnHNW.js';
30
+ export { n as BudgetExceededError, o as BudgetKind, p as BudgetLimits, q as BudgetUsage, C as CoordinatorEvents, a as CoordinatorStatus, D as DoneCondition, M as MultiAgentConfig, b as MultiAgentCoordinator, S as SpawnResult, r as SubagentBudget, c as SubagentConfig, d as SubagentContext, e as SubagentError, f as SubagentErrorKind, g as SubagentRunContext, h as SubagentRunOutcome, i as SubagentRunner, T as TaskDelegation, j as TaskResult, k as TaskSpec } from './multi-agent-D5m66hzB.js';
31
31
  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, l as TaskGraph, m as TaskNode, n as TaskPriority, o as TaskProgress, p as TaskSort, q as TaskStatus, r as TaskType, s as computeTaskProgress, t as findCriticalPath, u as topologicalSort } from './task-graph-BITvWt4t.js';
32
32
  export { A as AggregateHealth, H as HealthCheck, a as HealthCheckResult, b as HealthRegistry, c as HealthStatus, M as MetricLabels, d as MetricSeries, e as MetricsSink, f as MetricsSnapshot, S as Span, T as Tracer } from './observability-BhnVLBLS.js';
33
- export { AtomicWriteOptions, BuildChildEnvOptions, MessageRepairReport, MessageRepairResult, NewlineStyle, SafeParseResult, ToolOutputSerializerOptions, UnifiedDiffOptions, ValidationError, ValidationResult, atomicWrite, buildChildEnv, color, compileGlob, createToolOutputSerializer, detectNewlineStyle, ensureDir, estimateTextTokens, estimateToolInputTokens, estimateToolResultTokens, formatTodosList, matchAny, matchGlob, normalizeToLf, repairToolUseAdjacency, safeParse, safeStringify, sanitizeJsonString, stripAnsi, toStyle, unifiedDiff, validateAgainstSchema } from './utils/index.js';
33
+ export { AtomicWriteOptions, BuildChildEnvOptions, CompileFail, CompileResult, MessageRepairReport, MessageRepairResult, NewlineStyle, SafeParseResult, ToolOutputSerializerOptions, UnifiedDiffOptions, ValidationError, ValidationResult, atomicWrite, buildChildEnv, color, compileGlob, compileUserRegex, createToolOutputSerializer, detectNewlineStyle, ensureDir, estimateTextTokens, estimateToolInputTokens, estimateToolResultTokens, formatTodosList, matchAny, matchGlob, normalizeToLf, repairToolUseAdjacency, safeParse, safeStringify, sanitizeJsonString, stripAnsi, toStyle, unifiedDiff, validateAgainstSchema } from './utils/index.js';
34
34
  export { W as WstackPathOptions, a as WstackPaths, p as projectHash, r as resolveWstackPaths } from './wstack-paths-BGu2INTm.js';
35
35
  export { AbandonedSession, AttachmentStoreOptions, ConfigLoaderOptions, ConfigMigration, ConfigMigrationError, ConfigSource, DEFAULT_CONFIG_MIGRATIONS, DefaultAttachmentStore, DefaultConfigLoader, DefaultConfigStore, DefaultMemoryStore, DefaultSessionStore, DirectorStateCheckpoint, DirectorStateSnapshot, DirectorSubagentState, DirectorTaskState, MemoryStoreOptions, MigrationContext, MigrationResult, PersistedQueueItem, PlanFile, PlanItem, QueueStore, RecoveryLock, RecoveryLockOptions, SessionAnalyzer, SessionStoreOptions, TodosCheckpointFile, addPlanItem, attachPlanCheckpoint, attachTodosCheckpoint, clearPlan, emptyPlan, formatPlan, loadDirectorState, loadPlan, loadTodosCheckpoint, removePlanItem, runConfigMigrations, savePlan, saveTodosCheckpoint, setPlanItemStatus } from './storage/index.js';
36
36
  export { AutoApprovePermissionPolicy, DefaultPermissionPolicy, PermissionPolicyOptions } from './security/index.js';
@@ -40,13 +40,13 @@ export { ALL_FLEET_AGENTS, AUDIT_LOG_AGENT, AgentFactory, AgentFactoryResult, Ag
40
40
  export { DefaultModeStore, LLMSelector, LLMSelectorOptions, ModeLoaderOptions, loadProjectModes, loadUserModes } from './models/index.js';
41
41
  export { DefaultTaskStore, GeneratedTask, SpecDrivenDev, SpecDrivenDevOptions, SpecParser, TaskFlow, TaskFlowEventMap, TaskFlowEventName, TaskFlowExecutionContext, TaskFlowOptions, TaskFlowPhase, TaskGenerator, TaskGeneratorOptions, TaskStore, TaskTracker, TaskTrackerOptions, TaskTransition } from './sdd/index.js';
42
42
  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';
43
- 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-C2OopXOn.js';
43
+ 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-Cf4-bJnd.js';
44
44
  import { L as Logger } from './logger-BMQgxvdy.js';
45
45
  export { a as LogLevel } from './logger-BMQgxvdy.js';
46
46
  export { a as ModelsDevPayload, c as ModelsDevProvider, M as ModelsRegistry, b as ResolvedModel, R as ResolvedProvider, W as WireFamily } from './models-registry-Y2xbog0E.js';
47
47
  export { S as SecretVault } from './secret-vault-DoISxaKO.js';
48
48
  import './path-resolver-CPRj4bFY.js';
49
- import './selector-wT2fv9Fg.js';
49
+ import './selector-DBEiwXBk.js';
50
50
  import 'node:events';
51
51
 
52
52
  interface InputBuilderOptions {
@@ -113,7 +113,7 @@ declare class InputBuilder {
113
113
  private shouldCollapse;
114
114
  }
115
115
 
116
- 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\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.\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. **Recover explicitly.** When a tool fails, state: (1) what failed, (2) what you tried, (3) what you'll attempt next. Never silently skip.\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 retry once with adjusted params, then report failure\n- **Permission prompt shown** \u2192 wait for user, do not act unilaterally\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- **Stay in your lane.** Don't lecture about software engineering principles unless explicitly asked \u2014 the user is the expert on their codebase.";
116
+ 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\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.\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. **Recover explicitly.** When a tool fails, state: (1) what failed, (2) what you tried, (3) what you'll attempt next. Never silently skip.\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 retry once with adjusted params, then report failure\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.";
117
117
  interface DefaultSystemPromptBuilderOptions {
118
118
  memoryStore?: MemoryStore;
119
119
  skillLoader?: SkillLoader;