Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The model's
read_workspacetool currently calls the full workspace snapshot for every request, then throws most of it away.For
section: "mail", that still loads:The same over-read happens for calendar and files requests.
A downstream PGlite benchmark with mail 2000 / events 500 / files 200 / browsers 300 / actions 800 / activity 1000 measured the mail path at roughly 291.9ms / 2.6MB → 254.8ms / 2.0MB, with calendar/files sections avoiding >90% of unrelated transfer.
Change
Add
WorkspaceService.sectionSnapshot()for the three tool-visible source sections and makeread_workspaceuse it.The existing full
snapshot()remains the full workspace API and still performs one connection check. Shared mail/event loading preserves:A files-only read does not touch Google, browsers, actions, activity, profile, or runtime metadata.
Regression
Persistence coverage compares mail/calendar/files section results against the corresponding fields from the existing full snapshot.
No connector permissions, tool schema, or returned section payload changes.