add targets field to filter tools per agent harness (pi/claude/all)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -19,6 +19,7 @@ type ToolMeta = {
|
||||
description: string;
|
||||
language: 'typescript' | 'bash' | 'python';
|
||||
inputs: Record<string, ToolParam>;
|
||||
targets?: string;
|
||||
};
|
||||
|
||||
function parseFrontmatter(content: string): { meta: Partial<ToolMeta>; body: string } {
|
||||
@@ -171,6 +172,8 @@ function discoverTools(dir: string): Array<{ toolDir: string; entryFile: string;
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((meta.targets as string ?? 'all') === 'claude') continue;
|
||||
|
||||
discovered.push({ toolDir, entryFile, meta: meta as ToolMeta });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user