Skip to main content

Module local_docs

Module local_docs 

Source
Expand description

A project’s docs on this Instance alone (lean_ctx_doc::local): the store of a checkout that no vault is linked to. Keyed like knowledge (<data dir>/docs/<hash_project_root>), so the CLI, the MCP tool and Cloud Desktop find the same pages. Nothing here contacts Cloud.

A linked checkout keeps reading its vault; pages and mark_shared let the link bring local pages into the vault once.

Structs§

LocalPage
A local page, for a link that brings pages into the vault.
SharedTo
Where a local page went when the checkout was linked.

Functions§

is_linked
Whether root is linked to a vault on this machine (its docs are the vault’s). Opens nothing beyond the Cloud config; creates nothing.
mark_shared
Records that local page local_id now lives in vault as vault_page_id (one journaled revision, action share), so a second link run skips it.
now
RFC 3339 UTC now, whole seconds.
pages
The live local pages of root, by slug.
read
The journal and the pages as of upto (now when None), with the anchors rechecked against the checkout. The recheck is applied to the view only, never stored: a read writes nothing.
shared_of
Where page p was brought on a link, if it was.
store
The store of the project at root; creates nothing until a write.