@google/adk 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/a2a/part_converter_utils.js +210 -0
- package/dist/cjs/agents/active_streaming_tool.js +1 -1
- package/dist/cjs/agents/base_agent.js +3 -3
- package/dist/cjs/agents/base_llm_processor.js +1 -1
- package/dist/cjs/agents/callback_context.js +1 -1
- package/dist/cjs/agents/content_processor_utils.js +1 -1
- package/dist/cjs/agents/functions.js +2 -1
- package/dist/cjs/agents/instructions.js +1 -1
- package/dist/cjs/agents/invocation_context.js +1 -1
- package/dist/cjs/agents/live_request_queue.js +1 -1
- package/dist/cjs/agents/llm_agent.js +58 -40
- package/dist/cjs/agents/loop_agent.js +1 -1
- package/dist/cjs/agents/parallel_agent.js +1 -1
- package/dist/cjs/agents/readonly_context.js +13 -1
- package/dist/cjs/agents/run_config.js +2 -1
- package/dist/cjs/agents/sequential_agent.js +1 -1
- package/dist/cjs/agents/transcription_entry.js +1 -1
- package/dist/cjs/artifacts/base_artifact_service.js +1 -1
- package/dist/cjs/artifacts/file_artifact_service.js +491 -0
- package/dist/cjs/artifacts/gcs_artifact_service.js +127 -48
- package/dist/cjs/artifacts/in_memory_artifact_service.js +54 -6
- package/dist/cjs/artifacts/registry.js +55 -0
- package/dist/cjs/auth/auth_credential.js +1 -1
- package/dist/cjs/auth/auth_handler.js +1 -1
- package/dist/cjs/auth/auth_schemes.js +1 -1
- package/dist/cjs/auth/auth_tool.js +1 -1
- package/dist/cjs/auth/credential_service/base_credential_service.js +1 -1
- package/dist/cjs/auth/credential_service/in_memory_credential_service.js +1 -1
- package/dist/cjs/auth/exchanger/base_credential_exchanger.js +1 -1
- package/dist/cjs/auth/exchanger/credential_exchanger_registry.js +1 -1
- package/dist/cjs/code_executors/base_code_executor.js +1 -1
- package/dist/cjs/code_executors/built_in_code_executor.js +1 -1
- package/dist/cjs/code_executors/code_execution_utils.js +1 -1
- package/dist/cjs/code_executors/code_executor_context.js +1 -1
- package/dist/cjs/common.js +14 -1
- package/dist/cjs/events/event.js +33 -4
- package/dist/cjs/events/event_actions.js +2 -2
- package/dist/cjs/events/structured_events.js +105 -0
- package/dist/cjs/examples/base_example_provider.js +1 -1
- package/dist/cjs/examples/example.js +1 -1
- package/dist/cjs/examples/example_util.js +1 -1
- package/dist/cjs/index.js +54 -83
- package/dist/cjs/index_web.js +1 -1
- package/dist/cjs/memory/base_memory_service.js +1 -1
- package/dist/cjs/memory/in_memory_memory_service.js +1 -1
- package/dist/cjs/memory/memory_entry.js +1 -1
- package/dist/cjs/models/apigee_llm.js +182 -0
- package/dist/cjs/models/base_llm.js +1 -1
- package/dist/cjs/models/base_llm_connection.js +1 -1
- package/dist/cjs/models/gemini_llm_connection.js +1 -1
- package/dist/cjs/models/google_llm.js +70 -51
- package/dist/cjs/models/llm_request.js +1 -1
- package/dist/cjs/models/llm_response.js +1 -1
- package/dist/cjs/models/registry.js +3 -1
- package/dist/cjs/plugins/base_plugin.js +1 -1
- package/dist/cjs/plugins/logging_plugin.js +1 -1
- package/dist/cjs/plugins/plugin_manager.js +1 -1
- package/dist/cjs/plugins/security_plugin.js +1 -1
- package/dist/cjs/runner/in_memory_runner.js +1 -1
- package/dist/cjs/runner/runner.js +32 -1
- package/dist/cjs/sessions/base_session_service.js +53 -3
- package/dist/cjs/sessions/database_session_service.js +364 -0
- package/dist/cjs/sessions/db/operations.js +114 -0
- package/dist/cjs/sessions/db/schema.js +204 -0
- package/dist/cjs/sessions/in_memory_session_service.js +24 -22
- package/dist/cjs/sessions/registry.js +49 -0
- package/dist/cjs/sessions/session.js +1 -1
- package/dist/cjs/sessions/state.js +1 -1
- package/dist/cjs/telemetry/google_cloud.js +1 -1
- package/dist/cjs/telemetry/setup.js +1 -1
- package/dist/cjs/telemetry/tracing.js +1 -1
- package/dist/cjs/tools/agent_tool.js +1 -1
- package/dist/cjs/tools/base_tool.js +1 -1
- package/dist/cjs/tools/base_toolset.js +1 -1
- package/dist/cjs/tools/forwarding_artifact_service.js +17 -1
- package/dist/cjs/tools/function_tool.js +1 -1
- package/dist/cjs/tools/google_search_tool.js +1 -1
- package/dist/cjs/tools/long_running_tool.js +1 -1
- package/dist/cjs/tools/mcp/mcp_session_manager.js +1 -1
- package/dist/cjs/tools/mcp/mcp_tool.js +1 -1
- package/dist/cjs/tools/mcp/mcp_toolset.js +1 -1
- package/dist/cjs/tools/tool_confirmation.js +1 -1
- package/dist/cjs/tools/tool_context.js +1 -1
- package/dist/cjs/utils/client_labels.js +1 -1
- package/dist/cjs/utils/env_aware_utils.js +10 -1
- package/dist/cjs/utils/gemini_schema_util.js +1 -1
- package/dist/cjs/utils/logger.js +1 -1
- package/dist/cjs/utils/model_name.js +1 -1
- package/dist/cjs/utils/object_notation_utils.js +78 -0
- package/dist/cjs/utils/simple_zod_to_json.js +1 -1
- package/dist/cjs/utils/variant_utils.js +3 -9
- package/dist/cjs/version.js +2 -2
- package/dist/esm/a2a/part_converter_utils.js +171 -0
- package/dist/esm/agents/base_agent.js +2 -2
- package/dist/esm/agents/functions.js +1 -0
- package/dist/esm/agents/llm_agent.js +58 -40
- package/dist/esm/agents/readonly_context.js +12 -0
- package/dist/esm/agents/run_config.js +1 -0
- package/dist/esm/artifacts/file_artifact_service.js +451 -0
- package/dist/esm/artifacts/gcs_artifact_service.js +126 -47
- package/dist/esm/artifacts/in_memory_artifact_service.js +51 -4
- package/dist/esm/artifacts/registry.js +28 -0
- package/dist/esm/common.js +9 -1
- package/dist/esm/events/event.js +29 -2
- package/dist/esm/events/event_actions.js +1 -1
- package/dist/esm/events/structured_events.js +74 -0
- package/dist/esm/index.js +18 -88
- package/dist/esm/models/apigee_llm.js +152 -0
- package/dist/esm/models/google_llm.js +67 -49
- package/dist/esm/models/registry.js +2 -0
- package/dist/esm/runner/runner.js +31 -0
- package/dist/esm/sessions/base_session_service.js +49 -1
- package/dist/esm/sessions/database_session_service.js +350 -0
- package/dist/esm/sessions/db/operations.js +87 -0
- package/dist/esm/sessions/db/schema.js +172 -0
- package/dist/esm/sessions/in_memory_session_service.js +23 -21
- package/dist/esm/sessions/registry.js +25 -0
- package/dist/esm/tools/forwarding_artifact_service.js +16 -0
- package/dist/esm/utils/env_aware_utils.js +8 -0
- package/dist/esm/utils/object_notation_utils.js +47 -0
- package/dist/esm/utils/variant_utils.js +1 -7
- package/dist/esm/version.js +1 -1
- package/dist/types/a2a/part_converter_utils.d.ts +47 -0
- package/dist/types/agents/llm_agent.d.ts +11 -11
- package/dist/types/agents/readonly_context.d.ts +8 -0
- package/dist/types/agents/run_config.d.ts +6 -0
- package/dist/types/artifacts/base_artifact_service.d.ts +31 -0
- package/dist/types/artifacts/file_artifact_service.d.ts +43 -0
- package/dist/types/artifacts/gcs_artifact_service.d.ts +3 -1
- package/dist/types/artifacts/in_memory_artifact_service.d.ts +5 -2
- package/dist/types/artifacts/registry.d.ts +7 -0
- package/dist/types/common.d.ts +11 -2
- package/dist/types/events/event.d.ts +15 -1
- package/dist/types/events/event_actions.d.ts +1 -1
- package/dist/types/events/structured_events.d.ts +106 -0
- package/dist/types/index.d.ts +5 -1
- package/dist/types/models/apigee_llm.d.ts +59 -0
- package/dist/types/models/google_llm.d.ts +5 -2
- package/dist/types/runner/runner.d.ts +15 -0
- package/dist/types/sessions/base_session_service.d.ts +20 -0
- package/dist/types/sessions/database_session_service.d.ts +31 -0
- package/dist/types/sessions/db/operations.d.ts +29 -0
- package/dist/types/sessions/db/schema.d.ts +45 -0
- package/dist/types/sessions/in_memory_session_service.d.ts +4 -1
- package/dist/types/sessions/registry.d.ts +7 -0
- package/dist/types/tools/forwarding_artifact_service.d.ts +3 -1
- package/dist/types/utils/env_aware_utils.d.ts +7 -0
- package/dist/types/utils/object_notation_utils.d.ts +21 -0
- package/dist/types/version.d.ts +1 -1
- package/dist/web/a2a/part_converter_utils.js +171 -0
- package/dist/web/agents/base_agent.js +2 -2
- package/dist/web/agents/functions.js +1 -0
- package/dist/web/agents/llm_agent.js +79 -59
- package/dist/web/agents/readonly_context.js +12 -0
- package/dist/web/agents/run_config.js +2 -1
- package/dist/web/artifacts/file_artifact_service.js +506 -0
- package/dist/web/artifacts/gcs_artifact_service.js +123 -46
- package/dist/web/artifacts/in_memory_artifact_service.js +51 -4
- package/dist/web/artifacts/registry.js +28 -0
- package/dist/web/common.js +9 -1
- package/dist/web/events/event.js +29 -2
- package/dist/web/events/event_actions.js +1 -1
- package/dist/web/events/structured_events.js +74 -0
- package/dist/web/index.js +18 -8
- package/dist/web/models/apigee_llm.js +219 -0
- package/dist/web/models/google_llm.js +67 -46
- package/dist/web/models/registry.js +2 -0
- package/dist/web/runner/runner.js +33 -0
- package/dist/web/sessions/base_session_service.js +49 -1
- package/dist/web/sessions/database_session_service.js +368 -0
- package/dist/web/sessions/db/operations.js +87 -0
- package/dist/web/sessions/db/schema.js +172 -0
- package/dist/web/sessions/in_memory_session_service.js +23 -21
- package/dist/web/sessions/registry.js +25 -0
- package/dist/web/tools/forwarding_artifact_service.js +16 -0
- package/dist/web/utils/env_aware_utils.js +8 -0
- package/dist/web/utils/object_notation_utils.js +47 -0
- package/dist/web/utils/variant_utils.js +1 -7
- package/dist/web/version.js +1 -1
- package/package.json +13 -4
- package/dist/cjs/index.js.map +0 -7
- package/dist/esm/index.js.map +0 -7
- package/dist/web/index.js.map +0 -7
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import {
|
|
7
|
+
DatabaseSessionService,
|
|
8
|
+
isDatabaseConnectionString
|
|
9
|
+
} from "./database_session_service.js";
|
|
10
|
+
import {
|
|
11
|
+
InMemorySessionService,
|
|
12
|
+
isInMemoryConnectionString
|
|
13
|
+
} from "./in_memory_session_service.js";
|
|
14
|
+
function getSessionServiceFromUri(uri) {
|
|
15
|
+
if (isInMemoryConnectionString(uri)) {
|
|
16
|
+
return new InMemorySessionService();
|
|
17
|
+
}
|
|
18
|
+
if (isDatabaseConnectionString(uri)) {
|
|
19
|
+
return new DatabaseSessionService(uri);
|
|
20
|
+
}
|
|
21
|
+
throw new Error(`Unsupported session service URI: ${uri}`);
|
|
22
|
+
}
|
|
23
|
+
export {
|
|
24
|
+
getSessionServiceFromUri
|
|
25
|
+
};
|
|
@@ -35,6 +35,22 @@ class ForwardingArtifactService {
|
|
|
35
35
|
request
|
|
36
36
|
);
|
|
37
37
|
}
|
|
38
|
+
listArtifactVersions(request) {
|
|
39
|
+
if (!this.toolContext.invocationContext.artifactService) {
|
|
40
|
+
throw new Error("Artifact service is not initialized.");
|
|
41
|
+
}
|
|
42
|
+
return this.toolContext.invocationContext.artifactService.listArtifactVersions(
|
|
43
|
+
request
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
getArtifactVersion(request) {
|
|
47
|
+
if (!this.toolContext.invocationContext.artifactService) {
|
|
48
|
+
throw new Error("Artifact service is not initialized.");
|
|
49
|
+
}
|
|
50
|
+
return this.toolContext.invocationContext.artifactService.getArtifactVersion(
|
|
51
|
+
request
|
|
52
|
+
);
|
|
53
|
+
}
|
|
38
54
|
}
|
|
39
55
|
export {
|
|
40
56
|
ForwardingArtifactService
|
|
@@ -40,9 +40,17 @@ function isBase64Encoded(data) {
|
|
|
40
40
|
return false;
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
+
function getBooleanEnvVar(envVar) {
|
|
44
|
+
if (!process.env) {
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
const envVarValue = (process.env[envVar] || "").toLowerCase();
|
|
48
|
+
return ["true", "1"].includes(envVarValue);
|
|
49
|
+
}
|
|
43
50
|
export {
|
|
44
51
|
base64Decode,
|
|
45
52
|
base64Encode,
|
|
53
|
+
getBooleanEnvVar,
|
|
46
54
|
isBase64Encoded,
|
|
47
55
|
isBrowser,
|
|
48
56
|
randomUUID
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
function toCamelCase(obj, preserveKeys = []) {
|
|
7
|
+
return toNotation(obj, toCamelCaseKey, "", preserveKeys);
|
|
8
|
+
}
|
|
9
|
+
function toSnakeCase(obj, preserveKeys = []) {
|
|
10
|
+
return toNotation(obj, toSnakeCaseKey, "", preserveKeys);
|
|
11
|
+
}
|
|
12
|
+
const toCamelCaseKey = (key) => key.replace(
|
|
13
|
+
/_([a-z])/g,
|
|
14
|
+
(_match, letter) => letter.toUpperCase()
|
|
15
|
+
);
|
|
16
|
+
const toSnakeCaseKey = (key) => key.replace(/[A-Z]/g, (g) => "_" + g.toLowerCase());
|
|
17
|
+
function toNotation(obj, converter, parentKey = "", preserveKeys = []) {
|
|
18
|
+
if (Array.isArray(obj)) {
|
|
19
|
+
return obj.map(
|
|
20
|
+
(item) => toNotation(item, converter, parentKey, preserveKeys)
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
if (typeof obj === "object" && obj !== null) {
|
|
24
|
+
const source = obj;
|
|
25
|
+
const result = {};
|
|
26
|
+
for (const key of Object.keys(source)) {
|
|
27
|
+
const convertedKey = converter(key);
|
|
28
|
+
const fullPath = parentKey !== "" ? parentKey + "." + key : key;
|
|
29
|
+
if (preserveKeys.includes(fullPath)) {
|
|
30
|
+
result[convertedKey] = source[key];
|
|
31
|
+
} else {
|
|
32
|
+
result[convertedKey] = toNotation(
|
|
33
|
+
source[key],
|
|
34
|
+
converter,
|
|
35
|
+
fullPath,
|
|
36
|
+
preserveKeys
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return result;
|
|
41
|
+
}
|
|
42
|
+
return obj;
|
|
43
|
+
}
|
|
44
|
+
export {
|
|
45
|
+
toCamelCase,
|
|
46
|
+
toSnakeCase
|
|
47
|
+
};
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
+
import { getBooleanEnvVar } from "./env_aware_utils.js";
|
|
6
7
|
var GoogleLLMVariant = /* @__PURE__ */ ((GoogleLLMVariant2) => {
|
|
7
8
|
GoogleLLMVariant2["VERTEX_AI"] = "VERTEX_AI";
|
|
8
9
|
GoogleLLMVariant2["GEMINI_API"] = "GEMINI_API";
|
|
@@ -11,13 +12,6 @@ var GoogleLLMVariant = /* @__PURE__ */ ((GoogleLLMVariant2) => {
|
|
|
11
12
|
function getGoogleLlmVariant() {
|
|
12
13
|
return getBooleanEnvVar("GOOGLE_GENAI_USE_VERTEXAI") ? "VERTEX_AI" /* VERTEX_AI */ : "GEMINI_API" /* GEMINI_API */;
|
|
13
14
|
}
|
|
14
|
-
function getBooleanEnvVar(envVar) {
|
|
15
|
-
if (!process.env) {
|
|
16
|
-
return false;
|
|
17
|
-
}
|
|
18
|
-
const envVarValue = (process.env[envVar] || "").toLowerCase();
|
|
19
|
-
return ["true", "1"].includes(envVarValue);
|
|
20
|
-
}
|
|
21
15
|
export {
|
|
22
16
|
GoogleLLMVariant,
|
|
23
17
|
getGoogleLlmVariant
|
package/dist/esm/version.js
CHANGED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { DataPart as A2ADataPart, FilePart as A2AFilePart, Part as A2APart, TextPart as A2ATextPart } from '@a2a-js/sdk';
|
|
7
|
+
import { Part as GenAIPart } from '@google/genai';
|
|
8
|
+
/**
|
|
9
|
+
* Converts GenAI Parts to A2A Parts.
|
|
10
|
+
*/
|
|
11
|
+
export declare function toA2AParts(parts: GenAIPart[], longRunningToolIDs?: string[]): A2APart[];
|
|
12
|
+
/**
|
|
13
|
+
* Converts a GenAI Part to an A2A Part.
|
|
14
|
+
*/
|
|
15
|
+
export declare function toA2APart(part: GenAIPart, longRunningToolIDs?: string[]): A2APart;
|
|
16
|
+
/**
|
|
17
|
+
* Converts a GenAI Text Part to an A2A Text Part.
|
|
18
|
+
*/
|
|
19
|
+
export declare function toA2ATextPart(part: GenAIPart): A2APart;
|
|
20
|
+
/**
|
|
21
|
+
* Converts a GenAI File Part to an A2A File Part.
|
|
22
|
+
*/
|
|
23
|
+
export declare function toA2AFilePart(part: GenAIPart): A2APart;
|
|
24
|
+
/**
|
|
25
|
+
* Converts a GenAI Data Part to an A2A Data Part.
|
|
26
|
+
*/
|
|
27
|
+
export declare function toA2ADataPart(part: GenAIPart, longRunningToolIDs?: string[]): A2APart;
|
|
28
|
+
/**
|
|
29
|
+
* Converts an A2A Part to a GenAI Part.
|
|
30
|
+
*/
|
|
31
|
+
export declare function toGenAIParts(a2aParts: A2APart[]): GenAIPart[];
|
|
32
|
+
/**
|
|
33
|
+
* Converts an A2A Part to a GenAI Part.
|
|
34
|
+
*/
|
|
35
|
+
export declare function toGenAIPart(a2aPart: A2APart): GenAIPart;
|
|
36
|
+
/**
|
|
37
|
+
* Converts an A2A Text Part to a GenAI Part.
|
|
38
|
+
*/
|
|
39
|
+
export declare function toGenAIPartText(a2aPart: A2ATextPart): GenAIPart;
|
|
40
|
+
/**
|
|
41
|
+
* Converts an A2A File Part to a GenAI Part.
|
|
42
|
+
*/
|
|
43
|
+
export declare function toGenAIPartFile(a2aPart: A2AFilePart): GenAIPart;
|
|
44
|
+
/**
|
|
45
|
+
* Converts an A2A Data Part to a GenAI Part.
|
|
46
|
+
*/
|
|
47
|
+
export declare function toGenAIPartData(a2aPart: A2ADataPart): GenAIPart;
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { GenerateContentConfig, Schema } from '@google/genai';
|
|
7
|
+
import { z as z3 } from 'zod/v3';
|
|
8
|
+
import { z as z4 } from 'zod/v4';
|
|
7
9
|
import { BaseCodeExecutor } from '../code_executors/base_code_executor.js';
|
|
8
10
|
import { Event } from '../events/event.js';
|
|
9
11
|
import { BaseExampleProvider } from '../examples/base_example_provider.js';
|
|
@@ -19,6 +21,10 @@ import { BaseLlmRequestProcessor, BaseLlmResponseProcessor } from './base_llm_pr
|
|
|
19
21
|
import { CallbackContext } from './callback_context.js';
|
|
20
22
|
import { InvocationContext } from './invocation_context.js';
|
|
21
23
|
import { ReadonlyContext } from './readonly_context.js';
|
|
24
|
+
/**
|
|
25
|
+
* Input/output schema type for agent.
|
|
26
|
+
*/
|
|
27
|
+
export type LlmAgentSchema = z3.ZodObject<z3.ZodRawShape> | z4.ZodObject<z4.ZodRawShape> | Schema;
|
|
22
28
|
/** An object that can provide an instruction string. */
|
|
23
29
|
export type InstructionProvider = (context: ReadonlyContext) => string | Promise<string>;
|
|
24
30
|
/**
|
|
@@ -159,15 +165,9 @@ export interface LlmAgentConfig extends BaseAgentConfig {
|
|
|
159
165
|
*/
|
|
160
166
|
includeContents?: 'default' | 'none';
|
|
161
167
|
/** The input schema when agent is used as a tool. */
|
|
162
|
-
inputSchema?:
|
|
163
|
-
/**
|
|
164
|
-
|
|
165
|
-
*
|
|
166
|
-
* NOTE:
|
|
167
|
-
* When this is set, agent can ONLY reply and CANNOT use any tools, such as
|
|
168
|
-
* function tools, RAGs, agent transfer, etc.
|
|
169
|
-
*/
|
|
170
|
-
outputSchema?: Schema;
|
|
168
|
+
inputSchema?: LlmAgentSchema;
|
|
169
|
+
/** The output schema when agent replies. */
|
|
170
|
+
outputSchema?: LlmAgentSchema;
|
|
171
171
|
/**
|
|
172
172
|
* The key in session state to store the output of the agent.
|
|
173
173
|
*
|
|
@@ -360,9 +360,9 @@ export declare class LlmAgent extends BaseAgent {
|
|
|
360
360
|
* @throws Error if the agent is not found.
|
|
361
361
|
*/
|
|
362
362
|
private getAgentByName;
|
|
363
|
-
|
|
363
|
+
protected callLlmAsync(invocationContext: InvocationContext, llmRequest: LlmRequest, modelResponseEvent: Event): AsyncGenerator<LlmResponse, void, void>;
|
|
364
364
|
private handleBeforeModelCallback;
|
|
365
365
|
private handleAfterModelCallback;
|
|
366
|
-
|
|
366
|
+
protected runAndHandleError<T extends LlmResponse | Event>(responseGenerator: AsyncGenerator<T, void, void>, invocationContext: InvocationContext, llmRequest: LlmRequest, modelResponseEvent: Event): AsyncGenerator<T, void, void>;
|
|
367
367
|
}
|
|
368
368
|
export {};
|
|
@@ -20,6 +20,14 @@ export declare class ReadonlyContext {
|
|
|
20
20
|
* The current invocation id.
|
|
21
21
|
*/
|
|
22
22
|
get invocationId(): string;
|
|
23
|
+
/**
|
|
24
|
+
* The user ID of the current session.
|
|
25
|
+
*/
|
|
26
|
+
get userId(): string;
|
|
27
|
+
/**
|
|
28
|
+
* The ID of the current session.
|
|
29
|
+
*/
|
|
30
|
+
get sessionId(): string;
|
|
23
31
|
/**
|
|
24
32
|
* The current agent name.
|
|
25
33
|
*/
|
|
@@ -72,6 +72,11 @@ export interface RunConfig {
|
|
|
72
72
|
* - Less than or equal to 0: This allows for unbounded number of llm calls.
|
|
73
73
|
*/
|
|
74
74
|
maxLlmCalls?: number;
|
|
75
|
+
/**
|
|
76
|
+
* If true, the agent loop will suspend on ANY tool call, allowing the client
|
|
77
|
+
* to intercept and execute tools (Client-Side Tool Execution).
|
|
78
|
+
*/
|
|
79
|
+
pauseOnToolCalls?: boolean;
|
|
75
80
|
}
|
|
76
81
|
export declare function createRunConfig(params?: Partial<RunConfig>): {
|
|
77
82
|
speechConfig?: SpeechConfig | undefined;
|
|
@@ -85,4 +90,5 @@ export declare function createRunConfig(params?: Partial<RunConfig>): {
|
|
|
85
90
|
proactivity?: ProactivityConfig | undefined;
|
|
86
91
|
realtimeInputConfig?: RealtimeInputConfig | undefined;
|
|
87
92
|
maxLlmCalls: number;
|
|
93
|
+
pauseOnToolCalls: boolean;
|
|
88
94
|
};
|
|
@@ -18,6 +18,10 @@ export interface SaveArtifactRequest {
|
|
|
18
18
|
filename: string;
|
|
19
19
|
/** The artifact to save. */
|
|
20
20
|
artifact: Part;
|
|
21
|
+
/**
|
|
22
|
+
* Optional custom metadata to save with the artifact.
|
|
23
|
+
*/
|
|
24
|
+
customMetadata?: Record<string, unknown>;
|
|
21
25
|
}
|
|
22
26
|
/**
|
|
23
27
|
* The parameters for `loadArtifact`.
|
|
@@ -74,6 +78,19 @@ export interface ListVersionsRequest {
|
|
|
74
78
|
/** The filename of the artifact. */
|
|
75
79
|
filename: string;
|
|
76
80
|
}
|
|
81
|
+
/**
|
|
82
|
+
* Metadata for a file artifact version.
|
|
83
|
+
*/
|
|
84
|
+
export interface ArtifactVersion {
|
|
85
|
+
/** The version number. */
|
|
86
|
+
version: number;
|
|
87
|
+
/** The canonical URI of the artifact. */
|
|
88
|
+
canonicalUri?: string;
|
|
89
|
+
/** Custom metadata associated with the artifact. */
|
|
90
|
+
customMetadata?: Record<string, unknown>;
|
|
91
|
+
/** The MIME type of the artifact. */
|
|
92
|
+
mimeType?: string;
|
|
93
|
+
}
|
|
77
94
|
/**
|
|
78
95
|
* Interface for artifact services.
|
|
79
96
|
*/
|
|
@@ -124,4 +141,18 @@ export interface BaseArtifactService {
|
|
|
124
141
|
* artifact.
|
|
125
142
|
*/
|
|
126
143
|
listVersions(request: ListVersionsRequest): Promise<number[]>;
|
|
144
|
+
/**
|
|
145
|
+
* Lists metadata for each artifact version.
|
|
146
|
+
*
|
|
147
|
+
* @param request The request to list artifact versions.
|
|
148
|
+
* @return A promise that resolves to a list of artifact version metadata.
|
|
149
|
+
*/
|
|
150
|
+
listArtifactVersions(request: ListVersionsRequest): Promise<ArtifactVersion[]>;
|
|
151
|
+
/**
|
|
152
|
+
* Gets metadata for a specific artifact version.
|
|
153
|
+
*
|
|
154
|
+
* @param request The request to get an artifact version.
|
|
155
|
+
* @return A promise that resolves to the artifact version metadata or undefined.
|
|
156
|
+
*/
|
|
157
|
+
getArtifactVersion(request: LoadArtifactRequest): Promise<ArtifactVersion | undefined>;
|
|
127
158
|
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { Part } from '@google/genai';
|
|
7
|
+
import { ArtifactVersion, BaseArtifactService, DeleteArtifactRequest, ListArtifactKeysRequest, ListVersionsRequest, LoadArtifactRequest, SaveArtifactRequest } from './base_artifact_service.js';
|
|
8
|
+
/**
|
|
9
|
+
* Service for managing artifacts stored on the local filesystem.
|
|
10
|
+
*
|
|
11
|
+
* Stores filesystem-backed artifacts beneath a configurable root directory.
|
|
12
|
+
*
|
|
13
|
+
* Storage layout matches the cloud and in-memory services:
|
|
14
|
+
* root/
|
|
15
|
+
* └── users/
|
|
16
|
+
* └── {userId}/
|
|
17
|
+
* ├── sessions/
|
|
18
|
+
* │ └── {sessionId}/
|
|
19
|
+
* │ └── artifacts/
|
|
20
|
+
* │ └── {artifactPath}/ // derived from filename
|
|
21
|
+
* │ └── versions/
|
|
22
|
+
* │ └── {version}/
|
|
23
|
+
* │ ├── {originalFilename}
|
|
24
|
+
* │ └── metadata.json
|
|
25
|
+
* └── artifacts/
|
|
26
|
+
* └── {artifactPath}/...
|
|
27
|
+
*
|
|
28
|
+
* Artifact paths are derived from the provided filenames: separators create
|
|
29
|
+
* nested directories, and path traversal is rejected to keep the layout
|
|
30
|
+
* portable across filesystems. `{artifactPath}` therefore mirrors the
|
|
31
|
+
* sanitized, scope-relative path derived from each filename.
|
|
32
|
+
*/
|
|
33
|
+
export declare class FileArtifactService implements BaseArtifactService {
|
|
34
|
+
private readonly rootDir;
|
|
35
|
+
constructor(rootDirOrUri: string);
|
|
36
|
+
saveArtifact({ userId, sessionId, filename, artifact, customMetadata, }: SaveArtifactRequest): Promise<number>;
|
|
37
|
+
loadArtifact({ userId, sessionId, filename, version, }: LoadArtifactRequest): Promise<Part | undefined>;
|
|
38
|
+
listArtifactKeys({ userId, sessionId, }: ListArtifactKeysRequest): Promise<string[]>;
|
|
39
|
+
deleteArtifact({ userId, sessionId, filename, }: DeleteArtifactRequest): Promise<void>;
|
|
40
|
+
listVersions({ userId, sessionId, filename, }: ListVersionsRequest): Promise<number[]>;
|
|
41
|
+
listArtifactVersions({ userId, sessionId, filename, }: ListVersionsRequest): Promise<ArtifactVersion[]>;
|
|
42
|
+
getArtifactVersion({ userId, sessionId, filename, version, }: LoadArtifactRequest): Promise<ArtifactVersion | undefined>;
|
|
43
|
+
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { Part } from '@google/genai';
|
|
7
|
-
import { BaseArtifactService, DeleteArtifactRequest, ListArtifactKeysRequest, ListVersionsRequest, LoadArtifactRequest, SaveArtifactRequest } from './base_artifact_service.js';
|
|
7
|
+
import { ArtifactVersion, BaseArtifactService, DeleteArtifactRequest, ListArtifactKeysRequest, ListVersionsRequest, LoadArtifactRequest, SaveArtifactRequest } from './base_artifact_service.js';
|
|
8
8
|
export declare class GcsArtifactService implements BaseArtifactService {
|
|
9
9
|
private readonly bucket;
|
|
10
10
|
constructor(bucket: string);
|
|
@@ -13,4 +13,6 @@ export declare class GcsArtifactService implements BaseArtifactService {
|
|
|
13
13
|
listArtifactKeys(request: ListArtifactKeysRequest): Promise<string[]>;
|
|
14
14
|
deleteArtifact(request: DeleteArtifactRequest): Promise<void>;
|
|
15
15
|
listVersions(request: ListVersionsRequest): Promise<number[]>;
|
|
16
|
+
listArtifactVersions(request: ListVersionsRequest): Promise<ArtifactVersion[]>;
|
|
17
|
+
getArtifactVersion(request: LoadArtifactRequest): Promise<ArtifactVersion | undefined>;
|
|
16
18
|
}
|
|
@@ -4,15 +4,18 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { Part } from '@google/genai';
|
|
7
|
-
import { BaseArtifactService, DeleteArtifactRequest, ListArtifactKeysRequest, ListVersionsRequest, LoadArtifactRequest, SaveArtifactRequest } from './base_artifact_service.js';
|
|
7
|
+
import { ArtifactVersion, BaseArtifactService, DeleteArtifactRequest, ListArtifactKeysRequest, ListVersionsRequest, LoadArtifactRequest, SaveArtifactRequest } from './base_artifact_service.js';
|
|
8
|
+
export declare function isInMemoryConnectionString(uri: string): boolean;
|
|
8
9
|
/**
|
|
9
10
|
* An in-memory implementation of the ArtifactService.
|
|
10
11
|
*/
|
|
11
12
|
export declare class InMemoryArtifactService implements BaseArtifactService {
|
|
12
13
|
private readonly artifacts;
|
|
13
|
-
saveArtifact({ appName, userId, sessionId, filename, artifact, }: SaveArtifactRequest): Promise<number>;
|
|
14
|
+
saveArtifact({ appName, userId, sessionId, filename, artifact, customMetadata, }: SaveArtifactRequest): Promise<number>;
|
|
14
15
|
loadArtifact({ appName, userId, sessionId, filename, version, }: LoadArtifactRequest): Promise<Part | undefined>;
|
|
15
16
|
listArtifactKeys({ appName, userId, sessionId, }: ListArtifactKeysRequest): Promise<string[]>;
|
|
16
17
|
deleteArtifact({ appName, userId, sessionId, filename, }: DeleteArtifactRequest): Promise<void>;
|
|
17
18
|
listVersions({ appName, userId, sessionId, filename, }: ListVersionsRequest): Promise<number[]>;
|
|
19
|
+
listArtifactVersions({ appName, userId, sessionId, filename, }: ListVersionsRequest): Promise<ArtifactVersion[]>;
|
|
20
|
+
getArtifactVersion({ appName, userId, sessionId, filename, version, }: LoadArtifactRequest): Promise<ArtifactVersion | undefined>;
|
|
18
21
|
}
|
package/dist/types/common.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export type { InvocationContextParams } from './agents/invocation_context.js';
|
|
|
15
15
|
export { LiveRequestQueue } from './agents/live_request_queue.js';
|
|
16
16
|
export type { LiveRequest } from './agents/live_request_queue.js';
|
|
17
17
|
export { LlmAgent, isLlmAgent } from './agents/llm_agent.js';
|
|
18
|
-
export type { AfterModelCallback, AfterToolCallback, BeforeModelCallback, BeforeToolCallback, InstructionProvider, LlmAgentConfig, SingleAfterModelCallback, SingleAfterToolCallback, SingleBeforeModelCallback, SingleBeforeToolCallback, ToolUnion, } from './agents/llm_agent.js';
|
|
18
|
+
export type { AfterModelCallback, AfterToolCallback, BeforeModelCallback, BeforeToolCallback, InstructionProvider, LlmAgentConfig, LlmAgentSchema, SingleAfterModelCallback, SingleAfterToolCallback, SingleBeforeModelCallback, SingleBeforeToolCallback, ToolUnion, } from './agents/llm_agent.js';
|
|
19
19
|
export { LoopAgent, isLoopAgent } from './agents/loop_agent.js';
|
|
20
20
|
export type { LoopAgentConfig } from './agents/loop_agent.js';
|
|
21
21
|
export { ParallelAgent, isParallelAgent } from './agents/parallel_agent.js';
|
|
@@ -24,6 +24,7 @@ export { StreamingMode } from './agents/run_config.js';
|
|
|
24
24
|
export type { RunConfig } from './agents/run_config.js';
|
|
25
25
|
export { SequentialAgent, isSequentialAgent } from './agents/sequential_agent.js';
|
|
26
26
|
export type { TranscriptionEntry } from './agents/transcription_entry.js';
|
|
27
|
+
export type { BaseArtifactService, DeleteArtifactRequest, ListArtifactKeysRequest, ListVersionsRequest, LoadArtifactRequest, SaveArtifactRequest, } from './artifacts/base_artifact_service.js';
|
|
27
28
|
export { InMemoryArtifactService } from './artifacts/in_memory_artifact_service.js';
|
|
28
29
|
export { AuthCredentialTypes } from './auth/auth_credential.js';
|
|
29
30
|
export type { AuthCredential, HttpAuth, HttpCredentials, OAuth2Auth, ServiceAccount, ServiceAccountCredential, } from './auth/auth_credential.js';
|
|
@@ -38,13 +39,18 @@ export { createEvent, getFunctionCalls, getFunctionResponses, hasTrailingCodeExe
|
|
|
38
39
|
export type { Event } from './events/event.js';
|
|
39
40
|
export { createEventActions } from './events/event_actions.js';
|
|
40
41
|
export type { EventActions } from './events/event_actions.js';
|
|
42
|
+
export { EventType, toStructuredEvents } from './events/structured_events.js';
|
|
43
|
+
export type { ActivityEvent, CallCodeEvent, CodeResultEvent, ContentEvent, ErrorEvent, FinishedEvent, StructuredEvent, ThoughtEvent, ToolCallEvent, ToolConfirmationEvent, ToolResultEvent, } from './events/structured_events.js';
|
|
41
44
|
export { BaseExampleProvider, isBaseExampleProvider, } from './examples/base_example_provider.js';
|
|
42
45
|
export type { Example } from './examples/example.js';
|
|
46
|
+
export type { BaseMemoryService, SearchMemoryRequest, SearchMemoryResponse, } from './memory/base_memory_service.js';
|
|
43
47
|
export { InMemoryMemoryService } from './memory/in_memory_memory_service.js';
|
|
44
48
|
export type { MemoryEntry } from './memory/memory_entry.js';
|
|
49
|
+
export { ApigeeLlm } from './models/apigee_llm.js';
|
|
50
|
+
export type { ApigeeLlmParams } from './models/apigee_llm.js';
|
|
45
51
|
export { BaseLlm, isBaseLlm } from './models/base_llm.js';
|
|
46
52
|
export type { BaseLlmConnection } from './models/base_llm_connection.js';
|
|
47
|
-
export { Gemini } from './models/google_llm.js';
|
|
53
|
+
export { Gemini, geminiInitParams } from './models/google_llm.js';
|
|
48
54
|
export type { GeminiParams } from './models/google_llm.js';
|
|
49
55
|
export type { LlmRequest } from './models/llm_request.js';
|
|
50
56
|
export type { LlmResponse } from './models/llm_response.js';
|
|
@@ -58,6 +64,8 @@ export type { BasePolicyEngine, PolicyCheckResult, ToolCallPolicyContext, } from
|
|
|
58
64
|
export { InMemoryRunner } from './runner/in_memory_runner.js';
|
|
59
65
|
export { Runner } from './runner/runner.js';
|
|
60
66
|
export type { RunnerConfig } from './runner/runner.js';
|
|
67
|
+
export { BaseSessionService } from './sessions/base_session_service.js';
|
|
68
|
+
export type { AppendEventRequest, CreateSessionRequest, DeleteSessionRequest, GetSessionConfig, GetSessionRequest, ListSessionsRequest, ListSessionsResponse, } from './sessions/base_session_service.js';
|
|
61
69
|
export { InMemorySessionService } from './sessions/in_memory_session_service.js';
|
|
62
70
|
export { createSession } from './sessions/session.js';
|
|
63
71
|
export type { Session } from './sessions/session.js';
|
|
@@ -65,6 +73,7 @@ export { State } from './sessions/state.js';
|
|
|
65
73
|
export { AgentTool, isAgentTool } from './tools/agent_tool.js';
|
|
66
74
|
export type { AgentToolConfig } from './tools/agent_tool.js';
|
|
67
75
|
export { BaseTool, isBaseTool } from './tools/base_tool.js';
|
|
76
|
+
export type { BaseToolParams, RunAsyncToolRequest, ToolProcessLlmRequest, } from './tools/base_tool.js';
|
|
68
77
|
export { BaseToolset } from './tools/base_toolset.js';
|
|
69
78
|
export type { ToolPredicate } from './tools/base_toolset.js';
|
|
70
79
|
export { FunctionTool, isFunctionTool } from './tools/function_tool.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright
|
|
3
|
+
* Copyright 2026 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { FunctionCall, FunctionResponse } from '@google/genai';
|
|
@@ -86,3 +86,17 @@ export declare function stringifyContent(event: Event): string;
|
|
|
86
86
|
* Generates a new unique ID for the event.
|
|
87
87
|
*/
|
|
88
88
|
export declare function createNewEventId(): string;
|
|
89
|
+
/**
|
|
90
|
+
* Transforms a snake_cased event object to a camelCased Event object.
|
|
91
|
+
*
|
|
92
|
+
* @param event The snake_cased event object.
|
|
93
|
+
* @returns The camelCased Event object.
|
|
94
|
+
*/
|
|
95
|
+
export declare function transformToCamelCaseEvent(event: Record<string, unknown>): Event;
|
|
96
|
+
/**
|
|
97
|
+
* Transforms a camelCased event object to a snake_cased Event object.
|
|
98
|
+
*
|
|
99
|
+
* @param event The camelCased event object.
|
|
100
|
+
* @returns The snake_cased Event object.
|
|
101
|
+
*/
|
|
102
|
+
export declare function transformToSnakeCaseEvent(event: Event): Record<string, unknown>;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { CodeExecutionResult, ExecutableCode, FunctionCall, FunctionResponse } from '@google/genai';
|
|
7
|
+
import { Event } from './event.js';
|
|
8
|
+
/**
|
|
9
|
+
* The types of events that can be parsed from a raw Event.
|
|
10
|
+
*/
|
|
11
|
+
export declare enum EventType {
|
|
12
|
+
THOUGHT = "thought",
|
|
13
|
+
CONTENT = "content",
|
|
14
|
+
TOOL_CALL = "tool_call",
|
|
15
|
+
TOOL_RESULT = "tool_result",
|
|
16
|
+
CALL_CODE = "call_code",
|
|
17
|
+
CODE_RESULT = "code_result",
|
|
18
|
+
ERROR = "error",
|
|
19
|
+
ACTIVITY = "activity",
|
|
20
|
+
TOOL_CONFIRMATION = "tool_confirmation",
|
|
21
|
+
FINISHED = "finished"
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Represents a reasoning trace (thought) from the agent.
|
|
25
|
+
*/
|
|
26
|
+
export interface ThoughtEvent {
|
|
27
|
+
type: EventType.THOUGHT;
|
|
28
|
+
content: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Represents partial content (text delta) intended for the user.
|
|
32
|
+
*/
|
|
33
|
+
export interface ContentEvent {
|
|
34
|
+
type: EventType.CONTENT;
|
|
35
|
+
content: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Represents a request to execute a tool.
|
|
39
|
+
*/
|
|
40
|
+
export interface ToolCallEvent {
|
|
41
|
+
type: EventType.TOOL_CALL;
|
|
42
|
+
call: FunctionCall;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Represents the result of a tool execution.
|
|
46
|
+
*/
|
|
47
|
+
export interface ToolResultEvent {
|
|
48
|
+
type: EventType.TOOL_RESULT;
|
|
49
|
+
result: FunctionResponse;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Represents a request to execute code.
|
|
53
|
+
*/
|
|
54
|
+
export interface CallCodeEvent {
|
|
55
|
+
type: EventType.CALL_CODE;
|
|
56
|
+
code: ExecutableCode;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Represents the result of code execution.
|
|
60
|
+
*/
|
|
61
|
+
export interface CodeResultEvent {
|
|
62
|
+
type: EventType.CODE_RESULT;
|
|
63
|
+
result: CodeExecutionResult;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Represents a runtime error.
|
|
67
|
+
*/
|
|
68
|
+
export interface ErrorEvent {
|
|
69
|
+
type: EventType.ERROR;
|
|
70
|
+
error: Error;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Represents a generic activity or status update.
|
|
74
|
+
*/
|
|
75
|
+
export interface ActivityEvent {
|
|
76
|
+
type: EventType.ACTIVITY;
|
|
77
|
+
kind: string;
|
|
78
|
+
detail: Record<string, unknown>;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Represents a request for tool confirmation.
|
|
82
|
+
*/
|
|
83
|
+
export interface ToolConfirmationEvent {
|
|
84
|
+
type: EventType.TOOL_CONFIRMATION;
|
|
85
|
+
confirmations: Record<string, unknown>;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Represents the final completion of the agent's task.
|
|
89
|
+
*/
|
|
90
|
+
export interface FinishedEvent {
|
|
91
|
+
type: EventType.FINISHED;
|
|
92
|
+
output?: unknown;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* A standard structured event parsed from the raw Event stream.
|
|
96
|
+
*/
|
|
97
|
+
export type StructuredEvent = ThoughtEvent | ContentEvent | ToolCallEvent | ToolResultEvent | CallCodeEvent | CodeResultEvent | ErrorEvent | ActivityEvent | ToolConfirmationEvent | FinishedEvent;
|
|
98
|
+
/**
|
|
99
|
+
* Converts an internal Event to a list of structured events.
|
|
100
|
+
* This is an optional utility for callers who want to easily identify
|
|
101
|
+
* the type of event they are handling.
|
|
102
|
+
*
|
|
103
|
+
* @param event - The raw event to convert.
|
|
104
|
+
* @returns The structured events.
|
|
105
|
+
*/
|
|
106
|
+
export declare function toStructuredEvents(event: Event): StructuredEvent[];
|
package/dist/types/index.d.ts
CHANGED
|
@@ -3,8 +3,12 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
6
|
+
export { FileArtifactService } from './artifacts/file_artifact_service.js';
|
|
7
|
+
export { GcsArtifactService } from './artifacts/gcs_artifact_service.js';
|
|
8
|
+
export { getArtifactServiceFromUri } from './artifacts/registry.js';
|
|
7
9
|
export * from './common.js';
|
|
10
|
+
export { DatabaseSessionService } from './sessions/database_session_service.js';
|
|
11
|
+
export { getSessionServiceFromUri } from './sessions/registry.js';
|
|
8
12
|
export * from './telemetry/google_cloud.js';
|
|
9
13
|
export * from './telemetry/setup.js';
|
|
10
14
|
export * from './tools/mcp/mcp_session_manager.js';
|