@knid/agentx 0.1.3 → 0.1.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/index.js +6 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -77,6 +77,7 @@ var agentYamlSchema = z.object({
|
|
|
77
77
|
mcp_servers: z.record(mcpServerSchema).optional(),
|
|
78
78
|
secrets: z.array(secretSchema).optional(),
|
|
79
79
|
permissions: permissionsSchema.optional(),
|
|
80
|
+
allowed_tools: z.array(z.string()).optional(),
|
|
80
81
|
config: z.array(configOptionSchema).optional(),
|
|
81
82
|
examples: z.array(exampleSchema).optional()
|
|
82
83
|
});
|
|
@@ -429,6 +430,9 @@ function buildClaudeArgs(options) {
|
|
|
429
430
|
if (options.mcpConfigPath) {
|
|
430
431
|
args.push("--mcp-config", options.mcpConfigPath);
|
|
431
432
|
}
|
|
433
|
+
if (options.allowedTools && options.allowedTools.length > 0) {
|
|
434
|
+
args.push("--allowedTools", ...options.allowedTools);
|
|
435
|
+
}
|
|
432
436
|
if (options.maxTurns !== void 0) {
|
|
433
437
|
args.push("--max-turns", String(options.maxTurns));
|
|
434
438
|
}
|
|
@@ -473,7 +477,8 @@ async function runAgent(agentName, options) {
|
|
|
473
477
|
mcpConfigPath,
|
|
474
478
|
maxTurns: globalConfig.claude_defaults.max_turns,
|
|
475
479
|
outputFormat: options.outputFormat ?? globalConfig.default_output,
|
|
476
|
-
interactive: options.interactive
|
|
480
|
+
interactive: options.interactive,
|
|
481
|
+
allowedTools: manifest.allowed_tools
|
|
477
482
|
});
|
|
478
483
|
if (options.debug) {
|
|
479
484
|
console.error(`[debug] claude ${claudeArgs.join(" ")}`);
|