export interface ParsedAssetSpec { id: string; kind: 'image' | 'video' | 'audio' | 'subtitle' | 'other'; path: string; sceneIndex?: number; backend?: string; } /** * The five asset kinds the pipeline understands, in report order. An unknown * kind used to be COERCED to `other`, which let `--asset "bogus:/tmp/x.png"` * write a manifest entry and flip readiness to ready — the fabricated-entry * hole a fresh-install test walked straight through. Unknown kinds now fail. */ export declare const ASSET_KINDS: readonly ["image", "video", "audio", "subtitle", "other"]; /** * True when an asset path is a URI/URL rather than a local file path. Callers * that check a path exists on disk must skip these — an `Asset://` avatar URI * or an `https://` rendition has no local file to stat. */ export declare function isSchemeAssetPath(path: string): boolean; /** * Parse a `--asset kind:path[:sceneIndex][:backend]` spec. The path may be a * local file path OR a URL / `Asset://` URI whose internal colons must survive. * Local paths keep the original positional split (byte-identical behavior); * scheme paths peel the trailing `:sceneIndex[:backend]` from the end instead. */ export declare function parseAssetSpec(raw: string): ParsedAssetSpec; /** * Anchor a local asset path at the door. `video assets` checks a path exists * against the CURRENT directory and the transports read the same string from * wherever a later command happens to run, while the run contract measures * reference bytes against the PROJECT directory — so a path given relative to * the current directory uploaded fine and was frozen as `missing` forever. An * absolute path means one file to every reader. `resolve`, not `realpath`: * `migrate-home` leaves symlinks precisely so old absolute paths keep working. * The id is rebuilt because it embeds the path (`${kind}-${path}`), which is * also the form `execution-status` mints for an on-disk keyframe, so the two * now merge instead of listing one file twice. Scheme paths name remote objects. */ export declare function absolutiseAssetSpec(spec: ParsedAssetSpec, cwd?: string): ParsedAssetSpec; /** * The read-side half, for manifests already on disk: a relative entry that * exists under the project directory (a stock import records * `assets/stock/...`) is what the byte measurement resolves, so the transport * is handed that same file. Anything else is returned untouched — an older * manifest holding a path relative to some other directory keeps reading the * way it always did rather than being pointed at a file that is not there. */ export declare function anchorManifestAssetPath(projectDir: string, path: string): string; /** * A prompt packet's references, anchored the same way. A packet that is ready * supplies the scene's reference paths itself (the manifest's image entries are * set aside), and shipped packets hold paths as they were typed, so without * this the byte measurement read the project file while the upload read * whatever sat at that string under the current directory. One function for the * render and the run dashboard, so the two cannot disagree about a path. */ export declare function anchorPacketReferences; }>(projectDir: string, packet: T): T; /** * A local path typed on the command line, turned into the one absolute file it * names. People type these three ways — relative to where they are, to the * project (`assets/storyboard-grid.png`) and to the workspace * (`projects//assets/storyboard-grid.png`, the documented form) — so each * base is tried. Exactly one may hold the file; a file in none of them is * refused, naming every place that was looked, and so is a string that names a * different file under two bases: a path recorded * `ready` for a file that is not there is a hole in the gate before a paid * render. Scheme paths pass through untouched. */ /** The three bases a typed path is tried against, in order: where the command ran, the project, the workspace. */ export declare function typedPathBases(projectDir: string, workspaceRoot: string, cwd?: string): string[]; export declare function resolveTypedLocalPath(raw: string, flag: string, bases: string[]): string; //# sourceMappingURL=asset-spec.d.ts.map