Interface: OsfqlResponse
@kortexya/reasoninglayer / OsfqlResponse
Interface: OsfqlResponse
Section titled “Interface: OsfqlResponse”Defined in: src/types/osfql.ts:333
Response from OSFQL execution.
Remarks
Section titled “Remarks”Contains the results of executing an OSFQL program, including variable bindings from MATCH queries, IDs of produced terms and defined sorts, and diagnostic messages from the execution pipeline.
Properties
Section titled “Properties”bindings
Section titled “bindings”bindings:
Record<string,OsfqlValue>[]
Defined in: src/types/osfql.ts:384
Variable bindings from MATCH queries. Each entry represents one solution.
chainCompletions
Section titled “chainCompletions”chainCompletions:
OsfqlChainCompletion[]
Defined in: src/types/osfql.ts:360
The completion of every forward-chain run, in execution order: explicit
CHAINs and the re-derivations that writes and PROVE ran, each labelled
with its statement.
Remarks
Section titled “Remarks”Empty means no chain ran; it proves nothing. A run with
fixpointReached: false left a partial set of conclusions: for a write’s
re-derivation, the conclusions the write left in the store are incomplete.
computationTimeMs
Section titled “computationTimeMs”computationTimeMs:
number
Defined in: src/types/osfql.ts:443
Milliseconds the engine spent running the program — its own solve time, without the network round trip.
definedSortIds?
Section titled “definedSortIds?”
optionaldefinedSortIds?:string[]
Defined in: src/types/osfql.ts:431
Sort IDs produced by DEFINE statements.
diagnostics
Section titled “diagnostics”diagnostics:
string[]
Defined in: src/types/osfql.ts:434
Diagnostic messages from the execution pipeline.
fetched?
Section titled “fetched?”
optionalfetched?:Record<string,OsfqlValue>[]
Defined in: src/types/osfql.ts:391
Nested documents produced by a FETCH clause: one map per match row, each fetched
variable resolved to a nested Psi-term (OsfqlValue term, coreference inlined).
Omitted when the program has no FETCH.
producedTermIds
Section titled “producedTermIds”producedTermIds:
string[]
Defined in: src/types/osfql.ts:406
The ids of the terms this program CREATED.
Remarks
Section titled “Remarks”An INSERT or NEW endpoint, an UPSERT or UPSERT LINK endpoint that
found no term to merge into, a link’s edge term, a DERIVE or CHAIN
conclusion. A term that existed before the program is never here: a write
into it is reported in updatedTermIds. A term the program created
and then modified is here ONLY. The two lists are disjoint.
One exception: the read-only ROW SEARCH, ROW QUERY and
COLLECTION QUERY statements list the terms they MATCHED here.
profile?
Section titled “profile?”
optionalprofile?:OsfqlProfile
Defined in: src/types/osfql.ts:373
Native observations, present only when the request set OsfqlRequest.profile. They do not certify proof completeness or later durable publication.
proveCompletions
Section titled “proveCompletions”proveCompletions:
OsfqlProveCompletion[]
Defined in: src/types/osfql.ts:366
The enumeration completeness of each PROVE, in execution order. Empty
when the program ran no PROVE.
qualification?
Section titled “qualification?”
optionalqualification?:OsfqlQualification
Defined in: src/types/osfql.ts:487
How far each MATCH, PROVE and CHAIN statement’s answer is
established, and the release context it was read in.
Remarks
Section titled “Remarks”Only an enumeration whose status is complete is the whole answer: an
empty bounded or incomplete answer is not absence.
Absent when the program answered no query.
rowStatus?
Section titled “rowStatus?”
optionalrowStatus?:OsfqlRowVerdict[]
Defined in: src/types/osfql.ts:348
The verdict of each binding row, parallel to bindings.
Remarks
Section titled “Remarks”Present only when some row is not plainly true. unknown marks a row that
binds a well-founded UNDEFINED conclusion, answered because the statement
asked with INCLUDING UNDEFINED, never as true. Absent means every row is
true.
solveCompletions
Section titled “solveCompletions”solveCompletions:
OsfqlSolveCompletion[]
Defined in: src/types/osfql.ts:335
Pending and bounded searches cannot establish infeasibility.
sortDelete?
Section titled “sortDelete?”
optionalsortDelete?:DeleteSortResponse|null
Defined in: src/types/osfql.ts:461
What a DROP SORT removed, when the program dropped a sort.
Remarks
Section titled “Remarks”The same body SortsClient.deleteSort answers: DROP SORT name [CASCADE TERMS] [ORPHAN RULES] [CASCADE DESCENDANTS] runs the same
guarded, durable delete after the program, with its options as the
terms: 'delete', rules: 'orphan' and descendants: 'delete'
dispositions. Each option defaults to refuse.
A refused DROP SORT does not answer here: it throws an ApiError with
the status of the REST delete and error_type: "refused". Read its refusal
with sortDeleteRefusalOf.
Absent when the program dropped no sort.
sortReparent?
Section titled “sortReparent?”
optionalsortReparent?:SortReparentReport|null
Defined in: src/types/osfql.ts:475
What an ALTER SORT <name> PARENTS (…) changed, when the program moved a
sort.
Remarks
Section titled “Remarks”The report SortsClient.reparentSort answers, without the moved
sort. The move runs after the program. A refused move throws an
ApiError with status 400 and error_type: "refused"; the message names
the cause.
Absent when no sort moved.
statementCount
Section titled “statementCount”statementCount:
number
Defined in: src/types/osfql.ts:437
Number of statements executed.
success
Section titled “success”success:
boolean
Defined in: src/types/osfql.ts:337
Whether execution succeeded.
unknownFilterExclusions?
Section titled “unknownFilterExclusions?”
optionalunknownFilterExclusions?:OsfqlUnknownFilterExclusions
Defined in: src/types/osfql.ts:381
Candidate rows that WHERE filters excluded because a comparison read an
explicitly uninstantiated stored value, across the executed statements.
Absent when no such exclusion happened. While it is present, an absence
the program reports is not established.
updatedTermIds
Section titled “updatedTermIds”updatedTermIds:
string[]
Defined in: src/types/osfql.ts:428
The ids of the terms that existed BEFORE this program and that it modified in place.
Remarks
Section titled “Remarks”An UPDATE / SET / REMOVE; an UPSERT that merged into an existing
term through its @key; a designated link endpoint that gained the edge
feature; the source an UNLINK or an edge-term DELETE removed the edge
feature from; a referrer that RETRACT … DETACH or
MATCH … DETACH DELETE rewrote. An exact-match UPSERT writes nothing and
is in neither list; a term the same statement deleted is not listed.
Disjoint from producedTermIds, so the counts are direct:
producedTermIds.length created and updatedTermIds.length updated. Do
not subtract one list from the other.
Always present. [] means the program modified no existing term — a
zero-match UPDATE answers [], so a non-empty list is how a caller
knows an UPDATE matched anything.