@iqai/adk 0.0.3 → 0.0.5
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 +2 -8
- package/LICENSE.md +9 -0
- package/dist/index.d.mts +22 -32
- package/dist/index.d.ts +22 -32
- package/dist/index.js +608 -134
- package/dist/index.mjs +567 -93
- package/package.json +5 -31
- package/LICENSE +0 -21
- package/README.md +0 -260
package/CHANGELOG.md
CHANGED
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
# @iqai/adk
|
|
2
2
|
|
|
3
|
-
## 0.0.
|
|
3
|
+
## 0.0.5
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
|
|
9
|
-
## 0.0.2
|
|
10
|
-
|
|
11
|
-
### Patch Changes
|
|
12
|
-
|
|
13
|
-
- 961fdd6: Updates package json to bundle correct files
|
|
7
|
+
- 5448661: Updates pglite session to take pglite instance as input instead of drizzle
|
package/LICENSE.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 IQAI.com
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/dist/index.d.mts
CHANGED
|
@@ -4,7 +4,7 @@ import { AxiosInstance } from 'axios';
|
|
|
4
4
|
import OpenAI from 'openai';
|
|
5
5
|
import * as drizzle_orm_pg_core from 'drizzle-orm/pg-core';
|
|
6
6
|
import { NodePgDatabase } from 'drizzle-orm/node-postgres';
|
|
7
|
-
import {
|
|
7
|
+
import { PGlite } from '@electric-sql/pglite';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Function call result from LLM
|
|
@@ -1781,10 +1781,10 @@ declare class ToolContext implements IToolContext {
|
|
|
1781
1781
|
get sessionId(): string;
|
|
1782
1782
|
get messages(): Message[];
|
|
1783
1783
|
get config(): RunConfig;
|
|
1784
|
-
get userId(): string
|
|
1785
|
-
get appName(): string
|
|
1786
|
-
get memoryService(): BaseMemoryService
|
|
1787
|
-
get sessionService(): SessionService
|
|
1784
|
+
get userId(): string;
|
|
1785
|
+
get appName(): string;
|
|
1786
|
+
get memoryService(): BaseMemoryService;
|
|
1787
|
+
get sessionService(): SessionService;
|
|
1788
1788
|
get metadata(): Record<string, any>;
|
|
1789
1789
|
get variables(): Map<string, any>;
|
|
1790
1790
|
setVariable(name: string, value: any): void;
|
|
@@ -2852,12 +2852,14 @@ declare const index$2_HttpRequestTool: typeof HttpRequestTool;
|
|
|
2852
2852
|
type index$2_IToolContext = IToolContext;
|
|
2853
2853
|
type index$2_LoadMemoryTool = LoadMemoryTool;
|
|
2854
2854
|
declare const index$2_LoadMemoryTool: typeof LoadMemoryTool;
|
|
2855
|
+
type index$2_McpConfig = McpConfig;
|
|
2855
2856
|
type index$2_McpError = McpError;
|
|
2856
2857
|
declare const index$2_McpError: typeof McpError;
|
|
2857
2858
|
type index$2_McpErrorType = McpErrorType;
|
|
2858
2859
|
declare const index$2_McpErrorType: typeof McpErrorType;
|
|
2859
2860
|
type index$2_McpToolset = McpToolset;
|
|
2860
2861
|
declare const index$2_McpToolset: typeof McpToolset;
|
|
2862
|
+
type index$2_McpTransportType = McpTransportType;
|
|
2861
2863
|
type index$2_ToolConfig = ToolConfig;
|
|
2862
2864
|
type index$2_ToolContext = ToolContext;
|
|
2863
2865
|
declare const index$2_ToolContext: typeof ToolContext;
|
|
@@ -2873,7 +2875,7 @@ declare const index$2_jsonSchemaToDeclaration: typeof jsonSchemaToDeclaration;
|
|
|
2873
2875
|
declare const index$2_mcpSchemaToParameters: typeof mcpSchemaToParameters;
|
|
2874
2876
|
declare const index$2_normalizeJsonSchema: typeof normalizeJsonSchema;
|
|
2875
2877
|
declare namespace index$2 {
|
|
2876
|
-
export { index$2_BaseTool as BaseTool, type index$2_BuildFunctionDeclarationOptions as BuildFunctionDeclarationOptions, index$2_ExitLoopTool as ExitLoopTool, index$2_FileOperationsTool as FileOperationsTool, index$2_FunctionTool as FunctionTool, index$2_GetUserChoiceTool as GetUserChoiceTool, index$2_GoogleSearch as GoogleSearch, index$2_HttpRequestTool as HttpRequestTool, type index$2_IToolContext as IToolContext, index$2_LoadMemoryTool as LoadMemoryTool, index$2_McpError as McpError, index$2_McpErrorType as McpErrorType, index$2_McpToolset as McpToolset, type index$2_ToolConfig as ToolConfig, index$2_ToolContext as ToolContext, index$2_TransferToAgentTool as TransferToAgentTool, index$2_UserInteractionTool as UserInteractionTool, index$2_adkToMcpToolType as adkToMcpToolType, index$2_buildFunctionDeclaration as buildFunctionDeclaration, index$2_createFunctionTool as createFunctionTool, index$2_getMcpTools as getMcpTools, index$2_jsonSchemaToDeclaration as jsonSchemaToDeclaration, index$2_mcpSchemaToParameters as mcpSchemaToParameters, index$2_normalizeJsonSchema as normalizeJsonSchema };
|
|
2878
|
+
export { index$2_BaseTool as BaseTool, type index$2_BuildFunctionDeclarationOptions as BuildFunctionDeclarationOptions, index$2_ExitLoopTool as ExitLoopTool, index$2_FileOperationsTool as FileOperationsTool, index$2_FunctionTool as FunctionTool, index$2_GetUserChoiceTool as GetUserChoiceTool, index$2_GoogleSearch as GoogleSearch, index$2_HttpRequestTool as HttpRequestTool, type index$2_IToolContext as IToolContext, index$2_LoadMemoryTool as LoadMemoryTool, type index$2_McpConfig as McpConfig, index$2_McpError as McpError, index$2_McpErrorType as McpErrorType, index$2_McpToolset as McpToolset, type index$2_McpTransportType as McpTransportType, type index$2_ToolConfig as ToolConfig, index$2_ToolContext as ToolContext, index$2_TransferToAgentTool as TransferToAgentTool, index$2_UserInteractionTool as UserInteractionTool, index$2_adkToMcpToolType as adkToMcpToolType, index$2_buildFunctionDeclaration as buildFunctionDeclaration, index$2_createFunctionTool as createFunctionTool, index$2_getMcpTools as getMcpTools, index$2_jsonSchemaToDeclaration as jsonSchemaToDeclaration, index$2_mcpSchemaToParameters as mcpSchemaToParameters, index$2_normalizeJsonSchema as normalizeJsonSchema };
|
|
2877
2879
|
}
|
|
2878
2880
|
|
|
2879
2881
|
/**
|
|
@@ -3213,27 +3215,27 @@ declare const sessionsSchema$1: drizzle_orm_pg_core.PgTableWithColumns<{
|
|
|
3213
3215
|
};
|
|
3214
3216
|
dialect: "pg";
|
|
3215
3217
|
}>;
|
|
3216
|
-
type SessionsTable
|
|
3218
|
+
type SessionsTable = typeof sessionsSchema$1;
|
|
3217
3219
|
/**
|
|
3218
3220
|
* Configuration for DatabaseSessionService with Drizzle
|
|
3219
3221
|
*/
|
|
3220
|
-
interface DatabaseSessionServiceConfig
|
|
3222
|
+
interface DatabaseSessionServiceConfig {
|
|
3221
3223
|
/**
|
|
3222
3224
|
* An initialized Drizzle ORM database client instance.
|
|
3223
3225
|
* Example: drizzle(new Pool({ connectionString: '...' }), { schema: { sessions: sessionsSchema } })
|
|
3224
3226
|
*/
|
|
3225
3227
|
db: NodePgDatabase<{
|
|
3226
|
-
sessions: SessionsTable
|
|
3228
|
+
sessions: SessionsTable;
|
|
3227
3229
|
}>;
|
|
3228
3230
|
/**
|
|
3229
3231
|
* Optional: Pass the sessions schema table directly if not attached to db client's schema property
|
|
3230
3232
|
*/
|
|
3231
|
-
sessionsTable?: SessionsTable
|
|
3233
|
+
sessionsTable?: SessionsTable;
|
|
3232
3234
|
}
|
|
3233
3235
|
declare class PostgresSessionService implements SessionService {
|
|
3234
3236
|
private db;
|
|
3235
3237
|
private sessionsTable;
|
|
3236
|
-
constructor(config: DatabaseSessionServiceConfig
|
|
3238
|
+
constructor(config: DatabaseSessionServiceConfig);
|
|
3237
3239
|
private generateSessionId;
|
|
3238
3240
|
createSession(userId: string, metadata?: Record<string, any>): Promise<Session>;
|
|
3239
3241
|
getSession(sessionId: string): Promise<Session | undefined>;
|
|
@@ -3385,22 +3387,15 @@ declare const sessionsSchema: drizzle_orm_pg_core.PgTableWithColumns<{
|
|
|
3385
3387
|
};
|
|
3386
3388
|
dialect: "pg";
|
|
3387
3389
|
}>;
|
|
3388
|
-
type SessionsTable = typeof sessionsSchema;
|
|
3389
3390
|
/**
|
|
3390
|
-
* Configuration for
|
|
3391
|
+
* Configuration for PgLiteSessionService
|
|
3391
3392
|
*/
|
|
3392
|
-
interface
|
|
3393
|
-
/**
|
|
3394
|
-
* An initialized Drizzle ORM database client instance with PGlite.
|
|
3395
|
-
* Example: drizzle(new PGlite(), { schema: { sessions: sessionsSchema } })
|
|
3396
|
-
*/
|
|
3397
|
-
db: PgliteDatabase<{
|
|
3398
|
-
sessions: SessionsTable;
|
|
3399
|
-
}>;
|
|
3393
|
+
interface PgLiteSessionServiceConfig {
|
|
3400
3394
|
/**
|
|
3401
|
-
*
|
|
3395
|
+
* An initialized PGlite instance.
|
|
3396
|
+
* The service will handle all Drizzle ORM setup internally.
|
|
3402
3397
|
*/
|
|
3403
|
-
|
|
3398
|
+
pglite: PGlite;
|
|
3404
3399
|
/**
|
|
3405
3400
|
* Optional: Skip automatic table creation if you handle migrations externally
|
|
3406
3401
|
*/
|
|
@@ -3410,7 +3405,7 @@ declare class PgLiteSessionService implements SessionService {
|
|
|
3410
3405
|
private db;
|
|
3411
3406
|
private sessionsTable;
|
|
3412
3407
|
private initialized;
|
|
3413
|
-
constructor(config:
|
|
3408
|
+
constructor(config: PgLiteSessionServiceConfig);
|
|
3414
3409
|
/**
|
|
3415
3410
|
* Initialize the database by creating required tables if they don't exist
|
|
3416
3411
|
*/
|
|
@@ -3425,12 +3420,6 @@ declare class PgLiteSessionService implements SessionService {
|
|
|
3425
3420
|
updateSession(session: Session): Promise<void>;
|
|
3426
3421
|
listSessions(userId: string, options?: ListSessionOptions): Promise<Session[]>;
|
|
3427
3422
|
deleteSession(sessionId: string): Promise<void>;
|
|
3428
|
-
/**
|
|
3429
|
-
* Appends an event to a session object
|
|
3430
|
-
* @param session The session to append the event to
|
|
3431
|
-
* @param event The event to append
|
|
3432
|
-
* @returns The appended event
|
|
3433
|
-
*/
|
|
3434
3423
|
appendEvent(session: Session, event: Event): Promise<Event>;
|
|
3435
3424
|
}
|
|
3436
3425
|
|
|
@@ -3473,9 +3462,10 @@ type index_SessionState = SessionState;
|
|
|
3473
3462
|
declare const index_SessionState: typeof SessionState;
|
|
3474
3463
|
declare const index_cloneSession: typeof cloneSession;
|
|
3475
3464
|
declare const index_generateSessionId: typeof generateSessionId;
|
|
3465
|
+
declare const index_sessionsSchema: typeof sessionsSchema;
|
|
3476
3466
|
declare const index_validateSession: typeof validateSession;
|
|
3477
3467
|
declare namespace index {
|
|
3478
|
-
export { index_InMemorySessionService as InMemorySessionService, type index_ListSessionOptions as ListSessionOptions, index_PgLiteSessionService as PgLiteSessionService, index_PostgresSessionService as PostgresSessionService, type index_Session as Session, type index_SessionService as SessionService, index_SessionState as SessionState, index_cloneSession as cloneSession, index_generateSessionId as generateSessionId, index_validateSession as validateSession };
|
|
3468
|
+
export { index_InMemorySessionService as InMemorySessionService, type index_ListSessionOptions as ListSessionOptions, index_PgLiteSessionService as PgLiteSessionService, index_PostgresSessionService as PostgresSessionService, type index_Session as Session, type index_SessionService as SessionService, index_SessionState as SessionState, index_cloneSession as cloneSession, index_generateSessionId as generateSessionId, index_sessionsSchema as sessionsSchema, index_validateSession as validateSession };
|
|
3479
3469
|
}
|
|
3480
3470
|
|
|
3481
3471
|
/**
|
|
@@ -3541,4 +3531,4 @@ declare class InMemoryRunner extends Runner {
|
|
|
3541
3531
|
|
|
3542
3532
|
declare const VERSION = "0.1.0";
|
|
3543
3533
|
|
|
3544
|
-
export { Agent, type AgentConfig, index$3 as Agents, AnthropicLLM, type AnthropicLLMConfig, AnthropicLLMConnection, ApiKeyCredential, ApiKeyScheme, type AudioTranscriptionConfig, AuthConfig, AuthCredential, AuthCredentialType, AuthHandler, AuthScheme, AuthSchemeType, BaseAgent, BaseLLM, BaseLLMConnection, type BaseMemoryService, BaseTool, BasicAuthCredential, BearerTokenCredential, type BuildFunctionDeclarationOptions, ExitLoopTool, FileOperationsTool, type FunctionCall, type FunctionDeclaration, FunctionTool, GetUserChoiceTool, GoogleLLM, type GoogleLLMConfig, GoogleSearch, HttpRequestTool, HttpScheme, type IToolContext, type ImageContent, InMemoryMemoryService, InMemoryRunner, InMemorySessionService, InvocationContext, type JSONSchema, LLMRegistry, LLMRequest, type LLMRequestConfig, LLMResponse, LangGraphAgent, type LangGraphAgentConfig, type LangGraphNode, type ListSessionOptions, LoadMemoryTool, LoopAgent, type LoopAgentConfig, McpError, McpErrorType, McpToolset, index$1 as Memory, type MemoryResult, type Message, type MessageContent, type MessageRole, index$4 as Models, OAuth2Credential, OAuth2Scheme, type OAuthFlow, type OAuthFlows, OpenAILLM, type OpenAILLMConfig, OpenAILLMConnection, OpenIdConnectScheme, ParallelAgent, type ParallelAgentConfig, PersistentMemoryService, PgLiteSessionService, PostgresSessionService, RunConfig, Runner, type SearchMemoryOptions, type SearchMemoryResponse, SequentialAgent, type SequentialAgentConfig, type Session, type SessionService, SessionState, index as Sessions, type SpeechConfig, StreamingMode, type TextContent, type ToolCall, type ToolConfig, ToolContext, index$2 as Tools, TransferToAgentTool, UserInteractionTool, VERSION, adkToMcpToolType, buildFunctionDeclaration, cloneSession, createFunctionTool, generateSessionId, getMcpTools, jsonSchemaToDeclaration, mcpSchemaToParameters, normalizeJsonSchema, registerProviders, validateSession };
|
|
3534
|
+
export { Agent, type AgentConfig, index$3 as Agents, AnthropicLLM, type AnthropicLLMConfig, AnthropicLLMConnection, ApiKeyCredential, ApiKeyScheme, type AudioTranscriptionConfig, AuthConfig, AuthCredential, AuthCredentialType, AuthHandler, AuthScheme, AuthSchemeType, BaseAgent, BaseLLM, BaseLLMConnection, type BaseMemoryService, BaseTool, BasicAuthCredential, BearerTokenCredential, type BuildFunctionDeclarationOptions, ExitLoopTool, FileOperationsTool, type FunctionCall, type FunctionDeclaration, FunctionTool, GetUserChoiceTool, GoogleLLM, type GoogleLLMConfig, GoogleSearch, HttpRequestTool, HttpScheme, type IToolContext, type ImageContent, InMemoryMemoryService, InMemoryRunner, InMemorySessionService, InvocationContext, type JSONSchema, LLMRegistry, LLMRequest, type LLMRequestConfig, LLMResponse, LangGraphAgent, type LangGraphAgentConfig, type LangGraphNode, type ListSessionOptions, LoadMemoryTool, LoopAgent, type LoopAgentConfig, type McpConfig, McpError, McpErrorType, McpToolset, type McpTransportType, index$1 as Memory, type MemoryResult, type Message, type MessageContent, type MessageRole, index$4 as Models, OAuth2Credential, OAuth2Scheme, type OAuthFlow, type OAuthFlows, OpenAILLM, type OpenAILLMConfig, OpenAILLMConnection, OpenIdConnectScheme, ParallelAgent, type ParallelAgentConfig, PersistentMemoryService, PgLiteSessionService, PostgresSessionService, RunConfig, Runner, type SearchMemoryOptions, type SearchMemoryResponse, SequentialAgent, type SequentialAgentConfig, type Session, type SessionService, SessionState, index as Sessions, type SpeechConfig, StreamingMode, type TextContent, type ToolCall, type ToolConfig, ToolContext, index$2 as Tools, TransferToAgentTool, UserInteractionTool, VERSION, adkToMcpToolType, buildFunctionDeclaration, cloneSession, createFunctionTool, generateSessionId, getMcpTools, jsonSchemaToDeclaration, mcpSchemaToParameters, normalizeJsonSchema, registerProviders, sessionsSchema, validateSession };
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { AxiosInstance } from 'axios';
|
|
|
4
4
|
import OpenAI from 'openai';
|
|
5
5
|
import * as drizzle_orm_pg_core from 'drizzle-orm/pg-core';
|
|
6
6
|
import { NodePgDatabase } from 'drizzle-orm/node-postgres';
|
|
7
|
-
import {
|
|
7
|
+
import { PGlite } from '@electric-sql/pglite';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Function call result from LLM
|
|
@@ -1781,10 +1781,10 @@ declare class ToolContext implements IToolContext {
|
|
|
1781
1781
|
get sessionId(): string;
|
|
1782
1782
|
get messages(): Message[];
|
|
1783
1783
|
get config(): RunConfig;
|
|
1784
|
-
get userId(): string
|
|
1785
|
-
get appName(): string
|
|
1786
|
-
get memoryService(): BaseMemoryService
|
|
1787
|
-
get sessionService(): SessionService
|
|
1784
|
+
get userId(): string;
|
|
1785
|
+
get appName(): string;
|
|
1786
|
+
get memoryService(): BaseMemoryService;
|
|
1787
|
+
get sessionService(): SessionService;
|
|
1788
1788
|
get metadata(): Record<string, any>;
|
|
1789
1789
|
get variables(): Map<string, any>;
|
|
1790
1790
|
setVariable(name: string, value: any): void;
|
|
@@ -2852,12 +2852,14 @@ declare const index$2_HttpRequestTool: typeof HttpRequestTool;
|
|
|
2852
2852
|
type index$2_IToolContext = IToolContext;
|
|
2853
2853
|
type index$2_LoadMemoryTool = LoadMemoryTool;
|
|
2854
2854
|
declare const index$2_LoadMemoryTool: typeof LoadMemoryTool;
|
|
2855
|
+
type index$2_McpConfig = McpConfig;
|
|
2855
2856
|
type index$2_McpError = McpError;
|
|
2856
2857
|
declare const index$2_McpError: typeof McpError;
|
|
2857
2858
|
type index$2_McpErrorType = McpErrorType;
|
|
2858
2859
|
declare const index$2_McpErrorType: typeof McpErrorType;
|
|
2859
2860
|
type index$2_McpToolset = McpToolset;
|
|
2860
2861
|
declare const index$2_McpToolset: typeof McpToolset;
|
|
2862
|
+
type index$2_McpTransportType = McpTransportType;
|
|
2861
2863
|
type index$2_ToolConfig = ToolConfig;
|
|
2862
2864
|
type index$2_ToolContext = ToolContext;
|
|
2863
2865
|
declare const index$2_ToolContext: typeof ToolContext;
|
|
@@ -2873,7 +2875,7 @@ declare const index$2_jsonSchemaToDeclaration: typeof jsonSchemaToDeclaration;
|
|
|
2873
2875
|
declare const index$2_mcpSchemaToParameters: typeof mcpSchemaToParameters;
|
|
2874
2876
|
declare const index$2_normalizeJsonSchema: typeof normalizeJsonSchema;
|
|
2875
2877
|
declare namespace index$2 {
|
|
2876
|
-
export { index$2_BaseTool as BaseTool, type index$2_BuildFunctionDeclarationOptions as BuildFunctionDeclarationOptions, index$2_ExitLoopTool as ExitLoopTool, index$2_FileOperationsTool as FileOperationsTool, index$2_FunctionTool as FunctionTool, index$2_GetUserChoiceTool as GetUserChoiceTool, index$2_GoogleSearch as GoogleSearch, index$2_HttpRequestTool as HttpRequestTool, type index$2_IToolContext as IToolContext, index$2_LoadMemoryTool as LoadMemoryTool, index$2_McpError as McpError, index$2_McpErrorType as McpErrorType, index$2_McpToolset as McpToolset, type index$2_ToolConfig as ToolConfig, index$2_ToolContext as ToolContext, index$2_TransferToAgentTool as TransferToAgentTool, index$2_UserInteractionTool as UserInteractionTool, index$2_adkToMcpToolType as adkToMcpToolType, index$2_buildFunctionDeclaration as buildFunctionDeclaration, index$2_createFunctionTool as createFunctionTool, index$2_getMcpTools as getMcpTools, index$2_jsonSchemaToDeclaration as jsonSchemaToDeclaration, index$2_mcpSchemaToParameters as mcpSchemaToParameters, index$2_normalizeJsonSchema as normalizeJsonSchema };
|
|
2878
|
+
export { index$2_BaseTool as BaseTool, type index$2_BuildFunctionDeclarationOptions as BuildFunctionDeclarationOptions, index$2_ExitLoopTool as ExitLoopTool, index$2_FileOperationsTool as FileOperationsTool, index$2_FunctionTool as FunctionTool, index$2_GetUserChoiceTool as GetUserChoiceTool, index$2_GoogleSearch as GoogleSearch, index$2_HttpRequestTool as HttpRequestTool, type index$2_IToolContext as IToolContext, index$2_LoadMemoryTool as LoadMemoryTool, type index$2_McpConfig as McpConfig, index$2_McpError as McpError, index$2_McpErrorType as McpErrorType, index$2_McpToolset as McpToolset, type index$2_McpTransportType as McpTransportType, type index$2_ToolConfig as ToolConfig, index$2_ToolContext as ToolContext, index$2_TransferToAgentTool as TransferToAgentTool, index$2_UserInteractionTool as UserInteractionTool, index$2_adkToMcpToolType as adkToMcpToolType, index$2_buildFunctionDeclaration as buildFunctionDeclaration, index$2_createFunctionTool as createFunctionTool, index$2_getMcpTools as getMcpTools, index$2_jsonSchemaToDeclaration as jsonSchemaToDeclaration, index$2_mcpSchemaToParameters as mcpSchemaToParameters, index$2_normalizeJsonSchema as normalizeJsonSchema };
|
|
2877
2879
|
}
|
|
2878
2880
|
|
|
2879
2881
|
/**
|
|
@@ -3213,27 +3215,27 @@ declare const sessionsSchema$1: drizzle_orm_pg_core.PgTableWithColumns<{
|
|
|
3213
3215
|
};
|
|
3214
3216
|
dialect: "pg";
|
|
3215
3217
|
}>;
|
|
3216
|
-
type SessionsTable
|
|
3218
|
+
type SessionsTable = typeof sessionsSchema$1;
|
|
3217
3219
|
/**
|
|
3218
3220
|
* Configuration for DatabaseSessionService with Drizzle
|
|
3219
3221
|
*/
|
|
3220
|
-
interface DatabaseSessionServiceConfig
|
|
3222
|
+
interface DatabaseSessionServiceConfig {
|
|
3221
3223
|
/**
|
|
3222
3224
|
* An initialized Drizzle ORM database client instance.
|
|
3223
3225
|
* Example: drizzle(new Pool({ connectionString: '...' }), { schema: { sessions: sessionsSchema } })
|
|
3224
3226
|
*/
|
|
3225
3227
|
db: NodePgDatabase<{
|
|
3226
|
-
sessions: SessionsTable
|
|
3228
|
+
sessions: SessionsTable;
|
|
3227
3229
|
}>;
|
|
3228
3230
|
/**
|
|
3229
3231
|
* Optional: Pass the sessions schema table directly if not attached to db client's schema property
|
|
3230
3232
|
*/
|
|
3231
|
-
sessionsTable?: SessionsTable
|
|
3233
|
+
sessionsTable?: SessionsTable;
|
|
3232
3234
|
}
|
|
3233
3235
|
declare class PostgresSessionService implements SessionService {
|
|
3234
3236
|
private db;
|
|
3235
3237
|
private sessionsTable;
|
|
3236
|
-
constructor(config: DatabaseSessionServiceConfig
|
|
3238
|
+
constructor(config: DatabaseSessionServiceConfig);
|
|
3237
3239
|
private generateSessionId;
|
|
3238
3240
|
createSession(userId: string, metadata?: Record<string, any>): Promise<Session>;
|
|
3239
3241
|
getSession(sessionId: string): Promise<Session | undefined>;
|
|
@@ -3385,22 +3387,15 @@ declare const sessionsSchema: drizzle_orm_pg_core.PgTableWithColumns<{
|
|
|
3385
3387
|
};
|
|
3386
3388
|
dialect: "pg";
|
|
3387
3389
|
}>;
|
|
3388
|
-
type SessionsTable = typeof sessionsSchema;
|
|
3389
3390
|
/**
|
|
3390
|
-
* Configuration for
|
|
3391
|
+
* Configuration for PgLiteSessionService
|
|
3391
3392
|
*/
|
|
3392
|
-
interface
|
|
3393
|
-
/**
|
|
3394
|
-
* An initialized Drizzle ORM database client instance with PGlite.
|
|
3395
|
-
* Example: drizzle(new PGlite(), { schema: { sessions: sessionsSchema } })
|
|
3396
|
-
*/
|
|
3397
|
-
db: PgliteDatabase<{
|
|
3398
|
-
sessions: SessionsTable;
|
|
3399
|
-
}>;
|
|
3393
|
+
interface PgLiteSessionServiceConfig {
|
|
3400
3394
|
/**
|
|
3401
|
-
*
|
|
3395
|
+
* An initialized PGlite instance.
|
|
3396
|
+
* The service will handle all Drizzle ORM setup internally.
|
|
3402
3397
|
*/
|
|
3403
|
-
|
|
3398
|
+
pglite: PGlite;
|
|
3404
3399
|
/**
|
|
3405
3400
|
* Optional: Skip automatic table creation if you handle migrations externally
|
|
3406
3401
|
*/
|
|
@@ -3410,7 +3405,7 @@ declare class PgLiteSessionService implements SessionService {
|
|
|
3410
3405
|
private db;
|
|
3411
3406
|
private sessionsTable;
|
|
3412
3407
|
private initialized;
|
|
3413
|
-
constructor(config:
|
|
3408
|
+
constructor(config: PgLiteSessionServiceConfig);
|
|
3414
3409
|
/**
|
|
3415
3410
|
* Initialize the database by creating required tables if they don't exist
|
|
3416
3411
|
*/
|
|
@@ -3425,12 +3420,6 @@ declare class PgLiteSessionService implements SessionService {
|
|
|
3425
3420
|
updateSession(session: Session): Promise<void>;
|
|
3426
3421
|
listSessions(userId: string, options?: ListSessionOptions): Promise<Session[]>;
|
|
3427
3422
|
deleteSession(sessionId: string): Promise<void>;
|
|
3428
|
-
/**
|
|
3429
|
-
* Appends an event to a session object
|
|
3430
|
-
* @param session The session to append the event to
|
|
3431
|
-
* @param event The event to append
|
|
3432
|
-
* @returns The appended event
|
|
3433
|
-
*/
|
|
3434
3423
|
appendEvent(session: Session, event: Event): Promise<Event>;
|
|
3435
3424
|
}
|
|
3436
3425
|
|
|
@@ -3473,9 +3462,10 @@ type index_SessionState = SessionState;
|
|
|
3473
3462
|
declare const index_SessionState: typeof SessionState;
|
|
3474
3463
|
declare const index_cloneSession: typeof cloneSession;
|
|
3475
3464
|
declare const index_generateSessionId: typeof generateSessionId;
|
|
3465
|
+
declare const index_sessionsSchema: typeof sessionsSchema;
|
|
3476
3466
|
declare const index_validateSession: typeof validateSession;
|
|
3477
3467
|
declare namespace index {
|
|
3478
|
-
export { index_InMemorySessionService as InMemorySessionService, type index_ListSessionOptions as ListSessionOptions, index_PgLiteSessionService as PgLiteSessionService, index_PostgresSessionService as PostgresSessionService, type index_Session as Session, type index_SessionService as SessionService, index_SessionState as SessionState, index_cloneSession as cloneSession, index_generateSessionId as generateSessionId, index_validateSession as validateSession };
|
|
3468
|
+
export { index_InMemorySessionService as InMemorySessionService, type index_ListSessionOptions as ListSessionOptions, index_PgLiteSessionService as PgLiteSessionService, index_PostgresSessionService as PostgresSessionService, type index_Session as Session, type index_SessionService as SessionService, index_SessionState as SessionState, index_cloneSession as cloneSession, index_generateSessionId as generateSessionId, index_sessionsSchema as sessionsSchema, index_validateSession as validateSession };
|
|
3479
3469
|
}
|
|
3480
3470
|
|
|
3481
3471
|
/**
|
|
@@ -3541,4 +3531,4 @@ declare class InMemoryRunner extends Runner {
|
|
|
3541
3531
|
|
|
3542
3532
|
declare const VERSION = "0.1.0";
|
|
3543
3533
|
|
|
3544
|
-
export { Agent, type AgentConfig, index$3 as Agents, AnthropicLLM, type AnthropicLLMConfig, AnthropicLLMConnection, ApiKeyCredential, ApiKeyScheme, type AudioTranscriptionConfig, AuthConfig, AuthCredential, AuthCredentialType, AuthHandler, AuthScheme, AuthSchemeType, BaseAgent, BaseLLM, BaseLLMConnection, type BaseMemoryService, BaseTool, BasicAuthCredential, BearerTokenCredential, type BuildFunctionDeclarationOptions, ExitLoopTool, FileOperationsTool, type FunctionCall, type FunctionDeclaration, FunctionTool, GetUserChoiceTool, GoogleLLM, type GoogleLLMConfig, GoogleSearch, HttpRequestTool, HttpScheme, type IToolContext, type ImageContent, InMemoryMemoryService, InMemoryRunner, InMemorySessionService, InvocationContext, type JSONSchema, LLMRegistry, LLMRequest, type LLMRequestConfig, LLMResponse, LangGraphAgent, type LangGraphAgentConfig, type LangGraphNode, type ListSessionOptions, LoadMemoryTool, LoopAgent, type LoopAgentConfig, McpError, McpErrorType, McpToolset, index$1 as Memory, type MemoryResult, type Message, type MessageContent, type MessageRole, index$4 as Models, OAuth2Credential, OAuth2Scheme, type OAuthFlow, type OAuthFlows, OpenAILLM, type OpenAILLMConfig, OpenAILLMConnection, OpenIdConnectScheme, ParallelAgent, type ParallelAgentConfig, PersistentMemoryService, PgLiteSessionService, PostgresSessionService, RunConfig, Runner, type SearchMemoryOptions, type SearchMemoryResponse, SequentialAgent, type SequentialAgentConfig, type Session, type SessionService, SessionState, index as Sessions, type SpeechConfig, StreamingMode, type TextContent, type ToolCall, type ToolConfig, ToolContext, index$2 as Tools, TransferToAgentTool, UserInteractionTool, VERSION, adkToMcpToolType, buildFunctionDeclaration, cloneSession, createFunctionTool, generateSessionId, getMcpTools, jsonSchemaToDeclaration, mcpSchemaToParameters, normalizeJsonSchema, registerProviders, validateSession };
|
|
3534
|
+
export { Agent, type AgentConfig, index$3 as Agents, AnthropicLLM, type AnthropicLLMConfig, AnthropicLLMConnection, ApiKeyCredential, ApiKeyScheme, type AudioTranscriptionConfig, AuthConfig, AuthCredential, AuthCredentialType, AuthHandler, AuthScheme, AuthSchemeType, BaseAgent, BaseLLM, BaseLLMConnection, type BaseMemoryService, BaseTool, BasicAuthCredential, BearerTokenCredential, type BuildFunctionDeclarationOptions, ExitLoopTool, FileOperationsTool, type FunctionCall, type FunctionDeclaration, FunctionTool, GetUserChoiceTool, GoogleLLM, type GoogleLLMConfig, GoogleSearch, HttpRequestTool, HttpScheme, type IToolContext, type ImageContent, InMemoryMemoryService, InMemoryRunner, InMemorySessionService, InvocationContext, type JSONSchema, LLMRegistry, LLMRequest, type LLMRequestConfig, LLMResponse, LangGraphAgent, type LangGraphAgentConfig, type LangGraphNode, type ListSessionOptions, LoadMemoryTool, LoopAgent, type LoopAgentConfig, type McpConfig, McpError, McpErrorType, McpToolset, type McpTransportType, index$1 as Memory, type MemoryResult, type Message, type MessageContent, type MessageRole, index$4 as Models, OAuth2Credential, OAuth2Scheme, type OAuthFlow, type OAuthFlows, OpenAILLM, type OpenAILLMConfig, OpenAILLMConnection, OpenIdConnectScheme, ParallelAgent, type ParallelAgentConfig, PersistentMemoryService, PgLiteSessionService, PostgresSessionService, RunConfig, Runner, type SearchMemoryOptions, type SearchMemoryResponse, SequentialAgent, type SequentialAgentConfig, type Session, type SessionService, SessionState, index as Sessions, type SpeechConfig, StreamingMode, type TextContent, type ToolCall, type ToolConfig, ToolContext, index$2 as Tools, TransferToAgentTool, UserInteractionTool, VERSION, adkToMcpToolType, buildFunctionDeclaration, cloneSession, createFunctionTool, generateSessionId, getMcpTools, jsonSchemaToDeclaration, mcpSchemaToParameters, normalizeJsonSchema, registerProviders, sessionsSchema, validateSession };
|