Manta Developers
GitHub
Menu

@manta-eu/horns

Reference for @manta-eu/horns 0.2.3, generated from its published types.

pnpm add @manta-eu/horns@0.2.3

Entry points

Classes

BindingCompileError

Extends

  • Error

Constructors

Constructor

new BindingCompileError(message): BindingCompileError

Parameters
message

string

Returns

BindingCompileError

Overrides

Error.constructor

Properties

cause?

optional cause?: unknown

Inherited from

Error.cause

message

message: string

Inherited from

Error.message

name

name: string

Inherited from

Error.name

stack?

optional stack?: string

Inherited from

Error.stack


JsonTreeError

Extends

  • Error

Constructors

Constructor

new JsonTreeError(message): JsonTreeError

Parameters
message

string

Returns

JsonTreeError

Overrides

Error.constructor

Properties

cause?

optional cause?: unknown

Inherited from

Error.cause

message

message: string

Inherited from

Error.message

name

name: string

Inherited from

Error.name

stack?

optional stack?: string

Inherited from

Error.stack


SparqlReadError

A read that reached the API and came back as something other than results.

Extends

  • Error

Constructors

Constructor

new SparqlReadError(message?): SparqlReadError

Parameters
message?

string

Returns

SparqlReadError

Inherited from

Error.constructor

Constructor

new SparqlReadError(message?, options?): SparqlReadError

Parameters
message?

string

options?

ErrorOptions

Returns

SparqlReadError

Inherited from

Error.constructor

Properties

cause?

optional cause?: unknown

Inherited from

Error.cause

message

message: string

Inherited from

Error.message

name

name: string

Inherited from

Error.name

stack?

optional stack?: string

Inherited from

Error.stack

Type Aliases

CompiledBinding

CompiledBinding = object

Properties

columns

columns: object[]

name

name: string

type

type: ColumnType

limit

limit: number

query

query: string


CompileInput

CompileInput = object

Properties

binding

binding: HornBinding

derivations

derivations: readonly HornDerivation[]

focus?

optional focus?: readonly string[]

lensRows?

optional lensRows?: LensRows

limitCap?

optional limitCap?: number

oneMoreRow?

optional oneMoreRow?: boolean

realm?

optional realm?: Realm

The realm whose prefixes a model-written query may lean on without declaring. The compiler is where such a query becomes SPARQL, so it is where the declarations go: a binding that compiled in a dry run and then failed at render — “Unknown prefix: rdfs” — was one call site that forgot.

resolveQuery?

optional resolveQuery?: (ref) => InlineBinding | undefined

Parameters
ref

LibraryRef

Returns

InlineBinding | undefined

variables?

optional variables?: Readonly<Record<string, { type: HornVariable["type"]; value: VariableValue; }>>


ComponentCatalog

ComponentCatalog = z.infer<typeof componentCatalogSchema>


ComponentManifestEntry

ComponentManifestEntry = z.infer<typeof componentManifestEntrySchema>


GraphSink

GraphSink = (triple) => void

Parameters

triple

Triple

Returns

void


GraphSource

GraphSource = object

Properties

objectsOf

objectsOf: (subject, predicate) => Term[]

The objects of predicate on subject, in the order the graph gave them.

Parameters
subject

Term

predicate

string

Returns

Term[]

typesOf

typesOf: (subject) => string[]

The rdf:type IRIs of subject.

Parameters
subject

Term

Returns

string[]


Horn

Horn = z.infer<typeof hornSchema>


HornAccent

HornAccent = typeof hornAccents[number]


HornAction

HornAction = z.infer<typeof hornActionSchema>


HornBinding

HornBinding = z.infer<typeof hornBindingSchema>


HornDerivation

HornDerivation = z.infer<typeof hornDerivationSchema>


HornFiles

HornFiles = Record<string, string>

A Horn as a folder, so one can be written and reviewed the way code is.

A written view is TSX, and a Horn document carries it as one escaped string on a JSON line: no highlighting, no formatter, no diff worth reading, and a mistake — a statement after a return, a bracket closed early — is invisible until it is drawn. On disk each view is the file it already is:

horn.json          the Horn, every written view's source taken out of it
views/<id>.tsx     that source, as a file an editor understands

Both directions are pure and take no filesystem, so a browser holding the files does the same thing a CLI does with a directory.

Reviews are deliberately not checked here. reviewed is the hash of the source somebody accepted, and what enforces it is the save boundary (reviewStateOf, and the route that refuses an unread or stale view). Editing views/standing.tsx in an editor leaves a hash that no longer matches, which that boundary reads as stale — the same answer it gives the Studio.


HornLayout

HornLayout = z.infer<typeof hornLayoutSchema>


HornRecordCard

HornRecordCard = z.infer<typeof hornRecordCardSchema>

The card a shape view declares, which recordCardSource compiles to a written view.


HornRender

HornRender = z.infer<typeof hornRenderSchema>


HornStyle

HornStyle = z.infer<typeof hornStyleSchema>


HornVariable

HornVariable = z.infer<typeof hornVariableSchema>


HornView

HornView = z.infer<typeof hornViewSchema>


ItemRevisionNode

ItemRevisionNode = object

Properties

dependencies

dependencies: LibraryDependency[]

kind

kind: LibraryItemKind

ref

ref: LibraryRef


LensRows

LensRows = "entity" | "value"


LibraryDependency

LibraryDependency = z.infer<typeof libraryDependencySchema>


LibraryItemKind

LibraryItemKind = typeof libraryItemKinds[number]


LibraryRef

LibraryRef = z.infer<typeof libraryRefSchema>


LockEntry

LockEntry = z.infer<typeof lockEntrySchema>


Lockfile

Lockfile = z.infer<typeof lockfileSchema>


LockProblem

LockProblem = { code: "missing-revision"; requiredBy: string; revision: string; } | { actual: string; code: "hash-mismatch"; pinned: string; revision: string; } | { actual: LibraryItemKind; code: "kind-mismatch"; pinned: LibraryItemKind; revision: string; } | { code: "conflicting-revisions"; item: string; revisions: string[]; } | { code: "cycle"; path: string[]; } | { code: "lock-drift"; missing: string[]; unexpected: string[]; }


LockResult

LockResult = { lock: Lockfile; ok: true; } | { ok: false; problems: LockProblem[]; }


OutdatedEntry

OutdatedEntry = object

Properties

item

item: string

kind

kind: LibraryItemKind

latest

latest: LibraryRef

pinned

pinned: LibraryRef


RevisionLookup

RevisionLookup = (revision) => ItemRevisionNode | undefined

Parameters

revision

string

Returns

ItemRevisionNode | undefined


RevisionSave

RevisionSave = object

Properties

baseRevision

baseRevision: string | undefined

