Skip to content

Interface: RegisterSourceRequest

@kortexya/reasoninglayer


@kortexya/reasoninglayer / RegisterSourceRequest

Defined in: src/types/sources.ts:283

Request to register a data source.

config: Record<string, unknown>

Defined in: src/types/sources.ts:304

Source-specific configuration (varies by sourceType), sent to the engine byte for byte.

Write every key exactly as the engine reads it: the factory’s own snake_case keys (file_path, base_url, root_fields — see ConfigFieldDto.name), and user-keyed maps with their keys as they are. The SDK does not rewrite a single key in here. A REST endpoints or GraphQL root_fields map is keyed by the type name ("Country"), an MCP transport.env by the environment variable ("API_KEY") and an MCP transport.headers by the HTTP header ("Authorization"); each reaches the engine with exactly that spelling.


optional mode?: SourceWriteMode | null

Defined in: src/types/sources.ts:319

Declared write-path intent — see SourceWriteMode.

Omitted ⇒ ingest, for every source type (#71). Ingest is the only mode that populates the knowledge base and the one path every adapter can serve; transpile is an explicit opt-in. The resolved value is always echoed back on RegisterSourceResponse.mode, so the applied default is never invisible.

transpile is accepted only for a source whose adapter executes transpiled SQL (Postgres, MySQL, SQLite). Requesting it for any other source is refused with 422 — there would be nothing to run the SQL an OSFQL MATCH compiles to. The set a type accepts is advertised by SourcesClient.listSourceTypes, so a caller can avoid the refusal rather than discover it.


sourceId: string

Defined in: src/types/sources.ts:285

Unique source identifier (e.g., “crm_postgres”, “drug_csv”).


sourceName: string

Defined in: src/types/sources.ts:287

Human-readable source name.


sourceType: string

Defined in: src/types/sources.ts:289

Source type: “csv”, “parquet”, “mysql”, “sqlite”, “cassandra”, “neo4j”, “mcp”, “rest”, “graphql”, “postgres”.