@opentabs-dev/opentabs-plugin-notebooklm 0.0.105 → 0.0.107

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.
@@ -14540,7 +14540,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14540
14540
  const notesList = data?.[0] ?? [];
14541
14541
  const syncToken = data?.[1] ?? [];
14542
14542
  return {
14543
- notes: notesList.map((n) => mapNote(n)),
14543
+ notes: notesList.map((n) => mapNote(n)).filter((n) => n.created_at_seconds > 0),
14544
14544
  sync_token_seconds: syncToken[0] ?? 0
14545
14545
  };
14546
14546
  }
@@ -14590,7 +14590,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14590
14590
  success: external_exports.boolean().describe("Whether the operation succeeded")
14591
14591
  }),
14592
14592
  handle: async (params) => {
14593
- await rpc("cYAfTb", [params.notebook_id, params.note_id, params.content], `/notebook/${params.notebook_id}`);
14593
+ await rpc("cYAfTb", [params.notebook_id, params.note_id, [[[params.content]]]], `/notebook/${params.notebook_id}`);
14594
14594
  return { success: true };
14595
14595
  }
14596
14596
  });
@@ -14611,7 +14611,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14611
14611
  success: external_exports.boolean().describe("Whether the operation succeeded")
14612
14612
  }),
14613
14613
  handle: async (params) => {
14614
- await rpc("AH0mwd", [params.notebook_id, params.note_ids], `/notebook/${params.notebook_id}`);
14614
+ await rpc("AH0mwd", [params.notebook_id, null, params.note_ids], `/notebook/${params.notebook_id}`);
14615
14615
  return { success: true };
14616
14616
  }
14617
14617
  });
@@ -14729,6 +14729,59 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14729
14729
  }
14730
14730
  });
14731
14731
 
14732
+ // src/tools/list-sources.ts
14733
+ var SOURCE_TYPES = {
14734
+ 1: "website",
14735
+ 2: "text",
14736
+ 3: "pdf",
14737
+ 4: "google_doc",
14738
+ 5: "google_slides",
14739
+ 6: "youtube",
14740
+ 7: "audio"
14741
+ };
14742
+ var sourceSchema2 = external_exports.object({
14743
+ id: external_exports.string().describe("Source UUID"),
14744
+ title: external_exports.string().describe("Source title"),
14745
+ type: external_exports.string().describe("Source type (website, text, pdf, google_doc, etc.)"),
14746
+ word_count: external_exports.number().int().describe("Approximate word count")
14747
+ });
14748
+ var listSources = defineTool({
14749
+ name: "list_sources",
14750
+ displayName: "List Sources",
14751
+ description: "List all sources in a notebook. Returns source IDs, titles, types, and word counts.",
14752
+ summary: "List sources in a notebook",
14753
+ icon: "library",
14754
+ group: "Sources",
14755
+ input: external_exports.object({
14756
+ notebook_id: external_exports.string().describe("Notebook UUID")
14757
+ }),
14758
+ output: external_exports.object({
14759
+ sources: external_exports.array(sourceSchema2).describe("List of sources")
14760
+ }),
14761
+ handle: async (params) => {
14762
+ const data = await rpc(
14763
+ "rLM1Ne",
14764
+ [params.notebook_id, null, [...FEATURE_FLAGS], null, 0],
14765
+ `/notebook/${params.notebook_id}`
14766
+ );
14767
+ const project = data?.[0] ?? [];
14768
+ const rawSources = project[1] ?? [];
14769
+ return {
14770
+ sources: rawSources.map((s) => {
14771
+ const meta3 = s[2] ?? [];
14772
+ const typeField = s[3] ?? [];
14773
+ const typeNum = typeField[1] ?? 0;
14774
+ return {
14775
+ id: s[0]?.[0] ?? "",
14776
+ title: s[1] ?? "",
14777
+ type: SOURCE_TYPES[typeNum] ?? `unknown_${typeNum}`,
14778
+ word_count: meta3[8] ?? 0
14779
+ };
14780
+ })
14781
+ };
14782
+ }
14783
+ });
14784
+
14732
14785
  // src/tools/delete-sources.ts
14733
14786
  var deleteSources = defineTool({
14734
14787
  name: "delete_sources",
@@ -14745,7 +14798,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14745
14798
  success: external_exports.boolean().describe("Whether the operation succeeded")
14746
14799
  }),
14747
14800
  handle: async (params) => {
14748
- await rpc("tGMBJ", [params.notebook_id, params.source_ids], `/notebook/${params.notebook_id}`);
14801
+ const sourceRefs = params.source_ids.map((id) => [id]);
14802
+ await rpc("tGMBJ", [sourceRefs, [2]], `/notebook/${params.notebook_id}`);
14749
14803
  return { success: true };
14750
14804
  }
14751
14805
  });
@@ -14798,6 +14852,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14798
14852
  getNotebookGuide,
14799
14853
  addSourceUrl,
14800
14854
  addSourceText,
14855
+ listSources,
14801
14856
  deleteSources,
14802
14857
  getCurrentUser
14803
14858
  ];
@@ -14808,7 +14863,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14808
14863
  };
14809
14864
  var src_default = new NotebookLMPlugin();
14810
14865
 
14811
- // dist/_adapter_entry_b40b51e9-472b-4f15-bb59-e20482038b1e.ts
14866
+ // dist/_adapter_entry_c41cc3f2-8165-4931-8bbe-5324ffc73e43.ts
14812
14867
  if (!globalThis.__openTabs) {
14813
14868
  globalThis.__openTabs = {};
14814
14869
  } else {
@@ -15026,5 +15081,5 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15026
15081
  };
15027
15082
  delete src_default.onDeactivate;
15028
15083
  }
15029
- })();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["notebooklm"]){var a=o.adapters["notebooklm"];a.__adapterHash="d8f296041ab6d95f9d0337da333190ee404afb114dfa78a92343cdc6576e0d4a";if(a.tools&&Array.isArray(a.tools)){for(var i=0;i<a.tools.length;i++){Object.freeze(a.tools[i]);}Object.freeze(a.tools);}Object.freeze(a);Object.defineProperty(o.adapters,"notebooklm",{value:a,writable:false,configurable:false,enumerable:true});Object.defineProperty(o,"adapters",{value:o.adapters,writable:false,configurable:false});}})();
15084
+ })();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["notebooklm"]){var a=o.adapters["notebooklm"];a.__adapterHash="d2ed6b7c53beb010f422a76f56021d520e0f4ddc5d8427104d1896a8a945d738";if(a.tools&&Array.isArray(a.tools)){for(var i=0;i<a.tools.length;i++){Object.freeze(a.tools[i]);}Object.freeze(a.tools);}Object.freeze(a);Object.defineProperty(o.adapters,"notebooklm",{value:a,writable:false,configurable:false,enumerable:true});Object.defineProperty(o,"adapters",{value:o.adapters,writable:false,configurable:false});}})();
15030
15085
  //# sourceMappingURL=adapter.iife.js.map