@google/adk 0.2.3 → 0.2.4

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 (32) hide show
  1. package/dist/cjs/agents/content_processor_utils.js +2 -12
  2. package/dist/cjs/agents/functions.js +3 -13
  3. package/dist/cjs/agents/llm_agent.js +3 -13
  4. package/dist/cjs/code_executors/code_execution_utils.js +2 -12
  5. package/dist/cjs/code_executors/code_executor_context.js +2 -12
  6. package/dist/cjs/index.js +11 -11
  7. package/dist/cjs/index.js.map +3 -3
  8. package/dist/cjs/runner/runner.js +5 -4
  9. package/dist/cjs/sessions/in_memory_session_service.js +3 -13
  10. package/dist/cjs/version.js +1 -1
  11. package/dist/esm/agents/content_processor_utils.js +1 -1
  12. package/dist/esm/agents/functions.js +1 -1
  13. package/dist/esm/agents/llm_agent.js +1 -1
  14. package/dist/esm/code_executors/code_execution_utils.js +1 -1
  15. package/dist/esm/code_executors/code_executor_context.js +1 -1
  16. package/dist/esm/index.js +9 -9
  17. package/dist/esm/index.js.map +3 -3
  18. package/dist/esm/runner/runner.js +5 -4
  19. package/dist/esm/sessions/in_memory_session_service.js +1 -1
  20. package/dist/esm/version.js +1 -1
  21. package/dist/types/version.d.ts +1 -1
  22. package/dist/web/agents/content_processor_utils.js +1 -1
  23. package/dist/web/agents/functions.js +1 -1
  24. package/dist/web/agents/llm_agent.js +1 -1
  25. package/dist/web/code_executors/code_execution_utils.js +1 -1
  26. package/dist/web/code_executors/code_executor_context.js +1 -1
  27. package/dist/web/index.js +1 -1
  28. package/dist/web/index.js.map +3 -3
  29. package/dist/web/runner/runner.js +5 -4
  30. package/dist/web/sessions/in_memory_session_service.js +1 -1
  31. package/dist/web/version.js +1 -1
  32. package/package.json +2 -2
@@ -30,6 +30,7 @@ import { createEvent, getFunctionCalls } from "../events/event.js";
30
30
  import { createEventActions } from "../events/event_actions.js";
31
31
  import { PluginManager } from "../plugins/plugin_manager.js";
32
32
  import { logger } from "../utils/logger.js";
33
+ import { isGemini2OrAbove } from "../utils/model_name.js";
33
34
  class Runner {
34
35
  constructor(input) {
35
36
  var _a;
@@ -76,12 +77,12 @@ class Runner {
76
77
  }
77
78
  if (runConfig.supportCfc && this.agent instanceof LlmAgent) {
78
79
  const modelName = this.agent.canonicalModel.model;
79
- if (!modelName.startsWith("gemini-2")) {
80
+ if (!isGemini2OrAbove(modelName)) {
80
81
  throw new Error("CFC is not supported for model: ".concat(modelName, " in agent: ").concat(this.agent.name));
81
82
  }
82
- }
83
- if (this.agent instanceof LlmAgent && !(this.agent.codeExecutor instanceof BuiltInCodeExecutor)) {
84
- this.agent.codeExecutor = new BuiltInCodeExecutor();
83
+ if (!(this.agent.codeExecutor instanceof BuiltInCodeExecutor)) {
84
+ this.agent.codeExecutor = new BuiltInCodeExecutor();
85
+ }
85
86
  }
86
87
  const invocationContext = new InvocationContext({
87
88
  artifactService: this.artifactService,
@@ -3,7 +3,7 @@
3
3
  * Copyright 2025 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import cloneDeep from "lodash-es/cloneDeep.js";
6
+ import { cloneDeep } from "lodash-es";
7
7
  import { randomUUID } from "../utils/env_aware_utils.js";
8
8
  import { logger } from "../utils/logger.js";
9
9
  import { BaseSessionService } from "./base_session_service.js";
@@ -3,7 +3,7 @@
3
3
  * Copyright 2025 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- const version = "0.2.3";
6
+ const version = "0.2.4";
7
7
  export {
8
8
  version
9
9
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@google/adk",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "description": "Google ADK JS",
5
5
  "author": "Google",
6
6
  "license": "Apache-2.0",
@@ -39,7 +39,7 @@
39
39
  "prepublishOnly": "npm run build:bundle"
40
40
  },
41
41
  "dependencies": {
42
- "@google/genai": "1.32.0",
42
+ "@google/genai": "^1.37.0",
43
43
  "@modelcontextprotocol/sdk": "^1.24.0",
44
44
  "google-auth-library": "^10.3.0",
45
45
  "lodash-es": "^4.17.22",