import type { BindingCandidateIdentityInput, CandidateTaskSnapshot, ExistingExternalBindingSnapshot, ExternalLifecycleCandidateSet, ExternalLifecycleDiagnostic, ExternalLifecycleStatus, ExternalObservationSnapshot, LifecycleCandidateIdentityInput, TaskHintLookup } from './external-lifecycle.js'; export type { BindingCandidateIdentityInput, ExistingExternalBindingSnapshot, ExternalObservationSnapshot, TaskHintLookup, } from './external-lifecycle.js'; export declare const KAGEMUSHA_LIFECYCLE_OBSERVED_STATUSES: readonly ["pending", "in_progress", "review", "done", "completed", "cancelled", "dismissed"]; export interface RawExternalObservation { event_index_id: unknown; source_connector: unknown; source_type: unknown; source_id: unknown; channel: unknown; content_hash: unknown; source_timestamp_ms: unknown; operator_ingest_seq: unknown; operator_observation_seq: unknown; metadata_json: unknown; } export interface ExternalLifecycleDecisionInput { readonly candidate_id: string; readonly decision: 'bind' | 'decline' | 'apply' | 'retain'; readonly reason: string; readonly expected_revision: number; } export interface ClassifiedKagemushaObservation { readonly observation: ExternalObservationSnapshot | null; readonly diagnostic: ExternalLifecycleDiagnostic | null; } /** Exact status spellings emitted by the private Kagemusha task connector. */ export declare function mapKagemushaLifecycle(value: string): ExternalLifecycleStatus | null; /** * Validates the agent-authored half of a candidate decision. Identity, task, * event, and status stay host-owned and are recovered from the opaque ID. */ export declare function validateExternalLifecycleDecision(kind: 'binding' | 'lifecycle', value: unknown): asserts value is ExternalLifecycleDecisionInput; /** * Parses a single database row into an immutable, host-authored observation. * The fixed summary intentionally derives from validated structured fields only. */ export declare function parseKagemushaObservation(row: RawExternalObservation): ExternalObservationSnapshot | null; /** * Classifies one untrusted database row once, so callers can preserve a * bounded per-event diagnostic without re-parsing connector content. */ export declare function classifyKagemushaObservation(row: RawExternalObservation): ClassifiedKagemushaObservation; /** Parses the only source identity accepted for private Kagemusha card evidence. */ export declare function parseKagemushaExternalSourceId(value: unknown): number | null; /** Returns the sole permitted summary; malformed inputs cannot render arbitrary prose. */ export declare function kagemushaEvidenceSummary(taskId: unknown, observedStatus: unknown, sourceTimestampMs: unknown): string | null; export declare function externalLifecycleCandidateId(input: BindingCandidateIdentityInput | LifecycleCandidateIdentityInput): string; export declare function buildExternalLifecycleCandidateSet(input: { eventIds: readonly string[]; observations: readonly ExternalObservationSnapshot[]; taskHints: TaskHintLookup; tasksById: ReadonlyMap; bindings: readonly ExistingExternalBindingSnapshot[]; receiptedCandidateIds: ReadonlySet; }): ExternalLifecycleCandidateSet; //# sourceMappingURL=external-lifecycle-candidates.d.ts.map