@wrongstack/core 0.1.10 → 0.2.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 (42) hide show
  1. package/dist/{agent-bridge-6KPqsFx6.d.ts → agent-bridge-DmBiCipY.d.ts} +1 -1
  2. package/dist/{compactor-B4mQZXf2.d.ts → compactor-DSl2FK7a.d.ts} +1 -1
  3. package/dist/{config-BU9f_5yH.d.ts → config-DXrqb41m.d.ts} +1 -1
  4. package/dist/{context-BmM2xGUZ.d.ts → context-u0bryklF.d.ts} +8 -0
  5. package/dist/coordination/index.d.ts +210 -12
  6. package/dist/coordination/index.js +941 -67
  7. package/dist/coordination/index.js.map +1 -1
  8. package/dist/defaults/index.d.ts +18 -18
  9. package/dist/defaults/index.js +953 -41
  10. package/dist/defaults/index.js.map +1 -1
  11. package/dist/{events-BMNaEFZl.d.ts → events-B6Q03pTu.d.ts} +73 -1
  12. package/dist/execution/index.d.ts +11 -11
  13. package/dist/index.d.ts +61 -28
  14. package/dist/index.js +1077 -48
  15. package/dist/index.js.map +1 -1
  16. package/dist/infrastructure/index.d.ts +6 -6
  17. package/dist/kernel/index.d.ts +9 -9
  18. package/dist/kernel/index.js.map +1 -1
  19. package/dist/{mcp-servers-Dzgg4x1w.d.ts → mcp-servers-BA1Ofmfj.d.ts} +3 -3
  20. package/dist/models/index.d.ts +2 -2
  21. package/dist/{multi-agent-fmkRHtof.d.ts → multi-agent-BDfkxL5C.d.ts} +71 -3
  22. package/dist/observability/index.d.ts +2 -2
  23. package/dist/{path-resolver-DBjaoXFq.d.ts → path-resolver-Crkt8wTQ.d.ts} +2 -2
  24. package/dist/{plugin-DJk6LL8B.d.ts → plugin-CoYYZKdn.d.ts} +19 -6
  25. package/dist/{renderer-rk_1Swwc.d.ts → renderer-0A2ZEtca.d.ts} +1 -1
  26. package/dist/sdd/index.d.ts +3 -3
  27. package/dist/{secret-scrubber-CicHLN4G.d.ts → secret-scrubber-3TLUkiCV.d.ts} +1 -1
  28. package/dist/{secret-scrubber-DF88luOe.d.ts → secret-scrubber-CwYliRWd.d.ts} +1 -1
  29. package/dist/security/index.d.ts +20 -4
  30. package/dist/security/index.js +13 -1
  31. package/dist/security/index.js.map +1 -1
  32. package/dist/{selector-BbJqiEP4.d.ts → selector-BRqzvugb.d.ts} +1 -1
  33. package/dist/{session-reader-Drq8RvJu.d.ts → session-reader-C3x96CDR.d.ts} +1 -1
  34. package/dist/{skill-DhfSizKv.d.ts → skill-Bx8jxznf.d.ts} +1 -1
  35. package/dist/storage/index.d.ts +164 -6
  36. package/dist/storage/index.js +273 -1
  37. package/dist/storage/index.js.map +1 -1
  38. package/dist/{system-prompt-BC_8ypCG.d.ts → system-prompt-CG9jU5-5.d.ts} +9 -1
  39. package/dist/{tool-executor-CpuJPYm9.d.ts → tool-executor-CYdZdtno.d.ts} +4 -4
  40. package/dist/types/index.d.ts +15 -15
  41. package/dist/utils/index.d.ts +1 -1
  42. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { U as Usage, a0 as Context, y as ToolProgressEvent, u as Tool } from './context-BmM2xGUZ.js';
1
+ import { U as Usage, a0 as Context, y as ToolProgressEvent, u as Tool } from './context-u0bryklF.js';
2
2
 
3
3
  /**
4
4
  * EventBus — observe-only typed event bus.
@@ -173,6 +173,78 @@ interface EventMap {
173
173
  load: number;
174
174
  fatal: boolean;
175
175
  };
176
+ /**
177
+ * Subagent lifecycle events. Emitted by `MultiAgentHost` so the TUI can
178
+ * surface what's happening in the fleet without needing director-mode
179
+ * (which renders the live FleetPanel). These complement the FleetBus
180
+ * (director-only) by giving the TUI a uniform feed for both `/spawn`
181
+ * and director-orchestrated work.
182
+ */
183
+ 'subagent.spawned': {
184
+ subagentId: string;
185
+ taskId: string;
186
+ name?: string;
187
+ provider?: string;
188
+ model?: string;
189
+ description?: string;
190
+ /**
191
+ * Absolute path to the per-subagent JSONL transcript on disk, when
192
+ * one was created. Undefined when the subagent shares the parent
193
+ * session writer (in-memory or single-file configurations).
194
+ * Surfaced so the TUI (FleetPanel) and `/fleet log` can show the
195
+ * user *where* to look without computing it from the run id.
196
+ */
197
+ transcriptPath?: string;
198
+ };
199
+ 'subagent.task_started': {
200
+ subagentId: string;
201
+ taskId: string;
202
+ description?: string;
203
+ };
204
+ /**
205
+ * Per-tool-call event re-emitted from a subagent's own EventBus
206
+ * onto the host EventBus, so the TUI / non-director surfaces can
207
+ * render "AGENT#1 ● bash 250ms" without having to subscribe to
208
+ * the director-only FleetBus. Fired AFTER the tool completes
209
+ * (paired with `tool.executed`). Includes the subagent id so
210
+ * multiple parallel subagents are distinguishable.
211
+ */
212
+ 'subagent.tool_executed': {
213
+ subagentId: string;
214
+ taskId?: string;
215
+ name: string;
216
+ durationMs: number;
217
+ ok: boolean;
218
+ input?: unknown;
219
+ outputBytes?: number;
220
+ };
221
+ 'subagent.task_completed': {
222
+ subagentId: string;
223
+ taskId: string;
224
+ status: 'success' | 'failed' | 'timeout' | 'stopped';
225
+ iterations: number;
226
+ toolCalls: number;
227
+ durationMs: number;
228
+ /**
229
+ * Structured failure envelope when `status !== 'success'`. Carries
230
+ * `kind` (one of `SubagentErrorKind`), `message`, `retryable`, and
231
+ * optional `backoffMs`. UIs branch on `kind` to render the right
232
+ * chip (rate_limit vs auth vs tool_failed). The type is imported
233
+ * lazily as a structural object to avoid a coordination → kernel
234
+ * cycle in the dependency graph.
235
+ */
236
+ error?: {
237
+ kind: string;
238
+ message: string;
239
+ retryable: boolean;
240
+ backoffMs?: number;
241
+ cause?: {
242
+ name: string;
243
+ message: string;
244
+ stack?: string;
245
+ };
246
+ };
247
+ };
176
248
  'mcp.server.connected': {
177
249
  name: string;
178
250
  toolCount: number;
@@ -1,17 +1,17 @@
1
- export { C as CompactorOptions, D as DefaultErrorHandler, a as DefaultRetryPolicy, H as HybridCompactor, T as ToolExecutor } from '../tool-executor-CpuJPYm9.js';
2
- import { g as Provider, a0 as Context } from '../context-BmM2xGUZ.js';
3
- import { C as Compactor, a as CompactReport } from '../compactor-B4mQZXf2.js';
4
- import { M as MessageSelector } from '../selector-BbJqiEP4.js';
5
- import { E as EventBus } from '../events-BMNaEFZl.js';
6
- import { a as MiddlewareHandler } from '../renderer-rk_1Swwc.js';
7
- import { A as Agent, R as RunResult } from '../plugin-DJk6LL8B.js';
8
- import { D as DoneCondition } from '../multi-agent-fmkRHtof.js';
9
- import { a as SkillLoader, b as SkillManifest, S as SkillEntry } from '../skill-DhfSizKv.js';
1
+ export { C as CompactorOptions, D as DefaultErrorHandler, a as DefaultRetryPolicy, H as HybridCompactor, T as ToolExecutor } from '../tool-executor-CYdZdtno.js';
2
+ import { g as Provider, a0 as Context } from '../context-u0bryklF.js';
3
+ import { C as Compactor, a as CompactReport } from '../compactor-DSl2FK7a.js';
4
+ import { M as MessageSelector } from '../selector-BRqzvugb.js';
5
+ import { E as EventBus } from '../events-B6Q03pTu.js';
6
+ import { a as MiddlewareHandler } from '../renderer-0A2ZEtca.js';
7
+ import { A as Agent, R as RunResult } from '../plugin-CoYYZKdn.js';
8
+ import { D as DoneCondition } from '../multi-agent-BDfkxL5C.js';
9
+ import { a as SkillLoader, b as SkillManifest, S as SkillEntry } from '../skill-Bx8jxznf.js';
10
10
  import { a as WstackPaths } from '../wstack-paths-BGu2INTm.js';
11
11
  import '../models-registry-Y2xbog0E.js';
12
12
  import '../observability-BhnVLBLS.js';
13
- import '../secret-scrubber-CicHLN4G.js';
14
- import '../config-BU9f_5yH.js';
13
+ import '../secret-scrubber-3TLUkiCV.js';
14
+ import '../config-DXrqb41m.js';
15
15
  import '../logger-BMQgxvdy.js';
16
16
 
17
17
  interface SkillLoaderOptions {
package/dist/index.d.ts CHANGED
@@ -1,51 +1,51 @@
1
- import { C as Container } from './renderer-rk_1Swwc.js';
2
- export { B as BindOptions, D as Decorator, F as Factory, M as Middleware, a as MiddlewareHandler, N as NextFn, P as Pipeline, b as PipelineOptions, R as Renderer, T as Token } from './renderer-rk_1Swwc.js';
3
- import { E as EventBus, a as EventName, L as Listener } from './events-BMNaEFZl.js';
4
- export { b as EventLogger, c as EventMap } from './events-BMNaEFZl.js';
1
+ import { C as Container } from './renderer-0A2ZEtca.js';
2
+ export { B as BindOptions, D as Decorator, F as Factory, M as Middleware, a as MiddlewareHandler, N as NextFn, P as Pipeline, b as PipelineOptions, R as Renderer, T as Token } from './renderer-0A2ZEtca.js';
3
+ import { E as EventBus, a as EventName, L as Listener } from './events-B6Q03pTu.js';
4
+ export { b as EventLogger, c as EventMap } from './events-B6Q03pTu.js';
5
5
  export { RunController, RunControllerOptions, TOKENS } from './kernel/index.js';
6
- import { b as ContentBlock, T as TextBlock, a0 as Context } from './context-BmM2xGUZ.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-BmM2xGUZ.js';
8
- import { C as Config } from './config-BU9f_5yH.js';
9
- export { a as ConfigLoader, b as ConfigStore, c as ContextConfig, F as FeaturesConfig, L as LogConfig, M as MCPServerConfig, P as PluginConfig, d as ProviderApiKey, e as ProviderConfig, T as ToolsConfig } from './config-BU9f_5yH.js';
10
- export { P as PermissionDecision, a as PermissionPolicy, T as TrustPolicy } from './secret-scrubber-CicHLN4G.js';
11
- import { e as AttachmentStore, d as AttachmentRef, A as AddAttachmentInput } from './session-reader-Drq8RvJu.js';
12
- export { a as Attachment, b as AttachmentKind, c as AttachmentMeta, D as DefaultSessionReader } from './session-reader-Drq8RvJu.js';
13
- 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-DF88luOe.js';
6
+ import { b as ContentBlock, T as TextBlock, a0 as Context } from './context-u0bryklF.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-u0bryklF.js';
8
+ import { C as Config } from './config-DXrqb41m.js';
9
+ export { a as ConfigLoader, b as ConfigStore, c as ContextConfig, F as FeaturesConfig, L as LogConfig, M as MCPServerConfig, P as PluginConfig, d as ProviderApiKey, e as ProviderConfig, T as ToolsConfig } from './config-DXrqb41m.js';
10
+ export { P as PermissionDecision, a as PermissionPolicy, T as TrustPolicy } from './secret-scrubber-3TLUkiCV.js';
11
+ import { e as AttachmentStore, d as AttachmentRef, A as AddAttachmentInput } from './session-reader-C3x96CDR.js';
12
+ export { a as Attachment, b as AttachmentKind, c as AttachmentMeta, D as DefaultSessionReader } from './session-reader-C3x96CDR.js';
13
+ 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-CwYliRWd.js';
14
14
  export { D as DefaultLogger, a as DefaultLoggerOptions } from './logger-BH6AE0W9.js';
15
- export { D as DefaultPathResolver, a as DefaultTokenCounter } from './path-resolver-DBjaoXFq.js';
15
+ export { D as DefaultPathResolver, a as DefaultTokenCounter } from './path-resolver-Crkt8wTQ.js';
16
16
  import { b as MemoryStore } from './memory-CEXuo7sz.js';
17
17
  export { M as MemoryEntry, a as MemoryScope } from './memory-CEXuo7sz.js';
18
- export { C as CompactorOptions, b as DEFAULT_RECOVERY_STRATEGIES, D as DefaultErrorHandler, a as DefaultRetryPolicy, H as HybridCompactor, R as RecoveryStrategy, T as ToolExecutor, c as buildRecoveryStrategies } from './tool-executor-CpuJPYm9.js';
19
- import { a as SkillLoader } from './skill-DhfSizKv.js';
20
- export { S as SkillEntry, b as SkillManifest } from './skill-DhfSizKv.js';
21
- import { S as SystemPromptBuilder, M as ModelCapabilities, B as BuildContext } from './system-prompt-BC_8ypCG.js';
18
+ export { C as CompactorOptions, b as DEFAULT_RECOVERY_STRATEGIES, D as DefaultErrorHandler, a as DefaultRetryPolicy, H as HybridCompactor, R as RecoveryStrategy, T as ToolExecutor, c as buildRecoveryStrategies } from './tool-executor-CYdZdtno.js';
19
+ import { a as SkillLoader } from './skill-Bx8jxznf.js';
20
+ export { S as SkillEntry, b as SkillManifest } from './skill-Bx8jxznf.js';
21
+ import { S as SystemPromptBuilder, M as ModelCapabilities, B as BuildContext } from './system-prompt-CG9jU5-5.js';
22
22
  export { I as InputReader, P as PromptOption } from './input-reader-E-ffP2ee.js';
23
- import { S as SlashCommand, a as PluginAPI, d as PluginPipelines, T as ToolRegistryView, f as ProviderRegistryView, M as MCPRegistryView, g as SlashCommandRegistryView, k as ToolRegistry, l as ProviderRegistry, P as Plugin } from './plugin-DJk6LL8B.js';
24
- export { A as Agent, m as AgentInit, n as AgentInput, o as AgentPipelines, D as DEFAULT_MAX_ITERATIONS, b as PluginCapabilities, c as PluginDependency, p as ProviderFactory, R as RunResult, U as UserInputPayload, q as createDefaultPipelines } from './plugin-DJk6LL8B.js';
23
+ import { S as SlashCommand, a as PluginAPI, d as PluginPipelines, T as ToolRegistryView, f as ProviderRegistryView, M as MCPRegistryView, g as SlashCommandRegistryView, k as ToolRegistry, l as ProviderRegistry, P as Plugin } from './plugin-CoYYZKdn.js';
24
+ export { A as Agent, m as AgentInit, n as AgentInput, o as AgentPipelines, D as DEFAULT_MAX_ITERATIONS, b as PluginCapabilities, c as PluginDependency, p as ProviderFactory, R as RunResult, U as UserInputPayload, q as createDefaultPipelines } from './plugin-CoYYZKdn.js';
25
25
  export { D as DefaultModelsRegistry, a as DefaultModelsRegistryOptions, c as classifyFamily } from './models-registry-DqzwpBQy.js';
26
26
  import { c as ModeStore } from './mode-CV077NjV.js';
27
27
  export { D as DEFAULT_MODES, M as Mode, a as ModeConfig, b as ModeManifest } from './mode-CV077NjV.js';
28
- export { I as InMemoryAgentBridge, a as InMemoryBridgeTransport, c as createMessage } from './agent-bridge-6KPqsFx6.js';
29
- export { B as BudgetExceededError, a as BudgetKind, b as BudgetLimits, c as BudgetUsage, C as CoordinatorEvents, d as CoordinatorStatus, D as DoneCondition, M as MultiAgentConfig, e as MultiAgentCoordinator, f as SpawnResult, S as SubagentBudget, g as SubagentConfig, h as SubagentContext, i as SubagentRunContext, j as SubagentRunOutcome, k as SubagentRunner, T as TaskDelegation, l as TaskResult, m as TaskSpec } from './multi-agent-fmkRHtof.js';
28
+ export { I as InMemoryAgentBridge, a as InMemoryBridgeTransport, c as createMessage } from './agent-bridge-DmBiCipY.js';
29
+ export { B as BudgetExceededError, a as BudgetKind, b as BudgetLimits, c as BudgetUsage, C as CoordinatorEvents, d as CoordinatorStatus, D as DoneCondition, M as MultiAgentConfig, e as MultiAgentCoordinator, f as SpawnResult, S as SubagentBudget, g as SubagentConfig, h as SubagentContext, i as SubagentError, j as SubagentErrorKind, k as SubagentRunContext, l as SubagentRunOutcome, m as SubagentRunner, T as TaskDelegation, n as TaskResult, o as TaskSpec } from './multi-agent-BDfkxL5C.js';
30
30
  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';
31
31
  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';
32
32
  export { AtomicWriteOptions, BuildChildEnvOptions, NewlineStyle, SafeParseResult, ToolOutputSerializerOptions, UnifiedDiffOptions, ValidationError, ValidationResult, atomicWrite, buildChildEnv, color, compileGlob, createToolOutputSerializer, detectNewlineStyle, ensureDir, estimateTextTokens, estimateToolInputTokens, estimateToolResultTokens, formatTodosList, matchAny, matchGlob, normalizeToLf, safeParse, safeStringify, sanitizeJsonString, stripAnsi, toStyle, unifiedDiff, validateAgainstSchema } from './utils/index.js';
33
33
  export { W as WstackPathOptions, a as WstackPaths, p as projectHash, r as resolveWstackPaths } from './wstack-paths-BGu2INTm.js';
34
- export { AbandonedSession, AttachmentStoreOptions, ConfigLoaderOptions, ConfigMigration, ConfigMigrationError, ConfigSource, DEFAULT_CONFIG_MIGRATIONS, DefaultAttachmentStore, DefaultConfigLoader, DefaultConfigStore, DefaultMemoryStore, DefaultSessionStore, MemoryStoreOptions, MigrationContext, MigrationResult, PersistedQueueItem, QueueStore, RecoveryLock, RecoveryLockOptions, SessionAnalyzer, SessionStoreOptions, runConfigMigrations } from './storage/index.js';
35
- export { DefaultPermissionPolicy, PermissionPolicyOptions } from './security/index.js';
34
+ 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';
35
+ export { AutoApprovePermissionPolicy, DefaultPermissionPolicy, PermissionPolicyOptions } from './security/index.js';
36
36
  export { AutoCompactionMiddleware, AutonomousRunner, AutonomousRunnerOptions, DefaultSkillLoader, DoneCheckResult, DoneConditionChecker, IntelligentCompactor, IntelligentCompactorOptions, SelectiveCompactor, SelectiveCompactorOptions, SkillLoaderOptions } from './execution/index.js';
37
- export { ALL_FLEET_AGENTS, AUDIT_LOG_AGENT, AgentFactory, AgentFactoryResult, AgentRunnerOptions, BUG_HUNTER_AGENT, DEFAULT_DIRECTOR_PREAMBLE, DEFAULT_SUBAGENT_BASELINE, DefaultMultiAgentCoordinator, Director, DirectorBudgetError, DirectorPromptParts, DirectorSessionFactory, DirectorSessionFactoryOptions, FLEET_ROSTER, FleetBus, FleetEvent, FleetHandler, FleetUsage, FleetUsageAggregator, MultiAgentCoordinatorOptions, REFACTOR_PLANNER_AGENT, SECURITY_SCANNER_AGENT, SubagentPromptParts, SubagentUsageSnapshot, composeDirectorPrompt, composeSubagentPrompt, makeAgentSubagentRunner, makeDirectorSessionFactory, rosterSummaryFromConfigs } from './coordination/index.js';
37
+ export { ALL_FLEET_AGENTS, AUDIT_LOG_AGENT, AgentFactory, AgentFactoryResult, AgentRunnerOptions, BUG_HUNTER_AGENT, CreateDelegateToolOptions, DEFAULT_DIRECTOR_PREAMBLE, DEFAULT_SUBAGENT_BASELINE, DefaultMultiAgentCoordinator, DelegateHost, Director, DirectorBudgetError, DirectorPromptParts, DirectorSessionFactory, DirectorSessionFactoryOptions, FLEET_ROSTER, FleetBus, FleetEvent, FleetHandler, FleetUsage, FleetUsageAggregator, MultiAgentCoordinatorOptions, REFACTOR_PLANNER_AGENT, SECURITY_SCANNER_AGENT, SubagentPromptParts, SubagentUsageSnapshot, composeDirectorPrompt, composeSubagentPrompt, createDelegateTool, makeAgentSubagentRunner, makeDirectorSessionFactory, rosterSummaryFromConfigs } from './coordination/index.js';
38
38
  export { DefaultModeStore, LLMSelector, LLMSelectorOptions, ModeLoaderOptions, loadProjectModes, loadUserModes } from './models/index.js';
39
39
  export { DefaultTaskStore, GeneratedTask, SpecDrivenDev, SpecDrivenDevOptions, SpecParser, TaskFlow, TaskFlowEventMap, TaskFlowEventName, TaskFlowExecutionContext, TaskFlowOptions, TaskFlowPhase, TaskGenerator, TaskGeneratorOptions, TaskStore, TaskTracker, TaskTrackerOptions, TaskTransition } from './sdd/index.js';
40
40
  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';
41
- 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, s as sentinelServer, o as slackServer } from './mcp-servers-Dzgg4x1w.js';
41
+ 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, s as sentinelServer, o as slackServer } from './mcp-servers-BA1Ofmfj.js';
42
42
  import { L as Logger } from './logger-BMQgxvdy.js';
