notebooklm-mcp-server 1.0.7 → 1.0.8

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/dist/auth.js CHANGED
@@ -23,23 +23,33 @@ export class AuthManager {
23
23
  onStatus('Waiting for Google Login...');
24
24
  // Wait for the user to be logged in.
25
25
  // We check for either the URL pattern or the presence of session cookies
26
+ let isDone = false;
26
27
  try {
27
28
  await Promise.race([
28
- page.waitForURL('**/notebook/**', { timeout: 300000 }),
29
+ page.waitForURL('**/notebook/**', { timeout: 300000 }).then(() => { isDone = true; }),
29
30
  page.waitForFunction(() => {
30
31
  return window.location.href.includes('notebooklm.google.com') &&
31
32
  !document.body.innerText.includes('Sign in');
32
- }, { polling: 2000, timeout: 300000 }),
33
+ }, { polling: 2000, timeout: 300000 }).then(() => { isDone = true; }),
33
34
  // Fallback: check if we have the critical cookies
34
35
  new Promise((resolve) => {
35
36
  const checkCookies = async () => {
36
- const cookies = await context.cookies();
37
- const sessionCookie = cookies.find(c => c.name === '__Secure-3PSID' || c.name === 'SID');
38
- if (sessionCookie && page.url().includes('notebooklm.google.com')) {
39
- resolve(true);
37
+ if (isDone)
38
+ return;
39
+ try {
40
+ const cookies = await context.cookies();
41
+ const sessionCookie = cookies.find(c => c.name === '__Secure-3PSID' || c.name === 'SID');
42
+ if (sessionCookie && page.url().includes('notebooklm.google.com')) {
43
+ isDone = true;
44
+ resolve(true);
45
+ }
46
+ else {
47
+ setTimeout(checkCookies, 2000);
48
+ }
40
49
  }
41
- else {
42
- setTimeout(checkCookies, 2000);
50
+ catch (e) {
51
+ // Browser might be closed, just stop
52
+ isDone = true;
43
53
  }
44
54
  };
45
55
  checkCookies();
@@ -47,6 +57,7 @@ export class AuthManager {
47
57
  ]);
48
58
  }
49
59
  catch (e) {
60
+ isDone = true;
50
61
  await browser.close();
51
62
  throw new Error('Authentication timed out or browser was closed.');
52
63
  }
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ const program = new Command();
4
4
  program
5
5
  .name('notebooklm-mcp-server')
6
6
  .description('NotebookLM MCP Server (Node.js)')
7
- .version('1.0.7');
7
+ .version('1.0.8');
8
8
  program
9
9
  .command('server')
10
10
  .description('Start the MCP server (default)')
package/dist/server.js CHANGED
@@ -6,7 +6,7 @@ import { AuthManager } from "./auth.js";
6
6
  import chalk from "chalk";
7
7
  const server = new Server({
8
8
  name: "notebooklm-mcp-server",
9
- version: "1.0.7",
9
+ version: "1.0.8",
10
10
  }, {
11
11
  capabilities: {
12
12
  tools: {},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "notebooklm-mcp-server",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "Node.js Model Context Protocol server for Google NotebookLM",
5
5
  "type": "module",
6
6
  "repository": {