Repository navigation
Verify 0.7.1 / Python 0.5.1 / Go v0.6.1: no_focused_input error, type({ target }) everywhere, Mac recording() waits after close - #68
Merged
Conversation
…ION_FAILED, type({ target }) on computers and as the one typing rule, recording() waits for the video after close
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…) polls inside their wait Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
… a timeout Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
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.
Verify 0.7.1 / Python 0.5.1 / Go v0.6.1: three agent-facing fixes, with docs that teach one typing rule. Unpublished; tagging is Anam's call.
no_focused_inputis no longerSESSION_BUSY. On web,typeFocusedwith nothing focused gets HTTP 409{"error":"no_focused_input","action_applied":false,...}from the browser runtime (browser_cdp.pyraisesSurfaceError("no_focused_input", status_code=409)). 0.7.0 mapped every unrecognized 409 toSESSION_BUSY, which the own-model loop treats as aborting, so agents gave up instead of fixing the call (eval G5). It now maps toACTION_FAILEDwith reasonno_focused_inputin TS, Python and Go, with a message that names the fix:Nothing was typed: no text field has focus (no_focused_input). Use type({ target: 'the email field' }, text), which taps the field and types into it, or tap the field first.iOS and Android refusetypeFocusedclient-side before any request, and a Mac computer types into whatever has focus, so web is the only platform that returns it. A real busy session (a second step while one runs: 409 "A step is already executing") still maps toSESSION_BUSY.type({ target }, text)is the one typing rule. Mac computers now taketype(at, text, { clear }): click the field, Command+A unlessclear: false(Ctrl+A on Linux), type.typeFocusedon iOS and Android still fails fast withNOT_AVAILABLE_ON_PLATFORM, now pointing attype({ target }, text)(cognisim-monorepo#6478 is still a draft). README,api.md, the web/mobile/computers/errors/agents pages,llms.txtand the Python and Go READMEs teach it; the own-model tool descriptions saytypeis the way to type.Mac
recording()afterclose(). The recording wasn't lost: staging saves it about 6-12 s after release (the owner uploads it asynchronously), while 0.7.0'srecording()asked once and returnednullonrecording_unavailable, andattach()can't reopen a closed computer.recording()now polls every 5 s until the video is saved, up totimeoutMs(TS, default 15 min, 0 asks once),timeout(Python, seconds) orctx's deadline (Go). No backend change needed. Calling it on a running computer still throwsSESSION_BUSY, now saying to callclose()first.Versions and changelog. 0.7.1 / Python 0.5.1 / Go v0.6.1 sections, including the already-merged
upgrade_requiredchange and the profiles-caveat docs fix (#66). Versioned README links point at v0.7.1 / go/v0.6.1.Tests. Only contract-changed tests adapted: the TS, Python and Go "recording_unavailable returns null" cases now pass
timeoutMs: 0/timeout=0/ a 2 s context. No new tests. TS 280/280, Python 767 passed, Go race suite green;check:packagepasses.Staging proof (Benchmarks org, before = published 0.7.0 build, after = this branch):
typeFocusedwith nothing focused: beforeSESSION_BUSY "busy and refused input: no_focused_input"; afterACTION_FAILED/no_focused_inputin TS, Python and Go, thentype({ target: 'the Username field' }, 'standard_user')typed and a validation confirmed it.execute_stepduring a running step →SESSION_BUSY.typeFocused:NOT_AVAILABLE_ON_PLATFORMin under 2 ms, now namingtype({ target }, text); Androidtype({ target: 'the Search settings bar' }, 'Wi-Fi')typed into search.recording()right afterclose()→null,attach()→SESSION_ENDED, raw GET/recording200 after 12 s. After,type({ target: 'the blank TextEdit document' }, …)typed, andrecording()returned the video after 6 s in TS, Python and Go.Note
Medium Risk
Changes error semantics for a common agent path and add Mac screen typing plus polling recording—behavior agents and scripts may rely on, but scope is SDK/docs with parity across languages.
Overview
Release 0.7.1 (TypeScript), 0.5.1 (Python), and 0.6.1 (Go) with aligned behavior and heavy doc updates around one typing rule:
type({ target }, text)everywhere.Web
typeFocusedwithout focus no longer surfaces asSESSION_BUSYwhen Revyl returns HTTP 409no_focused_input. All three SDKs map it toACTION_FAILEDwith reasonno_focused_inputand a message that steers callers totype({ target }, text)or tap first—so own-model loops can recover instead of aborting. Real concurrent-step 409s staySESSION_BUSY.Mac computers gain
type(at, text, { clear }): click the field, select-all (Command/Ctrl+A) unlessclear: false, then type via the existing screen path; control characters other than newline/tab are rejected up front. iOS/AndroidtypeFocusedstill fail fast withNOT_AVAILABLE_ON_PLATFORM, now namingtype({ target }, text).recording()afterclose()polls every 5 seconds until Revyl saves the video (default 15 minutes;timeoutMs/timeout/ context deadline; 0 = single check). Running computers still getSESSION_BUSYwith guidance to close first. Docs and examples teach fetch-on-same-object before exit, sinceattach()cannot reopen.Version bumps, changelog sections, agent tool descriptions, and platform tables/READMEs are updated to match. Tests that assumed immediate
nullonrecording_unavailablenow use zero timeout.Reviewed by Cursor Bugbot for commit 5294204. Bugbot is set up for automated code reviews on this repo. Configure here.