@wrongstack/core 0.1.4 → 0.1.8

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.
package/dist/index.d.ts CHANGED
@@ -1,14 +1,14 @@
1
- import { j as MemoryStore, x as SkillLoader, A as Container, B as EventBus, b as Config, g as Logger, D as EventName, G as Listener } from './secret-scrubber-qU3AwEiI.js';
2
- export { H as BindOptions, C as CompactReport, a as Compactor, c as ConfigLoader, d as ConfigStore, e as ContextConfig, J as Decorator, E as ErrorHandler, K as EventLogger, N as EventMap, O as Factory, F as FeaturesConfig, I as InputReader, L as LogConfig, f as LogLevel, M as MCPServerConfig, h as MemoryEntry, i as MemoryScope, Q as Middleware, U as MiddlewareHandler, k as ModelsDevModel, l as ModelsDevPayload, m as ModelsDevProvider, n as ModelsRegistry, V as NextFn, P as PathResolver, o as PermissionDecision, p as PermissionPolicy, X as Pipeline, Y as PipelineOptions, q as PluginConfig, r as PromptOption, s as ProviderApiKey, t as ProviderConfig, R as Renderer, u as ResolvedModel, v as ResolvedProvider, w as RetryPolicy, S as SecretScrubber, y as SkillManifest, Z as Token, T as ToolsConfig, z as TrustPolicy, W as WireFamily } from './secret-scrubber-qU3AwEiI.js';
1
+ import { j as MemoryStore, H as SkillLoader, n as ModeStore, N as Container, O as EventBus, b as Config, g as Logger, Q as EventName, U as Listener } from './mode-Pjt5vMS6.js';
2
+ export { V as BindOptions, C as CompactReport, a as Compactor, c as ConfigLoader, d as ConfigStore, e as ContextConfig, D as DEFAULT_MODES, X as Decorator, E as ErrorHandler, Y as EventLogger, Z as EventMap, _ as Factory, F as FeaturesConfig, I as InputReader, L as LogConfig, f as LogLevel, M as MCPServerConfig, h as MemoryEntry, i as MemoryScope, $ as Middleware, a0 as MiddlewareHandler, k as Mode, l as ModeConfig, m as ModeManifest, o as ModelsDevModel, p as ModelsDevPayload, q as ModelsDevProvider, r as ModelsRegistry, a1 as NextFn, P as PathResolver, s as PermissionDecision, t as PermissionPolicy, a2 as Pipeline, a3 as PipelineOptions, u as PluginConfig, v as PromptOption, w as ProviderApiKey, x as ProviderConfig, R as RecoveryDecision, y as Renderer, z as ResolvedModel, A as ResolvedProvider, B as RetryPolicy, S as SecretScrubber, G as SkillEntry, J as SkillManifest, a4 as Token, T as ToolsConfig, K as TrustPolicy, W as WireFamily } from './mode-Pjt5vMS6.js';
3
3
  export { RunController, RunControllerOptions, TOKENS } from './kernel/index.js';
