Skip to main content

📓 Gemini Notebook by Chryzalide (agy-gemini-notebook-plugin)

Version Python License Author

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

Gemini Notebook by Chryzalide — 4-Step Animated Demo (Setup, Grounded Q&A, Deep Research to Local Markdown, and Studio Sync)

📸 View High-Resolution Static Previews (Sidecar Context Panel & CLI Deep Research)

1. Autonomous Deep Research $\rightarrow$ Local Project .md Synthesis (agy-gemini-notebook)

CLI Deep Research to Local Markdown Preview

2. Google Antigravity 2 Auxiliary Pane Sidecar UI (sidecar://gemini-notebook/notebook_context_panel/ui.html)

Gemini Notebook by Chryzalide Sidecar UI Preview


🆚 Official Google Gemini Notebook API vs. Gemini Notebook by Chryzalide

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 login with notebook scope) + automatic 50-minute token caching and transparent HTTP 401 retry.
    • Handles list, get, create, rename (PATCH), add_source (web, youtube, text), and chunked streaming Resumable UploadSource up to 200 MiB directly from MCP/CLI (filling the gap in Google's remote MCP).
  • 🏢 Engine 1b — Official Google Cloud Enterprise API (v1alpha Discovery Engine):
    • 100% official OAuth 2.0 authentication via gcloud auth login for Google Workspace / Enterprise accounts (GCP_PROJECT_NUMBER + roles/discoveryengine.notebooklmUser).
    • Full CRUD, batchDelete, IAM sharing, local uploadFile, Drive/YouTube/web ingestion, Audio Overviews, and Enterprise Grounded Q&A (servingConfigs:answer).
  • 💬 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, and confirm=True deletion guardrails) plus typed options on notebook_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.
  • 🎯 Invoke Notebooks by ID, Alias, or Fuzzy Title (notebook_invoke & notebook_query):
    • Attach a default notebook (plus named aliases and strict_official_only preferences) 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 by asyncio.Semaphore(3) with per-notebook error isolation) in a single notebook_query or agy-gemini-notebook query --notebooks call.
  • 🗂️ Chat Persona, Transcript Export & Google Drive Freshness (notebook_chat & notebook_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=True Destructive Guardrails: notebook_delete, notebook_delete_sources, notebook_artifacts(action="delete"), and notebook_chat(action="delete_conversation") all require explicit confirm=True (or --confirm in CLI), returning a safe confirmation_required preview otherwise.
  • 🔬 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.
  • 📝 Documentary Research $\rightarrow$ Local Markdown Synthesis:
    • Turn research findings and curated notebook Q&A directly into structured, source-cited .md decision records and technical briefs inside your local project workspace.
  • 🔐 Optional OS Keyring Credential Storage & Diagnostic doctor Audit:
    • Store Engine 2 browser session cookies in your operating system's native secret store (NOTEBOOKLM_STORAGE_BACKEND=keyring, optional keyring extra: macOS Keychain, Linux SecretService/KWallet, Windows Credential Locker) instead of leaving plaintext JSON files on disk—with concurrency-safe ephemeral 0600 temp materialization (inside 0700 dirs) wiped in finally and 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.com enablement, gcloud), 0600/0700 session file permissions, strict_official_only, .agents/notebook.json, Antigravity 2 plugin symlink, and Sidecar liveness.
  • 🖥️ 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 bundled SKILL.md across antigravity, vscode, cursor, claude, codex, or all in either --scope user or --scope workspace (with --dry-run preview), whether running from a git checkout or a PyPI/uv tool wheel.
    • Standalone CLI (agy-gemini-notebook) & --ai Reference: Run agy-gemini-notebook --ai for a concise LLM/agent cheat sheet, or invoke, query, rename, sync files, launch Deep Research, audit with doctor --human, and manage Studio artifacts from 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/)"]
  1. 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)).
  2. 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_query and notebook_search_sources.
  3. Generate Local Project Markdown Files: Using the grounded answers, synthesized research report, and source citations returned by the notebook, the agent writes structured .md files 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.md in 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:

  1. 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).
  2. 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.com and never uses stealth flags such as --disable-blink-features=AutomationControlled.
  3. 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 login with notebook scope) for personal Google Accounts, handling CRUD, rename, standard sources, and chunked UploadSource without browser cookies.
  4. Engine 1b — Official Google Cloud NotebookLM Enterprise (v1alpha REST 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).
  5. Strict Official-Only Mode (NOTEBOOK_STRICT_OFFICIAL_ONLY=1):
    • Set NOTEBOOK_STRICT_OFFICIAL_ONLY=1 (or strict_official_only: true in .agents/notebook.json) to hard-block Engine 2 completely and restrict execution exclusively to official Google APIs.

