@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,20 @@
|
|
|
1
|
+
# Test with ASCII-only question (no accents)
|
|
2
|
+
$body = @{
|
|
3
|
+
notebook_id = "notebook-1"
|
|
4
|
+
question = "What are the main steps of the CNV process?"
|
|
5
|
+
} | ConvertTo-Json
|
|
6
|
+
|
|
7
|
+
Write-Host "Asking ASCII-only question..."
|
|
8
|
+
try {
|
|
9
|
+
$response = Invoke-RestMethod -Uri "http://localhost:3000/ask" -Method POST -ContentType "application/json; charset=utf-8" -Body ([System.Text.Encoding]::UTF8.GetBytes($body)) -TimeoutSec 180
|
|
10
|
+
Write-Host "`nResponse:"
|
|
11
|
+
if ($response.success -and $response.data.answer -ne "Le systeme n'a pas pu repondre.") {
|
|
12
|
+
Write-Host "SUCCESS! Got answer!"
|
|
13
|
+
Write-Host "Answer length: $($response.data.answer.Length) chars"
|
|
14
|
+
Write-Host "Answer preview: $($response.data.answer.Substring(0, [Math]::Min(500, $response.data.answer.Length)))..."
|
|
15
|
+
} else {
|
|
16
|
+
Write-Host "Error or empty: $($response.data.answer)"
|
|
17
|
+
}
|
|
18
|
+
} catch {
|
|
19
|
+
Write-Host "Error: $_"
|
|
20
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Test /ask with CNV notebook (READ ONLY - no modifications)
|
|
2
|
+
$body = @{
|
|
3
|
+
notebook_id = "notebook-1"
|
|
4
|
+
question = "Qu'est-ce que la CNV?"
|
|
5
|
+
} | ConvertTo-Json
|
|
6
|
+
|
|
7
|
+
Write-Host "Asking CNV notebook (read-only test)..."
|
|
8
|
+
try {
|
|
9
|
+
$response = Invoke-RestMethod -Uri "http://localhost:3000/ask" -Method POST -ContentType "application/json" -Body $body -TimeoutSec 180
|
|
10
|
+
Write-Host "`nResponse:"
|
|
11
|
+
if ($response.success) {
|
|
12
|
+
Write-Host "SUCCESS!"
|
|
13
|
+
Write-Host "Answer length: $($response.data.answer.Length) chars"
|
|
14
|
+
Write-Host "Answer preview: $($response.data.answer.Substring(0, [Math]::Min(300, $response.data.answer.Length)))..."
|
|
15
|
+
} else {
|
|
16
|
+
Write-Host "FAILED: $($response.error)"
|
|
17
|
+
}
|
|
18
|
+
} catch {
|
|
19
|
+
Write-Host "Error: $_"
|
|
20
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Test /ask endpoint with HEADED browser to see what happens
|
|
2
|
+
# Set HEADLESS=false to see the browser
|
|
3
|
+
|
|
4
|
+
$env:HEADLESS = "false"
|
|
5
|
+
|
|
6
|
+
Write-Host "Starting server with visible browser..."
|
|
7
|
+
Write-Host "The browser will open and you can watch what happens"
|
|
8
|
+
Write-Host ""
|
|
9
|
+
|
|
10
|
+
# First, restart the server with headless=false
|
|
11
|
+
Write-Host "Restarting server in headed mode..."
|
|
12
|
+
taskkill /F /IM node.exe 2>$null
|
|
13
|
+
Start-Sleep -Seconds 2
|
|
14
|
+
|
|
15
|
+
# Start server in background with headed mode
|
|
16
|
+
$env:HEADLESS = "false"
|
|
17
|
+
Start-Process -FilePath "cmd.exe" -ArgumentList "/c cd /d D:\Claude\notebooklm-mcp-http && set HEADLESS=false && node dist/http-wrapper.js" -WindowStyle Normal
|
|
18
|
+
|
|
19
|
+
Write-Host "Waiting for server to start..."
|
|
20
|
+
Start-Sleep -Seconds 5
|
|
21
|
+
|
|
22
|
+
# Test health
|
|
23
|
+
Write-Host "Testing health..."
|
|
24
|
+
try {
|
|
25
|
+
$health = Invoke-RestMethod -Uri "http://localhost:3000/health" -Method GET
|
|
26
|
+
Write-Host "Health: authenticated=$($health.data.authenticated)"
|
|
27
|
+
} catch {
|
|
28
|
+
Write-Host "Health check failed: $_"
|
|
29
|
+
exit 1
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
# Now ask a simple question
|
|
33
|
+
Write-Host ""
|
|
34
|
+
Write-Host "Asking question (watch the browser!)..."
|
|
35
|
+
$body = @{
|
|
36
|
+
notebook_id = "notebook-1"
|
|
37
|
+
question = "Hello, what is CNV?"
|
|
38
|
+
} | ConvertTo-Json
|
|
39
|
+
|
|
40
|
+
try {
|
|
41
|
+
$response = Invoke-RestMethod -Uri "http://localhost:3000/ask" -Method POST -ContentType "application/json; charset=utf-8" -Body ([System.Text.Encoding]::UTF8.GetBytes($body)) -TimeoutSec 180
|
|
42
|
+
Write-Host ""
|
|
43
|
+
Write-Host "Response received:"
|
|
44
|
+
Write-Host "Success: $($response.success)"
|
|
45
|
+
Write-Host "Answer: $($response.data.answer)"
|
|
46
|
+
} catch {
|
|
47
|
+
Write-Host "Error: $_"
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
Write-Host ""
|
|
51
|
+
Write-Host "Test complete. The browser should still be open for inspection."
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Test /ask with real IFS content
|
|
2
|
+
$body = @{
|
|
3
|
+
notebook_id = "notebook-2"
|
|
4
|
+
question = "Qu'est-ce que l'IFS et quels sont ses principes fondamentaux?"
|
|
5
|
+
} | ConvertTo-Json
|
|
6
|
+
|
|
7
|
+
Write-Host "Asking question about IFS..."
|
|
8
|
+
$response = Invoke-RestMethod -Uri "http://localhost:3000/ask" -Method POST -ContentType "application/json" -Body $body -TimeoutSec 120
|
|
9
|
+
|
|
10
|
+
Write-Host "`nResponse:"
|
|
11
|
+
if ($response.success) {
|
|
12
|
+
Write-Host "SUCCESS!"
|
|
13
|
+
Write-Host "Answer: $($response.data.answer.Substring(0, [Math]::Min(500, $response.data.answer.Length)))..."
|
|
14
|
+
} else {
|
|
15
|
+
Write-Host "FAILED: $($response.error)"
|
|
16
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Simple test of /ask endpoint
|
|
2
|
+
$body = @{
|
|
3
|
+
notebook_id = "notebook-2"
|
|
4
|
+
question = "What is IFS therapy?"
|
|
5
|
+
} | ConvertTo-Json
|
|
6
|
+
|
|
7
|
+
Write-Host "Asking question to notebook-2..."
|
|
8
|
+
Write-Host "Question: What is IFS therapy?"
|
|
9
|
+
Write-Host ""
|
|
10
|
+
|
|
11
|
+
try {
|
|
12
|
+
$response = Invoke-RestMethod -Uri "http://localhost:3000/ask" -Method POST -ContentType "application/json; charset=utf-8" -Body ([System.Text.Encoding]::UTF8.GetBytes($body)) -TimeoutSec 180
|
|
13
|
+
Write-Host "Response received!"
|
|
14
|
+
Write-Host "Success: $($response.success)"
|
|
15
|
+
if ($response.data.answer -ne "Le système n'a pas pu répondre.") {
|
|
16
|
+
Write-Host "REAL ANSWER!"
|
|
17
|
+
Write-Host "Answer length: $($response.data.answer.Length) chars"
|
|
18
|
+
Write-Host "Preview: $($response.data.answer.Substring(0, [Math]::Min(300, $response.data.answer.Length)))..."
|
|
19
|
+
} else {
|
|
20
|
+
Write-Host "ERROR: Got error message: $($response.data.answer)"
|
|
21
|
+
}
|
|
22
|
+
} catch {
|
|
23
|
+
Write-Host "Request failed: $_"
|
|
24
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Test with a real, substantive question
|
|
2
|
+
$body = @{
|
|
3
|
+
notebook_id = "notebook-1"
|
|
4
|
+
question = "Quelles sont les 4 étapes du processus OSBD en Communication NonViolente et comment les appliquer concrètement?"
|
|
5
|
+
} | ConvertTo-Json
|
|
6
|
+
|
|
7
|
+
Write-Host "Asking a real question about CNV..."
|
|
8
|
+
try {
|
|
9
|
+
$response = Invoke-RestMethod -Uri "http://localhost:3000/ask" -Method POST -ContentType "application/json" -Body $body -TimeoutSec 180
|
|
10
|
+
Write-Host "`nResponse:"
|
|
11
|
+
if ($response.success -and $response.data.answer -ne "Le système n'a pas pu répondre.") {
|
|
12
|
+
Write-Host "SUCCESS! Got real answer!"
|
|
13
|
+
Write-Host "Answer: $($response.data.answer.Substring(0, [Math]::Min(500, $response.data.answer.Length)))..."
|
|
14
|
+
} else {
|
|
15
|
+
Write-Host "Still got error: $($response.data.answer)"
|
|
16
|
+
}
|
|
17
|
+
} catch {
|
|
18
|
+
Write-Host "Error: $_"
|
|
19
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Test /ask with visible browser to see what's happening
|
|
2
|
+
$body = @{
|
|
3
|
+
notebook_id = "notebook-2"
|
|
4
|
+
question = "Qu'est-ce que l'IFS?"
|
|
5
|
+
show_browser = $true
|
|
6
|
+
} | ConvertTo-Json
|
|
7
|
+
|
|
8
|
+
Write-Host "Asking with visible browser..."
|
|
9
|
+
try {
|
|
10
|
+
$response = Invoke-RestMethod -Uri "http://localhost:3000/ask" -Method POST -ContentType "application/json" -Body $body -TimeoutSec 180
|
|
11
|
+
Write-Host "`nResponse:"
|
|
12
|
+
if ($response.success) {
|
|
13
|
+
Write-Host "SUCCESS!"
|
|
14
|
+
Write-Host "Answer: $($response.data.answer)"
|
|
15
|
+
} else {
|
|
16
|
+
Write-Host "FAILED: $($response.error)"
|
|
17
|
+
}
|
|
18
|
+
} catch {
|
|
19
|
+
Write-Host "Error: $_"
|
|
20
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
$body = @{
|
|
2
|
+
name = "E2E-Test-Notebook"
|
|
3
|
+
show_browser = $true
|
|
4
|
+
} | ConvertTo-Json
|
|
5
|
+
|
|
6
|
+
Write-Host "Creating test notebook..." -ForegroundColor Cyan
|
|
7
|
+
$response = Invoke-RestMethod -Uri "http://localhost:3000/notebooks/create" -Method POST -ContentType "application/json" -Body $body -TimeoutSec 120
|
|
8
|
+
$response | ConvertTo-Json -Depth 5
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Step 1: Create a new notebook on current account
|
|
2
|
+
Write-Host "Creating a test notebook..."
|
|
3
|
+
$createBody = @{
|
|
4
|
+
name = "Test-English-Account"
|
|
5
|
+
url = "https://notebooklm.google.com"
|
|
6
|
+
} | ConvertTo-Json
|
|
7
|
+
|
|
8
|
+
# First, let's just do a simple /ask with show_browser to see what account we're on
|
|
9
|
+
Write-Host "Testing /ask with visible browser to verify account..."
|
|
10
|
+
$askBody = @{
|
|
11
|
+
question = "Hello, what is this notebook about?"
|
|
12
|
+
show_browser = $true
|
|
13
|
+
} | ConvertTo-Json
|
|
14
|
+
|
|
15
|
+
$response = Invoke-RestMethod -Uri "http://localhost:3000/ask" -Method POST -ContentType "application/json" -Body $askBody -TimeoutSec 120
|
|
16
|
+
Write-Host "Response:"
|
|
17
|
+
$response | ConvertTo-Json -Depth 5
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Test 1: Add a text source
|
|
2
|
+
Write-Host "=== STEP 1: Adding test source ===" -ForegroundColor Cyan
|
|
3
|
+
$addBody = @{
|
|
4
|
+
notebook_url = "https://notebooklm.google.com/notebook/3e79b7be-9a72-4ac7-aaf7-ac3f450fa96f"
|
|
5
|
+
source_type = "text"
|
|
6
|
+
text = "This is a test source for deletion testing. Created at $(Get-Date)"
|
|
7
|
+
title = "DELETE-ME-TEST-SOURCE"
|
|
8
|
+
} | ConvertTo-Json
|
|
9
|
+
|
|
10
|
+
$addResult = Invoke-RestMethod -Uri "http://localhost:3000/content/sources" -Method POST -ContentType "application/json" -Body $addBody
|
|
11
|
+
Write-Host "Add result:" -ForegroundColor Yellow
|
|
12
|
+
$addResult | ConvertTo-Json -Depth 5
|
|
13
|
+
|
|
14
|
+
# Wait for indexing
|
|
15
|
+
Write-Host "`n=== STEP 2: Waiting 10 seconds for indexing ===" -ForegroundColor Cyan
|
|
16
|
+
Start-Sleep -Seconds 10
|
|
17
|
+
|
|
18
|
+
# List sources to verify it was added
|
|
19
|
+
Write-Host "`n=== STEP 3: Listing sources to verify ===" -ForegroundColor Cyan
|
|
20
|
+
$listResult = Invoke-RestMethod -Uri "http://localhost:3000/content?notebook_url=https://notebooklm.google.com/notebook/3e79b7be-9a72-4ac7-aaf7-ac3f450fa96f" -Method GET
|
|
21
|
+
$testSource = $listResult.data.sources | Where-Object { $_.name -like "*DELETE-ME*" }
|
|
22
|
+
Write-Host "Found test source:" -ForegroundColor Yellow
|
|
23
|
+
$testSource | ConvertTo-Json -Depth 3
|
|
24
|
+
|
|
25
|
+
# Delete the source
|
|
26
|
+
Write-Host "`n=== STEP 4: Deleting source by name ===" -ForegroundColor Cyan
|
|
27
|
+
$deleteResult = Invoke-RestMethod -Uri "http://localhost:3000/content/sources?source_name=DELETE-ME-TEST-SOURCE¬ebook_url=https://notebooklm.google.com/notebook/3e79b7be-9a72-4ac7-aaf7-ac3f450fa96f" -Method DELETE
|
|
28
|
+
Write-Host "Delete result:" -ForegroundColor Yellow
|
|
29
|
+
$deleteResult | ConvertTo-Json -Depth 5
|
|
30
|
+
|
|
31
|
+
# Verify deletion
|
|
32
|
+
Write-Host "`n=== STEP 5: Verifying deletion ===" -ForegroundColor Cyan
|
|
33
|
+
Start-Sleep -Seconds 3
|
|
34
|
+
$verifyResult = Invoke-RestMethod -Uri "http://localhost:3000/content?notebook_url=https://notebooklm.google.com/notebook/3e79b7be-9a72-4ac7-aaf7-ac3f450fa96f" -Method GET
|
|
35
|
+
$stillExists = $verifyResult.data.sources | Where-Object { $_.name -like "*DELETE-ME*" }
|
|
36
|
+
if ($stillExists) {
|
|
37
|
+
Write-Host "FAIL: Source still exists!" -ForegroundColor Red
|
|
38
|
+
$stillExists | ConvertTo-Json
|
|
39
|
+
} else {
|
|
40
|
+
Write-Host "SUCCESS: Source was deleted!" -ForegroundColor Green
|
|
41
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Test access to e2e-test-notebook with rom1pey
|
|
2
|
+
Write-Host "=== Testing e2e-test-notebook with visible browser ===" -ForegroundColor Cyan
|
|
3
|
+
|
|
4
|
+
# Activate it
|
|
5
|
+
Write-Host "Activating e2e-test-notebook..."
|
|
6
|
+
Invoke-RestMethod -Uri "http://localhost:3000/notebooks/e2e-test-notebook/activate" -Method PUT -TimeoutSec 30
|
|
7
|
+
|
|
8
|
+
# Try to access with visible browser
|
|
9
|
+
Write-Host "`nTesting access with visible browser..."
|
|
10
|
+
$body = @{
|
|
11
|
+
question = "What is this notebook about?"
|
|
12
|
+
show_browser = $true
|
|
13
|
+
} | ConvertTo-Json
|
|
14
|
+
|
|
15
|
+
try {
|
|
16
|
+
$response = Invoke-RestMethod -Uri "http://localhost:3000/ask" -Method POST -ContentType "application/json" -Body $body -TimeoutSec 120
|
|
17
|
+
Write-Host "SUCCESS! Answer: $($response.data.answer.Substring(0, [Math]::Min(200, $response.data.answer.Length)))..." -ForegroundColor Green
|
|
18
|
+
} catch {
|
|
19
|
+
Write-Host "Error: $($_.Exception.Message)" -ForegroundColor Red
|
|
20
|
+
Write-Host "This notebook is probably not accessible to rom1pey" -ForegroundColor Yellow
|
|
21
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Test with the newly created notebook (owned by rom1pey)
|
|
2
|
+
$body = @{
|
|
3
|
+
notebook_id = "english-test"
|
|
4
|
+
source_type = "url"
|
|
5
|
+
url = "https://en.wikipedia.org/wiki/Hello"
|
|
6
|
+
show_browser = $true
|
|
7
|
+
} | ConvertTo-Json
|
|
8
|
+
|
|
9
|
+
# First add the notebook
|
|
10
|
+
$addBody = @{
|
|
11
|
+
name = "english-test"
|
|
12
|
+
url = "https://notebooklm.google.com/notebook/258f62a1-8658-4f96-8333-a9e16224f602"
|
|
13
|
+
} | ConvertTo-Json
|
|
14
|
+
|
|
15
|
+
Write-Host "Adding notebook owned by rom1pey..."
|
|
16
|
+
Invoke-RestMethod -Uri "http://localhost:3000/notebooks" -Method POST -ContentType "application/json" -Body $addBody -TimeoutSec 60
|
|
17
|
+
|
|
18
|
+
Write-Host "`nTesting URL source on rom1pey's notebook..."
|
|
19
|
+
$response = Invoke-RestMethod -Uri "http://localhost:3000/content/sources" -Method POST -ContentType "application/json" -Body $body -TimeoutSec 120
|
|
20
|
+
$response | ConvertTo-Json -Depth 5
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
$body = @{
|
|
2
|
+
question = "Hello, what is this notebook about?"
|
|
3
|
+
notebook_url = "https://notebooklm.google.com/notebook/3f4e9685-333d-429e-8b82-45cee95c6748"
|
|
4
|
+
} | ConvertTo-Json
|
|
5
|
+
|
|
6
|
+
$response = Invoke-RestMethod -Uri "http://localhost:3000/ask" -Method POST -ContentType "application/json" -Body $body -TimeoutSec 120
|
|
7
|
+
$response | ConvertTo-Json -Depth 10
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Test FULL: Custom Instructions (4 tests)
|
|
2
|
+
$notebookUrl = "https://notebooklm.google.com/notebook/3e79b7be-9a72-4ac7-aaf7-ac3f450fa96f"
|
|
3
|
+
$passed = 0
|
|
4
|
+
$failed = 0
|
|
5
|
+
|
|
6
|
+
# Note: report does not support custom_instructions (uses report_format/language only)
|
|
7
|
+
$testCases = @(
|
|
8
|
+
@{ type = "audio_overview"; instruction = "Use conversational tone" },
|
|
9
|
+
@{ type = "data_table"; instruction = "Include source citations" },
|
|
10
|
+
@{ type = "presentation"; instruction = "Keep it concise" }
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
foreach ($test in $testCases) {
|
|
14
|
+
Write-Host "`n=== Testing custom_instructions with $($test.type) ===" -ForegroundColor Cyan
|
|
15
|
+
|
|
16
|
+
$body = @{
|
|
17
|
+
notebook_url = $notebookUrl
|
|
18
|
+
content_type = $test.type
|
|
19
|
+
custom_instructions = $test.instruction
|
|
20
|
+
} | ConvertTo-Json
|
|
21
|
+
|
|
22
|
+
try {
|
|
23
|
+
$response = Invoke-RestMethod -Uri "http://localhost:3000/content/generate" -Method POST -ContentType "application/json" -Body $body -TimeoutSec 300
|
|
24
|
+
if ($response.success) {
|
|
25
|
+
Write-Host " PASSED" -ForegroundColor Green
|
|
26
|
+
$passed++
|
|
27
|
+
} else {
|
|
28
|
+
Write-Host " FAILED: $($response.error)" -ForegroundColor Red
|
|
29
|
+
$failed++
|
|
30
|
+
}
|
|
31
|
+
} catch {
|
|
32
|
+
Write-Host " ERROR: $_" -ForegroundColor Red
|
|
33
|
+
$failed++
|
|
34
|
+
}
|
|
35
|
+
Start-Sleep -Seconds 3
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
Write-Host "`n=== SUMMARY ===" -ForegroundColor Yellow
|
|
39
|
+
Write-Host "Passed: $passed / $($testCases.Count)"
|
|
40
|
+
Write-Host "Failed: $failed"
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Test FULL: Infographic Formats (2 tests)
|
|
2
|
+
$notebookUrl = "https://notebooklm.google.com/notebook/3e79b7be-9a72-4ac7-aaf7-ac3f450fa96f"
|
|
3
|
+
$formats = @("horizontal", "vertical")
|
|
4
|
+
|
|
5
|
+
$passed = 0
|
|
6
|
+
$failed = 0
|
|
7
|
+
|
|
8
|
+
foreach ($format in $formats) {
|
|
9
|
+
Write-Host "`n=== Testing infographic_format = $format ===" -ForegroundColor Cyan
|
|
10
|
+
|
|
11
|
+
$body = @{
|
|
12
|
+
notebook_url = $notebookUrl
|
|
13
|
+
content_type = "infographic"
|
|
14
|
+
infographic_format = $format
|
|
15
|
+
} | ConvertTo-Json
|
|
16
|
+
|
|
17
|
+
try {
|
|
18
|
+
$response = Invoke-RestMethod -Uri "http://localhost:3000/content/generate" -Method POST -ContentType "application/json" -Body $body -TimeoutSec 300
|
|
19
|
+
if ($response.success) {
|
|
20
|
+
Write-Host " PASSED" -ForegroundColor Green
|
|
21
|
+
$passed++
|
|
22
|
+
} else {
|
|
23
|
+
Write-Host " FAILED: $($response.error)" -ForegroundColor Red
|
|
24
|
+
$failed++
|
|
25
|
+
}
|
|
26
|
+
} catch {
|
|
27
|
+
Write-Host " ERROR: $_" -ForegroundColor Red
|
|
28
|
+
$failed++
|
|
29
|
+
}
|
|
30
|
+
Start-Sleep -Seconds 3
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
Write-Host "`n=== SUMMARY ===" -ForegroundColor Yellow
|
|
34
|
+
Write-Host "Passed: $passed / $($formats.Count)"
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Test FULL: Language option (1 test)
|
|
2
|
+
$notebookUrl = "https://notebooklm.google.com/notebook/3e79b7be-9a72-4ac7-aaf7-ac3f450fa96f"
|
|
3
|
+
|
|
4
|
+
Write-Host "`n=== Testing language = fr ===" -ForegroundColor Cyan
|
|
5
|
+
|
|
6
|
+
$body = @{
|
|
7
|
+
notebook_url = $notebookUrl
|
|
8
|
+
content_type = "presentation"
|
|
9
|
+
language = "fr"
|
|
10
|
+
} | ConvertTo-Json
|
|
11
|
+
|
|
12
|
+
try {
|
|
13
|
+
$response = Invoke-RestMethod -Uri "http://localhost:3000/content/generate" -Method POST -ContentType "application/json" -Body $body -TimeoutSec 300
|
|
14
|
+
if ($response.success) {
|
|
15
|
+
Write-Host "PASSED" -ForegroundColor Green
|
|
16
|
+
} else {
|
|
17
|
+
Write-Host "FAILED: $($response.error)" -ForegroundColor Red
|
|
18
|
+
}
|
|
19
|
+
} catch {
|
|
20
|
+
Write-Host "ERROR: $_" -ForegroundColor Red
|
|
21
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# Test FULL: Presentation Options (5 tests)
|
|
2
|
+
$notebookUrl = "https://notebooklm.google.com/notebook/3e79b7be-9a72-4ac7-aaf7-ac3f450fa96f"
|
|
3
|
+
$passed = 0
|
|
4
|
+
$failed = 0
|
|
5
|
+
|
|
6
|
+
# Test presentation styles
|
|
7
|
+
$styles = @("detailed_slideshow", "presenter_notes")
|
|
8
|
+
foreach ($style in $styles) {
|
|
9
|
+
Write-Host "`n=== Testing presentation_style = $style ===" -ForegroundColor Cyan
|
|
10
|
+
|
|
11
|
+
$body = @{
|
|
12
|
+
notebook_url = $notebookUrl
|
|
13
|
+
content_type = "presentation"
|
|
14
|
+
presentation_style = $style
|
|
15
|
+
} | ConvertTo-Json
|
|
16
|
+
|
|
17
|
+
try {
|
|
18
|
+
$response = Invoke-RestMethod -Uri "http://localhost:3000/content/generate" -Method POST -ContentType "application/json" -Body $body -TimeoutSec 300
|
|
19
|
+
if ($response.success) {
|
|
20
|
+
Write-Host " PASSED" -ForegroundColor Green
|
|
21
|
+
$passed++
|
|
22
|
+
} else {
|
|
23
|
+
Write-Host " FAILED: $($response.error)" -ForegroundColor Red
|
|
24
|
+
$failed++
|
|
25
|
+
}
|
|
26
|
+
} catch {
|
|
27
|
+
Write-Host " ERROR: $_" -ForegroundColor Red
|
|
28
|
+
$failed++
|
|
29
|
+
}
|
|
30
|
+
Start-Sleep -Seconds 3
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
# Test presentation lengths
|
|
34
|
+
$lengths = @("short", "default")
|
|
35
|
+
foreach ($length in $lengths) {
|
|
36
|
+
Write-Host "`n=== Testing presentation_length = $length ===" -ForegroundColor Cyan
|
|
37
|
+
|
|
38
|
+
$body = @{
|
|
39
|
+
notebook_url = $notebookUrl
|
|
40
|
+
content_type = "presentation"
|
|
41
|
+
presentation_length = $length
|
|
42
|
+
} | ConvertTo-Json
|
|
43
|
+
|
|
44
|
+
try {
|
|
45
|
+
$response = Invoke-RestMethod -Uri "http://localhost:3000/content/generate" -Method POST -ContentType "application/json" -Body $body -TimeoutSec 300
|
|
46
|
+
if ($response.success) {
|
|
47
|
+
Write-Host " PASSED" -ForegroundColor Green
|
|
48
|
+
$passed++
|
|
49
|
+
} else {
|
|
50
|
+
Write-Host " FAILED: $($response.error)" -ForegroundColor Red
|
|
51
|
+
$failed++
|
|
52
|
+
}
|
|
53
|
+
} catch {
|
|
54
|
+
Write-Host " ERROR: $_" -ForegroundColor Red
|
|
55
|
+
$failed++
|
|
56
|
+
}
|
|
57
|
+
Start-Sleep -Seconds 3
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
# Test combined style + length
|
|
61
|
+
Write-Host "`n=== Testing presentation combo (style + length) ===" -ForegroundColor Cyan
|
|
62
|
+
$body = @{
|
|
63
|
+
notebook_url = $notebookUrl
|
|
64
|
+
content_type = "presentation"
|
|
65
|
+
presentation_style = "detailed_slideshow"
|
|
66
|
+
presentation_length = "short"
|
|
67
|
+
} | ConvertTo-Json
|
|
68
|
+
|
|
69
|
+
try {
|
|
70
|
+
$response = Invoke-RestMethod -Uri "http://localhost:3000/content/generate" -Method POST -ContentType "application/json" -Body $body -TimeoutSec 300
|
|
71
|
+
if ($response.success) {
|
|
72
|
+
Write-Host " PASSED" -ForegroundColor Green
|
|
73
|
+
$passed++
|
|
74
|
+
} else {
|
|
75
|
+
Write-Host " FAILED: $($response.error)" -ForegroundColor Red
|
|
76
|
+
$failed++
|
|
77
|
+
}
|
|
78
|
+
} catch {
|
|
79
|
+
Write-Host " ERROR: $_" -ForegroundColor Red
|
|
80
|
+
$failed++
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
Write-Host "`n=== SUMMARY ===" -ForegroundColor Yellow
|
|
84
|
+
Write-Host "Passed: $passed / 5"
|
|
85
|
+
Write-Host "Failed: $failed"
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Test FULL: Report Formats (2 tests)
|
|
2
|
+
$notebookUrl = "https://notebooklm.google.com/notebook/3e79b7be-9a72-4ac7-aaf7-ac3f450fa96f"
|
|
3
|
+
$formats = @("summary", "detailed")
|
|
4
|
+
|
|
5
|
+
$passed = 0
|
|
6
|
+
$failed = 0
|
|
7
|
+
|
|
8
|
+
foreach ($format in $formats) {
|
|
9
|
+
Write-Host "`n=== Testing report_format = $format ===" -ForegroundColor Cyan
|
|
10
|
+
|
|
11
|
+
$body = @{
|
|
12
|
+
notebook_url = $notebookUrl
|
|
13
|
+
content_type = "report"
|
|
14
|
+
report_format = $format
|
|
15
|
+
} | ConvertTo-Json
|
|
16
|
+
|
|
17
|
+
try {
|
|
18
|
+
$response = Invoke-RestMethod -Uri "http://localhost:3000/content/generate" -Method POST -ContentType "application/json" -Body $body -TimeoutSec 300
|
|
19
|
+
if ($response.success) {
|
|
20
|
+
Write-Host " PASSED" -ForegroundColor Green
|
|
21
|
+
$passed++
|
|
22
|
+
} else {
|
|
23
|
+
Write-Host " FAILED: $($response.error)" -ForegroundColor Red
|
|
24
|
+
$failed++
|
|
25
|
+
}
|
|
26
|
+
} catch {
|
|
27
|
+
Write-Host " ERROR: $_" -ForegroundColor Red
|
|
28
|
+
$failed++
|
|
29
|
+
}
|
|
30
|
+
Start-Sleep -Seconds 3
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
Write-Host "`n=== SUMMARY ===" -ForegroundColor Yellow
|
|
34
|
+
Write-Host "Passed: $passed / $($formats.Count)"
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Test FULL: Source Selection (1 test)
|
|
2
|
+
Add-Type -AssemblyName System.Web
|
|
3
|
+
$notebookUrl = "https://notebooklm.google.com/notebook/3e79b7be-9a72-4ac7-aaf7-ac3f450fa96f"
|
|
4
|
+
$encodedUrl = [System.Uri]::EscapeDataString($notebookUrl)
|
|
5
|
+
|
|
6
|
+
Write-Host "`n=== Testing source selection ===" -ForegroundColor Cyan
|
|
7
|
+
|
|
8
|
+
# First, get the list of sources
|
|
9
|
+
Write-Host " Getting sources list..." -ForegroundColor Gray
|
|
10
|
+
try {
|
|
11
|
+
$sourcesUrl = "http://localhost:3000/content?notebook_url=$encodedUrl"
|
|
12
|
+
$sourcesResponse = Invoke-RestMethod -Uri $sourcesUrl -Method GET -TimeoutSec 120
|
|
13
|
+
|
|
14
|
+
if ($sourcesResponse.success -and $sourcesResponse.data.sources -and $sourcesResponse.data.sources.Count -gt 0) {
|
|
15
|
+
$sources = @($sourcesResponse.data.sources[0].name)
|
|
16
|
+
Write-Host " Found $($sourcesResponse.data.sources.Count) sources, using first: $sources" -ForegroundColor Gray
|
|
17
|
+
|
|
18
|
+
$body = @{
|
|
19
|
+
notebook_url = $notebookUrl
|
|
20
|
+
content_type = "report"
|
|
21
|
+
sources = $sources
|
|
22
|
+
} | ConvertTo-Json
|
|
23
|
+
|
|
24
|
+
$response = Invoke-RestMethod -Uri "http://localhost:3000/content/generate" -Method POST -ContentType "application/json" -Body $body -TimeoutSec 300
|
|
25
|
+
if ($response.success) {
|
|
26
|
+
Write-Host "PASSED" -ForegroundColor Green
|
|
27
|
+
} else {
|
|
28
|
+
Write-Host "FAILED: $($response.error)" -ForegroundColor Red
|
|
29
|
+
}
|
|
30
|
+
} else {
|
|
31
|
+
Write-Host "SKIPPED: No sources found in notebook" -ForegroundColor Yellow
|
|
32
|
+
}
|
|
33
|
+
} catch {
|
|
34
|
+
Write-Host "ERROR: $_" -ForegroundColor Red
|
|
35
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Test FULL: Video format = brief
|
|
2
|
+
$notebookUrl = "https://notebooklm.google.com/notebook/3e79b7be-9a72-4ac7-aaf7-ac3f450fa96f"
|
|
3
|
+
|
|
4
|
+
Write-Host "`n=== FULL TEST: Video Format = brief ===" -ForegroundColor Cyan
|
|
5
|
+
|
|
6
|
+
$body = @{
|
|
7
|
+
notebook_url = $notebookUrl
|
|
8
|
+
content_type = "video"
|
|
9
|
+
video_format = "brief"
|
|
10
|
+
} | ConvertTo-Json
|
|
11
|
+
|
|
12
|
+
try {
|
|
13
|
+
$response = Invoke-RestMethod -Uri "http://localhost:3000/content/generate" -Method POST -ContentType "application/json" -Body $body -TimeoutSec 120
|
|
14
|
+
if ($response.success) {
|
|
15
|
+
Write-Host "PASSED" -ForegroundColor Green
|
|
16
|
+
Write-Host "Response: $($response.data | ConvertTo-Json -Depth 3)"
|
|
17
|
+
} else {
|
|
18
|
+
Write-Host "FAILED: $($response.error)" -ForegroundColor Red
|
|
19
|
+
}
|
|
20
|
+
} catch {
|
|
21
|
+
Write-Host "ERROR: $_" -ForegroundColor Red
|
|
22
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Test FULL: Video format = explainer
|
|
2
|
+
$notebookUrl = "https://notebooklm.google.com/notebook/3e79b7be-9a72-4ac7-aaf7-ac3f450fa96f"
|
|
3
|
+
|
|
4
|
+
Write-Host "`n=== FULL TEST: Video Format = explainer ===" -ForegroundColor Cyan
|
|
5
|
+
|
|
6
|
+
$body = @{
|
|
7
|
+
notebook_url = $notebookUrl
|
|
8
|
+
content_type = "video"
|
|
9
|
+
video_format = "explainer"
|
|
10
|
+
} | ConvertTo-Json
|
|
11
|
+
|
|
12
|
+
try {
|
|
13
|
+
$response = Invoke-RestMethod -Uri "http://localhost:3000/content/generate" -Method POST -ContentType "application/json" -Body $body -TimeoutSec 300
|
|
14
|
+
if ($response.success) {
|
|
15
|
+
Write-Host "PASSED" -ForegroundColor Green
|
|
16
|
+
Write-Host "Content length: $($response.data.content.Length) chars"
|
|
17
|
+
} else {
|
|
18
|
+
Write-Host "FAILED: $($response.error)" -ForegroundColor Red
|
|
19
|
+
}
|
|
20
|
+
} catch {
|
|
21
|
+
Write-Host "ERROR: $_" -ForegroundColor Red
|
|
22
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Test FULL: All Video Styles (6 tests)
|
|
2
|
+
$notebookUrl = "https://notebooklm.google.com/notebook/3e79b7be-9a72-4ac7-aaf7-ac3f450fa96f"
|
|
3
|
+
$styles = @("classroom", "documentary", "animated", "corporate", "cinematic", "minimalist")
|
|
4
|
+
|
|
5
|
+
$passed = 0
|
|
6
|
+
$failed = 0
|
|
7
|
+
|
|
8
|
+
foreach ($style in $styles) {
|
|
9
|
+
Write-Host "`n=== Testing video_style = $style ===" -ForegroundColor Cyan
|
|
10
|
+
|
|
11
|
+
$body = @{
|
|
12
|
+
notebook_url = $notebookUrl
|
|
13
|
+
content_type = "video"
|
|
14
|
+
video_style = $style
|
|
15
|
+
} | ConvertTo-Json
|
|
16
|
+
|
|
17
|
+
try {
|
|
18
|
+
$response = Invoke-RestMethod -Uri "http://localhost:3000/content/generate" -Method POST -ContentType "application/json" -Body $body -TimeoutSec 300
|
|
19
|
+
if ($response.success) {
|
|
20
|
+
Write-Host " PASSED" -ForegroundColor Green
|
|
21
|
+
$passed++
|
|
22
|
+
} else {
|
|
23
|
+
Write-Host " FAILED: $($response.error)" -ForegroundColor Red
|
|
24
|
+
$failed++
|
|
25
|
+
}
|
|
26
|
+
} catch {
|
|
27
|
+
Write-Host " ERROR: $_" -ForegroundColor Red
|
|
28
|
+
$failed++
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
# Small delay between tests to avoid rate limiting
|
|
32
|
+
Start-Sleep -Seconds 3
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
Write-Host "`n=== SUMMARY ===" -ForegroundColor Yellow
|
|
36
|
+
Write-Host "Passed: $passed / $($styles.Count)" -ForegroundColor $(if($passed -eq $styles.Count) {"Green"} else {"Yellow"})
|
|
37
|
+
Write-Host "Failed: $failed" -ForegroundColor $(if($failed -eq 0) {"Green"} else {"Red"})
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Test /content/generate with report type
|
|
2
|
+
$body = @{
|
|
3
|
+
notebook_id = "notebook-2"
|
|
4
|
+
content_type = "report"
|
|
5
|
+
} | ConvertTo-Json
|
|
6
|
+
|
|
7
|
+
Write-Host "Generating report from IFS sources..."
|
|
8
|
+
try {
|
|
9
|
+
$response = Invoke-RestMethod -Uri "http://localhost:3000/content/generate" -Method POST -ContentType "application/json" -Body $body -TimeoutSec 300
|
|
10
|
+
Write-Host "`nResponse:"
|
|
11
|
+
$response | ConvertTo-Json -Depth 5
|
|
12
|
+
} catch {
|
|
13
|
+
Write-Host "Error: $_"
|
|
14
|
+
Write-Host "Response content: $($_.Exception.Response)"
|
|
15
|
+
}
|