4
- import { c as ContentBlock, T as TextBlock, a0 as Context } from './provider-DovtyuM8.js';
5
- export { A as AgentError, C as CacheStats, a as Capabilities, b as ConfigError, a1 as ContextInit, a2 as ConversationState, E as ErrorCode, d as ErrorSeverity, e as ErrorSubsystem, I as ImageBlock, J as JSONSchema, M as Message, f as MessageRole, P as Permission, g as PluginError, h as Provider, i as ProviderError, j as ProviderErrorBody, a3 as ReadonlyConversationState, R as Request, k as Response, l as ResumedSession, a4 as RunEnv, a5 as RunOptions, S as SessionData, m as SessionError, n as SessionEvent, o as SessionMetadata, p as SessionStore, q as SessionSummary, r as SessionWriter, a6 as StateChange, a7 as StateChangeHandler, s as StopReason, t as StreamEvent, a8 as TodoItem, u as TokenCounter, v as Tool, w as ToolCallContext, x as ToolError, y as ToolFinalEvent, z as ToolProgressEvent, B as ToolResultBlock, D as ToolStreamEvent, F as ToolUseBlock, U as Usage, W as WrongStackError, G as asBlocks, H as asText, a9 as extractRunEnv, K as isAgentError, L as isConfigError, N as isImageBlock, O as isPluginError, Q as isSessionError, V as isTextBlock, X as isToolError, Y as isToolResultBlock, Z as isToolUseBlock, _ as isWrongStackError, $ as toWrongStackError, aa as wrapAsState } from './provider-DovtyuM8.js';
6
- import { h as AttachmentStore, g as AttachmentRef, A as AddAttachmentInput, F as ModeStore, Z as SlashCommand, J as PluginAPI, N as PluginPipelines, aA as ToolRegistryView, Q as ProviderRegistryView, M as MCPRegistryView, _ as SlashCommandRegistryView, aF as ToolRegistry, aG as ProviderRegistry, P as Plugin } from './session-reader-DR4u3bu9.js';
7
- export { aH as Agent, a as AgentBridge, b as AgentBridgeConfig, aI as AgentInit, aJ as AgentInput, aK as AgentPipelines, c as AggregateHealth, d as Attachment, e as AttachmentKind, f as AttachmentMeta, B as BridgeMessage, i as BridgeMessageType, j as BridgeTransport, aL as BudgetExceededError, aM as BudgetKind, aN as BudgetLimits, aO as BudgetUsage, C as ConfirmAwaiter, k as CoordinatorEvents, l as CoordinatorStatus, m as CriticalPathResult, aP as DEFAULT_MAX_ITERATIONS, D as DEFAULT_MODES, n as DEFAULT_SPEC_TEMPLATE, o as DefaultSessionReaderOptions, p as DoneCondition, E as ENCRYPTED_PREFIX, H as HealthCheck, q as HealthCheckResult, r as HealthRegistry, s as HealthStatus, t as MetricLabels, u as MetricSeries, v as MetricsSink, w as MetricsSnapshot, x as Mode, y as ModeConfig, z as ModeManifest, G as MultiAgentConfig, I as MultiAgentCoordinator, K as PluginCapabilities, L as PluginDependency, aQ as ProviderFactory, aR as RunResult, S as SecretVault, R as SessionEventType, T as SessionExportOptions, U as SessionQuery, V as SessionReader, W as SessionSearchHit, X as SessionSearchQuery, Y as SessionSummaryLite, $ as Span, a0 as SpawnResult, a1 as SpecAnalysis, a2 as SpecApiEndpoint, a3 as SpecRequirement, a4 as SpecSection, a5 as SpecSectionType, a6 as SpecStatus, a7 as SpecTemplate, a8 as SpecValidationResult, a9 as Specification, aS as SubagentBudget, aa as SubagentConfig, ab as SubagentContext, ac as SubagentRunContext, ad as SubagentRunOutcome, ae as SubagentRunner, af as TaskAssignment, ag as TaskDelegation, ah as TaskDependency, ai as TaskEdge, aj as TaskFilter, ak as TaskGraph, al as TaskNode, am as TaskPriority, an as TaskProgress, ao as TaskResult, ap as TaskSort, aq as TaskSpec, ar as TaskStatus, as as TaskType, at as ToolBatchResult, au as ToolConfirmPendingResult, av as ToolExecution, aw as ToolExecutionOutput, ax as ToolExecutorInit, ay as ToolExecutorOptions, az as ToolExecutorStrategy, aB as Tracer, aT as UserInputPayload, aC as computeTaskProgress, aU as createDefaultPipelines, aD as findCriticalPath, aE as topologicalSort } from './session-reader-DR4u3bu9.js';
8
- import { S as SystemPromptBuilder, B as BuildContext } from './system-prompt--mzZnenv.js';
4
+ import { c as ContentBlock, T as TextBlock, a0 as Context } from './provider-txgB0Oq9.js';
5
+ export { A as AgentError, C as CacheStats, a as Capabilities, b as ConfigError, a1 as ContextInit, a2 as ConversationState, E as ErrorCode, d as ErrorSeverity, e as ErrorSubsystem, I as ImageBlock, J as JSONSchema, M as Message, f as MessageRole, P as Permission, g as PluginError, h as Provider, i as ProviderError, j as ProviderErrorBody, a3 as ReadonlyConversationState, R as Request, k as Response, l as ResumedSession, a4 as RunEnv, a5 as RunOptions, S as SessionData, m as SessionError, n as SessionEvent, o as SessionMetadata, p as SessionStore, q as SessionSummary, r as SessionWriter, a6 as StateChange, a7 as StateChangeHandler, s as StopReason, t as StreamEvent, a8 as TodoItem, u as TokenCounter, v as Tool, w as ToolCallContext, x as ToolError, y as ToolFinalEvent, z as ToolProgressEvent, B as ToolResultBlock, D as ToolStreamEvent, F as ToolUseBlock, U as Usage, W as WrongStackError, G as asBlocks, H as asText, a9 as extractRunEnv, K as isAgentError, L as isConfigError, N as isImageBlock, O as isPluginError, Q as isSessionError, V as isTextBlock, X as isToolError, Y as isToolResultBlock, Z as isToolUseBlock, _ as isWrongStackError, $ as toWrongStackError, aa as wrapAsState } from './provider-txgB0Oq9.js';
6
+ import { h as AttachmentStore, g as AttachmentRef, A as AddAttachmentInput, U as SlashCommand, y as PluginAPI, G as PluginPipelines, av as ToolRegistryView, J as ProviderRegistryView, M as MCPRegistryView, V as SlashCommandRegistryView, aA as ToolRegistry, aB as ProviderRegistry, P as Plugin } from './session-reader-9sOTgmeC.js';
7
+ export { aC as Agent, a as AgentBridge, b as AgentBridgeConfig, aD as AgentInit, aE as AgentInput, aF as AgentPipelines, c as AggregateHealth, d as Attachment, e as AttachmentKind, f as AttachmentMeta, B as BridgeMessage, i as BridgeMessageType, j as BridgeTransport, aG as BudgetExceededError, aH as BudgetKind, aI as BudgetLimits, aJ as BudgetUsage, C as ConfirmAwaiter, k as CoordinatorEvents, l as CoordinatorStatus, m as CriticalPathResult, aK as DEFAULT_MAX_ITERATIONS, D as DEFAULT_SPEC_TEMPLATE, n as DefaultSessionReaderOptions, o as DoneCondition, E as ENCRYPTED_PREFIX, H as HealthCheck, p as HealthCheckResult, q as HealthRegistry, r as HealthStatus, s as MetricLabels, t as MetricSeries, u as MetricsSink, v as MetricsSnapshot, w as MultiAgentConfig, x as MultiAgentCoordinator, z as PluginCapabilities, F as PluginDependency, aL as ProviderFactory, aM as RunResult, S as SecretVault, K as SessionEventType, L as SessionExportOptions, N as SessionQuery, O as SessionReader, Q as SessionSearchHit, R as SessionSearchQuery, T as SessionSummaryLite, W as Span, X as SpawnResult, Y as SpecAnalysis, Z as SpecApiEndpoint, _ as SpecRequirement, $ as SpecSection, a0 as SpecSectionType, a1 as SpecStatus, a2 as SpecTemplate, a3 as SpecValidationResult, a4 as Specification, aN as SubagentBudget, a5 as SubagentConfig, a6 as SubagentContext, a7 as SubagentRunContext, a8 as SubagentRunOutcome, a9 as SubagentRunner, aa as TaskAssignment, ab as TaskDelegation, ac as TaskDependency, ad as TaskEdge, ae as TaskFilter, af as TaskGraph, ag as TaskNode, ah as TaskPriority, ai as TaskProgress, aj as TaskResult, ak as TaskSort, al as TaskSpec, am as TaskStatus, an as TaskType, ao as ToolBatchResult, ap as ToolConfirmPendingResult, aq as ToolExecution, ar as ToolExecutionOutput, as as ToolExecutorInit, at as ToolExecutorOptions, au as ToolExecutorStrategy, aw as Tracer, aO as UserInputPayload, ax as computeTaskProgress, aP as createDefaultPipelines, ay as findCriticalPath, az as topologicalSort } from './session-reader-9sOTgmeC.js';
8
+ import { S as SystemPromptBuilder, M as ModelCapabilities, B as BuildContext } from './system-prompt-vAB0F54-.js';
9
9
  export { AtomicWriteOptions, NewlineStyle, SafeParseResult, ToolOutputSerializerOptions, UnifiedDiffOptions, ValidationError, ValidationResult, atomicWrite, color, compileGlob, createToolOutputSerializer, detectNewlineStyle, ensureDir, estimateTextTokens, estimateToolInputTokens, estimateToolResultTokens, matchAny, matchGlob, normalizeToLf, safeParse, safeStringify, sanitizeJsonString, stripAnsi, toStyle, unifiedDiff, validateAgainstSchema } from './utils/index.js';
