@inkeep/agents-sdk 0.37.1 → 0.37.2
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/index.cjs +6 -3
- package/dist/index.d.cts +7 -2
- package/dist/index.d.ts +7 -2
- package/dist/index.js +6 -3
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -2777,12 +2777,15 @@ var Tool = class {
|
|
|
2777
2777
|
* ```
|
|
2778
2778
|
*/
|
|
2779
2779
|
with(config) {
|
|
2780
|
-
const { selectedTools, toolPolicies } = agentsCore.normalizeToolSelections(config.selectedTools);
|
|
2780
|
+
const { selectedTools, toolPolicies } = agentsCore.normalizeToolSelections(config.selectedTools ?? void 0);
|
|
2781
|
+
const isUnspecified = config.selectedTools === void 0 || config.selectedTools === null;
|
|
2782
|
+
const resolvedSelectedTools = isUnspecified ? void 0 : selectedTools;
|
|
2783
|
+
const resolvedToolPolicies = isUnspecified || Object.keys(toolPolicies).length === 0 ? void 0 : toolPolicies;
|
|
2781
2784
|
return {
|
|
2782
2785
|
server: this,
|
|
2783
|
-
selectedTools,
|
|
2786
|
+
selectedTools: resolvedSelectedTools,
|
|
2784
2787
|
headers: config.headers,
|
|
2785
|
-
toolPolicies
|
|
2788
|
+
toolPolicies: resolvedToolPolicies
|
|
2786
2789
|
};
|
|
2787
2790
|
}
|
|
2788
2791
|
};
|
package/dist/index.d.cts
CHANGED
|
@@ -177,8 +177,13 @@ type AgentMcpConfig = {
|
|
|
177
177
|
* Supports flexible tool selection with per-tool policies
|
|
178
178
|
*/
|
|
179
179
|
type AgentMcpConfigInput = {
|
|
180
|
-
/**
|
|
181
|
-
|
|
180
|
+
/**
|
|
181
|
+
* Tools to enable from the MCP server - can be strings or objects with policies
|
|
182
|
+
* - undefined or null: all tools enabled (no filtering)
|
|
183
|
+
* - []: zero tools enabled (explicit empty selection)
|
|
184
|
+
* - ['tool1', 'tool2']: specific tools enabled
|
|
185
|
+
*/
|
|
186
|
+
selectedTools?: McpToolSelection[] | null;
|
|
182
187
|
/** Custom headers for MCP server requests */
|
|
183
188
|
headers?: Record<string, string>;
|
|
184
189
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -177,8 +177,13 @@ type AgentMcpConfig = {
|
|
|
177
177
|
* Supports flexible tool selection with per-tool policies
|
|
178
178
|
*/
|
|
179
179
|
type AgentMcpConfigInput = {
|
|
180
|
-
/**
|
|
181
|
-
|
|
180
|
+
/**
|
|
181
|
+
* Tools to enable from the MCP server - can be strings or objects with policies
|
|
182
|
+
* - undefined or null: all tools enabled (no filtering)
|
|
183
|
+
* - []: zero tools enabled (explicit empty selection)
|
|
184
|
+
* - ['tool1', 'tool2']: specific tools enabled
|
|
185
|
+
*/
|
|
186
|
+
selectedTools?: McpToolSelection[] | null;
|
|
182
187
|
/** Custom headers for MCP server requests */
|
|
183
188
|
headers?: Record<string, string>;
|
|
184
189
|
};
|
package/dist/index.js
CHANGED
|
@@ -2750,12 +2750,15 @@ var Tool = class {
|
|
|
2750
2750
|
* ```
|
|
2751
2751
|
*/
|
|
2752
2752
|
with(config) {
|
|
2753
|
-
const { selectedTools, toolPolicies } = normalizeToolSelections(config.selectedTools);
|
|
2753
|
+
const { selectedTools, toolPolicies } = normalizeToolSelections(config.selectedTools ?? void 0);
|
|
2754
|
+
const isUnspecified = config.selectedTools === void 0 || config.selectedTools === null;
|
|
2755
|
+
const resolvedSelectedTools = isUnspecified ? void 0 : selectedTools;
|
|
2756
|
+
const resolvedToolPolicies = isUnspecified || Object.keys(toolPolicies).length === 0 ? void 0 : toolPolicies;
|
|
2754
2757
|
return {
|
|
2755
2758
|
server: this,
|
|
2756
|
-
selectedTools,
|
|
2759
|
+
selectedTools: resolvedSelectedTools,
|
|
2757
2760
|
headers: config.headers,
|
|
2758
|
-
toolPolicies
|
|
2761
|
+
toolPolicies: resolvedToolPolicies
|
|
2759
2762
|
};
|
|
2760
2763
|
}
|
|
2761
2764
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inkeep/agents-sdk",
|
|
3
|
-
"version": "0.37.
|
|
3
|
+
"version": "0.37.2",
|
|
4
4
|
"description": "Agents SDK for building and managing agents in the Inkeep Agent Framework",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"nanoid": "^5.1.5",
|
|
13
13
|
"typescript": "^5.3.3",
|
|
14
14
|
"zod": "^4.1.11",
|
|
15
|
-
"@inkeep/agents-core": "^0.37.
|
|
15
|
+
"@inkeep/agents-core": "^0.37.2"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@types/js-yaml": "^4.0.9",
|