feat(cursor): the gate reaches Cursor at preToolUse and stop, from the live witness in agentseam 0.3.3 - #159
Merged
Merged
Conversation
agentseam 0.3.3 records what a live probe of Cursor 3.21.18 showed: the generic preToolUse event fires for Write with the file's path and full content and honours a deny, and stop honours a followup_message that sends the agent back into the turn. Both the packaged gate and the repository-side sync now reach Cursor at both surfaces. - gate_package: a vendor whose hook entry is the flat cursor shape gets cursor_entry documents under its own envelope, with no matcher - in_agent: Cursor's write and stop fragments in that flat shape, rooted like its shell entries; in_agent_merged wires both into .cursor/hooks.json under their own event keys - write_gate: a stop that re-entered once (loop_count) is not judged again, the way stop_hook_active already guards Claude Code - cursor plugin posture states the turn is not held, only followed up - pin agentseam==0.3.3; runtime goldens, this repo's compiled tree and hook files resynced; docs, tables and changelog updated - tests: the Cursor package's hooks file shape, an end-to-end run of the bundled adapter against the witnessed payloads (deny, follow-up, silent on re-entry), and Cursor's stop surface Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
Hashes are those of the wheel and sdist PyPI serves for 0.3.3. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
Collaborator
Author
|
Status: green and mergeable. The first CI runs were red for a reason outside this PR: every job that installs the package failed with One real finding came out of that re-run:
Generated by Claude Code |
jothimani-rajendran
marked this pull request as ready for review
September 23, 2026 11:00
jothimani-rajendran
changed the base branch from
claude/plugin-gate
to
main
September 23, 2026 11:00
Cursor joins the stop surface, so the derived count in the fan-out figure moves from six to seven, as CI's drift check requires. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
…/chock into claude/cursor-gate
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
Stacked on #158 (plugin gate). agentseam 0.3.3 records what a live probe of Cursor 3.21.18 showed: the generic
preToolUseevent fires forWritewith the file's path and full content and honours a deny, andstophonours afollowup_messagethat sends the agent back into the turn (a silent stop ends it, so that surface fails open). With the pin bumped, both the packaged gate and the repository-side sync reach Cursor at both surfaces; nothing about Cursor's reach is typed here,gate_reach("cursor")flips to("Write", True)from agentseam's records.gate_package): a vendor whose hook entry is the flat cursor shape getscursor_entrydocuments under Cursor'sversion: 1envelope, with no matcher and nofailClosed. The package posture states the turn is not held: a refusal there is a follow-up message, once, and a hook that fails to answer lets the turn end.in_agent,in_agent_merged):chock synccompiles a Cursor write fragment (pre-tool-use/cursor-write-hooks.json) and a Cursor stop fragment (stop/cursor-hooks.json) in that flat shape, rooted like its shell entries, and merges both into.cursor/hooks.jsonbeside the shell guard under their own event keys. Cursor's row gains thestopcolumn.write_gate): a stop that already re-entered once is not judged again; Cursor spells thatloop_count, Claude Codestop_hook_active.agentseam==0.3.3inpyproject.tomland the hashedrequirements/brand-assets.txt(hashes of the wheel and sdist PyPI serves). Runtime goldens, this repo's compiled tree and hook files resynced.Tests: the Cursor package's hooks file shape; an end-to-end run of the bundled adapter against payloads shaped like the witnessed ones (BOM included): deny on a forbidden
Write, allow on a clean one,followup_messagenaming the leaked file atstop, silence whenloop_countis 1; Cursor's stop surface intest_stop_surface; the reach pin intest_plugin_gate_storesupdated.Definition of done
chock check→ 0 errors, 0 warnings (pre-existing infos only)chock check --only matrixpasses; the matrix is unchanged (32 invariants present)chock sync --repo . --checkcleanchock check --only verifycleanpytest -qgreen: 1450 passed, 6 skippedpytest acceptance/ -c acceptance/pytest.ini --rootdir=acceptancegreen (run against the 0.3.3 wheel; see note).cursor/hooks.jsongains apreToolUseand astopentry; guard entries unchangedruff check .andruff format --check .cleanClaims
surfaces.pynow credits Cursor withstop(best-effort, from the matrix),docs/enforcement-surfaces.mdmarks the cell and says why it is a follow-up rather than a hold, anddocs/agent-plugins.mdstates the package's reach in the same words.Note: at the time of opening, PyPI's simple index had not yet propagated 0.3.3 (the JSON API and the files had). If the first CI run fails to resolve
agentseam==0.3.3, it is that lag; a re-run resolves it.🤖 Generated with Claude Code
https://claude.ai/code/session_01CzNYfzP8ymU3r4JB9Sz8Ha
Generated by Claude Code