/**
 * @fileoverview Per-canvas handle returned by {@link DataCanvas.acquire}. Holds
 * `(canvasId, tenantId)` and routes each operation through the registry's
 * TTL-touch + tenant validation gate before delegating to the provider.
 * @module src/services/canvas/core/CanvasInstance
 */
import type { RequestContextLike } from '../../../utils/internal/requestContext.js';
import type { DescribeOptions, ExportOptions, ExportResult, ExportTarget, ImportFromOptions, QueryOptions, QueryResult, RegisterRows, RegisterTableOptions, RegisterTableResult, RegisterViewOptions, RegisterViewResult, TableInfo } from '../types.js';
import type { CanvasRegistry } from './CanvasRegistry.js';
import type { IDataCanvasProvider } from './IDataCanvasProvider.js';
/** Handle bound to a single canvas. Returned from {@link DataCanvas.acquire}. */
export declare class CanvasInstance {
    /** Opaque canvas token. Surface this to callers; share it across agents. */
    readonly canvasId: string;
    /** Tenant the canvas is bound to. Resolved by the registry from the request context. */
    readonly tenantId: string;
    private readonly registry;
    private readonly provider;
    private readonly context;
    /** True when {@link DataCanvas.acquire} created this canvas during the current call. */
    readonly isNew: boolean;
    /** ISO 8601 expiry after the most recent operation extended the sliding TTL. */
    expiresAt: string;
    constructor(
    /** Opaque canvas token. Surface this to callers; share it across agents. */
    canvasId: string, 
    /** Tenant the canvas is bound to. Resolved by the registry from the request context. */
    tenantId: string, isNew: boolean, expiresAt: string, registry: CanvasRegistry, provider: IDataCanvasProvider, context: RequestContextLike);
    /** Register a table on the canvas. */
    registerTable(name: string, rows: RegisterRows, options?: RegisterTableOptions): Promise<RegisterTableResult>;
    /**
     * Register a SQL view on the canvas. `selectSql` runs through the same
     * read-only gate `query()` uses; queries against the view inherit normal
     * gate enforcement at execution time.
     */
    registerView(name: string, selectSql: string, options?: RegisterViewOptions): Promise<RegisterViewResult>;
    /**
     * Copy a table from another canvas the caller controls. The source canvas
     * must belong to the caller's tenant — the registry validates that before
     * the provider sees either id. Defaults `asName` to the source name.
     */
    importFrom(sourceCanvasId: string, sourceTableName: string, options?: ImportFromOptions): Promise<RegisterTableResult>;
    /** Run a SQL query against the canvas. */
    query(sql: string, options?: QueryOptions): Promise<QueryResult>;
    /** Export a canvas table to a path or stream target. */
    export(tableName: string, target: ExportTarget, options?: ExportOptions): Promise<ExportResult>;
    /** Describe one or all canvas tables. Per-table `expiresAt` is injected for tables with a TTL. */
    describe(options?: DescribeOptions): Promise<TableInfo[]>;
    /** Drop a single canvas table. Returns `true` when found and removed. */
    drop(name: string): Promise<boolean>;
    /** Drop every table on the canvas. Returns the number dropped. */
    clear(): Promise<number>;
}
//# sourceMappingURL=CanvasInstance.d.ts.map