Commit Graph

710 Commits

Author SHA1 Message Date
Catriel Müller cd67db9501 fix: kilocode markers 2026-05-08 14:54:30 -03:00
Catriel Müller 71067656e2 fix: address PR review feedback on provider failed-state filtering and JSON parse safety 2026-05-08 14:38:43 -03:00
Catriel Müller 11297e4c5a fix: fix providers with wrong credentials 2026-05-08 13:32:35 -03:00
Mark IJbema a2bb05726f Merge remote-tracking branch 'origin/main' into markijbema/kilo-opencode-v1.14.33 2026-05-07 10:44:08 +02:00
Josh Lambert bef0183738 fix(vscode): close runtime telemetry consent gap with the CLI
The previous `watchTelemetryState` fix updated the webview UI in real
time but left the CLI subprocess's PostHog client stuck on its
spawn-time `KILO_TELEMETRY_LEVEL` value. A user who started VS Code
with telemetry off and toggled it on at runtime saw the thumbs UI
appear (good) but every webview event was silently dropped at the
CLI's `Client.capture()` gate (bad).

Add a runtime sync channel:

- New `POST /telemetry/setEnabled` Hono route on the CLI server that
  calls `Telemetry.setEnabled(enabled)` to flip the `posthog-node`
  client's opt state.
- New `TelemetryProxy.setEnabled(enabled)` method that POSTs to it,
  using the same fire-and-forget pattern as `capture`.
- Extension calls `telemetry.setEnabled(vscode.env.isTelemetryEnabled)`
  immediately after `telemetry.configure(...)` on every `connected`
  state change, so a freshly-spawned CLI gets corrected even when its
  spawn-time env var is stale.
- Extension subscribes to `vscode.env.onDidChangeTelemetryEnabled` to
  forward runtime consent changes to the CLI as they happen.

All three changes live in Kilo-owned files (the route is already a
`kilocode_change - new file`, and the extension is Kilo-only). Zero
upstream OpenCode merge surface.

Closes #9872 fully (the previous `d67c5e307c` covered only the webview
UI).
2026-05-06 23:29:55 -04:00
Mark IJbema 71bb5a1253 fix(cli): use established double-cast for PromptInput in HttpApi handler
Replace 'as SessionPrompt.PromptInput' with 'as unknown as SessionPrompt.PromptInput' to match the pre-existing pattern in the legacy Hono handler (instance/session.ts:901,936). The single cast was rejected by TypeScript because the schema-derived ctx.payload has readonly arrays while Kilo's PromptInput override declares parts as mutable PartInputUnion[]. The double cast is the established Kilo workaround for this readonly→mutable mismatch and keeps the Kilo diff vs upstream minimal.
2026-05-06 21:58:47 +02:00
Mark IJbema 5f5853a2e3 fix: align Kilo source/tests with v1.14.33 API renames
Mechanical follow-up to the v1.14.33 merge:

