P7
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user