export type EphemeralProcedureAuthor = "model" | "runtime";
export type EphemeralProcedureExecutionMode = "serial" | "parallel" | "mixed";
export type EphemeralProcedureRiskLevel = "low" | "medium" | "high";
export type EphemeralProcedureResourceHints = {
    timeoutMs?: number;
    maxOutputBytes?: number;
    maxSteps?: number;
    metadata?: Readonly<Record<string, unknown>>;
};
export type EphemeralProcedureExpectedOutput = {
    outputRef: string;
    kind?: "text" | "json" | "artifact" | "observation" | (string & {});
    description?: string;
};
export type EphemeralProcedureStep = {
    stepId: string;
    baseToolId: string;
    input: Readonly<Record<string, unknown>>;
    dependsOn: readonly string[];
    riskLevel: EphemeralProcedureRiskLevel;
    resourceHints: EphemeralProcedureResourceHints;
    outputRef: string;
};
export type EphemeralProcedureStepExecutionStatus = "ready" | "waitingDependency" | "waitingApproval" | "running" | "completed" | "failed" | "fallback";
export type EphemeralProcedurePartialStatus = "ready" | "partialWaiting" | "partialCompleted" | "partialFailed" | "partialFallback" | "completed" | "failed";
export type EphemeralProcedureStepExecutionState = {
    stepId: string;
    baseToolId: string;
    status: EphemeralProcedureStepExecutionStatus;
    dependsOn: readonly string[];
    blockedBy: readonly string[];
    canContinueInParallel: boolean;
    mustUseBaseToolRegistry: true;
    riskLevel: EphemeralProcedureRiskLevel;
    outputRef: string;
    metadata: Readonly<Record<string, unknown>>;
};
export type EphemeralProcedureExecutionState = {
    procedureId: string;
    executionMode: EphemeralProcedureExecutionMode;
    partialStatus: EphemeralProcedurePartialStatus;
    steps: readonly EphemeralProcedureStepExecutionState[];
    readyStepIds: readonly string[];
    waitingStepIds: readonly string[];
    completedStepIds: readonly string[];
    failedStepIds: readonly string[];
    fallbackStepIds: readonly string[];
    registryInvocationRequired: true;
    metadata: Readonly<Record<string, unknown>>;
    publicSafe: true;
};
export type EphemeralProcedurePlan = {
    kind: "praxis.ephemeralProcedurePlan";
    procedureId: string;
    purpose: string;
    author: EphemeralProcedureAuthor;
    executionMode: EphemeralProcedureExecutionMode;
    steps: readonly EphemeralProcedureStep[];
    dependencies: readonly string[];
    requiredBaseTools: readonly string[];
    riskLevel: EphemeralProcedureRiskLevel;
    approval: {
        required: boolean;
        reason?: string;
    };
    resourceLimits: EphemeralProcedureResourceHints;
    expectedOutputs: readonly EphemeralProcedureExpectedOutput[];
    mergeObservationPolicy: "append" | "replace" | "summarize" | (string & {});
    metadata: Readonly<Record<string, unknown>>;
};
export type EphemeralProcedureValidationError = {
    code: "MISSING_PROCEDURE_ID" | "MISSING_PURPOSE" | "EMPTY_STEPS" | "MISSING_BASE_TOOL" | "DUPLICATE_STEP_ID" | "UNKNOWN_DEPENDENCY" | "TOO_MANY_STEPS" | "TAP_NOT_ALLOWED";
    message: string;
    publicSafe: true;
};
export type EphemeralProcedureValidationResult = {
    ok: true;
    plan: EphemeralProcedurePlan;
    events: readonly string[];
} | {
    ok: false;
    error: EphemeralProcedureValidationError;
    events: readonly string[];
};
export declare function normalizeEphemeralProcedurePlan(input: unknown): EphemeralProcedureValidationResult;
export declare function createEphemeralProcedureExecutionState(input: {
    plan: EphemeralProcedurePlan;
    runningStepIds?: readonly string[];
    completedStepIds?: readonly string[];
    failedStepIds?: readonly string[];
    fallbackStepIds?: readonly string[];
    approvalPendingStepIds?: readonly string[];
    metadata?: Readonly<Record<string, unknown>>;
}): EphemeralProcedureExecutionState;
