pub struct Config {
pub notebook: Option<String>,
pub create_notebook: bool,
pub require_explicit_nb_dir: bool,
pub allow_top_level_notes: bool,
pub disable_git_signing: bool,
pub gate_timeout: Duration,
}Expand description
Configuration for constructing an NbClient.
Contains only nb-relevant fields. MCP-specific fields
(e.g., show_paths) remain in the server’s config.
Fields§
§notebook: Option<String>Default notebook name (overrides Git-derived fallback).
create_notebook: boolAutomatically create missing notebooks.
require_explicit_nb_dir: boolRefuse the file default when NB_DIR is unset: embedders
that assign the notebook store themselves set this to keep
resolution explicit and never read ~/.nbrc.
With the default false, an unset or empty NB_DIR falls
back to the parsed ~/.nbrc ($NBRC_PATH) value, else
~/.nb. The rc is parsed, never executed: supported
forms are unconditional top-level NB_DIR assignments
(bare and export, last wins, with $NB_DIR self-default
tracking); anything undeterminable without execution warns
and falls back to ~/.nb instead of resolving elsewhere.
Spawned nb subprocesses keep their existing routing
(they inherit the process environment and source the rc
themselves); this flag only governs native resolution.
allow_top_level_notes: boolAllow new notes to be created at notebook root.
disable_git_signing: boolDisable Git commit and tag signing for nb subprocesses.
gate_timeout: DurationMaximum time to wait on the process-shared gate queue.