Repository navigation
Conversation
…, and add access checks
This branch has not been deployed
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.
Moves workspace links out of machines into Relay and establishes the Relay authorization and endpoint-binding layer for Iroh P2P transport. A machine now registers once under its UUID with its Ed25519 identity key (which is also its Iroh endpoint id), stores no workspace state, and asks Relay whether an incoming desktop actor may view it.
packages/schemaEndpointId,seedOf,irohEndpointId, andpublicOfEndpointhelpers inpackages/schema/src/jws.ts.MachineIdand reshaped Relay records and endpoints inpackages/schema/src/records.tsandpackages/schema/src/relay.tswith single-word path segments (/v1/machines,/v1/machines/poll,/v1/machines/approve,/v1/machines/:machineId,/v1/machines/heartbeat,/v1/machines/revoke,/v1/machines/check,/v1/workspaces/:workspaceId/machines,/v1/workspaces/:workspaceId/machines/:machineId,/v1/endpoints,/v1/endpoints/:endpointId,/v1/iroh/auth).workspacesfromMachine.StatusandHost.Api'smachine.connect/machine.disconnectin favor ofrelay: { url, leaving?: boolean } | null.infra/relaymachinekeyed byid uuid PRIMARY KEYwith uniquekey_idandendpoint_id, shared-onlylink,device_key,vouch, and identity-signedpairing).--machine-idkey swaps (preserving workspace links and revoking the old key) and refusal of known keys under a different machine id.GET /v1/machinesfor personallocalinventory,DELETE /v1/machines/:machineId, single-requestPOST /v1/machines/heartbeat, transactionalPOST /v1/machines/revoke(settingrevoked_atand deletinglinkrows), shared-onlyGET/POST/DELETE /v1/workspaces/:workspaceId/machines(refusing personallocalworkspaces),POST /v1/endpoints(verifying JWS freshness andsub === caller.accountId, plus bounded per-accountvouch),DELETE /v1/endpoints/:endpointId,POST /v1/machines/check(enforcing workspace membership, shared-only scope, link, anddevice_keybinding, and returningMachineRevokedwhen revoked or replaced), andPOST /v1/iroh/auth(bearer-gated admission callout foriroh-relay).packages/codeworkworkspacesinmachine.jsonandmachine.infowithrelay: { url, leaving?: true }.--machine-id <uuid>and updatedcodework connect,codework disconnect, single-request heartbeats, andmachine.connect/machine.disconnectRPCs, including offlineleaving: truedisconnect retry.apps/contract,apps/server,apps/webMachine.StatusandRelay.Apicontracts so all workspaces compile and stay green ahead of the Iroh transport and member-sync slices.Testing
cd infra/relay && vp test: 11/11 passed (authz.test.ts,connect.test.ts,me.test.ts), covering Ed25519/endpoint helpers, valid member checks, unbound/cross-account/vouched keys,sub !== caller.accountIdreplay, staleiat, personallocallink/scope refusal, root claim refusal, non-member, unlinked machine, member removal, key unbind, unlink,MachineRevokedon revoke and key replacement, rebuilt machine owner vs non-owner approval, known key under different id refusal, deregister deleting links, offlineleavingdisconnect, and/v1/iroh/auth.cd packages/codework && vp test test/door.test.ts: 1/1 passed.cd apps/server && vp test test/link.test.ts test/paired.test.ts test/door.test.ts test/schema.test.ts: 8/8 passed.vp run verify: passed (builds,vp check, package typechecks,knip:check).vp check apps/contract apps/server apps/weband app typechecks: passed with 0 errors.127.0.0.1:8787), and dev RPC server (machine.json) end-to-end.Built with Gemini in Antigravity.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.