Repository navigation
feat(notebooks): add get_toolset_preferences read API (EEr8Nb) - #2546
Conversation
|
Caution Review failedThe pull request is closed. Walkthrough
Pre-merge checks:
|
Refresh the static-coupling baseline so upstream line counts stay with this branch's toolset-preference edges. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Summary
Adds read-only support for NotebookLM Connected Apps preferences (
ToolManagementService.ListNotebookToolsetPreferences,batchexecuteRPC IDEEr8Nb) viaclient.notebooks.get_toolset_preferences(notebook_id) -> list[ToolsetPreference].RPCMethod.LIST_TOOLSET_PREFERENCES = "EEr8Nb"insrc/notebooklm/rpc/_identifiers.pyand_IDEMPOTENT_READ_OR_SET_OP_NOTESinsrc/notebooklm/_web/policy.py.build_toolset_preferences_params(notebook_id)([notebook_id]) andToolsetPreferenceRow/decode_toolset_preferences([[[toolset_id, display_name, enabled, [[tool_name], ...]], ...]], handling null/empty responses cleanly).ToolsetPreference(toolset_id, display_name=None, enabled=False, tools=())fromnotebooklm.typesandnotebooklm.get_toolset_preferences(notebook_id)toNotebooksAPIABC,WebNotebooksAPI(EEr8Nbwithallow_null=True), andAndroidNotebooksAPI(ValidationErroron blank ID;UnsupportedOperationErroron valid ID since Android gRPC does not exposeToolManagementService).EEr8Nb);SetNotebookToolsetPreferences(x8h5wd) is intentionally left out of scope.scripts/check_rpc_health.py,_wire_contract.py,_public_import_manifest.py,test_backend_abstract_contracts.py,test_golden_decode_coverage.py, golden fixtureLIST_TOOLSET_PREFERENCES.json, VCR cassettenotebooks_toolset_preferences.yaml, unit tests (tests/unit/test_toolset_preferences.py), regenerated baselines, and docs (docs/python-api.md,docs/rpc-reference.md,docs/web-android-public-behavior.md).Verification
uv run ruff format --check . && uv run ruff check .uv run mypy src/notebooklm --ignore-missing-importsuv run python tests/scripts/check_cassettes_clean.py --strict --recursiveuv run python tests/scripts/check_method_coverage.pyuv run python scripts/check_docs_module_refs.pyuv run pytest tests/_guardrails tests/unit/test_toolset_preferences.py tests/unit/test_rpc_health_coverage.py tests/unit/test_rpc_golden_payloads.py tests/integration/test_notebooks_toolset_preferences_vcr.pySummary by CodeRabbit
ToolsetPreferenceas a public type for accessing the returned preference details.