Commit Graph

4034 Commits

Author SHA1 Message Date
Kit Langton 8b04ddc6bf effectify prompt shell execution 2026-03-29 13:37:59 -04:00
Kit Langton bbed140fd7 effectify prompt subtask handling 2026-03-29 13:34:35 -04:00
Kit Langton eaf3454103 effectify prompt tool resolution 2026-03-29 13:25:48 -04:00
Kit Langton 9c2a06d2c7 effectify prompt reminder injection 2026-03-29 13:22:47 -04:00
Kit Langton 41b92cbcc0 restore prompt runtime after rebase drift 2026-03-29 13:19:37 -04:00
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 724e599cb0 effectify createUserMessage: move into layer as createMessage, delete old 400-line async version 2026-03-29 12:22:05 -04:00
Kit Langton 7c9ccdeb1b fix type errors after rebase: add casts for Session.updateMessage/updatePart returns 2026-03-29 12:22:04 -04:00
Kit Langton b41bb7e90d extract getModel helper, simplify Promise.resolve wrapper 2026-03-29 12:22:03 -04:00
Kit Langton 06befef8d0 simplify title: consolidate Effect.promise calls, use fiber signal, shorten names 2026-03-29 12:22:01 -04:00
Kit Langton edc98d5128 effectify ensureTitle: move into layer, use agents/sessions services, remove dead code 2026-03-29 12:22:00 -04:00
Kit Langton 8c10edc8c6 remove dead resolveCommand and resolvePromptPartsImpl 2026-03-29 12:22:00 -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 2d9a310be1 use shorthand properties in Service.of, Fiber.interruptAll in finalizer 2026-03-29 12:21:58 -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
opencode 0bc2f99f2d release: v1.3.5 2026-03-29 03:42:52 +00:00
Aiden Cline 55895d0663 core: fix plugin hooks to properly handle async operations ensuring plugins can execute async code without errors (#19586) 2026-03-29 03:15:41 +00:00
Aiden Cline 72cb9dfa31 tweak: adjust gpt prompt to be more minimal, fix file reference annoyances (#19585) 2026-03-28 21:32:40 -05:00
opencode f0a9075fdf release: v1.3.4 2026-03-29 01:00:44 +00:00
Aiden Cline 36aeb32159 ignore: kill todo (#19566) 2026-03-29 00:06:32 +00:00
Sebastian 38af99dcb4 prompt slot (#19563) 2026-03-29 00:27:27 +01:00
Vladimir Glafirov 1f290fc1ba fix: update opencode-gitlab-auth to 2.0.1 (#19552) 2026-03-28 20:10:06 +00:00
Sebastian 77d4f99497 use theme color for prompt placeholder (#19535) 2026-03-28 17:20:37 +01:00
Dax aa2d753e7e feat: dialog variant menu and subagent improvements (#19537) 2026-03-28 16:16:00 +00:00
Kit Langton 860531c275 refactor(session): effectify session processor (#19485) 2026-03-28 12:09:47 -04:00
Dax 2b86b36c8c feat: open dialog for model variant selection instead of cycling (#19534) 2026-03-28 15:37:20 +00:00
Sebastian 8ac2fbbd12 kv theme before default fallback (#19523) 2026-03-28 15:54:54 +01:00
opencode-agent[bot] 0981b8eb71 chore: generate 2026-03-28 14:26:45 +00:00
Kit Langton aa9ed001d3 refactor(file): use AppFileSystem instead of raw Filesystem (#19458) 2026-03-28 10:25:46 -04:00
Sebastian 6086072567 upgrade opentui to 0.1.91 (#19440) 2026-03-28 15:10:59 +01:00
Dax Raad 6c14ea1d22 tweak(session): add top spacing and remove obsolete docs prompt
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
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
nix-hashes / update-hashes (push) Has been cancelled
publish / version (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
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
containers / build (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-28 01:56:11 -04:00
Dax c3a9ec4a99 fix: restore subagent footer and fix style guide violations (#19491) 2026-03-28 01:46:29 -04:00
Dax 41b0d03f6a feat: add model variant selection dialog (#19488) 2026-03-28 01:21:28 -04:00
Dax 81eb6e670b refactor(prompt): remove variant cycle display from footer (#19489) 2026-03-28 01:21:16 -04:00
Dax 8446719b13 refactor(session): move context into prompt footer (#19486) 2026-03-28 01:05:18 -04:00
Aiden Cline 15a8c22a26 tweak: adjust bash tool description to increase cache hit rates between projects (#19487) 2026-03-27 23:53:36 -05:00
Kit Langton 43bc5551e8 update effect to 4.0.0-beta.42 (#19484) 2026-03-27 23:25:05 -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
opencode-agent[bot] 02b19bc3d7 chore: generate 2026-03-27 21:38:08 +00:00
Kit Langton 5cd54ec345 refactor(format): use ChildProcessSpawner instead of Process.spawn (#19457) 2026-03-27 17:37:07 -04:00
James Long 4b9660b211 refactor(core): move more responsibility to workspace routing (#19455) 2026-03-27 16:33:56 -04:00