43
43
  export { a as LogLevel } from './logger-BMQgxvdy.js';
44
44
  export { a as ModelsDevPayload, c as ModelsDevProvider, M as ModelsRegistry, b as ResolvedModel, R as ResolvedProvider, W as WireFamily } from './models-registry-Y2xbog0E.js';
45
45
  export { S as SecretVault } from './secret-vault-DoISxaKO.js';
46
- import './compactor-B4mQZXf2.js';
46
+ import './compactor-DSl2FK7a.js';
47
47
  import './path-resolver-CPRj4bFY.js';
48
- import './selector-BbJqiEP4.js';
48
+ import './selector-BRqzvugb.js';
49
49
  import 'node:events';
50
50
 
51
51
  interface InputBuilderOptions {
@@ -124,6 +124,20 @@ interface DefaultSystemPromptBuilderOptions {
124
124
  /** Pre-resolved model capabilities — enables adaptive context thresholds. */
125
125
  modelCapabilities?: ModelCapabilities;
126
126
  todayIso?: string;
127
+ /**
128
+ * Path to the session's plan JSON, or a getter that returns it. When
129
+ * set, the builder reads the file on every `build()` call and injects
130
+ * an "Active plan" block listing open items, so the LLM is anchored to
131
+ * the strategic roadmap every turn — not just at resume. The block is
132
+ * tagged `ephemeral` so a plan edit on turn N doesn't invalidate the
133
+ * provider's prefix cache for earlier turns.
134
+ *
135
+ * The function form lets callers bind the builder before the session
136
+ * id is known (e.g. DI containers that resolve the builder lazily) —
137
+ * the getter is called at build-time, after the session has been
138
+ * created.
139
+ */
140
+ planPath?: string | (() => string | undefined);
127
141
  }
128
142
  declare class DefaultSystemPromptBuilder implements SystemPromptBuilder {
129
143
  private readonly opts;
@@ -138,6 +152,14 @@ declare class DefaultSystemPromptBuilder implements SystemPromptBuilder {
138
152
  private skillCache?;
139
153
  constructor(opts?: DefaultSystemPromptBuilderOptions);
140
154
  build(ctx: BuildContext): Promise<TextBlock[]>;
155
+ /**
156
+ * Reads `<sessionId>.plan.json` (when configured) and produces a short
157
+ * "Active plan" block listing open items so the model is anchored to
158
+ * the strategic roadmap every turn. Reads on every `build()` so a
159
+ * plan edit (via `/plan` or the `plan` tool) reflects on the next
160
+ * turn without restarting the session.
161
+ */
162
+ private buildActivePlan;
141
163
  private buildToolUsage;
142
164
  private buildEnvironment;
143
165
  private buildMemoryAndSkills;
@@ -173,6 +195,7 @@ declare class SlashCommandRegistry {
173
195
  dispatch(line: string, ctx: Context): Promise<{
174
196
  exit?: boolean;
175
197
  message?: string;
198
+ runText?: string;
176
199
  } | null>;
177
200
  }
178
201
 
@@ -219,7 +242,17 @@ declare class DefaultPluginAPI implements PluginAPI {
219
242
  * 0.1.9: additive — `DirectorBudgetError` plus `FLEET_ROSTER` and the
220
243
  * pre-built fleet agent configs (Audit Log, Bug Hunter, Refactor Planner,
221
244
  * Security Scanner) now exported from `@wrongstack/core`.
222
- * Plugins pinning `apiVersion: "^0.1"` continue to load unchanged.
245
+ * 0.1.10: additive extended-thinking stream events, core subpath
246
+ * exports, tool output size chips on `tool.executed`. Plugin contract
247
+ * unchanged otherwise; 0.1.x range still loads cleanly.
248
+ *
249
+ * Note: the package shipped as 0.2.0, but the *plugin contract* didn't
250
+ * change in a breaking way — `SubagentError`, `subagent.tool_executed`,
251
+ * `transcriptPath`, `planTool`, `delegate`, `runText`, and Director
252
+ * sessionWriter are all additive to the surface. We deliberately keep
253
+ * the kernel API at 0.1.10 so plugins pinning `apiVersion: "^0.1"`
254
+ * keep loading. Bump to 1.0 when we stabilize and want the freedom to
255
+ * remove deprecated surfaces.
223
256
  */
224
257
  declare const KERNEL_API_VERSION = "0.1.10";
225
258
  interface LoadPluginsOptions {