Repository navigation
Conversation
manifest.Parse, Validate and Load check app.json against app-contract.md's table, including D6's contentLinks. Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Env and Listen: LODGE_ROOT and LODGE_UID, socket activation, or a new socket at /run/lodge/apps/<id>.sock with mode 0660; - the peer check (SO_PEERCRED) before anything is read; - the Lodge-* caller, parsed and checked into the request's context, with SetHeaders for lodge's side; - each path admitting one caller kind, and GET /health without one; - GET /api as a net.Conn of JSON-RPC lines over coder/websocket, so an app plugs in its existing ServeConn. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Binds each session at initialize to Lodge-Token and Lodge-Scope, answers 404 on a mismatch, keeps 8 per token name with least-recently-used eviction, and ends a session idle for an hour. Co-Authored-By: Claude Opus 5.5 <[email protected]>
kittest.Start serves an app on a socket in a temp root; Do, Get, Health and DialAPI talk to it as lodge would; CheckRules checks the contract's socket rules. A test app passes them. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ports The kit is a nested module (kit/go.mod), so make verify, race and cross now run in each module. internal/repocheck fails when a file of kit/ imports tailscale.com or lodge outside kit/. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- connectLodge posts ready and resolves on init, with apiURL, contentURL, route, context, open, openSwitcher, storageKey, on and a history driven by route and navigate; outside a frame it replaces the page with the canonical URL; - the shortcut listener catches the init chord in the capture phase and posts shortcut; - createShell keeps one port per frame: origin and source checks, init on ready, queued navigates, mismatched and unresponsive frames, and resolveOpen for the open message; - every message is checked and copied before use. It ships as TypeScript source, so pnpm can take it as a git dependency in a subdirectory with no build step. It builds and tests in the nsl lodge machine (dev/nsl/provision.sh, make client-check) and in CI. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Frames become lines and lines frames, a closed browser ends reads, binary and oversized frames end the connection, and a passed deadline closes it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
An idle session, and what the app holds for it, stayed while no MCP request came (security review N7). Sessions now also sweeps every Every (a minute by default) until Close. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Oct 19, 2026
Off Linux the peer check (SO_PEERCRED) fails closed, so an app socket could only drop every connection, which apps' tests saw as "connection forcibly closed" on Windows. Now lodgeapp.Env.Listen and Server.Serve return ErrUnsupported there, and kittest.Start and Attach skip their test. Tests guarded by GOOS check both. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
The new pieces of roadmap Phase 1:
kit/(the nested modulegithub.com/frostyard/lodge/kit) andclient/(@frostyard/lodge-client), as app-contract.md and lodge-client.md specify them. The extraction of rpcserver, router and rpctest from the apps is not part of this PR.Draft, not for merging tonight: the apps pin commits on
kit/new, and the gateway's PR stacks on it.kit/
kit/lodgeapp, the app-socket server:LoadEnv:LODGE_ROOT, withLODGE_UIDor the app's own uid in development, and userlodgein production.Env.Listen: socket activation (LISTEN_FDS, andFileDescriptorName=<id>when there are several), or a new/run/lodge/apps/<id>.sockwith mode 0660 (grouplodgein production). A passed socket that is not a Unix socket is refused.Acceptcloses any peer that is not lodge's uid (SO_PEERCRED) before reading from it.Server: each path admits one caller kind. A request with no caller, a malformed or repeated one, the wrong kind, or an unknown path gets 403.GET /healthneeds no caller./apireaches the app as anet.Connof line-delimited JSON-RPC over the WebSocket (coder/websocket, 16 MiB frames, no compression). Apps plug in theServeConnthey already have.Caller,ParseCallerandSetHeaderscover D1's four identity headers,Lodge-Session,Lodge-TokenandLodge-Scope. The percent-encoding is RFC 3986.kit/manifest:Parse,ValidateandLoad(dir)forapp.json, D6'scontentLinksincluded. lodge loads manifests with the same type.kit/mcpsession: wraps any MCP Streamable HTTP handler.kit/kittest: plays lodge's side over a socket in a temp root (Start,Attach,Do,Get,Health,DialAPI). It uses the development build's identity.CheckRulesruns the contract's socket rules, andkit/internal/testapppasses them.makegate now runs in both modules. A newinternal/repocheckrule fails ifkit/importstailscale.comor any lodge package outsidekit/.client/
connectLodge,apiURL,contentURL,route,context,open,openSwitcher,storageKey,onandhistory. It includes the capture-phase shortcut listener. Outside a frame it replaces the page with the app's canonical URL.@frostyard/lodge-client/shell):initin answer toready, with navigates queued until then;resolveOpenfor theopenmessage.github:frostyard/lodge#<sha>&path:client.dev/nsl/provision.shsets up the nsllodgemachine with Node 24.21.0, pinned and checksum-checked, and pnpm 12.10.1 through corepack.make client-checkruns Biome, tsc and Vitest there, and the newclientCI job runs the same.Spec changes, alongside the code
contentLinksmanifest row (D6);/apiframe MAY end with one newline. The kit sends one, because the apps' current frontends split on\n.contentLinksapps. The gateway implements it.Verification
make check,make race crossandmake client-checkall pass (54 Vitest tests).go get github.com/frostyard/lodge/kit@38f7be7works from a scratch module.5ee27a1with&path:client. It typechecks with frostnotes' strict tsconfig and builds with Vite 8.🤖 Generated with Claude Code