🚀 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"]

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:

  1. [Step 1/5] Python Environment & Dependencies: Creates .venv (via uv or python3 -m venv) and installs agy-gemini-notebook-plugin[rpc,dev] (including notebooklm-py[cookies]).
  2. [Step 2/5] Local Browser Session Reader Verification: Verifies rookie-cookies so the plugin can import your existing session in ~1 second without downloading a 300 MB Playwright Chromium binary or automating accounts.google.com.
  3. [Step 3/5] Antigravity 2 Plugin Registration: Creates ~/.gemini/config/plugins/gemini-notebook and enables Gemini Notebook by Chryzalide via the Antigravity 2 Language Server if running.
  4. [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 into https://notebooklm.google.com/ in your normal browser.
    • Google Cloud NotebookLM Enterprise (v1alpha REST — Engine 1): Checks GCP_PROJECT_NUMBER and gcloud auth login.
  5. [Step 5/5] Health Verification: Runs agy-gemini-notebook status to confirm setup_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:

  1. Install the Python environment:
    uv sync --all-extras
    
  2. Register the plugin in Google Antigravity 2:
    mkdir -p ~/.gemini/config/plugins
    ln -s "$(pwd)" ~/.gemini/config/plugins/gemini-notebook
    
  3. 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 — v1alpha REST 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
      
  4. Verify readiness & audit security permissions:
    .venv/bin/agy-gemini-notebook doctor --human
    # Or compact JSON status
    .venv/bin/agy-gemini-notebook status
    
  5. Reload Antigravity 2 and open the Sidecar UI:
    • Open Overview -> Plugins -> Gemini Notebook by Chryzalide in the top-right auxiliary pane menu, or click [Gemini Notebook by Chryzalide](sidecar://gemini-notebook/notebook_context_panel/ui.html) in chat.

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:

  1. Call notebook_status to inspect your environment.
  2. Call notebook_login(browser_cookies="auto") to import your active browser session in 1 second (or open https://notebooklm.google.com/ in your system browser if you aren't logged in yet) and display the Dual-Engine compliance notice.
  3. List your notebooks (notebook_list) or create a new one (notebook_create) and bind it to .agents/notebook.json.
  4. 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-uv stopped publishing floating major tags (such as @v8) after v7 and 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.0 across ci.yml and release.yml and updated workflow regression assertions in tests/test_lot4_harness_ai_and_packaging.py.

v1.5.1 (2026-12-05) — CI/Release Node.js 24 Upgrade, setup -w Ergonomics & Wheel Smoke Test Fix

  • CLI setup -w / --workspace Ergonomics (src/agy_gemini_notebook/cli.py):
    • Why: The -w / --workspace option was only accepted before the subcommand (agy-gemini-notebook -w <dir> setup ...), causing agy-gemini-notebook setup --target vscode --scope workspace --dry-run -w <dir> in the release smoke test and intuitive user invocations to fail with unrecognized arguments: -w.
    • How: Added -w / --workspace with default=argparse.SUPPRESS to the setup subparser while preserving top-level -w precedence when omitted after setup.
  • 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-uv warned when uv.lock was absent from the repository; additionally, release.yml failed on setup ... -w /tmp/wheel-ws.
    • How: Upgraded workflows to actions/checkout@v6, astral-sh/setup-uv@v8 (with cache-dependency-glob: "**/pyproject.toml"), actions/upload-artifact@v7, and actions/download-artifact@v8, verified both pre- and post-subcommand -w in the release.yml wheel smoke test, and added regression assertions in tests/test_lot4_harness_ai_and_packaging.py.

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 (servers vs mcpServers vs TOML [mcp_servers.*]) and skill directories is error-prone and risks overwriting sibling servers.
    • How: Implemented harness_setup.py and extended agy-gemini-notebook setup with --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), stdlib tomllib-validated Codex TOML merging (preserving comments, sibling tables, and [mcp_servers.gemini_notebook_mcp.env] sub-tables), and wheel-or-checkout SKILL.md installation while keeping the MCP server surface unchanged at 24 tools.
  • 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, --confirm destructive guardrails, workspace path containment, and all CLI subcommands without loading the full README.md.
    • How: Added format_ai_reference() and top-level --ai / --version flags in src/agy_gemini_notebook/cli.py, keeping the generated Markdown reference concise and immediately actionable.
  • 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] or uv tool install agy-gemini-notebook-plugin[all] without cloning the repository, with automated CI verification and zero-secret PyPI publishing.
    • How: Enriched pyproject.toml with PyPI classifiers, project URLs, the all extra (rpc + keyring), [tool.hatch.build.targets.wheel.force-include] bundling SKILL.md and AGENTS.md under agy_gemini_notebook/_assets/, and explicit sdist exclusions (.agents, .notebooklm-auth, storage_state.json, server_info.json). Added .github/workflows/ci.yml (Python 3.11/3.12/3.13 Ruff + Pytest matrix and wheel/sdist content audit) and .github/workflows/release.yml (tag parity check, isolated wheel smoke test for --ai and setup --dry-run, and PyPI OIDC Trusted Publishing via pypa/gh-action-pypi-publish@release/v1), backed by dedicated tests in tests/test_lot4_harness_ai_and_packaging.py.

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 imported notebooklm.google.com session cookies in 0600 storage_state.json files 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.0 extra in pyproject.toml and implemented src/agy_gemini_notebook/auth_store.py supporting NOTEBOOKLM_STORAGE_BACKEND=file|keyring (service="agy-gemini-notebook", username="profile:<name>"). Added validate_storage_state_json(), atomic 0o600/0o700 file writes, POSIX permission auditing (check_storage_permissions()), secure overwrite-before-unlink cleanup (secure_unlink_file()), and verified read-back before removing plaintext files during migrate_to_keyring() / migrate_to_file().
  • 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's NotebookLMClient.from_storage() reads a storage path on __aenter__, while mutating process-wide NOTEBOOKLM_AUTH_JSON or NOTEBOOKLM_HOME environment variables would break concurrent async calls across profiles.
    • How: Updated NotebookRpcBridge._open_client() (and login() / has_saved_session()) to materialize keyring secrets via ephemeral_storage_file() into an isolated 0o600 file inside a dedicated 0o700 temp directory (tempfile.mkdtemp) and wipe + delete both in finally without touching os.environ. Surfaced storage_backend, keyring_installed, keyring_service, and keyring_username in notebook_status and Sidecar /api/status while preserving the compact 24-tool MCP footprint.
  • Diagnostic doctor Auditor & 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.com enablement, gcloud, 0600/0700 cookie permissions, strict_official_only, .agents/notebook.json, Antigravity 2 symlink, and Sidecar server_info.json liveness) previously required running multiple manual commands.
    • How: Implemented src/agy_gemini_notebook/doctor.py (run_doctor, format_doctor_human) and exposed agy-gemini-notebook doctor [--human] [--profile <name>] [--no-gcloud-service-check] (exiting 1 on "unhealthy" with actionable Fix: hints and zero secret leakage) alongside agy-gemini-notebook auth-storage status|migrate-to-keyring|migrate-to-file. Added 11 unit/integration tests in tests/test_lot3_keyring_and_doctor.py (61 passed total, ruff check clean).

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, and research aliases). 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_query MCP tool (0 new tools) with notebook_ids: list[str] | None = None (accepting raw IDs or .agents/notebook.json aliases, capped at 5 notebooks max, deduplicated), running concurrent queries under asyncio.Semaphore(3) with per-notebook error isolation (status="ok"|"partial"|"error"), and added --notebooks a,b to agy-gemini-notebook query.
  • Consolidated notebook_chat Tool & 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_CHAT in router.py (blocked under NOTEBOOK_STRICT_OFFICIAL_ONLY=1), implemented get_chat_settings, configure_chat (with read-modify-write partial-update preservation over notebooklm-py's ChatAPI.configure), get_chat_history, export_chat_markdown (enforcing validate_workspace_output_path() before RPC calls), and delete_chat_conversation in NotebookRpcBridge, exposed via @mcp.tool() notebook_chat (23rd tool) and agy-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, implemented sync_drive_sources in NotebookRpcBridge wrapping client.sources.check_freshness() and client.sources.refresh() (skipping non-Drive sources and only refreshing stale sources when apply=True), exposed @mcp.tool() notebook_sync_drive (24 tools total; apply=False read-only preview by default), and added agy-gemini-notebook sync-drive [--apply] [--source-id ...].
  • Mandatory confirm=True Guardrails 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 = False on notebook_delete and notebook_delete_sources (matching notebook_artifacts(action="delete") and notebook_chat(action="delete_conversation")), returning {"status": "confirmation_required", "targets": [...], ...} when confirm=False, added agy-gemini-notebook delete --confirm and delete-sources --confirm, and added the Lot 2 test suite in tests/test_lot2_chat_drive_crossquery.py (50 passed total, ruff check clean).

v1.2.0 (2026-12-01) — Studio Artifact Lifecycle, Secure Workspace Downloads, Docs/Sheets Export & Slide Revision

  • Consolidated notebook_artifacts MCP 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) to OperationCapability in router.py (preserving strict_official_only blocking), implemented list_artifacts, download_artifact, export_artifact, revise_slide, and delete_artifact in NotebookRpcBridge wrapping notebooklm-py's ArtifactsAPI, exposed them through a single context-light notebook_artifacts MCP tool (22 tools total) with a mandatory confirm=True guardrail on delete, and added agy-gemini-notebook artifacts list|download|export|revise-slide|delete CLI subcommands.
  • Secure Workspace Output Containment (src/agy_gemini_notebook/config.py):
    • Why: Allowing an agent to pass arbitrary output_path strings to download_artifact creates 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 strict resolved.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).
  • 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_artifact and agy-gemini-notebook generate --options '{...}' with validated enum mapping (VideoFormat, VideoStyle, InfographicOrientation, InfographicDetail, InfographicStyle, SlideDeckFormat, SlideDeckLength, QuizQuantity, QuizDifficulty), and added 16 unit/integration tests in tests/test_artifacts_lot1.py.

