Interface: OsfqlResponse
@kortexya/reasoninglayer / OsfqlResponse
Interface: OsfqlResponse
Section titled “Interface: OsfqlResponse”Defined in: src/types/osfql.ts:292
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:326
Variable bindings from MATCH queries. Each entry represents one solution.
chainCompletions
Section titled “chainCompletions”chainCompletions:
OsfqlChainCompletion[]
Defined in: src/types/osfql.ts:317
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:385
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:373
Sort IDs produced by DEFINE statements.
diagnostics
Section titled “diagnostics”diagnostics:
string[]
Defined in: src/types/osfql.ts:376
Diagnostic messages from the execution pipeline.
fetched?
Section titled “fetched?”
optionalfetched?:Record<string,OsfqlValue>[]
Defined in: src/types/osfql.ts:333
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:348
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.
proveCompletions
Section titled “proveCompletions”proveCompletions:
OsfqlProveCompletion[]
Defined in: src/types/osfql.ts:323
The enumeration completeness of each PROVE, in execution order. Empty
when the program ran no PROVE.
rowStatus?
Section titled “rowStatus?”
optionalrowStatus?:OsfqlRowVerdict[]
Defined in: src/types/osfql.ts:305
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.
sortDelete?
Section titled “sortDelete?”
optionalsortDelete?:DeleteSortResponse|null
Defined in: src/types/osfql.ts:403
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:417
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:379
Number of statements executed.
success
Section titled “success”success:
boolean
Defined in: src/types/osfql.ts:294
Whether execution succeeded.
updatedTermIds
Section titled “updatedTermIds”updatedTermIds:
string[]
Defined in: src/types/osfql.ts:370
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.