KAR quickstart

Install the published package. Do not pin 6.0.0-rc.1.

Terminalsh
npm install @knolo/core

From a checkout of Knolo Core, the contracts demo writes an image, CEG Source, a compiled graph, a plan, and a dossier:

Terminalsh
npm run build --workspace @knolo/core
node examples/kar-v6/run.mjs

knolo kar demo runs that script. knolo kar conformance checks the public vectors. Both commands expect a checkout, not an empty application directory.

Ordinary retrieval asks which passages match a query. evaluateKar asks for the minimum evidence set that meets the plan. The contracts case keeps both a permitting passage and a prohibiting passage.

Examplets
import { readFileSync } from 'node:fs';
import { createKarSession, evaluateKar, explainKarResult, createKarDossier, verifyKar } from '@knolo/core/kar';

const image = readFileSync('examples/kar-v6/contracts/knowledge.knolo');
const graph = JSON.parse(readFileSync('examples/kar-v6/contracts/knowledge.kar.json', 'utf8'));
const plan = JSON.parse(readFileSync('examples/kar-v6/contracts/plan.json', 'utf8'));
const proposition = readFileSync('examples/kar-v6/contracts/query.txt', 'utf8').trim();

const session = createKarSession({ image, graph });
const result = evaluateKar(session, { proposition, plan });
const explanation = explainKarResult(session, result);
const dossier = createKarDossier({ image, graph, plan, proposition });
const verification = verifyKar({ image, graph, proposition, plan, result });

Filesystem reads stay in your program. createKarSession and evaluateKar take bytes and objects. For the contracts plan, result.status is SATISFIED. There is no relevance score.

examples/kar-v6/operations/gap is UNSATISFIED_EVIDENCE_REQUIREMENTS. The plan asked for a permit the committed graph does not bind. That is abstention, not a finding that the proposition is false. The CLI exits 0. Verification of a matching abstention certificate also exits 0. A tampered certificate exits non-zero.

Terminalsh
knolo kar dossier verify examples/kar-v6/contracts/dossier

A matching dossier prints VERIFIED. A changed certificate, manifest, or the sentence Claim proven fails closed.