✨ feat(sources): add opt-in source content lookup#61
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors source content retrieval by restricting the node-sources endpoint to metadata-only and moving content lookup to the single-source endpoint. Specifically, MemoryClient.getNodeSources (and the get node sources MCP tool) no longer fetches or returns raw source content. Instead, consumers can retrieve a source's stored textual representation by calling MemoryClient.getSource with the new includeContent: true parameter. These changes are accompanied by updated schemas, documentation, and comprehensive test coverage. I have no feedback to provide as there are no review comments.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
What and why
Add an explicit source-content read path to the SDK and API without loading source payloads during node-source lookup.
MemoryClient.getSource/POST /sources/getwithincludeContent?: boolean.{ text, format } | nullonly when requested.getNodeSourcesmetadata-only and remove its eager payload reads.Developer impact
This is a breaking cleanup for consumers of
getNodeSources: the returned source items no longer containcontent. Consumers that need source text should callgetSource({ userId, sourceId, includeContent: true })explicitly.How to test
pnpm test --run(383 tests)pnpm run build:checkpnpm run build-sdkpnpm run lintpnpm run formatpnpm run buildChecklist