Skip to content

P2P Backplane: create, drive, stream and view threads across all machines and clients - #53

Merged
i2cjak merged 45 commits into
mainfrom
backplane/p2p-agent-backplane
Oct 6, 2026
Merged

i2cjak merged 45 commits into
mainfrom
backplane/p2p-agent-backplane

Conversation

@i2cjak

@i2cjak i2cjak commented Oct 6, 2026

Copy link
Copy Markdown
Owner

P2P Backplane: every one of the owner's machines and every client of any hub act as one system.

  • Create anywhere: new thread, fork, pin, archive and rename in another machine's project from any client; the project picker can add a project on another machine and browse its folders. Requests go to the owning hub over the signed /far/rpc, each with its own nonce, and only to the owner's machines with sync on. The client goes to the new thread once its mirror arrives.
  • Agents across machines: machine_list; thread_list, thread_read, thread_send, thread_wait, thread_interrupt, thread_update and thread_launch on another machine (machine, <link>~<id>, >machine:slug). /give to >machine:slug and %machine:project queues a handoff the same way a local /give does, and says which machines took it. The prompt gains a <machines> line.
  • Live text from other machines: a streamed reply reaches every client of every hub over an ephemeral channel (never in the log or a mirror), ordered by the owner's log so a late delta never shows. A turn's end alerts once across hubs, and a tap opens the thread on the hub that holds it.
  • Viewers elsewhere: Board, Schematic, 3D, Mech, Files, Diff and History for a thread on another machine. The hub the client is on keeps a cache of the owner's files, brought by a long poll and installed under a lock in round order. Reads are read-only, owner-only and confined to the thread's folder; owner-side paths never leave it.
  • A window on another hub: the native window switched to another machine's hub reads copies of its viewer files.
  • Sender ids stay right both ways, ThreadForked and pins are shared, and the projection version is in the epoch, so mirrors pull once after the upgrade.

Reviewed adversarially by GPT-6.1-Sol in three rounds; the findings were fixed or are listed below.

Tests: scripts/check.sh (PROOF: All terms check), scripts/test.sh, and new e2e tests with two real hubs each: create_far, agents_far, live_far, viewers_far, remote_view, remote_view_far, plus far_e2e.

Known limits: a thread that lives elsewhere is given from its own machine; history versions of a mirrored thread aren't read from another machine; sender ids through a third machine aren't translated; catching up a very large mirror re-scans it once per chunk (this predates the PR).

i2cjak added 30 commits October 6, 2026 06:47
…ect add/browse to the owning machine; picker machine row; making state until the mirror lands
…, sync-off machines not chosen or routed, forks shared, bring back routed, picker resets machine listings, projection version in the epoch
… times, one locked install that never rolls a file back, deletions follow the owner, a failed sync is not acknowledged and answers down, phones schedule one ask, nothing opens before the cache folder is known
… and go only to machines with sync on; one prefilter for far requests
i2cjak added 15 commits October 6, 2026 08:00
…llows a remote hub's files into a local cache
…k, a far request answers only once stored, /give elsewhere is a queued handoff (thread_handoff) reported once taken and never also read as a local word, thread_read asks the owner, thread_wait by the clock, machine_list from project changes only
…clears only an older stream, a late delta never shows, a newer one that came first stays), bounded snapshots, truncated buffers go whole, far turn ends alert without touching another hub's Live Activity, a tapped far alert opens on the hub that holds it, island keyed by the owner's id, previews read only when sent
…view's root), checked against this hub's farfs
…nd retried sends stop when sync goes off, a too-big live request is not taken for an idle peer, a history reset drops its live text, models are never deleted by another client's list, snapshots 16K, multiline /give, phones open a far file only once its cache is known
…s own repository and never a hidden file, cache rounds ordered by a ticket taken as their list arrives (a restored older file is installed, a stale round installs nothing), a failed round waits before the next, copy paths never prefixed twice (child sheets), a comparison's working copy read from the copy; bots_test schema text
@i2cjak
i2cjak merged commit 64e09da into main Oct 6, 2026
2 checks passed
Snaiderbg pushed a commit to Snaiderbg/Backplane that referenced this pull request Oct 9, 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