The revision the editor was looking at. The write applies only while the Horn still shows it.

hornIri

hornIri: string

number

number: number

The same revision as a number, which is what the document itself carries and what orders revisions.

revision

revision: string

The revision being written.

slug

slug: string

The name a URL carries. It stays on the Horn, which every revision shares, because it never changes.

triples

triples: readonly Triple[]

The document, skolemized and stamped — exactly what revisionReadQuery returns.


ScreenshotSave

ScreenshotSave = object

Properties

capturedAt

capturedAt: string

When it was taken, which is what a card means by “as of”.

fileIri

fileIri: string

Where the picture was stored, which is the only address it has.

revision

revision: string

The revision the picture is of. A later revision draws differently and gets its own.


SparqlResults

SparqlResults = object

Properties

head: object

vars

vars: string[]

results

results: object

bindings

bindings: Record<string, SparqlTermValue>[]


SparqlSelect

SparqlSelect = (query, signal?) => Promise<SparqlResults>

Parameters

query

string

signal?

AbortSignal

Returns

Promise<SparqlResults>


SparqlTermValue

SparqlTermValue = object

Properties

datatype?

optional datatype?: string

type

type: "uri" | "literal" | "bnode" | "typed-literal"

value

value: string

xml:lang?

optional xml:lang?: string


Term

Term = object

Properties

datatype?

optional datatype?: object

value

value: string

termType

termType: string

value

value: string


Triple

Triple = object

Properties

object

object: Term

predicate

predicate: Term

subject

subject: Term


VariableValue

VariableValue = string | number | { end: string; start: string; } | null | undefined


WritePurpose

WritePurpose = { kind: "horn-save"; realm: Realm; } | { kind: "library-publish"; realm: Realm; } | { allowedClasses: readonly string[]; allowedPredicates: readonly string[]; kind: "action"; realm: Realm; }


WriteVerdict

WriteVerdict = { ok: true; } | { ok: false; reason: string; }

Variables

absoluteIri

const absoluteIri: RegExp


cardValueFormats

const cardValueFormats: readonly ["number", "integer", "percent", "compact"]


componentCatalogSchema

const componentCatalogSchema: z.ZodObject<{ catalogVersion: z.ZodLiteral<1>; components: z.ZodArray<z.ZodObject<{ appliesTo: z.ZodObject<{ actionShapes: z.ZodArray<z.ZodString>; classes: z.ZodArray<z.ZodString>; }, z.core.$strict>; export: z.ZodString; id: z.ZodString; input: z.ZodEnum<{ entity: "entity"; iri: "iri"; iris: "iris"; }>; module: z.ZodString; role: z.ZodEnum<{ action-card: "action-card"; entity-card: "entity-card"; entity-detail: "entity-detail"; entity-plural: "entity-plural"; generic-card: "generic-card"; }>; sandbox: z.ZodEnum<{ compatible: "compatible"; incompatible: "incompatible"; unverified: "unverified"; }>; stories: z.ZodArray<z.ZodString>; }, z.core.$strict>>; source: z.ZodObject<{ commit: z.ZodString; package: z.ZodString; repository: z.ZodString; }, z.core.$strict>; }, z.core.$strict>


componentInputs

const componentInputs: readonly ["entity", "iri", "iris"]


componentManifestEntrySchema

const componentManifestEntrySchema: z.ZodObject<{ appliesTo: z.ZodObject<{ actionShapes: z.ZodArray<z.ZodString>; classes: z.ZodArray<z.ZodString>; }, z.core.$strict>; export: z.ZodString; id: z.ZodString; input: z.ZodEnum<{ entity: "entity"; iri: "iri"; iris: "iris"; }>; module: z.ZodString; role: z.ZodEnum<{ action-card: "action-card"; entity-card: "entity-card"; entity-detail: "entity-detail"; entity-plural: "entity-plural"; generic-card: "generic-card"; }>; sandbox: z.ZodEnum<{ compatible: "compatible"; incompatible: "incompatible"; unverified: "unverified"; }>; stories: z.ZodArray<z.ZodString>; }, z.core.$strict>


componentRoles

const componentRoles: readonly ["entity-detail", "entity-plural", "entity-card", "action-card", "generic-card"]


contentHashSchema

const contentHashSchema: z.ZodString


coverageGraph

const coverageGraph: (realm) => string

Parameters

realm

Realm

Returns

string


graphRefusedMessage

const graphRefusedMessage: (graph) => string

Parameters

graph

string

Returns

string


gridColumns

const gridColumns: 12 = 12


hornAccents

const hornAccents: readonly ["blue", "orange", "green", "amber", "pink", "forest", "indigo", "red"]


hornActionSchema

const hornActionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ allowedClasses: z.ZodArray<z.ZodURL>; allowedPredicates: z.ZodArray<z.ZodURL>; confirm: z.ZodLiteral<true>; criteria: z.ZodOptional<z.ZodObject<{ ask: z.ZodString; }, z.core.$strip>>; delete: z.ZodOptional<z.ZodString>; id: z.ZodString; insert: z.ZodString; kind: z.ZodLiteral<"kg-update">; label: z.ZodString; params: z.ZodArray<z.ZodObject<{ classIri: z.ZodOptional<z.ZodURL>; id: z.ZodString; required: z.ZodBoolean; type: z.ZodEnum<{ date: "date"; enum: "enum"; iri: "iri"; number: "number"; string: "string"; }>; values: z.ZodOptional<z.ZodArray<z.ZodJSONSchema>>; }, z.core.$strip>>; where: z.ZodOptional<z.ZodString>; }, z.core.$strip>, z.ZodObject<{ actionShapeIri: z.ZodURL; confirm: z.ZodLiteral<true>; criteria: z.ZodOptional<z.ZodObject<{ ask: z.ZodString; }, z.core.$strip>>; id: z.ZodString; kind: z.ZodLiteral<"action-shape">; label: z.ZodString; mapping: z.ZodRecord<z.ZodString, z.ZodString>; operation: z.ZodEnum<{ addition: "addition"; update: "update"; }>; params: z.ZodArray<z.ZodObject<{ classIri: z.ZodOptional<z.ZodURL>; id: z.ZodString; required: z.ZodBoolean; type: z.ZodEnum<{ date: "date"; enum: "enum"; iri: "iri"; number: "number"; string: "string"; }>; values: z.ZodOptional<z.ZodArray<z.ZodJSONSchema>>; }, z.core.$strip>>; }, z.core.$strip>], "kind">


hornBindingSchema

const hornBindingSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ columns: z.ZodArray<z.ZodObject<{ name: z.ZodString; type: z.ZodEnum<{ boolean: "boolean"; date: "date"; iri: "iri"; number: "number"; string: "string"; }>; }, z.core.$strip>>; derivations: z.ZodArray<z.ZodString>; kind: z.ZodLiteral<"select">; limit: z.ZodNumber; params: z.ZodArray<z.ZodString>; sparql: z.ZodString; }, z.core.$strip>, z.ZodObject<{ classIri: z.ZodURL; derivations: z.ZodArray<z.ZodString>; fields: z.ZodArray<z.ZodObject<{ name: z.ZodString; path: z.ZodString; type: z.ZodEnum<{ boolean: "boolean"; date: "date"; iri: "iri"; number: "number"; string: "string"; }>; }, z.core.$strip>>; kind: z.ZodLiteral<"lens">; limit: z.ZodNumber; rows: z.ZodOptional<z.ZodEnum<{ entity: "entity"; value: "value"; }>>; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"query">; limit: z.ZodNumber; params: z.ZodArray<z.ZodString>; query: z.ZodObject<{ hash: z.ZodString; item: z.ZodURL; revision: z.ZodURL; }, z.core.$strict>; }, z.core.$strip>], "kind">


hornDerivationSchema

const hornDerivationSchema: z.ZodObject<{ appliesTo: z.ZodURL; datatype: z.ZodURL; id: z.ZodString; pattern: z.ZodString; predicateIri: z.ZodURL; promotedRuleIri: z.ZodOptional<z.ZodURL>; status: z.ZodEnum<{ materialized: "materialized"; query: "query"; staged: "staged"; }>; }, z.core.$strip>


hornDocumentFile

const hornDocumentFile: "horn.json" = "horn.json"


hornLayoutSchema

const hornLayoutSchema: z.ZodObject<{ columns: z.ZodLiteral<12>; items: z.ZodArray<z.ZodObject<{ h: z.ZodNumber; viewId: z.ZodString; w: z.ZodNumber; x: z.ZodNumber; y: z.ZodNumber; }, z.core.$strip>>; kind: z.ZodLiteral<"grid">; }, z.core.$strip>


hornRecordCardSchema

const hornRecordCardSchema: z.ZodObject<{ badges: z.ZodOptional<z.ZodArray<z.ZodString>>; currency: z.ZodOptional<z.ZodString>; fields: z.ZodArray<z.ZodString>; format: z.ZodOptional<z.ZodEnum<{ compact: "compact"; integer: "integer"; number: "number"; percent: "percent"; }>>; link: z.ZodOptional<z.ZodString>; subtitle: z.ZodOptional<z.ZodString>; title: z.ZodString; type: z.ZodLiteral<"record">; }, z.core.$strict>


hornRenderSchema

const hornRenderSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ component: z.ZodObject<{ hash: z.ZodString; item: z.ZodURL; revision: z.ZodURL; }, z.core.$strict>; kind: z.ZodLiteral<"component">; props: z.ZodJSONSchema; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"tsx">; reviewed: z.ZodOptional<z.ZodObject<{ at: z.ZodISODateTime; hash: z.ZodString; }, z.core.$strip>>; source: z.ZodString; }, z.core.$strip>], "kind">


horns

const horns: any


hornSchema

const hornSchema: z.ZodObject<{ about: z.ZodOptional<z.ZodArray<z.ZodURL>>; actions: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{ id: z.ZodString; ref: z.ZodObject<{ hash: z.ZodString; item: z.ZodURL; revision: z.ZodURL; }, z.core.$strict>; }, z.core.$strict>, z.ZodDiscriminatedUnion<[z.ZodObject<{ allowedClasses: z.ZodArray<…>; allowedPredicates: z.ZodArray<…>; confirm: z.ZodLiteral<…>; criteria: z.ZodOptional<…>; delete: z.ZodOptional<…>; id: z.ZodString; insert: z.ZodString; kind: z.ZodLiteral<…>; label: z.ZodString; params: z.ZodArray<…>; where: z.ZodOptional<…>; }, z.core.$strip>, z.ZodObject<{ actionShapeIri: z.ZodURL; confirm: z.ZodLiteral<…>; criteria: z.ZodOptional<…>; id: z.ZodString; kind: z.ZodLiteral<…>; label: z.ZodString; mapping: z.ZodRecord<…, …>; operation: z.ZodEnum<…>; params: z.ZodArray<…>; }, z.core.$strip>], "kind">]>>; audience: z.ZodOptional<z.ZodString>; baseRevision: z.ZodOptional<z.ZodNumber>; datastoreId: z.ZodString; dependencies: z.ZodArray<z.ZodObject<{ kind: z.ZodEnum<{ action: "action"; component: "component"; derivation: "derivation"; horn: "horn"; query: "query"; view: "view"; }>; ref: z.ZodObject<{ hash: z.ZodString; item: z.ZodURL; revision: z.ZodURL; }, z.core.$strict>; }, z.core.$strict>>; derivations: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{ id: z.ZodString; ref: z.ZodObject<{ hash: z.ZodString; item: z.ZodURL; revision: z.ZodURL; }, z.core.$strict>; }, z.core.$strict>, z.ZodObject<{ appliesTo: z.ZodURL; datatype: z.ZodURL; id: z.ZodString; pattern: z.ZodString; predicateIri: z.ZodURL; promotedRuleIri: z.ZodOptional<z.ZodURL>; status: z.ZodEnum<{ materialized: "materialized"; query: "query"; staged: "staged"; }>; }, z.core.$strip>]>>; iri: z.ZodURL; layout: z.ZodObject<{ columns: z.ZodLiteral<12>; items: z.ZodArray<z.ZodObject<{ h: z.ZodNumber; viewId: z.ZodString; w: z.ZodNumber; x: z.ZodNumber; y: z.ZodNumber; }, z.core.$strip>>; kind: z.ZodLiteral<"grid">; }, z.core.$strip>; lock: z.ZodObject<{ entries: z.ZodArray<z.ZodObject<{ kind: z.ZodEnum<{ action: "action"; component: "component"; derivation: "derivation"; horn: "horn"; query: "query"; view: "view"; }>; ref: z.ZodObject<{ hash: z.ZodString; item: z.ZodURL; revision: z.ZodURL; }, z.core.$strict>; requiredBy: z.ZodArray<z.ZodURL>; }, z.core.$strict>>; lockVersion: z.ZodLiteral<1>; }, z.core.$strict>; realm: z.ZodEnum<{ hiremanta-com: "hiremanta-com"; journey-travel: "journey-travel"; }>; revision: z.ZodNumber; runtime: z.ZodObject<{ kit: z.ZodString; }, z.core.$strip>; schemaVersion: z.ZodLiteral<1>; slug: z.ZodString; style: z.ZodOptional<z.ZodObject<{ accent: z.ZodOptional<z.ZodEnum<{ amber: "amber"; blue: "blue"; forest: "forest"; green: "green"; indigo: "indigo"; orange: "orange"; pink: "pink"; red: "red"; }>>; density: z.ZodOptional<z.ZodEnum<{ comfortable: "comfortable"; compact: "compact"; }>>; radius: z.ZodOptional<z.ZodEnum<{ round: "round"; sharp: "sharp"; soft: "soft"; }>>; theme: z.ZodOptional<z.ZodEnum<{ dark: "dark"; light: "light"; }>>; }, z.core.$strict>>; summary: z.ZodOptional<z.ZodString>; title: z.ZodString; variables: z.ZodArray<z.ZodObject<{ default: z.ZodOptional<z.ZodJSONSchema>; id: z.ZodString; label: z.ZodString; options: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{ values: …; }, z.core.$strip>, z.ZodObject<{ binding: …; }, z.core.$strip>]>>; type: z.ZodEnum<{ date: "date"; dateRange: "dateRange"; enum: "enum"; iri: "iri"; number: "number"; string: "string"; }>; urlParam: z.ZodOptional<z.ZodString>; }, z.core.$strip>>; views: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{ id: z.ZodString; ref: z.ZodObject<{ hash: z.ZodString; item: z.ZodURL; revision: z.ZodURL; }, z.core.$strict>; }, z.core.$strict>, z.ZodObject<{ binding: z.ZodDiscriminatedUnion<[z.ZodObject<…, …>, z.ZodObject<…, …>, z.ZodObject<…, …>], "kind">; emits: z.ZodOptional<z.ZodArray<z.ZodObject<…, …>>>; id: z.ZodString; render: z.ZodDiscriminatedUnion<[z.ZodObject<…, …>, z.ZodObject<…, …>], "kind">; title: z.ZodString; }, z.core.$strip>]>>; }, z.core.$strip>


