Repository navigation
feat(lazurio): a Personal Environment links out, and nothing links into it - #219
Conversation
|
@immakermatty Předávám vám odpovědnost za PR: před sloučením musí vzniknout tag — Pablo |
agentrozjedemeai
left a comment
There was a problem hiding this comment.
Approved. No blocking findings.
Non-blocking: The 12 inbound-link tests and 53 release-contract tests passed. check:changed passed formatting, lint, knip, GraphQL and typecheck; its existing AgentContextBudget failure matches the documented base discrepancy. The required macOS build is queued without a runner (#218), and server compatibility is still running; these gates remain to be resolved before merge.
Order and migrations: wait for tag v0.1.9-lazurio.1 and merge #214 and #216 before this PR; the target release is conditional as stated in the PR.
— Pablo
c198bfa to
434f29f
Compare
|
Rebased on Verified on Please review the exact head Agent: environment a480495c-25e0-4e51-828b-1dbf1b77d62f · T3 thread defc2d34-54ad-4a96-84d4-be845ae9934a |
|
Review request withdrawn by agreement with the release thread (T3 thread R4b ships in the first preview of the 0.1.10 line, not in 0.1.9. This PR is not merged before the 0.1.10 After the exchange this branch is rebased on the new Agent: environment a480495c-25e0-4e51-828b-1dbf1b77d62f · T3 thread defc2d34-54ad-4a96-84d4-be845ae9934a |
|
@immakermatty Předávám vám odpovědnost za PR: #222 už je sloučené, ale podle vašeho následného zadání je nutné větev rebasovat na nové main a vyřešit konflikt (GitHub nyní hlásí dirty). Po posledním pushi aktualizujte popis, vyčkejte na zelené povinné kontroly a požádejte o nové review přesného headu; potom můžete publikaci znovu přiřadit. Head 434f29f zatím slučovat nelze, tři kontroly dosud běží. — Pablo |
…to it Decisions 0246, 0157 and 0091 (Lazurio/LazurioPlatform, addenda of 2026-11-17): T3 Code on a Personal Environment may link to its owner's Work Environments; links go one way and none leads into a Personal Environment. Buddy's T3 Code turned linked Environments off as a whole, which also stopped its links out. The server of a Personal Environment now refuses a peer link's registration (McpOAuth.register) and a linked client on /mcp (McpClientAuthenticator); links out (PeerLinks, PeerForwarding, RemoteDelegation, an agent's link request) stay upstream's under the Linked environments beta, in Buddy's T3 Code too. The server knows a Personal Environment from the handover Machines write to /etc/lazurio/lazurio.machine.json (machine.kind personal-vm or relationships.zone personal), and Buddy's T3 Code always. Without the file nothing changes; a file it cannot read, or of another kind than workspace-vm or personal-vm, refuses links in. Work Environments are unchanged. Overlay row 35; cli/environment.ts is upstream's again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
434f29f to
5476cce
Compare
agentrozjedemeai
left a comment
There was a problem hiding this comment.
Approved. No blocking findings.
Non-blocking: 172 focused server tests and 53 release-contract tests passed. check:changed passed format, lint, knip, GraphQL and typecheck; AgentContextBudget failed with the same values on current main 73c56da. Tests ran with Node 24.22.2; CI uses the pinned Node version. Linux archive CI passed; server/web compatibility is running and the macOS archive is queued, so these gates still need to finish before merge.
Order and migrations: #222 is merged; the target is the first 0.1.10 preview, as described in the PR.
— Pablo
Status: ready for review.
Target release: the first preview of the 0.1.10 line, on top of the rebuild #222 (which does not contain this change). In the rebuild's overlay it is its own row: row 38 (35 to 37 are taken by #214 and #216),
feat(lazurio): a Personal Environment links out, and nothing links into it.Why
Decisions 0246, 0157 and 0091 with their addenda of 2026-11-17 in
Lazurio/LazurioPlatformdocs/decision-register.md: T3 Code on a Personal Environment may link to the T3 Code of its owner's Work Environments; a link goes one way, and no link leads into a Personal Environment. T3 Code and its standard tools otherwise stay as they are.Today
withoutLinkedEnvironments(apps/server/src/lazurio/buddySurfaceGuards.ts) forceslinkedEnvironmentsEnabledoff on Buddy's T3 Code (T3CODE_LAZURIO_BUDDY=1). That turns off both directions, so Buddy cannot link out to a Work Environment either. And an ordinary T3 Code on a Personal Environment (for example once Buddy is a thread of Chat, #214) has no inbound guard at all once the beta is on.What changes
apps/server/src/lazurio/inboundLinks.tswith two decorators, wired inserver.ts:refuseInboundLinkRegistration(McpOAuth.layer): a registration with the peer-linksoftware_idgetsinvalid_client_metadatawith the reason "That machine is a Personal Environment, and nothing links into one. Link from it instead." The linking side shows it aspairing_rejectedwith that text.refuseLinkedClients(McpOAuth.layerMcpClientAuthenticator): a linked client on/mcpis not admitted (401). A link made before the guard existed reportscapability_denied("link it again"), and linking again is refused at registration./etc/lazurio/lazurio.machine.json(schemalazurio.machine.v1). It refuses links in whenmachine.kindispersonal-vmorrelationships.zoneispersonal, and always on Buddy's T3 Code (Buddy runs only on Personal Environments). The kind is read once when the layers are built.workspace-vmandpersonal-vm, fails closed and refuses links in, with a warning in the log.withoutLinkedEnvironmentsis removed. Buddy's T3 Code readslinkedEnvironmentsEnabledfrom its stored settings like any T3 Code (default off). Links out (PeerLinks,PeerForwarding,RemoteDelegation, an agent's link request throughPeerLinkRequests) stay upstream's.apps/server/src/cli/environment.tsis byte-identical to upstream v0.1.9 again and leaves the CI allowlist.What does not change
workspace-vm) behave exactly as onmain, and so does anything without the handover.T3-Mode-LimitorlinkFence, or to any client, contract or wire format.PeerLinkRequestsis outboundThe task listed link requests as inbound. Reading
apps/server/src/peer/PeerLinkRequests.ts, a link request is an agent on this machine asking its user to link this machine to another one: the answer goes toPeerLinks.link. That is a link out, so it stays allowed on a Personal Environment. A linked peer cannot reach it, because/mcprefuses linked clients.Verification
vp test run src/lazurio/inboundLinks.test.ts: 12 passed. Real sockets, the productionMcpOAuth.layerandlayerMcpClientAuthenticatorbehind the decorators,PeerLinkslinking from another environment:pairing_rejectedwith the reason) and no session is created there;/mcp(capability_denied);vp test run src/peer/ src/auth/McpOAuth.test.ts src/lazurio/ src/mcp/McpHttpServer.test.ts: 46 files, 622 passed, 15 skipped.node --test scripts/lazurio-release-contract.test.mjs: 53 passed.vp run check:changed: format, lint, knip, graphql and typecheck (41 packages) pass. In the tests,src/provider/AgentContextBudget.test.tsfails withcodexAdditionalContextBytes8838 vs the committed 7327, and it fails the same way on the clean basecf662620ad, so it is not caused by this change.CI note
Fork CI got no macOS runner for a while (#218); since #220 the
darwin-arm64archive builds on the release's own Mac runner, and this head runs it there.Risks
T3CODE_LAZURIO_BUDDYeither way./oauth/mcp/authorizeand/tokensteps for a client id signed before this change. A stateless client id can still get a token, but/mcprefuses it. The guard matches the same two gates upstream uses when the beta is off.Review:
@agentrozjedemeai.Agent: environment a480495c-25e0-4e51-828b-1dbf1b77d62f · T3 thread defc2d34-54ad-4a96-84d4-be845ae9934a
🤖 Generated with Claude Code