Commit Graph

499 Commits

Author SHA1 Message Date
Kit Langton b23e5b78a8 make Session.updateMessage/updatePart generic, remove all MessageV2 casts
Generic interface preserves the narrowed type through update calls,
eliminating `as MessageV2.Assistant` / `as MessageV2.ToolPart` casts.
Async facades keep Zod validation via parse + cast, with `.force()`
bypass. Tighten test assertions for BusyError type and concurrent
caller identity.
2026-03-29 13:02:05 -04:00
Kit Langton cdac7a7dd1 remove abort from compaction service 2026-03-29 12:42:35 -04:00
Kit Langton eb05bda03b remove abort from llm and processor services 2026-03-29 12:38:24 -04:00
Kit Langton 732bbde850 effectify resolveCommand: use Command.Service, Agent, Plugin directly in layer 2026-03-29 12:22:00 -04:00
Kit Langton 4f784276b4 effectify resolvePromptParts: use AppFileSystem and Agent service directly 2026-03-29 12:21:59 -04:00
Kit Langton f5bf694056 use SessionCompaction.Service and Plugin.Service directly in layer 2026-03-29 12:21:59 -04:00
Kit Langton 51ad4801e8 add Effect-based prompt tests covering loop lifecycle, cancel, concurrency
12 tests using testEffect + TestLLM pattern (no HTTP server):
- loop exits on stop finish, calls LLM for new messages, continues on tool-calls
- loop sets status busy→idle
- cancel interrupts cleanly, returns last assistant, records MessageAbortedError
- cancel with queued callers resolves all cleanly
- concurrent callers get same result via Deferred queue
- concurrent callers receive same error on failure
- assertNotBusy throws BusyError when running, succeeds when idle
- shell rejects with BusyError when loop running
2026-03-29 12:21:58 -04:00
Kit Langton be20ea0f42 use SessionProcessor.Service, Session.Service, Agent.Service directly in layer
Yield effectified services instead of going through async facades. Eliminates
Effect→Promise→Effect double-bounce for processor.create, processor.process,
Session.get/touch/setPermission/updateMessage, and Agent.get/list. Await cancel
in session route. Remove redundant InstanceState.get in shellE ensuring block.
2026-03-29 12:21:57 -04:00
Kit Langton 76373f0c73 use Session.Service and Agent.Service directly instead of Effect.promise wrappers
Yield the effectified services in the layer and call their methods
directly, eliminating the double Effect→Promise→Effect bounce through
async facades. Layer.unwrap(Effect.sync(...)) breaks the circular
import. Also improves the assertNotBusy test with a proper gate/spy
so it deterministically catches the busy state.
2026-03-29 12:21:56 -04:00
Kit Langton 5719a13cbf refactor(session): effectify SessionPrompt service
Migrate SessionPrompt to the Effect service pattern (Interface, Service,
Layer, InstanceState, makeRuntime + async facades).

Key design decisions:

- Fiber-based cancellation replaces manual AbortController management.
  Effect.promise((signal) => ...) derives AbortSignals automatically;
  cancel() interrupts fibers and signals propagate to the AI SDK,
  shell processes, and tool execution.

- Deferred queue replaces Promise callback queue. Concurrent loop()
  callers get a Deferred that resolves when the running fiber finishes.
  On cancel or error, queued callers now receive proper errors instead
  of hanging forever.

- Separate loops/shells maps in InstanceState replace the single shared
  state object, with shell-to-loop handoff preserved: if callers queue
  a loop while a shell is running, shellE cleanup starts the loop.

- Heavy helper functions (createUserMessage, handleSubtask, shellImpl,
  resolveCommand, insertReminders, ensureTitle) stay as plain async
  functions called via Effect.promise, keeping the migration incremental.

- resolveTools and createStructuredOutputTool are unchanged (deeply tied
  to AI SDK tool callbacks).
