@roomi-fields/notebooklm-mcp 1.3.6 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (284) hide show
  1. package/LICENSE +22 -22
  2. package/README.md +71 -34
  3. package/deployment/INDEX.md +292 -0
  4. package/deployment/PACKAGE-FILES.txt +180 -0
  5. package/deployment/QUICK-START.md +100 -0
  6. package/deployment/docs/01-INSTALL.md +611 -0
  7. package/deployment/docs/02-CONFIGURATION.md +404 -0
  8. package/deployment/docs/03-API.md +1691 -0
  9. package/deployment/docs/04-N8N-INTEGRATION.md +373 -0
  10. package/deployment/docs/05-TROUBLESHOOTING.md +429 -0
  11. package/deployment/docs/06-NOTEBOOK-LIBRARY.md +692 -0
  12. package/deployment/docs/07-AUTO-DISCOVERY.md +236 -0
  13. package/deployment/docs/08-WSL-USAGE.md +363 -0
  14. package/deployment/docs/09-MULTI-INTERFACE.md +293 -0
  15. package/deployment/docs/10-CONTENT-MANAGEMENT.md +421 -0
  16. package/deployment/docs/11-MULTI-ACCOUNT.md +295 -0
  17. package/deployment/docs/README.md +207 -0
  18. package/deployment/scripts/README.md +564 -0
  19. package/deployment/scripts/install.ps1 +114 -0
  20. package/deployment/scripts/setup-auth.ps1 +217 -0
  21. package/deployment/scripts/start-server.ps1 +72 -0
  22. package/deployment/scripts/stop-server.ps1 +51 -0
  23. package/deployment/scripts/test-api.ps1 +651 -0
  24. package/deployment/scripts/test-auth.ps1 +323 -0
  25. package/deployment/scripts/test-auto-discovery.ps1 +295 -0
  26. package/deployment/scripts/test-cors.ps1 +398 -0
  27. package/deployment/scripts/test-errors.ps1 +581 -0
  28. package/deployment/scripts/test-server.ps1 +140 -0
  29. package/deployment/scripts/test-sessions.ps1 +426 -0
  30. package/deployment/scripts/test-validation.ps1 +299 -0
  31. package/dist/accounts/account-manager.d.ts +163 -0
  32. package/dist/accounts/account-manager.d.ts.map +1 -0
  33. package/dist/accounts/account-manager.js +614 -0
  34. package/dist/accounts/account-manager.js.map +1 -0
  35. package/dist/accounts/auto-login-manager.d.ts +62 -0
  36. package/dist/accounts/auto-login-manager.d.ts.map +1 -0
  37. package/dist/accounts/auto-login-manager.js +537 -0
  38. package/dist/accounts/auto-login-manager.js.map +1 -0
  39. package/dist/accounts/crypto.d.ts +45 -0
  40. package/dist/accounts/crypto.d.ts.map +1 -0
  41. package/dist/accounts/crypto.js +138 -0
  42. package/dist/accounts/crypto.js.map +1 -0
  43. package/dist/accounts/index.d.ts +14 -0
  44. package/dist/accounts/index.d.ts.map +1 -0
  45. package/dist/accounts/index.js +14 -0
  46. package/dist/accounts/index.js.map +1 -0
  47. package/dist/accounts/types.d.ts +103 -0
  48. package/dist/accounts/types.d.ts.map +1 -0
  49. package/dist/accounts/types.js +7 -0
  50. package/dist/accounts/types.js.map +1 -0
  51. package/dist/auth/auth-manager.d.ts +9 -2
  52. package/dist/auth/auth-manager.d.ts.map +1 -1
  53. package/dist/auth/auth-manager.js +60 -6
  54. package/dist/auth/auth-manager.js.map +1 -1
  55. package/dist/auto-discovery/auto-discovery.d.ts.map +1 -1
  56. package/dist/auto-discovery/auto-discovery.js +2 -1
  57. package/dist/auto-discovery/auto-discovery.js.map +1 -1
  58. package/dist/cli/accounts.d.ts +13 -0
  59. package/dist/cli/accounts.d.ts.map +1 -0
  60. package/dist/cli/accounts.js +195 -0
  61. package/dist/cli/accounts.js.map +1 -0
  62. package/dist/config.d.ts +1 -0
  63. package/dist/config.d.ts.map +1 -1
  64. package/dist/config.js +24 -0
  65. package/dist/config.js.map +1 -1
  66. package/dist/content/content-generator.d.ts +153 -0
  67. package/dist/content/content-generator.d.ts.map +1 -0
  68. package/dist/content/content-generator.js +637 -0
  69. package/dist/content/content-generator.js.map +1 -0
  70. package/dist/content/content-manager.d.ts +364 -0
  71. package/dist/content/content-manager.d.ts.map +1 -0
  72. package/dist/content/content-manager.js +3841 -0
  73. package/dist/content/content-manager.js.map +1 -0
  74. package/dist/content/content-templates.d.ts +183 -0
  75. package/dist/content/content-templates.d.ts.map +1 -0
  76. package/dist/content/content-templates.js +719 -0
  77. package/dist/content/content-templates.js.map +1 -0
  78. package/dist/content/index.d.ts +14 -0
  79. package/dist/content/index.d.ts.map +1 -0
  80. package/dist/content/index.js +14 -0
  81. package/dist/content/index.js.map +1 -0
  82. package/dist/content/types.d.ts +285 -0
  83. package/dist/content/types.d.ts.map +1 -0
  84. package/dist/content/types.js +10 -0
  85. package/dist/content/types.js.map +1 -0
  86. package/dist/errors.d.ts +1 -1
  87. package/dist/errors.d.ts.map +1 -1
  88. package/dist/errors.js.map +1 -1
  89. package/dist/http-wrapper.d.ts +7 -0
  90. package/dist/http-wrapper.d.ts.map +1 -1
  91. package/dist/http-wrapper.js +449 -29
  92. package/dist/http-wrapper.js.map +1 -1
  93. package/dist/i18n/en.json +120 -0
  94. package/dist/i18n/fr.json +120 -0
  95. package/dist/i18n/index.d.ts +168 -0
  96. package/dist/i18n/index.d.ts.map +1 -0
  97. package/dist/i18n/index.js +213 -0
  98. package/dist/i18n/index.js.map +1 -0
  99. package/dist/index.js +26 -2
  100. package/dist/index.js.map +1 -1
  101. package/dist/library/notebook-library.d.ts +4 -0
  102. package/dist/library/notebook-library.d.ts.map +1 -1
  103. package/dist/library/notebook-library.js +20 -3
  104. package/dist/library/notebook-library.js.map +1 -1
  105. package/dist/session/browser-session.d.ts +35 -8
  106. package/dist/session/browser-session.d.ts.map +1 -1
  107. package/dist/session/browser-session.js +243 -28
  108. package/dist/session/browser-session.js.map +1 -1
  109. package/dist/session/session-manager.d.ts +6 -0
  110. package/dist/session/session-manager.d.ts.map +1 -1
  111. package/dist/session/session-manager.js +46 -14
  112. package/dist/session/session-manager.js.map +1 -1
  113. package/dist/session/shared-context-manager.d.ts +3 -3
  114. package/dist/session/shared-context-manager.d.ts.map +1 -1
  115. package/dist/session/shared-context-manager.js +10 -7
  116. package/dist/session/shared-context-manager.js.map +1 -1
  117. package/dist/stdio-http-proxy.d.ts +24 -0
  118. package/dist/stdio-http-proxy.d.ts.map +1 -0
  119. package/dist/stdio-http-proxy.js +592 -0
  120. package/dist/stdio-http-proxy.js.map +1 -0
  121. package/dist/tools/index.d.ts +106 -1
  122. package/dist/tools/index.d.ts.map +1 -1
  123. package/dist/tools/index.js +1028 -7
  124. package/dist/tools/index.js.map +1 -1
  125. package/dist/types.d.ts +81 -17
  126. package/dist/types.d.ts.map +1 -1
  127. package/dist/utils/citation-extractor.d.ts +66 -0
  128. package/dist/utils/citation-extractor.d.ts.map +1 -0
  129. package/dist/utils/citation-extractor.js +492 -0
  130. package/dist/utils/citation-extractor.js.map +1 -0
  131. package/dist/utils/page-utils.d.ts +8 -0
  132. package/dist/utils/page-utils.d.ts.map +1 -1
  133. package/dist/utils/page-utils.js +112 -8
  134. package/dist/utils/page-utils.js.map +1 -1
  135. package/docs/ADDING_A_LANGUAGE.md +209 -0
  136. package/docs/ARCHITECTURE_MIGRATION_STUDY.md +894 -0
  137. package/docs/CHROME_PROFILE_LIMITATION.md +15 -1
  138. package/docs/MULTI_ACCOUNT_SYSTEM.md +304 -0
  139. package/package.json +15 -12
  140. package/scripts/archive/add-and-activate-notebook.ps1 +31 -0
  141. package/scripts/archive/add-new-notebook.ps1 +25 -0
  142. package/scripts/archive/add-rom1pey.ps1 +2 -0
  143. package/scripts/archive/add-rpmonster.ps1 +2 -0
  144. package/scripts/archive/add-source-debug.ps1 +11 -0
  145. package/scripts/archive/add-source-e2e.ps1 +28 -0
  146. package/scripts/archive/add-source-visible.ps1 +11 -0
  147. package/scripts/archive/add-test-notebook.ps1 +13 -0
  148. package/scripts/archive/add-test-source.ps1 +50 -0
  149. package/scripts/archive/capture-screen.ps1 +11 -0
  150. package/scripts/archive/change-language.mjs +45 -0
  151. package/scripts/archive/change-language.ts +44 -0
  152. package/scripts/archive/check-account.ps1 +19 -0
  153. package/scripts/archive/check-notebook-2.ps1 +8 -0
  154. package/scripts/archive/check-test-notebook.ps1 +11 -0
  155. package/scripts/archive/create-notebook-auto.ps1 +31 -0
  156. package/scripts/archive/create-notebook.ps1 +8 -0
  157. package/scripts/archive/create-rom1pey-notebook.ps1 +19 -0
  158. package/scripts/archive/create-rom1pey.ps1 +8 -0
  159. package/scripts/archive/create-test-notebook-fresh.ps1 +21 -0
  160. package/scripts/archive/create-test-notebook.ps1 +16 -0
  161. package/scripts/archive/debug-add-source-auto.ps1 +29 -0
  162. package/scripts/archive/debug-add-source.ps1 +19 -0
  163. package/scripts/archive/debug-add-text-source.ps1 +47 -0
  164. package/scripts/archive/debug-home.ps1 +10 -0
  165. package/scripts/archive/debug-selectors.ps1 +55 -0
  166. package/scripts/archive/debug-sources-panel.ps1 +22 -0
  167. package/scripts/archive/debug-ui.ps1 +17 -0
  168. package/scripts/archive/discover-home.ps1 +26 -0
  169. package/scripts/archive/kill-automation-chrome.ps1 +37 -0
  170. package/scripts/archive/list-my-notebooks.ps1 +27 -0
  171. package/scripts/archive/navigate-home-visible.ps1 +23 -0
  172. package/scripts/archive/navigate-home.ps1 +15 -0
  173. package/scripts/archive/run-e2e-english.ps1 +111 -0
  174. package/scripts/archive/run-e2e-rom1pey-v2.ps1 +122 -0
  175. package/scripts/archive/run-e2e-rom1pey.ps1 +117 -0
  176. package/scripts/archive/setup-english-test.ps1 +36 -0
  177. package/scripts/archive/setup-test-notebook.ps1 +71 -0
  178. package/scripts/archive/simple-add-source.ps1 +14 -0
  179. package/scripts/archive/t10.ps1 +2 -0
  180. package/scripts/archive/t20.ps1 +4 -0
  181. package/scripts/archive/t30.ps1 +9 -0
  182. package/scripts/archive/t31.ps1 +11 -0
  183. package/scripts/archive/t32.ps1 +6 -0
  184. package/scripts/archive/t39.ps1 +5 -0
  185. package/scripts/archive/t40.ps1 +5 -0
  186. package/scripts/archive/t53.ps1 +12 -0
  187. package/scripts/archive/t54.ps1 +12 -0
  188. package/scripts/archive/t55.ps1 +11 -0
  189. package/scripts/archive/t9.ps1 +1 -0
  190. package/scripts/archive/test-access.ps1 +28 -0
  191. package/scripts/archive/test-add-delete-source.ps1 +64 -0
  192. package/scripts/archive/test-add-source-visible.ps1 +16 -0
  193. package/scripts/archive/test-add-source.ps1 +19 -0
  194. package/scripts/archive/test-add-text-debug.ps1 +28 -0
  195. package/scripts/archive/test-add-text-source.ps1 +8 -0
  196. package/scripts/archive/test-add-url-source.ps1 +7 -0
  197. package/scripts/archive/test-ask-ascii.ps1 +20 -0
  198. package/scripts/archive/test-ask-cnv.ps1 +20 -0
  199. package/scripts/archive/test-ask-headed.ps1 +51 -0
  200. package/scripts/archive/test-ask-ifs.ps1 +16 -0
  201. package/scripts/archive/test-ask-now.ps1 +24 -0
  202. package/scripts/archive/test-ask-real.ps1 +19 -0
  203. package/scripts/archive/test-ask-visible.ps1 +20 -0
  204. package/scripts/archive/test-create-notebook.ps1 +8 -0
  205. package/scripts/archive/test-create-then-add.ps1 +17 -0
  206. package/scripts/archive/test-delete-source.ps1 +41 -0
  207. package/scripts/archive/test-e2e-notebook.ps1 +21 -0
  208. package/scripts/archive/test-english-notebook.ps1 +20 -0
  209. package/scripts/archive/test-english.ps1 +7 -0
  210. package/scripts/archive/test-full-custom-instructions.ps1 +40 -0
  211. package/scripts/archive/test-full-infographic.ps1 +34 -0
  212. package/scripts/archive/test-full-language.ps1 +21 -0
  213. package/scripts/archive/test-full-presentation.ps1 +85 -0
  214. package/scripts/archive/test-full-report.ps1 +34 -0
  215. package/scripts/archive/test-full-source-selection.ps1 +35 -0
  216. package/scripts/archive/test-full-video-brief.ps1 +22 -0
  217. package/scripts/archive/test-full-video-explainer.ps1 +22 -0
  218. package/scripts/archive/test-full-video-styles.ps1 +37 -0
  219. package/scripts/archive/test-generate-report.ps1 +15 -0
  220. package/scripts/archive/test-generate-study-guide.ps1 +11 -0
  221. package/scripts/archive/test-headed-ask.ps1 +13 -0
  222. package/scripts/archive/test-headed-now.ps1 +9 -0
  223. package/scripts/archive/test-headed.ps1 +9 -0
  224. package/scripts/archive/test-hello.ps1 +7 -0
  225. package/scripts/archive/test-i18n-studio.ps1 +8 -0
  226. package/scripts/archive/test-i18n.ps1 +7 -0
  227. package/scripts/archive/test-manual-headed.ps1 +26 -0
  228. package/scripts/archive/test-mathieu-quota.ps1 +8 -0
  229. package/scripts/archive/test-notebook-1.ps1 +10 -0
  230. package/scripts/archive/test-notebook-2-sources.ps1 +12 -0
  231. package/scripts/archive/test-notebook1.ps1 +14 -0
  232. package/scripts/archive/test-personal-notebook.ps1 +14 -0
  233. package/scripts/archive/test-rate-limit.ps1 +19 -0
  234. package/scripts/archive/test-real-ask.ps1 +50 -0
  235. package/scripts/archive/test-real-ask2.ps1 +30 -0
  236. package/scripts/archive/test-rom1pey.ps1 +7 -0
  237. package/scripts/archive/test-rotation-complete.ps1 +14 -0
  238. package/scripts/archive/test-rotation.ps1 +8 -0
  239. package/scripts/archive/test-show-browser.ps1 +39 -0
  240. package/scripts/archive/test-update-notebook.ps1 +4 -0
  241. package/scripts/archive/verify-language-slow.ps1 +21 -0
  242. package/scripts/archive/verify-language.ps1 +15 -0
  243. package/scripts/check-server.ps1 +46 -0
  244. package/scripts/mcp-wsl-helper.sh +146 -0
  245. package/scripts/start-server.ps1 +94 -0
  246. package/scripts/stop-server.ps1 +30 -0
  247. package/scripts/switch-account-language.sh +191 -0
  248. package/scripts/test-account.ps1 +58 -0
  249. package/dist/__tests__/cleanup-manager.test.d.ts +0 -2
  250. package/dist/__tests__/cleanup-manager.test.d.ts.map +0 -1
  251. package/dist/__tests__/cleanup-manager.test.js +0 -341
  252. package/dist/__tests__/cleanup-manager.test.js.map +0 -1
  253. package/dist/__tests__/config-parsing.test.d.ts +0 -2
  254. package/dist/__tests__/config-parsing.test.d.ts.map +0 -1
  255. package/dist/__tests__/config-parsing.test.js +0 -338
  256. package/dist/__tests__/config-parsing.test.js.map +0 -1
  257. package/dist/__tests__/config.test.d.ts +0 -2
  258. package/dist/__tests__/config.test.d.ts.map +0 -1
  259. package/dist/__tests__/config.test.js +0 -267
  260. package/dist/__tests__/config.test.js.map +0 -1
  261. package/dist/__tests__/errors.test.d.ts +0 -2
  262. package/dist/__tests__/errors.test.d.ts.map +0 -1
  263. package/dist/__tests__/errors.test.js +0 -166
  264. package/dist/__tests__/errors.test.js.map +0 -1
  265. package/dist/__tests__/logger.test.d.ts +0 -2
  266. package/dist/__tests__/logger.test.d.ts.map +0 -1
  267. package/dist/__tests__/logger.test.js +0 -324
  268. package/dist/__tests__/logger.test.js.map +0 -1
  269. package/dist/__tests__/page-utils.test.d.ts +0 -2
  270. package/dist/__tests__/page-utils.test.d.ts.map +0 -1
  271. package/dist/__tests__/page-utils.test.js +0 -349
  272. package/dist/__tests__/page-utils.test.js.map +0 -1
  273. package/dist/__tests__/setup-verification.test.d.ts +0 -2
  274. package/dist/__tests__/setup-verification.test.d.ts.map +0 -1
  275. package/dist/__tests__/setup-verification.test.js +0 -15
  276. package/dist/__tests__/setup-verification.test.js.map +0 -1
  277. package/dist/__tests__/stealth-utils.test.d.ts +0 -2
  278. package/dist/__tests__/stealth-utils.test.d.ts.map +0 -1
  279. package/dist/__tests__/stealth-utils.test.js +0 -413
  280. package/dist/__tests__/stealth-utils.test.js.map +0 -1
  281. package/dist/__tests__/types.test.d.ts +0 -2
  282. package/dist/__tests__/types.test.d.ts.map +0 -1
  283. package/dist/__tests__/types.test.js +0 -461
  284. package/dist/__tests__/types.test.js.map +0 -1
