Commit Graph

1887 Commits

Author SHA1 Message Date
marius-kilocode 27d2c148d0 fix: complete OpenCode v1.14.51 integration 2026-06-09 11:53:08 +02:00
marius-kilocode 1d23dc2171 resolve merge conflicts 2026-06-09 10:17:21 +02:00
marius-kilocode 6ecaaab48a refactor: kilo compat for v1.14.51 2026-06-09 08:29:02 +02:00
marius-kilocode cc03ffc581 fix: harden OpenCode v1.14.48 integration 2026-06-08 14:38:13 +02:00
marius-kilocode 5706abce76 chore(cli): normalize upstream annotations 2026-06-08 12:45:47 +02:00
marius-kilocode cf08de3f44 resolve merge conflicts 2026-06-08 12:04:21 +02:00
marius-kilocode e610b1d390 refactor: kilo compat for v1.14.48 2026-06-08 10:58:10 +02:00
Catriel Müller 011477a915 Merge pull request #10925 from Kilo-Org/improvement/cli-suggest-skills
Suggest skill slash commands in CLI
2026-06-05 18:38:30 -03:00
Evan Jacobson 2099feba9b fix(cli): disambiguate skill slash commands 2026-06-04 22:38:19 -06:00
Catriel Müller a0eb3b7cb6 fix(cli): write strict JSON for MCP config 2026-06-04 22:50:37 -03:00
Evan Jacobson 8094ba6ab3 feat(cli): suggest skill slash commands 2026-06-04 16:30:01 -06:00
yanalialiuk 2d109462db Add Atomic Chat as a first-class local provider. (#10555)
* Add Atomic Chat as a first-class local provider.

Ship the atomic-chat plugin with auto-discovery on localhost:1337, register the provider in models.dev fixtures, and document setup for VS Code and CLI.

* Remove dead code

Removed atomicChat provider mapping from legacy migration.

* Update Atomic Chat provider icon to theme-colored vector.

Replace the embedded raster icon with a currentColor SVG symbol so it matches provider icon styling and inherits UI color consistently.

* Allow optional API key for local Atomic Chat and LM Studio providers.

Load the atomic-chat plugin despite named constant exports, register local-server auth in the plugin, and let CLI and VS Code connect with an empty key on localhost.

* Gate Atomic Chat discovery behind explicit opt-in

* Update packages/plugin-atomic-chat/src/utils/should-probe-atomic-chat.ts

* Remove dead branch in atomic-chat model ref probe.

Drop the modelID check (never equals provider key) and the duplicate providerID branch.

* Fix PR CI: register atomic chat plugin and complete i18n.

Restore atomic-chat in default-plugins after main merge, add missing sidebar locale keys, and annotate shared upstream diffs.

* Format i18n locale files and ProviderConnectDialog with Prettier.

* Address PR review: docs order, narrow annotations, plugin fixes.

Reorder local-models providers per maintainer feedback; use inline kilocode_change markers in dialog-provider. Share ModelStatusCache, fix config discovery abort/timeout, throw on fetch failure, and resolve bot review warnings.

* Align dialog-provider with upstream keymap bindings after rebase.

Restore useBindings instead of useKeyboard so shared-file diff stays minimal and passes annotation checks.

* Update packages/kilo-vscode/webview-ui/src/components/settings/ProviderConnectDialog.tsx

* Deduplicate Atomic Chat /v1/models fetch on config discovery.

Use a single shared models endpoint request in enhanceConfig instead of separate health and discovery calls.

* Fix kilo-code-bot review: import provider key and log cache errors.

Export ATOMIC_CHAT_PROVIDER_KEY from local-providers for the webview, log cache warm failures, and throw on network errors in fetchModelsEndpoint.

* fix(plugin-atomic-chat): harden discovery and reduce chat toasts

Reuse auto-detect model list to avoid duplicate /v1/models calls, wire AbortSignal into fetch, replace silent catches with logging, and only surface validation errors in chat.params.

* fix(plugin-atomic-chat): refresh model cache on chat validation retries

Bypass the 15s model list cache after the first failed attempt so retryWithBackoff can observe newly loaded models.

* Update packages/plugin-atomic-chat/src/utils/index.ts

* fix(plugin-atomic-chat): repair categorizeError not_found branch

Restore return statement and map "not loaded" validation errors to not_found after bot commit broke the if block.

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: kilo-code-bot[bot] <240665456+kilo-code-bot[bot]@users.noreply.github.com>
2026-06-04 16:03:00 +02:00
marius-kilocode 344df31dcf Merge remote-tracking branch 'origin/main' into marius-kilocode/kilo-opencode-v1.14.46
# Conflicts:
#	packages/opencode/src/config/provider.ts
2026-06-02 18:30:26 +02:00
marius-kilocode aeef0df2f9 resolve merge conflicts 2026-06-02 16:13:31 +02:00
Igor Šćekić 8aaa62c794 Session export capture (#10611)
* feat(session-export): scaffold module with config constants

* feat(session-export): add zstd compression wrapper

* feat(session-export): event and envelope type definitions

* feat(session-export): eligibility check with kill-switch

* feat(session-export): org signal collector with auth resolver

* feat(session-export): worker SQLite schema and storage helpers

* feat(session-export): content-addressed chunker with zstd dedup

* feat(session-export): client-side light scrubber

* feat(session-export): IPC contract and inbox with back-pressure

* feat(session-export): persist scrubbed events with chunked payloads

* feat(session-export): worker entry point with inbox drain loop

* feat(session-export): main-thread capture module

* feat(session-export): workspace baseline and delta fibers

* feat(session-export): sync subscriber and tool io chunking

* feat(session-export): bootstrap wiring and compaction hook

* feat(session-export): wire capture hooks into sessions

* feat(session-export): uploader and buffer cap

* chore(session-export): annotate shared session hooks

* changeset(session-export): add release note

* fix(session-export): keep bootstrap non-blocking without instance context

* feat(session-export): respawn worker after failures

* test(session-export): add performance budget assertions

* test(session-export): add worker end-to-end smoke test

* fix(session-export): strip identity and high-risk baseline paths

* test(session-export): gate perf assertions for stable sweeps

* fix(session-export): bundle worker in single-file builds

* fix(session-export): make capture envelopes cloneable

* fix(session-export): drain worker on CLI shutdown

* feat(session-export): capture workspace baseline and deltas

* fix(session-export): preserve request metadata

* test(session-export): cover request metadata capture

* feat(cli): send indexed session export batches

* feat(cli): authorize session export uploads

* fix(cli): flush session export shutdown uploads

* feat(cli): optimize session export replay payloads

* fix(cli): include session export surface metadata

* fix(session-export): decrement chunk refs after upload

decRefChunks was never called, so chunk ref_count stayed at 1 (or
higher with dedup) and DELETE FROM chunk WHERE ref_count <= 0 never
matched. Chunks accumulated in the local SQLite buffer until the 50 GB
cap. Call decRefChunks alongside markUploaded so deleteUploaded can
reclaim the rows.

* fix(session-export): add periodic uploader flush timer

flushIntervalMs and retryBackoffMaxMs were both defined in config and
neither was referenced anywhere; scheduleFlush only ran on inbound
events or reconnect. After a 5xx or network failure the row was backed
off for 1 s, but if no further event arrived the retry never fired and
the events stranded until the CLI restarted. Drive a periodic flush
from a setInterval, unref the handle so it doesn't pin the process, and
clear it from a new dispose() hook the worker calls on shutdown.

* fix(session-export): stop emitting absolute workspace root in baseline

CaptureMetadata.root was the literal absolute filesystem path
(/Users/<name>/Projects/<repo>), shipped in every
workspace_baseline_completed event and not stripped by handlers'
identity filter. The field was set but never read anywhere downstream
— file paths in the baseline are already relative, so the root added
no replay signal. Remove the field outright.

* fix(session-export): cap pendingEvents result set

The SELECT had no LIMIT clause, so under a backlog (network outage,
crashed receiver) it would materialize the full pending table into a
JavaScript array before the byte-limit truncation applied. With a
50 GB buffer cap that is hundreds of MB of heap inside the worker per
drain. Add LIMIT 500 — the drain loop already re-queries until empty,
so no events are missed.

* fix(session-export): exponential retry backoff up to retryBackoffMaxMs

Both the 5xx and network-error branches always retried after the floor
delay regardless of how many attempts had already failed, and
retryBackoffMaxMs was unreferenced. During a sustained outage every
session re-tried at roughly 1 Hz against the dead receiver. Surface
upload_attempts on EventRow and compute the next delay as
min * 2^attempts capped at max.

* fix(session-export): evict superseded workspace snapshots on remember

createWorkspaceProvider retained every captured snapshot — in-memory
and inside the persisted state file — even after the session moved on
to a newer one. For a 1k-file repo over a 100-turn session that is
~2 GB of unreachable heap plus a state file that grows monotonically.
Drop the previous snapshot for the session on remember() when no other
session still references it.

* fix(session-export): anchor aws_secret_key scrubber to key name

The bare 40-char base64 pattern matched every 40-character hex string,
including all git commit SHAs. Tool outputs, diffs, and conversation
messages were silently rewritten as <<REDACTED:aws_secret_key>>,
destroying lineage information in training data. Require the key name
context — naked secrets in unstructured text are rare and the .env /
.aws/credentials high-risk path strip already covers the common case.

* fix(session-export): preserve root linkage in SyncSubscriber events

SyncSubscriber hardcoded rootSessionId = sessionId on every tool,
permission, and feedback event, so sub-agent sessions lost their root
linkage and a future training pipeline could not reconstruct the
agent topology from these side-channel events. Expose the rootSessionId
mapping from Capture and plumb it through the same pattern as
getTurnId.

* fix(session-export): atomic chunk GC after upload

markUploaded + decRefChunks + deleteUploaded were three separate SQL
statements; a crash between markUploaded and decRefChunks would leave
events flagged uploaded (never retried) and chunks with stale
ref_count (never reclaimed by deleteUploaded). Bundle the three calls
into a single transactional commitUploaded helper so either all three
land or none of them do.

* fix(session-export): wait on transient sqlite locks

* fix(session-export): snapshot current workspace directory

* fix(cli): preserve Kilo model export metadata

* fix(cli): send anon id for session export

* fix(cli): fallback to telemetry anon id

* chore(cli): annotate session export config test

* chore: remove session export docs

* fix(cli): harden session export uploads

* fix(cli): preserve stream lifecycle for session export

* fix(kilo-docs): exclude session export ingest link

* fix(cli): restrict session export workspace sync to git repos

* chore: remove session export changeset

* fix(cli): tighten session export payload types

* fix(cli): type session export model payloads

* fix(cli): simplify session export cleanup

* fix(cli): avoid session export shutdown race

* refactor(cli): use drizzle for session export storage

* fix(cli): finalize session export sqlite statements

* fix(cli): link compaction exports to root sessions

* fix(cli): stop exporting raw stream parts

* fix(cli): prune stale workspace snapshots

* refactor(cli): clarify chunk ref counting

* test(cli): clarify dropped upload assertions

* ci: avoid visual path filter action failure

* fix(cli): preserve in-flight workspace snapshots

* fix(cli): stop uploading baseline start events

* fix(cli): trim redundant export metadata

* fix(cli): trim workspace export bookkeeping

* fix(cli): fold terminal outcome into tool exports

* fix(cli): dedupe request context in export batches

* fix(cli): normalize compaction export payloads

* fix(cli): avoid duplicate tool result exports

* test(cli): align session export expectations

* fix(cli): run secretlint during session export scrubbing

* fix(cli): keep retried export batches contiguous

* fix(cli): include agent info in session exports

* fix(cli): flush pending session exports on serve startup

* fix(cli): drop exports when scrubbing fails

* fix(cli): narrow secretlint value extraction

* fix(cli): limit exported agent info

* test(cli): remove brittle agent export source assertion

* fix(cli): ignore corrupt session export workspace state

* fix(cli): keep session export close best effort

* fix(cli): avoid following session export symlinks

* fix(cli): preserve session export chunk ref counts

* fix(cli): retry transient session export uploads

* fix(cli): validate session export ingest endpoint

* fix(cli): tolerate missing export token details

* fix(cli): fail closed on session export org lookup

* fix(cli): decode session export permission replies

* fix(cli): finalize session export on stream close

* fix(cli): bound session export baseline timeout

* fix(cli): avoid persisting workspace file contents

* fix(cli): bound workspace snapshot capture

* fix(cli): validate session export worker messages

* fix(cli): revoke stale session export eligibility

* fix(cli): scope session export workspaces

* fix(cli): extend session export shutdown flush

* fix(cli): infer free Kilo models for export

* fix(cli): avoid duplicate chunk refs

* fix(cli): throttle session export uploads

* fix(cli): harden session export capture

* feat: disclose free model data collection (#10767)

* feat: disclose free model data collection

* chore(cli): document free model footer sorting

* fix(vscode): add free model data translations

* fix: simplify free model data label

* fix: simplify data collection badges

* fix: remove duplicate model info disclosure

* fix: restore composer data tooltip

* fix: align jetbrains data collection indicator

* fix: align free model data indicators

* fix(vscode): show data collection in model preview

* fix: limit data indicators to kilo gateway

* test(cli): relax prompt cancel timeout

* test(cli): annotate prompt cancel timeout

* test(cli): classify prompt queue runtime test

* fix(cli): defer session export startup
2026-06-02 13:58:42 +00:00
marius-kilocode 4472e6d769 refactor: kilo compat for v1.14.46 2026-06-02 13:51:23 +02:00
marius-kilocode 6a071d138b Merge remote-tracking branch 'origin/main' into trial/kilo-opencode-v1.14.42
# Conflicts:
#	packages/opencode/src/cli/cmd/run.ts
2026-06-02 11:41:28 +02:00
marius-kilocode ece920c1cc Merge remote-tracking branch 'origin/main' into trial/kilo-opencode-v1.14.42
# Conflicts:
#	bun.lock
#	packages/opencode/src/cli/cmd/run.ts
#	packages/opencode/src/cli/cmd/tui/context/tui-config.tsx
#	packages/opencode/src/cli/cmd/tui/thread.ts
#	packages/opencode/src/cli/cmd/tui/ui/dialog-alert.tsx
#	packages/opencode/src/kilocode/server/httpapi/instance.ts
#	packages/opencode/src/kilocode/server/instance.ts
#	packages/opencode/src/server/routes/global.ts
#	packages/opencode/src/server/routes/instance/index.ts
#	packages/opencode/src/server/routes/ui.ts
#	packages/opencode/test/kilocode/global-config-refresh.test.ts
#	packages/opencode/test/kilocode/server/httpapi-public.test.ts
2026-06-02 10:42:14 +02:00
Catriel Müller b8ca6f7363 Merge branch 'main' of github.com:Kilo-Org/kilocode into fix/cli-run-leading-dash-positional 2026-06-01 23:49:04 -03:00
Catriel Müller 859af5033b refactor: move new changes to kilo folders 2026-06-01 23:33:44 -03:00
Catriel Müller 83892191ab Merge pull request #10191 from IamCoder18/fix/dialog-alert-newlines
fix(tui): handle newlines in DialogAlert messages
2026-06-01 22:01:45 -03:00
Catriel Müller 35f30ad344 Merge pull request #10306 from IamCoder18/fix/export-dialog-checkbox-toggle
fix(cli): toggle export dialog checkboxes on mouse click
2026-06-01 22:00:39 -03:00
Catriel Müller bca27d61c7 Merge pull request #10310 from IamCoder18/feat/subagent-running-status
feat(cli): show running spinner in subagent footer
2026-06-01 21:59:01 -03:00
Catriel Müller 791515ea09 fix(cli): limit background process port scans 2026-06-01 16:01:28 -03:00
Catriel Müller 525737c4f1 refactor: fix typecheck and mistral link 2026-06-01 14:23:57 -03:00
Catriel Müller 79ac67b3c9 refactor: merge main 2026-06-01 13:54:53 -03:00
marius-kilocode b5213921c1 fix: preserve Kilo identity after upstream merge 2026-06-01 16:58:26 +02:00
marius-kilocode 0f271a39d7 resolve merge conflicts 2026-06-01 15:20:54 +02:00
marius-kilocode 7cc6080646 refactor: kilo compat for v1.14.42 2026-06-01 12:51:31 +02:00
Catriel Müller 528878c6b3 refactor: refactor settings 2026-05-29 17:20:27 -03:00
Catriel Müller 0ef8e5e0a5 refactor: hot reload tui configs 2026-05-29 11:54:34 -03:00
Catriel Müller 2972acf0f5 refactor: simplify upstream mod 2026-05-29 07:52:12 -03:00
Catriel Müller 3c96a7c8d3 refactor: fix merge main 2026-05-28 14:20:13 -03:00
Catriel Müller 9efb241f43 refactor: merge main 2026-05-28 11:18:39 -03:00
Catriel Müller 7fc3bc09d4 feat: session to terminal sync // new cli kilo theme 2026-05-27 14:01:54 -03:00
Imanol Maiztegui 39a7305c97 Effect Migration for Kilo callsites (follow-up) (#10587)
* refactor(opencode): migrate ModelCache and Config to effect-native services

Remove legacy async wrapper functions from Config module and convert
ModelCache from a stateful namespace with module-level Maps into a
proper Effect service with Context/Layer semantics.

Key changes:
- Delete Config's `makeRuntime`-based async wrappers (get, getGlobal,
  update, warnings, etc.) — all callsites now use
  `Config.Service.use(...)` through AppRuntime
- Rewrite ModelCache as an Effect service with HttpClient dependency
  injection, replacing imperative Map-based caching with Effect-native
  Ref cells and TTL logic
- Convert KiloSessions.init and KilocodeBootstrap.init into proper
  Effect services with Layer-based dependency injection
- Wire ModelCache.Service into AppLayer, ProviderAuth, ModelsDev, and
  HTTP API handler layers
- Update Permission.layer to depend on Config.Service directly instead
  of calling Config async wrappers
- Add new test files for KiloSessions and ModelCache Effect integration
- Remove stale Config.get spyOn mocks from tests that no longer need
  them (experimental-session-list, recall)
- Fix indexing-auth to use typed IndexingConfig parameter instead of
  untyped record access

* fix(model-cache): resolve race conditions in concurrent fetch and cache invalidation

Introduce versioned cache cells with proper key derivation to prevent
stale responses from overwriting fresher data during concurrent fetches.

- Add version tracking to detect and discard outdated fetch results
- Derive cache keys from provider-specific options (baseURL, token, apiKey)
  to isolate concurrent requests with different credentials
- Make ModelCache.clear async to properly await invalidation across layers
- Update OrganizationDeps.clear signature to allow Promise<void> return
- Add concurrency and ordering tests for fetch/refresh race scenarios
- Rename local variable from `state` to `entry` in kilo-sessions sync loop

* chore(opencode): remove duplicate imports and fix test layer composition

Remove duplicate `AppRuntime` imports introduced during merge and update
kilo-sessions tests to use Effect-native Auth service instead of static
module calls.

- Remove duplicate `AppRuntime` import in index.ts and instance.ts
- Add Auth.defaultLayer to test layer helper
- Refactor test to yield Auth.Service and use instance methods
- Reorder Effect.provide/Effect.ensuring for correct resource cleanup

* style(opencode): normalize kilocode_change marker comments to block format

Standardize inline `// kilocode_change` annotations across source and
test files to use consistent `// kilocode_change start` / `// kilocode_change end`
block delimiters, improving readability and grep-ability of custom
modifications.
2026-05-27 11:43:32 +02:00
Aarav 01040890d5 Merge branch 'main' into fix/tui-export-all-messages 2026-05-22 17:24:27 -06:00
Aarav Sharma 27a4137496 fix(cli): prevent data-loss in TUI transcript copy/export on SDK error
Both the copy and export handlers now pass `{ throwOnError: true }` to
`sdk.client.session.messages()` and drop the `?? []` fallback, so a failed
fetch (404/400/network) throws into the existing catch block and surfaces an
error toast instead of silently writing/returning an empty transcript.
2026-05-22 16:43:58 -06:00
Catriel Müller b52a2115d3 Merge pull request #10513 from Kilo-Org/dynamic-department
Add background process support
2026-05-22 15:17:54 -03:00
Catriel Müller 72854fab76 Merge pull request #10510 from Kilo-Org/dust-cork
fix(cli): reset terminal modes on TUI exit
2026-05-22 11:46:09 -03:00
Imanol Maiztegui fdc46ddfea chore: clean up post-merge artifacts and rebrand references
Remove accidentally committed Gradle build cache files from the
JetBrains package, add the .gradle directory to .gitignore, and
update user-facing strings from "opencode.json" to "kilo.json".
2026-05-22 15:58:59 +02:00
Catriel Müller a1ff9105a3 Merge branch 'main' into dynamic-department 2026-05-22 10:41:45 -03:00
Catriel Müller 656572c2cf fix: fix kitty proto on old terminals 2026-05-22 08:18:48 -03:00
Imanol Maiztegui 4a28a5f88f Merge branch 'main' into imanolmaiztegui/kilo-opencode-v1.14.41 2026-05-22 13:15:04 +02:00
Imanol Maiztegui 913d6cb07b fix(opencode): correct provider ID references and update TaskPromptOps cancel signature
Use providerID variable instead of provider.id in dialog-provider to
fix incorrect property access after destructuring. Update cancel method
in TaskPromptOps stubs to return Effect.void matching the expected
interface. Remove obsolete workspace-restore test file and add missing
fixture import.
2026-05-22 12:27:18 +02:00
Imanol Maiztegui 7b94fbb95b style: format code with prettier across multiple packages
Reformat multiline arrays, JSX props, CSS transitions, and test
indentation to comply with the project's prettier configuration.
Also reorder auto-generated SDK type imports alphabetically and
relocate type definitions to match updated openapi.json output.
2026-05-22 11:58:24 +02:00
Imanol Maiztegui b6523c0d91 resolve merge conflicts 2026-05-22 09:01:40 +02:00
Catriel Müller c604a1bb3d Merge pull request #10495 from Kilo-Org/impartial-peacock
fix(cli): show recent models in provider picker
2026-05-21 16:11:41 -03:00
Catriel Müller ae0fbe89dc fix(cli): show recent models in provider picker 2026-05-21 14:43:05 -03:00
Catriel Müller f2053dc8be refactor: address the comments 2026-05-21 14:38:18 -03:00