Interface: IMigrationSource
Defined in: packages/agentos/src/cognition/rag/migration/types.ts:97
Adapter for reading data from a migration source backend. Implementations exist for SQLite, Postgres, and Qdrant.
Methods
close()
close():
Promise<void>
Defined in: packages/agentos/src/cognition/rag/migration/types.ts:118
Close the connection and release resources.
Returns
Promise<void>
countRows()
countRows(
table):Promise<number>
Defined in: packages/agentos/src/cognition/rag/migration/types.ts:101
Count rows/points in a table.
Parameters
table
string
Returns
Promise<number>
listTables()
listTables():
Promise<string[]>
Defined in: packages/agentos/src/cognition/rag/migration/types.ts:99
List table/collection names available for migration.
Returns
Promise<string[]>
readBatch()
readBatch(
table,offset,limit):Promise<Record<string,unknown>[]>
Defined in: packages/agentos/src/cognition/rag/migration/types.ts:109
Read a batch of rows starting at offset.
Parameters
table
string
Table name to read from.
offset
number
Number of rows to skip.
limit
number
Maximum rows to return.
Returns
Promise<Record<string, unknown>[]>
Array of row objects with column values.
scopeIdForms()?
optionalscopeIdForms():Promise<Map<string,BrainScopeIdForm>>
Defined in: packages/agentos/src/cognition/rag/migration/types.ts:116
Every brain the source holds, with its scope-id form (brain_meta.scope_id_form), for the handshake the engine
runs before it copies any table. A Qdrant source reads the brains its sidecar names, and counts each as holding
traces whose scope ids the two forms read apart, since its traces are in Qdrant. A source that names no brain (a
Pinecone index, a Qdrant source with no sidecar) leaves it out.
Returns
Promise<Map<string, BrainScopeIdForm>>