@google/adk 2.0.0 → 2.1.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/a2a_event.js +0 -29
- package/dist/cjs/a2a/a2a_remote_agent.js +8 -5
- package/dist/cjs/a2a/a2a_remote_agent_utils.js +104 -2
- package/dist/cjs/a2a/agent_card.js +58 -6
- package/dist/cjs/a2a/agent_executor.js +10 -3
- package/dist/cjs/a2a/agent_to_a2a.js +6 -1
- package/dist/cjs/a2a/event_processor_utils.js +1 -1
- package/dist/cjs/a2a/executor_context.js +4 -2
- package/dist/cjs/a2a/index.js +4 -0
- package/dist/cjs/a2a/request_metadata.js +94 -0
- package/dist/cjs/agents/base_agent.js +9 -8
- package/dist/cjs/agents/context.js +7 -0
- package/dist/cjs/agents/functions.js +150 -47
- package/dist/cjs/agents/invocation_context.js +1 -0
- package/dist/cjs/agents/llm_agent.js +6 -5
- package/dist/cjs/agents/loop_agent.js +1 -1
- package/dist/cjs/agents/parallel_agent.js +1 -1
- package/dist/cjs/agents/processors/agent_transfer_llm_request_processor.js +26 -5
- package/dist/cjs/agents/processors/code_execution_request_processor.js +2 -2
- package/dist/cjs/agents/processors/content_processor_utils.js +5 -5
- package/dist/cjs/agents/processors/content_request_processor.js +4 -1
- package/dist/cjs/agents/processors/request_confirmation_llm_request_processor.js +19 -12
- package/dist/cjs/agents/processors/request_input_llm_request_processor.js +3 -7
- package/dist/cjs/agents/readonly_context.js +6 -0
- package/dist/cjs/agents/routed_agent.js +1 -1
- package/dist/cjs/agents/sequential_agent.js +1 -1
- package/dist/cjs/apps/app.js +1 -1
- package/dist/cjs/artifacts/file_artifact_service.js +1 -2
- package/dist/cjs/artifacts/scoped_artifact_service.js +9 -0
- package/dist/cjs/artifacts/session_artifact_service.js +19 -0
- package/dist/cjs/auth/auth_handler.js +44 -8
- package/dist/cjs/auth/oauth2/oauth2_credential_refresher.js +1 -1
- package/dist/cjs/auth/oauth2/oauth2_utils.js +17 -2
- 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 +2 -2
- package/dist/cjs/code_executors/container_code_executor.js +186 -0
- package/dist/cjs/code_executors/docker_container.js +282 -0
- package/dist/cjs/code_executors/unsafe_local_code_executor.js +11 -6
- package/dist/cjs/common.js +74 -45
- package/dist/cjs/context/agent_controlled_context_compactor.js +10 -5
- package/dist/cjs/context/anchored_context_compactor.js +41 -18
- package/dist/cjs/context/compaction_utils.js +15 -6
- package/dist/cjs/context/token_based_context_compactor.js +10 -2
- package/dist/cjs/context/trajectory_thought_pruning_compactor.js +17 -10
- package/dist/cjs/context/truncating_context_compactor.js +17 -5
- package/dist/cjs/errors/already_exists_error.js +50 -0
- package/dist/cjs/errors/input_validation_error.js +50 -0
- package/dist/cjs/errors/not_found_error.js +50 -0
- package/dist/cjs/errors/session_not_found_error.js +50 -0
- package/dist/cjs/errors/tool_execution_error.js +68 -0
- package/dist/cjs/events/event.js +1 -1
- package/dist/cjs/events/event_actions.js +7 -0
- package/dist/cjs/examples/base_example_provider.js +1 -1
- package/dist/cjs/index.js +47 -0
- package/dist/cjs/index_web.js +2 -0
- package/dist/cjs/integrations/agent_registry/agent_registry.js +3 -2
- package/dist/cjs/memory/rag_memory_transcript.js +136 -0
- package/dist/cjs/memory/vertex_ai_memory_bank_service.js +2 -2
- package/dist/cjs/memory/vertex_ai_rag_api.js +120 -0
- package/dist/cjs/memory/vertex_ai_rag_memory_service.js +228 -0
- package/dist/cjs/models/apigee_llm.js +1 -1
- package/dist/cjs/models/base_llm.js +1 -1
- package/dist/cjs/models/chrome_prompt_llm.js +304 -0
- package/dist/cjs/models/chrome_prompt_utils.js +229 -0
- package/dist/cjs/models/google_llm.js +9 -4
- package/dist/cjs/models/interactions_utils.js +2 -3
- package/dist/cjs/models/registry.js +2 -0
- package/dist/cjs/plugins/_reflect_retry_utils.js +142 -0
- package/dist/cjs/plugins/reflect_retry_model_plugin.js +274 -0
- package/dist/cjs/plugins/reflect_retry_tool_plugin.js +276 -0
- package/dist/cjs/runner/runner.js +29 -26
- package/dist/cjs/sessions/database_session_service.js +78 -43
- package/dist/cjs/sessions/db/operations.js +229 -22
- package/dist/cjs/sessions/db/schema.js +113 -159
- package/dist/cjs/sessions/registry.js +5 -1
- package/dist/cjs/sessions/vertex_ai_session_service.js +2 -2
- package/dist/cjs/telemetry/setup.js +1 -1
- package/dist/cjs/telemetry/tracing.js +11 -1
- package/dist/cjs/tools/agent_tool.js +4 -5
- package/dist/cjs/tools/base_tool.js +14 -4
- package/dist/cjs/tools/base_toolset.js +4 -4
- package/dist/cjs/tools/built_in_tool.js +75 -0
- package/dist/cjs/tools/enterprise_web_search_tool.js +3 -6
- package/dist/cjs/tools/forwarding_artifact_service.js +18 -13
- package/dist/cjs/tools/function_tool.js +6 -3
- package/dist/cjs/tools/google_maps_grounding_tool.js +3 -6
- package/dist/cjs/tools/google_search_tool.js +3 -6
- package/dist/cjs/tools/load_artifacts_tool.js +47 -23
- package/dist/cjs/tools/load_web_page.js +6 -172
- package/dist/cjs/tools/mcp/load_mcp_resource_tool.js +34 -5
- package/dist/cjs/tools/openapi_tool/auth/auth_helpers.js +11 -2
- package/dist/cjs/tools/openapi_tool/openapi_spec_parser/operation_parser.js +1 -1
- package/dist/cjs/tools/openapi_tool/rest_api_tool.js +16 -18
- package/dist/cjs/tools/preload_memory_tool.js +1 -1
- package/dist/cjs/tools/resume_inputs.js +27 -0
- package/dist/cjs/tools/retrieval/base_retrieval_tool.js +60 -0
- package/dist/cjs/tools/retrieval/files_retrieval.js +95 -0
- package/dist/cjs/tools/retrieval/llama_index_retrieval.js +57 -0
- package/dist/cjs/tools/url_context_tool.js +3 -6
- package/dist/cjs/tools/vertex_ai_search_tool.js +4 -8
- package/dist/cjs/tools/vertex_rag_retrieval_tool.js +3 -10
- package/dist/cjs/utils/crypto_shim.js +16 -0
- package/dist/cjs/utils/gemini_schema_util.js +0 -6
- package/dist/cjs/utils/logger.js +15 -50
- package/dist/cjs/utils/logger_browser.js +86 -0
- package/dist/cjs/utils/logger_node.js +119 -0
- package/dist/cjs/utils/redact_inline_data.js +46 -0
- package/dist/cjs/utils/redact_uri.js +15 -1
- package/dist/cjs/utils/schema.js +1 -1
- package/dist/cjs/utils/ssrf_guard.js +262 -0
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/workflow/base_node.js +1 -1
- package/dist/cjs/workflow/graph.js +1 -1
- package/dist/cjs/workflow/nodes/node_tool.js +2 -11
- package/dist/cjs/workflow/request_input.js +1 -1
- package/dist/cjs/workflow/run_llm_agent_as_node.js +1 -1
- package/dist/cjs/workflow/workflow.js +1 -1
- package/dist/esm/a2a/a2a_event.js +0 -28
- package/dist/esm/a2a/a2a_remote_agent.js +10 -5
- package/dist/esm/a2a/a2a_remote_agent_utils.js +102 -2
- package/dist/esm/a2a/agent_card.js +63 -6
- package/dist/esm/a2a/agent_executor.js +10 -3
- package/dist/esm/a2a/agent_to_a2a.js +8 -2
- package/dist/esm/a2a/event_processor_utils.js +1 -2
- package/dist/esm/a2a/executor_context.js +4 -2
- package/dist/esm/a2a/index.js +7 -1
- package/dist/esm/a2a/request_metadata.js +68 -0
- package/dist/esm/agents/base_agent.js +9 -8
- package/dist/esm/agents/context.js +7 -0
- package/dist/esm/agents/functions.js +152 -48
- package/dist/esm/agents/invocation_context.js +1 -0
- package/dist/esm/agents/llm_agent.js +6 -5
- package/dist/esm/agents/loop_agent.js +1 -1
- package/dist/esm/agents/parallel_agent.js +1 -1
- package/dist/esm/agents/processors/agent_transfer_llm_request_processor.js +26 -5
- package/dist/esm/agents/processors/code_execution_request_processor.js +2 -2
- package/dist/esm/agents/processors/content_processor_utils.js +5 -5
- package/dist/esm/agents/processors/content_request_processor.js +4 -1
- package/dist/esm/agents/processors/request_confirmation_llm_request_processor.js +19 -12
- package/dist/esm/agents/processors/request_input_llm_request_processor.js +3 -7
- package/dist/esm/agents/readonly_context.js +6 -0
- package/dist/esm/agents/routed_agent.js +1 -1
- package/dist/esm/agents/sequential_agent.js +1 -1
- package/dist/esm/apps/app.js +1 -1
- package/dist/esm/artifacts/file_artifact_service.js +1 -2
- package/dist/esm/artifacts/scoped_artifact_service.js +9 -0
- package/dist/esm/artifacts/session_artifact_service.js +12 -0
- package/dist/esm/auth/auth_handler.js +47 -8
- package/dist/esm/auth/oauth2/oauth2_credential_refresher.js +1 -1
- package/dist/esm/auth/oauth2/oauth2_utils.js +15 -2
- package/dist/esm/code_executors/base_code_executor.js +1 -1
- package/dist/esm/code_executors/built_in_code_executor.js +1 -1
- package/dist/esm/code_executors/code_execution_utils.js +2 -2
- package/dist/esm/code_executors/container_code_executor.js +155 -0
- package/dist/esm/code_executors/docker_container.js +265 -0
- package/dist/esm/code_executors/unsafe_local_code_executor.js +11 -6
- package/dist/esm/common.js +73 -38
- package/dist/esm/context/agent_controlled_context_compactor.js +10 -5
- package/dist/esm/context/anchored_context_compactor.js +45 -19
- package/dist/esm/context/compaction_utils.js +13 -5
- package/dist/esm/context/token_based_context_compactor.js +10 -2
- package/dist/esm/context/trajectory_thought_pruning_compactor.js +17 -10
- package/dist/esm/context/truncating_context_compactor.js +17 -5
- package/dist/esm/errors/already_exists_error.js +23 -0
- package/dist/esm/errors/input_validation_error.js +23 -0
- package/dist/{web/auth/refresher/base_credential_refresher.js → esm/errors/not_found_error.js} +9 -6
- package/dist/esm/errors/session_not_found_error.js +23 -0
- package/dist/esm/errors/tool_execution_error.js +40 -0
- package/dist/esm/events/event.js +1 -1
- package/dist/esm/events/event_actions.js +6 -0
- package/dist/esm/examples/base_example_provider.js +1 -1
- package/dist/esm/index.js +37 -0
- package/dist/esm/index_web.js +2 -0
- package/dist/esm/integrations/agent_registry/agent_registry.js +3 -2
- package/dist/esm/memory/rag_memory_transcript.js +106 -0
- package/dist/esm/memory/vertex_ai_memory_bank_service.js +2 -2
- package/dist/esm/memory/vertex_ai_rag_api.js +93 -0
- package/dist/esm/memory/vertex_ai_rag_memory_service.js +208 -0
- package/dist/esm/models/apigee_llm.js +1 -1
- package/dist/esm/models/base_llm.js +1 -1
- package/dist/esm/models/chrome_prompt_llm.js +285 -0
- package/dist/esm/models/chrome_prompt_utils.js +192 -0
- package/dist/esm/models/google_llm.js +9 -4
- package/dist/esm/models/interactions_utils.js +2 -3
- package/dist/esm/models/registry.js +2 -0
- package/dist/esm/plugins/_reflect_retry_utils.js +111 -0
- package/dist/esm/plugins/reflect_retry_model_plugin.js +250 -0
- package/dist/esm/plugins/reflect_retry_tool_plugin.js +254 -0
- package/dist/esm/runner/runner.js +35 -27
- package/dist/esm/sessions/database_session_service.js +58 -25
- package/dist/esm/sessions/db/operations.js +229 -22
- package/dist/esm/sessions/db/schema.js +111 -160
- package/dist/esm/sessions/registry.js +5 -1
- package/dist/esm/sessions/vertex_ai_session_service.js +1 -1
- package/dist/esm/telemetry/setup.js +1 -1
- package/dist/esm/telemetry/tracing.js +11 -1
- package/dist/esm/tools/agent_tool.js +4 -5
- package/dist/esm/tools/base_tool.js +11 -3
- package/dist/esm/tools/base_toolset.js +4 -4
- package/dist/esm/tools/built_in_tool.js +51 -0
- package/dist/esm/tools/enterprise_web_search_tool.js +3 -6
- package/dist/esm/tools/forwarding_artifact_service.js +18 -13
- package/dist/esm/tools/function_tool.js +6 -3
- package/dist/esm/tools/google_maps_grounding_tool.js +3 -6
- package/dist/esm/tools/google_search_tool.js +3 -6
- package/dist/esm/tools/load_artifacts_tool.js +48 -24
- package/dist/esm/tools/load_web_page.js +10 -170
- package/dist/esm/tools/mcp/load_mcp_resource_tool.js +34 -5
- package/dist/esm/tools/openapi_tool/auth/auth_helpers.js +13 -2
- package/dist/esm/tools/openapi_tool/openapi_spec_parser/operation_parser.js +1 -1
- package/dist/esm/tools/openapi_tool/rest_api_tool.js +16 -18
- package/dist/esm/tools/preload_memory_tool.js +1 -1
- package/dist/esm/tools/retrieval/base_retrieval_tool.js +33 -0
- package/dist/esm/tools/retrieval/files_retrieval.js +81 -0
- package/dist/esm/tools/retrieval/llama_index_retrieval.js +30 -0
- package/dist/esm/tools/url_context_tool.js +3 -6
- package/dist/esm/tools/vertex_ai_search_tool.js +4 -8
- package/dist/esm/tools/vertex_rag_retrieval_tool.js +3 -10
- package/dist/esm/utils/crypto_shim.js +14 -0
- package/dist/esm/utils/gemini_schema_util.js +0 -6
- package/dist/esm/utils/logger.js +14 -40
- package/dist/esm/utils/logger_browser.js +58 -0
- package/dist/esm/utils/logger_node.js +81 -0
- package/dist/esm/utils/redact_inline_data.js +19 -0
- package/dist/esm/utils/redact_uri.js +15 -1
- package/dist/esm/utils/schema.js +1 -1
- package/dist/{web/tools/load_web_page.js → esm/utils/ssrf_guard.js} +95 -107
- package/dist/esm/version.js +1 -1
- package/dist/esm/workflow/base_node.js +1 -1
- package/dist/esm/workflow/graph.js +1 -1
- package/dist/esm/workflow/nodes/node_tool.js +2 -11
- package/dist/esm/workflow/request_input.js +1 -1
- package/dist/esm/workflow/run_llm_agent_as_node.js +1 -1
- package/dist/esm/workflow/workflow.js +1 -1
- package/dist/types/a2a/a2a_event.d.ts +7 -10
- package/dist/types/a2a/a2a_remote_agent.d.ts +5 -0
- package/dist/types/a2a/a2a_remote_agent_utils.d.ts +25 -0
- package/dist/types/a2a/agent_card.d.ts +9 -0
- package/dist/types/a2a/agent_executor.d.ts +1 -1
- package/dist/types/a2a/agent_to_a2a.d.ts +2 -0
- package/dist/types/a2a/auth.d.ts +5 -1
- package/dist/types/a2a/executor_context.d.ts +7 -1
- package/dist/types/a2a/index.d.ts +1 -1
- package/dist/types/a2a/request_metadata.d.ts +22 -0
- package/dist/types/agents/base_agent.d.ts +19 -16
- package/dist/types/agents/context.d.ts +8 -0
- package/dist/types/agents/functions.d.ts +72 -6
- package/dist/types/agents/invocation_context.d.ts +11 -3
- package/dist/types/agents/llm_agent.d.ts +9 -7
- package/dist/types/agents/processors/agent_transfer_llm_request_processor.d.ts +16 -1
- package/dist/types/agents/readonly_context.d.ts +4 -0
- package/dist/types/agents/run_config.d.ts +21 -8
- package/dist/types/artifacts/scoped_artifact_service.d.ts +13 -0
- package/dist/types/artifacts/session_artifact_service.d.ts +8 -1
- package/dist/types/auth/auth_credential.d.ts +13 -8
- package/dist/types/auth/auth_handler.d.ts +12 -1
- package/dist/types/auth/oauth2/oauth2_credential_refresher.d.ts +1 -1
- package/dist/types/auth/oauth2/oauth2_utils.d.ts +9 -0
- package/dist/types/auth/refresher/base_credential_refresher.d.ts +1 -1
- package/dist/types/code_executors/code_execution_utils.d.ts +1 -1
- package/dist/types/code_executors/container_code_executor.d.ts +89 -0
- package/dist/types/code_executors/docker_container.d.ts +79 -0
- package/dist/types/common.d.ts +22 -20
- package/dist/types/context/compaction_utils.d.ts +9 -1
- package/dist/types/errors/already_exists_error.d.ts +14 -0
- package/dist/types/errors/input_validation_error.d.ts +14 -0
- package/dist/types/errors/not_found_error.d.ts +14 -0
- package/dist/types/errors/session_not_found_error.d.ts +14 -0
- package/dist/types/errors/tool_execution_error.d.ts +36 -0
- package/dist/types/events/event_actions.d.ts +13 -0
- package/dist/types/index.d.ts +22 -1
- package/dist/types/memory/rag_memory_transcript.d.ts +55 -0
- package/dist/types/memory/vertex_ai_rag_api.d.ts +89 -0
- package/dist/types/memory/vertex_ai_rag_memory_service.d.ts +68 -0
- package/dist/types/models/chrome_prompt_llm.d.ts +210 -0
- package/dist/types/models/chrome_prompt_utils.d.ts +68 -0
- package/dist/types/models/google_llm.d.ts +8 -3
- package/dist/types/models/registry.d.ts +3 -2
- package/dist/types/plugins/_reflect_retry_utils.d.ts +72 -0
- package/dist/types/plugins/base_plugin.d.ts +12 -10
- package/dist/types/plugins/logging_plugin.d.ts +3 -2
- package/dist/types/plugins/reflect_retry_model_plugin.d.ts +132 -0
- package/dist/types/plugins/reflect_retry_tool_plugin.d.ts +187 -0
- package/dist/types/runner/runner.d.ts +7 -8
- package/dist/types/sessions/database_session_service.d.ts +1 -1
- package/dist/types/sessions/db/operations.d.ts +13 -1
- package/dist/types/sessions/db/schema.d.ts +23 -9
- package/dist/types/tools/base_tool.d.ts +11 -0
- package/dist/types/tools/base_toolset.d.ts +3 -4
- package/dist/types/tools/built_in_tool.d.ts +41 -0
- package/dist/types/tools/enterprise_web_search_tool.d.ts +4 -4
- package/dist/types/tools/forwarding_artifact_service.d.ts +23 -10
- package/dist/types/tools/function_tool.d.ts +42 -9
- package/dist/types/tools/google_maps_grounding_tool.d.ts +4 -4
- package/dist/types/tools/google_search_tool.d.ts +4 -4
- package/dist/types/tools/long_running_tool.d.ts +1 -1
- package/dist/types/tools/mcp/mcp_toolset.d.ts +11 -10
- package/dist/types/tools/openapi_tool/auth/auth_helpers.d.ts +5 -0
- package/dist/types/tools/openapi_tool/auth/credential_exchangers/auto_auth_credential_exchanger.d.ts +0 -1
- package/dist/types/tools/openapi_tool/auth/credential_exchangers/service_account_exchanger.d.ts +0 -1
- package/dist/types/tools/preload_memory_tool.d.ts +1 -1
- package/dist/types/tools/resume_inputs.d.ts +25 -0
- package/dist/types/tools/retrieval/base_retrieval_tool.d.ts +21 -0
- package/dist/types/tools/retrieval/files_retrieval.d.ts +50 -0
- package/dist/types/tools/retrieval/llama_index_retrieval.d.ts +62 -0
- package/dist/types/tools/url_context_tool.d.ts +4 -4
- package/dist/types/tools/vertex_ai_search_tool.d.ts +4 -4
- package/dist/types/tools/vertex_rag_retrieval_tool.d.ts +13 -12
- package/dist/types/utils/crypto_shim.d.ts +16 -0
- package/dist/types/utils/gemini_schema_util.d.ts +5 -7
- package/dist/types/utils/logger.d.ts +23 -1
- package/dist/types/utils/logger_browser.d.ts +28 -0
- package/dist/types/utils/logger_node.d.ts +20 -0
- package/dist/types/utils/output_schema_utils.d.ts +3 -3
- package/dist/types/utils/redact_inline_data.d.ts +16 -0
- package/dist/types/utils/redact_uri.d.ts +12 -8
- package/dist/types/utils/ssrf_guard.d.ts +32 -0
- package/dist/types/version.d.ts +1 -1
- package/dist/web/index_web.js +304 -3
- package/dist/web/index_web.js.map +7 -0
- package/package.json +17 -14
- package/dist/web/a2a/a2a_event.js +0 -290
- package/dist/web/a2a/a2a_remote_agent.js +0 -200
- package/dist/web/a2a/a2a_remote_agent_run_processor.js +0 -189
- package/dist/web/a2a/a2a_remote_agent_utils.js +0 -141
- package/dist/web/a2a/agent_card.js +0 -373
- package/dist/web/a2a/agent_executor.js +0 -246
- package/dist/web/a2a/agent_to_a2a.js +0 -126
- package/dist/web/a2a/auth.js +0 -41
- package/dist/web/a2a/event_converter_utils.js +0 -242
- package/dist/web/a2a/event_processor_utils.js +0 -209
- package/dist/web/a2a/executor_context.js +0 -28
- package/dist/web/a2a/index.js +0 -20
- package/dist/web/a2a/metadata_converter_utils.js +0 -115
- package/dist/web/a2a/part_converter_utils.js +0 -201
- package/dist/web/agents/active_streaming_tool.js +0 -25
- package/dist/web/agents/base_agent.js +0 -462
- package/dist/web/agents/context.js +0 -146
- package/dist/web/agents/framework_function_calls.js +0 -34
- package/dist/web/agents/functions.js +0 -462
- package/dist/web/agents/instructions.js +0 -188
- package/dist/web/agents/invocation_context.js +0 -126
- package/dist/web/agents/live_request_queue.js +0 -151
- package/dist/web/agents/llm_agent.js +0 -1514
- package/dist/web/agents/loop_agent.js +0 -131
- package/dist/web/agents/parallel_agent.js +0 -122
- package/dist/web/agents/processors/agent_transfer_llm_request_processor.js +0 -113
- package/dist/web/agents/processors/base_llm_processor.js +0 -21
- package/dist/web/agents/processors/basic_llm_request_processor.js +0 -84
- package/dist/web/agents/processors/code_execution_request_processor.js +0 -381
- package/dist/web/agents/processors/content_processor_utils.js +0 -432
- package/dist/web/agents/processors/content_request_processor.js +0 -73
- package/dist/web/agents/processors/context_compactor_request_processor.js +0 -78
- package/dist/web/agents/processors/identity_llm_request_processor.js +0 -59
- package/dist/web/agents/processors/instructions_llm_request_processor.js +0 -85
- package/dist/web/agents/processors/interactions_request_processor.js +0 -56
- package/dist/web/agents/processors/request_confirmation_llm_request_processor.js +0 -393
- package/dist/web/agents/processors/request_input_llm_request_processor.js +0 -228
- package/dist/web/agents/processors/tool_filter_request_processor.js +0 -72
- package/dist/web/agents/readonly_context.js +0 -60
- package/dist/web/agents/routed_agent.js +0 -161
- package/dist/web/agents/run_config.js +0 -74
- package/dist/web/agents/sequential_agent.js +0 -141
- package/dist/web/agents/transcription_entry.js +0 -7
- package/dist/web/agents/user_input_request.js +0 -135
- package/dist/web/apps/app.js +0 -52
- package/dist/web/apps/resumability_config.js +0 -33
- package/dist/web/artifacts/base_artifact_service.js +0 -7
- package/dist/web/artifacts/file_artifact_service.js +0 -568
- package/dist/web/artifacts/gcs_artifact_service.js +0 -298
- package/dist/web/artifacts/in_memory_artifact_service.js +0 -172
- package/dist/web/artifacts/registry.js +0 -36
- package/dist/web/artifacts/scoped_artifact_service.js +0 -89
- package/dist/web/auth/auth_credential.js +0 -18
- package/dist/web/auth/auth_handler.js +0 -151
- package/dist/web/auth/auth_preprocessor.js +0 -184
- package/dist/web/auth/auth_provider_registry.js +0 -37
- package/dist/web/auth/auth_schemes.js +0 -36
- package/dist/web/auth/auth_tool.js +0 -7
- package/dist/web/auth/base_auth_provider.js +0 -7
- package/dist/web/auth/credential_response_binding.js +0 -91
- package/dist/web/auth/credential_service/base_credential_service.js +0 -7
- package/dist/web/auth/credential_service/in_memory_credential_service.js +0 -50
- package/dist/web/auth/credential_service/session_state_credential_service.js +0 -27
- package/dist/web/auth/exchanger/base_credential_exchanger.js +0 -16
- package/dist/web/auth/exchanger/credential_exchanger_registry.js +0 -35
- package/dist/web/auth/oauth2/oauth2_credential_exchanger.js +0 -194
- package/dist/web/auth/oauth2/oauth2_credential_refresher.js +0 -105
- package/dist/web/auth/oauth2/oauth2_discovery.js +0 -196
- package/dist/web/auth/oauth2/oauth2_utils.js +0 -105
- package/dist/web/auth/refresher/credential_refresher_registry.js +0 -44
- package/dist/web/code_executors/agent_engine_sandbox_code_executor.js +0 -284
- package/dist/web/code_executors/base_code_executor.js +0 -68
- package/dist/web/code_executors/built_in_code_executor.js +0 -50
- package/dist/web/code_executors/code_execution_utils.js +0 -131
- package/dist/web/code_executors/code_executor_context.js +0 -174
- package/dist/web/code_executors/unsafe_local_code_executor.js +0 -221
- package/dist/web/common.js +0 -452
- package/dist/web/context/agent_controlled_context_compactor.js +0 -76
- package/dist/web/context/anchored_context_compactor.js +0 -120
- package/dist/web/context/base_context_compactor.js +0 -7
- package/dist/web/context/compaction_utils.js +0 -42
- package/dist/web/context/summarizers/base_summarizer.js +0 -7
- package/dist/web/context/summarizers/llm_summarizer.js +0 -91
- package/dist/web/context/token_based_context_compactor.js +0 -118
- package/dist/web/context/trajectory_thought_pruning_compactor.js +0 -47
- package/dist/web/context/truncating_context_compactor.js +0 -34
- package/dist/web/environment/base_environment.js +0 -71
- package/dist/web/environment/local_environment.js +0 -165
- package/dist/web/events/compacted_event.js +0 -51
- package/dist/web/events/event.js +0 -208
- package/dist/web/events/event_actions.js +0 -74
- package/dist/web/events/structured_events.js +0 -79
- package/dist/web/examples/base_example_provider.js +0 -32
- package/dist/web/examples/example.js +0 -7
- package/dist/web/examples/example_util.js +0 -83
- package/dist/web/features/feature_registry.js +0 -115
- package/dist/web/index.js +0 -57
- package/dist/web/integrations/agent_registry/agent_registry.js +0 -337
- package/dist/web/integrations/agent_registry/agent_registry_mcp_toolset.js +0 -120
- package/dist/web/integrations/agent_registry/helpers.js +0 -32
- package/dist/web/integrations/agent_registry/types.js +0 -20
- package/dist/web/memory/base_memory_service.js +0 -7
- package/dist/web/memory/in_memory_memory_service.js +0 -89
- package/dist/web/memory/memory_entry.js +0 -7
- package/dist/web/memory/vertex_ai_memory_bank_service.js +0 -496
- package/dist/web/models/apigee_llm.js +0 -227
- package/dist/web/models/base_llm.js +0 -78
- package/dist/web/models/base_llm_connection.js +0 -7
- package/dist/web/models/gemini_llm_connection.js +0 -183
- package/dist/web/models/google_llm.js +0 -396
- package/dist/web/models/interactions_utils.js +0 -745
- package/dist/web/models/llm_request.js +0 -57
- package/dist/web/models/llm_response.js +0 -48
- package/dist/web/models/registry.js +0 -100
- package/dist/web/models/routed_llm.js +0 -112
- package/dist/web/plugins/base_plugin.js +0 -305
- package/dist/web/plugins/global_instruction_plugin.js +0 -71
- package/dist/web/plugins/logging_plugin.js +0 -241
- package/dist/web/plugins/plugin_manager.js +0 -318
- package/dist/web/plugins/security_plugin.js +0 -148
- package/dist/web/runner/in_memory_runner.js +0 -50
- package/dist/web/runner/runner.js +0 -747
- package/dist/web/sessions/base_session_service.js +0 -123
- package/dist/web/sessions/database_session_service.js +0 -440
- package/dist/web/sessions/db/operations.js +0 -124
- package/dist/web/sessions/db/schema.js +0 -216
- package/dist/web/sessions/in_memory_session_service.js +0 -251
- package/dist/web/sessions/registry.js +0 -38
- package/dist/web/sessions/session.js +0 -23
- package/dist/web/sessions/state.js +0 -159
- package/dist/web/sessions/state_write_order.js +0 -74
- package/dist/web/sessions/vertex_ai_session_service.js +0 -546
- package/dist/web/skills/gcp_skill_registry.js +0 -80
- package/dist/web/skills/loader.js +0 -372
- package/dist/web/skills/prompt.js +0 -34
- package/dist/web/skills/skill.js +0 -67
- package/dist/web/skills/skill_registry.js +0 -7
- package/dist/web/telemetry/google_cloud.js +0 -99
- package/dist/web/telemetry/setup.js +0 -89
- package/dist/web/telemetry/tracing.js +0 -304
- package/dist/web/tools/agent_tool.js +0 -150
- package/dist/web/tools/base_tool.js +0 -116
- package/dist/web/tools/base_toolset.js +0 -62
- package/dist/web/tools/consolidate_context_tool.js +0 -55
- package/dist/web/tools/enterprise_web_search_tool.js +0 -60
- package/dist/web/tools/example_tool.js +0 -46
- package/dist/web/tools/exit_loop_tool.js +0 -47
- package/dist/web/tools/finish_task_tool.js +0 -92
- package/dist/web/tools/forwarding_artifact_service.js +0 -51
- package/dist/web/tools/function_tool.js +0 -151
- package/dist/web/tools/get_user_choice_tool.js +0 -27
- package/dist/web/tools/google_maps_grounding_tool.js +0 -59
- package/dist/web/tools/google_search_tool.js +0 -55
- package/dist/web/tools/load_artifacts_tool.js +0 -159
- package/dist/web/tools/load_memory_tool.js +0 -83
- package/dist/web/tools/long_running_tool.js +0 -58
- package/dist/web/tools/mcp/index.js +0 -11
- package/dist/web/tools/mcp/load_mcp_resource_tool.js +0 -111
- package/dist/web/tools/mcp/mcp_session_manager.js +0 -114
- package/dist/web/tools/mcp/mcp_tool.js +0 -47
- package/dist/web/tools/mcp/mcp_toolset.js +0 -144
- package/dist/web/tools/openapi_tool/auth/auth_helpers.js +0 -53
- package/dist/web/tools/openapi_tool/auth/credential_exchangers/auto_auth_credential_exchanger.js +0 -62
- package/dist/web/tools/openapi_tool/auth/credential_exchangers/service_account_exchanger.js +0 -113
- package/dist/web/tools/openapi_tool/openapi_spec_parser/openapi_spec_parser.js +0 -242
- package/dist/web/tools/openapi_tool/openapi_spec_parser/operation_parser.js +0 -200
- package/dist/web/tools/openapi_tool/openapi_spec_parser/tool_auth_handler.js +0 -98
- package/dist/web/tools/openapi_tool/openapi_toolset.js +0 -99
- package/dist/web/tools/openapi_tool/rest_api_tool.js +0 -247
- package/dist/web/tools/preload_memory_tool.js +0 -81
- package/dist/web/tools/request_input_tool.js +0 -29
- package/dist/web/tools/skill/list_skills_tool.js +0 -52
- package/dist/web/tools/skill/load_skill_resource_tool.js +0 -192
- package/dist/web/tools/skill/load_skill_tool.js +0 -96
- package/dist/web/tools/skill/run_skill_inline_script_tool.js +0 -191
- package/dist/web/tools/skill/run_skill_script_tool.js +0 -227
- package/dist/web/tools/skill/search_skills_tool.js +0 -84
- package/dist/web/tools/skill/skill_toolset.js +0 -185
- package/dist/web/tools/tool_confirmation.js +0 -43
- package/dist/web/tools/url_context_tool.js +0 -48
- package/dist/web/tools/vertex_ai_search_tool.js +0 -107
- package/dist/web/tools/vertex_rag_retrieval_tool.js +0 -40
- package/dist/web/utils/async_hooks_shim.js +0 -28
- package/dist/web/utils/async_queue.js +0 -88
- package/dist/web/utils/branch_trie.js +0 -16
- package/dist/web/utils/case_utils.js +0 -28
- package/dist/web/utils/client_labels.js +0 -70
- package/dist/web/utils/crypto_shim.js +0 -18
- package/dist/web/utils/deprecated.js +0 -40
- package/dist/web/utils/env_aware_utils.js +0 -115
- package/dist/web/utils/error_utils.js +0 -101
- package/dist/web/utils/experimental.js +0 -54
- package/dist/web/utils/failover_utils.js +0 -100
- package/dist/web/utils/file_extension_utils.js +0 -55
- package/dist/web/utils/file_utils.js +0 -108
- package/dist/web/utils/gemini_schema_util.js +0 -177
- package/dist/web/utils/genai_schema_to_json.js +0 -80
- package/dist/web/utils/live_connection_utils.js +0 -257
- package/dist/web/utils/logger.js +0 -140
- package/dist/web/utils/model_name.js +0 -75
- package/dist/web/utils/object_notation_utils.js +0 -54
- package/dist/web/utils/optional_peer.js +0 -38
- package/dist/web/utils/output_schema_utils.js +0 -18
- package/dist/web/utils/partial_copy.js +0 -26
- package/dist/web/utils/redact_uri.js +0 -39
- package/dist/web/utils/schema.js +0 -167
- package/dist/web/utils/simple_zod_to_json.js +0 -134
- package/dist/web/utils/streaming_utils.js +0 -438
- package/dist/web/utils/task.js +0 -38
- package/dist/web/utils/variant_utils.js +0 -23
- package/dist/web/utils/vertex_ai_utils.js +0 -27
- package/dist/web/version.js +0 -11
- package/dist/web/workflow/base_node.js +0 -215
- package/dist/web/workflow/branch_path.js +0 -77
- package/dist/web/workflow/dynamic_node_scheduler.js +0 -202
- package/dist/web/workflow/errors.js +0 -140
- package/dist/web/workflow/graph.js +0 -127
- package/dist/web/workflow/index.js +0 -80
- package/dist/web/workflow/node.js +0 -87
- package/dist/web/workflow/node_builders.js +0 -40
- package/dist/web/workflow/node_context.js +0 -236
- package/dist/web/workflow/node_error_event.js +0 -86
- package/dist/web/workflow/node_runner.js +0 -481
- package/dist/web/workflow/node_state.js +0 -43
- package/dist/web/workflow/node_status.js +0 -20
- package/dist/web/workflow/nodes/function_node.js +0 -221
- package/dist/web/workflow/nodes/join_node.js +0 -47
- package/dist/web/workflow/nodes/node_tool.js +0 -131
- package/dist/web/workflow/nodes/parallel_worker.js +0 -120
- package/dist/web/workflow/nodes/tool_node.js +0 -126
- package/dist/web/workflow/request_input.js +0 -36
- package/dist/web/workflow/retry_config.js +0 -43
- package/dist/web/workflow/run_llm_agent_as_node.js +0 -266
- package/dist/web/workflow/run_node_as_invocation.js +0 -170
- package/dist/web/workflow/schedule_dynamic_node.js +0 -26
- package/dist/web/workflow/trigger.js +0 -7
- package/dist/web/workflow/utils/graph_parser.js +0 -188
- package/dist/web/workflow/utils/graph_validation.js +0 -189
- package/dist/web/workflow/utils/hitl_utils.js +0 -239
- package/dist/web/workflow/utils/rehydration_utils.js +0 -342
- package/dist/web/workflow/utils/retry_utils.js +0 -82
- package/dist/web/workflow/utils/workflow_graph_utils.js +0 -115
- package/dist/web/workflow/workflow.js +0 -529
- /package/dist/{web/artifacts/session_artifact_service.js → esm/tools/resume_inputs.js} +0 -0
package/dist/cjs/common.js
CHANGED
|
@@ -25,14 +25,17 @@ 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
|
+
ADK_HANDLE_MODEL_ERROR_TOOL_NAME: () => import_reflect_retry_model_plugin.ADK_HANDLE_MODEL_ERROR_TOOL_NAME,
|
|
28
29
|
AUTH_PREPROCESSOR: () => import_auth_preprocessor.AUTH_PREPROCESSOR,
|
|
29
30
|
ActiveStreamingTool: () => import_active_streaming_tool.ActiveStreamingTool,
|
|
30
31
|
Agent: () => import_llm_agent.LlmAgent,
|
|
31
32
|
AgentControlledContextCompactor: () => import_agent_controlled_context_compactor.AgentControlledContextCompactor,
|
|
32
33
|
AgentTool: () => import_agent_tool.AgentTool,
|
|
33
34
|
AgentTransferLlmRequestProcessor: () => import_agent_transfer_llm_request_processor.AgentTransferLlmRequestProcessor,
|
|
35
|
+
AlreadyExistsError: () => import_already_exists_error.AlreadyExistsError,
|
|
34
36
|
AnchoredContextCompactor: () => import_anchored_context_compactor.AnchoredContextCompactor,
|
|
35
37
|
ApigeeLlm: () => import_apigee_llm.ApigeeLlm,
|
|
38
|
+
App: () => import_app.App,
|
|
36
39
|
AsyncQueue: () => import_async_queue.AsyncQueue,
|
|
37
40
|
AuthCredentialTypes: () => import_auth_credential.AuthCredentialTypes,
|
|
38
41
|
AuthHandler: () => import_auth_handler.AuthHandler,
|
|
@@ -47,12 +50,16 @@ __export(common_exports, {
|
|
|
47
50
|
BaseLlmResponseProcessor: () => import_base_llm_processor.BaseLlmResponseProcessor,
|
|
48
51
|
BaseNode: () => import_workflow.BaseNode,
|
|
49
52
|
BasePlugin: () => import_base_plugin.BasePlugin,
|
|
53
|
+
BaseRetrievalTool: () => import_base_retrieval_tool.BaseRetrievalTool,
|
|
50
54
|
BaseSessionService: () => import_base_session_service.BaseSessionService,
|
|
51
55
|
BaseTool: () => import_base_tool.BaseTool,
|
|
52
56
|
BaseToolset: () => import_base_toolset.BaseToolset,
|
|
53
57
|
BranchPath: () => import_workflow.BranchPath,
|
|
54
58
|
BuiltInCodeExecutor: () => import_built_in_code_executor.BuiltInCodeExecutor,
|
|
59
|
+
BuiltInTool: () => import_built_in_tool.BuiltInTool,
|
|
55
60
|
CONTENT_REQUEST_PROCESSOR: () => import_content_request_processor.CONTENT_REQUEST_PROCESSOR,
|
|
61
|
+
ChromeBuiltInLlm: () => import_chrome_prompt_llm.ChromeBuiltInLlm,
|
|
62
|
+
ChromeModelUnavailableError: () => import_chrome_prompt_llm.ChromeModelUnavailableError,
|
|
56
63
|
CodeExecutionLanguage: () => import_code_execution_utils.CodeExecutionLanguage,
|
|
57
64
|
ConsolidateContextTool: () => import_consolidate_context_tool.ConsolidateContextTool,
|
|
58
65
|
ContentRequestProcessor: () => import_content_request_processor.ContentRequestProcessor,
|
|
@@ -73,9 +80,10 @@ __export(common_exports, {
|
|
|
73
80
|
FINISH_TASK_TOOL_NAME: () => import_finish_task_tool.FINISH_TASK_TOOL_NAME,
|
|
74
81
|
FileContentEncoding: () => import_code_execution_utils.FileContentEncoding,
|
|
75
82
|
FinishTaskTool: () => import_finish_task_tool.FinishTaskTool,
|
|
83
|
+
ForwardingArtifactService: () => import_forwarding_artifact_service.ForwardingArtifactService,
|
|
76
84
|
FunctionNode: () => import_workflow.FunctionNode,
|
|
77
85
|
FunctionTool: () => import_function_tool.FunctionTool,
|
|
78
|
-
|
|
86
|
+
GLOBAL_SCOPE_KEY: () => import_reflect_retry_utils.GLOBAL_SCOPE_KEY,
|
|
79
87
|
GOOGLE_MAPS_GROUNDING: () => import_google_maps_grounding_tool.GOOGLE_MAPS_GROUNDING,
|
|
80
88
|
GOOGLE_SEARCH: () => import_google_search_tool.GOOGLE_SEARCH,
|
|
81
89
|
Gemini: () => import_google_llm.Gemini,
|
|
@@ -91,6 +99,7 @@ __export(common_exports, {
|
|
|
91
99
|
InMemoryPolicyEngine: () => import_security_plugin.InMemoryPolicyEngine,
|
|
92
100
|
InMemoryRunner: () => import_in_memory_runner.InMemoryRunner,
|
|
93
101
|
InMemorySessionService: () => import_in_memory_session_service.InMemorySessionService,
|
|
102
|
+
InputValidationError: () => import_input_validation_error.InputValidationError,
|
|
94
103
|
IntentMismatchError: () => import_tool_confirmation.IntentMismatchError,
|
|
95
104
|
InteractionsRequestProcessor: () => import_interactions_request_processor.InteractionsRequestProcessor,
|
|
96
105
|
InvocationContext: () => import_invocation_context.InvocationContext,
|
|
@@ -98,14 +107,13 @@ __export(common_exports, {
|
|
|
98
107
|
LLMRegistry: () => import_registry.LLMRegistry,
|
|
99
108
|
LOAD_ARTIFACTS: () => import_load_artifacts_tool.LOAD_ARTIFACTS,
|
|
100
109
|
LOAD_MEMORY: () => import_load_memory_tool.LOAD_MEMORY,
|
|
101
|
-
LOAD_WEB_PAGE: () => import_load_web_page.LOAD_WEB_PAGE,
|
|
102
110
|
ListSkillsTool: () => import_list_skills_tool.ListSkillsTool,
|
|
103
111
|
LiveRequestQueue: () => import_live_request_queue.LiveRequestQueue,
|
|
112
|
+
LlamaIndexRetrieval: () => import_llama_index_retrieval.LlamaIndexRetrieval,
|
|
104
113
|
LlmAgent: () => import_llm_agent.LlmAgent,
|
|
105
114
|
LlmSummarizer: () => import_llm_summarizer.LlmSummarizer,
|
|
106
115
|
LoadArtifactsTool: () => import_load_artifacts_tool.LoadArtifactsTool,
|
|
107
116
|
LoadMemoryTool: () => import_load_memory_tool.LoadMemoryTool,
|
|
108
|
-
LoadSkillResourceTool: () => import_load_skill_resource_tool.LoadSkillResourceTool,
|
|
109
117
|
LoadSkillTool: () => import_load_skill_tool.LoadSkillTool,
|
|
110
118
|
LogLevel: () => import_logger.LogLevel,
|
|
111
119
|
LoggingPlugin: () => import_logging_plugin.LoggingPlugin,
|
|
@@ -117,46 +125,50 @@ __export(common_exports, {
|
|
|
117
125
|
NodeStatus: () => import_workflow.NodeStatus,
|
|
118
126
|
NodeTimeoutError: () => import_workflow.NodeTimeoutError,
|
|
119
127
|
NodeTool: () => import_workflow.NodeTool,
|
|
128
|
+
NotFoundError: () => import_not_found_error.NotFoundError,
|
|
120
129
|
OAuth2CredentialExchanger: () => import_oauth2_credential_exchanger.OAuth2CredentialExchanger,
|
|
121
130
|
OAuth2DiscoveryManager: () => import_oauth2_discovery.OAuth2DiscoveryManager,
|
|
122
131
|
OAuthGrantType: () => import_auth_schemes.OAuthGrantType,
|
|
123
|
-
OpenAPIToolset: () => import_openapi_toolset.OpenAPIToolset,
|
|
124
|
-
OpenApiSpecParser: () => import_openapi_spec_parser.OpenApiSpecParser,
|
|
125
|
-
OperationParser: () => import_operation_parser.OperationParser,
|
|
126
132
|
PRELOAD_MEMORY: () => import_preload_memory_tool.PRELOAD_MEMORY,
|
|
127
133
|
ParallelAgent: () => import_parallel_agent.ParallelAgent,
|
|
128
134
|
ParallelWorker: () => import_workflow.ParallelWorker,
|
|
129
135
|
PluginManager: () => import_plugin_manager.PluginManager,
|
|
130
136
|
PolicyOutcome: () => import_security_plugin.PolicyOutcome,
|
|
131
137
|
PreloadMemoryTool: () => import_preload_memory_tool.PreloadMemoryTool,
|
|
138
|
+
REFLECT_AND_RETRY_RESPONSE_TYPE: () => import_reflect_retry_utils.REFLECT_AND_RETRY_RESPONSE_TYPE,
|
|
132
139
|
REQUEST_CONFIRMATION_FUNCTION_CALL_NAME: () => import_functions.REQUEST_CONFIRMATION_FUNCTION_CALL_NAME,
|
|
133
140
|
REQUEST_CREDENTIAL_FUNCTION_CALL_NAME: () => import_functions.REQUEST_CREDENTIAL_FUNCTION_CALL_NAME,
|
|
134
141
|
REQUEST_INPUT_FUNCTION_CALL_NAME: () => import_functions.REQUEST_INPUT_FUNCTION_CALL_NAME,
|
|
142
|
+
RESERVED_TOOL_CALL_ERROR_TYPE: () => import_reflect_retry_model_plugin.RESERVED_TOOL_CALL_ERROR_TYPE,
|
|
135
143
|
ReadonlyContext: () => import_readonly_context.ReadonlyContext,
|
|
144
|
+
ReflectAndRetryModelPlugin: () => import_reflect_retry_model_plugin.ReflectAndRetryModelPlugin,
|
|
145
|
+
ReflectAndRetryToolPlugin: () => import_reflect_retry_tool_plugin.ReflectAndRetryToolPlugin,
|
|
136
146
|
RequestInput: () => import_workflow.RequestInput,
|
|
137
|
-
RestApiTool: () => import_rest_api_tool.RestApiTool,
|
|
138
147
|
RoutedAgent: () => import_routed_agent.RoutedAgent,
|
|
139
148
|
RoutedLlm: () => import_routed_llm.RoutedLlm,
|
|
140
149
|
Runner: () => import_runner.Runner,
|
|
141
150
|
START: () => import_workflow.START,
|
|
151
|
+
ScopedArtifactService: () => import_scoped_artifact_service.ScopedArtifactService,
|
|
152
|
+
ScopedFailureTracker: () => import_reflect_retry_utils.ScopedFailureTracker,
|
|
142
153
|
SearchSkillsTool: () => import_search_skills_tool.SearchSkillsTool,
|
|
143
154
|
SecurityPlugin: () => import_security_plugin.SecurityPlugin,
|
|
144
155
|
SequentialAgent: () => import_sequential_agent.SequentialAgent,
|
|
156
|
+
SessionNotFoundError: () => import_session_not_found_error.SessionNotFoundError,
|
|
145
157
|
SessionStateCredentialService: () => import_session_state_credential_service.SessionStateCredentialService,
|
|
146
|
-
SkillToolset: () => import_skill_toolset.SkillToolset,
|
|
147
158
|
State: () => import_state.State,
|
|
148
159
|
StateSchemaError: () => import_state.StateSchemaError,
|
|
149
160
|
StreamingMode: () => import_run_config.StreamingMode,
|
|
150
161
|
Task: () => import_task.Task,
|
|
151
162
|
TokenBasedContextCompactor: () => import_token_based_context_compactor.TokenBasedContextCompactor,
|
|
152
|
-
ToolAuthHandler: () => import_tool_auth_handler.ToolAuthHandler,
|
|
153
163
|
ToolConfirmation: () => import_tool_confirmation.ToolConfirmation,
|
|
164
|
+
ToolErrorType: () => import_tool_execution_error.ToolErrorType,
|
|
165
|
+
ToolExecutionError: () => import_tool_execution_error.ToolExecutionError,
|
|
154
166
|
ToolNode: () => import_workflow.ToolNode,
|
|
167
|
+
TrackingScope: () => import_reflect_retry_utils.TrackingScope,
|
|
155
168
|
TrajectoryThoughtPruningCompactor: () => import_trajectory_thought_pruning_compactor.TrajectoryThoughtPruningCompactor,
|
|
156
169
|
TruncatingContextCompactor: () => import_truncating_context_compactor.TruncatingContextCompactor,
|
|
157
170
|
URL_CONTEXT: () => import_url_context_tool.URL_CONTEXT,
|
|
158
171
|
UrlContextTool: () => import_url_context_tool.UrlContextTool,
|
|
159
|
-
VertexAiMemoryBankService: () => import_vertex_ai_memory_bank_service.VertexAiMemoryBankService,
|
|
160
172
|
VertexAiSearchTool: () => import_vertex_ai_search_tool.VertexAiSearchTool,
|
|
161
173
|
VertexRagRetrievalTool: () => import_vertex_rag_retrieval_tool.VertexRagRetrievalTool,
|
|
162
174
|
Workflow: () => import_workflow.Workflow,
|
|
@@ -167,7 +179,6 @@ __export(common_exports, {
|
|
|
167
179
|
createEventActions: () => import_event_actions.createEventActions,
|
|
168
180
|
createNodeErrorEvent: () => import_workflow.createNodeErrorEvent,
|
|
169
181
|
createNodeState: () => import_workflow.createNodeState,
|
|
170
|
-
createRestApiTool: () => import_rest_api_tool.createRestApiTool,
|
|
171
182
|
createResumabilityConfig: () => import_resumability_config.createResumabilityConfig,
|
|
172
183
|
createSession: () => import_session.createSession,
|
|
173
184
|
createSubBranch: () => import_workflow.createSubBranch,
|
|
@@ -189,6 +200,7 @@ __export(common_exports, {
|
|
|
189
200
|
hasThoughts: () => import_event.hasThoughts,
|
|
190
201
|
hasTrailingCodeExecutionResult: () => import_event.hasTrailingCodeExecutionResult,
|
|
191
202
|
isAgentTool: () => import_agent_tool.isAgentTool,
|
|
203
|
+
isApp: () => import_app.isApp,
|
|
192
204
|
isBaseAgent: () => import_base_agent.isBaseAgent,
|
|
193
205
|
isBaseExampleProvider: () => import_base_example_provider.isBaseExampleProvider,
|
|
194
206
|
isBaseLlm: () => import_base_llm.isBaseLlm,
|
|
@@ -215,12 +227,10 @@ __export(common_exports, {
|
|
|
215
227
|
isRunner: () => import_runner.isRunner,
|
|
216
228
|
isScratchpadEvent: () => import_compacted_event.isScratchpadEvent,
|
|
217
229
|
isSequentialAgent: () => import_sequential_agent.isSequentialAgent,
|
|
230
|
+
isSessionArtifactService: () => import_session_artifact_service.isSessionArtifactService,
|
|
218
231
|
isStateSchemaError: () => import_state.isStateSchemaError,
|
|
232
|
+
isToolNotFound: () => import_functions.isToolNotFound,
|
|
219
233
|
isWorkflow: () => import_workflow.isWorkflow,
|
|
220
|
-
loadAllSkillsInDir: () => import_loader.loadAllSkillsInDir,
|
|
221
|
-
loadSkillFromDir: () => import_loader.loadSkillFromDir,
|
|
222
|
-
loadSkillFromZipBuffer: () => import_loader.loadSkillFromZipBuffer,
|
|
223
|
-
loadWebPage: () => import_load_web_page.loadWebPage,
|
|
224
234
|
node: () => import_workflow.node,
|
|
225
235
|
normalizeRetryExceptions: () => import_workflow.normalizeRetryExceptions,
|
|
226
236
|
populateClientFunctionCallId: () => import_event.populateClientFunctionCallId,
|
|
@@ -229,12 +239,15 @@ __export(common_exports, {
|
|
|
229
239
|
requestInputTool: () => import_request_input_tool.requestInputTool,
|
|
230
240
|
requireAgent: () => import_invocation_context.requireAgent,
|
|
231
241
|
requiresUserInput: () => import_user_input_request.requiresUserInput,
|
|
242
|
+
resetLogger: () => import_logger.resetLogger,
|
|
243
|
+
resolveScopeKey: () => import_reflect_retry_utils.resolveScopeKey,
|
|
232
244
|
runWithClientLabel: () => import_client_labels.runWithClientLabel,
|
|
233
245
|
setLogLevel: () => import_logger.setLogLevel,
|
|
234
246
|
setLogger: () => import_logger.setLogger,
|
|
235
247
|
stringifyContent: () => import_event.stringifyContent,
|
|
248
|
+
stripAdkIdentityPreamble: () => import_chrome_prompt_llm.stripAdkIdentityPreamble,
|
|
236
249
|
toStructuredEvents: () => import_structured_events.toStructuredEvents,
|
|
237
|
-
|
|
250
|
+
validateAppName: () => import_app.validateAppName,
|
|
238
251
|
version: () => import_version.version,
|
|
239
252
|
zodObjectToSchema: () => import_simple_zod_to_json.zodObjectToSchema
|
|
240
253
|
});
|
|
@@ -260,6 +273,8 @@ var import_sequential_agent = require("./agents/sequential_agent.js");
|
|
|
260
273
|
var import_user_input_request = require("./agents/user_input_request.js");
|
|
261
274
|
var import_resumability_config = require("./apps/resumability_config.js");
|
|
262
275
|
var import_in_memory_artifact_service = require("./artifacts/in_memory_artifact_service.js");
|
|
276
|
+
var import_scoped_artifact_service = require("./artifacts/scoped_artifact_service.js");
|
|
277
|
+
var import_session_artifact_service = require("./artifacts/session_artifact_service.js");
|
|
263
278
|
var import_auth_credential = require("./auth/auth_credential.js");
|
|
264
279
|
var import_auth_handler = require("./auth/auth_handler.js");
|
|
265
280
|
var import_auth_preprocessor = require("./auth/auth_preprocessor.js");
|
|
@@ -281,22 +296,30 @@ var import_token_based_context_compactor = require("./context/token_based_contex
|
|
|
281
296
|
var import_trajectory_thought_pruning_compactor = require("./context/trajectory_thought_pruning_compactor.js");
|
|
282
297
|
var import_truncating_context_compactor = require("./context/truncating_context_compactor.js");
|
|
283
298
|
var import_base_environment = require("./environment/base_environment.js");
|
|
299
|
+
var import_already_exists_error = require("./errors/already_exists_error.js");
|
|
300
|
+
var import_input_validation_error = require("./errors/input_validation_error.js");
|
|
301
|
+
var import_not_found_error = require("./errors/not_found_error.js");
|
|
302
|
+
var import_session_not_found_error = require("./errors/session_not_found_error.js");
|
|
303
|
+
var import_tool_execution_error = require("./errors/tool_execution_error.js");
|
|
284
304
|
var import_compacted_event = require("./events/compacted_event.js");
|
|
285
305
|
var import_event = require("./events/event.js");
|
|
286
306
|
var import_event_actions = require("./events/event_actions.js");
|
|
287
307
|
var import_structured_events = require("./events/structured_events.js");
|
|
288
308
|
var import_base_example_provider = require("./examples/base_example_provider.js");
|
|
289
309
|
var import_in_memory_memory_service = require("./memory/in_memory_memory_service.js");
|
|
290
|
-
var import_vertex_ai_memory_bank_service = require("./memory/vertex_ai_memory_bank_service.js");
|
|
291
310
|
var import_apigee_llm = require("./models/apigee_llm.js");
|
|
292
311
|
var import_base_llm = require("./models/base_llm.js");
|
|
312
|
+
var import_chrome_prompt_llm = require("./models/chrome_prompt_llm.js");
|
|
293
313
|
var import_google_llm = require("./models/google_llm.js");
|
|
294
314
|
var import_registry = require("./models/registry.js");
|
|
295
315
|
var import_routed_llm = require("./models/routed_llm.js");
|
|
316
|
+
var import_reflect_retry_utils = require("./plugins/_reflect_retry_utils.js");
|
|
296
317
|
var import_base_plugin = require("./plugins/base_plugin.js");
|
|
297
318
|
var import_global_instruction_plugin = require("./plugins/global_instruction_plugin.js");
|
|
298
319
|
var import_logging_plugin = require("./plugins/logging_plugin.js");
|
|
299
320
|
var import_plugin_manager = require("./plugins/plugin_manager.js");
|
|
321
|
+
var import_reflect_retry_model_plugin = require("./plugins/reflect_retry_model_plugin.js");
|
|
322
|
+
var import_reflect_retry_tool_plugin = require("./plugins/reflect_retry_tool_plugin.js");
|
|
300
323
|
var import_security_plugin = require("./plugins/security_plugin.js");
|
|
301
324
|
var import_in_memory_runner = require("./runner/in_memory_runner.js");
|
|
302
325
|
var import_runner = require("./runner/runner.js");
|
|
@@ -307,21 +330,24 @@ var import_state = require("./sessions/state.js");
|
|
|
307
330
|
var import_agent_tool = require("./tools/agent_tool.js");
|
|
308
331
|
var import_base_tool = require("./tools/base_tool.js");
|
|
309
332
|
var import_base_toolset = require("./tools/base_toolset.js");
|
|
333
|
+
var import_built_in_tool = require("./tools/built_in_tool.js");
|
|
310
334
|
var import_consolidate_context_tool = require("./tools/consolidate_context_tool.js");
|
|
311
335
|
var import_enterprise_web_search_tool = require("./tools/enterprise_web_search_tool.js");
|
|
312
336
|
var import_example_tool = require("./tools/example_tool.js");
|
|
313
337
|
var import_exit_loop_tool = require("./tools/exit_loop_tool.js");
|
|
314
338
|
var import_finish_task_tool = require("./tools/finish_task_tool.js");
|
|
339
|
+
var import_forwarding_artifact_service = require("./tools/forwarding_artifact_service.js");
|
|
315
340
|
var import_function_tool = require("./tools/function_tool.js");
|
|
316
341
|
var import_get_user_choice_tool = require("./tools/get_user_choice_tool.js");
|
|
317
342
|
var import_google_maps_grounding_tool = require("./tools/google_maps_grounding_tool.js");
|
|
318
343
|
var import_google_search_tool = require("./tools/google_search_tool.js");
|
|
319
344
|
var import_load_artifacts_tool = require("./tools/load_artifacts_tool.js");
|
|
320
345
|
var import_load_memory_tool = require("./tools/load_memory_tool.js");
|
|
321
|
-
var import_load_web_page = require("./tools/load_web_page.js");
|
|
322
346
|
var import_long_running_tool = require("./tools/long_running_tool.js");
|
|
323
347
|
var import_preload_memory_tool = require("./tools/preload_memory_tool.js");
|
|
324
348
|
var import_request_input_tool = require("./tools/request_input_tool.js");
|
|
349
|
+
var import_base_retrieval_tool = require("./tools/retrieval/base_retrieval_tool.js");
|
|
350
|
+
var import_llama_index_retrieval = require("./tools/retrieval/llama_index_retrieval.js");
|
|
325
351
|
var import_tool_confirmation = require("./tools/tool_confirmation.js");
|
|
326
352
|
var import_url_context_tool = require("./tools/url_context_tool.js");
|
|
327
353
|
var import_vertex_ai_search_tool = require("./tools/vertex_ai_search_tool.js");
|
|
@@ -334,25 +360,16 @@ var import_simple_zod_to_json = require("./utils/simple_zod_to_json.js");
|
|
|
334
360
|
var import_task = require("./utils/task.js");
|
|
335
361
|
var import_variant_utils = require("./utils/variant_utils.js");
|
|
336
362
|
var import_version = require("./version.js");
|
|
337
|
-
var import_gcp_skill_registry = require("./skills/gcp_skill_registry.js");
|
|
338
|
-
var import_loader = require("./skills/loader.js");
|
|
339
363
|
var import_list_skills_tool = require("./tools/skill/list_skills_tool.js");
|
|
340
|
-
var import_load_skill_resource_tool = require("./tools/skill/load_skill_resource_tool.js");
|
|
341
364
|
var import_load_skill_tool = require("./tools/skill/load_skill_tool.js");
|
|
342
365
|
var import_search_skills_tool = require("./tools/skill/search_skills_tool.js");
|
|
343
|
-
var import_skill_toolset = require("./tools/skill/skill_toolset.js");
|
|
344
366
|
__reExport(common_exports, require("./artifacts/base_artifact_service.js"), module.exports);
|
|
345
367
|
__reExport(common_exports, require("./features/feature_registry.js"), module.exports);
|
|
346
368
|
__reExport(common_exports, require("./memory/base_memory_service.js"), module.exports);
|
|
347
369
|
__reExport(common_exports, require("./sessions/base_session_service.js"), module.exports);
|
|
348
370
|
__reExport(common_exports, require("./tools/base_tool.js"), module.exports);
|
|
349
|
-
var import_openapi_spec_parser = require("./tools/openapi_tool/openapi_spec_parser/openapi_spec_parser.js");
|
|
350
|
-
var import_operation_parser = require("./tools/openapi_tool/openapi_spec_parser/operation_parser.js");
|
|
351
|
-
var import_tool_auth_handler = require("./tools/openapi_tool/openapi_spec_parser/tool_auth_handler.js");
|
|
352
|
-
var import_openapi_toolset = require("./tools/openapi_tool/openapi_toolset.js");
|
|
353
|
-
var import_rest_api_tool = require("./tools/openapi_tool/rest_api_tool.js");
|
|
354
371
|
var import_workflow = require("./workflow/index.js");
|
|
355
|
-
|
|
372
|
+
var import_app = require("./apps/app.js");
|
|
356
373
|
__reExport(common_exports, require("./artifacts/base_artifact_service.js"), module.exports);
|
|
357
374
|
__reExport(common_exports, require("./features/feature_registry.js"), module.exports);
|
|
358
375
|
__reExport(common_exports, require("./memory/base_memory_service.js"), module.exports);
|
|
@@ -365,14 +382,17 @@ __reExport(common_exports, require("./tools/base_tool.js"), module.exports);
|
|
|
365
382
|
*/
|
|
366
383
|
// Annotate the CommonJS export names for ESM import in node:
|
|
367
384
|
0 && (module.exports = {
|
|
385
|
+
ADK_HANDLE_MODEL_ERROR_TOOL_NAME,
|
|
368
386
|
AUTH_PREPROCESSOR,
|
|
369
387
|
ActiveStreamingTool,
|
|
370
388
|
Agent,
|
|
371
389
|
AgentControlledContextCompactor,
|
|
372
390
|
AgentTool,
|
|
373
391
|
AgentTransferLlmRequestProcessor,
|
|
392
|
+
AlreadyExistsError,
|
|
374
393
|
AnchoredContextCompactor,
|
|
375
394
|
ApigeeLlm,
|
|
395
|
+
App,
|
|
376
396
|
AsyncQueue,
|
|
377
397
|
AuthCredentialTypes,
|
|
378
398
|
AuthHandler,
|
|
@@ -387,12 +407,16 @@ __reExport(common_exports, require("./tools/base_tool.js"), module.exports);
|
|
|
387
407
|
BaseLlmResponseProcessor,
|
|
388
408
|
BaseNode,
|
|
389
409
|
BasePlugin,
|
|
410
|
+
BaseRetrievalTool,
|
|
390
411
|
BaseSessionService,
|
|
391
412
|
BaseTool,
|
|
392
413
|
BaseToolset,
|
|
393
414
|
BranchPath,
|
|
394
415
|
BuiltInCodeExecutor,
|
|
416
|
+
BuiltInTool,
|
|
395
417
|
CONTENT_REQUEST_PROCESSOR,
|
|
418
|
+
ChromeBuiltInLlm,
|
|
419
|
+
ChromeModelUnavailableError,
|
|
396
420
|
CodeExecutionLanguage,
|
|
397
421
|
ConsolidateContextTool,
|
|
398
422
|
ContentRequestProcessor,
|
|
@@ -413,9 +437,10 @@ __reExport(common_exports, require("./tools/base_tool.js"), module.exports);
|
|
|
413
437
|
FINISH_TASK_TOOL_NAME,
|
|
414
438
|
FileContentEncoding,
|
|
415
439
|
FinishTaskTool,
|
|
440
|
+
ForwardingArtifactService,
|
|
416
441
|
FunctionNode,
|
|
417
442
|
FunctionTool,
|
|
418
|
-
|
|
443
|
+
GLOBAL_SCOPE_KEY,
|
|
419
444
|
GOOGLE_MAPS_GROUNDING,
|
|
420
445
|
GOOGLE_SEARCH,
|
|
421
446
|
Gemini,
|
|
@@ -431,6 +456,7 @@ __reExport(common_exports, require("./tools/base_tool.js"), module.exports);
|
|
|
431
456
|
InMemoryPolicyEngine,
|
|
432
457
|
InMemoryRunner,
|
|
433
458
|
InMemorySessionService,
|
|
459
|
+
InputValidationError,
|
|
434
460
|
IntentMismatchError,
|
|
435
461
|
InteractionsRequestProcessor,
|
|
436
462
|
InvocationContext,
|
|
@@ -438,14 +464,13 @@ __reExport(common_exports, require("./tools/base_tool.js"), module.exports);
|
|
|
438
464
|
LLMRegistry,
|
|
439
465
|
LOAD_ARTIFACTS,
|
|
440
466
|
LOAD_MEMORY,
|
|
441
|
-
LOAD_WEB_PAGE,
|
|
442
467
|
ListSkillsTool,
|
|
443
468
|
LiveRequestQueue,
|
|
469
|
+
LlamaIndexRetrieval,
|
|
444
470
|
LlmAgent,
|
|
445
471
|
LlmSummarizer,
|
|
446
472
|
LoadArtifactsTool,
|
|
447
473
|
LoadMemoryTool,
|
|
448
|
-
LoadSkillResourceTool,
|
|
449
474
|
LoadSkillTool,
|
|
450
475
|
LogLevel,
|
|
451
476
|
LoggingPlugin,
|
|
@@ -457,46 +482,50 @@ __reExport(common_exports, require("./tools/base_tool.js"), module.exports);
|
|
|
457
482
|
NodeStatus,
|
|
458
483
|
NodeTimeoutError,
|
|
459
484
|
NodeTool,
|
|
485
|
+
NotFoundError,
|
|
460
486
|
OAuth2CredentialExchanger,
|
|
461
487
|
OAuth2DiscoveryManager,
|
|
462
488
|
OAuthGrantType,
|
|
463
|
-
OpenAPIToolset,
|
|
464
|
-
OpenApiSpecParser,
|
|
465
|
-
OperationParser,
|
|
466
489
|
PRELOAD_MEMORY,
|
|
467
490
|
ParallelAgent,
|
|
468
491
|
ParallelWorker,
|
|
469
492
|
PluginManager,
|
|
470
493
|
PolicyOutcome,
|
|
471
494
|
PreloadMemoryTool,
|
|
495
|
+
REFLECT_AND_RETRY_RESPONSE_TYPE,
|
|
472
496
|
REQUEST_CONFIRMATION_FUNCTION_CALL_NAME,
|
|
473
497
|
REQUEST_CREDENTIAL_FUNCTION_CALL_NAME,
|
|
474
498
|
REQUEST_INPUT_FUNCTION_CALL_NAME,
|
|
499
|
+
RESERVED_TOOL_CALL_ERROR_TYPE,
|
|
475
500
|
ReadonlyContext,
|
|
501
|
+
ReflectAndRetryModelPlugin,
|
|
502
|
+
ReflectAndRetryToolPlugin,
|
|
476
503
|
RequestInput,
|
|
477
|
-
RestApiTool,
|
|
478
504
|
RoutedAgent,
|
|
479
505
|
RoutedLlm,
|
|
480
506
|
Runner,
|
|
481
507
|
START,
|
|
508
|
+
ScopedArtifactService,
|
|
509
|
+
ScopedFailureTracker,
|
|
482
510
|
SearchSkillsTool,
|
|
483
511
|
SecurityPlugin,
|
|
484
512
|
SequentialAgent,
|
|
513
|
+
SessionNotFoundError,
|
|
485
514
|
SessionStateCredentialService,
|
|
486
|
-
SkillToolset,
|
|
487
515
|
State,
|
|
488
516
|
StateSchemaError,
|
|
489
517
|
StreamingMode,
|
|
490
518
|
Task,
|
|
491
519
|
TokenBasedContextCompactor,
|
|
492
|
-
ToolAuthHandler,
|
|
493
520
|
ToolConfirmation,
|
|
521
|
+
ToolErrorType,
|
|
522
|
+
ToolExecutionError,
|
|
494
523
|
ToolNode,
|
|
524
|
+
TrackingScope,
|
|
495
525
|
TrajectoryThoughtPruningCompactor,
|
|
496
526
|
TruncatingContextCompactor,
|
|
497
527
|
URL_CONTEXT,
|
|
498
528
|
UrlContextTool,
|
|
499
|
-
VertexAiMemoryBankService,
|
|
500
529
|
VertexAiSearchTool,
|
|
501
530
|
VertexRagRetrievalTool,
|
|
502
531
|
Workflow,
|
|
@@ -507,7 +536,6 @@ __reExport(common_exports, require("./tools/base_tool.js"), module.exports);
|
|
|
507
536
|
createEventActions,
|
|
508
537
|
createNodeErrorEvent,
|
|
509
538
|
createNodeState,
|
|
510
|
-
createRestApiTool,
|
|
511
539
|
createResumabilityConfig,
|
|
512
540
|
createSession,
|
|
513
541
|
createSubBranch,
|
|
@@ -529,6 +557,7 @@ __reExport(common_exports, require("./tools/base_tool.js"), module.exports);
|
|
|
529
557
|
hasThoughts,
|
|
530
558
|
hasTrailingCodeExecutionResult,
|
|
531
559
|
isAgentTool,
|
|
560
|
+
isApp,
|
|
532
561
|
isBaseAgent,
|
|
533
562
|
isBaseExampleProvider,
|
|
534
563
|
isBaseLlm,
|
|
@@ -555,12 +584,10 @@ __reExport(common_exports, require("./tools/base_tool.js"), module.exports);
|
|
|
555
584
|
isRunner,
|
|
556
585
|
isScratchpadEvent,
|
|
557
586
|
isSequentialAgent,
|
|
587
|
+
isSessionArtifactService,
|
|
558
588
|
isStateSchemaError,
|
|
589
|
+
isToolNotFound,
|
|
559
590
|
isWorkflow,
|
|
560
|
-
loadAllSkillsInDir,
|
|
561
|
-
loadSkillFromDir,
|
|
562
|
-
loadSkillFromZipBuffer,
|
|
563
|
-
loadWebPage,
|
|
564
591
|
node,
|
|
565
592
|
normalizeRetryExceptions,
|
|
566
593
|
populateClientFunctionCallId,
|
|
@@ -569,12 +596,15 @@ __reExport(common_exports, require("./tools/base_tool.js"), module.exports);
|
|
|
569
596
|
requestInputTool,
|
|
570
597
|
requireAgent,
|
|
571
598
|
requiresUserInput,
|
|
599
|
+
resetLogger,
|
|
600
|
+
resolveScopeKey,
|
|
572
601
|
runWithClientLabel,
|
|
573
602
|
setLogLevel,
|
|
574
603
|
setLogger,
|
|
575
604
|
stringifyContent,
|
|
605
|
+
stripAdkIdentityPreamble,
|
|
576
606
|
toStructuredEvents,
|
|
577
|
-
|
|
607
|
+
validateAppName,
|
|
578
608
|
version,
|
|
579
609
|
zodObjectToSchema,
|
|
580
610
|
...require("./artifacts/base_artifact_service.js"),
|
|
@@ -582,7 +612,6 @@ __reExport(common_exports, require("./tools/base_tool.js"), module.exports);
|
|
|
582
612
|
...require("./memory/base_memory_service.js"),
|
|
583
613
|
...require("./sessions/base_session_service.js"),
|
|
584
614
|
...require("./tools/base_tool.js"),
|
|
585
|
-
...require("./apps/app.js"),
|
|
586
615
|
...require("./artifacts/base_artifact_service.js"),
|
|
587
616
|
...require("./features/feature_registry.js"),
|
|
588
617
|
...require("./memory/base_memory_service.js"),
|
|
@@ -45,15 +45,19 @@ const _AgentControlledContextCompactor = class _AgentControlledContextCompactor
|
|
|
45
45
|
return invocationContext.session.state["temp:consolidate_context"] === true;
|
|
46
46
|
}
|
|
47
47
|
async compact(invocationContext) {
|
|
48
|
+
var _a;
|
|
48
49
|
const events = invocationContext.session.events;
|
|
49
|
-
const activeEvents = (0, import_compaction_utils.getActiveEvents)(
|
|
50
|
+
const activeEvents = (0, import_compaction_utils.getActiveEvents)(
|
|
51
|
+
events,
|
|
52
|
+
invocationContext.isolationScope
|
|
53
|
+
);
|
|
50
54
|
const consolidateToolCallIndex = activeEvents.reduce(
|
|
51
55
|
(acc, e, idx) => {
|
|
52
|
-
var
|
|
53
|
-
return ((_b = (
|
|
56
|
+
var _a2, _b;
|
|
57
|
+
return ((_b = (_a2 = e.content) == null ? void 0 : _a2.parts) == null ? void 0 : _b.some(
|
|
54
58
|
(p) => {
|
|
55
|
-
var
|
|
56
|
-
return ((
|
|
59
|
+
var _a3;
|
|
60
|
+
return ((_a3 = p.functionCall) == null ? void 0 : _a3.name) === "consolidate_context";
|
|
57
61
|
}
|
|
58
62
|
)) ? idx : acc;
|
|
59
63
|
},
|
|
@@ -83,6 +87,7 @@ const _AgentControlledContextCompactor = class _AgentControlledContextCompactor
|
|
|
83
87
|
}
|
|
84
88
|
try {
|
|
85
89
|
const compactedEvent = await this.summarizer.summarize(eventsToCompact);
|
|
90
|
+
(_a = compactedEvent.isolationScope) != null ? _a : compactedEvent.isolationScope = invocationContext.isolationScope;
|
|
86
91
|
invocationContext.session.events.push(compactedEvent);
|
|
87
92
|
} catch (error) {
|
|
88
93
|
console.error("Compaction failed:", error);
|
|
@@ -42,26 +42,32 @@ const _AnchoredContextCompactor = class _AnchoredContextCompactor {
|
|
|
42
42
|
this.eventRetentionSize = options.eventRetentionSize;
|
|
43
43
|
this.summarizer = options.summarizer;
|
|
44
44
|
}
|
|
45
|
-
getActiveEvents(events) {
|
|
45
|
+
getActiveEvents(events, currentIsolationScope) {
|
|
46
|
+
const visibleEvents = events.filter(
|
|
47
|
+
(event) => (0, import_compaction_utils.isEventVisibleInIsolationScope)(event, currentIsolationScope)
|
|
48
|
+
);
|
|
46
49
|
let latestScratchpad = void 0;
|
|
47
|
-
for (let i =
|
|
48
|
-
const e =
|
|
50
|
+
for (let i = visibleEvents.length - 1; i >= 0; i--) {
|
|
51
|
+
const e = visibleEvents[i];
|
|
49
52
|
if ((0, import_compacted_event.isScratchpadEvent)(e)) {
|
|
50
53
|
latestScratchpad = e;
|
|
51
54
|
break;
|
|
52
55
|
}
|
|
53
56
|
}
|
|
54
57
|
if (!latestScratchpad) {
|
|
55
|
-
return
|
|
58
|
+
return visibleEvents;
|
|
56
59
|
}
|
|
57
|
-
const activeRawEvents =
|
|
60
|
+
const activeRawEvents = visibleEvents.filter(
|
|
58
61
|
(e) => e.timestamp > latestScratchpad.endTime && !(0, import_compacted_event.isScratchpadEvent)(e)
|
|
59
62
|
);
|
|
60
63
|
return [latestScratchpad, ...activeRawEvents];
|
|
61
64
|
}
|
|
62
65
|
shouldCompact(invocationContext) {
|
|
63
66
|
const events = invocationContext.session.events;
|
|
64
|
-
const activeEvents = this.getActiveEvents(
|
|
67
|
+
const activeEvents = this.getActiveEvents(
|
|
68
|
+
events,
|
|
69
|
+
invocationContext.isolationScope
|
|
70
|
+
);
|
|
65
71
|
const hasScratchpad = activeEvents.length > 0 && (0, import_compacted_event.isScratchpadEvent)(activeEvents[0]);
|
|
66
72
|
const rawEvents = hasScratchpad ? activeEvents.slice(1) : activeEvents;
|
|
67
73
|
if (rawEvents.length <= this.eventRetentionSize) {
|
|
@@ -82,7 +88,10 @@ const _AnchoredContextCompactor = class _AnchoredContextCompactor {
|
|
|
82
88
|
}
|
|
83
89
|
async compact(invocationContext) {
|
|
84
90
|
const events = invocationContext.session.events;
|
|
85
|
-
const activeEvents = this.getActiveEvents(
|
|
91
|
+
const activeEvents = this.getActiveEvents(
|
|
92
|
+
events,
|
|
93
|
+
invocationContext.isolationScope
|
|
94
|
+
);
|
|
86
95
|
const hasScratchpad = activeEvents.length > 0 && (0, import_compacted_event.isScratchpadEvent)(activeEvents[0]);
|
|
87
96
|
const rawEvents = hasScratchpad ? activeEvents.slice(1) : activeEvents;
|
|
88
97
|
if (rawEvents.length <= this.eventRetentionSize) {
|
|
@@ -97,10 +106,11 @@ const _AnchoredContextCompactor = class _AnchoredContextCompactor {
|
|
|
97
106
|
}
|
|
98
107
|
const rawEventsToCompact = rawEvents.slice(0, retainStartIndex);
|
|
99
108
|
let scratchpadEvent;
|
|
100
|
-
|
|
101
|
-
|
|
109
|
+
const existingScratchpad = hasScratchpad ? activeEvents[0] : void 0;
|
|
110
|
+
const reusableScratchpad = existingScratchpad && (existingScratchpad.isolationScope === void 0 || existingScratchpad.isolationScope === invocationContext.isolationScope) ? existingScratchpad : void 0;
|
|
111
|
+
if (reusableScratchpad) {
|
|
102
112
|
scratchpadEvent = await this.summarizer.summarize([
|
|
103
|
-
|
|
113
|
+
reusableScratchpad,
|
|
104
114
|
...rawEventsToCompact
|
|
105
115
|
]);
|
|
106
116
|
} else {
|
|
@@ -109,15 +119,28 @@ const _AnchoredContextCompactor = class _AnchoredContextCompactor {
|
|
|
109
119
|
const updatedScratchpad = {
|
|
110
120
|
...scratchpadEvent,
|
|
111
121
|
isScratchpad: true,
|
|
112
|
-
author: "system"
|
|
122
|
+
author: "system",
|
|
123
|
+
...invocationContext.isolationScope === void 0 ? {} : { isolationScope: invocationContext.isolationScope }
|
|
113
124
|
};
|
|
114
|
-
const
|
|
115
|
-
const
|
|
116
|
-
|
|
117
|
-
...
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
125
|
+
const shouldReplaceEvent = /* @__PURE__ */ __name((event) => invocationContext.isolationScope === void 0 || event.isolationScope === invocationContext.isolationScope, "shouldReplaceEvent");
|
|
126
|
+
const replacedEvents = /* @__PURE__ */ new Set([
|
|
127
|
+
...reusableScratchpad && shouldReplaceEvent(reusableScratchpad) ? [reusableScratchpad] : [],
|
|
128
|
+
...rawEventsToCompact.filter(shouldReplaceEvent)
|
|
129
|
+
]);
|
|
130
|
+
const firstReplacedIndex = events.findIndex(
|
|
131
|
+
(event) => replacedEvents.has(event)
|
|
132
|
+
);
|
|
133
|
+
const newEventsList = [];
|
|
134
|
+
let insertedScratchpad = false;
|
|
135
|
+
for (let index = 0; index < events.length; index++) {
|
|
136
|
+
const event = events[index];
|
|
137
|
+
if (index === firstReplacedIndex) {
|
|
138
|
+
newEventsList.push(updatedScratchpad);
|
|
139
|
+
insertedScratchpad = true;
|
|
140
|
+
}
|
|
141
|
+
if (!replacedEvents.has(event)) newEventsList.push(event);
|
|
142
|
+
}
|
|
143
|
+
if (!insertedScratchpad) newEventsList.push(updatedScratchpad);
|
|
121
144
|
events.length = 0;
|
|
122
145
|
events.push(...newEventsList);
|
|
123
146
|
}
|
|
@@ -26,7 +26,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
26
26
|
var compaction_utils_exports = {};
|
|
27
27
|
__export(compaction_utils_exports, {
|
|
28
28
|
calculateRetainStartIndex: () => calculateRetainStartIndex,
|
|
29
|
-
getActiveEvents: () => getActiveEvents
|
|
29
|
+
getActiveEvents: () => getActiveEvents,
|
|
30
|
+
isEventVisibleInIsolationScope: () => isEventVisibleInIsolationScope
|
|
30
31
|
});
|
|
31
32
|
module.exports = __toCommonJS(compaction_utils_exports);
|
|
32
33
|
var import_compacted_event = require("../events/compacted_event.js");
|
|
@@ -36,16 +37,23 @@ var import_event = require("../events/event.js");
|
|
|
36
37
|
* Copyright 2026 Google LLC
|
|
37
38
|
* SPDX-License-Identifier: Apache-2.0
|
|
38
39
|
*/
|
|
39
|
-
function getActiveEvents(events) {
|
|
40
|
-
const
|
|
40
|
+
function getActiveEvents(events, currentIsolationScope) {
|
|
41
|
+
const visibleEvents = events.filter(
|
|
42
|
+
(event) => isEventVisibleInIsolationScope(event, currentIsolationScope)
|
|
43
|
+
);
|
|
44
|
+
const latest = visibleEvents.filter(import_compacted_event.isCompactedEvent).pop();
|
|
41
45
|
return latest ? [
|
|
42
46
|
latest,
|
|
43
|
-
...
|
|
47
|
+
...visibleEvents.filter(
|
|
44
48
|
(e) => !(0, import_compacted_event.isCompactedEvent)(e) && e.timestamp > latest.endTime
|
|
45
49
|
)
|
|
46
|
-
] :
|
|
50
|
+
] : visibleEvents;
|
|
47
51
|
}
|
|
48
52
|
__name(getActiveEvents, "getActiveEvents");
|
|
53
|
+
function isEventVisibleInIsolationScope(event, currentIsolationScope) {
|
|
54
|
+
return event.isolationScope === void 0 || event.isolationScope === currentIsolationScope;
|
|
55
|
+
}
|
|
56
|
+
__name(isEventVisibleInIsolationScope, "isEventVisibleInIsolationScope");
|
|
49
57
|
function calculateRetainStartIndex(rawEvents, eventRetentionSize) {
|
|
50
58
|
let retainStartIndex = Math.max(0, rawEvents.length - eventRetentionSize);
|
|
51
59
|
while (retainStartIndex > 0) {
|
|
@@ -63,5 +71,6 @@ __name(calculateRetainStartIndex, "calculateRetainStartIndex");
|
|
|
63
71
|
// Annotate the CommonJS export names for ESM import in node:
|
|
64
72
|
0 && (module.exports = {
|
|
65
73
|
calculateRetainStartIndex,
|
|
66
|
-
getActiveEvents
|
|
74
|
+
getActiveEvents,
|
|
75
|
+
isEventVisibleInIsolationScope
|
|
67
76
|
});
|
|
@@ -46,7 +46,10 @@ const _TokenBasedContextCompactor = class _TokenBasedContextCompactor {
|
|
|
46
46
|
}
|
|
47
47
|
shouldCompact(invocationContext) {
|
|
48
48
|
const events = invocationContext.session.events;
|
|
49
|
-
const activeEvents = (0, import_compaction_utils.getActiveEvents)(
|
|
49
|
+
const activeEvents = (0, import_compaction_utils.getActiveEvents)(
|
|
50
|
+
events,
|
|
51
|
+
invocationContext.isolationScope
|
|
52
|
+
);
|
|
50
53
|
const rawEvents = activeEvents.filter((e) => !(0, import_compacted_event.isCompactedEvent)(e));
|
|
51
54
|
if (rawEvents.length <= this.eventRetentionSize) {
|
|
52
55
|
return false;
|
|
@@ -68,8 +71,12 @@ const _TokenBasedContextCompactor = class _TokenBasedContextCompactor {
|
|
|
68
71
|
return promptTokenCount > this.tokenThreshold;
|
|
69
72
|
}
|
|
70
73
|
async compact(invocationContext) {
|
|
74
|
+
var _a;
|
|
71
75
|
const events = invocationContext.session.events;
|
|
72
|
-
const activeEvents = (0, import_compaction_utils.getActiveEvents)(
|
|
76
|
+
const activeEvents = (0, import_compaction_utils.getActiveEvents)(
|
|
77
|
+
events,
|
|
78
|
+
invocationContext.isolationScope
|
|
79
|
+
);
|
|
73
80
|
const rawEvents = activeEvents.filter((e) => !(0, import_compacted_event.isCompactedEvent)(e));
|
|
74
81
|
if (rawEvents.length <= this.eventRetentionSize) {
|
|
75
82
|
return;
|
|
@@ -93,6 +100,7 @@ const _TokenBasedContextCompactor = class _TokenBasedContextCompactor {
|
|
|
93
100
|
requestedToolConfirmations: {}
|
|
94
101
|
};
|
|
95
102
|
}
|
|
103
|
+
(_a = compactedEvent.isolationScope) != null ? _a : compactedEvent.isolationScope = invocationContext.isolationScope;
|
|
96
104
|
invocationContext.session.events.push(compactedEvent);
|
|
97
105
|
}
|
|
98
106
|
};
|