@pan-sec/notebooklm-mcp 2026.2.11 โ†’ 2026.3.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.
Files changed (305) hide show
  1. package/README.md +62 -19
  2. package/SECURITY.md +31 -61
  3. package/dist/auth/auth-manager.d.ts +2 -1
  4. package/dist/auth/auth-manager.d.ts.map +1 -1
  5. package/dist/auth/auth-manager.js +117 -44
  6. package/dist/auth/auth-manager.js.map +1 -1
  7. package/dist/auth/mcp-auth.d.ts +24 -4
  8. package/dist/auth/mcp-auth.d.ts.map +1 -1
  9. package/dist/auth/mcp-auth.js +149 -19
  10. package/dist/auth/mcp-auth.js.map +1 -1
  11. package/dist/compliance/alert-manager.d.ts.map +1 -1
  12. package/dist/compliance/alert-manager.js +7 -4
  13. package/dist/compliance/alert-manager.js.map +1 -1
  14. package/dist/compliance/breach-detection.d.ts.map +1 -1
  15. package/dist/compliance/breach-detection.js +14 -7
  16. package/dist/compliance/breach-detection.js.map +1 -1
  17. package/dist/compliance/change-log.d.ts.map +1 -1
  18. package/dist/compliance/change-log.js +7 -4
  19. package/dist/compliance/change-log.js.map +1 -1
  20. package/dist/compliance/compliance-logger.d.ts.map +1 -1
  21. package/dist/compliance/compliance-logger.js +11 -6
  22. package/dist/compliance/compliance-logger.js.map +1 -1
  23. package/dist/compliance/consent-manager.d.ts.map +1 -1
  24. package/dist/compliance/consent-manager.js +5 -3
  25. package/dist/compliance/consent-manager.js.map +1 -1
  26. package/dist/compliance/data-erasure.d.ts +1 -1
  27. package/dist/compliance/data-erasure.d.ts.map +1 -1
  28. package/dist/compliance/data-erasure.js +142 -83
  29. package/dist/compliance/data-erasure.js.map +1 -1
  30. package/dist/compliance/data-export.d.ts.map +1 -1
  31. package/dist/compliance/data-export.js +23 -12
  32. package/dist/compliance/data-export.js.map +1 -1
  33. package/dist/compliance/data-inventory.d.ts.map +1 -1
  34. package/dist/compliance/data-inventory.js +7 -6
  35. package/dist/compliance/data-inventory.js.map +1 -1
  36. package/dist/compliance/dsar-handler.d.ts +7 -1
  37. package/dist/compliance/dsar-handler.d.ts.map +1 -1
  38. package/dist/compliance/dsar-handler.js +74 -61
  39. package/dist/compliance/dsar-handler.js.map +1 -1
  40. package/dist/compliance/evidence-collector.d.ts.map +1 -1
  41. package/dist/compliance/evidence-collector.js +10 -6
  42. package/dist/compliance/evidence-collector.js.map +1 -1
  43. package/dist/compliance/health-monitor.d.ts.map +1 -1
  44. package/dist/compliance/health-monitor.js +15 -9
  45. package/dist/compliance/health-monitor.js.map +1 -1
  46. package/dist/compliance/incident-manager.d.ts.map +1 -1
  47. package/dist/compliance/incident-manager.js +5 -3
  48. package/dist/compliance/incident-manager.js.map +1 -1
  49. package/dist/compliance/policy-docs.d.ts.map +1 -1
  50. package/dist/compliance/policy-docs.js +14 -11
  51. package/dist/compliance/policy-docs.js.map +1 -1
  52. package/dist/compliance/privacy-notice-text.d.ts.map +1 -1
  53. package/dist/compliance/privacy-notice-text.js +3 -4
  54. package/dist/compliance/privacy-notice-text.js.map +1 -1
  55. package/dist/compliance/privacy-notice.d.ts.map +1 -1
  56. package/dist/compliance/privacy-notice.js +5 -3
  57. package/dist/compliance/privacy-notice.js.map +1 -1
  58. package/dist/compliance/report-generator.d.ts.map +1 -1
  59. package/dist/compliance/report-generator.js +5 -3
  60. package/dist/compliance/report-generator.js.map +1 -1
  61. package/dist/compliance/retention-engine.d.ts.map +1 -1
  62. package/dist/compliance/retention-engine.js +24 -10
  63. package/dist/compliance/retention-engine.js.map +1 -1
  64. package/dist/compliance/siem-exporter.d.ts.map +1 -1
  65. package/dist/compliance/siem-exporter.js +40 -16
  66. package/dist/compliance/siem-exporter.js.map +1 -1
  67. package/dist/config.d.ts +8 -31
  68. package/dist/config.d.ts.map +1 -1
  69. package/dist/config.js +26 -64
  70. package/dist/config.js.map +1 -1
  71. package/dist/errors.d.ts +22 -2
  72. package/dist/errors.d.ts.map +1 -1
  73. package/dist/errors.js +55 -4
  74. package/dist/errors.js.map +1 -1
  75. package/dist/gemini/gemini-client.d.ts +1 -0
  76. package/dist/gemini/gemini-client.d.ts.map +1 -1
  77. package/dist/gemini/gemini-client.js +50 -49
  78. package/dist/gemini/gemini-client.js.map +1 -1
  79. package/dist/gemini/types.d.ts +3 -1
  80. package/dist/gemini/types.d.ts.map +1 -1
  81. package/dist/gemini/types.js.map +1 -1
  82. package/dist/index.d.ts +52 -1
  83. package/dist/index.d.ts.map +1 -1
  84. package/dist/index.js +412 -89
  85. package/dist/index.js.map +1 -1
  86. package/dist/library/notebook-library.d.ts.map +1 -1
  87. package/dist/library/notebook-library.js +2 -1
  88. package/dist/library/notebook-library.js.map +1 -1
  89. package/dist/logging/query-logger.d.ts +13 -1
  90. package/dist/logging/query-logger.d.ts.map +1 -1
  91. package/dist/logging/query-logger.js +62 -10
  92. package/dist/logging/query-logger.js.map +1 -1
  93. package/dist/notebook-creation/audio-manager.d.ts.map +1 -1
  94. package/dist/notebook-creation/audio-manager.js +19 -24
  95. package/dist/notebook-creation/audio-manager.js.map +1 -1
  96. package/dist/notebook-creation/browser-options.d.ts +28 -0
  97. package/dist/notebook-creation/browser-options.d.ts.map +1 -0
  98. package/dist/notebook-creation/browser-options.js +75 -0
  99. package/dist/notebook-creation/browser-options.js.map +1 -0
  100. package/dist/notebook-creation/data-table-manager.d.ts.map +1 -1
  101. package/dist/notebook-creation/data-table-manager.js +20 -21
  102. package/dist/notebook-creation/data-table-manager.js.map +1 -1
  103. package/dist/notebook-creation/discover-creation-flow.d.ts +0 -6
  104. package/dist/notebook-creation/discover-creation-flow.d.ts.map +1 -1
  105. package/dist/notebook-creation/discover-creation-flow.js +10 -10
  106. package/dist/notebook-creation/discover-creation-flow.js.map +1 -1
  107. package/dist/notebook-creation/discover-quota.d.ts +0 -6
  108. package/dist/notebook-creation/discover-quota.d.ts.map +1 -1
  109. package/dist/notebook-creation/discover-quota.js +12 -13
  110. package/dist/notebook-creation/discover-quota.js.map +1 -1
  111. package/dist/notebook-creation/discover-sources.js +15 -16
  112. package/dist/notebook-creation/discover-sources.js.map +1 -1
  113. package/dist/notebook-creation/dom-scripts.d.ts +10 -0
  114. package/dist/notebook-creation/dom-scripts.d.ts.map +1 -0
  115. package/dist/notebook-creation/dom-scripts.js +58 -0
  116. package/dist/notebook-creation/dom-scripts.js.map +1 -0
  117. package/dist/notebook-creation/errors.d.ts +18 -0
  118. package/dist/notebook-creation/errors.d.ts.map +1 -0
  119. package/dist/notebook-creation/errors.js +20 -0
  120. package/dist/notebook-creation/errors.js.map +1 -0
  121. package/dist/notebook-creation/index.d.ts +2 -1
  122. package/dist/notebook-creation/index.d.ts.map +1 -1
  123. package/dist/notebook-creation/index.js +2 -1
  124. package/dist/notebook-creation/index.js.map +1 -1
  125. package/dist/notebook-creation/notebook-creator.d.ts +6 -82
  126. package/dist/notebook-creation/notebook-creator.d.ts.map +1 -1
  127. package/dist/notebook-creation/notebook-creator.js +49 -835
  128. package/dist/notebook-creation/notebook-creator.js.map +1 -1
  129. package/dist/notebook-creation/notebook-nav.d.ts +19 -0
  130. package/dist/notebook-creation/notebook-nav.d.ts.map +1 -0
  131. package/dist/notebook-creation/notebook-nav.js +240 -0
  132. package/dist/notebook-creation/notebook-nav.js.map +1 -0
  133. package/dist/notebook-creation/notebook-sync.d.ts.map +1 -1
  134. package/dist/notebook-creation/notebook-sync.js +36 -38
  135. package/dist/notebook-creation/notebook-sync.js.map +1 -1
  136. package/dist/notebook-creation/selector-discovery.d.ts.map +1 -1
  137. package/dist/notebook-creation/selector-discovery.js +17 -24
  138. package/dist/notebook-creation/selector-discovery.js.map +1 -1
  139. package/dist/notebook-creation/selectors.d.ts +23 -37
  140. package/dist/notebook-creation/selectors.d.ts.map +1 -1
  141. package/dist/notebook-creation/selectors.js +56 -60
  142. package/dist/notebook-creation/selectors.js.map +1 -1
  143. package/dist/notebook-creation/source-manager.d.ts +25 -0
  144. package/dist/notebook-creation/source-manager.d.ts.map +1 -1
  145. package/dist/notebook-creation/source-manager.js +689 -50
  146. package/dist/notebook-creation/source-manager.js.map +1 -1
  147. package/dist/notebook-creation/types.d.ts +4 -0
  148. package/dist/notebook-creation/types.d.ts.map +1 -1
  149. package/dist/notebook-creation/video-manager.d.ts.map +1 -1
  150. package/dist/notebook-creation/video-manager.js +33 -35
  151. package/dist/notebook-creation/video-manager.js.map +1 -1
  152. package/dist/observability/metrics.d.ts +19 -0
  153. package/dist/observability/metrics.d.ts.map +1 -0
  154. package/dist/observability/metrics.js +35 -0
  155. package/dist/observability/metrics.js.map +1 -0
  156. package/dist/quota/quota-manager.d.ts +11 -3
  157. package/dist/quota/quota-manager.d.ts.map +1 -1
  158. package/dist/quota/quota-manager.js +139 -47
  159. package/dist/quota/quota-manager.js.map +1 -1
  160. package/dist/resources/resource-handlers.d.ts.map +1 -1
  161. package/dist/resources/resource-handlers.js +39 -17
  162. package/dist/resources/resource-handlers.js.map +1 -1
  163. package/dist/session/browser-session.d.ts.map +1 -1
  164. package/dist/session/browser-session.js +22 -22
  165. package/dist/session/browser-session.js.map +1 -1
  166. package/dist/session/session-timeout.d.ts.map +1 -1
  167. package/dist/session/session-timeout.js +4 -2
  168. package/dist/session/session-timeout.js.map +1 -1
  169. package/dist/session/shared-context-manager.d.ts.map +1 -1
  170. package/dist/session/shared-context-manager.js +31 -30
  171. package/dist/session/shared-context-manager.js.map +1 -1
  172. package/dist/tools/annotations.d.ts.map +1 -1
  173. package/dist/tools/annotations.js +9 -56
  174. package/dist/tools/annotations.js.map +1 -1
  175. package/dist/tools/definitions/ask-question.d.ts.map +1 -1
  176. package/dist/tools/definitions/ask-question.js +35 -100
  177. package/dist/tools/definitions/ask-question.js.map +1 -1
  178. package/dist/tools/definitions/chat-history.d.ts +47 -1
  179. package/dist/tools/definitions/chat-history.d.ts.map +1 -1
  180. package/dist/tools/definitions/chat-history.js +10 -1
  181. package/dist/tools/definitions/chat-history.js.map +1 -1
  182. package/dist/tools/definitions/data-tables.d.ts.map +1 -1
  183. package/dist/tools/definitions/data-tables.js +2 -0
  184. package/dist/tools/definitions/data-tables.js.map +1 -1
  185. package/dist/tools/definitions/gemini.d.ts.map +1 -1
  186. package/dist/tools/definitions/gemini.js +54 -11
  187. package/dist/tools/definitions/gemini.js.map +1 -1
  188. package/dist/tools/definitions/notebook-management.d.ts.map +1 -1
  189. package/dist/tools/definitions/notebook-management.js +100 -70
  190. package/dist/tools/definitions/notebook-management.js.map +1 -1
  191. package/dist/tools/definitions/query-history.d.ts +47 -1
  192. package/dist/tools/definitions/query-history.d.ts.map +1 -1
  193. package/dist/tools/definitions/query-history.js +7 -0
  194. package/dist/tools/definitions/query-history.js.map +1 -1
  195. package/dist/tools/definitions/session-management.d.ts.map +1 -1
  196. package/dist/tools/definitions/session-management.js +5 -0
  197. package/dist/tools/definitions/session-management.js.map +1 -1
  198. package/dist/tools/definitions/system.d.ts.map +1 -1
  199. package/dist/tools/definitions/system.js +71 -100
  200. package/dist/tools/definitions/system.js.map +1 -1
  201. package/dist/tools/definitions/video.d.ts.map +1 -1
  202. package/dist/tools/definitions/video.js +4 -1
  203. package/dist/tools/definitions/video.js.map +1 -1
  204. package/dist/tools/definitions.d.ts.map +1 -1
  205. package/dist/tools/definitions.js +4 -0
  206. package/dist/tools/definitions.js.map +1 -1
  207. package/dist/tools/handlers/ask-question.d.ts +1 -1
  208. package/dist/tools/handlers/ask-question.d.ts.map +1 -1
  209. package/dist/tools/handlers/ask-question.js +57 -13
  210. package/dist/tools/handlers/ask-question.js.map +1 -1
  211. package/dist/tools/handlers/audio-video.d.ts.map +1 -1
  212. package/dist/tools/handlers/audio-video.js +22 -161
  213. package/dist/tools/handlers/audio-video.js.map +1 -1
  214. package/dist/tools/handlers/auth.d.ts +14 -19
  215. package/dist/tools/handlers/auth.d.ts.map +1 -1
  216. package/dist/tools/handlers/auth.js +77 -121
  217. package/dist/tools/handlers/auth.js.map +1 -1
  218. package/dist/tools/handlers/error-utils.d.ts +16 -0
  219. package/dist/tools/handlers/error-utils.d.ts.map +1 -0
  220. package/dist/tools/handlers/error-utils.js +39 -0
  221. package/dist/tools/handlers/error-utils.js.map +1 -0
  222. package/dist/tools/handlers/gemini.d.ts +2 -0
  223. package/dist/tools/handlers/gemini.d.ts.map +1 -1
  224. package/dist/tools/handlers/gemini.js +88 -51
  225. package/dist/tools/handlers/gemini.js.map +1 -1
  226. package/dist/tools/handlers/index.d.ts +39 -47
  227. package/dist/tools/handlers/index.d.ts.map +1 -1
  228. package/dist/tools/handlers/index.js +15 -4
  229. package/dist/tools/handlers/index.js.map +1 -1
  230. package/dist/tools/handlers/notebook-creation.d.ts.map +1 -1
  231. package/dist/tools/handlers/notebook-creation.js +102 -86
  232. package/dist/tools/handlers/notebook-creation.js.map +1 -1
  233. package/dist/tools/handlers/notebook-management.d.ts +8 -8
  234. package/dist/tools/handlers/notebook-management.d.ts.map +1 -1
  235. package/dist/tools/handlers/notebook-management.js +34 -80
  236. package/dist/tools/handlers/notebook-management.js.map +1 -1
  237. package/dist/tools/handlers/session-management.d.ts +8 -10
  238. package/dist/tools/handlers/session-management.d.ts.map +1 -1
  239. package/dist/tools/handlers/session-management.js +34 -63
  240. package/dist/tools/handlers/session-management.js.map +1 -1
  241. package/dist/tools/handlers/system.d.ts.map +1 -1
  242. package/dist/tools/handlers/system.js +45 -10
  243. package/dist/tools/handlers/system.js.map +1 -1
  244. package/dist/tools/handlers/types.d.ts +1 -1
  245. package/dist/tools/handlers/types.d.ts.map +1 -1
  246. package/dist/tools/handlers/webhooks.d.ts.map +1 -1
  247. package/dist/tools/handlers/webhooks.js +15 -13
  248. package/dist/tools/handlers/webhooks.js.map +1 -1
  249. package/dist/types.d.ts +7 -17
  250. package/dist/types.d.ts.map +1 -1
  251. package/dist/utils/audit-logger.d.ts +19 -1
  252. package/dist/utils/audit-logger.d.ts.map +1 -1
  253. package/dist/utils/audit-logger.js +198 -30
  254. package/dist/utils/audit-logger.js.map +1 -1
  255. package/dist/utils/cleanup-manager.d.ts.map +1 -1
  256. package/dist/utils/cleanup-manager.js +6 -3
  257. package/dist/utils/cleanup-manager.js.map +1 -1
  258. package/dist/utils/crypto.d.ts +4 -1
  259. package/dist/utils/crypto.d.ts.map +1 -1
  260. package/dist/utils/crypto.js +32 -21
  261. package/dist/utils/crypto.js.map +1 -1
  262. package/dist/utils/file-lock.d.ts.map +1 -1
  263. package/dist/utils/file-lock.js +87 -16
  264. package/dist/utils/file-lock.js.map +1 -1
  265. package/dist/utils/file-permissions.d.ts +2 -0
  266. package/dist/utils/file-permissions.d.ts.map +1 -1
  267. package/dist/utils/file-permissions.js +2 -1
  268. package/dist/utils/file-permissions.js.map +1 -1
  269. package/dist/utils/logger.d.ts +4 -0
  270. package/dist/utils/logger.d.ts.map +1 -1
  271. package/dist/utils/logger.js +16 -0
  272. package/dist/utils/logger.js.map +1 -1
  273. package/dist/utils/page-utils.d.ts +13 -0
  274. package/dist/utils/page-utils.d.ts.map +1 -1
  275. package/dist/utils/page-utils.js +61 -39
  276. package/dist/utils/page-utils.js.map +1 -1
  277. package/dist/utils/response-validator.d.ts.map +1 -1
  278. package/dist/utils/response-validator.js +27 -22
  279. package/dist/utils/response-validator.js.map +1 -1
  280. package/dist/utils/secrets-scanner.d.ts +11 -0
  281. package/dist/utils/secrets-scanner.d.ts.map +1 -1
  282. package/dist/utils/secrets-scanner.js +65 -17
  283. package/dist/utils/secrets-scanner.js.map +1 -1
  284. package/dist/utils/secure-memory.d.ts +9 -31
  285. package/dist/utils/secure-memory.d.ts.map +1 -1
  286. package/dist/utils/secure-memory.js +17 -102
  287. package/dist/utils/secure-memory.js.map +1 -1
  288. package/dist/utils/security.d.ts +4 -3
  289. package/dist/utils/security.d.ts.map +1 -1
  290. package/dist/utils/security.js +43 -13
  291. package/dist/utils/security.js.map +1 -1
  292. package/dist/utils/stealth-utils.d.ts.map +1 -1
  293. package/dist/utils/stealth-utils.js +4 -4
  294. package/dist/utils/stealth-utils.js.map +1 -1
  295. package/dist/webhooks/types.d.ts +4 -0
  296. package/dist/webhooks/types.d.ts.map +1 -1
  297. package/dist/webhooks/webhook-dispatcher.d.ts +80 -12
  298. package/dist/webhooks/webhook-dispatcher.d.ts.map +1 -1
  299. package/dist/webhooks/webhook-dispatcher.js +497 -74
  300. package/dist/webhooks/webhook-dispatcher.js.map +1 -1
  301. package/docs/archive/ISSUES-legacy-2026-04-24.md +644 -0
  302. package/docs/dependency-risk.md +25 -0
  303. package/docs/testing-runbook.md +166 -0
  304. package/docs/usage-guide.md +2 -1
  305. package/package.json +34 -16
