@roomi-fields/notebooklm-mcp 1.3.6 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +22 -22
- package/README.md +71 -34
- package/deployment/INDEX.md +292 -0
- package/deployment/PACKAGE-FILES.txt +180 -0
- package/deployment/QUICK-START.md +100 -0
- package/deployment/docs/01-INSTALL.md +611 -0
- package/deployment/docs/02-CONFIGURATION.md +404 -0
- package/deployment/docs/03-API.md +1691 -0
- package/deployment/docs/04-N8N-INTEGRATION.md +373 -0
- package/deployment/docs/05-TROUBLESHOOTING.md +429 -0
- package/deployment/docs/06-NOTEBOOK-LIBRARY.md +692 -0
- package/deployment/docs/07-AUTO-DISCOVERY.md +236 -0
- package/deployment/docs/08-WSL-USAGE.md +363 -0
- package/deployment/docs/09-MULTI-INTERFACE.md +293 -0
- package/deployment/docs/10-CONTENT-MANAGEMENT.md +421 -0
- package/deployment/docs/11-MULTI-ACCOUNT.md +295 -0
- package/deployment/docs/README.md +207 -0
- package/deployment/scripts/README.md +564 -0
- package/deployment/scripts/install.ps1 +114 -0
- package/deployment/scripts/setup-auth.ps1 +217 -0
- package/deployment/scripts/start-server.ps1 +72 -0
- package/deployment/scripts/stop-server.ps1 +51 -0
- package/deployment/scripts/test-api.ps1 +651 -0
- package/deployment/scripts/test-auth.ps1 +323 -0
- package/deployment/scripts/test-auto-discovery.ps1 +295 -0
- package/deployment/scripts/test-cors.ps1 +398 -0
- package/deployment/scripts/test-errors.ps1 +581 -0
- package/deployment/scripts/test-server.ps1 +140 -0
- package/deployment/scripts/test-sessions.ps1 +426 -0
- package/deployment/scripts/test-validation.ps1 +299 -0
- package/dist/accounts/account-manager.d.ts +163 -0
- package/dist/accounts/account-manager.d.ts.map +1 -0
- package/dist/accounts/account-manager.js +614 -0
- package/dist/accounts/account-manager.js.map +1 -0
- package/dist/accounts/auto-login-manager.d.ts +62 -0
- package/dist/accounts/auto-login-manager.d.ts.map +1 -0
- package/dist/accounts/auto-login-manager.js +537 -0
- package/dist/accounts/auto-login-manager.js.map +1 -0
- package/dist/accounts/crypto.d.ts +45 -0
- package/dist/accounts/crypto.d.ts.map +1 -0
- package/dist/accounts/crypto.js +138 -0
- package/dist/accounts/crypto.js.map +1 -0
- package/dist/accounts/index.d.ts +14 -0
- package/dist/accounts/index.d.ts.map +1 -0
- package/dist/accounts/index.js +14 -0
- package/dist/accounts/index.js.map +1 -0
- package/dist/accounts/types.d.ts +103 -0
- package/dist/accounts/types.d.ts.map +1 -0
- package/dist/accounts/types.js +7 -0
- package/dist/accounts/types.js.map +1 -0
- package/dist/auth/auth-manager.d.ts +9 -2
- package/dist/auth/auth-manager.d.ts.map +1 -1
- package/dist/auth/auth-manager.js +60 -6
- package/dist/auth/auth-manager.js.map +1 -1
- package/dist/auto-discovery/auto-discovery.d.ts.map +1 -1
- package/dist/auto-discovery/auto-discovery.js +2 -1
- package/dist/auto-discovery/auto-discovery.js.map +1 -1
- package/dist/cli/accounts.d.ts +13 -0
- package/dist/cli/accounts.d.ts.map +1 -0
- package/dist/cli/accounts.js +195 -0
- package/dist/cli/accounts.js.map +1 -0
- package/dist/config.d.ts +1 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +24 -0
- package/dist/config.js.map +1 -1
- package/dist/content/content-generator.d.ts +153 -0
- package/dist/content/content-generator.d.ts.map +1 -0
- package/dist/content/content-generator.js +637 -0
- package/dist/content/content-generator.js.map +1 -0
- package/dist/content/content-manager.d.ts +364 -0
- package/dist/content/content-manager.d.ts.map +1 -0
- package/dist/content/content-manager.js +3841 -0
- package/dist/content/content-manager.js.map +1 -0
- package/dist/content/content-templates.d.ts +183 -0
- package/dist/content/content-templates.d.ts.map +1 -0
- package/dist/content/content-templates.js +719 -0
- package/dist/content/content-templates.js.map +1 -0
- package/dist/content/index.d.ts +14 -0
- package/dist/content/index.d.ts.map +1 -0
- package/dist/content/index.js +14 -0
- package/dist/content/index.js.map +1 -0
- package/dist/content/types.d.ts +285 -0
- package/dist/content/types.d.ts.map +1 -0
- package/dist/content/types.js +10 -0
- package/dist/content/types.js.map +1 -0
- package/dist/errors.d.ts +1 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js.map +1 -1
- package/dist/http-wrapper.d.ts +7 -0
- package/dist/http-wrapper.d.ts.map +1 -1
- package/dist/http-wrapper.js +449 -29
- package/dist/http-wrapper.js.map +1 -1
- package/dist/i18n/en.json +120 -0
- package/dist/i18n/fr.json +120 -0
- package/dist/i18n/index.d.ts +168 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/index.js +213 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/index.js +26 -2
- package/dist/index.js.map +1 -1
- package/dist/library/notebook-library.d.ts +4 -0
- package/dist/library/notebook-library.d.ts.map +1 -1
- package/dist/library/notebook-library.js +20 -3
- package/dist/library/notebook-library.js.map +1 -1
- package/dist/session/browser-session.d.ts +35 -8
- package/dist/session/browser-session.d.ts.map +1 -1
- package/dist/session/browser-session.js +243 -28
- package/dist/session/browser-session.js.map +1 -1
- package/dist/session/session-manager.d.ts +6 -0
- package/dist/session/session-manager.d.ts.map +1 -1
- package/dist/session/session-manager.js +46 -14
- package/dist/session/session-manager.js.map +1 -1
- package/dist/session/shared-context-manager.d.ts +3 -3
- package/dist/session/shared-context-manager.d.ts.map +1 -1
- package/dist/session/shared-context-manager.js +10 -7
- package/dist/session/shared-context-manager.js.map +1 -1
- package/dist/stdio-http-proxy.d.ts +24 -0
- package/dist/stdio-http-proxy.d.ts.map +1 -0
- package/dist/stdio-http-proxy.js +592 -0
- package/dist/stdio-http-proxy.js.map +1 -0
- package/dist/tools/index.d.ts +106 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +1028 -7
- package/dist/tools/index.js.map +1 -1
- package/dist/types.d.ts +81 -17
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/citation-extractor.d.ts +66 -0
- package/dist/utils/citation-extractor.d.ts.map +1 -0
- package/dist/utils/citation-extractor.js +492 -0
- package/dist/utils/citation-extractor.js.map +1 -0
- package/dist/utils/page-utils.d.ts +8 -0
- package/dist/utils/page-utils.d.ts.map +1 -1
- package/dist/utils/page-utils.js +112 -8
- package/dist/utils/page-utils.js.map +1 -1
- package/docs/ADDING_A_LANGUAGE.md +209 -0
- package/docs/ARCHITECTURE_MIGRATION_STUDY.md +894 -0
- package/docs/CHROME_PROFILE_LIMITATION.md +15 -1
- package/docs/MULTI_ACCOUNT_SYSTEM.md +304 -0
- package/package.json +15 -12
- package/scripts/archive/add-and-activate-notebook.ps1 +31 -0
- package/scripts/archive/add-new-notebook.ps1 +25 -0
- package/scripts/archive/add-rom1pey.ps1 +2 -0
- package/scripts/archive/add-rpmonster.ps1 +2 -0
- package/scripts/archive/add-source-debug.ps1 +11 -0
- package/scripts/archive/add-source-e2e.ps1 +28 -0
- package/scripts/archive/add-source-visible.ps1 +11 -0
- package/scripts/archive/add-test-notebook.ps1 +13 -0
- package/scripts/archive/add-test-source.ps1 +50 -0
- package/scripts/archive/capture-screen.ps1 +11 -0
- package/scripts/archive/change-language.mjs +45 -0
- package/scripts/archive/change-language.ts +44 -0
- package/scripts/archive/check-account.ps1 +19 -0
- package/scripts/archive/check-notebook-2.ps1 +8 -0
- package/scripts/archive/check-test-notebook.ps1 +11 -0
- package/scripts/archive/create-notebook-auto.ps1 +31 -0
- package/scripts/archive/create-notebook.ps1 +8 -0
- package/scripts/archive/create-rom1pey-notebook.ps1 +19 -0
- package/scripts/archive/create-rom1pey.ps1 +8 -0
- package/scripts/archive/create-test-notebook-fresh.ps1 +21 -0
- package/scripts/archive/create-test-notebook.ps1 +16 -0
- package/scripts/archive/debug-add-source-auto.ps1 +29 -0
- package/scripts/archive/debug-add-source.ps1 +19 -0
- package/scripts/archive/debug-add-text-source.ps1 +47 -0
- package/scripts/archive/debug-home.ps1 +10 -0
- package/scripts/archive/debug-selectors.ps1 +55 -0
- package/scripts/archive/debug-sources-panel.ps1 +22 -0
- package/scripts/archive/debug-ui.ps1 +17 -0
- package/scripts/archive/discover-home.ps1 +26 -0
- package/scripts/archive/kill-automation-chrome.ps1 +37 -0
- package/scripts/archive/list-my-notebooks.ps1 +27 -0
- package/scripts/archive/navigate-home-visible.ps1 +23 -0
- package/scripts/archive/navigate-home.ps1 +15 -0
- package/scripts/archive/run-e2e-english.ps1 +111 -0
- package/scripts/archive/run-e2e-rom1pey-v2.ps1 +122 -0
- package/scripts/archive/run-e2e-rom1pey.ps1 +117 -0
- package/scripts/archive/setup-english-test.ps1 +36 -0
- package/scripts/archive/setup-test-notebook.ps1 +71 -0
- package/scripts/archive/simple-add-source.ps1 +14 -0
- package/scripts/archive/t10.ps1 +2 -0
- package/scripts/archive/t20.ps1 +4 -0
- package/scripts/archive/t30.ps1 +9 -0
- package/scripts/archive/t31.ps1 +11 -0
- package/scripts/archive/t32.ps1 +6 -0
- package/scripts/archive/t39.ps1 +5 -0
- package/scripts/archive/t40.ps1 +5 -0
- package/scripts/archive/t53.ps1 +12 -0
- package/scripts/archive/t54.ps1 +12 -0
- package/scripts/archive/t55.ps1 +11 -0
- package/scripts/archive/t9.ps1 +1 -0
- package/scripts/archive/test-access.ps1 +28 -0
- package/scripts/archive/test-add-delete-source.ps1 +64 -0
- package/scripts/archive/test-add-source-visible.ps1 +16 -0
- package/scripts/archive/test-add-source.ps1 +19 -0
- package/scripts/archive/test-add-text-debug.ps1 +28 -0
- package/scripts/archive/test-add-text-source.ps1 +8 -0
- package/scripts/archive/test-add-url-source.ps1 +7 -0
- package/scripts/archive/test-ask-ascii.ps1 +20 -0
- package/scripts/archive/test-ask-cnv.ps1 +20 -0
- package/scripts/archive/test-ask-headed.ps1 +51 -0
- package/scripts/archive/test-ask-ifs.ps1 +16 -0
- package/scripts/archive/test-ask-now.ps1 +24 -0
- package/scripts/archive/test-ask-real.ps1 +19 -0
- package/scripts/archive/test-ask-visible.ps1 +20 -0
- package/scripts/archive/test-create-notebook.ps1 +8 -0
- package/scripts/archive/test-create-then-add.ps1 +17 -0
- package/scripts/archive/test-delete-source.ps1 +41 -0
- package/scripts/archive/test-e2e-notebook.ps1 +21 -0
- package/scripts/archive/test-english-notebook.ps1 +20 -0
- package/scripts/archive/test-english.ps1 +7 -0
- package/scripts/archive/test-full-custom-instructions.ps1 +40 -0
- package/scripts/archive/test-full-infographic.ps1 +34 -0
- package/scripts/archive/test-full-language.ps1 +21 -0
- package/scripts/archive/test-full-presentation.ps1 +85 -0
- package/scripts/archive/test-full-report.ps1 +34 -0
- package/scripts/archive/test-full-source-selection.ps1 +35 -0
- package/scripts/archive/test-full-video-brief.ps1 +22 -0
- package/scripts/archive/test-full-video-explainer.ps1 +22 -0
- package/scripts/archive/test-full-video-styles.ps1 +37 -0
- package/scripts/archive/test-generate-report.ps1 +15 -0
- package/scripts/archive/test-generate-study-guide.ps1 +11 -0
- package/scripts/archive/test-headed-ask.ps1 +13 -0
- package/scripts/archive/test-headed-now.ps1 +9 -0
- package/scripts/archive/test-headed.ps1 +9 -0
- package/scripts/archive/test-hello.ps1 +7 -0
- package/scripts/archive/test-i18n-studio.ps1 +8 -0
- package/scripts/archive/test-i18n.ps1 +7 -0
- package/scripts/archive/test-manual-headed.ps1 +26 -0
- package/scripts/archive/test-mathieu-quota.ps1 +8 -0
- package/scripts/archive/test-notebook-1.ps1 +10 -0
- package/scripts/archive/test-notebook-2-sources.ps1 +12 -0
- package/scripts/archive/test-notebook1.ps1 +14 -0
- package/scripts/archive/test-personal-notebook.ps1 +14 -0
- package/scripts/archive/test-rate-limit.ps1 +19 -0
- package/scripts/archive/test-real-ask.ps1 +50 -0
- package/scripts/archive/test-real-ask2.ps1 +30 -0
- package/scripts/archive/test-rom1pey.ps1 +7 -0
- package/scripts/archive/test-rotation-complete.ps1 +14 -0
- package/scripts/archive/test-rotation.ps1 +8 -0
- package/scripts/archive/test-show-browser.ps1 +39 -0
- package/scripts/archive/test-update-notebook.ps1 +4 -0
- package/scripts/archive/verify-language-slow.ps1 +21 -0
- package/scripts/archive/verify-language.ps1 +15 -0
- package/scripts/check-server.ps1 +46 -0
- package/scripts/mcp-wsl-helper.sh +146 -0
- package/scripts/start-server.ps1 +94 -0
- package/scripts/stop-server.ps1 +30 -0
- package/scripts/switch-account-language.sh +191 -0
- package/scripts/test-account.ps1 +58 -0
- package/dist/__tests__/cleanup-manager.test.d.ts +0 -2
- package/dist/__tests__/cleanup-manager.test.d.ts.map +0 -1
- package/dist/__tests__/cleanup-manager.test.js +0 -341
- package/dist/__tests__/cleanup-manager.test.js.map +0 -1
- package/dist/__tests__/config-parsing.test.d.ts +0 -2
- package/dist/__tests__/config-parsing.test.d.ts.map +0 -1
- package/dist/__tests__/config-parsing.test.js +0 -338
- package/dist/__tests__/config-parsing.test.js.map +0 -1
- package/dist/__tests__/config.test.d.ts +0 -2
- package/dist/__tests__/config.test.d.ts.map +0 -1
- package/dist/__tests__/config.test.js +0 -267
- package/dist/__tests__/config.test.js.map +0 -1
- package/dist/__tests__/errors.test.d.ts +0 -2
- package/dist/__tests__/errors.test.d.ts.map +0 -1
- package/dist/__tests__/errors.test.js +0 -166
- package/dist/__tests__/errors.test.js.map +0 -1
- package/dist/__tests__/logger.test.d.ts +0 -2
- package/dist/__tests__/logger.test.d.ts.map +0 -1
- package/dist/__tests__/logger.test.js +0 -324
- package/dist/__tests__/logger.test.js.map +0 -1
- package/dist/__tests__/page-utils.test.d.ts +0 -2
- package/dist/__tests__/page-utils.test.d.ts.map +0 -1
- package/dist/__tests__/page-utils.test.js +0 -349
- package/dist/__tests__/page-utils.test.js.map +0 -1
- package/dist/__tests__/setup-verification.test.d.ts +0 -2
- package/dist/__tests__/setup-verification.test.d.ts.map +0 -1
- package/dist/__tests__/setup-verification.test.js +0 -15
- package/dist/__tests__/setup-verification.test.js.map +0 -1
- package/dist/__tests__/stealth-utils.test.d.ts +0 -2
- package/dist/__tests__/stealth-utils.test.d.ts.map +0 -1
- package/dist/__tests__/stealth-utils.test.js +0 -413
- package/dist/__tests__/stealth-utils.test.js.map +0 -1
- package/dist/__tests__/types.test.d.ts +0 -2
- package/dist/__tests__/types.test.d.ts.map +0 -1
- package/dist/__tests__/types.test.js +0 -461
- package/dist/__tests__/types.test.js.map +0 -1
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
# Multi-Interface Mode (v1.3.6+)
|
|
2
|
+
|
|
3
|
+
> Run Claude Desktop AND HTTP API simultaneously with a single Chrome instance
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
The **Stdio-HTTP Proxy** enables Claude Desktop to communicate with the HTTP server, solving the Chrome profile locking issue without requiring separate browser profiles.
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
13
|
+
│ ARCHITECTURE │
|
|
14
|
+
├─────────────────────────────────────────────────────────────────┤
|
|
15
|
+
│ │
|
|
16
|
+
│ Claude Desktop ─────► Stdio-HTTP Proxy ────┐ │
|
|
17
|
+
│ (no Chrome) │ │
|
|
18
|
+
│ ▼ │
|
|
19
|
+
│ n8n / Zapier ──────────────────────► HTTP Server ──► Chrome │
|
|
20
|
+
│ │ │
|
|
21
|
+
│ curl / Postman ────────────────────────────┘ │
|
|
22
|
+
│ │
|
|
23
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
**Benefits:**
|
|
27
|
+
|
|
28
|
+
- ✅ Single Chrome instance (no profile conflicts)
|
|
29
|
+
- ✅ Shared authentication state
|
|
30
|
+
- ✅ Claude Desktop + HTTP API running simultaneously
|
|
31
|
+
- ✅ No additional disk space for separate profiles
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Quick Start
|
|
36
|
+
|
|
37
|
+
### Step 1: Start the HTTP Server
|
|
38
|
+
|
|
39
|
+
> **⚠️ CRITICAL: The HTTP server MUST run on Windows (not WSL)**
|
|
40
|
+
>
|
|
41
|
+
> The server uses Playwright to control Chrome. If you run the server from WSL,
|
|
42
|
+
> it will look for Chrome at Linux paths (`/opt/google/chrome/chrome`) instead
|
|
43
|
+
> of Windows paths and **will fail**.
|
|
44
|
+
>
|
|
45
|
+
> Always start the HTTP server from **PowerShell** or **CMD**, not from WSL bash.
|
|
46
|
+
|
|
47
|
+
**From PowerShell (recommended):**
|
|
48
|
+
|
|
49
|
+
```powershell
|
|
50
|
+
cd D:\Claude\notebooklm-mcp-http
|
|
51
|
+
|
|
52
|
+
# Build if needed
|
|
53
|
+
npm run build
|
|
54
|
+
|
|
55
|
+
# Start HTTP server (foreground)
|
|
56
|
+
node dist/http-wrapper.js
|
|
57
|
+
|
|
58
|
+
# Or in background (survives terminal close):
|
|
59
|
+
Start-Process -NoNewWindow node -ArgumentList "dist/http-wrapper.js"
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
**From WSL (recommended - use helper script):**
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
# Helper script handles everything correctly
|
|
66
|
+
HELPER=/mnt/d/Claude/notebooklm-mcp-http/scripts/mcp-wsl-helper.sh
|
|
67
|
+
|
|
68
|
+
$HELPER start # Start server (Windows process)
|
|
69
|
+
$HELPER health # Check health
|
|
70
|
+
$HELPER auth # Authenticate (opens Chrome)
|
|
71
|
+
$HELPER ask "question" notebook-id # Ask a question
|
|
72
|
+
$HELPER stop # Stop server
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
**From WSL (manual - launches Windows node process):**
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
# This launches node.exe on Windows, NOT node in WSL
|
|
79
|
+
powershell.exe -Command "Start-Process -NoNewWindow -FilePath 'node' -ArgumentList 'D:/Claude/notebooklm-mcp-http/dist/http-wrapper.js' -WorkingDirectory 'D:/Claude/notebooklm-mcp-http'"
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Step 2: Configure Claude Desktop
|
|
83
|
+
|
|
84
|
+
Edit your Claude Desktop config file:
|
|
85
|
+
|
|
86
|
+
**Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
|
|
87
|
+
**macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
88
|
+
**Linux:** `~/.config/Claude/claude_desktop_config.json`
|
|
89
|
+
|
|
90
|
+
```json
|
|
91
|
+
{
|
|
92
|
+
"mcpServers": {
|
|
93
|
+
"notebooklm": {
|
|
94
|
+
"command": "node",
|
|
95
|
+
"args": ["D:/Claude/notebooklm-mcp-http/dist/stdio-http-proxy.js"],
|
|
96
|
+
"env": {
|
|
97
|
+
"MCP_HTTP_URL": "http://localhost:3000"
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
> **Note:** Replace the path with your actual installation path.
|
|
105
|
+
|
|
106
|
+
### Step 3: Restart Claude Desktop
|
|
107
|
+
|
|
108
|
+
Close and reopen Claude Desktop. The proxy will connect to your HTTP server.
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## Configuration Options
|
|
113
|
+
|
|
114
|
+
### Environment Variables
|
|
115
|
+
|
|
116
|
+
| Variable | Default | Description |
|
|
117
|
+
| -------------- | ----------------------- | -------------------- |
|
|
118
|
+
| `MCP_HTTP_URL` | `http://localhost:3000` | HTTP server URL |
|
|
119
|
+
| `HTTP_PORT` | `3000` | Port for HTTP server |
|
|
120
|
+
| `HTTP_HOST` | `0.0.0.0` | Host for HTTP server |
|
|
121
|
+
|
|
122
|
+
### Custom Port Example
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
# Terminal 1: HTTP server on port 4000
|
|
126
|
+
HTTP_PORT=4000 npm run start:http
|
|
127
|
+
|
|
128
|
+
# Claude Desktop config
|
|
129
|
+
{
|
|
130
|
+
"mcpServers": {
|
|
131
|
+
"notebooklm": {
|
|
132
|
+
"command": "node",
|
|
133
|
+
"args": ["/path/to/dist/stdio-http-proxy.js"],
|
|
134
|
+
"env": {
|
|
135
|
+
"MCP_HTTP_URL": "http://localhost:4000"
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## NPM Scripts
|
|
145
|
+
|
|
146
|
+
| Script | Description |
|
|
147
|
+
| -------------- | -------------------------------- |
|
|
148
|
+
| `start:http` | Start HTTP server (foreground) |
|
|
149
|
+
| `start:proxy` | Start stdio proxy (for testing) |
|
|
150
|
+
| `daemon:start` | Start HTTP server as PM2 daemon |
|
|
151
|
+
| `daemon:stop` | Stop PM2 daemon |
|
|
152
|
+
| `daemon:logs` | View daemon logs |
|
|
153
|
+
| `dev:http` | Development mode with hot reload |
|
|
154
|
+
| `dev:proxy` | Development mode for proxy |
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## Usage Scenarios
|
|
159
|
+
|
|
160
|
+
### Scenario 1: Claude Desktop Only (via Proxy)
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
# Start HTTP server
|
|
164
|
+
npm run daemon:start
|
|
165
|
+
|
|
166
|
+
# Configure Claude Desktop with proxy (see above)
|
|
167
|
+
# Use Claude Desktop normally
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### Scenario 2: HTTP API Only (n8n, Zapier)
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
# Start HTTP server
|
|
174
|
+
npm run start:http
|
|
175
|
+
|
|
176
|
+
# Use HTTP API
|
|
177
|
+
curl -X POST http://localhost:3000/ask \
|
|
178
|
+
-H "Content-Type: application/json" \
|
|
179
|
+
-d '{"question": "What is X?", "notebook_id": "my-notebook"}'
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### Scenario 3: Both Simultaneously
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
# Terminal 1: HTTP server (owns Chrome)
|
|
186
|
+
npm run daemon:start
|
|
187
|
+
|
|
188
|
+
# Claude Desktop: uses proxy (configured above)
|
|
189
|
+
# n8n/Zapier: uses HTTP API directly
|
|
190
|
+
# Both work simultaneously!
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## Troubleshooting
|
|
196
|
+
|
|
197
|
+
### Proxy can't connect to HTTP server
|
|
198
|
+
|
|
199
|
+
```
|
|
200
|
+
Cannot connect to HTTP server at http://localhost:3000
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
**Solution:** Ensure HTTP server is running:
|
|
204
|
+
|
|
205
|
+
```bash
|
|
206
|
+
npm run daemon:status # Check if running
|
|
207
|
+
npm run daemon:start # Start if not
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### Authentication issues
|
|
211
|
+
|
|
212
|
+
The HTTP server manages authentication. If you need to re-authenticate:
|
|
213
|
+
|
|
214
|
+
```bash
|
|
215
|
+
# Via HTTP API
|
|
216
|
+
curl -X POST http://localhost:3000/setup-auth
|
|
217
|
+
|
|
218
|
+
# Or use Claude Desktop (via proxy)
|
|
219
|
+
# Ask: "Setup NotebookLM authentication"
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
### WSL Users - Chrome not found
|
|
223
|
+
|
|
224
|
+
```
|
|
225
|
+
Error: Playwright cannot find Chrome at /opt/google/chrome/chrome
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
**This means you started the HTTP server from WSL instead of Windows.**
|
|
229
|
+
|
|
230
|
+
The HTTP server MUST run as a Windows process to access Chrome. Fix:
|
|
231
|
+
|
|
232
|
+
```bash
|
|
233
|
+
# Use the helper script (recommended)
|
|
234
|
+
HELPER=/mnt/d/Claude/notebooklm-mcp-http/scripts/mcp-wsl-helper.sh
|
|
235
|
+
|
|
236
|
+
# 1. Stop any running server
|
|
237
|
+
$HELPER stop
|
|
238
|
+
|
|
239
|
+
# 2. Start server (launches Windows process)
|
|
240
|
+
$HELPER start
|
|
241
|
+
|
|
242
|
+
# 3. Verify it works
|
|
243
|
+
$HELPER health
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
**Or manually:**
|
|
247
|
+
|
|
248
|
+
```bash
|
|
249
|
+
# 1. Kill any WSL server
|
|
250
|
+
pkill -f http-wrapper
|
|
251
|
+
|
|
252
|
+
# 2. Start as Windows process
|
|
253
|
+
powershell.exe -Command "Start-Process -NoNewWindow -FilePath 'node' -ArgumentList 'D:/Claude/notebooklm-mcp-http/dist/http-wrapper.js' -WorkingDirectory 'D:/Claude/notebooklm-mcp-http'"
|
|
254
|
+
|
|
255
|
+
# 3. Verify (via PowerShell, not curl from WSL)
|
|
256
|
+
powershell.exe -Command "Invoke-RestMethod -Uri 'http://localhost:3000/health'"
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
> **Note:** `curl` from WSL may not reach Windows localhost due to network isolation.
|
|
260
|
+
> Always use `powershell.exe` or the helper script.
|
|
261
|
+
|
|
262
|
+
---
|
|
263
|
+
|
|
264
|
+
## Comparison: Proxy vs Native Stdio
|
|
265
|
+
|
|
266
|
+
| Feature | Native Stdio | Stdio-HTTP Proxy |
|
|
267
|
+
| -------------------- | ------------------ | -------------------- |
|
|
268
|
+
| Chrome instance | Own instance | Uses HTTP server's |
|
|
269
|
+
| Run with HTTP server | ❌ Chrome conflict | ✅ Works |
|
|
270
|
+
| Authentication | Own profile | Shared with HTTP |
|
|
271
|
+
| Dependencies | Full (Playwright) | Minimal (fetch only) |
|
|
272
|
+
| Latency | Direct | +1 HTTP hop |
|
|
273
|
+
| Use case | Standalone | Multi-interface |
|
|
274
|
+
|
|
275
|
+
---
|
|
276
|
+
|
|
277
|
+
## Future: Multi-Profile Mode (v1.4.0)
|
|
278
|
+
|
|
279
|
+
The multi-profile feature (separate Chrome profiles per mode) is planned for v1.4.0 but is a **separate feature** from multi-interface:
|
|
280
|
+
|
|
281
|
+
- **Multi-Interface (v1.3.6):** Single Chrome, multiple clients via proxy
|
|
282
|
+
- **Multi-Profile (v1.4.0):** Multiple Chrome profiles for independent auth
|
|
283
|
+
|
|
284
|
+
Most users should use the proxy approach for simplicity.
|
|
285
|
+
|
|
286
|
+
---
|
|
287
|
+
|
|
288
|
+
## See Also
|
|
289
|
+
|
|
290
|
+
- [Installation Guide](./01-INSTALL.md)
|
|
291
|
+
- [API Reference](./03-API.md)
|
|
292
|
+
- [Chrome Limitation](../../docs/CHROME_PROFILE_LIMITATION.md)
|
|
293
|
+
- [WSL Usage](./08-WSL-USAGE.md)
|
|
@@ -0,0 +1,421 @@
|
|
|
1
|
+
# Content Management - NotebookLM MCP
|
|
2
|
+
|
|
3
|
+
> Add sources and generate audio overviews (podcasts)
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
The Content Management module enables you to:
|
|
10
|
+
|
|
11
|
+
1. **Add Sources** - Upload documents, URLs, text, YouTube videos to notebooks
|
|
12
|
+
2. **Delete Sources** - Remove sources from notebooks
|
|
13
|
+
3. **Generate Audio Overview** - Create podcast-style audio discussions (REAL NotebookLM feature)
|
|
14
|
+
4. **Download Audio** - Save generated audio files locally
|
|
15
|
+
5. **Create Notes** - Add user-created annotations to notebooks
|
|
16
|
+
6. **List Content** - View sources and generated content
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Important: What We Actually Support
|
|
21
|
+
|
|
22
|
+
**REAL NotebookLM Features (fully integrated):**
|
|
23
|
+
|
|
24
|
+
- Audio Overview generation - Uses NotebookLM's actual podcast feature
|
|
25
|
+
- Audio download - Downloads the real generated audio file
|
|
26
|
+
- Source management - Add files, URLs, text, YouTube videos
|
|
27
|
+
- Q&A with citations - Uses NotebookLM's actual chat
|
|
28
|
+
|
|
29
|
+
**NOT Supported (removed in v1.4.2):**
|
|
30
|
+
|
|
31
|
+
The following were removed because they were NOT real NotebookLM integrations. They were just sending prompts to the chat, which you can do yourself with `ask_question`:
|
|
32
|
+
|
|
33
|
+
- ~~Briefing Doc~~ - Just asked chat to generate a summary
|
|
34
|
+
- ~~Study Guide~~ - Just asked chat to create study materials
|
|
35
|
+
- ~~FAQ~~ - Just asked chat to generate FAQs
|
|
36
|
+
- ~~Timeline~~ - Just asked chat to create a timeline
|
|
37
|
+
- ~~Table of Contents~~ - Just asked chat to create a TOC
|
|
38
|
+
|
|
39
|
+
If you need these, simply use `ask_question` with your own prompt like "Create a study guide" or "Generate an FAQ".
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Quick Start
|
|
44
|
+
|
|
45
|
+
### Add a URL Source
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
curl -X POST http://localhost:3000/content/sources \
|
|
49
|
+
-H "Content-Type: application/json" \
|
|
50
|
+
-d '{
|
|
51
|
+
"source_type": "url",
|
|
52
|
+
"url": "https://example.com/article"
|
|
53
|
+
}'
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Generate Audio Overview
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
curl -X POST http://localhost:3000/content/generate \
|
|
60
|
+
-H "Content-Type: application/json" \
|
|
61
|
+
-d '{
|
|
62
|
+
"content_type": "audio_overview",
|
|
63
|
+
"custom_instructions": "Focus on practical tips"
|
|
64
|
+
}'
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Download Audio
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
curl "http://localhost:3000/content/download?content_type=audio_overview"
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Source Types
|
|
76
|
+
|
|
77
|
+
| Type | Description | Required Field |
|
|
78
|
+
| -------------- | --------------------------- | -------------- |
|
|
79
|
+
| `file` | Local file upload | `file_path` |
|
|
80
|
+
| `url` | Web page URL | `url` |
|
|
81
|
+
| `text` | Plain text / pasted content | `text` |
|
|
82
|
+
| `youtube` | YouTube video URL | `url` |
|
|
83
|
+
| `google_drive` | Google Drive document link | `url` |
|
|
84
|
+
|
|
85
|
+
### Examples
|
|
86
|
+
|
|
87
|
+
**Upload a local file:**
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
curl -X POST http://localhost:3000/content/sources \
|
|
91
|
+
-H "Content-Type: application/json" \
|
|
92
|
+
-d '{
|
|
93
|
+
"source_type": "file",
|
|
94
|
+
"file_path": "/path/to/document.pdf",
|
|
95
|
+
"title": "My PDF Document"
|
|
96
|
+
}'
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
**Add pasted text:**
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
curl -X POST http://localhost:3000/content/sources \
|
|
103
|
+
-H "Content-Type: application/json" \
|
|
104
|
+
-d '{
|
|
105
|
+
"source_type": "text",
|
|
106
|
+
"text": "Your document content here...",
|
|
107
|
+
"title": "Research Notes"
|
|
108
|
+
}'
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
**Add YouTube video:**
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
curl -X POST http://localhost:3000/content/sources \
|
|
115
|
+
-H "Content-Type: application/json" \
|
|
116
|
+
-d '{
|
|
117
|
+
"source_type": "youtube",
|
|
118
|
+
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
|
|
119
|
+
}'
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## Deleting Sources
|
|
125
|
+
|
|
126
|
+
Remove sources from notebooks using the delete endpoint.
|
|
127
|
+
|
|
128
|
+
### Delete by ID
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
curl -X DELETE "http://localhost:3000/content/sources/source-123"
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### Delete by Name
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
curl -X DELETE "http://localhost:3000/content/sources?source_name=My%20Document"
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
**Response:**
|
|
141
|
+
|
|
142
|
+
```json
|
|
143
|
+
{
|
|
144
|
+
"success": true,
|
|
145
|
+
"data": {
|
|
146
|
+
"success": true,
|
|
147
|
+
"sourceId": "source-123",
|
|
148
|
+
"sourceName": "My Document"
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
**Notes:**
|
|
154
|
+
|
|
155
|
+
- Use `list_content` first to find source IDs and names
|
|
156
|
+
- Source names support partial matching (case-insensitive)
|
|
157
|
+
- This action is irreversible - sources are permanently deleted
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
## Audio Overview (Podcast)
|
|
162
|
+
|
|
163
|
+
The audio overview creates a podcast-style discussion between two AI hosts about your notebook content. This is a REAL NotebookLM feature that generates actual audio.
|
|
164
|
+
|
|
165
|
+
### Generate Audio
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
curl -X POST http://localhost:3000/content/generate \
|
|
169
|
+
-H "Content-Type: application/json" \
|
|
170
|
+
-d '{
|
|
171
|
+
"content_type": "audio_overview",
|
|
172
|
+
"custom_instructions": "Focus on key concepts for beginners, use simple language"
|
|
173
|
+
}'
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
**Custom Instructions Ideas:**
|
|
177
|
+
|
|
178
|
+
- "Focus on practical applications"
|
|
179
|
+
- "Emphasize the historical context"
|
|
180
|
+
- "Make it accessible to students"
|
|
181
|
+
- "Highlight the key takeaways"
|
|
182
|
+
|
|
183
|
+
**Note:** Audio generation takes 5-10 minutes. The API will wait for completion.
|
|
184
|
+
|
|
185
|
+
### Download Audio
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
# Get audio file
|
|
189
|
+
curl "http://localhost:3000/content/download?content_type=audio_overview"
|
|
190
|
+
|
|
191
|
+
# Save to specific path
|
|
192
|
+
curl "http://localhost:3000/content/download?content_type=audio_overview&output_path=/downloads/podcast.mp3"
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
**Response:**
|
|
196
|
+
|
|
197
|
+
```json
|
|
198
|
+
{
|
|
199
|
+
"success": true,
|
|
200
|
+
"filePath": "/downloads/podcast.wav",
|
|
201
|
+
"mimeType": "audio/wav"
|
|
202
|
+
}
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
## Create Notes
|
|
208
|
+
|
|
209
|
+
Notes are user-created annotations that appear in the NotebookLM Studio panel. They allow you to save research findings, summaries, key insights, or any custom content alongside your sources.
|
|
210
|
+
|
|
211
|
+
### Create a Note
|
|
212
|
+
|
|
213
|
+
```bash
|
|
214
|
+
curl -X POST http://localhost:3000/content/notes \
|
|
215
|
+
-H "Content-Type: application/json" \
|
|
216
|
+
-d '{
|
|
217
|
+
"title": "Key Findings Summary",
|
|
218
|
+
"content": "## Main Points\n\n1. First important finding\n2. Second key insight\n3. Conclusion and next steps"
|
|
219
|
+
}'
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
**Response:**
|
|
223
|
+
|
|
224
|
+
```json
|
|
225
|
+
{
|
|
226
|
+
"success": true,
|
|
227
|
+
"data": {
|
|
228
|
+
"success": true,
|
|
229
|
+
"noteTitle": "Key Findings Summary",
|
|
230
|
+
"status": "created"
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
**Parameters:**
|
|
236
|
+
|
|
237
|
+
| Parameter | Type | Required | Description |
|
|
238
|
+
| -------------- | ------ | -------- | -------------------------------------------- |
|
|
239
|
+
| `title` | string | Yes | Title of the note |
|
|
240
|
+
| `content` | string | Yes | Content/body of the note (supports markdown) |
|
|
241
|
+
| `notebook_url` | string | No | Target notebook URL |
|
|
242
|
+
| `session_id` | string | No | Reuse existing session |
|
|
243
|
+
|
|
244
|
+
**Use Cases:**
|
|
245
|
+
|
|
246
|
+
- Save research summaries from NotebookLM conversations
|
|
247
|
+
- Create custom annotations for specific sections
|
|
248
|
+
- Store key quotes and references
|
|
249
|
+
- Build a structured outline from notebook content
|
|
250
|
+
|
|
251
|
+
### MCP Tool Usage
|
|
252
|
+
|
|
253
|
+
If using Claude Code or Claude Desktop:
|
|
254
|
+
|
|
255
|
+
```
|
|
256
|
+
create_note(title="My Research Note", content="Key findings from the analysis...")
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
---
|
|
260
|
+
|
|
261
|
+
## Listing Content
|
|
262
|
+
|
|
263
|
+
View all sources and generated content in a notebook:
|
|
264
|
+
|
|
265
|
+
```bash
|
|
266
|
+
curl http://localhost:3000/content
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
**Response:**
|
|
270
|
+
|
|
271
|
+
```json
|
|
272
|
+
{
|
|
273
|
+
"success": true,
|
|
274
|
+
"sources": [
|
|
275
|
+
{
|
|
276
|
+
"id": "source-1",
|
|
277
|
+
"name": "Introduction.pdf",
|
|
278
|
+
"type": "document",
|
|
279
|
+
"status": "ready"
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"id": "source-2",
|
|
283
|
+
"name": "https://example.com",
|
|
284
|
+
"type": "url",
|
|
285
|
+
"status": "ready"
|
|
286
|
+
}
|
|
287
|
+
],
|
|
288
|
+
"generatedContent": [
|
|
289
|
+
{
|
|
290
|
+
"id": "audio-overview",
|
|
291
|
+
"type": "audio_overview",
|
|
292
|
+
"name": "Audio Overview",
|
|
293
|
+
"status": "ready",
|
|
294
|
+
"createdAt": "2025-12-24T10:30:00Z"
|
|
295
|
+
}
|
|
296
|
+
],
|
|
297
|
+
"sourceCount": 2,
|
|
298
|
+
"hasAudioOverview": true
|
|
299
|
+
}
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
---
|
|
303
|
+
|
|
304
|
+
## MCP Tool Usage
|
|
305
|
+
|
|
306
|
+
If using Claude Code or Claude Desktop:
|
|
307
|
+
|
|
308
|
+
### Add Source
|
|
309
|
+
|
|
310
|
+
```
|
|
311
|
+
add_source(source_type="url", url="https://example.com")
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
### Delete Source
|
|
315
|
+
|
|
316
|
+
```
|
|
317
|
+
delete_source(source_name="My Document")
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
or
|
|
321
|
+
|
|
322
|
+
```
|
|
323
|
+
delete_source(source_id="source-123")
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
### Generate Audio
|
|
327
|
+
|
|
328
|
+
```
|
|
329
|
+
generate_content(content_type="audio_overview", custom_instructions="Focus on key points")
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
### List Content
|
|
333
|
+
|
|
334
|
+
```
|
|
335
|
+
list_content()
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
### Download Audio
|
|
339
|
+
|
|
340
|
+
```
|
|
341
|
+
download_content(content_type="audio_overview", output_path="/path/to/save.mp3")
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
---
|
|
345
|
+
|
|
346
|
+
## Workflow Example
|
|
347
|
+
|
|
348
|
+
### Research Workflow
|
|
349
|
+
|
|
350
|
+
1. Add multiple sources:
|
|
351
|
+
|
|
352
|
+
```bash
|
|
353
|
+
# Add primary source
|
|
354
|
+
curl -X POST http://localhost:3000/content/sources \
|
|
355
|
+
-d '{"source_type":"url","url":"https://research-paper.com"}'
|
|
356
|
+
|
|
357
|
+
# Add supporting document
|
|
358
|
+
curl -X POST http://localhost:3000/content/sources \
|
|
359
|
+
-d '{"source_type":"file","file_path":"/docs/notes.pdf"}'
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
2. Generate audio overview:
|
|
363
|
+
|
|
364
|
+
```bash
|
|
365
|
+
curl -X POST http://localhost:3000/content/generate \
|
|
366
|
+
-d '{"content_type":"audio_overview","custom_instructions":"Summarize key findings for researchers"}'
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
3. Download for offline listening:
|
|
370
|
+
```bash
|
|
371
|
+
curl "http://localhost:3000/content/download?content_type=audio_overview&output_path=research.mp3"
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
---
|
|
375
|
+
|
|
376
|
+
## Error Handling
|
|
377
|
+
|
|
378
|
+
### Common Errors
|
|
379
|
+
|
|
380
|
+
| Error | Cause | Solution |
|
|
381
|
+
| ------------------------ | ---------------------- | ------------------------------- |
|
|
382
|
+
| "Source type required" | Missing `source_type` | Add the `source_type` parameter |
|
|
383
|
+
| "File not found" | Invalid `file_path` | Check file path exists |
|
|
384
|
+
| "Audio not ready" | Audio still generating | Wait and retry |
|
|
385
|
+
| "No sources in notebook" | Empty notebook | Add sources first |
|
|
386
|
+
|
|
387
|
+
### Timeout Handling
|
|
388
|
+
|
|
389
|
+
Audio generation can take 5-10 minutes. The API will wait up to 10 minutes for completion. For long operations, consider:
|
|
390
|
+
|
|
391
|
+
1. Using `session_id` to maintain context
|
|
392
|
+
2. Polling `list_content` to check status
|
|
393
|
+
3. Setting appropriate client timeouts
|
|
394
|
+
|
|
395
|
+
---
|
|
396
|
+
|
|
397
|
+
## Best Practices
|
|
398
|
+
|
|
399
|
+
1. **Add sources before generating audio** - Ensure your notebook has sources before attempting to generate audio.
|
|
400
|
+
|
|
401
|
+
2. **Use custom instructions** - Tailor the audio by providing clear custom instructions.
|
|
402
|
+
|
|
403
|
+
3. **Reuse sessions** - Pass `session_id` to avoid creating new browser sessions for each request.
|
|
404
|
+
|
|
405
|
+
4. **Check content list** - Use `list_content` to verify what's already generated before creating duplicates.
|
|
406
|
+
|
|
407
|
+
5. **Handle timeouts gracefully** - Audio generation is slow; implement appropriate retry logic.
|
|
408
|
+
|
|
409
|
+
---
|
|
410
|
+
|
|
411
|
+
## Version History
|
|
412
|
+
|
|
413
|
+
| Version | Changes |
|
|
414
|
+
| ------- | ------------------------------------------- |
|
|
415
|
+
| 1.4.2 | Removed fake content generation (FAQ, etc.) |
|
|
416
|
+
| 1.4.0 | Added content management module |
|
|
417
|
+
| 1.3.7 | Source citation extraction |
|
|
418
|
+
|
|
419
|
+
---
|
|
420
|
+
|
|
421
|
+
**Complete Content Management Documentation!**
|