@dexto/agent-management 1.19.5 → 1.19.6
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/config/loader.cjs +17 -0
- package/dist/config/loader.d.ts.map +1 -1
- package/dist/config/loader.js +17 -0
- package/package.json +5 -5
package/dist/config/loader.cjs
CHANGED
|
@@ -133,8 +133,25 @@ async function loadAgentConfig(configPath, logger) {
|
|
|
133
133
|
`Template expansion failed: ${error instanceof Error ? error.message : String(error)}`
|
|
134
134
|
);
|
|
135
135
|
}
|
|
136
|
+
renameBuiltinTools(config);
|
|
136
137
|
return config;
|
|
137
138
|
}
|
|
139
|
+
const RENAMED_BUILTIN_TOOLS = /* @__PURE__ */ new Map([
|
|
140
|
+
["invoke_skill", "skill_load"]
|
|
141
|
+
]);
|
|
142
|
+
function renameBuiltinTools(config) {
|
|
143
|
+
if (typeof config !== "object" || config === null || !("tools" in config)) return;
|
|
144
|
+
if (!Array.isArray(config.tools)) return;
|
|
145
|
+
for (const tool of config.tools) {
|
|
146
|
+
if (typeof tool !== "object" || tool === null) continue;
|
|
147
|
+
if (!("type" in tool) || tool.type !== "builtin-tools") continue;
|
|
148
|
+
if (!("enabledTools" in tool) || !Array.isArray(tool.enabledTools)) continue;
|
|
149
|
+
const names = tool.enabledTools.map(
|
|
150
|
+
(name) => typeof name === "string" ? RENAMED_BUILTIN_TOOLS.get(name) ?? name : name
|
|
151
|
+
);
|
|
152
|
+
tool.enabledTools = [...new Set(names)];
|
|
153
|
+
}
|
|
154
|
+
}
|
|
138
155
|
// Annotate the CommonJS export names for ESM import in node:
|
|
139
156
|
0 && (module.exports = {
|
|
140
157
|
loadAgentConfig
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../src/config/loader.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AA4G1C;;;;;;;;;;;;;GAaG;AACH,wBAAsB,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,
|
|
1
|
+
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../src/config/loader.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AA4G1C;;;;;;;;;;;;;GAaG;AACH,wBAAsB,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CA+D/F"}
|
package/dist/config/loader.js
CHANGED
|
@@ -100,8 +100,25 @@ async function loadAgentConfig(configPath, logger) {
|
|
|
100
100
|
`Template expansion failed: ${error instanceof Error ? error.message : String(error)}`
|
|
101
101
|
);
|
|
102
102
|
}
|
|
103
|
+
renameBuiltinTools(config);
|
|
103
104
|
return config;
|
|
104
105
|
}
|
|
106
|
+
const RENAMED_BUILTIN_TOOLS = /* @__PURE__ */ new Map([
|
|
107
|
+
["invoke_skill", "skill_load"]
|
|
108
|
+
]);
|
|
109
|
+
function renameBuiltinTools(config) {
|
|
110
|
+
if (typeof config !== "object" || config === null || !("tools" in config)) return;
|
|
111
|
+
if (!Array.isArray(config.tools)) return;
|
|
112
|
+
for (const tool of config.tools) {
|
|
113
|
+
if (typeof tool !== "object" || tool === null) continue;
|
|
114
|
+
if (!("type" in tool) || tool.type !== "builtin-tools") continue;
|
|
115
|
+
if (!("enabledTools" in tool) || !Array.isArray(tool.enabledTools)) continue;
|
|
116
|
+
const names = tool.enabledTools.map(
|
|
117
|
+
(name) => typeof name === "string" ? RENAMED_BUILTIN_TOOLS.get(name) ?? name : name
|
|
118
|
+
);
|
|
119
|
+
tool.enabledTools = [...new Set(names)];
|
|
120
|
+
}
|
|
121
|
+
}
|
|
105
122
|
export {
|
|
106
123
|
loadAgentConfig
|
|
107
124
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dexto/agent-management",
|
|
3
|
-
"version": "1.19.
|
|
3
|
+
"version": "1.19.6",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"yaml": "^2.8.3",
|
|
24
24
|
"zod": "^4.3.6",
|
|
25
|
-
"@dexto/agent-config": "1.19.
|
|
26
|
-
"@dexto/core": "1.19.
|
|
27
|
-
"@dexto/llm": "1.19.
|
|
28
|
-
"@dexto/tools-builtins": "1.19.
|
|
25
|
+
"@dexto/agent-config": "1.19.6",
|
|
26
|
+
"@dexto/core": "1.19.6",
|
|
27
|
+
"@dexto/llm": "1.19.6",
|
|
28
|
+
"@dexto/tools-builtins": "1.19.6"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@types/node": "^22.13.5"
|