Avoid InstanceLayer.layer's lazy bootstrap import in the test graph by
directly providing InstanceStore.defaultLayer with InstanceBootstrap.defaultLayer,
preventing unintended side effects during test execution.
Remove eager publish call in indexing initialization that caused
premature event emission. Add foreign key constraint tolerance in
next-message projector to handle writes racing against deleted
sessions. Fix test environment isolation for gateway headers and
permission tests, update auth test assertions to use "kilo" username,
and remove stale indexing route from httpapi-bridge expectations.
Update session network test to use the correct WithInstance.provide API,
aligning with the refactored import structure introduced in the circular
dependency fix.
Extract `disposeAllInstancesAfterProviderAuthCallback` into a dedicated
module and invoke it from the provider OAuth callback handler instead of
coupling it to the ProviderAuth layer. This removes the InstanceStore
dependency from `ProviderAuth.layer`.
Additional changes:
- Add `--cloud-fork` CLI option to the run command for fetching sessions
from cloud and continuing locally
- Replace the Zod-bridged `Schema.Any` indexing config with a native
Effect `IndexingSchema` definition in kilo-indexing, propagating typed
config through the SDK OpenAPI spec
- Use `optionalOmitUndefined` for `recommendedIndex` to emit clean JSON
- Fix `request.source.signal` access by guarding with `instanceof Request`
- Replace `Effect.catchAllCause` with `Effect.catchCause` in telemetry
- Migrate tests from `BashTool` to `ShellTool`, extract `TestConfig`
fixture, and convert stats-subagent-cost tests to use `testEffect`
- Reorder SDK event union members to match updated OpenAPI schema
- Export `aggregateSessionStats` for Kilo regression test coverage
- Widen `setViewedSessions` input to accept readonly arrays
Rename the `InstanceStore` module to `InstanceRuntime` across all consumer
sites to better reflect its role as a runtime lifecycle manager rather than
a persistence layer. Update the kilo-gateway route dependency key from
`InstanceStore` to `Instances` for clarity.
Additional changes:
- Replace `Schema.Number` with `Schema.Finite` for `recommendedIndex` in
both the provider and models schemas
- Inject `InstanceStore.Service` into the ProviderAuth layer and use its
`disposeAll()` method instead of escaping to a raw promise
- Remove obsolete `getBootstrapRunEffect` usage from indexing startup tests
- Add missing `warnings` method to the test config fixture
Move the IndexingStatus Effect schema out of the KiloIndexing namespace into
a dedicated `indexing-event.ts` module so it can be shared between the bus
event system and the HttpApi layer without circular imports.
Additionally fix several OpenAPI spec inconsistencies:
- Inline PermissionReplyBody into the endpoint payload schema
- Make `organizationId` nullable in the organization set endpoint
- Replace opaque string response for `/kilo/fim` with a structured
streaming completion schema
- Register `indexing.status` as a typed SSE event in the global event union
- Add `matchLegacyKiloOpenApi` post-processor for backward-compatible
nullable fields and FIM response shape
- Relocate Kilo-specific bridge tests to `test/kilocode/server/` and trim
duplicated assertions from the core bridge test file
Replace direct `Instance.provide` usage with `WithInstance.provide` across
source modules and test files to decouple runtime context provisioning
from the core Instance singleton.
- Update kilo-sessions, remote-sender, roll-call, and plan-followup source
- Remove unused `Instance` imports where only `WithInstance` is needed
- Drop unnecessary `init` param from indexing-worktree test calls
- Add missing `WithInstance` import in fixture-dependent test files
- Adds 'new file' marker to check-forbidden-strings workflow
- Marks the SKIP_FILES addition in extract-source-links.ts
- Updates nvidia-headers test to assert the new kilo.ai/Kilo Code values
Replaces hardcoded opencode.ai/anomalyco URLs in production code paths:
LLM provider HTTP-Referer/X-Title attribution headers, the TUI error
dialog's bug-report URL, and the github-remote parser test fixtures.
Extends check-forbidden-strings with patterns for these leaks (with a
narrow allowlist for fork-lineage docs and upstream-merge tooling).
Move inline cloud-sessions fetch logic from Hono route handler into a
reusable getCloudSessions function in handlers.ts, and introduce new
Effect HttpApi endpoints for fetching and importing individual cloud
sessions.
- Extract getCloudSessions handler from routes.ts inline implementation
- Export fetchCloudSession, fetchCloudSessionForImport, importSessionToDb
from kilo-gateway package
- Add cloudSession (GET /kilo/cloud/session/:id) endpoint for previewing
remote session data
- Add cloudSessionImport (POST /kilo/cloud/session/import) endpoint to
download and persist cloud sessions locally
- Define CloudSession, CloudSessionData, CloudMessage schemas in the
kilo-gateway API group
- Change claw status error response from 500 InternalServerError to
503 ServiceUnavailable
- Register new cloud routes in instance router
- Add test coverage for route disambiguation between import and :id paths
- Regenerate SDK types and OpenAPI spec
Reformat code with consistent line breaks, trailing commas, semicolons,
and line-length compliance. No logic changes — purely whitespace,
indentation, and punctuation adjustments driven by the project formatter.
- Break long function signatures and conditionals across multiple lines
- Remove trailing blank lines and stray leading newlines
- Replace string-expression JSX whitespace with literal spaces
- Convert quoted object keys to unquoted where valid
- Remove erroneous shell command prefix from openapi.json
- Deduplicate SessionNetworkWait1 schema and simplify Finite unions to
plain number type in OpenAPI spec
Introduce a structured Effect HttpApi surface for all Kilo-specific
endpoints, replacing inline Hono handler logic with declarative group
definitions, typed schemas, and composable handler layers.
Key changes:
- Add HttpApi group and handler modules for commit-message, enhance-prompt,
indexing, kilocode, network, remote, session-import, suggestion, and
telemetry
- Extract allow-everything permission logic into a reusable Effect function
- Register all Kilo HttpApi groups in InstanceHttpApi and wire route
forwarding in the Hono instance router
- Export Suggestion.RequestSchema and annotate schemas with identifiers
- Use NonNegativeInt for indexing status fields and Schema.Finite for
network wait timestamps
- Add httpapi-bridge test asserting parity between Hono and Effect specs
for all 22 Kilo overlay routes
- Regenerate SDK types and openapi.json to reflect the new endpoints