API Reference · Private Preview

Core API Reference

Grounding, authorization, protected execution, effect verification, reconciliation, and claim permission contracts.

@answerup/core · Documented version 1.0.0-rc.1

Package-root import

CommonJS · Node >=20

import * as AnswerUp from '@answerup/core';

Readable API documentation is available now; package installation access begins with the Private Preview.

Public package exports

Grounding, authorization, evidence, result, and claim contracts. The index below is grouped by authoritative declaration kind.

Constants and values

AUTHORIZATION_TRACE_EVENTSconstant
export declare const AUTHORIZATION_TRACE_EVENTS: readonly ["AUTHORIZATION_REQUESTED", "AUTHORIZATION_PERMITTED", "AUTHORIZATION_DENIED", "AUTHORIZATION_INDETERMINATE"];
CLAIM_DECISIONSconstant
export declare const CLAIM_DECISIONS: readonly ["PERMITTED", "BLOCKED", "INDETERMINATE"];
CLAIM_POLARITIESconstant
export declare const CLAIM_POLARITIES: readonly ["positive", "negative"];
CLAIM_REASONSconstant
export declare const CLAIM_REASONS: readonly ["EFFECT_COMMITTED", "EFFECT_DISPROVED", "EFFECT_UNKNOWN", "ATTEMPT_ONLY", "WRONG_EFFECT", "WRONG_SUBJECT", "VALUE_MISMATCH", "WORKFLOW_NOT_ESTABLISHED", "UNSUPPORTED_CLAIM_TYPE", "CLAIM_INVALID", "EVIDENCE_MISSING", "EVIDENCE_CONFLICT"];
CLAIM_SCOPESconstant
export declare const CLAIM_SCOPES: readonly ["historical_effect", "attempt_status"];
CLAIM_TRACE_EVENTSconstant
export declare const CLAIM_TRACE_EVENTS: readonly ["CLAIM_EVALUATED", "CLAIM_PERMITTED", "CLAIM_BLOCKED", "CLAIM_INDETERMINATE"];
CLAIM_TYPESconstant
export declare const CLAIM_TYPES: readonly ["EFFECT_COMMITTED", "EFFECT_DISPROVED", "EFFECT_UNKNOWN", "EXECUTION_ATTEMPTED"];
CONFIRMATION_TRACE_EVENTSconstant
export declare const CONFIRMATION_TRACE_EVENTS: readonly ["CONFIRMATION_REQUESTED", "CONFIRMATION_TARGET_RESOLVED", "CONFIRMATION_TARGET_AMBIGUOUS", "CONFIRMATION_EVIDENCE_ACCEPTED", "OPERATION_CONFIRMED"];
CORE_CONFORMANCE_CHECKSconstant
export declare const CORE_CONFORMANCE_CHECKS: readonly ["identity_stability", "evidence_provenance", "ai_proposal_separation", "capability_declaration", "action_contract_shape", "adapter_authority_containment", "retry_idempotency", "provider_neutrality"];
CORE_SURFACE_VERSIONconstant
export declare const CORE_SURFACE_VERSION: "1.0.0-rc.1";
CORE_TRACE_CONTRACTconstant
export declare const CORE_TRACE_CONTRACT: "core-trace-hooks/1";
DISPATCH_PATHSconstant
export declare const DISPATCH_PATHS: readonly ["direct", "capability"];
DURABILITY_RECOVERY_CAPABILITIESconstant
export declare const DURABILITY_RECOVERY_CAPABILITIES: readonly ["EXACT_EFFECT_RECONCILIATION"];
EFFECT_RESOLUTION_TRACE_EVENTSconstant
export declare const EFFECT_RESOLUTION_TRACE_EVENTS: readonly ["EFFECT_VERIFICATION_REQUESTED", "EFFECT_COMMITTED", "EFFECT_DISPROVED", "EFFECT_STILL_UNKNOWN"];
EVIDENCE_KINDSconstant
export declare const EVIDENCE_KINDS: readonly ["human_verbatim", "human_structured", "external_ai_proposal", "media_reference"];
EXECUTION_TRACE_EVENTSconstant
export declare const EXECUTION_TRACE_EVENTS: readonly ["EXECUTION_PREPARED", "EXECUTION_ATTEMPTED", "ADAPTER_ACKNOWLEDGED", "EXECUTION_FAILED", "EXECUTION_OUTCOME_UNKNOWN"];
FRONTEND_CAPABILITIESconstant
export declare const FRONTEND_CAPABILITIES: readonly ["text_io", "realtime_voice", "interruption", "async_delivery", "continuous_session", "display", "authenticated_identity", "multimodal_capture", "external_ai_mediation", "handoff"];
OUTCOME_CLASSESconstant
export declare const OUTCOME_CLASSES: readonly OutcomeClass[];
REFERENT_TRACE_EVENTSconstant
export declare const REFERENT_TRACE_EVENTS: readonly ["REFERENT_CANDIDATES_OBSERVED", "AMBIGUITY_DETECTED", "CLARIFICATION_REQUIRED", "CLARIFICATION_EVIDENCE_ACCEPTED", "REFERENT_GROUNDED", "OPERATION_GROUNDED", "GROUNDING_BLOCKED"];
SUPERSESSION_TRACE_EVENTSconstant
export declare const SUPERSESSION_TRACE_EVENTS: readonly ["CORRECTION_EVIDENCE_ACCEPTED", "SUPERSESSION_TARGET_GROUNDED", "OPERATION_SUPERSEDED", "SUPERSESSION_BLOCKED"];

↑ Back to package index

Functions

acceptCanonicalIngressfunction
export declare function acceptCanonicalIngress(sub: CanonicalIngressSubmission): CanonicalIngressAcceptance;
acceptNormalizedInboundTurnfunction
export declare function acceptNormalizedInboundTurn(turn: NormalizedInboundTurn): IngressAcceptance;