- src/server/routes/ui.ts: remove dead proxy fallback (proxy/createHash/csp were intentionally commented out by Kilo; the Effect/Promise paths still referenced them)
- src/kilocode/{plan-followup,session/prompt}.ts: pass Instance.current to Session.plan(input, instance)
- src/server/routes/instance/httpapi/handlers/session.ts: cast PromptPayload spread to PromptInput (readonly→mutable schema/runtime mismatch)
- src/plugin/index.ts: cast external @opencode-ai/plugin auth plugins through unknown to bridge to local @kilocode/plugin types
- script/build.ts: drop duplicate sourcemap key (Kilo's release-aware version wins)
- test/kilocode/indexing-{startup,worktree}.test.ts: switch from Instance.disposeAll/InstanceBootstrap-as-effect to disposeAllInstances/getBootstrapRunEffect
- test/kilocode/model-cache-org.test.ts: convert Instance.provide init from async fn to Effect
- test/kilocode/kilo-loader-auth.test.ts: drop ModelsDev.Data.reset() (no longer exists)
- test/kilocode/plan-exit-detection.test.ts, plan-followup.test.ts: pass Instance.current to Session.plan
- test/kilocode/{plan-followup,session-list}.test.ts: replace Session.list() with AppRuntime.runPromise(Session.Service.use((svc) => svc.list()))
2026-05-06 21:53:19 +02:00
Mark IJbema 1ea9ad2af0 resolve merge conflicts 2026-05-06 21:32:26 +02:00
Mark IJbema a77843cbab refactor: kilo compat for v1.14.33 2026-05-06 12:13:06 +02:00
Mark IJbema 05d5061653 fix(cli): align HttpApi auth default with Hono and skip un-migrated parity tests
The HttpApi authorization middleware defaulted the username to
"opencode", while the Hono AuthMiddleware already defaulted to "kilo"
(kilocode_change). The parity tests added by upstream in
packages/opencode/test/server/httpapi-sdk.test.ts exposed the
inconsistency. Align the HttpApi middleware to also default to "kilo"
and update the pre-existing basic-auth test creds that hit it.

Two new httpapi-sdk parity tests also hit Kilo overlay routes
(/config/providers, /agent) that aren't yet wired onto the Effect
HttpApi bridge, returning 500. Skip those two with kilocode_change
markers pointing at the same "migrate Kilo overlay routes onto the
HttpApi bridge" follow-up the existing httpapi-bridge.test.ts comment
references.
2026-05-05 21:23:09 +02:00
Mark IJbema 1ba2980cad resolve merge conflicts 2026-05-05 15:11:52 +02:00
Mark IJbema 2701776e21 refactor: kilo compat for v1.14.30 2026-05-05 12:50:48 +02:00
HyeokjaeLee 430bde9e9b fix(instance): restore InstanceBootstrap init parameter for non-Effec… (#25449)
Co-authored-by: Dax Raad <d@ironbay.co>
2026-05-02 15:26:30 -04:00
Kit Langton f8738c9002 feat(models): effectify ModelsDev as Service (#25434) 2026-05-02 13:59:08 -04:00
Kit Langton 3b9155714d Delete Instance.dispose and Instance.reload (#25427) 2026-05-02 11:44:16 -04:00
Kit Langton b09b7d28b8 refactor(instance-store): consolidate dispose helpers (#25424) 2026-05-02 11:21:40 -04:00
Kit Langton 4c4860fb24 Replace Instance.disposeAll/load with fixture helper (#25418) 2026-05-02 10:56:15 -04:00
Kit Langton 5242a1c6b4 fix(httpapi): install Instance ALS for adapter Promise bridge (#25417) 2026-05-02 10:49:44 -04:00
Kit Langton 075f876e6f fix(httpapi): re-land workspace create payload accepts missing extra (#25412) 2026-05-02 09:35:39 -04:00
Kit Langton f33aec1139 Convert LoadInput.init to Effect + extract InstanceBootstrap as a Service (#25376) 2026-05-02 00:02:52 -04:00
Kit Langton 1571933096 Drop ALS fallbacks from containsPath and workspace routing (#25374) 2026-05-02 03:06:22 +00:00
Kit Langton 160928a9a9 Extract InstanceStore.provide helper (#25372) 2026-05-01 22:42:03 -04:00
opencode-agent[bot] d297c29f22 chore: generate 2026-05-02 02:19:48 +00:00
Kit Langton 0b498dd448 fix(httpapi): preserve OpenAPI parameter parity (#25291) 2026-05-01 22:18:52 -04:00
Kit Langton cec9c6122a Move instance loading into Effect service (#25277) 2026-05-01 22:18:06 -04:00
Kit Langton 8c79c58c4d refactor: rename workspace adapters (#25272) 2026-05-01 07:36:52 -04:00
Kit Langton 8b56d1712f refactor(session): pass project to list (#25215) 2026-04-30 23:00:59 -04:00
Kit Langton 5ba68a28c0 refactor(httpapi): scope async prompt fiber (#25213) 2026-04-30 22:33:02 -04:00
opencode-agent[bot] bce4def2db chore: generate 2026-05-01 02:26:56 +00:00
Kit Langton 3544ea0244 refactor(httpapi): drop session prompt bridge (#25210) 2026-04-30 22:25:52 -04:00
opencode-agent[bot] 6d4629b566 chore: generate 2026-05-01 01:28:37 +00:00
Kit Langton bc805b3001 Pass CORS options to HttpApi backend (#25201) 2026-04-30 21:26:32 -04:00
Kit Langton 5c2e06f353 Document HttpApi route patterns (#25188) 2026-04-30 20:48:14 -04:00
Kit Langton 451650b584 refactor(httpapi): preserve typed errors in session prompt handlers (#25181) 2026-04-30 20:04:00 -04:00
opencode-agent[bot] 1b76bec0e2 chore: generate 2026-05-01 00:03:55 +00:00
Kit Langton 96f4da1e1d Serve instance events through HttpApiBuilder (#25182) 2026-04-30 20:02:46 -04:00
opencode-agent[bot] 96a0dd6b04 chore: generate 2026-04-30 23:37:58 +00:00
Kit Langton 2dd1f2d453 Avoid request-time HttpApi layer provisioning (#25179) 2026-04-30 19:36:57 -04:00
opencode-agent[bot] 510f01674a chore: generate 2026-04-30 23:29:58 +00:00
Kit Langton e3134a2a99 refactor(session): align prompt input types with their schemas (#25178) 2026-04-30 19:28:46 -04:00
opencode-agent[bot] 8805104b8d chore: generate 2026-04-30 23:25:10 +00:00
Kit Langton fc155e9fc5 Build HttpApi UI route from services (#25177) 2026-04-30 19:24:10 -04:00
opencode-agent[bot] 247284b9af chore: generate 2026-04-30 22:51:09 +00:00
Kit Langton e0305e47f3 Protect HttpApi web UI fallback with auth (#25169) 2026-04-30 18:49:54 -04:00
Kit Langton 5518ecaefe Fix HttpApi web UI fallback (#25163) 2026-04-30 17:43:18 -04:00
Kit Langton fbcbd24063 Add SyncEvent service (#25158) 2026-04-30 16:45:26 -04:00
Kit Langton 3250b814ce Fix HttpApi raw route authorization (#25154) 2026-04-30 19:55:20 +00:00
Kit Langton 0e9d9282c6 Refactor workspace service boundaries (#25152) 2026-04-30 15:34:37 -04:00
Kit Langton f4ce240a2e Use PTY service directly in HTTP routes (#25138) 2026-04-30 14:24:43 -04:00
Kit Langton 19271fca2d Use workspace service in HTTP routes (#25139) 2026-04-30 13:57:25 -04:00