Repository navigation
refactor: organize agent hook installation and server owners - #39969
Merged
Merged
Conversation
brennanb2025
added a commit
that referenced
this pull request
Nov 9, 2026
* Start OpenCode 2 with a picked model through its launch config OpenCode 2's root command has no --model, so launches that carried one exited with 'Unrecognized flag'. On supported 2.x releases the PTY launch hook now moves a literal root --model into OPENCODE_CONFIG_CONTENT and starts a private server so the TUI reads it. Anything it can't apply is left as typed. * Point the sync-fs ratchet baseline at the moved agent-hooks files #39969 moved the agent-hooks installer files after #39930 wrote the baseline, so the ratchet saw every moved file as new and failed lint. Same counts, new paths; installer-utils' 20 split into its two new owners. * Rewrite only one plain OpenCode command with a real --standalone A --prompt or --session value spelled --standalone no longer counts as the option, the cut starts at the previous token's end so its escaped trailing characters stay, and a newline or shell operator leaves the command as typed. * Leave a command with an operator outside quotes as typed A token that only starts with a quote, such as '--auto'&&echo, could hide a shell operator; scan each token outside its quotes instead. * Leave comments and explicit servers as typed A word starting with # comments out the rest of the line, and --server means another server that never reads this launch's config. * Scan for shell operators with each shell's own quoting cmd quotes only with double quotes and PowerShell escapes with a backtick, so a posix-only scan could miss an operator they would split on. * Rewrite only the command shape Orca itself emits Replace the shell scanners with one check: every argument after the executable must be exactly quoteStartupArg's output or a bare flag the builders append, and the prompt must match the body Orca put in the env. cmd also rejects any divergent token or raw newline. Anything else stays as typed. * Test that the launch hook hands the prompt body to the model rewrite
audichuang
added a commit
to audichuang/orca
that referenced
this pull request
Nov 10, 2026
audichuang
added a commit
to audichuang/orca
that referenced
this pull request
Nov 10, 2026
9 tasks done
audichuang
added a commit
to audichuang/orca
that referenced
this pull request
Nov 12, 2026
audichuang
added a commit
to audichuang/orca
that referenced
this pull request
Nov 13, 2026
audichuang
added a commit
to audichuang/orca
that referenced
this pull request
Nov 14, 2026
audichuang
added a commit
to audichuang/orca
that referenced
this pull request
Nov 16, 2026
audichuang
added a commit
to audichuang/orca
that referenced
this pull request
Nov 18, 2026
audichuang
added a commit
to audichuang/orca
that referenced
this pull request
Nov 18, 2026
audichuang
added a commit
to audichuang/orca
that referenced
this pull request
Nov 19, 2026
audichuang
added a commit
to audichuang/orca
that referenced
this pull request
Nov 20, 2026
audichuang
added a commit
to audichuang/orca
that referenced
this pull request
Nov 20, 2026
audichuang
added a commit
to audichuang/orca
that referenced
this pull request
Nov 20, 2026
audichuang
added a commit
to audichuang/orca
that referenced
this pull request
Nov 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Agent-hook installation and server tests were spread across the domain root, and mixed installer modules forwarded unrelated owners. Group installation, first-work observations, runtime wiring, tool events, transport, WSL relay, and server tests by their concrete responsibilities.
Split local and remote installer definitions into their owning modules and migrate consumers and mocks directly. Move the eager server singleton into the body-bearing server class, retire the empty subclass entry, and update fixture anchors, CLI build/package entries, and live CI selectors. Preserve all existing tests, generated hook commands, remote file semantics, and platform behavior.
Validation: 42 selected non-unit checks passed, including Node/web/CLI types, formatting, lint, and quality gates. All agent-hook tests plus affected mock/caller/CLI/build-selector suites passed: 136 files / 794 tests, with 4 files / 45 tests skipped. CLI and main bundle builds passed; two independent refactor audits accepted the final tree.
The local automatic unit selection exceeded its argument-length limit and fell back to the full repository suite; that phase was stopped and scoped checks used under the repository's fanout exception. The full hosted PR workflow remains required before merge.