Class: SqlRunStore
Defined in: packages/agentos/src/io/channels/meetings/stores/sql.ts:273
Durable run records with sealed URLs and creation contexts, and expected-state updates under the run anchor.
Implements
Constructors
Constructor
new SqlRunStore(
opts):SqlRunStore
Defined in: packages/agentos/src/io/channels/meetings/stores/sql.ts:276
Checks the adapter capabilities and prefix; the caller applies the exported DDL.
Parameters
opts
Returns
SqlRunStore
Methods
[custom]()
[custom]():
string
Defined in: packages/agentos/src/io/channels/meetings/stores/sql.ts:281
What util.inspect, and so console.log, prints: a redacted marker, neither the box nor the database's options.
Returns
string
findByIdempotencyKey()
findByIdempotencyKey(
ownerRef,key):Promise<MeetingRunRecord|undefined>
Defined in: packages/agentos/src/io/channels/meetings/stores/sql.ts:392
Finds the owner's run for a previously used idempotency key.
Parameters
ownerRef
string
key
string
Returns
Promise<MeetingRunRecord | undefined>
Implementation of
IRunStore.findByIdempotencyKey
get()
get(
runId):Promise<MeetingRunRecord|undefined>
Defined in: packages/agentos/src/io/channels/meetings/stores/sql.ts:330
Reads a run, opening its URL with its run id as authenticated context, and its creation context with the run and its column.
Parameters
runId
string
Returns
Promise<MeetingRunRecord | undefined>
Implementation of
insert()
insert(
run):Promise<void>
Defined in: packages/agentos/src/io/channels/meetings/stores/sql.ts:314
Inserts a run, its funding snapshot validated first when it has one, retaining the existing idempotency conflict contract.
Parameters
run
Returns
Promise<void>
Implementation of
list()
list(
filter):Promise<MeetingRunRecord[]>
Defined in: packages/agentos/src/io/channels/meetings/stores/sql.ts:382
Lists matching runs by requested time descending, then run id ascending.
Parameters
filter
Returns
Promise<MeetingRunRecord[]>
Implementation of
listFundingPending()
listFundingPending(
limit,afterRunId?):Promise<MeetingRunRecord[]>
Defined in: packages/agentos/src/io/channels/meetings/stores/sql.ts:397
At most limit (1 to 64) runs whose funding cleanup is unfinished, after afterRunId, ordered by run id, over the funding scan's partial index.
Parameters
limit
number
afterRunId?
string
Returns
Promise<MeetingRunRecord[]>
Implementation of
replace()
replace(
run):Promise<void>
Defined in: packages/agentos/src/io/channels/meetings/stores/sql.ts:370
Rereads before replacement, including content-free replacement after cleanup, so a stale replacement cannot overwrite a newer funding settlement intent.
Parameters
run
Returns
Promise<void>
Implementation of
toJSON()
toJSON():
string
Defined in: packages/agentos/src/io/channels/meetings/stores/sql.ts:285
Serialises no options, database or box; persistence uses only the explicit row fields.
Returns
string
update()
update(
runId,patch,expectState?):Promise<MeetingRunRecord|undefined>
Defined in: packages/agentos/src/io/channels/meetings/stores/sql.ts:335
Patches under the shared anchor, setting the content fence atomically on entry to purging, and refuses changes to immutable funding fields.
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/sql.ts:350
Re-reads the row under the anchor and writes the patch patchFor makes of it in the same transaction, setting the
content fence there too on entry to purging. A patch that would change the run's persisted funding is refused before
anything is written, and the transaction rolls back.
Parameters
runId
string
patchFor
(current) => Partial<MeetingRunRecord> | undefined
Returns
Promise<MeetingRunRecord | undefined>