waratah_notebook/lib.rs
1//! Jupyter notebook service: sidecar supervision and the `/jupyter` proxy.
2//!
3//! `waratah start --with-notebooks` (or `enabled = true` in
4//! `{config-dir}/notebooks.toml`) spawns one jupyter-server sidecar per compute process —
5//! an in-process-managed child in its own process group, so its kernel
6//! children die with it. [`proxy::router`] reverse-proxies `/jupyter/*` to
7//! the sidecar, including RFC 6455 WebSocket upgrade tunnels for kernel
8//! channels. Kernels reach the co-located compute over loopback HTTP like
9//! any other client (`WARATAH_URL` / `WARATAH_REPO` env); they get no
10//! special internal access.
11//!
12//! Security is a v1 stub: loopback bind + a startup-minted jupyter token,
13//! single user, no sandboxing. The auth iteration replaces it (see
14//! ARCH.md §9 notebooks sidecar).
15
16#![deny(unused_must_use)]
17#![warn(missing_docs)]
18
19pub mod jupyter_config;
20pub mod kernelspec;
21pub mod options;
22pub mod proxy;
23pub mod python_env;
24pub mod state;
25pub mod supervisor;
26pub mod token;
27
28mod error;
29
30pub use error::NotebookError;
31pub use options::{JUPYTER_PATH, NotebookCli, NotebookDefaults, NotebookOptions, NotebooksToml};
32pub use state::NotebookState;
33pub use supervisor::SupervisorHandle;