This commit is contained in:
2026-09-11 14:26:44 -04:00
parent 78cb03e6cb
commit b264c31b86
16 changed files with 181 additions and 19 deletions
+3 -1
View File
@@ -1,7 +1,7 @@
const MAX_STEPS = 100;
export class ComputerUseSession {
constructor({ stepsMax = 20, clock = () => Date.now() } = {}) {
constructor({ stepsMax = 20, clock = () => Date.now(), audit } = {}) {
this.clock = clock;
this.stepsMax = Math.min(MAX_STEPS, Math.max(1, stepsMax));
this.active = false;
@@ -9,6 +9,7 @@ export class ComputerUseSession {
this.sessionId = null;
this.backend = 'none';
this.expiresAt = null;
this.audit = audit;
}
grant({ persist = false, monitors = 'focused' } = {}) {
@@ -26,6 +27,7 @@ export class ComputerUseSession {
this.sessionId = null;
this.expiresAt = null;
this.backend = 'none';
void this.audit?.wipeTemp?.();
}
status() {