import { type IncomingMessage, type ServerResponse } from "node:http";
export interface VisualizerServerOptions {
    workspaceRoot: string;
    runsRoot?: string;
    benchmarkLedgerPath?: string;
    port?: number;
    host?: string;
    configEditor?: VisualizerConfigEditor;
}
export interface VisualizerConfigDocument {
    path: string;
    relativePath: string;
    contents: string;
}
export interface VisualizerConfigPreviewSemantic {
    workflow?: string;
    selectedProfile?: string;
    selectedPolicyPreset?: string;
    selectedWorkflowVariant?: string;
    selectedAgentBindings: Record<string, string>;
    nodeAgents: Record<string, string>;
    disabledNodes: string[];
    policySummary: {
        executionMode: string;
        modelAccess: boolean;
        network: string;
        writes: string;
        deniedTools: string[];
        approvalTools: string[];
    };
}
export interface VisualizerConfigValidationSummary {
    valid: boolean;
    errors: string[];
}
export interface VisualizerConfigPreviewResult {
    path: string;
    previewHash: string;
    diff: string;
    summary: string;
    semantic?: VisualizerConfigPreviewSemantic;
    validation?: VisualizerConfigValidationSummary;
}
export interface VisualizerConfigSaveResult {
    path: string;
    validation?: VisualizerConfigValidationSummary;
}
export type VisualizerConfigTarget = "request" | "workflow-control" | "policy-presets" | "defaults" | "repo-fit";
export type VisualizerConfigFieldInput = "text" | "textarea" | "string-array" | "path-array" | "select" | "name-version-array" | "json";
export interface VisualizerConfigOption {
    label: string;
    value: string;
}
export interface VisualizerConfigFieldModel {
    key: string;
    label: string;
    input: VisualizerConfigFieldInput;
    required: boolean;
    helpText?: string;
    options?: VisualizerConfigOption[];
    value: unknown;
}
export interface VisualizerConfigBindingSelectionModel {
    key: string;
    label: string;
    description?: string;
    nodeIds: string[];
    selectedAgent?: string;
    options: VisualizerConfigOption[];
}
export interface VisualizerConfigProfileEditorModel {
    name: string;
    description?: string;
    allowedPolicyPresets: string[];
    allowedWorkflowVariants: string[];
    requestFields: VisualizerConfigFieldModel[];
}
export interface VisualizerConfigWorkflowVariantEditorModel {
    name: string;
    description?: string;
    disabledNodes: string[];
    nodeAgentOverrides: Array<{
        nodeId: string;
        agent: string;
    }>;
}
export interface VisualizerConfigAgentBindingEditorModel {
    name: string;
    description?: string;
    nodeIds: string[];
    allowedAgents: string[];
    defaultAgent?: string;
}
export interface VisualizerConfigPolicyPresetEditorModel {
    name: string;
    description?: string;
    defaults: {
        executionMode?: string;
        modelAccess?: boolean;
        network?: string;
        writes?: string;
    };
    blockedPaths: string[];
    pluginAllowedTiers: string[];
    pluginAllowedSources: string[];
    requireReviewed?: boolean;
    tools: Array<{
        toolName: string;
        effect: string;
    }>;
}
export interface VisualizerConfigWorkflowDefaultEditorModel {
    workflow: string;
    profile?: string;
    policyPreset?: string;
    workflowVariant?: string;
    profileOptions: VisualizerConfigOption[];
    policyPresetOptions: VisualizerConfigOption[];
    workflowVariantOptions: VisualizerConfigOption[];
}
export interface VisualizerConfigRepoFitEditorModel {
    recommendedProfileId?: string;
    selectedProfileId?: string;
    adoption: string;
    profileOptions: VisualizerConfigOption[];
    adoptionOptions: VisualizerConfigOption[];
    structureFields: VisualizerConfigFieldModel[];
    expectationFields: VisualizerConfigFieldModel[];
    conventionFields: VisualizerConfigFieldModel[];
    comparisonNotes: string[];
    inferredFields: string[];
    confirmedFields: string[];
    unresolvedFields: string[];
}
export interface VisualizerConfigEditorModel {
    workflow?: string;
    target: VisualizerConfigTarget;
    path: string;
    relativePath: string;
    editingEnabled: boolean;
    rawDocument: string;
    loadError?: string;
    title: string;
    intro: string;
    nextStep: string;
    request?: {
        selectedProfile: string;
        selectedPolicyPreset?: string;
        selectedWorkflowVariant: string;
        profileOptions: VisualizerConfigOption[];
        policyPresetOptions: VisualizerConfigOption[];
        workflowVariantOptions: VisualizerConfigOption[];
        profileRules: Array<{
            profile: string;
            allowedPolicyPresets: string[];
            allowedWorkflowVariants: string[];
        }>;
        fields: VisualizerConfigFieldModel[];
        agentBindings: VisualizerConfigBindingSelectionModel[];
    };
    workflowControl?: {
        requestFieldDefinitions: Array<Omit<VisualizerConfigFieldModel, "value">>;
        profiles: VisualizerConfigProfileEditorModel[];
        fieldMetadata: Array<{
            path: string;
            label: string;
            helpText?: string;
            input: VisualizerConfigFieldInput;
            required: boolean;
            options: VisualizerConfigOption[];
        }>;
        workflowVariants: VisualizerConfigWorkflowVariantEditorModel[];
        allowedPolicyPresets: string[];
        policyPresetOptions: VisualizerConfigOption[];
        agentBindings: VisualizerConfigAgentBindingEditorModel[];
        nodeOptions: VisualizerConfigOption[];
        nodeAgentOptions: Record<string, VisualizerConfigOption[]>;
    };
    policyPresets?: {
        presets: VisualizerConfigPolicyPresetEditorModel[];
        availableTools: VisualizerConfigOption[];
        toolEffectOptions: VisualizerConfigOption[];
        tierOptions: VisualizerConfigOption[];
        sourceOptions: VisualizerConfigOption[];
        executionModeOptions: VisualizerConfigOption[];
        permissionOptions: VisualizerConfigOption[];
    };
    defaults?: {
        workflows: VisualizerConfigWorkflowDefaultEditorModel[];
    };
    repoFit?: VisualizerConfigRepoFitEditorModel;
}
export interface VisualizerConfigRenderResult {
    path: string;
    draft: string;
}
export interface VisualizerConfigEditor {
    editingEnabled: boolean;
    loadEditorModel?: (input: {
        workflow?: string;
        target: VisualizerConfigTarget;
    }) => Promise<VisualizerConfigEditorModel> | VisualizerConfigEditorModel;
    renderDocument?: (input: {
        workflow?: string;
        target: VisualizerConfigTarget;
        state: unknown;
    }) => Promise<VisualizerConfigRenderResult> | VisualizerConfigRenderResult;
    previewDocument?: (input: {
        workflow?: string;
        target: string;
        draft: string;
    }) => Promise<VisualizerConfigPreviewResult> | VisualizerConfigPreviewResult;
    saveDocument?: (input: {
        workflow?: string;
        target: string;
        draft: string;
        previewHash: string;
        approval: string;
    }) => Promise<VisualizerConfigSaveResult> | VisualizerConfigSaveResult;
}
export declare function createVisualizerServer(options: VisualizerServerOptions): import("http").Server<typeof IncomingMessage, typeof ServerResponse>;
export declare function startVisualizerServer(options: VisualizerServerOptions): Promise<{
    serverUrl: string;
    runsRoot: string;
    close: () => Promise<void>;
}>;
export declare function readVisualizerSummary(workspaceRoot: string, runsRoot?: string): {
    runsRoot: string;
    runCount: number;
    benchmarkCount: number;
};
export declare function parseVisualizerServerArgs(argv: readonly string[]): {
    host?: string;
    port?: number;
    runsRoot?: string;
    benchmarkLedgerPath?: string;
};
export { createOutcomesExportDocument, listAvailableArtifactKinds, listAvailableStatuses, listAvailableWorkflows, loadBenchmarkIndexView, loadOutcomesDashboardView, loadRunDetailView, loadRunsIndexView, parseOutcomesFilters, resolveBenchmarkLedgerPath, resolveRunsRoot, toRelativeDisplayPath } from "./data.js";
export type { OutcomesExportDocument, RunFilters } from "./data.js";
export { renderOutcomesExportMarkdown } from "./html.js";
//# sourceMappingURL=index.d.ts.map