Skip to content

Type Alias: EvalBuiltinResponse

@kortexya/reasoninglayer


@kortexya/reasoninglayer / ProofEngine / EvalBuiltinResponse

Type Alias: EvalBuiltinResponse

EvalBuiltinResponse = { result: object; status: "success"; } | { status: "success_unit"; } | { status: "failure"; } | { blockingArgIndex: number; status: "residuate"; } | { message: string; status: "error"; }

Defined in: src/types/proof-engine.ts:409

Response from evaluating a built-in function.

Type Declaration

{ result: object; status: "success"; }

result

result: object

Evaluation result (opaque JSON).

status

status: "success"

{ status: "success_unit"; }

status

status: "success_unit"

{ status: "failure"; }

status

status: "failure"

{ blockingArgIndex: number; status: "residuate"; }

blockingArgIndex

blockingArgIndex: number

Index of the blocking argument.

status

status: "residuate"

{ message: string; status: "error"; }

message

message: string

Error message.

status

status: "error"

Remarks

Discriminated union on the status field. Variants:

  • success — evaluation succeeded with a result
  • success_unit — evaluation succeeded with no return value
  • failure — evaluation failed
  • residuate — evaluation blocked on an uninstantiated argument
  • error — an error occurred during evaluation