@@ -0,0 +1,25 @@
1
+ # Dependency Risk Notes
2
+
3
+ ## Patchright
4
+
5
+ This project uses `patchright` for browser automation because NotebookLM flows
6
+ depend on Playwright-compatible browser control with stealth-oriented behavior.
7
+ Treat it as a higher-risk dependency than ordinary runtime libraries:
8
+
9
+ - It is a Playwright fork, so upstream security fixes may not land at the same
10
+ time as Playwright releases.
11
+ - Browser automation packages can run install scripts that fetch browser
12
+ binaries or drivers.
13
+ - Keep it exact-pinned in `package.json` and review updates manually.
14
+ - CI installs dependencies with `npm ci --ignore-scripts`; browser binaries
15
+ should be provisioned explicitly in controlled environments.
16
+ - Production deployments should run the MCP server in a least-privilege
17
+ container or sandbox with a dedicated browser profile directory and no access
18
+ to unrelated host files.
19
+
20
+ When upgrading `patchright`, verify:
21
+
22
+ 1. The package tarball integrity in `package-lock.json` changes only as expected.
23
+ 2. Notebook creation, source upload, auth setup, and session reuse tests pass.
24
+ 3. Any browser installation step is run explicitly, not via automatic package
25
+ lifecycle scripts in CI.
@@ -0,0 +1,166 @@
1
+ # Authenticated Testing Runbook
2
+
3
+ This runbook is the baseline sequence for future NotebookLM MCP testing in a real authenticated browser session.
4
+
5
+ ## Goal
6
+
7
+ Use a visible Chrome session to capture valid NotebookLM auth, verify the local repo is healthy, and run a minimal smoke test flow before broader manual or agent-driven testing.
8
+
9
+ ## 1. Local Repo Preflight
10
+
11
+ Run these from the repo root:
12
+
13
+ ```bash
14
+ npx tsc --noEmit
15
+ npx vitest run
16
+ npx stryker run --dryRunOnly
17
+ npm audit --json
18
+ ```
19
+
20
+ Expected result:
21
+ - TypeScript passes
22
+ - Vitest passes
23
+ - Stryker dry-run passes
24
+ - `npm audit` reports 0 vulnerabilities
25
+
26
+ ## 2. Start Visible Chrome Auth
27
+
28
+ Use the standalone auth flow from the repo root:
29
+
30
+ ```bash
31
+ node auth-now.mjs
32
+ ```
33
+
34
+ What it does:
35
+ - Opens visible Chrome using the persistent NotebookLM profile
36
+ - Waits for manual Google login
37
+ - Saves encrypted browser state to the local auth store
38
+
39
+ Expected success signal in the terminal:
40
+ - `NotebookLM detected`
41
+ - `Saved encrypted state.json.pqenc`
42
+ - `Auth complete`
43
+
44
+ Expected saved file on Linux:
45
+
46
+ ```text
47
+ ~/.local/share/notebooklm-mcp/browser_state/state.json.pqenc
48
+ ```
49
+
50
+ ## 3. Verify Auth Artifact
51
+
52
+ Confirm the encrypted state file exists and is freshly updated:
53
+
54
+ ```bash
55
+ stat ~/.local/share/notebooklm-mcp/browser_state/state.json.pqenc
56
+ ```
57
+
58
+ Expected result:
59
+ - File exists
60
+ - Permissions are `0600`
61
+ - Modify time matches the recent auth session
62
+
63
+ ## 4. MCP Health Check
64
+
65
+ After auth is saved, verify the MCP server can use it.
66
+
67
+ Important:
68
+ - Browser auth and MCP auth are separate.
69
+ - If you are testing through a direct stdio harness instead of your normal MCP client, you must also provide a valid `NLMCP_AUTH_TOKEN`.
70
+ - For ad hoc local smoke tests, prefer a temporary in-process token over rotating the persisted token.
71
+
72
+ Recommended prompt:
73
+
74
+ ```text
75
+ Run get_health with deep_check enabled and report auth status, chat_ui_accessible, and any warnings.
76
+ ```
77
+
78
+ Expected result:
79
+ - `authenticated: true`
80
+ - `chat_ui_accessible: true`
81
+
82
+ If this fails, do not continue to notebook smoke tests until auth is repaired.
83
+
84
+ ## 5. Notebook Smoke Test Sequence
85
+
86
+ Run this exact sequence in the MCP client:
87
+
88
+ 1. `get_health(deep_check=true)`
89
+ 2. `list_notebooks`
90
+ 3. `select_notebook` on a known safe test notebook
91
+ 4. `ask_question` with a low-risk prompt such as:
92
+
93
+ ```text
94
+ Summarize the main topics covered in this notebook in 3 bullets.
95
+ ```
96
+
97
+ 5. `get_quota(sync=true)` if quota behavior matters for the session
98
+
99
+ Success criteria:
100
+ - Notebook list loads
101
+ - Notebook selection succeeds
102
+ - `ask_question` returns a grounded answer
103
+ - No auth-expired or browser-closed errors occur
104
+
105
+ For direct test harnesses:
106
+ - Inject a temporary `NLMCP_AUTH_TOKEN` into the server process
107
+ - Pass the same token in MCP request metadata
108
+ - Do not rotate the saved token unless you actually need to replace your client configuration
109
+
110
+ ## 6. Optional Creation Flow Test
111
+
112
+ Only run this when creation is in scope for the session:
113
+
114
+ 1. `create_notebook` with a disposable test name
115
+ 2. `add_source` or `add_folder` with a safe local fixture
116
+ 3. `list_sources`
117
+ 4. Optional: `generate_audio_overview`, `generate_video_overview`, or `generate_data_table`
118
+
119
+ Cleanup:
120
+ - Remove disposable test notebooks or clearly label them as temporary
121
+
122
+ ## 7. Recovery Paths
123
+
124
+ If auth is stale or broken:
125
+
126
+ 1. Close all Chrome/Chromium windows
127
+ 2. Re-run visible auth:
128
+
129
+ ```bash
130
+ node auth-now.mjs
131
+ ```
132
+
133
+ If persistent profile/session issues remain:
134
+
135
+ 1. Close all Chrome/Chromium windows
136
+ 2. Preview cleanup with library preservation
137
+ 3. Confirm cleanup
138
+ 4. Re-run auth
139
+ 5. Re-run `get_health(deep_check=true)`
140
+
141
+ Recommended agent prompt:
142
+
143
+ ```text
144
+ Repair NotebookLM auth without deleting my library, then verify with get_health deep_check.
145
+ ```
146
+
147
+ ## 8. Session Notes Template
148
+
149
+ Record these for each authenticated test pass:
150
+
151
+ - Date:
152
+ - Branch/commit:
153
+ - Auth method: `node auth-now.mjs`
154
+ - Auth artifact updated: yes/no
155
+ - `get_health(deep_check=true)`: pass/fail
156
+ - Notebook smoke test: pass/fail
157
+ - Creation flow test: pass/fail/not run
158
+ - Quota check: pass/fail/not run
159
+ - Issues found:
160
+
161
+ ## Notes
162
+
163
+ - Prefer visible auth for all interactive login work.
164
+ - Do not use headless auth flows.
165
+ - `cleanup_data` is a recovery tool, not a default auth step.
166
+ - Keep at least one safe disposable notebook available for smoke testing.
@@ -3,6 +3,7 @@
3
3
  This guide covers advanced usage patterns, best practices, and detailed examples for the NotebookLM MCP server.
