Floorplans
Interactive architecture maps of each Kehto package: every module and file with a plain name and a one-line description, and how they connect.
Generated at f172455 on 2026-12-03. Descriptions are refreshed weekly, so they can lag the code by a few days.
- @kehto/acl 12/12 files described
Kehto's access-control core: a pure TypeScript library that records which napplets (sandboxed iframe apps) may use which capabilities, and works out which capability each NAP protocol message needs. State in, state out, with no outside dependencies, so the host shell and runtime can ask it the same questions every time.
- @kehto/cli 3/3 files described
The `kehto` command-line tool. Today it has one command, `kehto paja`, which hands everything to the Paja local workshop for building and trying out napplets (sandboxed iframe apps).
- @kehto/firewall 8/10 files described
Pure approval policy for napplets (sandboxed iframe apps): it records what a person approved for each verified napplet (which NAP interfaces, resources and network addresses), decides whether a new request is covered, and stores allow/ask/deny rules. It counts nothing over time; rate limits live in a separate package.
- @kehto/mocks 115/117 files described
Pretend versions of every napplet NAP domain (relays, files, devices, AI, downloads and more) that keep all their data in memory and behave the same way every run. A shell that hosts napplets (small sandboxed web apps) can plug them in to get realistic answers while it builds support for a NAP, without real relays, devices or providers. Each pretend service records the exact napplet/naps spec version it follows, and a script reports when the spec has moved on.
- @kehto/nip 26/26 files described
A TypeScript library of Nostr NIP helpers that nostr-tools does not ship, each at its own import path (@kehto/nip/5d, /65, ...). Its centrepiece checks and loads a napplet (a small sandboxed web app published on Nostr) from its signed manifest event; the rest parse relay lists, relay-discovery reports, lists/sets and app-handler announcements.
- @kehto/paja 159/198 files described
Paja is Kehto's local workshop for building napplets (small sandboxed web apps that talk to a host over the NIP-5D protocol). A command-line dev server serves a host page; in the browser that page loads a napplet into a locked-down iframe and wires it to the real Kehto runtime, shell, firewall and reference services so the napplet behaves as it would in a production host.
- @kehto/rate-limit 15/15 files described
Optional caps on how often a napplet (sandboxed iframe app) may act: a steady per-minute budget plus a startup burst limit, tighter for background napplets. Nothing is limited unless the host builds a limiter and passes it in. An older, retained policy model sits under its own legacy entry for hosts still migrating.
- @kehto/runtime 64/75 files described
The protocol engine a napplet host runs: every message a napplet (a small app sandboxed in an iframe) sends arrives here, is checked against what that napplet is allowed to do, is handed to the right NAP domain (relay, storage, inc, identity and so on) or to a host service, and gets its reply sent back. It touches no browser APIs; the host plugs in relays, a signer, storage and approval screens.
- @kehto/services 116/151 files described
Ready-made back ends for the napplet protocol. Napplets are small sandboxed web apps that run inside a host shell; each NAP domain (notifications, relays, keys, media, uploads, AI chat and so on) is a set of messages they can send. This package answers those messages on the shell's side: a host registers each service with the Kehto runtime, and the runtime routes messages to it by domain name.
- @kehto/shell 61/72 files described
The browser side of the Kehto runtime, written in TypeScript. A host web page uses it to load napplets (small sandboxed web apps published on Nostr) into locked-down iframes, talk to each one over its own private message channel, ask the user before granting sensitive permissions, and pass approved requests to @kehto/runtime, which does the protocol work.
- @kehto/wm 1/1 files described
A draft window-manager contract for shells that host napplets (sandboxed iframe apps): shared shapes for windows and their screen positions, a slot for a layout strategy the shell writes itself, and a small service that keeps a window list and focus. The service never runs the strategy; shells call it themselves. Not part of the napplet protocol.