Skip to main content

Module web

Module web 

Source
Expand description

innate web — local read + governance web UI for the knowledge base.

Design: the fifth access module (alongside MCP / CLI / SDK / Daemon). Unlike the daemon (§九), this module DOES hold a live read-write KnowledgeBase, because governance actions (approve/archive/invalidate/restore) mutate. It is therefore security-sensitive: bound to localhost by default and gated by a one-time token for every mutating endpoint.

Synchronous stack only (tiny_http + the std accept loop) to match the rest of the core; no async runtime is introduced.

Functions§

is_loopback
Whether a bind address is loopback-only (the trusted single-user case). Used to decide both whether --allow-remote is required and whether read endpoints must also present the auth token (they must, when non-loopback).
serve
Start the web server and block on the accept loop until the process is killed.