docs(cua): document the application consent owner lifecycle

This commit is contained in:
creatixchu committed 2026-09-28 17:06:10 +08:00
1 parent 40047a4577
commit 3793f16f3a
1 file changed
+8 -2
@@ -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<void> {
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)