@igniter-js/agents 0.1.13 → 0.1.14
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/AGENTS.md +115 -54
- package/README.md +72 -42
- package/dist/adapters/index.d.mts +1 -1
- package/dist/adapters/index.d.ts +1 -1
- package/dist/{index-CX4IgrRt.d.mts → index-CqUbHeyY.d.mts} +78 -2
- package/dist/{index-CX4IgrRt.d.ts → index-CqUbHeyY.d.ts} +78 -2
- package/dist/index.d.mts +446 -53
- package/dist/index.d.ts +446 -53
- package/dist/index.js +717 -340
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +717 -341
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -4
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import * as ai from 'ai';
|
|
2
|
+
import { ToolSet, LanguageModel, ToolLoopAgent, LanguageModelResponseMetadata, LanguageModelUsage, FinishReason, ModelMessage, AgentCallParameters, AgentStreamParameters, GenerateTextResult, StreamTextResult, Tool, UIMessageStreamWriter } from 'ai';
|
|
3
|
+
import { IgniterLogger, IgniterError } from '@igniter-js/common';
|
|
3
4
|
import { IgniterTelemetryManager } from '@igniter-js/telemetry';
|
|
4
|
-
import { I as IgniterAgentMemoryConfig, a as IgniterAgentMemoryRuntime, b as IgniterAgentWorkingMemoryParams, c as IgniterAgentWorkingMemory, d as IgniterAgentUpdateWorkingMemoryParams, e as IgniterAgentConversationMessage, f as IgniterAgentUIMessage, g as IgniterAgentGetMessagesParams, h as IgniterAgentChatSession, i as IgniterAgentGetChatsParams } from './index-
|
|
5
|
-
export {
|
|
5
|
+
import { I as IgniterAgentMemoryConfig, a as IgniterAgentMemoryRuntime, b as IgniterAgentWorkingMemoryParams, c as IgniterAgentWorkingMemory, d as IgniterAgentUpdateWorkingMemoryParams, e as IgniterAgentConversationMessage, f as IgniterAgentUIMessage, g as IgniterAgentGetMessagesParams, h as IgniterAgentChatSession, i as IgniterAgentGetChatsParams } from './index-CqUbHeyY.mjs';
|
|
6
|
+
export { B as IgniterAgentAdapterBatchResult, A as IgniterAgentAdapterFactory, w as IgniterAgentAdapterOptions, C as IgniterAgentAdapterStats, s as IgniterAgentChatsConfig, p as IgniterAgentGenerateSuggestionsConfig, o as IgniterAgentGenerateTitleConfig, r as IgniterAgentHistoryConfig, j as IgniterAgentInMemoryAdapter, x as IgniterAgentInMemoryAdapterOptions, l as IgniterAgentJSONFileAdapter, k as IgniterAgentJSONFileAdapterOptions, z as IgniterAgentMemoryAdapter, v as IgniterAgentMemoryProvider, n as IgniterAgentMemoryScope, m as IgniterAgentMessageRole, y as IgniterAgentRedisAdapterOptions, t as IgniterAgentSearchParams, u as IgniterAgentSearchResult, q as IgniterAgentWorkingMemoryConfig } from './index-CqUbHeyY.mjs';
|
|
6
7
|
import { z } from 'zod';
|
|
7
8
|
|
|
8
9
|
/**
|
|
@@ -14,7 +15,7 @@ import { z } from 'zod';
|
|
|
14
15
|
*
|
|
15
16
|
* @public
|
|
16
17
|
*/
|
|
17
|
-
interface IgniterAgentPromptTemplate<TContext extends Record<string, unknown> = Record<string, unknown
|
|
18
|
+
interface IgniterAgentPromptTemplate<TContext extends Record<string, unknown> = Record<string, unknown>, TAppended extends Record<string, IgniterAgentPromptTemplate<TContext, {}> | string> = {}> {
|
|
18
19
|
/**
|
|
19
20
|
* Builds the prompt string with the provided context.
|
|
20
21
|
*
|
|
@@ -22,6 +23,18 @@ interface IgniterAgentPromptTemplate<TContext extends Record<string, unknown> =
|
|
|
22
23
|
* @returns The built prompt string
|
|
23
24
|
*/
|
|
24
25
|
build(context: TContext): string;
|
|
26
|
+
/**
|
|
27
|
+
* Appends another prompt template to this one.
|
|
28
|
+
*/
|
|
29
|
+
addAppended<K extends string>(key: K, prompt: IgniterAgentPromptTemplate<TContext, TAppended> | string): IgniterAgentPromptTemplate<TContext, TAppended & Record<K, IgniterAgentPromptTemplate<TContext, TAppended> | string>>;
|
|
30
|
+
/**
|
|
31
|
+
* Removes an appended prompt template from this one.
|
|
32
|
+
*/
|
|
33
|
+
removeAppended<K extends string>(key: K): IgniterAgentPromptTemplate<TContext, Omit<TAppended, K>>;
|
|
34
|
+
/**
|
|
35
|
+
* Returns the appended prompts.
|
|
36
|
+
*/
|
|
37
|
+
getAppended(): TAppended;
|
|
25
38
|
/**
|
|
26
39
|
* Returns the raw prompt template.
|
|
27
40
|
*/
|
|
@@ -117,6 +130,29 @@ type IgniterAgentConnectionStatus = "connected" | "disconnected";
|
|
|
117
130
|
* @public
|
|
118
131
|
*/
|
|
119
132
|
type IgniterAgentToolsetType = "stdio" | "http" | "custom";
|
|
133
|
+
/**
|
|
134
|
+
* Type alias for a single agent tool.
|
|
135
|
+
*
|
|
136
|
+
* @description
|
|
137
|
+
* Represents any tool that can be registered with the agent. Tools are functions
|
|
138
|
+
* that the AI model can invoke to perform actions or retrieve information.
|
|
139
|
+
*
|
|
140
|
+
* @see {@link https://sdk.vercel.ai/docs/ai-sdk-core/tools-and-tool-calling | Vercel AI SDK Tools}
|
|
141
|
+
*
|
|
142
|
+
* @example
|
|
143
|
+
* ```typescript
|
|
144
|
+
* const myTool: IgniterAgentTool = {
|
|
145
|
+
* description: 'Fetches weather data for a given city',
|
|
146
|
+
* inputSchema: z.object({ city: z.string() }),
|
|
147
|
+
* execute: async ({ city }) => {
|
|
148
|
+
* return await fetchWeather(city);
|
|
149
|
+
* }
|
|
150
|
+
* };
|
|
151
|
+
* ```
|
|
152
|
+
*
|
|
153
|
+
* @public
|
|
154
|
+
*/
|
|
155
|
+
type IgniterAgentTool$1 = ToolSet[string];
|
|
120
156
|
/**
|
|
121
157
|
* Utility type that flattens nested toolsets into a single object with prefixed keys.
|
|
122
158
|
*
|
|
@@ -177,7 +213,7 @@ type IgniterAgentFlattenedToolSet<TToolsets extends Record<string, IgniterAgentT
|
|
|
177
213
|
*
|
|
178
214
|
* @public
|
|
179
215
|
*/
|
|
180
|
-
interface IgniterAgentToolset$1<TType extends IgniterAgentToolsetType = IgniterAgentToolsetType, TName extends string = string> {
|
|
216
|
+
interface IgniterAgentToolset$1<TType extends IgniterAgentToolsetType = IgniterAgentToolsetType, TName extends string = string, ToolSet extends Record<string, IgniterAgentTool$1> = Record<string, IgniterAgentTool$1>> {
|
|
181
217
|
/** Unique identifier for the toolset */
|
|
182
218
|
readonly name: TName;
|
|
183
219
|
/** Transport type used by this toolset */
|
|
@@ -223,7 +259,7 @@ interface IgniterAgentToolset$1<TType extends IgniterAgentToolsetType = IgniterA
|
|
|
223
259
|
*
|
|
224
260
|
* @public
|
|
225
261
|
*/
|
|
226
|
-
interface IgniterAgentConfig<TAgentName extends string = string, TAgentModel extends LanguageModel = LanguageModel, TAgentInstructions extends IgniterAgentPromptTemplate = IgniterAgentPromptTemplate, TAgentToolsets extends Record<string, IgniterAgentToolset$1
|
|
262
|
+
interface IgniterAgentConfig<TAgentName extends string = string, TAgentModel extends LanguageModel = LanguageModel, TAgentInstructions extends IgniterAgentPromptTemplate<any, any> = IgniterAgentPromptTemplate<any, any>, TAgentToolsets extends Record<string, IgniterAgentToolset$1<any, any>> = Record<string, IgniterAgentToolset$1<any, any>>, TAgentMCPConfigs extends Record<string, IgniterAgentMCPConfigUnion> = Record<string, IgniterAgentMCPConfigUnion>, TAgentContextSchema extends z.ZodSchema = never> {
|
|
227
263
|
/**
|
|
228
264
|
* Unique name identifier for the agent.
|
|
229
265
|
* Used for logging, debugging, and multi-agent orchestration.
|
|
@@ -543,6 +579,66 @@ interface IgniterAgentToolErrorResult {
|
|
|
543
579
|
*/
|
|
544
580
|
type IgniterAgentToolResult<TData = unknown> = IgniterAgentToolSuccessResult<TData> | IgniterAgentToolErrorResult;
|
|
545
581
|
|
|
582
|
+
interface IgniterAgentOutput<OUTPUT = any, PARTIAL = any> {
|
|
583
|
+
/**
|
|
584
|
+
* The response format to use for the model.
|
|
585
|
+
*/
|
|
586
|
+
responseFormat: PromiseLike<any>;
|
|
587
|
+
/**
|
|
588
|
+
* Parses the complete output of the model.
|
|
589
|
+
*/
|
|
590
|
+
parseCompleteOutput(options: {
|
|
591
|
+
text: string;
|
|
592
|
+
}, context: {
|
|
593
|
+
response: LanguageModelResponseMetadata;
|
|
594
|
+
usage: LanguageModelUsage;
|
|
595
|
+
finishReason: FinishReason;
|
|
596
|
+
}): Promise<OUTPUT>;
|
|
597
|
+
/**
|
|
598
|
+
* Parses the partial output of the model.
|
|
599
|
+
*/
|
|
600
|
+
parsePartialOutput(options: {
|
|
601
|
+
text: string;
|
|
602
|
+
}): Promise<{
|
|
603
|
+
partial: PARTIAL;
|
|
604
|
+
} | undefined>;
|
|
605
|
+
}
|
|
606
|
+
type IgniterAgentToolsetParsed<ToolSet extends Record<string, IgniterAgentToolset$1>> = {
|
|
607
|
+
[toolKey in keyof ToolSet[keyof ToolSet]['tools']]: ToolSet[keyof ToolSet]['tools'][toolKey];
|
|
608
|
+
};
|
|
609
|
+
/**
|
|
610
|
+
* Message input for agent calls.
|
|
611
|
+
*
|
|
612
|
+
* @description
|
|
613
|
+
* Accepts either a single `message` or an array of `messages`.
|
|
614
|
+
* When both are provided, `message` takes precedence.
|
|
615
|
+
*/
|
|
616
|
+
type IgniterAgentMessageInput = {
|
|
617
|
+
message: ModelMessage;
|
|
618
|
+
messages?: ModelMessage[];
|
|
619
|
+
} | {
|
|
620
|
+
message?: ModelMessage;
|
|
621
|
+
messages: ModelMessage[];
|
|
622
|
+
};
|
|
623
|
+
/**
|
|
624
|
+
* Public call options for `generate`.
|
|
625
|
+
*/
|
|
626
|
+
type IgniterAgentCallOptions<CALL_OPTIONS = never, ToolSet extends Record<string, IgniterAgentToolset$1> = Record<string, IgniterAgentToolset$1>, OUTPUT extends IgniterAgentOutput = never> = {
|
|
627
|
+
chatId: string;
|
|
628
|
+
userId: string;
|
|
629
|
+
context: Record<string, any>;
|
|
630
|
+
} & IgniterAgentMessageInput & Omit<AgentCallParameters<CALL_OPTIONS>, "messages">;
|
|
631
|
+
/**
|
|
632
|
+
* Public call options for `stream`.
|
|
633
|
+
*/
|
|
634
|
+
type IgniterAgentStreamCallOptions<CALL_OPTIONS = never, ToolSet extends Record<string, IgniterAgentToolset$1> = Record<string, IgniterAgentToolset$1>, OUTPUT extends IgniterAgentOutput = never> = {
|
|
635
|
+
chatId: string;
|
|
636
|
+
userId: string;
|
|
637
|
+
context: Record<string, any>;
|
|
638
|
+
} & IgniterAgentMessageInput & Omit<AgentStreamParameters<CALL_OPTIONS, IgniterAgentToolsetParsed<ToolSet>>, "messages">;
|
|
639
|
+
type IgniterAgentStreamOptions<CALL_OPTIONS = never, ToolSet extends Record<string, IgniterAgentToolset$1> = Record<string, IgniterAgentToolset$1>, OUTPUT extends IgniterAgentOutput = never> = IgniterAgentStreamCallOptions<CALL_OPTIONS, ToolSet, OUTPUT>;
|
|
640
|
+
type IgniterAgentGenerateOptions<CALL_OPTIONS = never, ToolSet extends Record<string, IgniterAgentToolset$1> = Record<string, IgniterAgentToolset$1>, OUTPUT extends IgniterAgentOutput = never> = IgniterAgentCallOptions<CALL_OPTIONS, ToolSet, OUTPUT>;
|
|
641
|
+
|
|
546
642
|
/**
|
|
547
643
|
* @fileoverview Type definitions for IgniterAgent Builder pattern classes.
|
|
548
644
|
* This module contains all interfaces for the fluent builder API.
|
|
@@ -682,12 +778,18 @@ type IgniterAgentMCPPartialConfig<TType extends IgniterAgentToolsetType = Ignite
|
|
|
682
778
|
*
|
|
683
779
|
* // Generate a response
|
|
684
780
|
* const result = await agent.generate({
|
|
685
|
-
*
|
|
781
|
+
* chatId: 'chat_123',
|
|
782
|
+
* userId: 'user_123',
|
|
783
|
+
* context: { locale: 'pt' },
|
|
784
|
+
* message: { role: 'user', content: 'Hello!' }
|
|
686
785
|
* });
|
|
687
786
|
*
|
|
688
787
|
* // Stream a response
|
|
689
788
|
* const stream = await agent.stream({
|
|
690
|
-
*
|
|
789
|
+
* chatId: 'chat_123',
|
|
790
|
+
* userId: 'user_123',
|
|
791
|
+
* context: { locale: 'pt' },
|
|
792
|
+
* message: { role: 'user', content: 'Tell me a story' }
|
|
691
793
|
* });
|
|
692
794
|
* ```
|
|
693
795
|
*
|
|
@@ -735,41 +837,44 @@ interface IgniterAgentBuiltAgent<TContextSchema extends z.ZodSchema = never, TTo
|
|
|
735
837
|
* Generates a single response from the agent.
|
|
736
838
|
*
|
|
737
839
|
* @description
|
|
738
|
-
* Sends messages to the agent and waits for a complete response.
|
|
840
|
+
* Sends a message (or messages) to the agent and waits for a complete response.
|
|
841
|
+
* When both are provided, `message` takes precedence.
|
|
739
842
|
* Supports context options for dynamic prompt generation.
|
|
740
843
|
*
|
|
741
|
-
* @param input - The call parameters including
|
|
844
|
+
* @param input - The call parameters including `chatId`, `userId`, `context`, and message or messages
|
|
742
845
|
* @returns The generation result with response and tool calls
|
|
743
846
|
*
|
|
744
847
|
* @example
|
|
745
848
|
* ```typescript
|
|
746
849
|
* const result = await agent.generate({
|
|
747
|
-
*
|
|
748
|
-
*
|
|
749
|
-
*
|
|
750
|
-
*
|
|
850
|
+
* chatId: 'chat_123',
|
|
851
|
+
* userId: 'user_123',
|
|
852
|
+
* context: { locale: 'pt' },
|
|
853
|
+
* message: { role: 'user', content: 'What is TypeScript?' }
|
|
751
854
|
* });
|
|
752
855
|
*
|
|
753
856
|
* console.log('Response:', result.text);
|
|
754
857
|
* ```
|
|
755
858
|
*/
|
|
756
|
-
generate(
|
|
859
|
+
generate<CALL_OPTIONS = never, OUTPUT extends IgniterAgentOutput = never>(params: IgniterAgentGenerateOptions<CALL_OPTIONS, TToolsets, OUTPUT>): Promise<GenerateTextResult<IgniterAgentToolsetParsed<TToolsets>, OUTPUT>>;
|
|
757
860
|
/**
|
|
758
861
|
* Streams a response from the agent.
|
|
759
862
|
*
|
|
760
863
|
* @description
|
|
761
|
-
* Sends messages to the agent and returns a stream of response chunks.
|
|
864
|
+
* Sends a message (or messages) to the agent and returns a stream of response chunks.
|
|
865
|
+
* When both are provided, `message` takes precedence.
|
|
762
866
|
* Ideal for real-time UI updates and long responses.
|
|
763
867
|
*
|
|
764
|
-
* @param input - The stream parameters including
|
|
868
|
+
* @param input - The stream parameters including `chatId`, `userId`, `context`, and message or messages
|
|
765
869
|
* @returns A stream of response chunks
|
|
766
870
|
*
|
|
767
871
|
* @example
|
|
768
872
|
* ```typescript
|
|
769
873
|
* const stream = await agent.stream({
|
|
770
|
-
*
|
|
771
|
-
*
|
|
772
|
-
*
|
|
874
|
+
* chatId: 'chat_123',
|
|
875
|
+
* userId: 'user_123',
|
|
876
|
+
* context: { locale: 'pt' },
|
|
877
|
+
* message: { role: 'user', content: 'Write a poem about coding' }
|
|
773
878
|
* });
|
|
774
879
|
*
|
|
775
880
|
* for await (const chunk of stream) {
|
|
@@ -777,7 +882,7 @@ interface IgniterAgentBuiltAgent<TContextSchema extends z.ZodSchema = never, TTo
|
|
|
777
882
|
* }
|
|
778
883
|
* ```
|
|
779
884
|
*/
|
|
780
|
-
stream(
|
|
885
|
+
stream<CALL_OPTIONS = never, OUTPUT extends IgniterAgentOutput = never>(params: IgniterAgentStreamOptions<CALL_OPTIONS, TToolsets, OUTPUT>): Promise<StreamTextResult<IgniterAgentToolsetParsed<TToolsets>, OUTPUT>>;
|
|
781
886
|
/**
|
|
782
887
|
* Gets all registered toolsets.
|
|
783
888
|
*
|
|
@@ -901,6 +1006,96 @@ interface IgniterAgentToolDefinition<TInputSchema = unknown, TOutputSchema = unk
|
|
|
901
1006
|
execute: (params: TInputSchema, options?: IgniterAgentToolExecuteOptions) => TOutputSchema | Promise<TOutputSchema>;
|
|
902
1007
|
}
|
|
903
1008
|
|
|
1009
|
+
/**
|
|
1010
|
+
* Context types for AI SDK's experimental_context integration.
|
|
1011
|
+
*
|
|
1012
|
+
* @module @igniter-js/agents/types/context
|
|
1013
|
+
*/
|
|
1014
|
+
|
|
1015
|
+
/**
|
|
1016
|
+
* Core execution context that flows through tools via AI SDK.
|
|
1017
|
+
*
|
|
1018
|
+
* This merges your custom context with required system fields.
|
|
1019
|
+
* Your context fields are available at the top level alongside writer and metadata.
|
|
1020
|
+
*
|
|
1021
|
+
* @template TContext - Your custom context type (must be an object)
|
|
1022
|
+
*
|
|
1023
|
+
* @example Basic usage
|
|
1024
|
+
* ```typescript
|
|
1025
|
+
* // Define your context type
|
|
1026
|
+
* interface MyAppContext {
|
|
1027
|
+
* userId: string;
|
|
1028
|
+
* db: Database;
|
|
1029
|
+
* }
|
|
1030
|
+
*
|
|
1031
|
+
* // Access in tools
|
|
1032
|
+
* const ctx: IgniterAgentExecutionContext<MyAppContext> = {
|
|
1033
|
+
* userId: '123',
|
|
1034
|
+
* db: database,
|
|
1035
|
+
* writer: streamWriter,
|
|
1036
|
+
* metadata: { agent: 'my-agent' }
|
|
1037
|
+
* };
|
|
1038
|
+
* ```
|
|
1039
|
+
*/
|
|
1040
|
+
type IgniterAgentExecutionContext<TContext extends Record<string, unknown> = Record<string, unknown>> = TContext & {
|
|
1041
|
+
/** Stream writer for real-time updates and artifacts */
|
|
1042
|
+
writer: UIMessageStreamWriter;
|
|
1043
|
+
/** Metadata about the current execution */
|
|
1044
|
+
metadata?: IgniterAgentExecutionContextMetadata;
|
|
1045
|
+
/** Memory configuration for persistent context */
|
|
1046
|
+
memory?: IgniterAgentMemoryConfig;
|
|
1047
|
+
};
|
|
1048
|
+
/**
|
|
1049
|
+
* Metadata about the current agent execution.
|
|
1050
|
+
*
|
|
1051
|
+
* @example
|
|
1052
|
+
* ```typescript
|
|
1053
|
+
* const metadata: IgniterAgentExecutionContextMetadata = {
|
|
1054
|
+
* agent: 'reports-agent',
|
|
1055
|
+
* requestId: 'req_123',
|
|
1056
|
+
* startTime: new Date()
|
|
1057
|
+
* };
|
|
1058
|
+
* ```
|
|
1059
|
+
*/
|
|
1060
|
+
interface IgniterAgentExecutionContextMetadata {
|
|
1061
|
+
/** Current agent name */
|
|
1062
|
+
agent?: string;
|
|
1063
|
+
/** Execution start time */
|
|
1064
|
+
startTime?: Date;
|
|
1065
|
+
/** Request ID for tracing */
|
|
1066
|
+
requestId?: string;
|
|
1067
|
+
/** Chat ID for memory scope */
|
|
1068
|
+
chatId?: string;
|
|
1069
|
+
/** User ID for memory scope */
|
|
1070
|
+
userId?: string;
|
|
1071
|
+
/** Any custom metadata */
|
|
1072
|
+
[key: string]: unknown;
|
|
1073
|
+
}
|
|
1074
|
+
/**
|
|
1075
|
+
* Type-safe context creator options.
|
|
1076
|
+
*
|
|
1077
|
+
* @template TContext - Your custom context type (must be an object)
|
|
1078
|
+
*
|
|
1079
|
+
* @example
|
|
1080
|
+
* ```typescript
|
|
1081
|
+
* const options: IgniterAgentContextOptions<MyAppContext> = {
|
|
1082
|
+
* context: { userId: '123', db: database },
|
|
1083
|
+
* writer: streamWriter,
|
|
1084
|
+
* metadata: { agent: 'reports' }
|
|
1085
|
+
* };
|
|
1086
|
+
* ```
|
|
1087
|
+
*/
|
|
1088
|
+
interface IgniterAgentContextOptions<TContext extends Record<string, unknown> = Record<string, unknown>> {
|
|
1089
|
+
/** Your custom application context - spread at the top level */
|
|
1090
|
+
context?: TContext;
|
|
1091
|
+
/** Stream writer (required in streaming mode) */
|
|
1092
|
+
writer?: UIMessageStreamWriter;
|
|
1093
|
+
/** Memory configuration for persistent context */
|
|
1094
|
+
memory?: IgniterAgentMemoryConfig;
|
|
1095
|
+
/** Metadata for tracing and scope */
|
|
1096
|
+
metadata: IgniterAgentExecutionContextMetadata;
|
|
1097
|
+
}
|
|
1098
|
+
|
|
904
1099
|
/**
|
|
905
1100
|
* Status of an agent in the manager.
|
|
906
1101
|
*
|
|
@@ -1020,7 +1215,12 @@ type KeysOfType<T, V> = {
|
|
|
1020
1215
|
*
|
|
1021
1216
|
* // Route to specific agent
|
|
1022
1217
|
* const agent = manager.get('support');
|
|
1023
|
-
* const response = await agent.generate({
|
|
1218
|
+
* const response = await agent.generate({
|
|
1219
|
+
* chatId: 'chat_123',
|
|
1220
|
+
* userId: 'user_123',
|
|
1221
|
+
* context: {},
|
|
1222
|
+
* message: { role: 'user', content: 'Hello!' }
|
|
1223
|
+
* });
|
|
1024
1224
|
* ```
|
|
1025
1225
|
*
|
|
1026
1226
|
* @module core/manager
|
|
@@ -1070,7 +1270,10 @@ type KeysOfType<T, V> = {
|
|
|
1070
1270
|
* // Use specific agent
|
|
1071
1271
|
* const agent = manager.get('code');
|
|
1072
1272
|
* const result = await agent.generate({
|
|
1073
|
-
*
|
|
1273
|
+
* chatId: 'chat_123',
|
|
1274
|
+
* userId: 'user_123',
|
|
1275
|
+
* context: {},
|
|
1276
|
+
* message: { role: 'user', content: 'Write a test' }
|
|
1074
1277
|
* });
|
|
1075
1278
|
*
|
|
1076
1279
|
* // Get status
|
|
@@ -1206,7 +1409,12 @@ declare class IgniterAgentManagerCore<TAgentRegistry extends Record<string, Igni
|
|
|
1206
1409
|
* @example
|
|
1207
1410
|
* ```typescript
|
|
1208
1411
|
* const agent = manager.get('support');
|
|
1209
|
-
* const response = await agent.generate({
|
|
1412
|
+
* const response = await agent.generate({
|
|
1413
|
+
* chatId: 'chat_123',
|
|
1414
|
+
* userId: 'user_123',
|
|
1415
|
+
* context: {},
|
|
1416
|
+
* message: { role: 'user', content: 'Hello!' }
|
|
1417
|
+
* });
|
|
1210
1418
|
* ```
|
|
1211
1419
|
*/
|
|
1212
1420
|
get<TName extends string>(name: TName): TAgentRegistry[TName];
|
|
@@ -1297,7 +1505,7 @@ declare class IgniterAgentMemoryCore implements IgniterAgentMemoryRuntime {
|
|
|
1297
1505
|
deleteChat(chatId: string): Promise<void>;
|
|
1298
1506
|
}
|
|
1299
1507
|
|
|
1300
|
-
declare class IgniterAgentCore<TAgentName extends string = string, TAgentModel extends LanguageModel = LanguageModel, TAgentInstructions extends IgniterAgentPromptTemplate = IgniterAgentPromptTemplate, TAgentToolsets extends Record<string, IgniterAgentToolset$1
|
|
1508
|
+
declare class IgniterAgentCore<TAgentName extends string = string, TAgentModel extends LanguageModel = LanguageModel, TAgentInstructions extends IgniterAgentPromptTemplate = IgniterAgentPromptTemplate, TAgentToolsets extends Record<string, IgniterAgentToolset$1<any, any>> = Record<string, IgniterAgentToolset$1<any, any>>, TAgentMCPConfigs extends Record<string, IgniterAgentMCPConfigUnion> = Record<string, IgniterAgentMCPConfigUnion>, TAgentContextSchema extends z.ZodSchema = z.ZodSchema> {
|
|
1301
1509
|
private _agent;
|
|
1302
1510
|
private logger?;
|
|
1303
1511
|
private telemetry?;
|
|
@@ -1329,13 +1537,27 @@ declare class IgniterAgentCore<TAgentName extends string = string, TAgentModel e
|
|
|
1329
1537
|
*/
|
|
1330
1538
|
stop(): Promise<void>;
|
|
1331
1539
|
/**
|
|
1332
|
-
* Generates a response
|
|
1540
|
+
* Generates a response for the given message or messages.
|
|
1541
|
+
*
|
|
1542
|
+
* @description
|
|
1543
|
+
* Accepts either a single `message` or an array of `messages`.
|
|
1544
|
+
* When both are provided, `message` takes precedence.
|
|
1545
|
+
*
|
|
1546
|
+
* @param params - The parameters for the generate call.
|
|
1547
|
+
* @returns The generated response.
|
|
1333
1548
|
*/
|
|
1334
|
-
generate(
|
|
1549
|
+
generate<CALL_OPTIONS = never, OUTPUT extends IgniterAgentOutput = never>(params: IgniterAgentGenerateOptions<CALL_OPTIONS, TAgentToolsets, OUTPUT>): Promise<ai.GenerateTextResult<IgniterAgentToolsetParsed<TAgentToolsets>, IgniterAgentOutput<any, any>>>;
|
|
1335
1550
|
/**
|
|
1336
|
-
* Streams a response
|
|
1551
|
+
* Streams a response for the given message or messages.
|
|
1552
|
+
*
|
|
1553
|
+
* @description
|
|
1554
|
+
* Accepts either a single `message` or an array of `messages`.
|
|
1555
|
+
* When both are provided, `message` takes precedence.
|
|
1556
|
+
*
|
|
1557
|
+
* @param params - The parameters for the stream call.
|
|
1558
|
+
* @returns The streaming response.
|
|
1337
1559
|
*/
|
|
1338
|
-
stream(
|
|
1560
|
+
stream<CALL_OPTIONS = never, OUTPUT extends IgniterAgentOutput = never>(params: IgniterAgentStreamOptions<CALL_OPTIONS, TAgentToolsets, OUTPUT>): Promise<ai.StreamTextResult<IgniterAgentToolsetParsed<TAgentToolsets>, IgniterAgentOutput<any, any>>>;
|
|
1339
1561
|
/**
|
|
1340
1562
|
* Gets all registered toolsets.
|
|
1341
1563
|
*/
|
|
@@ -1356,10 +1578,17 @@ declare class IgniterAgentCore<TAgentName extends string = string, TAgentModel e
|
|
|
1356
1578
|
* Gets all registered tools from all toolsets.
|
|
1357
1579
|
*/
|
|
1358
1580
|
getTools(): ToolSet;
|
|
1359
|
-
|
|
1360
|
-
|
|
1581
|
+
/**
|
|
1582
|
+
* Gets error attributes for telemetry.
|
|
1583
|
+
*/
|
|
1361
1584
|
private getErrorAttributes;
|
|
1362
|
-
|
|
1585
|
+
/**
|
|
1586
|
+
* Gets an agent instance with the given context.
|
|
1587
|
+
*/
|
|
1588
|
+
private prepare;
|
|
1589
|
+
private initializeChatMemory;
|
|
1590
|
+
private resolveMessageInput;
|
|
1591
|
+
private initializeTools;
|
|
1363
1592
|
private initializeMCPClient;
|
|
1364
1593
|
}
|
|
1365
1594
|
|
|
@@ -1450,8 +1679,10 @@ type IgniterAgentManager = typeof IgniterAgentManagerBuilder;
|
|
|
1450
1679
|
*
|
|
1451
1680
|
* // Generate a response
|
|
1452
1681
|
* const result = await agent.generate({
|
|
1453
|
-
*
|
|
1454
|
-
*
|
|
1682
|
+
* chatId: 'chat_456',
|
|
1683
|
+
* userId: 'user_123',
|
|
1684
|
+
* context: { locale: 'pt' },
|
|
1685
|
+
* message: { role: 'user', content: 'Hello!' }
|
|
1455
1686
|
* });
|
|
1456
1687
|
* ```
|
|
1457
1688
|
*
|
|
@@ -1542,14 +1773,16 @@ type IgniterAgentManager = typeof IgniterAgentManagerBuilder;
|
|
|
1542
1773
|
* await agent.start();
|
|
1543
1774
|
*
|
|
1544
1775
|
* const response = await agent.generate({
|
|
1545
|
-
*
|
|
1546
|
-
*
|
|
1776
|
+
* chatId: 'chat_456',
|
|
1777
|
+
* userId: 'user_123',
|
|
1778
|
+
* context: { projectId: 'proj_456' },
|
|
1779
|
+
* message: { role: 'user', content: 'Help me write a test' }
|
|
1547
1780
|
* });
|
|
1548
1781
|
* ```
|
|
1549
1782
|
*
|
|
1550
1783
|
* @public
|
|
1551
1784
|
*/
|
|
1552
|
-
declare class IgniterAgentBuilder<TAgentName extends string = string, TAgentModel extends LanguageModel = LanguageModel, TAgentInstructions extends IgniterAgentPromptTemplate = IgniterAgentPromptTemplate, TAgentToolsets extends Record<string, IgniterAgentToolset$1> = Record<string, IgniterAgentToolset$1>, TAgentMCPConfigs extends Record<string, IgniterAgentMCPConfigUnion> = Record<string, IgniterAgentMCPConfigUnion>, TAgentContextSchema extends z.ZodSchema =
|
|
1785
|
+
declare class IgniterAgentBuilder<TAgentName extends string = string, TAgentModel extends LanguageModel = LanguageModel, TAgentInstructions extends IgniterAgentPromptTemplate = IgniterAgentPromptTemplate, TAgentToolsets extends Record<string, IgniterAgentToolset$1> = Record<string, IgniterAgentToolset$1>, TAgentMCPConfigs extends Record<string, IgniterAgentMCPConfigUnion> = Record<string, IgniterAgentMCPConfigUnion>, TAgentContextSchema extends z.ZodSchema = never> {
|
|
1553
1786
|
/**
|
|
1554
1787
|
* The agent configuration being built.
|
|
1555
1788
|
* @internal
|
|
@@ -1719,13 +1952,13 @@ declare class IgniterAgentBuilder<TAgentName extends string = string, TAgentMode
|
|
|
1719
1952
|
*
|
|
1720
1953
|
* // Context is type-safe when calling generate
|
|
1721
1954
|
* await agent.generate({
|
|
1722
|
-
*
|
|
1723
|
-
*
|
|
1724
|
-
*
|
|
1725
|
-
* chatId: 'chat_456',
|
|
1955
|
+
* chatId: 'chat_456',
|
|
1956
|
+
* userId: 'user_123',
|
|
1957
|
+
* context: {
|
|
1726
1958
|
* userRole: 'admin',
|
|
1727
1959
|
* preferences: { language: 'pt' }
|
|
1728
|
-
* }
|
|
1960
|
+
* },
|
|
1961
|
+
* message: { role: 'user', content: 'Hello!' }
|
|
1729
1962
|
* });
|
|
1730
1963
|
* ```
|
|
1731
1964
|
*
|
|
@@ -1835,7 +2068,10 @@ declare class IgniterAgentBuilder<TAgentName extends string = string, TAgentMode
|
|
|
1835
2068
|
*
|
|
1836
2069
|
* // Generate a response
|
|
1837
2070
|
* const result = await agent.generate({
|
|
1838
|
-
*
|
|
2071
|
+
* chatId: 'chat_123',
|
|
2072
|
+
* userId: 'user_123',
|
|
2073
|
+
* context: {},
|
|
2074
|
+
* message: { role: 'user', content: 'Hello!' }
|
|
1839
2075
|
* });
|
|
1840
2076
|
*
|
|
1841
2077
|
* // Access configuration
|
|
@@ -2724,8 +2960,9 @@ declare const IgniterAgentMCPClient: {
|
|
|
2724
2960
|
*
|
|
2725
2961
|
* @public
|
|
2726
2962
|
*/
|
|
2727
|
-
declare class IgniterAgentPromptBuilder<TTemplate extends string = string, TContext extends Record<string, unknown> = Record<string, unknown
|
|
2963
|
+
declare class IgniterAgentPromptBuilder<TTemplate extends string = string, TContext extends Record<string, unknown> = Record<string, unknown>, TAppended extends Record<string, IgniterAgentPromptTemplate<TContext, {}> | string> = {}> implements IgniterAgentPromptTemplate<TContext, TAppended> {
|
|
2728
2964
|
private readonly template;
|
|
2965
|
+
private readonly appended;
|
|
2729
2966
|
private constructor();
|
|
2730
2967
|
/**
|
|
2731
2968
|
* Creates a new prompt builder.
|
|
@@ -2733,7 +2970,7 @@ declare class IgniterAgentPromptBuilder<TTemplate extends string = string, TCont
|
|
|
2733
2970
|
* @param template - Prompt template string with {{placeholders}}
|
|
2734
2971
|
* @returns A new prompt builder instance
|
|
2735
2972
|
*/
|
|
2736
|
-
static create<TNewTemplate extends string>(template: TNewTemplate): IgniterAgentPromptBuilder<TNewTemplate, Record<string, unknown>>;
|
|
2973
|
+
static create<TNewTemplate extends string>(template: TNewTemplate, appended?: Record<string, IgniterAgentPromptTemplate<{}, {}> | string>): IgniterAgentPromptBuilder<TNewTemplate, Record<string, unknown>>;
|
|
2737
2974
|
/**
|
|
2738
2975
|
* Builds the prompt string with the provided context.
|
|
2739
2976
|
*
|
|
@@ -2741,6 +2978,18 @@ declare class IgniterAgentPromptBuilder<TTemplate extends string = string, TCont
|
|
|
2741
2978
|
* @returns The resolved prompt string
|
|
2742
2979
|
*/
|
|
2743
2980
|
build(context: TContext): string;
|
|
2981
|
+
/**
|
|
2982
|
+
* Appends another prompt template to this one.
|
|
2983
|
+
*/
|
|
2984
|
+
addAppended<K extends string>(key: K, prompt: IgniterAgentPromptTemplate<TContext, TAppended> | string): IgniterAgentPromptTemplate<TContext, TAppended & Record<K, IgniterAgentPromptTemplate<TContext, TAppended> | string>>;
|
|
2985
|
+
/**
|
|
2986
|
+
* Removes an appended prompt template from this one.
|
|
2987
|
+
*/
|
|
2988
|
+
removeAppended<K extends string>(key: K): IgniterAgentPromptTemplate<TContext, Omit<TAppended, K>>;
|
|
2989
|
+
/**
|
|
2990
|
+
* Returns the appended prompts.
|
|
2991
|
+
*/
|
|
2992
|
+
getAppended(): TAppended;
|
|
2744
2993
|
/**
|
|
2745
2994
|
* Returns the raw prompt template string.
|
|
2746
2995
|
*/
|
|
@@ -2765,7 +3014,7 @@ type IgniterAgentPrompt = typeof IgniterAgentPromptBuilder;
|
|
|
2765
3014
|
*
|
|
2766
3015
|
* @description
|
|
2767
3016
|
* The error system in IgniterAgent follows these principles:
|
|
2768
|
-
* - All errors extend IgniterError from @igniter-js/
|
|
3017
|
+
* - All errors extend IgniterError from @igniter-js/common for consistency
|
|
2769
3018
|
* - Errors include rich context for debugging
|
|
2770
3019
|
* - Error codes enable programmatic error handling
|
|
2771
3020
|
* - Stack traces are preserved for debugging
|
|
@@ -2776,11 +3025,16 @@ type IgniterAgentPrompt = typeof IgniterAgentPromptBuilder;
|
|
|
2776
3025
|
* IgniterAgentError,
|
|
2777
3026
|
* IgniterAgentMCPError,
|
|
2778
3027
|
* IgniterAgentToolError,
|
|
2779
|
-
* isIgniterAgentError
|
|
2780
|
-
* } from
|
|
3028
|
+
* isIgniterAgentError,
|
|
3029
|
+
* } from "@igniter-js/agents";
|
|
2781
3030
|
*
|
|
2782
3031
|
* try {
|
|
2783
|
-
* await agent.generate({
|
|
3032
|
+
* await agent.generate({
|
|
3033
|
+
* chatId: 'chat_123',
|
|
3034
|
+
* userId: 'user_123',
|
|
3035
|
+
* context: {},
|
|
3036
|
+
* messages: []
|
|
3037
|
+
* });
|
|
2784
3038
|
* } catch (error) {
|
|
2785
3039
|
* if (isIgniterAgentError(error)) {
|
|
2786
3040
|
* console.error(`[${error.code}] ${error.message}`);
|
|
@@ -2879,7 +3133,7 @@ interface IgniterAgentErrorOptions {
|
|
|
2879
3133
|
*
|
|
2880
3134
|
* @description
|
|
2881
3135
|
* All custom errors in the IgniterAgent library extend this class,
|
|
2882
|
-
* which itself extends IgniterError from @igniter-js/
|
|
3136
|
+
* which itself extends IgniterError from @igniter-js/common.
|
|
2883
3137
|
* It provides a consistent interface for error handling, including
|
|
2884
3138
|
* error codes, context, and cause tracking.
|
|
2885
3139
|
*
|
|
@@ -3041,7 +3295,12 @@ declare class IgniterAgentAdapterError extends IgniterAgentError {
|
|
|
3041
3295
|
* @example
|
|
3042
3296
|
* ```typescript
|
|
3043
3297
|
* try {
|
|
3044
|
-
* await agent.generate({
|
|
3298
|
+
* await agent.generate({
|
|
3299
|
+
* chatId: 'chat_123',
|
|
3300
|
+
* userId: 'user_123',
|
|
3301
|
+
* context: {},
|
|
3302
|
+
* messages: []
|
|
3303
|
+
* });
|
|
3045
3304
|
* } catch (error) {
|
|
3046
3305
|
* if (isIgniterAgentError(error)) {
|
|
3047
3306
|
* // TypeScript knows error is IgniterAgentError
|
|
@@ -3172,4 +3431,138 @@ declare class IgniterAgentValidationUtils {
|
|
|
3172
3431
|
static isPlainObject(value: unknown): value is Record<string, unknown>;
|
|
3173
3432
|
}
|
|
3174
3433
|
|
|
3175
|
-
|
|
3434
|
+
/**
|
|
3435
|
+
* Context Management using AI SDK's experimental_context
|
|
3436
|
+
*
|
|
3437
|
+
* This provides type-safe context that flows through tools via AI SDK's
|
|
3438
|
+
* built-in experimental_context parameter.
|
|
3439
|
+
*
|
|
3440
|
+
* Key features:
|
|
3441
|
+
* - Uses AI SDK's official context mechanism
|
|
3442
|
+
* - Fully flexible user context - pass ANY type you want (object, string, class instance, etc.)
|
|
3443
|
+
* - Stream writer for artifacts and real-time updates
|
|
3444
|
+
* - Type-safe with full TypeScript support
|
|
3445
|
+
* - Available in all tools via executionOptions.experimental_context
|
|
3446
|
+
*
|
|
3447
|
+
* @module @igniter-js/agents/utils/context
|
|
3448
|
+
*/
|
|
3449
|
+
|
|
3450
|
+
/**
|
|
3451
|
+
* Static utility class for managing Agent execution context.
|
|
3452
|
+
*
|
|
3453
|
+
* Provides methods to create and extract type-safe context that flows
|
|
3454
|
+
* through tools via AI SDK's experimental_context parameter.
|
|
3455
|
+
*
|
|
3456
|
+
* @example Creating context
|
|
3457
|
+
* ```typescript
|
|
3458
|
+
* const context = IgniterAgentContext.create({
|
|
3459
|
+
* context: { userId: '123', db: database },
|
|
3460
|
+
* writer: streamWriter
|
|
3461
|
+
* });
|
|
3462
|
+
* ```
|
|
3463
|
+
*
|
|
3464
|
+
* @example Extracting context in tools
|
|
3465
|
+
* ```typescript
|
|
3466
|
+
* export const myTool = tool({
|
|
3467
|
+
* execute: async (params, executionOptions) => {
|
|
3468
|
+
* const ctx = IgniterAgentContext.get<MyContext>(executionOptions);
|
|
3469
|
+
* const user = await ctx?.db.users.findOne(ctx.userId);
|
|
3470
|
+
* }
|
|
3471
|
+
* });
|
|
3472
|
+
* ```
|
|
3473
|
+
*/
|
|
3474
|
+
declare class IgniterAgentContext {
|
|
3475
|
+
/**
|
|
3476
|
+
* Private constructor to prevent instantiation.
|
|
3477
|
+
* This is a static-only utility class.
|
|
3478
|
+
*/
|
|
3479
|
+
private constructor();
|
|
3480
|
+
/**
|
|
3481
|
+
* Creates an execution context to pass to AI SDK's experimental_context.
|
|
3482
|
+
*
|
|
3483
|
+
* Your context object is spread at the top level, merged with writer and metadata.
|
|
3484
|
+
* This means you can access your fields directly without a wrapper.
|
|
3485
|
+
*
|
|
3486
|
+
* @template TContext - Your custom context type (must be an object)
|
|
3487
|
+
* @param options - The context creation options
|
|
3488
|
+
* @returns The merged execution context ready for AI SDK
|
|
3489
|
+
*
|
|
3490
|
+
* @example Basic usage
|
|
3491
|
+
* ```typescript
|
|
3492
|
+
* const context = IgniterAgentContext.create({
|
|
3493
|
+
* context: { userId: '123', db: database, permissions: ['read', 'write'] },
|
|
3494
|
+
* writer: streamWriter
|
|
3495
|
+
* });
|
|
3496
|
+
* // Access in tools: executionOptions.experimental_context.userId
|
|
3497
|
+
* ```
|
|
3498
|
+
*
|
|
3499
|
+
* @example With typed context
|
|
3500
|
+
* ```typescript
|
|
3501
|
+
* interface MyAppContext {
|
|
3502
|
+
* tenant: string;
|
|
3503
|
+
* workspace: string;
|
|
3504
|
+
* features: string[];
|
|
3505
|
+
* }
|
|
3506
|
+
*
|
|
3507
|
+
* const context = IgniterAgentContext.create<MyAppContext>({
|
|
3508
|
+
* context: { tenant: 'acme', workspace: 'main', features: ['analytics'] },
|
|
3509
|
+
* writer: streamWriter
|
|
3510
|
+
* });
|
|
3511
|
+
* // Access in tools: executionOptions.experimental_context.tenant
|
|
3512
|
+
* ```
|
|
3513
|
+
*
|
|
3514
|
+
* @example With metadata for tracing
|
|
3515
|
+
* ```typescript
|
|
3516
|
+
* const context = IgniterAgentContext.create({
|
|
3517
|
+
* context: { userId: '123', tenantId: 'acme' },
|
|
3518
|
+
* writer: streamWriter,
|
|
3519
|
+
* metadata: { agent: 'reports', requestId: 'req_123' }
|
|
3520
|
+
* });
|
|
3521
|
+
* ```
|
|
3522
|
+
*/
|
|
3523
|
+
static create<TContext extends Record<string, unknown> = Record<string, unknown>>(options: IgniterAgentContextOptions<TContext>): IgniterAgentExecutionContext<TContext>;
|
|
3524
|
+
/**
|
|
3525
|
+
* Gets your custom context from execution options.
|
|
3526
|
+
*
|
|
3527
|
+
* Your context fields are available directly in experimental_context (no wrapper).
|
|
3528
|
+
* This helper provides type-safe access.
|
|
3529
|
+
*
|
|
3530
|
+
* @template T - Your custom context type (object)
|
|
3531
|
+
* @param executionOptions - Tool execution options from AI SDK
|
|
3532
|
+
* @returns Your custom context or undefined if not available
|
|
3533
|
+
*
|
|
3534
|
+
* @example Direct access (no helper needed)
|
|
3535
|
+
* ```typescript
|
|
3536
|
+
* export const myTool = tool({
|
|
3537
|
+
* execute: async (params, executionOptions) => {
|
|
3538
|
+
* // Access fields directly
|
|
3539
|
+
* const userId = executionOptions.experimental_context.userId;
|
|
3540
|
+
* const db = executionOptions.experimental_context.db;
|
|
3541
|
+
* }
|
|
3542
|
+
* });
|
|
3543
|
+
* ```
|
|
3544
|
+
*
|
|
3545
|
+
* @example With typed helper
|
|
3546
|
+
* ```typescript
|
|
3547
|
+
* interface AppContext {
|
|
3548
|
+
* userId: string;
|
|
3549
|
+
* tenantId: string;
|
|
3550
|
+
* db: Database;
|
|
3551
|
+
* }
|
|
3552
|
+
*
|
|
3553
|
+
* export const myTool = tool({
|
|
3554
|
+
* execute: async (params, executionOptions) => {
|
|
3555
|
+
* const ctx = IgniterAgentContext.get<AppContext>(executionOptions);
|
|
3556
|
+
* if (ctx) {
|
|
3557
|
+
* const user = await ctx.db.users.findOne(ctx.userId);
|
|
3558
|
+
* }
|
|
3559
|
+
* }
|
|
3560
|
+
* });
|
|
3561
|
+
* ```
|
|
3562
|
+
*/
|
|
3563
|
+
static get<T extends Record<string, unknown> = Record<string, unknown>>(executionOptions?: {
|
|
3564
|
+
experimental_context?: T;
|
|
3565
|
+
}): T | undefined;
|
|
3566
|
+
}
|
|
3567
|
+
|
|
3568
|
+
export { type DeepPartial, type DeepRequired, IgniterAgent, IgniterAgentAdapterError, IgniterAgentAsyncUtils, IgniterAgentBuilder, type IgniterAgentBuiltAgent, type IgniterAgentBuiltTool, type IgniterAgentBuiltToolset, IgniterAgentChatSession, type IgniterAgentConfig, IgniterAgentConfigError, type IgniterAgentConnectionStatus, IgniterAgentContext, type IgniterAgentContextOptions, IgniterAgentConversationMessage, IgniterAgentCore, IgniterAgentError, IgniterAgentErrorCode, type IgniterAgentErrorOptions, type IgniterAgentExecutionContext, type IgniterAgentExecutionContextMetadata, type IgniterAgentFlattenedToolSet, IgniterAgentGetChatsParams, IgniterAgentGetMessagesParams, type IgniterAgentHooks, type IgniterAgentInfo, IgniterAgentMCPBuilder, IgniterAgentMCPClient, type IgniterAgentMCPClientInterface, type IgniterAgentMCPConfigBase, type IgniterAgentMCPConfigUnion, IgniterAgentMCPError, type IgniterAgentMCPHttpClientInterface, type IgniterAgentMCPHttpConfig, type IgniterAgentMCPPartialConfig, type IgniterAgentMCPStdioClientInterface, type IgniterAgentMCPStdioConfig, IgniterAgentManager, IgniterAgentManagerBuilder, IgniterAgentManagerCore, type IgniterAgentManagerOptions, IgniterAgentMemoryConfig, IgniterAgentMemoryCore, IgniterAgentMemoryError, IgniterAgentMemoryRuntime, IgniterAgentObjectUtils, IgniterAgentPrompt, IgniterAgentPromptBuilder, type IgniterAgentPromptTemplate, type IgniterAgentStatus, IgniterAgentStringUtils, IgniterAgentTool, IgniterAgentToolBuilder, type IgniterAgentToolDefinition, IgniterAgentToolError, type IgniterAgentToolErrorResult, type IgniterAgentToolExecuteOptions, type IgniterAgentToolResult, type IgniterAgentToolSuccessResult, IgniterAgentToolset, IgniterAgentToolsetBuilder, type IgniterAgentToolsetParams, type IgniterAgentToolsetType, IgniterAgentUIMessage, IgniterAgentUpdateWorkingMemoryParams, IgniterAgentValidationUtils, IgniterAgentWorkingMemory, IgniterAgentWorkingMemoryParams, type InferZodSchema, type KeysOfType, isIgniterAgentError, isIgniterAgentMCPError, isIgniterAgentToolError, wrapError };
|