Commit Graph
3646 Commits
Author SHA1 Message Date
Mark IJbema afe5df0449 fix(cli): enforce bash deny after user config in orchestrator permissions
Instead of placing user before the orchestrator allowlist (which prevents
users from restricting allowed tools), keep user in the normal position
but add an explicit bash deny after user. This way:
- User can still deny orchestrator-allowed tools (e.g. webfetch)
- User cannot re-enable bash since the post-user deny wins via findLast
2026-03-25 11:53:03 +01:00
Mark IJbema b1542bbd78 fix(cli): restore commented-out bash line for upstream merge compatibility 2026-03-25 11:22:40 +01:00
Mark IJbema 4ca6388f19 fix(cli): place user config before orchestrator allowlist so deny takes precedence
Move `user` before the orchestrator-specific PermissionNext.fromConfig()
so that findLast() returns the orchestrator's rules (which appear later
in the merged array), preventing user config from re-enabling bash.
This mirrors the pattern already used by the `ask` agent.

Also removes the dead commented-out bash line since `*: deny` already
covers it.
2026-03-25 11:17:28 +01:00
Mark IJbema a848ade0a3 fix(cli): comment out bash access instead of removing the line 2026-03-25 11:04:01 +01:00
Kilo Code 63ce373539 fix(cli): remove bash access from orchestrator mode to prevent direct file editing
The orchestrator mode had `bash: "allow"` in its permission ruleset, creating a
loophole where the LLM could use shell commands (sed, echo >, tee, etc.) to write
files directly instead of delegating to sub-agents via the task tool.

This is inconsistent with the orchestrator system prompt which says "Do not edit
files directly" and with how kilocode-legacy handled this (no command access at
all for orchestrator).

Removes bash from the allowed tools. The orchestrator still has read, grep, glob,
and list for lightweight codebase investigation, plus task for delegation.

Closes #7575
2026-03-25 09:40:05 +00:00
Christiaan Arnoldus 43ba89dd7d Reduce code duplication 2026-03-24 20:45:27 +01:00
Christiaan Arnoldus 7b911749fa Make less brittle 2026-03-24 20:27:35 +01:00
Christiaan Arnoldus e6342147ce Retain ai_sdk_provider here 2026-03-24 18:05:45 +01:00
Christiaan Arnoldus c0a8fdb358 Avoid building a new SDK object 2026-03-24 17:11:36 +01:00
Christiaan Arnoldus 1fdfa77294 Merge branch 'main' into feat/honor-ai-sdk-provider-metadata 2026-03-24 15:36:16 +01:00
Mark IJbema d45370c71d Merge pull request #7530 from Kilo-Org/fix-windows-cmd-popups
fix: prevent cmd.exe windows from appearing on Windows
2026-03-24 15:33:05 +01:00
Catriel Müller 7441339a7f Merge pull request #7535 from Kilo-Org/catrielmuller/kilo-custom-modes-support
feat(gateway): add organization custom modes support
2026-03-24 11:07:19 -03:00
Catriel Müller a8e0da3da7 feat: Kilo gateway custom modes 2026-03-24 10:22:54 -03:00
Mark IJbema 80aacd6518 fix: scope process.type shim to vscode context via KILO_PLATFORM env var 2026-03-24 14:11:39 +01:00
Christiaan Arnoldus 25eac04833 honor ai_sdk_provider metadata for Vercel AI SDK provider selection 2026-03-24 14:00:08 +01:00
Mark IJbema 53ab8e9652 fix: prevent cmd.exe windows from appearing on Windows
- Set process.type in mcp/index.ts so MCP SDK's StdioClientTransport
  uses windowsHide:true when spawning MCP servers on Windows (the SDK
  only enables this in Electron, checking 'type' in process)