// integration/effect-identity.d.ts
import { type CapabilityRef } from "./contracts";
bindClarificationResponsefunction
export declare function bindClarificationResponse(input: {
    clarification: ClarificationState;
    evidence: RequesterEvidenceProof;
}): ClarificationResponseContext | null;
bindConfirmationResponsefunction
export declare function bindConfirmationResponse(input: {
    target: ConfirmationTargetResolution;
}): ConfirmationResponseBinding | null;
bindEvidenceDiscriminatorfunction
export declare function bindEvidenceDiscriminator(input: {
    evidence: RequesterEvidenceProof;
    key: string;
    sourceSpan: {
        start: number;
        end: number;
    };
    responseContext?: ClarificationResponseContext;
}): EvidenceDiscriminator | null;
buildIngressProvenancefunction
export declare function buildIngressProvenance(sub: CanonicalIngressSubmission, acceptance: CanonicalIngressAcceptance): Record<string, unknown>;

// integration/trace-hooks.d.ts
import { type CanonicalIngressAcceptance, type CanonicalIngressSubmission } from "./ingress-contract";
capabilityLabelfunction
export declare function capabilityLabel(ref: CapabilityRef): string;
composeAuthoritySurrogateDigestfunction
export declare function composeAuthoritySurrogateDigest(kind: string, ids: Record<string, unknown>): string;
composeEffectKeyDigestfunction
export declare function composeEffectKeyDigest(input: EffectIdentityInput): string;

// integration/ingress-contract.d.ts
import { type NormalizedInboundTurn } from "./contracts";
confirmOperationfunction
export declare function confirmOperation(input: {
    response: ConfirmationResponseBinding;
}): ConfirmationResult;
correlateTraceRecordsfunction
export declare function correlateTraceRecords(records: CoreTraceRecord[]): TraceCorrelation;

// operation-state.d.ts
createAuthorizationContextfunction
export declare function createAuthorizationContext(input: {
    operation: OperationLifecycle;
    authority: AuthorizationAuthority;
    actor: AuthorizationActorContext;
    target: AuthorizationTarget;
    confirmationRequirement: ConfirmationRequirement;
    confirmationDecision?: ConfirmationDecision | null;
}): AuthorizationContext | null;
createCapabilityExecutorSlotfunction
export declare function createCapabilityExecutorSlot(label: string, capabilityName: string): CapabilityExecutorSlot;
createCorrectionEvidencefunction
export declare function createCorrectionEvidence(input: {
    predecessorEvidence: readonly EvidenceDiscriminator[];
    replacementEvidence: readonly EvidenceDiscriminator[];
}): CorrectionEvidence | null;
createOperationLifecyclefunction
export declare function createOperationLifecycle(input: {
    groundedOperation: GroundedOperation;
}): OperationLifecycle | null;
createRecoveryContextfunction
export declare function createRecoveryContext(input: {
    authority: unknown;
    request: unknown;
}): Promise<RecoveryContext | null>;
createReferentTraceRecordfunction
export declare function createReferentTraceRecord(input: {
    event: ReferentTraceEvent;
    correlationId?: string;
    operationId: string;
    clarificationId?: string | null;
    observationRef?: string | null;
    candidateRefs?: readonly string[];
    evidenceRefs?: readonly string[];
    referent?: string | null;
    predecessorOperationIdentity?: string;
    replacementOperationIdentity?: string;
}): ReferentTraceRecord;
currentDispatchPathfunction
export declare function currentDispatchPath(): DispatchPath;
currentEffectResolutionfunction
export declare function currentEffectResolution(executionContext: unknown): EffectResolution | null;
currentRecoveryEffectResolutionfunction
export declare function currentRecoveryEffectResolution(recoveryContext: unknown): EffectResolution | null;

// execution.d.ts
import { type CapabilityRef } from "./integration/contracts";
import { type ReferentTraceRecord } from "./integration/trace-hooks";
import { type OperationLifecycle } from "./supersession";
import { type AuthorizationContext, type AuthorizationDecision } from "./authorization";
dispatchExecutionfunction
export declare function dispatchExecution(context: unknown, options?: {
    retry?: boolean;
}): Promise<ExecutionDispatchResult>;
effectTraceRecordfunction
export declare function effectTraceRecord(input: {
    capability: string;
    effectKeyDigest: string;
    authoritySurrogateDigest: string;
    outcomeClass: string;
    evidenceKeyDigests: string[];
}): EffectTraceRecord;
evaluateAuthorizationfunction
export declare function evaluateAuthorization(input: {
    context: AuthorizationContext;
}): AuthorizationDecision;
evaluateClaimfunction
export declare function evaluateClaim(proposalInput: unknown, evidenceInput: unknown): ClaimPermission | null;
evaluateGroundingfunction
export declare function evaluateGrounding(input: {
    proposal: OperationProposal;
    candidateSet: ReferentCandidateSet;
    evidence: readonly EvidenceDiscriminator[];
}): GroundingDecision;
executionClaimBindingfunction
export declare function executionClaimBinding(context: unknown): {
    subjectDigest: string;
    attributesDigest: string;
} | null;
getRequesterEvidenceMetadatafunction
export declare function getRequesterEvidenceMetadata(proof: RequesterEvidenceProof): {
    text: string;
    sequence: number;
    proof: RequesterEvidenceProof;
} | null;
getRequesterEvidenceSequencefunction
export declare function getRequesterEvidenceSequence(): number;
groundOperationfunction
export declare function groundOperation(input: {
    proposal: OperationProposal;
    resolution: ReferentResolution;
}): GroundedOperation | null;
ingressTraceRecordfunction
export declare function ingressTraceRecord(sub: CanonicalIngressSubmission, acceptance: CanonicalIngressAcceptance): IngressTraceRecord;
isCoreGroundedOperationfunction
export declare function isCoreGroundedOperation(value: unknown): value is GroundedOperation;
isCoreOperationLifecyclefunction
export declare function isCoreOperationLifecycle(value: unknown): value is OperationLifecycle;
isOperationActionablefunction
export declare function isOperationActionable(value: unknown): boolean;
isOperationSupersededfunction
export declare function isOperationSuperseded(operationIdentity: string): boolean;

