/** * Resolve each legacy table to the physical table the RUNTIME reads today. * * ## Why (T12346) * * The exodus table map (`table-name-map.ts`) names the CONSOLIDATED target — * `audit_log` → `tasks_audit_log`, `token_usage` → `tasks_token_usage`, … But * the runtime has not cut every table over. It binds the tasks domain through * `tasks-schema.ts`, which re-points only part of the legacy family at the * prefixed tables; `audit_log`, `architecture_decisions`, … are still read and * written BARE (`schema_meta`, `attachments` and `attachment_refs` moved to * their prefixed twins in T12535, `token_usage` in T13111). A reconcile that copies a legacy `audit_log` * row into `tasks_audit_log` preserves it where no command will ever show it — * which is not a reconcile. * * The answer is derived, never hand-written: for every drizzle table object in * the legacy bare schema module (`schema/index.ts`, whose physical names are the * legacy `tasks.db` names), the runtime target is the physical name of the * SAME export as the runtime binds it (`tasks-schema.ts`). When the runtime * moves another table to its prefixed twin, this follows automatically. * * Only the `tasks` source is re-derived; brain/conduit/global sources keep the * consolidated map, whose targets are already the tables their runtimes bind. * * @module * @task T12346 */ import { type TableNameResolution } from './table-name-map.js'; /** Resolves one legacy table of one source to its copy target. */ export type TargetResolver = (sourceName: string, legacyTable: string) => TableNameResolution; /** * Build a resolver that targets the tables the runtime reads today. * * @returns A {@link TargetResolver}: tasks-source tables go to the physical table * the runtime binds for the same schema export; everything else (and any * legacy table the runtime no longer binds) falls back to the consolidated map. * @task T12346 */ export declare function buildRuntimeTargetResolver(): Promise; //# sourceMappingURL=runtime-targets.d.ts.map