Commit Graph

433 Commits

Author SHA1 Message Date
Johnny Eric Amancio 6c138449d5 Merge remote-tracking branch 'origin/main' into johnnyeric/kilo-opencode-v1.17.13
# Conflicts:
#	package.json
#	packages/core/schema.json
#	packages/core/src/command.ts
#	packages/core/src/config/plugin/command.ts
#	packages/core/src/database/schema.gen.ts
#	packages/core/src/session/sql.ts
#	packages/core/src/v1/session.ts
#	packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/agentmanager/full-screen-diff-with-changes-chromium-linux.png
#	packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/labs-tool-call-lab/search-previews-chromium-linux.png
#	packages/opencode/src/command/index.ts
#	packages/opencode/test/server/httpapi-ui.test.ts
#	packages/sdk/js/src/v2/gen/types.gen.ts
#	packages/sdk/openapi.json
#	packages/tui/src/routes/session/index.tsx
2026-08-04 12:57:20 +02:00
Igor Šćekić 1f3a3b2d83 feat(attachments): add remote CLI file delivery (#12747)
* fix(cli): clarify remote binary attachment notice

* feat(cli): add remote send_file tool

* docs(mobile): explain remote session attachments

* fix(cli): keep delivered files out of model context

* fix(cli): mark delivery filter as kilocode change

* fix(cli): preserve delivered image files

* test(cli): narrow delivery attachment state

* fix(send-file): preserve filesystem failures

* test(send-file): assert propagated file read error
2026-08-03 13:12:11 +02:00
Igor Šćekić ace509dc60 feat(opencode): remote create_session fields, org metadata, rename/title sync, cancel proof (#12704)
* feat(opencode): remote create_session fields, rename adoption, title sync

Extend create_session wire with optional agent/model/orgId (strict v1,
old-CLI degrade via client retry); claim org via session metadata
(metadata > KILO_ORG_ID > auth); adopt system session.renamed via
setTitle with consume-on-failure adoption marks; POST generation-aware
title changes through readiness (auto-titles marked by ensureTitle,
same-title Updated consumes pending adoptions).

* test(opencode): prove cancel→reprompt reaches idle; lock exit survivor

Item 14 CLI prove-it at SessionPrompt level: cancel-when-idle,
mid-stream, mid-tool, queued follow-up (deterministic queue wait), and
abortIntakes all settle to idle and reprompt completes — no production
hang found, no src change. Item 8: lock survivor session send_message
after sibling exit_cli.

* test(opencode): drop AppRuntime spy from create_session default test

Satisfies check-opencode-promise-facades while still proving the
production default forwards {agent, model, metadata} into
Session.Service.create.

* fix(opencode): bound rename marks, wire title report path, harden title tests

Kilobot review on #12704: adoption/auto-title maps now carry timestamps,
prune on write (60s TTL), and clear on Session.Event.Deleted (exported
clear/clearAll); the Updated watcher calls the interface
reportSessionTitle and fullSync passes preloaded info into meta();
ensureTitle's Kilo logic lives in kilocode/session/prompt.ts behind one
kilocode_change call site; title tests poll instead of sleeping and lock
mark-before-write plus clear-on-failure for real; meta() get-failure
org fallback covered via the _metaForTests seam.

* fix(kilo-sessions): mark bookkeeping before ingest sync, AppRuntime, test cleanup

Kilobot round 2 on #12704: consume rename/auto-title marks before the
ingest.sync network hop so the 60s TTL spans only the in-process hop;
call reportSessionTitle via AppRuntime.runPromise; auth cleanup back
under Effect.ensuring; restore the upstream blank line in prompt.ts so
the fork diff is only the kilocode_change call site.

* fix(kilo-sessions): keep title report self-healing if ingest.sync fails

Advance knownTitles only after successful sync; restore consumed rename/
auto-title marks on failure so the next Updated can re-POST. IIFE keeps
const-style outcome derivation.

* fix(kilo-sessions): optimistic knownTitles with full title-path rollback

Advance knownTitles before the network hop so concurrent Updated handlers
see sameTitle and cannot POST the same title with a wrong generated flag.
Restore prev + consumed marks when ingest.sync throws or reportSessionTitle
returns not-ok, so the next Updated retries the full self-healing path.

* style(kilo-sessions): prettier title Updated handler

* fix(kilo-sessions): preserve newer title state

* refactor(kilo-sessions): simplify title reporting tests

* fix(kilo-sessions): report unseeded title updates

* fix(kilo-sessions): consume unseeded title marks

* test(kilo-sessions): cover unseeded title marks

* test(kilo-sessions): unique ids for unseeded title tests

Thread a distinct session id through unseededMockSessionLayer so
session_share Storage records do not couple the three unseeded cases.
2026-07-31 18:25:03 +00:00
kilo-maintainer[bot] 5ca97417a0 chore: update kilo-vscode visual regression baselines 2026-07-31 02:55:59 +02:00
Johnny Amancio 61b2f1d0cb fix: repair generated artifacts and branding after the v1.17.13 merge
Generation was failing. Upstream added a guard in this range that rejects
duplicate session event variants, and Kilo's tool-content codec on the shared
event schema was tripping it, so openapi.json and the SDK were stale and a temp
packages/sdk/js/openapi.json got committed by accident.

Move the codec off the event schema into core/src/kilocode/event-storage.ts,
keyed by event type and applied only at the SQL boundary. Session events are on
the wire now (SessionEvent.Durable backs /api/session/{id}/history), so a
transform there forked the generated API. Shipped readers still parse old rows
and the wire contract goes back to upstream's. Drops the consumer-side
normalizers in the TUI and sync-v2 that existed only to undo the widening.

Also: restore the Kilo HttpApi title and a few branding strings, balance five
kilocode_change markers, drop a duplicate TUI palette entry, and teach
check-model-tool-network about the LayerNode wiring that replaced
Layer.provide(ToolNetwork.httpLayer).
2026-07-30 16:20:25 +02:00
Johnny Amancio 518501a994 resolve merge conflicts 2026-07-30 14:24:24 +02:00
Johnny Amancio 898f0dc40b refactor: kilo compat for v1.17.13 2026-07-29 02:06:01 +02:00
marius-kilocode 28f2abe5e9 Merge remote-tracking branch 'origin/main' into marius-kilocode/kilo-opencode-v1.17.9 2026-07-27 08:11:14 +02:00
marius-kilocode 64343089d8 chore: merge latest main 2026-07-24 13:12:52 +02:00
marius-kilocode 2fcb137ebc fix: preserve unexpected provider finish reasons 2026-07-24 12:20:43 +02:00
marius-kilocode 51d8031c99 chore: complete OpenCode v1.17.9 integration 2026-07-22 17:20:20 +02:00
Josh Lambert e957130df9 chore(cli): annotate upstream divergence 2026-07-22 10:31:09 -04:00
Josh Lambert 4850dd1c68 fix(cli): ignore late tool input events 2026-07-22 09:31:09 -04:00
marius-kilocode a51864cd75 resolve merge conflicts 2026-07-22 15:00:34 +02:00
Igor Šćekić 16988a5581 feat(cli): add notify_user push-notification tool (#12392)
* feat(cli): add notify_user push-notification tool

Add a notify_user tool that lets an agent send a push notification to the
user's phone for explicitly requested pings and significant mid-run
milestones. It emits a single agent_notification item over the session's
existing authenticated ingest channel via a new result-bearing
KiloSessions.sendAgentNotification operation with a bounded readiness wait,
returns friendly failure text when the session is not connected, and never
prompts for permission. Provide KiloSessions to the tool-registry graph via
a lazy layer node to satisfy the tool's dependency without eager init.

* chore: retrigger CI and review after GitHub Actions outage

* fix(cli): store the real bootstrap promise for coalescing

trackBootstrap stored the promise from inside the Promise executor, before
the variable was assigned, so bootstrapInflight held undefined and concurrent
create()/sendAgentNotification callers could not coalesce onto the in-flight
bootstrap. Build the outcome promise as a synchronous expression and register
it before any await.

* fix(cli): hide notification tool when remote is disabled
2026-07-22 12:19:50 +00:00
marius-kilocode a776bd4d29 refactor: kilo compat for v1.17.9 2026-07-22 13:31:23 +02:00
Johnny Amancio 3e0d20c03d Merge remote-tracking branch 'origin/main' into johnnyeric/kilo-opencode-v1.17.4
# Conflicts:
#	packages/opencode/test/session/compaction.test.ts
2026-07-17 14:08:21 +02:00
Marius a4aceaa2b9 test(cli): stabilize compaction interruption tests on loaded CI runners (#12311)
The two compaction interruption tests ("stops quickly when aborted during
retry backoff" and "does not leave a summary assistant when aborted before
processor setup") intermittently fail on the Windows CI shard with an
uncaught TimeoutError.

Root cause: Effect 4.x changed Effect.timeout to throw a TimeoutError on
the error channel instead of returning Option (as in Effect 3.x). The
tests wrapped Deferred.await(ready) and Fiber.await(fiber) in
Effect.timeout as a guard against the fiber never reaching the trigger
state, but on loaded Windows runners the fiber can take longer than the
1 second / 250 millis deadlines to reach that state. When the deadline
expired the TimeoutError propagated uncaught and failed the test, even
though the interrupt assertions would still hold.

Swallow the TimeoutError from the ready wait so the test proceeds to
interrupt the fiber regardless of whether the trigger fired in time, and
drop the inner Fiber.await timeout since Fiber.interrupt already waits for
termination. The assertions verify the interrupt exit either way.
2026-07-17 13:41:07 +02:00
Johnny Amancio 1872dbc25b fix(opencode): address fourth-pass upstream review 2026-07-16 15:32:19 +02:00
Johnny Amancio a87ddecf8f Merge remote-tracking branch 'origin/main' into johnnyeric/kilo-opencode-v1.17.4
# Conflicts:
#	.github/workflows/test.yml
#	packages/opencode/src/session/processor.ts
#	packages/opencode/test/kilocode/session-prompt-permission-refresh.test.ts
2026-07-16 12:56:16 +02:00
marius-kilocode e67635d270 fix(cli): restore directory @-mention expansion
PR #12158 enforced read permissions for file mentions by routing
directory attachments through the permission resolver with
denyDirectory: true. That flag is set for every prompt-mention
attachment, so the read tool denied all directory listings, including
directories inside the current workspace.

Only deny directory attachments whose canonical path changed after
permission approval. A symlink swap during the permission wait moves
the resolved target, so the approved permission no longer applies and
the listing is denied. Unchanged in-workspace directories are listed
as before.

Fixes #12241
2026-07-15 21:11:28 +02:00
Johnny Amancio e2d66144c8 fix: address upstream merge bot and CI findings 2026-07-15 12:53:14 +02:00
Johnny Amancio d093f813ac chore: merge latest Kilo main 2026-07-14 19:59:51 +02:00
Johnny Amancio 4e2d04a17e fix(opencode): complete v1.17.4 compatibility 2026-07-14 14:56:36 +02:00
Johnny Amancio 68b59571a0 resolve merge conflicts 2026-07-14 13:03:25 +02:00
marius-kilocode 1950d503cb test(cli): relax cancellation race timeout 2026-07-14 10:25:02 +02:00
marius-kilocode 965c5d6a48 merge: sync main after permission review fixes 2026-07-14 08:20:00 +02:00
marius-kilocode 217bc9794b fix(cli): close file permission review gaps 2026-07-14 08:19:20 +02:00
Johnny Amancio 2855ebbe48 refactor: kilo compat for v1.17.4 2026-07-13 19:15:48 +02:00
marius-kilocode 79cb96ffe2 Merge remote-tracking branch 'origin/investigate-worktree-variant-inheritance' into investigate-worktree-variant-inheritance 2026-07-13 18:55:24 +02:00
marius-kilocode bff6e51f22 fix(cli): support current model ID types 2026-07-13 18:51:40 +02:00
Marius 64b487407d Merge branch 'main' into investigate-worktree-variant-inheritance 2026-07-13 18:48:05 +02:00
marius-kilocode 08cbafb973 test(cli): isolate handoff variant regression 2026-07-13 18:22:33 +02:00
Johnny Eric Amancio ef6b152ff8 OpenCode v1.16.2 (#12088)
* feat(worktree): add managed workspace cloning (#30117)

* test(tui): skip crashing keymap textarea renderer

* fix(core): allow skipping migration execution

* fix(opencode): remove automatic full session diffs (#30127)

* chore: generate

* refactor(worktree): move project out of repository

* zen: deepseek flash

* fix(tui): remount session view on session switch (#30129)

Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>

* go: minimax m3

* refactor(opencode): inline local provider helpers (#30169)

* refactor(opencode): simplify provider setup flow (#30173)

* fix(app): show project sessions before path sync resolves (#30167)

Co-authored-by: LukeParkerDev <10430890+Hona@users.noreply.github.com>

* fix(core): preserve session metadata migration identity (#30176)

* refactor(session): align namespace imports and inline trivial helpers (#30180)

* opencode(run): add queued prompt management (#30103)

Direct run mode previously made submitted follow-up prompts irrevocable while a response was still running. Let users edit or remove queued prompts before dispatch without interrupting the active turn.

* chore: generate

* fix(acp): honor session/cancel by aborting the running turn (#30145)

Co-authored-by: Shoubhit Dash <shoubhit2005@gmail.com>

* fix(tui): prevent prompt corruption when pasting near wide characters (#29710)

Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: Simon Klee <hello@simonklee.dk>

* fix(opencode): avoid nullable webfetch format schema (#30215)

* chore: generate

* fix(core): contain lsp warmup defects (#30226)

* add run --replay mode (#30239)

* chore: generate

* chore: update nix node_modules hashes

* fix(stats): restore leaderboard spacing

* fix(stats): center top models dot grid

* fix(stats): stabilize top models hover

* fix(stats): align big-pickle provider resolution (#30274)

* feat(app): v2 desktop UI improvements (#29689)

Co-authored-by: Brendan Allan <git@brendonovich.dev>
Co-authored-by: Brendan Allan <14191578+Brendonovich@users.noreply.github.com>

* chore: generate

* fix(tui): clarify inline subagent rows (#30051)

* fix(tui): handle events across workspaces (#30281)

* feat(core): update Copilot for token-based billing (#30181)

* fix(tui): keep background marker with subagent label (#30271)

* fix(tui): keep retry attempt before message (#30275)

* chore: generate

* fix(opencode): enforce storage path invariants (#29666)

* chore: generate

* feat(core): add location-based permission service (#30287)

* chore: generate

* fix(tui): preserve live parts during session hydration (#30300)

* fix(app): restore deferred MCP status updates (#30220)

* fix: export v2 stylesheets and declare core node types (#30312)

* chore: update nix node_modules hashes

* fix(app): avoid suspending on pending child path (#30314)

* fix(opencode): remove sunsetted gpt-5.2 and gpt-5.3-codex from allowed models for codex subscriptions (#30316)

* chore: generate

* feat(core): expose session location

* chore: generate

* fix(opencode): preserve websocket api errors (#30321)

* refactor(core): simplify session pagination

* feat(core): add location filesystem contract

* feat(core): add dummy location filesystem layer

* chore: generate

* feat(opencode): add filesystem read and list routes

* chore: generate

* infra: stats

* sync

* feat(app): inset new layout session panels (#30342)

* fix(app): tab title truncation and close button positioning (#30349)

* tui: show model context in run footer (#30380)

* tui: revert OpenTUI upgrade to 0.2.16 (#30383)

* chore: update nix node_modules hashes

* feat(core): add managed repository cache (#30408)

* chore: generate

* chore: generate

* sync

* feat(stats): add cache ratio section

* feat(core): add flagged project references (#30414)

* chore: generate

* feat(core): support named migrations (#30418)

* fix(stats): clean retired provider rows during sync (#30420)

* fix(stats): mention opencode go in top models copy

* feat(core): expose project reference filesystem access (#30423)

* chore: generate

* sync

* fix(tui): scope diff viewer to session directory (#30426)

* test: widen provider header timeout margin (#30427)

* fix(plugin): restore private git install fallback (#30430)

* fix(stats): remove leaderboard nav link

* chore(opencode): remove scout agent (#30435)

* chore: generate

* feat(stats): improve cache ratio chart

* chore: generate

* fix(effect-drizzle-sqlite): preserve transaction begin errors (#30448)

* chore: bump effect beta to 74 (#30449)

* Revert "tui: revert OpenTUI upgrade to 0.2.16 (#30383)" (#30452)

* chore: update nix node_modules hashes

* refactor(opencode): improve startup time by 38% (#30453)

Co-authored-by: starptech <starptech@starptechs-MBP.fritz.box>

* chore: generate

* fix(opencode): patch empty Gemini replay messages (#30463)

* chore: generate

* refactor(core): consolidate filesystem services (#30447)

* chore: generate

* run: enable interactive replay by default (#30465)

* chore: update nix node_modules hashes

* refactor(opencode): remove JSON storage migration (#30461)

* chore: generate

* chore: update nix node_modules hashes

* fix(tui): stop idle background task spinner (#30484)

* refactor(core): move v1 schemas into core (#30473)

* chore: generate

* fix: task id passed to background job for continuation (#30485)

* chore: generate

* feat(core): project copying and tracking directories (#30139)

* chore: generate

* fix(opencode): preserve signed thinking during anthropic reorder (#30182)

* Revert "fix(opencode): preserve signed thinking during anthropic reorder" (#30502)

* fix: rm tool reorder logic from old bug (#30483)

* chore: generate

* feat(app): polish home projects list UI (#30436)

* feat(app): polish select-v2 component (#30446)

Co-authored-by: Brendan Allan <git@brendonovich.dev>

* fix(github): enforce existing git author identity (#30507)

* feat(app): new update button  (#30460)

Co-authored-by: Brendan Allan <git@brendonovich.dev>

* fix(opencode): fallback to sh for curl upgrade (#30499)

Co-authored-by: Shoubhit Dash <shoubhit2005@gmail.com>

* fix(ui): render whole-file patches as complete diffs (#30516)

* chore: generate

* feat(app): add servers tab to settings dialog (#29675)

* refactor(core): consolidate pty service (#30537)

* chore: generate

* tui: truncate sidebar file paths (#30531)

* chore: update nix node_modules hashes

* feat(stats): add geo breakdown (#30456)

* chore: generate

* chore: update nix node_modules hashes

* fix(acp): classify apply_patch as edit (#30564)

* fix(acp): classify task as think (#30565)

* fix(acp): include external directory permission context (#30567)

* fix(acp): clean read tool display content (#30569)

* fix(tui): route question responses by session directory (#30578)

* fix(stats): serve stats og image from banner

* docs(go): add Qwen3.7 Plus model (#30594)

* fix(openai): preserve websocket idle state (#30586)

* refactor(core): remove ai sdk option fields (#30581)

* chore: generate

* test(core): cover v1 provider option lowering (#30599)

* chore: generate

* refactor(core): nest model api id (#30603)

* fix(core): expose azure openai xhigh efforts (#30620)

* feat(core): add skill registry and file agent loading (#30617)

* chore: generate

* chore: update nix node_modules hashes

* fix(stats): count all go usage

* chore: remove zed extension and automation (#30628)

* fix(opencode): preserve variant for delegated tasks (#30630)

* zen: update nvidia tos

* fix(opencode): route SAP AI Core reasoning variants through modelParams (#30482)

* chore: generate

* fix(app): hide unavailable titlebar update (#30642)

* feat(app): v2 thinking level selector (#30646)

* fix(app,ui): session review reactivity and VCS query cache (#30660)

* feat(core): add embedded v2 session runtime and tool foundation (#30632)

* chore: generate

* chore: update nix node_modules hashes

* docs: correct compaction prune default (#30670)

* fix(opencode): avoid shell cancel race (#30641)

* feat: bump bedrock and add proper mantle support for openai models through aws bedrock (#30464)

* test: wait for shell truncation readiness (#30679)

* chore: update nix node_modules hashes

* refactor(opencode): clean up task tool prompts (#30687)

* feat(core): add command registry (#30624)

* chore: generate

* fix(acp): replay loaded session transcript (#30645)

Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: Shoubhit Dash <shoubhit2005@gmail.com>

* fix(core): reset pre-launch session projections (#30728)

* feat(tui): improve experimental session switcher (#30738)

* fix(opencode): respect disabled auto compaction on overflow (#30749)

* zen: nemotron 3 ultra

* fix(enterprise): install hono standard validator peer (#30740)

Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>

* fix build

* chore: update nix node_modules hashes

* make scripts executable

* fix(tui): show toast when variant_list keybind used with no variants (#30724)

* fix(opencode): `ACP.loadSession` should replay all messages (#30761)

Co-authored-by: Shoubhit Dash <shoubhit2005@gmail.com>

* fix(opencode): attribute task child agent on creation (#30786)

* fix(tui): add Vue syntax highlighting (#30802)

* fix: bump @openrouter/ai-sdk-provider to 2.9.0 (#30800)

* feat(core): moving sessions (#30640)

* chore: generate

* tweak: background agent prompting to avoid polling issues (#30790)

* upgrade opentui to 0.3.2 (#30748)

* chore: update nix node_modules hashes

* feat(desktop): surface local server startup failures (#30822)

* ci: publish

* refactor(core): make v2 session inputs event sourced (#30785)

* chore: generate

* fix(llm): normalize OpenAI function tool schemas

* chore: generate

* feat(stats): refresh stats routes and homepage (#30419)

* fix(stats): sort metric charts by top usage

* feat(core): add public native API (#30828)

* chore: generate

* feat(app): color themes (#30824)

Co-authored-by: LukeParkerDev <10430890+Hona@users.noreply.github.com>

* chore: generate

* sync release versions for v1.16.0

* feat(core): attach global native tools (#30832)

* chore: generate

* feat(core): add Snowflake Cortex provider (#29901)

Co-authored-by: Cortex Code <noreply@snowflake.com>

* chore: generate

* feat(core): persist v2 session context epochs (#30789)

* chore: generate

* feat(tui): allow backgrounding synchronous subagents (#30488)

* fix(app): improve tab handling (#30669)

* chore: generate

* fix(tui): prioritize models slash autocomplete (#30848)

* fix(tui): route permission replies to session directory (#30851)

Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>

* fix(cli): harden daemon lifecycle (#30844)

* chore: generate

* feat(app): improve desktop multi-server support (#30678)

Co-authored-by: Brendan Allan <git@brendonovich.dev>

* chore: generate

* fix(app): handle tab overflow and scrolling in titlebar (#30886)

* fix(app): tab overflow (#30894)

* tui: guard path formatting inputs (#30469)

Fixes #27726, #25216, #24856, #24294, #17071, #29164, #24837, #16865, #14279, #29895

* opencode/run: refresh themes after terminal reloads (#30917)

* chore: generate

* fix(tui): fall back to local cwd when editor spawns in attach mode (#30583)

* docs: update Go Qwen tiered pricing (#30936)

* chore: generate

* feat(tui): add diff hunk navigation (#30935)

* chore: rm fuzzy search on references (#30931)

* fix: use mapError instead of orDie for context snapshot decoding (#30905)

Co-authored-by: Shoubhit Dash <shoubhit2005@gmail.com>

* fix(core): recover corrupted models cache (#30947)

* chore: bun install (#30968)

* fix(opencode): resolve Bedrock hang by using node build conditions (#30873)

* fix(workflows): retry nix-hashes compute-hash on transient failure (#30743)

* fix(stats): scroll model charts to latest on mobile

* fix(opencode): prevent destructive edit matches (#30932)

* chore: generate

* fix(core): respect v2 default agents (#30969)

* chore: generate

* test(opencode): remove disposal event wait race (#30971)

* test(opencode): remove shell timeout output race (#30974)

* fix(opencode): gate reasoning summaries by provider (#30973)

* feat(core): admit v2 skill guidance (#30843)

* fix(workflows): serialize desktop release uploads (#30978)

* fix(stats): add mobile chart end spacing

* release: v1.16.2

* refactor: kilo compat for v1.16.2

* fix(opencode): address v1.16.2 merge regressions

* chore: update kilo-vscode visual regression baselines

* fix(opencode): restore Kilo behavior after v1.16.2 merge

* fix(opencode): retry Windows migration cleanup

* test(opencode): restore clone and macOS watcher coverage

* fix(opencode): address second-pass review for #12099

Preserve imported usage and retry partial JSON migrations. Refresh active dependency patches, remove the obsolete GCP patch, and regenerate Kilo HttpApi branding.

---------

Co-authored-by: Dax <mail@thdxr.com>
Co-authored-by: Dax Raad <d@ironbay.co>
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: Frank <frank@anoma.ly>
Co-authored-by: opencode-agent[bot] <219766164+opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
Co-authored-by: Michael Hart <mhart@cloudflare.com>
Co-authored-by: LukeParkerDev <10430890+Hona@users.noreply.github.com>
Co-authored-by: Simon Klee <hello@simonklee.dk>
Co-authored-by: smagnuso <smagnuso@gmail.com>
Co-authored-by: Shoubhit Dash <shoubhit2005@gmail.com>
Co-authored-by: Orca丶 <93272799+dauphinYan@users.noreply.github.com>
Co-authored-by: Adam <2363879+adamdotdevin@users.noreply.github.com>
Co-authored-by: Aarav Sareen <96787824+arvsrn@users.noreply.github.com>
Co-authored-by: Brendan Allan <git@brendonovich.dev>
Co-authored-by: Brendan Allan <14191578+Brendonovich@users.noreply.github.com>
Co-authored-by: Kit Langton <kit.langton@gmail.com>
Co-authored-by: James Long <longster@gmail.com>
Co-authored-by: Dustin Deus <deusdustin@gmail.com>
Co-authored-by: starptech <starptech@starptechs-MBP.fritz.box>
Co-authored-by: Ulises Jeremias <ulisescf.24@gmail.com>
Co-authored-by: Jack <jack@anoma.ly>
Co-authored-by: Jérôme Benoit <jerome.benoit@sap.com>
Co-authored-by: Ariane Emory <97994360+ariane-emory@users.noreply.github.com>
Co-authored-by: LIU Xinyu <contact@lxy.cc>
Co-authored-by: Colin McDonnell <colinmcd94@gmail.com>
Co-authored-by: Sebastian <hasta84@gmail.com>
Co-authored-by: opencode <opencode@sst.dev>
Co-authored-by: Kamesh Sampath <kamesh.sampath@hotmail.com>
Co-authored-by: Cortex Code <noreply@snowflake.com>
Co-authored-by: pcadena-lila <pcadena@lila.ai>
Co-authored-by: weiconghe <46336277+weiconghe@users.noreply.github.com>
Co-authored-by: alberto <914199+alblez@users.noreply.github.com>
Co-authored-by: kilo-maintainer[bot] <kilo-maintainer[bot]@users.noreply.github.com>
2026-07-13 18:00:35 +02:00
marius-kilocode 7eaa25170d fix(cli): preserve historical fork variants 2026-07-13 18:00:01 +02:00
marius-kilocode 0a388de3f7 chore(cli): annotate fork variant changes 2026-07-13 16:07:57 +02:00
marius-kilocode bd08c13412 fix(cli): preserve forked session variants 2026-07-13 16:02:36 +02:00
marius-kilocode 3ee91448ee fix(cli): explain Gemini API key rejections 2026-07-13 11:13:39 +02:00
marius-kilocode b33e28ceb2 test(cli): stabilize active-run prompt test 2026-07-08 21:25:28 +02:00
V Keerthi Vikram dfa712d989 feat: add AI image generation tool (#11826)
* feat: add AI image generation tool

Port the legacy generate_image tool to the opencode-based CLI as a
Kilo-owned tool gated by experimental.image_generation config flag.

- New generate_image tool with prompt/path/image/model params
- Routes through Kilo Gateway (zero-config) or BYO OpenRouter key
- Supports text-to-image generation and image editing
- Dynamic model discovery via GET /kilo/models/images endpoint
- VS Code settings toggle + live model dropdown in Experimental tab
- Writes image to disk and returns inline FilePart attachment
- Fallback model catalog for offline resilience

* refactor: change default image model to openrouter/auto

* fix: address bot review feedback

- Remove unused fetchKiloImageModels import in tool
- Normalize jpg→jpeg MIME in parser, input image, and attachment
- Replace mismatched extensions in ensureExtension (not just append)
- Add assertExternalDirectoryEffect for output path traversal guard
- Map unauthorized errors to 401 (not 400) in image models handler
- Keep last known model list on fetch failure (don't overwrite with empty)
- Fix tool description (remove false web search claim, fix grammar)
- Remove duplicated provider resolver tests

* fix: add retry for image models request to handle backend startup race

* fix(image-generation): address kilo bot review comments

- ensureExtension replaces mismatched image extensions instead of
  appending (photo.jpg + PNG -> photo.png, not photo.jpg.png)
- Gateway /models/images normalizes errors to 400/401 matching every
  other gateway route (was leaking undeclared upstream statuses)
- Add 401 response to openapi.json + SDK types for /kilo/models/images
  to match the gateway's errors(400, 401) declaration

* fix(gateway): align /models/images error handling with other gateway routes

* refactor: switch image generation to effect HttpClient

* test: cover kilo models images endpoint in httpapi exercise scenarios

* Exclude POST-only and parameterized API endpoints from link checker

* Add ImageModelsProvider to agent manager context tree

* chore(deps): bump @openrouter/ai-sdk-provider to 2.10.0

Switches imageModel() to OpenRouter's POST /api/v1/images endpoint for
proper image usage/billing and image-specific params.

* fix: address image generation PR review feedback

- revert @openrouter/ai-sdk-provider 2.9.0->2.10.0 bump (image tool uses raw HTTP, not the SDK)
- translate image generation settings strings across all locales
- use central KILO_OPENROUTER_BASE instead of hardcoded URL fallback
- remove completed plan file

* chore: refresh source-links.md after URL refactor
2026-07-08 18:01:01 +02:00
Johnny Amancio 2770028959 refactor: kilo compat for v1.16.2 2026-07-07 18:11:20 +02:00
Johnny Eric Amancio b976b5a013 feat(cli): opt-in project memory (#11921)
* feat(memory): opt-in project memory — capture, recall, CLI + TUI integration

Add project memory: the standalone @kilocode/kilo-memory effect layer plus the
opencode CLI/server/TUI integration. Memory is disabled by default, so it is a
no-op until enabled (no behavior change when off).

Capture (turn-close consolidation): per-op parse salvage, secret redaction that
skips the offending op instead of aborting the batch, supersede-only auto-updates
(never model-driven deletes), correction-aware echo handling, non-LLM fallback
digests on interrupted/error turns, a shared interval throttle with idle-flush.

Recall + injection: keyword tokenizer with camelCase/compound splitting, light
stemming, and an English-first stopword filter (Unicode-aware; non-English falls
back to plain token-overlap), a live relevance floor, a budget-reserved startup
index, a session-digest catalog, and per-session prompt-cache pinning of the
injected memory block.

Surfaces: kilo_memory_save / kilo_memory_recall tools, the memory HTTP API
(contract schemas live in the package), and a status-focused TUI sidebar showing
auto-save, loaded context, and active recall, plus the /memory dialog.

* fix(memory): address PR review feedback

- C1: bump @kilocode/kilo-memory in the changeset
- C2: redact secrets before they hit the audit log (skip + salvage paths);
  redact before truncating in salvageTyped so a secret straddling the
  500-char cap can't leak an unmatched fragment; opText -> salvageText
- C3: de-abbreviate savedOperations, "changes" wording, ops.ts -> operations.ts
- C4: log.warn on the remaining silent-catch fallbacks (turn diff, memory
  context injection, tool-visibility check)
- C5: relocate memory storage from ~/.kilo to Global.Path.data, delete the
  now-dead needsDependencyInstall guard, add /memory status (root path) and
  /memory edit ($VISUAL/$EDITOR + auto-rebuild)
- C6: replace the hardcoded English stopword list with corpus-derived
  ubiquitous-term filtering (df across the user's own entries) and the
  English suffix stemmer with suffix-tolerant term matching, so recall
  noise-filtering works in any language
- C8: delete the CORRECTION_INTENT English regex; echo turns now run typed
  capture (digest stays echo-gated), bounded by the interval throttle, with
  the typed prompt as the language-agnostic content filter
- C9: exclude generated paths (dist/build/coverage/*.gen.*/*.map/snapshots)
  from the durable-diff churn fallback so generated churn can't burn a
  consolidation call
- C11: fix duplicated assert in httpapi-memory test; assert the error body
- kilo-code-bot batch: clause-boundary regex fix, byte-safe catalog
  truncation, max-length guards on remember/correct/forget payloads (text,
  query, key, sessionID), trim consistency in reconcile, param-shadowing
  rename, missing doc entry for kilo_memory_recall, dead-code removal,
  dialog UI fixes, memoryEnabledCache eviction bound, dedicated Configure
  schema, recall permission renderer, covered-session pointer cap, redact
  chat transcript before the consolidation model call, split configProtected
  metadata from disableAlways so memory-save prompts don't show config-file
  copy, drop unused MemoryService.layer provide from tool registry
- redact colon-separated low-entropy secrets too (password: hunterx),
  accepting the prose false-positive tradeoff (secret: enabled) in favor of
  not missing a real secret
- rename lastConsolidatedAt -> lastTypedConsolidationAt to make its narrow
  scope (typed-consolidation throttle clock) explicit; regen openapi/SDK
- drop now-dead home/config fields from MemoryPaths.Host after the data-dir
  relocation; add Process.splitCommand for quoted $EDITOR/$VISUAL paths with
  spaces, used by /memory edit and the pre-existing Editor.open utility

* refactor(memory): shared client helpers, capture hardening, /memory UX rework

- extract client-side derivations into kilo-memory so both frontends share
  one implementation: MemoryDecisions.summarize (decision-log summary),
  MemoryAutosaveStatus.summarize (autosave-status semantics), and
  MemoryMarkerMeta (marker wire contract encode/decode)
- match exact-key upserts via the canonical stored id (slugged key,
  normalized section) so a re-emitted spaced/uppercase key updates the
  entry instead of falling to fuzzy dedupe
- salvageTyped throws on valid JSON without an operations array so the
  caller's fallback path records a parse error instead of a silent
  zero-op success
- rename memory tool metadata files -> sources (stripPartMetadata rewrites
  tool-part metadata.files assuming apply_patch records, mangling string[])
- read state instead of status for tool enabled checks; dedupe TUI helpers
  (errorMessage, shared route(), Locale.number, relativeTime)
- /memory UX: bare /memory opens a help modal driven by a structured
  command catalog in kilo-memory; /memory on|off become the canonical
  toggle verbs (enable/disable kept as quiet aliases); /memory status opens
  a clean overview dialog (root path, autosave, startup context, source
  counts, index size) instead of a toast; /memory show is the single full
  audit view (inspect removed)
2026-07-06 17:45:49 +02:00
kirillk a5af63a6a7 fix: address model picker review feedback 2026-07-02 01:15:49 -04:00
Marian Alexandru Alecu 8b7b69b551 Merge branch 'main' into main 2026-07-01 17:34:10 +03:00
Catriel Müller 10eda62b03 Merge pull request #11827 from Kilo-Org/mark/deflake-prompt-cancel-race
fix(cli): deflake prompt and background process races
2026-07-01 10:42:12 -03:00
Alex Alecu 2781d4508b fix(cli): restore deprecated review aliases 2026-07-01 16:02:51 +03:00
Daniel Gutknecht bf5c86601a fix(session): trim whitespace from tool names in experimental_repairToolCall (#10886)
Adds .trim() before .toLowerCase() so tool names like " bash" are
repaired to "bash" instead of falling through to the invalid handler.

Adds an integration test that sends a space-padded tool name through
the full AI SDK stream path and asserts the correct tool executes.

Fixes #10140

Co-authored-by: Johnny Amancio <johnnyeric@gmail.com>
2026-07-01 12:04:29 +02:00
Mark IJbema 06e346b89a test(cli): annotate prompt flake fixture 2026-06-30 12:06:19 +02:00
Mark IJbema 7183f5b7a9 test(cli): deflake prompt cancellation race 2026-06-30 11:45:56 +02:00
Alex Alecu 3e7e03d872 Merge remote-tracking branch 'origin/main' into maphew/main
# Conflicts:
#	packages/opencode/src/kilocode/review/local-review-uncommitted.txt
#	packages/opencode/src/kilocode/review/review.txt
#	packages/opencode/test/kilocode/local-review-command.test.ts
#	packages/opencode/test/session/prompt.test.ts
2026-06-25 14:13:04 +03:00