Skip to content

Type Alias: EvalBuiltinResponse

@kortexya/reasoninglayer


@kortexya/reasoninglayer / 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.

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

result: object

Evaluation result (opaque JSON).

status: "success"


{ status: "success_unit"; }


{ status: "failure"; }


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

blockingArgIndex: number

Index of the blocking argument.

status: "residuate"


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

message: string

Error message.

status: "error"

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