Skip to content

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
capy-ai[bot] merged 8 commits into
mainfrom
capy/verify-071-python-051
Nov 25, 2026
Merged

capy-ai[bot] merged 8 commits into
mainfrom
capy/verify-071-python-051

Conversation

@anamhira47

@anamhira47 anamhira47 commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

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_input is no longer SESSION_BUSY. On web, typeFocused with nothing focused gets HTTP 409 {"error":"no_focused_input","action_applied":false,...} from the browser runtime (browser_cdp.py raises SurfaceError("no_focused_input", status_code=409)). 0.7.0 mapped every unrecognized 409 to SESSION_BUSY, which the own-model loop treats as aborting, so agents gave up instead of fixing the call (eval G5). It now maps to ACTION_FAILED with reason no_focused_input in 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 refuse typeFocused client-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 to SESSION_BUSY.

type({ target }, text) is the one typing rule. Mac computers now take type(at, text, { clear }): click the field, Command+A unless clear: false (Ctrl+A on Linux), type. typeFocused on iOS and Android still fails fast with NOT_AVAILABLE_ON_PLATFORM, now pointing at type({ target }, text) (cognisim-monorepo#6478 is still a draft). README, api.md, the web/mobile/computers/errors/agents pages, llms.txt and the Python and Go READMEs teach it; the own-model tool descriptions say type is the way to type.

Mac recording() after close(). The recording wasn't lost: staging saves it about 6-12 s after release (the owner uploads it asynchronously), while 0.7.0's recording() asked once and returned null on recording_unavailable, and attach() can't reopen a closed computer. recording() now polls every 5 s until the video is saved, up to timeoutMs (TS, default 15 min, 0 asks once), timeout (Python, seconds) or ctx's deadline (Go). No backend change needed. Calling it on a running computer still throws SESSION_BUSY, now saying to call close() first.

Versions and changelog. 0.7.1 / Python 0.5.1 / Go v0.6.1 sections, including the already-merged upgrade_required change 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:package passes.

Staging proof (Benchmarks org, before = published 0.7.0 build, after = this branch):

  • Web typeFocused with nothing focused: before SESSION_BUSY "busy and refused input: no_focused_input"; after ACTION_FAILED / no_focused_input in TS, Python and Go, then type({ target: 'the Username field' }, 'standard_user') typed and a validation confirmed it.
  • Real busy: a second execute_step during a running step → SESSION_BUSY.
  • iOS and Android typeFocused: NOT_AVAILABLE_ON_PLATFORM in under 2 ms, now naming type({ target }, text); Android type({ target: 'the Search settings bar' }, 'Wi-Fi') typed into search.
  • Mac: before, recording() right after close() → null, attach() → SESSION_ENDED, raw GET /recording 200 after 12 s. After, type({ target: 'the blank TextEdit document' }, …) typed, and recording() returned the video after 6 s in TS, Python and Go.

Open in Capy


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 typeFocused without focus no longer surfaces as SESSION_BUSY when Revyl returns HTTP 409 no_focused_input. All three SDKs map it to ACTION_FAILED with reason no_focused_input and a message that steers callers to type({ target }, text) or tap first—so own-model loops can recover instead of aborting. Real concurrent-step 409s stay SESSION_BUSY.

Mac computers gain type(at, text, { clear }): click the field, select-all (Command/Ctrl+A) unless clear: false, then type via the existing screen path; control characters other than newline/tab are rejected up front. iOS/Android typeFocused still fail fast with NOT_AVAILABLE_ON_PLATFORM, now naming type({ target }, text).

recording() after close() polls every 5 seconds until Revyl saves the video (default 15 minutes; timeoutMs / timeout / context deadline; 0 = single check). Running computers still get SESSION_BUSY with guidance to close first. Docs and examples teach fetch-on-same-object before exit, since attach() cannot reopen.

Version bumps, changelog sections, agent tool descriptions, and platform tables/READMEs are updated to match. Tests that assumed immediate null on recording_unavailable now use zero timeout.

Reviewed by Cursor Bugbot for commit 5294204. Bugbot is set up for automated code reviews on this repo. Configure here.

anamhira47 and others added 4 commits November 25, 2026 05:51
…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>

@capy-ai capy-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Capy found 2 potential issues (2 medium).

View 1 other finding in Capy.

Open in Capy

Comment thread packages/verify/src/computer-session.ts Resolved
Comment thread packages/verify/src/computer-session.ts Resolved
anamhira47 and others added 2 commits November 25, 2026 06:13
…) 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>
@capy-ai
capy-ai Bot marked this pull request as ready for review November 25, 2026 21:23

@capy-ai capy-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Capy found no issues.

View 3 other findings in Capy.

Open in Capy

… a timeout

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

@capy-ai capy-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Capy found no issues.

View 2 other findings in Capy.

Open in Capy

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

@capy-ai capy-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Capy found no issues.

View 2 other findings in Capy.

Open in Capy

@capy-ai
capy-ai Bot merged commit c981938 into main Nov 25, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant