import { type RolePolicyConfig } from "../domain/role-policy.js"; import type { Clock, KernelPaths, TaskActivity, TaskHealth, TaskRecord } from "./types.js"; export interface AdviceBinding { readonly operation_id: string; readonly task_id: string; readonly attempt: number; readonly advice_digest: string; readonly engine: "claude" | "codex"; readonly model: string; } export interface AttemptBinding { readonly task_id: string; readonly attempt: number; readonly ticket_digest: string; readonly goal_version: number; readonly base_commit: string; readonly worktree_id: string; readonly worktree_path: string; readonly engine: "claude" | "codex"; readonly model: string; readonly advice_operation_id: string; readonly policy_digest: string; readonly capability_evidence_digest: string; readonly session_id: string; readonly expected_version: number; readonly expected_source_digest: string; } /** * @internal Test/fixture helper only — not exported from production kernel index. */ export declare function bindFreshAdvice(paths: KernelPaths, clock: Clock, input: { readonly taskId: string; readonly engine: "claude" | "codex"; readonly model: string; readonly advicePayload: Readonly>; }): AdviceBinding; /** * @internal Test/fixture helper only — not exported from production kernel index. */ export declare function bindAttempt(paths: KernelPaths, clock: Clock, binding: AttemptBinding): void; export declare function resolveAllowedExecutorModels(policy?: RolePolicyConfig): ReadonlySet; export declare function assertRoleModelBilling(input: { readonly role: "conductor" | "executor" | "advisor" | "grader"; readonly engine: "claude" | "codex"; readonly model: string; readonly creditBilledModelsEnabled: boolean; readonly creditBilledModels: readonly string[]; readonly allowedModels?: readonly string[]; readonly rolePolicy?: RolePolicyConfig; }): void; /** * CAS worker activity/health acknowledgement under one kernel lock. * Journal-authoritative task only — never authorize from derived task.json alone. * pendingVerification normalizes targets to working/healthy (or parked) then applies * the same strict transition helper as replay; it does not bypass illegal from→to. */ export declare function acknowledgeWorkerState(input: { readonly paths: KernelPaths; readonly clock: Clock; readonly taskId: string; readonly expectedVersion: number; readonly activity: TaskActivity; readonly health: TaskHealth; readonly paneId: string; readonly sessionId: string; /** Mandatory: must match journal-bound launch completion. */ readonly launchOperationId: string; readonly pendingVerification?: boolean; }): TaskRecord; export declare function markTaskBlocked(paths: KernelPaths, clock: Clock, taskId: string, failureDigest: string): TaskRecord; export declare function parkTaskForQuota(paths: KernelPaths, clock: Clock, taskId: string, resetCondition: string): TaskRecord; export declare function resumeTaskFromQuota(paths: KernelPaths, clock: Clock, taskId: string): TaskRecord;