// recovery.d.ts
import { type CapabilityRef } from "./integration/contracts";
issueRequesterEvidencefunction
export declare function issueRequesterEvidence(submission: CanonicalIngressSubmission): RequesterEvidenceProof | null;
markOperationSupersededfunction
export declare function markOperationSuperseded(operationIdentity: string): void;
normalizeGroundingValuefunction
export declare function normalizeGroundingValue(value: string): string;
opaqueDigestfunction
export declare function opaqueDigest(value: unknown): string;

// integration/core-ingress.d.ts
import type { NormalizedInboundTurn } from "./contracts";
prepareExecutionfunction
export declare function prepareExecution(input: {
    operation: OperationLifecycle;
    authorizationDecision: AuthorizationDecision;
    authorizationContext: AuthorizationContext;
    adapter: ExecutionAdapter;
    effect: ExecutionEffectInput;
    freshnessAuthority?: ExecutionFreshnessAuthority;
}): ExecutionContext | null;
recoveryClaimBindingfunction
export declare function recoveryClaimBinding(value: unknown): {
    subjectDigest: string;
    attributesDigest: string;
} | null;

// referent.d.ts
import { type CanonicalIngressSubmission } from "./integration/ingress-contract";
import { type ReferentTraceRecord } from "./integration/trace-hooks";
recoveryContextBindingfunction
export declare function recoveryContextBinding(value: unknown): RecoveryContext | null;
registerAuthorizationAuthorityfunction
export declare function registerAuthorizationAuthority(input: {
    authorityIdentity: string;
    evaluate: (request: AuthorizationAuthorityRequest) => AuthorizationAuthorityResult;
}): AuthorizationAuthority | null;
registerDurabilityRecoveryAuthorityfunction
export declare function registerDurabilityRecoveryAuthority(input: DurabilityRecoveryAuthority): DurabilityRecoveryAuthority | null;
registerEffectVerifierfunction
export declare function registerEffectVerifier(input: EffectVerifier): EffectVerifier | null;
registerExecutionAdapterfunction
export declare function registerExecutionAdapter(input: ExecutionAdapter): ExecutionAdapter | null;
registerExecutionFreshnessAuthorityfunction
export declare function registerExecutionFreshnessAuthority(input: ExecutionFreshnessAuthority): ExecutionFreshnessAuthority | null;
requestConfirmationfunction
export declare function requestConfirmation(input: {
    operation: OperationLifecycle;
    acceptedAffirmatives: readonly string[];
}): ConfirmationContext | null;
requireClarificationfunction
export declare function requireClarification(input: {
    proposal: OperationProposal;
    evidence: readonly EvidenceDiscriminator[];
    resolution: ReferentResolution;
}): ClarificationState;
resolveClarificationfunction
export declare function resolveClarification(input: {
    state: ClarificationState;
    clarification: ClarificationEvidence;
    candidateSet: ReferentCandidateSet;
}): ClarificationResolution;

// supersession.d.ts
import { type ReferentTraceRecord } from "./integration/trace-hooks";
import { type EvidenceDiscriminator, type GroundedOperation } from "./referent";
resolveConfirmationTargetfunction
export declare function resolveConfirmationTarget(input: {
    contexts: readonly ConfirmationContext[];
    evidence: RequesterEvidenceProof;
    sourceSpan: {
        start: number;
        end: number;
    };
}): ConfirmationTargetResolution;
resolveReferentfunction
export declare function resolveReferent(input: {
    proposal: OperationProposal;
    candidateSet: ReferentCandidateSet;
    evidence: readonly EvidenceDiscriminator[];
}): ReferentResolution;
resolveSupersessionTargetfunction
export declare function resolveSupersessionTarget(input: {
    correction: CorrectionEvidence;
    candidates: readonly OperationLifecycle[];
    replacement: OperationLifecycle;
}): SupersessionTargetResolution;
runCoreConformancefunction
export declare function runCoreConformance(subject: ConformanceSubject): Promise<ConformanceReport>;

// core-dist/index.d.ts
runWithDispatchPathfunction
export declare function runWithDispatchPath<R>(path: DispatchPath, fn: () => R): R;
type AnyFn = (...args: any[]) => Promise<unknown>;
supersedeOperationfunction
export declare function supersedeOperation(input: {
    target: SupersessionTargetResolution;
}): SupersessionResult;
validateAuthorizationDecisionfunction
export declare function validateAuthorizationDecision(decision: unknown, operation: unknown, expectedContext: unknown): boolean;

// claim-permission.d.ts
import { type ReferentTraceRecord } from "./integration/trace-hooks";
validateClaimPermissionfunction
export declare function validateClaimPermission(permission: unknown, proposalInput: unknown): boolean;

// confirmation.d.ts
import { type ReferentTraceRecord } from "./integration/trace-hooks";
import { type RequesterEvidenceProof } from "./referent";
import { type OperationLifecycle } from "./supersession";
validateConfirmationDecisionfunction
export declare function validateConfirmationDecision(decision: unknown, operation: unknown): boolean;

// core-dist/conformance.d.ts
import { type BackendActionDescriptor, type FrontendAdapterManifest, type OutcomeClass } from "../integration/contracts";
import { type CanonicalIngressSubmission, type FrontendCapabilityProfile } from "../integration/ingress-contract";
validateEffectResolutionfunction
export declare function validateEffectResolution(resolution: unknown, effectIdentity: unknown, executionContext: unknown): boolean;
validateEvidenceDiscriminatorfunction
export declare function validateEvidenceDiscriminator(evidence: readonly EvidenceDiscriminator[]): EvidenceBindingValidation;
validateExecutionAttemptfunction
export declare function validateExecutionAttempt(attempt: unknown, context: unknown): boolean;

