Skip to content

✨ feat(sources): add opt-in source content lookup#61

Merged
marcelsamyn merged 1 commit into
mainfrom
feat/source-content-support
Jun 10, 2026
Merged

✨ feat(sources): add opt-in source content lookup#61
marcelsamyn merged 1 commit into
mainfrom
feat/source-content-support

Conversation

@marcelsamyn

Copy link
Copy Markdown
Owner

What and why

Add an explicit source-content read path to the SDK and API without loading source payloads during node-source lookup.

  • Extend MemoryClient.getSource / POST /sources/get with includeContent?: boolean.
  • Return stored textual content as { text, format } | null only when requested.
  • Never decode or return raw binary blobs.
  • Make getNodeSources metadata-only and remove its eager payload reads.
  • Update MCP wording and consumer migration documentation.

Developer impact

This is a breaking cleanup for consumers of getNodeSources: the returned source items no longer contain content. Consumers that need source text should call getSource({ userId, sourceId, includeContent: true }) explicitly.

How to test

  • pnpm test --run (383 tests)
  • pnpm run build:check
  • pnpm run build-sdk
  • pnpm run lint
  • pnpm run format
  • pnpm run build

Checklist

  • Build
  • Tests
  • Lint
  • Prettier
  • SDK export verification
  • Breaking change documented

@marcelsamyn marcelsamyn marked this pull request as ready for review June 10, 2026 07:43
@marcelsamyn marcelsamyn merged commit 73c3654 into main Jun 10, 2026
1 check passed
@marcelsamyn marcelsamyn deleted the feat/source-content-support branch June 10, 2026 07:43

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant