Skip to content

docs: plan M4 as notes inside lodge (ADR-0026, plan 0006) - #44

Merged
bketelsen merged 5 commits into
mainfrom
m4/plan
Oct 19, 2026
Merged

bketelsen merged 5 commits into
mainfrom
m4/plan

Conversation

@bketelsen

Copy link
Copy Markdown
Contributor

Plans M4 as notes inside lodge. These are docs only; no code or task cards yet.

M4 was first planned with notesd as its own web server: a tailnet node, sign-in, sessions, the web build and /mcp. It now runs as an app behind lodge, the shell that owns those pieces for every frostyard app (core ADR-0057). The first draft's tailnet, sign-in, token, web-build and PWA decisions moved to lodge's ADRs 0004–0008, with an independent review's fixes folded in.

Added

  • ADR-0026, notesd runs as a lodge app (Proposed). It covers what stays with notes: the caller kinds now come from Lodge-* headers, plus per-method callers, attribution, /api, blobs and device routes.
  • specs/lodge-app.md, what notesd serves on its lodge socket:
    • /health;
    • /api, where callers come from headers;
    • blobs on lodge's content origin;
    • /mcp, where the token's vault=<id>[;write] scope is enforced by the engine;
    • /device/… for sync, pairing and relocation.
  • Plan 0006, seven phases mapped onto lodge's roadmap. Nothing changes on the user's machines before 2026-10-26.

Changed

  • ADR-0031 became ADR-0027 (phone layout).
  • design/hub.md: the hub behind lodge.
  • overview.md, app.md: the lodge-client handshake, then connectApi().
  • sync.md: relocation through a URL the hub records, with an HMAC proof bound to that URL.
  • rpc-protocol.md, mcp.md, ui.md, and the roadmap's M4 row.
  • Accepted ADRs 0004, 0012 and 0016 gain a "Followed by" line.

Removed: the first draft's ADRs 0026–0030, specs/hub-http.md and the earlier plan 0006.

make check passes. The link and anchor check finds nothing new, and every link into lodge and core resolves. The repo names none of the user's hosts.

🤖 Generated with Claude Code

bketelsen and others added 5 commits October 18, 2026 21:25
The user's three decisions of 2026-10-18 as proposed ADRs: the hub stays
on the tailnet as a node of its own (tsnet), browsers sign in by their
tailnet identity with no credential in the browser, and remote MCP
serves Claude Code and local agents with tokens scoped to a vault and to
read or write. Three more for the web app: the hub serves the build from
a directory, the app installs on a home screen without a service worker,
and a narrow window takes Obsidian's phone layout.

design/hub.md and specs/hub-http.md describe and pin the hub's routes,
checks, headers, sessions and tokens; rpc-protocol.md gains the session
and agent callers and method-level callers; mcp.md the hub's endpoint;
ui.md the browser and narrow windows; app.md the web app. Plan 0006
orders the work in eight phases, and the roadmap's M4 row, top risk 3
and open questions follow.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
lodge, frostyard's tailnet-only web shell, now owns the hub's network
side: the tailnet node, browser sign-in, MCP tokens, serving the web
build and the home-screen page. The drafts of ADRs 0026 to 0030 move to
lodge as its ADRs 0004 to 0008, and are replaced here by one ADR:
notesd runs as a lodge app.

The new ADR-0026 has notesd serve lodge's app socket as the system user
frostnotes, take its callers from Lodge-* headers, and keep its own
rights: method-level callers, a writes mark, an agent scope the engine
enforces, attribution by connection, the device routes under /device/,
and relocation that a relay cannot reuse. ADR-0031 (the phone layout)
becomes ADR-0027. specs/hub-http.md becomes specs/lodge-app.md, and
plan 0006 becomes "notes inside lodge", after lodge's roadmap phases 1
and 2.

Fixes the review's notes findings: relocation bound to the hub's URL
(5), no tailnet change before the last phase (8), PDFs with a download
fallback (12), consistency (14), back-links from ADRs 0004, 0012 and
0016 (15), and the privacy claim scoped to M4's docs (16).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The open question is answered: the CIFS mount's uid= and gid= give the
frostnotes user the files with no change on the file server. Phase 7
sets them, moves the data directory whole to local disk, and checks
that a write as frostnotes reaches the share before any device moves.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The app calls lodge-client's connectLodge(), which posts ready and
resolves on the shell's init; only then does notes open its WebSocket.
Notes' transport in rpc/transport/ws.ts is connectApi(), so it no
longer shares connectLodge()'s name.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@bketelsen
bketelsen merged commit 68a0b35 into main Oct 19, 2026
4 checks passed
@frostyard-machines
frostyard-machines deleted the m4/plan branch October 26, 2026 00:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant