Files
platform/src/servers/ensure-tool-loader.ts
T
pastilhasandClaude Opus 4.6 49cd559c8a 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>
2026-03-07 11:55:38 +00:00

18 lines
605 B
TypeScript

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);
}