@wrongstack/core 0.2.0 → 0.3.2

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 (57) hide show
  1. package/dist/{agent-bridge-DmBiCipY.d.ts → agent-bridge-C3DUGjSb.d.ts} +1 -1
  2. package/dist/{compactor-DSl2FK7a.d.ts → compactor-DpJBI1YH.d.ts} +8 -2
  3. package/dist/{config-DXrqb41m.d.ts → config-D2qvAxVd.d.ts} +39 -2
  4. package/dist/{context-u0bryklF.d.ts → context-IovtuTf8.d.ts} +2 -0
  5. package/dist/coordination/index.d.ts +11 -11
  6. package/dist/coordination/index.js +307 -245
  7. package/dist/coordination/index.js.map +1 -1
  8. package/dist/defaults/index.d.ts +30 -15
  9. package/dist/defaults/index.js +1077 -479
  10. package/dist/defaults/index.js.map +1 -1
  11. package/dist/{events-B6Q03pTu.d.ts → events-BHIQs4o1.d.ts} +34 -1
  12. package/dist/execution/index.d.ts +17 -14
  13. package/dist/execution/index.js +166 -18
  14. package/dist/execution/index.js.map +1 -1
  15. package/dist/extension/index.d.ts +9 -0
  16. package/dist/extension/index.js +241 -0
  17. package/dist/extension/index.js.map +1 -0
  18. package/dist/{plugin-CoYYZKdn.d.ts → index-hWNybrNZ.d.ts} +368 -11
  19. package/dist/index.d.ts +76 -26
  20. package/dist/index.js +1595 -748
  21. package/dist/index.js.map +1 -1
  22. package/dist/infrastructure/index.d.ts +6 -6
  23. package/dist/infrastructure/index.js +191 -20
  24. package/dist/infrastructure/index.js.map +1 -1
  25. package/dist/kernel/index.d.ts +12 -9
  26. package/dist/kernel/index.js +73 -7
  27. package/dist/kernel/index.js.map +1 -1
  28. package/dist/{mcp-servers-BA1Ofmfj.d.ts → mcp-servers-C2OopXOn.d.ts} +21 -5
  29. package/dist/models/index.d.ts +2 -2
  30. package/dist/models/index.js +24 -1
  31. package/dist/models/index.js.map +1 -1
  32. package/dist/{multi-agent-BDfkxL5C.d.ts → multi-agent-B9a6sflH.d.ts} +2 -2
  33. package/dist/observability/index.d.ts +2 -2
  34. package/dist/{path-resolver-Crkt8wTQ.d.ts → path-resolver--59rCou3.d.ts} +2 -2
  35. package/dist/provider-runner-B39miKRw.d.ts +36 -0
  36. package/dist/sdd/index.d.ts +3 -3
  37. package/dist/{secret-scrubber-3TLUkiCV.d.ts → secret-scrubber-CgG2tV2B.d.ts} +1 -1
  38. package/dist/{secret-scrubber-CwYliRWd.d.ts → secret-scrubber-Cuy5afaQ.d.ts} +1 -1
  39. package/dist/security/index.d.ts +3 -3
  40. package/dist/security/index.js +24 -1
  41. package/dist/security/index.js.map +1 -1
  42. package/dist/{selector-BRqzvugb.d.ts → selector-wT2fv9Fg.d.ts} +1 -1
  43. package/dist/{session-reader-C3x96CDR.d.ts → session-reader-CcPi4BQ8.d.ts} +1 -1
  44. package/dist/{skill-Bx8jxznf.d.ts → skill-C_7znCIC.d.ts} +2 -2
  45. package/dist/storage/index.d.ts +7 -6
  46. package/dist/storage/index.js +204 -14
  47. package/dist/storage/index.js.map +1 -1
  48. package/dist/{renderer-0A2ZEtca.d.ts → system-prompt-Dk1qm8ey.d.ts} +30 -2
  49. package/dist/{tool-executor-CYdZdtno.d.ts → tool-executor-HsBLGRaA.d.ts} +5 -5
  50. package/dist/types/index.d.ts +16 -16
  51. package/dist/types/index.js +230 -10
  52. package/dist/types/index.js.map +1 -1
  53. package/dist/utils/index.d.ts +23 -2
  54. package/dist/utils/index.js +117 -2
  55. package/dist/utils/index.js.map +1 -1
  56. package/package.json +5 -1
  57. package/dist/system-prompt-CG9jU5-5.d.ts +0 -31
