@google/adk 1.2.0 → 1.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/agents/active_streaming_tool.js +6 -1
- package/dist/cjs/agents/base_agent.js +19 -1
- package/dist/cjs/agents/context.js +1 -11
- package/dist/cjs/agents/functions.js +35 -16
- package/dist/cjs/agents/instructions.js +99 -33
- package/dist/cjs/agents/invocation_context.js +2 -6
- package/dist/cjs/agents/llm_agent.js +60 -11
- package/dist/cjs/agents/processors/agent_transfer_llm_request_processor.js +7 -0
- package/dist/cjs/agents/processors/basic_llm_request_processor.js +8 -1
- package/dist/cjs/agents/processors/code_execution_request_processor.js +0 -3
- package/dist/cjs/agents/processors/content_processor_utils.js +51 -25
- package/dist/cjs/agents/processors/content_request_processor.js +7 -0
- package/dist/cjs/agents/processors/context_compactor_request_processor.js +16 -2
- package/dist/cjs/agents/processors/identity_llm_request_processor.js +7 -0
- package/dist/cjs/agents/processors/instructions_llm_request_processor.js +5 -0
- package/dist/cjs/agents/processors/interactions_request_processor.js +63 -0
- package/dist/cjs/agents/processors/request_confirmation_llm_request_processor.js +9 -1
- package/dist/cjs/agents/processors/tool_filter_request_processor.js +7 -1
- package/dist/cjs/apps/app.js +79 -0
- package/dist/cjs/apps/resumability_config.js +44 -0
- package/dist/cjs/artifacts/file_artifact_service.js +14 -1
- package/dist/cjs/artifacts/gcs_artifact_service.js +57 -15
- package/dist/cjs/artifacts/in_memory_artifact_service.js +5 -1
- package/dist/cjs/artifacts/scoped_artifact_service.js +101 -0
- package/dist/cjs/artifacts/session_artifact_service.js +27 -0
- package/dist/cjs/auth/auth_preprocessor.js +12 -10
- package/dist/cjs/auth/oauth2/oauth2_discovery.js +17 -5
- package/dist/cjs/auth/oauth2/oauth2_utils.js +12 -1
- package/dist/cjs/code_executors/code_executor_context.js +7 -7
- package/dist/cjs/common.js +86 -0
- package/dist/cjs/context/agent_controlled_context_compactor.js +109 -0
- package/dist/cjs/context/summarizers/llm_summarizer.js +11 -0
- package/dist/cjs/context/token_based_context_compactor.js +43 -11
- package/dist/cjs/context/trajectory_thought_pruning_compactor.js +71 -0
- package/dist/cjs/events/event.js +25 -1
- package/dist/cjs/integrations/agent_registry/agent_registry_mcp_toolset.js +21 -2
- package/dist/cjs/models/gemini_llm_connection.js +62 -19
- package/dist/cjs/models/google_llm.js +51 -18
- package/dist/cjs/models/interactions_utils.js +732 -0
- package/dist/cjs/plugins/base_plugin.js +1 -0
- package/dist/cjs/plugins/security_plugin.js +16 -0
- package/dist/cjs/runner/in_memory_runner.js +13 -2
- package/dist/cjs/runner/runner.js +93 -72
- package/dist/cjs/sessions/base_session_service.js +19 -3
- package/dist/cjs/sessions/database_session_service.js +26 -9
- package/dist/cjs/sessions/db/schema.js +45 -10
- package/dist/cjs/sessions/in_memory_session_service.js +2 -1
- package/dist/cjs/sessions/vertex_ai_session_service.js +21 -5
- package/dist/cjs/skills/gcp_skill_registry.js +104 -0
- package/dist/cjs/skills/loader.js +67 -2
- package/dist/cjs/skills/skill_registry.js +27 -0
- package/dist/cjs/tools/base_toolset.js +1 -1
- package/dist/cjs/tools/consolidate_context_tool.js +79 -0
- package/dist/cjs/tools/forwarding_artifact_service.js +16 -28
- package/dist/cjs/tools/openapi_tool/openapi_spec_parser/openapi_spec_parser.js +232 -0
- package/dist/cjs/tools/openapi_tool/openapi_spec_parser/operation_parser.js +224 -0
- package/dist/cjs/tools/openapi_tool/openapi_spec_parser/tool_auth_handler.js +117 -0
- package/dist/cjs/tools/openapi_tool/openapi_toolset.js +133 -0
- package/dist/cjs/tools/openapi_tool/rest_api_tool.js +256 -0
- package/dist/cjs/tools/skill/load_skill_resource_tool.js +25 -3
- package/dist/cjs/tools/skill/load_skill_tool.js +12 -1
- package/dist/cjs/tools/skill/run_skill_script_tool.js +12 -1
- package/dist/cjs/tools/skill/search_skills_tool.js +108 -0
- package/dist/cjs/tools/skill/skill_toolset.js +40 -5
- package/dist/cjs/utils/async_hooks_shim.js +52 -0
- package/dist/cjs/utils/async_queue.js +88 -0
- package/dist/cjs/utils/case_utils.js +53 -0
- package/dist/cjs/utils/client_labels.js +41 -3
- package/dist/cjs/utils/env_aware_utils.js +14 -1
- package/dist/cjs/utils/live_connection_utils.js +284 -0
- package/dist/cjs/utils/model_name.js +9 -0
- package/dist/cjs/utils/streaming_utils.js +18 -11
- package/dist/cjs/utils/task.js +62 -0
- package/dist/cjs/version.js +1 -1
- package/dist/esm/agents/active_streaming_tool.js +6 -1
- package/dist/esm/agents/base_agent.js +19 -1
- package/dist/esm/agents/context.js +1 -11
- package/dist/esm/agents/functions.js +36 -15
- package/dist/esm/agents/instructions.js +99 -33
- package/dist/esm/agents/invocation_context.js +2 -6
- package/dist/esm/agents/llm_agent.js +61 -11
- package/dist/esm/agents/processors/agent_transfer_llm_request_processor.js +7 -0
- package/dist/esm/agents/processors/basic_llm_request_processor.js +8 -1
- package/dist/esm/agents/processors/code_execution_request_processor.js +0 -3
- package/dist/esm/agents/processors/content_processor_utils.js +48 -24
- package/dist/esm/agents/processors/content_request_processor.js +7 -0
- package/dist/esm/agents/processors/context_compactor_request_processor.js +16 -2
- package/dist/esm/agents/processors/identity_llm_request_processor.js +7 -0
- package/dist/esm/agents/processors/instructions_llm_request_processor.js +5 -0
- package/dist/esm/agents/processors/interactions_request_processor.js +34 -0
- package/dist/esm/agents/processors/request_confirmation_llm_request_processor.js +9 -1
- package/dist/esm/agents/processors/tool_filter_request_processor.js +7 -1
- package/dist/esm/apps/app.js +49 -0
- package/dist/esm/apps/resumability_config.js +16 -0
- package/dist/esm/artifacts/file_artifact_service.js +14 -1
- package/dist/esm/artifacts/gcs_artifact_service.js +57 -15
- package/dist/esm/artifacts/in_memory_artifact_service.js +5 -1
- package/dist/esm/artifacts/scoped_artifact_service.js +73 -0
- package/dist/esm/artifacts/session_artifact_service.js +7 -0
- package/dist/esm/auth/auth_preprocessor.js +12 -10
- package/dist/esm/auth/oauth2/oauth2_discovery.js +14 -4
- package/dist/esm/auth/oauth2/oauth2_utils.js +12 -1
- package/dist/esm/code_executors/code_executor_context.js +7 -7
- package/dist/esm/common.js +75 -3
- package/dist/esm/context/agent_controlled_context_compactor.js +81 -0
- package/dist/esm/context/summarizers/llm_summarizer.js +11 -0
- package/dist/esm/context/token_based_context_compactor.js +43 -11
- package/dist/esm/context/trajectory_thought_pruning_compactor.js +43 -0
- package/dist/esm/events/event.js +23 -1
- package/dist/esm/integrations/agent_registry/agent_registry_mcp_toolset.js +21 -2
- package/dist/esm/models/gemini_llm_connection.js +62 -19
- package/dist/esm/models/google_llm.js +49 -17
- package/dist/esm/models/interactions_utils.js +697 -0
- package/dist/esm/plugins/base_plugin.js +1 -0
- package/dist/esm/plugins/security_plugin.js +16 -0
- package/dist/esm/runner/in_memory_runner.js +13 -2
- package/dist/esm/runner/runner.js +91 -73
- package/dist/esm/sessions/base_session_service.js +17 -2
- package/dist/esm/sessions/database_session_service.js +26 -9
- package/dist/esm/sessions/db/schema.js +44 -10
- package/dist/esm/sessions/in_memory_session_service.js +4 -2
- package/dist/esm/sessions/vertex_ai_session_service.js +21 -5
- package/dist/esm/skills/gcp_skill_registry.js +78 -0
- package/dist/esm/skills/loader.js +66 -2
- package/dist/esm/skills/skill_registry.js +7 -0
- package/dist/esm/tools/base_toolset.js +1 -1
- package/dist/esm/tools/consolidate_context_tool.js +51 -0
- package/dist/esm/tools/forwarding_artifact_service.js +16 -28
- package/dist/esm/tools/openapi_tool/openapi_spec_parser/openapi_spec_parser.js +206 -0
- package/dist/esm/tools/openapi_tool/openapi_spec_parser/operation_parser.js +198 -0
- package/dist/esm/tools/openapi_tool/openapi_spec_parser/tool_auth_handler.js +91 -0
- package/dist/esm/tools/openapi_tool/openapi_toolset.js +97 -0
- package/dist/esm/tools/openapi_tool/rest_api_tool.js +229 -0
- package/dist/esm/tools/skill/load_skill_resource_tool.js +25 -3
- package/dist/esm/tools/skill/load_skill_tool.js +12 -1
- package/dist/esm/tools/skill/run_skill_script_tool.js +12 -1
- package/dist/esm/tools/skill/search_skills_tool.js +82 -0
- package/dist/esm/tools/skill/skill_toolset.js +40 -5
- package/dist/esm/utils/async_hooks_shim.js +24 -0
- package/dist/esm/utils/async_queue.js +60 -0
- package/dist/esm/utils/case_utils.js +25 -0
- package/dist/esm/utils/client_labels.js +38 -2
- package/dist/esm/utils/env_aware_utils.js +14 -1
- package/dist/esm/utils/live_connection_utils.js +256 -0
- package/dist/esm/utils/model_name.js +8 -0
- package/dist/esm/utils/streaming_utils.js +18 -11
- package/dist/esm/utils/task.js +34 -0
- package/dist/esm/version.js +1 -1
- package/dist/types/a2a/a2a_remote_agent_utils.d.ts +29 -4
- package/dist/types/a2a/event_converter_utils.d.ts +14 -1
- package/dist/types/a2a/metadata_converter_utils.d.ts +18 -0
- package/dist/types/a2a/part_converter_utils.d.ts +51 -6
- package/dist/types/agents/active_streaming_tool.d.ts +3 -4
- package/dist/types/agents/functions.d.ts +12 -9
- package/dist/types/agents/invocation_context.d.ts +7 -12
- package/dist/types/agents/llm_agent.d.ts +14 -0
- package/dist/types/agents/processors/agent_transfer_llm_request_processor.d.ts +14 -0
- package/dist/types/agents/processors/basic_llm_request_processor.d.ts +7 -0
- package/dist/types/agents/processors/content_processor_utils.d.ts +34 -0
- package/dist/types/agents/processors/content_request_processor.d.ts +16 -0
- package/dist/types/agents/processors/context_compactor_request_processor.d.ts +12 -0
- package/dist/types/agents/processors/identity_llm_request_processor.d.ts +7 -0
- package/dist/types/agents/processors/interactions_request_processor.d.ts +17 -0
- package/dist/types/agents/processors/request_confirmation_llm_request_processor.d.ts +9 -1
- package/dist/types/agents/processors/tool_filter_request_processor.d.ts +12 -1
- package/dist/types/apps/app.d.ts +52 -0
- package/dist/types/apps/resumability_config.d.ts +27 -0
- package/dist/types/artifacts/base_artifact_service.d.ts +6 -36
- package/dist/types/artifacts/gcs_artifact_service.d.ts +2 -1
- package/dist/types/artifacts/scoped_artifact_service.d.ts +25 -0
- package/dist/types/artifacts/session_artifact_service.d.ts +25 -0
- package/dist/types/auth/oauth2/oauth2_discovery.d.ts +11 -0
- package/dist/types/common.d.ts +35 -4
- package/dist/types/context/agent_controlled_context_compactor.d.ts +24 -0
- package/dist/types/context/base_context_compactor.d.ts +3 -0
- package/dist/types/context/summarizers/llm_summarizer.d.ts +17 -0
- package/dist/types/context/token_based_context_compactor.d.ts +6 -1
- package/dist/types/context/trajectory_thought_pruning_compactor.d.ts +27 -0
- package/dist/types/events/event.d.ts +8 -0
- package/dist/types/events/event_actions.d.ts +1 -2
- package/dist/types/integrations/agent_registry/agent_registry_mcp_toolset.d.ts +21 -2
- package/dist/types/models/base_llm_connection.d.ts +10 -0
- package/dist/types/models/gemini_llm_connection.d.ts +15 -4
- package/dist/types/models/google_llm.d.ts +15 -1
- package/dist/types/models/interactions_utils.d.ts +92 -0
- package/dist/types/models/llm_request.d.ts +4 -0
- package/dist/types/models/llm_response.d.ts +14 -1
- package/dist/types/plugins/base_plugin.d.ts +2 -1
- package/dist/types/plugins/security_plugin.d.ts +30 -0
- package/dist/types/runner/in_memory_runner.d.ts +7 -1
- package/dist/types/runner/runner.d.ts +43 -9
- package/dist/types/sessions/base_session_service.d.ts +7 -16
- package/dist/types/sessions/db/schema.d.ts +1 -0
- package/dist/types/sessions/session.d.ts +11 -0
- package/dist/types/sessions/vertex_ai_session_service.d.ts +9 -1
- package/dist/types/skills/gcp_skill_registry.d.ts +24 -0
- package/dist/types/skills/loader.d.ts +7 -0
- package/dist/types/skills/skill.d.ts +1 -1
- package/dist/types/skills/skill_registry.d.ts +29 -0
- package/dist/types/tools/consolidate_context_tool.d.ts +19 -0
- package/dist/types/tools/forwarding_artifact_service.d.ts +3 -2
- package/dist/types/tools/openapi_tool/openapi_spec_parser/openapi_spec_parser.d.ts +34 -0
- package/dist/types/tools/openapi_tool/openapi_spec_parser/operation_parser.d.ts +59 -0
- package/dist/types/tools/openapi_tool/openapi_spec_parser/tool_auth_handler.d.ts +23 -0
- package/dist/types/tools/openapi_tool/openapi_toolset.d.ts +27 -0
- package/dist/types/tools/openapi_tool/rest_api_tool.d.ts +50 -0
- package/dist/types/tools/skill/load_skill_resource_tool.d.ts +1 -1
- package/dist/types/tools/skill/search_skills_tool.d.ts +14 -0
- package/dist/types/tools/skill/skill_toolset.d.ts +5 -0
- package/dist/types/utils/async_hooks_shim.d.ts +10 -0
- package/dist/types/utils/async_queue.d.ts +18 -0
- package/dist/types/utils/case_utils.d.ts +12 -0
- package/dist/types/utils/client_labels.d.ts +10 -0
- package/dist/types/utils/env_aware_utils.d.ts +3 -3
- package/dist/types/utils/live_connection_utils.d.ts +30 -0
- package/dist/types/utils/model_name.d.ts +7 -0
- package/dist/types/utils/streaming_utils.d.ts +0 -1
- package/dist/types/utils/task.d.ts +24 -0
- package/dist/types/version.d.ts +1 -1
- package/dist/web/agents/active_streaming_tool.js +6 -1
- package/dist/web/agents/base_agent.js +31 -1
- package/dist/web/agents/context.js +1 -11
- package/dist/web/agents/functions.js +36 -15
- package/dist/web/agents/instructions.js +99 -33
- package/dist/web/agents/invocation_context.js +2 -6
- package/dist/web/agents/llm_agent.js +61 -11
- package/dist/web/agents/processors/agent_transfer_llm_request_processor.js +7 -0
- package/dist/web/agents/processors/basic_llm_request_processor.js +8 -1
- package/dist/web/agents/processors/code_execution_request_processor.js +0 -3
- package/dist/web/agents/processors/content_processor_utils.js +66 -24
- package/dist/web/agents/processors/content_request_processor.js +7 -0
- package/dist/web/agents/processors/context_compactor_request_processor.js +16 -2
- package/dist/web/agents/processors/identity_llm_request_processor.js +7 -0
- package/dist/web/agents/processors/instructions_llm_request_processor.js +5 -0
- package/dist/web/agents/processors/interactions_request_processor.js +52 -0
- package/dist/web/agents/processors/request_confirmation_llm_request_processor.js +9 -1
- package/dist/web/agents/processors/tool_filter_request_processor.js +7 -1
- package/dist/web/apps/app.js +49 -0
- package/dist/web/apps/resumability_config.js +31 -0
- package/dist/web/artifacts/file_artifact_service.js +14 -1
- package/dist/web/artifacts/gcs_artifact_service.js +55 -15
- package/dist/web/artifacts/in_memory_artifact_service.js +5 -1
- package/dist/web/artifacts/scoped_artifact_service.js +86 -0
- package/dist/web/artifacts/session_artifact_service.js +7 -0
- package/dist/web/auth/auth_preprocessor.js +12 -10
- package/dist/web/auth/oauth2/oauth2_discovery.js +14 -4
- package/dist/web/auth/oauth2/oauth2_utils.js +12 -1
- package/dist/web/code_executors/code_executor_context.js +7 -7
- package/dist/web/common.js +75 -3
- package/dist/web/context/agent_controlled_context_compactor.js +81 -0
- package/dist/web/context/summarizers/llm_summarizer.js +11 -0
- package/dist/web/context/token_based_context_compactor.js +43 -11
- package/dist/web/context/trajectory_thought_pruning_compactor.js +43 -0
- package/dist/web/events/event.js +21 -1
- package/dist/web/integrations/agent_registry/agent_registry_mcp_toolset.js +21 -2
- package/dist/web/models/gemini_llm_connection.js +75 -19
- package/dist/web/models/google_llm.js +80 -17
- package/dist/web/models/interactions_utils.js +728 -0
- package/dist/web/plugins/base_plugin.js +1 -0
- package/dist/web/plugins/security_plugin.js +16 -0
- package/dist/web/runner/in_memory_runner.js +13 -2
- package/dist/web/runner/runner.js +111 -75
- package/dist/web/sessions/base_session_service.js +17 -2
- package/dist/web/sessions/database_session_service.js +26 -9
- package/dist/web/sessions/db/schema.js +44 -10
- package/dist/web/sessions/in_memory_session_service.js +4 -2
- package/dist/web/sessions/vertex_ai_session_service.js +21 -5
- package/dist/web/skills/gcp_skill_registry.js +78 -0
- package/dist/web/skills/loader.js +66 -2
- package/dist/web/skills/skill_registry.js +7 -0
- package/dist/web/tools/base_toolset.js +1 -1
- package/dist/web/tools/consolidate_context_tool.js +51 -0
- package/dist/web/tools/forwarding_artifact_service.js +16 -28
- package/dist/web/tools/openapi_tool/openapi_spec_parser/openapi_spec_parser.js +221 -0
- package/dist/web/tools/openapi_tool/openapi_spec_parser/operation_parser.js +198 -0
- package/dist/web/tools/openapi_tool/openapi_spec_parser/tool_auth_handler.js +91 -0
- package/dist/web/tools/openapi_tool/openapi_toolset.js +97 -0
- package/dist/web/tools/openapi_tool/rest_api_tool.js +229 -0
- package/dist/web/tools/skill/load_skill_resource_tool.js +25 -3
- package/dist/web/tools/skill/load_skill_tool.js +12 -1
- package/dist/web/tools/skill/run_skill_script_tool.js +12 -1
- package/dist/web/tools/skill/search_skills_tool.js +82 -0
- package/dist/web/tools/skill/skill_toolset.js +40 -5
- package/dist/web/utils/async_hooks_shim.js +24 -0
- package/dist/web/utils/async_queue.js +60 -0
- package/dist/web/utils/case_utils.js +25 -0
- package/dist/web/utils/client_labels.js +38 -2
- package/dist/web/utils/env_aware_utils.js +14 -1
- package/dist/web/utils/live_connection_utils.js +254 -0
- package/dist/web/utils/model_name.js +8 -0
- package/dist/web/utils/streaming_utils.js +18 -11
- package/dist/web/utils/task.js +34 -0
- package/dist/web/version.js +1 -1
- package/package.json +4 -2
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
"use strict";
|
|
8
|
+
var __defProp = Object.defineProperty;
|
|
9
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
10
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
11
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
12
|
+
var __export = (target, all) => {
|
|
13
|
+
for (var name in all)
|
|
14
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
15
|
+
};
|
|
16
|
+
var __copyProps = (to, from, except, desc) => {
|
|
17
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
18
|
+
for (let key of __getOwnPropNames(from))
|
|
19
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
20
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
21
|
+
}
|
|
22
|
+
return to;
|
|
23
|
+
};
|
|
24
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
25
|
+
var scoped_artifact_service_exports = {};
|
|
26
|
+
__export(scoped_artifact_service_exports, {
|
|
27
|
+
ScopedArtifactService: () => ScopedArtifactService
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(scoped_artifact_service_exports);
|
|
30
|
+
/**
|
|
31
|
+
* @license
|
|
32
|
+
* Copyright 2026 Google LLC
|
|
33
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
34
|
+
*/
|
|
35
|
+
class ScopedArtifactService {
|
|
36
|
+
constructor(delegate, appName, userId, sessionId) {
|
|
37
|
+
this.delegate = delegate;
|
|
38
|
+
this.appName = appName;
|
|
39
|
+
this.userId = userId;
|
|
40
|
+
this.sessionId = sessionId;
|
|
41
|
+
}
|
|
42
|
+
async saveArtifact(request) {
|
|
43
|
+
return this.delegate.saveArtifact({
|
|
44
|
+
appName: this.appName,
|
|
45
|
+
userId: this.userId,
|
|
46
|
+
sessionId: this.sessionId,
|
|
47
|
+
...request
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
async loadArtifact(request) {
|
|
51
|
+
return this.delegate.loadArtifact({
|
|
52
|
+
appName: this.appName,
|
|
53
|
+
userId: this.userId,
|
|
54
|
+
sessionId: this.sessionId,
|
|
55
|
+
...request
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
async listArtifactKeys() {
|
|
59
|
+
return this.delegate.listArtifactKeys({
|
|
60
|
+
appName: this.appName,
|
|
61
|
+
userId: this.userId,
|
|
62
|
+
sessionId: this.sessionId
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
async deleteArtifact(filename) {
|
|
66
|
+
return this.delegate.deleteArtifact({
|
|
67
|
+
appName: this.appName,
|
|
68
|
+
userId: this.userId,
|
|
69
|
+
sessionId: this.sessionId,
|
|
70
|
+
filename
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
async listVersions(filename) {
|
|
74
|
+
return this.delegate.listVersions({
|
|
75
|
+
appName: this.appName,
|
|
76
|
+
userId: this.userId,
|
|
77
|
+
sessionId: this.sessionId,
|
|
78
|
+
filename
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
async listArtifactVersions(filename) {
|
|
82
|
+
return this.delegate.listArtifactVersions({
|
|
83
|
+
appName: this.appName,
|
|
84
|
+
userId: this.userId,
|
|
85
|
+
sessionId: this.sessionId,
|
|
86
|
+
filename
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
async getArtifactVersion(request) {
|
|
90
|
+
return this.delegate.getArtifactVersion({
|
|
91
|
+
appName: this.appName,
|
|
92
|
+
userId: this.userId,
|
|
93
|
+
sessionId: this.sessionId,
|
|
94
|
+
...request
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
99
|
+
0 && (module.exports = {
|
|
100
|
+
ScopedArtifactService
|
|
101
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
"use strict";
|
|
8
|
+
var __defProp = Object.defineProperty;
|
|
9
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
10
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
11
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
var session_artifact_service_exports = {};
|
|
22
|
+
module.exports = __toCommonJS(session_artifact_service_exports);
|
|
23
|
+
/**
|
|
24
|
+
* @license
|
|
25
|
+
* Copyright 2026 Google LLC
|
|
26
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
27
|
+
*/
|
|
@@ -34,6 +34,7 @@ var import_base_llm_processor = require("../agents/processors/base_llm_processor
|
|
|
34
34
|
var import_readonly_context = require("../agents/readonly_context.js");
|
|
35
35
|
var import_event = require("../events/event.js");
|
|
36
36
|
var import_state = require("../sessions/state.js");
|
|
37
|
+
var import_case_utils = require("../utils/case_utils.js");
|
|
37
38
|
var import_auth_handler = require("./auth_handler.js");
|
|
38
39
|
/**
|
|
39
40
|
* @license
|
|
@@ -47,17 +48,15 @@ async function storeAuthAndCollectResumeTargets(events, authFcIds, authResponses
|
|
|
47
48
|
const eventFunctionCalls = (0, import_event.getFunctionCalls)(event);
|
|
48
49
|
for (const functionCall of eventFunctionCalls) {
|
|
49
50
|
if (functionCall.id && authFcIds.has(functionCall.id) && functionCall.name === import_functions.REQUEST_EUC_FUNCTION_CALL_NAME) {
|
|
50
|
-
const args = functionCall.args;
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
const args = (0, import_case_utils.camelCaseKeys)(functionCall.args);
|
|
52
|
+
const authConfig = args == null ? void 0 : args.authConfig;
|
|
53
|
+
if (authConfig) {
|
|
54
|
+
requestedAuthConfigById[functionCall.id] = authConfig;
|
|
53
55
|
}
|
|
54
56
|
}
|
|
55
57
|
}
|
|
56
58
|
}
|
|
57
59
|
for (const fcId of authFcIds) {
|
|
58
|
-
if (!(fcId in authResponses)) {
|
|
59
|
-
continue;
|
|
60
|
-
}
|
|
61
60
|
const authConfig = authResponses[fcId];
|
|
62
61
|
const requestedAuthConfig = requestedAuthConfigById[fcId];
|
|
63
62
|
if (requestedAuthConfig && requestedAuthConfig.credentialKey) {
|
|
@@ -75,12 +74,15 @@ async function storeAuthAndCollectResumeTargets(events, authFcIds, authResponses
|
|
|
75
74
|
const eventFunctionCalls = (0, import_event.getFunctionCalls)(event);
|
|
76
75
|
for (const functionCall of eventFunctionCalls) {
|
|
77
76
|
if (functionCall.id === fcId && functionCall.name === import_functions.REQUEST_EUC_FUNCTION_CALL_NAME) {
|
|
78
|
-
const args =
|
|
79
|
-
|
|
80
|
-
|
|
77
|
+
const args = (0, import_case_utils.camelCaseKeys)(
|
|
78
|
+
functionCall.args
|
|
79
|
+
);
|
|
80
|
+
const functionCallId = args == null ? void 0 : args.functionCallId;
|
|
81
|
+
if (functionCallId) {
|
|
82
|
+
if (functionCallId.startsWith(TOOLSET_AUTH_CREDENTIAL_ID_PREFIX)) {
|
|
81
83
|
continue;
|
|
82
84
|
}
|
|
83
|
-
toolsToResume.add(
|
|
85
|
+
toolsToResume.add(functionCallId);
|
|
84
86
|
}
|
|
85
87
|
}
|
|
86
88
|
}
|
|
@@ -26,7 +26,9 @@ var oauth2_discovery_exports = {};
|
|
|
26
26
|
__export(oauth2_discovery_exports, {
|
|
27
27
|
AuthorizationServerMetadataSchema: () => AuthorizationServerMetadataSchema,
|
|
28
28
|
OAuth2DiscoveryManager: () => OAuth2DiscoveryManager,
|
|
29
|
-
ProtectedResourceMetadataSchema: () => ProtectedResourceMetadataSchema
|
|
29
|
+
ProtectedResourceMetadataSchema: () => ProtectedResourceMetadataSchema,
|
|
30
|
+
normaliseHostname: () => normaliseHostname,
|
|
31
|
+
validateDiscoveryUrl: () => validateDiscoveryUrl
|
|
30
32
|
});
|
|
31
33
|
module.exports = __toCommonJS(oauth2_discovery_exports);
|
|
32
34
|
var import_zod = require("zod");
|
|
@@ -84,7 +86,11 @@ class OAuth2DiscoveryManager {
|
|
|
84
86
|
method: "GET",
|
|
85
87
|
headers: {
|
|
86
88
|
Accept: "application/json"
|
|
87
|
-
}
|
|
89
|
+
},
|
|
90
|
+
// Never follow redirects: validateDiscoveryUrl only checks the
|
|
91
|
+
// initial URL, so following a 3xx would let a validated host
|
|
92
|
+
// redirect discovery to a private/cloud-metadata address (CWE-918).
|
|
93
|
+
redirect: "error"
|
|
88
94
|
});
|
|
89
95
|
if (!response.ok) {
|
|
90
96
|
continue;
|
|
@@ -132,7 +138,11 @@ class OAuth2DiscoveryManager {
|
|
|
132
138
|
method: "GET",
|
|
133
139
|
headers: {
|
|
134
140
|
Accept: "application/json"
|
|
135
|
-
}
|
|
141
|
+
},
|
|
142
|
+
// Never follow redirects: validateDiscoveryUrl only checks the
|
|
143
|
+
// initial URL, so following a 3xx would let a validated host
|
|
144
|
+
// redirect discovery to a private/cloud-metadata address (CWE-918).
|
|
145
|
+
redirect: "error"
|
|
136
146
|
});
|
|
137
147
|
if (!response.ok) {
|
|
138
148
|
return void 0;
|
|
@@ -172,7 +182,7 @@ function validateDiscoveryUrl(urlStr) {
|
|
|
172
182
|
return false;
|
|
173
183
|
}
|
|
174
184
|
const host = normaliseHostname(url.hostname.toLowerCase());
|
|
175
|
-
if (host === "localhost" || host === "
|
|
185
|
+
if (host === "localhost" || host === "metadata.google.internal" || host === "metadata.goog" || host.startsWith("127.") || host === "[::1]" || host === "[::]" || host === "0.0.0.0" || host.startsWith("10.") || host.startsWith("192.168.") || host.startsWith("169.254.")) {
|
|
176
186
|
import_logger.logger.warn(`Unsafe host for discovery URL: ${host}`);
|
|
177
187
|
return false;
|
|
178
188
|
}
|
|
@@ -206,5 +216,7 @@ function validateDiscoveryUrl(urlStr) {
|
|
|
206
216
|
0 && (module.exports = {
|
|
207
217
|
AuthorizationServerMetadataSchema,
|
|
208
218
|
OAuth2DiscoveryManager,
|
|
209
|
-
ProtectedResourceMetadataSchema
|
|
219
|
+
ProtectedResourceMetadataSchema,
|
|
220
|
+
normaliseHostname,
|
|
221
|
+
validateDiscoveryUrl
|
|
210
222
|
});
|
|
@@ -32,6 +32,7 @@ __export(oauth2_utils_exports, {
|
|
|
32
32
|
});
|
|
33
33
|
module.exports = __toCommonJS(oauth2_utils_exports);
|
|
34
34
|
var import_logger = require("../../utils/logger.js");
|
|
35
|
+
var import_oauth2_discovery = require("./oauth2_discovery.js");
|
|
35
36
|
/**
|
|
36
37
|
* @license
|
|
37
38
|
* Copyright 2026 Google LLC
|
|
@@ -51,13 +52,23 @@ function getTokenEndpoint(authScheme) {
|
|
|
51
52
|
return void 0;
|
|
52
53
|
}
|
|
53
54
|
async function fetchOAuth2Tokens(endpoint, body) {
|
|
55
|
+
if (!(0, import_oauth2_discovery.validateDiscoveryUrl)(endpoint)) {
|
|
56
|
+
throw new Error(
|
|
57
|
+
`SSRF protection: OAuth2 token endpoint '${endpoint}' is not allowed. Must use HTTPS and must not target private/loopback/cloud-metadata addresses.`
|
|
58
|
+
);
|
|
59
|
+
}
|
|
54
60
|
try {
|
|
55
61
|
const response = await fetch(endpoint, {
|
|
56
62
|
method: "POST",
|
|
57
63
|
headers: {
|
|
58
64
|
"Content-Type": "application/x-www-form-urlencoded"
|
|
59
65
|
},
|
|
60
|
-
body: body.toString()
|
|
66
|
+
body: body.toString(),
|
|
67
|
+
// Never follow redirects: the SSRF blocklist only validates `endpoint`,
|
|
68
|
+
// so a validated host that responds with a 3xx could otherwise redirect
|
|
69
|
+
// this credential-bearing POST (client_secret/refresh_token) to a
|
|
70
|
+
// private/cloud-metadata address (CWE-918).
|
|
71
|
+
redirect: "error"
|
|
61
72
|
});
|
|
62
73
|
if (!response.ok) {
|
|
63
74
|
throw new Error(`Token request failed with status ${response.status}`);
|
|
@@ -97,7 +97,7 @@ class CodeExecutorContext {
|
|
|
97
97
|
* @return A list of input files in the code executor context.
|
|
98
98
|
*/
|
|
99
99
|
getInputFiles() {
|
|
100
|
-
if (!
|
|
100
|
+
if (!this.sessionState.has(INPUT_FILE_KEY)) {
|
|
101
101
|
return [];
|
|
102
102
|
}
|
|
103
103
|
return this.sessionState.get(INPUT_FILE_KEY);
|
|
@@ -107,13 +107,13 @@ class CodeExecutorContext {
|
|
|
107
107
|
* @param inputFiles The input files to add to the session state.
|
|
108
108
|
*/
|
|
109
109
|
addInputFiles(inputFiles) {
|
|
110
|
-
if (!
|
|
110
|
+
if (!this.sessionState.has(INPUT_FILE_KEY)) {
|
|
111
111
|
this.sessionState.set(INPUT_FILE_KEY, []);
|
|
112
112
|
}
|
|
113
113
|
this.sessionState.get(INPUT_FILE_KEY).push(...inputFiles);
|
|
114
114
|
}
|
|
115
115
|
clearInputFiles() {
|
|
116
|
-
if (
|
|
116
|
+
if (this.sessionState.has(INPUT_FILE_KEY)) {
|
|
117
117
|
this.sessionState.set(INPUT_FILE_KEY, []);
|
|
118
118
|
}
|
|
119
119
|
if (PROCESSED_FILE_NAMES_KEY in this.context) {
|
|
@@ -126,7 +126,7 @@ class CodeExecutorContext {
|
|
|
126
126
|
* @return The error count for the given invocation ID.
|
|
127
127
|
*/
|
|
128
128
|
getErrorCount(invocationId) {
|
|
129
|
-
if (!
|
|
129
|
+
if (!this.sessionState.has(ERROR_COUNT_KEY)) {
|
|
130
130
|
return 0;
|
|
131
131
|
}
|
|
132
132
|
return this.sessionState.get(ERROR_COUNT_KEY)[invocationId] || 0;
|
|
@@ -136,7 +136,7 @@ class CodeExecutorContext {
|
|
|
136
136
|
* @param invocationId The invocation ID to increment the error count for.
|
|
137
137
|
*/
|
|
138
138
|
incrementErrorCount(invocationId) {
|
|
139
|
-
if (!
|
|
139
|
+
if (!this.sessionState.has(ERROR_COUNT_KEY)) {
|
|
140
140
|
this.sessionState.set(ERROR_COUNT_KEY, {});
|
|
141
141
|
}
|
|
142
142
|
this.sessionState.get(ERROR_COUNT_KEY)[invocationId] = this.getErrorCount(invocationId) + 1;
|
|
@@ -146,7 +146,7 @@ class CodeExecutorContext {
|
|
|
146
146
|
* @param invocationId The invocation ID to reset the error count for.
|
|
147
147
|
*/
|
|
148
148
|
resetErrorCount(invocationId) {
|
|
149
|
-
if (!
|
|
149
|
+
if (!this.sessionState.has(ERROR_COUNT_KEY)) {
|
|
150
150
|
return;
|
|
151
151
|
}
|
|
152
152
|
const errorCounts = this.sessionState.get(ERROR_COUNT_KEY);
|
|
@@ -168,7 +168,7 @@ class CodeExecutorContext {
|
|
|
168
168
|
resultStdout,
|
|
169
169
|
resultStderr
|
|
170
170
|
}) {
|
|
171
|
-
if (!
|
|
171
|
+
if (!this.sessionState.has(CODE_EXECUTION_RESULTS_KEY)) {
|
|
172
172
|
this.sessionState.set(CODE_EXECUTION_RESULTS_KEY, {});
|
|
173
173
|
}
|
|
174
174
|
const codeExecutionResults = this.sessionState.get(
|
package/dist/cjs/common.js
CHANGED
|
@@ -25,13 +25,16 @@ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "defau
|
|
|
25
25
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
26
26
|
var common_exports = {};
|
|
27
27
|
__export(common_exports, {
|
|
28
|
+
AUTH_PREPROCESSOR: () => import_auth_preprocessor.AUTH_PREPROCESSOR,
|
|
28
29
|
ActiveStreamingTool: () => import_active_streaming_tool.ActiveStreamingTool,
|
|
29
30
|
Agent: () => import_llm_agent.LlmAgent,
|
|
31
|
+
AgentControlledContextCompactor: () => import_agent_controlled_context_compactor.AgentControlledContextCompactor,
|
|
30
32
|
AgentTool: () => import_agent_tool.AgentTool,
|
|
31
33
|
AgentTransferLlmRequestProcessor: () => import_agent_transfer_llm_request_processor.AgentTransferLlmRequestProcessor,
|
|
32
34
|
ApigeeLlm: () => import_apigee_llm.ApigeeLlm,
|
|
33
35
|
AuthCredentialTypes: () => import_auth_credential.AuthCredentialTypes,
|
|
34
36
|
AuthHandler: () => import_auth_handler.AuthHandler,
|
|
37
|
+
AuthPreprocessor: () => import_auth_preprocessor.AuthPreprocessor,
|
|
35
38
|
AuthProviderRegistry: () => import_auth_provider_registry.AuthProviderRegistry,
|
|
36
39
|
BaseAgent: () => import_base_agent.BaseAgent,
|
|
37
40
|
BaseCodeExecutor: () => import_base_code_executor.BaseCodeExecutor,
|
|
@@ -46,6 +49,7 @@ __export(common_exports, {
|
|
|
46
49
|
BuiltInCodeExecutor: () => import_built_in_code_executor.BuiltInCodeExecutor,
|
|
47
50
|
CONTENT_REQUEST_PROCESSOR: () => import_content_request_processor.CONTENT_REQUEST_PROCESSOR,
|
|
48
51
|
CodeExecutionLanguage: () => import_code_execution_utils.CodeExecutionLanguage,
|
|
52
|
+
ConsolidateContextTool: () => import_consolidate_context_tool.ConsolidateContextTool,
|
|
49
53
|
ContentRequestProcessor: () => import_content_request_processor.ContentRequestProcessor,
|
|
50
54
|
Context: () => import_context.Context,
|
|
51
55
|
ContextCompactionTrigger: () => import_base_plugin.ContextCompactionTrigger,
|
|
@@ -57,18 +61,21 @@ __export(common_exports, {
|
|
|
57
61
|
ExitLoopTool: () => import_exit_loop_tool.ExitLoopTool,
|
|
58
62
|
FileContentEncoding: () => import_code_execution_utils.FileContentEncoding,
|
|
59
63
|
FunctionTool: () => import_function_tool.FunctionTool,
|
|
64
|
+
GCPSkillRegistry: () => import_gcp_skill_registry.GCPSkillRegistry,
|
|
60
65
|
GOOGLE_MAPS_GROUNDING: () => import_google_maps_grounding_tool.GOOGLE_MAPS_GROUNDING,
|
|
61
66
|
GOOGLE_SEARCH: () => import_google_search_tool.GOOGLE_SEARCH,
|
|
62
67
|
Gemini: () => import_google_llm.Gemini,
|
|
63
68
|
GoogleLLMVariant: () => import_variant_utils.GoogleLLMVariant,
|
|
64
69
|
GoogleMapsGroundingTool: () => import_google_maps_grounding_tool.GoogleMapsGroundingTool,
|
|
65
70
|
GoogleSearchTool: () => import_google_search_tool.GoogleSearchTool,
|
|
71
|
+
INTERACTIONS_REQUEST_PROCESSOR: () => import_interactions_request_processor.INTERACTIONS_REQUEST_PROCESSOR,
|
|
66
72
|
InMemoryArtifactService: () => import_in_memory_artifact_service.InMemoryArtifactService,
|
|
67
73
|
InMemoryCredentialService: () => import_in_memory_credential_service.InMemoryCredentialService,
|
|
68
74
|
InMemoryMemoryService: () => import_in_memory_memory_service.InMemoryMemoryService,
|
|
69
75
|
InMemoryPolicyEngine: () => import_security_plugin.InMemoryPolicyEngine,
|
|
70
76
|
InMemoryRunner: () => import_in_memory_runner.InMemoryRunner,
|
|
71
77
|
InMemorySessionService: () => import_in_memory_session_service.InMemorySessionService,
|
|
78
|
+
InteractionsRequestProcessor: () => import_interactions_request_processor.InteractionsRequestProcessor,
|
|
72
79
|
InvocationContext: () => import_invocation_context.InvocationContext,
|
|
73
80
|
LLMRegistry: () => import_registry.LLMRegistry,
|
|
74
81
|
LOAD_ARTIFACTS: () => import_load_artifacts_tool.LOAD_ARTIFACTS,
|
|
@@ -88,6 +95,9 @@ __export(common_exports, {
|
|
|
88
95
|
OAuth2CredentialExchanger: () => import_oauth2_credential_exchanger.OAuth2CredentialExchanger,
|
|
89
96
|
OAuth2DiscoveryManager: () => import_oauth2_discovery.OAuth2DiscoveryManager,
|
|
90
97
|
OAuthGrantType: () => import_auth_schemes.OAuthGrantType,
|
|
98
|
+
OpenAPIToolset: () => import_openapi_toolset.OpenAPIToolset,
|
|
99
|
+
OpenApiSpecParser: () => import_openapi_spec_parser.OpenApiSpecParser,
|
|
100
|
+
OperationParser: () => import_operation_parser.OperationParser,
|
|
91
101
|
PRELOAD_MEMORY: () => import_preload_memory_tool.PRELOAD_MEMORY,
|
|
92
102
|
ParallelAgent: () => import_parallel_agent.ParallelAgent,
|
|
93
103
|
PluginManager: () => import_plugin_manager.PluginManager,
|
|
@@ -95,17 +105,22 @@ __export(common_exports, {
|
|
|
95
105
|
PreloadMemoryTool: () => import_preload_memory_tool.PreloadMemoryTool,
|
|
96
106
|
REQUEST_CONFIRMATION_FUNCTION_CALL_NAME: () => import_security_plugin.REQUEST_CONFIRMATION_FUNCTION_CALL_NAME,
|
|
97
107
|
ReadonlyContext: () => import_readonly_context.ReadonlyContext,
|
|
108
|
+
RestApiTool: () => import_rest_api_tool.RestApiTool,
|
|
98
109
|
RoutedAgent: () => import_routed_agent.RoutedAgent,
|
|
99
110
|
RoutedLlm: () => import_routed_llm.RoutedLlm,
|
|
100
111
|
Runner: () => import_runner.Runner,
|
|
112
|
+
SearchSkillsTool: () => import_search_skills_tool.SearchSkillsTool,
|
|
101
113
|
SecurityPlugin: () => import_security_plugin.SecurityPlugin,
|
|
102
114
|
SequentialAgent: () => import_sequential_agent.SequentialAgent,
|
|
103
115
|
SessionStateCredentialService: () => import_session_state_credential_service.SessionStateCredentialService,
|
|
104
116
|
SkillToolset: () => import_skill_toolset.SkillToolset,
|
|
105
117
|
State: () => import_state.State,
|
|
106
118
|
StreamingMode: () => import_run_config.StreamingMode,
|
|
119
|
+
Task: () => import_task.Task,
|
|
107
120
|
TokenBasedContextCompactor: () => import_token_based_context_compactor.TokenBasedContextCompactor,
|
|
121
|
+
ToolAuthHandler: () => import_tool_auth_handler.ToolAuthHandler,
|
|
108
122
|
ToolConfirmation: () => import_tool_confirmation.ToolConfirmation,
|
|
123
|
+
TrajectoryThoughtPruningCompactor: () => import_trajectory_thought_pruning_compactor.TrajectoryThoughtPruningCompactor,
|
|
109
124
|
TruncatingContextCompactor: () => import_truncating_context_compactor.TruncatingContextCompactor,
|
|
110
125
|
URL_CONTEXT: () => import_url_context_tool.URL_CONTEXT,
|
|
111
126
|
UrlContextTool: () => import_url_context_tool.UrlContextTool,
|
|
@@ -114,10 +129,17 @@ __export(common_exports, {
|
|
|
114
129
|
VertexRagRetrievalTool: () => import_vertex_rag_retrieval_tool.VertexRagRetrievalTool,
|
|
115
130
|
createEvent: () => import_event.createEvent,
|
|
116
131
|
createEventActions: () => import_event_actions.createEventActions,
|
|
132
|
+
createRestApiTool: () => import_rest_api_tool.createRestApiTool,
|
|
133
|
+
createResumabilityConfig: () => import_resumability_config.createResumabilityConfig,
|
|
117
134
|
createSession: () => import_session.createSession,
|
|
135
|
+
determineAgentForResumption: () => import_runner.determineAgentForResumption,
|
|
136
|
+
findEventByFunctionCallId: () => import_functions.findEventByFunctionCallId,
|
|
137
|
+
findEventByLastFunctionResponseId: () => import_runner.findEventByLastFunctionResponseId,
|
|
138
|
+
findMatchingFunctionCall: () => import_functions.findMatchingFunctionCall,
|
|
118
139
|
functionsExportedForTestingOnly: () => import_functions.functionsExportedForTestingOnly,
|
|
119
140
|
geminiInitParams: () => import_google_llm.geminiInitParams,
|
|
120
141
|
getAskUserConfirmationFunctionCalls: () => import_security_plugin.getAskUserConfirmationFunctionCalls,
|
|
142
|
+
getClientLabels: () => import_client_labels.getClientLabels,
|
|
121
143
|
getFunctionCalls: () => import_event.getFunctionCalls,
|
|
122
144
|
getFunctionResponses: () => import_event.getFunctionResponses,
|
|
123
145
|
getLogger: () => import_logger.getLogger,
|
|
@@ -132,16 +154,23 @@ __export(common_exports, {
|
|
|
132
154
|
isFinalResponse: () => import_event.isFinalResponse,
|
|
133
155
|
isFunctionTool: () => import_function_tool.isFunctionTool,
|
|
134
156
|
isGemini2OrAbove: () => import_model_name.isGemini2OrAbove,
|
|
157
|
+
isGemini3xFlashLive: () => import_model_name.isGemini3xFlashLive,
|
|
135
158
|
isLlmAgent: () => import_llm_agent.isLlmAgent,
|
|
136
159
|
isLoopAgent: () => import_loop_agent.isLoopAgent,
|
|
137
160
|
isParallelAgent: () => import_parallel_agent.isParallelAgent,
|
|
161
|
+
isRoutableLlmAgent: () => import_runner.isRoutableLlmAgent,
|
|
138
162
|
isRoutedAgent: () => import_routed_agent.isRoutedAgent,
|
|
139
163
|
isRunner: () => import_runner.isRunner,
|
|
140
164
|
isSequentialAgent: () => import_sequential_agent.isSequentialAgent,
|
|
165
|
+
loadAllSkillsInDir: () => import_loader.loadAllSkillsInDir,
|
|
166
|
+
loadSkillFromDir: () => import_loader.loadSkillFromDir,
|
|
167
|
+
loadSkillFromZipBuffer: () => import_loader.loadSkillFromZipBuffer,
|
|
168
|
+
runWithClientLabel: () => import_client_labels.runWithClientLabel,
|
|
141
169
|
setLogLevel: () => import_logger.setLogLevel,
|
|
142
170
|
setLogger: () => import_logger.setLogger,
|
|
143
171
|
stringifyContent: () => import_event.stringifyContent,
|
|
144
172
|
toStructuredEvents: () => import_structured_events.toStructuredEvents,
|
|
173
|
+
validateSkillDir: () => import_loader.validateSkillDir,
|
|
145
174
|
version: () => import_version.version,
|
|
146
175
|
zodObjectToSchema: () => import_simple_zod_to_json.zodObjectToSchema
|
|
147
176
|
});
|
|
@@ -159,13 +188,16 @@ var import_agent_transfer_llm_request_processor = require("./agents/processors/a
|
|
|
159
188
|
var import_base_llm_processor = require("./agents/processors/base_llm_processor.js");
|
|
160
189
|
var import_content_request_processor = require("./agents/processors/content_request_processor.js");
|
|
161
190
|
var import_context_compactor_request_processor = require("./agents/processors/context_compactor_request_processor.js");
|
|
191
|
+
var import_interactions_request_processor = require("./agents/processors/interactions_request_processor.js");
|
|
162
192
|
var import_readonly_context = require("./agents/readonly_context.js");
|
|
163
193
|
var import_routed_agent = require("./agents/routed_agent.js");
|
|
164
194
|
var import_run_config = require("./agents/run_config.js");
|
|
165
195
|
var import_sequential_agent = require("./agents/sequential_agent.js");
|
|
196
|
+
var import_resumability_config = require("./apps/resumability_config.js");
|
|
166
197
|
var import_in_memory_artifact_service = require("./artifacts/in_memory_artifact_service.js");
|
|
167
198
|
var import_auth_credential = require("./auth/auth_credential.js");
|
|
168
199
|
var import_auth_handler = require("./auth/auth_handler.js");
|
|
200
|
+
var import_auth_preprocessor = require("./auth/auth_preprocessor.js");
|
|
169
201
|
var import_auth_provider_registry = require("./auth/auth_provider_registry.js");
|
|
170
202
|
var import_auth_schemes = require("./auth/auth_schemes.js");
|
|
171
203
|
var import_in_memory_credential_service = require("./auth/credential_service/in_memory_credential_service.js");
|
|
@@ -177,8 +209,10 @@ var import_credential_refresher_registry = require("./auth/refresher/credential_
|
|
|
177
209
|
var import_base_code_executor = require("./code_executors/base_code_executor.js");
|
|
178
210
|
var import_built_in_code_executor = require("./code_executors/built_in_code_executor.js");
|
|
179
211
|
var import_code_execution_utils = require("./code_executors/code_execution_utils.js");
|
|
212
|
+
var import_agent_controlled_context_compactor = require("./context/agent_controlled_context_compactor.js");
|
|
180
213
|
var import_llm_summarizer = require("./context/summarizers/llm_summarizer.js");
|
|
181
214
|
var import_token_based_context_compactor = require("./context/token_based_context_compactor.js");
|
|
215
|
+
var import_trajectory_thought_pruning_compactor = require("./context/trajectory_thought_pruning_compactor.js");
|
|
182
216
|
var import_truncating_context_compactor = require("./context/truncating_context_compactor.js");
|
|
183
217
|
var import_compacted_event = require("./events/compacted_event.js");
|
|
184
218
|
var import_event = require("./events/event.js");
|
|
@@ -205,6 +239,7 @@ var import_state = require("./sessions/state.js");
|
|
|
205
239
|
var import_agent_tool = require("./tools/agent_tool.js");
|
|
206
240
|
var import_base_tool = require("./tools/base_tool.js");
|
|
207
241
|
var import_base_toolset = require("./tools/base_toolset.js");
|
|
242
|
+
var import_consolidate_context_tool = require("./tools/consolidate_context_tool.js");
|
|
208
243
|
var import_exit_loop_tool = require("./tools/exit_loop_tool.js");
|
|
209
244
|
var import_function_tool = require("./tools/function_tool.js");
|
|
210
245
|
var import_google_maps_grounding_tool = require("./tools/google_maps_grounding_tool.js");
|
|
@@ -217,20 +252,36 @@ var import_tool_confirmation = require("./tools/tool_confirmation.js");
|
|
|
217
252
|
var import_url_context_tool = require("./tools/url_context_tool.js");
|
|
218
253
|
var import_vertex_ai_search_tool = require("./tools/vertex_ai_search_tool.js");
|
|
219
254
|
var import_vertex_rag_retrieval_tool = require("./tools/vertex_rag_retrieval_tool.js");
|
|
255
|
+
var import_client_labels = require("./utils/client_labels.js");
|
|
220
256
|
var import_logger = require("./utils/logger.js");
|
|
221
257
|
var import_model_name = require("./utils/model_name.js");
|
|
222
258
|
var import_simple_zod_to_json = require("./utils/simple_zod_to_json.js");
|
|
259
|
+
var import_task = require("./utils/task.js");
|
|
223
260
|
var import_variant_utils = require("./utils/variant_utils.js");
|
|
224
261
|
var import_version = require("./version.js");
|
|
262
|
+
var import_gcp_skill_registry = require("./skills/gcp_skill_registry.js");
|
|
263
|
+
var import_loader = require("./skills/loader.js");
|
|
225
264
|
var import_list_skills_tool = require("./tools/skill/list_skills_tool.js");
|
|
226
265
|
var import_load_skill_resource_tool = require("./tools/skill/load_skill_resource_tool.js");
|
|
227
266
|
var import_load_skill_tool = require("./tools/skill/load_skill_tool.js");
|
|
267
|
+
var import_search_skills_tool = require("./tools/skill/search_skills_tool.js");
|
|
228
268
|
var import_skill_toolset = require("./tools/skill/skill_toolset.js");
|
|
229
269
|
__reExport(common_exports, require("./artifacts/base_artifact_service.js"), module.exports);
|
|
230
270
|
__reExport(common_exports, require("./features/feature_registry.js"), module.exports);
|
|
231
271
|
__reExport(common_exports, require("./memory/base_memory_service.js"), module.exports);
|
|
232
272
|
__reExport(common_exports, require("./sessions/base_session_service.js"), module.exports);
|
|
233
273
|
__reExport(common_exports, require("./tools/base_tool.js"), module.exports);
|
|
274
|
+
var import_openapi_spec_parser = require("./tools/openapi_tool/openapi_spec_parser/openapi_spec_parser.js");
|
|
275
|
+
var import_operation_parser = require("./tools/openapi_tool/openapi_spec_parser/operation_parser.js");
|
|
276
|
+
var import_tool_auth_handler = require("./tools/openapi_tool/openapi_spec_parser/tool_auth_handler.js");
|
|
277
|
+
var import_openapi_toolset = require("./tools/openapi_tool/openapi_toolset.js");
|
|
278
|
+
var import_rest_api_tool = require("./tools/openapi_tool/rest_api_tool.js");
|
|
279
|
+
__reExport(common_exports, require("./apps/app.js"), module.exports);
|
|
280
|
+
__reExport(common_exports, require("./artifacts/base_artifact_service.js"), module.exports);
|
|
281
|
+
__reExport(common_exports, require("./features/feature_registry.js"), module.exports);
|
|
282
|
+
__reExport(common_exports, require("./memory/base_memory_service.js"), module.exports);
|
|
283
|
+
__reExport(common_exports, require("./sessions/base_session_service.js"), module.exports);
|
|
284
|
+
__reExport(common_exports, require("./tools/base_tool.js"), module.exports);
|
|
234
285
|
/**
|
|
235
286
|
* @license
|
|
236
287
|
* Copyright 2025 Google LLC
|
|
@@ -238,13 +289,16 @@ __reExport(common_exports, require("./tools/base_tool.js"), module.exports);
|
|
|
238
289
|
*/
|
|
239
290
|
// Annotate the CommonJS export names for ESM import in node:
|
|
240
291
|
0 && (module.exports = {
|
|
292
|
+
AUTH_PREPROCESSOR,
|
|
241
293
|
ActiveStreamingTool,
|
|
242
294
|
Agent,
|
|
295
|
+
AgentControlledContextCompactor,
|
|
243
296
|
AgentTool,
|
|
244
297
|
AgentTransferLlmRequestProcessor,
|
|
245
298
|
ApigeeLlm,
|
|
246
299
|
AuthCredentialTypes,
|
|
247
300
|
AuthHandler,
|
|
301
|
+
AuthPreprocessor,
|
|
248
302
|
AuthProviderRegistry,
|
|
249
303
|
BaseAgent,
|
|
250
304
|
BaseCodeExecutor,
|
|
@@ -259,6 +313,7 @@ __reExport(common_exports, require("./tools/base_tool.js"), module.exports);
|
|
|
259
313
|
BuiltInCodeExecutor,
|
|
260
314
|
CONTENT_REQUEST_PROCESSOR,
|
|
261
315
|
CodeExecutionLanguage,
|
|
316
|
+
ConsolidateContextTool,
|
|
262
317
|
ContentRequestProcessor,
|
|
263
318
|
Context,
|
|
264
319
|
ContextCompactionTrigger,
|
|
@@ -270,18 +325,21 @@ __reExport(common_exports, require("./tools/base_tool.js"), module.exports);
|
|
|
270
325
|
ExitLoopTool,
|
|
271
326
|
FileContentEncoding,
|
|
272
327
|
FunctionTool,
|
|
328
|
+
GCPSkillRegistry,
|
|
273
329
|
GOOGLE_MAPS_GROUNDING,
|
|
274
330
|
GOOGLE_SEARCH,
|
|
275
331
|
Gemini,
|
|
276
332
|
GoogleLLMVariant,
|
|
277
333
|
GoogleMapsGroundingTool,
|
|
278
334
|
GoogleSearchTool,
|
|
335
|
+
INTERACTIONS_REQUEST_PROCESSOR,
|
|
279
336
|
InMemoryArtifactService,
|
|
280
337
|
InMemoryCredentialService,
|
|
281
338
|
InMemoryMemoryService,
|
|
282
339
|
InMemoryPolicyEngine,
|
|
283
340
|
InMemoryRunner,
|
|
284
341
|
InMemorySessionService,
|
|
342
|
+
InteractionsRequestProcessor,
|
|
285
343
|
InvocationContext,
|
|
286
344
|
LLMRegistry,
|
|
287
345
|
LOAD_ARTIFACTS,
|
|
@@ -301,6 +359,9 @@ __reExport(common_exports, require("./tools/base_tool.js"), module.exports);
|
|
|
301
359
|
OAuth2CredentialExchanger,
|
|
302
360
|
OAuth2DiscoveryManager,
|
|
303
361
|
OAuthGrantType,
|
|
362
|
+
OpenAPIToolset,
|
|
363
|
+
OpenApiSpecParser,
|
|
364
|
+
OperationParser,
|
|
304
365
|
PRELOAD_MEMORY,
|
|
305
366
|
ParallelAgent,
|
|
306
367
|
PluginManager,
|
|
@@ -308,17 +369,22 @@ __reExport(common_exports, require("./tools/base_tool.js"), module.exports);
|
|
|
308
369
|
PreloadMemoryTool,
|
|
309
370
|
REQUEST_CONFIRMATION_FUNCTION_CALL_NAME,
|
|
310
371
|
ReadonlyContext,
|
|
372
|
+
RestApiTool,
|
|
311
373
|
RoutedAgent,
|
|
312
374
|
RoutedLlm,
|
|
313
375
|
Runner,
|
|
376
|
+
SearchSkillsTool,
|
|
314
377
|
SecurityPlugin,
|
|
315
378
|
SequentialAgent,
|
|
316
379
|
SessionStateCredentialService,
|
|
317
380
|
SkillToolset,
|
|
318
381
|
State,
|
|
319
382
|
StreamingMode,
|
|
383
|
+
Task,
|
|
320
384
|
TokenBasedContextCompactor,
|
|
385
|
+
ToolAuthHandler,
|
|
321
386
|
ToolConfirmation,
|
|
387
|
+
TrajectoryThoughtPruningCompactor,
|
|
322
388
|
TruncatingContextCompactor,
|
|
323
389
|
URL_CONTEXT,
|
|
324
390
|
UrlContextTool,
|
|
@@ -327,10 +393,17 @@ __reExport(common_exports, require("./tools/base_tool.js"), module.exports);
|
|
|
327
393
|
VertexRagRetrievalTool,
|
|
328
394
|
createEvent,
|
|
329
395
|
createEventActions,
|
|
396
|
+
createRestApiTool,
|
|
397
|
+
createResumabilityConfig,
|
|
330
398
|
createSession,
|
|
399
|
+
determineAgentForResumption,
|
|
400
|
+
findEventByFunctionCallId,
|
|
401
|
+
findEventByLastFunctionResponseId,
|
|
402
|
+
findMatchingFunctionCall,
|
|
331
403
|
functionsExportedForTestingOnly,
|
|
332
404
|
geminiInitParams,
|
|
333
405
|
getAskUserConfirmationFunctionCalls,
|
|
406
|
+
getClientLabels,
|
|
334
407
|
getFunctionCalls,
|
|
335
408
|
getFunctionResponses,
|
|
336
409
|
getLogger,
|
|
@@ -345,21 +418,34 @@ __reExport(common_exports, require("./tools/base_tool.js"), module.exports);
|
|
|
345
418
|
isFinalResponse,
|
|
346
419
|
isFunctionTool,
|
|
347
420
|
isGemini2OrAbove,
|
|
421
|
+
isGemini3xFlashLive,
|
|
348
422
|
isLlmAgent,
|
|
349
423
|
isLoopAgent,
|
|
350
424
|
isParallelAgent,
|
|
425
|
+
isRoutableLlmAgent,
|
|
351
426
|
isRoutedAgent,
|
|
352
427
|
isRunner,
|
|
353
428
|
isSequentialAgent,
|
|
429
|
+
loadAllSkillsInDir,
|
|
430
|
+
loadSkillFromDir,
|
|
431
|
+
loadSkillFromZipBuffer,
|
|
432
|
+
runWithClientLabel,
|
|
354
433
|
setLogLevel,
|
|
355
434
|
setLogger,
|
|
356
435
|
stringifyContent,
|
|
357
436
|
toStructuredEvents,
|
|
437
|
+
validateSkillDir,
|
|
358
438
|
version,
|
|
359
439
|
zodObjectToSchema,
|
|
360
440
|
...require("./artifacts/base_artifact_service.js"),
|
|
361
441
|
...require("./features/feature_registry.js"),
|
|
362
442
|
...require("./memory/base_memory_service.js"),
|
|
363
443
|
...require("./sessions/base_session_service.js"),
|
|
444
|
+
...require("./tools/base_tool.js"),
|
|
445
|
+
...require("./apps/app.js"),
|
|
446
|
+
...require("./artifacts/base_artifact_service.js"),
|
|
447
|
+
...require("./features/feature_registry.js"),
|
|
448
|
+
...require("./memory/base_memory_service.js"),
|
|
449
|
+
...require("./sessions/base_session_service.js"),
|
|
364
450
|
...require("./tools/base_tool.js")
|
|
365
451
|
});
|