Skip to content
This repository was archived by the owner on Nov 19, 2026. It is now read-only.

feat: voice and files plug-ins, and http routes in the TypeScript SDK - #4

Merged
rivetphilbot merged 3 commits into
mainfrom
feat/files-plugin
Oct 31, 2026
Merged

rivetphilbot merged 3 commits into
mainfrom
feat/files-plugin

Conversation

@rivetphilbot

Copy link
Copy Markdown
Collaborator

Moves voice and files out of rh core into plug-ins.

  • SDK: the TypeScript SDK serves a plug-in's http/ routes as web Requests and streams the Responses back.
  • voice: /api/plugins/voice/http/{transcribe,speak}. It has the same bodies, limits and errors as rh's /api/voice, which stays, marked deprecated, until the web composer moves. Under Landlock, TTS and STT results and latency matched /api/voice.
  • files: serves the web Files page and the workflow editor through /api/plugins/files/http/..., with host.files.read/write. List, upload, save, rename, delete and refusals were proven through rh's proxy under Landlock.

Rollout order: install and enable the files plug-in, with its root setting, on each node before the rivetOS web release that calls it. rh's /api/files stays until installed Electron and Android builds have moved to /api/updates.

Known limits: through the plug-in proxy, an upload slower than 60 s fails, and opened files carry a sandbox policy, so a PDF may not render inline.

…tream the Responses back

A plug-in lists handlers under `http`; serve() hands each /http/<name>/… call to its handler with the body unread and streams the Response it returns. When the handler answers before reading the whole body, the answer closes the connection so rh does not reuse a socket that still holds unread bytes.
plugins/voice answers POST http/transcribe (raw audio to the transcription server, {text} back) and POST http/speak ({input, instructions?, voice?} to the speech server, audio streamed back) with the limits, errors and answers of rh's /api/voice, so a client moves by changing the path. The servers and default instructions are settings; it asks for host.network to reach them.
…itor

plugins/files answers http/list, http/download, http/upload, http/mkdir, http/rename and http/delete with the queries, bodies, limits and errors of rh's /api/files routes, so RivetHub web moves by changing the path. It works under the folder its root setting names and asks for host.files.read and host.files.write: every path is walked one segment at a time, a link is followed only while it resolves inside the root, rename and delete act on a link itself, and a download never opens through a link.
@rivetphilbot
rivetphilbot merged commit 819f9f0 into main Oct 31, 2026
2 checks passed
@rivetphilbot
rivetphilbot deleted the feat/files-plugin branch October 31, 2026 19:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants