feat: add Gemini CLI, OpenCode, and Windsurf IDE integrations
Gemini CLI: platform adapter mapping 6 of 11 hooks, settings.json deep-merge installer, GEMINI.md context injection. OpenCode: plugin with tool.execute.after interceptor, bus events for session lifecycle, claude_mem_search custom tool, AGENTS.md context. Windsurf: platform adapter for tool_info envelope format, hooks.json installer for 5 post-action hooks, .windsurf/rules context injection. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -238,6 +238,32 @@ async function buildHooks() {
|
||||
console.log(`✓ openclaw plugin built (${(openclawStats.size / 1024).toFixed(2)} KB)`);
|
||||
}
|
||||
|
||||
// Build OpenCode plugin (self-contained, runs in Bun)
|
||||
if (fs.existsSync('src/integrations/opencode-plugin/index.ts')) {
|
||||
console.log(`\n🔧 Building OpenCode plugin...`);
|
||||
const opencodeOutDir = 'dist/opencode-plugin';
|
||||
if (!fs.existsSync(opencodeOutDir)) {
|
||||
fs.mkdirSync(opencodeOutDir, { recursive: true });
|
||||
}
|
||||
await build({
|
||||
entryPoints: ['src/integrations/opencode-plugin/index.ts'],
|
||||
bundle: true,
|
||||
platform: 'node',
|
||||
target: 'node18',
|
||||
format: 'esm',
|
||||
outfile: `${opencodeOutDir}/index.js`,
|
||||
minify: true,
|
||||
logLevel: 'error',
|
||||
external: [
|
||||
'fs', 'fs/promises', 'path', 'os', 'child_process', 'url',
|
||||
'crypto', 'http', 'https', 'net', 'stream', 'util', 'events',
|
||||
],
|
||||
});
|
||||
|
||||
const opencodeStats = fs.statSync(`${opencodeOutDir}/index.js`);
|
||||
console.log(`✓ opencode plugin built (${(opencodeStats.size / 1024).toFixed(2)} KB)`);
|
||||
}
|
||||
|
||||
// Verify critical distribution files exist (skills are source files, not build outputs)
|
||||
console.log('\n📋 Verifying distribution files...');
|
||||
const requiredDistributionFiles = [
|
||||
@@ -264,6 +290,10 @@ async function buildHooks() {
|
||||
console.log(` Output: openclaw/dist/`);
|
||||
console.log(` - OpenClaw Plugin: index.js`);
|
||||
}
|
||||
if (fs.existsSync('dist/opencode-plugin/index.js')) {
|
||||
console.log(` Output: dist/opencode-plugin/`);
|
||||
console.log(` - OpenCode Plugin: index.js`);
|
||||
}
|
||||
|
||||
} catch (error) {
|
||||
console.error('\n❌ Build failed:', error.message);
|
||||
|
||||
Reference in New Issue
Block a user