@iqai/adk 0.2.5 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +30 -0
- package/README.md +3 -1
- package/dist/index.d.mts +96 -60
- package/dist/index.d.ts +96 -60
- package/dist/index.js +446 -163
- package/dist/index.mjs +404 -121
- package/package.json +1 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# @iqai/adk
|
|
2
2
|
|
|
3
|
+
## 0.3.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- b6c0344: Improved adk cli experience
|
|
8
|
+
|
|
9
|
+
## 0.3.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 3561208: ## Features
|
|
14
|
+
|
|
15
|
+
- Introduced conditional typing for multi-agent responses in `EnhancedRunner`, `BuiltAgent`, and `AgentBuilderWithSchema`. The ask() method now returns appropriate response type based on agent configuration.
|
|
16
|
+
- Improved `AgentBuilder` methods (asSequential, asParallel, and related build methods) for better type propagation and correct return types for multi-agent aggregators.
|
|
17
|
+
- Output schemas can no longer be set directly on multi-agent aggregators. Schemas must now be defined on individual sub-agents.
|
|
18
|
+
|
|
19
|
+
## Fixes
|
|
20
|
+
|
|
21
|
+
- Bugfix in mergeAgentRun that caused incorrect removal of resolved promises.
|
|
22
|
+
|
|
23
|
+
## Changes
|
|
24
|
+
|
|
25
|
+
- `ask()` implementation tailored to aggregate and return per-agent responses for multi-agent setups while maintaining schema validation for single-agent cases.
|
|
26
|
+
- Now, `AgentBuilder` and `BuiltAgent` are being re-exported explicitly from the ADK entrypoint for type preservation in bundled declarations.
|
|
27
|
+
|
|
28
|
+
### Patch Changes
|
|
29
|
+
|
|
30
|
+
- c890576: Enhance structured logging and error handling in the AgentBuilder. Unify logger styles and improve warning messages for better clarity.
|
|
31
|
+
- b0fdba9: Fixes string concatination for output schema validation error
|
|
32
|
+
|
|
3
33
|
## 0.2.5
|
|
4
34
|
|
|
5
35
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -73,6 +73,7 @@ OPENAI_API_KEY=your_openai_api_key
|
|
|
73
73
|
ANTHROPIC_API_KEY=your_anthropic_api_key
|
|
74
74
|
GOOGLE_API_KEY=your_google_api_key
|
|
75
75
|
```
|
|
76
|
+
|
|
76
77
|
The library uses `dotenv` to load these variables automatically if `dotenv.config()` is called in your application.
|
|
77
78
|
|
|
78
79
|
## 📖 Basic Usage
|
|
@@ -167,6 +168,7 @@ async function createWorkflowAgent() {
|
|
|
167
168
|
```
|
|
168
169
|
|
|
169
170
|
**Benefits of AgentBuilder:**
|
|
171
|
+
|
|
170
172
|
- **Reduced Boilerplate**: ~80% less setup code compared to manual configuration
|
|
171
173
|
- **Fluent Interface**: Readable, chainable method calls
|
|
172
174
|
- **Automatic Management**: Handles session and runner creation automatically
|
|
@@ -328,4 +330,4 @@ MIT License - see [LICENSE](https://github.com/IQAIcom/adk-ts/blob/main/LICENSE.
|
|
|
328
330
|
|
|
329
331
|
---
|
|
330
332
|
|
|
331
|
-
**Ready to build your first AI agent?** Visit [https://adk.iqai.com](https://adk.iqai.com) to get started!
|
|
333
|
+
**Ready to build your first AI agent?** Visit [https://adk.iqai.com](https://adk.iqai.com) to get started!
|
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Part, Content, Blob, SpeechConfig, AudioTranscriptionConfig, RealtimeInputConfig, ProactivityConfig, FunctionDeclaration, GroundingMetadata, GenerateContentResponseUsageMetadata, GenerateContentConfig, Schema, LiveConnectConfig, GoogleGenAI, FunctionCall } from '@google/genai';
|
|
2
2
|
export { Blob, Content, FunctionDeclaration, Schema as JSONSchema } from '@google/genai';
|
|
3
3
|
import { LanguageModel } from 'ai';
|
|
4
|
-
import * as
|
|
5
|
-
import { z } from 'zod';
|
|
4
|
+
import * as z from 'zod';
|
|
5
|
+
import { z as z$1, ZodSchema, ZodType } from 'zod';
|
|
6
6
|
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
|
7
7
|
import { CreateMessageRequestSchema, CreateMessageResultSchema, Tool, CallToolResult } from '@modelcontextprotocol/sdk/types.js';
|
|
8
8
|
import { Kysely, Generated } from 'kysely';
|
|
@@ -16,20 +16,44 @@ declare class Logger {
|
|
|
16
16
|
name: string;
|
|
17
17
|
isDebugEnabled: boolean;
|
|
18
18
|
constructor({ name }: LoggerOpts);
|
|
19
|
-
private colorize;
|
|
20
19
|
debug(message: string, ...args: any[]): void;
|
|
21
20
|
info(message: string, ...args: any[]): void;
|
|
22
21
|
warn(message: string, ...args: any[]): void;
|
|
23
22
|
error(message: string, ...args: any[]): void;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
private log;
|
|
24
|
+
private extractMeta;
|
|
25
|
+
private formatArgs;
|
|
26
|
+
private parseStackFrames;
|
|
27
|
+
private stringify;
|
|
28
|
+
private capitalize;
|
|
29
|
+
formatBox(params: {
|
|
30
|
+
title: string;
|
|
31
|
+
description: string;
|
|
32
|
+
lines?: string[];
|
|
33
|
+
width?: number;
|
|
34
|
+
maxWidthPct?: number;
|
|
35
|
+
color?: (txt: string) => string;
|
|
36
|
+
pad?: number;
|
|
37
|
+
borderChar?: string;
|
|
38
|
+
}): string;
|
|
39
|
+
/**
|
|
40
|
+
* Structured warning with code, suggestion, context.
|
|
41
|
+
*/
|
|
42
|
+
warnStructured(warning: {
|
|
43
|
+
code: string;
|
|
44
|
+
message: string;
|
|
45
|
+
suggestion?: string;
|
|
46
|
+
context?: Record<string, any>;
|
|
47
|
+
severity?: "warn" | "info" | "error";
|
|
48
|
+
timestamp?: string;
|
|
49
|
+
}, opts?: {
|
|
50
|
+
format?: "pretty" | "json" | "text";
|
|
51
|
+
verbose?: boolean;
|
|
52
|
+
}): void;
|
|
28
53
|
debugStructured(title: string, data: Record<string, any>): void;
|
|
29
|
-
/**
|
|
30
|
-
* Logs array data in a compact, readable format.
|
|
31
|
-
*/
|
|
32
54
|
debugArray(title: string, items: Array<Record<string, any>>): void;
|
|
55
|
+
private objectToLines;
|
|
56
|
+
private arrayToLines;
|
|
33
57
|
}
|
|
34
58
|
|
|
35
59
|
/**
|
|
@@ -868,7 +892,7 @@ interface CreateToolConfig<T extends Record<string, any> = Record<string, never>
|
|
|
868
892
|
/** A description of what the tool does */
|
|
869
893
|
description: string;
|
|
870
894
|
/** Zod schema for validating tool arguments (optional) */
|
|
871
|
-
schema?:
|
|
895
|
+
schema?: z.ZodSchema<T>;
|
|
872
896
|
/** The function to execute (can be sync or async) */
|
|
873
897
|
fn: (args: T, context: ToolContext) => any;
|
|
874
898
|
/** Whether the tool is a long running operation */
|
|
@@ -887,7 +911,7 @@ interface CreateToolConfigWithSchema<T extends Record<string, any>> {
|
|
|
887
911
|
/** A description of what the tool does */
|
|
888
912
|
description: string;
|
|
889
913
|
/** Zod schema for validating tool arguments */
|
|
890
|
-
schema:
|
|
914
|
+
schema: z.ZodSchema<T>;
|
|
891
915
|
/** The function to execute (can be sync or async) */
|
|
892
916
|
fn: (args: T, context: ToolContext) => any;
|
|
893
917
|
/** Whether the tool is a long running operation */
|
|
@@ -1351,12 +1375,12 @@ interface LlmAgentConfig<T extends BaseLlm = BaseLlm> {
|
|
|
1351
1375
|
/**
|
|
1352
1376
|
* The input schema when agent is used as a tool
|
|
1353
1377
|
*/
|
|
1354
|
-
inputSchema?: z.ZodSchema;
|
|
1378
|
+
inputSchema?: z$1.ZodSchema;
|
|
1355
1379
|
/**
|
|
1356
1380
|
* The output schema when agent replies
|
|
1357
1381
|
* NOTE: when this is set, agent can ONLY reply and CANNOT use any tools
|
|
1358
1382
|
*/
|
|
1359
|
-
outputSchema?: z.ZodSchema;
|
|
1383
|
+
outputSchema?: z$1.ZodSchema;
|
|
1360
1384
|
/**
|
|
1361
1385
|
* Callback or list of callbacks to be called before calling the LLM
|
|
1362
1386
|
*/
|
|
@@ -1447,11 +1471,11 @@ declare class LlmAgent<T extends BaseLlm = BaseLlm> extends BaseAgent {
|
|
|
1447
1471
|
/**
|
|
1448
1472
|
* The input schema when agent is used as a tool
|
|
1449
1473
|
*/
|
|
1450
|
-
inputSchema?: z.ZodSchema;
|
|
1474
|
+
inputSchema?: z$1.ZodSchema;
|
|
1451
1475
|
/**
|
|
1452
1476
|
* The output schema when agent replies
|
|
1453
1477
|
*/
|
|
1454
|
-
outputSchema?: z.ZodSchema;
|
|
1478
|
+
outputSchema?: z$1.ZodSchema;
|
|
1455
1479
|
/**
|
|
1456
1480
|
* Callback or list of callbacks to be called before calling the LLM
|
|
1457
1481
|
*/
|
|
@@ -2023,8 +2047,8 @@ declare class McpError extends Error {
|
|
|
2023
2047
|
originalError?: Error;
|
|
2024
2048
|
constructor(message: string, type: McpErrorType, originalError?: Error);
|
|
2025
2049
|
}
|
|
2026
|
-
type McpSamplingRequest = z.infer<typeof CreateMessageRequestSchema>;
|
|
2027
|
-
type McpSamplingResponse = z.infer<typeof CreateMessageResultSchema>;
|
|
2050
|
+
type McpSamplingRequest = z$1.infer<typeof CreateMessageRequestSchema>;
|
|
2051
|
+
type McpSamplingResponse = z$1.infer<typeof CreateMessageResultSchema>;
|
|
2028
2052
|
type SamplingHandler = (request: LlmRequest) => Promise<string | LlmResponse>;
|
|
2029
2053
|
|
|
2030
2054
|
declare class McpClientService {
|
|
@@ -3974,17 +3998,8 @@ interface AgentBuilderConfig {
|
|
|
3974
3998
|
nodes?: LangGraphNode[];
|
|
3975
3999
|
rootNode?: string;
|
|
3976
4000
|
outputKey?: string;
|
|
3977
|
-
inputSchema?:
|
|
3978
|
-
outputSchema?:
|
|
3979
|
-
}
|
|
3980
|
-
/**
|
|
3981
|
-
* Session configuration options
|
|
3982
|
-
*/
|
|
3983
|
-
interface SessionOptions {
|
|
3984
|
-
userId?: string;
|
|
3985
|
-
appName?: string;
|
|
3986
|
-
state?: Record<string, any>;
|
|
3987
|
-
sessionId?: string;
|
|
4001
|
+
inputSchema?: ZodSchema;
|
|
4002
|
+
outputSchema?: ZodSchema;
|
|
3988
4003
|
}
|
|
3989
4004
|
/**
|
|
3990
4005
|
* Message part interface for flexible message input
|
|
@@ -3999,24 +4014,44 @@ interface FullMessage extends Content {
|
|
|
3999
4014
|
parts?: MessagePart[];
|
|
4000
4015
|
}
|
|
4001
4016
|
/**
|
|
4002
|
-
*
|
|
4017
|
+
* Session configuration options
|
|
4018
|
+
*/
|
|
4019
|
+
interface SessionOptions {
|
|
4020
|
+
userId?: string;
|
|
4021
|
+
appName?: string;
|
|
4022
|
+
state?: Record<string, any>;
|
|
4023
|
+
sessionId?: string;
|
|
4024
|
+
}
|
|
4025
|
+
/**
|
|
4026
|
+
* Multi-agent standardized response type
|
|
4027
|
+
*/
|
|
4028
|
+
type MultiAgentResponse = {
|
|
4029
|
+
agent: string;
|
|
4030
|
+
response: string;
|
|
4031
|
+
}[];
|
|
4032
|
+
/** Helper conditional type for ask() return */
|
|
4033
|
+
type RunnerAskReturn<T, M extends boolean> = M extends true ? MultiAgentResponse : T;
|
|
4034
|
+
/**
|
|
4035
|
+
* Enhanced runner interface with simplified API and conditional typing.
|
|
4036
|
+
* M (multi) flag determines if ask() returns a multi-agent response array.
|
|
4003
4037
|
*/
|
|
4004
|
-
interface EnhancedRunner<T = string> {
|
|
4005
|
-
ask(message: string | FullMessage | LlmRequest): Promise<T
|
|
4038
|
+
interface EnhancedRunner<T = string, M extends boolean = false> {
|
|
4039
|
+
ask(message: string | FullMessage | LlmRequest): Promise<RunnerAskReturn<T, M>>;
|
|
4006
4040
|
runAsync(params: {
|
|
4007
4041
|
userId: string;
|
|
4008
4042
|
sessionId: string;
|
|
4009
4043
|
newMessage: FullMessage;
|
|
4010
4044
|
}): AsyncIterable<Event>;
|
|
4011
|
-
__outputSchema?:
|
|
4045
|
+
__outputSchema?: ZodSchema;
|
|
4012
4046
|
}
|
|
4013
4047
|
/**
|
|
4014
4048
|
* Built agent result containing the agent and runner/session
|
|
4015
4049
|
*/
|
|
4016
|
-
interface BuiltAgent<T = string> {
|
|
4050
|
+
interface BuiltAgent<T = string, M extends boolean = false> {
|
|
4017
4051
|
agent: BaseAgent;
|
|
4018
|
-
runner: EnhancedRunner<T>;
|
|
4052
|
+
runner: EnhancedRunner<T, M>;
|
|
4019
4053
|
session: Session;
|
|
4054
|
+
sessionService: BaseSessionService;
|
|
4020
4055
|
}
|
|
4021
4056
|
/**
|
|
4022
4057
|
* Agent types that can be built
|
|
@@ -4025,10 +4060,10 @@ type AgentType = "llm" | "sequential" | "parallel" | "loop" | "langgraph";
|
|
|
4025
4060
|
/**
|
|
4026
4061
|
* AgentBuilder with typed output schema
|
|
4027
4062
|
*/
|
|
4028
|
-
interface AgentBuilderWithSchema<T> extends Omit<AgentBuilder, "build" | "ask"> {
|
|
4029
|
-
build(): Promise<BuiltAgent<T>>;
|
|
4030
|
-
buildWithSchema<U = T>(): Promise<BuiltAgent<U>>;
|
|
4031
|
-
ask(message: string | FullMessage): Promise<T
|
|
4063
|
+
interface AgentBuilderWithSchema<T, M extends boolean = false> extends Omit<AgentBuilder<any, any>, "build" | "ask" | "withOutputSchema"> {
|
|
4064
|
+
build(): Promise<BuiltAgent<T, M>>;
|
|
4065
|
+
buildWithSchema<U = T>(): Promise<BuiltAgent<U, M>>;
|
|
4066
|
+
ask(message: string | FullMessage): Promise<RunnerAskReturn<T, M>>;
|
|
4032
4067
|
}
|
|
4033
4068
|
/**
|
|
4034
4069
|
* AgentBuilder - A fluent interface for creating AI agents with automatic session management
|
|
@@ -4074,7 +4109,7 @@ interface AgentBuilderWithSchema<T> extends Omit<AgentBuilder, "build" | "ask">
|
|
|
4074
4109
|
* .build();
|
|
4075
4110
|
* ```
|
|
4076
4111
|
*/
|
|
4077
|
-
declare class AgentBuilder {
|
|
4112
|
+
declare class AgentBuilder<TOut = string, TMulti extends boolean = false> {
|
|
4078
4113
|
private config;
|
|
4079
4114
|
private sessionService?;
|
|
4080
4115
|
private sessionOptions?;
|
|
@@ -4084,8 +4119,11 @@ declare class AgentBuilder {
|
|
|
4084
4119
|
private existingSession?;
|
|
4085
4120
|
private existingAgent?;
|
|
4086
4121
|
private definitionLocked;
|
|
4087
|
-
private warnedMethods;
|
|
4088
4122
|
private logger;
|
|
4123
|
+
/**
|
|
4124
|
+
* Warn (once per method) if the definition has been locked by withAgent().
|
|
4125
|
+
*/
|
|
4126
|
+
private warnIfLocked;
|
|
4089
4127
|
/**
|
|
4090
4128
|
* Private constructor - use static create() method
|
|
4091
4129
|
*/
|
|
@@ -4095,13 +4133,13 @@ declare class AgentBuilder {
|
|
|
4095
4133
|
* @param name The name of the agent (defaults to "default_agent")
|
|
4096
4134
|
* @returns New AgentBuilder instance
|
|
4097
4135
|
*/
|
|
4098
|
-
static create(name?: string): AgentBuilder
|
|
4136
|
+
static create(name?: string): AgentBuilder<string, false>;
|
|
4099
4137
|
/**
|
|
4100
4138
|
* Convenience method to start building with a model directly
|
|
4101
4139
|
* @param model The model identifier (e.g., "gemini-2.5-flash")
|
|
4102
4140
|
* @returns New AgentBuilder instance with model set
|
|
4103
4141
|
*/
|
|
4104
|
-
static withModel(model: string | BaseLlm | LanguageModel): AgentBuilder
|
|
4142
|
+
static withModel(model: string | BaseLlm | LanguageModel): AgentBuilder<string, false>;
|
|
4105
4143
|
/**
|
|
4106
4144
|
* Set the model for the agent
|
|
4107
4145
|
* @param model The model identifier (e.g., "gemini-2.5-flash")
|
|
@@ -4120,8 +4158,8 @@ declare class AgentBuilder {
|
|
|
4120
4158
|
* @returns This builder instance for chaining
|
|
4121
4159
|
*/
|
|
4122
4160
|
withInstruction(instruction: string): this;
|
|
4123
|
-
withInputSchema(schema:
|
|
4124
|
-
withOutputSchema<T>(schema:
|
|
4161
|
+
withInputSchema(schema: ZodSchema): this;
|
|
4162
|
+
withOutputSchema<T>(schema: ZodType<T>): AgentBuilderWithSchema<T, TMulti>;
|
|
4125
4163
|
/**
|
|
4126
4164
|
* Add tools to the agent
|
|
4127
4165
|
* @param tools Tools to add to the agent
|
|
@@ -4174,13 +4212,13 @@ declare class AgentBuilder {
|
|
|
4174
4212
|
* @param subAgents Sub-agents to execute in sequence
|
|
4175
4213
|
* @returns This builder instance for chaining
|
|
4176
4214
|
*/
|
|
4177
|
-
asSequential(subAgents: BaseAgent[]):
|
|
4215
|
+
asSequential(subAgents: BaseAgent[]): AgentBuilder<TOut, true>;
|
|
4178
4216
|
/**
|
|
4179
4217
|
* Configure as a parallel agent
|
|
4180
4218
|
* @param subAgents Sub-agents to execute in parallel
|
|
4181
4219
|
* @returns This builder instance for chaining
|
|
4182
4220
|
*/
|
|
4183
|
-
asParallel(subAgents: BaseAgent[]):
|
|
4221
|
+
asParallel(subAgents: BaseAgent[]): AgentBuilder<TOut, true>;
|
|
4184
4222
|
/**
|
|
4185
4223
|
* Configure as a loop agent
|
|
4186
4224
|
* @param subAgents Sub-agents to execute iteratively
|
|
@@ -4232,18 +4270,18 @@ declare class AgentBuilder {
|
|
|
4232
4270
|
* Build the agent and optionally create runner and session
|
|
4233
4271
|
* @returns Built agent with optional runner and session
|
|
4234
4272
|
*/
|
|
4235
|
-
build<T =
|
|
4273
|
+
build<T = TOut>(): Promise<BuiltAgent<T, TMulti>>;
|
|
4236
4274
|
/**
|
|
4237
4275
|
* Type-safe build method for agents with output schemas
|
|
4238
4276
|
* Provides better type inference for the ask method return type
|
|
4239
4277
|
*/
|
|
4240
|
-
buildWithSchema<T>(): Promise<BuiltAgent<T>>;
|
|
4278
|
+
buildWithSchema<T>(): Promise<BuiltAgent<T, TMulti>>;
|
|
4241
4279
|
/**
|
|
4242
4280
|
* Quick execution helper - build and run a message
|
|
4243
4281
|
* @param message Message to send to the agent (string or full message object)
|
|
4244
4282
|
* @returns Agent response
|
|
4245
4283
|
*/
|
|
4246
|
-
ask(message: string | FullMessage): Promise<
|
|
4284
|
+
ask(message: string | FullMessage): Promise<RunnerAskReturn<TOut, TMulti>>;
|
|
4247
4285
|
/**
|
|
4248
4286
|
* Create the appropriate agent type based on configuration
|
|
4249
4287
|
* @returns Created agent instance
|
|
@@ -4266,29 +4304,25 @@ declare class AgentBuilder {
|
|
|
4266
4304
|
* @returns Enhanced runner with simplified API
|
|
4267
4305
|
*/
|
|
4268
4306
|
private createEnhancedRunner;
|
|
4269
|
-
/**
|
|
4270
|
-
* Warn (once per method) if the definition has been locked by withAgent().
|
|
4271
|
-
*/
|
|
4272
|
-
private warnIfLocked;
|
|
4273
4307
|
}
|
|
4274
4308
|
|
|
4275
4309
|
type index$5_AfterAgentCallback = AfterAgentCallback;
|
|
4276
4310
|
type index$5_AfterModelCallback = AfterModelCallback;
|
|
4277
4311
|
type index$5_AfterToolCallback = AfterToolCallback;
|
|
4278
|
-
type index$5_AgentBuilder = AgentBuilder
|
|
4312
|
+
type index$5_AgentBuilder<TOut = string, TMulti extends boolean = false> = AgentBuilder<TOut, TMulti>;
|
|
4279
4313
|
declare const index$5_AgentBuilder: typeof AgentBuilder;
|
|
4280
4314
|
type index$5_AgentBuilderConfig = AgentBuilderConfig;
|
|
4281
|
-
type index$5_AgentBuilderWithSchema<T> = AgentBuilderWithSchema<T>;
|
|
4315
|
+
type index$5_AgentBuilderWithSchema<T, M extends boolean = false> = AgentBuilderWithSchema<T, M>;
|
|
4282
4316
|
type index$5_AgentType = AgentType;
|
|
4283
4317
|
type index$5_BaseAgent = BaseAgent;
|
|
4284
4318
|
declare const index$5_BaseAgent: typeof BaseAgent;
|
|
4285
4319
|
type index$5_BeforeAgentCallback = BeforeAgentCallback;
|
|
4286
4320
|
type index$5_BeforeModelCallback = BeforeModelCallback;
|
|
4287
4321
|
type index$5_BeforeToolCallback = BeforeToolCallback;
|
|
4288
|
-
type index$5_BuiltAgent<T = string> = BuiltAgent<T>;
|
|
4322
|
+
type index$5_BuiltAgent<T = string, M extends boolean = false> = BuiltAgent<T, M>;
|
|
4289
4323
|
type index$5_CallbackContext = CallbackContext;
|
|
4290
4324
|
declare const index$5_CallbackContext: typeof CallbackContext;
|
|
4291
|
-
type index$5_EnhancedRunner<T = string> = EnhancedRunner<T>;
|
|
4325
|
+
type index$5_EnhancedRunner<T = string, M extends boolean = false> = EnhancedRunner<T, M>;
|
|
4292
4326
|
type index$5_FullMessage = FullMessage;
|
|
4293
4327
|
type index$5_InstructionProvider = InstructionProvider;
|
|
4294
4328
|
type index$5_InvocationContext = InvocationContext;
|
|
@@ -4306,6 +4340,7 @@ type index$5_LoopAgent = LoopAgent;
|
|
|
4306
4340
|
declare const index$5_LoopAgent: typeof LoopAgent;
|
|
4307
4341
|
type index$5_LoopAgentConfig = LoopAgentConfig;
|
|
4308
4342
|
type index$5_MessagePart = MessagePart;
|
|
4343
|
+
type index$5_MultiAgentResponse = MultiAgentResponse;
|
|
4309
4344
|
type index$5_ParallelAgent = ParallelAgent;
|
|
4310
4345
|
declare const index$5_ParallelAgent: typeof ParallelAgent;
|
|
4311
4346
|
type index$5_ParallelAgentConfig = ParallelAgentConfig;
|
|
@@ -4313,6 +4348,7 @@ type index$5_ReadonlyContext = ReadonlyContext;
|
|
|
4313
4348
|
declare const index$5_ReadonlyContext: typeof ReadonlyContext;
|
|
4314
4349
|
type index$5_RunConfig = RunConfig;
|
|
4315
4350
|
declare const index$5_RunConfig: typeof RunConfig;
|
|
4351
|
+
type index$5_RunnerAskReturn<T, M extends boolean> = RunnerAskReturn<T, M>;
|
|
4316
4352
|
type index$5_SequentialAgent = SequentialAgent;
|
|
4317
4353
|
declare const index$5_SequentialAgent: typeof SequentialAgent;
|
|
4318
4354
|
type index$5_SequentialAgentConfig = SequentialAgentConfig;
|
|
@@ -4329,7 +4365,7 @@ declare const index$5_createBranchContextForSubAgent: typeof createBranchContext
|
|
|
4329
4365
|
declare const index$5_mergeAgentRun: typeof mergeAgentRun;
|
|
4330
4366
|
declare const index$5_newInvocationContextId: typeof newInvocationContextId;
|
|
4331
4367
|
declare namespace index$5 {
|
|
4332
|
-
export { type index$5_AfterAgentCallback as AfterAgentCallback, type index$5_AfterModelCallback as AfterModelCallback, type index$5_AfterToolCallback as AfterToolCallback, LlmAgent as Agent, index$5_AgentBuilder as AgentBuilder, type index$5_AgentBuilderConfig as AgentBuilderConfig, type index$5_AgentBuilderWithSchema as AgentBuilderWithSchema, type index$5_AgentType as AgentType, index$5_BaseAgent as BaseAgent, type index$5_BeforeAgentCallback as BeforeAgentCallback, type index$5_BeforeModelCallback as BeforeModelCallback, type index$5_BeforeToolCallback as BeforeToolCallback, type index$5_BuiltAgent as BuiltAgent, index$5_CallbackContext as CallbackContext, type index$5_EnhancedRunner as EnhancedRunner, type index$5_FullMessage as FullMessage, type index$5_InstructionProvider as InstructionProvider, index$5_InvocationContext as InvocationContext, index$5_LangGraphAgent as LangGraphAgent, type index$5_LangGraphAgentConfig as LangGraphAgentConfig, type index$5_LangGraphNode as LangGraphNode, index$5_LlmAgent as LlmAgent, type index$5_LlmAgentConfig as LlmAgentConfig, index$5_LlmCallsLimitExceededError as LlmCallsLimitExceededError, index$5_LoopAgent as LoopAgent, type index$5_LoopAgentConfig as LoopAgentConfig, type index$5_MessagePart as MessagePart, index$5_ParallelAgent as ParallelAgent, type index$5_ParallelAgentConfig as ParallelAgentConfig, index$5_ReadonlyContext as ReadonlyContext, index$5_RunConfig as RunConfig, index$5_SequentialAgent as SequentialAgent, type index$5_SequentialAgentConfig as SequentialAgentConfig, type index$5_SessionOptions as SessionOptions, type index$5_SingleAfterModelCallback as SingleAfterModelCallback, type index$5_SingleAfterToolCallback as SingleAfterToolCallback, type index$5_SingleAgentCallback as SingleAgentCallback, type index$5_SingleBeforeModelCallback as SingleBeforeModelCallback, type index$5_SingleBeforeToolCallback as SingleBeforeToolCallback, index$5_StreamingMode as StreamingMode, type index$5_ToolUnion as ToolUnion, index$5_createBranchContextForSubAgent as createBranchContextForSubAgent, index$5_mergeAgentRun as mergeAgentRun, index$5_newInvocationContextId as newInvocationContextId };
|
|
4368
|
+
export { type index$5_AfterAgentCallback as AfterAgentCallback, type index$5_AfterModelCallback as AfterModelCallback, type index$5_AfterToolCallback as AfterToolCallback, LlmAgent as Agent, index$5_AgentBuilder as AgentBuilder, type index$5_AgentBuilderConfig as AgentBuilderConfig, type index$5_AgentBuilderWithSchema as AgentBuilderWithSchema, type index$5_AgentType as AgentType, index$5_BaseAgent as BaseAgent, type index$5_BeforeAgentCallback as BeforeAgentCallback, type index$5_BeforeModelCallback as BeforeModelCallback, type index$5_BeforeToolCallback as BeforeToolCallback, type index$5_BuiltAgent as BuiltAgent, index$5_CallbackContext as CallbackContext, type index$5_EnhancedRunner as EnhancedRunner, type index$5_FullMessage as FullMessage, type index$5_InstructionProvider as InstructionProvider, index$5_InvocationContext as InvocationContext, index$5_LangGraphAgent as LangGraphAgent, type index$5_LangGraphAgentConfig as LangGraphAgentConfig, type index$5_LangGraphNode as LangGraphNode, index$5_LlmAgent as LlmAgent, type index$5_LlmAgentConfig as LlmAgentConfig, index$5_LlmCallsLimitExceededError as LlmCallsLimitExceededError, index$5_LoopAgent as LoopAgent, type index$5_LoopAgentConfig as LoopAgentConfig, type index$5_MessagePart as MessagePart, type index$5_MultiAgentResponse as MultiAgentResponse, index$5_ParallelAgent as ParallelAgent, type index$5_ParallelAgentConfig as ParallelAgentConfig, index$5_ReadonlyContext as ReadonlyContext, index$5_RunConfig as RunConfig, type index$5_RunnerAskReturn as RunnerAskReturn, index$5_SequentialAgent as SequentialAgent, type index$5_SequentialAgentConfig as SequentialAgentConfig, type index$5_SessionOptions as SessionOptions, type index$5_SingleAfterModelCallback as SingleAfterModelCallback, type index$5_SingleAfterToolCallback as SingleAfterToolCallback, type index$5_SingleAgentCallback as SingleAgentCallback, type index$5_SingleBeforeModelCallback as SingleBeforeModelCallback, type index$5_SingleBeforeToolCallback as SingleBeforeToolCallback, index$5_StreamingMode as StreamingMode, type index$5_ToolUnion as ToolUnion, index$5_createBranchContextForSubAgent as createBranchContextForSubAgent, index$5_mergeAgentRun as mergeAgentRun, index$5_newInvocationContextId as newInvocationContextId };
|
|
4333
4369
|
}
|
|
4334
4370
|
|
|
4335
4371
|
/**
|
|
@@ -5530,4 +5566,4 @@ declare const traceLlmCall: (invocationContext: InvocationContext, eventId: stri
|
|
|
5530
5566
|
|
|
5531
5567
|
declare const VERSION = "0.1.0";
|
|
5532
5568
|
|
|
5533
|
-
export { AF_FUNCTION_CALL_ID_PREFIX, type AfterAgentCallback, type AfterModelCallback, type AfterToolCallback, LlmAgent as Agent, AgentBuilder, type AgentBuilderConfig, type AgentBuilderWithSchema, AgentEvaluator, AgentTool, type AgentToolConfig, type AgentType, index$5 as Agents, AiSdkLlm, AnthropicLlm, ApiKeyCredential, ApiKeyScheme, AuthConfig, AuthCredential, AuthCredentialType, AuthHandler, AuthScheme, AuthSchemeType, AuthTool, type AuthToolArguments, AutoFlow, BaseAgent, type BaseAgentType, BaseCodeExecutor, type BaseCodeExecutorConfig, BaseLLMConnection, BaseLlm, BaseLlmFlow, BaseLlmRequestProcessor, BaseLlmResponseProcessor, type BaseMemoryService, BasePlanner, BaseSessionService, BaseTool, BasicAuthCredential, BearerTokenCredential, type BeforeAgentCallback, type BeforeModelCallback, type BeforeToolCallback, type BuildFunctionDeclarationOptions, type BuiltAgent, BuiltInCodeExecutor, BuiltInPlanner, CallbackContext, type CodeExecutionInput, type CodeExecutionResult, CodeExecutionUtils, CodeExecutorContext, type CreateToolConfig, type CreateToolConfigWithSchema, type CreateToolConfigWithoutSchema, DatabaseSessionService, EnhancedAuthConfig, type EnhancedRunner, type EvalCase, type EvalCaseResult, type EvalMetric, type EvalMetricResult, type EvalMetricResultPerInvocation, EvalResult, type EvalSet, type EvalSetResult, EvalStatus, type EvaluateConfig, index as Evaluation, type EvaluationResult, Evaluator, Event, EventActions, index$2 as Events, ExitLoopTool, type File, FileOperationsTool, FinalResponseMatchV2Evaluator, index$1 as Flows, type FullMessage, FunctionTool, GcsArtifactService, type GetSessionConfig, GetUserChoiceTool, GoogleLlm, GoogleSearch, HttpRequestTool, HttpScheme, InMemoryArtifactService, InMemoryMemoryService, InMemoryRunner, InMemorySessionService, type InstructionProvider, type IntermediateData, type Interval, type Invocation, InvocationContext, type JudgeModelOptions, LLMRegistry, LangGraphAgent, type LangGraphAgentConfig, type LangGraphNode, type ListSessionsResponse, LlmAgent, type LlmAgentConfig, LlmCallsLimitExceededError, type LlmModel, type LlmModelConfig, LlmRequest, LlmResponse, LoadArtifactsTool, LoadMemoryTool, LocalEvalService, LoopAgent, type LoopAgentConfig, McpAbi, McpAtp, McpBamm, McpCoinGecko, type McpConfig, McpDiscord, McpError, McpErrorType, McpFilesystem, McpFraxlend, McpGeneric, McpIqWiki, McpMemory, McpNearAgent, McpNearIntents, McpOdos, McpSamplingHandler, type McpSamplingRequest, type McpSamplingResponse, type McpServerConfig, McpTelegram, McpToolset, type McpTransportType, McpUpbit, index$4 as Memory, type MessagePart, type MetricInfo, type MetricValueInfo, index$6 as Models, OAuth2Credential, OAuth2Scheme, type OAuthFlow, type OAuthFlows, OpenAiLlm, OpenIdConnectScheme, ParallelAgent, type ParallelAgentConfig, type PerInvocationResult, PlanReActPlanner, PrebuiltMetrics, REQUEST_EUC_FUNCTION_CALL_NAME, ReadonlyContext, RougeEvaluator, RunConfig, Runner, SafetyEvaluatorV1, type SamplingHandler, type SearchMemoryResponse, SequentialAgent, type SequentialAgentConfig, type Session, type SessionInput, type SessionOptions, index$3 as Sessions, type SingleAfterModelCallback, type SingleAfterToolCallback, type SingleAgentCallback, type SingleBeforeModelCallback, type SingleBeforeToolCallback, SingleFlow, State, StreamingMode, type TelemetryConfig, TelemetryService, type ThinkingConfig, type ToolConfig, ToolContext, type ToolUnion, index$7 as Tools, TrajectoryEvaluator, TransferToAgentTool, UserInteractionTool, VERSION, VertexAiSessionService, _findFunctionCallEventIfLastEventIsFunctionResponse, adkToMcpToolType, requestProcessor$2 as agentTransferRequestProcessor, requestProcessor$6 as basicRequestProcessor, buildFunctionDeclaration, requestProcessor as codeExecutionRequestProcessor, responseProcessor as codeExecutionResponseProcessor, requestProcessor$3 as contentRequestProcessor, convertMcpToolToBaseTool, createAuthToolArguments, createBranchContextForSubAgent, createDatabaseSessionService, createFunctionTool, createMysqlSessionService, createPostgresSessionService, createSamplingHandler, createSqliteSessionService, createTool, generateAuthEvent, generateClientFunctionCallId, getLongRunningFunctionCalls, getMcpTools, handleFunctionCallsAsync, handleFunctionCallsLive, requestProcessor$5 as identityRequestProcessor, initializeTelemetry, injectSessionState, requestProcessor$4 as instructionsRequestProcessor, isEnhancedAuthConfig, jsonSchemaToDeclaration, mcpSchemaToParameters, mergeAgentRun, mergeParallelFunctionResponseEvents, newInvocationContextId, requestProcessor$1 as nlPlanningRequestProcessor, responseProcessor$1 as nlPlanningResponseProcessor, normalizeJsonSchema, populateClientFunctionCallId, registerProviders, removeClientFunctionCallId, requestProcessor$7 as requestProcessor, shutdownTelemetry, telemetryService, traceLlmCall, traceToolCall, tracer };
|
|
5569
|
+
export { AF_FUNCTION_CALL_ID_PREFIX, type AfterAgentCallback, type AfterModelCallback, type AfterToolCallback, LlmAgent as Agent, AgentBuilder, type AgentBuilderConfig, type AgentBuilderWithSchema, AgentEvaluator, AgentTool, type AgentToolConfig, type AgentType, index$5 as Agents, AiSdkLlm, AnthropicLlm, ApiKeyCredential, ApiKeyScheme, AuthConfig, AuthCredential, AuthCredentialType, AuthHandler, AuthScheme, AuthSchemeType, AuthTool, type AuthToolArguments, AutoFlow, BaseAgent, type BaseAgentType, BaseCodeExecutor, type BaseCodeExecutorConfig, BaseLLMConnection, BaseLlm, BaseLlmFlow, BaseLlmRequestProcessor, BaseLlmResponseProcessor, type BaseMemoryService, BasePlanner, BaseSessionService, BaseTool, BasicAuthCredential, BearerTokenCredential, type BeforeAgentCallback, type BeforeModelCallback, type BeforeToolCallback, type BuildFunctionDeclarationOptions, type BuiltAgent, BuiltInCodeExecutor, BuiltInPlanner, CallbackContext, type CodeExecutionInput, type CodeExecutionResult, CodeExecutionUtils, CodeExecutorContext, type CreateToolConfig, type CreateToolConfigWithSchema, type CreateToolConfigWithoutSchema, DatabaseSessionService, EnhancedAuthConfig, type EnhancedRunner, type EvalCase, type EvalCaseResult, type EvalMetric, type EvalMetricResult, type EvalMetricResultPerInvocation, EvalResult, type EvalSet, type EvalSetResult, EvalStatus, type EvaluateConfig, index as Evaluation, type EvaluationResult, Evaluator, Event, EventActions, index$2 as Events, ExitLoopTool, type File, FileOperationsTool, FinalResponseMatchV2Evaluator, index$1 as Flows, type FullMessage, FunctionTool, GcsArtifactService, type GetSessionConfig, GetUserChoiceTool, GoogleLlm, GoogleSearch, HttpRequestTool, HttpScheme, InMemoryArtifactService, InMemoryMemoryService, InMemoryRunner, InMemorySessionService, type InstructionProvider, type IntermediateData, type Interval, type Invocation, InvocationContext, type JudgeModelOptions, LLMRegistry, LangGraphAgent, type LangGraphAgentConfig, type LangGraphNode, type ListSessionsResponse, LlmAgent, type LlmAgentConfig, LlmCallsLimitExceededError, type LlmModel, type LlmModelConfig, LlmRequest, LlmResponse, LoadArtifactsTool, LoadMemoryTool, LocalEvalService, LoopAgent, type LoopAgentConfig, McpAbi, McpAtp, McpBamm, McpCoinGecko, type McpConfig, McpDiscord, McpError, McpErrorType, McpFilesystem, McpFraxlend, McpGeneric, McpIqWiki, McpMemory, McpNearAgent, McpNearIntents, McpOdos, McpSamplingHandler, type McpSamplingRequest, type McpSamplingResponse, type McpServerConfig, McpTelegram, McpToolset, type McpTransportType, McpUpbit, index$4 as Memory, type MessagePart, type MetricInfo, type MetricValueInfo, index$6 as Models, type MultiAgentResponse, OAuth2Credential, OAuth2Scheme, type OAuthFlow, type OAuthFlows, OpenAiLlm, OpenIdConnectScheme, ParallelAgent, type ParallelAgentConfig, type PerInvocationResult, PlanReActPlanner, PrebuiltMetrics, REQUEST_EUC_FUNCTION_CALL_NAME, ReadonlyContext, RougeEvaluator, RunConfig, Runner, type RunnerAskReturn, SafetyEvaluatorV1, type SamplingHandler, type SearchMemoryResponse, SequentialAgent, type SequentialAgentConfig, type Session, type SessionInput, type SessionOptions, index$3 as Sessions, type SingleAfterModelCallback, type SingleAfterToolCallback, type SingleAgentCallback, type SingleBeforeModelCallback, type SingleBeforeToolCallback, SingleFlow, State, StreamingMode, type TelemetryConfig, TelemetryService, type ThinkingConfig, type ToolConfig, ToolContext, type ToolUnion, index$7 as Tools, TrajectoryEvaluator, TransferToAgentTool, UserInteractionTool, VERSION, VertexAiSessionService, _findFunctionCallEventIfLastEventIsFunctionResponse, adkToMcpToolType, requestProcessor$2 as agentTransferRequestProcessor, requestProcessor$6 as basicRequestProcessor, buildFunctionDeclaration, requestProcessor as codeExecutionRequestProcessor, responseProcessor as codeExecutionResponseProcessor, requestProcessor$3 as contentRequestProcessor, convertMcpToolToBaseTool, createAuthToolArguments, createBranchContextForSubAgent, createDatabaseSessionService, createFunctionTool, createMysqlSessionService, createPostgresSessionService, createSamplingHandler, createSqliteSessionService, createTool, generateAuthEvent, generateClientFunctionCallId, getLongRunningFunctionCalls, getMcpTools, handleFunctionCallsAsync, handleFunctionCallsLive, requestProcessor$5 as identityRequestProcessor, initializeTelemetry, injectSessionState, requestProcessor$4 as instructionsRequestProcessor, isEnhancedAuthConfig, jsonSchemaToDeclaration, mcpSchemaToParameters, mergeAgentRun, mergeParallelFunctionResponseEvents, newInvocationContextId, requestProcessor$1 as nlPlanningRequestProcessor, responseProcessor$1 as nlPlanningResponseProcessor, normalizeJsonSchema, populateClientFunctionCallId, registerProviders, removeClientFunctionCallId, requestProcessor$7 as requestProcessor, shutdownTelemetry, telemetryService, traceLlmCall, traceToolCall, tracer };
|