Commit Graph

245 Commits

Author SHA1 Message Date
Marius Wichtner 1835e45a57 Merge branch 'dev' into schaltwerk/kilocode-mcp-migration
Merged dev branch which includes:
- Workflows migration (Phase 3)
- Rules migration (Phase 2)

Combined with MCP migration (Phase 4) from this branch.

Resolved merge conflicts in:
- packages/opencode/src/config/config.ts - Combined all four migrators
- packages/opencode/src/kilocode/index.ts - Export all migrators
2026-01-26 18:44:39 +01:00
Marius Wichtner 8089920e51 Merge branch 'dev' into schaltwerk/kilocode-rules-migration-jx
Resolved conflicts:
- packages/opencode/src/config/config.ts: Added RulesMigrator alongside WorkflowsMigrator
- packages/opencode/src/kilocode/config-injector.ts: Added rules migration alongside workflows
- packages/opencode/src/kilocode/index.ts: Export all three migrators
- packages/opencode/test/kilocode/config-injector.test.ts: Combined all tests
2026-01-26 18:24:55 +01:00
Marius Wichtner 8f463ead87 refactor: address PR review comments
- Move logging logic from config.ts to mcp-migrator.ts (loadMcpConfig helper)
- Reduce config.ts changes to just 2 lines
- Revert AGENTS.md changes
- Add kilocode-markers.md to .opencode/agent/ for kilocode-specific instructions
- Add instructions reference to opencode.jsonc
2026-01-26 18:21:38 +01:00
Marius Wichtner 7471fcfe73 feat(kilocode): add rules migration (Phase 2)
Migrate Kilocode rules from .kilocoderules and .kilocode/rules/ to
Opencode's instructions config array.

Features:
- Discover rules from .kilocoderules, .kilocode/rules/*.md, and
  mode-specific variants
- Support global rules from ~/.kilocode/rules/
- Read-only migration (never modifies project files)
- Combines with existing opencode config (never overwrites)
- Kilocode-only (no .roorules or .clinerules migration)

Files:
- rules-migrator.ts: Core migration logic
- config.ts: Integration point for direct CLI usage
- config-injector.ts: Integration for VSCode extension path
- rules-migrator.test.ts: 13 unit tests
- config-injector.test.ts: 4 new integration tests
- rules-migration.md: Documentation
2026-01-26 17:50:58 +01:00
Marius Wichtner a7295b4511 feat(kilocode): add MCP server migration from VSCode extension
Migrate Kilocode MCP server configurations from the VSCode extension's
mcp_settings.json to Opencode's native MCP config format.

Features:
- Read MCP settings from VSCode extension global storage
- Convert Kilocode format (command + args) to Opencode format (command array)
- Handle disabled servers (skip them)
- Warn about alwaysAllow permissions that cannot be migrated
- Support project-level .kilocode/mcp_settings.json

Config precedence (lowest to highest):
1. Kilocode MCP settings (new)
2. Remote/well-known config
3. Global user config
4. Project config (opencode.json)
5. OPENCODE_CONFIG_CONTENT

This allows users to configure MCP servers in the Kilocode VSCode extension
and have them automatically available in kilo-cli without any manual setup.
Native opencode config takes precedence over legacy Kilocode settings.
2026-01-26 17:18:15 +01:00
Marius Wichtner ab4d1a6879 core: migrate Kilocode workflows to Opencode commands
- Add WorkflowsMigrator to discover and convert Kilocode workflows
- Load workflows from VSCode global storage, ~/.kilocode/workflows/, and .kilocode/workflows/
- Convert workflows to Opencode Command format with template and description
- Load Kilocode configs first (lowest precedence) so Opencode configs always win
- Update config-injector for VSCode extension env var injection
- Add 16 unit tests for workflows-migrator
- Add 2 integration tests for config-injector

Workflows are discovered from:
1. VSCode extension storage (platform-specific)
2. ~/.kilocode/workflows/ (global)
3. .kilocode/workflows/ (project)

Config loading order (lowest to highest precedence):
1. Kilocode legacy configs (modes + workflows)
2. Remote/well-known config
3. Global user config
4. Custom config path
5. Project config (opencode.json)
6. OPENCODE_CONFIG_CONTENT env var
2026-01-26 17:17:13 +01:00
Marius Wichtner 8a9510603c feat(kilocode): add modes migration from Kilocode to Opencode agents
Phase 1 of Kilocode config migration:

- Add ModesMigrator to read custom modes from:
  - VSCode extension global storage (platform-specific paths)
  - Project .kilocodemodes files
  - Home directory .kilocodemodes

- Convert Kilocode mode groups to Opencode permissions:
  - read → read: allow
  - edit → edit: allow (with fileRegex support)
  - command/browser → bash: allow
  - mcp → mcp: allow
  - Missing groups are explicitly denied (not ask)

- Skip default modes (code, architect, ask, debug, orchestrator)
  as they map to native Opencode agents

- Add KilocodeConfigInjector for building OPENCODE_CONFIG_CONTENT

- Integration in config.ts to auto-load Kilocode modes

- 27 unit tests with 100% function coverage

- Documentation in kilocode/docs/modes-migration.md
2026-01-26 16:26:49 +01:00
Kenny a18ae2c8b7 feat: add OPENCODE_DISABLE_PROJECT_CONFIG env var (#8093)
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
2026-01-20 23:36:42 -06:00
Adam 924fc9ed80 wip(app): settings 2026-01-20 07:33:44 -06:00
Nathan Flurry bfb8c531c2 feat: bind vim-style line-by-line scrolling (#8980)
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
2026-01-17 21:54:26 -06:00
Aiden Cline 052f887a9a core: prevent env variables in config from being replaced with actual values
When opencode.json was missing a $schema, the config loader would add it
and write the file back - but with env variables like {env:API_KEY} replaced
with their actual secret values. This made it impossible to safely commit
opencode.json to version control.

Now the original config text is preserved when adding $schema, keeping
variable placeholders intact.
2026-01-17 20:59:50 -06:00
Aiden Cline 33290c54cd Revert "feat(mcp): add OAuth redirect URI configuration for MCP servers (#7379)"
This reverts commit 40b275d7e6.
2026-01-16 22:17:33 -06:00
Aiden Cline e1d0b2ba6e fix: use dynamic import for session event in config.ts to avoid circular dep 2026-01-16 11:39:22 -06:00
Bernat Pericàs ccc27e23df fix(docs): Broken URL (#8918) 2026-01-16 11:37:05 -06:00
Christopher Tso 40b275d7e6 feat(mcp): add OAuth redirect URI configuration for MCP servers (#7379) 2026-01-15 23:36:48 -06:00
Aiden Cline dc1c25cff5 fix: ensure frontmatter can process same content as other agents (#8719) 2026-01-15 13:06:14 -06:00
Maciek Szczesniak 37f30993fa fix: show toast error message on ConfigMarkdown parse error (#8049)
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
2026-01-15 11:53:06 -06:00
Dax dd1f981d23 fix: honor per-server MCP timeouts (#8706) 2026-01-15 11:31:31 -05:00
Aiden Cline 16cac69a72 Revert "feat: allow provider-level store option (#8000)" (#8613) 2026-01-15 00:45:03 -06:00
Call White fcf2da9571 feat: allow provider-level store option (#8000) 2026-01-15 00:35:53 -06:00
Cas 76a79284d2 feat(tui): make dialog keybinds configurable (#6143) (#6144) 2026-01-14 23:39:52 -06:00
ShoeBoom c0b214232d fix(config): handle write errors when updating schema in opencode config (#8125) 2026-01-12 23:11:26 -06:00
Aiden Cline 735f3d17bc fix: ensure plurals are properly handled (#8070) 2026-01-12 15:21:01 -06:00
Jeon Suyeol 8e3ab4afa7 feat(config): deduplicate plugins by name with priority-based resolution (#5957) 2026-01-09 02:11:24 -06:00
Dax e37fd9c105 core: add interactive question tool for gathering user preferences and clarifying instructions (#7268) 2026-01-07 22:29:42 -05:00
Matt Silverlock 4ba0b22b04 fix: config precedence now correctly allows local config to override remote (#7141) 2026-01-07 12:07:21 -05:00
Sewer. fd7b7eacd3 Added: Ability to hide subagents from primary agents system prompt. (#4773)
Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
2026-01-06 22:29:17 -06:00
Aiden Cline c7a2c737e8 fix: ensure 'name' isnt being sent in request body for custom agent 2026-01-06 12:21:30 -06:00
Dax Raad 0276885181 core: preserve permission config key order to maintain user-defined permission precedence 2026-01-05 14:09:37 -05:00
Dax Raad a76570b5dd tui: add development scripts for better debugging workflow 2026-01-04 10:38:02 -05:00
Dax Raad 97977f6ad4 ensure @opencode-ai/plugin exists only on first run 2026-01-04 10:23:42 -05:00
Dax Raad 2d074f0472 initialize config in worktree 2026-01-04 10:10:25 -05:00
Dax Raad 5944443a60 core: fix dependency installation and git worktree branch creation 2026-01-03 20:22:19 -05:00
Jake Nelson 5c5e636030 feat: add per-project MCP config overrides (#5406)
Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
2026-01-03 01:15:37 -06:00
Matt Silverlock 66bc046503 fix: merge instructions arrays across config files (#6663) 2026-01-02 13:55:40 -06:00
Dax 351ddeed91 Permission rework (#6319)
Co-authored-by: Github Action <action@github.com>
Co-authored-by: Adam <2363879+adamdotdevin@users.noreply.github.com>
2026-01-01 17:54:11 -05:00
Aiden Cline e503654252 core: make installdeps non blocking 2026-01-01 13:00:39 -06:00
Aiden Cline e0450e74fb fix: plugin & mode globs 2025-12-31 11:28:06 -06:00
Adam b1a6333d17 feat(core): configurable cors hosts 2025-12-31 03:50:29 -06:00
Dax Raad ed4ce67cdc core: add configurable timeout for MCP tool calls to prevent hanging requests 2025-12-30 23:06:07 -05:00
Aiden Cline b9ef09a0f4 tweak: read plurals too and stop erroring on them 2025-12-30 18:58:31 -06:00
Aiden Cline 81fef60266 fix: ensure variants also work for completely custom models (#6481)
Co-authored-by: Daniel Smolsky <dannysmo@gmail.com>
2025-12-30 16:37:32 -06:00
Aiden Cline ed0c0d90be feat: add variants toggle (#6325)
Co-authored-by: Github Action <action@github.com>
2025-12-29 21:43:50 -06:00
Matt Silverlock 56b5cdf883 feat: install local plugin dependencies from package.json (#6302)
Co-authored-by: OpenCode <opencode@example.com>
2025-12-29 10:37:41 -06:00
Didier Durand 29d8557d41 doc: fix typos in various files (#6294) 2025-12-28 13:06:25 -06:00
Connor Adams 8a2f4ddf70 chore: update INVALID_DIRS to include plural 'skills' directory (#6255) 2025-12-27 19:10:51 -06:00
Dax Raad ed06de5e30 core: add configurable compaction settings to allow users to disable auto-compaction and pruning via config instead of flags 2025-12-26 19:31:48 -05:00
Adam b2f45d574f Reapply "feat(core): optional mdns service (#6192)"
This reverts commit 505068d5a6.
2025-12-26 14:47:53 -06:00
Aiden Cline 505068d5a6 Revert "feat(core): optional mdns service (#6192)"
This reverts commit 26e7043718.
2025-12-26 11:43:52 -06:00
Ayush Walekar 155ba794cf chore: createOpencodeServer expose logLevel (#6202) 2025-12-26 11:09:06 -06:00