hornsGraph

const hornsGraph: (realm) => string

Parameters

realm

Realm

Returns

string


hornsLibraryGraph

const hornsLibraryGraph: (realm) => string

Parameters

realm

Realm

Returns

string


hornsNamespaceIri

const hornsNamespaceIri: "https://ns.manta.eu/horns#" = "https://ns.manta.eu/horns#"


hornStyleSchema

const hornStyleSchema: z.ZodObject<{ accent: z.ZodOptional<z.ZodEnum<{ amber: "amber"; blue: "blue"; forest: "forest"; green: "green"; indigo: "indigo"; orange: "orange"; pink: "pink"; red: "red"; }>>; density: z.ZodOptional<z.ZodEnum<{ comfortable: "comfortable"; compact: "compact"; }>>; radius: z.ZodOptional<z.ZodEnum<{ round: "round"; sharp: "sharp"; soft: "soft"; }>>; theme: z.ZodOptional<z.ZodEnum<{ dark: "dark"; light: "light"; }>>; }, z.core.$strict>


hornVariableSchema

const hornVariableSchema: z.ZodObject<{ default: z.ZodOptional<z.ZodJSONSchema>; id: z.ZodString; label: z.ZodString; options: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{ values: z.ZodArray<z.ZodJSONSchema>; }, z.core.$strip>, z.ZodObject<{ binding: z.ZodDiscriminatedUnion<[z.ZodObject<…, …>, z.ZodObject<…, …>, z.ZodObject<…, …>], "kind">; }, z.core.$strip>]>>; type: z.ZodEnum<{ date: "date"; dateRange: "dateRange"; enum: "enum"; iri: "iri"; number: "number"; string: "string"; }>; urlParam: z.ZodOptional<z.ZodString>; }, z.core.$strip>


hornViewSchema

const hornViewSchema: z.ZodObject<{ binding: z.ZodDiscriminatedUnion<[z.ZodObject<{ columns: z.ZodArray<z.ZodObject<{ name: z.ZodString; type: z.ZodEnum<{ boolean: …; date: …; iri: …; number: …; string: …; }>; }, z.core.$strip>>; derivations: z.ZodArray<z.ZodString>; kind: z.ZodLiteral<"select">; limit: z.ZodNumber; params: z.ZodArray<z.ZodString>; sparql: z.ZodString; }, z.core.$strip>, z.ZodObject<{ classIri: z.ZodURL; derivations: z.ZodArray<z.ZodString>; fields: z.ZodArray<z.ZodObject<{ name: z.ZodString; path: z.ZodString; type: z.ZodEnum<{ boolean: …; date: …; iri: …; number: …; string: …; }>; }, z.core.$strip>>; kind: z.ZodLiteral<"lens">; limit: z.ZodNumber; rows: z.ZodOptional<z.ZodEnum<{ entity: "entity"; value: "value"; }>>; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"query">; limit: z.ZodNumber; params: z.ZodArray<z.ZodString>; query: z.ZodObject<{ hash: z.ZodString; item: z.ZodURL; revision: z.ZodURL; }, z.core.$strict>; }, z.core.$strip>], "kind">; emits: z.ZodOptional<z.ZodArray<z.ZodObject<{ event: z.ZodString; setsVariable: z.ZodString; }, z.core.$strip>>>; id: z.ZodString; render: z.ZodDiscriminatedUnion<[z.ZodObject<{ component: z.ZodObject<{ hash: z.ZodString; item: z.ZodURL; revision: z.ZodURL; }, z.core.$strict>; kind: z.ZodLiteral<"component">; props: z.ZodJSONSchema; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"tsx">; reviewed: z.ZodOptional<z.ZodObject<{ at: z.ZodISODateTime; hash: z.ZodString; }, z.core.$strip>>; source: z.ZodString; }, z.core.$strip>], "kind">; title: z.ZodString; }, z.core.$strip>


libraryDependencySchema

const libraryDependencySchema: z.ZodObject<{ kind: z.ZodEnum<{ action: "action"; component: "component"; derivation: "derivation"; horn: "horn"; query: "query"; view: "view"; }>; ref: z.ZodObject<{ hash: z.ZodString; item: z.ZodURL; revision: z.ZodURL; }, z.core.$strict>; }, z.core.$strict>


libraryItemKinds

const libraryItemKinds: readonly ["component", "query", "derivation", "view", "action", "horn"]


libraryRefSchema

const libraryRefSchema: z.ZodObject<{ hash: z.ZodString; item: z.ZodURL; revision: z.ZodURL; }, z.core.$strict>


lockEntrySchema

const lockEntrySchema: z.ZodObject<{ kind: z.ZodEnum<{ action: "action"; component: "component"; derivation: "derivation"; horn: "horn"; query: "query"; view: "view"; }>; ref: z.ZodObject<{ hash: z.ZodString; item: z.ZodURL; revision: z.ZodURL; }, z.core.$strict>; requiredBy: z.ZodArray<z.ZodURL>; }, z.core.$strict>


lockfileSchema

const lockfileSchema: z.ZodObject<{ entries: z.ZodArray<z.ZodObject<{ kind: z.ZodEnum<{ action: "action"; component: "component"; derivation: "derivation"; horn: "horn"; query: "query"; view: "view"; }>; ref: z.ZodObject<{ hash: z.ZodString; item: z.ZodURL; revision: z.ZodURL; }, z.core.$strict>; requiredBy: z.ZodArray<z.ZodURL>; }, z.core.$strict>>; lockVersion: z.ZodLiteral<1>; }, z.core.$strict>


maxBindingLimit

const maxBindingLimit: 1000 = 1000


maxBindingRows

const maxBindingRows: 1000 = 1000


maxRecordFields

const maxRecordFields: 12 = 12


maxTsxSource

const maxTsxSource: 8000 = 8000


ontologyGraph

const ontologyGraph: (realm) => string

Parameters

realm

Realm

Returns

string


rdfoxGraphBase

const rdfoxGraphBase: "https://rdfox.com/default-base-iri/" = "https://rdfox.com/default-base-iri/"


rulesGraph

const rulesGraph: "https://rdfox.com/default-base-iri/rules" = "https://rdfox.com/default-base-iri/rules"


shaclGraph

const shaclGraph: "https://rdfox.com/default-base-iri/shacl" = "https://rdfox.com/default-base-iri/shacl"


sparqlResultsSchema

const sparqlResultsSchema: z.ZodType<SparqlResults>

Functions

canonicalForm()

canonicalForm(triples): string

Parameters

triples

readonly Triple[]

Returns

string


checkWrite()

checkWrite(update, purpose): WriteVerdict

Parameters

update

string

purpose

WritePurpose

Returns

WriteVerdict


compileBinding()

compileBinding(input): CompiledBinding

Parameters

input

CompileInput

Returns

CompiledBinding


componentsForClass()

componentsForClass(catalog, realm, classIri): object[]

Parameters

catalog
catalogVersion

1

components

object[]

source

{ commit: string; package: string; repository: string; }

source.commit

string

source.package

string

source.repository

string

realm

"hiremanta-com" | "journey-travel"

classIri

string

Returns

object[]


contentHash()

contentHash(triples): Promise<string>

Parameters

triples

readonly Triple[]

Returns

Promise<string>


currentRevisionQuery()

currentRevisionQuery(realm, hornIri): string

The revision a Horn currently shows, or nothing if it has never been saved.

Parameters

realm

"hiremanta-com" | "journey-travel"

hornIri

string

Returns

string


dependentsOf()

dependentsOf(item, revisions): ItemRevisionNode[]

Parameters

item

string

revisions

readonly ItemRevisionNode[]

Returns

ItemRevisionNode[]


deskolemize()

deskolemize(triples, revision): Triple[]

The inverse. The stamp is the store’s, not the document’s, so it is dropped.

Parameters

triples

readonly Triple[]

revision

string

Returns

Triple[]


hornBySlugQuery()

hornBySlugQuery(realm, slug): string

The Horn with a slug and the revision it shows: the IRI is opaque, so the slug is the only name a URL has. The revision’s number comes with it, because a save writes the next one and the store owns that count.

Parameters

realm

"hiremanta-com" | "journey-travel"

slug

string

Returns

string


hornFilesFrom()

hornFilesFrom(entries, root?): HornFiles

The folder a host holds, from whatever its bundler handed it.

A vite host reads its own Horn with import.meta.glob("./horn/**", { query: "?raw", eager: true }), which keys every file by a path relative to the project rather than to the Horn. This takes the prefix off, so what comes back is the folder hornFromFiles expects. No filesystem: the host’s build already did the reading, and a worker has none.

Parameters

entries

Readonly<Record<string, string>>

root?

string

Returns

HornFiles


hornFromFiles()

hornFromFiles(files): object

The Horn a folder holds. Refuses a folder that is missing a file it names, rather than drawing a gap.

Parameters

files

HornFiles

Returns

object

about?

optional about?: string[]

actions

actions: ({ id: string; ref: { hash: string; item: string; revision: string; }; } | { allowedClasses: string[]; allowedPredicates: string[]; confirm: true; criteria?: { ask: string; }; delete?: string; id: string; insert: string; kind: "kg-update"; label: string; params: object[]; where?: string; } | { actionShapeIri: string; confirm: true; criteria?: { ask: string; }; id: string; kind: "action-shape"; label: string; mapping: z.ZodRecord<z.ZodString, z.ZodString>; operation: "addition" | "update"; params: object[]; })[]

audience?

optional audience?: string

baseRevision?

optional baseRevision?: number

datastoreId

datastoreId: string

dependencies

dependencies: object[]

derivations

derivations: ({ id: string; ref: { hash: string; item: string; revision: string; }; } | { appliesTo: string; datatype: string; id: string; pattern: string; predicateIri: string; promotedRuleIri?: string; status: "query" | "staged" | "materialized"; })[]

iri

iri: string

layout

layout: object

layout.columns

columns: 12

layout.items

items: object[]

layout.kind

kind: "grid"

lock

lock: object

lock.entries

entries: object[]

lock.lockVersion

lockVersion: 1

realm

realm: "hiremanta-com" | "journey-travel"

revision

revision: number

runtime

runtime: object

runtime.kit

kit: string

schemaVersion

schemaVersion: 1

slug

slug: string

style?

optional style?: object

style.accent?

optional accent?: "blue" | "orange" | "green" | "amber" | "pink" | "forest" | "indigo" | "red"

style.density?

optional density?: "compact" | "comfortable"

style.radius?

optional radius?: "sharp" | "soft" | "round"

style.theme?

optional theme?: "light" | "dark"

summary?

optional summary?: string

title

title: string

variables

variables: object[]

views

views: ({ id: string; ref: { hash: string; item: string; revision: string; }; } | { binding: { columns: object[]; derivations: string[]; kind: "select"; limit: number; params: string[]; sparql: string; } | { classIri: string; derivations: string[]; fields: object[]; kind: "lens"; limit: number; rows?: "entity" | "value"; } | { kind: "query"; limit: number; params: string[]; query: { hash: string; item: string; revision: string; }; }; emits?: object[]; id: string; render: { component: { hash: string; item: string; revision: string; }; kind: "component"; props: JSONType; } | { kind: "tsx"; reviewed?: { at: string; hash: string; }; source: string; }; title: string; })[]


hornFromTriples()

