Replace try/catch wrapping ~400 lines with a finished flag pattern to
minimize upstream merge conflicts. Combine multiple kilocode_change
markers into single blocks.
Addresses review feedback from marius-kilocode on PR #155.
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.
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.
* fix: use 'max' instead of 'xhigh' as highest reasoning effort for Anthropic models on Kilo Gateway
Anthropic's native effort levels are low/medium/high/max, not xhigh.
The upstream merge replaced the Kilo-specific effort mapping with
OPENAI_EFFORTS which uses xhigh. This restores 'max' as the
user-facing variant name while mapping it to 'xhigh' on the wire
for OpenRouter API compatibility.
* fix: clarify comment about OpenRouter effort naming vs Anthropic naming
* feat: add Kilo soul prompt for consistent personality across all models
* fix: gate soul prompt behind Codex check to match existing prompt delivery pattern
Codex sessions deliver prompts via options.instructions, not system messages.
Prepend the soul to options.instructions for Codex, and skip it from the
system array, matching how SystemPrompt.provider() is already handled.
* fix: make Ctrl+C interrupt instead of kill, require double-press to exit
* fix: revert config changes, handle ctrl+c double-press in event handlers only
Reverts keybind default changes (unnecessary — ctrl+c overlap is handled
by event priority in onKeyDown). Adds missing preventDefault() in
child-session ctrl+c handler to prevent SIGINT.
Add the x-kilocode-machineid HTTP header to outgoing requests when using
the kilo-gateway. This enables the cloud backend to track machine IDs
in the microdollar_usage_metadata table (Kilo-Org/cloud#90).
The header is set alongside the existing x-kilocode-mode header when
the model API uses @kilocode/kilo-gateway.
Replace setTimeout polling loop with reactive createEffect to wait for
sync completion. Reserve space with a placeholder fallback to prevent
layout shift when notifications load. Fix banner icon consistency and
title overflow handling.
Replace OpenCode/opencode with Kilo/kilo in all user-facing CLI strings,
TUI dialogs, and error messages. String-only changes with kilocode_change
markers for upstream merge tracking.
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.
Unify ingest queue and session close reasons via `Session.CloseReason` and
ensure `TurnOpen`/`TurnClose` publishing is awaited; mark close reason as
`error` on unexpected exceptions and handle abort-induced stops correctly.
Add ingest queue tests for stable-key coalescing of session open/close and for
including `?v=1` on flush requests.
* feat: add debug and orchestrator built-in agents
Add two new primary agents that legacy Kilo Code users expect:
- debug: systematic debugging methodology (reflect on causes, narrow
down, add logs, confirm before fixing). Same permissions as code agent.
- orchestrator: coordinates complex tasks by delegating to explore and
general subagents in parallel. Read-only + task delegation permissions.
Both are enabled by default and can be disabled via opencode.json:
{ "agent": { "debug": { "disable": true } } }
* docs: document debug and orchestrator agents in agents.mdx
* refine orchestrator prompt: add planning phase, wave-based execution, and file conflict avoidance
`kilo auth list` crashes with "No context found for instance" because
ModelsDev.get() calls Config.get() when injecting the kilo provider,
which requires an Instance context. AuthLoginCommand and AuthLogoutCommand
already have this wrapper but AuthListCommand was missed.
Add session.turn.open and session.turn.close bus events and publish them
from the prompt loop with a close reason (completed/error/interrupted).
Extend the ingest queue to sync session_open/session_close items and
version the ingest endpoint with ?v=1.
Remove dynamic installation of built-in plugins. GitLab auth is now imported
directly as an internal plugin, eliminating network requests during startup
and simplifying the plugin loading logic.
Removes the need for test mocks since plugins are no longer
dynamically installed at runtime.