* fix: renamed pattern arrays used for permission rules
* fix: rename savePatternRules to saveAlwaysRules
* feat: generate hierarchical always patterns in bash tool
* feat: validate saveAlwaysRules against always array only
* feat: pass always field through extension bridge to webview
* feat: show hierarchical always patterns in PermissionDock dropdown
* fix: rename pattern to rule in PermissionDock translations, styles, and data-slots
* fix(vscode): correct auto-run comment in PermissionDock
* feat(kilo-vscode): strip trailing wildcard from permission rule labels
* fix: deduplicate permission rules and strip wildcards from display labels
* refactor: move hierarchy to metadata.rules, restore always to arity prefix
* feat: pass always field to permission dock for non-bash tool rules
* fix: correct bash test assertion to check metadata.rules and fix indentation
* fix: hide permission rules dropdown for non-bash tools
* fix: align always-rules route descriptions, whitespace, and restore multi-command tests
The $schema URL in source code and documentation referenced
https://kilo.ai/config.json which returns 404. The correct URL
is https://app.kilo.ai/config.json (already used in test files).
Updated all remaining references in:
- packages/opencode/src/config/config.ts (4 occurrences)
- packages/kilo-docs/pages/code-with-ai/platforms/cli.md (4 occurrences)
- packages/kilo-docs/pages/customize/custom-subagents.md (1 occurrence)
Fixes#7063
* fix: use direct generateText for prompt enhancement instead of LLM.stream
* fix: guard temperature for models that disable it, move instruction to system message
- Check model.capabilities.temperature before setting temperature
- Move the enhance instruction to a system message to prevent user text
from overriding the instruction via prompt injection
Agent.remove() now also scans the .kilocodemodes YAML files that
ModesMigrator reads (VSCode global storage, ~/.kilocode/cli/global/,
~/.kilocodemodes, project .kilocodemodes) and removes the matching
entry by slug, so migrated modes don't reappear after deletion.
Replace the config disable:true approach with a proper Agent.remove()
function that scans config directories for the agent's markdown file
and deletes it, then refreshes state via Instance.dispose().
- Add Agent.remove() in agent.ts with RemoveError
- Add POST /kilocode/agent/remove route
- Mount KilocodeRoutes in server.ts
- Update KiloProvider to call the new backend route
- Regenerate SDK
Bun.which('tsc') only finds a globally installed tsc. Most projects
have typescript in node_modules without a global install. Walk up
from root looking for node_modules/typescript/bin/tsc before falling
back to the global tsc.
When KILO_EXPERIMENTAL_LSP_TOOL is on but tsgo binary is missing,
spawn() returns undefined and schedule() marks typescript as broken.
Now falls back to the lightweight TsClient instead of losing TS
diagnostics entirely.
When the flag is set, Typescript.spawn() resolves the native tsgo binary
and starts it with --lsp --stdio as a persistent LSP server, providing
full diagnostics, hover, go-to-definition, etc. The TsClient lightweight
fallback (tsgo --noEmit on demand) remains the default when the flag is
not set.
- Export native_tsgo() from ts-check.ts for reuse by the LSP server spawn
- Restore Typescript.spawn() body gated on KILO_EXPERIMENTAL_LSP_TOOL
- Gate TsClient short-circuit in index.ts on !Flag.KILO_EXPERIMENTAL_LSP_TOOL
Remove the /process server route, ProcessInfo module, and all
process-related UI in the status dialog (formatBytes, shortCommand,
refresh timer, process JSX). This simplifies the status dialog and
removes ~460 lines of code that added process tree diagnostics.
tsgo writes a .tsbuildinfo cache so subsequent runs skip re-checking
unchanged files. First edit is still ~1.3s cold, but every edit after
that reuses the cache and drops to ~200-400ms — matching the old
language server latency with zero persistent memory.
File paths as query parameters can fail due to URL encoding issues.
Switch to POST /kilocode/skill/remove with the location in the JSON
request body, which avoids encoding problems entirely.
Also log the SDK error response to aid debugging.
The DELETE endpoint was returning data that somehow rendered as empty
rows in the webview. Simplify the approach:
- Webview optimistically removes the skill from its signal immediately
- Extension fires DELETE to the backend (deletes from disk + cache)
- Extension invalidates cachedSkillsMessage so next tab visit fetches
fresh data
- No second skillsLoaded message is sent after removal, avoiding the
stale data overwrite that caused the UI corruption
The DELETE /kilocode/skill endpoint now returns the updated skills
list (Skill.Info[]) instead of a boolean. The extension uses this
response directly to update the webview, eliminating the need for a
separate GET /skill round-trip that could return stale cached data.
Also normalize paths in Skill.remove() with path.resolve() to ensure
location strings match regardless of path format differences.
Rename routes/skill.ts to routes/kilocode.ts with KilocodeRoutes
export, mounted at /kilocode. This is the single home for all future
kilo-specific CLI endpoints, avoiding conflicts with the existing
/kilo gateway routes and keeping all kilo changes out of server.ts.
SDK: client.kilocode.removeSkill()
Extract the inline DELETE /skill endpoint from server.ts into a
dedicated packages/opencode/src/server/routes/skill.ts file, reducing
kilo-specific changes in the shared server.ts and minimizing future
merge conflicts with upstream.
The route is mounted at /skill and uses the same lazy() pattern as
other kilo-specific route files (telemetry, enhance-prompt, etc.).
Add Skill.remove() that deletes the skill directory from disk and
mutates the cached Instance.state in-place so subsequent GET /skill
calls return the updated list.
Add DELETE /skill?location=... server endpoint, regenerate the SDK,
and update KiloProvider to call the SDK method instead of deleting
files directly from the extension.
notify.open() is now a no-op. Warm-up calls from read.ts
(touchFile(path, false)) no longer spawn tsgo processes.
Only write/edit/apply_patch trigger a check via waitForDiagnostics().
The node_modules/.bin/tsgo script is a node.js wrapper that spawns a
node process just to execFileSync the native binary. This caused a
3+ GB node process visible in the process tree.
Now resolve the platform-specific native binary directly from
@typescript/native-preview-{platform}-{arch}, walking up the
directory tree including bun's hoisted .bun/ layout.
Short-circuit getClients() to create a TsClient for TypeScript files
instead of spawning typescript-language-server. The server's spawn()
now returns undefined; root() and extensions are preserved for routing.
Drops ~500MB persistent memory to ~50MB peak / 0 idle per session.
Duck-types LSPClient.Info without spawning a persistent process.
Runs TsCheck on notify.open(), coalesces rapid calls, and provides
a stub connection for unsupported LSP operations (hover, definition).
Shells out to tsgo --noEmit (with tsc fallback) and parses the
file(line,col): error TSxxxx: message output into Diagnostic[].
Uses ~50MB peak memory and 0 idle, replacing the need for a
persistent typescript-language-server process.
Pass maxTsServerMemory (1536 MB) and disableAutomaticTypingAcquisition
via typescript-language-server initialization options to prevent tsserver
from consuming 2.5+ GB on large monorepos. This reduces peak memory
from ~2.8 GB to ~1.5 GB for the entire TypeScript LSP subsystem.
On macOS, ps -o comm= is an alias for command (full path + args), which
broke whitespace-based column parsing, producing garbled labels like
'.nvm → en'. Switch to ucomm which returns just the executable basename.
Also improve shortCommand to extract .js/.ts script basenames from path
arguments, so node processes show useful labels like 'node → tsserver'
instead of just 'node'.
Show all related processes (self + children) with PID, command name,
and RSS memory in the /status dialog. Highlights processes exceeding
512 MB in warning color. Auto-refreshes every 3 seconds while the
dialog is open to track memory changes in real time.
Expose process tree and memory info via a new API endpoint that returns
the current process stats, V8 heap breakdown, and all child processes
with their RSS memory usage.
Add ProcessInfo module that collects PID, command, RSS memory, and V8
heap stats for the current process and all descendant child processes.
Uses ps and pgrep to walk the process tree on macOS/Linux.
readMcpSettings() called JSON.parse() without try/catch. In migrate(),
if .kilocode/mcp.json existed but contained malformed JSON, the uncaught
exception propagated out of the dual-read loop, preventing .kilo/mcp.json
from ever being read. The outer loadMcpConfig() catch returned {} instead
of the valid config — silently losing MCP server configuration.
Wrap the file read + parse in try/catch, log a warning, and return null
so the loop continues to the next config directory.
Regression tests added for both readMcpSettings (unit) and migrate
(integration) to prove the bug and verify the fix.
Refs: #6881
Co-authored-by: marius-kiloclaw <marius-kiloclaw@users.noreply.github.com>
The upstream merge (v1.1.54) overwrote Kilo-specific URL handling with
the opencode ShareNext flow, breaking import for app.kilo.ai/s/ URLs.
Restore parsing of https://app.kilo.ai/s/<id> and fetching from
ingest.kilosessions.ai instead of the opncd.ai share API.