Skip to content

feat(serve-web, plugin): Make the web UI a chat client - #969

Open
JeanMertz wants to merge 1 commit into
plugin-refresh-indexfrom
web-ui2
Open

feat(serve-web, plugin): Make the web UI a chat client#969
JeanMertz wants to merge 1 commit into
plugin-refresh-indexfrom
web-ui2

Conversation

@JeanMertz

Copy link
Copy Markdown
Collaborator

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.

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>
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