Repository navigation
feat(cli): record evidence for every desktop input command - #440
Merged
Merged
Conversation
Move, scroll, double-click, key and type now record one evidence action with its input state, the same names, targets and states the MCP tools record. Typed text keeps only its length and input type. Refusals before dispatch record not-attempted, and failures after dispatch record attempted. Closes #409
A failed xdotool key call echoed its argv, so the CLI and MCP evidence stored the key that evidence keeps only as a length.
…ent-free A NUL in a key made the spawn error echo the key into the MCP response and evidence. The MCP schema now refuses it, pressKey checks it before the permit, and any dispatch error other than a target refusal loses its detail.
…idence # Conflicts: # packages/desktop-linux/test/pointer-target.test.ts
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.
desktop move,scroll,double-click,keyandtypein the CLI now record one evidence action each, asdesktop clickanddesktop dragalready did and as the MCP tools do.pointerWithEvidencebecameinputWithEvidence, one helper for all seven commands, with the same action names, target fields and input states as the MCP tools. A refusal before dispatch (human control, a missing permit, an unverified display, text preparation) recordsnot-attempted, a failure after dispatch recordsattempted, and success recordscompleted. Evidence stays best effort: its failures never block the input or change the command result.Typed text never enters evidence:
typeandkeykeep only the length and input type. Review found that a failedxdotool keycall echoed its argv, so the key reached evidence through the error text, on the MCP path as well.pressKeynow throws "Desktop key dispatch failed" with only the exit reason for any dispatch error other than a display refusal, and refuses a key with a NUL character before the permit. The MCP schema refuses a NUL key too.Closes #409
desktop-input-evidence.test.ts(35 tests), CLI QA on a private session409/before-old-source.log,409/qa.sh,409/qa.lognot-attempted) and failure (attempted)409/after-focused.logpointer-target.test.ts, live MCPdesktop.test.ts409/round2/,409/round3/before.logEvidence paths are under
~/.pickforge/investigations/on the review host.Sol review, round 1: 7/10, a failed key dispatch stored the key in evidence; fixed in 79d3bdf. Round 2: 5/10, a NUL key's spawn error still carried the key and recorded
attempted; fixed in 8997260. Declined from round 2: on success the CLI prints the key and returns it asdata.key. That output goes to the caller who passed the key, the MCP tool returns the same field, and the issue covers evidence only. Round 3: 9/10, no findings. 8997260 also drops a parameter fromrecordInputActionfor PickCheck.Checks on 0b5e6ac: oxlint, typecheck, build; full vitest coverage run with the desktop, window, wait, browser and viewer requirements on (192 files, 3466 passed, 4 skipped);
PICKFORGE_REQUIRE_XVFB=1 cargo test --workspace --locked(328 passed). PickCheck 0.4.0 against main is clean.8f6c769 adds the test marker
pf409-private-key-markerto the.gitleaks.tomlfixture allowlist by its exact value: the generic-api-key rule readconst key = "…"inpointer-target.test.tsas a key. A local gitleaks scan of main and of this branch with the new config is clean.