@google/adk 0.2.5 → 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 +46 -24
- package/dist/cjs/agents/base_llm_processor.js +1 -1
- package/dist/cjs/agents/callback_context.js +5 -2
- package/dist/cjs/agents/content_processor_utils.js +16 -8
- package/dist/cjs/agents/functions.js +81 -30
- 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 +106 -62
- package/dist/cjs/agents/loop_agent.js +3 -2
- package/dist/cjs/agents/parallel_agent.js +4 -5
- 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 +145 -58
- package/dist/cjs/artifacts/in_memory_artifact_service.js +72 -10
- package/dist/cjs/artifacts/registry.js +55 -0
- package/dist/cjs/auth/auth_credential.js +1 -1
- package/dist/cjs/auth/auth_handler.js +4 -2
- 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 +4 -2
- package/dist/cjs/code_executors/built_in_code_executor.js +8 -4
- package/dist/cjs/code_executors/code_execution_utils.js +1 -1
- package/dist/cjs/code_executors/code_executor_context.js +6 -6
- package/dist/cjs/common.js +18 -1
- package/dist/cjs/events/event.js +34 -7
- 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 +4 -2
- 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 +9 -5
- package/dist/cjs/models/base_llm_connection.js +1 -1
- package/dist/cjs/models/gemini_llm_connection.js +2 -1
- package/dist/cjs/models/google_llm.js +73 -54
- 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 +13 -1
- package/dist/cjs/plugins/logging_plugin.js +51 -14
- package/dist/cjs/plugins/plugin_manager.js +57 -25
- package/dist/cjs/plugins/security_plugin.js +2 -2
- package/dist/cjs/runner/in_memory_runner.js +1 -1
- package/dist/cjs/runner/runner.js +142 -96
- 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 +60 -34
- 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 +8 -10
- package/dist/cjs/telemetry/setup.js +16 -8
- package/dist/cjs/telemetry/tracing.js +38 -16
- package/dist/cjs/tools/agent_tool.js +9 -5
- package/dist/cjs/tools/base_tool.js +5 -3
- package/dist/cjs/tools/base_toolset.js +1 -1
- package/dist/cjs/tools/forwarding_artifact_service.js +18 -2
- package/dist/cjs/tools/function_tool.js +2 -3
- package/dist/cjs/tools/google_search_tool.js +2 -3
- package/dist/cjs/tools/long_running_tool.js +1 -1
- package/dist/cjs/tools/mcp/mcp_session_manager.js +17 -11
- package/dist/cjs/tools/mcp/mcp_tool.js +2 -4
- package/dist/cjs/tools/mcp/mcp_toolset.js +2 -2
- 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 +11 -2
- package/dist/cjs/utils/gemini_schema_util.js +10 -5
- package/dist/cjs/utils/logger.js +48 -4
- 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 +101 -142
- 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 +50 -24
- package/dist/esm/agents/callback_context.js +4 -1
- package/dist/esm/agents/content_processor_utils.js +25 -9
- package/dist/esm/agents/functions.js +84 -29
- package/dist/esm/agents/llm_agent.js +110 -62
- package/dist/esm/agents/loop_agent.js +2 -1
- package/dist/esm/agents/parallel_agent.js +3 -4
- 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 +144 -57
- package/dist/esm/artifacts/in_memory_artifact_service.js +69 -8
- package/dist/esm/artifacts/registry.js +28 -0
- package/dist/esm/auth/auth_handler.js +3 -1
- package/dist/esm/code_executors/base_code_executor.js +3 -1
- package/dist/esm/code_executors/built_in_code_executor.js +7 -3
- package/dist/esm/code_executors/code_executor_context.js +5 -5
- package/dist/esm/common.js +12 -2
- package/dist/esm/events/event.js +30 -5
- 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/memory/in_memory_memory_service.js +3 -1
- package/dist/esm/models/apigee_llm.js +152 -0
- package/dist/esm/models/base_llm.js +8 -4
- package/dist/esm/models/gemini_llm_connection.js +1 -0
- package/dist/esm/models/google_llm.js +75 -53
- package/dist/esm/models/registry.js +2 -0
- package/dist/esm/plugins/base_plugin.js +12 -0
- package/dist/esm/plugins/logging_plugin.js +55 -14
- package/dist/esm/plugins/plugin_manager.js +56 -24
- package/dist/esm/plugins/security_plugin.js +1 -1
- package/dist/esm/runner/runner.js +145 -96
- 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 +61 -33
- package/dist/esm/sessions/registry.js +25 -0
- package/dist/esm/telemetry/google_cloud.js +7 -9
- package/dist/esm/telemetry/setup.js +23 -9
- package/dist/esm/telemetry/tracing.js +37 -15
- package/dist/esm/tools/agent_tool.js +8 -4
- package/dist/esm/tools/base_tool.js +4 -2
- package/dist/esm/tools/forwarding_artifact_service.js +17 -1
- package/dist/esm/tools/function_tool.js +1 -2
- package/dist/esm/tools/google_search_tool.js +2 -5
- package/dist/esm/tools/long_running_tool.js +3 -1
- package/dist/esm/tools/mcp/mcp_session_manager.js +22 -12
- package/dist/esm/tools/mcp/mcp_tool.js +1 -3
- package/dist/esm/tools/mcp/mcp_toolset.js +1 -1
- package/dist/esm/utils/env_aware_utils.js +9 -1
- package/dist/esm/utils/gemini_schema_util.js +9 -4
- package/dist/esm/utils/logger.js +43 -2
- package/dist/esm/utils/object_notation_utils.js +47 -0
- package/dist/esm/utils/simple_zod_to_json.js +102 -141
- 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/base_agent.d.ts +2 -1
- package/dist/types/agents/callback_context.d.ts +1 -1
- package/dist/types/agents/llm_agent.d.ts +12 -12
- package/dist/types/agents/loop_agent.d.ts +1 -1
- package/dist/types/agents/parallel_agent.d.ts +1 -1
- 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 +8 -5
- package/dist/types/artifacts/registry.d.ts +7 -0
- package/dist/types/code_executors/built_in_code_executor.d.ts +1 -1
- package/dist/types/code_executors/code_executor_context.d.ts +2 -4
- package/dist/types/common.d.ts +13 -3
- 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 +7 -3
- package/dist/types/models/apigee_llm.d.ts +59 -0
- package/dist/types/models/base_llm_connection.d.ts +1 -1
- package/dist/types/models/google_llm.d.ts +5 -2
- package/dist/types/models/llm_response.d.ts +1 -1
- package/dist/types/plugins/logging_plugin.d.ts +12 -12
- package/dist/types/plugins/plugin_manager.d.ts +12 -12
- package/dist/types/plugins/security_plugin.d.ts +1 -1
- package/dist/types/runner/runner.d.ts +16 -1
- 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 +9 -6
- package/dist/types/sessions/registry.d.ts +7 -0
- package/dist/types/telemetry/setup.d.ts +1 -1
- package/dist/types/telemetry/tracing.d.ts +7 -6
- package/dist/types/tools/agent_tool.d.ts +1 -1
- package/dist/types/tools/base_tool.d.ts +1 -1
- package/dist/types/tools/base_toolset.d.ts +2 -1
- package/dist/types/tools/forwarding_artifact_service.d.ts +4 -2
- package/dist/types/tools/function_tool.d.ts +4 -3
- package/dist/types/tools/google_search_tool.d.ts +3 -3
- package/dist/types/tools/mcp/mcp_session_manager.d.ts +10 -3
- package/dist/types/tools/mcp/mcp_toolset.d.ts +1 -2
- package/dist/types/utils/env_aware_utils.d.ts +7 -0
- package/dist/types/utils/gemini_schema_util.d.ts +4 -12
- package/dist/types/utils/logger.d.ts +11 -10
- package/dist/types/utils/object_notation_utils.d.ts +21 -0
- package/dist/types/utils/simple_zod_to_json.d.ts +5 -4
- 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 +96 -35
- package/dist/web/agents/callback_context.js +4 -1
- package/dist/web/agents/content_processor_utils.js +25 -9
- package/dist/web/agents/functions.js +84 -29
- package/dist/web/agents/llm_agent.js +166 -83
- package/dist/web/agents/loop_agent.js +2 -1
- package/dist/web/agents/parallel_agent.js +3 -4
- 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 +139 -54
- package/dist/web/artifacts/in_memory_artifact_service.js +69 -8
- package/dist/web/artifacts/registry.js +28 -0
- package/dist/web/auth/auth_handler.js +3 -1
- package/dist/web/code_executors/base_code_executor.js +3 -1
- package/dist/web/code_executors/built_in_code_executor.js +7 -3
- package/dist/web/code_executors/code_executor_context.js +5 -5
- package/dist/web/common.js +12 -2
- package/dist/web/events/event.js +30 -5
- 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/memory/in_memory_memory_service.js +3 -1
- package/dist/web/models/apigee_llm.js +219 -0
- package/dist/web/models/base_llm.js +8 -4
- package/dist/web/models/gemini_llm_connection.js +1 -0
- package/dist/web/models/google_llm.js +75 -50
- package/dist/web/models/registry.js +2 -0
- package/dist/web/plugins/base_plugin.js +12 -0
- package/dist/web/plugins/logging_plugin.js +55 -14
- package/dist/web/plugins/plugin_manager.js +56 -24
- package/dist/web/plugins/security_plugin.js +1 -1
- package/dist/web/runner/runner.js +192 -108
- 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 +61 -33
- package/dist/web/sessions/registry.js +25 -0
- package/dist/web/telemetry/google_cloud.js +7 -9
- package/dist/web/telemetry/setup.js +23 -9
- package/dist/web/telemetry/tracing.js +37 -15
- package/dist/web/tools/agent_tool.js +8 -4
- package/dist/web/tools/base_tool.js +4 -2
- package/dist/web/tools/forwarding_artifact_service.js +17 -1
- package/dist/web/tools/function_tool.js +1 -2
- package/dist/web/tools/google_search_tool.js +2 -5
- package/dist/web/tools/long_running_tool.js +3 -1
- package/dist/web/tools/mcp/mcp_session_manager.js +22 -12
- package/dist/web/tools/mcp/mcp_tool.js +1 -3
- package/dist/web/tools/mcp/mcp_toolset.js +1 -1
- package/dist/web/utils/env_aware_utils.js +9 -1
- package/dist/web/utils/gemini_schema_util.js +9 -4
- package/dist/web/utils/logger.js +43 -2
- package/dist/web/utils/object_notation_utils.js +47 -0
- package/dist/web/utils/simple_zod_to_json.js +102 -155
- package/dist/web/utils/variant_utils.js +1 -7
- package/dist/web/version.js +1 -1
- package/package.json +16 -5
- package/dist/cjs/index.js.map +0 -7
- package/dist/esm/index.js.map +0 -7
- package/dist/web/index.js.map +0 -7
|
@@ -24,89 +24,155 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
24
24
|
*/
|
|
25
25
|
import { Storage } from "@google-cloud/storage";
|
|
26
26
|
import { createPartFromBase64, createPartFromText } from "@google/genai";
|
|
27
|
+
import { logger } from "../utils/logger.js";
|
|
27
28
|
class GcsArtifactService {
|
|
28
29
|
constructor(bucket) {
|
|
29
30
|
this.bucket = new Storage().bucket(bucket);
|
|
30
31
|
}
|
|
31
32
|
async saveArtifact(request) {
|
|
33
|
+
if (!request.artifact.inlineData && !request.artifact.text) {
|
|
34
|
+
throw new Error("Artifact must have either inlineData or text content.");
|
|
35
|
+
}
|
|
32
36
|
const versions = await this.listVersions(request);
|
|
33
37
|
const version = versions.length > 0 ? Math.max(...versions) + 1 : 0;
|
|
34
|
-
const file = this.bucket.file(
|
|
35
|
-
|
|
36
|
-
|
|
38
|
+
const file = this.bucket.file(
|
|
39
|
+
getFileName(__spreadProps(__spreadValues({}, request), {
|
|
40
|
+
version
|
|
41
|
+
}))
|
|
42
|
+
);
|
|
43
|
+
const metadata = request.customMetadata || {};
|
|
37
44
|
if (request.artifact.inlineData) {
|
|
38
|
-
await file.save(
|
|
39
|
-
|
|
40
|
-
|
|
45
|
+
await file.save(
|
|
46
|
+
Buffer.from(request.artifact.inlineData.data || "", "base64"),
|
|
47
|
+
{
|
|
48
|
+
contentType: request.artifact.inlineData.mimeType,
|
|
49
|
+
metadata
|
|
50
|
+
}
|
|
51
|
+
);
|
|
41
52
|
return version;
|
|
42
53
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
throw new Error("Artifact must have either inlineData or text.");
|
|
54
|
+
await file.save(request.artifact.text, {
|
|
55
|
+
contentType: "text/plain",
|
|
56
|
+
metadata
|
|
57
|
+
});
|
|
58
|
+
return version;
|
|
50
59
|
}
|
|
51
60
|
async loadArtifact(request) {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
61
|
+
try {
|
|
62
|
+
let version = request.version;
|
|
63
|
+
if (version === void 0) {
|
|
64
|
+
const versions = await this.listVersions(request);
|
|
65
|
+
if (versions.length === 0) {
|
|
66
|
+
return void 0;
|
|
67
|
+
}
|
|
68
|
+
version = Math.max(...versions);
|
|
57
69
|
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
70
|
+
const file = this.bucket.file(
|
|
71
|
+
getFileName(__spreadProps(__spreadValues({}, request), {
|
|
72
|
+
version
|
|
73
|
+
}))
|
|
74
|
+
);
|
|
75
|
+
const [[metadata], [rawDataBuffer]] = await Promise.all([
|
|
76
|
+
file.getMetadata(),
|
|
77
|
+
file.download()
|
|
78
|
+
]);
|
|
79
|
+
if (metadata.contentType === "text/plain") {
|
|
80
|
+
return createPartFromText(rawDataBuffer.toString("utf-8"));
|
|
81
|
+
}
|
|
82
|
+
return createPartFromBase64(
|
|
83
|
+
rawDataBuffer.toString("base64"),
|
|
84
|
+
metadata.contentType
|
|
85
|
+
);
|
|
86
|
+
} catch (e) {
|
|
87
|
+
logger.warn(
|
|
88
|
+
"[GcsArtifactService] loadArtifact: Failed to load artifact ".concat(request.filename),
|
|
89
|
+
e
|
|
90
|
+
);
|
|
91
|
+
return void 0;
|
|
66
92
|
}
|
|
67
|
-
return createPartFromBase64(
|
|
68
|
-
rawDataBuffer.toString("base64"),
|
|
69
|
-
metadata.contentType
|
|
70
|
-
);
|
|
71
93
|
}
|
|
72
94
|
async listArtifactKeys(request) {
|
|
73
|
-
const fileNames = [];
|
|
74
95
|
const sessionPrefix = "".concat(request.appName, "/").concat(request.userId, "/").concat(request.sessionId, "/");
|
|
75
96
|
const usernamePrefix = "".concat(request.appName, "/").concat(request.userId, "/user/");
|
|
76
|
-
const [
|
|
77
|
-
[sessionFiles],
|
|
78
|
-
[userSessionFiles]
|
|
79
|
-
] = await Promise.all([
|
|
97
|
+
const [[sessionFiles], [userSessionFiles]] = await Promise.all([
|
|
80
98
|
this.bucket.getFiles({ prefix: sessionPrefix }),
|
|
81
99
|
this.bucket.getFiles({ prefix: usernamePrefix })
|
|
82
100
|
]);
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
fileNames.push(file.name.split("/").pop());
|
|
88
|
-
}
|
|
89
|
-
return fileNames.sort((a, b) => a.localeCompare(b));
|
|
101
|
+
return [
|
|
102
|
+
...extractArtifactKeys(sessionFiles, sessionPrefix),
|
|
103
|
+
...extractArtifactKeys(userSessionFiles, usernamePrefix, "user:")
|
|
104
|
+
].sort((a, b) => a.localeCompare(b));
|
|
90
105
|
}
|
|
91
106
|
async deleteArtifact(request) {
|
|
92
107
|
const versions = await this.listVersions(request);
|
|
93
|
-
await Promise.all(
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
108
|
+
await Promise.all(
|
|
109
|
+
versions.map((version) => {
|
|
110
|
+
const file = this.bucket.file(
|
|
111
|
+
getFileName(__spreadProps(__spreadValues({}, request), {
|
|
112
|
+
version
|
|
113
|
+
}))
|
|
114
|
+
);
|
|
115
|
+
return file.delete();
|
|
116
|
+
})
|
|
117
|
+
);
|
|
99
118
|
return;
|
|
100
119
|
}
|
|
101
120
|
async listVersions(request) {
|
|
102
121
|
const prefix = getFileName(request);
|
|
103
|
-
const
|
|
122
|
+
const searchPrefix = prefix + "/";
|
|
123
|
+
const [files] = await this.bucket.getFiles({ prefix: searchPrefix });
|
|
104
124
|
const versions = [];
|
|
105
125
|
for (const file of files) {
|
|
106
126
|
const version = file.name.split("/").pop();
|
|
107
|
-
|
|
127
|
+
const v = parseInt(version, 10);
|
|
128
|
+
if (!isNaN(v)) {
|
|
129
|
+
versions.push(v);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
return versions.sort((a, b) => a - b);
|
|
133
|
+
}
|
|
134
|
+
async listArtifactVersions(request) {
|
|
135
|
+
const versions = await this.listVersions(request);
|
|
136
|
+
const artifactVersions = [];
|
|
137
|
+
for (const version of versions) {
|
|
138
|
+
const artifactVersion = await this.getArtifactVersion(__spreadProps(__spreadValues({}, request), {
|
|
139
|
+
version
|
|
140
|
+
}));
|
|
141
|
+
if (artifactVersion) {
|
|
142
|
+
artifactVersions.push(artifactVersion);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
return artifactVersions;
|
|
146
|
+
}
|
|
147
|
+
async getArtifactVersion(request) {
|
|
148
|
+
try {
|
|
149
|
+
let version = request.version;
|
|
150
|
+
if (version === void 0) {
|
|
151
|
+
const versions = await this.listVersions(request);
|
|
152
|
+
if (versions.length === 0) {
|
|
153
|
+
return void 0;
|
|
154
|
+
}
|
|
155
|
+
version = Math.max(...versions);
|
|
156
|
+
}
|
|
157
|
+
const file = this.bucket.file(
|
|
158
|
+
getFileName(__spreadProps(__spreadValues({}, request), {
|
|
159
|
+
version
|
|
160
|
+
}))
|
|
161
|
+
);
|
|
162
|
+
const [metadata] = await file.getMetadata();
|
|
163
|
+
return {
|
|
164
|
+
version,
|
|
165
|
+
mimeType: metadata.contentType,
|
|
166
|
+
customMetadata: metadata.metadata,
|
|
167
|
+
canonicalUri: file.publicUrl()
|
|
168
|
+
};
|
|
169
|
+
} catch (e) {
|
|
170
|
+
logger.warn(
|
|
171
|
+
"[GcsArtifactService] getArtifactVersion: Failed to get artifact version for userId: ".concat(request.userId, " sessionId: ").concat(request.sessionId, " filename: ").concat(request.filename, " version: ").concat(request.version),
|
|
172
|
+
e
|
|
173
|
+
);
|
|
174
|
+
return void 0;
|
|
108
175
|
}
|
|
109
|
-
return versions;
|
|
110
176
|
}
|
|
111
177
|
}
|
|
112
178
|
function getFileName({
|
|
@@ -116,10 +182,29 @@ function getFileName({
|
|
|
116
182
|
filename,
|
|
117
183
|
version
|
|
118
184
|
}) {
|
|
119
|
-
|
|
120
|
-
|
|
185
|
+
const isUser = filename.startsWith("user:");
|
|
186
|
+
const cleanFilename = isUser ? filename.substring(5) : filename;
|
|
187
|
+
const prefix = isUser ? "".concat(appName, "/").concat(userId, "/user/").concat(cleanFilename) : "".concat(appName, "/").concat(userId, "/").concat(sessionId, "/").concat(cleanFilename);
|
|
188
|
+
return version !== void 0 ? "".concat(prefix, "/").concat(version) : prefix;
|
|
189
|
+
}
|
|
190
|
+
function extractArtifactKeys(files, fileNamePrefix, keyPrefix = "") {
|
|
191
|
+
const keys = /* @__PURE__ */ new Set();
|
|
192
|
+
for (const file of files) {
|
|
193
|
+
if (!file.name.startsWith(fileNamePrefix)) {
|
|
194
|
+
continue;
|
|
195
|
+
}
|
|
196
|
+
const relative = file.name.substring(fileNamePrefix.length);
|
|
197
|
+
const name = getFileNameFromPath(relative);
|
|
198
|
+
keys.add("".concat(keyPrefix).concat(name));
|
|
199
|
+
}
|
|
200
|
+
return [...keys];
|
|
201
|
+
}
|
|
202
|
+
function getFileNameFromPath(filePath) {
|
|
203
|
+
const parts = filePath.split("/");
|
|
204
|
+
if (parts.length < 2) {
|
|
205
|
+
return filePath;
|
|
121
206
|
}
|
|
122
|
-
return
|
|
207
|
+
return parts.slice(0, -1).join("/");
|
|
123
208
|
}
|
|
124
209
|
export {
|
|
125
210
|
GcsArtifactService
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
+
function isInMemoryConnectionString(uri) {
|
|
7
|
+
return uri === "memory://";
|
|
8
|
+
}
|
|
6
9
|
class InMemoryArtifactService {
|
|
7
10
|
constructor() {
|
|
8
11
|
this.artifacts = {};
|
|
@@ -12,14 +15,24 @@ class InMemoryArtifactService {
|
|
|
12
15
|
userId,
|
|
13
16
|
sessionId,
|
|
14
17
|
filename,
|
|
15
|
-
artifact
|
|
18
|
+
artifact,
|
|
19
|
+
customMetadata
|
|
16
20
|
}) {
|
|
21
|
+
if (!artifact.inlineData && !artifact.text) {
|
|
22
|
+
return Promise.reject(
|
|
23
|
+
new Error("Artifact must have either inlineData or text content.")
|
|
24
|
+
);
|
|
25
|
+
}
|
|
17
26
|
const path = artifactPath(appName, userId, sessionId, filename);
|
|
18
27
|
if (!this.artifacts[path]) {
|
|
19
28
|
this.artifacts[path] = [];
|
|
20
29
|
}
|
|
21
30
|
const version = this.artifacts[path].length;
|
|
22
|
-
|
|
31
|
+
const metadata = {
|
|
32
|
+
version,
|
|
33
|
+
customMetadata
|
|
34
|
+
};
|
|
35
|
+
this.artifacts[path].push({ part: artifact, metadata });
|
|
23
36
|
return Promise.resolve(version);
|
|
24
37
|
}
|
|
25
38
|
loadArtifact({
|
|
@@ -37,9 +50,13 @@ class InMemoryArtifactService {
|
|
|
37
50
|
if (version === void 0) {
|
|
38
51
|
version = versions.length - 1;
|
|
39
52
|
}
|
|
40
|
-
return Promise.resolve(versions[version]);
|
|
53
|
+
return Promise.resolve(versions[version].part);
|
|
41
54
|
}
|
|
42
|
-
listArtifactKeys({
|
|
55
|
+
listArtifactKeys({
|
|
56
|
+
appName,
|
|
57
|
+
userId,
|
|
58
|
+
sessionId
|
|
59
|
+
}) {
|
|
43
60
|
const sessionPrefix = "".concat(appName, "/").concat(userId, "/").concat(sessionId, "/");
|
|
44
61
|
const usernamespacePrefix = "".concat(appName, "/").concat(userId, "/user/");
|
|
45
62
|
const filenames = [];
|
|
@@ -54,7 +71,12 @@ class InMemoryArtifactService {
|
|
|
54
71
|
}
|
|
55
72
|
return Promise.resolve(filenames.sort());
|
|
56
73
|
}
|
|
57
|
-
deleteArtifact({
|
|
74
|
+
deleteArtifact({
|
|
75
|
+
appName,
|
|
76
|
+
userId,
|
|
77
|
+
sessionId,
|
|
78
|
+
filename
|
|
79
|
+
}) {
|
|
58
80
|
const path = artifactPath(appName, userId, sessionId, filename);
|
|
59
81
|
if (!this.artifacts[path]) {
|
|
60
82
|
return Promise.resolve();
|
|
@@ -62,18 +84,56 @@ class InMemoryArtifactService {
|
|
|
62
84
|
delete this.artifacts[path];
|
|
63
85
|
return Promise.resolve();
|
|
64
86
|
}
|
|
65
|
-
listVersions({
|
|
87
|
+
listVersions({
|
|
88
|
+
appName,
|
|
89
|
+
userId,
|
|
90
|
+
sessionId,
|
|
91
|
+
filename
|
|
92
|
+
}) {
|
|
66
93
|
const path = artifactPath(appName, userId, sessionId, filename);
|
|
67
94
|
const artifacts = this.artifacts[path];
|
|
68
95
|
if (!artifacts) {
|
|
69
96
|
return Promise.resolve([]);
|
|
70
97
|
}
|
|
71
|
-
|
|
98
|
+
const versions = [];
|
|
72
99
|
for (let i = 0; i < artifacts.length; i++) {
|
|
73
100
|
versions.push(i);
|
|
74
101
|
}
|
|
75
102
|
return Promise.resolve(versions);
|
|
76
103
|
}
|
|
104
|
+
listArtifactVersions({
|
|
105
|
+
appName,
|
|
106
|
+
userId,
|
|
107
|
+
sessionId,
|
|
108
|
+
filename
|
|
109
|
+
}) {
|
|
110
|
+
const path = artifactPath(appName, userId, sessionId, filename);
|
|
111
|
+
const artifacts = this.artifacts[path];
|
|
112
|
+
if (!artifacts) {
|
|
113
|
+
return Promise.resolve([]);
|
|
114
|
+
}
|
|
115
|
+
return Promise.resolve(artifacts.map((a) => a.metadata));
|
|
116
|
+
}
|
|
117
|
+
getArtifactVersion({
|
|
118
|
+
appName,
|
|
119
|
+
userId,
|
|
120
|
+
sessionId,
|
|
121
|
+
filename,
|
|
122
|
+
version
|
|
123
|
+
}) {
|
|
124
|
+
const path = artifactPath(appName, userId, sessionId, filename);
|
|
125
|
+
const versions = this.artifacts[path];
|
|
126
|
+
if (!versions) {
|
|
127
|
+
return Promise.resolve(void 0);
|
|
128
|
+
}
|
|
129
|
+
if (version === void 0) {
|
|
130
|
+
version = versions.length - 1;
|
|
131
|
+
}
|
|
132
|
+
if (versions[version]) {
|
|
133
|
+
return Promise.resolve(versions[version].metadata);
|
|
134
|
+
}
|
|
135
|
+
return Promise.resolve(void 0);
|
|
136
|
+
}
|
|
77
137
|
}
|
|
78
138
|
function artifactPath(appName, userId, sessionId, filename) {
|
|
79
139
|
if (fileHasUserNamespace(filename)) {
|
|
@@ -85,5 +145,6 @@ function fileHasUserNamespace(filename) {
|
|
|
85
145
|
return filename.startsWith("user:");
|
|
86
146
|
}
|
|
87
147
|
export {
|
|
88
|
-
InMemoryArtifactService
|
|
148
|
+
InMemoryArtifactService,
|
|
149
|
+
isInMemoryConnectionString
|
|
89
150
|
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { FileArtifactService } from "./file_artifact_service.js";
|
|
7
|
+
import { GcsArtifactService } from "./gcs_artifact_service.js";
|
|
8
|
+
import {
|
|
9
|
+
InMemoryArtifactService,
|
|
10
|
+
isInMemoryConnectionString
|
|
11
|
+
} from "./in_memory_artifact_service.js";
|
|
12
|
+
function getArtifactServiceFromUri(uri) {
|
|
13
|
+
if (isInMemoryConnectionString(uri)) {
|
|
14
|
+
return new InMemoryArtifactService();
|
|
15
|
+
}
|
|
16
|
+
if (uri.startsWith("gs://")) {
|
|
17
|
+
const bucket = uri.split("://")[1];
|
|
18
|
+
return new GcsArtifactService(bucket);
|
|
19
|
+
}
|
|
20
|
+
if (uri.startsWith("file://")) {
|
|
21
|
+
const rootDir = uri.split("://")[1];
|
|
22
|
+
return new FileArtifactService(rootDir);
|
|
23
|
+
}
|
|
24
|
+
throw new Error("Unsupported artifact service URI: ".concat(uri));
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
getArtifactServiceFromUri
|
|
28
|
+
};
|
|
@@ -37,7 +37,9 @@ class AuthHandler {
|
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
39
|
if (!this.authConfig.rawAuthCredential.oauth2.clientId || !this.authConfig.rawAuthCredential.oauth2.clientSecret) {
|
|
40
|
-
throw new Error(
|
|
40
|
+
throw new Error(
|
|
41
|
+
"Auth Scheme ".concat(authSchemeType, " requires both clientId and clientSecret in authCredential.oauth2.")
|
|
42
|
+
);
|
|
41
43
|
}
|
|
42
44
|
return {
|
|
43
45
|
credentialKey: this.authConfig.credentialKey,
|
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
var _a;
|
|
7
|
-
const BASE_CODE_EXECUTOR_SIGNATURE_SYMBOL = Symbol.for(
|
|
7
|
+
const BASE_CODE_EXECUTOR_SIGNATURE_SYMBOL = Symbol.for(
|
|
8
|
+
"google.adk.baseCodeExecutor"
|
|
9
|
+
);
|
|
8
10
|
function isBaseCodeExecutor(obj) {
|
|
9
11
|
return typeof obj === "object" && obj !== null && BASE_CODE_EXECUTOR_SIGNATURE_SYMBOL in obj && obj[BASE_CODE_EXECUTOR_SIGNATURE_SYMBOL] === true;
|
|
10
12
|
}
|
|
@@ -6,7 +6,9 @@
|
|
|
6
6
|
var _a, _b;
|
|
7
7
|
import { isGemini2OrAbove } from "../utils/model_name.js";
|
|
8
8
|
import { BaseCodeExecutor } from "./base_code_executor.js";
|
|
9
|
-
const BUILT_IN_CODE_EXECUTOR_SIGNATURE_SYMBOL = Symbol.for(
|
|
9
|
+
const BUILT_IN_CODE_EXECUTOR_SIGNATURE_SYMBOL = Symbol.for(
|
|
10
|
+
"google.adk.builtInCodeExecutor"
|
|
11
|
+
);
|
|
10
12
|
function isBuiltInCodeExecutor(obj) {
|
|
11
13
|
return typeof obj === "object" && obj !== null && BUILT_IN_CODE_EXECUTOR_SIGNATURE_SYMBOL in obj && obj[BUILT_IN_CODE_EXECUTOR_SIGNATURE_SYMBOL] === true;
|
|
12
14
|
}
|
|
@@ -16,7 +18,7 @@ class BuiltInCodeExecutor extends (_b = BaseCodeExecutor, _a = BUILT_IN_CODE_EXE
|
|
|
16
18
|
/** A unique symbol to identify BuiltInCodeExecutor class. */
|
|
17
19
|
this[_a] = true;
|
|
18
20
|
}
|
|
19
|
-
executeCode(
|
|
21
|
+
executeCode(_params) {
|
|
20
22
|
return Promise.resolve({
|
|
21
23
|
stdout: "",
|
|
22
24
|
stderr: "",
|
|
@@ -30,7 +32,9 @@ class BuiltInCodeExecutor extends (_b = BaseCodeExecutor, _a = BUILT_IN_CODE_EXE
|
|
|
30
32
|
llmRequest.config.tools.push({ codeExecution: {} });
|
|
31
33
|
return;
|
|
32
34
|
}
|
|
33
|
-
throw new Error(
|
|
35
|
+
throw new Error(
|
|
36
|
+
"Gemini code execution tool is not supported for model ".concat(llmRequest.model)
|
|
37
|
+
);
|
|
34
38
|
}
|
|
35
39
|
}
|
|
36
40
|
export {
|
|
@@ -142,7 +142,9 @@ class CodeExecutorContext {
|
|
|
142
142
|
if (!(CODE_EXECUTION_RESULTS_KEY in this.sessionState)) {
|
|
143
143
|
this.sessionState.set(CODE_EXECUTION_RESULTS_KEY, {});
|
|
144
144
|
}
|
|
145
|
-
const codeExecutionResults = this.sessionState.get(
|
|
145
|
+
const codeExecutionResults = this.sessionState.get(
|
|
146
|
+
CODE_EXECUTION_RESULTS_KEY
|
|
147
|
+
);
|
|
146
148
|
if (!(invocationId in codeExecutionResults)) {
|
|
147
149
|
codeExecutionResults[invocationId] = [];
|
|
148
150
|
}
|
|
@@ -154,12 +156,10 @@ class CodeExecutorContext {
|
|
|
154
156
|
});
|
|
155
157
|
}
|
|
156
158
|
/**
|
|
157
|
-
* Gets the code
|
|
158
|
-
* @param invocationId The session state to get the code executor context
|
|
159
|
-
* from.
|
|
159
|
+
* Gets the code execution context from the session state.
|
|
160
160
|
* @return The code execution context for the given invocation ID.
|
|
161
161
|
*/
|
|
162
|
-
getCodeExecutionContext(
|
|
162
|
+
getCodeExecutionContext() {
|
|
163
163
|
return this.sessionState.get(CONTEXT_KEY) || {};
|
|
164
164
|
}
|
|
165
165
|
}
|
package/dist/web/common.js
CHANGED
|
@@ -32,13 +32,15 @@ import {
|
|
|
32
32
|
stringifyContent
|
|
33
33
|
} from "./events/event.js";
|
|
34
34
|
import { createEventActions } from "./events/event_actions.js";
|
|
35
|
+
import { EventType, toStructuredEvents } from "./events/structured_events.js";
|
|
35
36
|
import {
|
|
36
37
|
BaseExampleProvider,
|
|
37
38
|
isBaseExampleProvider
|
|
38
39
|
} from "./examples/base_example_provider.js";
|
|
39
40
|
import { InMemoryMemoryService } from "./memory/in_memory_memory_service.js";
|
|
41
|
+
import { ApigeeLlm } from "./models/apigee_llm.js";
|
|
40
42
|
import { BaseLlm, isBaseLlm } from "./models/base_llm.js";
|
|
41
|
-
import { Gemini } from "./models/google_llm.js";
|
|
43
|
+
import { Gemini, geminiInitParams } from "./models/google_llm.js";
|
|
42
44
|
import { LLMRegistry } from "./models/registry.js";
|
|
43
45
|
import { BasePlugin } from "./plugins/base_plugin.js";
|
|
44
46
|
import { LoggingPlugin } from "./plugins/logging_plugin.js";
|
|
@@ -52,6 +54,7 @@ import {
|
|
|
52
54
|
} from "./plugins/security_plugin.js";
|
|
53
55
|
import { InMemoryRunner } from "./runner/in_memory_runner.js";
|
|
54
56
|
import { Runner } from "./runner/runner.js";
|
|
57
|
+
import { BaseSessionService } from "./sessions/base_session_service.js";
|
|
55
58
|
import { InMemorySessionService } from "./sessions/in_memory_session_service.js";
|
|
56
59
|
import { createSession } from "./sessions/session.js";
|
|
57
60
|
import { State } from "./sessions/state.js";
|
|
@@ -63,7 +66,7 @@ import { GOOGLE_SEARCH, GoogleSearchTool } from "./tools/google_search_tool.js";
|
|
|
63
66
|
import { LongRunningFunctionTool } from "./tools/long_running_tool.js";
|
|
64
67
|
import { ToolConfirmation } from "./tools/tool_confirmation.js";
|
|
65
68
|
import { ToolContext } from "./tools/tool_context.js";
|
|
66
|
-
import { LogLevel, setLogLevel } from "./utils/logger.js";
|
|
69
|
+
import { LogLevel, getLogger, setLogLevel, setLogger } from "./utils/logger.js";
|
|
67
70
|
import { isGemini2OrAbove } from "./utils/model_name.js";
|
|
68
71
|
import { zodObjectToSchema } from "./utils/simple_zod_to_json.js";
|
|
69
72
|
import { GoogleLLMVariant } from "./utils/variant_utils.js";
|
|
@@ -75,6 +78,7 @@ export * from "./tools/base_tool.js";
|
|
|
75
78
|
export {
|
|
76
79
|
ActiveStreamingTool,
|
|
77
80
|
AgentTool,
|
|
81
|
+
ApigeeLlm,
|
|
78
82
|
AuthCredentialTypes,
|
|
79
83
|
BaseAgent,
|
|
80
84
|
BaseCodeExecutor,
|
|
@@ -83,10 +87,12 @@ export {
|
|
|
83
87
|
BaseLlmRequestProcessor,
|
|
84
88
|
BaseLlmResponseProcessor,
|
|
85
89
|
BasePlugin,
|
|
90
|
+
BaseSessionService,
|
|
86
91
|
BaseTool,
|
|
87
92
|
BaseToolset,
|
|
88
93
|
BuiltInCodeExecutor,
|
|
89
94
|
CallbackContext,
|
|
95
|
+
EventType,
|
|
90
96
|
FunctionTool,
|
|
91
97
|
GOOGLE_SEARCH,
|
|
92
98
|
Gemini,
|
|
@@ -121,9 +127,11 @@ export {
|
|
|
121
127
|
createEventActions,
|
|
122
128
|
createSession,
|
|
123
129
|
functionsExportedForTestingOnly,
|
|
130
|
+
geminiInitParams,
|
|
124
131
|
getAskUserConfirmationFunctionCalls,
|
|
125
132
|
getFunctionCalls,
|
|
126
133
|
getFunctionResponses,
|
|
134
|
+
getLogger,
|
|
127
135
|
hasTrailingCodeExecutionResult,
|
|
128
136
|
isAgentTool,
|
|
129
137
|
isBaseAgent,
|
|
@@ -138,7 +146,9 @@ export {
|
|
|
138
146
|
isParallelAgent,
|
|
139
147
|
isSequentialAgent,
|
|
140
148
|
setLogLevel,
|
|
149
|
+
setLogger,
|
|
141
150
|
stringifyContent,
|
|
151
|
+
toStructuredEvents,
|
|
142
152
|
version,
|
|
143
153
|
zodObjectToSchema
|
|
144
154
|
};
|
package/dist/web/events/event.js
CHANGED
|
@@ -19,9 +19,10 @@ var __spreadValues = (a, b) => {
|
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
/**
|
|
21
21
|
* @license
|
|
22
|
-
* Copyright
|
|
22
|
+
* Copyright 2026 Google LLC
|
|
23
23
|
* SPDX-License-Identifier: Apache-2.0
|
|
24
24
|
*/
|
|
25
|
+
import { toCamelCase, toSnakeCase } from "../utils/object_notation_utils.js";
|
|
25
26
|
import { createEventActions } from "./event_actions.js";
|
|
26
27
|
function createEvent(params = {}) {
|
|
27
28
|
return __spreadProps(__spreadValues({}, params), {
|
|
@@ -84,12 +85,34 @@ const ASCII_LETTERS_AND_NUMBERS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRS
|
|
|
84
85
|
function createNewEventId() {
|
|
85
86
|
let id = "";
|
|
86
87
|
for (let i = 0; i < 8; i++) {
|
|
87
|
-
id += ASCII_LETTERS_AND_NUMBERS[Math.floor(
|
|
88
|
-
Math.random() * ASCII_LETTERS_AND_NUMBERS.length
|
|
89
|
-
)];
|
|
88
|
+
id += ASCII_LETTERS_AND_NUMBERS[Math.floor(Math.random() * ASCII_LETTERS_AND_NUMBERS.length)];
|
|
90
89
|
}
|
|
91
90
|
return id;
|
|
92
91
|
}
|
|
92
|
+
const PRESERVE_KEYS_CAMEL_CASE = [
|
|
93
|
+
"actions.stateDelta",
|
|
94
|
+
"actions.artifactDelta",
|
|
95
|
+
"actions.requestedAuthConfigs",
|
|
96
|
+
"actions.requestedToolConfirmations",
|
|
97
|
+
"actions.customMetadata",
|
|
98
|
+
"content.parts.functionCall.args",
|
|
99
|
+
"content.parts.functionResponse.response"
|
|
100
|
+
];
|
|
101
|
+
const PRESERVE_KEYS_SNAKE_CASE = [
|
|
102
|
+
"actions.state_delta",
|
|
103
|
+
"actions.artifact_delta",
|
|
104
|
+
"actions.requested_auth_configs",
|
|
105
|
+
"actions.requested_tool_confirmations",
|
|
106
|
+
"actions.custom_metadata",
|
|
107
|
+
"content.parts.function_call.args",
|
|
108
|
+
"content.parts.function_response.response"
|
|
109
|
+
];
|
|
110
|
+
function transformToCamelCaseEvent(event) {
|
|
111
|
+
return toCamelCase(event, PRESERVE_KEYS_SNAKE_CASE);
|
|
112
|
+
}
|
|
113
|
+
function transformToSnakeCaseEvent(event) {
|
|
114
|
+
return toSnakeCase(event, PRESERVE_KEYS_CAMEL_CASE);
|
|
115
|
+
}
|
|
93
116
|
export {
|
|
94
117
|
createEvent,
|
|
95
118
|
createNewEventId,
|
|
@@ -97,5 +120,7 @@ export {
|
|
|
97
120
|
getFunctionResponses,
|
|
98
121
|
hasTrailingCodeExecutionResult,
|
|
99
122
|
isFinalResponse,
|
|
100
|
-
stringifyContent
|
|
123
|
+
stringifyContent,
|
|
124
|
+
transformToCamelCaseEvent,
|
|
125
|
+
transformToSnakeCaseEvent
|
|
101
126
|
};
|