Type Alias: ScenarioSortProvenance
@kortexya/reasoninglayer / ScenarioSortProvenance
Type Alias: ScenarioSortProvenance
Section titled “Type Alias: ScenarioSortProvenance”ScenarioSortProvenance = {
kind:"model";model?:string; } | {kind:"imported";ontology:string;original_id:string; }
Defined in: src/types/scenarios.ts:324
Where a scenario sort (or fluent) came from — its provenance key, recorded
as the materialized sort’s origin.
Union Members
Section titled “Union Members”Type Literal
Section titled “Type Literal”{ kind: "model"; model?: string; }
kind:
"model"
Discriminator: a language model proposed the sort.
model?
Section titled “model?”
optionalmodel?:string
The model that proposed it, when known.
Type Literal
Section titled “Type Literal”{ kind: "imported"; ontology: string; original_id: string; }
kind:
"imported"
Discriminator: an ontology import brought the sort in.
ontology
Section titled “ontology”ontology:
string
The source ontology (IRI or file name).
original_id
Section titled “original_id”original_id:
string
The element’s id in that ontology.
Remarks
Section titled “Remarks”Sent byte for byte inside GeneratedScenario, so the keys are the
engine’s own snake_case (original_id), discriminated by kind:
{kind: "model", model?}— proposed by a language model (ontology generation, a builder stage); recorded asLlmExtracted. The engine stamps this on every sort and fluent of a scenario it generated, overwriting whatever the model wrote.{kind: "imported", ontology, original_id}— brought in by an ontology import (ontologyis the source IRI or file name,original_idthe element’s id there); recorded asImported.
Without provenance the sort is Manual, credited to the caller. System
cannot be claimed. A fluent’s provenance is recorded on both the fluent
sort and the event sort it creates.
Example
Section titled “Example”const provenance: ScenarioSortProvenance = { kind: 'imported', ontology: 'https://example.org/pizza.owl', original_id: 'Margherita',};const scenario: GeneratedScenario = { sorts: [{ name: 'margherita', parents: ['pizza'], provenance }],};