@iqai/adk 0.5.0 → 0.5.3
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 +21 -0
- package/dist/index.d.mts +163 -4
- package/dist/index.d.ts +163 -4
- package/dist/index.js +655 -117
- package/dist/index.mjs +557 -19
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @iqai/adk
|
|
2
2
|
|
|
3
|
+
## 0.5.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 1ec769a: fix: improve type safety across cli and adk package
|
|
8
|
+
- 9ba699c: fix: state persistence
|
|
9
|
+
- 4fbb724: Fix: state management
|
|
10
|
+
- edfe628: Add artifact parsing and rewind functionality
|
|
11
|
+
|
|
12
|
+
## 0.5.2
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- ae81c74: Add event compaction feature with configurable summarization
|
|
17
|
+
|
|
18
|
+
## 0.5.1
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- d8fd6e8: feat(agent-builder): add static withAgent method for cleaner API usage
|
|
23
|
+
|
|
3
24
|
## 0.5.0
|
|
4
25
|
|
|
5
26
|
### Minor Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Content, Part, 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
4
|
import * as z from 'zod';
|
|
@@ -57,6 +57,15 @@ declare class Logger {
|
|
|
57
57
|
private arrayToLines;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
+
/**
|
|
61
|
+
* Event compaction data structure containing the summarized content
|
|
62
|
+
* and the timestamp range it covers.
|
|
63
|
+
*/
|
|
64
|
+
interface EventCompaction {
|
|
65
|
+
startTimestamp: number;
|
|
66
|
+
endTimestamp: number;
|
|
67
|
+
compactedContent: Content;
|
|
68
|
+
}
|
|
60
69
|
/**
|
|
61
70
|
* Represents the actions attached to an event.
|
|
62
71
|
*/
|
|
@@ -87,6 +96,15 @@ declare class EventActions {
|
|
|
87
96
|
* Requested authentication configurations.
|
|
88
97
|
*/
|
|
89
98
|
requestedAuthConfigs?: Record<string, any>;
|
|
99
|
+
/**
|
|
100
|
+
* Event compaction information. When set, this event represents
|
|
101
|
+
* a compaction of events within the specified timestamp range.
|
|
102
|
+
*/
|
|
103
|
+
compaction?: EventCompaction;
|
|
104
|
+
/**
|
|
105
|
+
* The invocation id to rewind to. This is only set for rewind event.
|
|
106
|
+
*/
|
|
107
|
+
rewindBeforeInvocationId?: string;
|
|
90
108
|
/**
|
|
91
109
|
* Constructor for EventActions
|
|
92
110
|
*/
|
|
@@ -97,6 +115,8 @@ declare class EventActions {
|
|
|
97
115
|
transferToAgent?: string;
|
|
98
116
|
escalate?: boolean;
|
|
99
117
|
requestedAuthConfigs?: Record<string, any>;
|
|
118
|
+
compaction?: EventCompaction;
|
|
119
|
+
rewindBeforeInvocationId?: string;
|
|
100
120
|
});
|
|
101
121
|
}
|
|
102
122
|
|
|
@@ -4021,6 +4041,45 @@ declare class LangGraphAgent extends BaseAgent {
|
|
|
4021
4041
|
setMaxSteps(maxSteps: number): void;
|
|
4022
4042
|
}
|
|
4023
4043
|
|
|
4044
|
+
/**
|
|
4045
|
+
* Base interface for event summarizers.
|
|
4046
|
+
* Implementations convert a list of events into a single compaction event.
|
|
4047
|
+
*/
|
|
4048
|
+
interface EventsSummarizer {
|
|
4049
|
+
/**
|
|
4050
|
+
* Attempts to summarize a list of events into a single compaction event.
|
|
4051
|
+
* @param events - The events to summarize
|
|
4052
|
+
* @returns A compaction carrier event with actions.compaction set, or undefined if no summarization is needed
|
|
4053
|
+
*/
|
|
4054
|
+
maybeSummarizeEvents(events: Event[]): Promise<Event | undefined>;
|
|
4055
|
+
}
|
|
4056
|
+
|
|
4057
|
+
/**
|
|
4058
|
+
* Configuration for event compaction feature.
|
|
4059
|
+
* Controls how and when session histories are compacted via summarization.
|
|
4060
|
+
*/
|
|
4061
|
+
interface EventsCompactionConfig {
|
|
4062
|
+
/**
|
|
4063
|
+
* The summarizer to use for compacting events.
|
|
4064
|
+
* If not provided, a default LLM-based summarizer will be used.
|
|
4065
|
+
*/
|
|
4066
|
+
summarizer?: EventsSummarizer;
|
|
4067
|
+
/**
|
|
4068
|
+
* Number of new invocations required to trigger compaction.
|
|
4069
|
+
* When this many new invocations have been completed since the last
|
|
4070
|
+
* compaction, a new compaction will be triggered.
|
|
4071
|
+
* Default: 10
|
|
4072
|
+
*/
|
|
4073
|
+
compactionInterval: number;
|
|
4074
|
+
/**
|
|
4075
|
+
* Number of prior invocations to include from the previous compacted
|
|
4076
|
+
* range for continuity when creating a new compaction.
|
|
4077
|
+
* This ensures some overlap between successive summaries.
|
|
4078
|
+
* Default: 2
|
|
4079
|
+
*/
|
|
4080
|
+
overlapSize: number;
|
|
4081
|
+
}
|
|
4082
|
+
|
|
4024
4083
|
/**
|
|
4025
4084
|
* Configuration options for the AgentBuilder
|
|
4026
4085
|
*/
|
|
@@ -4088,6 +4147,11 @@ interface EnhancedRunner<T = string, M extends boolean = false> {
|
|
|
4088
4147
|
newMessage: FullMessage;
|
|
4089
4148
|
runConfig?: RunConfig;
|
|
4090
4149
|
}): AsyncIterable<Event>;
|
|
4150
|
+
rewind(params: {
|
|
4151
|
+
userId: string;
|
|
4152
|
+
sessionId: string;
|
|
4153
|
+
rewindBeforeInvocationId: string;
|
|
4154
|
+
}): any;
|
|
4091
4155
|
__outputSchema?: ZodSchema;
|
|
4092
4156
|
}
|
|
4093
4157
|
/**
|
|
@@ -4161,6 +4225,7 @@ declare class AgentBuilder<TOut = string, TMulti extends boolean = false> {
|
|
|
4161
4225
|
private sessionOptions?;
|
|
4162
4226
|
private memoryService?;
|
|
4163
4227
|
private artifactService?;
|
|
4228
|
+
private eventsCompactionConfig?;
|
|
4164
4229
|
private agentType;
|
|
4165
4230
|
private existingSession?;
|
|
4166
4231
|
private existingAgent?;
|
|
@@ -4273,6 +4338,12 @@ declare class AgentBuilder<TOut = string, TMulti extends boolean = false> {
|
|
|
4273
4338
|
* @returns This builder instance for chaining
|
|
4274
4339
|
*/
|
|
4275
4340
|
withAfterToolCallback(callback: AfterToolCallback): this;
|
|
4341
|
+
/**
|
|
4342
|
+
* Convenience method to start building with an existing agent
|
|
4343
|
+
* @param agent The agent instance to wrap
|
|
4344
|
+
* @returns New AgentBuilder instance with agent set
|
|
4345
|
+
*/
|
|
4346
|
+
static withAgent(agent: BaseAgent): AgentBuilder<string, false>;
|
|
4276
4347
|
/**
|
|
4277
4348
|
* Provide an already constructed agent instance. Further definition-mutating calls
|
|
4278
4349
|
* (model/tools/instruction/etc.) will be ignored with a dev warning.
|
|
@@ -4334,6 +4405,23 @@ declare class AgentBuilder<TOut = string, TMulti extends boolean = false> {
|
|
|
4334
4405
|
* Configure runtime behavior for runs
|
|
4335
4406
|
*/
|
|
4336
4407
|
withRunConfig(config: RunConfig | Partial<RunConfig>): this;
|
|
4408
|
+
/**
|
|
4409
|
+
* Configure event compaction for automatic history management
|
|
4410
|
+
* @param config Event compaction configuration
|
|
4411
|
+
* @returns This builder instance for chaining
|
|
4412
|
+
* @example
|
|
4413
|
+
* ```typescript
|
|
4414
|
+
* const { runner } = await AgentBuilder
|
|
4415
|
+
* .create("assistant")
|
|
4416
|
+
* .withModel("gemini-2.5-flash")
|
|
4417
|
+
* .withEventsCompaction({
|
|
4418
|
+
* compactionInterval: 10, // Compact every 10 invocations
|
|
4419
|
+
* overlapSize: 2, // Include 2 prior invocations
|
|
4420
|
+
* })
|
|
4421
|
+
* .build();
|
|
4422
|
+
* ```
|
|
4423
|
+
*/
|
|
4424
|
+
withEventsCompaction(config: EventsCompactionConfig): this;
|
|
4337
4425
|
/**
|
|
4338
4426
|
* Configure with an in-memory session with custom IDs
|
|
4339
4427
|
* Note: In-memory sessions are created automatically by default, use this only if you need custom appName/userId
|
|
@@ -4757,6 +4845,23 @@ declare namespace index$3 {
|
|
|
4757
4845
|
export { index$3_BaseSessionService as BaseSessionService, index$3_DatabaseSessionService as DatabaseSessionService, type index$3_GetSessionConfig as GetSessionConfig, index$3_InMemorySessionService as InMemorySessionService, type index$3_ListSessionsResponse as ListSessionsResponse, type index$3_Session as Session, index$3_State as State, index$3_VertexAiSessionService as VertexAiSessionService, index$3_createDatabaseSessionService as createDatabaseSessionService, index$3_createMysqlSessionService as createMysqlSessionService, index$3_createPostgresSessionService as createPostgresSessionService, index$3_createSqliteSessionService as createSqliteSessionService };
|
|
4758
4846
|
}
|
|
4759
4847
|
|
|
4848
|
+
interface ParsedArtifactUri {
|
|
4849
|
+
appName: string;
|
|
4850
|
+
userId: string;
|
|
4851
|
+
sessionId?: string;
|
|
4852
|
+
filename: string;
|
|
4853
|
+
version: number;
|
|
4854
|
+
}
|
|
4855
|
+
declare function parseArtifactUri(uri: string): ParsedArtifactUri | null;
|
|
4856
|
+
declare function getArtifactUri(args: {
|
|
4857
|
+
appName: string;
|
|
4858
|
+
userId: string;
|
|
4859
|
+
filename: string;
|
|
4860
|
+
version: number;
|
|
4861
|
+
sessionId?: string;
|
|
4862
|
+
}): string;
|
|
4863
|
+
declare function isArtifactRef(artifact: Part): boolean;
|
|
4864
|
+
|
|
4760
4865
|
declare class GcsArtifactService implements BaseArtifactService {
|
|
4761
4866
|
private readonly bucketName;
|
|
4762
4867
|
private readonly storageClient;
|
|
@@ -4834,12 +4939,46 @@ declare class InMemoryArtifactService implements BaseArtifactService {
|
|
|
4834
4939
|
}): Promise<number[]>;
|
|
4835
4940
|
}
|
|
4836
4941
|
|
|
4942
|
+
/**
|
|
4943
|
+
* LLM-based event summarizer that uses a language model to generate summaries.
|
|
4944
|
+
*/
|
|
4945
|
+
declare class LlmEventSummarizer implements EventsSummarizer {
|
|
4946
|
+
private model;
|
|
4947
|
+
private prompt;
|
|
4948
|
+
/**
|
|
4949
|
+
* Creates a new LLM event summarizer.
|
|
4950
|
+
* @param model - The LLM model to use for summarization
|
|
4951
|
+
* @param prompt - Optional custom prompt template. Use {events} as placeholder for event content.
|
|
4952
|
+
*/
|
|
4953
|
+
constructor(model: BaseLlm, prompt?: string);
|
|
4954
|
+
/**
|
|
4955
|
+
* Summarizes events using the configured LLM.
|
|
4956
|
+
*/
|
|
4957
|
+
maybeSummarizeEvents(events: Event[]): Promise<Event | undefined>;
|
|
4958
|
+
/**
|
|
4959
|
+
* Formats events into a readable text format for summarization.
|
|
4960
|
+
*/
|
|
4961
|
+
private formatEventsForSummarization;
|
|
4962
|
+
}
|
|
4963
|
+
|
|
4964
|
+
/**
|
|
4965
|
+
* Runs compaction for a sliding window of invocations.
|
|
4966
|
+
* This function implements the core sliding window logic from ADK Python.
|
|
4967
|
+
*/
|
|
4968
|
+
declare function runCompactionForSlidingWindow(config: EventsCompactionConfig, session: Session, sessionService: BaseSessionService, summarizer: EventsSummarizer): Promise<void>;
|
|
4969
|
+
|
|
4837
4970
|
type index$2_Event = Event;
|
|
4838
4971
|
declare const index$2_Event: typeof Event;
|
|
4839
4972
|
type index$2_EventActions = EventActions;
|
|
4840
4973
|
declare const index$2_EventActions: typeof EventActions;
|
|
4974
|
+
type index$2_EventCompaction = EventCompaction;
|
|
4975
|
+
type index$2_EventsCompactionConfig = EventsCompactionConfig;
|
|
4976
|
+
type index$2_EventsSummarizer = EventsSummarizer;
|
|
4977
|
+
type index$2_LlmEventSummarizer = LlmEventSummarizer;
|
|
4978
|
+
declare const index$2_LlmEventSummarizer: typeof LlmEventSummarizer;
|
|
4979
|
+
declare const index$2_runCompactionForSlidingWindow: typeof runCompactionForSlidingWindow;
|
|
4841
4980
|
declare namespace index$2 {
|
|
4842
|
-
export { index$2_Event as Event, index$2_EventActions as EventActions };
|
|
4981
|
+
export { index$2_Event as Event, index$2_EventActions as EventActions, type index$2_EventCompaction as EventCompaction, type index$2_EventsCompactionConfig as EventsCompactionConfig, type index$2_EventsSummarizer as EventsSummarizer, index$2_LlmEventSummarizer as LlmEventSummarizer, index$2_runCompactionForSlidingWindow as runCompactionForSlidingWindow };
|
|
4843
4982
|
}
|
|
4844
4983
|
|
|
4845
4984
|
declare abstract class BaseLlmFlow {
|
|
@@ -5537,16 +5676,21 @@ declare class Runner<T extends BaseAgent = BaseAgent> {
|
|
|
5537
5676
|
* The memory service for the runner.
|
|
5538
5677
|
*/
|
|
5539
5678
|
memoryService?: BaseMemoryService;
|
|
5679
|
+
/**
|
|
5680
|
+
* Configuration for event compaction.
|
|
5681
|
+
*/
|
|
5682
|
+
eventsCompactionConfig?: EventsCompactionConfig;
|
|
5540
5683
|
protected logger: Logger;
|
|
5541
5684
|
/**
|
|
5542
5685
|
* Initializes the Runner.
|
|
5543
5686
|
*/
|
|
5544
|
-
constructor({ appName, agent, artifactService, sessionService, memoryService, }: {
|
|
5687
|
+
constructor({ appName, agent, artifactService, sessionService, memoryService, eventsCompactionConfig, }: {
|
|
5545
5688
|
appName: string;
|
|
5546
5689
|
agent: T;
|
|
5547
5690
|
artifactService?: BaseArtifactService;
|
|
5548
5691
|
sessionService: BaseSessionService;
|
|
5549
5692
|
memoryService?: BaseMemoryService;
|
|
5693
|
+
eventsCompactionConfig?: EventsCompactionConfig;
|
|
5550
5694
|
});
|
|
5551
5695
|
/**
|
|
5552
5696
|
* Runs the agent synchronously.
|
|
@@ -5584,6 +5728,21 @@ declare class Runner<T extends BaseAgent = BaseAgent> {
|
|
|
5584
5728
|
* Creates a new invocation context.
|
|
5585
5729
|
*/
|
|
5586
5730
|
private _newInvocationContext;
|
|
5731
|
+
/**
|
|
5732
|
+
* Runs compaction if configured.
|
|
5733
|
+
*/
|
|
5734
|
+
private _runCompaction;
|
|
5735
|
+
/**
|
|
5736
|
+
* Gets the configured summarizer or creates a default LLM-based one.
|
|
5737
|
+
*/
|
|
5738
|
+
private _getOrCreateSummarizer;
|
|
5739
|
+
rewind(args: {
|
|
5740
|
+
userId: string;
|
|
5741
|
+
sessionId: string;
|
|
5742
|
+
rewindBeforeInvocationId: string;
|
|
5743
|
+
}): Promise<void>;
|
|
5744
|
+
private _computeStateDeltaForRewind;
|
|
5745
|
+
private _computeArtifactDeltaForRewind;
|
|
5587
5746
|
}
|
|
5588
5747
|
/**
|
|
5589
5748
|
* An in-memory Runner for testing and development.
|
|
@@ -5673,4 +5832,4 @@ declare const traceLlmCall: (invocationContext: InvocationContext, eventId: stri
|
|
|
5673
5832
|
|
|
5674
5833
|
declare const VERSION = "0.1.0";
|
|
5675
5834
|
|
|
5676
|
-
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, McpCoinGeckoPro, 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, VertexAiRagMemoryService, 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 };
|
|
5835
|
+
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, type EventCompaction, index$2 as Events, type EventsCompactionConfig, type EventsSummarizer, 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, LlmEventSummarizer, type LlmModel, type LlmModelConfig, LlmRequest, LlmResponse, LoadArtifactsTool, LoadMemoryTool, LocalEvalService, LoopAgent, type LoopAgentConfig, McpAbi, McpAtp, McpBamm, McpCoinGecko, McpCoinGeckoPro, 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 ParsedArtifactUri, 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, VertexAiRagMemoryService, 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, getArtifactUri, getLongRunningFunctionCalls, getMcpTools, handleFunctionCallsAsync, handleFunctionCallsLive, requestProcessor$5 as identityRequestProcessor, initializeTelemetry, injectSessionState, requestProcessor$4 as instructionsRequestProcessor, isArtifactRef, isEnhancedAuthConfig, jsonSchemaToDeclaration, mcpSchemaToParameters, mergeAgentRun, mergeParallelFunctionResponseEvents, newInvocationContextId, requestProcessor$1 as nlPlanningRequestProcessor, responseProcessor$1 as nlPlanningResponseProcessor, normalizeJsonSchema, parseArtifactUri, populateClientFunctionCallId, registerProviders, removeClientFunctionCallId, requestProcessor$7 as requestProcessor, runCompactionForSlidingWindow, shutdownTelemetry, telemetryService, traceLlmCall, traceToolCall, tracer };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Content, Part, 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
4
|
import * as z from 'zod';
|
|
@@ -57,6 +57,15 @@ declare class Logger {
|
|
|
57
57
|
private arrayToLines;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
+
/**
|
|
61
|
+
* Event compaction data structure containing the summarized content
|
|
62
|
+
* and the timestamp range it covers.
|
|
63
|
+
*/
|
|
64
|
+
interface EventCompaction {
|
|
65
|
+
startTimestamp: number;
|
|
66
|
+
endTimestamp: number;
|
|
67
|
+
compactedContent: Content;
|
|
68
|
+
}
|
|
60
69
|
/**
|
|
61
70
|
* Represents the actions attached to an event.
|
|
62
71
|
*/
|
|
@@ -87,6 +96,15 @@ declare class EventActions {
|
|
|
87
96
|
* Requested authentication configurations.
|
|
88
97
|
*/
|
|
89
98
|
requestedAuthConfigs?: Record<string, any>;
|
|
99
|
+
/**
|
|
100
|
+
* Event compaction information. When set, this event represents
|
|
101
|
+
* a compaction of events within the specified timestamp range.
|
|
102
|
+
*/
|
|
103
|
+
compaction?: EventCompaction;
|
|
104
|
+
/**
|
|
105
|
+
* The invocation id to rewind to. This is only set for rewind event.
|
|
106
|
+
*/
|
|
107
|
+
rewindBeforeInvocationId?: string;
|
|
90
108
|
/**
|
|
91
109
|
* Constructor for EventActions
|
|
92
110
|
*/
|
|
@@ -97,6 +115,8 @@ declare class EventActions {
|
|
|
97
115
|
transferToAgent?: string;
|
|
98
116
|
escalate?: boolean;
|
|
99
117
|
requestedAuthConfigs?: Record<string, any>;
|
|
118
|
+
compaction?: EventCompaction;
|
|
119
|
+
rewindBeforeInvocationId?: string;
|
|
100
120
|
});
|
|
101
121
|
}
|
|
102
122
|
|
|
@@ -4021,6 +4041,45 @@ declare class LangGraphAgent extends BaseAgent {
|
|
|
4021
4041
|
setMaxSteps(maxSteps: number): void;
|
|
4022
4042
|
}
|
|
4023
4043
|
|
|
4044
|
+
/**
|
|
4045
|
+
* Base interface for event summarizers.
|
|
4046
|
+
* Implementations convert a list of events into a single compaction event.
|
|
4047
|
+
*/
|
|
4048
|
+
interface EventsSummarizer {
|
|
4049
|
+
/**
|
|
4050
|
+
* Attempts to summarize a list of events into a single compaction event.
|
|
4051
|
+
* @param events - The events to summarize
|
|
4052
|
+
* @returns A compaction carrier event with actions.compaction set, or undefined if no summarization is needed
|
|
4053
|
+
*/
|
|
4054
|
+
maybeSummarizeEvents(events: Event[]): Promise<Event | undefined>;
|
|
4055
|
+
}
|
|
4056
|
+
|
|
4057
|
+
/**
|
|
4058
|
+
* Configuration for event compaction feature.
|
|
4059
|
+
* Controls how and when session histories are compacted via summarization.
|
|
4060
|
+
*/
|
|
4061
|
+
interface EventsCompactionConfig {
|
|
4062
|
+
/**
|
|
4063
|
+
* The summarizer to use for compacting events.
|
|
4064
|
+
* If not provided, a default LLM-based summarizer will be used.
|
|
4065
|
+
*/
|
|
4066
|
+
summarizer?: EventsSummarizer;
|
|
4067
|
+
/**
|
|
4068
|
+
* Number of new invocations required to trigger compaction.
|
|
4069
|
+
* When this many new invocations have been completed since the last
|
|
4070
|
+
* compaction, a new compaction will be triggered.
|
|
4071
|
+
* Default: 10
|
|
4072
|
+
*/
|
|
4073
|
+
compactionInterval: number;
|
|
4074
|
+
/**
|
|
4075
|
+
* Number of prior invocations to include from the previous compacted
|
|
4076
|
+
* range for continuity when creating a new compaction.
|
|
4077
|
+
* This ensures some overlap between successive summaries.
|
|
4078
|
+
* Default: 2
|
|
4079
|
+
*/
|
|
4080
|
+
overlapSize: number;
|
|
4081
|
+
}
|
|
4082
|
+
|
|
4024
4083
|
/**
|
|
4025
4084
|
* Configuration options for the AgentBuilder
|
|
4026
4085
|
*/
|
|
@@ -4088,6 +4147,11 @@ interface EnhancedRunner<T = string, M extends boolean = false> {
|
|
|
4088
4147
|
newMessage: FullMessage;
|
|
4089
4148
|
runConfig?: RunConfig;
|
|
4090
4149
|
}): AsyncIterable<Event>;
|
|
4150
|
+
rewind(params: {
|
|
4151
|
+
userId: string;
|
|
4152
|
+
sessionId: string;
|
|
4153
|
+
rewindBeforeInvocationId: string;
|
|
4154
|
+
}): any;
|
|
4091
4155
|
__outputSchema?: ZodSchema;
|
|
4092
4156
|
}
|
|
4093
4157
|
/**
|
|
@@ -4161,6 +4225,7 @@ declare class AgentBuilder<TOut = string, TMulti extends boolean = false> {
|
|
|
4161
4225
|
private sessionOptions?;
|
|
4162
4226
|
private memoryService?;
|
|
4163
4227
|
private artifactService?;
|
|
4228
|
+
private eventsCompactionConfig?;
|
|
4164
4229
|
private agentType;
|
|
4165
4230
|
private existingSession?;
|
|
4166
4231
|
private existingAgent?;
|
|
@@ -4273,6 +4338,12 @@ declare class AgentBuilder<TOut = string, TMulti extends boolean = false> {
|
|
|
4273
4338
|
* @returns This builder instance for chaining
|
|
4274
4339
|
*/
|
|
4275
4340
|
withAfterToolCallback(callback: AfterToolCallback): this;
|
|
4341
|
+
/**
|
|
4342
|
+
* Convenience method to start building with an existing agent
|
|
4343
|
+
* @param agent The agent instance to wrap
|
|
4344
|
+
* @returns New AgentBuilder instance with agent set
|
|
4345
|
+
*/
|
|
4346
|
+
static withAgent(agent: BaseAgent): AgentBuilder<string, false>;
|
|
4276
4347
|
/**
|
|
4277
4348
|
* Provide an already constructed agent instance. Further definition-mutating calls
|
|
4278
4349
|
* (model/tools/instruction/etc.) will be ignored with a dev warning.
|
|
@@ -4334,6 +4405,23 @@ declare class AgentBuilder<TOut = string, TMulti extends boolean = false> {
|
|
|
4334
4405
|
* Configure runtime behavior for runs
|
|
4335
4406
|
*/
|
|
4336
4407
|
withRunConfig(config: RunConfig | Partial<RunConfig>): this;
|
|
4408
|
+
/**
|
|
4409
|
+
* Configure event compaction for automatic history management
|
|
4410
|
+
* @param config Event compaction configuration
|
|
4411
|
+
* @returns This builder instance for chaining
|
|
4412
|
+
* @example
|
|
4413
|
+
* ```typescript
|
|
4414
|
+
* const { runner } = await AgentBuilder
|
|
4415
|
+
* .create("assistant")
|
|
4416
|
+
* .withModel("gemini-2.5-flash")
|
|
4417
|
+
* .withEventsCompaction({
|
|
4418
|
+
* compactionInterval: 10, // Compact every 10 invocations
|
|
4419
|
+
* overlapSize: 2, // Include 2 prior invocations
|
|
4420
|
+
* })
|
|
4421
|
+
* .build();
|
|
4422
|
+
* ```
|
|
4423
|
+
*/
|
|
4424
|
+
withEventsCompaction(config: EventsCompactionConfig): this;
|
|
4337
4425
|
/**
|
|
4338
4426
|
* Configure with an in-memory session with custom IDs
|
|
4339
4427
|
* Note: In-memory sessions are created automatically by default, use this only if you need custom appName/userId
|
|
@@ -4757,6 +4845,23 @@ declare namespace index$3 {
|
|
|
4757
4845
|
export { index$3_BaseSessionService as BaseSessionService, index$3_DatabaseSessionService as DatabaseSessionService, type index$3_GetSessionConfig as GetSessionConfig, index$3_InMemorySessionService as InMemorySessionService, type index$3_ListSessionsResponse as ListSessionsResponse, type index$3_Session as Session, index$3_State as State, index$3_VertexAiSessionService as VertexAiSessionService, index$3_createDatabaseSessionService as createDatabaseSessionService, index$3_createMysqlSessionService as createMysqlSessionService, index$3_createPostgresSessionService as createPostgresSessionService, index$3_createSqliteSessionService as createSqliteSessionService };
|
|
4758
4846
|
}
|
|
4759
4847
|
|
|
4848
|
+
interface ParsedArtifactUri {
|
|
4849
|
+
appName: string;
|
|
4850
|
+
userId: string;
|
|
4851
|
+
sessionId?: string;
|
|
4852
|
+
filename: string;
|
|
4853
|
+
version: number;
|
|
4854
|
+
}
|
|
4855
|
+
declare function parseArtifactUri(uri: string): ParsedArtifactUri | null;
|
|
4856
|
+
declare function getArtifactUri(args: {
|
|
4857
|
+
appName: string;
|
|
4858
|
+
userId: string;
|
|
4859
|
+
filename: string;
|
|
4860
|
+
version: number;
|
|
4861
|
+
sessionId?: string;
|
|
4862
|
+
}): string;
|
|
4863
|
+
declare function isArtifactRef(artifact: Part): boolean;
|
|
4864
|
+
|
|
4760
4865
|
declare class GcsArtifactService implements BaseArtifactService {
|
|
4761
4866
|
private readonly bucketName;
|
|
4762
4867
|
private readonly storageClient;
|
|
@@ -4834,12 +4939,46 @@ declare class InMemoryArtifactService implements BaseArtifactService {
|
|
|
4834
4939
|
}): Promise<number[]>;
|
|
4835
4940
|
}
|
|
4836
4941
|
|
|
4942
|
+
/**
|
|
4943
|
+
* LLM-based event summarizer that uses a language model to generate summaries.
|
|
4944
|
+
*/
|
|
4945
|
+
declare class LlmEventSummarizer implements EventsSummarizer {
|
|
4946
|
+
private model;
|
|
4947
|
+
private prompt;
|
|
4948
|
+
/**
|
|
4949
|
+
* Creates a new LLM event summarizer.
|
|
4950
|
+
* @param model - The LLM model to use for summarization
|
|
4951
|
+
* @param prompt - Optional custom prompt template. Use {events} as placeholder for event content.
|
|
4952
|
+
*/
|
|
4953
|
+
constructor(model: BaseLlm, prompt?: string);
|
|
4954
|
+
/**
|
|
4955
|
+
* Summarizes events using the configured LLM.
|
|
4956
|
+
*/
|
|
4957
|
+
maybeSummarizeEvents(events: Event[]): Promise<Event | undefined>;
|
|
4958
|
+
/**
|
|
4959
|
+
* Formats events into a readable text format for summarization.
|
|
4960
|
+
*/
|
|
4961
|
+
private formatEventsForSummarization;
|
|
4962
|
+
}
|
|
4963
|
+
|
|
4964
|
+
/**
|
|
4965
|
+
* Runs compaction for a sliding window of invocations.
|
|
4966
|
+
* This function implements the core sliding window logic from ADK Python.
|
|
4967
|
+
*/
|
|
4968
|
+
declare function runCompactionForSlidingWindow(config: EventsCompactionConfig, session: Session, sessionService: BaseSessionService, summarizer: EventsSummarizer): Promise<void>;
|
|
4969
|
+
|
|
4837
4970
|
type index$2_Event = Event;
|
|
4838
4971
|
declare const index$2_Event: typeof Event;
|
|
4839
4972
|
type index$2_EventActions = EventActions;
|
|
4840
4973
|
declare const index$2_EventActions: typeof EventActions;
|
|
4974
|
+
type index$2_EventCompaction = EventCompaction;
|
|
4975
|
+
type index$2_EventsCompactionConfig = EventsCompactionConfig;
|
|
4976
|
+
type index$2_EventsSummarizer = EventsSummarizer;
|
|
4977
|
+
type index$2_LlmEventSummarizer = LlmEventSummarizer;
|
|
4978
|
+
declare const index$2_LlmEventSummarizer: typeof LlmEventSummarizer;
|
|
4979
|
+
declare const index$2_runCompactionForSlidingWindow: typeof runCompactionForSlidingWindow;
|
|
4841
4980
|
declare namespace index$2 {
|
|
4842
|
-
export { index$2_Event as Event, index$2_EventActions as EventActions };
|
|
4981
|
+
export { index$2_Event as Event, index$2_EventActions as EventActions, type index$2_EventCompaction as EventCompaction, type index$2_EventsCompactionConfig as EventsCompactionConfig, type index$2_EventsSummarizer as EventsSummarizer, index$2_LlmEventSummarizer as LlmEventSummarizer, index$2_runCompactionForSlidingWindow as runCompactionForSlidingWindow };
|
|
4843
4982
|
}
|
|
4844
4983
|
|
|
4845
4984
|
declare abstract class BaseLlmFlow {
|
|
@@ -5537,16 +5676,21 @@ declare class Runner<T extends BaseAgent = BaseAgent> {
|
|
|
5537
5676
|
* The memory service for the runner.
|
|
5538
5677
|
*/
|
|
5539
5678
|
memoryService?: BaseMemoryService;
|
|
5679
|
+
/**
|
|
5680
|
+
* Configuration for event compaction.
|
|
5681
|
+
*/
|
|
5682
|
+
eventsCompactionConfig?: EventsCompactionConfig;
|
|
5540
5683
|
protected logger: Logger;
|
|
5541
5684
|
/**
|
|
5542
5685
|
* Initializes the Runner.
|
|
5543
5686
|
*/
|
|
5544
|
-
constructor({ appName, agent, artifactService, sessionService, memoryService, }: {
|
|
5687
|
+
constructor({ appName, agent, artifactService, sessionService, memoryService, eventsCompactionConfig, }: {
|
|
5545
5688
|
appName: string;
|
|
5546
5689
|
agent: T;
|
|
5547
5690
|
artifactService?: BaseArtifactService;
|
|
5548
5691
|
sessionService: BaseSessionService;
|
|
5549
5692
|
memoryService?: BaseMemoryService;
|
|
5693
|
+
eventsCompactionConfig?: EventsCompactionConfig;
|
|
5550
5694
|
});
|
|
5551
5695
|
/**
|
|
5552
5696
|
* Runs the agent synchronously.
|
|
@@ -5584,6 +5728,21 @@ declare class Runner<T extends BaseAgent = BaseAgent> {
|
|
|
5584
5728
|
* Creates a new invocation context.
|
|
5585
5729
|
*/
|
|
5586
5730
|
private _newInvocationContext;
|
|
5731
|
+
/**
|
|
5732
|
+
* Runs compaction if configured.
|
|
5733
|
+
*/
|
|
5734
|
+
private _runCompaction;
|
|
5735
|
+
/**
|
|
5736
|
+
* Gets the configured summarizer or creates a default LLM-based one.
|
|
5737
|
+
*/
|
|
5738
|
+
private _getOrCreateSummarizer;
|
|
5739
|
+
rewind(args: {
|
|
5740
|
+
userId: string;
|
|
5741
|
+
sessionId: string;
|
|
5742
|
+
rewindBeforeInvocationId: string;
|
|
5743
|
+
}): Promise<void>;
|
|
5744
|
+
private _computeStateDeltaForRewind;
|
|
5745
|
+
private _computeArtifactDeltaForRewind;
|
|
5587
5746
|
}
|
|
5588
5747
|
/**
|
|
5589
5748
|
* An in-memory Runner for testing and development.
|
|
@@ -5673,4 +5832,4 @@ declare const traceLlmCall: (invocationContext: InvocationContext, eventId: stri
|
|
|
5673
5832
|
|
|
5674
5833
|
declare const VERSION = "0.1.0";
|
|
5675
5834
|
|
|
5676
|
-
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, McpCoinGeckoPro, 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, VertexAiRagMemoryService, 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 };
|
|
5835
|
+
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, type EventCompaction, index$2 as Events, type EventsCompactionConfig, type EventsSummarizer, 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, LlmEventSummarizer, type LlmModel, type LlmModelConfig, LlmRequest, LlmResponse, LoadArtifactsTool, LoadMemoryTool, LocalEvalService, LoopAgent, type LoopAgentConfig, McpAbi, McpAtp, McpBamm, McpCoinGecko, McpCoinGeckoPro, 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 ParsedArtifactUri, 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, VertexAiRagMemoryService, 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, getArtifactUri, getLongRunningFunctionCalls, getMcpTools, handleFunctionCallsAsync, handleFunctionCallsLive, requestProcessor$5 as identityRequestProcessor, initializeTelemetry, injectSessionState, requestProcessor$4 as instructionsRequestProcessor, isArtifactRef, isEnhancedAuthConfig, jsonSchemaToDeclaration, mcpSchemaToParameters, mergeAgentRun, mergeParallelFunctionResponseEvents, newInvocationContextId, requestProcessor$1 as nlPlanningRequestProcessor, responseProcessor$1 as nlPlanningResponseProcessor, normalizeJsonSchema, parseArtifactUri, populateClientFunctionCallId, registerProviders, removeClientFunctionCallId, requestProcessor$7 as requestProcessor, runCompactionForSlidingWindow, shutdownTelemetry, telemetryService, traceLlmCall, traceToolCall, tracer };
|