@@ -0,0 +1,364 @@
1
+ /**
2
+ * Content Manager
3
+ *
4
+ * Handles NotebookLM content operations:
5
+ * - Source/document upload
6
+ * - Content generation (audio, briefing, study guides, etc.)
7
+ * - Content listing and download
8
+ *
9
+ * Uses Playwright to interact with NotebookLM's web interface.
10
+ */
11
+ import type { Page } from 'patchright';
12
+ import type { SourceUploadInput, SourceUploadResult, SourceDeleteInput, SourceDeleteResult, ContentType, ContentGenerationInput, ContentGenerationResult, NotebookSource, GeneratedContent, NotebookContentOverview, ContentDownloadResult, NoteInput, NoteResult, SaveChatToNoteInput, SaveChatToNoteResult, NoteToSourceInput, NoteToSourceResult } from './types.js';
13
+ export declare class ContentManager {
14
+ private page;
15
+ constructor(page: Page);
16
+ /**
17
+ * Add a source to the current notebook
18
+ */
19
+ addSource(input: SourceUploadInput): Promise<SourceUploadResult>;
20
+ /**
21
+ * Click the "Add source" button
22
+ */
23
+ private clickAddSource;
24
+ /**
25
+ * Ensure we're on the Sources panel
26
+ */
27
+ private ensureSourcesPanel;
28
+ /**
29
+ * Debug helper to log page content for selector debugging
30
+ */
31
+ private debugPageContent;
32
+ /**
33
+ * Wait for upload dialog to appear
34
+ */
35
+ private waitForUploadDialog;
36
+ /**
37
+ * Upload a local file
38
+ */
39
+ private uploadFile;
40
+ /**
41
+ * Upload from URL
42
+ */
43
+ private uploadUrl;
44
+ /**
45
+ * Upload text content
46
+ */
47
+ private uploadText;
48
+ /**
49
+ * Upload from Google Drive
50
+ */
51
+ private uploadGoogleDrive;
52
+ /**
53
+ * Upload YouTube video
54
+ */
55
+ private uploadYouTube;
56
+ /**
57
+ * Click the upload/add button
58
+ */
59
+ private clickUploadButton;
60
+ /**
61
+ * Wait for source to finish processing
62
+ * @param sourceName The name we expect the source to have
63
+ * @param _textPreview Optional first words of text (for text sources - NotebookLM may use this as name)
64
+ * @param expectedNotebookUuid Optional UUID of the notebook we expect to be on (to detect redirects)
65
+ */
66
+ private waitForSourceProcessing;
67
+ /**
68
+ * Send a message in the chat interface (without waiting for response)
69
+ * This is the new way to generate content in NotebookLM
70
+ * Uses the same typing and submission approach as ask_question for reliability
71
+ */
72
+ private sendChatMessage;
73
+ /**
74
+ * Wait for generated content to appear in chat
75
+ * Uses the same proven approach as /ask endpoint (waitForLatestAnswer with full timeout)
76
+ */
77
+ private waitForGeneratedContent;
78
+ /**
79
+ * Scroll chat container to bottom to ensure latest messages are visible
80
+ */
81
+ private scrollChatToBottom;
82
+ /**
83
+ * Generate content (audio overview, presentation, report)
84
+ *
85
+ * Supported content types:
86
+ * - audio_overview: Uses real Studio UI buttons for audio podcast generation
87
+ * - video: Uses generic ContentGenerator for video generation (with format, language, style options)
88
+ * - infographic: Uses generic ContentGenerator for infographic generation (with format options)
89
+ * - presentation: Uses generic ContentGenerator for slides generation (with format options)
90
+ * - report: Uses generic ContentGenerator for briefing document generation (with format options)
91
+ * - data_table: Uses generic ContentGenerator for data table generation (with format options)
92
+ *
93
+ * NOTE: Other content types (study_guide, faq, timeline, table_of_contents)
94
+ * were removed because they only sent chat prompts instead of clicking actual
95
+ * NotebookLM Studio buttons.
96
+ */
97
+ generateContent(input: ContentGenerationInput): Promise<ContentGenerationResult>;
98
+ /**
99
+ * Generate content using the generic ContentGenerator
100
+ *
101
+ * This method handles all content types except audio_overview:
102
+ * - video: With format (brief/explainer), language, and visual style options
103
+ * - infographic: With format (horizontal/vertical) and language options
104
+ * - presentation: With format (overview/detailed) and language options
105
+ * - report: With format (summary/detailed) and language options
106
+ * - data_table: With format (simple/detailed) and language options
107
+ *
108
+ * @param input Content generation input with all options
109
+ * @returns Content generation result
110
+ */
111
+ private generateGenericContent;
112
+ /**
113
+ * Generate Audio Overview (podcast)
114
+ *
115
+ * NOTE (Dec 2024): NotebookLM UI has changed significantly.
116
+ * Audio generation now works via chat requests or may require specific UI interaction.
117
+ * This method attempts both approaches.
118
+ */
119
+ generateAudioOverview(input: ContentGenerationInput): Promise<ContentGenerationResult>;
120
+ /**
121
+ * Generate Presentation/Slides using the generic ContentGenerator
122
+ *
123
+ * This uses the generic content generation architecture that:
124
+ * 1. Navigates to Studio panel
125
+ * 2. Looks for presentation/slides button
126
+ * 3. Falls back to chat-based generation if button not found
127
+ *
128
+ * @param input Content generation input with optional custom instructions
129
+ * @returns Content generation result
130
+ */
131
+ generatePresentation(input: ContentGenerationInput): Promise<ContentGenerationResult>;
132
+ /**
133
+ * Generate Report/Briefing Document using the generic ContentGenerator
134
+ *
135
+ * Creates a comprehensive briefing document (2,000-3,000 words) that summarizes
136
+ * key findings, insights, and recommendations from notebook sources.
137
+ * Can be exported as PDF or DOCX format.
138
+ *
139
+ * This uses the generic content generation architecture that:
140
+ * 1. Navigates to Studio panel
141
+ * 2. Looks for briefing/report button
142
+ * 3. Falls back to chat-based generation if button not found
143
+ *
144
+ * @param input Content generation input with optional custom instructions
145
+ * @returns Content generation result with text content
146
+ */
147
+ generateReport(input: ContentGenerationInput): Promise<ContentGenerationResult>;
148
+ /**
149
+ * Generate Infographic using the generic ContentGenerator
150
+ *
151
+ * Creates a visual infographic from the notebook sources.
152
+ * Supports two formats:
153
+ * - horizontal (16:9): Landscape format for presentations/displays
154
+ * - vertical (9:16): Portrait format for social media/mobile
155
+ *
156
+ * This uses the generic content generation architecture that:
157
+ * 1. Navigates to Studio panel
158
+ * 2. Looks for infographic button
159
+ * 3. Falls back to chat-based generation if button not found
160
+ *
161
+ * @param input Content generation input with optional custom instructions and format
162
+ * @returns Content generation result
163
+ */
164
+ generateInfographic(input: ContentGenerationInput): Promise<ContentGenerationResult>;
165
+ /**
166
+ * Generate a Data Table using the generic ContentGenerator
167
+ *
168
+ * Creates a structured table that organizes key information from notebook sources.
169
+ * The generated table can be exported as CSV or Excel format.
170
+ *
171
+ * @param input Content generation input with optional custom instructions
172
+ * @returns Content generation result with table data
173
+ */
174
+ generateDataTable(input: ContentGenerationInput): Promise<ContentGenerationResult>;
175
+ /**
176
+ * Generate a Video using the generic ContentGenerator
177
+ *
178
+ * Creates a video summary that visually explains the main topics from notebook sources.
179
+ * Video generation may take several minutes depending on content complexity.
180
+ *
181
+ * Supported formats:
182
+ * - brief: Short video summary (2-3 minutes)
183
+ * - explainer: Detailed explanation video (5-10 minutes)
184
+ *
185
+ * This uses the generic content generation architecture that:
186
+ * 1. Navigates to Studio panel
187
+ * 2. Looks for video generation button
188
+ * 3. Falls back to chat-based generation if button not found
189
+ *
190
+ * @param input Content generation input with optional custom instructions and format
191
+ * @returns Content generation result with video data
192
+ */
193
+ generateVideo(input: ContentGenerationInput): Promise<ContentGenerationResult>;
194
+ /**
195
+ * Navigate to Discussion panel (chat)
196
+ */
197
+ private navigateToDiscussion;
198
+ /**
199
+ * Navigate to Studio panel
200
+ */
201
+ private navigateToStudio;
202
+ /**
203
+ * Add custom instructions for content generation
204
+ */
205
+ private addCustomInstructions;
206
+ /**
207
+ * Wait for audio generation to complete
208
+ */
209
+ private waitForAudioGeneration;
210
+ /**
211
+ * Get overview of notebook content (sources and generated content)
212
+ */
213
+ getContentOverview(): Promise<NotebookContentOverview>;
214
+ /**
215
+ * List all sources in the notebook
216
+ */
217
+ listSources(): Promise<NotebookSource[]>;
218
+ /**
219
+ * Delete a source from the current notebook
220
+ *
221
+ * @param input - Either sourceId or sourceName to identify the source to delete
222
+ * @returns Result indicating success or failure
223
+ */
224
+ deleteSource(input: SourceDeleteInput): Promise<SourceDeleteResult>;
225
+ /**
226
+ * Find a source element by ID or name
227
+ */
228
+ private findSourceElement;
229
+ /**
230
+ * Open the source menu (3-dot menu)
231
+ */
232
+ private openSourceMenu;
233
+ /**
234
+ * Click the delete option in the menu
235
+ */
236
+ private clickDeleteOption;
237
+ /**
238
+ * Confirm deletion if a confirmation dialog appears
239
+ */
240
+ private confirmDeletion;
241
+ /**
242
+ * List all generated content
243
+ */
244
+ listGeneratedContent(): Promise<GeneratedContent[]>;
245
+ /**
246
+ * Download generated content (audio, video, infographic)
247
+ *
248
+ * For media content types that produce downloadable files:
249
+ * - audio_overview: WAV audio file
250
+ * - video: MP4 video file
251
+ * - infographic: PNG image file
252
+ *
253
+ * Note: Text-based content (report, presentation, data_table) is returned
254
+ * directly in the generation response, not as downloadable files.
255
+ *
256
+ * @param contentType Type of content to download
257
+ * @param outputPath Optional path to save the file
258
+ * @returns Download result with file path
259
+ */
260
+ downloadContent(contentType: ContentType, outputPath?: string): Promise<ContentDownloadResult>;
261
+ /**
262
+ * Get panel configuration for a content type
263
+ */
264
+ private getContentPanelConfig;
265
+ /**
266
+ * Navigate to content panel
267
+ */
268
+ private navigateToContentPanel;
269
+ /**
270
+ * Find download button on the page
271
+ */
272
+ private findDownloadButton;
273
+ /**
274
+ * Get audio source URL directly from audio element
275
+ */
276
+ private getAudioSourceUrl;
277
+ /**
278
+ * Download audio content
279
+ * @deprecated Use downloadContent('audio_overview', outputPath) instead
280
+ */
281
+ downloadAudio(outputPath?: string): Promise<ContentDownloadResult>;
282
+ /**
283
+ * Export presentation to Google Slides
284
+ * Finds and clicks the "Open in Slides" button to get the Google Slides URL
285
+ */
286
+ private exportPresentationToGoogleSlides;
287
+ /**
288
+ * Export data table to Google Sheets
289
+ * Finds and clicks the "Open in Sheets" button to get the Google Sheets URL
290
+ */
291
+ private exportDataTableToGoogleSheets;
292
+ /**
293
+ * Create a note in the NotebookLM Studio panel
294
+ *
295
+ * Notes are user-created annotations that appear in the notebook's Studio panel.
296
+ * They allow you to save research findings, summaries, or key insights.
297
+ *
298
+ * @param input Note input with title and content
299
+ * @returns NoteResult with success status
300
+ */
301
+ createNote(input: NoteInput): Promise<NoteResult>;
302
+ /**
303
+ * Debug helper to log Studio panel elements
304
+ */
305
+ private debugStudioElements;
306
+ /**
307
+ * Save the current chat/discussion to a note
308
+ *
309
+ * This method extracts all messages from the NotebookLM chat/discussion panel
310
+ * and creates a note with the chat summary.
311
+ *
312
+ * @param input Optional input with custom title
313
+ * @returns SaveChatToNoteResult with success status and message count
314
+ */
315
+ saveChatToNote(input?: SaveChatToNoteInput): Promise<SaveChatToNoteResult>;
316
+ /**
317
+ * Internal method to perform the save chat to note operation
318
+ */
319
+ private performSaveChatToNote;
320
+ /**
321
+ * Extract chat messages from the Discussion panel
322
+ *
323
+ * @returns Array of message objects with role (user/assistant) and content
324
+ */
325
+ private extractChatMessages;
326
+ /**
327
+ * Format extracted chat messages as a note
328
+ *
329
+ * @param messages Array of chat messages
330
+ * @param title Note title
331
+ * @returns Formatted note content
332
+ */
333
+ private formatChatAsNote;
334
+ /**
335
+ * Convert a note to a source document in NotebookLM
336
+ *
337
+ * This feature allows users to convert an existing note into a source,
338
+ * making the note content available for RAG queries. The method:
339
+ * 1. Finds the note by title or ID in the Studio panel
340
+ * 2. Attempts to use NotebookLM's native "Convert to source" feature if available
341
+ * 3. Falls back to extracting note content and creating a text source if not
342
+ *
343
+ * @param input Note identification (title or ID)
344
+ * @returns NoteToSourceResult with source information
345
+ */
346
+ convertNoteToSource(input: NoteToSourceInput): Promise<NoteToSourceResult>;
347
+ /**
348
+ * Find a note element in the Studio panel by title or ID
349
+ */
350
+ private findNoteElement;
351
+ /**
352
+ * Try to use NotebookLM's native "Convert to source" or "Add to sources" feature
353
+ */
354
+ private tryNativeNoteToSourceConversion;
355
+ /**
356
+ * Open the menu for a note element
357
+ */
358
+ private openNoteMenu;
359
+ /**
360
+ * Extract the content of a note for fallback conversion
361
+ */
362
+ private extractNoteContent;
363
+ }
364
+ //# sourceMappingURL=content-manager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content-manager.d.ts","sourceRoot":"","sources":["../../src/content/content-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAW,MAAM,YAAY,CAAC;AAmChD,OAAO,KAAK,EACV,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,WAAW,EACX,sBAAsB,EACtB,uBAAuB,EACvB,cAAc,EACd,gBAAgB,EAChB,uBAAuB,EACvB,qBAAqB,EACrB,SAAS,EACT,UAAU,EACV,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EACnB,MAAM,YAAY,CAAC;AAMpB,qBAAa,cAAc;IACzB,OAAO,CAAC,IAAI,CAAO;gBAEP,IAAI,EAAE,IAAI;IAQtB;;OAEG;IACG,SAAS,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAsCtE;;OAEG;YACW,cAAc;IA8E5B;;OAEG;YACW,kBAAkB;IAyEhC;;OAEG;YACW,gBAAgB;IAyB9B;;OAEG;YACW,mBAAmB;IAsBjC;;OAEG;YACW,UAAU;IAoFxB;;OAEG;YACW,SAAS;IA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