/**
 * Promote a conversation-scratch file (image OR doc) into a curated,
 * library-visible asset (composer-vision-attach / E2a "Save to library",
 * generalized to any file in PR3).
 *
 * Uploaded scratch files live in the `chat-scratch/{sessionId}/{fileId}/{filename}`
 * keyspace with NO asset-index row — they're ephemeral conversation context,
 * not catalogued assets (see the E2a section of
 * `~/.claude/plans/composer-vision-attach.md`). This service is the deliberate
 * retention path: it copies the scratch bytes into a FREE-STANDING asset (new
 * immutable assetId + index row + caption trigger), exactly like the global
 * asset-manager upload, so the result shows up in the asset library.
 *
 * Default destination = the reserved workspace-wide "Assets" folder
 * (`workspace-assets`), which is lazily auto-provisioned and undeletable — so
 * unlike a per-user personal folder it is ALWAYS resolvable and writable by any
 * member. The user can then move it into a specific folder via the existing
 * asset-manager move UI. A caller may override with an explicit `targetRepo`
 * (the agent tool exposes this as a `folder` argument); we verify write access
 * to it first.
 *
 * The scratch copy is intentionally LEFT in place — it remains the
 * conversation's vision context and is cleaned up when the chat is deleted.
 */
import type { WorkspaceManager } from '../core/workspace-manager.js';
import type { ChatSessionService } from './chat-session-service.js';
import type { AuthService, AuthUser } from './auth-service.js';
/** Typed failure so callers (HTTP route / agent tool) can map to the right
 *  status / message instead of string-matching. */
export type PromoteScratchErrorCode = 'SCRATCH_NOT_FOUND' | 'NO_WRITE_ACCESS' | 'NOT_SAVABLE' | 'STORAGE_UNAVAILABLE';
export declare class PromoteScratchError extends Error {
    code: PromoteScratchErrorCode;
    constructor(code: PromoteScratchErrorCode, message: string);
}
export interface PromoteScratchResult {
    assetId: string;
    /** Canonical immutable public URL of the new asset. */
    url: string;
    /** Folder the asset now lives in. */
    repo: string;
    filename: string;
    /** Human display name recorded on the asset row. */
    displayName: string;
}
/**
 * Promote one scratch file (image OR doc) to a free-standing asset. Returns the
 * new asset's coordinates. Throws {@link PromoteScratchError} on the typed
 * failures above.
 */
export declare function promoteScratchFileToAssets(workspaceManager: WorkspaceManager, chatSessionService: ChatSessionService, authService: AuthService, args: {
    sessionId: string;
    fileId: string;
    /** The authenticated caller (owner check + write-access check). */
    user: AuthUser;
    /** Optional explicit destination folder; defaults to the Assets store. */
    targetRepo?: string;
}): Promise<PromoteScratchResult>;