package/dist/index.d.ts CHANGED
@@ -1,51 +1,52 @@
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';
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';
5
5
  export { RunController, RunControllerOptions, TOKENS } from './kernel/index.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';
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';
14
16
  export { D as DefaultLogger, a as DefaultLoggerOptions } from './logger-BH6AE0W9.js';
15
- export { D as DefaultPathResolver, a as DefaultTokenCounter } from './path-resolver-Crkt8wTQ.js';
17
+ export { D as DefaultPathResolver, a as DefaultTokenCounter } from './path-resolver--59rCou3.js';
16
18
  import { b as MemoryStore } from './memory-CEXuo7sz.js';
17
19
  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-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';
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';
22
23
  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-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';
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';
25
26
  export { D as DefaultModelsRegistry, a as DefaultModelsRegistryOptions, c as classifyFamily } from './models-registry-DqzwpBQy.js';
26
27
  import { c as ModeStore } from './mode-CV077NjV.js';
27
28
  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-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';
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';
30
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';
31
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';
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
+ 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
34
  export { W as WstackPathOptions, a as WstackPaths, p as projectHash, r as resolveWstackPaths } from './wstack-paths-BGu2INTm.js';
34
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';
35
36
  export { AutoApprovePermissionPolicy, DefaultPermissionPolicy, PermissionPolicyOptions } from './security/index.js';
36
37
  export { AutoCompactionMiddleware, AutonomousRunner, AutonomousRunnerOptions, DefaultSkillLoader, DoneCheckResult, DoneConditionChecker, IntelligentCompactor, IntelligentCompactorOptions, SelectiveCompactor, SelectiveCompactorOptions, SkillLoaderOptions } from './execution/index.js';
38
+ export { DefaultProviderRunner } from './defaults/index.js';
37
39
  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
40
  export { DefaultModeStore, LLMSelector, LLMSelectorOptions, ModeLoaderOptions, loadProjectModes, loadUserModes } from './models/index.js';
39
41
  export { DefaultTaskStore, GeneratedTask, SpecDrivenDev, SpecDrivenDevOptions, SpecParser, TaskFlow, TaskFlowEventMap, TaskFlowEventName, TaskFlowExecutionContext, TaskFlowOptions, TaskFlowPhase, TaskGenerator, TaskGeneratorOptions, TaskStore, TaskTracker, TaskTrackerOptions, TaskTransition } from './sdd/index.js';
40
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';
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';
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';
42
44
  import { L as Logger } from './logger-BMQgxvdy.js';
43
45
  export { a as LogLevel } from './logger-BMQgxvdy.js';
44
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';
45
47
  export { S as SecretVault } from './secret-vault-DoISxaKO.js';
46
- import './compactor-DSl2FK7a.js';
47
48
  import './path-resolver-CPRj4bFY.js';
48
- import './selector-BRqzvugb.js';
49
+ import './selector-wT2fv9Fg.js';
49
50
  import 'node:events';
50
51
 
51
52
  interface InputBuilderOptions {
@@ -138,6 +139,13 @@ interface DefaultSystemPromptBuilderOptions {
138
139
  * created.
139
140
  */
140
141
  planPath?: string | (() => string | undefined);
142
+ /**
143
+ * System prompt contributors — called on every `build()` to inject
144
+ * additional TextBlocks. Use `ExtensionRegistry.listSystemPromptContributors()`
145
+ * or pass a plain array. Contributors are called in order; a throwing
146
+ * contributor is caught and logged without aborting the build.
147
+ */
148
+ contributors?: readonly SystemPromptContributor[];
141
149
  }
142
150
  declare class DefaultSystemPromptBuilder implements SystemPromptBuilder {
143
151
  private readonly opts;
@@ -178,6 +186,10 @@ declare class SlashCommandRegistry {
178
186
  */
179
187
  register(cmd: SlashCommand, owner?: string): void;
180
188
  unregister(name: string): boolean;
189
+ /**
190
+ * Bulk-register multiple slash commands at once.
191
+ */
192
+ registerAll(cmds: SlashCommand[], owner?: string): void;
181
193
  get(name: string): SlashCommand | undefined;
182
194
  ownerOf(name: string): string | undefined;
183
195
  list(): SlashCommand[];
@@ -213,7 +225,30 @@ interface PluginAPIInit {
213
225
  providerRegistry: ProviderRegistry;
214
226
  slashCommandRegistry?: SlashCommandRegistry;
215
227
  mcpRegistry?: MCPRegistryView;
228
+ /**
229
+ * The agent's extension registry. Plugins register AgentExtension
230
+ * instances here to hook into agent lifecycle events.
231
+ */
232
+ extensions?: ExtensionRegistry;
233
+ /**
234
+ * The active session writer. Plugins append custom events here.
235
+ * When not provided, a noop writer is used.
236
+ */
237
+ sessionWriter?: SessionWriterView;
238
+ /**
239
+ * The host's metrics sink. When set, the plugin gets a scoped view
240
+ * that auto-prefixes metric names with `plugin.<pluginName>.`.
241
+ * When not provided, a noop sink is used.
242
+ */
243
+ metricsSink?: MetricsSinkView;
216
244
  config: Config;
245
+ /**
246
+ * The host's ConfigStore. Used to wire `api.onConfigChange()`.
247
+ * When not provided, `onConfigChange` is a noop.
248
+ */
249
+ configStore?: {
250
+ watch(cb: (next: unknown, prev: unknown) => void): () => void;
251
+ };
217
252
  log: Logger;
218
253
  }
219
254
  declare class DefaultPluginAPI implements PluginAPI {
@@ -224,13 +259,21 @@ declare class DefaultPluginAPI implements PluginAPI {
224
259
  readonly providers: ProviderRegistryView;
225
260
  readonly mcp: MCPRegistryView;
226
261
  readonly slashCommands: SlashCommandRegistryView;
262
+ readonly extensions: ExtensionRegistry;
263
+ readonly session: SessionWriterView;
264
+ readonly metrics: MetricsSinkView;
227
265
  readonly config: Config;
228
266
  readonly log: Logger;
267
+ private readonly configStore;
229
268
  private readonly pluginCleanupFns;
230
269
  constructor(init: PluginAPIInit);
231
270
  onEvent<K extends EventName>(event: K, handler: Listener<K>): () => void;
271
+ onPattern(pattern: string, handler: (event: string, payload: unknown) => void): () => void;
272
+ emitCustom(event: string, payload: unknown): void;
273
+ onConfigChange(handler: (next: Readonly<Config>, prev: Readonly<Config>) => void): () => void;
232
274
  /** Called by the plugin loader when uninstalling the plugin. */
233
275
  drainCleanup(): void;
276
+ registerSystemPromptContributor(c: SystemPromptContributor): () => void;
234
277
  }
235
278
 
236
279
  /**
@@ -266,6 +309,13 @@ interface LoadPluginsOptions {
266
309
  * `{ [name]: { options } }` or any flat record.
267
310
  */
268
311
  pluginOptions?: Record<string, unknown>;
312
+ /**
313
+ * When true, the loader throws a PluginError if a plugin calls an API
314
+ * method that contradicts its declared `capabilities` — instead of
315
+ * just logging a warning. Use in CI/strict deployments to enforce
316
+ * manifest honesty. Default: false (log-only, backward-compatible).
317
+ */
318
+ enforceCapabilities?: boolean;
269
319
  }
270
320
  declare function loadPlugins(plugins: Plugin[], opts: LoadPluginsOptions): Promise<{
271
321
  loaded: Plugin[];
@@ -285,4 +335,4 @@ declare function loadPlugins(plugins: Plugin[], opts: LoadPluginsOptions): Promi
285
335
  */
286
336
  declare function unloadPlugins(loadedPlugins: Plugin[], opts: LoadPluginsOptions): Promise<void>;
287
337
 
288
- 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 };
338
+ export { AddAttachmentInput, AttachmentRef, AttachmentStore, BuildContext, Config, Container, ContentBlock, Context, DefaultPluginAPI, DefaultSystemPromptBuilder, type DefaultSystemPromptBuilderOptions, EventBus, EventName, ExtensionRegistry, InputBuilder, type InputBuilderEvent, type InputBuilderOptions, KERNEL_API_VERSION, LAYER_1_IDENTITY, Listener, type LoadPluginsOptions, Logger, MCPRegistryView, MemoryStore, MetricsSinkView, ModeStore, ModelCapabilities, Plugin, PluginAPI, type PluginAPIInit, PluginPipelines, ProviderRegistry, ProviderRegistryView, SessionWriterView, SkillLoader, SlashCommand, SlashCommandRegistry, SlashCommandRegistryView, SystemPromptBuilder, SystemPromptContributor, TextBlock, ToolRegistry, ToolRegistryView, loadPlugins, unloadPlugins };