import type { DomindsAppDynamicToolsetsContext, DomindsAppReminderOwnerApplyContext, DomindsAppReminderOwnerRenderContext, DomindsAppReminderOwnerUpdateContext, DomindsAppReminderRenderedMessage, DomindsAppRunControlContext, DomindsAppRunControlResult, DomindsKernelEndpoint } from '@longrun-ai/kernel/app-host-contract';
import type { DomindsAppHostReminderUpdateResult, DomindsAppHostToolResult, DomindsAppInstallJson, DomindsAppReminderApplyRequest, DomindsAppReminderApplyResult } from '@longrun-ai/kernel/app-json';
import type { ToolArguments } from '../tool';
import type { AppsHostMessageToKernel } from './ipc-types';
export type EnabledAppForHost = Readonly<{
    appId: string;
    runtimePort: number | null;
    installJson: DomindsAppInstallJson;
    hostSourceVersion: string | null;
}>;
export type AppsHostClient = Readonly<{
    callTool: (toolName: string, args: ToolArguments, ctx: Readonly<{
        dialogId: string;
        mainDialogId: string;
        agentId: string;
        taskDocPath: string;
        sessionSlug?: string;
        callerId: string;
    }>) => Promise<DomindsAppHostToolResult>;
    listDynamicToolsets: (ctx: DomindsAppDynamicToolsetsContext) => Promise<readonly string[]>;
    applyRunControl: (controlId: string, payload: DomindsAppRunControlContext) => Promise<DomindsAppRunControlResult>;
    applyReminder: (appId: string, ownerRef: string, request: DomindsAppReminderApplyRequest, ctx: DomindsAppReminderOwnerApplyContext) => Promise<DomindsAppReminderApplyResult>;
    updateReminder: (appId: string, ownerRef: string, ctx: DomindsAppReminderOwnerUpdateContext) => Promise<DomindsAppHostReminderUpdateResult>;
    renderReminder: (appId: string, ownerRef: string, ctx: DomindsAppReminderOwnerRenderContext) => Promise<DomindsAppReminderRenderedMessage>;
    shutdown: () => Promise<void>;
}>;
export type AppsHostReadyMessage = Extract<AppsHostMessageToKernel, {
    type: 'ready';
}>;
export declare function startAppsHost(params: {
    rtwsRootAbs: string;
    kernel: DomindsKernelEndpoint;
    apps: ReadonlyArray<EnabledAppForHost>;
}): Promise<Readonly<{
    client: AppsHostClient;
    ready: AppsHostReadyMessage;
}>>;