// index.d.ts
validateRecoveryContextfunction
export declare function validateRecoveryContext(value: unknown): value is RecoveryContext;
validateReferentCandidateSetfunction
export declare function validateReferentCandidateSet(candidateSet: ReferentCandidateSet): CandidateSetValidation;
verifyEffectfunction
export declare function verifyEffect(input: {
    executionContext: unknown;
    attempt: unknown;
} | {
    recoveryContext: unknown;
}): Promise<EffectResolution | null>;

↑ Back to package index

Interfaces

AuthorizationActorContextinterface
export interface AuthorizationActorContext {
    actorRef: string;
    assurance: string;
    securityDomainRef: string;
    subjectRef?: string;
    resourceRef: string;
    
    attributes?: Readonly<Record<string, string>>;
}
AuthorizationAuthorityinterface
export interface AuthorizationAuthority {
    authorityIdentity: string;
}
AuthorizationAuthorityRequestinterface
export interface AuthorizationAuthorityRequest {
    requestId: string;
    operationIdentity: string;
    operationId: string;
    actor: Readonly<AuthorizationActorContext>;
    target: Readonly<AuthorizationTarget>;
    confirmationRequirement: ConfirmationRequirement;
    confirmationDecisionId: string | null;
}
AuthorizationAuthorityResultinterface
export interface AuthorizationAuthorityResult {
    decision: AuthorizationDecisionStatus;
    policyObservationRef?: string | null;
    stateObservationRef?: string | null;
    factDigest?: string | null;
    
    authorityReasonRef?: string | null;
}
AuthorizationContextinterface
export interface AuthorizationContext {
    authorizationContextId: string;
    operationIdentity: string;
    operation: OperationLifecycle;
    authorityIdentity: string;
    actor: Readonly<AuthorizationActorContext>;
    target: Readonly<AuthorizationTarget>;
    confirmationRequirement: ConfirmationRequirement;
    confirmationDecisionId: string | null;
    trace: readonly ReferentTraceRecord[];
}
AuthorizationDecisioninterface
export interface AuthorizationDecision {
    authorizationDecisionId: string;
    authorizationContextId: string;
    operationIdentity: string;
    authorityIdentity: string;
    decision: AuthorizationDecisionStatus;
    reason: AuthorizationReason;
    policyObservationRef: string | null;
    stateObservationRef: string | null;
    factDigest: string | null;
    trace: readonly ReferentTraceRecord[];
}
AuthorizationTargetinterface
export interface AuthorizationTarget {
    resourceRef: string;
    securityDomainRef: string;
    subjectRef?: string;
}
BackendActionDescriptorinterface
export interface BackendActionDescriptor {
    capabilityRef: CapabilityRef;
    provider: string;
    inputFields: Record<string, string>;
    effectFields: string[];
    outcomeMapping: Record<string, OutcomeClass>;
    minAssurance: string;
    compensationRef: string | null;
    credentialSeam: string;
    useRestriction?: string;
}
CandidateReferentinterface
export interface CandidateReferent {
    referent: ReferentRef;
    source: "authoritative" | "caller_asserted";
    attributes: Readonly<Record<string, string>>;
    evidenceRefs: readonly string[];
    observationRef?: string;
}
CandidateSetValidationinterface
export interface CandidateSetValidation {
    valid: boolean;
    reasons: string[];
}
CanonicalIngressAcceptanceinterface
export interface CanonicalIngressAcceptance {
    accepted: boolean;
    reasons: string[];
    
    groundingAdmissible: boolean;
    
    canonicalKeyDigest: string | null;
}
CanonicalIngressSubmissioninterface
export interface CanonicalIngressSubmission {
    turn: NormalizedInboundTurn;
    capabilityProfile: FrontendCapabilityProfile;
    participant?: ParticipantContext;
    aiProposals?: ExternalAiProposal[];
    
    capturedAt?: Date;
}
CapabilityExecutorSlotinterface
export interface CapabilityExecutorSlot {
    register(fn: AnyFn): void;
    has(): boolean;
    
    invoke(...args: unknown[]): Promise<unknown>;
    
    __resetForTests(): void;
}
CapabilityRefinterface
export interface CapabilityRef {
    capabilityId: string;
    majorVersion: number;
}
ClaimEvidenceinterface
export interface ClaimEvidence {
    effectResolution?: unknown;
    executionContext?: unknown;
    recoveryContext?: unknown;
    executionAttempt?: unknown;
}
ClaimPermissioninterface
export interface ClaimPermission {
    permissionIdentity: string;
    claimIdentity: string;
    decision: ClaimDecisionStatus;
    reason: ClaimReason;
    claimType: ClaimType;
    effectIdentity: string | null;
    executionIdentity: string | null;
    subjectRef: string;
    scope: ClaimScope;
    polarity: ClaimPolarity;
    attributesDigest: string;
    evidenceRefs: readonly string[];
    trace: readonly ReferentTraceRecord[];
}
ClarificationEvidenceinterface
export interface ClarificationEvidence {
    clarificationId: string;
    evidence: EvidenceDiscriminator;
}
ClarificationRequestinterface
export interface ClarificationRequest {
    clarificationId: string;
    operationId: string;
    reason: "ambiguous" | "unresolved";
    candidateRefs: readonly ReferentRef[];
    observationRef: string | null;
}
ClarificationResolutioninterface
export interface ClarificationResolution {
    accepted: boolean;
    state: ClarificationState;
    grounding: ReferentResolution;
    trace: readonly ReferentTraceRecord[];
    reason?: "wrong_clarification_id" | "already_resolved" | "invalid_candidate_set" | "invalid_evidence" | "invalid_state" | "operation_superseded";
}
ClarificationResponseContextinterface
export interface ClarificationResponseContext {
    responseIdentity: string;
    clarificationId: string;
    operationId: string;
    evidenceIdentity: string;
}
ClarificationStateinterface
export interface ClarificationState {
    request: ClarificationRequest;
    status: "pending" | "resolved";
    proposal: OperationProposal;
    evidence: readonly EvidenceDiscriminator[];
    groundedReferent: ReferentRef | null;
    trace: readonly ReferentTraceRecord[];
}
ConfirmationContextinterface
export interface ConfirmationContext {
    confirmationContextId: string;
    operationIdentity: string;
    operation: OperationLifecycle;
    acceptedAffirmatives: readonly string[];
    issuedEvidenceSequence: number;
    status: ConfirmationContextStatus;
    trace: readonly ReferentTraceRecord[];
}
ConfirmationDecisioninterface
export interface ConfirmationDecision {
    confirmationDecisionId: string;
    confirmationContextId: string;
    operationIdentity: string;
    evidenceIdentity: string;
    status: "confirmed";
    trace: readonly ReferentTraceRecord[];
}
ConfirmationEvidenceinterface
export interface ConfirmationEvidence {
    semantic: "affirmative";
    evidence: RequesterEvidenceProof;
    sourceSpan: {
        start: number;
        end: number;
    };
    normalizedValue: string;
}
ConfirmationResponseBindinginterface
export interface ConfirmationResponseBinding {
    responseBindingId: string;
    confirmationContextId: string;
    operationIdentity: string;
    evidenceIdentity: string;
    evidence: ConfirmationEvidence;
    targetResolution: ConfirmationTargetResolution;
    trace: readonly ReferentTraceRecord[];
}
ConfirmationResultinterface
export interface ConfirmationResult {
    accepted: boolean;
    decision: ConfirmationDecision | null;
    reason: ConfirmationResultReason;
    trace: readonly ReferentTraceRecord[];
}
ConfirmationTargetResolutioninterface
export interface ConfirmationTargetResolution {
    status: ConfirmationTargetStatus;
    target: ConfirmationContext | null;
    evidence: ConfirmationEvidence | null;
    candidateContexts: readonly ConfirmationContext[];
    trace: readonly ReferentTraceRecord[];
    reason: string;
}
ConformanceCheckResultinterface
export interface ConformanceCheckResult {
    check: CoreConformanceCheck;
    passed: boolean;
    
    details: string[];
}
ConformanceReportinterface
export interface ConformanceReport {
    contract: "core-conformance/1";
    passed: boolean;
    results: ConformanceCheckResult[];
    
    reportDigest: string;
}
ConformanceSubjectinterface
export interface ConformanceSubject {
    frontend: {
        manifest: FrontendAdapterManifest;
        profile: FrontendCapabilityProfile;
        
        makeSubmission(seed: {
            key: string;
            text: string;
        }): CanonicalIngressSubmission;
    };
    action: {
        descriptor: BackendActionDescriptor;
        
        execute(input: Record<string, unknown>): Promise<{
            nativeOutcome: string;
            effectFields: Record<string, unknown>;
        }>;
        
        sampleInput: Record<string, unknown>;
    };
    
    referenceDescriptor?: BackendActionDescriptor;
}
CorrectionEvidenceinterface
export interface CorrectionEvidence {
    correctionIdentity: string;
    predecessorEvidence: readonly EvidenceDiscriminator[];
    replacementEvidence: readonly EvidenceDiscriminator[];
    evidenceRefs: readonly string[];
}
DurabilityRecoveryAuthorityinterface
export interface DurabilityRecoveryAuthority {
    authorityIdentity: string;
    capability: DurabilityRecoveryCapability;
    recover(request: DurabilityRecoveryRequest): Promise<unknown>;
}
DurabilityRecoveryProofinterface
export interface DurabilityRecoveryProof {
    accepted: true;
    tenantScope: string;
    executionIdentity: string;
    effectIdentity: string;
    attemptIdentity: string;
    operationIdentity: string;
    subjectDigest: string;
    attributesDigest: string;
    adapterIdentity: string;
    capability: CapabilityRef;
    verifierIdentity: string;
    convergence: "NOT_SUPPORTED";
    boundary: "CROSSED" | "POSSIBLY_CROSSED";
    issuingCoreVersion: string;
    artifactSchemaVersion: string;
    canonicalizationVersion: string;
    configurationDigest: string;
    durableRevision: number;
    durableSequence: number;
    acceptedLedgerRef: string;
    proofDigest: string;
}
DurabilityRecoveryRequestinterface
export interface DurabilityRecoveryRequest {
    recoveryRequestIdentity: string;
    tenantScope: string;
    executionIdentity: string;
    effectIdentity: string;
    attemptIdentity: string;
    operationIdentity: string;
    subjectDigest: string;
    attributesDigest: string;
    adapterIdentity: string;
    capability: CapabilityRef;
    verifierIdentity: string;
    convergence: "NOT_SUPPORTED";
    issuingCoreVersion: string;
    artifactSchemaVersion: string;
    canonicalizationVersion: string;
    configurationDigest: string;
}
EffectIdentityInputinterface
export interface EffectIdentityInput {
    
    capability: string;
    
    authoritySurrogate: string;
    
    resolvedReferentIds: Record<string, unknown>;
    
    effectFields: Record<string, unknown>;
}
EffectResolutioninterface
export interface EffectResolution {
    resolutionIdentity: string;
    status: EffectResolutionStatus;
    reason: EffectResolutionReason;
    effectIdentity: string;
    executionIdentity: string;
    executionContextId: string;
    operationIdentity: string;
    verifierIdentity: string | null;
    capability: CapabilityRef;
    observationRef: string | null;
    observationVersion: string | null;
    stateDigest: string | null;
    finalityRef: string | null;
    verificationAttemptIdentity: string;
    trace: readonly ReferentTraceRecord[];
}
EffectTraceRecordinterface
export interface EffectTraceRecord {
    contract: typeof CORE_TRACE_CONTRACT;
    stage: "effect";
    
    capability: string;
    
    effectKeyDigest: string;
    authoritySurrogateDigest: string;
    
    outcomeClass: string;
    
