@rowan-agent/agent 0.15.5 → 0.16.1

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/README.md CHANGED
@@ -183,10 +183,12 @@ const agentId = await runtime.createAgent({
183
183
  Each `load*()` call replaces one source atomically; use `directory` or inline
184
184
  `values`. `resourceView` controls visibility, so same-name resources can live
185
185
  in isolated sources but collide when selected together. The Runtime supplies the
186
- core `read`/`bash`/`edit`/`write`/`route` Tools itself, and its `rowan.core`
187
- source — like an Extension's `rowan.extensions` — is implicit in every view, so
188
- a Definition can select a built-in Phase without naming that source. Core names
189
- cannot be claimed by another source.
186
+ core `read`/`bash`/`edit`/`write` Tools and built-in `default`/`stop`/`compact` Phases.
187
+ Host-defined resources (including Tools and Phases registered by Extensions) replace
188
+ built-ins by name, retaining the built-in status (replaced Core Tools remain always
189
+ available without explicit Definition selection; replaced Core Phases retain their
190
+ built-in role). Reserved control names (`route` for Tools, `continue` for Phases)
191
+ cannot be claimed by host sources.
190
192
 
191
193
  Extensions are Runtime-global. Load them only during `AgentRuntime.init()` via
192
194
  `bootstrap`; after initialization they are frozen until the Runtime closes.
package/dist/index.d.ts CHANGED
@@ -206,6 +206,40 @@ type PhaseMessageManager = {
206
206
  discard(messageId: string): void;
207
207
  };
208
208
 
209
+ type ScopeRef = {
210
+ kind: "global";
211
+ } | {
212
+ kind: "team";
213
+ teamId: string;
214
+ } | {
215
+ kind: "project";
216
+ teamId: string;
217
+ projectId: string;
218
+ };
219
+ interface ExtensionStateStore {
220
+ get(key: string): Promise<JsonValue | undefined>;
221
+ set(key: string, value: JsonValue): Promise<void>;
222
+ delete(key: string): Promise<void>;
223
+ }
224
+ interface ExtensionHost {
225
+ getConfig(extensionId: string, scope?: ScopeRef): Promise<JsonObject | null> | JsonObject | null;
226
+ onConfigChanged?(listener: (extensionId: string, scope: ScopeRef) => void): (() => void) | void;
227
+ getAgentState(extensionId: string, agentId: string, key: string): Promise<JsonValue | undefined> | JsonValue | undefined;
228
+ setAgentState(extensionId: string, agentId: string, key: string, value: JsonValue): Promise<void> | void;
229
+ deleteAgentState(extensionId: string, agentId: string, key: string): Promise<void> | void;
230
+ }
231
+ type ExtensionToolContribution = {
232
+ kind: "tool";
233
+ name: string;
234
+ description: string;
235
+ };
236
+ type ExtensionCapabilityContribution = ExtensionToolContribution;
237
+ type ExtensionCapability = {
238
+ extensionId: string;
239
+ kind: "tool";
240
+ name: string;
241
+ description: string;
242
+ };
209
243
  interface SourceInfo {
210
244
  source: string;
211
245
  baseDir?: string;
@@ -235,6 +269,10 @@ interface ToolDefinition {
235
269
  description: string;
236
270
  /** Parameter schema (JSON Schema) */
237
271
  parameters: Record<string, unknown>;
272
+ /** Optional: one-line snippet shown in the system prompt tool list */
273
+ promptSnippet?: string;
274
+ /** Optional: additional guidelines appended to system prompt */
275
+ promptGuidelines?: string[];
238
276
  /** Execute the tool */
239
277
  execute: (args: unknown, context: ToolInvocationContext, signal?: AbortSignal) => Promise<ToolExecutionResult$1>;
240
278
  /** Optional: per-tool execution mode override */
@@ -318,6 +356,7 @@ type LoadExtensionsResult = {
318
356
  * Runner.loadExtensions() calls the factory and creates the full Extension object.
319
357
  */
320
358
  interface LoadedExtension {
359
+ id?: string;
321
360
  path: string;
322
361
  name: string;
323
362
  factory: ExtensionFactory;
@@ -325,6 +364,7 @@ interface LoadedExtension {
325
364
  }
326
365
  /** Extension manifest from package.json `rowan` field. */
327
366
  interface ExtensionManifest {
367
+ id?: string;
328
368
  entry?: string;
329
369
  name?: string;
330
370
  }
@@ -471,6 +511,20 @@ interface ExtensionAPI {
471
511
  on<K extends HookEventType>(eventType: K, handler: HookHandler<K>): void;
472
512
  /** Unsubscribe from a hook event. */
473
513
  off<K extends HookEventType>(eventType: K, handler: HookHandler<K>): void;
514
+ /** Extension configuration — read own layered config or listen for changes. */
515
+ config: {
516
+ /** Get the extension's own effective configuration block. */
517
+ get(scope?: ScopeRef): Promise<JsonObject | null>;
518
+ /** Listen for configuration changes for a scope. */
519
+ changed(handler: (scope: ScopeRef) => void): void;
520
+ };
521
+ /** Extension state — scoped to run (in-memory) or agent (durable). */
522
+ state: {
523
+ /** Run-scoped in-memory state; dropped when the Run ends. */
524
+ run(runId: string): ExtensionStateStore;
525
+ /** Agent-scoped durable state; persisted with the Agent record. */
526
+ agent(agentId: string): ExtensionStateStore;
527
+ };
474
528
  /** Tool capabilities — register and unregister custom tools. */
475
529
  tool: {
476
530
  /** Register a custom LLM-callable tool. */
@@ -478,6 +532,11 @@ interface ExtensionAPI {
478
532
  /** Unregister a previously registered tool by name. */
479
533
  unregister(toolName: string): void;
480
534
  };
535
+ /** Capability contributions — advertise tools or features to the host. */
536
+ capabilities: {
537
+ /** Contribute a capability to the host. Returns a disposer to remove the contribution. */
538
+ contribute(contribution: ExtensionCapabilityContribution): () => void;
539
+ };
481
540
  /** Register a model provider. */
482
541
  registerProvider(config: _rowan_agent_models.ProviderConfig): void;
483
542
  /** Unregister a model provider. */
@@ -524,6 +583,23 @@ type ExtensionDisposer = () => void | Promise<void>;
524
583
  type ExtensionFactoryResult = void | ExtensionDisposer;
525
584
  type ExtensionFactory = (api: ExtensionAPI) => ExtensionFactoryResult | Promise<ExtensionFactoryResult>;
526
585
 
586
+ declare class InMemoryExtensionHost implements ExtensionHost {
587
+ private readonly configs;
588
+ private readonly agentState;
589
+ private readonly listeners;
590
+ constructor(options?: {
591
+ configs?: Record<string, Record<string, JsonObject>>;
592
+ agentState?: Record<string, Record<string, Record<string, JsonValue>>>;
593
+ });
594
+ setConfig(extensionId: string, config: JsonObject | null, scope?: ScopeRef): void;
595
+ getConfig(extensionId: string, scope?: ScopeRef): JsonObject | null;
596
+ onConfigChanged(listener: (extensionId: string, scope: ScopeRef) => void): () => void;
597
+ notifyConfigChanged(extensionId: string, scope?: ScopeRef): void;
598
+ getAgentState(extensionId: string, agentId: string, key: string): JsonValue | undefined;
599
+ setAgentState(extensionId: string, agentId: string, key: string, value: JsonValue): void;
600
+ deleteAgentState(extensionId: string, agentId: string, key: string): void;
601
+ }
602
+
527
603
  /**
528
604
  * Extension runner — manages extension loading and hook execution.
529
605
  *
@@ -538,6 +614,7 @@ type ExtensionFactory = (api: ExtensionAPI) => ExtensionFactoryResult | Promise<
538
614
  type ExtensionRunnerOptions = {
539
615
  entryPhaseId?: string | null;
540
616
  cwd?: string;
617
+ host?: ExtensionHost;
541
618
  };
542
619
  /**
543
620
  * Manages extensions and provides hooks for the agent loop.
@@ -573,15 +650,20 @@ declare class ExtensionRunner {
573
650
  readonly hooks: HooksManager;
574
651
  readonly runtime: ExtensionRuntime;
575
652
  readonly events: EventBus;
653
+ readonly host: ExtensionHost;
576
654
  private readonly cwd;
577
655
  private readonly abortController;
578
656
  private _idle;
579
657
  private readonly extensions;
658
+ private readonly runState;
659
+ private readonly configChangeListeners;
660
+ private readonly hostUnsubscribers;
580
661
  private readonly phases;
581
662
  private _phaseCache;
582
663
  private readonly pendingProviders;
583
664
  private bound;
584
665
  private readonly errorListeners;
666
+ private readonly capabilityListeners;
585
667
  /** Current agent context — set by the agent before each phase */
586
668
  currentContext?: AgentContext;
587
669
  constructor(options?: ExtensionRunnerOptions);
@@ -628,12 +710,25 @@ declare class ExtensionRunner {
628
710
  loadExtensions(extensions: LoadedExtension[]): Promise<void>;
629
711
  /** Dispose all active Extensions in reverse activation order. */
630
712
  close(): Promise<void>;
713
+ get extensionHost(): ExtensionHost;
714
+ notifyConfigChanged(extensionId: string, scope: ScopeRef): void;
715
+ getRunState(runId: string, extensionId: string, key: string): JsonValue | undefined;
716
+ setRunState(runId: string, extensionId: string, key: string, value: JsonValue): void;
717
+ deleteRunState(runId: string, extensionId: string, key: string): void;
718
+ dropRunState(runId: string): void;
631
719
  /** Get all registered tools from all extensions. */
632
720
  getAllRegisteredTools(): RegisteredTool[];
633
721
  /**
634
722
  * Get a tool definition by name. Returns undefined if not found.
635
723
  */
636
724
  getToolDefinition(toolName: string): RegisteredTool["definition"] | undefined;
725
+ /** Get all contributed capabilities across all extensions. */
726
+ getCapabilities(): readonly ExtensionCapability[];
727
+ /**
728
+ * Subscribe to capability changes (contributions added, removed, or extensions disposed).
729
+ * Returns an unsubscribe function.
730
+ */
731
+ onCapabilitiesChanged(listener: (capabilities: readonly ExtensionCapability[]) => void): () => void;
637
732
  getPhase(name: string): Phase | undefined;
638
733
  getPhases(): Phase[];
639
734
  createPhaseRegistry(input?: {
@@ -665,18 +760,33 @@ declare class ExtensionRunner {
665
760
  output?: PhaseOutput;
666
761
  }>;
667
762
  emitBeforePrompt(phaseId: string, input: PhaseContext): Promise<PhaseContext>;
763
+ emitRunStart(event: {
764
+ runId: string;
765
+ agentId: string;
766
+ metadata: Readonly<Record<string, unknown>>;
767
+ turn: JsonObject;
768
+ }): Promise<void>;
769
+ emitRunEnd(event: {
770
+ runId: string;
771
+ agentId: string;
772
+ outcome: unknown;
773
+ }): Promise<void>;
668
774
  emitBeforeToolCall(tool: Tool, args: unknown, context?: {
669
775
  runId?: string;
670
776
  agentId?: string;
671
777
  toolCallId?: string;
672
778
  metadata?: Readonly<Record<string, unknown>>;
673
779
  answer?: unknown;
780
+ scope?: ScopeRef;
781
+ turn?: JsonObject;
674
782
  }): Promise<BeforeToolCallResult>;
675
783
  emitAfterToolCall(tool: Tool, result: ToolResult, context?: {
676
784
  runId?: string;
677
785
  agentId?: string;
678
786
  toolCallId?: string;
679
787
  metadata?: Readonly<Record<string, unknown>>;
788
+ scope?: ScopeRef;
789
+ turn?: JsonObject;
680
790
  }): Promise<ToolResult>;
681
791
  /**
682
792
  * Create an ExtensionAPI for a specific extension.
@@ -686,6 +796,8 @@ declare class ExtensionRunner {
686
796
  private createExtensionAPI;
687
797
  private registerTool;
688
798
  private unregisterTool;
799
+ private contributeCapability;
800
+ private notifyCapabilitiesChanged;
689
801
  private registerPhase;
690
802
  private registerPhaseDefinition;
691
803
  private unregisterPhase;
@@ -724,11 +836,14 @@ declare class RuntimeExtensionLifetime {
724
836
  private closed;
725
837
  constructor(options?: {
726
838
  cwd?: string;
839
+ host?: ExtensionHost;
727
840
  });
728
841
  activate(extensions: readonly LoadedExtension[]): Promise<ExtensionActivationResult>;
729
842
  tools(): readonly RegisteredTool[];
730
843
  phases(): readonly Phase[];
731
844
  get extensionRunner(): ExtensionRunner;
845
+ get extensionHost(): ExtensionHost;
846
+ dropRunState(runId: string): void;
732
847
  close(): Promise<void>;
733
848
  }
734
849
  /** Bootstrap-only Registry facade; its Extension method disappears after init. */
@@ -736,6 +851,7 @@ declare class RuntimeBootstrapRegistry extends ResourceRegistry {
736
851
  private readonly extensions;
737
852
  private readonly extensionSourceId;
738
853
  constructor(extensions?: RuntimeExtensionLifetime);
854
+ get extensionHost(): ExtensionHost;
739
855
  /** Install Rowan-owned implicit resources before any host source is read. */
740
856
  ensureCoreResources(): Promise<void>;
741
857
  loadExtensions(input: readonly LoadedExtension[] | ExtensionLoadInput): Promise<ExtensionActivationResult>;
@@ -830,6 +946,8 @@ type ToolCallContext = Readonly<{
830
946
  agentMetadata?: Metadata;
831
947
  runMetadata?: Metadata;
832
948
  toolCallId: ToolCallId;
949
+ scope?: ScopeRef;
950
+ turn?: JsonObject;
833
951
  reportProgress(progress: JsonValue): void;
834
952
  }>;
835
953
  type ToolInvocationContext = ToolCallContext & Readonly<{
@@ -841,6 +959,8 @@ type Tool$1 = Readonly<{
841
959
  core?: boolean;
842
960
  description: string;
843
961
  parameters: Type.TSchema;
962
+ promptSnippet?: string;
963
+ promptGuidelines?: readonly string[];
844
964
  execute(args: JsonValue, context: ToolInvocationContext, signal: AbortSignal): Promise<ToolExecutionResult>;
845
965
  }>;
846
966
  type ContextCandidate = Readonly<{
@@ -1244,6 +1364,7 @@ type AgentRuntimeOptions = Readonly<{
1244
1364
  configs?: ConfigProvider;
1245
1365
  concurrency?: number;
1246
1366
  bootstrap?: (registry: RuntimeBootstrapRegistry) => void | Promise<void>;
1367
+ host?: ExtensionHost;
1247
1368
  }>;
1248
1369
  type DurableConsumer = Readonly<{
1249
1370
  caughtUp: Promise<void>;
@@ -1268,6 +1389,7 @@ interface AgentRun {
1268
1389
  cancel(reason?: string): Promise<RunBoundary>;
1269
1390
  }
1270
1391
  interface AgentRuntime$1 {
1392
+ readonly host: ExtensionHost;
1271
1393
  loadAgents(input: LoadInput<AgentDefinition>): Promise<LoadResult>;
1272
1394
  loadSkills(input: LoadInput<Skill>): Promise<LoadResult>;
1273
1395
  loadPhases(input: LoadInput<Phase>): Promise<LoadResult>;
@@ -1335,6 +1457,8 @@ interface AgentRuntime$1 {
1335
1457
  signal: AbortSignal;
1336
1458
  }>): void | Promise<void>;
1337
1459
  }): Promise<DurableConsumer>;
1460
+ listCapabilities(): readonly ExtensionCapability[];
1461
+ onCapabilitiesChanged(listener: (capabilities: readonly ExtensionCapability[]) => void): () => void;
1338
1462
  close(): Promise<void>;
1339
1463
  }
1340
1464
  type ConsumerRegistration = Readonly<{
@@ -2039,6 +2163,8 @@ interface BeforeToolCallEvent {
2039
2163
  readonly toolCallId?: string;
2040
2164
  readonly metadata?: Readonly<Record<string, unknown>>;
2041
2165
  readonly answer?: unknown;
2166
+ readonly scope?: ScopeRef;
2167
+ readonly turn?: JsonObject;
2042
2168
  }
2043
2169
  interface AfterToolCallEvent {
2044
2170
  type: "after_tool_call";
@@ -2048,8 +2174,23 @@ interface AfterToolCallEvent {
2048
2174
  readonly agentId?: string;
2049
2175
  readonly toolCallId?: string;
2050
2176
  readonly metadata?: Readonly<Record<string, unknown>>;
2177
+ readonly scope?: ScopeRef;
2178
+ readonly turn?: JsonObject;
2179
+ }
2180
+ interface RunStartEvent {
2181
+ type: "run_start";
2182
+ runId: string;
2183
+ agentId: string;
2184
+ metadata: Readonly<Record<string, unknown>>;
2185
+ turn: JsonObject;
2186
+ }
2187
+ interface RunEndEvent {
2188
+ type: "run_end";
2189
+ runId: string;
2190
+ agentId: string;
2191
+ outcome: unknown;
2051
2192
  }
2052
- type HookEvent = BeforePhaseEvent | AfterPhaseEvent | BeforePromptEvent | BeforeToolCallEvent | AfterToolCallEvent;
2193
+ type HookEvent = BeforePhaseEvent | AfterPhaseEvent | BeforePromptEvent | BeforeToolCallEvent | AfterToolCallEvent | RunStartEvent | RunEndEvent;
2053
2194
  interface BeforePhaseResult {
2054
2195
  abort?: Outcome$1;
2055
2196
  skip?: {
@@ -2080,6 +2221,8 @@ interface HookResultMap {
2080
2221
  before_prompt: BeforePromptResult | undefined;
2081
2222
  before_tool_call: BeforeToolCallResult | undefined;
2082
2223
  after_tool_call: AfterToolCallResult | undefined;
2224
+ run_start: void;
2225
+ run_end: void;
2083
2226
  }
2084
2227
  type HookEventType = HookEvent["type"];
2085
2228
  type HookHandler<K extends HookEventType> = (event: Extract<HookEvent, {
@@ -2157,12 +2300,15 @@ declare class AgentRuntime implements AgentRuntime$1 {
2157
2300
  private readonly autoCompactionRuns;
2158
2301
  private readonly consumers;
2159
2302
  private readonly transientEvents;
2303
+ readonly host: ExtensionHost;
2160
2304
  private readonly resources;
2305
+ private readonly startedRuns;
2161
2306
  private heartbeat?;
2162
2307
  private pumping;
2163
2308
  private closed;
2164
2309
  private constructor();
2165
2310
  static init(options: AgentRuntimeOptions): Promise<AgentRuntime>;
2311
+ private handleRunEnd;
2166
2312
  loadAgents(input: LoadInput<AgentDefinition>): Promise<LoadResult>;
2167
2313
  loadSkills(input: LoadInput<Skill>): Promise<LoadResult>;
2168
2314
  loadPhases(input: LoadInput<Phase>): Promise<LoadResult>;
@@ -2235,6 +2381,8 @@ declare class AgentRuntime implements AgentRuntime$1 {
2235
2381
  signal: AbortSignal;
2236
2382
  }>): void | Promise<void>;
2237
2383
  }): Promise<DurableConsumer>;
2384
+ listCapabilities(): readonly ExtensionCapability[];
2385
+ onCapabilitiesChanged(listener: (capabilities: readonly ExtensionCapability[]) => void): () => void;
2238
2386
  close(): Promise<void>;
2239
2387
  snapshot(runId: RunId): Promise<RunSnapshot>;
2240
2388
  history(agentId: AgentId): Promise<readonly Message[]>;
@@ -2990,4 +3138,4 @@ declare function parseFrontmatter<T = Record<string, unknown>>(raw: string): Fro
2990
3138
 
2991
3139
  declare function createCoreTools(input?: CoreToolContext): Tool$1[];
2992
3140
 
2993
- export { type AfterToolCall, type AgentConfiguration, type AgentDefinition, type AgentId, type AgentListCursor, type AgentRecord, type AgentRun, AgentRuntime, type AgentRuntimeOptions, type AgentSummary, type AnyRuntimeError, type AssistantContent, type AssistantMessage, type BeforeToolCall, COMPACT_PHASE_ID, type ConfigProvider, type ConfigPutResult, type ConfigResolution, type ConfigToken, type ConfigurationSnapshot, type ContextCandidate, type ContextCompactionRecord, type ContextStatus, type CoreToolContext, DEFAULT_PHASE_ID, type DefinitionLayer, type DurableConsumer, type DurableRunEvent, type DurableStore, type DurableToolResult, type EntryPhaseSpec, type EventCursor, type EventId, type ExecutionCheckpoint, type ExecutionId, type ExecutionToken, type ExtensionAPI, type ExtensionActivationError, type ExtensionActivationResult, type ExtensionContribution, type ExtensionDisposer, type ExtensionFactory, type ExtensionFactoryResult, ExtensionLifetimeError, type ExtensionLifetimeErrorCode, type ExtensionLoadInput, type FrontmatterResult, type HistorySeed, type HookEvent, type HookEventType, type HookHandler, InMemoryConfigProvider, InMemoryStore, type InteractionRecord, type InvocationCatalogEntry, type InvocationSource, type JsonObject, type JsonPrimitive, type JsonValue, type LoadExtensionsResult, type LoadInput, type LoadResult, type LoadedExtension, type Message, type MessageBase, type MessageCommitted, type MessageContent, type MessageDelta, type MessageId, type MessageRevised, type MessageRevisionResult, type Metadata, type OpaqueId, type Outcome, type OwnerLease, type OwnerToken, type Page, type Phase, type PhaseContext, type PhaseContribution, type PhaseExecution, type PhaseExecutionIdentity, type PhaseInput, type PhaseInvocation, type PhaseMessageManager, type PhaseOutput, type PhaseRegistry, type PhaseRegistrySelection, type PhaseSettingsBadge, type PhaseSettingsContext, type PhaseSettingsControl, type PhaseSettingsDefinition, type PhaseSettingsItem, type PhaseSettingsOption, type PhaseSettingsProvider, type PhaseSettingsSection, type PhaseState, type PhaseStatus, type PhaseStatusState, type ResolvedResourceView, type ResourceDiagnostic, type ResourceKind, type ResourceRef, ResourceRegistry, ResourceRegistryError, type ResourceRegistryErrorCode, type ResourceSourceId, type ResourceView, type RetentionResult, type RunBoundary, type RunClaim, type RunEvent, type RunFailure, type RunId, type RunInteraction, RunInteractionBoundary, RunInteractionCancelledError, type RunInteractionDriver, type RunInteractionKind, type RunInteractionRequest, type RunInteractionState, type RunInteractionStatus, type RunListCursor, type RunRecord, type RunSnapshot, type RunState, type RunStateChanged, type RunSummary, RuntimeBootstrapRegistry, RuntimeError, type RuntimeErrorCode, type RuntimeErrorDetails, RuntimeExtensionLifetime, STOP_PHASE_ID, type Skill, SqliteStore, type TextContent, type ThinkingContent, type ThinkingDelta, type Tool$1 as Tool, type ToolCallContext, type ToolCallId, type ToolCallSnapshot, type ToolCallState, type ToolContribution, type ToolDefinition, type ToolExecutionResult, type ToolInvocationContext, type ToolMessage, type ToolMessageContent, type ToolProgress, type ToolResultContent, type ToolStateChanged, type ToolUseContent, type UserContent, type UserInput, type UserMessage, brandConfigToken, createCompactPhase, createCorePhases, createCoreTools, createDefaultPhase, createStopPhase, isConfigurationSnapshot, isRuntimeError, loadExtensionsFromPath as loadExtensions, loadPhase, loadPhaseSettings, loadPhases, loadSkill, loadSkills, parseAgentDefinition, parseFrontmatter, resolveConfigurationSnapshot };
3141
+ export { type AfterToolCall, type AgentConfiguration, type AgentDefinition, type AgentId, type AgentListCursor, type AgentRecord, type AgentRun, AgentRuntime, type AgentRuntimeOptions, type AgentSummary, type AnyRuntimeError, type AssistantContent, type AssistantMessage, type BeforeToolCall, COMPACT_PHASE_ID, type ConfigProvider, type ConfigPutResult, type ConfigResolution, type ConfigToken, type ConfigurationSnapshot, type ContextCandidate, type ContextCompactionRecord, type ContextStatus, type CoreToolContext, DEFAULT_PHASE_ID, type DefinitionLayer, type DurableConsumer, type DurableRunEvent, type DurableStore, type DurableToolResult, type EntryPhaseSpec, type EventCursor, type EventId, type ExecutionCheckpoint, type ExecutionId, type ExecutionToken, type ExtensionAPI, type ExtensionActivationError, type ExtensionActivationResult, type ExtensionCapability, type ExtensionCapabilityContribution, type ExtensionContribution, type ExtensionDisposer, type ExtensionFactory, type ExtensionFactoryResult, type ExtensionHost, ExtensionLifetimeError, type ExtensionLifetimeErrorCode, type ExtensionLoadInput, type ExtensionStateStore, type ExtensionToolContribution, type FrontmatterResult, type HistorySeed, type HookEvent, type HookEventType, type HookHandler, InMemoryConfigProvider, InMemoryExtensionHost, InMemoryStore, type InteractionRecord, type InvocationCatalogEntry, type InvocationSource, type JsonObject, type JsonPrimitive, type JsonValue, type LoadExtensionsResult, type LoadInput, type LoadResult, type LoadedExtension, type Message, type MessageBase, type MessageCommitted, type MessageContent, type MessageDelta, type MessageId, type MessageRevised, type MessageRevisionResult, type Metadata, type OpaqueId, type Outcome, type OwnerLease, type OwnerToken, type Page, type Phase, type PhaseContext, type PhaseContribution, type PhaseExecution, type PhaseExecutionIdentity, type PhaseInput, type PhaseInvocation, type PhaseMessageManager, type PhaseOutput, type PhaseRegistry, type PhaseRegistrySelection, type PhaseSettingsBadge, type PhaseSettingsContext, type PhaseSettingsControl, type PhaseSettingsDefinition, type PhaseSettingsItem, type PhaseSettingsOption, type PhaseSettingsProvider, type PhaseSettingsSection, type PhaseState, type PhaseStatus, type PhaseStatusState, type ResolvedResourceView, type ResourceDiagnostic, type ResourceKind, type ResourceRef, ResourceRegistry, ResourceRegistryError, type ResourceRegistryErrorCode, type ResourceSourceId, type ResourceView, type RetentionResult, type RunBoundary, type RunClaim, type RunEndEvent, type RunEvent, type RunFailure, type RunId, type RunInteraction, RunInteractionBoundary, RunInteractionCancelledError, type RunInteractionDriver, type RunInteractionKind, type RunInteractionRequest, type RunInteractionState, type RunInteractionStatus, type RunListCursor, type RunRecord, type RunSnapshot, type RunStartEvent, type RunState, type RunStateChanged, type RunSummary, RuntimeBootstrapRegistry, RuntimeError, type RuntimeErrorCode, type RuntimeErrorDetails, RuntimeExtensionLifetime, STOP_PHASE_ID, type ScopeRef, type Skill, SqliteStore, type TextContent, type ThinkingContent, type ThinkingDelta, type Tool$1 as Tool, type ToolCallContext, type ToolCallId, type ToolCallSnapshot, type ToolCallState, type ToolContribution, type ToolDefinition, type ToolExecutionResult, type ToolInvocationContext, type ToolMessage, type ToolMessageContent, type ToolProgress, type ToolResultContent, type ToolStateChanged, type ToolUseContent, type UserContent, type UserInput, type UserMessage, brandConfigToken, createCompactPhase, createCorePhases, createCoreTools, createDefaultPhase, createStopPhase, isConfigurationSnapshot, isRuntimeError, loadExtensionsFromPath as loadExtensions, loadPhase, loadPhaseSettings, loadPhases, loadSkill, loadSkills, parseAgentDefinition, parseFrontmatter, resolveConfigurationSnapshot };