- Add windowsHide:true to GitOps.ts git execFile calls
- Add windowsHide:true to marketplace installer tar execFile call
2026-03-24 13:11:56 +01:00
kilo-code-bot[bot]andkiloconnect[bot] c87457ba5a fix(cli,vscode): consume stream explicitly to prevent commit message infinite loading (#7434)
* fix(cli,vscode): prevent infinite loading in commit message generation

Add timeout-based AbortController to both server-side LLM stream (30s)
and client-side HTTP request (35s) so the SCM progress spinner cannot
hang indefinitely. Make the VS Code progress indicator cancellable so
users can abort manually. Also fix outdated test mocks that referenced
the removed getHttpClient API instead of the current SDK getClient.

* fix(cli,vscode): consume stream explicitly to prevent infinite loading

Replace `await stream.text` with `for await (chunk of stream.textStream)`
so that stream-level errors surface immediately instead of leaving the
promise hanging indefinitely. With some providers and Vercel AI SDK
versions, the `.text` promise never resolves when the underlying stream
errors out early, causing the spinner to load forever (fixes #7345).

Add a catch block that distinguishes timeout aborts from other errors
and re-throws with a human-readable message (partially addresses #6568).

In the VS Code extension, log the actual error in the getClient catch
block instead of silently discarding it.

---------

Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
2026-03-24 12:25:17 +01:00
Mark IJbema a637715a5e Revert "feat(cli,vscode): change default bash auto-approve rule to ask" 2026-03-24 11:09:37 +01:00
Marian Alexandru Alecu 9cd7bb32d6 Merge pull request #7444 from Kilo-Org/feat/cli-config-awareness
feat(cli): add config location awareness
2026-03-23 22:27:44 +02:00
Mark IJbema 9f8079058a fix(cli): always use kilo.db regardless of channel
The upstream merge in PR #7240 introduced channel-based database path
separation, causing non-latest/beta channels (including local dev) to
open a different DB file (e.g. kilo-local.db) instead of kilo.db. This
made all existing sessions invisible.

Remove the channel-based path logic and always use kilo.db. Also remove
the now-unused KILO_DISABLE_CHANNEL_DB flag.

Closes #7472
2026-03-23 18:33:21 +01:00
Marian Alexandru Alecu dbf8e66fe6 Merge pull request #7417 from mvanhorn/fix/snapshot-cleanup-windows-git-config
fix(snapshot): add missing git config flags to cleanup() for Windows
2026-03-23 18:30:02 +02:00
Alex Alecu 26f207e8fa fix(cli): clarify config paths 2026-03-23 18:24:28 +02:00
Alex Alecu 2847ec4a85 fix(cli): use strict .kilo/ directive in config hint
Replace conditional fallback language with an imperative instruction
to always use .kilo/ and never create config under .kilocode/ or
.opencode/.
2026-03-23 18:03:00 +02:00
Alex Alecu 5d5433681f fix(cli): remove .opencode/ from config dir hint
Only suggest .kilo/ and .kilocode/ as config directories, dropping
.opencode/ to avoid confusion with upstream naming.
2026-03-23 17:07:16 +02:00
Alex Alecu 433912769d fix(cli): prefer existing config dir over creating .kilo/
Instruct the model to reuse .kilocode/ or .opencode/ when already
present, falling back to .kilo/ only when no config dir exists.
2026-03-23 17:03:24 +02:00
Mark IJbema 5d0fad3850 Merge pull request #7439 from Kilo-Org/mark/bash-default-ask
feat(cli,vscode): change default bash auto-approve rule to ask
2026-03-23 14:37:38 +01:00
Alex Alecu ba436a7896 feat(cli): add tip about saving repetitive tasks as commands 2026-03-23 14:42:30 +02:00
Alex Alecu 57e36c7ea2 feat(cli): add config location awareness to system prompt
Add project and global config paths to the <env> block so the model
knows where to create commands, agents, and config files by default.
2026-03-23 14:42:17 +02:00
Christiaan Arnoldus 4e2da1f3b5 More targeted change, identical to upstream now 2026-03-23 13:31:29 +01:00
Mark IJbema dac229fe88 feat(cli,vscode): change default bash auto-approve rule to ask
Previously, bash commands inherited the global "*": "allow" wildcard default,
meaning they would execute without approval. Add an explicit bash: "ask" rule
to the agent defaults so users are prompted before shell commands run.

Update the VS Code extension's TOOL_DEFAULTS mirror to match.

Closes #7436
2026-03-23 13:15:01 +01:00
kiloconnect[bot] e1b67fe5da fix(cli): remove context-1m-2025-08-07 anthropic-beta header 2026-03-23 11:22:08 +00:00
Mark IJbema 54e14d7f87 fix: remove dead docs link from github setup wizard output 2026-03-23 11:22:27 +01:00
Mark IJbema 1461b57952 fix: replace dead docs/github link, exclude vercel.link from lychee
- kilo.ai/docs/github/#usage-examples was a 404 (page never created).
  Replaced with kilo.ai/docs/automate/integrations in github.ts:245.
- vercel.link redirects to a login page that blocks bots — added to
  lychee.toml exclusions.
2026-03-23 11:22:07 +01:00
Matt Van HornandClaude Opus 4.6 5a64a874cc fix(snapshot): add missing git config flags to cleanup() for Windows
The cleanup() function calls `git gc` without the Windows-required
config parameters (core.autocrlf, core.longpaths, core.symlinks)
that are used in every other git command in the same file. This
causes `git gc --prune` to fail with exit code 128 on Windows,
leaving temporary pack files that consume 10-20 GB per session.

Fixes #7415

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 00:38:45 -07:00
Imanol Maiztegui 64442519b4 Improved subagent permissions handling (#7348)
* feat(vscode): handle subagent permissions

* fix(vscode): formatting

* fix(permission): preserve original ruleset in pending requests for drainCovered evaluation

* style(permission): shorten inline comments on kilocode_change markers

* refactor(permission): extract drainCovered into dedicated module
2026-03-20 18:08:11 +01:00
Catriel Müller d7b9f51962 refactor: replace x-opencode-* headers with x-kilo-* across codebase and upstream scripts
Update upstream merge scripts to use a generic x-opencode- → x-kilo- regex
that catches all current and future headers automatically. Apply the same
replacement to all source files so the codebase is ready for the next
upstream merge.
2026-03-20 09:10:57 -03:00
Johnny Amancio 6e4c57f328 fix: Adjust missing merge conflicts not caught before 2026-03-20 12:33:10 +01:00
Johnny Amancio a49820192d resolve merge conflicts 2026-03-20 12:18:26 +01:00
Johnny Amancio f3a327d265 refactor: kilo compat for v1.2.24 2026-03-20 11:56:07 +01:00
Imanol Maiztegui f336949a08 Save changes on Settings update (#7312)
* feat(vscode): track session status for busy-session warnings

* feat(vscode): warn before saving settings when sessions are running

* feat(vscode): add draft state and save/discard to config context

* feat(vscode): Save button on Settings panel

* fix(vscode): pass remove permission commands correctly to backend

* feat(vscode): handle permission removals

* fix(vscode): detect other sessions in settings panel

* feat(vscode): translations

* feat(vscode): refresh config state on auto-approve tab

* fix(vscode): formatting and unit tests

* fix: reset Config.state cache on no-dispose config write

* fix(vscode): Detect sessions opened before Settings tab is opened

* fix(vscode): Removed previous fix changes
2026-03-19 22:12:09 +01:00
a75008864f fix(opencode): pass missing auth headers in run --attach (#16097)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Shoubhit Dash <shoubhit2005@gmail.com>
2026-03-19 19:43:43 +01:00
Marian Alexandru Alecu b0bf365e70 Merge pull request #7313 from Kilo-Org/onboarding-improvement 2026-03-19 20:04:36 +02:00
Catriel Müller 47e8dc28c4 Merge pull request #7240 from Kilo-Org/catrielmuller/kilo-opencode-v1.2.22
OpenCode v1.2.22
2026-03-19 14:12:58 -03:00
Alex Alecu 4be714dbf9 fix(cli): exclude anonymous kilo provider from connected check
The kilo provider always autoloads with free models and apiKey="anonymous",
causing useConnected() to return true even for first-time users without any
API key. This prevented the onboarding tip from ever appearing.
2026-03-19 16:20:06 +02:00
Alex Alecu 6d42e22a6e fix(cli): show tips for connected first-time users 2026-03-19 16:01:59 +02:00
Alex Alecu c263032282 fix(cli): respect tips toggle during onboarding
The onboarding tip now honors the tips_hidden setting so users
can dismiss it via the command palette if they choose to.
2026-03-19 15:03:49 +02:00
Alex Alecu 7dee800f97 feat(cli): mention config paths in /status tip
Update the existing /status tip to mention config paths alongside
MCP servers and system info, directing users to the newly added
config section in the status dialog.
2026-03-19 14:32:22 +02:00
Alex Alecu 4c8df7d336 feat(cli): show onboarding tip for first-time users on free model
First-time users with no connected provider now see a targeted tip
on the home screen: 'Using a free model — run /connect to add your
API key'. Once a provider is connected or the user has sessions,
normal random tip behavior resumes.
2026-03-19 14:31:54 +02:00
Alex Alecu 1ac86e5c36 feat(cli): show config and project paths in /status dialog
Display global config path (from Global.Path.config) and project
directory in the status dialog so users can quickly verify which
config files are being loaded. Paths are shortened with ~ for
readability, matching existing TUI conventions.
2026-03-19 14:28:59 +02:00
Mark IJbema b1c91bcbbc Merge pull request #6225 from Kilo-Org/mark/move-dynamic-context-to-user-message
refactor: move dynamic editor context from system prompt to user message
2026-03-19 12:04:48 +01:00