    evidenceKeyDigests: string[];
}
EffectVerifierinterface
export interface EffectVerifier {
    verifierIdentity: string;
    capability: CapabilityRef;
    verify(request: EffectVerifierRequest): Promise<unknown>;
}
EffectVerifierRequestinterface
export interface EffectVerifierRequest {
    verificationAttemptIdentity: string;
    effectIdentity: string;
    executionIdentity: string;
    executionContextId: string;
    operationIdentity: string;
    capability: CapabilityRef;
    attemptIdentity: string;
    attemptOutcome: "ACKNOWLEDGED" | "UNKNOWN";
}
EvidenceBindingValidationinterface
export interface EvidenceBindingValidation {
    valid: boolean;
    reasons: string[];
}
EvidenceDiscriminatorinterface
export interface EvidenceDiscriminator {
    bindingIdentity: string;
    evidenceIdentity: string;
    key: string;
    value: string;
    sourceSpan: {
        start: number;
        end: number;
    };
    clarificationResponseIdentity?: string;
}
ExecutionAdapterinterface
export interface ExecutionAdapter {
    adapterIdentity: string;
    capability: CapabilityRef;
    effectIdentityConvergence: EffectIdentityConvergence;
    acknowledgementSemantics: "APPARENT";
    invoke(request: ExecutionAdapterRequest): Promise<unknown>;
}
ExecutionAdapterRequestinterface
export interface ExecutionAdapterRequest {
    executionIdentity: string;
    attemptIdentity: string;
    effectIdentity: string;
    operationIdentity: string;
    capability: CapabilityRef;
}
ExecutionAttemptinterface
export interface ExecutionAttempt {
    attemptIdentity: string;
    executionIdentity: string;
    effectIdentity: string;
    executionContextId: string;
    adapterIdentity: string;
    outcome: ExecutionAttemptOutcome;
    retryable: boolean;
    providerReference: string | null;
    freshnessObservationRef: string | null;
    trace: readonly ReferentTraceRecord[];
}
ExecutionContextinterface
export interface ExecutionContext {
    executionContextId: string;
    executionIdentity: string;
    effectIdentity: string;
    operationIdentity: string;
    operation: OperationLifecycle;
    authorizationDecisionId: string;
    authorizationContextId: string;
    adapterIdentity: string;
    capability: CapabilityRef;
    freshnessObservationRef: string | null;
    trace: readonly ReferentTraceRecord[];
}
ExecutionDispatchResultinterface
export interface ExecutionDispatchResult {
    executionContext: ExecutionContext | null;
    attempt: ExecutionAttempt | null;
    outcome: ExecutionAttemptOutcome;
    reason: ExecutionReason;
    duplicate: boolean;
}
ExecutionEffectInputinterface
export interface ExecutionEffectInput {
    capability: string;
    resolvedReferentIds: Record<string, unknown>;
    effectFields: Record<string, unknown>;
}
ExecutionFreshnessAuthorityinterface
export interface ExecutionFreshnessAuthority {
    authorityIdentity: string;
    evaluate(request: ExecutionFreshnessAuthorityRequest): ExecutionFreshnessResult | Promise<ExecutionFreshnessResult>;
}
ExecutionFreshnessAuthorityRequestinterface
export interface ExecutionFreshnessAuthorityRequest {
    executionContextId: string;
    executionIdentity: string;
    operationIdentity: string;
    effectIdentity: string;
}
ExecutionFreshnessResultinterface
export interface ExecutionFreshnessResult {
    status: "CURRENT" | "STALE" | "INDETERMINATE";
    observationRef?: string | null;
}
ExternalAiProposalinterface
export interface ExternalAiProposal {
    interpretation: string;
    claimedSourceSpan?: string;
    model: string;
    mediationRef?: string;
}
FrontendAdapterManifestinterface
export interface FrontendAdapterManifest {
    capabilityRef: CapabilityRef;
    provider: string;
    modality: string;
    delivery: string;
    supportsHumanStructured: boolean;
    routingFactKinds: string[];
    deliveryIdempotency: {
        keyKind: string;
    };
    deliveryReceipts: {
        supported: boolean;
        kinds: ("delivered" | "failed")[];
    };
    assuranceLevels: string[];
}
FrontendCapabilityProfileinterface
export interface FrontendCapabilityProfile {
    declared: FrontendCapability[];
}
GroundedOperationinterface
export interface GroundedOperation {
    operationId: string;
    capability: string;
    referent: ReferentRef;
    evidenceRefs: readonly string[];
    observationRef: string;
    grounding: "grounded";
    
    executionEligibility: "not_evaluated";
    trace: readonly ReferentTraceRecord[];
    groundingEvidence: readonly EvidenceDiscriminator[];
}
GroundedReferentResolutioninterface
export interface GroundedReferentResolution extends ReferentResolutionBase {
    status: "grounded";
    referent: ReferentRef;
    candidate: CandidateReferent;
}
GroundingDecisioninterface
export interface GroundingDecision {
    resolution: ReferentResolution;
    groundingBlocked: boolean;
}
IngressAcceptanceinterface
export interface IngressAcceptance {
    accepted: boolean;
    reasons: string[];
}
IngressTraceRecordinterface
export interface IngressTraceRecord {
    contract: typeof CORE_TRACE_CONTRACT;
    stage: "ingress";
    
    canonicalKeyDigest: string | null;
    accepted: boolean;
    groundingAdmissible: boolean;
    
    provenance: Record<string, unknown>;
}
NonGroundedReferentResolutioninterface
export interface NonGroundedReferentResolution extends ReferentResolutionBase {
    status: "ambiguous" | "unresolved" | "invalid";
}
NormalizedInboundTurninterface
export interface NormalizedInboundTurn {
    provider: string;
    providerRef: string;
    routingFacts: Record<string, string>;
    evidenceClass: {
        kind: string;
        captureQuality: string;
    };
    payload: Record<string, unknown>;
    idempotencyKey: {
        provider: string;
        key: string;
    };
    receivedAt: Date;
}
OperationLifecycleinterface
export interface OperationLifecycle {
    operationIdentity: string;
    groundedOperation: GroundedOperation;
    groundingEvidence: readonly EvidenceDiscriminator[];
    lifecycleState: OperationLifecycleState;
    supersededBy: string | null;
    predecessor: string | null;
    trace: readonly ReferentTraceRecord[];
}
OperationProposalinterface
export interface OperationProposal {
    operationId: string;
    correlationId?: string;
    capability: string;
    proposalSource: "model" | "application";
    evidenceRefs: readonly string[];
    referentHint?: ReferentRef;
    effectContext?: Readonly<Record<string, unknown>>;
}
ParticipantContextinterface
export interface ParticipantContext {
    actorRef: string;
    assurance?: string;
}
RecoveryContextinterface
export interface RecoveryContext {
    recoveryContextIdentity: string;
    tenantScope: string;
    executionIdentity: string;
    effectIdentity: string;
    attemptIdentity: string;
    operationIdentity: string;
    subjectDigest: string;
    attributesDigest: string;
    adapterIdentity: string;
    capability: CapabilityRef;
    verifierIdentity: string;
    convergence: "NOT_SUPPORTED";
    boundary: "CROSSED" | "POSSIBLY_CROSSED";
    authorityIdentity: string;
    acceptedLedgerRef: string;
    durableRevision: number;
    durableSequence: number;
    issuingCoreVersion: string;
    artifactSchemaVersion: string;
    canonicalizationVersion: string;
    configurationDigest: string;
    reconciliationOnly: true;
}
ReferentCandidateSetinterface
export interface ReferentCandidateSet {
    observationRef: string;
    candidates: readonly CandidateReferent[];
}
ReferentResolutionBaseinterface
export interface ReferentResolutionBase {
    status: GroundingStatus;
    operationId: string;
    observationRef: string | null;
    admissibleCandidates: readonly CandidateReferent[];
    evidenceRefs: readonly string[];
    reason: string;
    trace: readonly ReferentTraceRecord[];
    groundingEvidence: readonly EvidenceDiscriminator[];
}
ReferentTraceRecordinterface
export interface ReferentTraceRecord {
    contract: typeof CORE_TRACE_CONTRACT;
    stage: "referent";
    event: ReferentTraceEvent;
    correlationId: string;
    operationId: string;
    clarificationId: string | null;
    observationRef: string | null;
    candidateRefDigests: string[];
    evidenceRefs: string[];
    referentDigest: string | null;
    predecessorOperationIdentity?: string;
    replacementOperationIdentity?: string;
}
RequesterEvidenceProofinterface
export interface RequesterEvidenceProof {
    evidenceIdentity: string;
    canonicalKeyDigest: string;
    evidenceKind: "human_verbatim";
}
SupersessionDecisioninterface
export interface SupersessionDecision {
    decisionIdentity: string;
    predecessor: OperationLifecycle;
    replacement: OperationLifecycle;
    correction: CorrectionEvidence;
    trace: readonly ReferentTraceRecord[];
}
SupersessionResultinterface
export interface SupersessionResult {
    accepted: boolean;
    predecessor: OperationLifecycle;
    replacement: OperationLifecycle;
    decision: SupersessionDecision | null;
    trace: readonly ReferentTraceRecord[];
    reason: "superseded" | "target_ambiguous" | "target_unresolved" | "invalid" | "already_superseded";
}
SupersessionTargetResolutioninterface
export interface SupersessionTargetResolution {
    status: SupersessionTargetStatus;
    correction: CorrectionEvidence;
    target: OperationLifecycle | null;
    replacement: OperationLifecycle;
    candidates: readonly OperationLifecycle[];
    trace: readonly ReferentTraceRecord[];
    reason: string;
}
TraceCorrelationinterface
export interface TraceCorrelation {
    
    chains: {
        effect: EffectTraceRecord;
        evidence: IngressTraceRecord[];
        
        fullyGrounded: boolean;
    }[];
    
    unconsumedEvidence: IngressTraceRecord[];
    
    lifecycle?: ReferentTraceRecord[];
    
    correlationDigest: string;
}

↑ Back to package index

Types

AdapterDispatchBoundarytype
export type AdapterDispatchBoundary = "not_crossed" | "crossed";
AuthorizationDecisionStatustype
export type AuthorizationDecisionStatus = "PERMIT" | "DENY" | "INDETERMINATE";
AuthorizationReasontype
export type AuthorizationReason = "POLICY_PERMITTED" | "POLICY_DENIED" | "POLICY_UNAVAILABLE" | "AUTHORITY_UNAVAILABLE" | "AUTHORITY_ERROR" | "INVALID_AUTHORITY_RESULT" | "CONFIRMATION_REQUIRED" | "OPERATION_NOT_ACTIONABLE" | "CONTEXT_INVALID";
ClaimDecisionStatustype
export type ClaimDecisionStatus = (typeof CLAIM_DECISIONS)[number];
ClaimPolaritytype
export type ClaimPolarity = (typeof CLAIM_POLARITIES)[number];
ClaimProposaltype
export type ClaimProposal = (ClaimProposalBase & {
    claimType: "EFFECT_COMMITTED" | "EFFECT_DISPROVED" | "EFFECT_UNKNOWN";
    effectIdentity: string;
    executionIdentity: string;
    scope: "historical_effect";
}) | (ClaimProposalBase & {
    claimType: "EXECUTION_ATTEMPTED";
    effectIdentity: string;
    executionIdentity: string;
    scope: "attempt_status";
});
ClaimReasontype
export type ClaimReason = (typeof CLAIM_REASONS)[number];
ClaimScalartype
export type ClaimScalar = string | number | boolean | null;
interface ClaimProposalBase {
    claimType: ClaimType;
    effectIdentity?: string | null;
    executionIdentity: string;
    subjectRef: string;
    propositionRef?: string | null;
    polarity: ClaimPolarity;
    scope: ClaimScope;
    attributes: Record<string, ClaimScalar>;
    
    displayText?: string | null;
    