10
- export { W as WstackPathOptions, a as WstackPaths, p as projectHash, r as resolveWstackPaths } from './wstack-paths-D24ynAz1.js';
11
- export { AbandonedSession, AgentFactory, AgentFactoryResult, AgentRunnerOptions, AttachmentStoreOptions, AutoCompactionMiddleware, AutonomousRunner, AutonomousRunnerOptions, CompactorOptions, ConfigLoaderOptions, ConfigMigration, ConfigMigrationError, ConfigSource, ContextManagerAction, ContextManagerInput, ContextManagerResult, ContextManagerToolOptions, DEFAULT_CONFIG_MIGRATIONS, DefaultAttachmentStore, DefaultConfigLoader, DefaultConfigStore, DefaultErrorHandler, DefaultHealthRegistry, DefaultLogger, DefaultLoggerOptions, DefaultMemoryStore, DefaultModeStore, DefaultModelsRegistry, DefaultModelsRegistryOptions, DefaultMultiAgentCoordinator, DefaultPathResolver, DefaultPermissionPolicy, DefaultRetryPolicy, DefaultSecretScrubber, DefaultSecretVault, DefaultSessionReader, DefaultSessionStore, DefaultSkillLoader, DefaultTaskStore, DefaultTokenCounter, DoneCheckResult, DoneConditionChecker, GeneratedTask, HybridCompactor, InMemoryAgentBridge, InMemoryBridgeTransport, InMemoryMetricsSink, IntelligentCompactor, IntelligentCompactorOptions, LLMSelector, LLMSelectorOptions, MemoryStoreOptions, MetricsServerHandle, MetricsServerOptions, MigrationContext, MigrationResult, ModeLoaderOptions, MultiAgentCoordinatorOptions, NoopMetricsSink, NoopTracer, OTelTracer, OtlpMetricsExporterHandle, OtlpMetricsExporterOptions, OtlpTraceExporterHandle, OtlpTraceExporterOptions, PROMETHEUS_CONTENT_TYPE, PermissionPolicyOptions, PersistedQueueItem, QueueStore, RecoveryLock, RecoveryLockOptions, SecretVaultOptions, SelectiveCompactor, SelectiveCompactorOptions, SessionStoreOptions, SkillLoaderOptions, SpecDrivenDev, SpecDrivenDevOptions, SpecParser, SpecParserOptions, TaskFlow, TaskFlowEventMap, TaskFlowEventName, TaskFlowExecutionContext, TaskFlowOptions, TaskFlowPhase, TaskGenerator, TaskGeneratorOptions, TaskStore, TaskTracker, TaskTrackerOptions, TaskTransition, ToolExecutor, allServers, awsServer, blockServer, braveSearchServer, buildOtlpMetricsRequest, buildOtlpTracesRequest, classifyFamily, context7Server, contextManagerTool, createContextManagerTool, createMessage, decryptConfigSecrets, encryptConfigSecrets, everArtServer, filesystemServer, githubServer, googleMapsServer, loadProjectModes, loadUserModes, makeAgentSubagentRunner, migratePlaintextSecrets, renderPrometheus, rewriteConfigEncrypted, runConfigMigrations, sentinelServer, slackServer, startMetricsServer, startOtlpMetricsExporter, startOtlpTraceExporter, wireMetricsToEvents } from './defaults/index.js';
10
+ export { W as WstackPathOptions, a as WstackPaths, p as projectHash, r as resolveWstackPaths } from './wstack-paths-BGu2INTm.js';
11
+ export { AbandonedSession, AgentFactory, AgentFactoryResult, AgentRunnerOptions, AttachmentStoreOptions, AutoCompactionMiddleware, AutonomousRunner, AutonomousRunnerOptions, CompactorOptions, ConfigLoaderOptions, ConfigMigration, ConfigMigrationError, ConfigSource, ContextManagerAction, ContextManagerInput, ContextManagerResult, ContextManagerToolOptions, DEFAULT_CONFIG_MIGRATIONS, DEFAULT_DIRECTOR_PREAMBLE, DEFAULT_SUBAGENT_BASELINE, DefaultAttachmentStore, DefaultConfigLoader, DefaultConfigStore, DefaultErrorHandler, DefaultHealthRegistry, DefaultLogger, DefaultLoggerOptions, DefaultMemoryStore, DefaultModeStore, DefaultModelsRegistry, DefaultModelsRegistryOptions, DefaultMultiAgentCoordinator, DefaultPathResolver, DefaultPermissionPolicy, DefaultRetryPolicy, DefaultSecretScrubber, DefaultSecretVault, DefaultSessionReader, DefaultSessionStore, DefaultSkillLoader, DefaultTaskStore, DefaultTokenCounter, Director, DirectorPromptParts, DirectorSessionFactory, DirectorSessionFactoryOptions, DoneCheckResult, DoneConditionChecker, FleetBus, FleetEvent, FleetHandler, FleetUsage, FleetUsageAggregator, GeneratedTask, HybridCompactor, InMemoryAgentBridge, InMemoryBridgeTransport, InMemoryMetricsSink, IntelligentCompactor, IntelligentCompactorOptions, LLMSelector, LLMSelectorOptions, MemoryStoreOptions, MetricsServerHandle, MetricsServerOptions, MigrationContext, MigrationResult, ModeLoaderOptions, MultiAgentCoordinatorOptions, NoopMetricsSink, NoopTracer, OTelTracer, OtlpMetricsExporterHandle, OtlpMetricsExporterOptions, OtlpTraceExporterHandle, OtlpTraceExporterOptions, PROMETHEUS_CONTENT_TYPE, PermissionPolicyOptions, PersistedQueueItem, QueueStore, RecoveryLock, RecoveryLockOptions, SecretVaultOptions, SelectiveCompactor, SelectiveCompactorOptions, SessionStoreOptions, SkillLoaderOptions, SpecDrivenDev, SpecDrivenDevOptions, SpecParser, SubagentPromptParts, SubagentUsageSnapshot, TaskFlow, TaskFlowEventMap, TaskFlowEventName, TaskFlowExecutionContext, TaskFlowOptions, TaskFlowPhase, TaskGenerator, TaskGeneratorOptions, TaskStore, TaskTracker, TaskTrackerOptions, TaskTransition, ToolExecutor, allServers, awsServer, blockServer, braveSearchServer, buildOtlpMetricsRequest, buildOtlpTracesRequest, classifyFamily, composeDirectorPrompt, composeSubagentPrompt, context7Server, contextManagerTool, createContextManagerTool, createMessage, decryptConfigSecrets, encryptConfigSecrets, everArtServer, filesystemServer, githubServer, googleMapsServer, loadProjectModes, loadUserModes, makeAgentSubagentRunner, makeDirectorSessionFactory, migratePlaintextSecrets, renderPrometheus, rewriteConfigEncrypted, rosterSummaryFromConfigs, runConfigMigrations, sentinelServer, slackServer, startMetricsServer, startOtlpMetricsExporter, startOtlpTraceExporter, wireMetricsToEvents } from './defaults/index.js';
12
12
  import 'node:events';
