@google/adk 2.2.1 → 2.3.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.
Files changed (226) hide show
  1. package/dist/cjs/a2a/a2a_remote_agent.js +4 -1
  2. package/dist/cjs/a2a/agent_card.js +102 -26
  3. package/dist/cjs/a2a/agent_to_a2a.js +1 -1
  4. package/dist/cjs/agents/functions.js +199 -25
  5. package/dist/cjs/agents/instructions.js +4 -1
  6. package/dist/cjs/agents/invocation_context.js +26 -4
  7. package/dist/cjs/agents/langgraph_agent.js +152 -0
  8. package/dist/cjs/agents/llm_agent.js +175 -101
  9. package/dist/cjs/agents/processors/code_execution_request_processor.js +10 -6
  10. package/dist/cjs/agents/remote_agent.js +187 -0
  11. package/dist/cjs/artifacts/in_memory_artifact_service.js +14 -0
  12. package/dist/cjs/auth/auth_handler.js +37 -5
  13. package/dist/cjs/auth/auth_schemes.js +9 -0
  14. package/dist/cjs/cli/cli_eval.js +532 -0
  15. package/dist/cjs/cli/utils/envs.js +116 -0
  16. package/dist/cjs/cli/utils/evals.js +137 -0
  17. package/dist/cjs/cli/utils/logs.js +150 -0
  18. package/dist/cjs/code_executors/agent_engine_sandbox_code_executor.js +7 -2
  19. package/dist/cjs/code_executors/code_execution_utils.js +48 -16
  20. package/dist/cjs/code_executors/code_executor_context.js +6 -2
  21. package/dist/cjs/common.js +72 -0
  22. package/dist/cjs/context/summarizers/llm_summarizer.js +12 -10
  23. package/dist/cjs/context/token_based_context_compactor.js +2 -1
  24. package/dist/cjs/events/event.js +4 -2
  25. package/dist/cjs/examples/example_util.js +23 -2
  26. package/dist/cjs/flows/llm_flows/audio_transcriber.js +170 -0
  27. package/dist/cjs/index.js +97 -1
  28. package/dist/cjs/integrations/agent_registry/helpers.js +1 -1
  29. package/dist/cjs/models/gemini_llm_connection.js +16 -8
  30. package/dist/cjs/models/google_llm.js +13 -16
  31. package/dist/cjs/models/llm_response.js +9 -1
  32. package/dist/cjs/models/registry.js +1 -1
  33. package/dist/cjs/models/routed_llm.js +9 -8
  34. package/dist/cjs/planners/plan_re_act_planner.js +1 -1
  35. package/dist/cjs/runner/in_memory_runner.js +6 -11
  36. package/dist/cjs/runner/runner.js +105 -33
  37. package/dist/cjs/sessions/db/operations.js +1 -1
  38. package/dist/cjs/sessions/in_memory_session_service.js +3 -1
  39. package/dist/cjs/sessions/state.js +8 -4
  40. package/dist/cjs/sessions/vertex_ai_session_service.js +34 -15
  41. package/dist/cjs/telemetry/tracing.js +97 -66
  42. package/dist/cjs/tools/agent_tool.js +44 -0
  43. package/dist/cjs/tools/apihub_tool/apihub_toolset.js +142 -0
  44. package/dist/cjs/tools/apihub_tool/clients/apihub_client.js +272 -0
  45. package/dist/cjs/tools/apihub_tool/clients/secret_client.js +148 -0
  46. package/dist/cjs/tools/apihub_tool/clients/service_account.js +48 -0
  47. package/dist/cjs/tools/application_integration_tool/application_integration_toolset.js +185 -0
  48. package/dist/cjs/tools/application_integration_tool/clients/cloud_request.js +133 -0
  49. package/dist/cjs/tools/application_integration_tool/clients/connections_client.js +603 -0
  50. package/dist/cjs/tools/application_integration_tool/clients/integration_client.js +219 -0
  51. package/dist/cjs/tools/crewai_tool.js +132 -0
  52. package/dist/cjs/tools/example_tool.js +10 -0
  53. package/dist/cjs/tools/function_tool.js +319 -0
  54. package/dist/cjs/tools/google_api_tool/google_api_tool.js +97 -0
  55. package/dist/cjs/tools/google_api_tool/google_api_tool_set.js +226 -0
  56. package/dist/cjs/tools/google_api_tool/google_api_tool_sets.js +58 -0
  57. package/dist/cjs/tools/google_api_tool/googleapi_to_openapi_converter.js +440 -0
  58. package/dist/cjs/tools/google_api_tool/index.js +64 -0
  59. package/dist/cjs/tools/langchain_tool.js +172 -0
  60. package/dist/cjs/tools/mcp/index.js +12 -0
  61. package/dist/cjs/tools/mcp/mcp_session_manager.js +25 -0
  62. package/dist/cjs/tools/openapi_tool/auth/auth_helpers.js +1 -2
  63. package/dist/cjs/tools/openapi_tool/auth/credential_exchangers/auto_auth_credential_exchanger.js +46 -2
  64. package/dist/cjs/tools/openapi_tool/auth/credential_exchangers/oauth2_exchanger.js +2 -1
  65. package/dist/cjs/tools/openapi_tool/auth/credential_exchangers/service_account_exchanger.js +94 -10
  66. package/dist/cjs/tools/openapi_tool/openapi_spec_parser/tool_auth_handler.js +14 -2
  67. package/dist/cjs/tools/retrieval/base_retrieval_tool.js +18 -3
  68. package/dist/cjs/tools/toolbox_tool.js +108 -0
  69. package/dist/cjs/utils/env_aware_utils.js +6 -8
  70. package/dist/cjs/utils/error_utils.js +11 -11
  71. package/dist/cjs/utils/file_extension_utils.js +11 -0
  72. package/dist/cjs/utils/file_utils.js +2 -24
  73. package/dist/cjs/utils/gemini_schema_util.js +4 -1
  74. package/dist/cjs/utils/json_utils.js +49 -0
  75. package/dist/cjs/utils/live_connection_utils.js +4 -5
  76. package/dist/cjs/utils/logger_node.js +7 -1
  77. package/dist/cjs/utils/object_notation_utils.js +6 -3
  78. package/dist/cjs/utils/streaming_utils.js +12 -12
  79. package/dist/cjs/version.js +1 -1
  80. package/dist/esm/a2a/a2a_remote_agent.js +4 -1
  81. package/dist/esm/a2a/agent_card.js +103 -27
  82. package/dist/esm/a2a/agent_to_a2a.js +5 -2
  83. package/dist/esm/agents/functions.js +198 -25
  84. package/dist/esm/agents/instructions.js +4 -1
  85. package/dist/esm/agents/invocation_context.js +24 -4
  86. package/dist/esm/agents/langgraph_agent.js +123 -0
  87. package/dist/esm/agents/llm_agent.js +185 -104
  88. package/dist/esm/agents/processors/code_execution_request_processor.js +13 -8
  89. package/dist/esm/agents/remote_agent.js +164 -0
  90. package/dist/esm/artifacts/in_memory_artifact_service.js +14 -0
  91. package/dist/esm/auth/auth_handler.js +37 -5
  92. package/dist/esm/auth/auth_schemes.js +8 -0
  93. package/dist/esm/cli/cli_eval.js +510 -0
  94. package/dist/esm/cli/utils/envs.js +78 -0
  95. package/dist/esm/cli/utils/evals.js +109 -0
  96. package/dist/esm/cli/utils/logs.js +111 -0
  97. package/dist/esm/code_executors/agent_engine_sandbox_code_executor.js +7 -2
  98. package/dist/esm/code_executors/code_execution_utils.js +46 -16
  99. package/dist/esm/code_executors/code_executor_context.js +5 -2
  100. package/dist/esm/common.js +67 -3
  101. package/dist/esm/context/summarizers/llm_summarizer.js +12 -10
  102. package/dist/esm/context/token_based_context_compactor.js +2 -1
  103. package/dist/esm/events/event.js +4 -2
  104. package/dist/esm/examples/example_util.js +21 -1
  105. package/dist/esm/flows/llm_flows/audio_transcriber.js +142 -0
  106. package/dist/esm/index.js +99 -1
  107. package/dist/esm/integrations/agent_registry/helpers.js +1 -1
  108. package/dist/esm/models/gemini_llm_connection.js +16 -8
  109. package/dist/esm/models/google_llm.js +14 -17
  110. package/dist/esm/models/llm_response.js +9 -1
  111. package/dist/esm/models/registry.js +1 -1
  112. package/dist/esm/models/routed_llm.js +9 -8
  113. package/dist/esm/planners/plan_re_act_planner.js +1 -1
  114. package/dist/esm/runner/in_memory_runner.js +6 -11
  115. package/dist/esm/runner/runner.js +105 -33
  116. package/dist/esm/sessions/db/operations.js +1 -1
  117. package/dist/esm/sessions/in_memory_session_service.js +3 -1
  118. package/dist/esm/sessions/state.js +8 -4
  119. package/dist/esm/sessions/vertex_ai_session_service.js +34 -15
  120. package/dist/esm/telemetry/tracing.js +97 -66
  121. package/dist/esm/tools/agent_tool.js +44 -0
  122. package/dist/esm/tools/apihub_tool/apihub_toolset.js +106 -0
  123. package/dist/esm/tools/apihub_tool/clients/apihub_client.js +244 -0
  124. package/dist/esm/tools/apihub_tool/clients/secret_client.js +132 -0
  125. package/dist/esm/tools/apihub_tool/clients/service_account.js +21 -0
  126. package/dist/esm/tools/application_integration_tool/application_integration_toolset.js +163 -0
  127. package/dist/esm/tools/application_integration_tool/clients/cloud_request.js +103 -0
  128. package/dist/esm/tools/application_integration_tool/clients/connections_client.js +561 -0
  129. package/dist/esm/tools/application_integration_tool/clients/integration_client.js +215 -0
  130. package/dist/esm/tools/crewai_tool.js +107 -0
  131. package/dist/esm/tools/example_tool.js +13 -1
  132. package/dist/esm/tools/function_tool.js +316 -0
  133. package/dist/esm/tools/google_api_tool/google_api_tool.js +70 -0
  134. package/dist/esm/tools/google_api_tool/google_api_tool_set.js +188 -0
  135. package/dist/esm/tools/google_api_tool/google_api_tool_sets.js +24 -0
  136. package/dist/esm/tools/google_api_tool/googleapi_to_openapi_converter.js +393 -0
  137. package/dist/esm/tools/google_api_tool/index.js +33 -0
  138. package/dist/esm/tools/langchain_tool.js +148 -0
  139. package/dist/esm/tools/mcp/index.js +6 -0
  140. package/dist/esm/tools/mcp/mcp_session_manager.js +25 -0
  141. package/dist/esm/tools/openapi_tool/auth/auth_helpers.js +1 -2
  142. package/dist/esm/tools/openapi_tool/auth/credential_exchangers/auto_auth_credential_exchanger.js +50 -3
  143. package/dist/esm/tools/openapi_tool/auth/credential_exchangers/oauth2_exchanger.js +2 -1
  144. package/dist/esm/tools/openapi_tool/auth/credential_exchangers/service_account_exchanger.js +94 -10
  145. package/dist/esm/tools/openapi_tool/openapi_spec_parser/tool_auth_handler.js +15 -2
  146. package/dist/esm/tools/retrieval/base_retrieval_tool.js +16 -2
  147. package/dist/esm/tools/toolbox_tool.js +80 -0
  148. package/dist/esm/utils/env_aware_utils.js +6 -8
  149. package/dist/esm/utils/error_utils.js +9 -10
  150. package/dist/esm/utils/file_extension_utils.js +11 -0
  151. package/dist/esm/utils/file_utils.js +2 -23
  152. package/dist/esm/utils/gemini_schema_util.js +4 -1
  153. package/dist/esm/utils/json_utils.js +21 -0
  154. package/dist/esm/utils/live_connection_utils.js +4 -5
  155. package/dist/esm/utils/logger_node.js +7 -1
  156. package/dist/esm/utils/object_notation_utils.js +4 -2
  157. package/dist/esm/utils/streaming_utils.js +11 -11
  158. package/dist/esm/version.js +1 -1
  159. package/dist/types/a2a/a2a_remote_agent.d.ts +9 -0
  160. package/dist/types/a2a/agent_card.d.ts +44 -1
  161. package/dist/types/a2a/agent_to_a2a.d.ts +9 -0
  162. package/dist/types/a2a/index.d.ts +1 -0
  163. package/dist/types/agents/functions.d.ts +33 -1
  164. package/dist/types/agents/invocation_context.d.ts +20 -1
  165. package/dist/types/agents/langgraph_agent.d.ts +153 -0
  166. package/dist/types/agents/remote_agent.d.ts +68 -0
  167. package/dist/types/auth/auth_handler.d.ts +28 -1
  168. package/dist/types/auth/auth_schemes.d.ts +13 -0
  169. package/dist/types/cli/cli_eval.d.ts +173 -0
  170. package/dist/types/cli/utils/envs.d.ts +23 -0
  171. package/dist/types/cli/utils/evals.d.ts +47 -0
  172. package/dist/types/cli/utils/logs.d.ts +38 -0
  173. package/dist/types/code_executors/code_execution_utils.d.ts +39 -0
  174. package/dist/types/code_executors/code_executor_context.d.ts +1 -0
  175. package/dist/types/common.d.ts +27 -4
  176. package/dist/types/events/event.d.ts +4 -0
  177. package/dist/types/examples/example_util.d.ts +17 -0
  178. package/dist/types/flows/llm_flows/audio_transcriber.d.ts +85 -0
  179. package/dist/types/index.d.ts +16 -1
  180. package/dist/types/models/gemini_llm_connection.d.ts +6 -7
  181. package/dist/types/models/routed_llm.d.ts +1 -1
  182. package/dist/types/runner/in_memory_runner.d.ts +2 -1
  183. package/dist/types/runner/runner.d.ts +34 -0
  184. package/dist/types/sessions/state.d.ts +5 -1
  185. package/dist/types/sessions/vertex_ai_session_service.d.ts +8 -0
  186. package/dist/types/skills/skill.d.ts +1 -1
  187. package/dist/types/telemetry/tracing.d.ts +4 -2
  188. package/dist/types/tools/apihub_tool/apihub_toolset.d.ts +122 -0
  189. package/dist/types/tools/apihub_tool/clients/apihub_client.d.ts +142 -0
  190. package/dist/types/tools/apihub_tool/clients/secret_client.d.ts +55 -0
  191. package/dist/types/tools/apihub_tool/clients/service_account.d.ts +11 -0
  192. package/dist/types/tools/application_integration_tool/application_integration_toolset.d.ts +86 -0
  193. package/dist/types/tools/application_integration_tool/clients/cloud_request.d.ts +53 -0
  194. package/dist/types/tools/application_integration_tool/clients/connections_client.d.ts +215 -0
  195. package/dist/types/tools/application_integration_tool/clients/integration_client.d.ts +72 -0
  196. package/dist/types/tools/crewai_tool.d.ts +85 -0
  197. package/dist/types/tools/example_tool.d.ts +10 -0
  198. package/dist/types/tools/function_tool.d.ts +32 -0
  199. package/dist/types/tools/google_api_tool/google_api_tool.d.ts +30 -0
  200. package/dist/types/tools/google_api_tool/google_api_tool_set.d.ts +78 -0
  201. package/dist/types/tools/google_api_tool/google_api_tool_sets.d.ts +33 -0
  202. package/dist/types/tools/google_api_tool/googleapi_to_openapi_converter.d.ts +164 -0
  203. package/dist/types/tools/google_api_tool/index.d.ts +11 -0
  204. package/dist/types/tools/langchain_tool.d.ts +103 -0
  205. package/dist/types/tools/mcp/index.d.ts +3 -0
  206. package/dist/types/tools/mcp/mcp_session_manager.d.ts +34 -1
  207. package/dist/types/tools/mcp/mcp_toolset.d.ts +15 -0
  208. package/dist/types/tools/openapi_tool/auth/auth_helpers.d.ts +19 -0
  209. package/dist/types/tools/openapi_tool/auth/credential_exchangers/auto_auth_credential_exchanger.d.ts +18 -1
  210. package/dist/types/tools/openapi_tool/openapi_spec_parser/tool_auth_handler.d.ts +2 -1
  211. package/dist/types/tools/retrieval/base_retrieval_tool.d.ts +15 -0
  212. package/dist/types/tools/toolbox_tool.d.ts +73 -0
  213. package/dist/types/utils/env_aware_utils.d.ts +18 -2
  214. package/dist/types/utils/error_utils.d.ts +7 -0
  215. package/dist/types/utils/file_utils.d.ts +6 -1
  216. package/dist/types/utils/gemini_schema_util.d.ts +1 -2
  217. package/dist/types/utils/json_utils.d.ts +11 -0
  218. package/dist/types/utils/object_notation_utils.d.ts +7 -0
  219. package/dist/types/utils/streaming_utils.d.ts +11 -4
  220. package/dist/types/version.d.ts +1 -1
  221. package/dist/web/index_web.js +102 -103
  222. package/dist/web/index_web.js.map +4 -4
  223. package/package.json +8 -3
  224. package/dist/cjs/models/gemini_continuation.js +0 -232
  225. package/dist/esm/models/gemini_continuation.js +0 -205
  226. package/dist/types/models/gemini_continuation.d.ts +0 -59
