Repository navigation
feat: route every open through the plugin's own server RPC - #19
Merged
Merged
Conversation
The open request now originates inside the TUI process. `open()` calls
`context.client.rpc(Media).open(...)`, the server part emits `open`, and the
subscriber in the same process renders it. `/media`, autoplay and an external
caller all take that path; the plugin never shells out.
If the server part is not loaded the call rejects and the local opener runs, so
a TUI-only install keeps working.
Also documents the call's real shape: the body is `{"input": ...}` and the
service authenticates with HTTP Basic, `opencode` plus the password from
service.json.
Verified by driving /media in an isolated instance: the panel opened at 19/48
through the RPC round trip.
|
Beta prerelease published: |
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.
Change
Opening now originates inside the TUI process:
One path for the slash command, autoplay and an external caller. No shell, no CLI, no second process in the plugin's flow.
Fallback: if the server part is not loaded the call rejects and the local opener runs, so a TUI-only install (no
opencode.jsonentry) keeps working.Docs corrected
{"input": ...}, not{"source": ...}.opencode, password fromservice.json, channel port (49374 forlatest).Verification
Isolated instance, local checkout, real keystrokes:
/mediaopened the panel at19/48through the RPC round trip.npm run checkgreen (typecheck, biome, markdownlint, build, 24 tests).