Skip to main content

Interface: SourceDerivationBindings

Defined in: packages/agentos/src/cognition/library/SqlSourceDerivationStore.ts:58

Host/table bindings must operate only on the supplied transaction adapter. The store calls them inside its owner lock, in the transaction that commits, delivers or purges. Never fetch from a provider, parse, embed, generate or revoke inside them.

Methods​

purgeResults()​

purgeResults(tx, scope, resultIds): Promise<void>

Defined in: packages/agentos/src/cognition/library/SqlSourceDerivationStore.ts:67

Deletes every host row stored for these result ids (saved marks, summaries and the like), whole.

Parameters​

tx​

StorageAdapter

scope​

SourceOwnerScope

resultIds​

readonly string[]

Returns​

Promise<void>


purgeSources()​

purgeSources(tx, scope, affected): Promise<void>

Defined in: packages/agentos/src/cognition/library/SqlSourceDerivationStore.ts:69

Deletes the host's source content in the affected scope: text, metadata, passages and vectors.

Parameters​

tx​

StorageAdapter

scope​

SourceOwnerScope

affected​

SourceInvalidation

Returns​

Promise<void>


readCurrent()​

readCurrent(tx, derivation): Promise<readonly SourceDependencyState[]>

Defined in: packages/agentos/src/cognition/library/SqlSourceDerivationStore.ts:65

Reads the current state of each of the derivation's sources from the host's own rows, in this transaction: connection generation, source version, retained message ids, source expiry and the pause and use switches. Leave out a source that is gone, and answer no source of an account the host is deleting. Never answer from a cache.

Parameters​

tx​

StorageAdapter

derivation​

SourceDerivation

Returns​

Promise<readonly SourceDependencyState[]>