feat(federation): complete remote instance federation - #735
Open
huntharo wants to merge 15 commits into
Open
Conversation
huntharo
force-pushed
the
feat/pwragent-instance-federation
branch
12 times, most recently
from
June 18, 2026 17:47
5f8f84d to
9e35163
Compare
huntharo
added a commit
that referenced
this pull request
Jun 22, 2026
…e windows Three dogfood UX fixes for the instance-federation MVP (#735): - Block new-thread creation in a remote window instead of silently creating a LOCAL thread on the client instance. createThread and materializeDirectoryLaunchpad now bail with a clear message when a renderer federation target is active; the launchpad path throws so the composer preserves the typed prompt. - Add RemoteWindowBadge in the sidebar masthead so remote windows are visually distinct from local ones. - Surface peer reachability via a connection-status dot on the badge (connected / pending / offline), polling federation health. Reuses existing theme tokens; the brand-token contract test still passes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
huntharo
added a commit
that referenced
this pull request
Jun 22, 2026
Two follow-up plans for the instance-federation MVP (#735): - Encrypted, identity-bound direct/LAN transport: a Noise_IK channel over the existing WebSocket reusing the pinned instance identity, closing the post-auth cleartext read/inject exposure when not behind Cloudflare. - Messaging -> remote-thread routing: wires the currently-dead federated messaging helpers into a reachable end-to-end path (browse surfacing, bind stamping, bridge routing, remote event delivery) behind a default-off messaging_route capability. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
huntharo
added a commit
that referenced
this pull request
Jul 2, 2026
Federation feature collapsed onto current main as a single linear commit (developed across #735/#872/#892 with interim merge commits). Rebuilt via one 3-way squash of the tested branch tip onto main; the only conflict was an additive preload import list, resolved by keeping both. Includes: - Instance federation MVP: authenticated WebSocket control plane; peer enrollment / identity / policy / store; router + RPC backend bridge; remote window targets; federated search; Settings -> Federation; messaging federated-thread bindings. - Remote-window UX guardrails: block remote-window thread creation (no silent local thread), RemoteWindowBadge with live peer connection status. - Encrypted, mutually-authenticated transport: hand-written Noise_IK on Node's built-in crypto (locked to the official Noise test vectors), per-frame AEAD, gateway static key pinned via the invite, Ed25519 identity proof channel-bound to the handshake hash. Encrypted by construction (no plaintext LAN path). - Plans: encrypted-LAN-transport and messaging-routing follow-ups. Federation ships disabled by default; encrypted when enabled. Verified: shared+desktop typecheck, lint:boundaries, lint:sql, and the federation + merge-sensitive suites (196 tests) green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
huntharo
force-pushed
the
feat/pwragent-instance-federation
branch
from
July 2, 2026 19:21
0b83e3a to
6bd0241
Compare
huntharo
added a commit
that referenced
this pull request
Jul 2, 2026
Federation feature collapsed onto current main as a single linear commit (developed across #735/#872/#892 with interim merge commits). Rebuilt via one 3-way squash of the tested branch tip onto main; the only conflict was an additive preload import list, resolved by keeping both. Includes: - Instance federation MVP: authenticated WebSocket control plane; peer enrollment / identity / policy / store; router + RPC backend bridge; remote window targets; federated search; Settings -> Federation; messaging federated-thread bindings. - Remote-window UX guardrails: block remote-window thread creation (no silent local thread), RemoteWindowBadge with live peer connection status. - Encrypted, mutually-authenticated transport: hand-written Noise_IK on Node's built-in crypto (locked to the official Noise test vectors), per-frame AEAD, gateway static key pinned via the invite, Ed25519 identity proof channel-bound to the handshake hash. Encrypted by construction (no plaintext LAN path). - Plans: encrypted-LAN-transport and messaging-routing follow-ups. Federation ships disabled by default; encrypted when enabled. Verified: shared+desktop typecheck, lint:boundaries, lint:sql, and the federation + merge-sensitive suites (196 tests) green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
huntharo
force-pushed
the
feat/pwragent-instance-federation
branch
from
July 2, 2026 21:59
6bd0241 to
5ebe184
Compare
huntharo
added a commit
that referenced
this pull request
Jul 5, 2026
Federation feature collapsed onto current main as a single linear commit (developed across #735/#872/#892 with interim merge commits). Rebuilt via one 3-way squash of the tested branch tip onto main; the only conflict was an additive preload import list, resolved by keeping both. Includes: - Instance federation MVP: authenticated WebSocket control plane; peer enrollment / identity / policy / store; router + RPC backend bridge; remote window targets; federated search; Settings -> Federation; messaging federated-thread bindings. - Remote-window UX guardrails: block remote-window thread creation (no silent local thread), RemoteWindowBadge with live peer connection status. - Encrypted, mutually-authenticated transport: hand-written Noise_IK on Node's built-in crypto (locked to the official Noise test vectors), per-frame AEAD, gateway static key pinned via the invite, Ed25519 identity proof channel-bound to the handshake hash. Encrypted by construction (no plaintext LAN path). - Plans: encrypted-LAN-transport and messaging-routing follow-ups. Federation ships disabled by default; encrypted when enabled. Verified: shared+desktop typecheck, lint:boundaries, lint:sql, and the federation + merge-sensitive suites (196 tests) green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
huntharo
force-pushed
the
feat/pwragent-instance-federation
branch
3 times, most recently
from
July 7, 2026 02:55
5ba7298 to
5c935a0
Compare
huntharo
force-pushed
the
feat/pwragent-instance-federation
branch
2 times, most recently
from
July 15, 2026 03:52
38027f3 to
ddef291
Compare
huntharo
force-pushed
the
feat/pwragent-instance-federation
branch
from
July 26, 2026 19:30
ddef291 to
bf92519
Compare
huntharo
force-pushed
the
feat/pwragent-instance-federation
branch
from
July 27, 2026 03:40
0f28802 to
911bdec
Compare
huntharo
force-pushed
the
feat/pwragent-instance-federation
branch
from
July 27, 2026 05:39
911bdec to
9c14cbe
Compare
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.
Summary
Completes the U1-U9 instance-federation workflow: gateway and client instances can enroll over the authenticated WebSocket transport, discover every connected federation member, open branded remote windows, operate remote threads with live events, search across instances, and route messaging bindings to remote threads through the gateway relay.
What changed
docs/federation.mdwith local dogfood, Cloudflare Tunnel, Access, mTLS, credential, diagnostics, revocation, and threat-model guidance.Test locally
Build the desktop app, then launch isolated gateway and client profiles:
Use Settings -> Federation on the gateway to generate an invite, import it on the client, then use the connected peer list to open either instance. Detailed direct-local and Cloudflare setup is in
docs/federation.md.Cloudflare provisioning remains an operator-managed deployment step; PwrAgent stores and applies the configured Access/mTLS credentials but does not create tunnels or Access policies.
Validation
pnpm test(388 files, 4,874 tests)pnpm typecheckpnpm lint:eslint(0 errors; repository warning baseline remains)pnpm lint:boundariespnpm lint:codex-storagepnpm lint:colorspnpm lint:sqlpnpm licenses:check