* fix(cli): restore kilo branding in MCP auth toast and client name
The 'Run: opencode mcp auth' popup / toast and the MCP protocol client
'name' field were reverted to 'opencode' by an upstream refactor
(opencode PR #22913, pulled in via Kilo PR #9346). Re-apply the
Kilo-branded strings with narrow kilocode_change markers and add a
regression test in packages/opencode/test/kilocode/ so the next upstream
merge fails a Kilo-owned test instead of shipping an 'opencode' popup.
* fix: use kilocode_change block markers for startAuth signature
---------
Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
Co-authored-by: marius-kilocode <marius@kilocode.ai>
The nullish coalescing operator (??) treats null as a falsy value and
falls through to the right-hand operand. Switch to a strict undefined
check so that a null assignment on `steps` is forwarded as-is, allowing
callers to express an intentional reset of the steps configuration.
Resolve conflicts after main's config.ts refactor to @effect/schema and
the messages.ts → messages/ directory split:
- Port AgentConfig nullable fields + default_agent nullable to the new
packages/opencode/src/config/agent.ts and config.ts Effect schemas.
The null delete sentinel for steps is already preserved by main's
normalize() (steps excluded from spread when undefined).
- Move AgentConfig nullable fields and Config.default_agent nullable to
the new messages/agents.ts and messages/config.ts.
- Re-apply the core fix to ModeEditView.tsx hidden/disable toggles:
send explicit false instead of val || undefined so deepMerge
overwrites a previously-saved true. Keep default_agent clear via
null delete sentinel when hiding/disabling the current default.
- Drop configSaved/configSaveFailed messages; main's retry + optimistic
fallback in KiloProvider and configUpdateFailed + saveError signal in
ConfigProvider subsume the PR's save-outcome split.
Replace nullish coalescing with explicit undefined check so that
`steps: null` is not collapsed to `maxSteps`, preserving the ability
to clear the steps override via a null sentinel value.
* fix(vscode): restore MCP OAuth sign-in from settings UI
- Add Sign in control when MCP status is needs_auth; posts authenticateMcp
to run CLI POST /mcp/{name}/auth/authenticate.
- On SSE mcp.browser.open.failed, open the auth URL via
vscode.env.openExternal (CLI subprocess open() often fails under VS Code).
- Dedupe openExternal when multiple webviews receive the same event.
Fixes UI regression described in GitHub issue #8904.
Made-with: Cursor
* fix(vscode): satisfy ESLint max-lines and complexity for MCP OAuth
- Move MCP connect/disconnect/authenticate and openExternal dedupe to
kilo-provider/mcp-oauth.ts.
- eslint-disable-next-line complexity for the webview message router.
Made-with: Cursor
* fix: restore MCP OAuth sign-in in VS Code
* fix: simplify MCP OAuth callback delegation
* fix: clarify MCP OAuth callback delegation
---------
Co-authored-by: e.olbrych <e.olbrych@mkmc.pl>
Co-authored-by: marius-kilocode <marius@kilocode.ai>
* refactor(cli): hoist Kilo model-specific prompt checks to the front
Extract the Kilo metadata-driven prompt selection into a dedicated
kiloPrompt() helper and invoke it with an early return at the top of
provider(). This ensures Kilo-specific prompt routing takes priority
over upstream heuristics and leaves the upstream if-chain untouched,
reducing future merge conflicts when opencode adjusts its own
model-specific prompt branching.
No behavior change.
* fix(cli): preserve Ling prompt fallback precedence
* fix(cli): keep prompt annotations scoped
---------
Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
Co-authored-by: marius-kilocode <marius@kilocode.ai>
Fixes 257 typecheck errors surfaced after the upstream merge:
- Update imports to new module paths after upstream PR #24554 removed
module barrel files (@/config, @/session, @/util, etc.) and PR #24309
renamed @opencode-ai/shared to @opencode-ai/core.
- Migrate loadMode to use Info.zod.safeParse for consistency with
loadAgents and ConfigCommand (unblocks KilocodeConfig.handleInvalid).
- Drop removed Npm.outdated mock from tests.
- Add missing Config.defaultLayer to bash-permission-metadata test runtime.
- Fix Tips component signature (kilocode drops upstream's 'connected' prop).
- Fix toast.tsx undefined 'duration' reference (should be toastOptions.duration).
- Move filesystem-containment test from deleted shared package to core.