Repository navigation
feat(opencode2): add native core integration with a v1 fallback - #167
Conversation
|
Important Review skippedToo many files! This PR contains 204 files, which is 104 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry. ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: ⛔ Files ignored due to path filters (10)
📒 Files selected for processing (204)
You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Resolve lazy command registration, replace model-fallback assumptions with an explicit local proof provider, cover execution-control contracts across layers, and correct the published entrypoint table. Refs: #167
Observe owned agents after host provider configuration activates instead of asserting against the setup-time snapshot. Bound observation and preserve cleanup on timeout. Refs: #167
Materialize Weave agents through the pinned OpenCode V2 plugin API, add native delegation and plan UI/RPC support, and harden config and prompt processing. Accept fast and delegation concurrency intent without claiming runtime enforcement on the pinned host. Keep V1 and V2 in independent packages. Route the V2 server through the core integration while retaining its public adapter facade, and reconcile build entries, SDK pins, docs, and verification paths. Remove explicit temperature overrides that can cause provider rejection, and align builtin tests with unset sampling defaults. Squashed while rebasing #167 onto main, because the original merge-from-main commit carried the V1/V2 package split and could not be linearized commit by commit: - e049b7c feat(opencode): add the v2 core release integration - 0afbd70 fix(config): leave builtin sampling defaults to providers - d5aa573 docs(prompts): clarify task and review report formats - 237040d docs(release): correct execution control support claims - 3515e4d fix(opencode2): merge main and preserve the v1 fallback Rebase resolutions against #168 and #170: - Renumber the Execution Controls spec from 35 to 36; main landed Spec 35 (Verification Trajectory Evals) first. - Pattern prompt: keep flat tasks with implementation outlines and pitfalls, and add verify-by acceptance criteria and checkbox Verification checks. - Repo Weft prompt: adopt the trace-before-blocking path:line blocker contract. - Regenerate bun.lock, .codesight/, and the Copilot plugin bundle. Refs: #167, #53, #165 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01URSHV7iLPkwVvxXyJcC5K8
Resolve lazy command registration, replace model-fallback assumptions with an explicit local proof provider, cover execution-control contracts across layers, and correct the published entrypoint table. Refs: #167
Observe owned agents after host provider configuration activates instead of asserting against the setup-time snapshot. Bound observation and preserve cleanup on timeout. Refs: #167
Compose the builtin prompt directly so global user overrides cannot change the planning contract under test.
Share Location-bound admission between the native command and TUI RPC. Preserve explicit plan selection, scope checks, and failure reporting.
Backport the shared routing contract without replacing OpenCode variants, validation safeguards, or prompt readers. Migrate category routing, CLI conversion, templates, and affected regression tests so valid project configs register native agents again.
4f22dd8 to
914b3f4
Compare
* docs(changeset): state the 0.2.0 DSL breaking changes accurately #167 rewrote this changeset to say structured triggers and category `patterns` "remain supported" and that `fast false` is accepted. The code does the opposite: object triggers and `patterns` are rejected, every category needs a `description`, templates lose `domains` and trigger objects, and only `fast true` is valid. Every 0.1.x category required `patterns`, so every existing category block breaks on upgrade. Restate the breaking changes and the upgrade path so the 0.2.0 release notes match the behavior. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016wLPimWh3uHKyD8TdSzgC8 * docs(changeset): describe validation and migration limits; drop CategoryMetadata.patterns Address review: weave validate can stop at an object-trigger error before reporting later ones, and weave init migrate drops object triggers and patterns and skips categories without a description rather than converting them. Show the triggers loop inside delegation.targets, and remove patterns from the adapter-boundary CategoryMetadata contract to match packages/engine/src/compose.ts. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016wLPimWh3uHKyD8TdSzgC8 * docs: drop category patterns and template domains from the adapter contracts Address review: adapter-boundary's descriptor bullet and field table, the engine README, Spec 16, and ADR 0001 still described category patterns and delegation-target domains, contradicting the 0.2.0 release note and packages/engine/src/compose.ts. Update the current contracts and mark Spec 16 and ADR 0001 as amended. Say 'no direct replacement' for patterns, since description and triggers now drive routing. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016wLPimWh3uHKyD8TdSzgC8 --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
…ompts (#182) Reverts the prompt half of #170. In real use the loops made Weave slow and left agents running for hours: Tapestry would not finish until every plan Verification check passed and re-delegated on each failure, Shuttle reproduced-then-rechecked broader test suites, and Pattern attached a verify-by command to every criterion that fed both loops. Restores the pre-#170 Pattern, Shuttle, Tapestry, Weft, Warp and Loom prompts (builtin and repo-local .weave overrides) while keeping later changes (#167 plan-structure rules, #179 no-questions rules). The eval cases, trajectory harness and harness fixes from #170 are kept. The Copilot bundle is regenerated. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
…ve adapter (#216) npm has exactly one version of `@weaveio/weave-adapter-opencode2`: 0.1.0, cut at 29393cf. `package.json` has since said 0.1.1 and 0.1.2, but neither was ever tagged, so neither was published. At 29393cf there was no `src/v2/` directory. The published package's exports confirm what it predates — only `.` and `./server`, no `./rpc` and no `./tui`. Unreleased since then: agent materialization in plugin setup (#163), real-CLI verification (#164), the whole native core integration (#167) with its catalog-backed agents, `/weave:start`, plan RPC, TUI, config refresh and native delegation, and #214/#215. Every capability documented in docs/adapters/opencode2-core.md describes code that has never been on npm. A user running `weave init --harness opencode2` gets the bare package name, which resolves to 0.1.0. This bumps the package to 0.2.0-next.0. The `-next.N` suffix publishes to the `next` dist-tag, so `latest` stays on 0.1.0 and no existing install is upgraded; the release is opt-in until it has been used against a real host. Also adds the changeset #215 landed without, and lists the OpenCode 2 adapter in RELEASING.md's tag table. The publish workflow has accepted `opencode2@*` tags since it was written; only the documentation omitted it, which is the likeliest reason this package was never released. No source change. The tag is not pushed here. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Summary
@weaveio/weave-adapter-opencode2package: catalog-backed agents, foreground/background delegation, config refresh, and read-only plan RPC with an optional TUI.@weaveio/weave-adapter-opencodeas the V1 fallback. Its runtime source matches main; stale changelog conflict markers were removed.OpenCode2Adapterfacade while routing its./serverentry through the new core integration.fastandsettings.delegation.max_concurrencyconfiguration intent. Neither setting is enforced at runtime by the V2 adapter.Related issues: #53 and #165. This PR does not claim to resolve every requirement in those issues.
Merge resolution
Merged remote main into this feature branch. Kept main's independent V1/V2 package design, as requested, rather than replacing the V1 package. The execution-controls spec is now Spec 35 to preserve main's Specs 33 and 34. No local-main-only workstream commits are included.
The V2 SDK and runtime proof use the package's existing exact pin,
0.0.0-beta-19151. Build entries, declarations, package wrappers, installer selection, tests, and docs now target the separate V2 package.Verification
1.18.9: default agent, builtins/disable, mode, permissions, composed prompts, commands, user override, and custom agent.0.0.0-beta-19151, including native foreground and background children, model/variant intent, configured skills, tool policy, plan RPC, refresh, collision handling, interruption, and cleanup.Evidence:
docs/artifacts/opencode2-package-merge-proof.md.Limits
The runtime provider is deterministic; this does not prove real-model specialist-selection accuracy. No new interactive TUI proof is claimed for the merged package. The native core integration does not supply durable workflows. Fast service and strict per-parent live-child concurrency remain configuration intent only, not runtime resource or cost controls.