feat: add read_markers so the agent can see human markers - #20
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully 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.
What
Adds a seventeenth WebMCP tool,
read_markers, and updates every claim in the repo that said sixteen.annotategave the agent a way to write markers onto the timeline. There was no way to read one back— not its own, and not the human's.
ask_human_visuallands the human's answer on the timeline as amarker precisely so it is evidence anyone can click; until now "anyone" excluded the agent. A session
resumed after a reload, or picked up by a second agent, started blind to the moments a person had
already pointed at.
Shape
Copied in shape from
read_network: the shared{ from?, to? }window viaoptionalWindow, acurrentRecording()guard, a 40-entry budget withtotalMatchedcounted before the cap, and therank-then-restore-chronological pattern. Read-only, no human gate, no new type — it reuses the frozen
Markerfromtypes/domain.ts, which is untouched.Three decisions worth flagging:
rejectMarkerkeeps them so undo works, andan agent that cannot see the rejection re-proposes what a human already dismissed.
rejectedisomitted rather than
falsewhen the marker stands, so it is not noise on every entry.pinned itself, from
annotate's replies."the human marked nothing", which is a different and more misleading fact.
Registered last in the
readgroup rather than first: it is the only read tool that answers aquestion about the investigation rather than about the recording, and a model scanning for "read the
page" must not land on it.
Tests
Six new cases in
read-search-errors.test.ts, in that file's existing style: the empty-window note,both authors returned in timeline order regardless of insertion order, a rejected marker flagged, the
rejectedfield absent when the marker stands, markers outside the requested window excluded withtotalMatchedscoped to the window, and the cap keeping the human's marker while stayingchronological.
read_markersalso joinsREAD_AND_SEARCH_TOOLS, so it is covered by the existingno-recording and pre-mount assertions.
registry.test.tsmoves fromtoHaveLength(16)to17. That is the only assertion changed.Doc sweep
docs/tools.mdgains a full §17 entry and an at-a-glance row. Existing entries are notrenumbered: anchors
#1–#10and#12are referenced from source comments, and the doc's numberingalready differs from
allToolsorder. Every other "16"/"sixteen" tool-count claim updated acrossREADME.md,CLAUDE.md,docs/architecture.md,next.config.mjs,webmcp.d.ts,register-tools.ts,tool-surface.tsx,agent-lane.tsx,stage-empty-state.tsxandwebmcp-badge.tsx. CLAUDE.md's test count moves 303 -> 309. The "sixteen seconds" prose inbugbaitis a different fact and was left alone.
Verification
Not verifiable locally: the header pill reading
WebMCP │ 17against the live deploy, which needs abrowser with WebMCP.