feat(opencode): add agent modes and with-context MCP server config

- Add explicit mode settings for agents (build, plan as primary; others as subagent)
- Configure with-context MCP server for Obsidian vault integration
- Remove with-context-mcp from plugin dependencies (now using MCP server)
This commit is contained in:
David Ibia
2025-12-28 23:19:43 +01:00
parent 24fb286db1
commit 8d92715761
3 changed files with 31 additions and 1149 deletions

View File

@@ -12,28 +12,42 @@
"packages/*/AGENTS.md" "packages/*/AGENTS.md"
], ],
"agent": { "agent": {
"build": {
"mode": "all"
},
"plan": {
"mode": "primary"
},
"setup": { "setup": {
"mode": "subagent",
"description": "Generates project-specific documentation and guidelines through interactive discovery" "description": "Generates project-specific documentation and guidelines through interactive discovery"
}, },
"review": { "review": {
"mode": "subagent",
"description": "Reviews code for best practices and potential issues" "description": "Reviews code for best practices and potential issues"
}, },
"test": { "test": {
"mode": "subagent",
"description": "Runs tests and analyzes test results" "description": "Runs tests and analyzes test results"
}, },
"docs": { "docs": {
"mode": "subagent",
"description": "Generates and maintains documentation" "description": "Generates and maintains documentation"
}, },
"refactor": { "refactor": {
"mode": "subagent",
"description": "Refactors code for better quality and maintainability" "description": "Refactors code for better quality and maintainability"
}, },
"debug": { "debug": {
"mode": "subagent",
"description": "Debugs issues and troubleshoots problems" "description": "Debugs issues and troubleshoots problems"
}, },
"security": { "security": {
"mode": "subagent",
"description": "Audits code for security vulnerabilities" "description": "Audits code for security vulnerabilities"
}, },
"webgen": { "webgen": {
"mode": "subagent",
"description": "Generates complete web pages from ideas using any framework" "description": "Generates complete web pages from ideas using any framework"
} }
}, },
@@ -87,6 +101,21 @@
"chrome-devtools-mcp@latest" "chrome-devtools-mcp@latest"
], ],
"enabled": false "enabled": false
},
"with-context": {
"type": "local",
"command": [
"npx",
"-y",
"with-context-mcp"
],
"environment": {
"OBSIDIAN_API_KEY": "env:OBSIDIAN_API_KEY",
"OBSIDIAN_API_URL": "env:OBSIDIAN_API_URL",
"OBSIDIAN_VAULT": "env:OBSIDIAN_VAULT",
"PROJECT_BASE_PATH": "env:PROJECT_BASE_PATH"
},
"enabled": false
} }
} }
} }

View File

@@ -3,7 +3,6 @@
"version": "1.0.0", "version": "1.0.0",
"description": "OpenCode plugins for dotfiles", "description": "OpenCode plugins for dotfiles",
"dependencies": { "dependencies": {
"@opencode-ai/plugin": "^1.0.51", "@opencode-ai/plugin": "^1.0.51"
"with-context-mcp": "^3.0.4"
} }
} }

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1 @@
/Users/davidibia/Projects/MCP/with-context-mcp/plugin/with-context.ts