@rowan-agent/agent 0.9.8 → 0.9.9

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 (3) hide show
  1. package/dist/index.d.ts +140 -6
  2. package/dist/index.js +852 -232
  3. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -21,7 +21,12 @@ type Skill = {
21
21
  baseDir: string;
22
22
  /** Full body content of the SKILL.md (after frontmatter) */
23
23
  content: string;
24
- disableModelInvocation: boolean;
24
+ /** Do not automatically inject this Skill into the model Context. */
25
+ disableAutoInvocation?: boolean;
26
+ /** Do not expose this Skill to direct user invocation. */
27
+ disableImplicitInvocation?: boolean;
28
+ /** @deprecated Use disableAutoInvocation; kept only for old in-memory callers during cutover. */
29
+ disableModelInvocation?: boolean;
25
30
  };
26
31
  type Outcome$1 = {
27
32
  id: string;
@@ -362,7 +367,15 @@ type ToolProgress = Readonly<{
362
367
  toolCallId: ToolCallId;
363
368
  progress: JsonValue;
364
369
  }>;
365
- type RunEvent = DurableRunEvent | MessageDelta | ToolProgress;
370
+ type PhaseStatusEvent = Readonly<{
371
+ kind: "phase_status";
372
+ durability: "transient";
373
+ runId: RunId;
374
+ executionId: ExecutionId;
375
+ phaseId: string;
376
+ status: PhaseStatus;
377
+ }>;
378
+ type RunEvent = DurableRunEvent | MessageDelta | ToolProgress | PhaseStatusEvent;
366
379
 
367
380
  interface BeforePhaseEvent {
368
381
  type: "before_phase";
@@ -536,7 +549,10 @@ type PhaseContextSnapshot = {
536
549
  type PhaseExecution = {
537
550
  snapshot(): PhaseContextSnapshot;
538
551
  restore(snapshot: PhaseContextSnapshot): void;
539
- invokeModel(context: PhaseContext): Promise<ModelInvokeOutput>;
552
+ invokeModel(context: PhaseContext, options?: {
553
+ output?: "reply" | "internal";
554
+ }): Promise<ModelInvokeOutput>;
555
+ reportStatus(status: PhaseStatus): Promise<void>;
540
556
  executeTool(context: AgentContext, toolCall: ToolCall): Promise<ToolResult>;
541
557
  executeTools(context: AgentContext, toolCalls: readonly ToolCall[]): Promise<readonly ToolResult[]>;
542
558
  interaction: PhaseInteractionDriver;
@@ -851,9 +867,23 @@ type ExtensionDisposer = () => void | Promise<void>;
851
867
  type ExtensionFactoryResult = void | ExtensionDisposer;
852
868
  type ExtensionFactory = (api: ExtensionAPI) => ExtensionFactoryResult | Promise<ExtensionFactoryResult>;
853
869
 
870
+ type PhaseStatusState = "running" | "completed";
871
+ /** Normalized status event exposed to Runtime consumers. */
872
+ type PhaseStatus = Readonly<{
873
+ state: PhaseStatusState;
874
+ /** Stable consumer-facing status identifier, e.g. `compacting`. */
875
+ kind: string;
876
+ /** Optional human-readable detail for UI/status consumers. */
877
+ message?: string;
878
+ /** Structured status payload. */
879
+ payload?: unknown;
880
+ }>;
854
881
  /** Unified phase output — model-driven routing is optional; programmatic phases may normalize omission to stop. */
855
882
  type PhaseOutput = {
856
- message: string;
883
+ /** User-visible assistant message. */
884
+ message?: string;
885
+ /** Final status update for non-conversational consumers. */
886
+ status?: PhaseStatus;
857
887
  /** Route to next phase, or "continue" to re-execute current phase, or "stop" to end. Undefined means no model route. */
858
888
  route?: string;
859
889
  /** Phase name that produced this output */
@@ -921,6 +951,8 @@ interface PhaseContext {
921
951
  interface Phase {
922
952
  /** Unique phase identity and display name. */
923
953
  name: string;
954
+ /** Rowan-owned built-in Phase; built-ins are never filtered or disabled. */
955
+ core?: boolean;
924
956
  /** Description */
925
957
  description: string;
926
958
  /** Restricted tools (undefined = all tools available) */
@@ -941,6 +973,10 @@ interface Phase {
941
973
  content: string;
942
974
  /** Model override for this phase (resolved from frontmatter) */
943
975
  model?: ModelRef;
976
+ /** Do not automatically inject this Phase into the model route catalog/context. */
977
+ disableAutoInvocation?: boolean;
978
+ /** Do not expose this Phase to direct user invocation. */
979
+ disableImplicitInvocation?: boolean;
944
980
  /** ExtensionAPI factory function (default export pattern) */
945
981
  factory?: (api: ExtensionAPI) => Promise<void>;
946
982
  /** Direct run function */
@@ -962,6 +998,8 @@ type ToolContext = Pick<AgentContext, "skills"> & {
962
998
  type ToolExecutionMode = "sequential" | "parallel";
963
999
  type Tool$1<TArgs = unknown> = {
964
1000
  name: string;
1001
+ /** Rowan-owned Core Tool; Core Tools bypass Phase filtering. */
1002
+ core?: boolean;
965
1003
  description: string;
966
1004
  parameters: Type.TSchema;
967
1005
  /** One-line snippet shown in the system prompt tool list. */
@@ -992,7 +1030,10 @@ type AgentContext = {
992
1030
  */
993
1031
  type CoreToolContext = {
994
1032
  root?: string;
1033
+ /** Directory for complete Tool Result spill files. */
1034
+ archiveDir?: string;
995
1035
  maxReadBytes?: number;
1036
+ maxReadLines?: number;
996
1037
  bashTimeoutMs?: number;
997
1038
  maxBashOutputBytes?: number;
998
1039
  };
@@ -1361,6 +1402,28 @@ type UserInput = string | Readonly<{
1361
1402
  metadata?: Metadata;
1362
1403
  }>;
1363
1404
  type HistorySeed = readonly Message[];
1405
+ type ContextStatus = Readonly<{
1406
+ tokens: number;
1407
+ contextWindow: number;
1408
+ percent: number;
1409
+ thresholdTokens: number;
1410
+ estimated: boolean;
1411
+ coveredThrough?: Readonly<{
1412
+ messageId: MessageId;
1413
+ sequence: number;
1414
+ }>;
1415
+ }>;
1416
+ type ContextCompactionRecord = Readonly<{
1417
+ id: string;
1418
+ agentId: AgentId;
1419
+ summary: string;
1420
+ coveredThrough?: Readonly<{
1421
+ messageId: MessageId;
1422
+ sequence: number;
1423
+ }>;
1424
+ instructions?: string;
1425
+ createdAt: string;
1426
+ }>;
1364
1427
  type ToolInvocationContext = Readonly<{
1365
1428
  agentId: AgentId;
1366
1429
  runId: RunId;
@@ -1373,6 +1436,8 @@ type ToolInvocationContext = Readonly<{
1373
1436
  }>;
1374
1437
  type Tool = Readonly<{
1375
1438
  name: string;
1439
+ /** Rowan-owned Core Tool; Core Tools bypass Definition/Phase filtering. */
1440
+ core?: boolean;
1376
1441
  description: string;
1377
1442
  parameters: Type.TSchema;
1378
1443
  execute(args: JsonValue, context: ToolInvocationContext, signal: AbortSignal): Promise<ToolExecutionResult$1>;
@@ -1413,6 +1478,16 @@ type AgentResources = Readonly<{
1413
1478
  resourceRefs?: readonly ResourceRef[];
1414
1479
  resourceRevisions?: Readonly<Record<ResourceKind, readonly string[]>>;
1415
1480
  }>;
1481
+ type InvocationSource = "auto" | "implicit" | "external";
1482
+ type InvocationCatalogEntry = Readonly<{
1483
+ kind: "phase" | "skill";
1484
+ name: string;
1485
+ description: string;
1486
+ core?: boolean;
1487
+ disableAutoInvocation: boolean;
1488
+ disableImplicitInvocation: boolean;
1489
+ filePath: string;
1490
+ }>;
1416
1491
  type AgentConfig = Readonly<{
1417
1492
  identity: string;
1418
1493
  definition: AgentDefinition;
@@ -1666,6 +1741,9 @@ interface OwnedStore {
1666
1741
  now?: string;
1667
1742
  retentionMs?: number;
1668
1743
  }): Promise<RetentionResult>;
1744
+ contextStatus(agentId: AgentId, contextWindow: number): Promise<ContextStatus>;
1745
+ contextMessages(agentId: AgentId, recentTokenBudget?: number): Promise<readonly Message[]>;
1746
+ commitContextCompaction(record: ContextCompactionRecord): Promise<ContextCompactionRecord>;
1669
1747
  createRun(input: {
1670
1748
  agentId: AgentId;
1671
1749
  input: UserInput;
@@ -1846,6 +1924,16 @@ interface AgentRuntime$1 {
1846
1924
  metadata?: Metadata;
1847
1925
  }): Promise<AgentRun>;
1848
1926
  run(runId: RunId): AgentRun;
1927
+ contextStatus(agentId: AgentId, options?: {
1928
+ contextWindow?: number;
1929
+ }): Promise<ContextStatus>;
1930
+ compactContext(agentId: AgentId, options?: {
1931
+ instructions?: string;
1932
+ idempotencyKey?: string;
1933
+ }): Promise<AgentRun>;
1934
+ listInvocations(agentId: AgentId, options: {
1935
+ source: InvocationSource;
1936
+ }): Promise<readonly InvocationCatalogEntry[]>;
1849
1937
  history(agentId: AgentId): Promise<readonly Message[]>;
1850
1938
  listAgents(input?: {
1851
1939
  after?: AgentListCursor;
@@ -1881,6 +1969,7 @@ declare class AgentRuntime implements AgentRuntime$1 {
1881
1969
  private readonly executionDone;
1882
1970
  private readonly cancellationRequested;
1883
1971
  private readonly cancellationReasons;
1972
+ private readonly autoCompactionRuns;
1884
1973
  private readonly consumers;
1885
1974
  private readonly transientEvents;
1886
1975
  private readonly resources;
@@ -1926,6 +2015,13 @@ declare class AgentRuntime implements AgentRuntime$1 {
1926
2015
  retentionFloor: EventCursor;
1927
2016
  skipped?: "active_consumers" | "no_eligible_events";
1928
2017
  }>>;
2018
+ contextStatus(agentId: AgentId, options?: {
2019
+ contextWindow?: number;
2020
+ }): Promise<ContextStatus>;
2021
+ compactContext(agentId: AgentId, options?: {
2022
+ instructions?: string;
2023
+ idempotencyKey?: string;
2024
+ }): Promise<AgentRun>;
1929
2025
  start(agentId: AgentId, input: UserInput, options: {
1930
2026
  idempotencyKey: string;
1931
2027
  metadata?: Metadata;
@@ -1941,6 +2037,9 @@ declare class AgentRuntime implements AgentRuntime$1 {
1941
2037
  after?: RunListCursor;
1942
2038
  limit?: number;
1943
2039
  }): Promise<Page<RunSummary, RunListCursor>>;
2040
+ listInvocations(agentId: AgentId, options: {
2041
+ source: InvocationSource;
2042
+ }): Promise<readonly InvocationCatalogEntry[]>;
1944
2043
  consume(input: {
1945
2044
  consumerId: string;
1946
2045
  signal: AbortSignal;
@@ -1963,10 +2062,12 @@ declare class AgentRuntime implements AgentRuntime$1 {
1963
2062
  private pump;
1964
2063
  private execute;
1965
2064
  private failQueued;
2065
+ private resolveContextWindow;
1966
2066
  private executeTool;
1967
2067
  private executeToolBatch;
1968
2068
  private executeReservedTool;
1969
2069
  private requireAgent;
2070
+ private archiveDirFor;
1970
2071
  private runConsumer;
1971
2072
  observe(runId: RunId, options?: {
1972
2073
  after?: EventCursor;
@@ -1999,6 +2100,7 @@ type InMemoryStoreState = Readonly<{
1999
2100
  nextAgentSequence: readonly (readonly [AgentId, number])[];
2000
2101
  nextReadySequence: readonly (readonly [AgentId, number])[];
2001
2102
  eventSequence: number;
2103
+ contextCompactions?: readonly (readonly [AgentId, ContextCompactionRecord])[];
2002
2104
  }>;
2003
2105
  declare class InMemoryStore implements DurableStore {
2004
2106
  private readonly incarnation;
@@ -2017,6 +2119,7 @@ declare class InMemoryStore implements DurableStore {
2017
2119
  private ownerEpoch;
2018
2120
  private eventSequence;
2019
2121
  private retentionFloor;
2122
+ private readonly contextCompactions;
2020
2123
  constructor(options?: {
2021
2124
  incarnation?: string;
2022
2125
  });
@@ -2183,6 +2286,9 @@ declare class InMemoryStore implements DurableStore {
2183
2286
  private nextMessageSequence;
2184
2287
  private messagesForRun;
2185
2288
  history(lease: OwnerLease, agentId: AgentId): readonly Message[];
2289
+ contextStatus(lease: OwnerLease, agentId: AgentId, contextWindow: number): ContextStatus;
2290
+ contextMessages(lease: OwnerLease, agentId: AgentId, recentTokenBudget?: number): readonly Message[];
2291
+ commitContextCompaction(lease: OwnerLease, record: ContextCompactionRecord): ContextCompactionRecord;
2186
2292
  private activeHistory;
2187
2293
  private appendMessage;
2188
2294
  private appendTransition;
@@ -2194,6 +2300,10 @@ declare class InMemoryStore implements DurableStore {
2194
2300
 
2195
2301
  declare class SqliteStore implements DurableStore {
2196
2302
  private readonly database;
2303
+ private readonly archiveRoot;
2304
+ private readonly mirroredEventIds;
2305
+ private readonly mirroredCompactionIds;
2306
+ private mirroredAgents;
2197
2307
  private closed;
2198
2308
  private configured;
2199
2309
  constructor(filename?: string);
@@ -2202,6 +2312,8 @@ declare class SqliteStore implements DurableStore {
2202
2312
  leaseMs: number;
2203
2313
  }): Promise<OwnedStore>;
2204
2314
  close(): void;
2315
+ /** Filesystem location owned by this Store for one Agent's readable archive. */
2316
+ contextArchiveDir(agentId: AgentId): string;
2205
2317
  reserveAgent(lease: OwnerLease, input: {
2206
2318
  idempotencyKey: string;
2207
2319
  metadata?: Metadata;
@@ -2224,6 +2336,9 @@ declare class SqliteStore implements DurableStore {
2224
2336
  operationId: string;
2225
2337
  effectDigestConfirmation?: string;
2226
2338
  }): Promise<MessageRevisionResult>;
2339
+ contextStatus(lease: OwnerLease, agentId: AgentId, contextWindow: number): Promise<ContextStatus>;
2340
+ contextMessages(lease: OwnerLease, agentId: AgentId, recentTokenBudget?: number): Promise<readonly Message[]>;
2341
+ commitContextCompaction(lease: OwnerLease, record: ContextCompactionRecord): Promise<ContextCompactionRecord>;
2227
2342
  createRun(lease: OwnerLease, input: {
2228
2343
  agentId: AgentId;
2229
2344
  input: UserInput;
@@ -2350,6 +2465,8 @@ declare class SqliteStore implements DurableStore {
2350
2465
  private readState;
2351
2466
  private writeState;
2352
2467
  private persistState;
2468
+ /** Append the semantic durable event mirror and remove deleted Agent sidecars. */
2469
+ private mirrorState;
2353
2470
  private requireMatchingOwner;
2354
2471
  private immediateTransaction;
2355
2472
  private readTransaction;
@@ -2376,7 +2493,7 @@ declare class InMemoryConfigProvider implements ConfigProvider {
2376
2493
  }
2377
2494
  declare function brandConfigToken(raw: unknown): ConfigToken;
2378
2495
 
2379
- type RuntimeErrorCode = "invalid_argument" | "runtime_closed" | "runtime_already_owned" | "runtime_ownership_lost" | "agent_not_found" | "run_not_found" | "run_state_conflict" | "message_revision_conflict" | "tool_effect_confirmation_required" | "input_request_conflict" | "idempotency_conflict" | "configuration_unavailable" | "checkpoint_incompatible" | "consumer_already_active" | "invalid_cursor" | "store_unavailable" | "unsupported_store_version";
2496
+ type RuntimeErrorCode = "invalid_argument" | "runtime_closed" | "runtime_already_owned" | "runtime_ownership_lost" | "agent_not_found" | "run_not_found" | "run_state_conflict" | "context_busy" | "message_history_compacted" | "message_revision_conflict" | "tool_effect_confirmation_required" | "input_request_conflict" | "idempotency_conflict" | "configuration_unavailable" | "checkpoint_incompatible" | "consumer_already_active" | "invalid_cursor" | "store_unavailable" | "unsupported_store_version";
2380
2497
  type RuntimeErrorDetails = {
2381
2498
  invalid_argument: Readonly<{
2382
2499
  argument: string;
@@ -2404,6 +2521,15 @@ type RuntimeErrorDetails = {
2404
2521
  expected: readonly RunState[];
2405
2522
  actual: RunState;
2406
2523
  }>;
2524
+ context_busy: Readonly<{
2525
+ agentId: AgentId;
2526
+ runId?: RunId;
2527
+ actual: RunState;
2528
+ }>;
2529
+ message_history_compacted: Readonly<{
2530
+ agentId: AgentId;
2531
+ messageId: MessageId;
2532
+ }>;
2407
2533
  message_revision_conflict: Readonly<{
2408
2534
  agentId: AgentId;
2409
2535
  messageId: MessageId;
@@ -2490,6 +2616,14 @@ declare function loadPhase(targetPath: string): Promise<Phase>;
2490
2616
  */
2491
2617
  declare function loadPhases(targetPath: string): Promise<PhaseRegistry>;
2492
2618
 
2619
+ declare const DEFAULT_PHASE_ID = "default";
2620
+ declare const STOP_PHASE_ID = "stop";
2621
+ declare const COMPACT_PHASE_ID = "compact";
2622
+ declare function createDefaultPhase(): Phase;
2623
+ declare function createStopPhase(): Phase;
2624
+ declare function createCompactPhase(): Phase;
2625
+ declare function createCorePhases(): Phase[];
2626
+
2493
2627
  /**
2494
2628
  * Extension loader — discovers and loads extensions from the filesystem.
2495
2629
  *
@@ -2523,4 +2657,4 @@ declare function parseFrontmatter<T = Record<string, unknown>>(raw: string): Fro
2523
2657
 
2524
2658
  declare function createCoreTools(input?: CoreToolContext): Tool[];
2525
2659
 
2526
- export { type AfterToolCall, type AgentConfig, type AgentConfigRequest, type AgentConfiguration, type AgentDefinition, type AgentId, type AgentListCursor, type AgentRecord, type AgentResources, type AgentRun, AgentRuntime, type AgentRuntimeOptions, type AgentSummary, type AnyRuntimeError, type AssistantContent, type AssistantMessage, type BeforeToolCall, type ConfigProvider, type ConfigPutResult, type ConfigResolution, type ConfigToken, type ConfigurationSnapshot, type ContextCandidate, type CoreToolContext, type DefinitionLayer, type DurableConsumer, type DurableRunEvent, type DurableStore, type DurableToolResult, 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 InputRequest, type InputRequestId, type InputRequiredCommit, 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 PhaseInteraction, PhaseInteractionBoundary, PhaseInteractionCancelledError, type PhaseInteractionDriver, type PhaseInteractionKind, type PhaseInteractionState, type PhaseInteractionStatus, type PhaseInvocation, type PhaseOutput, type PhaseRegistry, type PhaseRegistrySelection, type PhaseState, 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 RunListCursor, type RunRecord, type RunSnapshot, type RunState, type RunStateChanged, type RunSummary, RuntimeBootstrapRegistry, RuntimeError, type RuntimeErrorCode, type RuntimeErrorDetails, RuntimeExtensionLifetime, type Skill, SqliteStore, type TextContent, type ThinkingContent, type Tool, type ToolCallId, type ToolCallSnapshot, type ToolCallState, type ToolContribution, type ToolDefinition, type ToolExecutionResult$1 as ToolExecutionResult, type ToolInvocationContext, type ToolMessage, type ToolMessageContent, type ToolProgress, type ToolResultContent, type ToolStateChanged, type ToolUseContent, type UserContent, type UserInput, type UserMessage, brandConfigToken, createCoreTools, isRuntimeError, loadExtensionsFromPath as loadExtensions, loadPhase, loadPhases, loadSkill, loadSkills, materializeConfigurationSnapshot, parseAgentDefinition, parseFrontmatter, resolveConfigurationSnapshot };
2660
+ export { type AfterToolCall, type AgentConfig, type AgentConfigRequest, type AgentConfiguration, type AgentDefinition, type AgentId, type AgentListCursor, type AgentRecord, type AgentResources, 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 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 InputRequest, type InputRequestId, type InputRequiredCommit, 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 PhaseInteraction, PhaseInteractionBoundary, PhaseInteractionCancelledError, type PhaseInteractionDriver, type PhaseInteractionKind, type PhaseInteractionState, type PhaseInteractionStatus, type PhaseInvocation, 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 RunEvent, type RunFailure, type RunId, 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 Tool, type ToolCallId, type ToolCallSnapshot, type ToolCallState, type ToolContribution, type ToolDefinition, type ToolExecutionResult$1 as 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, isRuntimeError, loadExtensionsFromPath as loadExtensions, loadPhase, loadPhases, loadSkill, loadSkills, materializeConfigurationSnapshot, parseAgentDefinition, parseFrontmatter, resolveConfigurationSnapshot };