mirror of
https://github.com/morluto/rea
synced 2026-10-27 14:42:18 -04:00
refactor(javascript)!: share semantic evidence at fact construction
Intern shared provenance in a graph-scoped context registry while retaining exact locations on every fact. Semantic traces carry their referenced context subset, and portable graph validation rejects stale or dangling commitments. BREAKING CHANGE: Semantic graph facts now store evidence context IDs and locations. Graph and semantic trace results require an inline evidence_contexts table.
This commit is contained in:
@@ -5,6 +5,7 @@ import {
|
||||
JAVASCRIPT_SEMANTIC_RELATIONS,
|
||||
javaScriptSemanticNodeSchema,
|
||||
javaScriptSemanticRelationSchema,
|
||||
javaScriptSemanticEvidenceContextSchema,
|
||||
javaScriptSemanticUnknownSchema,
|
||||
} from "./javascriptSemanticGraphSchemas.js";
|
||||
import { jsonValueSchema } from "../jsonValue.js";
|
||||
@@ -93,6 +94,7 @@ export const javaScriptSemanticQueryResultSchema = z.strictObject({
|
||||
direction: javaScriptSemanticQueryInputSchema.shape.direction,
|
||||
status: z.enum(["found", "no-match", "ambiguous", "partial", "unsupported"]),
|
||||
seed_node_ids: z.array(semanticNodeIdSchema),
|
||||
evidence_contexts: z.array(javaScriptSemanticEvidenceContextSchema),
|
||||
nodes: z.array(javaScriptSemanticNodeSchema),
|
||||
relations: z.array(javaScriptSemanticRelationSchema),
|
||||
unknowns: z.array(javaScriptSemanticUnknownSchema),
|
||||
|
||||
Reference in New Issue
Block a user