Repository navigation
feat(interaction): report readiness wait on a successful press, click, or longpress #3081
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
thymikee
merged 4 commits into
proto/reliability-contract
from
feat/readiness-success-evidence
Oct 1, 2026
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
47c2206
feat(interaction): report the readiness wait on a successful press, c…
thymikee abc995e
docs: document data.readiness on a press that had to wait
thymikee 9794df6
refactor(replay): drop the carried gate wait; replay evidence stays t…
thymikee 8868fb5
test(interaction): pin data.readiness on the client and MCP success p…
thymikee File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| import assert from 'node:assert/strict'; | ||
| import { test } from 'vitest'; | ||
| import { createAgentDeviceClient } from '../../agent-device-client.ts'; | ||
| import { createTransport } from '../../__tests__/client-transport-fixture.ts'; | ||
| import { createCommandToolExecutor } from '../command-tools.ts'; | ||
|
|
||
| test('MCP press returns the daemon data.readiness in structuredContent', async () => { | ||
| const readiness = { polls: 2, waitedMs: 180 }; | ||
| const setup = createTransport(async () => ({ ok: true, data: { ref: '@e1', readiness } })); | ||
| const executor = createCommandToolExecutor({ | ||
| createClient: () => createAgentDeviceClient(setup.config, { transport: setup.transport }), | ||
| }); | ||
|
|
||
| const result = await executor.execute('press', { | ||
| target: { kind: 'selector', selector: 'label=Continue' }, | ||
| }); | ||
|
|
||
| assert.equal(result.isError, false); | ||
| assert.deepEqual(result.structuredContent?.readiness, readiness); | ||
| }); |
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P3: The cast to
{ readiness?: unknown }is unnecessary: press/click/longPress results are typedCommandResult<'press'|'click'|'longpress'>, which resolves toPressCommandResponseData/ClickCommandResponseData/LongPressCommandResponseDataand already declarereadiness?: ReadinessWaitEvidence(packages/contracts/src/interaction.ts, TouchResponseDataBase). Casting the field tounknownmeans the test no longer proves the client's published result type exposesreadiness— if the contract drops or renames it, this test keeps compiling while the surface change goes unnoticed. Use the typed field directly.Prompt for AI agents