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:
@@ -32,6 +32,7 @@ type ToolMeta = {
|
||||
label: string;
|
||||
description: string;
|
||||
inputs: Record<string, ToolParam>;
|
||||
targets?: string;
|
||||
};
|
||||
|
||||
type DiscoveredTool = {
|
||||
@@ -138,6 +139,7 @@ function discoverTools(dirs: string[]): DiscoveredTool[] {
|
||||
const { meta } = parseFrontmatter(content);
|
||||
|
||||
if (!meta.name || !meta.description) continue;
|
||||
if ((meta.targets as string ?? 'all') === 'pi') continue;
|
||||
if (seen.has(meta.name)) continue;
|
||||
seen.add(meta.name);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user