@roomi-fields/notebooklm-mcp 1.5.0 → 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 +2 -0
- 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/cli/accounts.js.map +1 -1
- package/dist/config.d.ts +1 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +15 -0
- package/dist/config.js.map +1 -1
- package/dist/content/content-manager.d.ts.map +1 -1
- package/dist/content/content-manager.js +113 -118
- package/dist/content/content-manager.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/session/browser-session.d.ts.map +1 -1
- package/dist/session/browser-session.js +1 -0
- package/dist/session/browser-session.js.map +1 -1
- package/dist/session/shared-context-manager.d.ts.map +1 -1
- package/dist/session/shared-context-manager.js +2 -0
- package/dist/session/shared-context-manager.js.map +1 -1
- package/docs/ADDING_A_LANGUAGE.md +209 -0
- package/package.json +6 -3
- 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
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Automatically create a test notebook
|
|
2
|
+
# This navigates to homepage and clicks "Create notebook"
|
|
3
|
+
|
|
4
|
+
Write-Host "=== Creating Test Notebook ===" -ForegroundColor Cyan
|
|
5
|
+
|
|
6
|
+
# Step 1: Close existing sessions to get fresh browser
|
|
7
|
+
Write-Host "1. Checking server health..."
|
|
8
|
+
$health = Invoke-RestMethod -Uri "http://localhost:3000/health" -Method GET
|
|
9
|
+
Write-Host " Server: $($health.data.status), Auth: $($health.data.authenticated)"
|
|
10
|
+
|
|
11
|
+
# Step 2: Make a simple request to open browser at homepage
|
|
12
|
+
Write-Host "2. Opening browser at NotebookLM homepage..."
|
|
13
|
+
Write-Host " The browser will open. Please:"
|
|
14
|
+
Write-Host " - Click '+ Creer un notebook' button"
|
|
15
|
+
Write-Host " - Copy the new notebook URL"
|
|
16
|
+
Write-Host " - Paste it here when ready"
|
|
17
|
+
Write-Host ""
|
|
18
|
+
|
|
19
|
+
# Navigate to homepage by using a non-existent notebook (will redirect to home)
|
|
20
|
+
$body = @{
|
|
21
|
+
question = "test"
|
|
22
|
+
show_browser = $true
|
|
23
|
+
} | ConvertTo-Json
|
|
24
|
+
|
|
25
|
+
try {
|
|
26
|
+
# This will timeout or fail but will open the browser
|
|
27
|
+
$response = Invoke-RestMethod -Uri "http://localhost:3000/ask" -Method POST -ContentType "application/json" -Body $body -TimeoutSec 120
|
|
28
|
+
Write-Host "Response: $($response | ConvertTo-Json -Depth 3)"
|
|
29
|
+
} catch {
|
|
30
|
+
Write-Host "Browser should be open now. Please create the notebook manually."
|
|
31
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
$body = @{
|
|
2
|
+
name = "e2e-mathieu-test"
|
|
3
|
+
description = "Test notebook for mathieudumont31 English E2E tests"
|
|
4
|
+
topics = @("test", "e2e", "english")
|
|
5
|
+
} | ConvertTo-Json
|
|
6
|
+
|
|
7
|
+
$response = Invoke-RestMethod -Uri "http://localhost:3000/notebooks/create" -Method POST -ContentType "application/json" -Body $body
|
|
8
|
+
$response | ConvertTo-Json -Depth 10
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Create a new notebook with the current account (rom1pey)
|
|
2
|
+
Write-Host "=== Creating new notebook with rom1pey account ===" -ForegroundColor Cyan
|
|
3
|
+
|
|
4
|
+
$body = @{
|
|
5
|
+
name = "E2E-Test-Rom1pey"
|
|
6
|
+
show_browser = $true
|
|
7
|
+
} | ConvertTo-Json
|
|
8
|
+
|
|
9
|
+
Write-Host "Calling POST /notebooks/create with visible browser..."
|
|
10
|
+
Write-Host "Please watch the browser window!" -ForegroundColor Yellow
|
|
11
|
+
|
|
12
|
+
try {
|
|
13
|
+
$response = Invoke-RestMethod -Uri "http://localhost:3000/notebooks/create" -Method POST -ContentType "application/json" -Body $body -TimeoutSec 180
|
|
14
|
+
Write-Host "`nSUCCESS!" -ForegroundColor Green
|
|
15
|
+
Write-Host "Notebook URL: $($response.data.notebook_url)"
|
|
16
|
+
Write-Host "Notebook ID: $($response.data.notebook_id)"
|
|
17
|
+
} catch {
|
|
18
|
+
Write-Host "Error: $($_.Exception.Message)" -ForegroundColor Red
|
|
19
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
$body = @{
|
|
2
|
+
name = "e2e-rom1pey-english"
|
|
3
|
+
description = "Test notebook for rom1pey English E2E tests"
|
|
4
|
+
topics = @("test", "e2e", "english")
|
|
5
|
+
} | ConvertTo-Json
|
|
6
|
+
|
|
7
|
+
$response = Invoke-RestMethod -Uri "http://localhost:3000/notebooks/create" -Method POST -ContentType "application/json" -Body $body -TimeoutSec 120
|
|
8
|
+
$response | ConvertTo-Json -Depth 10
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Create a fresh test notebook with current account
|
|
2
|
+
# This will auto-discover notebooks and we'll use one that the current account owns
|
|
3
|
+
|
|
4
|
+
Write-Host "=== Creating fresh test notebook ===" -ForegroundColor Cyan
|
|
5
|
+
|
|
6
|
+
# First, auto-discover to see what notebooks we have access to
|
|
7
|
+
Write-Host "`nAuto-discovering notebooks (visible browser)..."
|
|
8
|
+
$discoverBody = @{
|
|
9
|
+
show_browser = $true
|
|
10
|
+
max_notebooks = 10
|
|
11
|
+
} | ConvertTo-Json
|
|
12
|
+
|
|
13
|
+
try {
|
|
14
|
+
$response = Invoke-RestMethod -Uri "http://localhost:3000/notebooks/auto-discover" -Method POST -ContentType "application/json" -Body $discoverBody -TimeoutSec 180
|
|
15
|
+
Write-Host "Discovered notebooks:"
|
|
16
|
+
$response.data.notebooks | ForEach-Object {
|
|
17
|
+
Write-Host " - $($_.name): $($_.url)"
|
|
18
|
+
}
|
|
19
|
+
} catch {
|
|
20
|
+
Write-Host "Error: $($_.Exception.Message)" -ForegroundColor Red
|
|
21
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Create a test notebook via browser automation
|
|
2
|
+
# This script navigates to NotebookLM and creates a new empty notebook
|
|
3
|
+
|
|
4
|
+
$body = @{
|
|
5
|
+
question = "Navigation test"
|
|
6
|
+
show_browser = $true
|
|
7
|
+
notebook_url = "https://notebooklm.google.com"
|
|
8
|
+
} | ConvertTo-Json
|
|
9
|
+
|
|
10
|
+
Write-Host "Opening NotebookLM homepage to create notebook..."
|
|
11
|
+
Write-Host "Please manually click '+ Create notebook' button"
|
|
12
|
+
Write-Host ""
|
|
13
|
+
|
|
14
|
+
# Just open the browser to NotebookLM homepage
|
|
15
|
+
$response = Invoke-RestMethod -Uri "http://localhost:3000/ask" -Method POST -ContentType "application/json" -Body $body -TimeoutSec 60
|
|
16
|
+
$response | ConvertTo-Json -Depth 5
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Debug script - use auto-discover to find a valid notebook first
|
|
2
|
+
Write-Host "Step 1: Auto-discovering notebooks for current account..."
|
|
3
|
+
|
|
4
|
+
$discoverBody = @{
|
|
5
|
+
max_notebooks = 3
|
|
6
|
+
} | ConvertTo-Json
|
|
7
|
+
|
|
8
|
+
try {
|
|
9
|
+
$notebooks = Invoke-RestMethod -Uri "http://localhost:3000/notebooks/auto-discover" -Method POST -ContentType "application/json" -Body $discoverBody -TimeoutSec 120
|
|
10
|
+
Write-Host "Discovered notebooks:"
|
|
11
|
+
$notebooks | ConvertTo-Json -Depth 3
|
|
12
|
+
|
|
13
|
+
if ($notebooks.data.discovered -gt 0) {
|
|
14
|
+
$firstNotebook = $notebooks.data.notebooks[0]
|
|
15
|
+
Write-Host "`nStep 2: Testing URL source on notebook: $($firstNotebook.name)"
|
|
16
|
+
|
|
17
|
+
$body = @{
|
|
18
|
+
notebook_id = $firstNotebook.id
|
|
19
|
+
source_type = "url"
|
|
20
|
+
url = "https://en.wikipedia.org/wiki/Test"
|
|
21
|
+
show_browser = $true
|
|
22
|
+
} | ConvertTo-Json
|
|
23
|
+
|
|
24
|
+
$response = Invoke-RestMethod -Uri "http://localhost:3000/content/sources" -Method POST -ContentType "application/json" -Body $body -TimeoutSec 120
|
|
25
|
+
$response | ConvertTo-Json -Depth 5
|
|
26
|
+
}
|
|
27
|
+
} catch {
|
|
28
|
+
Write-Host "Error: $($_.Exception.Message)"
|
|
29
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Debug script to investigate Add source dialog
|
|
2
|
+
$body = @{
|
|
3
|
+
notebook_id = "notebook-1"
|
|
4
|
+
source_type = "url"
|
|
5
|
+
url = "https://en.wikipedia.org/wiki/Test"
|
|
6
|
+
show_browser = $true
|
|
7
|
+
} | ConvertTo-Json
|
|
8
|
+
|
|
9
|
+
Write-Host "Testing Add source with visible browser..."
|
|
10
|
+
try {
|
|
11
|
+
$response = Invoke-RestMethod -Uri "http://localhost:3000/content/sources" -Method POST -ContentType "application/json" -Body $body -TimeoutSec 120
|
|
12
|
+
$response | ConvertTo-Json -Depth 5
|
|
13
|
+
} catch {
|
|
14
|
+
Write-Host "Error: $($_.Exception.Message)"
|
|
15
|
+
if ($_.Exception.Response) {
|
|
16
|
+
$reader = New-Object System.IO.StreamReader($_.Exception.Response.GetResponseStream())
|
|
17
|
+
Write-Host "Response: $($reader.ReadToEnd())"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Debug: Add text source with detailed logging
|
|
2
|
+
# This script tests adding a text source step by step
|
|
3
|
+
|
|
4
|
+
Write-Host "=== DEBUG: Add Text Source Step by Step ===" -ForegroundColor Cyan
|
|
5
|
+
Write-Host "Notebook: 3e79b7be-9a72-4ac7-aaf7-ac3f450fa96f" -ForegroundColor Gray
|
|
6
|
+
|
|
7
|
+
# Step 1: Get initial source count
|
|
8
|
+
Write-Host "`n--- Step 1: Get initial source count ---" -ForegroundColor Yellow
|
|
9
|
+
$initialContent = Invoke-RestMethod -Uri "http://localhost:3000/content?notebook_url=https://notebooklm.google.com/notebook/3e79b7be-9a72-4ac7-aaf7-ac3f450fa96f" -Method GET
|
|
10
|
+
$initialCount = $initialContent.data.sources.Count
|
|
11
|
+
Write-Host "Initial source count: $initialCount" -ForegroundColor White
|
|
12
|
+
|
|
13
|
+
# Step 2: Add a text source with visible browser
|
|
14
|
+
Write-Host "`n--- Step 2: Adding text source with VISIBLE browser ---" -ForegroundColor Yellow
|
|
15
|
+
$body = @{
|
|
16
|
+
notebook_url = "https://notebooklm.google.com/notebook/3e79b7be-9a72-4ac7-aaf7-ac3f450fa96f"
|
|
17
|
+
source_type = "text"
|
|
18
|
+
text = "Ceci est un test de debug pour verifier l'ajout de source texte. Contenu de test avec suffisamment de texte pour etre valide."
|
|
19
|
+
title = "DEBUG-SOURCE-$(Get-Date -Format 'HHmmss')"
|
|
20
|
+
show_browser = $true
|
|
21
|
+
} | ConvertTo-Json
|
|
22
|
+
|
|
23
|
+
Write-Host "Request body:" -ForegroundColor Gray
|
|
24
|
+
$body | ConvertFrom-Json | Format-List
|
|
25
|
+
|
|
26
|
+
$result = Invoke-RestMethod -Uri "http://localhost:3000/content/sources" -Method POST -ContentType "application/json" -Body $body -TimeoutSec 120
|
|
27
|
+
Write-Host "`nResult:" -ForegroundColor Gray
|
|
28
|
+
$result | ConvertTo-Json -Depth 5
|
|
29
|
+
|
|
30
|
+
# Step 3: Wait and check source count
|
|
31
|
+
Write-Host "`n--- Step 3: Waiting 10 seconds then checking source count ---" -ForegroundColor Yellow
|
|
32
|
+
Start-Sleep -Seconds 10
|
|
33
|
+
|
|
34
|
+
$finalContent = Invoke-RestMethod -Uri "http://localhost:3000/content?notebook_url=https://notebooklm.google.com/notebook/3e79b7be-9a72-4ac7-aaf7-ac3f450fa96f" -Method GET
|
|
35
|
+
$finalCount = $finalContent.data.sources.Count
|
|
36
|
+
Write-Host "Final source count: $finalCount" -ForegroundColor White
|
|
37
|
+
|
|
38
|
+
if ($finalCount -gt $initialCount) {
|
|
39
|
+
Write-Host "`n✅ SUCCESS: Source count increased from $initialCount to $finalCount" -ForegroundColor Green
|
|
40
|
+
# Show new source
|
|
41
|
+
$newSources = $finalContent.data.sources | Where-Object { $_.name -like "*DEBUG*" }
|
|
42
|
+
Write-Host "New sources matching 'DEBUG':" -ForegroundColor White
|
|
43
|
+
$newSources | ConvertTo-Json -Depth 3
|
|
44
|
+
} else {
|
|
45
|
+
Write-Host "`n❌ FAIL: Source count did not increase ($initialCount -> $finalCount)" -ForegroundColor Red
|
|
46
|
+
Write-Host "API returned success=$($result.success)" -ForegroundColor Red
|
|
47
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Navigate to NotebookLM home with visible browser
|
|
2
|
+
$body = @{
|
|
3
|
+
question = "What notebooks do you see?"
|
|
4
|
+
show_browser = $true
|
|
5
|
+
} | ConvertTo-Json
|
|
6
|
+
|
|
7
|
+
Write-Host "Opening NotebookLM home page (visible)..."
|
|
8
|
+
# Just do a health check to trigger a visible session
|
|
9
|
+
$response = Invoke-RestMethod -Uri "http://localhost:3000/notebooks/auto-discover" -Method POST -ContentType "application/json" -Body '{"show_browser": true, "max_notebooks": 5}' -TimeoutSec 180
|
|
10
|
+
$response | ConvertTo-Json -Depth 5
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Debug script to capture NotebookLM UI and identify correct selectors
|
|
2
|
+
# Runs with show_browser=true so we can see what's happening
|
|
3
|
+
|
|
4
|
+
$baseUrl = "http://localhost:3000"
|
|
5
|
+
$testNotebook = "https://notebooklm.google.com/notebook/abd21688-02a6-4459-953b-30f0612a984e"
|
|
6
|
+
|
|
7
|
+
Write-Host "=== Debug NotebookLM Selectors ===" -ForegroundColor Cyan
|
|
8
|
+
|
|
9
|
+
# First ask a question to open the notebook
|
|
10
|
+
Write-Host "`n[1] Opening notebook with a simple question..." -ForegroundColor Yellow
|
|
11
|
+
|
|
12
|
+
$askBody = @{
|
|
13
|
+
question = "Hello, what is this notebook about?"
|
|
14
|
+
notebook_url = $testNotebook
|
|
15
|
+
show_browser = $true
|
|
16
|
+
} | ConvertTo-Json
|
|
17
|
+
|
|
18
|
+
try {
|
|
19
|
+
$response = Invoke-RestMethod -Uri "$baseUrl/ask" -Method POST -ContentType "application/json" -Body $askBody -TimeoutSec 120
|
|
20
|
+
if ($response.success) {
|
|
21
|
+
Write-Host " OK - Notebook opened" -ForegroundColor Green
|
|
22
|
+
Write-Host " Session ID: $($response.data.session_id)"
|
|
23
|
+
}
|
|
24
|
+
} catch {
|
|
25
|
+
Write-Host " Error: $_" -ForegroundColor Red
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
Write-Host "`n[2] Browser should now be visible with the notebook open." -ForegroundColor Yellow
|
|
29
|
+
Write-Host " Check the left panel to see the Sources tab and Add button." -ForegroundColor Yellow
|
|
30
|
+
Write-Host "`n Press Enter when ready to try adding a source..."
|
|
31
|
+
Read-Host
|
|
32
|
+
|
|
33
|
+
# Try adding source
|
|
34
|
+
Write-Host "`n[3] Trying to add text source..." -ForegroundColor Yellow
|
|
35
|
+
|
|
36
|
+
$sourceBody = @{
|
|
37
|
+
source_type = "text"
|
|
38
|
+
text = "Debug test content"
|
|
39
|
+
title = "Debug Test"
|
|
40
|
+
notebook_url = $testNotebook
|
|
41
|
+
show_browser = $true
|
|
42
|
+
} | ConvertTo-Json
|
|
43
|
+
|
|
44
|
+
try {
|
|
45
|
+
$response = Invoke-RestMethod -Uri "$baseUrl/content/sources" -Method POST -ContentType "application/json" -Body $sourceBody -TimeoutSec 120
|
|
46
|
+
if ($response.success) {
|
|
47
|
+
Write-Host " SUCCESS" -ForegroundColor Green
|
|
48
|
+
} else {
|
|
49
|
+
Write-Host " FAIL: $($response.error)" -ForegroundColor Red
|
|
50
|
+
}
|
|
51
|
+
} catch {
|
|
52
|
+
Write-Host " Error: $_" -ForegroundColor Red
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
Write-Host "`n=== Debug Complete ===" -ForegroundColor Cyan
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Activate notebook-1 and take a screenshot
|
|
2
|
+
$response = Invoke-RestMethod -Uri "http://localhost:3000/notebooks/notebook-1/activate" -Method PUT
|
|
3
|
+
Write-Host "Activated notebook-1"
|
|
4
|
+
|
|
5
|
+
Start-Sleep -Seconds 2
|
|
6
|
+
|
|
7
|
+
# Try to add a source and capture debug info
|
|
8
|
+
$body = @{
|
|
9
|
+
notebook_id = "notebook-1"
|
|
10
|
+
source_type = "text"
|
|
11
|
+
title = "E2E Test Source"
|
|
12
|
+
content = "Test content for debugging the add source button."
|
|
13
|
+
} | ConvertTo-Json -Depth 5
|
|
14
|
+
|
|
15
|
+
Write-Host "Attempting to add source..."
|
|
16
|
+
try {
|
|
17
|
+
$response = Invoke-RestMethod -Uri "http://localhost:3000/content/sources" -Method POST -ContentType "application/json" -Body $body
|
|
18
|
+
Write-Host "Response:"
|
|
19
|
+
$response | ConvertTo-Json -Depth 5
|
|
20
|
+
} catch {
|
|
21
|
+
Write-Host "Error: $_"
|
|
22
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Debug: Open notebook-1 with visible browser and take screenshot
|
|
2
|
+
$body = @{
|
|
3
|
+
notebook_id = "notebook-1"
|
|
4
|
+
question = "Test"
|
|
5
|
+
show_browser = $true
|
|
6
|
+
} | ConvertTo-Json
|
|
7
|
+
|
|
8
|
+
Write-Host "Opening CNV notebook with visible browser..."
|
|
9
|
+
Write-Host "WATCH THE BROWSER to see what's happening!"
|
|
10
|
+
Write-Host ""
|
|
11
|
+
|
|
12
|
+
try {
|
|
13
|
+
$response = Invoke-RestMethod -Uri "http://localhost:3000/ask" -Method POST -ContentType "application/json" -Body $body -TimeoutSec 300
|
|
14
|
+
Write-Host "Response: $($response | ConvertTo-Json -Depth 3)"
|
|
15
|
+
} catch {
|
|
16
|
+
Write-Host "Error: $_"
|
|
17
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Navigate to NotebookLM home and create a fresh notebook
|
|
2
|
+
Write-Host "=== Creating a fresh test notebook ===" -ForegroundColor Cyan
|
|
3
|
+
|
|
4
|
+
# Use the notebooks endpoint with a URL to the home page to trigger discovery
|
|
5
|
+
# We'll use POST /notebooks with just a name to create a new one
|
|
6
|
+
|
|
7
|
+
$body = @{
|
|
8
|
+
name = "e2e-rom1pey-test"
|
|
9
|
+
url = "https://notebooklm.google.com"
|
|
10
|
+
description = "E2E test notebook for rom1pey account"
|
|
11
|
+
} | ConvertTo-Json
|
|
12
|
+
|
|
13
|
+
Write-Host "`nAdding notebook entry..."
|
|
14
|
+
try {
|
|
15
|
+
$response = Invoke-RestMethod -Uri "http://localhost:3000/notebooks" -Method POST -ContentType "application/json" -Body $body -TimeoutSec 120
|
|
16
|
+
Write-Host "Response:" -ForegroundColor Green
|
|
17
|
+
$response | ConvertTo-Json -Depth 3
|
|
18
|
+
} catch {
|
|
19
|
+
Write-Host "Error: $($_.Exception.Message)" -ForegroundColor Red
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
# Now list all notebooks
|
|
23
|
+
Write-Host "`n=== Current notebooks ===" -ForegroundColor Cyan
|
|
24
|
+
$notebooks = Invoke-RestMethod -Uri "http://localhost:3000/notebooks" -Method GET
|
|
25
|
+
Write-Host "Active notebook: $($notebooks.data.active_notebook_id)"
|
|
26
|
+
Write-Host "Total notebooks: $($notebooks.data.notebooks.Count)"
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Kill only Chrome processes that belong to NotebookLM automation
|
|
2
|
+
# Does NOT kill user's personal Chrome
|
|
3
|
+
|
|
4
|
+
Write-Host "Finding automation Chrome processes..." -ForegroundColor Cyan
|
|
5
|
+
|
|
6
|
+
$automationChromes = @()
|
|
7
|
+
|
|
8
|
+
Get-Process chrome -ErrorAction SilentlyContinue | ForEach-Object {
|
|
9
|
+
$process = $_
|
|
10
|
+
try {
|
|
11
|
+
$cmdLine = (Get-CimInstance Win32_Process -Filter "ProcessId=$($process.Id)" -ErrorAction SilentlyContinue).CommandLine
|
|
12
|
+
if ($cmdLine -like "*notebooklm-mcp*") {
|
|
13
|
+
$automationChromes += $process
|
|
14
|
+
Write-Host " Found automation Chrome: PID $($process.Id)" -ForegroundColor Yellow
|
|
15
|
+
}
|
|
16
|
+
} catch {
|
|
17
|
+
# Ignore access denied errors
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
if ($automationChromes.Count -eq 0) {
|
|
22
|
+
Write-Host "No automation Chrome processes found." -ForegroundColor Green
|
|
23
|
+
} else {
|
|
24
|
+
Write-Host ""
|
|
25
|
+
Write-Host "Killing $($automationChromes.Count) automation Chrome processes..." -ForegroundColor Red
|
|
26
|
+
foreach ($chrome in $automationChromes) {
|
|
27
|
+
try {
|
|
28
|
+
Stop-Process -Id $chrome.Id -Force -ErrorAction SilentlyContinue
|
|
29
|
+
Write-Host " Killed PID $($chrome.Id)" -ForegroundColor Green
|
|
30
|
+
} catch {
|
|
31
|
+
Write-Host " Failed to kill PID $($chrome.Id): $_" -ForegroundColor Red
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
Write-Host ""
|
|
37
|
+
Write-Host "Done. Your personal Chrome is untouched." -ForegroundColor Green
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Auto-discover notebooks from current account
|
|
2
|
+
Write-Host "=== Auto-discovering notebooks from current account ===" -ForegroundColor Cyan
|
|
3
|
+
|
|
4
|
+
$body = @{
|
|
5
|
+
max_notebooks = 20
|
|
6
|
+
show_browser = $true
|
|
7
|
+
} | ConvertTo-Json
|
|
8
|
+
|
|
9
|
+
try {
|
|
10
|
+
$response = Invoke-RestMethod -Uri "http://localhost:3000/notebooks/auto-discover" -Method POST -ContentType "application/json" -Body $body -TimeoutSec 180
|
|
11
|
+
|
|
12
|
+
Write-Host "`nDiscovered $($response.data.notebooks.Count) notebooks:" -ForegroundColor Green
|
|
13
|
+
|
|
14
|
+
$response.data.notebooks | ForEach-Object {
|
|
15
|
+
Write-Host " - $($_.name)" -ForegroundColor Yellow
|
|
16
|
+
Write-Host " URL: $($_.url)" -ForegroundColor Gray
|
|
17
|
+
}
|
|
18
|
+
} catch {
|
|
19
|
+
Write-Host "Error: $($_.Exception.Message)" -ForegroundColor Red
|
|
20
|
+
|
|
21
|
+
# Fallback: just list already known notebooks
|
|
22
|
+
Write-Host "`nFallback: listing known notebooks..." -ForegroundColor Cyan
|
|
23
|
+
$notebooks = Invoke-RestMethod -Uri "http://localhost:3000/notebooks" -Method GET
|
|
24
|
+
$notebooks.data.notebooks | ForEach-Object {
|
|
25
|
+
Write-Host " - $($_.id): $($_.name)" -ForegroundColor Yellow
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Navigate to NotebookLM home page with visible browser
|
|
2
|
+
# This will show all notebooks available to the current account (rom1pey)
|
|
3
|
+
|
|
4
|
+
Write-Host "=== Navigating to NotebookLM home ===" -ForegroundColor Cyan
|
|
5
|
+
Write-Host "Please look at the browser window to see the notebooks available" -ForegroundColor Yellow
|
|
6
|
+
Write-Host "Then copy one notebook URL and we'll add it to the library" -ForegroundColor Yellow
|
|
7
|
+
|
|
8
|
+
# We'll use a dummy notebook URL that redirects to home
|
|
9
|
+
# by using the notebooks endpoint with show_browser
|
|
10
|
+
|
|
11
|
+
$body = @{
|
|
12
|
+
name = "temp-discover"
|
|
13
|
+
url = "https://notebooklm.google.com"
|
|
14
|
+
show_browser = $true
|
|
15
|
+
} | ConvertTo-Json
|
|
16
|
+
|
|
17
|
+
try {
|
|
18
|
+
# This will fail but will open the browser to the home page
|
|
19
|
+
$response = Invoke-RestMethod -Uri "http://localhost:3000/notebooks" -Method POST -ContentType "application/json" -Body $body -TimeoutSec 180
|
|
20
|
+
Write-Host "Response: $($response | ConvertTo-Json -Depth 3)"
|
|
21
|
+
} catch {
|
|
22
|
+
Write-Host "Expected error (home page doesn't have a specific notebook): $($_.Exception.Message)" -ForegroundColor Yellow
|
|
23
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Navigate to NotebookLM homepage
|
|
2
|
+
$body = @{
|
|
3
|
+
question = "test"
|
|
4
|
+
show_browser = $true
|
|
5
|
+
notebook_url = "https://notebooklm.google.com/"
|
|
6
|
+
} | ConvertTo-Json
|
|
7
|
+
|
|
8
|
+
Write-Host "Opening NotebookLM homepage with rpmonster..."
|
|
9
|
+
try {
|
|
10
|
+
$response = Invoke-RestMethod -Uri "http://localhost:3000/ask" -Method POST -ContentType "application/json" -Body $body -TimeoutSec 30
|
|
11
|
+
$response | ConvertTo-Json -Depth 5
|
|
12
|
+
} catch {
|
|
13
|
+
Write-Host "Expected error (no notebook selected) - browser should be open"
|
|
14
|
+
Write-Host $_.Exception.Message
|
|
15
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# E2E Tests with English account (rom1pey)
|
|
2
|
+
# Using notebook: rom1pey-english-test
|
|
3
|
+
|
|
4
|
+
$ErrorActionPreference = "Continue"
|
|
5
|
+
|
|
6
|
+
Write-Host "========================================" -ForegroundColor Cyan
|
|
7
|
+
Write-Host " E2E Tests - English Account (rom1pey)" -ForegroundColor Cyan
|
|
8
|
+
Write-Host "========================================" -ForegroundColor Cyan
|
|
9
|
+
Write-Host ""
|
|
10
|
+
|
|
11
|
+
# Verify active notebook
|
|
12
|
+
Write-Host "Active notebook check..."
|
|
13
|
+
$notebooks = Invoke-RestMethod -Uri "http://localhost:3000/notebooks" -Method GET
|
|
14
|
+
Write-Host "Active: $($notebooks.data.active_notebook_id)"
|
|
15
|
+
|
|
16
|
+
$passed = 0
|
|
17
|
+
$failed = 0
|
|
18
|
+
|
|
19
|
+
# Test 1: Health check
|
|
20
|
+
Write-Host "`n=== TEST 1: Health ===" -ForegroundColor Yellow
|
|
21
|
+
try {
|
|
22
|
+
$health = Invoke-RestMethod -Uri "http://localhost:3000/health"
|
|
23
|
+
if ($health.success -and $health.data.authenticated) {
|
|
24
|
+
Write-Host " PASSED" -ForegroundColor Green
|
|
25
|
+
$passed++
|
|
26
|
+
} else {
|
|
27
|
+
Write-Host " FAILED: Not authenticated" -ForegroundColor Red
|
|
28
|
+
$failed++
|
|
29
|
+
}
|
|
30
|
+
} catch {
|
|
31
|
+
Write-Host " FAILED: $($_.Exception.Message)" -ForegroundColor Red
|
|
32
|
+
$failed++
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
# Test 2: Ask question
|
|
36
|
+
Write-Host "`n=== TEST 2: Ask question ===" -ForegroundColor Yellow
|
|
37
|
+
try {
|
|
38
|
+
$askBody = @{ question = "What is this about?" } | ConvertTo-Json
|
|
39
|
+
$response = Invoke-RestMethod -Uri "http://localhost:3000/ask" -Method POST -ContentType "application/json" -Body $askBody -TimeoutSec 60
|
|
40
|
+
if ($response.success) {
|
|
41
|
+
Write-Host " PASSED: Got response" -ForegroundColor Green
|
|
42
|
+
$passed++
|
|
43
|
+
} else {
|
|
44
|
+
Write-Host " FAILED: $($response.error)" -ForegroundColor Red
|
|
45
|
+
$failed++
|
|
46
|
+
}
|
|
47
|
+
} catch {
|
|
48
|
+
Write-Host " FAILED: $($_.Exception.Message)" -ForegroundColor Red
|
|
49
|
+
$failed++
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
# Test 3: Add URL source
|
|
53
|
+
Write-Host "`n=== TEST 3: Add URL source ===" -ForegroundColor Yellow
|
|
54
|
+
try {
|
|
55
|
+
$urlBody = @{
|
|
56
|
+
source_type = "url"
|
|
57
|
+
url = "https://en.wikipedia.org/wiki/Nonviolent_Communication"
|
|
58
|
+
} | ConvertTo-Json
|
|
59
|
+
$response = Invoke-RestMethod -Uri "http://localhost:3000/content/sources" -Method POST -ContentType "application/json" -Body $urlBody -TimeoutSec 120
|
|
60
|
+
if ($response.success) {
|
|
61
|
+
Write-Host " PASSED: Source added" -ForegroundColor Green
|
|
62
|
+
$passed++
|
|
63
|
+
} else {
|
|
64
|
+
Write-Host " FAILED: $($response.error)" -ForegroundColor Red
|
|
65
|
+
$failed++
|
|
66
|
+
}
|
|
67
|
+
} catch {
|
|
68
|
+
Write-Host " FAILED: $($_.Exception.Message)" -ForegroundColor Red
|
|
69
|
+
$failed++
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
# Test 4: Add text source
|
|
73
|
+
Write-Host "`n=== TEST 4: Add text source ===" -ForegroundColor Yellow
|
|
74
|
+
try {
|
|
75
|
+
$textBody = @{
|
|
76
|
+
source_type = "text"
|
|
77
|
+
text = "This is a test source for E2E testing. It contains some sample text about communication and testing."
|
|
78
|
+
name = "E2E Test Text Source"
|
|
79
|
+
} | ConvertTo-Json
|
|
80
|
+
$response = Invoke-RestMethod -Uri "http://localhost:3000/content/sources" -Method POST -ContentType "application/json" -Body $textBody -TimeoutSec 120
|
|
81
|
+
if ($response.success) {
|
|
82
|
+
Write-Host " PASSED: Text source added" -ForegroundColor Green
|
|
83
|
+
$passed++
|
|
84
|
+
} else {
|
|
85
|
+
Write-Host " FAILED: $($response.error)" -ForegroundColor Red
|
|
86
|
+
$failed++
|
|
87
|
+
}
|
|
88
|
+
} catch {
|
|
89
|
+
Write-Host " FAILED: $($_.Exception.Message)" -ForegroundColor Red
|
|
90
|
+
$failed++
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
# Test 5: Get content list
|
|
94
|
+
Write-Host "`n=== TEST 5: Get content list ===" -ForegroundColor Yellow
|
|
95
|
+
try {
|
|
96
|
+
$response = Invoke-RestMethod -Uri "http://localhost:3000/content" -Method GET -TimeoutSec 60
|
|
97
|
+
if ($response.success) {
|
|
98
|
+
Write-Host " PASSED: Got content list" -ForegroundColor Green
|
|
99
|
+
$passed++
|
|
100
|
+
} else {
|
|
101
|
+
Write-Host " FAILED: $($response.error)" -ForegroundColor Red
|
|
102
|
+
$failed++
|
|
103
|
+
}
|
|
104
|
+
} catch {
|
|
105
|
+
Write-Host " FAILED: $($_.Exception.Message)" -ForegroundColor Red
|
|
106
|
+
$failed++
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
Write-Host "`n========================================" -ForegroundColor Cyan
|
|
110
|
+
Write-Host " RESULTS: $passed passed, $failed failed" -ForegroundColor Cyan
|
|
111
|
+
Write-Host "========================================" -ForegroundColor Cyan
|