feat: add allowedTools for SDK use and re-organize test setup

This commit is contained in:
mingholy.lmh
2025-11-28 16:47:45 +08:00
parent 56957a687b
commit 249b141f19
15 changed files with 1779 additions and 394 deletions

View File

@@ -425,7 +425,6 @@ export async function parseArguments(settings: Settings): Promise<CliArgs> {
string: true,
description: 'Core tool paths',
coerce: (tools: string[]) =>
// Handle comma-separated values
tools.flatMap((tool) => tool.split(',').map((t) => t.trim())),
})
.option('exclude-tools', {
@@ -433,7 +432,13 @@ export async function parseArguments(settings: Settings): Promise<CliArgs> {
string: true,
description: 'Tools to exclude',
coerce: (tools: string[]) =>
// Handle comma-separated values
tools.flatMap((tool) => tool.split(',').map((t) => t.trim())),
})
.option('allowed-tools', {
type: 'array',
string: true,
description: 'Tools to allow, will bypass confirmation',
coerce: (tools: string[]) =>
tools.flatMap((tool) => tool.split(',').map((t) => t.trim())),
})
.option('auth-type', {