pi-mono/packages/chord/test/next/examples/53-app/app/principals.ts
Mario Zechner 072e413bf3 feat(chord): Chord v2 slice 13, the app kit
chord/next/app: startApp and startWorker with the fixed app layout, worker kinds,
AppInfo and WorkerInfo; sessions (hashed tokens, rolling cookies, bearer tokens),
the one-time owner link, the owner token file, device pairing; Files per host
with ordered chunked uploads; export and import per address; plugin roots,
installs and applyChanges; optional users, invite and ephemeral login facets.
HTTP: deny by default (public routes and sockets), remoteAddress,
readSignedCookie. Examples 53-55.
2026-11-02 15:13:37 +00:00

8 lines
373 B
TypeScript

// The notes app's principals: its server and workers, the kit's owner, and the users its plugins may sign in.
/** Who someone is in the notes app. */
export type NotesPrincipal =
| { readonly kind: "server" }
| { readonly kind: "owner" }
| { readonly kind: "worker"; readonly project: string }
| { readonly kind: "user"; readonly id: string; readonly name: string };