import { type UserMessage } from "@deepseek-ai/dsh-llm"; import Schema from "@deepseek-ai/schemastery"; import { type StudioTextReference } from "./lib/studio-references.ts"; export declare const name = "croco-document-drop"; export declare const inject: string[]; declare const ALLOWED_EXTENSIONS: readonly [".txt", ".md", ".json", ".pdf"]; export interface Config { maxFilesPerDrop: number; maxFileBytes: number; maxReferenceChars: number; attachmentDirectory: string; } export declare const Config: Schema; export interface EncodedDocument { name: string; dataBase64: string; } export interface StagedDocument { id: string; name: string; extension: typeof ALLOWED_EXTENSIONS[number]; size: number; path: string; } /** Retain one Composer reference behind an opaque UUID until its message is admitted. */ export declare function stageStudioTextReference(sessionId: string, referenceId: string, value: StudioTextReference, maxReferenceChars: number): void; /** Forget one unsent or failed Studio reference. */ export declare function removeStagedStudioTextReference(sessionId: string, referenceId: string): void; /** Copy submitted Studio references into durable metadata and adjacent model context. */ export declare function attachStudioTextReferences(messages: readonly UserMessage[], sessionId: string): UserMessage[]; /** Release references after their complete Agent turn can no longer consume them. */ export declare function removeTurnStudioTextReferences(sessionId: string): void; /** Replace opaque document ids with durable user-source metadata. */ export declare function attachStagedDocuments(messages: readonly UserMessage[], sessionId: string): UserMessage[]; /** Stage one batch under a unique directory in the active Session workspace. */ export declare function stageDocuments(cwd: string, sessionId: string, inputs: readonly EncodedDocument[], config: Config): Promise<{ batchId: string; documents: StagedDocument[]; }>; /** Remove one unsent staged document and its empty batch directory. */ export declare function removeStagedDocument(sessionId: string, batchId: string, documentId: string): Promise; /** Register workspace staging routes consumed by Composer attachment previews. */ export declare function apply(ctx: any, config: Config): void; export {};