/** Terminal image- and file-attachment adapter over the Harness durable attachment service. */ import type { AttachmentStore, ImageMediaType } from '@deepseek-ai/dsh-attachment'; import type { FileBlock, ImageBlock } from '@deepseek-ai/dsh-llm'; /** A validated path retained in the editor until submission persists it. */ export interface ImagePathInspection { readonly path: string; readonly name: string; readonly mediaType: ImageMediaType; readonly bytes: number; } /** A validated non-image file path retained the same way (0.1.5 file blocks). */ export interface FilePathInspection { readonly path: string; readonly name: string; readonly bytes: number; } /** * Terminal-side file admission bounds. Upstream exposes image limits through * the attachment service but no file limits (files ride verbatim storage); * these keep a dragged file from silently ingesting a disk-sized blob and * bound one message the way the image batch is bounded. */ export declare const MAX_FILE_BYTES: number; export declare const MAX_FILES_PER_MESSAGE = 8; /** Detect the supported encoded raster formats from bytes, never from a path suffix. */ export declare function detectImageMediaType(data: Uint8Array): ImageMediaType | undefined; /** Whether a path-like token is worth probing as an image attachment. */ export declare function looksLikeImagePath(path: string): boolean; /** Strip one layer of ASCII or Unicode quotes and shell-escaped spaces. */ export declare function unwrapDroppedPath(token: string): string; /** Absolute/relative drop with a dotted leaf — including unquoted spaces. */ export declare function looksLikeFilesystemDrop(path: string): boolean; /** * A composer draft that is a filesystem path, not a slash command. * `/usage` stays a command; `/Users/foo.png` and `C:\temp\a.png` are drops. */ export declare function looksLikePathDraft(value: string): boolean; /** * Parse a paste or file-drop into image and file paths: image-suffixed * tokens stay images, other path-shaped tokens ride as file attachments * (0.1.5 file blocks), and anything that is neither leaves both empty — * the caller then treats the paste as plain text. * * File tokens are held to an absolute-path-with-shape bar (drive/backslash * or a dotted leaf after a separator): a dropped terminal path always * carries one of those, while prose, slash commands, and option flags never * do. A POSIX absolute path without a dotted leaf falls through as text — * the @ mention route still attaches such files deliberately. */ export declare function parsePastedAttachmentPaths(input: string): { readonly images: readonly string[]; readonly files: readonly string[]; }; /** Validate path, byte size and encoded signature without writing an attachment object. */ export declare function inspectImagePaths(paths: readonly string[], attachments: AttachmentStore | undefined, cwd?: string): Promise; /** Read, validate, and persist an ordered image path list as model content blocks. */ export declare function saveImagePaths(paths: readonly string[], attachments: AttachmentStore | undefined, signal?: AbortSignal): Promise; /** Validate path and byte size for non-image file attachments without writing. */ export declare function inspectFilePaths(paths: readonly string[], attachments: AttachmentStore | undefined, cwd?: string): Promise; /** Read and persist an ordered non-image file path list as model file blocks. */ export declare function saveFilePaths(paths: readonly string[], attachments: AttachmentStore | undefined, signal?: AbortSignal): Promise;