Repository navigation
fix: mark read_checkpoint as read-only - #112
Open
MatthewFeroz wants to merge 1 commit into
Open
MatthewFeroz wants to merge 1 commit into
MatthewFeroz wants to merge 1 commit into
Conversation
read_checkpoint only loads a stored checkpoint. Without readOnlyHint, hosts that gate app-initiated tool calls on it ask the user to approve a plain read whenever create_view restores a checkpoint.
|
@MatthewFeroz is attempting to deploy a commit to the Excalidraw Team on Vercel. A member of the Team first needs to authorize it. |
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.
Summary
Add
readOnlyHint: truetoread_checkpoint. The tool loads a stored checkpoint and returns it. It changes no state.Why
MCP hosts use
readOnlyHintto decide whether a tool call needs user approval.read_checkpointis app-only, so the widget calls it by itself each time the model passes arestoreCheckpointelement tocreate_view. Without the hint, hosts that gate app-initiated calls on it show an approval dialog for a plain read. T3 Code does this, even when the user runs the agent with full permissions.This follows the same goal as #111 and #93, which aim to make the tool hints accurate. Unlike
create_view,read_checkpointhas no side effects, soreadOnlyHint: trueis the accurate value.Testing
tsc -p tsconfig.server.json --noEmitpasses.tools/liston the live server returns no annotations forread_checkpointtoday. After this change it returnsreadOnlyHint: true, the same asread_me.🤖 Generated with Claude Code