import type { OmkMode } from "./mode-preset.js";
import type { OmkRuntimeScope } from "./resource-profile.js";
import type { ExecutionPromptPolicy, ExecutionSelectionSource } from "../contracts/orchestration.js";
export type ChatAgentModelVariantProfile = Record<string, string>;
export type ChatAgentModelVariantProfiles = Record<string, ChatAgentModelVariantProfile>;
export interface ChatAgentModeResources {
    workers: string;
    maxStepsPerTurn?: string;
    resourceProfile?: string;
    approvalPolicy?: string;
    authorityProvider?: string;
    providerPolicy?: string;
    providerModel?: string;
    modelVariantProfiles?: ChatAgentModelVariantProfiles;
    ensembleDefaultEnabled?: boolean;
    executionPrompt?: ExecutionPromptPolicy;
    executionPromptSource?: ExecutionSelectionSource;
    mcpScope: OmkRuntimeScope;
    skillsScope: OmkRuntimeScope;
    hooksScope?: OmkRuntimeScope;
    mcpNames: string[];
    skillNames: string[];
    hookNames: string[];
}
export interface PrepareChatAgentModeInput {
    root: string;
    runId: string;
    baseAgentFile: string;
    basePromptPath: string;
    mode: OmkMode;
    resources: ChatAgentModeResources;
}
export interface PreparedChatAgentMode {
    agentFile: string;
    promptPath: string;
    contractPath: string;
    harnessPath: string;
}
export interface ChatAgentHarnessManifest {
    schemaVersion: 1;
    runId: string;
    mode: OmkMode;
    resources: {
        workers: string;
        workerBudget: number;
        workerCap: number;
        maxStepsPerTurn: string;
        resourceProfile: string;
        approvalPolicy: string;
        providerPolicy: string;
        authorityProvider: string;
        providerModel: string;
        variantProfile: {
            provider: string;
            model: string;
            source: string;
            variants: Record<string, string>;
        };
        ensembleDefault: "enabled" | "disabled";
        scopes: {
            mcp: string;
            skills: string;
            hooks: string;
        };
        active: {
            mcp: string[];
            skills: string[];
            hooks: string[];
        };
    };
    virtualDag: {
        flow: "chat-agent-parallel-harness";
        nodes: ChatAgentHarnessNode[];
        failurePolicy: {
            optionalLanes: string[];
            blockingLanes: string[];
        };
    };
    capabilityPolicy: {
        maxCapabilityAgents: number;
        useMcp: boolean;
        useSkills: boolean;
        useHooks: boolean;
        mcpNames: string[];
        skillNames: string[];
        hookNames: string[];
    };
    memoryRecall: {
        graphPath: string;
        summaryPath: string;
        jsonPath: string;
        initialContext: "enabled";
        requiredBeforePlanning: boolean;
    };
    execution: {
        policy: ExecutionPromptPolicy;
        source: ExecutionSelectionSource;
        allowed: ExecutionPromptPolicy[];
        promptChoices: ["parallel", "sequential", "plan-only"];
        chatModeExempt: boolean;
    };
    hardGateContract: {
        requiresPromptBeforeNonTrivialTTY: boolean;
        nonTTYAutoParallelForComplex: boolean;
        parallelKeywords: string[];
        sequentialKeywords: string[];
        planOnlyKeywords: string[];
    };
    laneCapabilityAssignments: ChatAgentLaneCapabilityAssignment[];
    gates: string[];
    authority: string[];
    stopConditions: string[];
}
export interface ChatAgentHarnessNode {
    id: string;
    role: string;
    source: "bootstrap" | "coordinator" | "provider" | "capability" | "worker" | "review" | "quality" | "security" | "design";
    dependsOn: string[];
    required: boolean;
    condition?: string;
    assignedProvider?: string;
    candidateProviders?: string[];
    assignedModel?: string;
    assignedVariant?: string;
    assignedProviderAuthority?: "authority" | "advisory" | "read-only";
    assignedProviderCapabilities?: string[];
    assignedCapabilities?: {
        skills: string[];
        mcp: string[];
        hooks: string[];
    };
}
export interface ChatAgentLaneCapabilityAssignment {
    laneId: "explorer" | "researcher" | "vision-debugger" | "planner" | "coder" | "reviewer" | "qa" | "security";
    role: string;
    condition: string;
    assignedProvider: string;
    candidateProviders: string[];
    assignedModel: string;
    assignedVariant: string;
    assignedCapabilities: string[];
    skills: string[];
    hooks: string[];
    mcpServers: string[];
}
export declare function parseChatAgentModelVariantProfiles(raw: string | undefined): ChatAgentModelVariantProfiles | undefined;
export declare function readChatAgentModelVariantProfilesFromEnv(env?: Record<string, string | undefined>): ChatAgentModelVariantProfiles | undefined;
export declare function buildChatAgentModeContract(input: {
    mode: OmkMode;
    runId: string;
    resources: ChatAgentModeResources;
}): string;
export declare function buildChatAgentHarnessManifest(input: {
    mode: OmkMode;
    runId: string;
    resources: ChatAgentModeResources;
}): ChatAgentHarnessManifest;
export declare function buildParallelAlgorithmInjection(resources: ChatAgentModeResources): {
    text: string;
    workerCap: number;
    workerLanes: number;
    capabilityLanes: number;
    providerLanes: number;
};
export declare function prepareChatAgentModeAgent(input: PrepareChatAgentModeInput): Promise<PreparedChatAgentMode>;
export declare function buildChatAgentRuntimeMcpAllowlist(input: {
    mode: OmkMode;
    resources: ChatAgentModeResources;
}): string[] | undefined;
export declare function buildChatAgentRuntimeSkillAllowlist(input: {
    mode: OmkMode;
    resources: ChatAgentModeResources;
}): string[] | undefined;
