feat(federation): add dogfoodable instance federation MVP#735
Open
huntharo wants to merge 13 commits into
Open
feat(federation): add dogfoodable instance federation MVP#735huntharo wants to merge 13 commits into
huntharo wants to merge 13 commits into
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
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
This makes instance federation dogfoodable: a gateway PwrAgent profile can run a local federation gateway, a client profile can enroll/connect over the authenticated WebSocket transport, and any connected instance can open a remote window for the gateway or another connected client through the federation relay.
What changed
startTurn, and live transcript events.MVP test notes
This is intended to be testable with two local profiles after building the desktop app:
Known MVP limits:
Tests
pnpm test packages/shared/src/contracts/__tests__/federation.test.ts packages/shared/src/contracts/__tests__/settings.test.ts apps/desktop/src/main/__tests__/desktop-config-federation.test.ts apps/desktop/src/main/__tests__/desktop-settings-service.test.ts apps/desktop/src/main/__tests__/federation-store.test.ts apps/desktop/src/main/__tests__/federation-identity.test.ts apps/desktop/src/main/__tests__/federation-enrollment.test.ts apps/desktop/src/main/__tests__/federation-policy.test.ts apps/desktop/src/main/__tests__/federation-transport.test.ts apps/desktop/src/main/__tests__/federation-router.test.ts apps/desktop/src/main/__tests__/federation-backend-bridge.test.ts apps/desktop/src/main/__tests__/federation-window-bootstrap.test.ts apps/desktop/src/main/__tests__/federated-search-service.test.ts apps/desktop/src/main/__tests__/federation-health.test.ts apps/desktop/src/main/__tests__/federation-runtime.test.ts apps/desktop/src/renderer/src/features/settings/__tests__/FederationSettings.test.tsx pnpm --filter @pwragent/desktop typecheck pnpm --filter @pwragent/shared typecheck pnpm lint:boundaries pnpm lint:sql