📓 Gemini Notebook by Chryzalide (agy-gemini-notebook-plugin)
Invoke and pilot Gemini Notebooks (Official API v1, NotebookLM & NotebookLM Enterprise) from Google Antigravity 2, VS Code, Cursor, Claude Code, Codex, and the CLI.
In November 2026, Google launched the official Consumer Gemini Notebook API (notebook.googleapis.com/v1) and remote MCP (notebook.googleapis.com/mcp) in Public Preview—currently covering write-only ingestion and basic metadata (no grounded Q&A, no Deep Research, no local file upload via MCP, and no Google Workspace accounts). Gemini Notebook by Chryzalide (agy-gemini-notebook-plugin) bridges that gap under a Tri-Engine Official-First architecture: routing supported CRUD & chunked UploadSource through Google's official APIs first, while adding grounded Q&A, autonomous Fast & Deep Research, Studio Artifacts, local .agents/notebook.json binding, and the Antigravity 2 Sidecar UI.
🎬 Visual Overview & Interactive Demo
📸 View High-Resolution Static Previews (Sidecar Context Panel & CLI Deep Research)
1. Autonomous Deep Research $\rightarrow$ Local Project .md Synthesis (agy-gemini-notebook)
2. Google Antigravity 2 Auxiliary Pane Sidecar UI (sidecar://gemini-notebook/notebook_context_panel/ui.html)
🆚 Official Google Gemini Notebook API vs. Gemini Notebook by Chryzalide
Google's official notebook.googleapis.com Public Preview is a welcome step for basic notebook provisioning, but for coding agents and daily research workflows it remains write-only ingestion: agents cannot query a notebook, search passages, trigger Deep Research, upload local files over MCP, or authenticate with Google Workspace accounts. Since v1.1.0, the plugin adopts an Official-First Tri-Engine design—using Google's official APIs wherever available (and optionally locking out unofficial fallback via NOTEBOOK_STRICT_OFFICIAL_ONLY=1) while delivering the complete IDE & agent experience.
✨ Key Features
- ✨ Engine 1a — Official Consumer Gemini Notebook API (
notebook.googleapis.com/v1):- Uses standard Google Cloud ADC OAuth 2.0 (
gcloud auth application-default loginwithnotebookscope) + automatic 50-minute token caching and transparentHTTP 401retry. - Handles
list,get,create,rename(PATCH),add_source(web,youtube,text), and chunked streaming ResumableUploadSourceup to 200 MiB directly from MCP/CLI (filling the gap in Google's remote MCP).
- Uses standard Google Cloud ADC OAuth 2.0 (
- 🏢 Engine 1b — Official Google Cloud Enterprise API (
v1alphaDiscovery Engine):- 100% official OAuth 2.0 authentication via
gcloud auth loginfor Google Workspace / Enterprise accounts (GCP_PROJECT_NUMBER+roles/discoveryengine.notebooklmUser). - Full CRUD,
batchDelete, IAM sharing, localuploadFile, Drive/YouTube/web ingestion, Audio Overviews, and Enterprise Grounded Q&A (servingConfigs:answer).
- 100% official OAuth 2.0 authentication via
- 💬 Engine 2 — Complementary RPC Bridge (
notebooklm-py):- Automatically restricted only to capabilities missing from the official APIs—grounded Q&A with inline citations, passage search, autonomous Fast & Deep Research, full Studio Artifact lifecycle (
notebook_artifacts: list, workspace-confined downloads, Google Docs/Sheets export, 0-based slide revision, andconfirm=Truedeletion guardrails) plus typedoptionsonnotebook_generate_artifact(Audio, Briefing Docs, Study Guides, Mind Maps, Quizzes, Flashcards, Slide Decks, Data Tables, Infographics, Video), Notes, and consumer delete/share/Drive. - Supports Strict Official-Only Mode (
NOTEBOOK_STRICT_OFFICIAL_ONLY=1) to hard-block all unofficial RPC calls.
- Automatically restricted only to capabilities missing from the official APIs—grounded Q&A with inline citations, passage search, autonomous Fast & Deep Research, full Studio Artifact lifecycle (
- 🎯 Invoke Notebooks by ID, Alias, or Fuzzy Title (
notebook_invoke¬ebook_query):- Attach a default notebook (plus named aliases and
strict_official_onlypreferences) to your repository via.agents/notebook.json. - Invoke any notebook on the fly by ID, workspace alias, or fuzzy title match—with optional one-step grounded Q&A and inline source citations.
- Multi-Notebook Cross-Query (
notebook_ids): Query up to 5 notebooks concurrently (by raw ID or workspace alias, bounded byasyncio.Semaphore(3)with per-notebook error isolation) in a singlenotebook_queryoragy-gemini-notebook query --notebookscall.
- Attach a default notebook (plus named aliases and
- 🗂️ Chat Persona, Transcript Export & Google Drive Freshness (
notebook_chat¬ebook_sync_drive):- Read and configure chat persona/goal (
default,custom,learning_guide) and response length (default,shorter,longer) with partial-update preservation, inspect conversation turns, export Markdown transcripts safely into your repository, and delete conversations safely. - Preview stale Google Drive sources (
apply=False) and selectively or batch-refresh them (apply=True/--apply). - Mandatory
confirm=TrueDestructive Guardrails:notebook_delete,notebook_delete_sources,notebook_artifacts(action="delete"), andnotebook_chat(action="delete_conversation")all require explicitconfirm=True(or--confirmin CLI), returning a safeconfirmation_requiredpreview otherwise.
- Read and configure chat persona/goal (
- 🔬 Autonomous Fast & Deep Research (
notebook_research):- Pilot NotebookLM's Fast Research (
mode="fast"), Deep Research (mode="deep"), and Source Discovery (mode="discover") across the Web or Google Drive, and automatically import verified sources into your notebook.
- Pilot NotebookLM's Fast Research (
- 📝 Documentary Research $\rightarrow$ Local Markdown Synthesis:
- Turn research findings and curated notebook Q&A directly into structured, source-cited
.mddecision records and technical briefs inside your local project workspace.
- Turn research findings and curated notebook Q&A directly into structured, source-cited
- 🔐 Optional OS Keyring Credential Storage & Diagnostic
doctorAudit:- Store Engine 2 browser session cookies in your operating system's native secret store (
NOTEBOOKLM_STORAGE_BACKEND=keyring, optionalkeyringextra: macOS Keychain, Linux SecretService/KWallet, Windows Credential Locker) instead of leaving plaintext JSON files on disk—with concurrency-safe ephemeral0600temp materialization (inside0700dirs) wiped infinallyand one-command migration (agy-gemini-notebook auth-storage migrate-to-keyring/migrate-to-file). - Run
agy-gemini-notebook doctor --human(or JSON output by default) to audit Python/.venv/packages, all three engines (ADC,notebook.googleapis.comenablement,gcloud),0600/0700session file permissions,strict_official_only,.agents/notebook.json, Antigravity 2 plugin symlink, and Sidecar liveness.
- Store Engine 2 browser session cookies in your operating system's native secret store (
- 🖥️ Multi-Environment Ready (Antigravity 2 + VS Code + Cursor + Claude Code + Codex + CLI):
- Antigravity 2 Plugin: Native MCP Server + Skill + Grounding Rule + Auxiliary Pane Sidecar UI (Gemini Notebook by Chryzalide).
- 1-Command Multi-Harness Installer (
setup --target): Non-destructively configure MCP servers and install bundledSKILL.mdacrossantigravity,vscode,cursor,claude,codex, orallin either--scope useror--scope workspace(with--dry-runpreview), whether running from a git checkout or a PyPI/uv toolwheel. - Standalone CLI (
agy-gemini-notebook) &--aiReference: Runagy-gemini-notebook --aifor a concise LLM/agent cheat sheet, or invoke, query, rename, sync files, launch Deep Research, audit withdoctor --human, and manage Studioartifactsfrom any terminal or agent bash tool.
💡 Use Cases & Workflows
1. Documentary Research & Decision Support $\rightarrow$ Local Project .md Files (Primary Workflow)
When your project needs documentary research to support technical, architectural, or product decision-making, the coding agent pilots a complete end-to-end research-to-documentation loop:
flowchart LR
A["1. Decision Need in Project"] --> B["2. Invoke Existing or Create New Gemini Notebook"]
B --> C["3. Run Deep Research or Query Existing Sources"]
C --> D["4. Synthesize Findings with Citations"]
D --> E["5. Write Local .md Files in Repository (docs/research/, docs/adr/)"]
- Open or Create a Notebook: The agent either invokes an existing curated Gemini Notebook (
notebook_invoke(target="...")) or creates a dedicated notebook for the topic (notebook_create(title="...", attach_to_workspace=True)). - Research or Query:
- New Documentary Research: The agent launches
notebook_research(query="...", mode="deep", source="web", import_sources=True)to discover, verify, and ingest external web or Google Drive sources into the notebook. - Existing Corpus Q&A: Or the agent queries documents already curated inside the notebook via
notebook_queryandnotebook_search_sources.
- New Documentary Research: The agent launches
- Generate Local Project Markdown Files: Using the grounded answers, synthesized research report, and source citations returned by the notebook, the agent writes structured
.mdfiles directly inside your local project (e.g.,docs/research/vector-db-benchmark.md,docs/adr/004-auth-architecture.md, comparative matrices, or implementation plans) that are directly tailored to your codebase.
Example Agent Prompt in Antigravity 2 / VS Code:
"We need to choose between WebSockets, SSE, and WebTransport for our real-time notification pipeline. Open our 'System Architecture' Gemini Notebook (or create a new one if needed), run a documentary research comparing latency, proxy compatibility, and scaling trade-offs, query the sources for our constraints, and create
docs/research/realtime-transport-decision.mdin the local project with your cited recommendations."
2. Persistent Domain & Specification Grounding Across Coding Sessions
Bind your project's canonical Gemini Notebook (containing PRDs, API specifications, regulatory PDFs, and design docs) once via .agents/notebook.json. Whenever you ask the agent to implement a feature or verify business rules, it automatically queries notebook_query or notebook_search_sources before writing code—eliminating hallucinations and keeping every answer grounded with explicit [Notebook Title — Source Name] citations.
3. Bi-Directional Knowledge Sync (Local Repo $\leftrightarrow$ Gemini Notebook)
Keep your shared Gemini Notebook synchronized with your repository's latest architecture docs (README.md, AGENTS.md, docs/*.md, PDFs) using notebook_sync_files. What your engineering agent documents locally becomes immediately queryable in NotebookLM by product managers, researchers, and teammates.
4. Automated Briefings, Study Guides & Podcast Audio Overviews
After ingesting technical documentation or completing a Deep Research session, use notebook_generate_artifact (study_guide, briefing_doc, mind_map, quiz, flashcards, slide_deck, data_table, infographic, video with optional style/format options) or notebook_create_audio (deep-dive, brief, critique, debate) to produce executive summaries and onboarding materials. Use notebook_artifacts to download artifacts safely inside your repository (action="download"), export reports/tables to Google Docs or Google Sheets (action="export"), or revise individual slides (action="revise_slide").
🏗️ Tri-Engine Official-First Architecture
flowchart LR
subgraph Harnesses["Agent Harnesses & IDEs"]
AGY["Antigravity 2 (Plugin + Sidecar)"]
VSC["VS Code / Cursor / Claude Code / Codex"]
CLI["agy-gemini-notebook CLI (--ai & setup --target)"]
end
subgraph Server["Gemini Notebook by Chryzalide"]
MCP["FastMCP Server (24 Tools + EngineRouter)"]
end
subgraph E1A["Engine 1a: Official Consumer API (v1)"]
V1["notebook.googleapis.com/v1 & upload/v1 (ADC OAuth2)"]
end
subgraph E1B["Engine 1b: Official GCP Enterprise (v1alpha)"]
REST["discoveryengine.googleapis.com/v1alpha (Workspace / IAM)"]
end
subgraph RPC["Engine 2: Complementary RPC Bridge"]
NLM["notebooklm.google.com (Q&A, Deep Research, Studio)"]
end
AGY --> MCP
VSC --> MCP
CLI --> MCP
MCP -->|"CRUD, Rename, Sources, UploadSource (Personal)"| V1
MCP -->|"Full Enterprise CRUD, Share, Drive, Answer"| REST
MCP -->|"Q&A, Deep Research, Full-Text, Studio, Delete/Share"| NLM
⚖️ Google Terms of Service, OAuth Policy & Tri-Engine Compliance
Because this plugin bridges official Google APIs and complementary web RPC features, it enforces strict credential separation, minimal grey-area surface, and transparent compliance boundaries:
- Zero Gemini CLI / Antigravity OAuth Siphoning:
- This plugin never reads, extracts, or repurposes internal OAuth tokens belonging to Google Antigravity 2, Gemini CLI, or Cloud Code (
cloudcode-pa.googleapis.com).
- This plugin never reads, extracts, or repurposes internal OAuth tokens belonging to Google Antigravity 2, Gemini CLI, or Cloud Code (
- Zero Automated Browser Sign-In on
accounts.google.com:- In accordance with Google Identity's OAuth 2.0 Policy ("Use Secure Browsers"), this plugin never launches a Playwright/Puppeteer/Selenium-controlled browser window on
accounts.google.comand never uses stealth flags such as--disable-blink-features=AutomationControlled.
- In accordance with Google Identity's OAuth 2.0 Policy ("Use Secure Browsers"), this plugin never launches a Playwright/Puppeteer/Selenium-controlled browser window on
- Engine 1a — Official Consumer Gemini Notebook API (
notebook.googleapis.com/v1) — 100% Official (Public Preview):- Uses standard Google Cloud Application Default Credentials (
gcloud auth application-default loginwithnotebookscope) for personal Google Accounts, handling CRUD, rename, standard sources, and chunkedUploadSourcewithout browser cookies.
- Uses standard Google Cloud Application Default Credentials (
- Engine 1b — Official Google Cloud NotebookLM Enterprise (
v1alphaREST API) — 100% Official & Supported:- Uses standard Google Cloud OAuth 2.0 Bearer tokens (
gcloud auth login/gcloud auth print-access-token) for Google Workspace / Enterprise environments (GCP_PROJECT_NUMBER).
- Uses standard Google Cloud OAuth 2.0 Bearer tokens (
- Strict Official-Only Mode (
NOTEBOOK_STRICT_OFFICIAL_ONLY=1):- Set
NOTEBOOK_STRICT_OFFICIAL_ONLY=1(orstrict_official_only: truein.agents/notebook.json) to hard-block Engine 2 completely and restrict execution exclusively to official Google APIs.
- Set
🚀 Installation & Setup Workflow
To make installation and first-time onboarding effortless across Antigravity 2, VS Code, Cursor, and the CLI, Gemini Notebook by Chryzalide ships with a 5-step Setup Workflow (./scripts/setup.sh and agy-gemini-notebook setup).
flowchart LR
S1["1. Clone & Python .venv"] --> S2["2. Cookie Reader Check (rookie-cookies)"]
S2 --> S3["3. Register Plugin in Antigravity 2"]
S3 --> S4["4. Connect Browser Session or gcloud OAuth"]
S4 --> S5["5. Reload IDE & Attach Notebook"]
Option 1: Automated 1-Command Setup (Recommended)
Clone the repository and run ./scripts/setup.sh:
git clone https://github.com/Chryzalide/agy-gemini-notebook-plugin.git
cd agy-gemini-notebook-plugin
./scripts/setup.sh --login
What ./scripts/setup.sh does automatically:
- [Step 1/5] Python Environment & Dependencies: Creates
.venv(viauvorpython3 -m venv) and installsagy-gemini-notebook-plugin[rpc,dev](includingnotebooklm-py[cookies]). - [Step 2/5] Local Browser Session Reader Verification: Verifies
rookie-cookiesso the plugin can import your existing session in ~1 second without downloading a 300 MB Playwright Chromium binary or automatingaccounts.google.com. - [Step 3/5] Antigravity 2 Plugin Registration: Creates
~/.gemini/config/plugins/gemini-notebookand enables Gemini Notebook by Chryzalide via the Antigravity 2 Language Server if running. - [Step 4/5] 1-Second Session Connection:
- Personal / Workspace Google Account (
notebooklm.google.com— Engine 2): Imports your existing authenticated session from Chrome, Brave, Firefox, Edge, Chromium, Vivaldi, Arc, or Safari (--browser-cookies auto). You only need to be logged intohttps://notebooklm.google.com/in your normal browser. - Google Cloud NotebookLM Enterprise (
v1alphaREST — Engine 1): ChecksGCP_PROJECT_NUMBERandgcloud auth login.
- Personal / Workspace Google Account (
- [Step 5/5] Health Verification: Runs
agy-gemini-notebook statusto confirmsetup_ready: true.
Option 1b: PyPI / uv tool Install & Multi-Harness Installer (setup --target)
Install from PyPI (no git clone required) and configure any supported IDE or coding harness in one command:
# Install with uv or pip (includes Engine 2 RPC & OS keyring extras)
uv tool install "agy-gemini-notebook-plugin[all]"
# Or with pip:
pip install "agy-gemini-notebook-plugin[all]"
# Preview non-destructive MCP + SKILL.md installation across harnesses
agy-gemini-notebook setup --target all --scope user --dry-run
# Configure a specific harness globally (--scope user) or per-repository (--scope workspace)
agy-gemini-notebook setup --target vscode --scope workspace
agy-gemini-notebook setup --target cursor --scope user
agy-gemini-notebook setup --target claude --scope user
agy-gemini-notebook setup --target codex --scope user
agy-gemini-notebook setup --target antigravity --scope user
# Print concise LLM/agent command & compliance cheat sheet
agy-gemini-notebook --ai
Option 2: Step-by-Step Manual Setup Checklist
If you prefer to execute each setup action manually:
- Install the Python environment:
uv sync --all-extras
- Register the plugin in Google Antigravity 2:
mkdir -p ~/.gemini/config/plugins ln -s "$(pwd)" ~/.gemini/config/plugins/gemini-notebook
- Authenticate your preferred engine:
- Engine 1a (Official Consumer Gemini Notebook API v1 — Recommended for Personal Google Accounts):
export GCP_PROJECT_ID="your-gcp-project-id" .venv/bin/agy-gemini-notebook login --official-api --project "$GCP_PROJECT_ID" # Optional: disable Engine 2 grey-area fallback completely # export NOTEBOOK_STRICT_OFFICIAL_ONLY=1
- Engine 1b (Official Google Cloud NotebookLM Enterprise —
v1alphaREST API for Workspace):export GCP_PROJECT_NUMBER="123456789012" export GCP_LOCATION="global" # global, us, or eu export GCP_ENDPOINT_LOCATION="global" # global, us, or eu .venv/bin/agy-gemini-notebook login --gcloud
- Engine 2 (Optional Complementary RPC Bridge — Enables Q&A, Deep Research & Studio):
Make sure you are signed in to https://notebooklm.google.com/ in your regular browser, then import the session in 1 second:
.venv/bin/agy-gemini-notebook login --browser-cookies auto # Or specify a browser explicitly: chrome, brave, firefox, edge, chromium, vivaldi, arc, safari
Optional OS Keyring Storage (macOS Keychain / Linux SecretService / Windows Credential Locker):# Install the optional keyring extra, then migrate plaintext storage_state.json into OS keyring uv sync --extra keyring # or: .venv/bin/pip install -e '.[keyring]' .venv/bin/agy-gemini-notebook auth-storage migrate-to-keyring export NOTEBOOKLM_STORAGE_BACKEND=keyring
- Engine 1a (Official Consumer Gemini Notebook API v1 — Recommended for Personal Google Accounts):
- Verify readiness & audit security permissions:
.venv/bin/agy-gemini-notebook doctor --human # Or compact JSON status .venv/bin/agy-gemini-notebook status
- Reload Antigravity 2 and open the Sidecar UI:
- Open
Overview -> Plugins -> Gemini Notebook by Chryzalidein the top-right auxiliary pane menu, or click[Gemini Notebook by Chryzalide](sidecar://gemini-notebook/notebook_context_panel/ui.html)in chat.
- Open
Option 3: In-IDE Agent-Guided or 1-Click Sidecar Setup
Once the plugin is linked and Antigravity 2 (or VS Code / Cursor) is running:
- Via the Sidecar UI (Antigravity 2): Open the Gemini Notebook by Chryzalide panel, choose your browser (
Auto-detect/Chrome/Brave/Firefox/ etc.), and click "🔗 Connect Session from Browser" (or "☁️ Google Cloud Login (gcloud)" for Engine 1). - Via Chat (Antigravity 2 / VS Code / Cursor): Ask the agent:
"Run the Gemini Notebook setup and connect my browser session for this workspace"
The agent will automatically:
- Call
notebook_statusto inspect your environment. - Call
notebook_login(browser_cookies="auto")to import your active browser session in 1 second (or openhttps://notebooklm.google.com/in your system browser if you aren't logged in yet) and display the Dual-Engine compliance notice. - List your notebooks (
notebook_list) or create a new one (notebook_create) and bind it to.agents/notebook.json. - Surface the clickable
[Gemini Notebook by Chryzalide](sidecar://gemini-notebook/notebook_context_panel/ui.html)sidecar pill link.
🔌 Multi-IDE & CLI Usage
VS Code, Cursor, Claude Code & Codex (setup --target)
Run the non-destructive multi-harness installer to configure MCP and SKILL.md automatically (pass --dry-run to preview without writing):
agy-gemini-notebook setup --target vscode --scope workspace
agy-gemini-notebook setup --target cursor --scope user
agy-gemini-notebook setup --target claude --scope user
agy-gemini-notebook setup --target codex --scope user
# Or configure every supported harness at once:
agy-gemini-notebook setup --target all --scope user --dry-run
If you prefer adding the server manually to .vscode/mcp.json (or .cursor/mcp.json), authentication is stored centrally in ~/.notebooklm/storage_state.json (or OS keyring / gcloud), so connecting your session once works simultaneously across Antigravity 2, VS Code, Cursor, Claude Code, Codex, and the CLI:
{
"servers": {
"gemini_notebook_mcp": {
"type": "stdio",
"command": "/path/to/agy-gemini-notebook-plugin/scripts/run_mcp.sh",
"env": {
"AGY_WORKSPACE_DIR": "${workspaceFolder}"
}
}
}
}
Standalone CLI (agy-gemini-notebook)
Use the CLI from any terminal or agent shell tool:
# Print concise LLM/agent command & compliance cheat sheet
agy-gemini-notebook --ai
# Run the guided setup & health check workflow (or target specific harnesses)
agy-gemini-notebook setup --login
agy-gemini-notebook setup --target cursor --scope workspace --dry-run
# Check engine auth, active workspace binding, and compliance notice
agy-gemini-notebook status
# Run full environment, auth, permissions (0600/0700), workspace & Sidecar diagnostics
agy-gemini-notebook doctor --human
# Inspect or migrate Engine 2 session storage between 0600 files and OS keyring
agy-gemini-notebook auth-storage status
agy-gemini-notebook auth-storage migrate-to-keyring
agy-gemini-notebook auth-storage migrate-to-file --keep-keyring
# Authenticate Official Consumer API v1 (ADC with `notebook` scope)
agy-gemini-notebook login --official-api --project your-gcp-project-id
# Optional: import browser session for Engine 2 (Q&A, Deep Research, Studio)
agy-gemini-notebook login --browser-cookies auto
# Or authenticate Official Engine 1b (Enterprise) via Google Cloud SDK
agy-gemini-notebook login --gcloud
# Invoke a notebook by fuzzy title or alias and ask a grounded question
agy-gemini-notebook invoke "System Architecture" -q "What are the latency SLAs?"
# Cross-query up to 5 notebooks concurrently (IDs or workspace aliases)
agy-gemini-notebook query "Compare auth and latency SLAs" --notebooks arch,sec
# Configure chat persona, inspect history, and export Markdown transcript into the workspace
agy-gemini-notebook chat configure --goal custom --response-length shorter --custom-prompt "Answer in concise ADR bullets"
agy-gemini-notebook chat export -o docs/research/chat-transcript.md
# Preview stale Google Drive sources, then refresh them
agy-gemini-notebook sync-drive
agy-gemini-notebook sync-drive --apply
# Destructive CLI commands require explicit --confirm
agy-gemini-notebook delete <notebook_id> --confirm
# Create a notebook and run autonomous Deep Research with source auto-import
agy-gemini-notebook create "WebGPU Compute Patterns" --attach --alias webgpu
agy-gemini-notebook research "WebGPU subgroup operations performance" --mode deep
# Sync local markdown/PDF specs into the active notebook
agy-gemini-notebook sync README.md docs/architecture.md
# List, download into workspace, export to Docs/Sheets, or revise Studio artifacts
agy-gemini-notebook artifacts list
agy-gemini-notebook artifacts download slide_deck docs/architecture-deck.pdf --format pdf
agy-gemini-notebook artifacts export <artifact_id> --export-type docs --title "Architecture Brief"
agy-gemini-notebook artifacts revise-slide <artifact_id> --slide-index 0 --prompt "Use a darker blueprint header"
🛠️ Exposed MCP Tools (gemini_notebook_mcp)
| Category | MCP Tool | Engine | Description |
|---|---|---|---|
| Workspace & Invocation | notebook_status |
Local + Tri-Engine | Show .agents/notebook.json binding, routing_mode, setup_ready, auth status across all 3 engines, and compliance notice |
notebook_login |
Tri-Engine | Authenticate Official API v1 (official_api=True), GCP Enterprise (gcloud=True), or import Engine 2 session (browser_cookies="auto") |
|
notebook_attach |
Local | Attach a default notebook (plus --alias, gcp_project_id, strict_official_only) to the workspace |
|
notebook_invoke |
Tri-Engine | Resolve a notebook by ID, alias, or fuzzy title, inspect sources (v1/v1alpha/rpc), and optionally run a grounded query |
|
| Notebook CRUD & Sharing | notebook_list |
Tri-Engine (1a > 1b > 2) |
List notebooks (v1/notebooks, v1alpha recently viewed, or RPC full list) |
notebook_get |
Tri-Engine (1a > 1b > 2) |
Retrieve notebook metadata and normalized source list | |
notebook_create |
Tri-Engine (1a > 1b > 2) |
Create a new Gemini Notebook (and optionally bind it to the workspace) | |
notebook_delete |
Engine 1b / Engine 2 | Delete one or more notebooks (v1alpha batchDelete or RPC bridge; requires confirm=True) |
|
notebook_rename |
Engine 1a (v1 PATCH) / Engine 2 |
Rename an existing notebook via Official v1 PATCH or RPC bridge |
|
notebook_share |
Engine 1b / Engine 2 | Share a notebook with users (Enterprise IAM) or toggle public link sharing (RPC) | |
| Sources & Code Sync | notebook_sync_files |
Tri-Engine (1a > 1b > 2) |
Upload local workspace files (up to 200 MiB via chunked Resumable UploadSource in v1!) |
notebook_add_source |
Tri-Engine (1a > 1b > 2) |
Ingest a web URL, raw text, YouTube video (v1/v1alpha/rpc), or Google Drive document (1b/2) |
|
notebook_sync_drive |
Engine 2 (RPC) | Preview stale Google Drive sources (apply=False) and refresh stale sources (apply=True) |
|
notebook_delete_sources |
Engine 1b / Engine 2 | Delete specific sources from a notebook (requires confirm=True) |
|
notebook_search_sources |
Engine 2 (RPC) | Keyword/semantic search across sources inside a notebook | |
notebook_get_source_text |
Engine 2 (RPC) | Extract the full indexed plain text of a specific source | |
| Grounded Q&A & Research | notebook_query |
Engine 1b (engine_id) / Engine 2 |
Ask a grounded RAG question against 1 or up to 5 notebooks concurrently (notebook_ids) with inline citations |
notebook_chat |
Engine 2 (RPC) | Manage chat persona/settings (settings, configure), history, workspace-safe Markdown export, and delete_conversation (confirm=True) |
|
notebook_research |
Engine 2 (RPC) | Launch Fast Research (fast), Deep Research (deep), or Source Discovery (discover) on Web or Drive |
|
notebook_research_status |
Engine 2 (RPC) | Poll or cancel an asynchronous research task and auto-import discovered sources | |
| Studio Artifacts & Notes | notebook_create_audio |
Engine 1b / Engine 2 | Generate a podcast Audio Overview |
notebook_generate_artifact |
Engine 2 (RPC) | Generate a Briefing Doc, Study Guide, Mind Map, Quiz, Flashcards, Slide Deck, Data Table, Infographic, or Video (with optional style/format options) |
|
notebook_artifacts |
Engine 2 (RPC) | List Studio artifacts, download safely inside the workspace, export to Google Docs/Sheets, revise_slide, or delete (confirm=True guardrail) |
|
notebook_notes |
Engine 2 (RPC) | List, create, update, or delete persistent notes inside a notebook |
📦 Versioning & Changelog
This project follows strict, transparent versioning. Every version update and change made to the repository must be documented, explained, and recorded in this section of README.md (and kept synchronized across pyproject.toml, plugin.json, and src/agy_gemini_notebook/__init__.py).
v1.5.2 (2026-12-05) — Pin astral-sh/setup-uv@v9.0.0 in GitHub Actions Workflows
- Explicit Semver Tag for
astral-sh/setup-uv(.github/workflows/ci.yml,.github/workflows/release.yml,tests/test_lot4_harness_ai_and_packaging.py):- Why:
astral-sh/setup-uvstopped publishing floating major tags (such as@v8) afterv7and uses explicit semver tags (v8.x/v9.0.0), causing GitHub Actions workflow resolution to fail on@v8. - How: Pinned
astral-sh/setup-uv@v9.0.0acrossci.ymlandrelease.ymland updated workflow regression assertions intests/test_lot4_harness_ai_and_packaging.py.
- Why:
v1.5.1 (2026-12-05) — CI/Release Node.js 24 Upgrade, setup -w Ergonomics & Wheel Smoke Test Fix
- CLI
setup -w/--workspaceErgonomics (src/agy_gemini_notebook/cli.py):- Why: The
-w/--workspaceoption was only accepted before the subcommand (agy-gemini-notebook -w <dir> setup ...), causingagy-gemini-notebook setup --target vscode --scope workspace --dry-run -w <dir>in the release smoke test and intuitive user invocations to fail withunrecognized arguments: -w. - How: Added
-w/--workspacewithdefault=argparse.SUPPRESSto thesetupsubparser while preserving top-level-wprecedence when omitted aftersetup.
- Why: The
- GitHub Actions Node.js 24 & Cache Upgrades (
.github/workflows/ci.yml,.github/workflows/release.yml,tests/test_lot4_harness_ai_and_packaging.py):- Why: GitHub Actions runners deprecated Node.js 20 actions and
setup-uvwarned whenuv.lockwas absent from the repository; additionally,release.ymlfailed onsetup ... -w /tmp/wheel-ws. - How: Upgraded workflows to
actions/checkout@v6,astral-sh/setup-uv@v8(withcache-dependency-glob: "**/pyproject.toml"),actions/upload-artifact@v7, andactions/download-artifact@v8, verified both pre- and post-subcommand-win therelease.ymlwheel smoke test, and added regression assertions intests/test_lot4_harness_ai_and_packaging.py.
- Why: GitHub Actions runners deprecated Node.js 20 actions and
v1.5.0 (2026-12-05) — Multi-Harness Installer (setup --target), CLI --ai & PyPI Release Packaging
- Multi-Harness Installer (
src/agy_gemini_notebook/harness_setup.py,src/agy_gemini_notebook/cli.py):- Why: Teams increasingly switch between Antigravity 2, VS Code, Cursor, Claude Code, and Codex, and manually hand-editing each harness's MCP config (
serversvsmcpServersvs TOML[mcp_servers.*]) and skill directories is error-prone and risks overwriting sibling servers. - How: Implemented
harness_setup.pyand extendedagy-gemini-notebook setupwith--target antigravity|vscode|cursor|claude|codex|all,--scope user|workspace, and--dry-run. Added atomic UTF-8 file writes, non-destructive JSON merging (preserving root keys and sibling servers), stdlibtomllib-validated Codex TOML merging (preserving comments, sibling tables, and[mcp_servers.gemini_notebook_mcp.env]sub-tables), and wheel-or-checkoutSKILL.mdinstallation while keeping the MCP server surface unchanged at24tools.
- Why: Teams increasingly switch between Antigravity 2, VS Code, Cursor, Claude Code, and Codex, and manually hand-editing each harness's MCP config (
- Token-Efficient Agent Cheat Sheet (
agy-gemini-notebook --ai,agy-gemini-notebook --version):- Why: Coding agents invoking the CLI via bash needed a compact, self-contained reference covering Tri-Engine Official-First routing,
--confirmdestructive guardrails, workspace path containment, and all CLI subcommands without loading the fullREADME.md. - How: Added
format_ai_reference()and top-level--ai/--versionflags insrc/agy_gemini_notebook/cli.py, keeping the generated Markdown reference concise and immediately actionable.
- Why: Coding agents invoking the CLI via bash needed a compact, self-contained reference covering Tri-Engine Official-First routing,
- PyPI Packaging & GitHub Actions CI / OIDC Trusted Publishing (
pyproject.toml,.github/workflows/ci.yml,.github/workflows/release.yml,tests/test_lot4_harness_ai_and_packaging.py):- Why: Users should be able to install the plugin cleanly via
pip install agy-gemini-notebook-plugin[all]oruv tool install agy-gemini-notebook-plugin[all]without cloning the repository, with automated CI verification and zero-secret PyPI publishing. - How: Enriched
pyproject.tomlwith PyPI classifiers, project URLs, theallextra (rpc+keyring),[tool.hatch.build.targets.wheel.force-include]bundlingSKILL.mdandAGENTS.mdunderagy_gemini_notebook/_assets/, and explicitsdistexclusions (.agents,.notebooklm-auth,storage_state.json,server_info.json). Added.github/workflows/ci.yml(Python3.11/3.12/3.13Ruff + Pytest matrix and wheel/sdist content audit) and.github/workflows/release.yml(tag parity check, isolated wheel smoke test for--aiandsetup --dry-run, and PyPI OIDC Trusted Publishing viapypa/gh-action-pypi-publish@release/v1), backed by dedicated tests intests/test_lot4_harness_ai_and_packaging.py.
- Why: Users should be able to install the plugin cleanly via
v1.4.0 (2026-12-04) — Optional OS Keyring Storage & Diagnostic doctor Command
- Optional OS Keyring Credential Storage (
pyproject.toml,src/agy_gemini_notebook/auth_store.py,src/agy_gemini_notebook/config.py):- Why: By default, Engine 2 (
rpc_bridge) stores importednotebooklm.google.comsession cookies in0600storage_state.jsonfiles on disk. Security-conscious developers and shared-machine users requested native OS secret-store integration (macOS Keychain, Linux SecretService/KWallet, Windows Credential Locker) without bloating core dependencies for headless/CI environments. - How: Added optional
keyring>=25.0.0extra inpyproject.tomland implementedsrc/agy_gemini_notebook/auth_store.pysupportingNOTEBOOKLM_STORAGE_BACKEND=file|keyring(service="agy-gemini-notebook",username="profile:<name>"). Addedvalidate_storage_state_json(), atomic0o600/0o700file writes, POSIX permission auditing (check_storage_permissions()), secure overwrite-before-unlink cleanup (secure_unlink_file()), and verified read-back before removing plaintext files duringmigrate_to_keyring()/migrate_to_file().
- Why: By default, Engine 2 (
- Concurrency-Safe Ephemeral Keyring Materialization (
src/agy_gemini_notebook/engines/rpc_bridge.py,mcp_server.py,sidecars/notebook_context_panel/server.py):- Why:
notebooklm-py'sNotebookLMClient.from_storage()reads a storage path on__aenter__, while mutating process-wideNOTEBOOKLM_AUTH_JSONorNOTEBOOKLM_HOMEenvironment variables would break concurrent async calls across profiles. - How: Updated
NotebookRpcBridge._open_client()(andlogin()/has_saved_session()) to materialize keyring secrets viaephemeral_storage_file()into an isolated0o600file inside a dedicated0o700temp directory (tempfile.mkdtemp) and wipe + delete both infinallywithout touchingos.environ. Surfacedstorage_backend,keyring_installed,keyring_service, andkeyring_usernameinnotebook_statusand Sidecar/api/statuswhile preserving the compact24-tool MCP footprint.
- Why:
- Diagnostic
doctorAuditor & CLI Commands (src/agy_gemini_notebook/doctor.py,src/agy_gemini_notebook/cli.py,tests/test_lot3_keyring_and_doctor.py):- Why: Troubleshooting Tri-Engine setups (Python/
.venv, Google Cloud ADC scopes,notebook.googleapis.comenablement,gcloud,0600/0700cookie permissions,strict_official_only,.agents/notebook.json, Antigravity 2 symlink, and Sidecarserver_info.jsonliveness) previously required running multiple manual commands. - How: Implemented
src/agy_gemini_notebook/doctor.py(run_doctor,format_doctor_human) and exposedagy-gemini-notebook doctor [--human] [--profile <name>] [--no-gcloud-service-check](exiting1on"unhealthy"with actionableFix:hints and zero secret leakage) alongsideagy-gemini-notebook auth-storage status|migrate-to-keyring|migrate-to-file. Added 11 unit/integration tests intests/test_lot3_keyring_and_doctor.py(61 passedtotal,ruff checkclean).
- Why: Troubleshooting Tri-Engine setups (Python/
v1.3.0 (2026-12-02) — Multi-Notebook Cross-Query, Chat Management, Google Drive Freshness Sync & Destructive Confirm Guardrails
- Multi-Notebook Cross-Query (
src/agy_gemini_notebook/mcp_server.py,src/agy_gemini_notebook/cli.py):- Why: Engineering and architectural questions frequently span multiple project notebooks (e.g.,
architecture,security, andresearchaliases). Querying them sequentially from an agent added latency and round-trips, while adding a separate tool would inflate the MCP context footprint. - How: Extended the existing
notebook_queryMCP tool (0new tools) withnotebook_ids: list[str] | None = None(accepting raw IDs or.agents/notebook.jsonaliases, capped at5notebooks max, deduplicated), running concurrent queries underasyncio.Semaphore(3)with per-notebook error isolation (status="ok"|"partial"|"error"), and added--notebooks a,btoagy-gemini-notebook query.
- Why: Engineering and architectural questions frequently span multiple project notebooks (e.g.,
- Consolidated
notebook_chatTool & CLI (src/agy_gemini_notebook/engines/router.py,rpc_bridge.py,mcp_server.py,cli.py):- Why: Users and coding agents needed to inspect and tune a notebook's persona/response length, review prior conversation turns, export transcripts as local Markdown, and reset server-side conversations without switching to the web UI.
- How: Added
OperationCapability.MANAGE_CHATinrouter.py(blocked underNOTEBOOK_STRICT_OFFICIAL_ONLY=1), implementedget_chat_settings,configure_chat(with read-modify-write partial-update preservation overnotebooklm-py'sChatAPI.configure),get_chat_history,export_chat_markdown(enforcingvalidate_workspace_output_path()before RPC calls), anddelete_chat_conversationinNotebookRpcBridge, exposed via@mcp.tool() notebook_chat(23rdtool) andagy-gemini-notebook chat settings|configure|history|export|delete.
- Google Drive Freshness Check & Resync (
src/agy_gemini_notebook/engines/router.py,rpc_bridge.py,mcp_server.py,cli.py):- Why: Linked Google Docs, Sheets, and Slides inside a notebook go stale as teammates edit them in Google Drive, leading to outdated grounded answers.
- How: Added
OperationCapability.SYNC_DRIVE_SOURCES, implementedsync_drive_sourcesinNotebookRpcBridgewrappingclient.sources.check_freshness()andclient.sources.refresh()(skipping non-Drive sources and only refreshing stale sources whenapply=True), exposed@mcp.tool() notebook_sync_drive(24tools total;apply=Falseread-only preview by default), and addedagy-gemini-notebook sync-drive [--apply] [--source-id ...].
- Mandatory
confirm=TrueGuardrails on All Destructive Operations (mcp_server.py,cli.py,tests/test_lot2_chat_drive_crossquery.py):- Why: Accidental deletion of notebooks or sources by an autonomous agent can cause irreversible data loss; all destructive MCP tools needed consistent confirmation gates.
- How: Enforced
confirm: bool = Falseonnotebook_deleteandnotebook_delete_sources(matchingnotebook_artifacts(action="delete")andnotebook_chat(action="delete_conversation")), returning{"status": "confirmation_required", "targets": [...], ...}whenconfirm=False, addedagy-gemini-notebook delete --confirmanddelete-sources --confirm, and added the Lot 2 test suite intests/test_lot2_chat_drive_crossquery.py(50 passedtotal,ruff checkclean).
v1.2.0 (2026-12-01) — Studio Artifact Lifecycle, Secure Workspace Downloads, Docs/Sheets Export & Slide Revision
- Consolidated
notebook_artifactsMCP Tool & CLI (src/agy_gemini_notebook/mcp_server.py,src/agy_gemini_notebook/cli.py,src/agy_gemini_notebook/engines/rpc_bridge.py,src/agy_gemini_notebook/engines/router.py):- Why: Previously, users and agents could generate Studio artifacts (
report,slide_deck,data_table,infographic,video,audio,quiz,flashcards,mind_map) but could not list existing artifacts, download them locally into the repository, export reports/tables to Google Docs or Google Sheets, revise individual slides, or delete stale artifacts without leaving the IDE. - How: Added five granular capabilities (
LIST_ARTIFACTS,DOWNLOAD_ARTIFACT,EXPORT_ARTIFACT,REVISE_ARTIFACT,DELETE_ARTIFACT) toOperationCapabilityinrouter.py(preservingstrict_official_onlyblocking), implementedlist_artifacts,download_artifact,export_artifact,revise_slide, anddelete_artifactinNotebookRpcBridgewrappingnotebooklm-py'sArtifactsAPI, exposed them through a single context-lightnotebook_artifactsMCP tool (22tools total) with a mandatoryconfirm=Trueguardrail ondelete, and addedagy-gemini-notebook artifacts list|download|export|revise-slide|deleteCLI subcommands.
- Why: Previously, users and agents could generate Studio artifacts (
- Secure Workspace Output Containment (
src/agy_gemini_notebook/config.py):- Why: Allowing an agent to pass arbitrary
output_pathstrings todownload_artifactcreates a path-traversal and sensitive-file overwrite risk (e.g., overwriting.env,.git/config,.agents/notebook.json, or writing outside the repository). - How: Added
validate_workspace_output_path()enforcing strictresolved.is_relative_to(ws_root)containment (including symlink resolution), rejecting directory targets, and blocking protected segments (.env*,.git,.agents,.ssh,.aws,.gnupg,.notebooklm*,storage_state.json,server_info.json,*.cookies.json).
- Why: Allowing an agent to pass arbitrary
- Typed Studio Style & Format
options(rpc_bridge.py,mcp_server.py,cli.py,tests/test_artifacts_lot1.py):- Why & How: Extended
generate_artifact/notebook_generate_artifactandagy-gemini-notebook generate --options '{...}'with validated enum mapping (VideoFormat,VideoStyle,InfographicOrientation,InfographicDetail,InfographicStyle,SlideDeckFormat,SlideDeckLength,QuizQuantity,QuizDifficulty), and added 16 unit/integration tests intests/test_artifacts_lot1.py.
- Why & How: Extended
v1.1.0 (2026-11-30) — Tri-Engine Official-First Architecture (Google Gemini Notebook API v1 Integration)
- Official Consumer Gemini Notebook API
v1Client (src/agy_gemini_notebook/engines/google_notebook_v1.py):- Why: Google's new
https://notebook.googleapis.com/v1Public Preview and remote MCP (https://notebook.googleapis.com/mcp) introduced official OAuth 2.0 support for personal Google Accounts, but Google's remote MCP lacks local file upload (UploadSourceis REST-only), tokens expire every hour, and the API does not yet support Q&A, Deep Research, full-text search, Studio artifacts,delete, orshare. Relying on Engine 2 (rpc_bridge) for CRUD/ingestion when an official API exists created unnecessary Terms of Service exposure. - How: Implemented
GoogleNotebookV1Clientcoveringlist_notebooks,get_notebook(with concurrent paginatedlist_sources),create_notebook,rename_notebook(PATCH),add_source(text_content,web_content, YouTube), and 8 MiB chunked streaming ResumableUploadSourceup to Google's 200 MiB ceiling (enforcingX-Goog-Upload-URLauthority validation, strippingAuthorizationon Step 2, and enforcing workspace containment +.env/secret blocklists). Added a 50-minute ADC token cache (PluginConfig.get_notebook_v1_token) with single automatic refresh-and-retry onHTTP 401, plus clear structured diagnostics for403 WORKSPACE_ACCOUNT_NOT_SUPPORTEDand404onboarding errors.
- Why: Google's new
- Capability-Based Tri-Engine Official-First Router (
src/agy_gemini_notebook/engines/router.py,mcp_server.py,config.py):- Why: Users should automatically use 100% official Google APIs for every supported operation while seamlessly retaining Engine 2 (
rpc_bridge) only for missing capabilities—or locking out Engine 2 completely in compliance-sensitive workflows. - How: Added
EngineRouter(resolve_engine_for_capability,OperationCapability) prioritizing Engine 1b (gcp_enterprise_rest) for Workspace/Enterprise (GCP_PROJECT_NUMBER), Engine 1a (google_notebook_v1) for personal accounts (GCP_PROJECT_ID+ ADC), and restricting Engine 2 (rpc_bridge) strictly to unsupported operations. AddedNOTEBOOK_STRICT_OFFICIAL_ONLY=1/strict_official_only(returningstatus: "official_api_limitation"instead of calling Engine 2), extendedextract_and_validate_resource_id()to accept consumernotebooks/{id}[/sources/{sid}]paths, and upgradednotebook_renamefrom RPC-only to Tri-Engine (v1PATCHfirst).
- Why: Users should automatically use 100% official Google APIs for every supported operation while seamlessly retaining Engine 2 (
- CLI, Sidecar UI & Visual Comparison Assets (
cli.py,scripts/setup.sh,sidecars/notebook_context_panel/,assets/official-api-vs-plugin.png,tests/test_google_notebook_v1.py):- Why & How: Added
--official-api,--project,--no-launch-browser,rename, and--strict-officialto the CLI andsetup.sh; upgraded the Sidecar UI (ui.html&server.py) to display all 3 engines, an "✨ Connect Official v1" button, andv1sourcestate(ACTIVE/PROCESSING/FAILED) normalization; embedded the official API vs. plugin comparison chart (assets/official-api-vs-plugin.png) intoREADME.md; and added dedicated unit/security tests intests/test_google_notebook_v1.py.
- Why & How: Added
v1.0.7 (2026-11-07) — Comprehensive Security Hardening (Cloudflare 6-Phase Security Audit Remediation)
- GCP Discovery Engine URL Authority & Path-Segment Allowlisting (
src/agy_gemini_notebook/config.py,src/agy_gemini_notebook/engines/gcp_enterprise_rest.py,src/agy_gemini_notebook/mcp_server.py):- Why: Previously,
gcp_endpoint_location,gcp_location,gcp_project_number,gcp_engine_id,notebook_id, andsource_idread from.agents/notebook.jsonor tool arguments were interpolated directly intohttps://{endpoint_location}-discoveryengine.googleapis.com/v1alpha/projects/{project_number}/locations/{location}/notebooks/{notebook_id}. A malicious workspace binding settinggcp_endpoint_locationto an attacker domain (attacker.example.com/collect#) could hijack the URL authority and exfiltrate the user'sAuthorization: Bearer <gcloud_token>OAuth 2.0 token (SSRF/ credential exfiltration), while unencoded/or..segments in resource IDs allowed REST path traversal. - How: Added strict allowlist and regex validators (
validate_gcp_endpoint_locationrestricted to{"us", "eu", "global"},validate_gcp_location,validate_gcp_project_number, andextract_and_validate_resource_id+_safe_segmentwithurllib.parse.quote(..., safe="")) enforced both on PydanticWorkspaceNotebookBindingdeserialization and insideGcpNotebookEnterpriseClient. Also stripped CR/LF control characters fromX-Goog-Upload-File-Name.
- Why: Previously,
- Untrusted Workspace Script Execution Prevention (
mcp_config.json,scripts/run_mcp.sh):- Why:
mcp_config.jsonpreviously iterated over"$(pwd)"before"$HOME/.gemini/config/plugins/gemini-notebook", meaning opening an untrusted repository containing a maliciousscripts/run_mcp.shwould execute arbitrary shell commands on MCP server startup. In addition,scripts/run_mcp.shexportedPYTHONPATH="${PLUGIN_DIR}/src:${PYTHONPATH:-}", leaving a trailing colon (:) whenPYTHONPATHwas unset (which Python interprets as adding the current working directory tosys.path). - How: Removed
"$(pwd)"frommcp_config.jsonso only trusted plugin installation directories ($HOME/.gemini/config/plugins/gemini-notebookand$HOME/.gemini/extensions/gemini-notebook) are searched, and updatedscripts/run_mcp.shto useexport PYTHONPATH="${PLUGIN_DIR}/src${PYTHONPATH:+:${PYTHONPATH}}".
- Why:
- Sidecar HTTP API Authentication, Loopback Origin Enforcement & Static File Lockdown (
sidecars/notebook_context_panel/server.py):- Why:
SidecarRequestHandlerpreviously emittedAccess-Control-Allow-Origin: *, did not verifyX-Sidecar-Tokenon/api/*routes, accepted unboundedContent-Lengthbodies, fell back toSimpleHTTPRequestHandler.do_GET()(exposingSIDECAR_DIRfiles such as/server.pyand/sidecar.json), and allowed query/bodyworkspace_diroverrides to escape the server's bound workspace. - How: Added constant-time
hmac.compare_digestverification ofX-Sidecar-Token/?token=(generating a 256-bitsecrets.token_urlsafe(32)token inmain()when not pre-set by the host IDE), restrictedOrigin/ CORS headers exclusively to local loopback/webview origins (403 Forbiddenon external cross-origin requests), addedX-Content-Type-Options: nosniff,X-Frame-Options: SAMEORIGIN, andContent-Security-Policyheaders, replaced thesuper().do_GET()fallback with an explicit404JSON response, bounded request bodies to1 MiB(MAX_BODY_BYTES) andpage_sizeto1..200, and pinned_resolve_allowed_workspace()to prevent escaping a boundworkspace_dir.
- Why:
- Workspace File Containment & Sensitive-File Blocklist (
src/agy_gemini_notebook/config.py,mcp_server.py,gcp_enterprise_rest.py,rpc_bridge.py,server.py):- Why:
notebook_sync_filesandPOST /api/syncpreviously accepted arbitrary absolute paths (e.g./etc/passwd,~/.ssh/id_rsa) or../traversal sequences and read files of unbounded size into memory before uploading them to external NotebookLM notebooks. - How: Added
validate_workspace_file_path()enforcingcandidate.resolve().is_relative_to(ws_root), blocking dot-directories and sensitive credential filenames (.env,.git,.ssh,.aws,.gnupg,.notebooklm,.notebooklm-auth,storage_state.json,server_info.json,id_rsa,id_ed25519), and enforcing a50 MiB(MAX_UPLOAD_BYTES) upload cap. Also hardenedresolve_workspace_dir()andget_binding_path()to stop parent traversal before$HOMEand/.
- Why:
- CLI Option Injection Prevention &
0600Session Cookie Permissions (src/agy_gemini_notebook/engines/rpc_bridge.py,scripts/setup.sh,rules/AGENTS.md,skills/gemini-notebook/SKILL.md):- Why: In
notebooklm-py,--browser-cookiesuses Click'sis_flag=False, flag_value="auto"; passing abrowser_cookiesvalue starting with--(such as--storage=/tmp/hijack.json) caused Click to interpret the argument as a separate CLI flag. Furthermore,.notebooklm-auth/storage_state.jsonand.agents/notebook.jsonwere created with defaultumaskpermissions instead of owner-only0600. - How: Restricted
browser_cookiestoALLOWED_COOKIE_BROWSERS(auto,chrome,brave,firefox,edge,chromium,vivaldi,arc,safari), rejected leading dashes or control characters inaccountandprofile, enforced0o700directory and0o600file permissions via_secure_storage_permissions()andsave_workspace_binding(), updatedscripts/setup.shto preferuv sync --locked --all-extras, and added explicit prompt-injection and cookie-import consent guardrails torules/AGENTS.mdandskills/gemini-notebook/SKILL.md.
- Why: In
v1.0.6 (2026-11-02) — Deep Research report_id Polling Fix & CLI --wait / --report-id Support
- Fix Deep Research Polling, Waiting & Source Import Identifier (
src/agy_gemini_notebook/engines/rpc_bridge.py):- Why: In NotebookLM's
START_DEEP_RESEARCHRPC response (client.research.start(..., mode="deep")), slot 0 (started.task_id) is a transient session ID (sessionId) that is never matched byPOLL_RESEARCH,wait_for_completion,IMPORT_RESEARCH, orCANCEL_RESEARCH, whereas slot 1 (started.report_id) is the actual pollable and importable task identifier. Previously,NotebookRpcBridge.run_research()passedstarted.task_idinstead ofstarted.report_idtoclient.research.wait_for_completion(), causingresearch --mode deep(withwait=True) to poll an unmatchable ID (NOT_FOUND) until the wait timeout always expired—even when the Deep Research run had completed in ~10 minutes. Similarly,research --no-waitreturned the non-pollablestarted.task_idintask_id, requiring users to manually pass--task-id <report_id>toresearch-status. - How: Updated
NotebookRpcBridge.run_research()to selectpoll_task_id = report_id if (mode_norm == "deep" and report_id) else start_task_idand passpoll_task_idtoclient.research.wait_for_completion()and_import_task_sources(). Whenwait=False(--no-wait),task_idandpoll_task_idnow both expose the pollable identifier (report_idfor Deep Research,start_task_idfor Fast Research) alongsidereport_idandstart_task_id.
- Why: In NotebookLM's
- Explicit
--waitonresearchand--report-id/--poll-task-idonresearch-status(src/agy_gemini_notebook/cli.py,src/agy_gemini_notebook/mcp_server.py,tests/test_rpc_bridge_and_mcp.py):- Why: Agent harnesses and CLI users frequently pass
--waitexplicitly toagy-gemini-notebook research(consistent withsync --wait,add-source --wait,research-status --wait,audio --wait, andgenerate --wait) or pass--report-id/--poll-task-idtoresearch-status/notebook_research_status. - How: Added
--waitto theresearchCLI subparser, added--report-idand--poll-task-idoptions toresearch-statusandnotebook_research_status, and added regression tests intests/test_rpc_bridge_and_mcp.pyverifying that Deep Research fails if polled withstart_task_idand succeeds usingreport_id.
- Why: Agent harnesses and CLI users frequently pass
v1.0.5 (2026-10-22) — Visual Demonstration Suite (Animated Walkthrough GIF, Sidecar UI & CLI Deep Research Previews)
- Animated 4-Step Walkthrough GIF & High-DPI Previews (
assets/demo.gif,assets/sidecar-preview.png,assets/cli-research-preview.png,README.md):- Why: Visitors, contributors, and community listings (GitHub, Reddit, Hacker News, LinkedIn, X/Twitter, and MCP directories) need an immediate, visual demonstration of how the Antigravity 2 Sidecar UI (
sidecar://gemini-notebook/notebook_context_panel/ui.html) and theagy-gemini-notebookCLI work together across setup, grounded Q&A, autonomous Deep Research $\rightarrow$ local.mdsynthesis, and Studio artifact generation. - How: Rendered a 4-step animated walkthrough (
assets/demo.gif) and standalone high-resolution previews (assets/sidecar-preview.pngandassets/cli-research-preview.png) directly from the live Dark Modesidecars/notebook_context_panel/ui.htmllayout and CLI output, and embedded them into a new## 🎬 Visual Overview & Interactive Demosection at the top ofREADME.md.
- Why: Visitors, contributors, and community listings (GitHub, Reddit, Hacker News, LinkedIn, X/Twitter, and MCP directories) need an immediate, visual demonstration of how the Antigravity 2 Sidecar UI (
v1.0.4 (2026-10-22) — Google Sign-In Policy Compliance, 1-Click Local Browser Session Import & Explicit Grey-Area Alerts
- Elimination of Automated Playwright Sign-In on
accounts.google.com(src/agy_gemini_notebook/engines/rpc_bridge.py,pyproject.toml,scripts/setup.sh):- Why: Previously,
notebook_logininvokednotebooklm loginwithout--browser-cookies, which spawned a Playwright-controlled Chromium browser onaccounts.google.comusing--disable-blink-features=AutomationControlledandignore_default_args=["--enable-automation"]. Automating Google's sign-in page with stealth flags contravenes Google Identity's OAuth 2.0 "Use Secure Browsers" policy and required a 300 MB Playwright Chromium download. - How: Switched
pyproject.tomlfromnotebooklm-py[browser]tonotebooklm-py[cookies](rookie-cookies) and refactoredNotebookRpcBridge.login()so it never launches Playwright againstaccounts.google.com. Instead, it imports existing authenticated cookies from the user's real OS browser (--browser-cookies auto|chrome|brave|firefox|edge|chromium|vivaldi|arc|safari) in ~1 second, supportsopen_system_browser=True(via Python'swebbrowser.open("https://notebooklm.google.com/")) so the user signs in exclusively inside their genuine system browser, and supportsgcloud=True(gcloud auth login) for Engine 1.
- Why: Previously,
- Explicit ToS & Grey-Area Compliance Notices Across UI, MCP, CLI & Docs (
rpc_bridge.py,mcp_server.py,sidecars/notebook_context_panel/ui.html,README.md,SKILL.md,rules/AGENTS.md):- Why: While Engine 1 (
discoveryengine.googleapis.com/v1alpha) is 100% official Google Cloud OAuth 2.0, consumernotebooklm.google.comdoes not yet offer a public OAuth API and relies on internalbatchexecuteweb RPCs (a ToS grey area). Users need transparent, prominent warnings before choosing between Engine 1 and Engine 2. - How: Added
COMPLIANCE_NOTICEtonotebook_status,notebook_login, andauth_requiredMCP responses; added a dedicated## ⚖️ Google Terms of Service, OAuth Policy & Dual-Engine Compliancesection toREADME.md; and added a visible ⚠️ Compliance & Grey-Area Notice banner plus browser selector (#cookie-browser-select), "🔗 Connect Session from Browser", "🌐 Open notebooklm.google.com", and "☁️ Google Cloud Login (gcloud)" buttons to the Sidecar UI (ui.html), along with semantic<header>/<main>landmarks, explicit<label for>associations, and IME-safeEnterhandling (!e.isComposing).
- Why: While Engine 1 (
v1.0.3 (2026-10-22) — Sidecar Dark Mode Contrast Fix & Isolated .venv Sign-In Subprocess Resolution
- High-Contrast Dark Mode & Namespaced CSS Tokens (
sidecars/notebook_context_panel/ui.html):- Why: In Antigravity 2 Dark Mode on Linux, section headers (
h2) and secondary labels (color: var(--muted)) rendered as dark gray/black on dark#1e1f20cards for two reasons: (1) Antigravity 2's sidecar host bridge (/preload.js) injects shadcn-style inline CSS custom properties onto<html style="--muted: #18191b; --card: #1e1f20; ...">where--mutedis a dark surface background rather than a foreground text color, overriding:root { --muted: ... }, and (2)@media (prefers-color-scheme: light)could match inside the Linux Electron webview even when the IDE shell was dark. - How: Replaced all generic CSS custom properties with collision-proof
--nb-*tokens (--nb-bg,--nb-card,--nb-card-elevated,--nb-border,--nb-text: #f3f4f6,--nb-text-secondary: #cbd5e1,--nb-heading: #d2e3fc,--nb-accent: #8ab4f8), removed the@media (prefers-color-scheme: light)media query override, made high-contrast Dark Mode the default (:root, [data-theme="dark"]), and addedsyncHostTheme()to inspect--backgroundluminance ondocument.documentElementwhen switching themes.
- Why: In Antigravity 2 Dark Mode on Linux, section headers (
- Isolated
.venvPython Resolution for Browser Sign-In (src/agy_gemini_notebook/engines/rpc_bridge.py,sidecars/notebook_context_panel/server.py,sidecars/notebook_context_panel/notebooklm.py):- Why: Clicking "🔑 Sign In to Google NotebookLM" in the Sidecar UI failed with
/usr/bin/python3: No module named notebooklmbecausesidecar.jsonlaunchesserver.pyusing the systempython3(/usr/bin/python3). Althoughserver.pyadded.venv/lib/python*/site-packagestosys.pathin-memory,NotebookRpcBridge.login()spawned[sys.executable, "-m", "notebooklm", "login"]in a child process wheresys.executablewas still/usr/bin/python3. - How: Added
NotebookRpcBridge._resolve_python_executable()to resolvePLUGIN_ROOT / ".venv" / "bin" / "python"(and inject.venvPYTHONPATH/PATH), updatedserver.pyto pointsys.executableto.venv/bin/python, and added asidecars/notebook_context_panel/notebooklm.pylauncher shim that transparentlyexecves.venv/bin/notebooklmeven if an already-runningserver.pyprocess invokes/usr/bin/python3 -m notebooklm.
- Why: Clicking "🔑 Sign In to Google NotebookLM" in the Sidecar UI failed with
v1.0.2 (2026-10-22) — Rebranding to "Gemini Notebook by Chryzalide", Antigravity 2 Sidecar SDK Protocol Fix & Automated 5-Step Setup Workflow
- Rebranding to
Gemini Notebook by Chryzalide(plugin.json,sidecars/notebook_context_panel/sidecar.json,ui.html,README.md):- Why: Using the bare name
"Gemini Notebook"in the Antigravity 2Overview -> Pluginsmenu and plugin manifest could cause ambiguity with official first-party Google plugins or branding. - How: Renamed
displayNameinplugin.jsonanddisplay_name/ui_config.views[0].titleinsidecars/notebook_context_panel/sidecar.jsonandui.htmltoGemini Notebook by Chryzalide.
- Why: Using the bare name
- Antigravity 2 Sidecar SDK Protocol Compliance (
sidecars/notebook_context_panel/server.py,sidecar.json,ui.html):- Why: Clicking the plugin inside
Overview -> Pluginsor clicking the sidecar pill link did nothing for three reasons: (1) Antigravity 2 assigns a dynamic port to sidecars viaANTIGRAVITY_SIDECAR_WEB_PORT, whereasserver.pyonly checkedPORT(defaulting to8765), (2) Antigravity 2 expects the sidecar to writeserver_info.json(host,port,token,pid) intoANTIGRAVITY_EXECUTABLE_DATA_DIR/~/.gemini/antigravity/sidecar_data/.../data/server_info.jsonand serve/preload.js, and (3) the sidecar pill link was missing/ui.html(sidecar://gemini-notebook/notebook_context_panel/ui.html). - How: Updated
server.pyto bindANTIGRAVITY_SIDECAR_WEB_PORT(falling back toPORTor8000), write and clean upserver_info.json, serve/preload.jsand/shell.css, supportX-Sidecar-TokenCORS/query injection, and use"command": "python3", "args": ["server.py"]insidecar.json. Updated all sidecar pill links to[Gemini Notebook by Chryzalide](sidecar://gemini-notebook/notebook_context_panel/ui.html).
- Why: Clicking the plugin inside
- Automated 5-Step Setup & Onboarding Workflow (
scripts/setup.sh,src/agy_gemini_notebook/cli.py,skills/gemini-notebook/SKILL.md,README.md):- Why & How: Added
./scripts/setup.shandagy-gemini-notebook setup [--login]plusWorkflow 0inSKILL.mdand a complete visual Installation & Setup Workflow guide inREADME.mdto walk users through environment creation, Playwright Chromium verification, Antigravity 2 plugin registration, Engine 1/2 authentication, and IDE reload verification.
- Why & How: Added
v1.0.1 (2026-10-22) — Interactive Authentication, Graceful Auth Diagnostics & Cross-Workspace Plugin Launchers
- Interactive Login Tool, CLI & Sidecar Sign-In (
mcp_server.py,rpc_bridge.py,cli.py,sidecars/notebook_context_panel/):- Why: When calling
notebook_create(or any Engine 2 RPC tool) before authenticating a Google NotebookLM session or Google Cloudv1alphaproject,notebooklm-pyraised an unhandledFileNotFoundError: Storage file not found, which Antigravity 2's MCP client masked behind a genericEncountered error in tool execution: Error executing tool notebook_createmessage with no direct way to log in from the IDE. - How: Added
NotebookAuthRequiredErrorand wrapped MCP tool handlers to return structured, actionable diagnostics (status: "auth_required") instead of crashing tool execution. Added thenotebook_loginMCP tool (21 tools total), theagy-gemini-notebook loginCLI subcommand, and a "🔑 Sign In to Google NotebookLM" button (POST /api/login) in the Sidecar UI panel. Also added automatic Playwright Chromium revision bridging (_prepare_playwright_browsers_env) and sandbox-compatible session storage fallback (.notebooklm-auth/storage_state.json).
- Why: When calling
- Cross-Workspace Plugin Command Resolution (
mcp_config.json,sidecars/notebook_context_panel/sidecar.json):- Why & How: Replaced relative command paths (
scripts/run_mcp.shandsidecars/notebook_context_panel/server.py) with dynamic$HOME/.gemini/config/plugins/gemini-notebookresolution while preservingAGY_WORKSPACE_DIR=$(pwd), ensuring the MCP server and Sidecar UI launch reliably from any workspace opened in Antigravity 2 without hardcoding machine-specific paths.
- Why & How: Replaced relative command paths (
v1.0 (2026-10-22) — Initial Stable Release
- Dual-Engine Architecture (
src/agy_gemini_notebook/engines/):- Why & How: Unifies official Google Cloud Enterprise provisioning (
gcp_enterprise_rest.py, Discovery Enginev1alphaREST API authenticated viagcloud auth print-access-token) with the community RPC bridge (rpc_bridge.py, powered bynotebooklm-pyfor consumer and enterprisenotebooklm.google.comaccounts). Automatically falls back to Engine 2 whenGCP_PROJECT_NUMBERis not configured, ensuring zero-friction operation for both personal Google accounts and GCP organizations.
- Why & How: Unifies official Google Cloud Enterprise provisioning (
- Complete 20-Tool MCP Server, Resources & Prompts (
src/agy_gemini_notebook/mcp_server.py):- Why & How: Exposes the full lifecycle of a Gemini Notebook to any MCP client: workspace binding & invocation (
notebook_status,notebook_attach,notebook_invoke), CRUD & sharing (notebook_list,notebook_get,notebook_create,notebook_delete,notebook_rename,notebook_share), local file synchronization & source management (notebook_sync_files,notebook_add_source,notebook_delete_sources,notebook_search_sources,notebook_get_source_text), grounded Q&A & autonomous research (notebook_query,notebook_research,notebook_research_status), and Studio deliverables & persistent notes (notebook_create_audio,notebook_generate_artifact,notebook_notes). Also registers MCP resources (notebook://active,notebook://aliases) and reusable MCP prompts (invoke_notebook,deep_research_notebook,sync_workspace_docs).
- Why & How: Exposes the full lifecycle of a Gemini Notebook to any MCP client: workspace binding & invocation (
- Documentary Research for Decision Support $\rightarrow$ Local
.mdSynthesis (skills/gemini-notebook/SKILL.md,rules/AGENTS.md):- Why & How: Enables the primary decision-support workflow where the agent opens an existing Gemini Notebook or creates a new one, runs documentary research (
notebook_research) or queries curated notebook sources (notebook_query), and synthesizes the source-cited findings into structured local Markdown files (docs/research/*.md, ADRs, decision matrices) inside the active project workspace.
- Why & How: Enables the primary decision-support workflow where the agent opens an existing Gemini Notebook or creates a new one, runs documentary research (
- Interactive Antigravity 2 Sidecar Panel (
sidecars/notebook_context_panel/):- Why & How: Provides an Auxiliary Pane web UI (
ui.html) backed by a local HTTP server (server.py) with/api/status,/api/notebooks,/api/attach,/api/toggle_source, and/api/create_notebookendpoints—allowing 1-click notebook switching, source-level grounding filters, and inline notebook creation.
- Why & How: Provides an Auxiliary Pane web UI (
- Standalone CLI & Multi-IDE Transport (
src/agy_gemini_notebook/cli.py,scripts/run_mcp.sh):- Why & How: Adds the
agy-gemini-notebookCLI (status,list,invoke,attach,create,query,research,sync,audio,artifact) and a portable MCP launcher supportingstdio,sse, andstreamable-httptransports across Google Antigravity 2, VS Code, Cursor, and Claude Code.
- Why & How: Adds the
- Automated Test Suite (
tests/):- Why & How: Includes 16 comprehensive unit, mocked Dual-Engine, Sidecar HTTP API, and live MCP stdio handshake test suites verified with
pytestandruff.
- Why & How: Includes 16 comprehensive unit, mocked Dual-Engine, Sidecar HTTP API, and live MCP stdio handshake test suites verified with
👤 Author
Souryan Augé
- 🌐 Website: https://souryan-auge.fr/
- 💻 GitHub: @Chryzalide
📄 License
Distributed under the MIT License. Contributions are welcome!
Metadata
Release files for agy-gemini-notebook-plugin 1.5.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| agy_gemini_notebook_plugin-1.5.2.tar.gz | 185.2 kB | With provenance | Details for agy_gemini_notebook_plugin-1.5.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| agy_gemini_notebook_plugin-1.5.2-py3-none-any.whl | Python 3 | none | any | Details for agy_gemini_notebook_plugin-1.5.2-py3-none-any.whl |
Total release size: 298.8 kB
Release files / agy_gemini_notebook_plugin-1.5.2.tar.gz
| Download URL | agy_gemini_notebook_plugin-1.5.2.tar.gz |
|---|---|
| Size | 185.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
84df63bc3b486e0a5a6005468c25b5a24be3ebf8cb88ce0d6d8b3e0a097684d5
|
|
BLAKE2b-256 checksum How to use checksums |
bbea5fbead5a0b59b2767350ff997210646a98f2d0f12562792714fb1b1e0e62
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.
Transparency logRelease files / agy_gemini_notebook_plugin-1.5.2-py3-none-any.whl
| Download URL | agy_gemini_notebook_plugin-1.5.2-py3-none-any.whl |
|---|---|
| Size | 113.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
657c04848d36cafdd00fe5a4647ed2942569aa704414b276374fae7b5f7cb8fb
|
|
BLAKE2b-256 checksum How to use checksums |
5337e1f9a1d84de95a482a1de2827827e2fd339b9a54654399033aa8874cf84d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.
Transparency logSecurity for agy-gemini-notebook-plugin 1.5.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for agy_gemini_notebook_plugin-1.5.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.