v1.1.0 (2026-11-30) — Tri-Engine Official-First Architecture (Google Gemini Notebook API v1 Integration)

  • Official Consumer Gemini Notebook API v1 Client (src/agy_gemini_notebook/engines/google_notebook_v1.py):
    • Why: Google's new https://notebook.googleapis.com/v1 Public 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 (UploadSource is REST-only), tokens expire every hour, and the API does not yet support Q&A, Deep Research, full-text search, Studio artifacts, delete, or share. Relying on Engine 2 (rpc_bridge) for CRUD/ingestion when an official API exists created unnecessary Terms of Service exposure.
    • How: Implemented GoogleNotebookV1Client covering list_notebooks, get_notebook (with concurrent paginated list_sources), create_notebook, rename_notebook (PATCH), add_source (text_content, web_content, YouTube), and 8 MiB chunked streaming Resumable UploadSource up to Google's 200 MiB ceiling (enforcing X-Goog-Upload-URL authority validation, stripping Authorization on 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 on HTTP 401, plus clear structured diagnostics for 403 WORKSPACE_ACCOUNT_NOT_SUPPORTED and 404 onboarding errors.
  • 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. Added NOTEBOOK_STRICT_OFFICIAL_ONLY=1 / strict_official_only (returning status: "official_api_limitation" instead of calling Engine 2), extended extract_and_validate_resource_id() to accept consumer notebooks/{id}[/sources/{sid}] paths, and upgraded notebook_rename from RPC-only to Tri-Engine (v1 PATCH first).
  • 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-official to the CLI and setup.sh; upgraded the Sidecar UI (ui.html & server.py) to display all 3 engines, an "✨ Connect Official v1" button, and v1 source state (ACTIVE/PROCESSING/FAILED) normalization; embedded the official API vs. plugin comparison chart (assets/official-api-vs-plugin.png) into README.md; and added dedicated unit/security tests in tests/test_google_notebook_v1.py.

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, and source_id read from .agents/notebook.json or tool arguments were interpolated directly into https://{endpoint_location}-discoveryengine.googleapis.com/v1alpha/projects/{project_number}/locations/{location}/notebooks/{notebook_id}. A malicious workspace binding setting gcp_endpoint_location to an attacker domain (attacker.example.com/collect#) could hijack the URL authority and exfiltrate the user's Authorization: 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_location restricted to {"us", "eu", "global"}, validate_gcp_location, validate_gcp_project_number, and extract_and_validate_resource_id + _safe_segment with urllib.parse.quote(..., safe="")) enforced both on Pydantic WorkspaceNotebookBinding deserialization and inside GcpNotebookEnterpriseClient. Also stripped CR/LF control characters from X-Goog-Upload-File-Name.
  • Untrusted Workspace Script Execution Prevention (mcp_config.json, scripts/run_mcp.sh):
    • Why: mcp_config.json previously iterated over "$(pwd)" before "$HOME/.gemini/config/plugins/gemini-notebook", meaning opening an untrusted repository containing a malicious scripts/run_mcp.sh would execute arbitrary shell commands on MCP server startup. In addition, scripts/run_mcp.sh exported PYTHONPATH="${PLUGIN_DIR}/src:${PYTHONPATH:-}", leaving a trailing colon (:) when PYTHONPATH was unset (which Python interprets as adding the current working directory to sys.path).
    • How: Removed "$(pwd)" from mcp_config.json so only trusted plugin installation directories ($HOME/.gemini/config/plugins/gemini-notebook and $HOME/.gemini/extensions/gemini-notebook) are searched, and updated scripts/run_mcp.sh to use export PYTHONPATH="${PLUGIN_DIR}/src${PYTHONPATH:+:${PYTHONPATH}}".
  • Sidecar HTTP API Authentication, Loopback Origin Enforcement & Static File Lockdown (sidecars/notebook_context_panel/server.py):
    • Why: SidecarRequestHandler previously emitted Access-Control-Allow-Origin: *, did not verify X-Sidecar-Token on /api/* routes, accepted unbounded Content-Length bodies, fell back to SimpleHTTPRequestHandler.do_GET() (exposing SIDECAR_DIR files such as /server.py and /sidecar.json), and allowed query/body workspace_dir overrides to escape the server's bound workspace.
    • How: Added constant-time hmac.compare_digest verification of X-Sidecar-Token / ?token= (generating a 256-bit secrets.token_urlsafe(32) token in main() when not pre-set by the host IDE), restricted Origin / CORS headers exclusively to local loopback/webview origins (403 Forbidden on external cross-origin requests), added X-Content-Type-Options: nosniff, X-Frame-Options: SAMEORIGIN, and Content-Security-Policy headers, replaced the super().do_GET() fallback with an explicit 404 JSON response, bounded request bodies to 1 MiB (MAX_BODY_BYTES) and page_size to 1..200, and pinned _resolve_allowed_workspace() to prevent escaping a bound workspace_dir.
  • 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_files and POST /api/sync previously 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() enforcing candidate.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 a 50 MiB (MAX_UPLOAD_BYTES) upload cap. Also hardened resolve_workspace_dir() and get_binding_path() to stop parent traversal before $HOME and /.
  • CLI Option Injection Prevention & 0600 Session 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-cookies uses Click's is_flag=False, flag_value="auto"; passing a browser_cookies value starting with -- (such as --storage=/tmp/hijack.json) caused Click to interpret the argument as a separate CLI flag. Furthermore, .notebooklm-auth/storage_state.json and .agents/notebook.json were created with default umask permissions instead of owner-only 0600.
    • How: Restricted browser_cookies to ALLOWED_COOKIE_BROWSERS (auto, chrome, brave, firefox, edge, chromium, vivaldi, arc, safari), rejected leading dashes or control characters in account and profile, enforced 0o700 directory and 0o600 file permissions via _secure_storage_permissions() and save_workspace_binding(), updated scripts/setup.sh to prefer uv sync --locked --all-extras, and added explicit prompt-injection and cookie-import consent guardrails to rules/AGENTS.md and skills/gemini-notebook/SKILL.md.

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_RESEARCH RPC response (client.research.start(..., mode="deep")), slot 0 (started.task_id) is a transient session ID (sessionId) that is never matched by POLL_RESEARCH, wait_for_completion, IMPORT_RESEARCH, or CANCEL_RESEARCH, whereas slot 1 (started.report_id) is the actual pollable and importable task identifier. Previously, NotebookRpcBridge.run_research() passed started.task_id instead of started.report_id to client.research.wait_for_completion(), causing research --mode deep (with wait=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-wait returned the non-pollable started.task_id in task_id, requiring users to manually pass --task-id <report_id> to research-status.
    • How: Updated NotebookRpcBridge.run_research() to select poll_task_id = report_id if (mode_norm == "deep" and report_id) else start_task_id and pass poll_task_id to client.research.wait_for_completion() and _import_task_sources(). When wait=False (--no-wait), task_id and poll_task_id now both expose the pollable identifier (report_id for Deep Research, start_task_id for Fast Research) alongside report_id and start_task_id.
  • Explicit --wait on research and --report-id / --poll-task-id on research-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 --wait explicitly to agy-gemini-notebook research (consistent with sync --wait, add-source --wait, research-status --wait, audio --wait, and generate --wait) or pass --report-id / --poll-task-id to research-status / notebook_research_status.
    • How: Added --wait to the research CLI subparser, added --report-id and --poll-task-id options to research-status and notebook_research_status, and added regression tests in tests/test_rpc_bridge_and_mcp.py verifying that Deep Research fails if polled with start_task_id and succeeds using report_id.

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 the agy-gemini-notebook CLI work together across setup, grounded Q&A, autonomous Deep Research $\rightarrow$ local .md synthesis, and Studio artifact generation.
    • How: Rendered a 4-step animated walkthrough (assets/demo.gif) and standalone high-resolution previews (assets/sidecar-preview.png and assets/cli-research-preview.png) directly from the live Dark Mode sidecars/notebook_context_panel/ui.html layout and CLI output, and embedded them into a new ## 🎬 Visual Overview & Interactive Demo section at the top of README.md.

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_login invoked notebooklm login without --browser-cookies, which spawned a Playwright-controlled Chromium browser on accounts.google.com using --disable-blink-features=AutomationControlled and ignore_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.toml from notebooklm-py[browser] to notebooklm-py[cookies] (rookie-cookies) and refactored NotebookRpcBridge.login() so it never launches Playwright against accounts.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, supports open_system_browser=True (via Python's webbrowser.open("https://notebooklm.google.com/")) so the user signs in exclusively inside their genuine system browser, and supports gcloud=True (gcloud auth login) for Engine 1.
  • 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, consumer notebooklm.google.com does not yet offer a public OAuth API and relies on internal batchexecute web RPCs (a ToS grey area). Users need transparent, prominent warnings before choosing between Engine 1 and Engine 2.
    • How: Added COMPLIANCE_NOTICE to notebook_status, notebook_login, and auth_required MCP responses; added a dedicated ## ⚖️ Google Terms of Service, OAuth Policy & Dual-Engine Compliance section to README.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-safe Enter handling (!e.isComposing).

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 #1e1f20 cards 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 --muted is 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 added syncHostTheme() to inspect --background luminance on document.documentElement when switching themes.
  • Isolated .venv Python 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 notebooklm because sidecar.json launches server.py using the system python3 (/usr/bin/python3). Although server.py added .venv/lib/python*/site-packages to sys.path in-memory, NotebookRpcBridge.login() spawned [sys.executable, "-m", "notebooklm", "login"] in a child process where sys.executable was still /usr/bin/python3.
    • How: Added NotebookRpcBridge._resolve_python_executable() to resolve PLUGIN_ROOT / ".venv" / "bin" / "python" (and inject .venv PYTHONPATH/PATH), updated server.py to point sys.executable to .venv/bin/python, and added a sidecars/notebook_context_panel/notebooklm.py launcher shim that transparently execves .venv/bin/notebooklm even if an already-running server.py process invokes /usr/bin/python3 -m notebooklm.

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 2 Overview -> Plugins menu and plugin manifest could cause ambiguity with official first-party Google plugins or branding.
    • How: Renamed displayName in plugin.json and display_name / ui_config.views[0].title in sidecars/notebook_context_panel/sidecar.json and ui.html to Gemini Notebook by Chryzalide.
  • Antigravity 2 Sidecar SDK Protocol Compliance (sidecars/notebook_context_panel/server.py, sidecar.json, ui.html):
    • Why: Clicking the plugin inside Overview -> Plugins or clicking the sidecar pill link did nothing for three reasons: (1) Antigravity 2 assigns a dynamic port to sidecars via ANTIGRAVITY_SIDECAR_WEB_PORT, whereas server.py only checked PORT (defaulting to 8765), (2) Antigravity 2 expects the sidecar to write server_info.json (host, port, token, pid) into ANTIGRAVITY_EXECUTABLE_DATA_DIR / ~/.gemini/antigravity/sidecar_data/.../data/server_info.json and serve /preload.js, and (3) the sidecar pill link was missing /ui.html (sidecar://gemini-notebook/notebook_context_panel/ui.html).
    • How: Updated server.py to bind ANTIGRAVITY_SIDECAR_WEB_PORT (falling back to PORT or 8000), write and clean up server_info.json, serve /preload.js and /shell.css, support X-Sidecar-Token CORS/query injection, and use "command": "python3", "args": ["server.py"] in sidecar.json. Updated all sidecar pill links to [Gemini Notebook by Chryzalide](sidecar://gemini-notebook/notebook_context_panel/ui.html).
  • 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.sh and agy-gemini-notebook setup [--login] plus Workflow 0 in SKILL.md and a complete visual Installation & Setup Workflow guide in README.md to walk users through environment creation, Playwright Chromium verification, Antigravity 2 plugin registration, Engine 1/2 authentication, and IDE reload verification.

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 Cloud v1alpha project, notebooklm-py raised an unhandled FileNotFoundError: Storage file not found, which Antigravity 2's MCP client masked behind a generic Encountered error in tool execution: Error executing tool notebook_create message with no direct way to log in from the IDE.
    • How: Added NotebookAuthRequiredError and wrapped MCP tool handlers to return structured, actionable diagnostics (status: "auth_required") instead of crashing tool execution. Added the notebook_login MCP tool (21 tools total), the agy-gemini-notebook login CLI 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).
  • Cross-Workspace Plugin Command Resolution (mcp_config.json, sidecars/notebook_context_panel/sidecar.json):
    • Why & How: Replaced relative command paths (scripts/run_mcp.sh and sidecars/notebook_context_panel/server.py) with dynamic $HOME/.gemini/config/plugins/gemini-notebook resolution while preserving AGY_WORKSPACE_DIR=$(pwd), ensuring the MCP server and Sidecar UI launch reliably from any workspace opened in Antigravity 2 without hardcoding machine-specific 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 Engine v1alpha REST API authenticated via gcloud auth print-access-token) with the community RPC bridge (rpc_bridge.py, powered by notebooklm-py for consumer and enterprise notebooklm.google.com accounts). Automatically falls back to Engine 2 when GCP_PROJECT_NUMBER is not configured, ensuring zero-friction operation for both personal Google accounts and GCP organizations.
  • 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).
  • Documentary Research for Decision Support $\rightarrow$ Local .md Synthesis (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.
  • 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_notebook endpoints—allowing 1-click notebook switching, source-level grounding filters, and inline notebook creation.
  • Standalone CLI & Multi-IDE Transport (src/agy_gemini_notebook/cli.py, scripts/run_mcp.sh):
    • Why & How: Adds the agy-gemini-notebook CLI (status, list, invoke, attach, create, query, research, sync, audio, artifact) and a portable MCP launcher supporting stdio, sse, and streamable-http transports across Google Antigravity 2, VS Code, Cursor, and Claude Code.
  • 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 pytest and ruff.

👤 Author

Souryan Augé


📄 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)

Source distribution for agy-gemini-notebook-plugin 1.5.2
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)

Table of built distributions (wheels) for agy-gemini-notebook-plugin 1.5.2
File Interpreter ABI Platform Actions
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 log

Release 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 log

Security 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.

Select from 2 files

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 log

A 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.

Release history Release notifications | RSS feed

This release

1.5.2 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page