import { type CapabilityCall, type LocalAppPreviewCreate, type LocalAppPreviewSession, type ExtensionCapabilityBinding } from '@xopcai/gateway-contract'; import { type CapabilityContext, type CapabilityDispatcher } from '../capabilities/runtime/dispatcher.js'; export interface PreviewSource { appId: string; extensionId: string; sourceHash: string; previewUrl: string; root: string; permissions: string[]; bindings: ExtensionCapabilityBinding[]; scenarioIds: string[]; } /** Preview leases are separate from installed releases and never grant production writes. */ export declare class LocalAppPreviewSessions { private readonly stateRoot; private readonly source; private readonly assertSource; private readonly leases; private readonly closingWorkers; constructor(stateRoot: () => string, source: (appId: string, sourceHash: string) => PreviewSource, assertSource: (appId: string, sourceHash: string) => void); create(appId: string, value: LocalAppPreviewCreate, caller: CapabilityContext): Promise; private current; describe(id: string, caller: CapabilityContext, dispatcher: CapabilityDispatcher): { session: { id: string; appId: string; extensionId: string; sourceHash: string; mode: "readonly" | "sample" | "isolated"; expiresAt: number; previewUrl: string; permissions: string[]; bindings: { id: "xopc.notes.get" | "xopc.notes.list" | "xopc.tasks.get" | "xopc.tasks.list" | "xopc.notes.create" | "xopc.notes.update" | "xopc.notes.append" | "xopc.agent.delegate" | "xopc.automations.list" | "xopc.automations.get" | "xopc.automations.run" | "xopc.automations.get_run" | "xopc.automations.cancel" | "xopc.automations.simulate" | "xopc.automations.propose" | "xopc.automations.get_proposal" | "xopc.automations.history" | "xopc.automations.run_events" | "xopc.projects.get" | "xopc.projects.list" | "xopc.projects.list_milestones" | "xopc.projects.list_updates" | "xopc.projects.update" | "xopc.projects.create_milestone" | "xopc.projects.update_milestone" | "xopc.projects.create_update" | "xopc.tasks.create" | "xopc.tasks.update" | "xopc.files.read" | "xopc.files.propose_export" | "xopc.connectors.describe" | "xopc.connectors.read" | "xopc.connectors.propose_write" | "xopc.apps.get_request"; majorVersion: number; descriptorDigest: string; }[]; }; capabilities: import("@xopcai/gateway-contract").CapabilityDescriptor[]; }; call(sessionId: string, id: string, call: CapabilityCall, caller: CapabilityContext, dispatcher: CapabilityDispatcher): Promise<{ status: "succeeded"; releaseId: string; data: unknown; }>; storage(id: string, caller: CapabilityContext, method: string, key?: string, value?: unknown): unknown; remove(id: string, caller: CapabilityContext): void; revokeApp(appId: string): void; close(): Promise; private revoke; private rpc; }