4
4
 
5
5
  > ๐Ÿ“˜ For installation and quick start, see the main [README](../README.md).
6
+ > ๐Ÿงช For repeatable authenticated validation, use the [Authenticated Testing Runbook](./testing-runbook.md).
6
7
 
7
8
  ## Research Patterns
8
9
 
@@ -242,4 +243,4 @@ Agent: "According to our architecture guidelines..."
242
243
 
243
244
  ---
244
245
 
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!
246
+ 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!
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pan-sec/notebooklm-mcp",
3
- "version": "2026.2.11",
3
+ "version": "2026.3.1",
4
4
  "mcpName": "io.github.Pantheon-Security/notebooklm-mcp-secure",
5
5
  "description": "Security-hardened MCP server for NotebookLM API with compliance-ready architecture (GDPR, SOC2, CSSF controls implemented)",
6
6
  "type": "module",
@@ -13,10 +13,16 @@
13
13
  "watch": "tsc --watch",
14
14
  "dev": "tsx watch src/index.ts",
15
15
  "prepare": "npm run build",
16
+ "ci:install": "npm ci --ignore-scripts",
16
17
  "test": "npx vitest run",
18
+ "test:integration": "npx vitest run tests/mcp-server.integration.test.ts",
19
+ "test:property": "npx vitest run tests/property-based.test.ts",
20
+ "test:mutation": "npx stryker run --dryRunOnly",
17
21
  "test:watch": "npx vitest",
22
+ "test:coverage": "npx vitest run --coverage",
18
23
  "security-check": "npm audit",
19
- "security-scan": "medusa scan . --fail-on high"
24
+ "security-scan": "medusa scan . --fail-on high",
25
+ "discover-selectors": "npx tsx scripts/run-discovery.ts"
20
26
  },
21
27
  "keywords": [
22
28
  "mcp",
@@ -55,20 +61,33 @@
55
61
  "docs"
56
62
  ],
57
63
  "dependencies": {
58
- "@google/genai": "^1.41.0",
59
- "@modelcontextprotocol/sdk": "^1.25.3",
60
- "@noble/post-quantum": "^0.5.4",
61
- "dotenv": "^17.2.3",
62
- "env-paths": "^4.0.0",
63
- "globby": "^16.1.0",
64
- "patchright": "^1.57.0",
65
- "pdf-lib": "^1.17.1",
66
- "zod": "^4.3.6"
64
+ "@google/genai": "1.41.0",
65
+ "@modelcontextprotocol/sdk": "1.29.0",
66
+ "@noble/post-quantum": "0.5.4",
67
+ "dotenv": "17.2.3",
68
+ "env-paths": "4.0.0",
69
+ "globby": "16.1.0",
70
+ "patchright": "1.57.0",
71
+ "pdf-lib": "1.17.1"
72
+ },
73
+ "overrides": {
74
+ "@google/genai": {
75
+ "protobufjs": "7.5.5"
76
+ },
77
+ "glob": {
78
+ "minimatch": "9.0.7"
79
+ },
80
+ "micromatch": {
81
+ "picomatch": "2.3.2"
82
+ }
67
83
  },
68
84
  "devDependencies": {
69
- "@types/node": "^20.19.30",
70
- "tsx": "^4.21.0",
71
- "typescript": "^5.3.3"
85
+ "@stryker-mutator/core": "9.6.1",
86
+ "@types/node": "20.19.30",
87
+ "@vitest/coverage-v8": "4.1.4",
88
+ "fast-check": "4.7.0",
89
+ "tsx": "4.21.0",
90
+ "typescript": "5.3.3"
72
91
  },
73
92
  "engines": {
74
93
  "node": ">=18.0.0"
@@ -85,8 +104,7 @@
85
104
  "responseValidation": true,
86
105
  "postQuantumEncryption": true,
87
106
  "secretsScanning": true,
88
- "certificatePinning": true,
89
- "memoryScubbing": true,
107
+ "memoryScrubbing": true,
90
108
  "medusaIntegration": true,
91
109
  "secureByDefaultAuth": true,
92
110
  "exponentialBackoffLockout": true,