    permitted?: unknown;
    verified?: unknown;
    modelConfident?: unknown;
}
ClaimScopetype
export type ClaimScope = (typeof CLAIM_SCOPES)[number];
ClaimTypetype
export type ClaimType = (typeof CLAIM_TYPES)[number];
ConfirmationContextStatustype
export type ConfirmationContextStatus = "pending" | "consumed" | "invalidated";
ConfirmationRequirementtype
export type ConfirmationRequirement = "NONE" | "AFFIRMATIVE_REQUIRED";
ConfirmationResultReasontype
export type ConfirmationResultReason = "confirmed" | "invalid" | "context_invalidated" | "context_consumed" | "operation_not_actionable" | "target_ambiguous" | "target_unresolved";
ConfirmationTargetStatustype
export type ConfirmationTargetStatus = "resolved" | "ambiguous" | "unresolved" | "invalid";
CoreConformanceChecktype
export type CoreConformanceCheck = (typeof CORE_CONFORMANCE_CHECKS)[number];
CoreTraceRecordtype
export type CoreTraceRecord = IngressTraceRecord | EffectTraceRecord | ReferentTraceRecord;
DispatchPathtype
export type DispatchPath = (typeof DISPATCH_PATHS)[number];
DurabilityRecoveryCapabilitytype
export type DurabilityRecoveryCapability = (typeof DURABILITY_RECOVERY_CAPABILITIES)[number];
EffectIdentityConvergencetype
export type EffectIdentityConvergence = "SUPPORTED" | "NOT_SUPPORTED";
EffectResolutionReasontype
export type EffectResolutionReason = "EFFECT_PRESENT" | "EFFECT_ABSENT_FINAL" | "VERIFIER_UNAVAILABLE" | "VERIFIER_ERROR" | "INVALID_VERIFIER_RESULT" | "VERIFIER_INDETERMINATE" | "VERIFIER_CONFLICT" | "EFFECT_CONTEXT_INVALID" | "EFFECT_TERMINAL" | "EFFECT_VERIFICATION_IN_FLIGHT";
EffectResolutionStatustype
export type EffectResolutionStatus = "COMMITTED" | "DISPROVED" | "UNKNOWN";
EffectVerificationResultStatustype
export type EffectVerificationResultStatus = "PRESENT" | "ABSENT_FINAL" | "INDETERMINATE" | "CONFLICT";
EffectVerifierResulttype
export type EffectVerifierResult = {
    status: "PRESENT";
    observationRef: string;
    observationVersion?: string | null;
    stateDigest?: string | null;
} | {
    status: "ABSENT_FINAL";
    observationRef: string;
    finalityRef: string;
    observationVersion?: string | null;
    stateDigest?: string | null;
} | {
    status: "INDETERMINATE";
    observationRef?: string | null;
    observationVersion?: string | null;
    stateDigest?: string | null;
    reason?: "VERIFIER_UNAVAILABLE" | "VERIFIER_INDETERMINATE";
} | {
    status: "CONFLICT";
    observationRef?: string | null;
    observationVersion?: string | null;
    stateDigest?: string | null;
    reason?: "VERIFIER_CONFLICT";
};
EvidenceKindtype
export type EvidenceKind = (typeof EVIDENCE_KINDS)[number];
ExecutionAdapterResulttype
export type ExecutionAdapterResult = {
    status: "acknowledged";
    dispatchBoundary: "crossed";
    providerReference?: string | null;
} | {
    status: "failed";
    dispatchBoundary: "not_crossed";
    retryable: boolean;
    code?: string | null;
} | {
    status: "unknown";
    dispatchBoundary: "crossed";
    code?: string | null;
};
ExecutionAttemptOutcometype
export type ExecutionAttemptOutcome = "NOT_STARTED" | "IN_FLIGHT" | "ACKNOWLEDGED" | "FAILED" | "UNKNOWN";
ExecutionReasontype
export type ExecutionReason = "PREPARED" | "ADAPTER_ACKNOWLEDGED" | "AUTHORIZATION_INVALID" | "OPERATION_NOT_ACTIONABLE" | "ADAPTER_UNAVAILABLE" | "CAPABILITY_MISMATCH" | "FRESHNESS_STALE" | "FRESHNESS_INDETERMINATE" | "ADAPTER_REJECTED" | "ADAPTER_UNAVAILABLE_RESULT" | "MALFORMED_ADAPTER_RESULT" | "DISPATCH_UNKNOWN" | "ALREADY_DISPATCHED" | "RETRY_CONVERGENCE_UNSUPPORTED" | "CONTEXT_INVALID";
FrontendCapabilitytype
export type FrontendCapability = (typeof FRONTEND_CAPABILITIES)[number];
GroundingStatustype
export type GroundingStatus = "grounded" | "ambiguous" | "unresolved" | "invalid";
OperationLifecycleStatetype
export type OperationLifecycleState = "current" | "superseded";
OutcomeClasstype
export type OutcomeClass = "succeeded" | "rejected_invalid_input" | "rejected_policy" | "duplicate_suppressed" | "provider_unavailable" | "provider_fault" | "unknown_commit";
ReferentReftype
export type ReferentRef = string;
ReferentResolutiontype
export type ReferentResolution = GroundedReferentResolution | NonGroundedReferentResolution;
ReferentTraceEventtype
export type ReferentTraceEvent = (typeof REFERENT_TRACE_EVENTS)[number] | (typeof SUPERSESSION_TRACE_EVENTS)[number] | (typeof CONFIRMATION_TRACE_EVENTS)[number] | (typeof AUTHORIZATION_TRACE_EVENTS)[number] | (typeof EXECUTION_TRACE_EVENTS)[number] | (typeof EFFECT_RESOLUTION_TRACE_EVENTS)[number] | (typeof CLAIM_TRACE_EVENTS)[number];
SupersessionTargetStatustype
export type SupersessionTargetStatus = "target_grounded" | "target_ambiguous" | "target_unresolved" | "invalid";

↑ Back to package index

Examples and deeper guidance

The package-root import above is a package-specific, non-executing example. Use the exact declaration surface for signatures and types; semantic parameter descriptions are shown only where established by package authority.

Read the related lifecycle guidance for the package’s documented role. No credentials or external execution are provided here.