@@ -0,0 +1,173 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { BaseAgent } from '../agents/base_agent.js';
7
+ import { BaseArtifactService } from '../artifacts/base_artifact_service.js';
8
+ import { BaseSessionService } from '../sessions/base_session_service.js';
9
+ import { EvaluationItem } from './utils/evals.js';
10
+ /**
11
+ * Error message when evaluation dependencies are missing.
12
+ */
13
+ export declare const MISSING_EVAL_DEPENDENCIES_MESSAGE = "Eval module is not installed, please install via `pip install google-adk[eval]`.";
14
+ /**
15
+ * Metric key for average tool trajectory score.
16
+ */
17
+ export declare const TOOL_TRAJECTORY_SCORE_KEY = "tool_trajectory_avg_score";
18
+ /**
19
+ * Metric key for response match (ROUGE-1) score.
20
+ */
21
+ export declare const RESPONSE_MATCH_SCORE_KEY = "response_match_score";
22
+ /**
23
+ * Metric key for LLM-based response evaluation score.
24
+ */
25
+ export declare const RESPONSE_EVALUATION_SCORE_KEY = "response_evaluation_score";
26
+ /**
27
+ * Prefix applied to session IDs generated during evaluation runs.
28
+ */
29
+ export declare const EVAL_SESSION_ID_PREFIX = "___eval___session___";
30
+ /**
31
+ * Default evaluation criteria thresholds when no config file is supplied.
32
+ */
33
+ export declare const DEFAULT_CRITERIA: Record<string, number>;
34
+ /**
35
+ * Outcome status of an evaluation metric or case.
36
+ */
37
+ export declare enum EvalStatus {
38
+ PASSED = 1,
39
+ FAILED = 2,
40
+ NOT_EVALUATED = 3
41
+ }
42
+ /**
43
+ * An evaluation metric definition and its pass threshold.
44
+ */
45
+ export interface EvalMetric {
46
+ metric_name: string;
47
+ threshold: number;
48
+ }
49
+ /**
50
+ * Result of evaluating a single metric.
51
+ */
52
+ export interface EvalMetricResult extends EvalMetric {
53
+ score?: number;
54
+ eval_status: EvalStatus;
55
+ }
56
+ /**
57
+ * Per-invocation evaluation metric breakdown.
58
+ */
59
+ export interface InvocationEvalMetricResult {
60
+ actual_invocation: EvaluationItem;
61
+ expected_invocation: EvaluationItem;
62
+ eval_metric_results: EvalMetricResult[];
63
+ }
64
+ /**
65
+ * Complete evaluation result for a single eval case in an evalset.
66
+ */
67
+ export interface EvalResult {
68
+ eval_set_file: string;
69
+ eval_id: string;
70
+ final_eval_status: EvalStatus;
71
+ eval_metric_results: Array<[EvalMetric, EvalMetricResult]>;
72
+ overall_eval_metric_results: EvalMetricResult[];
73
+ eval_metric_result_per_invocation: InvocationEvalMetricResult[];
74
+ session_id: string;
75
+ user_id?: string;
76
+ }
77
+ /**
78
+ * Request payload for adding a session to an eval set (`add_session`).
79
+ */
80
+ export interface AddSessionToEvalSetRequest {
81
+ evalId: string;
82
+ sessionId: string;
83
+ userId: string;
84
+ }
85
+ /**
86
+ * Request payload for running evaluations on an eval set (`run_eval`).
87
+ */
88
+ export interface RunEvalRequest {
89
+ evalIds: string[];
90
+ evalMetrics: EvalMetric[];
91
+ }
92
+ /**
93
+ * Result returned for a single evaluation case by the `run_eval` endpoint.
94
+ */
95
+ export interface RunEvalResult extends EvalResult {
96
+ evalSetFile: string;
97
+ evalSetId: string;
98
+ evalId: string;
99
+ finalEvalStatus: EvalStatus;
100
+ evalMetricResults: Array<[EvalMetric, EvalMetricResult]>;
101
+ overallEvalMetricResults: EvalMetricResult[];
102
+ evalMetricResultPerInvocation: InvocationEvalMetricResult[];
103
+ userId?: string;
104
+ sessionId: string;
105
+ }
106
+ /**
107
+ * Initial session metadata for an evaluation case.
108
+ */
109
+ export interface EvalInitialSession {
110
+ state?: Record<string, unknown>;
111
+ app_name?: string;
112
+ user_id?: string;
113
+ }
114
+ /**
115
+ * A named evaluation case within an evalset file.
116
+ */
117
+ export interface EvalEntry {
118
+ name: string;
119
+ data: EvaluationItem[];
120
+ initial_session?: EvalInitialSession;
121
+ }
122
+ /**
123
+ * Alias for a single evaluation case entry in an evalset.
124
+ */
125
+ export type EvalSetItem = EvalEntry;
126
+ /**
127
+ * Options for running evaluations via `runEvals`.
128
+ */
129
+ export interface RunEvalsOptions {
130
+ evalCasesByEvalSetId: Record<string, EvalEntry[] | string[]>;
131
+ rootAgent: BaseAgent;
132
+ resetFunc?: () => void | Promise<void>;
133
+ evalMetrics?: EvalMetric[];
134
+ printDetailedResults?: boolean;
135
+ sessionService?: BaseSessionService;
136
+ artifactService?: BaseArtifactService;
137
+ }
138
+ /**
139
+ * Loads evaluation criteria from a JSON config file, or returns `DEFAULT_CRITERIA`
140
+ * if no path is supplied.
141
+ *
142
+ * @param evalConfigFilePath Optional path to a `test_config.json` file.
143
+ * @returns Map of metric names to numeric thresholds.
144
+ */
145
+ export declare function getEvaluationCriteriaOrDefault(evalConfigFilePath?: string): Record<string, number>;
146
+ /**
147
+ * Dynamically imports an agent module and returns its `rootAgent`.
148
+ *
149
+ * @param agentModuleFilePath File or directory path to the agent module.
150
+ * @returns The loaded `BaseAgent` instance.
151
+ */
152
+ export declare function getRootAgent(agentModuleFilePath: string): Promise<BaseAgent>;
153
+ /**
154
+ * Attempts to retrieve an optional `reset_data` or `resetData` function from
155
+ * the agent module.
156
+ *
157
+ * @param agentModuleFilePath File or directory path to the agent module.
158
+ * @returns The reset function if exported, or `undefined`.
159
+ */
160
+ export declare function tryGetResetFunc(agentModuleFilePath: string): Promise<(() => void | Promise<void>) | undefined>;
161
+ /**
162
+ * Parses CLI evalset file arguments of the form `file_path` or
163
+ * `file_path:eval_1,eval_2` into a mapping from file path to requested eval IDs.
164
+ *
165
+ * @param evalSetFilePaths Array of evalset file specifications.
166
+ * @returns Mapping of evalset file path to list of eval case names.
167
+ */
168
+ export declare function parseAndGetEvalsToRun(evalSetFilePaths: string[]): Record<string, string[]>;
169
+ /**
170
+ * Runs a collection of evaluation cases against `rootAgent` and yields an
171
+ * `EvalResult` for each case.
172
+ */
173
+ export declare function runEvals(optionsOrMap: RunEvalsOptions | Record<string, EvalEntry[] | string[]>, rootAgentArg?: BaseAgent, resetFuncArg?: () => void | Promise<void>, evalMetricsArg?: EvalMetric[], printDetailedResultsArg?: boolean, sessionServiceArg?: BaseSessionService, artifactServiceArg?: BaseArtifactService): AsyncGenerator<EvalResult, void, void>;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ /**
7
+ * Walks up the directory tree starting from `folder` until `filename` is found,
8
+ * or until the filesystem root is reached.
9
+ *
10
+ * @param folder The directory to start searching from.
11
+ * @param filename The file name to look for. Defaults to `'.env'`.
12
+ * @returns The absolute path to the found file, or `''` if not found.
13
+ */
14
+ export declare function walkToRootUntilFound(folder: string, filename?: string): string;
15
+ /**
16
+ * Walks up from the agent directory to the root directory and loads the first
17
+ * `.env` file found into `process.env` with override semantics.
18
+ *
19
+ * @param agentName The name or path of the agent.
20
+ * @param agentParentFolder The parent directory containing the agent. Defaults to `'.'`.
21
+ * @param filename The dotenv filename to search for. Defaults to `'.env'`.
22
+ */
23
+ export declare function loadDotenvForAgent(agentName: string, agentParentFolder?: string, filename?: string): void;
@@ -0,0 +1,47 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { Part } from '@google/genai';
7
+ import { BaseAgent } from '../../agents/base_agent.js';
8
+ import { Session } from '../../sessions/session.js';
9
+ /**
10
+ * Represents a single expected tool invocation in an evaluation item.
11
+ */
12
+ export interface ToolUseItem {
13
+ tool_name: string;
14
+ tool_input: Record<string, unknown>;
15
+ mock_tool_output?: unknown;
16
+ }
17
+ /**
18
+ * Represents an intermediate agent response tuple of `[author, parts]`.
19
+ */
20
+ export type IntermediateAgentResponseItem = [string, Part[]];
21
+ /**
22
+ * Represents a single turn in an evaluation dataset converted from a session.
23
+ */
24
+ export interface EvaluationItem {
25
+ query: string;
26
+ expected_tool_use: ToolUseItem[];
27
+ expected_intermediate_agent_responses: IntermediateAgentResponseItem[];
28
+ reference: string;
29
+ }
30
+ /**
31
+ * Converts a session into a list of evaluation items suitable for saving into
32
+ * an evalset or running through `runEvals`.
33
+ *
34
+ * @param session The session whose events should be converted.
35
+ * @returns An array of `EvaluationItem` records, one per user turn.
36
+ */
37
+ export declare function convertSessionToEvalFormat(session?: Session): EvaluationItem[];
38
+ /**
39
+ * Creates a state object initialized with empty strings `''` for all `{var}`
40
+ * placeholders referenced in the instruction strings of `agent` and its
41
+ * sub-agents, overridden by any keys provided in `initializedStates`.
42
+ *
43
+ * @param agent The root agent to inspect.
44
+ * @param initializedStates Optional pre-initialized state values that take precedence.
45
+ * @returns The combined state record.
46
+ */
47
+ export declare function createEmptyState(agent: BaseAgent, initializedStates?: Record<string, unknown>): Record<string, unknown>;
@@ -0,0 +1,38 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { LogLevel } from '../../utils/logger.js';
7
+ /**
8
+ * Standard log format template for CLI log output.
9
+ */
10
+ export declare const LOGGING_FORMAT = "%(asctime)s - %(levelname)s - %(filename)s:%(lineno)d - %(message)s";
11
+ /**
12
+ * Options for configuring `logToTmpFolder`.
13
+ */
14
+ export interface LogToTmpFolderOptions {
15
+ /** Minimum log level to record. Defaults to `LogLevel.INFO`. */
16
+ level?: LogLevel;
17
+ /** Subdirectory inside the system temp folder. Defaults to `'agents_log'`. */
18
+ subFolder?: string;
19
+ /** Prefix for generated log files. Defaults to `'agent'`. */
20
+ logFilePrefix?: string;
21
+ /** Timestamp suffix for the log filename. Defaults to `YYYYMMDD_HHMMSS`. */
22
+ logFileTimestamp?: string;
23
+ }
24
+ /**
25
+ * Configures the global ADK logger to write formatted log records to `stderr`.
26
+ *
27
+ * @param level The minimum `LogLevel` to emit. Defaults to `LogLevel.INFO`.
28
+ */
29
+ export declare function logToStderr(level?: LogLevel): void;
30
+ /**
31
+ * Configures the global ADK logger to write formatted log records to a timestamped
32
+ * file in the system temporary directory and updates the `<prefix>.latest.log`
33
+ * symlink to point to the newest file.
34
+ *
35
+ * @param options Configuration options for the temporary log file.
36
+ * @returns The absolute path to the created log file.
37
+ */
38
+ export declare function logToTmpFolder(options?: LogToTmpFolderOptions): string;
@@ -90,6 +90,29 @@ export interface CodeExecutionResult {
90
90
  * @return The file content as a base64-encoded bytes.
91
91
  */
92
92
  export declare function getEncodedFileContent(data: string): string;
93
+ /**
94
+ * Gets the language of the code in a block from the block's leading delimiter.
95
+ *
96
+ * @param leadingDelimiter The leading delimiter of a code block, for example
97
+ * '```javascript\n'.
98
+ * @return The language that the fence tag names, or
99
+ * `CodeExecutionLanguage.UNSPECIFIED` for a tag that is not known. The
100
+ * executor decides what to do with an unspecified language.
101
+ */
102
+ export declare function getCodeBlockLanguage(leadingDelimiter: string): CodeExecutionLanguage;
103
+ /**
104
+ * A code block extracted from a model response.
105
+ */
106
+ export interface ExtractedCodeBlock {
107
+ /**
108
+ * The code in the block, or an empty string if there is no block.
109
+ */
110
+ code: string;
111
+ /**
112
+ * The language of the code, from the fence that matched it.
113
+ */
114
+ language: CodeExecutionLanguage;
115
+ }
93
116
  /**
94
117
  * Extracts the first code block from the content and truncate everything after
95
118
  * it.
@@ -100,6 +123,22 @@ export declare function getEncodedFileContent(data: string): string;
100
123
  * @return The first code block if found, otherwise an empty string.
101
124
  */
102
125
  export declare function extractCodeAndTruncateContent(content: Content, codeBlockDelimiters: Array<[string, string]>): string;
126
+ /**
127
+ * Extracts the first code block and its language from the content, and
128
+ * truncates everything after it.
129
+ *
130
+ * An `executableCode` part holds Python. A code block in text has the
131
+ * language of the fence tag in its leading delimiter: see
132
+ * {@link getCodeBlockLanguage}.
133
+ *
134
+ * @param content The mutable content to extract the code from.
135
+ * @param codeBlockDelimiters The list of the enclosing delimiters to identify
136
+ * the code blocks.
137
+ * @return The first code block and its language. With no code block, the
138
+ * code is an empty string and the language is
139
+ * `CodeExecutionLanguage.UNSPECIFIED`.
140
+ */
141
+ export declare function extractCodeBlockAndTruncateContent(content: Content, codeBlockDelimiters: Array<[string, string]>): ExtractedCodeBlock;
103
142
  /**
104
143
  * Builds an executable code part with code string.
105
144
  *
@@ -1,5 +1,6 @@
1
1
  import { State } from '../sessions/state.js';
2
2
  import { File } from './code_execution_utils.js';
3
+ export declare const CONTEXT_KEY = "_code_execution_context";
3
4
  /**
4
5
  * The parameters for updating the code execution result.
5
6
  * */
@@ -8,9 +8,11 @@ export type { ActiveStreamingToolParams } from './agents/active_streaming_tool.j
8
8
  export { BaseAgent, isBaseAgent } from './agents/base_agent.js';
9
9
  export type { AfterAgentCallback, BaseAgentConfig, BeforeAgentCallback, SingleAgentCallback, } from './agents/base_agent.js';
10
10
  export { Context } from './agents/context.js';
11
- export { REQUEST_CONFIRMATION_FUNCTION_CALL_NAME, REQUEST_CREDENTIAL_FUNCTION_CALL_NAME, REQUEST_INPUT_FUNCTION_CALL_NAME, findEventByFunctionCallId, findMatchingFunctionCall, functionsExportedForTestingOnly, isToolNotFound, } from './agents/functions.js';
12
- export { InvocationContext, requireAgent } from './agents/invocation_context.js';
11
+ export { REQUEST_CONFIRMATION_FUNCTION_CALL_NAME, REQUEST_CREDENTIAL_FUNCTION_CALL_NAME, REQUEST_INPUT_FUNCTION_CALL_NAME, findEventByFunctionCallId, findMatchingFunctionCall, functionsExportedForTestingOnly, handleFunctionCallsLive, isToolNotFound, } from './agents/functions.js';
12
+ export { InvocationContext, LlmCallsLimitExceededError, isLlmCallsLimitExceededError, requireAgent, } from './agents/invocation_context.js';
13
13
  export type { InvocationContextParams, WorkflowInstructionScope, } from './agents/invocation_context.js';
14
+ export { LangGraphAgent, getLastHumanMessages, isLangGraphAgent, } from './agents/langgraph_agent.js';
15
+ export type { CompiledGraphLike, LangGraphAIMessage, LangGraphAgentConfig, LangGraphContentPart, LangGraphHumanMessage, LangGraphInvokeInput, LangGraphInvokeOutput, LangGraphMessageContent, LangGraphMessageLike, LangGraphRunnableConfig, LangGraphStateSnapshot, LangGraphSystemMessage, } from './agents/langgraph_agent.js';
14
16
  export { LiveRequestQueue } from './agents/live_request_queue.js';
15
17
  export type { LiveRequest } from './agents/live_request_queue.js';
16
18
  export { LlmAgent as Agent, LlmAgent, isLlmAgent } from './agents/llm_agent.js';
@@ -20,13 +22,16 @@ export type { LoopAgentConfig } from './agents/loop_agent.js';
20
22
  export { ParallelAgent, isParallelAgent } from './agents/parallel_agent.js';
21
23
  export { AgentTransferLlmRequestProcessor } from './agents/processors/agent_transfer_llm_request_processor.js';
22
24
  export { BaseLlmRequestProcessor, BaseLlmResponseProcessor, } from './agents/processors/base_llm_processor.js';
25
+ export { CodeExecutionResponseProcessor } from './agents/processors/code_execution_request_processor.js';
23
26
  export { CONTENT_REQUEST_PROCESSOR, ContentRequestProcessor, } from './agents/processors/content_request_processor.js';
24
27
  export { ContextCompactorRequestProcessor } from './agents/processors/context_compactor_request_processor.js';
25
28
  export { INTERACTIONS_REQUEST_PROCESSOR, InteractionsRequestProcessor, } from './agents/processors/interactions_request_processor.js';
26
29
  export { ReadonlyContext } from './agents/readonly_context.js';
30
+ export { RemoteAgent, isRemoteAgent } from './agents/remote_agent.js';
31
+ export type { RemoteAgentConfig, RemoteAgentFetch, } from './agents/remote_agent.js';
27
32
  export { RoutedAgent, isRoutedAgent } from './agents/routed_agent.js';
28
33
  export type { AgentRouter, RoutedAgentConfig } from './agents/routed_agent.js';
29
- export { StreamingMode } from './agents/run_config.js';
34
+ export { StreamingMode, createRunConfig } from './agents/run_config.js';
30
35
  export type { RunConfig } from './agents/run_config.js';
31
36
  export { SequentialAgent, isSequentialAgent } from './agents/sequential_agent.js';
32
37
  export type { TranscriptionEntry } from './agents/transcription_entry.js';
@@ -44,7 +49,7 @@ export type { AuthCredential, HttpAuth, HttpCredentials, OAuth2Auth, ServiceAcco
44
49
  export { AuthHandler } from './auth/auth_handler.js';
45
50
  export { AUTH_PREPROCESSOR, AuthPreprocessor } from './auth/auth_preprocessor.js';
46
51
  export { AuthProviderRegistry } from './auth/auth_provider_registry.js';
47
- export { OAuthGrantType } from './auth/auth_schemes.js';
52
+ export { AuthSchemeType, OAuthGrantType, getOAuthGrantTypeFromFlow, } from './auth/auth_schemes.js';
48
53
  export type { AuthScheme, OpenIdConnectWithConfig } from './auth/auth_schemes.js';
49
54
  export type { AuthConfig } from './auth/auth_tool.js';
50
55
  export type { BaseAuthProvider } from './auth/base_auth_provider.js';
@@ -104,7 +109,9 @@ export { ChromeBuiltInLlm, ChromeModelUnavailableError, stripAdkIdentityPreamble
104
109
  export type { ChromeBuiltInDiagnostic, ChromeBuiltInLlmParams, ChromeCreateCoreOptions, ChromeCreateMonitor, ChromeCreateOptions, ChromeExpectedModality, ChromeLanguageModelFactory, ChromeLanguageModelSession, ChromeMessage, ChromeMessageContent, ChromeModelAvailability, ChromePromptOptions, } from './models/chrome_prompt_llm.js';
105
110
  export { Gemini, geminiInitParams } from './models/google_llm.js';
106
111
  export type { GeminiParams } from './models/google_llm.js';
112
+ export { appendInstructions } from './models/llm_request.js';
107
113
  export type { LlmRequest } from './models/llm_request.js';
114
+ export { createLlmResponse } from './models/llm_response.js';
108
115
  export type { LlmResponse } from './models/llm_response.js';
109
116
  export { LLMRegistry } from './models/registry.js';
110
117
  export type { BaseLlmType } from './models/registry.js';
@@ -115,6 +122,7 @@ export { BuiltInPlanner, isBuiltInPlanner } from './planners/built_in_planner.js
115
122
  export { PlanReActPlanner } from './planners/plan_re_act_planner.js';
116
123
  export { GLOBAL_SCOPE_KEY, REFLECT_AND_RETRY_RESPONSE_TYPE, ScopedFailureTracker, TrackingScope, resolveScopeKey, type PerItemFailuresCounter, type ToolFailureResponse, } from './plugins/_reflect_retry_utils.js';
117
124
  export { BasePlugin, ContextCompactionTrigger } from './plugins/base_plugin.js';
125
+ export type { DebugEntry, DebugLoggingPluginOptions, InvocationDebugState, } from './plugins/debug_logging_plugin.js';
118
126
  export { GlobalInstructionPlugin } from './plugins/global_instruction_plugin.js';
119
127
  export { LoggingPlugin } from './plugins/logging_plugin.js';
120
128
  export { PluginManager } from './plugins/plugin_manager.js';
@@ -176,9 +184,13 @@ export type { WebMCPDocument, WebMCPExecuteToolOptions, WebMCPGetToolsOptions, W
176
184
  export { AsyncQueue } from './utils/async_queue.js';
177
185
  export { renameReservedKeywords, toSnakeCaseName } from './utils/case_utils.js';
178
186
  export { getClientLabels, runWithClientLabel } from './utils/client_labels.js';
187
+ export { toGeminiSchema } from './utils/gemini_schema_util.js';
188
+ export type { MCPToolSchema } from './utils/gemini_schema_util.js';
189
+ export { genaiSchemaToJsonSchema } from './utils/genai_schema_to_json.js';
179
190
  export { LogLevel, getLogger, logger, resetLogger, setLogLevel, setLogger, } from './utils/logger.js';
180
191
  export type { Logger } from './utils/logger.js';
181
192
  export { isGemini2OrAbove, isGemini35LiveTranslate, isGemini3xFlashLive, isGemini3xLive, } from './utils/model_name.js';
193
+ export { toJsonSchema } from './utils/schema.js';
182
194
  export type { SchemaLike } from './utils/schema.js';
183
195
  export { zodObjectToSchema } from './utils/simple_zod_to_json.js';
184
196
  export { Task } from './utils/task.js';
@@ -204,3 +216,14 @@ export * from './features/feature_registry.js';
204
216
  export * from './memory/base_memory_service.js';
205
217
  export * from './sessions/base_session_service.js';
206
218
  export * from './tools/base_tool.js';
219
+ export { convertSessionToEvalFormat, createEmptyState, } from './cli/utils/evals.js';
220
+ export type { EvaluationItem, IntermediateAgentResponseItem, ToolUseItem, } from './cli/utils/evals.js';
221
+ export { CrewaiTool, isCrewaiTool } from './tools/crewai_tool.js';
222
+ export type { CrewaiSchemaLike, CrewaiToolConfig, CrewaiToolLike, } from './tools/crewai_tool.js';
223
+ export { buildFunctionDeclarationForLangchain, buildFunctionDeclarationForParamsForCrewai, buildFunctionDeclarationUtil, } from './tools/function_tool.js';
224
+ export type { CallLiveToolRequest } from './tools/function_tool.js';
225
+ export { LangchainTool, isLangchainTool } from './tools/langchain_tool.js';
226
+ export type { LangchainSchemaLike, LangchainToolConfig, LangchainToolLike, } from './tools/langchain_tool.js';
227
+ export { isBaseRetrievalTool } from './tools/retrieval/base_retrieval_tool.js';
228
+ export { ToolboxTool, isToolboxTool } from './tools/toolbox_tool.js';
229
+ export type { ToolboxClientLike, ToolboxToolOptions, } from './tools/toolbox_tool.js';
@@ -178,6 +178,10 @@ export declare function hasTrailingCodeExecutionResult(event: Event): boolean;
178
178
  export declare function stringifyContent(event: Event): string;
179
179
  /**
180
180
  * Estimates the number of tokens in the event based on usage metadata or characters.
181
+ *
182
+ * Prefers `initialPromptTokenCount`, because the promptTokenCount of a
183
+ * generation that @google/genai resumed after continuation pauses is summed
184
+ * over every resumed request, each of which resent the prompt.
181
185
  */
182
186
  export declare function getEventTokens(event: Event): number;
183
187
  /**
@@ -6,6 +6,23 @@
6
6
  import { Session } from '../sessions/session.js';
7
7
  import { BaseExampleProvider } from './base_example_provider.js';
8
8
  import { Example } from './example.js';
9
+ /**
10
+ * Throws unless `examples` is a well-formed list of {@link Example}s.
11
+ *
12
+ * Mirrors `TypeAdapter(list[Example]).validate_python` in the adk-python
13
+ * `ExampleTool` constructor. {@link Example} is erased at compile time, so a
14
+ * value that reaches the SDK from untyped JavaScript or from a configuration
15
+ * file is otherwise unchecked, and a malformed entry only fails later while the
16
+ * few-shot instruction is rendered.
17
+ *
18
+ * The value is checked but not replaced, so it keeps reference identity and no
19
+ * defensive copy is made.
20
+ *
21
+ * @param examples - The value to check.
22
+ * @throws {InputValidationError} When the value is not a list of well-formed
23
+ * examples. The message names the path of each failing field.
24
+ */
25
+ export declare function validateExamples(examples: unknown): asserts examples is Example[];
9
26
  /**
10
27
  * Converts a list of examples to a string that can be used in a system
11
28
  * instruction.
@@ -0,0 +1,85 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { Content } from '@google/genai';
7
+ import { InvocationContext } from '../../agents/invocation_context.js';
8
+ /**
9
+ * Audio encoding values matching Google Cloud Speech-to-Text `AudioEncoding`.
10
+ */
11
+ export declare enum AudioEncoding {
12
+ ENCODING_UNSPECIFIED = 0,
13
+ LINEAR16 = 1
14
+ }
15
+ /**
16
+ * Configuration passed to a Speech-to-Text client `recognize` call.
17
+ */
18
+ export interface RecognitionConfig {
19
+ encoding: AudioEncoding | keyof typeof AudioEncoding | number;
20
+ sampleRateHertz: number;
21
+ languageCode: string;
22
+ }
23
+ /**
24
+ * Audio payload passed to a Speech-to-Text client `recognize` call.
25
+ */
26
+ export interface RecognitionAudio {
27
+ content: Uint8Array | string;
28
+ }
29
+ /**
30
+ * A single alternative hypothesis from a Speech-to-Text recognition result.
31
+ */
32
+ export interface SpeechRecognitionAlternative {
33
+ transcript?: string | null;
34
+ confidence?: number | null;
35
+ }
36
+ /**
37
+ * A single Speech-to-Text recognition result segment.
38
+ */
39
+ export interface SpeechRecognitionResult {
40
+ alternatives?: SpeechRecognitionAlternative[] | null;
41
+ }
42
+ /**
43
+ * Response returned by a Speech-to-Text client `recognize` call.
44
+ */
45
+ export interface RecognizeResponse {
46
+ results?: SpeechRecognitionResult[] | null;
47
+ }
48
+ /**
49
+ * Duck-typed interface compatible with `@google-cloud/speech`'s `SpeechClient`
50
+ * as well as lightweight test or browser speech recognition clients.
51
+ */
52
+ export interface SpeechClientLike {
53
+ recognize(request: {
54
+ config: RecognitionConfig;
55
+ audio: RecognitionAudio;
56
+ }): Promise<RecognizeResponse | [RecognizeResponse, ...unknown[]]> | RecognizeResponse | [RecognizeResponse, ...unknown[]];
57
+ }
58
+ /**
59
+ * Options for constructing an {@link AudioTranscriber}.
60
+ */
61
+ export interface AudioTranscriberOptions {
62
+ /**
63
+ * Pre-configured Speech-to-Text client used to transcribe bundled user audio.
64
+ */
65
+ client?: SpeechClientLike;
66
+ }
67
+ /**
68
+ * Transcribes cached audio entries in an {@link InvocationContext} into
69
+ * conversation `Content` objects.
70
+ */
71
+ export declare class AudioTranscriber {
72
+ client: SpeechClientLike;
73
+ constructor(optionsOrClient?: AudioTranscriberOptions | SpeechClientLike);
74
+ /**
75
+ * Bundles consecutive audio blobs from the same speaker in
76
+ * `invocationContext.transcriptionCache`, transcribes user audio bundles into
77
+ * text `Content` entries, preserves already-transcribed `Content`
78
+ * entries in order, clears `invocationContext.transcriptionCache`, and
79
+ * returns the resulting content list.
80
+ *
81
+ * @param invocationContext The invocation context holding `transcriptionCache`.
82
+ * @returns Ordered list of transcribed `Content` objects.
83
+ */
84
+ transcribeFile(invocationContext: InvocationContext): Promise<Content[]>;
85
+ }
@@ -20,6 +20,7 @@ export { VertexAiMemoryBankService } from './memory/vertex_ai_memory_bank_servic
20
20
  export type { VertexAiMemoryBankServiceOptions } from './memory/vertex_ai_memory_bank_service.js';
21
21
  export { VertexAiRagMemoryService } from './memory/vertex_ai_rag_memory_service.js';
22
22
  export type { VertexAiRagMemoryServiceOptions } from './memory/vertex_ai_rag_memory_service.js';
23
+ export { DebugLoggingPlugin, isDebugLoggingPlugin, } from './plugins/debug_logging_plugin.js';
23
24
  export { DatabaseSessionService } from './sessions/database_session_service.js';
24
25
  export { getSessionServiceFromUri } from './sessions/registry.js';
25
26
  export { VertexAiSessionService } from './sessions/vertex_ai_session_service.js';
@@ -27,13 +28,20 @@ export type { VertexAiCreateSessionRequest, VertexAiSessionServiceOptions, } fro
27
28
  export { GCPSkillRegistry } from './skills/gcp_skill_registry.js';
28
29
  export type { GCPSkillRegistryOptions } from './skills/gcp_skill_registry.js';
29
30
  export { loadAllSkillsInDir, loadSkillFromDir, loadSkillFromZipBuffer, validateSkillDir, } from './skills/loader.js';
31
+ export { APIHubToolset, type APIHubToolsetOptions, } from './tools/apihub_tool/apihub_toolset.js';
32
+ export { APIHubClient, type APIHubApi, type APIHubApiVersion, type APIHubClientOptions, type BaseAPIHubClient, } from './tools/apihub_tool/clients/apihub_client.js';
33
+ export { SecretManagerClient, type SecretManagerClientOptions, } from './tools/apihub_tool/clients/secret_client.js';
34
+ export { ApplicationIntegrationToolset, type ApplicationIntegrationToolsetOptions, } from './tools/application_integration_tool/application_integration_toolset.js';
35
+ export { actionRequest, actionResponse, ConnectionsClient, CONNECTOR_BASE_SPEC, connectorPayload, createOperation, createOperationRequest, deleteOperation, deleteOperationRequest, executeCustomQueryRequest, getActionOperation, getOperation, getOperationRequest, listOperation, listOperationRequest, updateOperation, updateOperationRequest, type ActionSchema, type ConnectionDetails, type ConnectionsClientOptions, type ConnectorSpec, type EntityOperationOptions, type EntitySchemaAndOperations, type EntitySchemaOperationOptions, type GetActionOperationOptions, } from './tools/application_integration_tool/clients/connections_client.js';
36
+ export { IntegrationClient, type IntegrationClientOptions, } from './tools/application_integration_tool/clients/integration_client.js';
30
37
  export { LOAD_WEB_PAGE, loadWebPage } from './tools/load_web_page.js';
31
38
  export type { LoadWebPageOptions } from './tools/load_web_page.js';
32
39
  export { credentialToParam, dictToAuthScheme, INTERNAL_AUTH_PREFIX, openidDictToSchemeCredential, openidUrlToSchemeCredential, serviceAccountDictToSchemeCredential, serviceAccountSchemeCredential, tokenToSchemeCredential, } from './tools/openapi_tool/auth/auth_helpers.js';
40
+ export type { OpenIdConfig } from './tools/openapi_tool/auth/auth_helpers.js';
33
41
  export { AutoAuthCredentialExchanger } from './tools/openapi_tool/auth/credential_exchangers/auto_auth_credential_exchanger.js';
34
42
  export type { CustomCredentialExchangers } from './tools/openapi_tool/auth/credential_exchangers/auto_auth_credential_exchanger.js';
35
43
  export { AuthCredentialMissingError, BaseAuthCredentialExchanger, } from './tools/openapi_tool/auth/credential_exchangers/base_auth_credential_exchanger.js';
36
- export { exchangeCredential, OAuth2BearerExchanger, } from './tools/openapi_tool/auth/credential_exchangers/oauth2_exchanger.js';
44
+ export { exchangeCredential, generateAuthToken, OAuth2BearerExchanger, } from './tools/openapi_tool/auth/credential_exchangers/oauth2_exchanger.js';
37
45
  export { ServiceAccountCredentialExchanger } from './tools/openapi_tool/auth/credential_exchangers/service_account_exchanger.js';
38
46
  export { createApiParameter, generateParamDoc, generateReturnDoc, getTypeHint, } from './tools/openapi_tool/common/common.js';
39
47
  export type { ApiParameterInit } from './tools/openapi_tool/common/common.js';
@@ -52,7 +60,14 @@ export { LoadSkillResourceTool } from './tools/skill/load_skill_resource_tool.js
52
60
  export { RunSkillInlineScriptErrorCode, RunSkillInlineScriptTool, } from './tools/skill/run_skill_inline_script_tool.js';
53
61
  export { RunSkillScriptTool } from './tools/skill/run_skill_script_tool.js';
54
62
  export { SkillToolset } from './tools/skill/skill_toolset.js';
63
+ export type { JsonObject } from './utils/json_utils.js';
55
64
  export * from './integrations/agent_registry/agent_registry.js';
56
65
  export * from './telemetry/google_cloud.js';
57
66
  export * from './telemetry/setup.js';
67
+ export * from './tools/google_api_tool/index.js';
68
+ export { DEFAULT_CRITERIA, EVAL_SESSION_ID_PREFIX, EvalStatus, getEvaluationCriteriaOrDefault, getRootAgent, MISSING_EVAL_DEPENDENCIES_MESSAGE, parseAndGetEvalsToRun, RESPONSE_EVALUATION_SCORE_KEY, RESPONSE_MATCH_SCORE_KEY, runEvals, TOOL_TRAJECTORY_SCORE_KEY, tryGetResetFunc, } from './cli/cli_eval.js';
69
+ export type { AddSessionToEvalSetRequest, EvalEntry, EvalInitialSession, EvalMetric, EvalMetricResult, EvalResult, EvalSetItem, InvocationEvalMetricResult, RunEvalRequest, RunEvalResult, RunEvalsOptions, } from './cli/cli_eval.js';
70
+ export { loadDotenvForAgent, walkToRootUntilFound } from './cli/utils/envs.js';
71
+ export { LOGGING_FORMAT, logToStderr, logToTmpFolder } from './cli/utils/logs.js';
72
+ export type { LogToTmpFolderOptions } from './cli/utils/logs.js';
58
73
  export * from './tools/mcp/index.js';
@@ -11,6 +11,7 @@ export declare class GeminiLlmConnection implements BaseLlmConnection {
11
11
  private readonly geminiSession;
12
12
  private readonly modelVersion?;
13
13
  private readonly messageQueue?;
14
+ private messageIterator?;
14
15
  constructor(geminiSession: Session, modelVersion?: string | undefined, messageQueue?: AsyncIterable<LiveServerMessage> | undefined);
15
16
  /**
16
17
  * Sends the conversation history to the gemini model.
@@ -47,15 +48,13 @@ export declare class GeminiLlmConnection implements BaseLlmConnection {
47
48
  */
48
49
  sendActivityEnd(): Promise<void>;
49
50
  /**
50
- * Builds a full text response.
51
+ * Receives the model responses for one model turn.
51
52
  *
52
- * The text should not be partial and the returned LlmResponse is not be
53
- * partial.
53
+ * The generator ends after the message that completes the turn has been
54
+ * processed, or when the server closes the connection. Call `receive()`
55
+ * again to read the next turn; it continues from the next server message.
54
56
  *
55
- * @param text The text to be included in the response.
56
- * @param isThought Whether the text is a thought.
57
- * @param groundingMetadata The grounding metadata to include.
58
- * @returns An LlmResponse containing the full text.
57
+ * @returns A generator of the LlmResponses of one model turn.
59
58
  */
60
59
  receive(): AsyncGenerator<LlmResponse, void, void>;
61
60
  /**
@@ -28,7 +28,7 @@ export declare class RoutedLlm extends BaseLlm {
28
28
  /**
29
29
  * Generates content by delegating to the selected model.
30
30
  */
31
- generateContentAsync(llmRequest: LlmRequest, stream?: boolean): AsyncGenerator<LlmResponse, void>;
31
+ generateContentAsync(llmRequest: LlmRequest, stream?: boolean, abortSignal?: AbortSignal): AsyncGenerator<LlmResponse, void>;
32
32
  /**
33
33
  * Creates a live connection to the LLM by delegating to the selected model.
34
34
  * This live connection cannot be switched mid-stream, it is tied to the model
@@ -34,7 +34,8 @@ export declare class InMemoryRunner extends Runner {
34
34
  * @param params The configuration for the runner.
35
35
  * @param params.app An optional application instance to run.
36
36
  * @param params.agent The root agent to run.
37
- * @param params.appName The application name. Defaults to `'InMemoryRunner'`.
37
+ * @param params.appName The application name. Defaults to `app.name` when
38
+ * `app` is provided, or `'InMemoryRunner'` otherwise.
38
39
  * @param params.plugins An optional list of plugins.
39
40
  * @param params.resumabilityConfig An optional resumability configuration.
40
41
  */