22 Commits

Author SHA1 Message Date
Alex Alecu e2c2de2447 feat(plan): display plan message as non-synthetic in new sessions 2026-02-20 14:19:18 +02:00
Alex Alecu d5bceac21e feat: Handover task list and compacted context to next session after planning 2026-02-20 12:28:21 +02:00
Alex Alecu 9a9d675ada test: add withInstance helper, use answer constants 2026-02-19 13:20:04 +02:00
Alex Alecu 294846f706 fix: Reject pending plan followup question on abort signal 2026-02-19 11:59:57 +02:00
Alex Alecu a5e6ceb76e feat: When starting a new session after planning, include a compact summary of what was explored and which files were read so the AI doesn't have to re-search the codebase. 2026-02-19 11:42:35 +02:00
Alex Alecu 2d46b17f6c feat: Add predefined suggestions after finishing the planning session to improve context management 2026-02-19 10:23:19 +02:00
Pedro Heyerdahl 0f139f3120 feat(usage): add feature attribution header to API requests
Introduce X-KILOCODE-FEATURE header for tracking request origin
across different entry points (CLI, VSCode extension, autocomplete).

- Add HEADER_FEATURE, DEFAULT_FEATURE, and ENV_FEATURE constants
- Add getFeatureHeader() helper reading from KILOCODE_FEATURE env var
- Include feature header in buildKiloHeaders() when env var is set
- Set feature to "autocomplete" for FIM/completion requests
- Set KILOCODE_FEATURE="vscode-extension" when spawning CLI from VSCode
- Default to "cli" feature in opencode entry point
- Add unit tests for feature header logic
2026-02-18 15:49:22 -03:00
Marius 7163fbcee9 chore: update config schema URL from opencode.ai to app.kilo.ai (#267) 2026-02-13 16:01:33 +01:00
kiloconnect[bot] 3e3385fbb3 fix: support remote MCP server migration in mcp-migrator (#247)
* fix: support remote MCP server migration in mcp-migrator

The MCP migrator only handled stdio/local MCP servers. When a user
configured a remote streamable-http or sse MCP server in
.kilocode/mcp_settings.json, it failed with:
  The "file" argument must be of type string. Received undefined

This happened because convertServer() always assumed local servers,
building a command array from server.command (which is undefined for
remote servers).

Changes:
- Add remote transport type detection (streamable-http, sse)
- Convert remote servers to Config.McpRemote (type: "remote")
- Pass through url and headers fields
- Make command optional in KilocodeMcpServer interface
- Add comprehensive tests for remote server migration

* fix: validate url/command before use in mcp-migrator

Add guard clauses for missing url on remote servers and missing command
on local servers instead of using non-null assertions that could crash
on malformed config files.

---------

Co-authored-by: Kilo Agent <agent@kilo.ai>
Co-authored-by: marius-kilocode <marius@kilocode.ai>
2026-02-12 08:19:44 +00:00
Catriel Müller 1eedad9213 Refactor publish workflow and environment variables (#261)
* feat: changelog generation

* refactor: rename all ENV variables to KILO prefix

* refactor: publish rework

* refactor: publish rework

* refactor: unify git commiter action

* refactor: add all kilobots to the team
2026-02-12 09:00:51 +01:00
Marius 61df9982ee fix(mcp-migrator): use correct project-level filename mcp.json instead of mcp_settings.json (#230)
The Kilocode extension stores project-level MCP settings in
.kilocode/mcp.json, but the migrator was looking for
.kilocode/mcp_settings.json (which is only used for global settings).
This meant local MCP servers were never picked up by the CLI.
2026-02-11 10:25:03 +00:00
John Fawcett 1762590ff4 feat(opencode): add project ID resolution and tracking
refactor(opencode): improve project ID resolution and normalization
Implement logic to resolve a unique project identifier with priority given
to `.kilocode/config.json` and falling back to the git origin remote URL.
The resolved ID is normalized, cached per-instance, and sent as a header
to the Kilo Gateway provider to enable project-specific tracking.
2026-02-10 12:10:00 -06:00
Marius d173377a2b fix: use OAuth accountId for enterprise model list filtering (#193)
Enterprise users logging in via OAuth had their organization ID stored
in auth.accountId but the model fetch code never read it, causing the
model list to be fetched from the personal endpoint instead of the
org-specific endpoint that applies the allow list.
2026-02-09 10:08:19 -05:00
Suresh Kumar Sivasankaran b7785ca296 Merge pull request #30 from Kilo-Org/kilocode-ignore-migration
feat(kilocode): add .kilocodeignore migration to permission rules
2026-01-27 15:02:45 +01:00
Marius Wichtner 67f6ae59fc feat(kilocode): add .kilocodeignore migration to permission rules 2026-01-27 13:54:16 +01:00
Suresh Sivasankaran 2c344678bc add skills discovery for the cli 2026-01-27 12:19:22 +01:00
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 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