@rowan-agent/agent 0.17.0 → 0.18.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.
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as _rowan_agent_models from '@rowan-agent/models';
2
- import { LlmContentPart, ModelRef, ContentBlock, ModelConfig, StreamFn } from '@rowan-agent/models';
3
- export { ModelConfig, ModelRef, StreamFn, ThinkingLevel } from '@rowan-agent/models';
2
+ import { LlmContentPart, ModelRef, ContentBlock, ScopeRef, ToolKind, ToolAnnotations, ToolCallStatus, ToolProgress, ToolCallContent, ToolCallLocation, JsonValue as JsonValue$1, JsonObject as JsonObject$1, ModelConfig, StreamFn, ThinkingLevel, ToolCall as ToolCall$1, ToolCallUpdate } from '@rowan-agent/models';
3
+ export { ModelConfig, ModelRef, ProviderCallContext, ProviderConfig, ProviderModelConfig, ProviderStreamFn, ScopeRef, StreamFn, ThinkingLevel, ToolAnnotations, ToolCall, ToolCallContent, ToolCallLocation, ToolCallOptions, ToolCallOutcome, ToolCallStatus, ToolCallUpdate, ToolDefinitionSummary, ToolKind, ToolProgress } from '@rowan-agent/models';
4
4
  import Type from 'typebox';
5
5
 
6
6
  type AgentMessage = {
@@ -53,6 +53,8 @@ type ToolResult = {
53
53
  ok: boolean;
54
54
  content: unknown;
55
55
  error?: string;
56
+ structuredContent?: unknown;
57
+ isError?: boolean;
56
58
  };
57
59
 
58
60
  type PhaseRegistrySelection = Readonly<{
@@ -206,15 +208,25 @@ type PhaseMessageManager = {
206
208
  discard(messageId: string): void;
207
209
  };
208
210
 
209
- type ScopeRef = {
210
- kind: "global";
211
- } | {
212
- kind: "team";
213
- teamId: string;
211
+ type UiSlot = "settings" | "model-picker";
212
+ type UiContribution = {
213
+ slot: "settings";
214
+ id: string;
215
+ title: string;
216
+ description?: string;
217
+ settings: SettingsDefinition;
214
218
  } | {
215
- kind: "project";
216
- teamId: string;
217
- projectId: string;
219
+ slot: "model-picker";
220
+ id: string;
221
+ provider: string;
222
+ status?: {
223
+ kind: "ready" | "needs-setup" | "error";
224
+ message?: string;
225
+ };
226
+ actions?: {
227
+ id: string;
228
+ label: string;
229
+ }[];
218
230
  };
219
231
  interface ExtensionStateStore {
220
232
  get(key: string): Promise<JsonValue | undefined>;
@@ -227,6 +239,9 @@ interface ExtensionHost {
227
239
  getAgentState(extensionId: string, agentId: string, key: string): Promise<JsonValue | undefined> | JsonValue | undefined;
228
240
  setAgentState(extensionId: string, agentId: string, key: string, value: JsonValue): Promise<void> | void;
229
241
  deleteAgentState(extensionId: string, agentId: string, key: string): Promise<void> | void;
242
+ getGlobalState(extensionId: string, key: string): Promise<JsonValue | undefined> | JsonValue | undefined;
243
+ setGlobalState(extensionId: string, key: string, value: JsonValue): Promise<void> | void;
244
+ deleteGlobalState(extensionId: string, key: string): Promise<void> | void;
230
245
  }
231
246
  type ExtensionToolContribution = {
232
247
  kind: "tool";
@@ -248,11 +263,11 @@ interface SourceInfo {
248
263
  /** Register a Phase by directory path or Phase object; PHASE.md and direct child Skills are loaded atomically when a path is supplied. */
249
264
  type PhaseRegistration = string | Phase;
250
265
  /**
251
- * Tool definition for registering LLM-callable tools via `api.tool.register()`.
266
+ * Tool definition for registering LLM-callable tools via `api.tools.register()`.
252
267
  *
253
268
  * @example
254
269
  * ```typescript
255
- * api.tool.register({
270
+ * api.tools.register({
256
271
  * name: "search_docs",
257
272
  * description: "Search documentation",
258
273
  * parameters: { type: "object", properties: { query: { type: "string" } } },
@@ -273,24 +288,31 @@ interface ToolDefinition {
273
288
  promptSnippet?: string;
274
289
  /** Optional: additional guidelines appended to system prompt */
275
290
  promptGuidelines?: string[];
291
+ kind?: ToolKind;
292
+ annotations?: ToolAnnotations;
293
+ _meta?: JsonObject;
294
+ present?: (call: {
295
+ status: ToolCallStatus;
296
+ args: JsonValue;
297
+ progress?: ToolProgress;
298
+ result?: ToolExecutionResult;
299
+ }) => {
300
+ title?: string;
301
+ content?: ToolCallContent[];
302
+ locations?: ToolCallLocation[];
303
+ _meta?: JsonObject;
304
+ } | undefined | void | Promise<{
305
+ title?: string;
306
+ content?: ToolCallContent[];
307
+ locations?: ToolCallLocation[];
308
+ _meta?: JsonObject;
309
+ } | undefined | void>;
276
310
  /** Execute the tool */
277
- execute: (args: unknown, context: ToolInvocationContext, signal?: AbortSignal) => Promise<ToolExecutionResult$1>;
311
+ execute: (args: unknown, context: ToolInvocationContext, signal?: AbortSignal) => Promise<ToolExecutionResult>;
278
312
  /** Optional: per-tool execution mode override */
279
313
  executionMode?: "sequential" | "parallel";
280
314
  }
281
- /**
282
- * Result from tool execution.
283
- */
284
- interface ToolExecutionResult$1 {
285
- /** Content blocks to return to the LLM */
286
- content: Array<{
287
- type: string;
288
- text?: string;
289
- [key: string]: unknown;
290
- }>;
291
- /** Whether this is an error result */
292
- isError?: boolean;
293
- }
315
+
294
316
  /**
295
317
  * Registered tool with source metadata.
296
318
  */
@@ -417,7 +439,7 @@ interface EventBus {
417
439
  *
418
440
  * @example
419
441
  * ```typescript
420
- * api.on("before_tool_call", (event, ctx) => {
442
+ * api.hooks.on("before_tool_call", (event, ctx) => {
421
443
  * console.log(`cwd: ${ctx.cwd}`);
422
444
  * if (ctx.isIdle()) { ... }
423
445
  * });
@@ -502,15 +524,18 @@ interface ExtensionUtils {
502
524
  * ```
503
525
  */
504
526
  interface ExtensionAPI {
505
- /**
506
- * Subscribe to a hook event.
507
- *
508
- * @param eventType - Hook type, e.g. "before_tool_call"
509
- * @param handler - Hook handler, can return result to modify behavior
510
- */
511
- on<K extends HookEventType>(eventType: K, handler: HookHandler<K>): void;
512
- /** Unsubscribe from a hook event. */
513
- off<K extends HookEventType>(eventType: K, handler: HookHandler<K>): void;
527
+ /** Hook events — subscribe or unsubscribe. */
528
+ hooks: {
529
+ /**
530
+ * Subscribe to a hook event.
531
+ *
532
+ * @param eventType - Hook type, e.g. "before_tool_call"
533
+ * @param handler - Hook handler, can return result to modify behavior
534
+ */
535
+ on<K extends HookEventType>(eventType: K, handler: HookHandler<K>): void;
536
+ /** Unsubscribe from a hook event. */
537
+ off<K extends HookEventType>(eventType: K, handler: HookHandler<K>): void;
538
+ };
514
539
  /** Extension configuration — read own layered config or listen for changes. */
515
540
  config: {
516
541
  /** Get the extension's own effective configuration block. */
@@ -518,15 +543,17 @@ interface ExtensionAPI {
518
543
  /** Listen for configuration changes for a scope. */
519
544
  changed(handler: (scope: ScopeRef) => void): void;
520
545
  };
521
- /** Extension state — scoped to run (in-memory) or agent (durable). */
546
+ /** Extension state — scoped to run (in-memory) or agent (durable) or global (durable). */
522
547
  state: {
523
548
  /** Run-scoped in-memory state; dropped when the Run ends. */
524
549
  run(runId: string): ExtensionStateStore;
525
550
  /** Agent-scoped durable state; persisted with the Agent record. */
526
551
  agent(agentId: string): ExtensionStateStore;
552
+ /** Extension-scoped durable state; survives process restarts. */
553
+ global(): ExtensionStateStore;
527
554
  };
528
555
  /** Tool capabilities — register and unregister custom tools. */
529
- tool: {
556
+ tools: {
530
557
  /** Register a custom LLM-callable tool. */
531
558
  register(tool: ToolDefinition): void;
532
559
  /** Unregister a previously registered tool by name. */
@@ -537,20 +564,15 @@ interface ExtensionAPI {
537
564
  /** Contribute a capability to the host. Returns a disposer to remove the contribution. */
538
565
  contribute(contribution: ExtensionCapabilityContribution): () => void;
539
566
  };
540
- /** Register a model provider. */
541
- registerProvider(config: _rowan_agent_models.ProviderConfig): void;
542
- /** Unregister a model provider. */
543
- unregisterProvider(name: string): void;
544
- /** Extension manifest from package.json `rowan` field. */
545
- manifest?: ExtensionManifest;
546
- /** Utility functions. */
547
- utils: ExtensionUtils;
548
- /** Runtime context — cwd, signal, exec, message access, etc. */
549
- context: ExtensionContext;
550
- /** Shared event bus for inter-extension communication. */
551
- events: EventBus;
567
+ /** Model provider registration. */
568
+ providers: {
569
+ /** Register a model provider. Registering with an existing id replaces it. */
570
+ register(config: _rowan_agent_models.ProviderConfig): void;
571
+ /** Unregister a model provider by id. */
572
+ unregister(id: string): void;
573
+ };
552
574
  /** Phase execution capabilities — provides Phase In/Out, phase identity, phase routing, and registration. */
553
- phase: {
575
+ phases: {
554
576
  /** Register a Phase directory bundle or Phase object. */
555
577
  register(phase: PhaseRegistration): Promise<void>;
556
578
  /** Unregister a previously registered phase by name. */
@@ -569,11 +591,20 @@ interface ExtensionAPI {
569
591
  getNextPhase(): string | undefined;
570
592
  /** Get the message set by setMessage */
571
593
  getMessage(): string | undefined;
572
- /** Phase Settings contributions registered by the Phase extension. */
573
- settings: {
574
- register(provider: PhaseSettingsProvider): void;
575
- };
576
594
  };
595
+ /** Declarative UI contributions — settings or model picker decorations. */
596
+ ui: {
597
+ /** Contribute declarative UI to a host slot. Returns a disposer to remove the contribution. */
598
+ contribute(contribution: UiContribution): () => void;
599
+ };
600
+ /** Extension manifest from package.json `rowan` field. */
601
+ manifest?: ExtensionManifest;
602
+ /** Utility functions. */
603
+ utils: ExtensionUtils;
604
+ /** Runtime context — cwd, signal, exec, message access, etc. */
605
+ context: ExtensionContext;
606
+ /** Shared event bus for inter-extension communication. */
607
+ events: EventBus;
577
608
  }
578
609
  /**
579
610
  * Extension factory function.
@@ -586,10 +617,12 @@ type ExtensionFactory = (api: ExtensionAPI) => ExtensionFactoryResult | Promise<
586
617
  declare class InMemoryExtensionHost implements ExtensionHost {
587
618
  private readonly configs;
588
619
  private readonly agentState;
620
+ private readonly globalState;
589
621
  private readonly listeners;
590
622
  constructor(options?: {
591
623
  configs?: Record<string, Record<string, JsonObject>>;
592
624
  agentState?: Record<string, Record<string, Record<string, JsonValue>>>;
625
+ globalState?: Record<string, Record<string, JsonValue>>;
593
626
  });
594
627
  setConfig(extensionId: string, config: JsonObject | null, scope?: ScopeRef): void;
595
628
  getConfig(extensionId: string, scope?: ScopeRef): JsonObject | null;
@@ -598,6 +631,9 @@ declare class InMemoryExtensionHost implements ExtensionHost {
598
631
  getAgentState(extensionId: string, agentId: string, key: string): JsonValue | undefined;
599
632
  setAgentState(extensionId: string, agentId: string, key: string, value: JsonValue): void;
600
633
  deleteAgentState(extensionId: string, agentId: string, key: string): void;
634
+ getGlobalState(extensionId: string, key: string): JsonValue | undefined;
635
+ setGlobalState(extensionId: string, key: string, value: JsonValue): void;
636
+ deleteGlobalState(extensionId: string, key: string): void;
601
637
  }
602
638
 
603
639
  /**
@@ -664,6 +700,7 @@ declare class ExtensionRunner {
664
700
  private bound;
665
701
  private readonly errorListeners;
666
702
  private readonly capabilityListeners;
703
+ private readonly uiContributionListeners;
667
704
  /** Current agent context — set by the agent before each phase */
668
705
  currentContext?: AgentContext;
669
706
  constructor(options?: ExtensionRunnerOptions);
@@ -729,6 +766,18 @@ declare class ExtensionRunner {
729
766
  * Returns an unsubscribe function.
730
767
  */
731
768
  onCapabilitiesChanged(listener: (capabilities: readonly ExtensionCapability[]) => void): () => void;
769
+ /** Get all contributed UI elements across all extensions. */
770
+ getUiContributions(): readonly UiContribution[];
771
+ /**
772
+ * Subscribe to UI contribution changes (contributions added, removed, or extensions disposed).
773
+ * Returns an unsubscribe function.
774
+ */
775
+ onUiContributionsChanged(listener: (contributions: readonly UiContribution[]) => void): () => void;
776
+ triggerUiAction(event: {
777
+ contributionId: string;
778
+ actionId: string;
779
+ scope?: ScopeRef;
780
+ }): void;
732
781
  getPhase(name: string): Phase | undefined;
733
782
  getPhases(): Phase[];
734
783
  createPhaseRegistry(input?: {
@@ -798,6 +847,8 @@ declare class ExtensionRunner {
798
847
  private unregisterTool;
799
848
  private contributeCapability;
800
849
  private notifyCapabilitiesChanged;
850
+ private contributeUi;
851
+ private notifyUiContributionsChanged;
801
852
  private registerPhase;
802
853
  private registerPhaseDefinition;
803
854
  private unregisterPhase;
@@ -811,6 +862,40 @@ declare class ExtensionRunner {
811
862
  private disposeExtension;
812
863
  }
813
864
 
865
+ type ToolCallPresentationInput = Readonly<{
866
+ status: ToolCallStatus;
867
+ args: JsonValue$1;
868
+ progress?: ToolProgress;
869
+ result?: ToolExecutionResult;
870
+ }>;
871
+ type ToolCallPresentationOutput = {
872
+ title?: string;
873
+ content?: ToolCallContent[];
874
+ locations?: ToolCallLocation[];
875
+ _meta?: JsonObject$1;
876
+ };
877
+ type ToolCallMergeTarget = {
878
+ title?: string;
879
+ kind?: ToolKind;
880
+ status?: ToolCallStatus;
881
+ locations?: ToolCallLocation[];
882
+ content?: ToolCallContent[];
883
+ rawInput?: JsonValue$1;
884
+ rawOutput?: JsonValue$1;
885
+ _meta?: JsonObject$1;
886
+ };
887
+ type ToolCallMergePatch = {
888
+ title?: string;
889
+ kind?: ToolKind;
890
+ status?: ToolCallStatus;
891
+ locations?: ToolCallLocation[];
892
+ content?: ToolCallContent[];
893
+ rawInput?: JsonValue$1;
894
+ rawOutput?: JsonValue$1;
895
+ _meta?: JsonObject$1;
896
+ };
897
+ declare function mergeToolCall<T extends ToolCallMergeTarget>(target: T, patch: ToolCallMergePatch): T;
898
+
814
899
  type ExtensionContribution = LoadedExtension;
815
900
  type ExtensionLoadInput = LoadInput<ExtensionContribution>;
816
901
  type ExtensionActivationError = Readonly<{
@@ -911,6 +996,7 @@ declare function isConfigurationSnapshot(config: AgentConfiguration | Configurat
911
996
  type UserInput = string | Readonly<{
912
997
  content: UserContent;
913
998
  metadata?: Metadata;
999
+ thinkingLevel?: ThinkingLevel;
914
1000
  }>;
915
1001
  type HistorySeed = readonly Message[];
916
1002
  type ContextStatus = Readonly<{
@@ -950,11 +1036,12 @@ type ToolCallContext = Readonly<{
950
1036
  providerToolCallId?: string;
951
1037
  scope?: ScopeRef;
952
1038
  turn?: JsonObject;
953
- reportProgress(progress: JsonValue): void;
1039
+ reportProgress(progress: ToolProgress): void;
954
1040
  }>;
955
1041
  type ToolInvocationContext = ToolCallContext & Readonly<{
956
1042
  interaction: RunInteractionDriver;
957
1043
  }>;
1044
+
958
1045
  type Tool$1 = Readonly<{
959
1046
  name: string;
960
1047
  /** Rowan-owned Core Tool; Core Tools bypass Definition/Phase filtering. */
@@ -963,6 +1050,20 @@ type Tool$1 = Readonly<{
963
1050
  parameters: Type.TSchema;
964
1051
  promptSnippet?: string;
965
1052
  promptGuidelines?: readonly string[];
1053
+ kind?: ToolKind;
1054
+ annotations?: ToolAnnotations;
1055
+ _meta?: JsonObject;
1056
+ present?(call: ToolCallPresentationInput): {
1057
+ title?: string;
1058
+ content?: ToolCallContent[];
1059
+ locations?: ToolCallLocation[];
1060
+ _meta?: JsonObject;
1061
+ } | undefined | void | Promise<{
1062
+ title?: string;
1063
+ content?: ToolCallContent[];
1064
+ locations?: ToolCallLocation[];
1065
+ _meta?: JsonObject;
1066
+ } | undefined | void>;
966
1067
  execute(args: JsonValue, context: ToolInvocationContext, signal: AbortSignal): Promise<ToolExecutionResult>;
967
1068
  }>;
968
1069
  type ContextCandidate = Readonly<{
@@ -1041,6 +1142,11 @@ type ToolCallReservation = Readonly<{
1041
1142
  name: string;
1042
1143
  args: JsonValue;
1043
1144
  toolCallId?: ToolCallId;
1145
+ title?: string;
1146
+ kind?: ToolKind;
1147
+ locations?: ToolCallLocation[];
1148
+ content?: ToolCallContent[];
1149
+ _meta?: JsonObject;
1044
1150
  }>;
1045
1151
  type ToolCommit = Readonly<{
1046
1152
  run: RunRecord;
@@ -1062,6 +1168,8 @@ type RunRecord = Readonly<{
1062
1168
  revision: number;
1063
1169
  state: RunState;
1064
1170
  input: UserInput;
1171
+ scope?: ScopeRef;
1172
+ cwd?: string;
1065
1173
  initialMessageId?: MessageId;
1066
1174
  invalidatedBy?: Readonly<{
1067
1175
  messageId: MessageId;
@@ -1125,6 +1233,8 @@ type RunSnapshotBase = Readonly<{
1125
1233
  agentSequence: number;
1126
1234
  revision: number;
1127
1235
  input: UserInput;
1236
+ scope?: ScopeRef;
1237
+ cwd?: string;
1128
1238
  metadata?: Metadata;
1129
1239
  /** Effective entry Phase payload the Run started with (defaults filled). */
1130
1240
  phasePayload?: JsonValue;
@@ -1139,6 +1249,7 @@ type RunSnapshotBase = Readonly<{
1139
1249
  type RunSnapshot = RunSnapshotBase & (Readonly<{
1140
1250
  state: "queued" | "running";
1141
1251
  currentPhaseId?: string;
1252
+ interactions?: readonly RunInteraction[];
1142
1253
  }> | Readonly<{
1143
1254
  state: "input_required";
1144
1255
  interactions: readonly RunInteraction[];
@@ -1235,6 +1346,8 @@ interface OwnedStore {
1235
1346
  agentId: AgentId;
1236
1347
  input: UserInput;
1237
1348
  metadata?: Metadata;
1349
+ scope?: ScopeRef;
1350
+ cwd?: string;
1238
1351
  phasePayload?: JsonValue;
1239
1352
  entryPhases?: readonly EntryPhaseSpec[];
1240
1353
  pinnedConfigToken?: ConfigToken;
@@ -1300,6 +1413,11 @@ interface OwnedStore {
1300
1413
  args: JsonValue;
1301
1414
  toolCallId?: ToolCallId;
1302
1415
  providerToolCallId?: string;
1416
+ title?: string;
1417
+ kind?: ToolKind;
1418
+ locations?: ToolCallLocation[];
1419
+ content?: ToolCallContent[];
1420
+ _meta?: JsonObject;
1303
1421
  }): Promise<ToolCommit>;
1304
1422
  reserveToolCalls(input: {
1305
1423
  runId: RunId;
@@ -1315,6 +1433,11 @@ interface OwnedStore {
1315
1433
  execution: ExecutionToken;
1316
1434
  expectedRevision: number;
1317
1435
  toolCallId: ToolCallId;
1436
+ title?: string;
1437
+ kind?: ToolKind;
1438
+ locations?: ToolCallLocation[];
1439
+ content?: ToolCallContent[];
1440
+ _meta?: JsonObject;
1318
1441
  }): Promise<ToolCommit>;
1319
1442
  suspendToolCall(input: {
1320
1443
  runId: RunId;
@@ -1330,6 +1453,12 @@ interface OwnedStore {
1330
1453
  result: ToolExecutionResult;
1331
1454
  state: "completed" | "failed" | "indeterminate";
1332
1455
  reason?: string;
1456
+ title?: string;
1457
+ kind?: ToolKind;
1458
+ content?: ToolCallContent[];
1459
+ locations?: ToolCallLocation[];
1460
+ rawOutput?: JsonValue;
1461
+ _meta?: JsonObject;
1333
1462
  }): Promise<ToolCommit>;
1334
1463
  cancelRun(input: {
1335
1464
  runId: RunId;
@@ -1337,6 +1466,12 @@ interface OwnedStore {
1337
1466
  reason?: string;
1338
1467
  output?: AssistantMessage;
1339
1468
  }): Promise<RunRecord>;
1469
+ recordToolCall(input: {
1470
+ runId: RunId;
1471
+ execution?: ExecutionToken;
1472
+ update: ToolCall$1 | ToolCallUpdate;
1473
+ external?: boolean;
1474
+ }): Promise<DurableRunEvent>;
1340
1475
  snapshotRun(runId: RunId): Promise<RunSnapshot>;
1341
1476
  history(agentId: AgentId): Promise<readonly Message[]>;
1342
1477
  listAgents(): Promise<readonly AgentRecord[]>;
@@ -1428,6 +1563,8 @@ interface AgentRuntime$1 {
1428
1563
  start(agentId: AgentId, input: UserInput, options: {
1429
1564
  idempotencyKey: string;
1430
1565
  metadata?: Metadata;
1566
+ scope?: ScopeRef;
1567
+ cwd?: string;
1431
1568
  phasePayload?: JsonValue;
1432
1569
  entryPhases?: ReadonlyArray<EntryPhaseSpec>;
1433
1570
  }): Promise<AgentRun>;
@@ -1463,6 +1600,13 @@ interface AgentRuntime$1 {
1463
1600
  }): Promise<DurableConsumer>;
1464
1601
  listCapabilities(): readonly ExtensionCapability[];
1465
1602
  onCapabilitiesChanged(listener: (capabilities: readonly ExtensionCapability[]) => void): () => void;
1603
+ listUiContributions(): readonly UiContribution[];
1604
+ onUiContributionsChanged(listener: (contributions: readonly UiContribution[]) => void): () => void;
1605
+ triggerUiAction(event: {
1606
+ contributionId: string;
1607
+ actionId: string;
1608
+ scope?: ScopeRef;
1609
+ }): void;
1466
1610
  close(): Promise<void>;
1467
1611
  }
1468
1612
  type ConsumerRegistration = Readonly<{
@@ -1565,7 +1709,7 @@ type RunInteractionDriver = Readonly<{
1565
1709
  }>;
1566
1710
  declare class RunInteractionCancelledError extends Error {
1567
1711
  readonly code: "run_interaction_cancelled";
1568
- constructor();
1712
+ constructor(message?: string);
1569
1713
  }
1570
1714
  declare class RunInteractionBoundary extends Error {
1571
1715
  readonly state: ExecutionState;
@@ -1620,10 +1764,20 @@ type ToolUseContent = Readonly<{
1620
1764
  type ToolExecutionResult = Readonly<{
1621
1765
  ok: true;
1622
1766
  content: JsonValue;
1767
+ structuredContent?: JsonValue;
1768
+ isError?: boolean;
1623
1769
  }> | Readonly<{
1624
1770
  ok: false;
1625
1771
  content: JsonValue;
1626
1772
  error: string;
1773
+ structuredContent?: JsonValue;
1774
+ isError?: boolean;
1775
+ }> | Readonly<{
1776
+ content: readonly ContentBlock[];
1777
+ structuredContent?: JsonValue;
1778
+ isError?: boolean;
1779
+ ok?: boolean;
1780
+ error?: string;
1627
1781
  }>;
1628
1782
  type DurableToolResult = Readonly<{
1629
1783
  toolCallId: ToolCallId;
@@ -1729,43 +1883,24 @@ type QueuedRunFailure = Extract<RunFailure, {
1729
1883
  type RunningRunFailure = Extract<RunFailure, {
1730
1884
  code: "runtime_interrupted" | "tool_indeterminate" | "execution_failed";
1731
1885
  }>;
1732
- type ToolCallState = "pending" | "running" | "completed" | "failed" | "indeterminate";
1733
- type ToolCallSnapshotBase = Readonly<{
1886
+ type ToolCallState = ToolCallStatus;
1887
+ type ToolCallSnapshot = ToolCall$1 & Readonly<{
1734
1888
  id: ToolCallId;
1735
- providerToolCallId: string;
1736
- agentId: AgentId;
1737
- runId: RunId;
1738
- executionId: ExecutionId;
1739
- requestMessageId: MessageId;
1740
- name: string;
1741
- args: JsonValue;
1742
- createdAt: string;
1743
- updatedAt: string;
1889
+ providerToolCallId?: string;
1890
+ agentId?: AgentId;
1891
+ runId?: RunId;
1892
+ executionId?: ExecutionId;
1893
+ requestMessageId?: MessageId;
1894
+ name?: string;
1895
+ args?: JsonValue;
1896
+ state?: ToolCallStatus;
1897
+ result?: DurableToolResult;
1898
+ resultMessageId?: MessageId;
1899
+ reason?: string;
1900
+ external?: boolean;
1901
+ createdAt?: string;
1902
+ updatedAt?: string;
1744
1903
  }>;
1745
- type ToolCallSnapshot = ToolCallSnapshotBase & (Readonly<{
1746
- state: "pending";
1747
- }> | Readonly<{
1748
- state: "running";
1749
- }> | Readonly<{
1750
- state: "completed";
1751
- result: DurableToolResult & Readonly<{
1752
- ok: true;
1753
- }>;
1754
- resultMessageId: MessageId;
1755
- }> | Readonly<{
1756
- state: "failed";
1757
- result: DurableToolResult & Readonly<{
1758
- ok: false;
1759
- }>;
1760
- resultMessageId: MessageId;
1761
- }> | Readonly<{
1762
- state: "indeterminate";
1763
- result: DurableToolResult & Readonly<{
1764
- ok: false;
1765
- }>;
1766
- resultMessageId: MessageId;
1767
- reason: string;
1768
- }>);
1769
1904
  type DurableEventBase = Readonly<{
1770
1905
  id: EventId;
1771
1906
  schemaVersion: 1;
@@ -1837,80 +1972,29 @@ type RunStateChanged = DurableEventBase & (Readonly<{
1837
1972
  to: "cancelled";
1838
1973
  reason?: string;
1839
1974
  }>);
1840
- type ToolStateChanged = DurableEventBase & (Readonly<{
1841
- kind: "tool_state_changed";
1842
- transition: Readonly<{
1843
- from: null;
1844
- to: "pending";
1845
- }>;
1846
- toolCall: Extract<ToolCallSnapshot, {
1847
- state: "pending";
1848
- }>;
1849
- }> | Readonly<{
1850
- kind: "tool_state_changed";
1851
- transition: Readonly<{
1852
- from: "pending";
1853
- to: "running";
1854
- }>;
1855
- toolCall: Extract<ToolCallSnapshot, {
1856
- state: "running";
1857
- }>;
1858
- }> | Readonly<{
1859
- kind: "tool_state_changed";
1860
- transition: Readonly<{
1861
- from: "pending";
1862
- to: "failed";
1863
- }>;
1864
- toolCall: Extract<ToolCallSnapshot, {
1865
- state: "failed";
1866
- }>;
1867
- }> | Readonly<{
1868
- kind: "tool_state_changed";
1869
- transition: Readonly<{
1870
- from: "running";
1871
- to: "pending";
1872
- }>;
1873
- toolCall: Extract<ToolCallSnapshot, {
1874
- state: "pending";
1875
- }>;
1876
- }> | Readonly<{
1877
- kind: "tool_state_changed";
1878
- transition: Readonly<{
1879
- from: "running";
1880
- to: "pending";
1881
- }>;
1882
- toolCall: Extract<ToolCallSnapshot, {
1883
- state: "pending";
1884
- }>;
1885
- }> | Readonly<{
1886
- kind: "tool_state_changed";
1887
- transition: Readonly<{
1888
- from: "running";
1889
- to: "completed";
1890
- }>;
1891
- toolCall: Extract<ToolCallSnapshot, {
1892
- state: "completed";
1893
- }>;
1894
- }> | Readonly<{
1975
+ type ToolStateChanged = (DurableEventBase & Readonly<{
1895
1976
  kind: "tool_state_changed";
1896
1977
  transition: Readonly<{
1897
- from: "running";
1898
- to: "failed";
1978
+ from: ToolCallStatus | null;
1979
+ to: ToolCallStatus;
1899
1980
  }>;
1900
- toolCall: Extract<ToolCallSnapshot, {
1901
- state: "failed";
1902
- }>;
1903
- }> | Readonly<{
1981
+ toolCall: ToolCall$1;
1982
+ external?: boolean;
1983
+ }>) | Readonly<{
1904
1984
  kind: "tool_state_changed";
1985
+ durability: "transient";
1986
+ runId: RunId;
1987
+ executionId?: ExecutionId;
1905
1988
  transition: Readonly<{
1906
- from: "running";
1907
- to: "indeterminate";
1908
- }>;
1909
- toolCall: Extract<ToolCallSnapshot, {
1910
- state: "indeterminate";
1989
+ from: ToolCallStatus | null;
1990
+ to: ToolCallStatus;
1911
1991
  }>;
1912
- }>);
1913
- type DurableRunEvent = PhaseEntered | MessageCommitted | MessageRevised | RunStateChanged | ToolStateChanged;
1992
+ toolCall: ToolCall$1 | ToolCallUpdate;
1993
+ external?: boolean;
1994
+ }>;
1995
+ type DurableRunEvent = PhaseEntered | MessageCommitted | MessageRevised | RunStateChanged | Extract<ToolStateChanged, {
1996
+ durability: "durable";
1997
+ }>;
1914
1998
  type MessageDelta = Readonly<{
1915
1999
  kind: "message_delta";
1916
2000
  durability: "transient";
@@ -1941,14 +2025,6 @@ type ToolCallDelta = Readonly<{
1941
2025
  arguments: string;
1942
2026
  args: JsonValue | undefined;
1943
2027
  }>;
1944
- type ToolProgress = Readonly<{
1945
- kind: "tool_progress";
1946
- durability: "transient";
1947
- runId: RunId;
1948
- executionId: ExecutionId;
1949
- toolCallId: ToolCallId;
1950
- progress: JsonValue;
1951
- }>;
1952
2028
  type PhaseStatusEvent = Readonly<{
1953
2029
  kind: "phase_status";
1954
2030
  durability: "transient";
@@ -1967,7 +2043,9 @@ type ModelRetry = Readonly<{
1967
2043
  delayMs: number;
1968
2044
  error: string;
1969
2045
  }>;
1970
- type RunEvent = DurableRunEvent | MessageDelta | ThinkingDelta | ToolCallDelta | ToolProgress | PhaseStatusEvent | ModelRetry;
2046
+ type RunEvent = DurableRunEvent | MessageDelta | ThinkingDelta | ToolCallDelta | PhaseStatusEvent | ModelRetry | Extract<ToolStateChanged, {
2047
+ durability: "transient";
2048
+ }>;
1971
2049
 
1972
2050
  type PhaseStatusState = "running" | "completed";
1973
2051
  /** Normalized status event exposed to Runtime consumers. */
@@ -2029,6 +2107,8 @@ type PhaseExecutionIdentity = Readonly<{
2029
2107
  /** Opaque metadata captured at the durable boundary; Rowan does not decode it. */
2030
2108
  agentMetadata?: Readonly<Record<string, unknown>>;
2031
2109
  runMetadata?: Readonly<Record<string, unknown>>;
2110
+ scope?: _rowan_agent_models.ScopeRef;
2111
+ cwd?: string;
2032
2112
  }>;
2033
2113
  /** Everything a phase needs to execute */
2034
2114
  interface PhaseContext {
@@ -2051,24 +2131,24 @@ interface PhaseContext {
2051
2131
  }
2052
2132
  /** JSON-safe structural defaults declared by a Phase's `input` mapping. */
2053
2133
  type PhaseInput = Readonly<Record<string, JsonValue>>;
2054
- /** JSON-safe option metadata exposed by a Phase to a host Settings surface. */
2055
- interface PhaseSettingsOption {
2134
+ /** JSON-safe option metadata exposed to a host Settings surface. */
2135
+ interface SettingsOption {
2056
2136
  value: string;
2057
2137
  label: string;
2058
2138
  description?: string;
2059
2139
  disabled?: boolean;
2060
2140
  }
2061
- interface PhaseSettingsBadge {
2141
+ interface SettingsBadge {
2062
2142
  label: string;
2063
2143
  tone?: "neutral" | "success" | "review" | "danger";
2064
2144
  }
2065
- interface PhaseSettingsItem {
2145
+ interface SettingsItem {
2066
2146
  id: string;
2067
2147
  title: string;
2068
2148
  description?: string;
2069
- badges?: readonly PhaseSettingsBadge[];
2149
+ badges?: readonly SettingsBadge[];
2070
2150
  }
2071
- type PhaseSettingsControl = {
2151
+ type SettingsControl = {
2072
2152
  type: "boolean";
2073
2153
  path: string;
2074
2154
  label: string;
@@ -2088,7 +2168,7 @@ type PhaseSettingsControl = {
2088
2168
  path: string;
2089
2169
  label: string;
2090
2170
  description?: string;
2091
- options: readonly PhaseSettingsOption[];
2171
+ options: readonly SettingsOption[];
2092
2172
  } | {
2093
2173
  type: "text";
2094
2174
  path: string;
@@ -2102,32 +2182,26 @@ type PhaseSettingsControl = {
2102
2182
  path: string;
2103
2183
  label: string;
2104
2184
  description?: string;
2105
- items: readonly PhaseSettingsItem[];
2106
- fields: readonly PhaseSettingsControl[];
2185
+ items: readonly SettingsItem[];
2186
+ fields: readonly SettingsControl[];
2107
2187
  add?: {
2108
2188
  label: string;
2109
2189
  idLabel?: string;
2110
- fields: readonly PhaseSettingsControl[];
2190
+ fields: readonly SettingsControl[];
2111
2191
  };
2112
2192
  removeLabel?: string;
2113
2193
  };
2114
- interface PhaseSettingsSection {
2194
+ interface SettingsSection {
2115
2195
  id: string;
2116
2196
  title: string;
2117
2197
  description?: string;
2118
- controls: readonly PhaseSettingsControl[];
2198
+ controls: readonly SettingsControl[];
2119
2199
  }
2120
- /** Declarative, host-neutral Settings surface contributed by a Phase. */
2121
- interface PhaseSettingsDefinition {
2200
+ /** Declarative, host-neutral Settings surface. */
2201
+ interface SettingsDefinition {
2122
2202
  description?: string;
2123
- sections: readonly PhaseSettingsSection[];
2124
- }
2125
- /** Host context is intentionally opaque beyond the effective configuration. */
2126
- interface PhaseSettingsContext {
2127
- configuration: Readonly<Record<string, unknown>>;
2128
- metadata?: Readonly<Record<string, unknown>>;
2203
+ sections: readonly SettingsSection[];
2129
2204
  }
2130
- type PhaseSettingsProvider = (context: PhaseSettingsContext) => PhaseSettingsDefinition | Promise<PhaseSettingsDefinition>;
2131
2205
  /**
2132
2206
  * Loaded Phase object
2133
2207
  */
@@ -2293,6 +2367,7 @@ type Tool<TArgs = unknown> = {
2293
2367
  promptGuidelines?: string[];
2294
2368
  /** Whether this tool can run concurrently with others. Default: "parallel". */
2295
2369
  executionMode?: ToolExecutionMode;
2370
+ _meta?: JsonObject$1;
2296
2371
  execute(args: TArgs, context: ToolContext, signal?: AbortSignal): Promise<ToolResult>;
2297
2372
  };
2298
2373
  /** Context snapshot passed into the low-level agent loop. */
@@ -2307,6 +2382,7 @@ type AgentContext = {
2307
2382
  skills: Skill[];
2308
2383
  /** Custom phases for this run. Agent normalizes this with the built-in default phase. */
2309
2384
  phases?: PhaseRegistry;
2385
+ cwd?: string;
2310
2386
  };
2311
2387
 
2312
2388
  /**
@@ -2339,6 +2415,7 @@ declare class AgentRuntime implements AgentRuntime$1 {
2339
2415
  readonly host: ExtensionHost;
2340
2416
  private readonly resources;
2341
2417
  private readonly startedRuns;
2418
+ private readonly liveInteractions;
2342
2419
  private heartbeat?;
2343
2420
  private pumping;
2344
2421
  private closed;
@@ -2394,6 +2471,8 @@ declare class AgentRuntime implements AgentRuntime$1 {
2394
2471
  start(agentId: AgentId, input: UserInput, options: {
2395
2472
  idempotencyKey: string;
2396
2473
  metadata?: Metadata;
2474
+ scope?: ScopeRef;
2475
+ cwd?: string;
2397
2476
  phasePayload?: JsonValue;
2398
2477
  entryPhases?: ReadonlyArray<EntryPhaseSpec>;
2399
2478
  }): Promise<AgentRun>;
@@ -2420,6 +2499,14 @@ declare class AgentRuntime implements AgentRuntime$1 {
2420
2499
  }): Promise<DurableConsumer>;
2421
2500
  listCapabilities(): readonly ExtensionCapability[];
2422
2501
  onCapabilitiesChanged(listener: (capabilities: readonly ExtensionCapability[]) => void): () => void;
2502
+ listUiContributions(): readonly UiContribution[];
2503
+ onUiContributionsChanged(listener: (contributions: readonly UiContribution[]) => void): () => void;
2504
+ triggerUiAction(event: {
2505
+ contributionId: string;
2506
+ actionId: string;
2507
+ scope?: ScopeRef;
2508
+ }): void;
2509
+ private liveInteract;
2423
2510
  close(): Promise<void>;
2424
2511
  snapshot(runId: RunId): Promise<RunSnapshot>;
2425
2512
  history(agentId: AgentId): Promise<readonly Message[]>;
@@ -2435,6 +2522,7 @@ declare class AgentRuntime implements AgentRuntime$1 {
2435
2522
  private resolveContextWindow;
2436
2523
  private executeTool;
2437
2524
  private executeToolBatch;
2525
+ private executeAndCommitTool;
2438
2526
  private foldToolInteractionRecords;
2439
2527
  private requireAgent;
2440
2528
  private archiveDirFor;
@@ -2460,14 +2548,24 @@ type StoredAgent = Mutable<AgentRecord>;
2460
2548
  type StoredRun = Mutable<RunRecord>;
2461
2549
  type StoredToolCall = {
2462
2550
  id: ToolCallId;
2463
- providerToolCallId: string;
2551
+ providerToolCallId?: string;
2464
2552
  agentId: AgentId;
2465
2553
  runId: RunId;
2466
- executionId: ExecutionId;
2467
- requestMessageId: MessageId;
2468
- name: string;
2469
- args: JsonValue;
2470
- state: ToolCallState;
2554
+ executionId?: ExecutionId;
2555
+ requestMessageId?: MessageId;
2556
+ name?: string;
2557
+ args?: JsonValue;
2558
+ state?: ToolCallState;
2559
+ toolCallId: string;
2560
+ title: string;
2561
+ kind: ToolKind;
2562
+ status: ToolCallStatus;
2563
+ content?: ToolCallContent[];
2564
+ locations?: ToolCallLocation[];
2565
+ rawInput?: JsonValue;
2566
+ rawOutput?: JsonValue;
2567
+ _meta?: JsonObject;
2568
+ external?: boolean;
2471
2569
  result?: DurableToolResult;
2472
2570
  resultMessageId?: MessageId;
2473
2571
  reason?: string;
@@ -2586,6 +2684,8 @@ declare class InMemoryStore implements DurableStore {
2586
2684
  agentId: AgentId;
2587
2685
  input: UserInput;
2588
2686
  metadata?: Metadata;
2687
+ scope?: ScopeRef;
2688
+ cwd?: string;
2589
2689
  phasePayload?: JsonValue;
2590
2690
  entryPhases?: readonly EntryPhaseSpec[];
2591
2691
  pinnedConfigToken?: ConfigToken;
@@ -2661,6 +2761,11 @@ declare class InMemoryStore implements DurableStore {
2661
2761
  execution: ExecutionToken;
2662
2762
  expectedRevision: number;
2663
2763
  toolCallId: ToolCallId;
2764
+ title?: string;
2765
+ kind?: ToolKind;
2766
+ locations?: ToolCallLocation[];
2767
+ content?: ToolCallContent[];
2768
+ _meta?: JsonObject;
2664
2769
  }): ToolCommit;
2665
2770
  suspendToolCall(lease: OwnerLease, input: {
2666
2771
  runId: RunId;
@@ -2676,6 +2781,12 @@ declare class InMemoryStore implements DurableStore {
2676
2781
  result: ToolExecutionResult;
2677
2782
  state: "completed" | "failed" | "indeterminate";
2678
2783
  reason?: string;
2784
+ title?: string;
2785
+ kind?: ToolKind;
2786
+ content?: ToolCallContent[];
2787
+ locations?: ToolCallLocation[];
2788
+ rawOutput?: JsonValue;
2789
+ _meta?: JsonObject;
2679
2790
  }): ToolCommit;
2680
2791
  commitOutcome(lease: OwnerLease, input: {
2681
2792
  runId: RunId;
@@ -2691,6 +2802,12 @@ declare class InMemoryStore implements DurableStore {
2691
2802
  reason?: string;
2692
2803
  output?: AssistantMessage;
2693
2804
  }): RunRecord;
2805
+ recordToolCall(lease: OwnerLease, input: {
2806
+ runId: RunId;
2807
+ execution?: ExecutionToken;
2808
+ update: ToolCall$1 | ToolCallUpdate;
2809
+ external?: boolean;
2810
+ }): DurableRunEvent;
2694
2811
  snapshotRun(lease: OwnerLease, runId: RunId): RunSnapshot;
2695
2812
  listAgents(lease: OwnerLease): readonly AgentRecord[];
2696
2813
  listRuns(lease: OwnerLease, input?: {
@@ -2817,6 +2934,8 @@ declare class SqliteStore implements DurableStore {
2817
2934
  agentId: AgentId;
2818
2935
  input: UserInput;
2819
2936
  metadata?: Metadata;
2937
+ scope?: ScopeRef;
2938
+ cwd?: string;
2820
2939
  phasePayload?: JsonValue;
2821
2940
  entryPhases?: readonly EntryPhaseSpec[];
2822
2941
  pinnedConfigToken?: ConfigToken;
@@ -2884,18 +3003,18 @@ declare class SqliteStore implements DurableStore {
2884
3003
  args: JsonValue;
2885
3004
  toolCallId?: ToolCallId;
2886
3005
  providerToolCallId?: string;
3006
+ title?: string;
3007
+ kind?: ToolKind;
3008
+ locations?: ToolCallLocation[];
3009
+ content?: ToolCallContent[];
3010
+ _meta?: JsonObject;
2887
3011
  }): Promise<ToolCommit>;
2888
3012
  reserveToolCalls(lease: OwnerLease, input: {
2889
3013
  runId: RunId;
2890
3014
  execution: ExecutionToken;
2891
3015
  expectedRevision: number;
2892
3016
  requestMessageId: MessageId;
2893
- calls: readonly Readonly<{
2894
- providerToolCallId: string;
2895
- name: string;
2896
- args: JsonValue;
2897
- toolCallId?: ToolCallId;
2898
- }>[];
3017
+ calls: readonly ToolCallReservation[];
2899
3018
  contentBlocks?: readonly ContentBlock[];
2900
3019
  }): Promise<ToolBatchCommit>;
2901
3020
  startToolCall(lease: OwnerLease, input: {
@@ -2903,6 +3022,11 @@ declare class SqliteStore implements DurableStore {
2903
3022
  execution: ExecutionToken;
2904
3023
  expectedRevision: number;
2905
3024
  toolCallId: ToolCallId;
3025
+ title?: string;
3026
+ kind?: ToolKind;
3027
+ locations?: ToolCallLocation[];
3028
+ content?: ToolCallContent[];
3029
+ _meta?: JsonObject;
2906
3030
  }): Promise<ToolCommit>;
2907
3031
  suspendToolCall(lease: OwnerLease, input: {
2908
3032
  runId: RunId;
@@ -2918,6 +3042,12 @@ declare class SqliteStore implements DurableStore {
2918
3042
  result: ToolExecutionResult;
2919
3043
  state: "completed" | "failed" | "indeterminate";
2920
3044
  reason?: string;
3045
+ title?: string;
3046
+ kind?: ToolKind;
3047
+ content?: ToolCallContent[];
3048
+ locations?: ToolCallLocation[];
3049
+ rawOutput?: JsonValue;
3050
+ _meta?: JsonObject;
2921
3051
  }): Promise<ToolCommit>;
2922
3052
  cancelRun(lease: OwnerLease, input: {
2923
3053
  runId: RunId;
@@ -2925,6 +3055,12 @@ declare class SqliteStore implements DurableStore {
2925
3055
  reason?: string;
2926
3056
  output?: AssistantMessage;
2927
3057
  }): Promise<RunRecord>;
3058
+ recordToolCall(lease: OwnerLease, input: {
3059
+ runId: RunId;
3060
+ execution?: ExecutionToken;
3061
+ update: ToolCall$1 | ToolCallUpdate;
3062
+ external?: boolean;
3063
+ }): Promise<DurableRunEvent>;
2928
3064
  snapshotRun(lease: OwnerLease, runId: RunId): Promise<RunSnapshot>;
2929
3065
  history(lease: OwnerLease, agentId: AgentId): Promise<readonly Message[]>;
2930
3066
  listAgents(lease: OwnerLease): Promise<readonly AgentRecord[]>;
@@ -3117,12 +3253,6 @@ declare function loadSkills(targetPath: string): Promise<Skill[]>;
3117
3253
  * If a directory is provided, the loader reads its PHASE.md.
3118
3254
  */
3119
3255
  declare function loadPhase(targetPath: string): Promise<Phase>;
3120
- /**
3121
- * Collect and evaluate the Settings provider registered through the Phase's
3122
- * ExtensionAPI namespace. Settings discovery never reads a direct module
3123
- * export; the Phase contributes through `api.phase.settings.register()`.
3124
- */
3125
- declare function loadPhaseSettings(phase: Phase, context: PhaseSettingsContext): Promise<PhaseSettingsDefinition | undefined>;
3126
3256
  /**
3127
3257
  * Load all phases from the target directory.
3128
3258
  *
@@ -3176,4 +3306,4 @@ declare function parseFrontmatter<T = Record<string, unknown>>(raw: string): Fro
3176
3306
 
3177
3307
  declare function createCoreTools(input?: CoreToolContext): Tool$1[];
3178
3308
 
3179
- 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 ModelRetry, 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 ToolCallDelta, 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, type WithdrawnUserInput, brandConfigToken, createCompactPhase, createCorePhases, createCoreTools, createDefaultPhase, createStopPhase, isConfigurationSnapshot, isRuntimeError, loadExtensionsFromPath as loadExtensions, loadPhase, loadPhaseSettings, loadPhases, loadSkill, loadSkills, parseAgentDefinition, parseFrontmatter, resolveConfigurationSnapshot };
3309
+ 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 ModelRetry, 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 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 SettingsBadge, type SettingsControl, type SettingsDefinition, type SettingsItem, type SettingsOption, type SettingsSection, type Skill, SqliteStore, type TextContent, type ThinkingContent, type ThinkingDelta, type Tool$1 as Tool, type ToolCallContext, type ToolCallDelta, type ToolCallId, type ToolCallPresentationInput, type ToolCallPresentationOutput, type ToolCallSnapshot, type ToolCallState, type ToolContribution, type ToolDefinition, type ToolExecutionResult, type ToolInvocationContext, type ToolMessage, type ToolMessageContent, type ToolResultContent, type ToolStateChanged, type ToolUseContent, type UiContribution, type UiSlot, type UserContent, type UserInput, type UserMessage, type WithdrawnUserInput, brandConfigToken, createCompactPhase, createCorePhases, createCoreTools, createDefaultPhase, createStopPhase, isConfigurationSnapshot, isRuntimeError, loadExtensionsFromPath as loadExtensions, loadPhase, loadPhases, loadSkill, loadSkills, mergeToolCall, parseAgentDefinition, parseFrontmatter, resolveConfigurationSnapshot };