mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
feat(agent): add explicit session mutations
This commit is contained in:
parent
9b034fc45e
commit
852142daa0
11 changed files with 276 additions and 57 deletions
|
|
@ -9,6 +9,7 @@ import type {
|
|||
ListElement,
|
||||
ListReadOptions,
|
||||
Session,
|
||||
SessionMutation,
|
||||
SessionMutator,
|
||||
SessionStats,
|
||||
SessionTree,
|
||||
|
|
@ -59,6 +60,10 @@ export class SqliteOpenSession implements Session<SqliteSessionMetadata> {
|
|||
this.renewalTimer.unref?.();
|
||||
}
|
||||
|
||||
beginMutation(lane: string, context: Context): Promise<SessionMutation> {
|
||||
return this.admit(() => this.session.beginMutation(lane, context));
|
||||
}
|
||||
|
||||
mutate<T>(
|
||||
lane: string,
|
||||
mutation: (mutator: SessionMutator, context: Context) => T | Promise<T>,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue