Class: InMemoryRunStore
Defined in: packages/agentos/src/io/channels/meetings/stores/memory.ts:48
Runs in memory, for tests and single-process hosts. Rows are copied in and out, so a caller never holds the stored row.
Implements
Constructors
Constructor
new InMemoryRunStore():
InMemoryRunStore
Returns
InMemoryRunStore
Methods
findByIdempotencyKey()
findByIdempotencyKey(
ownerRef,key):Promise<MeetingRunRecord|undefined>
Defined in: packages/agentos/src/io/channels/meetings/stores/memory.ts:109
The run an owner sent with this idempotency key, if there is one (there is at most one: see insert).
Parameters
ownerRef
string
key
string
Returns
Promise<MeetingRunRecord | undefined>
Implementation of
IRunStore.findByIdempotencyKey
forget()
forget(
runId):Promise<void>
Defined in: packages/agentos/src/io/channels/meetings/stores/memory.ts:49
Optional whole-run eviction for in-memory hosts after terminal cleanup and the retention grace. Durable stores omit it to retain their records. Call only after producers have stopped; forgetting removes fences too.
Parameters
runId
string
Returns
Promise<void>
Implementation of
get()
get(
runId):Promise<MeetingRunRecord|undefined>
Defined in: packages/agentos/src/io/channels/meetings/stores/memory.ts:63
The run, or undefined when there is none.
Parameters
runId
string
Returns
Promise<MeetingRunRecord | undefined>
Implementation of
insert()
insert(
run):Promise<void>
Defined in: packages/agentos/src/io/channels/meetings/stores/memory.ts:54
Adds a new run. A run id that exists is an error, and so is an idempotency key the owner already used: that insert
stores nothing and rejects with DuplicateIdempotencyKeyError, so of two sends racing with one key only one run
is made, and the other finds it with findByIdempotencyKey.
Parameters
run
Returns
Promise<void>
Implementation of
list()
list(
filter):Promise<MeetingRunRecord[]>
Defined in: packages/agentos/src/io/channels/meetings/stores/memory.ts:98
The runs the filter selects, requestedAt descending, then runId ascending. Default limit 500; states: [] applies no state filter.
Parameters
filter
Returns
Promise<MeetingRunRecord[]>
Implementation of
listFundingPending()
listFundingPending(
limit,afterRunId?):Promise<MeetingRunRecord[]>
Defined in: packages/agentos/src/io/channels/meetings/stores/memory.ts:114
At most limit (1 to 64) runs whose funding cleanup is unfinished, after afterRunId, ordered by run id.
Parameters
limit
number
afterRunId?
string
Returns
Promise<MeetingRunRecord[]>
Implementation of
replace()
replace(
run):Promise<void>
Defined in: packages/agentos/src/io/channels/meetings/stores/memory.ts:93
Rewrites the whole row (the content-free form at the end of a purge).
Parameters
run
Returns
Promise<void>
Implementation of
update()
update(
runId,patch,expectState?):Promise<MeetingRunRecord|undefined>
Defined in: packages/agentos/src/io/channels/meetings/stores/memory.ts:67
Atomically re-reads the row, checks expectState and applies the patch; undefined on a mismatch. Postgres holds the shared run anchor and sets the content fence for a purge in the same transaction. In-memory comparison and update have no await between them.
Parameters
runId
string
patch
Partial<MeetingRunRecord>
expectState?
MeetingRunState | readonly MeetingRunState[]
Returns
Promise<MeetingRunRecord | undefined>
Implementation of
updateWith()
updateWith(
runId,patchFor):Promise<MeetingRunRecord|undefined>
Defined in: packages/agentos/src/io/channels/meetings/stores/memory.ts:83
Decides the patch on a copy of the stored row and applies it with no await between them, so no other write lands in
between. A patch that would change the run's persisted funding is refused, as update refuses it, and nothing is written.
Parameters
runId
string
patchFor
(current) => Partial<MeetingRunRecord> | undefined
Returns
Promise<MeetingRunRecord | undefined>