feat(serve-web, plugin): Make the web UI a chat client - #969
Open
JeanMertz wants to merge 1 commit into
Open
Conversation
The web interface could browse conversations and nothing else. Reading one meant a terminal was still the only place to answer it, which made the UI a viewer rather than a client. It now composes and posts turns, watches them stream, stops them, and starts new conversations. Everything it does goes through the plugin protocol: it holds no credentials, drives no agent loop, and reads no storage directly, so it is a second frontend over the same core rather than a second implementation of it. Two host capabilities come with it. `output_format` on `init` tells a plugin how the host renders, so `jp --format json` reaches a plugin's output the way it reaches the host's own commands. `lock` on `events` says whether a turn is running and whether it is this connection's to interrupt, read from the conversation lock rather than the transcript, which cannot tell a running turn from an interrupted one. A lock whose recorded holder is no longer alive counts as free, so a killed run does not leave a conversation looking busy forever. Protocol 8, for `lock`. `output_format` defaults to text on an older host and needs no version of its own. This is a spike kept whole rather than split: it was built by using it, and the value in reviewing it is the shape of the thing, not the individual commits. Signed-off-by: Jean Mertz <git@jeanmertz.com>
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.
The web interface could browse conversations and nothing else. Reading one meant a terminal was still the only place to answer it, which made the UI a viewer rather than a client.
It now composes and posts turns, watches them stream, stops them, and starts new conversations. Everything it does goes through the plugin protocol: it holds no credentials, drives no agent loop, and reads no storage directly, so it is a second frontend over the same core rather than a second implementation of it.
Two host capabilities come with it.
output_formatoninittells a plugin how the host renders, sojp --format jsonreaches a plugin's output the way it reaches the host's own commands.lockoneventssays whether a turn is running and whether it is this connection's to interrupt, read from the conversation lock rather than the transcript, which cannot tell a running turn from an interrupted one. A lock whose recorded holder is no longer alive counts as free, so a killed run does not leave a conversation looking busy forever.Protocol 8, for
lock.output_formatdefaults to text on an older host and needs no version of its own.This is a spike kept whole rather than split: it was built by using it, and the value in reviewing it is the shape of the thing, not the individual commits.