1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
//! An async Rust client for a local Gemini Notebook (NotebookLM) server.
//!
//! Google ships no public API for the consumer product, and the part that
//! cannot live in a crate is the Google session: the login is bound to the
//! machine it was made on, the session expires server-side while local cookies
//! still look valid, and the browser driving it has to stay patched against
//! detection. So this crate does not own a browser. It talks to a process that
//! does — `npx -y @roomi-fields/notebooklm-mcp`, listening on loopback — and
//! gives you its API with types instead of `serde_json::Value`.
//!
//! ```no_run
//! use notebooklm::{AskRequest, Client};
//!
//! # async fn run() -> notebooklm::Result<()> {
//! let client = Client::new("http://127.0.0.1:3000")?;
//!
//! let health = client.health().await?;
//! if !health.authenticated {
//! // One setup command, once per machine.
//! return Ok(());
//! }
//!
//! let library = client.library().await?;
//! let notebook = &library.notebooks[0];
//!
//! let answer = client
//! .ask(&AskRequest::new(¬ebook.id, "What is this notebook about?"))
//! .await?;
//! println!("{}", answer.answer);
//! for citation in answer.citations() {
//! println!(" [{}] {}", citation.number, citation.source_text);
//! }
//! # Ok(())
//! # }
//! ```
//!
//! # Retrieval costs nothing
//!
//! [`Client::search_passages`] returns the indexed passages matching a query
//! without generating anything, so it spends no generation allowance. When you
//! mean to reason over the evidence yourself, ask for the evidence.
//!
//! # Everything else
//!
//! This crate covers reading and asking. The server exposes 56 operations in
//! all, and [`Client::manual`] returns the UTCP manual describing every one of
//! them — which a [UTCP](https://www.utcp.io/) client can call natively,
//! without any of the types here.
//!
//! # Features
//!
//! - `rustls` (default) / `native-tls` — which TLS stack to use.
//! - `blocking` — a synchronous façade, for programs with no async runtime.
// `doc_markdown` wants product names in backticks. NotebookLM and Gemini
// Notebook are prose, not identifiers, and this documentation is meant to be
// read by people searching for those words.
pub use ;
pub use ;
pub use ;