13
13
 
14
14
  interface InputBuilderOptions {
@@ -75,16 +75,30 @@ declare class InputBuilder {
75
75
  private shouldCollapse;
76
76
  }
77
77
 
78
- 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.\n\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.\n\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.\n\n4. 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.\n\n5. Concise output. 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.\n\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.\n\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.\n\n## What you do not do\n\n- You do not lecture about software engineering principles unless asked.\n- You do not add comments to code unless they materially help or were requested.\n- You do not refactor adjacent code while fixing a bug, unless asked.\n- You do not claim work is \"production-ready\" or \"fully tested\" \u2014 the user decides that.\n- You do not apologize for failures. You report them and proceed.";
78
+ 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.";
79
79
  interface DefaultSystemPromptBuilderOptions {
80
80
  memoryStore?: MemoryStore;
81
81
  skillLoader?: SkillLoader;
82
82
  modeStore?: ModeStore;
83
+ /** Pre-resolved active mode id — shown in environment block. */
84
+ modeId?: string;
85
+ /** Pre-resolved mode prompt — avoids redundant modeStore.getActiveMode() call. */
86
+ modePrompt?: string;
87
+ /** Pre-resolved model capabilities — enables adaptive context thresholds. */
88
+ modelCapabilities?: ModelCapabilities;
83
89
  todayIso?: string;
84
90
  }
85
91
  declare class DefaultSystemPromptBuilder implements SystemPromptBuilder {
86
92
  private readonly opts;
87
- private envCache?;
93
+ /**
94
+ * Cached environment block, keyed by projectRoot. A single builder
95
+ * instance is normally reused across turns of the same agent run, but
96
+ * tests and library consumers may reuse it across runs with different
97
+ * roots; keying the cache prevents leaking the first call's project
98
+ * state into a later call against an unrelated project.
99
+ */
100
+ private envCacheByRoot;
101
+ private skillCache?;
88
102
  constructor(opts?: DefaultSystemPromptBuilderOptions);
89
103
  build(ctx: BuildContext): Promise<TextBlock[]>;
90
104
  private buildToolUsage;
@@ -164,8 +178,12 @@ declare class DefaultPluginAPI implements PluginAPI {
164
178
  * the package version: bump only when the surface visible to plugins
165
179
  * (PluginAPI, types/plugin) changes in a way that breaks existing setup
166
180
  * functions. Plugins declare `apiVersion: "^1.0"` to opt into this contract.
181
+ *
182
+ * 0.1.8: additive — Director, FleetBus, FleetUsageAggregator, and the
183
+ * director-prompts composers are now exported from `@wrongstack/core`.
184
+ * Plugins pinning `apiVersion: "^0.1"` continue to load unchanged.
167
185
  */
168
- declare const KERNEL_API_VERSION = "0.1.1";
186
+ declare const KERNEL_API_VERSION = "0.1.8";
169
187
  interface LoadPluginsOptions {
170
188
  apiFactory: (plugin: Plugin) => PluginAPI;
171
189
  log: Logger;
@@ -196,4 +214,4 @@ declare function loadPlugins(plugins: Plugin[], opts: LoadPluginsOptions): Promi
196
214
  */
197
215
  declare function unloadPlugins(loadedPlugins: Plugin[], opts: LoadPluginsOptions): Promise<void>;
198
216
 
199
- export { AddAttachmentInput, AttachmentRef, AttachmentStore, BuildContext, Config, Container, ContentBlock, Context, DefaultPluginAPI, DefaultSystemPromptBuilder, type DefaultSystemPromptBuilderOptions, EventBus, EventName, InputBuilder, type InputBuilderEvent, type InputBuilderOptions, KERNEL_API_VERSION, LAYER_1_IDENTITY, Listener, type LoadPluginsOptions, Logger, MCPRegistryView, MemoryStore, ModeStore, Plugin, PluginAPI, type PluginAPIInit, PluginPipelines, ProviderRegistry, ProviderRegistryView, SkillLoader, SlashCommand, SlashCommandRegistry, SlashCommandRegistryView, SystemPromptBuilder, TextBlock, ToolRegistry, ToolRegistryView, loadPlugins, unloadPlugins };
217
+ export { AddAttachmentInput, AttachmentRef, AttachmentStore, BuildContext, Config, Container, ContentBlock, Context, DefaultPluginAPI, DefaultSystemPromptBuilder, type DefaultSystemPromptBuilderOptions, EventBus, EventName, InputBuilder, type InputBuilderEvent, type InputBuilderOptions, KERNEL_API_VERSION, LAYER_1_IDENTITY, Listener, type LoadPluginsOptions, Logger, MCPRegistryView, MemoryStore, ModeStore, ModelCapabilities, Plugin, PluginAPI, type PluginAPIInit, PluginPipelines, ProviderRegistry, ProviderRegistryView, SkillLoader, SlashCommand, SlashCommandRegistry, SlashCommandRegistryView, SystemPromptBuilder, TextBlock, ToolRegistry, ToolRegistryView, loadPlugins, unloadPlugins };