@google/adk 2.1.0 → 2.2.1
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/agent_card.js +8 -0
- package/dist/cjs/a2a/agent_executor.js +8 -3
- package/dist/cjs/a2a/event_converter_utils.js +5 -1
- package/dist/cjs/a2a/metadata_converter_utils.js +2 -1
- package/dist/cjs/agents/llm_agent.js +15 -1
- package/dist/cjs/agents/processors/content_processor_utils.js +10 -2
- package/dist/cjs/agents/processors/nl_planning_processor.js +114 -0
- package/dist/cjs/artifacts/gcs_artifact_service.js +13 -7
- package/dist/cjs/auth/auth_credential.js +12 -2
- package/dist/cjs/code_executors/code_execution_utils.js +3 -3
- package/dist/cjs/common.js +63 -0
- package/dist/cjs/events/abort_events.js +135 -0
- package/dist/cjs/events/internal_metadata.js +131 -0
- package/dist/cjs/examples/example.js +92 -0
- package/dist/cjs/examples/example_util.js +28 -4
- package/dist/cjs/examples/index.js +39 -0
- package/dist/cjs/examples/vertex_ai_example_store.js +39 -0
- package/dist/cjs/index.js +46 -0
- package/dist/cjs/memory/vertex_ai_memory_bank_service.js +17 -5
- package/dist/cjs/models/base_llm.js +1 -6
- package/dist/cjs/models/chrome_prompt_llm.js +16 -2
- package/dist/cjs/models/chrome_prompt_utils.js +54 -2
- package/dist/cjs/models/gemini_continuation.js +232 -0
- package/dist/cjs/models/gemini_llm_connection.js +5 -4
- package/dist/cjs/planners/base_planner.js +56 -0
- package/dist/cjs/planners/built_in_planner.js +85 -0
- package/dist/cjs/planners/plan_re_act_planner.js +172 -0
- package/dist/cjs/plugins/base_plugin.js +46 -61
- package/dist/cjs/plugins/debug_logging_plugin.js +653 -0
- package/dist/cjs/plugins/plugin_manager.js +1 -1
- package/dist/cjs/plugins/tool_call_integrity_plugin.js +364 -0
- package/dist/cjs/runner/runner.js +17 -3
- package/dist/cjs/tools/example_tool.js +1 -1
- package/dist/cjs/tools/mcp/mcp_session_manager.js +14 -8
- package/dist/cjs/tools/openapi_tool/auth/auth_helpers.js +281 -2
- package/dist/cjs/tools/openapi_tool/auth/credential_exchangers/auto_auth_credential_exchanger.js +15 -1
- package/dist/cjs/tools/openapi_tool/auth/credential_exchangers/base_auth_credential_exchanger.js +70 -0
- package/dist/cjs/tools/openapi_tool/auth/credential_exchangers/oauth2_exchanger.js +120 -0
- package/dist/cjs/tools/openapi_tool/auth/credential_exchangers/service_account_exchanger.js +10 -10
- package/dist/cjs/tools/openapi_tool/common/common.js +139 -0
- package/dist/cjs/tools/openapi_tool/openapi_spec_parser/openapi_spec_parser.js +11 -6
- package/dist/cjs/tools/openapi_tool/openapi_spec_parser/operation_parser.js +73 -13
- package/dist/cjs/tools/openapi_tool/openapi_spec_parser/tool_auth_handler.js +146 -34
- package/dist/cjs/tools/openapi_tool/openapi_toolset.js +14 -2
- package/dist/cjs/tools/openapi_tool/rest_api_tool.js +90 -28
- package/dist/cjs/tools/skill/skill_toolset.js +2 -0
- package/dist/cjs/tools/tool_context.js +41 -0
- package/dist/cjs/tools/webmcp/index.js +37 -0
- package/dist/cjs/tools/webmcp/webmcp_tool.js +156 -0
- package/dist/cjs/tools/webmcp/webmcp_toolset.js +116 -0
- package/dist/cjs/tools/webmcp/webmcp_types.js +50 -0
- package/dist/cjs/utils/case_utils.js +52 -2
- package/dist/cjs/utils/client_labels.js +67 -0
- package/dist/cjs/utils/gemini_schema_util.js +103 -3
- package/dist/cjs/utils/hash_utils.js +73 -0
- package/dist/cjs/utils/live_connection_utils.js +10 -9
- package/dist/cjs/utils/model_name.js +17 -2
- package/dist/cjs/utils/simple_zod_to_json.js +5 -0
- package/dist/cjs/version.js +1 -1
- package/dist/esm/a2a/agent_card.js +8 -0
- package/dist/esm/a2a/agent_executor.js +8 -3
- package/dist/esm/a2a/event_converter_utils.js +5 -1
- package/dist/esm/a2a/metadata_converter_utils.js +2 -1
- package/dist/esm/agents/llm_agent.js +18 -1
- package/dist/esm/agents/processors/content_processor_utils.js +10 -2
- package/dist/esm/agents/processors/nl_planning_processor.js +87 -0
- package/dist/esm/artifacts/gcs_artifact_service.js +13 -7
- package/dist/esm/auth/auth_credential.js +11 -1
- package/dist/esm/code_executors/code_execution_utils.js +3 -3
- package/dist/esm/common.js +58 -2
- package/dist/esm/events/abort_events.js +110 -0
- package/dist/esm/events/internal_metadata.js +97 -0
- package/dist/esm/examples/example.js +85 -0
- package/dist/esm/examples/example_util.js +25 -3
- package/dist/esm/examples/index.js +11 -0
- package/dist/esm/examples/vertex_ai_example_store.js +11 -0
- package/dist/esm/index.js +51 -1
- package/dist/esm/memory/vertex_ai_memory_bank_service.js +17 -5
- package/dist/esm/models/base_llm.js +2 -7
- package/dist/esm/models/chrome_prompt_llm.js +20 -3
- package/dist/esm/models/chrome_prompt_utils.js +51 -2
- package/dist/esm/models/gemini_continuation.js +205 -0
- package/dist/esm/models/gemini_llm_connection.js +6 -5
- package/dist/esm/planners/base_planner.js +28 -0
- package/dist/esm/planners/built_in_planner.js +57 -0
- package/dist/esm/planners/plan_re_act_planner.js +145 -0
- package/dist/esm/plugins/base_plugin.js +46 -61
- package/dist/esm/plugins/debug_logging_plugin.js +615 -0
- package/dist/esm/plugins/plugin_manager.js +1 -1
- package/dist/esm/plugins/tool_call_integrity_plugin.js +339 -0
- package/dist/esm/runner/runner.js +20 -3
- package/dist/esm/tools/example_tool.js +1 -1
- package/dist/esm/tools/mcp/mcp_session_manager.js +14 -8
- package/dist/esm/tools/openapi_tool/auth/auth_helpers.js +272 -1
- package/dist/esm/tools/openapi_tool/auth/credential_exchangers/auto_auth_credential_exchanger.js +15 -1
- package/dist/esm/tools/openapi_tool/auth/credential_exchangers/base_auth_credential_exchanger.js +43 -0
- package/dist/esm/tools/openapi_tool/auth/credential_exchangers/oauth2_exchanger.js +93 -0
- package/dist/esm/tools/openapi_tool/auth/credential_exchangers/service_account_exchanger.js +10 -12
- package/dist/esm/tools/openapi_tool/common/common.js +112 -0
- package/dist/esm/tools/openapi_tool/openapi_spec_parser/openapi_spec_parser.js +11 -6
- package/dist/esm/tools/openapi_tool/openapi_spec_parser/operation_parser.js +80 -13
- package/dist/esm/tools/openapi_tool/openapi_spec_parser/tool_auth_handler.js +146 -33
- package/dist/esm/tools/openapi_tool/openapi_toolset.js +14 -2
- package/dist/esm/tools/openapi_tool/rest_api_tool.js +89 -28
- package/dist/esm/tools/skill/skill_toolset.js +2 -0
- package/dist/esm/tools/tool_context.js +15 -0
- package/dist/esm/tools/webmcp/index.js +10 -0
- package/dist/esm/tools/webmcp/webmcp_tool.js +131 -0
- package/dist/esm/tools/webmcp/webmcp_toolset.js +89 -0
- package/dist/esm/tools/webmcp/webmcp_types.js +22 -0
- package/dist/esm/utils/case_utils.js +49 -1
- package/dist/esm/utils/client_labels.js +65 -0
- package/dist/esm/utils/gemini_schema_util.js +102 -3
- package/dist/esm/utils/hash_utils.js +45 -0
- package/dist/esm/utils/live_connection_utils.js +11 -10
- package/dist/esm/utils/model_name.js +15 -2
- package/dist/esm/utils/simple_zod_to_json.js +5 -0
- package/dist/esm/version.js +1 -1
- package/dist/types/agents/llm_agent.d.ts +12 -1
- package/dist/types/agents/processors/nl_planning_processor.d.ts +30 -0
- package/dist/types/auth/auth_credential.d.ts +9 -0
- package/dist/types/common.d.ts +19 -4
- package/dist/types/events/abort_events.d.ts +43 -0
- package/dist/types/events/internal_metadata.d.ts +78 -0
- package/dist/types/examples/base_example_provider.d.ts +2 -2
- package/dist/types/examples/example.d.ts +75 -0
- package/dist/types/examples/example_util.d.ts +13 -2
- package/dist/types/examples/index.d.ts +18 -0
- package/dist/types/examples/vertex_ai_example_store.d.ts +7 -0
- package/dist/types/index.d.ts +12 -3
- package/dist/types/memory/memory_entry.d.ts +15 -0
- package/dist/types/memory/vertex_ai_memory_bank_service.d.ts +9 -0
- package/dist/types/models/chrome_prompt_utils.d.ts +29 -0
- package/dist/types/models/gemini_continuation.d.ts +59 -0
- package/dist/types/planners/base_planner.d.ts +50 -0
- package/dist/types/planners/built_in_planner.d.ts +53 -0
- package/dist/types/planners/plan_re_act_planner.d.ts +21 -0
- package/dist/types/plugins/base_plugin.d.ts +52 -52
- package/dist/types/plugins/debug_logging_plugin.d.ts +157 -0
- package/dist/types/plugins/tool_call_integrity_plugin.d.ts +116 -0
- package/dist/types/skills/skill_registry.d.ts +8 -0
- package/dist/types/tools/openapi_tool/auth/auth_helpers.d.ts +110 -1
- package/dist/types/tools/openapi_tool/auth/credential_exchangers/auto_auth_credential_exchanger.d.ts +32 -2
- package/dist/types/tools/openapi_tool/auth/credential_exchangers/base_auth_credential_exchanger.d.ts +35 -0
- package/dist/types/tools/openapi_tool/auth/credential_exchangers/oauth2_exchanger.d.ts +54 -0
- package/dist/types/tools/openapi_tool/common/common.d.ts +60 -0
- package/dist/types/tools/openapi_tool/openapi_spec_parser/openapi_spec_parser.d.ts +7 -0
- package/dist/types/tools/openapi_tool/openapi_spec_parser/operation_parser.d.ts +56 -2
- package/dist/types/tools/openapi_tool/openapi_spec_parser/tool_auth_handler.d.ts +73 -5
- package/dist/types/tools/openapi_tool/openapi_toolset.d.ts +11 -0
- package/dist/types/tools/openapi_tool/rest_api_tool.d.ts +42 -8
- package/dist/types/tools/tool_context.d.ts +19 -0
- package/dist/types/tools/webmcp/index.d.ts +12 -0
- package/dist/types/tools/webmcp/webmcp_tool.d.ts +47 -0
- package/dist/types/tools/webmcp/webmcp_toolset.d.ts +67 -0
- package/dist/types/tools/webmcp/webmcp_types.d.ts +69 -0
- package/dist/types/utils/case_utils.d.ts +36 -0
- package/dist/types/utils/client_labels.d.ts +33 -0
- package/dist/types/utils/gemini_schema_util.d.ts +13 -0
- package/dist/types/utils/hash_utils.d.ts +25 -0
- package/dist/types/utils/logger.d.ts +10 -2
- package/dist/types/utils/model_name.d.ts +30 -2
- package/dist/types/version.d.ts +1 -1
- package/dist/web/index_web.js +113 -80
- package/dist/web/index_web.js.map +4 -4
- package/package.json +8 -2
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
"use strict";
|
|
8
|
+
var __defProp = Object.defineProperty;
|
|
9
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
10
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
11
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
12
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
13
|
+
var __export = (target, all) => {
|
|
14
|
+
for (var name in all)
|
|
15
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
16
|
+
};
|
|
17
|
+
var __copyProps = (to, from, except, desc) => {
|
|
18
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
19
|
+
for (let key of __getOwnPropNames(from))
|
|
20
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
21
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
22
|
+
}
|
|
23
|
+
return to;
|
|
24
|
+
};
|
|
25
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
26
|
+
var abort_events_exports = {};
|
|
27
|
+
__export(abort_events_exports, {
|
|
28
|
+
ABORT_MESSAGE: () => ABORT_MESSAGE,
|
|
29
|
+
INVOCATION_ABORTED: () => INVOCATION_ABORTED,
|
|
30
|
+
buildAbortEvents: () => buildAbortEvents,
|
|
31
|
+
isAbortEvent: () => isAbortEvent
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(abort_events_exports);
|
|
34
|
+
var import_event = require("./event.js");
|
|
35
|
+
/**
|
|
36
|
+
* @license
|
|
37
|
+
* Copyright 2026 Google LLC
|
|
38
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
39
|
+
*/
|
|
40
|
+
const INVOCATION_ABORTED = "INVOCATION_ABORTED";
|
|
41
|
+
const ABORT_MESSAGE = "Invocation was aborted by client.";
|
|
42
|
+
function isAbortEvent(event) {
|
|
43
|
+
return event.errorCode === INVOCATION_ABORTED;
|
|
44
|
+
}
|
|
45
|
+
__name(isAbortEvent, "isAbortEvent");
|
|
46
|
+
function isPausedTaskReply(event) {
|
|
47
|
+
return Boolean(event.isolationScope) && event.author !== "user" && (0, import_event.isFinalResponse)(event);
|
|
48
|
+
}
|
|
49
|
+
__name(isPausedTaskReply, "isPausedTaskReply");
|
|
50
|
+
function buildAbortEvents({
|
|
51
|
+
events,
|
|
52
|
+
invocationId,
|
|
53
|
+
rootAgentName,
|
|
54
|
+
branch
|
|
55
|
+
}) {
|
|
56
|
+
var _a, _b;
|
|
57
|
+
const invocationEvents = events.filter(
|
|
58
|
+
(e) => e.invocationId === invocationId
|
|
59
|
+
);
|
|
60
|
+
if (invocationEvents.length > 0 && isPausedTaskReply(invocationEvents[invocationEvents.length - 1])) {
|
|
61
|
+
return [];
|
|
62
|
+
}
|
|
63
|
+
const answeredCallIds = /* @__PURE__ */ new Set();
|
|
64
|
+
for (const event of invocationEvents) {
|
|
65
|
+
for (const fr of (0, import_event.getFunctionResponses)(event)) {
|
|
66
|
+
if (fr.id) {
|
|
67
|
+
answeredCallIds.add(fr.id);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
const groupedCalls = /* @__PURE__ */ new Map();
|
|
72
|
+
for (const event of invocationEvents) {
|
|
73
|
+
for (const fc of (0, import_event.getFunctionCalls)(event)) {
|
|
74
|
+
if (!fc.id || answeredCallIds.has(fc.id)) {
|
|
75
|
+
continue;
|
|
76
|
+
}
|
|
77
|
+
const callBranch = event.branch || branch;
|
|
78
|
+
const key = JSON.stringify([
|
|
79
|
+
(_a = event.author) != null ? _a : null,
|
|
80
|
+
callBranch != null ? callBranch : null,
|
|
81
|
+
(_b = event.isolationScope) != null ? _b : null
|
|
82
|
+
]);
|
|
83
|
+
let group = groupedCalls.get(key);
|
|
84
|
+
if (!group) {
|
|
85
|
+
group = {
|
|
86
|
+
author: event.author,
|
|
87
|
+
branch: callBranch,
|
|
88
|
+
isolationScope: event.isolationScope,
|
|
89
|
+
calls: []
|
|
90
|
+
};
|
|
91
|
+
groupedCalls.set(key, group);
|
|
92
|
+
}
|
|
93
|
+
group.calls.push(fc);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
if (groupedCalls.size === 0) {
|
|
97
|
+
return [
|
|
98
|
+
(0, import_event.createEvent)({
|
|
99
|
+
invocationId,
|
|
100
|
+
author: rootAgentName,
|
|
101
|
+
branch,
|
|
102
|
+
errorCode: INVOCATION_ABORTED,
|
|
103
|
+
errorMessage: ABORT_MESSAGE
|
|
104
|
+
})
|
|
105
|
+
];
|
|
106
|
+
}
|
|
107
|
+
return [...groupedCalls.values()].map(
|
|
108
|
+
(group) => (0, import_event.createEvent)({
|
|
109
|
+
invocationId,
|
|
110
|
+
author: group.author,
|
|
111
|
+
branch: group.branch,
|
|
112
|
+
isolationScope: group.isolationScope,
|
|
113
|
+
content: {
|
|
114
|
+
role: "user",
|
|
115
|
+
parts: group.calls.map((fc) => ({
|
|
116
|
+
functionResponse: {
|
|
117
|
+
id: fc.id,
|
|
118
|
+
name: fc.name,
|
|
119
|
+
response: { error: ABORT_MESSAGE }
|
|
120
|
+
}
|
|
121
|
+
}))
|
|
122
|
+
},
|
|
123
|
+
errorCode: INVOCATION_ABORTED,
|
|
124
|
+
errorMessage: ABORT_MESSAGE
|
|
125
|
+
})
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
__name(buildAbortEvents, "buildAbortEvents");
|
|
129
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
130
|
+
0 && (module.exports = {
|
|
131
|
+
ABORT_MESSAGE,
|
|
132
|
+
INVOCATION_ABORTED,
|
|
133
|
+
buildAbortEvents,
|
|
134
|
+
isAbortEvent
|
|
135
|
+
});
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
"use strict";
|
|
8
|
+
var __defProp = Object.defineProperty;
|
|
9
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
10
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
11
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
12
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
13
|
+
var __export = (target, all) => {
|
|
14
|
+
for (var name in all)
|
|
15
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
16
|
+
};
|
|
17
|
+
var __copyProps = (to, from, except, desc) => {
|
|
18
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
19
|
+
for (let key of __getOwnPropNames(from))
|
|
20
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
21
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
22
|
+
}
|
|
23
|
+
return to;
|
|
24
|
+
};
|
|
25
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
26
|
+
var internal_metadata_exports = {};
|
|
27
|
+
__export(internal_metadata_exports, {
|
|
28
|
+
INTERNAL_METADATA_PREFIX: () => INTERNAL_METADATA_PREFIX,
|
|
29
|
+
RESTORED_EVENT_KEY: () => RESTORED_EVENT_KEY,
|
|
30
|
+
internalMetadata: () => internalMetadata,
|
|
31
|
+
markRestored: () => markRestored,
|
|
32
|
+
publicEvent: () => publicEvent,
|
|
33
|
+
publicMetadata: () => publicMetadata,
|
|
34
|
+
publicSession: () => publicSession,
|
|
35
|
+
withoutInternalMetadata: () => withoutInternalMetadata
|
|
36
|
+
});
|
|
37
|
+
module.exports = __toCommonJS(internal_metadata_exports);
|
|
38
|
+
var import_logger = require("../utils/logger.js");
|
|
39
|
+
/**
|
|
40
|
+
* @license
|
|
41
|
+
* Copyright 2026 Google LLC
|
|
42
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
43
|
+
*/
|
|
44
|
+
const INTERNAL_METADATA_PREFIX = "__adk_internal_";
|
|
45
|
+
const RESTORED_EVENT_KEY = `${INTERNAL_METADATA_PREFIX}restored_event`;
|
|
46
|
+
function isMetadataObject(value) {
|
|
47
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
48
|
+
}
|
|
49
|
+
__name(isMetadataObject, "isMetadataObject");
|
|
50
|
+
function isInternalKey(key) {
|
|
51
|
+
return key.startsWith(INTERNAL_METADATA_PREFIX);
|
|
52
|
+
}
|
|
53
|
+
__name(isInternalKey, "isInternalKey");
|
|
54
|
+
function dropInternalKeys(metadata) {
|
|
55
|
+
return Object.fromEntries(
|
|
56
|
+
Object.entries(metadata).filter(([key]) => !isInternalKey(key))
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
__name(dropInternalKeys, "dropInternalKeys");
|
|
60
|
+
function hasInternalKeys(metadata) {
|
|
61
|
+
return isMetadataObject(metadata) && Object.keys(metadata).some(isInternalKey);
|
|
62
|
+
}
|
|
63
|
+
__name(hasInternalKeys, "hasInternalKeys");
|
|
64
|
+
function withoutInternalMetadata(metadata) {
|
|
65
|
+
if (!isMetadataObject(metadata)) {
|
|
66
|
+
return metadata;
|
|
67
|
+
}
|
|
68
|
+
const kept = dropInternalKeys(metadata);
|
|
69
|
+
const dropped = Object.keys(metadata).filter(isInternalKey);
|
|
70
|
+
if (dropped.length > 0) {
|
|
71
|
+
import_logger.logger.debug(
|
|
72
|
+
`Dropping ADK-internal customMetadata keys: ${JSON.stringify(dropped.sort())}`
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
return kept;
|
|
76
|
+
}
|
|
77
|
+
__name(withoutInternalMetadata, "withoutInternalMetadata");
|
|
78
|
+
function publicMetadata(metadata) {
|
|
79
|
+
if (!isMetadataObject(metadata)) {
|
|
80
|
+
return metadata;
|
|
81
|
+
}
|
|
82
|
+
const kept = dropInternalKeys(metadata);
|
|
83
|
+
return Object.keys(kept).length > 0 ? kept : void 0;
|
|
84
|
+
}
|
|
85
|
+
__name(publicMetadata, "publicMetadata");
|
|
86
|
+
function internalMetadata(metadata) {
|
|
87
|
+
if (!isMetadataObject(metadata)) {
|
|
88
|
+
return {};
|
|
89
|
+
}
|
|
90
|
+
return Object.fromEntries(
|
|
91
|
+
Object.entries(metadata).filter(([key]) => isInternalKey(key))
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
__name(internalMetadata, "internalMetadata");
|
|
95
|
+
function markRestored(event) {
|
|
96
|
+
var _a;
|
|
97
|
+
event.customMetadata = {
|
|
98
|
+
...(_a = withoutInternalMetadata(event.customMetadata)) != null ? _a : {},
|
|
99
|
+
[RESTORED_EVENT_KEY]: true
|
|
100
|
+
};
|
|
101
|
+
return event;
|
|
102
|
+
}
|
|
103
|
+
__name(markRestored, "markRestored");
|
|
104
|
+
function publicEvent(event) {
|
|
105
|
+
if (!hasInternalKeys(event.customMetadata)) {
|
|
106
|
+
return event;
|
|
107
|
+
}
|
|
108
|
+
return { ...event, customMetadata: publicMetadata(event.customMetadata) };
|
|
109
|
+
}
|
|
110
|
+
__name(publicEvent, "publicEvent");
|
|
111
|
+
function publicSession(session) {
|
|
112
|
+
var _a;
|
|
113
|
+
const events = (_a = session.events) != null ? _a : [];
|
|
114
|
+
const publicEvents = events.map((event) => publicEvent(event));
|
|
115
|
+
if (publicEvents.every((event, i) => event === events[i])) {
|
|
116
|
+
return session;
|
|
117
|
+
}
|
|
118
|
+
return { ...session, events: publicEvents };
|
|
119
|
+
}
|
|
120
|
+
__name(publicSession, "publicSession");
|
|
121
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
122
|
+
0 && (module.exports = {
|
|
123
|
+
INTERNAL_METADATA_PREFIX,
|
|
124
|
+
RESTORED_EVENT_KEY,
|
|
125
|
+
internalMetadata,
|
|
126
|
+
markRestored,
|
|
127
|
+
publicEvent,
|
|
128
|
+
publicMetadata,
|
|
129
|
+
publicSession,
|
|
130
|
+
withoutInternalMetadata
|
|
131
|
+
});
|
|
@@ -9,6 +9,11 @@ var __defProp = Object.defineProperty;
|
|
|
9
9
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
10
10
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
11
11
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
12
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
13
|
+
var __export = (target, all) => {
|
|
14
|
+
for (var name in all)
|
|
15
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
16
|
+
};
|
|
12
17
|
var __copyProps = (to, from, except, desc) => {
|
|
13
18
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
19
|
for (let key of __getOwnPropNames(from))
|
|
@@ -19,9 +24,96 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
19
24
|
};
|
|
20
25
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
26
|
var example_exports = {};
|
|
27
|
+
__export(example_exports, {
|
|
28
|
+
VertexAiExampleStore: () => VertexAiExampleStore
|
|
29
|
+
});
|
|
22
30
|
module.exports = __toCommonJS(example_exports);
|
|
31
|
+
var import_base_example_provider = require("./base_example_provider.js");
|
|
23
32
|
/**
|
|
24
33
|
* @license
|
|
25
34
|
* Copyright 2025 Google LLC
|
|
26
35
|
* SPDX-License-Identifier: Apache-2.0
|
|
27
36
|
*/
|
|
37
|
+
const SIMILARITY_SCORE_THRESHOLD = 0.5;
|
|
38
|
+
const DEFAULT_TOP_K = 10;
|
|
39
|
+
const _VertexAiExampleStore = class _VertexAiExampleStore extends import_base_example_provider.BaseExampleProvider {
|
|
40
|
+
/**
|
|
41
|
+
* Initializes the VertexAiExampleStore.
|
|
42
|
+
*
|
|
43
|
+
* @param examplesStoreName The resource name of the vertex example store, in
|
|
44
|
+
* the format of
|
|
45
|
+
* `projects/{project}/locations/{location}/exampleStores/{example_store}`.
|
|
46
|
+
* @param apiClient A client that reaches the Vertex AI Example Store API.
|
|
47
|
+
* adk-js does not bundle the `vertexai` dependency the Python SDK relies
|
|
48
|
+
* on, so the caller supplies this client.
|
|
49
|
+
*/
|
|
50
|
+
constructor(examplesStoreName, apiClient) {
|
|
51
|
+
super();
|
|
52
|
+
this.examplesStoreName = examplesStoreName;
|
|
53
|
+
this.apiClient = apiClient;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Retrieves relevant examples from the Vertex AI Example Store for the given
|
|
57
|
+
* query.
|
|
58
|
+
*/
|
|
59
|
+
async getExamples(query) {
|
|
60
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
61
|
+
const request = {
|
|
62
|
+
storedContentsExampleParameters: {
|
|
63
|
+
contentSearchKey: {
|
|
64
|
+
contents: [{ role: "user", parts: [{ text: query }] }],
|
|
65
|
+
searchKeyGenerationMethod: { lastEntry: {} }
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
topK: DEFAULT_TOP_K,
|
|
69
|
+
exampleStore: this.examplesStoreName
|
|
70
|
+
};
|
|
71
|
+
const response = await this.apiClient.searchExamples(request);
|
|
72
|
+
const returnedExamples = [];
|
|
73
|
+
for (const result of (_a = response.results) != null ? _a : []) {
|
|
74
|
+
if (((_b = result.similarityScore) != null ? _b : 0) < SIMILARITY_SCORE_THRESHOLD) {
|
|
75
|
+
continue;
|
|
76
|
+
}
|
|
77
|
+
const storedExample = (_c = result.example) == null ? void 0 : _c.storedContentsExample;
|
|
78
|
+
const expectedContents = ((_e = (_d = storedExample == null ? void 0 : storedExample.contentsExample) == null ? void 0 : _d.expectedContents) != null ? _e : []).map((entry) => entry.content).filter((content) => content !== void 0);
|
|
79
|
+
const expectedOutput = [];
|
|
80
|
+
for (const content of expectedContents) {
|
|
81
|
+
const expectedParts = [];
|
|
82
|
+
for (const part of (_f = content.parts) != null ? _f : []) {
|
|
83
|
+
if (part.text) {
|
|
84
|
+
expectedParts.push({ text: part.text });
|
|
85
|
+
} else if (part.functionCall) {
|
|
86
|
+
expectedParts.push({
|
|
87
|
+
functionCall: {
|
|
88
|
+
name: part.functionCall.name,
|
|
89
|
+
args: { ...(_g = part.functionCall.args) != null ? _g : {} }
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
} else if (part.functionResponse) {
|
|
93
|
+
expectedParts.push({
|
|
94
|
+
functionResponse: {
|
|
95
|
+
name: part.functionResponse.name,
|
|
96
|
+
response: { ...(_h = part.functionResponse.response) != null ? _h : {} }
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
expectedOutput.push({ role: content.role, parts: expectedParts });
|
|
102
|
+
}
|
|
103
|
+
returnedExamples.push({
|
|
104
|
+
input: {
|
|
105
|
+
role: "user",
|
|
106
|
+
parts: [{ text: (_i = storedExample == null ? void 0 : storedExample.searchKey) != null ? _i : "" }]
|
|
107
|
+
},
|
|
108
|
+
output: expectedOutput
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
return returnedExamples;
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
__name(_VertexAiExampleStore, "VertexAiExampleStore");
|
|
115
|
+
let VertexAiExampleStore = _VertexAiExampleStore;
|
|
116
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
117
|
+
0 && (module.exports = {
|
|
118
|
+
VertexAiExampleStore
|
|
119
|
+
});
|
|
@@ -25,10 +25,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
25
25
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
26
26
|
var example_util_exports = {};
|
|
27
27
|
__export(example_util_exports, {
|
|
28
|
+
_getLatestMessageFromUser: () => _getLatestMessageFromUser,
|
|
28
29
|
buildExampleSi: () => buildExampleSi,
|
|
29
|
-
convertExamplesToText: () => convertExamplesToText
|
|
30
|
+
convertExamplesToText: () => convertExamplesToText,
|
|
31
|
+
getLatestMessageFromUser: () => getLatestMessageFromUser
|
|
30
32
|
});
|
|
31
33
|
module.exports = __toCommonJS(example_util_exports);
|
|
34
|
+
var import_event = require("../events/event.js");
|
|
35
|
+
var import_logger = require("../utils/logger.js");
|
|
32
36
|
var import_base_example_provider = require("./base_example_provider.js");
|
|
33
37
|
/**
|
|
34
38
|
* @license
|
|
@@ -93,18 +97,38 @@ function convertExamplesToText(examples, model) {
|
|
|
93
97
|
return `${EXAMPLES_INTRO}${examplesStr}${EXAMPLES_END}`;
|
|
94
98
|
}
|
|
95
99
|
__name(convertExamplesToText, "convertExamplesToText");
|
|
96
|
-
function
|
|
100
|
+
function getLatestMessageFromUser(session) {
|
|
101
|
+
var _a, _b;
|
|
102
|
+
const events = session.events;
|
|
103
|
+
if (!events || events.length === 0) {
|
|
104
|
+
return "";
|
|
105
|
+
}
|
|
106
|
+
const event = events[events.length - 1];
|
|
107
|
+
if (event.author === "user" && (0, import_event.getFunctionResponses)(event).length === 0) {
|
|
108
|
+
if (((_a = event.content) == null ? void 0 : _a.parts) && ((_b = event.content.parts[0]) == null ? void 0 : _b.text)) {
|
|
109
|
+
return event.content.parts[0].text;
|
|
110
|
+
} else {
|
|
111
|
+
import_logger.logger.warn("No message from user for fetching example.");
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
return "";
|
|
115
|
+
}
|
|
116
|
+
__name(getLatestMessageFromUser, "getLatestMessageFromUser");
|
|
117
|
+
const _getLatestMessageFromUser = getLatestMessageFromUser;
|
|
118
|
+
async function buildExampleSi(examples, query, model) {
|
|
97
119
|
if (Array.isArray(examples)) {
|
|
98
120
|
return convertExamplesToText(examples, model);
|
|
99
121
|
}
|
|
100
122
|
if ((0, import_base_example_provider.isBaseExampleProvider)(examples)) {
|
|
101
|
-
return convertExamplesToText(examples.getExamples(query), model);
|
|
123
|
+
return convertExamplesToText(await examples.getExamples(query), model);
|
|
102
124
|
}
|
|
103
125
|
throw new Error("Invalid example configuration");
|
|
104
126
|
}
|
|
105
127
|
__name(buildExampleSi, "buildExampleSi");
|
|
106
128
|
// Annotate the CommonJS export names for ESM import in node:
|
|
107
129
|
0 && (module.exports = {
|
|
130
|
+
_getLatestMessageFromUser,
|
|
108
131
|
buildExampleSi,
|
|
109
|
-
convertExamplesToText
|
|
132
|
+
convertExamplesToText,
|
|
133
|
+
getLatestMessageFromUser
|
|
110
134
|
});
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
"use strict";
|
|
8
|
+
var __defProp = Object.defineProperty;
|
|
9
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
10
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
11
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
21
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
22
|
+
var examples_exports = {};
|
|
23
|
+
module.exports = __toCommonJS(examples_exports);
|
|
24
|
+
__reExport(examples_exports, require("./base_example_provider.js"), module.exports);
|
|
25
|
+
__reExport(examples_exports, require("./example.js"), module.exports);
|
|
26
|
+
__reExport(examples_exports, require("./example_util.js"), module.exports);
|
|
27
|
+
__reExport(examples_exports, require("./vertex_ai_example_store.js"), module.exports);
|
|
28
|
+
/**
|
|
29
|
+
* @license
|
|
30
|
+
* Copyright 2025 Google LLC
|
|
31
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
32
|
+
*/
|
|
33
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
34
|
+
0 && (module.exports = {
|
|
35
|
+
...require("./base_example_provider.js"),
|
|
36
|
+
...require("./example.js"),
|
|
37
|
+
...require("./example_util.js"),
|
|
38
|
+
...require("./vertex_ai_example_store.js")
|
|
39
|
+
});
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
"use strict";
|
|
8
|
+
var __defProp = Object.defineProperty;
|
|
9
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
10
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
11
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
12
|
+
var __export = (target, all) => {
|
|
13
|
+
for (var name in all)
|
|
14
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
15
|
+
};
|
|
16
|
+
var __copyProps = (to, from, except, desc) => {
|
|
17
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
18
|
+
for (let key of __getOwnPropNames(from))
|
|
19
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
20
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
21
|
+
}
|
|
22
|
+
return to;
|
|
23
|
+
};
|
|
24
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
25
|
+
var vertex_ai_example_store_exports = {};
|
|
26
|
+
__export(vertex_ai_example_store_exports, {
|
|
27
|
+
VertexAiExampleStore: () => import_example.VertexAiExampleStore
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(vertex_ai_example_store_exports);
|
|
30
|
+
var import_example = require("./example.js");
|
|
31
|
+
/**
|
|
32
|
+
* @license
|
|
33
|
+
* Copyright 2025 Google LLC
|
|
34
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
35
|
+
*/
|
|
36
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
37
|
+
0 && (module.exports = {
|
|
38
|
+
VertexAiExampleStore
|
|
39
|
+
});
|
package/dist/cjs/index.js
CHANGED
|
@@ -26,6 +26,9 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
26
26
|
var index_exports = {};
|
|
27
27
|
__export(index_exports, {
|
|
28
28
|
AgentEngineSandboxCodeExecutor: () => import_agent_engine_sandbox_code_executor.AgentEngineSandboxCodeExecutor,
|
|
29
|
+
AuthCredentialMissingError: () => import_base_auth_credential_exchanger.AuthCredentialMissingError,
|
|
30
|
+
AutoAuthCredentialExchanger: () => import_auto_auth_credential_exchanger.AutoAuthCredentialExchanger,
|
|
31
|
+
BaseAuthCredentialExchanger: () => import_base_auth_credential_exchanger.BaseAuthCredentialExchanger,
|
|
29
32
|
CodeExecutionLanguage: () => import_code_execution_utils.CodeExecutionLanguage,
|
|
30
33
|
ContainerCodeExecutor: () => import_container_code_executor.ContainerCodeExecutor,
|
|
31
34
|
DatabaseSessionService: () => import_database_session_service.DatabaseSessionService,
|
|
@@ -33,10 +36,12 @@ __export(index_exports, {
|
|
|
33
36
|
FilesRetrieval: () => import_files_retrieval.FilesRetrieval,
|
|
34
37
|
GCPSkillRegistry: () => import_gcp_skill_registry.GCPSkillRegistry,
|
|
35
38
|
GcsArtifactService: () => import_gcs_artifact_service.GcsArtifactService,
|
|
39
|
+
INTERNAL_AUTH_PREFIX: () => import_auth_helpers.INTERNAL_AUTH_PREFIX,
|
|
36
40
|
InvocationContext: () => import_invocation_context.InvocationContext,
|
|
37
41
|
LOAD_WEB_PAGE: () => import_load_web_page.LOAD_WEB_PAGE,
|
|
38
42
|
LoadSkillResourceTool: () => import_load_skill_resource_tool.LoadSkillResourceTool,
|
|
39
43
|
LocalEnvironment: () => import_local_environment.LocalEnvironment,
|
|
44
|
+
OAuth2BearerExchanger: () => import_oauth2_exchanger.OAuth2BearerExchanger,
|
|
40
45
|
OpenAPIToolset: () => import_openapi_toolset.OpenAPIToolset,
|
|
41
46
|
OpenApiSpecParser: () => import_openapi_spec_parser.OpenApiSpecParser,
|
|
42
47
|
OperationParser: () => import_operation_parser.OperationParser,
|
|
@@ -44,19 +49,34 @@ __export(index_exports, {
|
|
|
44
49
|
RunSkillInlineScriptErrorCode: () => import_run_skill_inline_script_tool.RunSkillInlineScriptErrorCode,
|
|
45
50
|
RunSkillInlineScriptTool: () => import_run_skill_inline_script_tool.RunSkillInlineScriptTool,
|
|
46
51
|
RunSkillScriptTool: () => import_run_skill_script_tool.RunSkillScriptTool,
|
|
52
|
+
ServiceAccountCredentialExchanger: () => import_service_account_exchanger.ServiceAccountCredentialExchanger,
|
|
47
53
|
SkillToolset: () => import_skill_toolset.SkillToolset,
|
|
48
54
|
ToolAuthHandler: () => import_tool_auth_handler.ToolAuthHandler,
|
|
55
|
+
ToolContextCredentialStore: () => import_tool_auth_handler.ToolContextCredentialStore,
|
|
49
56
|
UnsafeLocalCodeExecutor: () => import_unsafe_local_code_executor.UnsafeLocalCodeExecutor,
|
|
50
57
|
VertexAiMemoryBankService: () => import_vertex_ai_memory_bank_service.VertexAiMemoryBankService,
|
|
51
58
|
VertexAiRagMemoryService: () => import_vertex_ai_rag_memory_service.VertexAiRagMemoryService,
|
|
52
59
|
VertexAiSessionService: () => import_vertex_ai_session_service.VertexAiSessionService,
|
|
60
|
+
createApiParameter: () => import_common.createApiParameter,
|
|
53
61
|
createRestApiTool: () => import_rest_api_tool.createRestApiTool,
|
|
62
|
+
createRestApiToolFromJson: () => import_rest_api_tool.createRestApiToolFromJson,
|
|
63
|
+
credentialToParam: () => import_auth_helpers.credentialToParam,
|
|
64
|
+
dictToAuthScheme: () => import_auth_helpers.dictToAuthScheme,
|
|
65
|
+
exchangeCredential: () => import_oauth2_exchanger.exchangeCredential,
|
|
66
|
+
generateParamDoc: () => import_common.generateParamDoc,
|
|
67
|
+
generateReturnDoc: () => import_common.generateReturnDoc,
|
|
54
68
|
getArtifactServiceFromUri: () => import_registry.getArtifactServiceFromUri,
|
|
55
69
|
getSessionServiceFromUri: () => import_registry2.getSessionServiceFromUri,
|
|
70
|
+
getTypeHint: () => import_common.getTypeHint,
|
|
56
71
|
loadAllSkillsInDir: () => import_loader.loadAllSkillsInDir,
|
|
57
72
|
loadSkillFromDir: () => import_loader.loadSkillFromDir,
|
|
58
73
|
loadSkillFromZipBuffer: () => import_loader.loadSkillFromZipBuffer,
|
|
59
74
|
loadWebPage: () => import_load_web_page.loadWebPage,
|
|
75
|
+
openidDictToSchemeCredential: () => import_auth_helpers.openidDictToSchemeCredential,
|
|
76
|
+
openidUrlToSchemeCredential: () => import_auth_helpers.openidUrlToSchemeCredential,
|
|
77
|
+
serviceAccountDictToSchemeCredential: () => import_auth_helpers.serviceAccountDictToSchemeCredential,
|
|
78
|
+
serviceAccountSchemeCredential: () => import_auth_helpers.serviceAccountSchemeCredential,
|
|
79
|
+
tokenToSchemeCredential: () => import_auth_helpers.tokenToSchemeCredential,
|
|
60
80
|
validateSkillDir: () => import_loader.validateSkillDir
|
|
61
81
|
});
|
|
62
82
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -80,6 +100,12 @@ var import_vertex_ai_session_service = require("./sessions/vertex_ai_session_ser
|
|
|
80
100
|
var import_gcp_skill_registry = require("./skills/gcp_skill_registry.js");
|
|
81
101
|
var import_loader = require("./skills/loader.js");
|
|
82
102
|
var import_load_web_page = require("./tools/load_web_page.js");
|
|
103
|
+
var import_auth_helpers = require("./tools/openapi_tool/auth/auth_helpers.js");
|
|
104
|
+
var import_auto_auth_credential_exchanger = require("./tools/openapi_tool/auth/credential_exchangers/auto_auth_credential_exchanger.js");
|
|
105
|
+
var import_base_auth_credential_exchanger = require("./tools/openapi_tool/auth/credential_exchangers/base_auth_credential_exchanger.js");
|
|
106
|
+
var import_oauth2_exchanger = require("./tools/openapi_tool/auth/credential_exchangers/oauth2_exchanger.js");
|
|
107
|
+
var import_service_account_exchanger = require("./tools/openapi_tool/auth/credential_exchangers/service_account_exchanger.js");
|
|
108
|
+
var import_common = require("./tools/openapi_tool/common/common.js");
|
|
83
109
|
var import_openapi_spec_parser = require("./tools/openapi_tool/openapi_spec_parser/openapi_spec_parser.js");
|
|
84
110
|
var import_operation_parser = require("./tools/openapi_tool/openapi_spec_parser/operation_parser.js");
|
|
85
111
|
var import_tool_auth_handler = require("./tools/openapi_tool/openapi_spec_parser/tool_auth_handler.js");
|
|
@@ -103,6 +129,9 @@ __reExport(index_exports, require("./tools/mcp/index.js"), module.exports);
|
|
|
103
129
|
// Annotate the CommonJS export names for ESM import in node:
|
|
104
130
|
0 && (module.exports = {
|
|
105
131
|
AgentEngineSandboxCodeExecutor,
|
|
132
|
+
AuthCredentialMissingError,
|
|
133
|
+
AutoAuthCredentialExchanger,
|
|
134
|
+
BaseAuthCredentialExchanger,
|
|
106
135
|
CodeExecutionLanguage,
|
|
107
136
|
ContainerCodeExecutor,
|
|
108
137
|
DatabaseSessionService,
|
|
@@ -110,10 +139,12 @@ __reExport(index_exports, require("./tools/mcp/index.js"), module.exports);
|
|
|
110
139
|
FilesRetrieval,
|
|
111
140
|
GCPSkillRegistry,
|
|
112
141
|
GcsArtifactService,
|
|
142
|
+
INTERNAL_AUTH_PREFIX,
|
|
113
143
|
InvocationContext,
|
|
114
144
|
LOAD_WEB_PAGE,
|
|
115
145
|
LoadSkillResourceTool,
|
|
116
146
|
LocalEnvironment,
|
|
147
|
+
OAuth2BearerExchanger,
|
|
117
148
|
OpenAPIToolset,
|
|
118
149
|
OpenApiSpecParser,
|
|
119
150
|
OperationParser,
|
|
@@ -121,19 +152,34 @@ __reExport(index_exports, require("./tools/mcp/index.js"), module.exports);
|
|
|
121
152
|
RunSkillInlineScriptErrorCode,
|
|
122
153
|
RunSkillInlineScriptTool,
|
|
123
154
|
RunSkillScriptTool,
|
|
155
|
+
ServiceAccountCredentialExchanger,
|
|
124
156
|
SkillToolset,
|
|
125
157
|
ToolAuthHandler,
|
|
158
|
+
ToolContextCredentialStore,
|
|
126
159
|
UnsafeLocalCodeExecutor,
|
|
127
160
|
VertexAiMemoryBankService,
|
|
128
161
|
VertexAiRagMemoryService,
|
|
129
162
|
VertexAiSessionService,
|
|
163
|
+
createApiParameter,
|
|
130
164
|
createRestApiTool,
|
|
165
|
+
createRestApiToolFromJson,
|
|
166
|
+
credentialToParam,
|
|
167
|
+
dictToAuthScheme,
|
|
168
|
+
exchangeCredential,
|
|
169
|
+
generateParamDoc,
|
|
170
|
+
generateReturnDoc,
|
|
131
171
|
getArtifactServiceFromUri,
|
|
132
172
|
getSessionServiceFromUri,
|
|
173
|
+
getTypeHint,
|
|
133
174
|
loadAllSkillsInDir,
|
|
134
175
|
loadSkillFromDir,
|
|
135
176
|
loadSkillFromZipBuffer,
|
|
136
177
|
loadWebPage,
|
|
178
|
+
openidDictToSchemeCredential,
|
|
179
|
+
openidUrlToSchemeCredential,
|
|
180
|
+
serviceAccountDictToSchemeCredential,
|
|
181
|
+
serviceAccountSchemeCredential,
|
|
182
|
+
tokenToSchemeCredential,
|
|
137
183
|
validateSkillDir,
|
|
138
184
|
...require("./a2a/index.js"),
|
|
139
185
|
...require("./common.js"),
|