/**
 * Delete-time asset impact (assets-referenced-not-owned, Phase 2).
 *
 * Deleting an entry never destroys assets — but it CAN orphan them: an asset
 * referenced solely by the entry being deleted has no other home in any body.
 * The delete prompt offers exactly those for optional deletion. This service
 * computes the offer set:
 *
 *   - The entry's embedded assets (live editor body when open, else disk),
 *     restricted to index-tracked rows (only those are deletable by id).
 *   - `solelyReferenced` — NO other entry in the WORKSPACE references the
 *     asset. The scan is LIVE-RECONCILED (eng review D1): for entries with an
 *     open editor doc, the live Y.Doc body REPLACES the disk body (a reference
 *     just added in an editor blocks the offer; one just removed enables it).
 *     Disk frontmatter is always scanned (not editable live). The scan covers
 *     ALL repos — including ones the caller can't read — but reveals only the
 *     boolean (shown as "used elsewhere", never where).
 *   - `canDelete` — per-asset permission: write access to the ASSET's folder
 *     plus the workspace-store uploader/owner rule. Embedding an asset never
 *     implies delete rights.
 *
 * Fail-keep: the scan is budgeted (eng review: cap/timeout, never delete on
 * partial reference info). On budget overrun `partial` is true and every
 * asset reports solelyReferenced=false — the prompt then offers nothing.
 */
import type { WorkspaceManager } from '../core/workspace-manager.js';
import type { AuthService, AuthUser } from './auth-service.js';
import type { EntityType } from '../core/validation.js';
export interface DeleteImpactAsset {
    assetId: string;
    filename: string;
    /** Display name (the index row's own name, falling back to the filename). */
    name: string;
    url: string;
    mediaType: string;
    /** The asset's home folder — needed by the client to delete by id. */
    repo: string;
    /** True when NO other entry (live-reconciled) references this asset. Only
     *  solely-referenced assets are offered for deletion. Forced false when
     *  `partial` is set. */
    solelyReferenced: boolean;
    /** Per-asset permission verdict (folder write access + the workspace-store
     *  uploader/owner rule). */
    canDelete: boolean;
    /** Why delete is unavailable, or null when allowed. */
    denialReason: string | null;
}
export interface AssetDeleteImpact {
    assets: DeleteImpactAsset[];
    /** True when the reference scan hit its budget before covering the
     *  workspace — solelyReferenced is then false everywhere (keep-all). */
    partial: boolean;
}
export declare function computeAssetDeleteImpact(opts: {
    workspaceManager: WorkspaceManager;
    authService: AuthService;
    user: AuthUser | undefined;
    repo: string;
    entityType: EntityType;
    entityId: string;
    /** Test hook — overrides the scan budget. */
    budgetMs?: number;
}): Promise<AssetDeleteImpact>;
