From d86cec3093da9a4ce357f7faeef5402ddaf7af4e Mon Sep 17 00:00:00 2001 From: creatixchu Date: Wed, 18 Nov 2026 16:05:16 +0800 Subject: [PATCH] Complete lifecycle API documentation and pin native release preconditions --- .../experimental/cua-macos/native/tests/capabilities_e2e.py | 1 + packages/experimental/cua/src/turn-inputs.ts | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/experimental/cua-macos/native/tests/capabilities_e2e.py b/packages/experimental/cua-macos/native/tests/capabilities_e2e.py index 5ea6ac011b..540e89315e 100644 --- a/packages/experimental/cua-macos/native/tests/capabilities_e2e.py +++ b/packages/experimental/cua-macos/native/tests/capabilities_e2e.py @@ -91,6 +91,7 @@ def check_toggle_mouse(helper, owner, state_file, executable): call("activate", {"appHandle": other_app["appHandle"]}) wait_for_state(state_file, lambda s: not s["active"]) finally: + assert cursor(*outside) == outside toggle(button, "up") state = wait_for_state(state_file, lambda s: len(s["events"]) >= count + 2) events = state["events"][count:] diff --git a/packages/experimental/cua/src/turn-inputs.ts b/packages/experimental/cua/src/turn-inputs.ts index aaee013e2c..877bbf467a 100644 --- a/packages/experimental/cua/src/turn-inputs.ts +++ b/packages/experimental/cua/src/turn-inputs.ts @@ -49,7 +49,10 @@ export class CuaInputTurns { /** @param ctx - Provider scope owning the lifecycle listeners. */ constructor(private readonly ctx: Context) {} - /** @returns Exact listener disposers for the runtime effect to retain through native cleanup. */ + /** + * Install turn admission and finalization listeners. + * @returns Exact disposers for the runtime effect to retain through native cleanup. + */ *install(): Generator<() => void> { const ctx = this.ctx yield ctx.on('agent/pre-step', (event, next) => {