feat(opencode): add compact connected ruv gateway - #152
Merged
Conversation
The per-request timer starts before the spawned MCP child finishes booting, so the 80ms budget also had to absorb a node process cold start — routinely exceeded on Windows CI runners (observed on windows-latest/node 22: the recovery search timed out and JSON.parse hit 'RUFLO_SEARCH_FAILED...'). A 2000ms budget keeps every phase deterministic: the hang phase still times out (the fake server never answers the first initialize) and the recovery phase now has spawn headroom.
robertelee78
force-pushed
the
feat/opencode-awesome
branch
from
August 16, 2026 20:27
bfe15c8 to
cad636e
Compare
… with the ADR-0031 lifecycle generalization main's graduation work (ADR-0031 P3) replaced the opencode-shaped setup/sync lifecycle loops with a shape-agnostic renderer (hostsWithLifecycle() + renderApplyReport/printReportLine); this PR added a new opencode apply surface, the compact lazy gateway (stack.gateway). Reconciled by keeping the generalized loop + renderer and teaching lifecycle-render.mjs's renderOpencodeApply to emit the gateway line, so pacphi#152's feature survives inside main's infrastructure. Standardized the fatal skip-line on plugin/gateway/agents/skill/guidance across both sides' tests. Full check green.
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.
Summary
Make stock OpenCode a first-class Agentic Kit host for the rUv stack without placing the full Ruflo, Agentic QE, skills, and specialist catalogues into every initial model request.
This keeps the managed MCP servers connected while replacing their eager model-facing schemas with a compact, lazy discovery surface:
ak_ruflo_search/ak_ruflo_callak_aqe_search/ak_aqe_callak_skill_search/ak_skill_loadak_agent_search/ak_agent_loadak-specialistdispatcher for the converted specialist catalogueWhy
Stock OpenCode eagerly projects MCP schemas, skills, and subagent descriptions into the request. With the full Agentic Kit stack this creates a large initial-prefill tax before useful work begins.
Measured on the acceptance fixture:
That is about a 91% reduction in the initial serialized request while preserving on-demand access to the managed capabilities.
Product boundaries
Safety and lifecycle
ask/denybehavior is enforced for both gateway calls and underlying operations.Validation
pnpm check— PASSmainmemory_searchcontinuation successfully with prefix-cache reuseReview notes
The implementation deliberately keeps user agents native and limits lazy specialist projection to Agentic Kit-owned profiles. The specialist catalogue is embedded into the receipt-owned gateway bytes so user-scannable directories are not treated as trusted catalog input.