/** * Cross-project task transfer engine for NEXUS. * * Provides executeTransfer() and previewTransfer() for moving/copying * tasks between registered NEXUS projects with full provenance tracking. * * Also provides importUserProfile() and exportUserProfile() for portable * user-profile JSON exchange (PSYCHE Wave 1 — T1079). * * @task T046, T049, T050, T051, T052, T053 * @task T1079 * @epic T4540 * @epic T1076 */ import { type EngineResult } from '../engine-result.js'; import { importSnapshot } from '../snapshot/index.js'; import type { TransferParams, TransferResult } from './transfer-types.js'; /** Default path for the portable user-profile JSON file. */ export declare function getDefaultUserProfilePath(): string; /** * Result of importing a user-profile JSON file. */ export interface ImportUserProfileResult { /** Number of traits successfully upserted. */ imported: number; /** Number of traits skipped (incoming had lower confidence). */ skipped: number; /** Number of traits where the incoming entry superseded the existing one. */ superseded: number; } /** * Import a portable user-profile JSON file into nexus.db. * * Conflict resolution per PLAN.md §T1079: * - Higher confidence wins. * - On equal confidence, more-recent `lastReinforcedAt` wins. * - The loser is linked to the winner via `supersedeTrait` (T1139 prep). * * @param path - Absolute path to the JSON file. Defaults to * `~/.cleo/user_profile.json` (via `getDefaultUserProfilePath()`). * @returns Import result counts. */ export declare function importUserProfile(path?: string): Promise; /** * Result of exporting user-profile traits to JSON. */ export interface ExportUserProfileResult { /** Absolute path the JSON file was written to. */ path: string; /** Number of traits written. */ count: number; } /** * Export the current user-profile traits to a portable JSON file. * * Only non-superseded traits (those with `supersededBy IS NULL`) are * included. The output is a `UserProfileJson` envelope containing a * `$schema` URL and an `exportedAt` timestamp. * * @param path - Absolute output path. Defaults to * `~/.cleo/user_profile.json` (via `getDefaultUserProfilePath()`). * @returns Export result with path and count. */ export declare function exportUserProfile(path?: string): Promise; /** * Preview a transfer without writing any data. * Validates projects, permissions, and builds the manifest. */ export declare function previewTransfer(params: TransferParams): Promise; /** * Execute a cross-project task transfer. * * Pipeline: * 1. Validate source/target projects via nexusGetProject() * 2. Check permissions: read on source, write on target * 3. Read source tasks * 4. Build ExportPackage via exportSubtree/exportSingle * 5. Import into target via importFromPackage() * 6. Create bidirectional external_task_links * 7. Write nexus_audit_log entry * 8. If move mode: archive source tasks * 9. If transferBrain: copy brain observations */ export declare function executeTransfer(params: TransferParams): Promise; export declare function nexusShareSnapshotExport(projectRoot: string, outputPath?: string): Promise>; export declare function nexusShareSnapshotImport(projectRoot: string, inputPath: string): Promise>>>; export declare function nexusTransferPreview(params: TransferParams): Promise>; export declare function nexusTransferExecute(params: TransferParams): Promise>; //# sourceMappingURL=transfer.d.ts.map