import type { CliConfig, LocalConnectorEntry } from "../core/index.js"; import { resolveLocalLaunch as resolveLocalLaunchDefault } from "./local.js"; import { type PdppPin } from "./pins.js"; export type { LocalConnectorEntry } from "../core/index.js"; /** What `vana connectors add|list|remove` and the runtime need from outside. */ export interface LocalConnectorDeps { readCliConfig: () => Promise; updateCliConfig: (patch: Partial) => Promise; resolveLocalLaunch: typeof resolveLocalLaunchDefault; /** The checkout's commit, or undefined when it is not a git repository. */ gitHead: (dir: string) => string | undefined; now: () => Date; } export declare const defaultLocalConnectorDeps: LocalConnectorDeps; /** Every saved local connector, keyed by connector key. */ export declare function readLocalConnectors(deps?: Partial): Promise>; /** The saved local connector for a source, if any. */ export declare function findLocalConnector(source: string, deps?: Partial): Promise; /** Why `vana connectors add` refuses a key without `--force`. */ export type LocalConnectorConflict = "pinned" | "legacy"; export declare class LocalConnectorConflictError extends Error { readonly key: string; readonly conflicts: LocalConnectorConflict[]; constructor(key: string, conflicts: LocalConnectorConflict[]); } export interface AddLocalConnectorOptions { /** Register even when the key collides with a pinned or legacy connector. */ force?: boolean; /** * Ids the catalog already lists without local entries; a match is a * `legacy` conflict. Pins are checked here regardless. */ catalogIds?: Iterable; } export interface AddLocalConnectorResult { key: string; entry: LocalConnectorEntry; /** Conflicts that `--force` overrode; empty when there were none. */ conflicts: LocalConnectorConflict[]; /** True when the key was already registered and its entry was replaced. */ replaced: boolean; } /** * Validate a checkout for `key` the same way a run would, then save it. * The stored path is absolute so a schedule or a detached run started * from any working directory finds the same code. */ export declare function addLocalConnector(rawKey: string, dir: string, options?: AddLocalConnectorOptions, deps?: Partial): Promise; /** Forget a saved local connector. Returns false when none was saved. */ export declare function removeLocalConnector(rawKey: string, deps?: Partial): Promise; /** * Where a Collection Profile connector for a source comes from, in the * order a run consults them: an explicit `--from`, then the saved local * entry, then the pinned artifact. */ export type PdppSourceResolution = { kind: "from"; path: string; } | { kind: "local"; path: string; entry: LocalConnectorEntry; } | { kind: "pinned"; pin: PdppPin; }; export declare function resolvePdppSource(source: string, options?: { from?: string; }, deps?: Partial): Promise; //# sourceMappingURL=local-connectors.d.ts.map