From 3793f16f3a4af8a98b60ef39e90b0328d9cf99dd Mon Sep 17 00:00:00 2001 From: creatixchu Date: Mon, 28 Sep 2026 17:06:10 +0800 Subject: [PATCH] docs(cua): document the application consent owner lifecycle --- packages/computer-use/cua/src/application-access.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/computer-use/cua/src/application-access.ts b/packages/computer-use/cua/src/application-access.ts index 0a89411663..0380db9cd0 100644 --- a/packages/computer-use/cua/src/application-access.ts +++ b/packages/computer-use/cua/src/application-access.ts @@ -50,7 +50,10 @@ export class ApplicationAccess { ctx.effect(() => () => this.dispose(), 'cua-application-access.dispose') } - /** @returns Completion after consent waits and active operations settle. */ + /** + * Cancel consent waits and join owned operations. + * @returns Completion after consent waits and active operations settle. + */ dispose(): Promise { return this.disposal ??= (async () => { this.lifetime.abort() @@ -174,7 +177,10 @@ export class ApplicationAccess { } } - /** @param agent Disposed task whose transient decisions are released. */ + /** + * Forget the disposed task's transient decisions and selected handles. + * @param agent Disposed task whose transient decisions are released. + */ forget(agent: Agent): void { for (const [client, state] of this.clients) if (state.agent === agent) this.clients.delete(client) this.rejected.delete(agent)