import type { Api } from "@cargo-ai/api"; import type { ResourceKind, ResourceNode } from "../core.js"; import type { StateBackend } from "./backend/index.js"; export type ImportResult = { kind: ResourceKind; outputs: Record; }; /** * Import the live resource `uuid` as the code resource `id` (e.g. "agent:sdr"). * Loads the repo to confirm the id exists and capture its current hash, verifies * the live resource is reachable, then writes/overwrites its state entry. */ export declare function importResource(root: string, api: Api, workspaceUuid: string, id: string, uuid: string, options?: { nodes?: readonly ResourceNode[]; backend?: StateBackend; }): Promise; export type AdoptTarget = { id: string; uuid: string; }; /** * Batch import for `cdk pull` adoption: the same per-resource contract as * importResource, but the graph is compiled once, the workspace listings * importOutputs consults are fetched at most once, resources are processed * concurrently, and the state file is written once at the end — so adoption is * atomic (a mid-batch failure commits nothing) instead of N read/fsync cycles. */ export declare function adoptResources(root: string, api: Api, workspaceUuid: string, targets: readonly AdoptTarget[], nodes: readonly ResourceNode[], backend?: StateBackend): Promise; //# sourceMappingURL=import.d.ts.map