tool registry, claude tool awareness, and model selector fix
- Add agent-agnostic tool registry (tool-registry.ts) that discovers tools from disk - Embed tool-loader extension as platform infrastructure (ensure-tool-loader.ts) - Inject tool context into Claude prompts on first message - Add marketplace tool sync (sync-marketplace.ts) - Fix model selector defaulting to claude-code when no model explicitly selected - Exclude tool-loader-source.ts from tsconfig (Pi-specific deps) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import { mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
||||
import { join, resolve } from 'node:path';
|
||||
import { DATA_PATH } from './data-path';
|
||||
|
||||
const SOURCE_PATH = resolve(import.meta.dir, 'tool-loader-source.ts');
|
||||
|
||||
export function ensureToolLoader(): void {
|
||||
const targetDir = join(DATA_PATH, 'extensions', 'tool-loader');
|
||||
const targetFile = join(targetDir, 'index.ts');
|
||||
|
||||
mkdirSync(targetDir, { recursive: true });
|
||||
|
||||
const source = readFileSync(SOURCE_PATH, 'utf-8');
|
||||
writeFileSync(targetFile, source, 'utf-8');
|
||||
|
||||
console.log('[bootstrap] Wrote tool-loader extension →', targetFile);
|
||||
}
|
||||
Reference in New Issue
Block a user