import type { CapabilityCatalogItem, UpdateSessionToolPolicyRequest } from "@opengeni/sdk"; import type { OpenGeniBrowserClient as OpenGeniClient } from "@opengeni/sdk/browser"; import { type OpenGeniText } from "./messages/runtime.js"; /** Catalog tool discovery may be lazy; selecting the installed server does not * require its individual tool inventory to have been fetched. */ export declare function sessionCapabilityTools(item: CapabilityCatalogItem): import("@opengeni/sdk").ToolRef[]; /** A connection never resets the human's existing tool selection. Default-mode * sessions discover newly enabled servers at admission; explicit/inherited * policies add only this reviewed capability, with the existing CAS fence. */ export declare function attachSessionCapability(t: OpenGeniText, client: OpenGeniClient, workspaceId: string, sessionId: string, item: CapabilityCatalogItem, stillCurrent?: () => boolean): Promise; /** Read-only review. Hosts must show ancestor changes and obtain a separate * explicit click before applying. This plan is never authorization. */ export type SessionCapabilityAccessPlan = { workspaceId: string; sessionId: string; capabilityId: string; sessions: Array<{ id: string; title: string | null; parentSessionId: string | null; toolPolicyVersion: number; request: UpdateSessionToolPolicyRequest | null; }>; }; export declare function prepareSessionCapabilityAccess(t: OpenGeniText, client: OpenGeniClient, workspaceId: string, sessionId: string, item: CapabilityCatalogItem, stillCurrent?: () => boolean): Promise; /** Preflight the entire review, then apply ordinary CAS-fenced API writes root * first. A partial failure may leave approved ancestor changes committed; never * claim success or roll back another person's edits. Prepare a new review. */ export declare function applySessionCapabilityAccess(t: OpenGeniText, client: OpenGeniClient, plan: SessionCapabilityAccessPlan, stillCurrent?: () => boolean): Promise; /** Native OAuth callbacks have already saved the provider connection. Finish * the separate, version-fenced session tool selection before reporting success. */ export declare function completeSessionCapabilityOAuth(t: OpenGeniText, client: OpenGeniClient, workspaceId: string, sessionId: string, capabilityId: string | null): Promise;