Skip to content

feat(opencode): add read-only diagnostics and intentional commit controls - #7910

Open
oliver-mee wants to merge 4 commits into
volcengine:mainfrom
oliver-mee:feat/opencode-v2-controls
Open

oliver-mee wants to merge 4 commits into
volcengine:mainfrom
oliver-mee:feat/opencode-v2-controls

Conversation

@oliver-mee

@oliver-mee oliver-mee commented Nov 18, 2026 •

Copy link
Copy Markdown

Description

When memory is missing from an OpenCode session, checking the OpenViking server only tells you whether the server responds. To see which plugin, MCP server and skills OpenCode actually loaded, users have to inspect OpenCode separately. This PR puts both checks behind a native v2 plugin API so the client can report the connection and the host's runtime inventory together.

The same interface lets a client ask OpenViking to commit the current session. It verifies that the session belongs to the current OpenCode location, captures eligible recent turns, then requests a commit. The response tells the client whether the server accepted it. Memory extraction runs separately.

Human Involvement

  • A human participated in the implementation or review loop
  • This PR was generated entirely by AI agents without human participation in the loop

Related Issue

Part of #5494.

Type of Change

  • New feature (non-breaking change that adds functionality)

Changes Made

  • Add read-only status and Doctor RPCs in lib/v2-controls.mjs. Report native plugin, MCP and skill inventory, capture state and authenticated server probes. Provide a standalone Doctor for connection and local-state checks.
  • Match the OpenViking installation by its native identity or exact package name, so another plugin's parent directory cannot inflate the count.
  • Check session ownership and capture settings before a manual commit. Wait for the current capture to finish before sending the commit request, and stop further writes on cancellation.

Testing

The OpenCode suite passed 68 tests on macOS with Node 24. The diagnostics checks include an unrelated plugin installed beneath a directory containing the word OpenViking. A packed OpenCode 2.3.0 loopback test exercised authenticated Doctor, read-only status, commit acceptance and rejection of an invalid session. Syntax, sync and version checks passed.

Checklist

  • My code follows the project's coding style
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

Screenshots (if applicable)

Not applicable.

Additional Notes

The broader shared suite passed 643 of 644 tests. The DSH Desktop launcher assertion also fails on upstream main. The native fixture verifies the commit acknowledgement.


Developed with AI agents, with a human in the loop. Model: GPT-6.2 Sol.

@oliver-mee
oliver-mee marked this pull request as ready for review November 18, 2026 06:27

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant