Commit Graph

1851 Commits

Author SHA1 Message Date
Imanol Maiztegui 57bc6eea58 fix(cli): route share links through Kilo session API (#10736)
* fix(cli): route share links through Kilo session API

Refactor shareSession and unshareSession to return Effect values using
EffectBridge.fromPromise and replace the ShareNext dependency in
SessionShare with KiloSession calls so CLI-generated share URLs point
to app.kilo.ai/s/ public links.

* test(session-share): replace EffectBridge usage with direct Storage service calls

Update session-share test to use Storage.Service directly instead of
wrapping Storage.write in EffectBridge.fromPromise, aligning test code
with the refactored service-based architecture. Add Storage.defaultLayer
to the test effect layer composition.
2026-05-29 12:15:42 -04:00
marius-kilocode 277d09d636 Merge remote-tracking branch 'origin/main' into feature-read-xlsx-extraction
# Conflicts:
#	packages/opencode/src/tool/read.ts
2026-05-29 17:22:42 +02:00
Marius 1bdc24cebc Merge pull request #10737 from Kilo-Org/feature-read-docx-extraction
feat(cli): support DOCX text extraction in read tool
2026-05-29 17:13:53 +02:00
marius-kilocode f7830cb7e5 fix(cli): bound XLSX read input size 2026-05-29 16:59:16 +02:00
marius-kilocode c1d315c987 refactor(cli): narrow DOCX read routing and surface warnings 2026-05-29 16:59:16 +02:00
marius-kilocode 752807394d Merge origin/main into effect-question-facade-10720 2026-05-29 16:52:49 +02:00
marius-kilocode 2081af2b33 feat(cli): support XLSX text extraction in read tool 2026-05-29 16:49:08 +02:00
marius-kilocode 1ed120a15e Merge remote-tracking branch 'origin/main' into feature-read-docx-extraction
# Conflicts:
#	packages/opencode/src/tool/read.ts
2026-05-29 16:43:32 +02:00
Marius ac4536a11c Merge pull request #10733 from Kilo-Org/feature-read-ipynb-content
feat(cli): read Jupyter notebooks as cell content
2026-05-29 16:36:05 +02:00
marius-kilocode f5742940cc feat(cli): support DOCX text extraction in read tool 2026-05-29 16:24:48 +02:00
Imanol Maiztegui e4c9b4363e refactor(session): replace promise facade helpers with Effect service calls (#10731)
Migrate all Session.* promise-based helper usage (create, get, messages,
updateMessage, updatePart, setPermission, children, fork) to direct
Effect service consumption via Session.Service. This eliminates the
makeRuntime-backed legacy promise wrappers from session.ts and updates
all dependent modules and tests to use the Effect-based interface.

Key changes:
- Remove exported promise helpers (create, get, messages, etc.) from
  session/session.ts along with the module-level makeRuntime instance
- Update kilo-sessions, remote-sender, allow-everything permission,
  plan-followup, recall tool, and fork module to yield Session.Service
- Convert remapChildren from async function to Effect generator
- Add PlanFollowupRuntime.session helper for effectful session access
- Update all affected test files to use Effect.runPromise with
  Session.Service.use pattern
- Remove session/session.ts from the promise facade allowlist and
  update test allowlist counts accordingly
2026-05-29 16:19:15 +02:00
marius-kilocode cec9f6fc05 fix(cli): describe notebooks without readable cells 2026-05-29 16:09:24 +02:00
marius-kilocode 470e59fd52 fix(cli): tolerate malformed notebook cells 2026-05-29 15:58:52 +02:00
marius-kilocode 4967c22861 feat(cli): read Jupyter notebooks as cell content 2026-05-29 15:36:33 +02:00
marius-kilocode c4b2bb02de Merge remote-tracking branch 'origin/main' into valley-hawk 2026-05-29 14:52:30 +02:00
marius-kilocode d836e84d5c Merge origin/main into effect-question-facade-10720 2026-05-29 13:26:46 +02:00
Marius 1cc2c5b865 Merge pull request #10726 from Kilo-Org/effect-session-prompt-facade-10723
refactor(cli): remove SessionPrompt promise facade
2026-05-29 13:11:56 +02:00
marius-kilocode 5980ac0272 test(cli): annotate Question migration coverage 2026-05-29 12:18:05 +02:00
marius-kilocode daef31e98a refactor(cli): remove SessionPrompt promise facade 2026-05-29 12:15:52 +02:00
marius-kilocode e4095af8d3 refactor(cli): remove Question compatibility facade 2026-05-29 12:15:48 +02:00
Marius c18cd6fa4a Merge pull request #10668 from Kilo-Org/melodious-forest
feat: remove semantic indexing experimental gate
2026-05-29 11:58:36 +02:00
marius-kilocode f46a74a38d Merge remote-tracking branch 'origin/main' into valley-hawk
# Conflicts:
#	packages/opencode/src/snapshot/index.ts
2026-05-29 11:49:43 +02:00
marius-kilocode 2efa216ee5 fix(agent-manager): keep slow snapshot initialization non-blocking 2026-05-29 11:41:13 +02:00
marius-kilocode e737fdda4a test(cli): remove runtime-coupled permission setup 2026-05-29 11:11:40 +02:00
marius-kilocode 3dbf5f3454 test(cli): isolate Permission runtime boundaries 2026-05-29 11:05:54 +02:00
marius-kilocode e28cb43b7e refactor(cli): remove Permission promise facade 2026-05-29 09:55:59 +02:00
Imanol Maiztegui 8f225e2eec Remove wrappers for Provider service (#10658)
* refactor(opencode): remove legacy Provider promise wrappers in favor of Effect service usage

Replace static `Provider.list`, `Provider.getModel`, `Provider.getLanguage`,
`Provider.getSmallModel`, and `Provider.defaultModel` promise helpers with
direct `Provider.Service.use()` calls through `AppRuntime.runPromise`. This
eliminates the `makeRuntime` import and the wrapper functions that bypassed
the Effect dependency injection system.

- Remove legacy promise helpers from provider.ts
- Update kilo-sessions, roll-call, commit-message, enhance-prompt, and
  task tool to use Provider.Service via AppRuntime directly
- Thread Provider.Interface into KiloTask.select for proper DI
- Add Provider.defaultLayer to test layers that exercise TaskTool
- Update commit-message tests to spy on CommitMessageRuntime.model()

* docs(sdk): regenerate v2 SDK types and update edit endpoint description
2026-05-29 09:24:56 +02:00
Marius a3ef151b2a Merge pull request #10684 from Kilo-Org/effect-project-facade-10676
refactor(cli): remove Project promise facade
2026-05-28 17:45:25 +02:00
marius-kilocode 2f49c6adbc refactor(cli): remove legacy ToolRegistry facade 2026-05-28 17:09:17 +02:00
marius-kilocode 977bf4ee39 refactor(cli): remove Project promise facade 2026-05-28 17:08:06 +02:00
marius-kilocode 9653833697 test(cli): wait for disabled indexing startup status 2026-05-28 16:08:38 +02:00
marius-kilocode ef2390d7a4 feat: remove semantic indexing experimental gate 2026-05-28 15:59:11 +02:00
marius-kilocode 3d3d68f37d refactor(cli): remove legacy Snapshot facade 2026-05-28 15:47:06 +02:00
marius-kilocode d883ad96ab fix(cli): avoid indexing plugin blocking startup 2026-05-28 14:21:40 +02:00
Marius 7f35b6edb8 Merge pull request #10648 from Kilo-Org/serene-run
fix(cli): isolate semantic indexing in a worker
2026-05-28 11:48:44 +02:00
marius-kilocode 9fbd5479b0 fix(cli): isolate semantic indexing in a worker 2026-05-28 10:47:41 +02:00
marius-kilocode 117691e4d6 fix: constrain Kilo indexing embedding models 2026-05-28 09:19:25 +02:00
Marius ac9f39fd6e Merge pull request #10618 from Kilo-Org/foil-fall
fix(cli): prevent stale global config reloads
2026-05-28 08:54:56 +02:00
Imanol Maiztegui 8bc05fa9f5 test(opencode): replace mock.module stubs with Effect layer injection in kilo tests (#10615)
Extract KiloModelsService from model-cache to enable dependency injection
and rewrite test files to use Layer-based test harnesses instead of
process-wide mock.module() calls that caused flaky cross-test pollution
on CI.
2026-05-27 15:42:15 +02:00
Imanol Maiztegui 1a36cfbb10 Effect Migration for Kilo callsites (follow-up 2) (#10616)
* refactor(opencode): remove raw LLM interface in favor of stream-based text helper

Introduce KiloLLM.text() to consume Effect streams and extract text
while propagating error/abort events. Replace all usages of the removed
LLM.raw() method and the legacy LLM.stream() async wrapper with
dedicated runtime helpers (CommitMessageRuntime.generate,
PlanFollowupRuntime.handover) that leverage the new stream-based
approach.

- Add KiloLLM.text() stream combinator in kilocode/session/llm.ts
- Remove Interface.raw and the exported LLM.stream() async function
- Refactor commit-message generation to use CommitMessageRuntime
- Refactor plan-followup handover to use PlanFollowupRuntime.handover
- Update all test LLM mocks to remove raw() stubs
- Add unit tests for KiloLLM.text() covering text joining, error
  propagation, and abort handling

* feat(skill): migrate Skill module to Effect service pattern and remove legacy promise wrappers

Remove the makeRuntime-based promise helpers (Skill.all, Skill.get,
Skill.dirs) from the skill module and convert the builtin-skills test
suite to use Effect generators with the testEffect harness.

- Delete legacy runPromise wrappers from packages/opencode/src/skill/index.ts
- Rewrite builtin-skills.test.ts to use testEffect and Effect.gen
- Replace WithInstance.provide/tmpdir with TestInstance yield pattern
- Use Skill.Service directly within Effect generators for all assertions

* refactor(session-status): drop makeRuntime promise helpers and wire Service through Effect context

Replace the standalone `SessionStatus.list`, `.get`, `.set` promise
wrappers with direct `SessionStatus.Service` usage via Effect generators
and `AppRuntime.runPromise` at Kilo callsites that remain imperative.

- Remove makeRuntime-based exports from session/status.ts
- Update kilo-sessions.ts and plan-followup.ts to use AppRuntime.runPromise
  with SessionStatus.Service
- Thread SessionStatus.Service as a dependency through SuggestTool and
  ToolRegistry layers
- Replace spy-based mocks in suggestion tool tests with an in-memory
  service stub for deterministic assertions
2026-05-27 15:42:09 +02:00
marius-kilocode dcfadac83e fix(cli): prevent stale global config reloads 2026-05-27 15:13:51 +02:00
Marius aec43e919c Merge pull request #10608 from Kilo-Org/simple-sushi
Enable Agent Manager tool by default in VS Code
2026-05-27 13:16:29 +02:00
marius-kilocode 3ffacc847b feat(agent-manager): enable tool by default in VS Code 2026-05-27 12:16:42 +02: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
kirillk 25b9007d3d Merge remote-tracking branch 'origin/main' into quaint-airbus
# Conflicts:
#	packages/kilo-jetbrains/frontend/src/main/kotlin/ai/kilocode/client/session/SessionUi.kt
#	packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/SessionUiLayoutTest.kt
#	packages/kilo-jetbrains/frontend/src/test/kotlin/ai/kilocode/client/session/SessionUiTestBase.kt
2026-05-26 11:52:37 -04:00
marius-kilocode 722eb44d63 feat(vscode): enable voice input for signed-in Kilo users 2026-05-26 15:45:48 +02:00
Imanol Maiztegui bacfa4ae62 Effect Migration for Kilo callsites (#10572)
* refactor(opencode): migrate agent promise helpers to kilocode module and adopt Effect-based tests

Remove legacy promise-based helpers (`get`, `list`, `defaultAgent`, `remove`)
from the core agent module and update callsites to use the dedicated
`@/kilocode/agent` module directly. Migrate kilocode-specific tests from
`WithInstance.provide` patterns to the `testEffect` helper with Effect
generators for cleaner, more idiomatic test code.

- Remove `makeRuntime` import and exported promise helpers from agent.ts
- Update HTTP API handlers to import from `@/kilocode/agent` instead of
  re-exported `Agent` namespace
- Rewrite agent tests to use `load()` helper or Effect service access
- Convert agent-global-config-dirs and agent-skill-permissions tests to
  `testEffect` pattern
- Reorder SDK type definitions (BackgroundProcessLogs/WorkspaceWarpError)

* chore(auth): remove legacy promise helpers and replace with direct Effect service access

Eliminate the exported promise-based convenience functions (`get`, `all`,
`set`, `remove`) from the Auth module and replace all callsites with
explicit `AppRuntime.runPromise` or `makeRuntime` invocations that access
`Auth.Service` directly through Effect's service pattern.

- Delete `makeRuntime`-backed promise helpers from auth/index.ts
- Update CLI entrypoint, kilo-sessions, indexing, and server instance to
  use `AppRuntime.runPromise(Auth.Service.use(...))` for auth access
- Inject `Auth.Service` as a dependency into the ModelsDev layer and
  consume it via Effect generator instead of promise wrapper
- Create a local `makeRuntime` instance in model-cache.ts for non-Effect
  callsites that still need promise-based auth access
- Rewrite tests to manipulate auth.json directly on disk with proper
  save/restore semantics instead of relying on removed helpers

* refactor(suggestion): convert suggest tool to Effect-native with injected Command dependency

Transform the suggestion tool from async/promise-based implementation to
idiomatic Effect generators with explicit dependency injection of the
Command service rather than importing and calling module-level helpers.

- Convert `resolvePrompt` from async function to Effect generator that
  accepts a `Command.Interface` parameter
- Refactor `SuggestTool` definition to yield `Command.Service` from the
  Effect context and thread it through to `resolvePrompt`
- Add `Command.Service` as a dependency to the tool registry layer and
  provide `Command.defaultLayer` in both production and test wiring
- Remove unused `makeRuntime` import and exported `get` helper from
  command/index.ts
- Add explicit type annotations to Auth delegate in server instance
- Rewrite suggestion tests to use `testEffect` helper with a mock
  `Command.Service` layer instead of spying on module exports

* feat(git): migrate WorktreeFamily to Effect service and wire Git.Service as dependency

Convert WorktreeFamily.list from an async function using legacy promise
helpers to an Effect generator that yields Git.Service from context,
eliminating the need for the removed `run` promise wrapper in git/index.

- Replace `WorktreeFamily.list()` async function with Effect.fn generator
  that obtains Git.Service and InstanceState from the Effect context
- Remove legacy `makeRuntime`/`run`/`runPromise` exports from git module
- Update RecallTool to thread Git.Service through to WorktreeFamily calls
  via EffectBridge
- Add Git.Service as a required dependency in tool registry and HTTP
  server route layers
- Update all test layers to provide Git.defaultLayer

* chore(mcp): replace legacy promise helpers with Effect-native AppRuntime calls

Remove exported promise-based `status`, `connect`, and `disconnect`
helpers from MCP module and convert the network recovery callsite in
SessionNetwork to use AppRuntime.runPromise with Effect.gen directly.

* refactor(auth): adopt makeRuntime helper for Auth service resolution in kilo modules

Replace AppRuntime.runPromise with locally scoped makeRuntime instances
in kilo-sessions and kilocode/indexing modules, removing the dependency
on the global AppRuntime singleton for Auth service access.

* fix(test): simplify cleanup error handling in provider test

Replace try-catch block with promise .catch() for file unlink operation
during test teardown.
2026-05-26 12:51:21 +02:00
Marius d00bdbf5df Merge pull request #10485 from Kilo-Org/fix-subagent-error-recovery
fix(cli): surface failed subagent task errors
2026-05-26 10:59:01 +02:00
Marius bcda744dfc Merge pull request #10443 from Kilo-Org/subagent-model-reasoning-config
feat: configure task subagent model defaults
2026-05-26 10:58:57 +02:00
marius-kilocode a416b40273 Merge remote-tracking branch 'origin/main' into fix-subagent-error-recovery
# Conflicts:
#	packages/opencode/src/tool/task.ts
#	packages/opencode/test/tool/task.test.ts
2026-05-26 10:42:07 +02:00