Skip to content

feat(mcpx): extract shared plugin options and timing into harness-free core (#1861) - #8398

Merged
dezren39 merged 1 commit into
mainfrom
queue/3692-1861-plugin-core-v1-v2-r2
Nov 11, 2026
Merged

dezren39 merged 1 commit into
mainfrom
queue/3692-1861-plugin-core-v1-v2-r2

Conversation

@dezren39

@dezren39 dezren39 commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

What

Continues task 3692 for #1861: the harness-free mcpx plugin core in pkgs/mcpx/plugin/core (created for daemon/ops by #7166) now also holds the shared option resolution and timing helpers both OpenCode adapters consume.

  • plugin/core/options.ts (new): the single Options type, resolveOptions (option > env > default, the v1 way), and the shared helpers (truthy now exported, nameList, binStr). Moved verbatim from v2/options.ts; the settings-guard contract is unchanged (same declared MCPX_* property-access reads, still under plugin/**).
  • plugin/core/timing.ts (new): the timing record shape and in-memory log, moved verbatim from v2/timing.ts.
  • plugin/opencode/v2/options.ts and v2/timing.ts: re-export shims, so every existing v2 import path keeps working unchanged.
  • plugin/opencode/mcpx-session.ts (v1): imports the shared Options type and truthy from core and deletes its local copies. v1 keeps applying its own adapter defaults inline (full env by default, TUNING.bin / TUNING.missCooldownMs fallbacks, headless detection) -- those are adapter decisions, documented as such in core/options.ts.
  • plugin/core/options.test.ts and timing.test.ts (new): oracle-named tests for the resolver contract (precedence, empty-bin forbids spawning, binArgs splitting, disabledTools parsing, truthy spellings) and the timing log (one record per input, sink, error rows first-class).

No generated file contents were edited; no adapter behavior changes: v1/v2 hook registration, env delivery, permission, storage, TUI and tool registration stay in their adapters.

Tests

  • bun test across core + v1 + v2 suites (13 files): 141 pass, 5 skip, 0 fail (skips are the real-daemon tests, same as baseline). Includes the new core suites and the v1 instructions/session-created/ceiling coverage and v2 v2/tools/permission coverage the packet requires.
  • go test ./internal/settings -run TestThePluginReadsNoUndeclaredSetting -count=1 -- pass.
  • go test ./internal/settings -run TestNoUndeclaredEnvRead -count=1 -- pass on current main (the packet's disclosed baseline failure at routes_settings.go:950 no longer reproduces; fixed independently of this PR).
  • Biome findings on mcpx-session.ts are identical to clean main (pre-existing); tsc --noEmit needs bun install (no node_modules in the worktree) -- CI covers it.

Remaining for #1861

This lands the options/timing seams of the extraction. Still open on the issue: shared instruction text unification and the later separate-process adapters (Claude/Codex/Pi/Manus), which #1861 stages behind this extraction.

Queue: task 3692, lane code-p.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@dezren39
dezren39 requested a review from a team as a code owner November 11, 2026 01:35
@coderabbitai

coderabbitai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-11T05:16:28.815826Z 8a6ecc9 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@dezren39
dezren39 force-pushed the queue/3692-1861-plugin-core-v1-v2-r2 branch from 7e30045 to 8a6ecc9 Compare November 11, 2026 05:14
@dezren39
dezren39 merged commit 062bbba into main Nov 11, 2026
2 of 14 checks passed
@dezren39
dezren39 deleted the queue/3692-1861-plugin-core-v1-v2-r2 branch November 11, 2026 05:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant