@manta-eu/horns/render
Reference for @manta-eu/horns/render in @manta-eu/horns 0.2.3.
Classes
HornSnapshotError
Extends
Error
Constructors
Constructor
new HornSnapshotError(
message):HornSnapshotError
Parameters
message
string
Returns
Overrides
Error.constructor
Properties
cause?
optionalcause?:unknown
Inherited from
Error.cause
message
message:
string
Inherited from
Error.message
name
name:
string
Inherited from
Error.name
stack?
optionalstack?:string
Inherited from
Error.stack
Type Aliases
BuildHornSnapshotOptions
BuildHornSnapshotOptions =
object
Properties
focus?
optionalfocus?: readonlystring[]
horn
horn:
Horn
labels?
optionallabels?:boolean
Name the IRIs the views show. On unless the caller knows none of its views draws one — a shape’s zoo, whose cards are barred from showing an IRI as text, and which would otherwise pay five lookup passes per shape for names nothing reads.
now?
optionalnow?: () =>Date
Returns
Date
plans?
optionalplans?:boolean
Look up the action plans behind each view. On unless a caller only wants rows, like a shape’s zoo.
resolveDerivation?
optionalresolveDerivation?: (ref) =>HornDerivation|undefined
Parameters
ref
Returns
HornDerivation | undefined
resolveQuery?
optionalresolveQuery?:CompileInput["resolveQuery"]
resolveView?
optionalresolveView?: (ref) =>HornView|undefined
Parameters
ref
Returns
HornView | undefined
rowLimit?
optionalrowLimit?:number
select
select:
SparqlSelect
signal?
optionalsignal?:AbortSignal
variables?
optionalvariables?:Readonly<Record<string,unknown>>
viewIds?
optionalviewIds?: readonlystring[]
ColumnSource
ColumnSource =
object
Where a column’s values come from: the property, and the variable of the entity that holds them.
Properties
property
property:
string
subject?
optionalsubject?:string
HornSnapshot
HornSnapshot =
z.infer<typeofhornSnapshotSchema>
PlanChange
PlanChange =
z.infer<typeofplanChangeSchema>
PlanReason
PlanReason =
z.infer<typeofplanReasonSchema>
PlanState
PlanState = typeof
planStates[number]
PlanStatus
PlanStatus =
Pick<SnapshotPlan,"state"|"lastRun"|"name">
PropertyUnit
PropertyUnit =
object
Properties
scale?
optionalscale?:number
unit?
optionalunit?:ValueUnit
RecordCard
RecordCard =
object
Properties
badges
badges:
RecordSlot[]
entity
entity:
string|undefined
fields
fields:
RecordSlot[]
key
key:
string
link?
optionallink?:RecordSlot
subtitle?
optionalsubtitle?:RecordSlot
title
title:
RecordSlot
RecordChart
RecordChart =
HornRecordCard
RecordRow
RecordRow =
Readonly<Record<string,SnapshotCell>>
RecordSlot
RecordSlot =
object
Properties
name
name:
string
values
values:
SnapshotCell[]
ResolvedPlans
ResolvedPlans =
object
Properties
iris
iris:
string[]
The things and properties the plans name, for the snapshot’s labels.
plans
plans:
SnapshotPlan[]
views
views:
Map<string,ViewPlan[]>
By view: the plans behind it.
ReviewState
ReviewState = {
state:"reviewed"; } | {state:"unread"; } | {state:"stale"; }
Union Members
Type Literal
{ state: "reviewed"; }
Type Literal
{ state: "unread"; }
Nobody has read this source.
Type Literal
{ state: "stale"; }
Someone read a different source: the view was changed after it was accepted.
SnapshotCell
SnapshotCell =
z.infer<typeofsnapshotCellSchema>
SnapshotPlan
SnapshotPlan =
z.infer<typeofsnapshotPlanSchema>
SnapshotView
SnapshotView =
z.infer<typeofsnapshotViewSchema>
SurfaceEntry
SurfaceEntry =
object
Properties
call?
optionalcall?:string
How to call it, where the name does not say. Checked against the SDK by surface-calls.test.ts.
export
export:
string
The exported name, as it is imported.
use
use:
string
What it is for, in the words the Studio should think in.
SurfaceModule
SurfaceModule =
object
Properties
entries
entries: readonly
SurfaceEntry[]
module
module:
string
purpose
purpose:
string
Groups the prompt renders under one heading.
UnreviewedView
UnreviewedView =
object
Properties
state
state:
Exclude<ReviewState["state"],"reviewed">
title
title:
string
viewId
viewId:
string
ValueUnit
ValueUnit =
"currency"|"ratio"|"percent"
ViewPlan
ViewPlan =
object
A plan behind a view: the plan, and which of the things it changes are, or belong to, what the view draws.
Properties
entities
entities:
string[]
plan
plan:
string
Variables
allowedReactHooks
constallowedReactHooks: readonly ["useState","useMemo","useCallback","useId"]
captureDeviceScaleFactor
constcaptureDeviceScaleFactor:2=2
captureWidth
constcaptureWidth:640=640
hornEmbedAttribute
consthornEmbedAttribute:"data-horn-embed"="data-horn-embed"
hornReadyAttribute
consthornReadyAttribute:"data-horn-ready"="data-horn-ready"
hornSnapshotAttribute
consthornSnapshotAttribute:"data-horn-snapshot"="data-horn-snapshot"
hornSnapshotSchema
consthornSnapshotSchema:z.ZodObject<{generatedAt:z.ZodISODateTime;horn:z.ZodObject<{datastoreId:z.ZodString;iri:z.ZodURL;realm:z.ZodEnum<{hiremanta-com:"hiremanta-com";journey-travel:"journey-travel"; }>;revision:z.ZodNumber;slug:z.ZodString;title:z.ZodString; },z.core.$strip>;labels:z.ZodRecord<z.ZodString,z.ZodString>;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>;links:z.ZodRecord<z.ZodString,z.ZodString>;plans:z.ZodArray<z.ZodObject<{changes:z.ZodArray<z.ZodObject<{currency:z.ZodOptional<z.ZodString>;entity:z.ZodURL;from:z.ZodUnion<readonly […, …, …, …]>;property:z.ZodURL;to:z.ZodUnion<readonly […, …, …, …]>;unit:z.ZodOptional<z.ZodEnum<{currency: …;percent: …;ratio: …; }>>; },z.core.$strip>>;iri:z.ZodURL;kinds:z.ZodArray<z.ZodObject<{count:z.ZodNumber;type:z.ZodOptional<z.ZodURL>; },z.core.$strip>>;lastRun:z.ZodOptional<z.ZodObject<{endedAt:z.ZodOptional<z.ZodString>;error:z.ZodOptional<z.ZodString>;preview:z.ZodBoolean;startedAt:z.ZodString; },z.core.$strip>>;name:z.ZodOptional<z.ZodString>;reasons:z.ZodArray<z.ZodObject<{entity:z.ZodURL;property:z.ZodURL;text:z.ZodString; },z.core.$strip>>;state:z.ZodEnum<{completed:"completed";draft:"draft";failed:"failed";running:"running";timed-out:"timed-out"; }>; },z.core.$strip>>;snapshotVersion:z.ZodLiteral<1>;style: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>;variables:z.ZodArray<z.ZodObject<{id:z.ZodString;label:z.ZodString;settable:z.ZodOptional<z.ZodBoolean>;value:z.ZodJSONSchema; },z.core.$strip>>;views:z.ZodArray<z.ZodObject<{content:z.ZodDiscriminatedUnion<[z.ZodObject<{component:z.ZodString;iris:z.ZodArray<z.ZodURL>;lane:z.ZodLiteral<"component">;truncated:z.ZodBoolean; },z.core.$strip>,z.ZodObject<{columns:z.ZodArray<z.ZodObject<…, …>>;currency:z.ZodOptional<z.ZodString>;lane:z.ZodLiteral<"sandbox">;plans:z.ZodOptional<z.ZodArray<…>>;render:z.ZodLiteral<"tsx">;rows:z.ZodArray<z.ZodRecord<…, …>>;source:z.ZodString;truncated:z.ZodBoolean;units:z.ZodOptional<z.ZodRecord<…, …>>; },z.core.$strip>,z.ZodObject<{lane:z.ZodLiteral<"error">;message:z.ZodString; },z.core.$strip>],"lane">;id:z.ZodString;title:z.ZodString; },z.core.$strip>>; },z.core.$strip>
hornSnapshotVersion
consthornSnapshotVersion:1=1
hornViewAttribute
consthornViewAttribute:"data-horn-view"="data-horn-view"
maxLabelledIris
constmaxLabelledIris:500=500
maxLinkedIris
constmaxLinkedIris:500=500
maxListedPlans
constmaxListedPlans:100=100
How many plans a list asks for. A datastore accumulates them; a page shows the first of them.
maxPlanChanges
constmaxPlanChanges:50=50
maxPlanEntities
constmaxPlanEntities:50=50
How many of a plan’s things a Horn built for it draws.
maxRelatedPlans
constmaxRelatedPlans:5=5
maxSnapshotRows
constmaxSnapshotRows:1000=1000
planChangeSchema
constplanChangeSchema:z.ZodObject<{currency:z.ZodOptional<z.ZodString>;entity:z.ZodURL;from:z.ZodUnion<readonly [z.ZodString,z.ZodNumber,z.ZodBoolean,z.ZodNull]>;property:z.ZodURL;to:z.ZodUnion<readonly [z.ZodString,z.ZodNumber,z.ZodBoolean,z.ZodNull]>;unit:z.ZodOptional<z.ZodEnum<{currency:"currency";percent:"percent";ratio:"ratio"; }>>; },z.core.$strip>
planReasonSchema
constplanReasonSchema:z.ZodObject<{entity:z.ZodURL;property:z.ZodURL;text:z.ZodString; },z.core.$strip>
planStates
constplanStates: readonly ["draft","running","completed","failed","timed-out"]
reactModule
constreactModule:"react"="react"
recordCardLimits
constrecordCardLimits:object
Type Declaration
badge
badge:
number
cards
cards:
number
field
field:
number
subtitle
subtitle:
number
title
title:
number
sdkModules
constsdkModules: readonlystring[]
The modules whose typings are the design system’s. The rest of the surface is the kit’s own.
snapshotCellSchema
constsnapshotCellSchema:z.ZodUnion<readonly [z.ZodString,z.ZodNumber,z.ZodBoolean,z.ZodNull]>
snapshotPlanSchema
constsnapshotPlanSchema:z.ZodObject<{changes:z.ZodArray<z.ZodObject<{currency:z.ZodOptional<z.ZodString>;entity:z.ZodURL;from:z.ZodUnion<readonly [z.ZodString,z.ZodNumber,z.ZodBoolean,z.ZodNull]>;property:z.ZodURL;to:z.ZodUnion<readonly [z.ZodString,z.ZodNumber,z.ZodBoolean,z.ZodNull]>;unit:z.ZodOptional<z.ZodEnum<{currency:"currency";percent:"percent";ratio:"ratio"; }>>; },z.core.$strip>>;iri:z.ZodURL;kinds:z.ZodArray<z.ZodObject<{count:z.ZodNumber;type:z.ZodOptional<z.ZodURL>; },z.core.$strip>>;lastRun:z.ZodOptional<z.ZodObject<{endedAt:z.ZodOptional<z.ZodString>;error:z.ZodOptional<z.ZodString>;preview:z.ZodBoolean;startedAt:z.ZodString; },z.core.$strip>>;name:z.ZodOptional<z.ZodString>;reasons:z.ZodArray<z.ZodObject<{entity:z.ZodURL;property:z.ZodURL;text:z.ZodString; },z.core.$strip>>;state:z.ZodEnum<{completed:"completed";draft:"draft";failed:"failed";running:"running";timed-out:"timed-out"; }>; },z.core.$strip>
snapshotViewSchema
constsnapshotViewSchema:z.ZodObject<{content:z.ZodDiscriminatedUnion<[z.ZodObject<{component:z.ZodString;iris:z.ZodArray<z.ZodURL>;lane:z.ZodLiteral<"component">;truncated:z.ZodBoolean; },z.core.$strip>,z.ZodObject<{columns:z.ZodArray<z.ZodObject<{name:z.ZodString;type:z.ZodEnum<{boolean: …;date: …;iri: …;number: …;string: …; }>; },z.core.$strip>>;currency:z.ZodOptional<z.ZodString>;lane:z.ZodLiteral<"sandbox">;plans:z.ZodOptional<z.ZodArray<z.ZodObject<{entities:z.ZodArray<…>;plan:z.ZodURL; },z.core.$strip>>>;render:z.ZodLiteral<"tsx">;rows:z.ZodArray<z.ZodRecord<z.ZodString,z.ZodUnion<readonly […, …, …, …]>>>;source:z.ZodString;truncated:z.ZodBoolean;units:z.ZodOptional<z.ZodRecord<z.ZodString,z.ZodEnum<{currency:"currency";percent:"percent";ratio:"ratio"; }>>>; },z.core.$strip>,z.ZodObject<{lane:z.ZodLiteral<"error">;message:z.ZodString; },z.core.$strip>],"lane">;id:z.ZodString;title:z.ZodString; },z.core.$strip>
surfaceModules
constsurfaceModules: readonlystring[]
Every module specifier a written view may import from.
tsxSurface
consttsxSurface: readonlySurfaceModule[]
viewPowersModule
constviewPowersModule:"@manta-eu/horns-kit/view"="@manta-eu/horns-kit/view"
What a view may do to the page it is on: say why a value is what it is, and narrow the Horn.
The kit draws the mark and the host opens the proof tree, because drawing one needs @manta-eu/react and
a modal, and the kit has neither. A view therefore reaches for one component and not seven.
Functions
actionShapePredicate()
actionShapePredicate(
realm):string
The predicate that marks a thing a plan would change, which is what makes a query about a plan.
Parameters
realm
"hiremanta-com" | "journey-travel"
Returns
string
base64Of()
base64Of(
bytes):string
Parameters
bytes
Uint8Array
Returns
string
buildHornSnapshot()
buildHornSnapshot(
options):Promise<{generatedAt:string;horn: {datastoreId:string;iri:string;realm:"hiremanta-com"|"journey-travel";revision:number;slug:string;title:string; };labels:z.ZodRecord<z.ZodString,z.ZodString>;layout: {columns:12;items:object[];kind:"grid"; };links:z.ZodRecord<z.ZodString,z.ZodString>;plans:object[];snapshotVersion:1;style: {accent?:"blue"|"orange"|"green"|"amber"|"pink"|"forest"|"indigo"|"red";density?:"compact"|"comfortable";radius?:"sharp"|"soft"|"round";theme?:"light"|"dark"; };variables:object[];views:object[]; }>
Parameters
options
Returns
Promise<{ generatedAt: string; horn: { datastoreId: string; iri: string; realm: "hiremanta-com" | "journey-travel"; revision: number; slug: string; title: string; }; labels: z.ZodRecord<z.ZodString, z.ZodString>; layout: { columns: 12; items: object[]; kind: "grid"; }; links: z.ZodRecord<z.ZodString, z.ZodString>; plans: object[]; snapshotVersion: 1; style: { accent?: "blue" | "orange" | "green" | "amber" | "pink" | "forest" | "indigo" | "red"; density?: "compact" | "comfortable"; radius?: "sharp" | "soft" | "round"; theme?: "light" | "dark"; }; variables: object[]; views: object[]; }>
columnSources()
columnSources(
query):Map<string,ColumnSource>
Which property each column of a SELECT is the value of, and on which entity, when it is one: a variable bound as a triple’s object, or an aggregate over one that keeps its unit (a sum of millionths is millionths; a count is not). A column computed any other way maps to nothing, which is the safe answer — a model that already divided an amount must not have it divided again.
Parameters
query
string
Returns
Map<string, ColumnSource>
currenciesQuery()
currenciesQuery(
realm,entities):string
Parameters
realm
"hiremanta-com" | "journey-travel"
entities
readonly string[]
Returns
string
currencyQuery()
currencyQuery(
realm,query,subject):string|undefined
The currencies of the entities a view’s amounts belong to, asked inside the view’s own pattern. Manta’s rules
copy the ad account’s currency onto everything under it as :currency (Meta, Google and LinkedIn entities),
so an amount’s currency is on the entity that holds it — which is the only honest answer in a datastore that
also holds Attio deals in dollars and exchange rates in every currency. The account itself says it in
schema:currency, which is what an account-level amount (its last 30 days’ spend) is in.
Parameters
realm
"hiremanta-com" | "journey-travel"
query
string
subject
string
Returns
string | undefined
entityLinkPath()
entityLinkPath(
datastoreId,iri):string
Where a row links to show the thing it is about: agents’ /redirect, which reads the entity’s type and
schema:identifier and sends the viewer to its page in the platform it came from. The same path on the Horns
site and on agents, so a Horn links the same way wherever it is embedded. The IRI is passed, never read.
Parameters
datastoreId
string
iri
string
Returns
string
entityRows()
entityRows(
rows):Readonly<Record<string,string|number|boolean|null>>[]
Parameters
rows
readonly Readonly<Record<string, string | number | boolean | null>>[]
Returns
Readonly<Record<string, string | number | boolean | null>>[]
inPlanUnits()
inPlanUnits(
change,units,currencies):object
A stored amount in the unit a person reads, the way a chart’s columns are.
Parameters
change
RawChange
units
ReadonlyMap<string, PropertyUnit>
currencies
ReadonlyMap<string, string>
Returns
object
currency?
optionalcurrency?:string
entity
entity:
string
from
from:
string|number|boolean|null
property
property:
string
to
to:
string|number|boolean|null
unit?
optionalunit?:"currency"|"percent"|"ratio"
isPlanQuery()
isPlanQuery(
realm,plan):string
Whether a graph is a plan a viewer may run: it holds things to change, and is not a run’s copy of one.
Parameters
realm
"hiremanta-com" | "journey-travel"
plan
string
Returns
string
isSurfaceModule()
isSurfaceModule(
module):boolean
Parameters
module
string
Returns
boolean
labelPredicates()
labelPredicates(
realm):string[]
Parameters
realm
"hiremanta-com" | "journey-travel"
Returns
string[]
labelsQuery()
labelsQuery(
predicate,iris):string
One query per predicate, for the entities still unnamed. A VALUES over the entities rather than a join:
the rows already know which IRIs they show, and asking for exactly those keeps the answer small.
Parameters
predicate
string
iris
readonly string[]
Returns
string
linkableTypes()
linkableTypes(
realm):Map<string,string>
Each linkable type in this realm, and what its link says.
Parameters
realm
"hiremanta-com" | "journey-travel"
Returns
Map<string, string>
linksQuery()
linksQuery(
iris,types):string
Parameters
iris
readonly string[]
types
Iterable<string>
Returns
string
moduleOfExport()
moduleOfExport(
name):string|undefined
Where an export lives, for telling the model it imported from the wrong module.
Parameters
name
string
Returns
string | undefined
nameishQuery()
nameishQuery(
iris):string
The last pass: a literal in a property whose name reads like a name, best first for each entity, so the first
row readLabels keeps is the one to show.
Parameters
iris
readonly string[]
Returns
string
ontologyLabelsQuery()
ontologyLabelsQuery(
realm,iris):string
Properties and classes are named in the ontology’s own graph: a plan’s “Daily budget”, a “Campaign”.
Parameters
realm
"hiremanta-com" | "journey-travel"
iris
readonly string[]
Returns
string
parseHornSnapshot()
parseHornSnapshot(
text):object
Parameters
text
string
Returns
object
generatedAt
generatedAt:
string
horn
horn:
object
horn.datastoreId
datastoreId:
string
horn.iri
iri:
string
horn.realm
realm:
"hiremanta-com"|"journey-travel"
horn.revision
revision:
number
horn.slug
slug:
string
horn.title
title:
string
labels
labels:
z.ZodRecord<z.ZodString,z.ZodString>
layout
layout:
object
layout.columns
columns:
12
layout.items
items:
object[]
layout.kind
kind:
"grid"
links
links:
z.ZodRecord<z.ZodString,z.ZodString>
plans
plans:
object[]
snapshotVersion
snapshotVersion:
1
style
style:
object
style.accent?
optionalaccent?:"blue"|"orange"|"green"|"amber"|"pink"|"forest"|"indigo"|"red"
style.density?
optionaldensity?:"compact"|"comfortable"
style.radius?
optionalradius?:"sharp"|"soft"|"round"
style.theme?
optionaltheme?:"light"|"dark"
variables
variables:
object[]
views
views:
object[]
planEntitiesQuery()
planEntitiesQuery(
realm,plan,limit?):string
The things one plan would change.
What isPlanQuery confirms of a graph, listed: the entities carrying an action shape, which is what a plan
concerns whether or not any of its rows survives readPlanValues — a value that already holds, or one
pointing at another thing, is dropped there and the plan is still about the thing it names. The report
filter is the same one, so a run’s copy of a plan answers with nothing rather than with the plan’s things.
Parameters
realm
"hiremanta-com" | "journey-travel"
plan
string
limit?
number
Returns
string
planKindsQuery()
planKindsQuery(
realm,plans):string
Parameters
realm
"hiremanta-com" | "journey-travel"
plans
readonly string[]
Returns
string
planNameFromIri()
planNameFromIri(
iri):string|undefined
What a plan is called when the graph does not say.
Almost never, in practice. Measured against hiremanta-com on 2026-09-29, 29 of its 30 plans carry no
label, name or description on the graph IRI. schema:HowTo was where a plan’s name used to live and is
deprecated — no graph holds one — so agents’ own plan.howTo?.name never fires either and it names a
plan by humanizing the IRI’s last segment (extractPlanName in
manta/packages/client/src/shared/agent-mode.ts, over splitIdentifierWords in manta/packages/lib).
That is therefore the naming, not a fallback, and a Horn beside agents has to say the same words.
This is the one place a name is read out of an IRI, and it is read out of Manta’s own vocabulary rather
than a customer’s data — the same licence ruleTitle takes for a rule. Kept in step with agents by
plans.test.ts, which pins the examples that datastore actually holds.
Parameters
iri
string
Returns
string | undefined
plansQuery()
plansQuery(
realm,limit?):string
The action plans this datastore holds.
A plan is a named graph whose entities carry an action shape — isPlanQuery asks that of one graph, and
this asks it of all of them. A graph holding a validation report is a rejected draft and not offered.
Ordered because there is a limit: without one the store may answer with a different hundred each time, and a plan a person saw a moment ago would be gone when they looked again.
Parameters
realm
"hiremanta-com" | "journey-travel"
limit?
number
Returns
string
planStatusQuery()
planStatusQuery(
realm,plans):string
Parameters
realm
"hiremanta-com" | "journey-travel"
plans
readonly string[]
Returns
string
planValuesQuery()
planValuesQuery(
realm,plan,entities?):string
Every value a plan holds for the things it changes, with what the default graph holds for the same property
now, and whether the thing’s shape lets the property be set — which is what tells a change (a status, a
budget) from the rule’s note on why (:pauseReason), since both sit in the plan graph.
Parameters
realm
"hiremanta-com" | "journey-travel"
plan
string
entities?
readonly string[]
Returns
string
pngSize()
pngSize(
bytes):object
Parameters
bytes
Uint8Array
Returns
object
height
height:
number
width
width:
number
readCurrencies()
readCurrencies(
results):Set<string>
Parameters
results
Returns
Set<string>
readEntityCurrencies()
readEntityCurrencies(
results):Map<string,string>
Parameters
results
Returns
Map<string, string>
readLabels()
readLabels(
results):Map<string,string>
What one pass answered, keyed by the entity it names.
Parameters
results
Returns
Map<string, string>
readLinks()
readLinks(
results,types):Record<string,string>
Parameters
results
types
ReadonlyMap<string, string>
Returns
Record<string, string>
readPlanEntities()
readPlanEntities(
results):string[]
The things a planEntitiesQuery answered with. Only IRIs that can be written back into a query.
Parameters
results
Returns
string[]
readPlanKinds()
readPlanKinds(
results):Map<string,object[]>
Parameters
results
Returns
Map<string, object[]>
readPlans()
readPlans(
results):string[]
The plan IRIs a plansQuery answered with, each once.
Parameters
results
Returns
string[]
readPlanStatus()
readPlanStatus(
results):Map<string,PlanStatus>
How each plan’s latest run went. A plan that has never run has no state in the graph, and is a draft.
Parameters
results
Returns
Map<string, PlanStatus>
readPlanValues()
readPlanValues(
results):object
The plan’s changes — settable values that differ from now — and its notes on why, in the order they came.
Parameters
results
Returns
object
changes
changes:
RawChange[]
reasons
reasons:
object[]
readRelatedPlans()
readRelatedPlans(
results):Map<string,Map<string,Set<string>>>
Parameters
results
Returns
Map<string, Map<string, Set<string>>>
readUnits()
readUnits(
results):Map<string,PropertyUnit>
Parameters
results
Returns
Map<string, PropertyUnit>
recordCards()
recordCards(
chart,rows):RecordCard[]
Parameters
chart
badges?
string[]
currency?
string
fields
string[]
format?
"number" | "percent" | "integer" | "compact"
link?
string
subtitle?
string
title
string
type
"record"
rows
readonly Readonly<Record<string, string | number | boolean | null>>[]
Returns
recordLinkHref()
recordLinkHref(
cell):string|undefined
Parameters
cell
string | number | boolean | null | undefined
Returns
string | undefined
relatedPlansQuery()
relatedPlansQuery(
realm,drawn):string
The plans holding :actionShape on a thing a view draws, or on a thing it links to: a campaign’s own pause,
and the budget it points at being doubled. A run copies its plan into a graph of its own with the validation
report beside it; that copy is a record of a run, not a plan, so a graph holding a report is left out.
Parameters
realm
"hiremanta-com" | "journey-travel"
drawn
readonly string[]
Returns
string
resolveLabels()
resolveLabels(
args):Promise<Record<string,string>>
The display name of every IRI a snapshot shows. select is the same read the bindings used, so a name costs
one query per predicate the datastore actually answers.
Parameters
args
iris
readonly string[]
realm
"hiremanta-com" | "journey-travel"
select
signal?
AbortSignal
Returns
Promise<Record<string, string>>
resolveLinks()
resolveLinks(
args):Promise<Record<string,string>>
Which of the IRIs a snapshot shows have a page to open, and what their link says. One query; a datastore that will not answer is a Horn without links, not a Horn that fails.
Parameters
args
iris
readonly string[]
realm
"hiremanta-com" | "journey-travel"
select
signal?
AbortSignal
Returns
Promise<Record<string, string>>
resolvePlans()
resolvePlans(
args):Promise<ResolvedPlans>
The action plans behind each view, from the things each view draws. Plans are extra: a datastore that will not answer is a Horn without plans, never a Horn that fails.
Parameters
args
drawn
ReadonlyMap<string, readonly string[]>
realm
"hiremanta-com" | "journey-travel"
select
signal?
AbortSignal
Returns
Promise<ResolvedPlans>
resolveUnits()
resolveUnits(
args):Promise<Map<string,PropertyUnit>>
The units of these properties, in one query. A datastore that will not say is a Horn with raw numbers.
Parameters
args
properties
readonly string[]
realm
"hiremanta-com" | "journey-travel"
select
signal?
AbortSignal
Returns
Promise<Map<string, PropertyUnit>>
resolveViewCurrency()
resolveViewCurrency(
args):Promise<string|undefined>
The one currency a view’s amounts are in, or nothing when they are in several or it cannot be told.
Parameters
args
query
string
realm
"hiremanta-com" | "journey-travel"
select
signal?
AbortSignal
subjects
readonly string[]
Returns
Promise<string | undefined>
reviewOf()
reviewOf(
source,now):Promise<{at:string;hash:string; }>
The review a person’s acceptance writes onto a view.
Parameters
source
string
now
Date
Returns
Promise<{ at: string; hash: string; }>
reviewStateOf()
reviewStateOf(
render):Promise<ReviewState>
Parameters
render
reviewed?
{ hash: string; }
reviewed.hash
string
source
string
Returns
Promise<ReviewState>
searchFromVariables()
searchFromVariables(
horn,values):string
The query string a set of variable values makes, so a viewer can write the bus back to the URL.
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; })[]
values
Readonly<Record<string, VariableValue>>
Returns
string
serializeHornSnapshot()
serializeHornSnapshot(
snapshot):string
Parameters
snapshot
generatedAt
string
horn
{ datastoreId: string; iri: string; realm: "hiremanta-com" | "journey-travel"; revision: number; slug: string; title: string; }
horn.datastoreId
string
horn.iri
string
horn.realm
"hiremanta-com" | "journey-travel"
horn.revision
number
horn.slug
string
horn.title
string
labels
z.ZodRecord<z.ZodString, z.ZodString>
layout
{ columns: 12; items: object[]; kind: "grid"; }
layout.columns
12
layout.items
object[]
layout.kind
"grid"
links
z.ZodRecord<z.ZodString, z.ZodString>
plans
object[]
snapshotVersion
1
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"
variables
object[]
views
object[]
Returns
string
slotText()
slotText(
slot):string
Parameters
slot
RecordSlot | undefined
Returns
string
summarizeView()
summarizeView(
view,maxLines?):string[]
A view’s data as short lines of text: alt text for a picture of it, or the message body where pictures do not render.
Every column, in the order the binding returned them. A view is source now, so nothing here can know which of its columns it chose to draw — and a summary that guessed would describe a view that does not exist.
Parameters
view
content
{ component: string; iris: string[]; lane: "component"; truncated: boolean; } | { columns: object[]; currency?: string; lane: "sandbox"; plans?: object[]; render: "tsx"; rows: Record<string, string | number | boolean | null>[]; source: string; truncated: boolean; units?: Record<string, "currency" | "percent" | "ratio">; } | { lane: "error"; message: string; }
id
string
title
string
maxLines?
number
Returns
string[]
surfaceContextLines()
surfaceContextLines():
string[]
Returns
string[]
surfaceEntry()
surfaceEntry(
name):SurfaceEntry|undefined
The surface’s own entry for an export: what it is for, and how to call it where that is written down.
Parameters
name
string
Returns
SurfaceEntry | undefined
surfaceExports()
surfaceExports(
module):ReadonlySet<string> |undefined
Parameters
module
string
Returns
ReadonlySet<string> | undefined
surfacePrompt()
surfacePrompt():
string
Returns
string
unitsQuery()
unitsQuery(
realm,properties):string
Parameters
realm
"hiremanta-com" | "journey-travel"
properties
readonly string[]
Returns
string
unreviewedMessage()
unreviewedMessage(
views):string
What a save route tells someone who has not read what they are about to keep.
Parameters
views
readonly UnreviewedView[]
Returns
string
unreviewedWrittenViews()
unreviewedWrittenViews(
horn):Promise<UnreviewedView[]>
Every written view in this Horn that no person has accepted as it now stands.
A library view is not checked here: it was reviewed where it was published, and its content is pinned by hash, so re-reading it on every Horn that uses it would be asking the same question twice.
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
Promise<UnreviewedView[]>
variablesFromSearch()
variablesFromSearch(
horn,search):Record<string,VariableValue>
The variables a query string sets, keyed by variable id. Only what the URL names: a caller merges this over
the Horn’s own defaults, which is what buildHornSnapshot does with an absent key.
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; })[]
search
string
Returns
Record<string, VariableValue>
writtenSourceHash()
writtenSourceHash(
source):Promise<string>
The hash a review records. Web Crypto, because this is reachable from the browser bundle.
Parameters
source
string
Returns
Promise<string>