notelm-mcp 1.2.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 +21 -0
- package/README.md +456 -0
- package/dist/auth/auth-manager.d.ts +139 -0
- package/dist/auth/auth-manager.d.ts.map +1 -0
- package/dist/auth/auth-manager.js +960 -0
- package/dist/auth/auth-manager.js.map +1 -0
- package/dist/config.d.ts +92 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +219 -0
- package/dist/config.js.map +1 -0
- package/dist/constants.d.ts +58 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +133 -0
- package/dist/constants.js.map +1 -0
- package/dist/errors.d.ts +26 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +41 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +325 -0
- package/dist/index.js.map +1 -0
- package/dist/library/notebook-library.d.ts +70 -0
- package/dist/library/notebook-library.d.ts.map +1 -0
- package/dist/library/notebook-library.js +279 -0
- package/dist/library/notebook-library.js.map +1 -0
- package/dist/library/types.d.ts +67 -0
- package/dist/library/types.d.ts.map +1 -0
- package/dist/library/types.js +8 -0
- package/dist/library/types.js.map +1 -0
- package/dist/playwright.config.d.ts +3 -0
- package/dist/playwright.config.d.ts.map +1 -0
- package/dist/playwright.config.js +38 -0
- package/dist/playwright.config.js.map +1 -0
- package/dist/resources/resource-handlers.d.ts +22 -0
- package/dist/resources/resource-handlers.d.ts.map +1 -0
- package/dist/resources/resource-handlers.js +216 -0
- package/dist/resources/resource-handlers.js.map +1 -0
- package/dist/scripts/save-auth-state.d.ts +2 -0
- package/dist/scripts/save-auth-state.d.ts.map +1 -0
- package/dist/scripts/save-auth-state.js +91 -0
- package/dist/scripts/save-auth-state.js.map +1 -0
- package/dist/session/browser-session.d.ts +108 -0
- package/dist/session/browser-session.d.ts.map +1 -0
- package/dist/session/browser-session.js +636 -0
- package/dist/session/browser-session.js.map +1 -0
- package/dist/session/session-manager.d.ts +76 -0
- package/dist/session/session-manager.d.ts.map +1 -0
- package/dist/session/session-manager.js +273 -0
- package/dist/session/session-manager.js.map +1 -0
- package/dist/session/shared-context-manager.d.ts +107 -0
- package/dist/session/shared-context-manager.d.ts.map +1 -0
- package/dist/session/shared-context-manager.js +447 -0
- package/dist/session/shared-context-manager.js.map +1 -0
- package/dist/src/auth/auth-manager.d.ts +139 -0
- package/dist/src/auth/auth-manager.d.ts.map +1 -0
- package/dist/src/auth/auth-manager.js +960 -0
- package/dist/src/auth/auth-manager.js.map +1 -0
- package/dist/src/config.d.ts +92 -0
- package/dist/src/config.d.ts.map +1 -0
- package/dist/src/config.js +219 -0
- package/dist/src/config.js.map +1 -0
- package/dist/src/constants.d.ts +58 -0
- package/dist/src/constants.d.ts.map +1 -0
- package/dist/src/constants.js +133 -0
- package/dist/src/constants.js.map +1 -0
- package/dist/src/errors.d.ts +26 -0
- package/dist/src/errors.d.ts.map +1 -0
- package/dist/src/errors.js +41 -0
- package/dist/src/errors.js.map +1 -0
- package/dist/src/index.d.ts +32 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +325 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/library/notebook-library.d.ts +70 -0
- package/dist/src/library/notebook-library.d.ts.map +1 -0
- package/dist/src/library/notebook-library.js +279 -0
- package/dist/src/library/notebook-library.js.map +1 -0
- package/dist/src/library/types.d.ts +67 -0
- package/dist/src/library/types.d.ts.map +1 -0
- package/dist/src/library/types.js +8 -0
- package/dist/src/library/types.js.map +1 -0
- package/dist/src/resources/resource-handlers.d.ts +22 -0
- package/dist/src/resources/resource-handlers.d.ts.map +1 -0
- package/dist/src/resources/resource-handlers.js +216 -0
- package/dist/src/resources/resource-handlers.js.map +1 -0
- package/dist/src/scripts/health-check.d.ts +13 -0
- package/dist/src/scripts/health-check.d.ts.map +1 -0
- package/dist/src/scripts/health-check.js +100 -0
- package/dist/src/scripts/health-check.js.map +1 -0
- package/dist/src/session/browser-session.d.ts +108 -0
- package/dist/src/session/browser-session.d.ts.map +1 -0
- package/dist/src/session/browser-session.js +642 -0
- package/dist/src/session/browser-session.js.map +1 -0
- package/dist/src/session/session-manager.d.ts +76 -0
- package/dist/src/session/session-manager.d.ts.map +1 -0
- package/dist/src/session/session-manager.js +273 -0
- package/dist/src/session/session-manager.js.map +1 -0
- package/dist/src/session/shared-context-manager.d.ts +107 -0
- package/dist/src/session/shared-context-manager.d.ts.map +1 -0
- package/dist/src/session/shared-context-manager.js +447 -0
- package/dist/src/session/shared-context-manager.js.map +1 -0
- package/dist/src/tools/definitions/ask-question.d.ts +8 -0
- package/dist/src/tools/definitions/ask-question.d.ts.map +1 -0
- package/dist/src/tools/definitions/ask-question.js +211 -0
- package/dist/src/tools/definitions/ask-question.js.map +1 -0
- package/dist/src/tools/definitions/notebook-management.d.ts +3 -0
- package/dist/src/tools/definitions/notebook-management.d.ts.map +1 -0
- package/dist/src/tools/definitions/notebook-management.js +243 -0
- package/dist/src/tools/definitions/notebook-management.js.map +1 -0
- package/dist/src/tools/definitions/session-management.d.ts +3 -0
- package/dist/src/tools/definitions/session-management.d.ts.map +1 -0
- package/dist/src/tools/definitions/session-management.js +41 -0
- package/dist/src/tools/definitions/session-management.js.map +1 -0
- package/dist/src/tools/definitions/system.d.ts +3 -0
- package/dist/src/tools/definitions/system.d.ts.map +1 -0
- package/dist/src/tools/definitions/system.js +143 -0
- package/dist/src/tools/definitions/system.js.map +1 -0
- package/dist/src/tools/definitions.d.ts +12 -0
- package/dist/src/tools/definitions.d.ts.map +1 -0
- package/dist/src/tools/definitions.js +26 -0
- package/dist/src/tools/definitions.js.map +1 -0
- package/dist/src/tools/handlers.d.ts +212 -0
- package/dist/src/tools/handlers.d.ts.map +1 -0
- package/dist/src/tools/handlers.js +712 -0
- package/dist/src/tools/handlers.js.map +1 -0
- package/dist/src/tools/index.d.ts +8 -0
- package/dist/src/tools/index.d.ts.map +1 -0
- package/dist/src/tools/index.js +8 -0
- package/dist/src/tools/index.js.map +1 -0
- package/dist/src/types.d.ts +88 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/types.js +5 -0
- package/dist/src/types.js.map +1 -0
- package/dist/src/utils/auth-manager.d.ts +2 -0
- package/dist/src/utils/auth-manager.d.ts.map +1 -0
- package/dist/src/utils/auth-manager.js +25 -0
- package/dist/src/utils/auth-manager.js.map +1 -0
- package/dist/src/utils/cleanup-manager.d.ts +133 -0
- package/dist/src/utils/cleanup-manager.d.ts.map +1 -0
- package/dist/src/utils/cleanup-manager.js +673 -0
- package/dist/src/utils/cleanup-manager.js.map +1 -0
- package/dist/src/utils/cli-handler.d.ts +16 -0
- package/dist/src/utils/cli-handler.d.ts.map +1 -0
- package/dist/src/utils/cli-handler.js +102 -0
- package/dist/src/utils/cli-handler.js.map +1 -0
- package/dist/src/utils/logger.d.ts +61 -0
- package/dist/src/utils/logger.d.ts.map +1 -0
- package/dist/src/utils/logger.js +92 -0
- package/dist/src/utils/logger.js.map +1 -0
- package/dist/src/utils/page-utils.d.ts +54 -0
- package/dist/src/utils/page-utils.d.ts.map +1 -0
- package/dist/src/utils/page-utils.js +381 -0
- package/dist/src/utils/page-utils.js.map +1 -0
- package/dist/src/utils/rate-limit-handler.d.ts +42 -0
- package/dist/src/utils/rate-limit-handler.d.ts.map +1 -0
- package/dist/src/utils/rate-limit-handler.js +88 -0
- package/dist/src/utils/rate-limit-handler.js.map +1 -0
- package/dist/src/utils/rate-limit-handler.test.d.ts +7 -0
- package/dist/src/utils/rate-limit-handler.test.d.ts.map +1 -0
- package/dist/src/utils/rate-limit-handler.test.js +86 -0
- package/dist/src/utils/rate-limit-handler.test.js.map +1 -0
- package/dist/src/utils/settings-manager.d.ts +37 -0
- package/dist/src/utils/settings-manager.d.ts.map +1 -0
- package/dist/src/utils/settings-manager.js +121 -0
- package/dist/src/utils/settings-manager.js.map +1 -0
- package/dist/src/utils/stealth-utils.d.ts +135 -0
- package/dist/src/utils/stealth-utils.d.ts.map +1 -0
- package/dist/src/utils/stealth-utils.js +396 -0
- package/dist/src/utils/stealth-utils.js.map +1 -0
- package/dist/src/utils/stealth-utils.test.d.ts +7 -0
- package/dist/src/utils/stealth-utils.test.d.ts.map +1 -0
- package/dist/src/utils/stealth-utils.test.js +72 -0
- package/dist/src/utils/stealth-utils.test.js.map +1 -0
- package/dist/tests/e2e/authenticated.spec.d.ts +2 -0
- package/dist/tests/e2e/authenticated.spec.d.ts.map +1 -0
- package/dist/tests/e2e/authenticated.spec.js +41 -0
- package/dist/tests/e2e/authenticated.spec.js.map +1 -0
- package/dist/tests/e2e/mocked.spec.d.ts +2 -0
- package/dist/tests/e2e/mocked.spec.d.ts.map +1 -0
- package/dist/tests/e2e/mocked.spec.js +32 -0
- package/dist/tests/e2e/mocked.spec.js.map +1 -0
- package/dist/tests/mocks/handlers.d.ts +4 -0
- package/dist/tests/mocks/handlers.d.ts.map +1 -0
- package/dist/tests/mocks/handlers.js +55 -0
- package/dist/tests/mocks/handlers.js.map +1 -0
- package/dist/tests/mocks/setup.d.ts +3 -0
- package/dist/tests/mocks/setup.d.ts.map +1 -0
- package/dist/tests/mocks/setup.js +77 -0
- package/dist/tests/mocks/setup.js.map +1 -0
- package/dist/tools/definitions/ask-question.d.ts +8 -0
- package/dist/tools/definitions/ask-question.d.ts.map +1 -0
- package/dist/tools/definitions/ask-question.js +211 -0
- package/dist/tools/definitions/ask-question.js.map +1 -0
- package/dist/tools/definitions/notebook-management.d.ts +3 -0
- package/dist/tools/definitions/notebook-management.d.ts.map +1 -0
- package/dist/tools/definitions/notebook-management.js +243 -0
- package/dist/tools/definitions/notebook-management.js.map +1 -0
- package/dist/tools/definitions/session-management.d.ts +3 -0
- package/dist/tools/definitions/session-management.d.ts.map +1 -0
- package/dist/tools/definitions/session-management.js +41 -0
- package/dist/tools/definitions/session-management.js.map +1 -0
- package/dist/tools/definitions/system.d.ts +3 -0
- package/dist/tools/definitions/system.d.ts.map +1 -0
- package/dist/tools/definitions/system.js +143 -0
- package/dist/tools/definitions/system.js.map +1 -0
- package/dist/tools/definitions.d.ts +12 -0
- package/dist/tools/definitions.d.ts.map +1 -0
- package/dist/tools/definitions.js +26 -0
- package/dist/tools/definitions.js.map +1 -0
- package/dist/tools/handlers.d.ts +212 -0
- package/dist/tools/handlers.d.ts.map +1 -0
- package/dist/tools/handlers.js +712 -0
- package/dist/tools/handlers.js.map +1 -0
- package/dist/tools/index.d.ts +8 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +8 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/types.d.ts +82 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +5 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/cleanup-manager.d.ts +133 -0
- package/dist/utils/cleanup-manager.d.ts.map +1 -0
- package/dist/utils/cleanup-manager.js +673 -0
- package/dist/utils/cleanup-manager.js.map +1 -0
- package/dist/utils/cli-handler.d.ts +16 -0
- package/dist/utils/cli-handler.d.ts.map +1 -0
- package/dist/utils/cli-handler.js +102 -0
- package/dist/utils/cli-handler.js.map +1 -0
- package/dist/utils/logger.d.ts +61 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +92 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/page-utils.d.ts +54 -0
- package/dist/utils/page-utils.d.ts.map +1 -0
- package/dist/utils/page-utils.js +381 -0
- package/dist/utils/page-utils.js.map +1 -0
- package/dist/utils/rate-limit-handler.d.ts +42 -0
- package/dist/utils/rate-limit-handler.d.ts.map +1 -0
- package/dist/utils/rate-limit-handler.js +88 -0
- package/dist/utils/rate-limit-handler.js.map +1 -0
- package/dist/utils/rate-limit-handler.test.d.ts +7 -0
- package/dist/utils/rate-limit-handler.test.d.ts.map +1 -0
- package/dist/utils/rate-limit-handler.test.js +91 -0
- package/dist/utils/rate-limit-handler.test.js.map +1 -0
- package/dist/utils/settings-manager.d.ts +37 -0
- package/dist/utils/settings-manager.d.ts.map +1 -0
- package/dist/utils/settings-manager.js +121 -0
- package/dist/utils/settings-manager.js.map +1 -0
- package/dist/utils/stealth-utils.d.ts +135 -0
- package/dist/utils/stealth-utils.d.ts.map +1 -0
- package/dist/utils/stealth-utils.js +396 -0
- package/dist/utils/stealth-utils.js.map +1 -0
- package/dist/utils/stealth-utils.test.d.ts +7 -0
- package/dist/utils/stealth-utils.test.d.ts.map +1 -0
- package/dist/utils/stealth-utils.test.js +72 -0
- package/dist/utils/stealth-utils.test.js.map +1 -0
- package/docs/01_configuration.md +94 -0
- package/docs/02_tools.md +34 -0
- package/docs/03_troubleshooting.md +59 -0
- package/docs/04_usage-guide.md +245 -0
- package/docs/05_project-analysis.qmd +309 -0
- package/docs/06_integration-analysis.html +914 -0
- package/docs/06_integration-analysis.qmd +255 -0
- package/docs/06_integration-analysis_files/libs/bootstrap/bootstrap-4f0954b6b0dd6bf39f4bb9151ba984db.min.css +12 -0
- package/docs/06_integration-analysis_files/libs/bootstrap/bootstrap-icons.css +2106 -0
- package/docs/06_integration-analysis_files/libs/bootstrap/bootstrap-icons.woff +0 -0
- package/docs/06_integration-analysis_files/libs/bootstrap/bootstrap.min.js +7 -0
- package/docs/06_integration-analysis_files/libs/clipboard/clipboard.min.js +7 -0
- package/docs/06_integration-analysis_files/libs/quarto-html/anchor.min.js +9 -0
- package/docs/06_integration-analysis_files/libs/quarto-html/axe/axe-check.js +145 -0
- package/docs/06_integration-analysis_files/libs/quarto-html/popper.min.js +6 -0
- package/docs/06_integration-analysis_files/libs/quarto-html/quarto-syntax-highlighting-587c61ba64f3a5504c4d52d930310e48.css +236 -0
- package/docs/06_integration-analysis_files/libs/quarto-html/quarto.js +847 -0
- package/docs/06_integration-analysis_files/libs/quarto-html/tabsets/tabsets.js +95 -0
- package/docs/06_integration-analysis_files/libs/quarto-html/tippy.css +1 -0
- package/docs/06_integration-analysis_files/libs/quarto-html/tippy.umd.min.js +2 -0
- package/docs/07_e2e-testing-safety.qmd +754 -0
- package/docs/08_project-re-evaluation.html +609 -0
- package/docs/08_project-re-evaluation.qmd +86 -0
- package/docs/08_project-re-evaluation_files/libs/bootstrap/bootstrap-4f0954b6b0dd6bf39f4bb9151ba984db.min.css +12 -0
- package/docs/08_project-re-evaluation_files/libs/bootstrap/bootstrap-icons.css +2106 -0
- package/docs/08_project-re-evaluation_files/libs/bootstrap/bootstrap-icons.woff +0 -0
- package/docs/08_project-re-evaluation_files/libs/bootstrap/bootstrap.min.js +7 -0
- package/docs/08_project-re-evaluation_files/libs/clipboard/clipboard.min.js +7 -0
- package/docs/08_project-re-evaluation_files/libs/quarto-html/anchor.min.js +9 -0
- package/docs/08_project-re-evaluation_files/libs/quarto-html/axe/axe-check.js +145 -0
- package/docs/08_project-re-evaluation_files/libs/quarto-html/popper.min.js +6 -0
- package/docs/08_project-re-evaluation_files/libs/quarto-html/quarto-syntax-highlighting-587c61ba64f3a5504c4d52d930310e48.css +236 -0
- package/docs/08_project-re-evaluation_files/libs/quarto-html/quarto.js +847 -0
- package/docs/08_project-re-evaluation_files/libs/quarto-html/tabsets/tabsets.js +95 -0
- package/docs/08_project-re-evaluation_files/libs/quarto-html/tippy.css +1 -0
- package/docs/08_project-re-evaluation_files/libs/quarto-html/tippy.umd.min.js +2 -0
- package/docs/notebooklm-mcp-usage.html +704 -0
- package/docs/notebooklm-mcp-usage.qmd +119 -0
- package/docs/notebooklm-mcp-usage_files/libs/bootstrap/bootstrap-6b71f2156b6a5230c6677325978bcf08.min.css +12 -0
- package/docs/notebooklm-mcp-usage_files/libs/bootstrap/bootstrap-icons.css +2106 -0
- package/docs/notebooklm-mcp-usage_files/libs/bootstrap/bootstrap-icons.woff +0 -0
- package/docs/notebooklm-mcp-usage_files/libs/bootstrap/bootstrap.min.js +7 -0
- package/docs/notebooklm-mcp-usage_files/libs/clipboard/clipboard.min.js +7 -0
- package/docs/notebooklm-mcp-usage_files/libs/quarto-html/anchor.min.js +9 -0
- package/docs/notebooklm-mcp-usage_files/libs/quarto-html/axe/axe-check.js +145 -0
- package/docs/notebooklm-mcp-usage_files/libs/quarto-html/popper.min.js +6 -0
- package/docs/notebooklm-mcp-usage_files/libs/quarto-html/quarto-syntax-highlighting-587c61ba64f3a5504c4d52d930310e48.css +236 -0
- package/docs/notebooklm-mcp-usage_files/libs/quarto-html/quarto.js +847 -0
- package/docs/notebooklm-mcp-usage_files/libs/quarto-html/tabsets/tabsets.js +95 -0
- package/docs/notebooklm-mcp-usage_files/libs/quarto-html/tippy.css +1 -0
- package/docs/notebooklm-mcp-usage_files/libs/quarto-html/tippy.umd.min.js +2 -0
- package/docs/repomix-usage_files/libs/bootstrap/bootstrap-6b71f2156b6a5230c6677325978bcf08.min.css +12 -0
- package/docs/repomix-usage_files/libs/bootstrap/bootstrap-icons.css +2106 -0
- package/docs/repomix-usage_files/libs/bootstrap/bootstrap-icons.woff +0 -0
- package/docs/repomix-usage_files/libs/bootstrap/bootstrap.min.js +7 -0
- package/docs/repomix-usage_files/libs/clipboard/clipboard.min.js +7 -0
- package/docs/repomix-usage_files/libs/quarto-html/anchor.min.js +9 -0
- package/docs/repomix-usage_files/libs/quarto-html/axe/axe-check.js +145 -0
- package/docs/repomix-usage_files/libs/quarto-html/popper.min.js +6 -0
- package/docs/repomix-usage_files/libs/quarto-html/quarto-syntax-highlighting-587c61ba64f3a5504c4d52d930310e48.css +236 -0
- package/docs/repomix-usage_files/libs/quarto-html/quarto.js +847 -0
- package/docs/repomix-usage_files/libs/quarto-html/tabsets/tabsets.js +95 -0
- package/docs/repomix-usage_files/libs/quarto-html/tippy.css +1 -0
- package/docs/repomix-usage_files/libs/quarto-html/tippy.umd.min.js +2 -0
- package/package.json +62 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
## Troubleshooting
|
|
2
|
+
|
|
3
|
+
### Fresh start / Deep cleanup
|
|
4
|
+
If you're experiencing persistent issues, corrupted data, or want to start completely fresh:
|
|
5
|
+
|
|
6
|
+
**⚠️ CRITICAL: Close ALL Chrome/Chromium instances before cleanup!** Open browsers can prevent cleanup and cause issues.
|
|
7
|
+
|
|
8
|
+
**Recommended workflow:**
|
|
9
|
+
1. Close all Chrome/Chromium windows and instances
|
|
10
|
+
2. Ask: "Run NotebookLM cleanup and preserve my library"
|
|
11
|
+
3. Review the preview - you'll see exactly what will be deleted
|
|
12
|
+
4. Confirm deletion
|
|
13
|
+
5. Re-authenticate: "Open NotebookLM auth setup"
|
|
14
|
+
|
|
15
|
+
**What gets cleaned:**
|
|
16
|
+
- Browser data, cache, Chrome profiles
|
|
17
|
+
- Temporary files and logs
|
|
18
|
+
- Old installation data
|
|
19
|
+
- **Preserved:** Your notebook library (when using preserve option)
|
|
20
|
+
|
|
21
|
+
**Useful for:**
|
|
22
|
+
- Authentication problems
|
|
23
|
+
- Browser session conflicts
|
|
24
|
+
- Corrupted browser profiles
|
|
25
|
+
- Clean reinstalls
|
|
26
|
+
- Switching between accounts
|
|
27
|
+
|
|
28
|
+
### Browser closed / `newPage` errors
|
|
29
|
+
- Symptom: `browserContext.newPage: Target page/context/browser has been closed`.
|
|
30
|
+
- Fix: The server auto‑recovers (recreates context and page). Re‑run the tool.
|
|
31
|
+
|
|
32
|
+
### Profile lock / `ProcessSingleton` errors
|
|
33
|
+
- Cause: Another Chrome is using the base profile.
|
|
34
|
+
- Fix: `NOTEBOOK_PROFILE_STRATEGY=auto` (default) falls back to isolated per‑instance profiles; or set `isolated`.
|
|
35
|
+
|
|
36
|
+
### Authentication issues
|
|
37
|
+
**Quick fix:** Ask the agent to repair authentication; it will run `get_health` → `setup_auth` → `get_health`.
|
|
38
|
+
|
|
39
|
+
**For persistent auth failures:**
|
|
40
|
+
1. Close ALL Chrome/Chromium instances
|
|
41
|
+
2. Ask: "Run NotebookLM cleanup with library preservation"
|
|
42
|
+
3. After cleanup completes, ask: "Open NotebookLM auth setup"
|
|
43
|
+
4. This creates a completely fresh browser session while keeping your notebooks
|
|
44
|
+
|
|
45
|
+
**Auto-login (optional):**
|
|
46
|
+
- Set `AUTO_LOGIN_ENABLED=true` with `LOGIN_EMAIL`, `LOGIN_PASSWORD` environment variables
|
|
47
|
+
- For automation workflows only
|
|
48
|
+
|
|
49
|
+
### Typing speed too slow/fast
|
|
50
|
+
- Adjust `TYPING_WPM_MIN`/`MAX`; or disable stealth typing by setting `STEALTH_ENABLED=false`.
|
|
51
|
+
|
|
52
|
+
### Rate limit reached
|
|
53
|
+
- Symptom: "NotebookLM rate limit reached (50 queries/day for free accounts)".
|
|
54
|
+
- Fix: Use `re_auth` tool to switch to a different Google account, or wait until tomorrow.
|
|
55
|
+
- Upgrade: Google AI Pro/Ultra gives 5x higher limits.
|
|
56
|
+
|
|
57
|
+
### No notebooks found
|
|
58
|
+
- Ask to add the NotebookLM link you need.
|
|
59
|
+
- Ask to list the stored notebooks, then choose the one to activate.
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
# Advanced Usage Guide
|
|
2
|
+
|
|
3
|
+
This guide covers advanced usage patterns, best practices, and detailed examples for the NotebookLM MCP server.
|
|
4
|
+
|
|
5
|
+
> 📘 For installation and quick start, see the main [README](../README.md).
|
|
6
|
+
|
|
7
|
+
## Research Patterns
|
|
8
|
+
|
|
9
|
+
### The Iterative Research Pattern
|
|
10
|
+
|
|
11
|
+
The server is designed to make your agent **ask questions automatically** with NotebookLM. Here's how to leverage this:
|
|
12
|
+
|
|
13
|
+
1. **Start with broad context**
|
|
14
|
+
```
|
|
15
|
+
"Before implementing the webhook system, research the complete webhook architecture in NotebookLM, including error handling, retry logic, and security considerations."
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
2. **The agent will automatically**:
|
|
19
|
+
- Ask an initial question to NotebookLM
|
|
20
|
+
- Read the reminder at the end of each response
|
|
21
|
+
- Ask follow-up questions to gather more details
|
|
22
|
+
- Continue until it has comprehensive understanding
|
|
23
|
+
- Only then provide you with a complete answer
|
|
24
|
+
|
|
25
|
+
3. **Session management**
|
|
26
|
+
- The agent maintains the same `session_id` throughout the research
|
|
27
|
+
- This preserves context across multiple questions
|
|
28
|
+
- Sessions auto-cleanup after 15 minutes of inactivity
|
|
29
|
+
|
|
30
|
+
### Deep Dive Example
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
User: "I need to implement OAuth2 with refresh tokens. Research the complete flow first."
|
|
34
|
+
|
|
35
|
+
Agent behavior:
|
|
36
|
+
1. Asks NotebookLM: "How does OAuth2 refresh token flow work?"
|
|
37
|
+
2. Gets answer with reminder to ask more
|
|
38
|
+
3. Asks: "What are the security best practices for storing refresh tokens?"
|
|
39
|
+
4. Asks: "How to handle token expiration and renewal?"
|
|
40
|
+
5. Asks: "What are common implementation pitfalls?"
|
|
41
|
+
6. Synthesizes all answers into comprehensive implementation plan
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Notebook Management Strategies
|
|
45
|
+
|
|
46
|
+
### Multi-Project Setup
|
|
47
|
+
|
|
48
|
+
Organize notebooks by project or domain:
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
Production Docs Notebook → APIs, deployment, monitoring
|
|
52
|
+
Development Notebook → Local setup, debugging, testing
|
|
53
|
+
Architecture Notebook → System design, patterns, decisions
|
|
54
|
+
Legacy Code Notebook → Old systems, migration guides
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Notebook Switching Patterns
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
"For this bug fix, use the Legacy Code notebook."
|
|
61
|
+
"Switch to the Architecture notebook for this design discussion."
|
|
62
|
+
"Use the Production Docs for deployment steps."
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Metadata Best Practices
|
|
66
|
+
|
|
67
|
+
When adding notebooks, provide rich metadata:
|
|
68
|
+
```
|
|
69
|
+
"Add this notebook with description: 'Complete React 18 documentation including hooks, performance, and migration guides' and tags: react, frontend, hooks, performance"
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Authentication Management
|
|
73
|
+
|
|
74
|
+
### Account Rotation Strategy
|
|
75
|
+
|
|
76
|
+
Free tier provides 50 queries/day per account. Maximize usage:
|
|
77
|
+
|
|
78
|
+
1. **Primary account** → Main development work
|
|
79
|
+
2. **Secondary account** → Testing and validation
|
|
80
|
+
3. **Backup account** → Emergency queries when others are exhausted
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
"Switch to secondary account" → When approaching limit
|
|
84
|
+
"Check health status" → Verify which account is active
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Handling Auth Failures
|
|
88
|
+
|
|
89
|
+
The agent can self-repair authentication:
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
"NotebookLM says I'm logged out—repair authentication"
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
This triggers: `get_health` → `setup_auth` → `get_health`
|
|
96
|
+
|
|
97
|
+
## Advanced Configuration
|
|
98
|
+
|
|
99
|
+
### Performance Optimization
|
|
100
|
+
|
|
101
|
+
For faster interactions during development:
|
|
102
|
+
```bash
|
|
103
|
+
STEALTH_ENABLED=false # Disable human-like typing
|
|
104
|
+
TYPING_WPM_MAX=500 # Increase typing speed
|
|
105
|
+
HEADLESS=false # See what's happening
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### Debugging Sessions
|
|
109
|
+
|
|
110
|
+
Enable browser visibility to watch the live conversation:
|
|
111
|
+
```
|
|
112
|
+
"Research this issue and show me the browser"
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Your agent automatically enables browser visibility for that research session.
|
|
116
|
+
|
|
117
|
+
### Session Management
|
|
118
|
+
|
|
119
|
+
Monitor active sessions:
|
|
120
|
+
```
|
|
121
|
+
"List all active NotebookLM sessions"
|
|
122
|
+
"Close inactive sessions to free resources"
|
|
123
|
+
"Reset the stuck session for notebook X"
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Complex Workflows
|
|
127
|
+
|
|
128
|
+
### Multi-Stage Research
|
|
129
|
+
|
|
130
|
+
For complex implementations requiring multiple knowledge sources:
|
|
131
|
+
|
|
132
|
+
```
|
|
133
|
+
Stage 1: "Research the API structure in the API notebook"
|
|
134
|
+
Stage 2: "Switch to Architecture notebook and research the service patterns"
|
|
135
|
+
Stage 3: "Use the Security notebook to research authentication requirements"
|
|
136
|
+
Stage 4: "Synthesize all findings into implementation plan"
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### Validation Workflow
|
|
140
|
+
|
|
141
|
+
Cross-reference information across notebooks:
|
|
142
|
+
|
|
143
|
+
```
|
|
144
|
+
1. "In Production notebook, find the current API version"
|
|
145
|
+
2. "Switch to Migration notebook, check compatibility notes"
|
|
146
|
+
3. "Verify in Architecture notebook if this aligns with our patterns"
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
## Tool Integration Patterns
|
|
150
|
+
|
|
151
|
+
### Direct Tool Calls
|
|
152
|
+
|
|
153
|
+
For manual scripting, capture and reuse session IDs:
|
|
154
|
+
|
|
155
|
+
```json
|
|
156
|
+
// First call - capture session_id
|
|
157
|
+
{
|
|
158
|
+
"tool": "ask_question",
|
|
159
|
+
"question": "What is the webhook structure?",
|
|
160
|
+
"notebook_id": "abc123"
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// Follow-up - reuse session_id
|
|
164
|
+
{
|
|
165
|
+
"tool": "ask_question",
|
|
166
|
+
"question": "Show me error handling examples",
|
|
167
|
+
"session_id": "captured_session_id_here"
|
|
168
|
+
}
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### Resource URIs
|
|
172
|
+
|
|
173
|
+
Access library data programmatically:
|
|
174
|
+
- `notebooklm://library` - Full library JSON
|
|
175
|
+
- `notebooklm://library/{id}` - Specific notebook metadata
|
|
176
|
+
|
|
177
|
+
## Best Practices
|
|
178
|
+
|
|
179
|
+
### 1. **Context Preservation**
|
|
180
|
+
- Always let the agent complete its research cycle
|
|
181
|
+
- Don't interrupt between questions in a research session
|
|
182
|
+
- Use descriptive notebook names for easy switching
|
|
183
|
+
|
|
184
|
+
### 2. **Knowledge Base Quality**
|
|
185
|
+
- Upload comprehensive documentation to NotebookLM
|
|
186
|
+
- Merge related docs into single notebooks (up to 500k words)
|
|
187
|
+
- Update notebooks when documentation changes
|
|
188
|
+
|
|
189
|
+
### 3. **Error Recovery**
|
|
190
|
+
- The server auto-recovers from browser crashes
|
|
191
|
+
- Sessions rebuild automatically if context is lost
|
|
192
|
+
- Profile corruption triggers automatic cleanup
|
|
193
|
+
|
|
194
|
+
### 4. **Resource Management**
|
|
195
|
+
- Close unused sessions to free memory
|
|
196
|
+
- The server maintains max 10 concurrent sessions
|
|
197
|
+
- Inactive sessions auto-close after 15 minutes
|
|
198
|
+
|
|
199
|
+
### 5. **Security Considerations**
|
|
200
|
+
- Use dedicated Google accounts for NotebookLM
|
|
201
|
+
- Never share authentication profiles between projects
|
|
202
|
+
- Backup `library.json` for important notebook collections
|
|
203
|
+
|
|
204
|
+
## Troubleshooting Patterns
|
|
205
|
+
|
|
206
|
+
### When NotebookLM returns incomplete answers
|
|
207
|
+
```
|
|
208
|
+
"The answer seems incomplete. Ask NotebookLM for more specific details about [topic]"
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
### When hitting rate limits
|
|
212
|
+
```
|
|
213
|
+
"We've hit the rate limit. Re-authenticate with the backup account"
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
### When browser seems stuck
|
|
217
|
+
```
|
|
218
|
+
"Reset all NotebookLM sessions and try again"
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
## Example Conversations
|
|
222
|
+
|
|
223
|
+
### Complete Feature Implementation
|
|
224
|
+
```
|
|
225
|
+
User: "I need to implement a webhook system with retry logic"
|
|
226
|
+
|
|
227
|
+
You: "Research webhook patterns with retry logic in NotebookLM first"
|
|
228
|
+
Agent: [Researches comprehensively, asking 4-5 follow-up questions]
|
|
229
|
+
Agent: "Based on my research, here's the implementation..."
|
|
230
|
+
[Provides detailed code with patterns from NotebookLM]
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
### Architecture Decision
|
|
234
|
+
```
|
|
235
|
+
User: "Should we use microservices or monolith for this feature?"
|
|
236
|
+
|
|
237
|
+
You: "Research our architecture patterns and decision criteria in the Architecture notebook"
|
|
238
|
+
Agent: [Gathers context about existing patterns, scalability needs, team constraints]
|
|
239
|
+
Agent: "According to our architecture guidelines..."
|
|
240
|
+
[Provides recommendation based on documented patterns]
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
---
|
|
244
|
+
|
|
245
|
+
Remember: The power of this integration lies in letting your agent **ask multiple questions** – gathering context and building comprehensive understanding before responding. Don't rush the research phase!
|
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "NotebookLM MCP 프로젝트 분석 보고서"
|
|
3
|
+
author: "Antigravity AI"
|
|
4
|
+
date: "2026-01-02"
|
|
5
|
+
format:
|
|
6
|
+
html:
|
|
7
|
+
toc: true
|
|
8
|
+
toc-depth: 3
|
|
9
|
+
number-sections: true
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# 프로젝트 개요
|
|
13
|
+
|
|
14
|
+
NotebookLM MCP는 Google NotebookLM을 MCP(Model Context Protocol) 서버로 통합하여 Claude와 같은 AI 에이전트가 NotebookLM의 RAG(Retrieval-Augmented Generation) 기능을 활용할 수 있게 해주는 TypeScript 기반 프로젝트입니다.
|
|
15
|
+
|
|
16
|
+
## 핵심 기능
|
|
17
|
+
|
|
18
|
+
- **브라우저 자동화**: Patchright(Playwright 포크)를 사용한 헤드리스 브라우저 제어
|
|
19
|
+
- **세션 관리**: 다중 동시 세션 지원, 자동 정리 및 복구
|
|
20
|
+
- **노트북 라이브러리**: 다중 NotebookLM 노트북 관리
|
|
21
|
+
- **MCP 통합**: 표준 MCP 프로토콜을 통한 도구 및 리소스 노출
|
|
22
|
+
- **스텔스 기능**: 봇 탐지 회피를 위한 휴먼 타이핑 시뮬레이션
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
# 프로젝트 강점
|
|
27
|
+
|
|
28
|
+
## 아키텍처 설계
|
|
29
|
+
|
|
30
|
+
::: {.callout-tip}
|
|
31
|
+
### 잘 설계된 모듈 구조
|
|
32
|
+
프로젝트는 관심사 분리(Separation of Concerns)를 잘 따르고 있습니다.
|
|
33
|
+
:::
|
|
34
|
+
|
|
35
|
+
| 모듈 | 책임 |
|
|
36
|
+
|------|------|
|
|
37
|
+
| `auth/` | 인증 관리 (로그인, 쿠키, 상태 저장) |
|
|
38
|
+
| `library/` | 노트북 라이브러리 CRUD |
|
|
39
|
+
| `session/` | 브라우저 세션 생명주기 |
|
|
40
|
+
| `tools/` | MCP 도구 정의 및 핸들러 |
|
|
41
|
+
| `resources/` | MCP 리소스 핸들러 |
|
|
42
|
+
| `utils/` | 재사용 유틸리티 |
|
|
43
|
+
|
|
44
|
+
## 코드 품질
|
|
45
|
+
|
|
46
|
+
1. **TypeScript 전면 도입**: 타입 안전성 확보
|
|
47
|
+
2. **포괄적인 에러 처리**: try-catch 블록과 사용자 친화적 메시지
|
|
48
|
+
3. **자동 복구 로직**: 브라우저/세션 충돌 시 자동 재연결
|
|
49
|
+
4. **상세한 로깅**: 디버깅을 위한 색상 구분 로그
|
|
50
|
+
|
|
51
|
+
## 사용자 경험
|
|
52
|
+
|
|
53
|
+
- **설정 불필요**: 환경 변수나 도구 파라미터로 런타임 구성
|
|
54
|
+
- **크로스 플랫폼**: Linux, macOS, Windows 지원 (`env-paths` 활용)
|
|
55
|
+
- **포괄적인 문서화**: 설정, 도구, 트러블슈팅, 사용 가이드 제공
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
# 발견된 문제점
|
|
60
|
+
|
|
61
|
+
## 심각도: 높음 (Critical)
|
|
62
|
+
|
|
63
|
+
### 1. 하드코딩된 독일어 셀렉터
|
|
64
|
+
|
|
65
|
+
::: {.callout-warning}
|
|
66
|
+
### 국제화 문제
|
|
67
|
+
일부 셀렉터가 독일어로 하드코딩되어 다른 언어 사용자에게 작동하지 않습니다.
|
|
68
|
+
:::
|
|
69
|
+
|
|
70
|
+
**위치**: `src/session/browser-session.ts:2504`, `src/auth/auth-manager.ts:1130-1134`
|
|
71
|
+
|
|
72
|
+
```typescript
|
|
73
|
+
// 문제점: 독일어 aria-label 하드코딩
|
|
74
|
+
await this.page.waitForSelector('textarea[aria-label="Feld für Anfragen"]', {
|
|
75
|
+
timeout: 5000,
|
|
76
|
+
state: "visible",
|
|
77
|
+
});
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
**개선안**: 다국어 셀렉터 배열 또는 언어 독립적 셀렉터 사용
|
|
81
|
+
|
|
82
|
+
```typescript
|
|
83
|
+
const localizedLabels = [
|
|
84
|
+
"Enter your question", // 영어
|
|
85
|
+
"Feld für Anfragen", // 독일어
|
|
86
|
+
"質問を入力", // 일본어
|
|
87
|
+
// ...
|
|
88
|
+
];
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### 2. 동기적 `require()` 사용
|
|
92
|
+
|
|
93
|
+
**위치**: `src/utils/settings-manager.ts:7101-7102`
|
|
94
|
+
|
|
95
|
+
```typescript
|
|
96
|
+
// 문제점: ESM 프로젝트에서 require() 사용
|
|
97
|
+
const fsSync = require("fs");
|
|
98
|
+
const data = fsSync.readFileSync(this.settingsPath, "utf-8");
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
**개선안**: ESM 호환 동기 import 또는 비동기 초기화 패턴 사용
|
|
102
|
+
|
|
103
|
+
```typescript
|
|
104
|
+
import { readFileSync } from "fs";
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### 3. `@ts-expect-error` 남용
|
|
108
|
+
|
|
109
|
+
여러 파일에서 타입 억제를 과도하게 사용하고 있습니다:
|
|
110
|
+
|
|
111
|
+
- `src/auth/auth-manager.ts`: sessionStorage 접근
|
|
112
|
+
- `src/session/browser-session.ts`: 브라우저 컨텍스트 평가
|
|
113
|
+
- `src/utils/stealth-utils.ts`: 윈도우 객체 접근
|
|
114
|
+
|
|
115
|
+
**개선안**: 브라우저 컨텍스트를 위한 적절한 타입 정의 생성
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## 심각도: 중간 (Medium)
|
|
120
|
+
|
|
121
|
+
### 4. 멀티 인스턴스 복구 전략 미흡
|
|
122
|
+
|
|
123
|
+
`SharedContextManager`에서 프로필 잠금 충돌 시 isolated 프로필로 대체하지만, 인증 상태가 불완전하게 복제될 수 있습니다.
|
|
124
|
+
|
|
125
|
+
### 5. 하드코딩된 타임아웃 값
|
|
126
|
+
|
|
127
|
+
**위치**: 다수의 파일
|
|
128
|
+
|
|
129
|
+
```typescript
|
|
130
|
+
await page.waitForTimeout(2000); // 매직 넘버
|
|
131
|
+
timeout: 10000, // 설정에서 가져오지 않음
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
**개선안**: `CONFIG` 객체에서 일관되게 타임아웃 로드
|
|
135
|
+
|
|
136
|
+
### 6. 불완전한 Rate Limit 처리
|
|
137
|
+
|
|
138
|
+
Rate limit 감지는 존재하지만, 재시도 로직이나 백오프 전략이 없습니다.
|
|
139
|
+
|
|
140
|
+
**개선안**:
|
|
141
|
+
|
|
142
|
+
```typescript
|
|
143
|
+
class RateLimitHandler {
|
|
144
|
+
private retryCount = 0;
|
|
145
|
+
private maxRetries = 3;
|
|
146
|
+
|
|
147
|
+
async executeWithRetry<T>(fn: () => Promise<T>): Promise<T> {
|
|
148
|
+
try {
|
|
149
|
+
return await fn();
|
|
150
|
+
} catch (e) {
|
|
151
|
+
if (e instanceof RateLimitError && this.retryCount < this.maxRetries) {
|
|
152
|
+
await this.exponentialBackoff();
|
|
153
|
+
return this.executeWithRetry(fn);
|
|
154
|
+
}
|
|
155
|
+
throw e;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### 7. 테스트 부재
|
|
162
|
+
|
|
163
|
+
프로젝트에 테스트 파일이 없습니다. `package.json`에 테스트 스크립트가 정의되어 있지 않습니다.
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
## 심각도: 낮음 (Low)
|
|
168
|
+
|
|
169
|
+
### 8. 중복 코드
|
|
170
|
+
|
|
171
|
+
세션 초기화와 복구 로직이 여러 곳에서 반복됩니다:
|
|
172
|
+
|
|
173
|
+
- `BrowserSession.init()`
|
|
174
|
+
- `BrowserSession.ask()` 내부의 복구 로직
|
|
175
|
+
- `BrowserSession.reset()`
|
|
176
|
+
|
|
177
|
+
**개선안**: 공통 복구 유틸리티 함수 추출
|
|
178
|
+
|
|
179
|
+
### 9. 마법 문자열 (Magic Strings)
|
|
180
|
+
|
|
181
|
+
셀렉터, URL, 에러 메시지 등이 코드 전반에 분산되어 있습니다.
|
|
182
|
+
|
|
183
|
+
**개선안**: 상수 파일로 집중화
|
|
184
|
+
|
|
185
|
+
```typescript
|
|
186
|
+
// src/constants.ts
|
|
187
|
+
export const SELECTORS = {
|
|
188
|
+
CHAT_INPUT: "textarea.query-box-input",
|
|
189
|
+
THINKING_MESSAGE: "div.thinking-message",
|
|
190
|
+
// ...
|
|
191
|
+
};
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
### 10. 불필요한 `void` 연산자
|
|
195
|
+
|
|
196
|
+
**위치**: `src/session/browser-session.ts:2527`
|
|
197
|
+
|
|
198
|
+
```typescript
|
|
199
|
+
void this.page.url(); // 불필요한 void
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
# 보안 고려사항
|
|
205
|
+
|
|
206
|
+
## 주의 필요
|
|
207
|
+
|
|
208
|
+
::: {.callout-caution}
|
|
209
|
+
### 자격 증명 로깅
|
|
210
|
+
비밀번호는 마스킹되어 있지만, 이메일 주소가 부분적으로 로그에 노출됩니다.
|
|
211
|
+
:::
|
|
212
|
+
|
|
213
|
+
```typescript
|
|
214
|
+
// 현재 구현
|
|
215
|
+
private maskEmail(email: string): string {
|
|
216
|
+
return `${name[0]}${"*".repeat(name.length - 2)}${name[name.length - 1]}@${domain}`;
|
|
217
|
+
}
|
|
218
|
+
// 결과: j***k@gmail.com (도메인 노출)
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
## 권장 사항
|
|
222
|
+
|
|
223
|
+
1. **민감 정보 로깅 검토**: 프로덕션에서 이메일 도메인도 마스킹
|
|
224
|
+
2. **브라우저 프로필 암호화**: 저장된 쿠키/세션 데이터 암호화 고려
|
|
225
|
+
3. **환경 변수 검증**: 민감한 환경 변수 형식 검증 강화
|
|
226
|
+
|
|
227
|
+
---
|
|
228
|
+
|
|
229
|
+
# 개선 권장사항
|
|
230
|
+
|
|
231
|
+
## 우선순위 1: 즉시 개선
|
|
232
|
+
|
|
233
|
+
| 항목 | 설명 | 예상 공수 |
|
|
234
|
+
|------|------|----------|
|
|
235
|
+
| 다국어 셀렉터 | 언어 독립적 UI 셀렉터 적용 | 2-3시간 |
|
|
236
|
+
| ESM 호환성 | `require()` 제거 | 1시간 |
|
|
237
|
+
| 상수 추출 | 매직 넘버/문자열 중앙화 | 3-4시간 |
|
|
238
|
+
|
|
239
|
+
## 우선순위 2: 단기 개선
|
|
240
|
+
|
|
241
|
+
| 항목 | 설명 | 예상 공수 |
|
|
242
|
+
|------|------|----------|
|
|
243
|
+
| 단위 테스트 추가 | Jest/Vitest 설정 및 핵심 모듈 테스트 | 1-2일 |
|
|
244
|
+
| Rate Limit 백오프 | 지수 백오프 재시도 로직 | 3-4시간 |
|
|
245
|
+
| 타입 정의 개선 | `@ts-expect-error` 제거 | 2-3시간 |
|
|
246
|
+
|
|
247
|
+
## 우선순위 3: 장기 개선
|
|
248
|
+
|
|
249
|
+
| 항목 | 설명 |
|
|
250
|
+
|------|------|
|
|
251
|
+
| E2E 테스트 | Playwright를 활용한 통합 테스트 |
|
|
252
|
+
| 메트릭 수집 | 사용량 통계 및 성능 모니터링 |
|
|
253
|
+
| 플러그인 아키텍처 | 다른 서비스 확장 가능 구조 |
|
|
254
|
+
|
|
255
|
+
---
|
|
256
|
+
|
|
257
|
+
# 코드 품질 메트릭
|
|
258
|
+
|
|
259
|
+
## 파일 구조 분석
|
|
260
|
+
|
|
261
|
+
```
|
|
262
|
+
src/
|
|
263
|
+
├── auth/ # 1 파일, ~1,100 줄
|
|
264
|
+
├── library/ # 2 파일, ~400 줄
|
|
265
|
+
├── resources/ # 1 파일, ~250 줄
|
|
266
|
+
├── session/ # 3 파일, ~1,200 줄
|
|
267
|
+
├── tools/ # 5 파일, ~1,500 줄
|
|
268
|
+
├── utils/ # 6 파일, ~1,600 줄
|
|
269
|
+
├── config.ts # ~200 줄
|
|
270
|
+
├── errors.ts # 에러 정의
|
|
271
|
+
├── index.ts # 진입점
|
|
272
|
+
└── types.ts # 공통 타입
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
## 복잡도 영역
|
|
276
|
+
|
|
277
|
+
| 파일 | 복잡도 | 비고 |
|
|
278
|
+
|------|--------|------|
|
|
279
|
+
| `browser-session.ts` | 높음 | 다중 상태 관리, 복구 로직 |
|
|
280
|
+
| `auth-manager.ts` | 높음 | 다양한 인증 시나리오 처리 |
|
|
281
|
+
| `cleanup-manager.ts` | 중간 | 플랫폼별 경로 처리 |
|
|
282
|
+
| `handlers.ts` | 중간 | 다수의 도구 핸들러 |
|
|
283
|
+
|
|
284
|
+
---
|
|
285
|
+
|
|
286
|
+
# 결론
|
|
287
|
+
|
|
288
|
+
NotebookLM MCP는 전반적으로 **잘 설계되고 구현된 프로젝트**입니다. 모듈화된 아키텍처, 포괄적인 에러 처리, 자동 복구 메커니즘 등 프로덕션 수준의 품질을 갖추고 있습니다.
|
|
289
|
+
|
|
290
|
+
그러나 몇 가지 개선이 필요합니다:
|
|
291
|
+
|
|
292
|
+
1. **국제화**: 독일어 하드코딩 제거
|
|
293
|
+
2. **테스트**: 테스트 커버리지 추가
|
|
294
|
+
3. **코드 품질**: 타입 억제 제거, 상수 추출
|
|
295
|
+
|
|
296
|
+
이러한 개선을 통해 더욱 안정적이고 유지보수 가능한 프로젝트가 될 것입니다.
|
|
297
|
+
|
|
298
|
+
---
|
|
299
|
+
|
|
300
|
+
# 부록: 파일별 주요 이슈 요약
|
|
301
|
+
|
|
302
|
+
| 파일 | 이슈 | 심각도 |
|
|
303
|
+
|------|------|--------|
|
|
304
|
+
| `browser-session.ts` | 독일어 셀렉터, void 연산자 | 높음/낮음 |
|
|
305
|
+
| `auth-manager.ts` | 독일어 버튼 텍스트 | 높음 |
|
|
306
|
+
| `settings-manager.ts` | require() 사용 | 높음 |
|
|
307
|
+
| `handlers.ts` | any 타입 사용 | 중간 |
|
|
308
|
+
| `cleanup-manager.ts` | 플랫폼 특정 로직 중복 | 낮음 |
|
|
309
|
+
| 전체 | 테스트 부재 | 중간 |
|