2026-03-29 12:21:56 -04:00
Luke Parker a5b1dc081d test: add regression coverage for sync plugin hooks (#19589)
compliance-close / close-non-compliant (push) Has been cancelled
beta / sync (push) Has been cancelled
docs-update / update-docs (push) Has been cancelled
deploy / deploy (push) Has been cancelled
docs-locale-sync / sync-locales (push) Has been cancelled
generate / generate (push) Has been cancelled
nix-eval / nix-eval (push) Has been cancelled
nix-hashes / compute-hash (blacksmith-4vcpu-ubuntu-2404, x86_64-linux) (push) Has been cancelled
nix-hashes / compute-hash (blacksmith-4vcpu-ubuntu-2404-arm, aarch64-linux) (push) Has been cancelled
nix-hashes / compute-hash (macos-15-intel, x86_64-darwin) (push) Has been cancelled
nix-hashes / compute-hash (macos-latest, aarch64-darwin) (push) Has been cancelled
publish / version (push) Has been cancelled
storybook / storybook build (push) Has been cancelled
test / unit (linux) (push) Has been cancelled
test / unit (windows) (push) Has been cancelled
test / e2e (linux) (push) Has been cancelled
test / e2e (windows) (push) Has been cancelled
typecheck / typecheck (push) Has been cancelled
nix-hashes / update-hashes (push) Has been cancelled
publish / build-cli (push) Has been cancelled
publish / sign-cli-windows (push) Has been cancelled
publish / build-tauri (map[host:blacksmith-4vcpu-ubuntu-2404 target:x86_64-unknown-linux-gnu]) (push) Has been cancelled
publish / build-tauri (map[host:blacksmith-4vcpu-windows-2025 target:x86_64-pc-windows-msvc]) (push) Has been cancelled
publish / build-tauri (map[host:blacksmith-8vcpu-ubuntu-2404-arm target:aarch64-unknown-linux-gnu]) (push) Has been cancelled
publish / build-tauri (map[host:macos-latest target:aarch64-apple-darwin]) (push) Has been cancelled
publish / build-tauri (map[host:macos-latest target:x86_64-apple-darwin]) (push) Has been cancelled
publish / build-tauri (map[host:windows-2025 target:aarch64-pc-windows-msvc]) (push) Has been cancelled
publish / build-electron (map[host:blacksmith-4vcpu-ubuntu-2404 platform_flag:--linux target:aarch64-unknown-linux-gnu]) (push) Has been cancelled
publish / build-electron (map[host:blacksmith-4vcpu-ubuntu-2404 platform_flag:--linux target:x86_64-unknown-linux-gnu]) (push) Has been cancelled
publish / build-electron (map[host:blacksmith-4vcpu-windows-2025 platform_flag:--win target:x86_64-pc-windows-msvc]) (push) Has been cancelled
publish / build-electron (map[host:macos-latest platform_flag:--mac --arm64 target:aarch64-apple-darwin]) (push) Has been cancelled
publish / build-electron (map[host:macos-latest platform_flag:--mac --x64 target:x86_64-apple-darwin]) (push) Has been cancelled
publish / build-electron (map[host:windows-2025 platform_flag:--win --arm64 target:aarch64-pc-windows-msvc]) (push) Has been cancelled
publish / publish (push) Has been cancelled
stats / stats (push) Has been cancelled
daily-pr-recap / pr-recap (push) Has been cancelled
daily-issues-recap / daily-recap (push) Has been cancelled
close-issues / close (push) Has been cancelled
close-stale-prs / close-stale-prs (push) Has been cancelled
2026-03-29 03:43:00 +00:00
Sebastian 38af99dcb4 prompt slot (#19563) 2026-03-29 00:27:27 +01:00
Kit Langton 860531c275 refactor(session): effectify session processor (#19485) 2026-03-28 12:09:47 -04:00
Kit Langton 2145d97f18 refactor(session): effectify SessionCompaction service (#19459) 2026-03-28 01:09:14 +00:00
Sebastian f3997d8082 Single target plugin entrypoints (#19467) 2026-03-27 23:44:46 +00:00
Kit Langton 5cd54ec345 refactor(format): use ChildProcessSpawner instead of Process.spawn (#19457) 2026-03-27 17:37:07 -04:00
Aiden Cline c33d9996f0 feat: AI SDK v6 support (#18433) 2026-03-27 15:24:30 -05:00
Sebastian ff13524a53 fix flaky plugin tests (no mock.module for bun) (#19445) 2026-03-27 20:55:03 +01:00
Kit Langton e528ed5d86 effectify Plugin service internals (#19365) 2026-03-27 15:20:11 +00:00
opencode-agent[bot] 21023337fa chore: generate 2026-03-27 14:01:28 +00:00
Sebastian 6274b0677c tui plugins (#19347) 2026-03-27 15:00:26 +01:00
Kit Langton 9c6f1edfd7 refactor(effect): yield services instead of promise facades (#19325) 2026-03-26 21:46:38 -04:00
opencode-agent[bot] c333e914ee chore: generate 2026-03-26 18:42:59 +00:00
Kit Langton 2e6ac8ff49 fix(mcp): close transport on failed/timed-out connections (#19200) 2026-03-26 14:41:00 -04:00
Kit Langton 28f5176ffd effectify Config service (#19139) 2026-03-26 13:07:01 -04:00
James Long 38450443b1 feat(core): remove workspace server, WorkspaceContext, start work towards better routing (#19316) 2026-03-26 12:30:26 -04:00
opencode-agent[bot] 17e8f577d6 chore: generate 2026-03-26 15:49:53 +00:00
Kit Langton c7d23098d1 refactor(lsp): effectify LSP service with InstanceState (#19150) 2026-03-26 11:48:36 -04:00
opencode-agent[bot] 1d363fa19f chore: generate
deploy / deploy (push) Has been cancelled
2026-03-26 14:16:07 +00:00
Shoubhit Dash 1b028d0632 revert: roll back git-backed review modes (#19295) 2026-03-26 10:14:57 -04:00
opencode-agent[bot] 31ad6e85ba chore: generate 2026-03-26 00:56:34 +00:00
Kit Langton 97c15a087d effectify Bus service: migrate to Effect PubSub + InstanceState (#18579) 2026-03-25 20:19:24 -04:00
Kit Langton b90de755f9 fix+refactor(mcp): lifecycle tests, cancelPending fix, Effect migration (#19042) 2026-03-25 20:15:05 -04:00
André Cruz 7123aad5a8 fix(opencode): classify ZlibError from Bun fetch as retryable instead of unknown (#19104)
Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
2026-03-25 13:08:40 -05:00
Aiden Cline 77fc88c8ad chore: remove dead code for todoread tool (#19128)
publish-github-action / publish (push) Has been cancelled
2026-03-25 16:21:42 +00:00
Shoubhit Dash 73e107250d feat: restore git-backed review modes with effectful git service (#18900) 2026-03-25 21:09:53 +05:30
James Long b0017bf1b9 feat(core): initial implementation of syncing (#17814) 2026-03-25 10:47:40 -04:00
Aiden Cline 71693cc24b tweak: only spawn lsp servers for files in current instance (or cwd if instance is global) (#19058) 2026-03-25 00:31:29 -05:00
Dax 0a80ef4278 fix(opencode): avoid snapshotting files over 2MB (#19043) 2026-03-25 04:43:48 +00:00
Kit Langton 4647aa80ac effectify Worktree service (#18679) 2026-03-24 20:26:21 -04:00
opencode-agent[bot] e837dcc1c5 chore: generate 2026-03-24 18:43:20 +00:00
Nicholas Hansen 024979f3fd feat(bedrock): Add token caching for any amazon-bedrock provider (#18959) 2026-03-24 13:42:20 -05:00
opencode-agent[bot] 8994cbfc0f chore: generate 2026-03-24 18:05:43 +00:00
Kit Langton 539b01f20f effectify Project service (#18808) 2026-03-24 14:04:22 -04:00
Ryan Skidmore 814a515a8a fix: improve plugin system robustness — agent/command resolution, async errors, hook timing, two-phase init (#18280)
Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
2026-03-24 12:50:55 -05:00
opencode-agent[bot] 1d3232b388 chore: generate 2026-03-24 17:05:02 +00:00
Kit Langton 5c1bb5de86 fix: remove flaky cross-spawn spawner tests (#18977) 2026-03-24 13:04:04 -04:00
Kit Langton 41c77ccb33 fix: restore cross-spawn behavior for effect child processes (#18798) 2026-03-24 10:35:24 -04:00
opencode-agent[bot] 9a006d8700 chore: generate 2026-03-23 17:12:55 +00:00
Kit Langton 3a0bf2f39f fix console account URL handling (#18809) 2026-03-23 13:11:38 -04:00