Skip to content

Interface: OsfqlRepair

@kortexya/reasoninglayer


@kortexya/reasoninglayer / OsfqlRepair

Defined in: src/types/osfql.ts:1028

One concrete, machine-applicable repair of a refused OSFQL write.

kind is one of: insert_first, use_new_marker, use_upsert_link, add_discriminator_or_key, designate_by_match_link, relax_pattern (drop the endpoint pattern’s contradicting features), use_cascade or use_detach (re-issue a RETRACT under that disposition), and — for a write onto a fact a rule derived — retract_premise or update_premise (write an asserted premise instead) and withdraw_rule (withdraw the rule that derived it), and — for a write onto a rule’s own term — replace_rule (replace the rule through PUT /api/v1/inference/rules/{id}) and withdraw_rule, and — for a write that carries a non-empty list under when — use_derive (state the rule with DERIVE <sort>(…) WHEN …;).

const repair: OsfqlRepair = {
kind: 'add_discriminator_or_key',
rewrite: 'UPSERT customer(<add @key feature or discriminator>);',
};

kind: string

Defined in: src/types/osfql.ts:1030

Repair family, snake_case, copied verbatim.


rewrite: string

Defined in: src/types/osfql.ts:1037

Rewrite template with the refused statement’s own sort names inlined, pasteable after filling the … holes. A withdraw_rule or replace_rule repair names the route instead, because OSFQL has no statement that withdraws or replaces a rule.


optional target?: string

Defined in: src/types/osfql.ts:1043

The term the repair acts on (UUID): the premise of a retract_premise or update_premise, the rule of a withdraw_rule. Absent for a rewrite of the refused statement itself.