Skip to content

Interface: DiagnosisCertificate

@kortexya/reasoninglayer


@kortexya/reasoninglayer / DiagnosisCertificate

Defined in: src/types/inference.ts:965

A sealed diagnosis: compact, deterministic, and re-verifiable against its evidence.

Wire encoding, verbatim. Unlike the other SDK types, the keys are the engine’s snake_case keys: a third party re-verifies the certificate by deserializing exactly these bytes. Hashes are lowercase hex SHA-256.

Two certificates are “the same” when they seal the same derivation: compare id (content-derived), not the whole object — metadata is annotation and signature is a detached attestation.

candidate_count: number

Defined in: src/types/inference.ts:979

How many candidates the differential returned.


derivation_root: string | null

Defined in: src/types/inference.ts:983

Merkle root over the per-candidate derivations; null only for an empty differential.


differential_hash: string

Defined in: src/types/inference.ts:977

Hash of the ranked differential (order-sensitive).


id: string

Defined in: src/types/inference.ts:969

Content-derived identity (UUID): re-sealing identical evidence yields the same id.


issued_at: number

Defined in: src/types/inference.ts:971

Issue time, Unix seconds.


kb_data_version: string

Defined in: src/types/inference.ts:993

Ontology-data identity, in the clear (the request’s kbDataVersion, or "unattested").


knowledge_hash: string

Defined in: src/types/inference.ts:989

Hash that binds the rule-program and ontology-data identities.


matched_count: number

Defined in: src/types/inference.ts:985

Total antecedents witnessed across all candidates.


metadata: Record<string, string>

Defined in: src/types/inference.ts:995

Free-form provenance (for example tenant_id, goal_sort).


observation_count: number

Defined in: src/types/inference.ts:975

How many distinct observations were asserted.


observations_hash: string

Defined in: src/types/inference.ts:973

Hash of the sorted, de-duplicated observations.


residuated_count: number

Defined in: src/types/inference.ts:987

Total antecedents that residuated across all candidates.


rule_program_version: string

Defined in: src/types/inference.ts:991

Rule-program identity, in the clear.


signature: DiagnosisCertificateSignature | null

Defined in: src/types/inference.ts:997

Optional detached signature over the certificate’s content hash.


top_candidate: string | null

Defined in: src/types/inference.ts:981

The rank-1 candidate, in the clear, or null for an empty differential.


version: string

Defined in: src/types/inference.ts:967

Canonical-encoding version (currently "1.0"). It governs this encoding.