Skip to main content

Class: SqlTranscriptStore

Defined in: packages/agentos/src/io/channels/meetings/stores/sql.ts:478

Durable transcript turns, allocated and written under the same anchor as the content fence. A turn's start and end are kept in whole milliseconds, rounded.

Implements​

Constructors​

Constructor​

new SqlTranscriptStore(opts): SqlTranscriptStore

Defined in: packages/agentos/src/io/channels/meetings/stores/sql.ts:481

Checks the adapter capabilities and prefix without creating tables.

Parameters​

opts​

SqlStoreOptions

Returns​

SqlTranscriptStore

Methods​

append()​

append(turn): Promise<void>

Defined in: packages/agentos/src/io/channels/meetings/stores/sql.ts:486

The anchor row is locked first, so an append and a fence of one run never interleave: a fence that commits first is seen, a fence that waits sees the turn and purges it.

Parameters​

turn​

TranscriptTurn

Returns​

Promise<void>

Implementation of​

ITranscriptStore.append


appendNext()​

appendNext(input): Promise<TranscriptTurn>

Defined in: packages/agentos/src/io/channels/meetings/stores/sql.ts:495

Allocates the next run sequence and stores the turn atomically, rejecting fenced runs.

Parameters​

input​

TranscriptInput

Returns​

Promise<TranscriptTurn>

Implementation of​

ITranscriptStore.appendNext


fence()​

fence(runId): Promise<void>

Defined in: packages/agentos/src/io/channels/meetings/stores/sql.ts:515

Fences the run against further transcript and content writes.

Parameters​

runId​

string

Returns​

Promise<void>

Implementation of​

ITranscriptStore.fence


isFenced()​

isFenced(runId): Promise<boolean>

Defined in: packages/agentos/src/io/channels/meetings/stores/sql.ts:519

Reports whether the run's durable fence is set.

Parameters​

runId​

string

Returns​

Promise<boolean>

Implementation of​

ITranscriptStore.isFenced


purge()​

purge(runId): Promise<void>

Defined in: packages/agentos/src/io/channels/meetings/stores/sql.ts:524

Removes turns under the anchor, retaining its fence and sequence counters.

Parameters​

runId​

string

Returns​

Promise<void>

Implementation of​

ITranscriptStore.purge


read()​

read(runId, fromSeq, limit?): Promise<TranscriptTurn[]>

Defined in: packages/agentos/src/io/channels/meetings/stores/sql.ts:510

Reads turns after the cursor in sequence order.

Parameters​

runId​

string

fromSeq​

number

limit?​

number = 500

Returns​

Promise<TranscriptTurn[]>

Implementation of​

ITranscriptStore.read