@fifthrevision/axle 0.19.0 → 0.20.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
@@ -128,6 +128,23 @@ interface StreamProviderToolCompleteChunk extends StreamChunk {
128
128
  type AnyStreamChunk = StreamStartChunk | StreamCompleteChunk | StreamErrorChunk | StreamTextStartChunk | StreamTextDeltaChunk | StreamTextCompleteChunk | StreamThinkingStartChunk | StreamThinkingDeltaChunk | StreamThinkingSummaryDeltaChunk | StreamThinkingCompleteChunk | StreamToolCallStartChunk | StreamToolCallArgsDeltaChunk | StreamToolCallCompleteChunk | StreamProviderToolStartChunk | StreamProviderToolCompleteChunk;
129
129
  //#endregion
130
130
  //#region src/providers/types.d.ts
131
+ type AnthropicProviderConfig = {
132
+ "api-key": string;
133
+ model?: string;
134
+ };
135
+ type OpenAIProviderConfig = {
136
+ "api-key": string;
137
+ model?: string;
138
+ };
139
+ type GeminiProviderConfig = {
140
+ "api-key": string;
141
+ model?: string;
142
+ };
143
+ type ChatCompletionsProviderConfig = {
144
+ "base-url": string;
145
+ model: string;
146
+ "api-key"?: string;
147
+ };
131
148
  /**
132
149
  * Internal services available to provider adapters while executing a model request.
133
150
  */
@@ -407,20 +424,87 @@ declare class MCP {
407
424
  private assertConnected;
408
425
  }
409
426
  //#endregion
410
- //#region src/store/types.d.ts
411
- interface FileStore {
412
- read(path: string): Promise<string | null>;
413
- write(path: string, content: string): Promise<void>;
427
+ //#region src/core/parse.d.ts
428
+ type OutputSchema = z$2.ZodTypeAny;
429
+ type ParsedSchema<T extends OutputSchema> = z$2.output<T>;
430
+ declare function parseResponse<T extends OutputSchema>(rawValue: string, schema?: T): ParsedSchema<T> | string;
431
+ //#endregion
432
+ //#region src/core/Instruct.d.ts
433
+ type InstructInputs = Record<string, unknown>;
434
+ type InstructVarsMode = "required" | "optional";
435
+ interface InstructOptions<TSchema extends OutputSchema | undefined = OutputSchema | undefined> {
436
+ prompt: string;
437
+ schema?: TSchema;
438
+ vars?: InstructVarsMode;
439
+ }
440
+ declare class Instruct<TSchema extends OutputSchema | undefined = undefined> {
441
+ prompt: string;
442
+ inputs: InstructInputs;
443
+ files: FileInfo[];
444
+ textReferences: Array<{
445
+ content: string;
446
+ name?: string;
447
+ }>;
448
+ vars: InstructVarsMode;
449
+ schema: TSchema;
450
+ constructor(options: InstructOptions<TSchema>);
451
+ clone(): Instruct<TSchema>;
452
+ withInputs(inputs: InstructInputs): Instruct<TSchema>;
453
+ withInput(name: string, value: unknown): Instruct<TSchema>;
454
+ setInputs(inputs: InstructInputs): void;
455
+ addInput(name: string, value: unknown): void;
456
+ addFile(file: FileInfo | string, options?: {
457
+ name?: string;
458
+ }): void;
459
+ hasFiles(): boolean;
460
+ render(options?: {
461
+ vars?: InstructVarsMode;
462
+ }): string;
463
+ }
464
+ //#endregion
465
+ //#region src/core/agent/history.d.ts
466
+ /**
467
+ * In-memory conversation and presentation history for an agent.
468
+ *
469
+ * `log` is the canonical model-facing message history. `turns` and
470
+ * `sessionAnnotations` are renderable presentation state for consumers.
471
+ *
472
+ * @typeParam TAnnotation - Annotation union supported by the host renderer.
473
+ */
474
+ declare class History<TAnnotation extends Annotation = Annotation> {
475
+ private _turns;
476
+ private _log;
477
+ private _sessionAnnotations;
478
+ constructor(init?: {
479
+ turns?: Turn<TAnnotation>[];
480
+ log?: AxleMessage[];
481
+ sessionAnnotations?: TAnnotation[];
482
+ });
483
+ get turns(): Turn<TAnnotation>[];
484
+ get log(): AxleMessage[];
485
+ get sessionAnnotations(): TAnnotation[];
486
+ addTurn(turn: Turn<TAnnotation>): void;
487
+ replaceTurns(turns: Turn<TAnnotation>[]): void;
488
+ replaceLog(messages: AxleMessage[]): void;
489
+ replaceSessionAnnotations(annotations?: TAnnotation[]): void;
490
+ appendToLog(messages: AxleMessage | AxleMessage[]): void;
491
+ latestTurn(): Turn<TAnnotation> | undefined;
492
+ toString(): string;
414
493
  }
415
494
  //#endregion
416
495
  //#region src/memory/types.d.ts
417
496
  interface MemoryContext {
418
- name?: string;
419
- scope?: Record<string, string>;
497
+ /** Optional agent name provided by the host. */
498
+ agentName?: string;
499
+ /** Stable conversation/session id from the agent. */
500
+ sessionId: string;
501
+ /** Current system prompt, before memory augmentation. */
420
502
  system?: string;
503
+ /** Full message context available for recall or extraction. */
421
504
  messages: AxleMessage[];
505
+ /** Newly produced messages to record after a turn completes. */
422
506
  newMessages?: AxleMessage[];
423
- store: FileStore;
507
+ /** Optional tracing context. */
424
508
  tracer?: TracingContext;
425
509
  }
426
510
  interface RecallResult {
@@ -492,75 +576,153 @@ declare function createHandle<T>(queue: Promise<void>, work: (signal: AbortSigna
492
576
  settled: Promise<void>;
493
577
  };
494
578
  //#endregion
495
- //#region src/core/history.d.ts
496
- declare class History {
497
- private _turns;
498
- private _log;
499
- constructor(init?: {
500
- turns?: Turn[];
501
- log?: AxleMessage[];
502
- });
503
- get turns(): Turn[];
504
- get log(): AxleMessage[];
505
- addTurn(turn: Turn): void;
506
- replaceTurns(turns: Turn[]): void;
507
- appendToLog(messages: AxleMessage | AxleMessage[]): void;
508
- latestTurn(): Turn | undefined;
509
- toString(): string;
510
- }
511
- //#endregion
512
- //#region src/core/parse.d.ts
513
- type OutputSchema = z$2.ZodTypeAny;
514
- type ParsedSchema<T extends OutputSchema> = z$2.output<T>;
515
- declare function parseResponse<T extends OutputSchema>(rawValue: string, schema?: T): ParsedSchema<T> | string;
516
- //#endregion
517
- //#region src/core/Instruct.d.ts
518
- type InstructInputs = Record<string, unknown>;
519
- type InstructVarsMode = "required" | "optional";
520
- interface InstructOptions<TSchema extends OutputSchema | undefined = OutputSchema | undefined> {
521
- prompt: string;
522
- schema?: TSchema;
523
- vars?: InstructVarsMode;
524
- }
525
- declare class Instruct<TSchema extends OutputSchema | undefined = undefined> {
526
- prompt: string;
527
- inputs: InstructInputs;
528
- files: FileInfo[];
529
- textReferences: Array<{
530
- content: string;
531
- name?: string;
532
- }>;
533
- vars: InstructVarsMode;
534
- schema: TSchema;
535
- constructor(options: InstructOptions<TSchema>);
536
- clone(): Instruct<TSchema>;
537
- withInputs(inputs: InstructInputs): Instruct<TSchema>;
538
- withInput(name: string, value: unknown): Instruct<TSchema>;
539
- setInputs(inputs: InstructInputs): void;
540
- addInput(name: string, value: unknown): void;
541
- addFile(file: FileInfo | string, options?: {
542
- name?: string;
543
- }): void;
544
- hasFiles(): boolean;
545
- render(options?: {
546
- vars?: InstructVarsMode;
547
- }): string;
548
- }
549
- //#endregion
550
- //#region src/core/Agent.d.ts
579
+ //#region src/core/agent/types.d.ts
580
+ /**
581
+ * Runtime configuration for an `Agent`.
582
+ *
583
+ * This contains executable objects and process-local services. It is not meant
584
+ * to be serialized directly. Use `AgentDefinition` for a serializable recipe
585
+ * and `createAgentConfig()` to produce an `AgentConfig`.
586
+ */
551
587
  interface AgentConfig extends Omit<AxleModelRequestOptions, "signal"> {
588
+ /** Provider adapter used to execute model requests. */
552
589
  provider: AIProvider;
590
+ /** Model identifier passed to the provider. */
553
591
  model: string;
592
+ /** Stable conversation/session id. Generated when omitted. */
593
+ sessionId?: string;
594
+ /** Optional system/developer instruction. */
554
595
  system?: string;
596
+ /** Optional agent name passed to host services such as memory. */
555
597
  name?: string;
556
- scope?: Record<string, string>;
598
+ /** Executable tools available to the agent. */
557
599
  tools?: ExecutableTool[];
600
+ /** Provider-managed tools such as hosted search or code execution. */
558
601
  providerTools?: ProviderTool[];
602
+ /** MCP clients whose tools should be lazily resolved. */
559
603
  mcps?: MCP[];
604
+ /** Optional memory implementation. */
560
605
  memory?: AgentMemory;
606
+ /** Optional tracing context. */
561
607
  tracer?: TracingContext;
608
+ /** Optional file resolver for request file references. */
562
609
  fileResolver?: FileResolver;
563
610
  }
611
+ /**
612
+ * Serializable provider reference for an agent definition.
613
+ *
614
+ * `type` is host-defined. Common values are provider names such as `"openai"`,
615
+ * `"anthropic"`, `"gemini"`, or `"chatcompletions"`, but core does not
616
+ * interpret the value. `config` is passed through to the host resolver.
617
+ */
618
+ interface ProviderDefinition {
619
+ /** Host-defined provider discriminator. */
620
+ type: string;
621
+ /** Serializable provider configuration or references, such as `apiKeyEnv`. */
622
+ config?: Record<string, unknown>;
623
+ }
624
+ /**
625
+ * Serializable reference to an executable tool.
626
+ */
627
+ interface ToolDefinitionRef {
628
+ /** Host-defined tool name or id. */
629
+ name: string;
630
+ /** Optional serializable tool configuration passed to the resolver. */
631
+ config?: Record<string, unknown>;
632
+ }
633
+ /**
634
+ * Serializable reference to a provider-managed tool.
635
+ */
636
+ interface ProviderToolDefinitionRef {
637
+ /** Provider tool name. */
638
+ name: string;
639
+ /** Optional provider tool configuration. */
640
+ config?: Record<string, unknown>;
641
+ }
642
+ /**
643
+ * Serializable request options for an agent definition.
644
+ */
645
+ interface AgentDefinitionRequestOptions extends Omit<AxleModelRequestOptions, "signal"> {}
646
+ /**
647
+ * Serializable recipe for reconstructing an agent.
648
+ *
649
+ * This is deliberately not executable by itself. Hosts resolve provider and
650
+ * tool references into runtime objects using an `AgentDefinitionResolver`.
651
+ * Harness concerns such as memory implementations, file resolvers, tracing,
652
+ * transport, and stores should be modeled outside this core definition.
653
+ */
654
+ interface AgentDefinition {
655
+ /** Agent definition schema version. */
656
+ version: 1;
657
+ /** Optional agent name passed to host services such as memory. */
658
+ name?: string;
659
+ /** Provider reference resolved by the host. */
660
+ provider: ProviderDefinition;
661
+ /** Optional model identifier passed to the resolved provider. */
662
+ model?: string;
663
+ /** Optional system/developer instruction. */
664
+ system?: string;
665
+ /** Provider-portable request defaults. */
666
+ request?: AgentDefinitionRequestOptions;
667
+ /** Serializable executable tool references. */
668
+ tools?: ToolDefinitionRef[];
669
+ /** Serializable provider-managed tool references. */
670
+ providerTools?: ProviderToolDefinitionRef[];
671
+ /** Serializable MCP client configuration. */
672
+ mcps?: MCPConfig[];
673
+ }
674
+ type MaybePromise<T> = T | Promise<T>;
675
+ /**
676
+ * Executable dependencies resolved from an `AgentDefinition`.
677
+ */
678
+ interface ResolvedAgentDefinition {
679
+ /** Provider adapter used to execute model requests. */
680
+ provider: AIProvider;
681
+ /** Model identifier used when `AgentDefinition.model` is omitted. */
682
+ model?: string;
683
+ /** Executable tools resolved from `AgentDefinition.tools`. */
684
+ tools?: ExecutableTool[];
685
+ /** Provider-managed tools resolved from `AgentDefinition.providerTools`. */
686
+ providerTools?: ProviderTool[];
687
+ /** MCP clients resolved from `AgentDefinition.mcps`. */
688
+ mcps?: MCP[];
689
+ }
690
+ /**
691
+ * Host function used to turn an `AgentDefinition` into executable dependencies.
692
+ */
693
+ type AgentDefinitionResolver = (definition: AgentDefinition) => MaybePromise<ResolvedAgentDefinition>;
694
+ /**
695
+ * Serializable continuation and presentation state for an `Agent`.
696
+ *
697
+ * This is the data needed to continue a model conversation and restore the
698
+ * renderable turn state. It intentionally does not include executable runtime
699
+ * objects such as providers, tools, MCP clients, memory implementations, file
700
+ * resolvers, or tracers. Recreate those from host-owned configuration, then
701
+ * call `agent.restore(session)`.
702
+ *
703
+ * @typeParam TAnnotation - Annotation union supported by the host renderer.
704
+ */
705
+ interface AgentSession<TAnnotation extends Annotation = Annotation> {
706
+ /** Agent session schema version. */
707
+ version: 1;
708
+ /** Stable conversation/session id. */
709
+ sessionId: string;
710
+ /** Canonical model-facing message history used for continuation. */
711
+ messages: AxleMessage[];
712
+ /** Renderable turn state for exact UI restoration. */
713
+ turns?: Turn<TAnnotation>[];
714
+ /** Session-level annotations for generic renderer state. */
715
+ sessionAnnotations?: TAnnotation[];
716
+ }
717
+ /**
718
+ * Serializable saved agent payload: definition plus continuation state.
719
+ */
720
+ interface SavedAgent<TAnnotation extends Annotation = Annotation> {
721
+ /** Serializable recipe used to reconstruct runtime config. */
722
+ definition: AgentDefinition;
723
+ /** Serializable continuation and presentation state. */
724
+ session: AgentSession<TAnnotation>;
725
+ }
564
726
  interface AgentResult<T = string> {
565
727
  ok: true;
566
728
  response: T;
@@ -579,17 +741,18 @@ type TurnEventCallback = (event: TurnEvent) => void;
579
741
  interface SendMessageOptions extends AxleModelRequestOptions {
580
742
  fileResolver?: FileResolver;
581
743
  }
744
+ //#endregion
745
+ //#region src/core/agent/Agent.d.ts
582
746
  declare class Agent {
583
747
  readonly provider: AIProvider;
584
748
  readonly model: string;
585
749
  readonly history: History;
586
750
  readonly tracer?: TracingContext;
587
751
  readonly name?: string;
588
- readonly scope?: Record<string, string>;
589
- readonly store: FileStore;
590
752
  readonly fileResolver?: FileResolver;
591
753
  readonly requestOptions: Omit<AxleModelRequestOptions, "signal">;
592
754
  readonly registry: ToolRegistry;
755
+ sessionId: string;
593
756
  system: string | undefined;
594
757
  private mcps;
595
758
  private resolvedMcps;
@@ -602,6 +765,22 @@ declare class Agent {
602
765
  hasTools(): boolean;
603
766
  on(callback: TurnEventCallback): void;
604
767
  context(): ContextUsage;
768
+ /**
769
+ * Capture the serializable session state for later continuation.
770
+ *
771
+ * The returned object contains message history and renderable turn state, but
772
+ * not executable configuration such as providers, tools, MCP clients, memory,
773
+ * or tracers.
774
+ */
775
+ snapshot(): AgentSession;
776
+ /**
777
+ * Replace the agent's continuation and render state from a saved session.
778
+ *
779
+ * Restore does not change runtime configuration. The current provider, model,
780
+ * tools, MCP clients, memory, and other constructor-supplied objects remain in
781
+ * effect.
782
+ */
783
+ restore(session: AgentSession): void;
605
784
  send(message: string | Instruct<undefined>, options?: SendMessageOptions): AgentHandle<string>;
606
785
  send<TSchema extends OutputSchema>(instruct: Instruct<TSchema>, options?: SendMessageOptions): AgentHandle<ParsedSchema<TSchema>>;
607
786
  private resolveMcpTools;
@@ -610,6 +789,17 @@ declare class Agent {
610
789
  private run;
611
790
  }
612
791
  //#endregion
792
+ //#region src/core/agent/createAgentConfig.d.ts
793
+ /**
794
+ * Create executable `Agent` config from a serializable agent definition.
795
+ *
796
+ * Core resolves only what it can safely construct from serializable data. The
797
+ * host remains responsible for executable dependencies such as providers,
798
+ * tools, and MCP clients. Harness runtime services such as memory and file
799
+ * resolvers should be layered onto the returned config by the host.
800
+ */
801
+ declare function createAgentConfig(definition: AgentDefinition, resolver: AgentDefinitionResolver): Promise<AgentConfig>;
802
+ //#endregion
613
803
  //#region src/core/userTurn.d.ts
614
804
  type InstructResponse<TSchema extends OutputSchema | undefined> = TSchema extends OutputSchema ? ParsedSchema<TSchema> : string;
615
805
  //#endregion
@@ -1014,94 +1204,6 @@ declare const OpenAI: {
1014
1204
  readonly DefaultModel: "gpt-5.4-mini";
1015
1205
  };
1016
1206
  //#endregion
1017
- //#region src/cli/configs/schemas.d.ts
1018
- declare const BraveProviderConfigSchema: z.ZodObject<{
1019
- "api-key": z.ZodString;
1020
- rateLimit: z.ZodOptional<z.ZodNumber>;
1021
- }, z.core.$strip>;
1022
- type BraveProviderConfig = z.infer<typeof BraveProviderConfigSchema>;
1023
- declare const ExecProviderConfigSchema: z.ZodObject<{
1024
- timeout: z.ZodOptional<z.ZodNumber>;
1025
- maxBuffer: z.ZodOptional<z.ZodNumber>;
1026
- cwd: z.ZodOptional<z.ZodString>;
1027
- }, z.core.$strip>;
1028
- type ExecProviderConfig = z.infer<typeof ExecProviderConfigSchema>;
1029
- //#endregion
1030
- //#region src/tools/brave.d.ts
1031
- declare const braveSearchSchema: z$2.ZodObject<{
1032
- searchTerm: z$2.ZodString;
1033
- }, z$2.core.$strip>;
1034
- declare class BraveSearchTool implements ExecutableTool<typeof braveSearchSchema> {
1035
- name: string;
1036
- description: string;
1037
- schema: z$2.ZodObject<{
1038
- searchTerm: z$2.ZodString;
1039
- }, z$2.core.$strip>;
1040
- apiKey: string | undefined;
1041
- throttle: number | undefined;
1042
- lastExecTime: number;
1043
- constructor(config?: BraveProviderConfig);
1044
- configure(config: BraveProviderConfig): void;
1045
- execute(params: z$2.infer<typeof braveSearchSchema>, ctx: ToolContext): Promise<string>;
1046
- }
1047
- declare const braveSearchTool: BraveSearchTool;
1048
- //#endregion
1049
- //#region src/tools/calculator.d.ts
1050
- declare const calculatorSchema: z.ZodObject<{
1051
- operation: z.ZodEnum<{
1052
- add: "add";
1053
- subtract: "subtract";
1054
- multiply: "multiply";
1055
- divide: "divide";
1056
- }>;
1057
- a: z.ZodNumber;
1058
- b: z.ZodNumber;
1059
- }, z.core.$strip>;
1060
- declare const calculatorTool: ExecutableTool<typeof calculatorSchema>;
1061
- //#endregion
1062
- //#region src/tools/exec/index.d.ts
1063
- declare const execSchema: z$2.ZodObject<{
1064
- command: z$2.ZodString;
1065
- }, z$2.core.$strip>;
1066
- declare class ExecTool implements ExecutableTool<typeof execSchema> {
1067
- name: string;
1068
- description: string;
1069
- schema: z$2.ZodObject<{
1070
- command: z$2.ZodString;
1071
- }, z$2.core.$strip>;
1072
- private timeout;
1073
- private maxBuffer;
1074
- private cwd?;
1075
- constructor(config?: ExecProviderConfig);
1076
- configure(config: ExecProviderConfig): void;
1077
- summarize(params: z$2.infer<typeof execSchema>): string;
1078
- execute(params: z$2.infer<typeof execSchema>, ctx: ToolContext): Promise<string>;
1079
- }
1080
- declare const execTool: ExecTool;
1081
- //#endregion
1082
- //#region src/tools/patch-file.d.ts
1083
- declare const patchFileSchema: z.ZodObject<{
1084
- path: z.ZodString;
1085
- old_string: z.ZodString;
1086
- new_string: z.ZodString;
1087
- start_line: z.ZodNumber;
1088
- end_line: z.ZodNumber;
1089
- }, z.core.$strip>;
1090
- declare const patchFileTool: ExecutableTool<typeof patchFileSchema>;
1091
- //#endregion
1092
- //#region src/tools/read-file.d.ts
1093
- declare const readFileSchema: z.ZodObject<{
1094
- path: z.ZodString;
1095
- }, z.core.$strip>;
1096
- declare const readFileTool: ExecutableTool<typeof readFileSchema>;
1097
- //#endregion
1098
- //#region src/tools/write-file.d.ts
1099
- declare const writeFileSchema: z.ZodObject<{
1100
- path: z.ZodString;
1101
- content: z.ZodString;
1102
- }, z.core.$strip>;
1103
- declare const writeFileTool: ExecutableTool<typeof writeFileSchema>;
1104
- //#endregion
1105
1207
  //#region src/turns/eventBuilder.d.ts
1106
1208
  declare class TurnEventBuilder {
1107
1209
  private currentTurnId;
@@ -1194,36 +1296,14 @@ declare class SimpleWriter implements TraceWriter {
1194
1296
  onEvent(span: SpanData, event: SpanEvent): void;
1195
1297
  }
1196
1298
  //#endregion
1197
- //#region src/memory/ProceduralMemory.d.ts
1198
- interface ProceduralMemoryConfig {
1199
- provider: AIProvider;
1200
- model: string;
1201
- enableTools?: boolean;
1202
- }
1203
- declare class ProceduralMemory implements AgentMemory {
1204
- private provider;
1205
- private model;
1206
- private enableTools;
1207
- private lastStore?;
1208
- private lastName?;
1209
- private lastScope?;
1210
- constructor(config: ProceduralMemoryConfig);
1211
- recall(context: MemoryContext): Promise<RecallResult>;
1212
- record(context: MemoryContext): Promise<void>;
1213
- tools(): ExecutableTool[];
1214
- private formatMessages;
1215
- private parseInstructions;
1216
- private getStorePath;
1217
- private loadStore;
1218
- private saveStore;
1219
- }
1220
- //#endregion
1221
- //#region src/store/LocalFileStore.d.ts
1222
- declare class LocalFileStore implements FileStore {
1223
- readonly rootPath: string;
1224
- constructor(rootPath: string);
1299
+ //#region src/store/types.d.ts
1300
+ interface FileStore {
1225
1301
  read(path: string): Promise<string | null>;
1226
1302
  write(path: string, content: string): Promise<void>;
1227
1303
  }
1228
1304
  //#endregion
1229
- export { type AIProvider, type AccumulatableEvent, type ActionPart, type ActionResult, Agent, type AgentConfig, type AgentHandle, type AgentMemory, type AgentResult, type Annotation, type AnnotationEvent, type AnnotationPlacement, type AnnotationStatus, type AnnotationTarget, Anthropic, AxleAbortError, AxleAgentAbortError, type AxleAssistantMessage, AxleError, type AxleMessage, type AxleModelRequestOptions, AxleStopReason, type AxleToolCallMessage, type AxleToolCallResult, AxleToolFatalError, type AxleUserMessage, type ContentPart, type ContentPartFile, type ContentPartProviderTool, type ContentPartText, type ContentPartThinking, type ContentPartToolCall, type ContextUsage, type DeferredFileInfo, type EventLevel, type ExecutableTool, type FileInfo, type FileKind, type FilePart, type FileProviderId, type FileResolveFormat, type FileResolveRequest, type FileResolver, type FileStore, Gemini, type GenerateInstructParams, type GenerateInstructResult, type GenerateParams, type Handle, History, Instruct, type InstructInputs, type InstructOptions, type InstructResponse, InstructVariableError, type InstructVarsMode, LocalFileStore, MCP, type MCPConfig, type MCPHttpConfig, type MCPStdioConfig, type MemoryContext, OpenAI, ProceduralMemory, type ProceduralMemoryConfig, type ProviderOptions, type ProviderTool, type ProviderToolAction, type RecallResult, type ResolvedFileSource, type SendMessageOptions, SimpleWriter, type SimpleWriterOptions, type SpanData, type SpanOptions, type SpanType, type StreamEvent, type StreamEventCallback, type StreamHandle, type StreamInstructHandle, type StreamInstructParams, type StreamInstructResult, type StreamParams, type StreamResult, type SubagentAction, TaskError, type TextPart, type ThinkingPart, type ToolAction, type ToolChoice, type ToolContext, type ToolDefinition, ToolRegistry, type ToolResultPart, type TraceWriter, Tracer, type TracingContext, type Turn, TurnAccumulator, type TurnAccumulatorResult, type TurnAccumulatorState, type TurnEvent, TurnEventBuilder, type TurnEventCallback, type TurnPart, type TurnStatus, anthropic, braveSearchTool, calculatorTool, chatCompletions, createHandle, estimateContextUsage, execTool, gemini, generate, generateTurn, loadFileContent, openai, parseResponse, patchFileTool, readFileTool, stream, writeFileTool };
1305
+ //#region src/utils/stats.d.ts
1306
+ declare function createStats(): Stats;
1307
+ declare function addStats(total: Stats, usage?: Stats): void;
1308
+ //#endregion
1309
+ export { type AIProvider, type AccumulatableEvent, type ActionPart, type ActionResult, Agent, type AgentConfig, type AgentDefinition, type AgentDefinitionRequestOptions, type AgentDefinitionResolver, type AgentErrorResult, type AgentHandle, type AgentMemory, type AgentResult, type AgentSession, type Annotation, type AnnotationEvent, type AnnotationPlacement, type AnnotationStatus, type AnnotationTarget, Anthropic, type AnthropicProviderConfig, AxleAbortError, AxleAgentAbortError, type AxleAssistantMessage, AxleError, type AxleMessage, type AxleModelRequestOptions, AxleStopReason, type AxleToolCallMessage, type AxleToolCallResult, AxleToolFatalError, type AxleUserMessage, type ChatCompletionsProviderConfig, type ContentPart, type ContentPartFile, type ContentPartProviderTool, type ContentPartText, type ContentPartThinking, type ContentPartToolCall, type ContextUsage, type DeferredFileInfo, type EventLevel, type ExecutableTool, type FileInfo, type FileKind, type FilePart, type FileProviderId, type FileResolveFormat, type FileResolveRequest, type FileResolver, type FileStore, Gemini, type GeminiProviderConfig, type GenerateInstructParams, type GenerateInstructResult, type GenerateParams, type Handle, History, Instruct, type InstructInputs, type InstructOptions, type InstructResponse, InstructVariableError, type InstructVarsMode, MCP, type MCPConfig, type MCPHttpConfig, type MCPStdioConfig, type MaybePromise, type MemoryContext, OpenAI, type OpenAIProviderConfig, type OutputSchema, type ParsedSchema, type ProviderDefinition, type ProviderOptions, type ProviderTool, type ProviderToolAction, type ProviderToolDefinitionRef, type RecallResult, type ResolvedAgentDefinition, type ResolvedFileSource, type SavedAgent, type SendMessageOptions, SimpleWriter, type SimpleWriterOptions, type SpanData, type SpanOptions, type SpanType, type Stats, type StreamEvent, type StreamEventCallback, type StreamHandle, type StreamInstructHandle, type StreamInstructParams, type StreamInstructResult, type StreamParams, type StreamResult, type SubagentAction, TaskError, type TextPart, type ThinkingPart, type ToolAction, type ToolChoice, type ToolContext, type ToolDefinition, type ToolDefinitionRef, ToolRegistry, type ToolResultPart, type TraceWriter, Tracer, type TracingContext, type Turn, TurnAccumulator, type TurnAccumulatorResult, type TurnAccumulatorState, type TurnEvent, TurnEventBuilder, type TurnEventCallback, type TurnPart, type TurnStatus, addStats, anthropic, chatCompletions, createAgentConfig, createHandle, createStats, estimateContextUsage, gemini, generate, generateTurn, loadFileContent, openai, parseResponse, stream };