diff --git a/.chezmoiignore b/.chezmoiignore new file mode 100644 index 0000000..3bf1b0c --- /dev/null +++ b/.chezmoiignore @@ -0,0 +1,15 @@ +# Opencode ephemeral files and machine-specific data +.local/share/opencode/auth.json +.local/share/opencode/mcp-auth.json +.local/share/opencode/log/ +.local/share/opencode/snapshot/ +.local/share/opencode/storage/ +.local/share/opencode/bin/ + +# Opencode plugin dependencies and generated files +.config/opencode/node_modules/ +.config/opencode/bun.lock +.config/opencode/package.json +.config/opencode/.gitignore +.config/opencode/.claude/ +.config/opencode/plugin/ diff --git a/home/dot_config/opencode/command/.keep b/home/dot_config/opencode/command/.keep new file mode 100644 index 0000000..7898de7 --- /dev/null +++ b/home/dot_config/opencode/command/.keep @@ -0,0 +1 @@ +# This file ensures the command directory is created by chezmoi diff --git a/home/dot_config/opencode/command/symlink_commit-staged.md b/home/dot_config/opencode/command/symlink_commit-staged.md new file mode 100644 index 0000000..de1ce25 --- /dev/null +++ b/home/dot_config/opencode/command/symlink_commit-staged.md @@ -0,0 +1 @@ +../../../.claude/commands/commit-staged.md \ No newline at end of file diff --git a/home/dot_config/opencode/dcp.jsonc b/home/dot_config/opencode/dcp.jsonc new file mode 100644 index 0000000..36a3ca6 --- /dev/null +++ b/home/dot_config/opencode/dcp.jsonc @@ -0,0 +1,44 @@ +{ + // Enable or disable the plugin + "enabled": true, + // Enable debug logging to ~/.config/opencode/logs/dcp/ + "debug": false, + // Summary display: "off", "minimal", or "detailed" + "pruningSummary": "detailed", + // Strategies for pruning tokens from chat history + "strategies": { + // Remove duplicate tool calls (same tool with same arguments) + "deduplication": { + "enabled": true, + // Additional tools to protect from pruning + "protectedTools": [] + }, + // Prune write tool inputs when the file has been subsequently read + "supersedeWrites": { + "enabled": true + }, + // Exposes a prune tool to your LLM to call when it determines pruning is necessary + "pruneTool": { + "enabled": true, + // Additional tools to protect from pruning + "protectedTools": [], + // Nudge the LLM to use the prune tool (every tool results) + "nudge": { + "enabled": true, + "frequency": 10 + } + }, + // (Legacy) Run an LLM to analyze what tool calls are no longer relevant on idle + "onIdle": { + "enabled": false, + // Additional tools to protect from pruning + "protectedTools": [], + // Override model for analysis (format: "provider/model") + // "model": "anthropic/claude-haiku-4-5", + // Show toast notifications when model selection fails + "showModelErrorToasts": true, + // When true, fallback models are not permitted + "strictModelSelection": false + } + } +} diff --git a/home/dot_config/opencode/opencode.jsonc.tmpl b/home/dot_config/opencode/opencode.jsonc.tmpl new file mode 100644 index 0000000..58731dd --- /dev/null +++ b/home/dot_config/opencode/opencode.jsonc.tmpl @@ -0,0 +1,26 @@ +{ + "$schema": "https://opencode.ai/config.json", + "plugin": [ + "@tarquinen/opencode-dcp@latest", + "@franlol/opencode-md-table-formatter@0.0.3", + // "file:///home/xevion/projects/opencode-anthropic-websearch/dist/index.js" + ], + "mcp": { + "context7": { + "type": "remote", + "url": "https://mcp.context7.com/mcp", + "headers": { + "CONTEXT7_API_KEY": "{{ dopplerProjectJson.CONTEXT7_API_KEY }}" + } + }, + "gh_grep": { + "type": "remote", + "url": "https://mcp.grep.app" + }, + "linear": { + "type": "remote", + "url": "https://mcp.linear.app/mcp", + "oauth": {} + } + } +} diff --git a/home/dot_config/opencode/symlink_AGENTS.md b/home/dot_config/opencode/symlink_AGENTS.md new file mode 100644 index 0000000..7afdfd5 --- /dev/null +++ b/home/dot_config/opencode/symlink_AGENTS.md @@ -0,0 +1 @@ +../../.claude/CLAUDE.md \ No newline at end of file