Skip to content

Preserve HTTP helpers and add explicit exclusive control sessions - #6

Draft
TimofeyIvanenko wants to merge 5 commits into
mainfrom
codex/unified-control-sdk
Draft

TimofeyIvanenko wants to merge 5 commits into
mainfrom
codex/unified-control-sdk

Conversation

@TimofeyIvanenko

@TimofeyIvanenko TimofeyIvanenko commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Keep simple Python command calls on HTTP while providing explicit exclusive control for multi-step workflows. This accompanies the shared command service in NomixClicker #747.

Clicker(device_id).click((x, y)) and existing public api_helper command functions work without opening a WebSocket. Command names, parameters and defaults are preserved. HTTP errors stop the caller; busy and uncertain outcomes are exposed as ControlError, and a lost response is never automatically retried.

with Clicker(device_id) or explicit connect() / close() retains exclusive WebSocket ownership between workflow steps. Acquisition does not steal control unless takeover=True is requested. Both transports use canonical command names (tap, double-tap, keyboard/type, move, etc.). A failed or closed exclusive session never falls back to HTTP, reconnects or replays commands.

Typing derives its bounded deadline from the server's text_timeout_ms, with a finite dispatch budget. HTTP typing reads authenticated control discovery; persistent sessions receive timing through state/acquisition. Invalid timing fails before sending input. Acquisition timing cannot overwrite newer ownership state, and an explicitly supplied request timeout is preserved. Ordinary command timeouts remain unchanged.

Update examples, action helpers and publishing validation for SDK 0.2. Results confirm best-effort dispatch, not execution on the phone. Cancellation stops unsent input; already transmitted input may continue or overlap later actions on the device. No hardware completion replies are required. Screenshots, recognition, media and agent task management remain HTTP.

Validation: 105 tests pass, including HTTP helpers without connection setup, busy/error propagation, uncertain delivery without retry, explicit ownership, no HTTP fallback after WebSocket loss, request correlation, disconnects and server-derived typing deadlines for convenience/raw HTTP and exclusive requests. No physical device commands were sent. Exclusive sessions and advertised typing budgets require the matching server release; existing HTTP clients retain their endpoint interface. SDK 0.2 intentionally raises command failures instead of returning an unchecked failure dictionary.

@TimofeyIvanenko TimofeyIvanenko changed the title Move Python SDK to explicit unified control sessions Preserve HTTP helpers and add explicit exclusive control sessions Oct 22, 2026
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