Skip to content

feat(hub): save files for a run's agent on its machine (OFF-143) - #655

Merged
renyuanz merged 1 commit into
mainfrom
off-143-attachments
Nov 19, 2026
Merged

renyuanz merged 1 commit into
mainfrom
off-143-attachments

Conversation

@renyuanz

Copy link
Copy Markdown
Contributor

offdesk.so's Agents chat lets the person attach pictures, recordings and any file to a message. The hub saves each one on the run's machine and answers with its path, which the message then names. The agent opens it from disk, as it would a file dropped into its terminal.

  • Bridge: new upload_begin, upload_chunk and upload_end commands.
    • They need runs:message, an open run of the bridge's user, and a machine it can reach.
    • Files are up to 100 MB, sent in serial 1 MiB chunks. Uploads count toward the hourly limit, and upload_end is audited with the path and size but never the content.
  • HTTP: the same as POST /api/agent-runs/{id}/files/begin|chunk|end for runs:message tokens.
  • Node side: the hub reuses the node's existing FsUpload* messages and Mkdir, so nodes don't change. Nodes without fs-ops-v1 get a 503 "Update Offdesk…".
  • Where files go: ~/.offdesk/attachments/<run_id>/. Names are cleaned, and a repeated name is kept as a copy (KeepBoth).
  • Docs: docs/agent-bridge-protocol.md.

Tests: cargo test -p offdesk-hub passes. They cover name cleaning, upload ownership, and a bridge test against a fake machine: refusals, folders, chunks, a repeated command id, another bridge, and audit.

🤖 Generated with Claude Code

…ge and the API (OFF-143)

offdesk.so lets the person attach pictures, recordings and any file to a message for
an agent. New bridge commands upload_begin / upload_chunk / upload_end (and
POST /api/agent-runs/{id}/files/begin|chunk|end for runs:message tokens) save a file of
up to 100 MB in ~/.offdesk/attachments/<run> on the run's machine, through the node's
existing file transfer, and answer with its path for the message to name.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@renyuanz
renyuanz merged commit b5cc4df into main Nov 19, 2026
12 checks passed
@renyuanz
renyuanz deleted the off-143-attachments branch November 19, 2026 12:09
@renyuanz renyuanz mentioned this pull request Nov 19, 2026
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