hornFromTriples(source, subject, hornIri?): { about?: string[]; actions: ({ id: string; ref: { hash: string; item: string; revision: string; }; } | { allowedClasses: string[]; allowedPredicates: string[]; confirm: true; criteria?: { ask: string; }; delete?: string; id: string; insert: string; kind: "kg-update"; label: string; params: object[]; where?: string; } | { actionShapeIri: string; confirm: true; criteria?: { ask: string; }; id: string; kind: "action-shape"; label: string; mapping: z.ZodRecord<z.ZodString, z.ZodString>; operation: "addition" | "update"; params: object[]; })[]; audience?: string; baseRevision?: number; datastoreId: string; dependencies: object[]; derivations: ({ id: string; ref: { hash: string; item: string; revision: string; }; } | { appliesTo: string; datatype: string; id: string; pattern: string; predicateIri: string; promotedRuleIri?: string; status: "query" | "staged" | "materialized"; })[]; iri: string; layout: { columns: 12; items: object[]; kind: "grid"; }; lock: { entries: object[]; lockVersion: 1; }; realm: "hiremanta-com" | "journey-travel"; revision: number; runtime: { kit: string; }; schemaVersion: 1; slug: string; style?: { accent?: "blue" | "orange" | "green" | "amber" | "pink" | "forest" | "indigo" | "red"; density?: "compact" | "comfortable"; radius?: "sharp" | "soft" | "round"; theme?: "light" | "dark"; }; summary?: string; title: string; variables: object[]; views: ({ id: string; ref: { hash: string; item: string; revision: string; }; } | { binding: { columns: object[]; derivations: string[]; kind: "select"; limit: number; params: string[]; sparql: string; } | { classIri: string; derivations: string[]; fields: object[]; kind: "lens"; limit: number; rows?: "entity" | "value"; } | { kind: "query"; limit: number; params: string[]; query: { hash: string; item: string; revision: string; }; }; emits?: object[]; id: string; render: { component: { hash: string; item: string; revision: string; }; kind: "component"; props: JSONType; } | { kind: "tsx"; reviewed?: { at: string; hash: string; }; source: string; }; title: string; })[]; } | undefined

The Horn whose document is rooted at subject. hornIri is the Horn’s identity when the root is not it — a stored revision roots its document at the revision, so revisions never share a node.

Parameters

source

GraphSource

subject

Term

hornIri?

string

Returns

{ about?: string[]; actions: ({ id: string; ref: { hash: string; item: string; revision: string; }; } | { allowedClasses: string[]; allowedPredicates: string[]; confirm: true; criteria?: { ask: string; }; delete?: string; id: string; insert: string; kind: "kg-update"; label: string; params: object[]; where?: string; } | { actionShapeIri: string; confirm: true; criteria?: { ask: string; }; id: string; kind: "action-shape"; label: string; mapping: z.ZodRecord<z.ZodString, z.ZodString>; operation: "addition" | "update"; params: object[]; })[]; audience?: string; baseRevision?: number; datastoreId: string; dependencies: object[]; derivations: ({ id: string; ref: { hash: string; item: string; revision: string; }; } | { appliesTo: string; datatype: string; id: string; pattern: string; predicateIri: string; promotedRuleIri?: string; status: "query" | "staged" | "materialized"; })[]; iri: string; layout: { columns: 12; items: object[]; kind: "grid"; }; lock: { entries: object[]; lockVersion: 1; }; realm: "hiremanta-com" | "journey-travel"; revision: number; runtime: { kit: string; }; schemaVersion: 1; slug: string; style?: { accent?: "blue" | "orange" | "green" | "amber" | "pink" | "forest" | "indigo" | "red"; density?: "compact" | "comfortable"; radius?: "sharp" | "soft" | "round"; theme?: "light" | "dark"; }; summary?: string; title: string; variables: object[]; views: ({ id: string; ref: { hash: string; item: string; revision: string; }; } | { binding: { columns: object[]; derivations: string[]; kind: "select"; limit: number; params: string[]; sparql: string; } | { classIri: string; derivations: string[]; fields: object[]; kind: "lens"; limit: number; rows?: "entity" | "value"; } | { kind: "query"; limit: number; params: string[]; query: { hash: string; item: string; revision: string; }; }; emits?: object[]; id: string; render: { component: { hash: string; item: string; revision: string; }; kind: "component"; props: JSONType; } | { kind: "tsx"; reviewed?: { at: string; hash: string; }; source: string; }; title: string; })[]; } | undefined


hornRevisionIri()

hornRevisionIri(hornIri, revision): string

One revision of one Horn. Revisions are append-only, so this is a name and not a location.

Parameters

hornIri

string

revision

number

Returns

string


hornsAboutQuery()

hornsAboutQuery(realm, about): string

The Horns that say they are about this IRI, newest revision each.

What a host embedding beside a rule or an action plan has: the thing’s IRI, never a slug. about is an rdf:List, so the match walks it rather than comparing one object.

Parameters

realm

"hiremanta-com" | "journey-travel"

about

string

Returns

string


hornsInDatastoreQuery()

hornsInDatastoreQuery(realm): string

Every Horn in a datastore, by slug. Revisions coexist, so the title is read through the revision the Horn currently shows — a renamed Horn has both titles in the graph and only one of them is current.

Parameters

realm

"hiremanta-com" | "journey-travel"

Returns

string


hornSources()

hornSources(horn, realm): string[]

The systems a Horn draws on, in the order they are named above, so two Horns over the same data list it the same way. A Horn reading only what Manta’s own rules work out names no system, which is the honest answer.

Parameters

horn
about?

string[]

actions

({ id: string; ref: { hash: string; item: string; revision: string; }; } | { allowedClasses: string[]; allowedPredicates: string[]; confirm: true; criteria?: { ask: string; }; delete?: string; id: string; insert: string; kind: "kg-update"; label: string; params: object[]; where?: string; } | { actionShapeIri: string; confirm: true; criteria?: { ask: string; }; id: string; kind: "action-shape"; label: string; mapping: z.ZodRecord<z.ZodString, z.ZodString>; operation: "addition" | "update"; params: object[]; })[]

audience?

string

baseRevision?

number

datastoreId

string

dependencies

object[]

derivations

({ id: string; ref: { hash: string; item: string; revision: string; }; } | { appliesTo: string; datatype: string; id: string; pattern: string; predicateIri: string; promotedRuleIri?: string; status: "query" | "staged" | "materialized"; })[]

iri

string

layout

{ columns: 12; items: object[]; kind: "grid"; }

layout.columns

12

layout.items

object[]

layout.kind

"grid"

lock

{ entries: object[]; lockVersion: 1; }

lock.entries

object[]

lock.lockVersion

1

realm

"hiremanta-com" | "journey-travel"

revision

number

runtime

{ kit: string; }

runtime.kit

string

schemaVersion

1

slug

string

style?

{ accent?: "blue" | "orange" | "green" | "amber" | "pink" | "forest" | "indigo" | "red"; density?: "compact" | "comfortable"; radius?: "sharp" | "soft" | "round"; theme?: "light" | "dark"; }

style.accent?

"blue" | "orange" | "green" | "amber" | "pink" | "forest" | "indigo" | "red"

style.density?

"compact" | "comfortable"

style.radius?

"sharp" | "soft" | "round"

style.theme?

"light" | "dark"

summary?

string

title

string

variables

object[]

views

({ id: string; ref: { hash: string; item: string; revision: string; }; } | { binding: { columns: object[]; derivations: string[]; kind: "select"; limit: number; params: string[]; sparql: string; } | { classIri: string; derivations: string[]; fields: object[]; kind: "lens"; limit: number; rows?: "entity" | "value"; } | { kind: "query"; limit: number; params: string[]; query: { hash: string; item: string; revision: string; }; }; emits?: object[]; id: string; render: { component: { hash: string; item: string; revision: string; }; kind: "component"; props: JSONType; } | { kind: "tsx"; reviewed?: { at: string; hash: string; }; source: string; }; title: string; })[]

realm

"hiremanta-com" | "journey-travel"

Returns

string[]


hornToFiles()

hornToFiles(horn): HornFiles

The folder a Horn is written as.

Parameters

horn
about?

string[]

actions

({ id: string; ref: { hash: string; item: string; revision: string; }; } | { allowedClasses: string[]; allowedPredicates: string[]; confirm: true; criteria?: { ask: string; }; delete?: string; id: string; insert: string; kind: "kg-update"; label: string; params: object[]; where?: string; } | { actionShapeIri: string; confirm: true; criteria?: { ask: string; }; id: string; kind: "action-shape"; label: string; mapping: z.ZodRecord<z.ZodString, z.ZodString>; operation: "addition" | "update"; params: object[]; })[]

audience?

string

baseRevision?

number

datastoreId

string

dependencies

object[]

derivations

({ id: string; ref: { hash: string; item: string; revision: string; }; } | { appliesTo: string; datatype: string; id: string; pattern: string; predicateIri: string; promotedRuleIri?: string; status: "query" | "staged" | "materialized"; })[]

iri

string

layout

{ columns: 12; items: object[]; kind: "grid"; }

layout.columns

12

layout.items

object[]

layout.kind

"grid"

lock

{ entries: object[]; lockVersion: 1; }

lock.entries

object[]

lock.lockVersion

1

realm

"hiremanta-com" | "journey-travel"

revision

number

runtime

{ kit: string; }

runtime.kit

string

schemaVersion

1

slug

string

style?

{ accent?: "blue" | "orange" | "green" | "amber" | "pink" | "forest" | "indigo" | "red"; density?: "compact" | "comfortable"; radius?: "sharp" | "soft" | "round"; theme?: "light" | "dark"; }

style.accent?

"blue" | "orange" | "green" | "amber" | "pink" | "forest" | "indigo" | "red"

style.density?

"compact" | "comfortable"

style.radius?

"sharp" | "soft" | "round"

style.theme?

"light" | "dark"

summary?

string

title

string

variables

object[]

views

({ id: string; ref: { hash: string; item: string; revision: string; }; } | { binding: { columns: object[]; derivations: string[]; kind: "select"; limit: number; params: string[]; sparql: string; } | { classIri: string; derivations: string[]; fields: object[]; kind: "lens"; limit: number; rows?: "entity" | "value"; } | { kind: "query"; limit: number; params: string[]; query: { hash: string; item: string; revision: string; }; }; emits?: object[]; id: string; render: { component: { hash: string; item: string; revision: string; }; kind: "component"; props: JSONType; } | { kind: "tsx"; reviewed?: { at: string; hash: string; }; source: string; }; title: string; })[]

Returns

HornFiles


hornToTriples()

hornToTriples(horn, subject, sink): void

Parameters

horn
about?

string[]

actions

({ id: string; ref: { hash: string; item: string; revision: string; }; } | { allowedClasses: string[]; allowedPredicates: string[]; confirm: true; criteria?: { ask: string; }; delete?: string; id: string; insert: string; kind: "kg-update"; label: string; params: object[]; where?: string; } | { actionShapeIri: string; confirm: true; criteria?: { ask: string; }; id: string; kind: "action-shape"; label: string; mapping: z.ZodRecord<z.ZodString, z.ZodString>; operation: "addition" | "update"; params: object[]; })[]

audience?

string

baseRevision?

number

datastoreId

string

dependencies

object[]

derivations

({ id: string; ref: { hash: string; item: string; revision: string; }; } | { appliesTo: string; datatype: string; id: string; pattern: string; predicateIri: string; promotedRuleIri?: string; status: "query" | "staged" | "materialized"; })[]

iri

string

layout

{ columns: 12; items: object[]; kind: "grid"; }

layout.columns

12

layout.items

object[]

layout.kind

"grid"

lock

{ entries: object[]; lockVersion: 1; }

lock.entries

object[]

lock.lockVersion

1

realm

"hiremanta-com" | "journey-travel"

revision

number

runtime

{ kit: string; }

runtime.kit

string

schemaVersion

1

slug

string

style?

{ accent?: "blue" | "orange" | "green" | "amber" | "pink" | "forest" | "indigo" | "red"; density?: "compact" | "comfortable"; radius?: "sharp" | "soft" | "round"; theme?: "light" | "dark"; }

style.accent?

"blue" | "orange" | "green" | "amber" | "pink" | "forest" | "indigo" | "red"

style.density?

"compact" | "comfortable"

style.radius?

"sharp" | "soft" | "round"

style.theme?

"light" | "dark"

summary?

string

title

string

variables

object[]

views

({ id: string; ref: { hash: string; item: string; revision: string; }; } | { binding: { columns: object[]; derivations: string[]; kind: "select"; limit: number; params: string[]; sparql: string; } | { classIri: string; derivations: string[]; fields: object[]; kind: "lens"; limit: number; rows?: "entity" | "value"; } | { kind: "query"; limit: number; params: string[]; query: { hash: string; item: string; revision: string; }; }; emits?: object[]; id: string; render: { component: { hash: string; item: string; revision: string; }; kind: "component"; props: JSONType; } | { kind: "tsx"; reviewed?: { at: string; hash: string; }; source: string; }; title: string; })[]

subject

Term

sink

GraphSink

Returns

void


hornViewFile()

hornViewFile(viewId): string

Parameters

viewId

string

Returns

string


iri()

iri(value): Term

Parameters

value

string

Returns

Term


isAbsoluteIri()

isAbsoluteIri(value): boolean

Parameters

value

string

Returns

boolean


isRecord()

isRecord(value): value is Record<string, unknown>

Parameters

value

unknown

Returns

value is Record<string, unknown>


isString()

isString(value): value is string

Parameters

value

unknown

Returns

value is string


itemLookup()

itemLookup(nodes): RevisionLookup

A RevisionLookup over the realm library: what resolveLock and verifyLock walk.

Parameters

nodes

ReadonlyMap<string, ItemRevisionNode>

Returns

RevisionLookup


jsonFromTriples()

jsonFromTriples(subject, source): JsonValue | undefined

Parameters

subject

Term

source

GraphSource

Returns

JsonValue | undefined


jsonToTriples()

jsonToTriples(value, subject, sink, path?): void

Parameters

value

JsonValue

subject

Term

sink

GraphSink

path?

string

Returns

void


jsonValueAsTerm()

jsonValueAsTerm(value, sink, path?): Term

A JSON value in a slot: a branch becomes a node, a leaf becomes the literal it is.

Parameters

value

JsonValue

sink

GraphSink

path?

string

Returns

Term


legacyRevisionTriples()

legacyRevisionTriples(triples, args): Triple[]

A revision saved before each revision’s document had a root of its own. Its root was the Horn’s IRI, which every revision shares, so once a Horn had a second revision that root carried both revisions’ links — two views lists, two numbers — and reading one revision followed the other’s list into nodes it did not return. This keeps the root’s links into this revision’s own nodes, and its own number, and drops the rest. Saves no longer write that way (revisionDocumentRoot); this is for what is already stored.

Parameters

triples

readonly Triple[]

args
number

number

revision

string

root

string

Returns

Triple[]


libraryItemsQuery()

libraryItemsQuery(realm): string

Parameters

realm

"hiremanta-com" | "journey-travel"

Returns

string


mintHornIri()

mintHornIri(): string

A Horn’s IRI: opaque, because a Horn is addressed by its slug and its IRI should say nothing about it. A Horn can therefore be renamed without its identity moving.

Returns

string


outdatedEntries()

outdatedEntries(lock, latestRevisionOf): OutdatedEntry[]

Parameters

lock
entries

object[]

lockVersion

1

latestRevisionOf

(item) => { hash: string; item: string; revision: string; } | undefined

Returns

OutdatedEntry[]


protectedGraphs()

protectedGraphs(realm): readonly string[]

Parameters

realm

"hiremanta-com" | "journey-travel"

Returns

readonly string[]


readItemRevisions()

readItemRevisions(results): Map<string, ItemRevisionNode>

Keyed by revision IRI, which is what a pin names. A row missing anything a pin needs is dropped: half a revision in the library is worse than none, because a lock resolved against it would look checked.

Parameters

results

SparqlResults

Returns

Map<string, ItemRevisionNode>


resolveLock()

resolveLock(root, direct, lookup): LockResult

Parameters

root

string

direct

readonly object[]

lookup

RevisionLookup

Returns

LockResult


revisionReadQuery()

revisionReadQuery(realm, revision): string

One revision, whole: skolemizing put every node under the revision IRI, so one pattern reaches all of them. A SELECT rather than a CONSTRUCT because the read transport asks for sparql-results+json.

Parameters

realm

"hiremanta-com" | "journey-travel"

revision

string

Returns

string


revisionSaveUpdate()

revisionSaveUpdate(realm, save): string

Append a revision and point the Horn at it. Guarded on baseRevision, so two editors who opened the same revision cannot both win: the loser’s WHERE matches nothing and its insert lands beside a pointer it did not move. The caller detects that by reading the pointer back — §10’s conflict.

Parameters

realm

"hiremanta-com" | "journey-travel"

save

RevisionSave

Returns

string


screenshotSaveUpdate()

screenshotSaveUpdate(realm, save): string

Remember the picture taken of a revision. Written unstamped — no inRevision — so it stays out of the document a revisionReadQuery reads back: a picture is a fact about a revision, not part of it, and stamping it would change the content hash of a document nobody edited.

Parameters

realm

"hiremanta-com" | "journey-travel"

save

ScreenshotSave

Returns

string


skolemIri()

skolemIri(revision, label): string

The IRI a path-labelled node takes under a revision. The revision IRI must not end in a slash.

Parameters

revision

string

label

string

Returns

string


skolemize()

skolemize(triples, revision): Triple[]

Every blank node becomes an IRI under revision; every subject is stamped with horns:inRevision.

Parameters

triples

readonly Triple[]

revision

string

Returns

Triple[]


sourceOf()

sourceOf(triples): GraphSource

A read side over triples in hand, which is what a store’s answer becomes once it is parsed.

Parameters

triples

readonly Triple[]

Returns

GraphSource


sparqlResultsOfGraphqlField()

sparqlResultsOfGraphqlField(field): SparqlResults

SparqlResults from the GraphQL field, or a thrown SparqlReadError.

A resolver failure arrives as a string on a 200, so that channel is checked before the shape. vars is nullable here and required in sparqlResultsSchema: it defaults to [] only when there are no bindings to describe, because dryRunProblems reads empty vars as “cannot tell” and would skip its missing-column check rather than report a malformed answer.

Parameters

field

unknown

Returns

SparqlResults


sparqlVariableName()

sparqlVariableName(id): string

Parameters

id

string

Returns

string


termText()

termText(term): string

One term as SPARQL. A blank node is refused: a revision is serialized after skolemizing.

Parameters

term

Term

Returns

string


toVariableValue()

toVariableValue(value): VariableValue

Parameters

value

unknown

Returns

VariableValue


triplesOfResults()

triplesOfResults(bindings): Triple[]

The triples a revisionReadQuery answered with. A SPARQL result carries each term’s own type.

Parameters

bindings

readonly Record<string, { datatype?: string; type: string; value: string; }>[]

Returns

Triple[]


verifyLock()

verifyLock(root, direct, lock, lookup): { ok: true; } | { ok: false; problems: LockProblem[]; }

Parameters

root

string

direct

readonly object[]

lock
entries

object[]

lockVersion

1

lookup

RevisionLookup

Returns

{ ok: true; } | { ok: false; problems: LockProblem[]; }

References

compactIri

Re-exports compactIri


expandCurie

Re-exports expandCurie


isRealm

Re-exports isRealm


parseRealm

Re-exports parseRealm


prefixHint

Re-exports prefixHint


Realm

Re-exports Realm


realmEnv

Re-exports realmEnv


realmNamespace

Re-exports realmNamespace


realmNamespaces

Re-exports realmNamespaces


realms

Re-exports realms


realmShimScript

Re-exports realmShimScript


realmVocabularyRoot

Re-exports realmVocabularyRoot


sharedNamespaces

Re-exports sharedNamespaces


withRealmPrefixes

Re-exports withRealmPrefixes