Manta Developers
GitHub
Menu

@manta-eu/horns/studio

Reference for @manta-eu/horns/studio in @manta-eu/horns 0.2.3.

Classes

StudioModelError

Extends

  • Error

Constructors

Constructor

new StudioModelError(status, message): StudioModelError

Parameters
status

number

message

string

Returns

StudioModelError

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

status

readonly status: number


UnsafeQueryError

Extends

  • Error

Constructors

Constructor

new UnsafeQueryError(message): UnsafeQueryError

Parameters
message

string

Returns

UnsafeQueryError

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


VertexAuthError

Extends

  • Error

Constructors

Constructor

new VertexAuthError(message?): VertexAuthError

Parameters
message?

string

Returns

VertexAuthError

Inherited from

Error.constructor

Constructor

new VertexAuthError(message?, options?): VertexAuthError

Parameters
message?

string

options?

ErrorOptions

Returns

VertexAuthError

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

BriefFinding

BriefFinding = { kind: "no-views"; } | { kind: "brief-shape-unused"; schema: string; } | { kind: "view-empty"; viewId: string; } | { kind: "view-error"; message: string; viewId: string; }


BriefResult

BriefResult = object

Properties

briefId

briefId: string

horn

horn: Horn

messages

messages: ReturnType<typeof assembleStudioMessages>

reply

reply: string

status

status: "built" | "empty" | "step-limit"

steps

steps: number

usage

usage: StudioUsage

viewIds

viewIds: string[]

The views the turn actually added, in the order the layout holds them.


BriefRunResult

BriefRunResult = z.infer<typeof briefResultSchema>


BriefRunState

BriefRunState = z.infer<typeof briefRunStateSchema>


BriefRunStore

BriefRunStore = object

Properties

load

load: () => Promise<unknown>

Returns

Promise<unknown>

save

save: (state) => Promise<void>

Parameters
state

BriefRunState

Returns

Promise<void>


ClassSummary

ClassSummary = object

Properties

instances

instances: number

iri

iri: string

label?

optional label?: string


ComponentApiLookup

ComponentApiLookup = (name) => string | undefined

One surfaced export’s declaration text, or nothing if the build did not find it.

Parameters

name

string

Returns

string | undefined


CoverageProgress

CoverageProgress = object

Properties

index

index: number

result

result: CoverageShapeResult

schema

schema: string

total

total: number


CoverageRunState

CoverageRunState = z.infer<typeof coverageRunStateSchema>


CoverageRunStore

CoverageRunStore = object

Methods

load()

load(): Promise<unknown>

Returns

Promise<unknown>

save()

save(state): Promise<void>

Parameters
state
datastoreId

z.ZodString

realm

z.ZodEnum<{ hiremanta-com: "hiremanta-com"; journey-travel: "journey-travel"; }>

runVersion

z.ZodLiteral<1>

shapes

z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{ startedAt: z.ZodISODateTime; status: z.ZodLiteral<"running">; }, z.core.$strip>, z.ZodObject<{ advice: z.ZodOptional<z.ZodArray<z.ZodString>>; finishedAt: z.ZodISODateTime; rounds: z.ZodNumber; sampled: z.ZodNumber; spec: z.ZodObject<{ classCurie: z.ZodString; fields: z.ZodArray<z.ZodObject<…, …>>; record: z.ZodObject<{ badges: …; currency: …; fields: …; format: …; link: …; subtitle: …; title: …; type: …; }, z.core.$strict>; schema: z.ZodString; status: z.ZodEnum<{ curated: …; drafted: …; }>; }, z.core.$strict>; status: z.ZodLiteral<"accepted">; usage: z.ZodObject<{ cachedPromptTokens: z.ZodNumber; completionTokens: z.ZodNumber; promptTokens: z.ZodNumber; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ finishedAt: z.ZodISODateTime; problems: z.ZodArray<z.ZodString>; rounds: z.ZodNumber; sampled: z.ZodNumber; status: z.ZodLiteral<"gave-up">; usage: z.ZodObject<{ cachedPromptTokens: z.ZodNumber; completionTokens: z.ZodNumber; promptTokens: z.ZodNumber; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ finishedAt: z.ZodISODateTime; status: z.ZodLiteral<"no-data">; }, z.core.$strip>, z.ZodObject<{ error: z.ZodString; finishedAt: z.ZodISODateTime; status: z.ZodLiteral<"failed">; }, z.core.$strip>], "status">>

startedAt

z.ZodISODateTime

updatedAt

z.ZodISODateTime

Returns

Promise<void>

saveTranscript()

saveTranscript(schema, messages): Promise<void>

Parameters
schema

string

messages

readonly StudioMessage[]

Returns

Promise<void>


CoverageShapeResult

CoverageShapeResult = z.infer<typeof coverageShapeResultSchema>


CoverageTurnProgress

CoverageTurnProgress = object & CoverageTurnStep

Type Declaration

index

index: number

schema

schema: string

total

total: number


CoverageTurnStep

CoverageTurnStep = { kind: "sampling"; } | { kind: "reading"; } | ShapeViewProgress

What the run is doing inside one shape, for a caller watching it happen. A shape takes minutes, and most of them are spent before the first model round — sampling instances, then reading what the fields point at — so a watcher told only about finished shapes is watching a hang.


DraftedChanges

DraftedChanges = object

Properties

added

added: string[]

Views the run drafted that were not in the kit at all.

curated

curated: number

drafted

drafted: number

redrafted

redrafted: string[]

Views the run drafted again, over a draft that was already there.

touchedCurated

touchedCurated: string[]

Curated views are a person’s judgement; a run must never quietly rewrite one.

unchanged

unchanged: string[]

Drafted views the run left exactly as they were.


DryRunResult

DryRunResult = object

Properties

duplicateRows?

optional duplicateRows?: number

Sampled rows that repeat one before them.

emptyColumns?

optional emptyColumns?: string[]

Columns the view’s source names that no returned row fills.

error?

optional error?: string

measureColumns?

optional measureColumns?: string[]

Number columns that moved across the rows, on a view drawing enough of them for a shape to exist.

missingColumns?

optional missingColumns?: string[]

Columns the binding declares that its own query does not answer with.

rows

rows: number

steadyColumns?

optional steadyColumns?: string[]

Number columns whose value was the same in every row: a floor or a target, not a measure.

viewId

viewId: string


FailureReading

FailureReading = object

Properties

reason

reason: string

transient

transient: boolean


HintArmStats

HintArmStats = object

Properties

published

published: number

sessions

sessions: number

stuck

stuck: number


HintSelection

HintSelection = object

Properties

injected

injected: StudioHint[]

withheld

withheld: StudioHint[]


HintStats

HintStats = object

Properties

hintId

hintId: string

injected

injected: HintArmStats

withheld

withheld: HintArmStats


HornBrief

HornBrief = z.infer<typeof hornBriefSchema>


HornChange

HornChange = object

What a turn did to a Horn, in the words a person would use: the card a chat shows for each change, with a title for the whole and a line per thing that moved. Read from the two documents rather than from the ops that made the change, so it says what happened even when several ops add up to one thing.

Properties

details

details: string[]

title

title: string


HornPatchOp

HornPatchOp = z.infer<typeof hornPatchOpSchema>


HornPlan

HornPlan = z.infer<typeof hornPlanSchema>


LibraryHit

LibraryHit = object

Properties

compatible

compatible: boolean

kind

kind: LibraryItemKind

note?

optional note?: string

ref

ref: LibraryRef

title

title: string


LibraryItemOffer

LibraryItemOffer = object

Properties

description

description: string

elementId

elementId: string

kind

kind: Extract<LibraryItemKind, "query" | "derivation" | "view" | "action">

title

title: string


ParsedArguments

ParsedArguments = { ok: true; value: unknown; } | { ok: false; }


PatchError

PatchError = object

Properties

code

code: PatchErrorCode

message

message: string

op

op: number


PatchErrorCode

PatchErrorCode = "stale" | "exists" | "missing" | "from-library"


PatchResult

PatchResult = { horn: Horn; ok: true; renderChangedViews: string[]; reuseRejected: Record<string, string>; touchedViews: string[]; } | { errors: PatchError[]; ok: false; }


PlanDeviation

PlanDeviation = object

Properties

code

code: "missing-view" | "unplanned-view" | "render-differs" | "missing-derivation" | "missing-action"

id

id: string

message

message: string


ProposalDeps

ProposalDeps = object

Properties

catalog

catalog: ComponentCatalog

componentRefs?

optional componentRefs?: Readonly<Record<string, LibraryRef>>

dryRun?

optional dryRun?: (horn, viewIds) => Promise<DryRunResult[]>

Parameters
horn

Horn

viewIds

readonly string[]

Returns

Promise<DryRunResult[]>

libraryMatchesForClass?

optional libraryMatchesForClass?: (classIri) => string[]

Parameters
classIri

string

Returns

string[]

lookup

lookup: RevisionLookup

realm

realm: Realm

refuseBlankHorn?

optional refuseBlankHorn?: boolean

Whether a Horn of empty views is refused. Said once per turn, or the model retries to the step limit.

typecheck?

optional typecheck?: (source) => readonly TypeProblem[]

What a compiler says about the source, where the host brought one.

The seam is a function so @manta-eu/horns stays free of typescript and of the SDK’s own typings; the worker holds both. Absent, a view is checked the way it always was.

Parameters
source

string

Returns

readonly TypeProblem[]


ProposalFailure

ProposalFailure = { message: string; source: "arguments"; } | { message: string; source: "plan"; } | { message: string; source: "library"; } | { code: string; message: string; op: number; source: "patch"; } | { code: LockProblem["code"]; message: string; source: "lock"; } | { message: string; path: string; source: "schema"; } | { message: string; source: "reuse"; suggestions: string[]; viewId: string; } | { message: string; source: "dry-run"; viewId: string; } | { message: string; source: "tsx"; viewId: string; } | { message: string; source: "typecheck"; viewId: string; } | { message: string; source: "visual"; viewId: string; } | { message: string; source: "render"; viewId?: string; }


ProposalResult

ProposalResult = { accepted: true; horn: Horn; touchedViews: string[]; warnings: ProposalFailure[]; } | { accepted: false; failures: ProposalFailure[]; }


RenderLogEntry

RenderLogEntry = object

Properties

level

level: "error" | "warn" | "info"

message

message: string

viewId?

optional viewId?: string


RepairAction

RepairAction = { kind: "feedback"; message: string; } | { kind: "rehydrate"; message: string; } | { kind: "ask-user"; message: string; }


RetryOptions

RetryOptions = object

Properties

attempts?

optional attempts?: number

signal?

optional signal?: AbortSignal

wait?

optional wait?: (ms, signal?) => Promise<void>

Parameters
ms

number

signal?

AbortSignal

Returns

Promise<void>


RuleStager

RuleStager = (rule) => Promise<{ ok: true; ruleIri: string | undefined; warnings: readonly string[]; } | { error: string; ok: false; }>

Manta stages a rule and says how it went. The SDK cannot reach agents itself — it takes the realm as an argument and knows nothing of sessions — so the host hands this in, already bound to the viewer.

Parameters

rule
humanIntent

string

text

string

Returns

Promise<{ ok: true; ruleIri: string | undefined; warnings: readonly string[]; } | { error: string; ok: false; }>


ShapeViewProgress

ShapeViewProgress = { kind: "round"; round: number; } | { kind: "rejected"; problems: readonly string[]; round: number; } | { kind: "accepted"; round: number; }

What a turn is doing while it does it. A turn is up to three model rounds and takes a minute, so a caller that shows nothing shows a hang; the coverage runner has no one watching and passes none.


ShapeViewTurnResult

ShapeViewTurnResult = { messages: StudioMessage[]; repairs: string[]; rounds: number; spec: ShapeViewSpec; status: "accepted"; usage: StudioUsage; } | { messages: StudioMessage[]; problems: string[]; rounds: number; status: "gave-up"; usage: StudioUsage; }

Union Members

Type Literal

{ messages: StudioMessage[]; repairs: string[]; rounds: number; spec: ShapeViewSpec; status: "accepted"; usage: StudioUsage; }

messages

messages: StudioMessage[]

repairs

repairs: string[]

Columns the gate took as read, as "Observation Date" to "observationDate".

rounds

rounds: number

spec

spec: ShapeViewSpec

status

status: "accepted"

usage

usage: StudioUsage


Type Literal

{ messages: StudioMessage[]; problems: string[]; rounds: number; status: "gave-up"; usage: StudioUsage; }


StageState

StageState = object

Properties

bound

bound: boolean

drawn

drawn: boolean

stage

stage: StudioStage


StudioEvalCase

StudioEvalCase = z.infer<typeof studioEvalCaseSchema>


StudioEvent

StudioEvent = StudioEventSource & ({ detail?: string; failed: boolean; name: string; repeated: boolean; type: "tool-call"; } | { name: string; type: "proposal-accepted"; } | { failures: ProposalFailure[]; name: string; round: number; type: "proposal-rejected"; } | { name: string; type: "circling"; } | { type: "rehydrated"; } | { type: "nudged"; } | { step: number; type: "round"; })


StudioEventSource

StudioEventSource = object

Which loop an event came from. Absent is the Studio’s own turn.

Properties

agent?

optional agent?: string


StudioHint

StudioHint = z.infer<typeof studioHintSchema>


StudioMessage

StudioMessage = { content: string; role: "system"; } | { content: string; images?: readonly string[]; role: "user"; } | { content: string; role: "assistant"; toolCalls?: StudioToolCall[]; } | { content: string; name: string; role: "tool"; toolCallId: string; }

Union Members

Type Literal

{ content: string; role: "system"; }


Type Literal

{ content: string; images?: readonly string[]; role: "user"; }

images are data URLs the model is asked to look at beside the words. Only a model with image input can read them; a text-only model is sent the words alone, exactly as before.


Type Literal

{ content: string; role: "assistant"; toolCalls?: StudioToolCall[]; }


Type Literal

{ content: string; name: string; role: "tool"; toolCallId: string; }


StudioMode

StudioMode = typeof studioModes[number]


StudioModelRequest

StudioModelRequest = object

Properties

messages

messages: readonly StudioMessage[]

thinking?

optional thinking?: boolean

tools

tools: readonly StudioToolDefinition[]


StudioModelResponse

StudioModelResponse = object

Properties

content

content: string

toolCalls

toolCalls: StudioToolCall[]

usage?

optional usage?: StudioUsage


StudioOutcome

StudioOutcome = object

Properties

horn

horn: Horn

published

published: boolean

renderErrors

renderErrors: number

rowsByView

rowsByView: Readonly<Record<string, number>>

stuck

stuck: boolean

usedComponents

usedComponents: readonly string[]

validated

validated: boolean


StudioScore

StudioScore = object

Properties

failures

failures: string[]

finished

finished: boolean

score

score: number


StudioSkill

StudioSkill = z.infer<typeof studioSkillSchema>


StudioStage

StudioStage = typeof studioStages[number]


StudioToolCall

StudioToolCall = object

Properties

arguments

arguments: string

id

id: string

name

name: string


StudioToolContext

StudioToolContext = object

Properties

draft

draft: Horn

mode

mode: StudioMode

signal?

optional signal?: AbortSignal


StudioToolDefinition

StudioToolDefinition = object

Properties

function

function: object

description

description: string

name

name: string

parameters

parameters: Record<string, unknown>

type

type: "function"


StudioToolHandlers

StudioToolHandlers = { [Name in StudioToolName]?: (input: StudioToolInput<Name>, context: StudioToolContext) => Promise<StudioToolOutcome> }


StudioToolInput

StudioToolInput<Name> = z.infer<typeof studioToolInputs[Name]>

Type Parameters

Name

Name extends StudioToolName


StudioToolName

StudioToolName = keyof typeof studioToolInputs


StudioToolOutcome

StudioToolOutcome = object

Properties

content

content: string

draft?

optional draft?: Horn

failures?

optional failures?: ProposalFailure[]

libraryItem?

optional libraryItem?: LibraryItemOffer

plan?

optional plan?: HornPlan


StudioTurnOptions

StudioTurnOptions = object

Properties

agent?

optional agent?: string

Who is working, when it is not the Studio itself.

A turn can start another loop — an investigation — and from the outside that loop is one line that takes a minute. Stamping its events says which agent they came from, so a watcher sees the whole thing working rather than a spinner.

draft

draft: Horn

handlers

handlers: StudioToolHandlers

maxSteps?

optional maxSteps?: number

maxTokens?

optional maxTokens?: number

maxToolContentChars?

optional maxToolContentChars?: number

messages

messages: readonly StudioMessage[]

mode

mode: StudioMode

model

model: LanguageModel

onEvent?

optional onEvent?: (event) => void

Each event as it happens, for a caller that shows the turn while it runs rather than after.

Parameters
event

StudioEvent

Returns

void

rehydrate?

optional rehydrate?: (draft) => Promise<string>

Parameters
draft

Horn

Returns

Promise<string>

signal?

optional signal?: AbortSignal

thinking?

optional thinking?: ThinkingPolicy


StudioTurnResult

StudioTurnResult = object

Properties

draft

draft: Horn

events

events: StudioEvent[]

libraryItems?

optional libraryItems?: LibraryItemOffer[]

Parts of the draft the model offered as reusable. Publishing is a person’s decision, not a turn’s.

messages

messages: StudioMessage[]

plan?

optional plan?: HornPlan

reply

reply: string

status

status: "done" | "needs-user" | "step-limit"

steps

steps: number

usage

usage: StudioUsage


StudioUsage

StudioUsage = object

Properties

cachedPromptTokens

cachedPromptTokens: number

completionTokens

completionTokens: number

promptTokens

promptTokens: number


ThinkingPolicy

ThinkingPolicy = "never" | "planning-and-repair" | "always"


TypeProblem

TypeProblem = object

One thing a compiler refused, in its own words.

Properties

line?

optional line?: number

message

message: string


UsefulContext

UsefulContext = object

Properties

classes

classes: ClassSummary[]

text

text: string

truncated

truncated: string[]


UsefulContextInput

UsefulContextInput = object

Properties

budgetChars?

optional budgetChars?: number

catalog

catalog: ComponentCatalog

classes

classes: readonly ClassSummary[]

componentRefs?

optional componentRefs?: Readonly<Record<string, LibraryRef>>

computed?

optional computed?: readonly DerivedTerm[]

What the rules work out about those classes, which no shape lists.

hints?

optional hints?: readonly StudioHint[]

horn

horn: Horn

library

library: readonly LibraryHit[]

maxClasses?

optional maxClasses?: number

maxComponentClasses?

optional maxComponentClasses?: number

plan?

optional plan?: HornPlan

prompt

prompt: string

realm

realm: Realm

skills?

optional skills?: readonly StudioSkill[]


VertexAccessTokens

VertexAccessTokens = () => Promise<string>

Returns

Promise<string>


VertexAuthOptions

VertexAuthOptions = object

Properties

account

account: VertexServiceAccount

fetch?

optional fetch?: typeof fetch

now?

optional now?: () => number

Returns

number


VertexServiceAccount

VertexServiceAccount = object

Properties

clientEmail

clientEmail: string

privateKey

privateKey: string

privateKeyId?

optional privateKeyId?: string


VisualEdit

VisualEdit = { kind: "rename"; title: string; viewId: string; } | { h: number; kind: "move"; viewId: string; w: number; x: number; y: number; } | { kind: "resize"; viewId: string; w: number; } | { direction: "earlier" | "later"; kind: "reorder"; viewId: string; } | { binding: HornBinding; kind: "rebind"; viewId: string; } | { key: string; kind: "set-prop"; value: ComponentProps; viewId: string; } | { kind: "keep-code"; reviewed: { at: string; hash: string; }; viewId: string; } | { kind: "remove"; viewId: string; }

Union Members

Type Literal

{ kind: "rename"; title: string; viewId: string; }


Type Literal

{ h: number; kind: "move"; viewId: string; w: number; x: number; y: number; }


Type Literal

{ kind: "resize"; viewId: string; w: number; }

How wide the card is, in columns of the twelve.


Type Literal

{ direction: "earlier" | "later"; kind: "reorder"; viewId: string; }

One place earlier or later in the order the page reads in.


Type Literal

{ binding: HornBinding; kind: "rebind"; viewId: string; }

The query a view runs, rewritten by hand.


Type Literal

{ key: string; kind: "set-prop"; value: ComponentProps; viewId: string; }


Type Literal

{ kind: "keep-code"; reviewed: { at: string; hash: string; }; viewId: string; }

A person read a written view’s code and kept it.

The review travels with the edit rather than being stamped here because hashing is async and this is not. It is checked again where it matters: the save route refuses any written view whose review is not of the source it is about to store, so a review that went stale cannot slip through.


Type Literal

{ kind: "remove"; viewId: string; }


VisualEditResult

VisualEditResult = { ok: true; ops: HornPatchOp[]; } | { message: string; ok: false; }

Variables

absent

const absent: "absent" = "absent"


blankHornPhrase

const blankHornPhrase: "Every view in this Horn returns no rows" = "Every view in this Horn returns no rows"

How a Horn of empty views is reported, which is also how the caller recognises it has been said.


briefResultSchema

const briefResultSchema: z.ZodObject<{ findings: z.ZodArray<z.ZodString>; finishedAt: z.ZodString; horn: z.ZodObject<{ about: z.ZodOptional<z.ZodArray<z.ZodURL>>; actions: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{ id: z.ZodString; ref: z.ZodObject<…, …>; }, z.core.$strict>, z.ZodDiscriminatedUnion<[z.ZodObject<…, …>, z.ZodObject<…, …>], "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<…, …>; }, z.core.$strict>, z.ZodObject<{ appliesTo: z.ZodURL; datatype: z.ZodURL; id: z.ZodString; pattern: z.ZodString; predicateIri: z.ZodURL; promotedRuleIri: z.ZodOptional<…>; status: z.ZodEnum<…>; }, 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: …; component: …; derivation: …; horn: …; query: …; view: …; }>; ref: z.ZodObject<{ hash: …; item: …; revision: …; }, 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 […, …]>>; 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<…, …>; }, z.core.$strict>, z.ZodObject<{ binding: z.ZodDiscriminatedUnion<…, …>; emits: z.ZodOptional<…>; id: z.ZodString; render: z.ZodDiscriminatedUnion<…, …>; title: z.ZodString; }, z.core.$strip>]>>; }, z.core.$strip>; reply: z.ZodString; status: z.ZodEnum<{ built: "built"; empty: "empty"; step-limit: "step-limit"; }>; steps: z.ZodNumber; usage: z.ZodObject<{ cachedPromptTokens: z.ZodNumber; completionTokens: z.ZodNumber; promptTokens: z.ZodNumber; }, z.core.$strip>; viewIds: z.ZodArray<z.ZodString>; }, z.core.$strip>


briefRunStateSchema

const briefRunStateSchema: z.ZodObject<{ briefs: z.ZodRecord<z.ZodString, z.ZodObject<{ findings: z.ZodArray<z.ZodString>; finishedAt: z.ZodString; horn: z.ZodObject<{ about: z.ZodOptional<z.ZodArray<z.ZodURL>>; actions: z.ZodArray<z.ZodUnion<readonly […, …]>>; audience: z.ZodOptional<z.ZodString>; baseRevision: z.ZodOptional<z.ZodNumber>; datastoreId: z.ZodString; dependencies: z.ZodArray<z.ZodObject<{ kind: z.ZodEnum<…>; ref: z.ZodObject<…, …>; }, z.core.$strict>>; derivations: z.ZodArray<z.ZodUnion<readonly […, …]>>; iri: z.ZodURL; layout: z.ZodObject<{ columns: z.ZodLiteral<12>; items: z.ZodArray<z.ZodObject<…, …>>; kind: z.ZodLiteral<"grid">; }, z.core.$strip>; lock: z.ZodObject<{ entries: z.ZodArray<z.ZodObject<…, …>>; 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<…>; density: z.ZodOptional<…>; radius: z.ZodOptional<…>; theme: z.ZodOptional<…>; }, z.core.$strict>>; summary: z.ZodOptional<z.ZodString>; title: z.ZodString; variables: z.ZodArray<z.ZodObject<{ default: z.ZodOptional<…>; id: z.ZodString; label: z.ZodString; options: z.ZodOptional<…>; type: z.ZodEnum<…>; urlParam: z.ZodOptional<…>; }, z.core.$strip>>; views: z.ZodArray<z.ZodUnion<readonly […, …]>>; }, z.core.$strip>; reply: z.ZodString; status: z.ZodEnum<{ built: "built"; empty: "empty"; step-limit: "step-limit"; }>; steps: z.ZodNumber; usage: z.ZodObject<{ cachedPromptTokens: z.ZodNumber; completionTokens: z.ZodNumber; promptTokens: z.ZodNumber; }, z.core.$strip>; viewIds: z.ZodArray<z.ZodString>; }, z.core.$strip>>; datastoreId: z.ZodString; realm: z.ZodString; runVersion: z.ZodLiteral<1>; updatedAt: z.ZodString; }, z.core.$strip>


briefStepLimit

const briefStepLimit: 24 = 24


builtInSkills

const builtInSkills: StudioSkill[]


coverageRunStateSchema

const coverageRunStateSchema: z.ZodObject<{ datastoreId: z.ZodString; realm: z.ZodEnum<{ hiremanta-com: "hiremanta-com"; journey-travel: "journey-travel"; }>; runVersion: z.ZodLiteral<1>; shapes: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{ startedAt: z.ZodISODateTime; status: z.ZodLiteral<"running">; }, z.core.$strip>, z.ZodObject<{ advice: z.ZodOptional<z.ZodArray<z.ZodString>>; finishedAt: z.ZodISODateTime; rounds: z.ZodNumber; sampled: z.ZodNumber; spec: z.ZodObject<{ classCurie: z.ZodString; fields: z.ZodArray<z.ZodObject<…, …>>; record: z.ZodObject<{ badges: …; currency: …; fields: …; format: …; link: …; subtitle: …; title: …; type: …; }, z.core.$strict>; schema: z.ZodString; status: z.ZodEnum<{ curated: …; drafted: …; }>; }, z.core.$strict>; status: z.ZodLiteral<"accepted">; usage: z.ZodObject<{ cachedPromptTokens: z.ZodNumber; completionTokens: z.ZodNumber; promptTokens: z.ZodNumber; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ finishedAt: z.ZodISODateTime; problems: z.ZodArray<z.ZodString>; rounds: z.ZodNumber; sampled: z.ZodNumber; status: z.ZodLiteral<"gave-up">; usage: z.ZodObject<{ cachedPromptTokens: z.ZodNumber; completionTokens: z.ZodNumber; promptTokens: z.ZodNumber; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ finishedAt: z.ZodISODateTime; status: z.ZodLiteral<"no-data">; }, z.core.$strip>, z.ZodObject<{ error: z.ZodString; finishedAt: z.ZodISODateTime; status: z.ZodLiteral<"failed">; }, z.core.$strip>], "status">>; startedAt: z.ZodISODateTime; updatedAt: z.ZodISODateTime; }, z.core.$strip>


coverageShapeResultSchema

const coverageShapeResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ startedAt: z.ZodISODateTime; status: z.ZodLiteral<"running">; }, z.core.$strip>, z.ZodObject<{ advice: z.ZodOptional<z.ZodArray<z.ZodString>>; finishedAt: z.ZodISODateTime; rounds: z.ZodNumber; sampled: z.ZodNumber; spec: z.ZodObject<{ classCurie: z.ZodString; fields: z.ZodArray<z.ZodObject<{ name: z.ZodString; path: z.ZodString; type: z.ZodEnum<{ boolean: …; date: …; iri: …; number: …; string: …; }>; }, z.core.$strict>>; record: 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: …; integer: …; number: …; percent: …; }>>; link: z.ZodOptional<z.ZodString>; subtitle: z.ZodOptional<z.ZodString>; title: z.ZodString; type: z.ZodLiteral<"record">; }, z.core.$strict>; schema: z.ZodString; status: z.ZodEnum<{ curated: "curated"; drafted: "drafted"; }>; }, z.core.$strict>; status: z.ZodLiteral<"accepted">; usage: z.ZodObject<{ cachedPromptTokens: z.ZodNumber; completionTokens: z.ZodNumber; promptTokens: z.ZodNumber; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ finishedAt: z.ZodISODateTime; problems: z.ZodArray<z.ZodString>; rounds: z.ZodNumber; sampled: z.ZodNumber; status: z.ZodLiteral<"gave-up">; usage: z.ZodObject<{ cachedPromptTokens: z.ZodNumber; completionTokens: z.ZodNumber; promptTokens: z.ZodNumber; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ finishedAt: z.ZodISODateTime; status: z.ZodLiteral<"no-data">; }, z.core.$strip>, z.ZodObject<{ error: z.ZodString; finishedAt: z.ZodISODateTime; status: z.ZodLiteral<"failed">; }, z.core.$strip>], "status">


defaultMaxTokens

const defaultMaxTokens: 6000 = 6000

A round that runs past a gateway’s ~100 s limit comes back as a timeout instead of an answer.


defaultMaxToolContentChars

const defaultMaxToolContentChars: 6000 = 6000


defaultReadLimit

const defaultReadLimit: 25 = 25


defaultSurfaceMatches

const defaultSurfaceMatches: 8 = 8

Enough to choose between, few enough to read.


dryRunRows

const dryRunRows: 5 = 5


hiremantaBriefs

const hiremantaBriefs: readonly HornBrief[]


hiremantaIntegrationBriefs

const hiremantaIntegrationBriefs: readonly HornBrief[]


hornBriefSchema

const hornBriefSchema: z.ZodObject<{ audience: z.ZodString; checks: z.ZodArray<z.ZodString>; id: z.ZodString; question: z.ZodString; shapes: z.ZodArray<z.ZodString>; title: z.ZodString; views: z.ZodArray<z.ZodObject<{ shows: z.ZodString; title: z.ZodString; }, z.core.$strict>>; }, z.core.$strict>


hornCriticSystemPrompt

const hornCriticSystemPrompt: string


hornPatchOpSchema

const hornPatchOpSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ expect: z.ZodOptional<z.ZodString>; op: z.ZodLiteral<"set_title">; title: z.ZodString; }, z.core.$strict>, z.ZodObject<{ expect: z.ZodOptional<z.ZodString>; op: z.ZodLiteral<"set_style">; 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>; }, z.core.$strict>, z.ZodObject<{ expect: z.ZodOptional<z.ZodString>; op: z.ZodLiteral<"upsert_view">; reuseRejectedReason: z.ZodOptional<z.ZodString>; view: z.ZodUnion<readonly [z.ZodObject<{ id: z.ZodString; ref: z.ZodObject<{ hash: …; item: …; revision: …; }, z.core.$strict>; }, z.core.$strict>, z.ZodObject<{ binding: z.ZodDiscriminatedUnion<[…, …, …], "kind">; emits: z.ZodOptional<z.ZodArray<…>>; id: z.ZodString; render: z.ZodDiscriminatedUnion<[…, …], "kind">; title: z.ZodString; }, z.core.$strip>]>; }, z.core.$strict>, z.ZodObject<{ expect: z.ZodOptional<z.ZodString>; id: z.ZodString; op: z.ZodLiteral<"remove_view">; }, z.core.$strict>, z.ZodObject<{ binding: z.ZodDiscriminatedUnion<[z.ZodObject<{ columns: z.ZodArray<z.ZodObject<{ name: …; type: …; }, 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: …; path: …; type: …; }, z.core.$strip>>; kind: z.ZodLiteral<"lens">; limit: z.ZodNumber; rows: z.ZodOptional<z.ZodEnum<{ entity: …; 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">; expect: z.ZodOptional<z.ZodString>; op: z.ZodLiteral<"set_binding">; viewId: z.ZodString; }, z.core.$strict>, z.ZodObject<{ expect: z.ZodOptional<z.ZodString>; op: z.ZodLiteral<"set_render">; 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: …; hash: …; }, z.core.$strip>>; source: z.ZodString; }, z.core.$strip>], "kind">; reuseRejectedReason: z.ZodOptional<z.ZodString>; viewId: z.ZodString; }, z.core.$strict>, z.ZodObject<{ expect: z.ZodOptional<z.ZodString>; h: z.ZodNumber; op: z.ZodLiteral<"place_view">; viewId: z.ZodString; w: z.ZodNumber; x: z.ZodNumber; y: z.ZodNumber; }, z.core.$strict>, z.ZodObject<{ expect: z.ZodOptional<z.ZodString>; op: z.ZodLiteral<"upsert_variable">; variable: z.ZodObject<{ default: z.ZodOptional<z.ZodJSONSchema>; id: z.ZodString; label: z.ZodString; options: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<…, …>, z.ZodObject<…, …>]>>; type: z.ZodEnum<{ date: "date"; dateRange: "dateRange"; enum: "enum"; iri: "iri"; number: "number"; string: "string"; }>; urlParam: z.ZodOptional<z.ZodString>; }, z.core.$strip>; }, z.core.$strict>, z.ZodObject<{ expect: z.ZodOptional<z.ZodString>; id: z.ZodString; op: z.ZodLiteral<"remove_variable">; }, z.core.$strict>, z.ZodObject<{ derivation: z.ZodUnion<readonly [z.ZodObject<{ id: z.ZodString; ref: z.ZodObject<{ hash: …; item: …; revision: …; }, 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: …; query: …; staged: …; }>; }, z.core.$strip>]>; expect: z.ZodOptional<z.ZodString>; op: z.ZodLiteral<"upsert_derivation">; }, z.core.$strict>, z.ZodObject<{ expect: z.ZodOptional<z.ZodString>; id: z.ZodString; op: z.ZodLiteral<"remove_derivation">; }, z.core.$strict>, z.ZodObject<{ action: z.ZodUnion<readonly [z.ZodObject<{ id: z.ZodString; ref: z.ZodObject<{ hash: …; item: …; revision: …; }, z.core.$strict>; }, z.core.$strict>, z.ZodDiscriminatedUnion<[z.ZodObject<{ allowedClasses: …; allowedPredicates: …; confirm: …; criteria: …; delete: …; id: …; insert: …; kind: …; label: …; params: …; where: …; }, z.core.$strip>, z.ZodObject<{ actionShapeIri: …; confirm: …; criteria: …; id: …; kind: …; label: …; mapping: …; operation: …; params: …; }, z.core.$strip>], "kind">]>; expect: z.ZodOptional<z.ZodString>; op: z.ZodLiteral<"upsert_action">; }, z.core.$strict>, z.ZodObject<{ expect: z.ZodOptional<z.ZodString>; id: z.ZodString; op: z.ZodLiteral<"remove_action">; }, z.core.$strict>, z.ZodObject<{ dependency: 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>; op: z.ZodLiteral<"pin">; }, z.core.$strict>, z.ZodObject<{ item: z.ZodURL; op: z.ZodLiteral<"unpin">; }, z.core.$strict>], "op">


hornPlanSchema

const hornPlanSchema: z.ZodObject<{ actions: z.ZodArray<z.ZodObject<{ id: z.ZodString; purpose: z.ZodString; }, z.core.$strict>>; derivations: z.ZodArray<z.ZodObject<{ id: z.ZodString; purpose: z.ZodString; }, z.core.$strict>>; goal: z.ZodString; openQuestions: z.ZodArray<z.ZodString>; views: z.ZodArray<z.ZodObject<{ classes: z.ZodArray<z.ZodString>; id: z.ZodString; purpose: z.ZodString; render: z.ZodDiscriminatedUnion<[z.ZodObject<{ revision: z.ZodURL; with: z.ZodLiteral<"library">; }, z.core.$strict>, z.ZodObject<{ component: z.ZodString; with: z.ZodLiteral<"component">; }, z.core.$strict>, z.ZodObject<{ with: z.ZodLiteral<"tsx">; }, z.core.$strict>], "with">; title: z.ZodString; }, z.core.$strict>>; }, z.core.$strict>


investigationMaxSteps

const investigationMaxSteps: 6 = 6


maxCriticCards

const maxCriticCards: 3 = 3


maxHumanIntent

const maxHumanIntent: 50 = 50

Agents shows this beside the staged rule in its own UI and caps it there. One cap, so the host that truncates and the schema that rejects cannot drift apart.


maxInvestigationSummaryChars

const maxInvestigationSummaryChars: 1200 = 1200


maxKnowledgeChars

const maxKnowledgeChars: 10000 = 10000


maxReadLimit

const maxReadLimit: 100 = 100


maxRepairRounds

const maxRepairRounds: 3 = 3


maxSurfaceMatches

const maxSurfaceMatches: 12 = 12


maxVisualAdvice

const maxVisualAdvice: 6 = 6


minViewWidth

const minViewWidth: 3 = 3


pictureCriticSystemPrompt

const pictureCriticSystemPrompt: string


proposalTools

const proposalTools: ReadonlySet<StudioToolName>


proposeShapeViewTool

const proposeShapeViewTool: StudioToolDefinition


reportCardAdviceTool

const reportCardAdviceTool: StudioToolDefinition


shapeViewProposalSchema

const shapeViewProposalSchema: z.ZodObject<{ 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.$strict>>; record: 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>; }, z.core.$strict>


shapeViewSystemPrompt

const shapeViewSystemPrompt: string


sourceAndBindingTogether

const sourceAndBindingTogether: "The binding's columns and the view's source change together: send them in the same patch (one upsert_view, or set_binding and set_render side by side)." = "The binding's columns and the view's source change together: send them in the same patch (one upsert_view, or set_binding and set_render side by side)."


studioEvalCaseSchema

const studioEvalCaseSchema: z.ZodObject<{ datastoreId: z.ZodString; expect: z.ZodObject<{ classes: z.ZodArray<z.ZodString>; computed: z.ZodOptional<z.ZodArray<z.ZodString>>; minViews: z.ZodNumber; reuseComponents: z.ZodArray<z.ZodString>; uses: z.ZodOptional<z.ZodArray<z.ZodString>>; visual: z.ZodOptional<z.ZodBoolean>; }, z.core.$strict>; id: z.ZodString; prompt: z.ZodString; realm: z.ZodEnum<{ hiremanta-com: "hiremanta-com"; journey-travel: "journey-travel"; }>; }, z.core.$strict>


studioGoldenCases

const studioGoldenCases: StudioEvalCase[]


studioHintSchema

const studioHintSchema: z.ZodObject<{ body: z.ZodString; id: z.ZodString; source: z.ZodObject<{ createdAt: z.ZodISODateTime; sessions: z.ZodArray<z.ZodString>; }, z.core.$strict>; title: z.ZodString; triggers: z.ZodObject<{ classes: z.ZodArray<z.ZodURL>; errorCodes: z.ZodArray<z.ZodString>; keywords: z.ZodArray<z.ZodString>; }, z.core.$strict>; }, z.core.$strict>


studioModes

const studioModes: readonly ["plan", "build", "investigate"]


studioSkillSchema

const studioSkillSchema: z.ZodObject<{ body: z.ZodString; description: z.ZodString; name: z.ZodString; triggers: z.ZodArray<z.ZodString>; }, z.core.$strict>


studioStages

const studioStages: readonly ["design", "hydrate", "review"]


studioToolInputs

const studioToolInputs: object

Type Declaration

ask_manta_for_rule

readonly ask_manta_for_rule: z.ZodObject<{ intent: z.ZodString; rule: z.ZodString; }, z.core.$strict>

components_for_class

readonly components_for_class: z.ZodObject<{ class: z.ZodString; }, z.core.$strict>

describe_class

readonly describe_class: z.ZodObject<{ class: z.ZodString; }, z.core.$strict>

find_components

readonly find_components: z.ZodObject<{ limit: z.ZodOptional<z.ZodNumber>; need: z.ZodString; }, z.core.$strict>

investigate_data

readonly investigate_data: z.ZodObject<{ classes: z.ZodOptional<z.ZodArray<z.ZodString>>; question: z.ZodString; }, z.core.$strict>

list_classes

readonly list_classes: z.ZodObject<{ limit: z.ZodOptional<z.ZodNumber>; query: z.ZodOptional<z.ZodString>; }, z.core.$strict>

list_computed

readonly list_computed: z.ZodObject<{ classes: z.ZodOptional<z.ZodArray<z.ZodString>>; limit: z.ZodOptional<z.ZodNumber>; query: z.ZodOptional<z.ZodString>; }, z.core.$strict>

list_rules

readonly list_rules: z.ZodObject<{ limit: z.ZodOptional<z.ZodNumber>; query: z.ZodString; }, z.core.$strict>

look_at_it

readonly look_at_it: z.ZodObject<{ why: z.ZodString; }, z.core.$strict>

propose_horn_patch

readonly propose_horn_patch: z.ZodObject<{ note: z.ZodOptional<z.ZodString>; ops: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{ expect: z.ZodOptional<z.ZodString>; op: z.ZodLiteral<"set_title">; title: z.ZodString; }, z.core.$strict>, z.ZodObject<{ expect: z.ZodOptional<z.ZodString>; op: z.ZodLiteral<"set_style">; style: z.ZodObject<{ accent: z.ZodOptional<…>; density: z.ZodOptional<…>; radius: z.ZodOptional<…>; theme: z.ZodOptional<…>; }, z.core.$strict>; }, z.core.$strict>, z.ZodObject<{ expect: z.ZodOptional<z.ZodString>; op: z.ZodLiteral<"upsert_view">; reuseRejectedReason: z.ZodOptional<z.ZodString>; view: z.ZodUnion<readonly […, …]>; }, z.core.$strict>, z.ZodObject<{ expect: z.ZodOptional<z.ZodString>; id: z.ZodString; op: z.ZodLiteral<"remove_view">; }, z.core.$strict>, z.ZodObject<{ binding: z.ZodDiscriminatedUnion<[z.ZodObject<…, …>, z.ZodObject<…, …>, z.ZodObject<…, …>], "kind">; expect: z.ZodOptional<z.ZodString>; op: z.ZodLiteral<"set_binding">; viewId: z.ZodString; }, z.core.$strict>, z.ZodObject<{ expect: z.ZodOptional<z.ZodString>; op: z.ZodLiteral<"set_render">; render: z.ZodDiscriminatedUnion<[z.ZodObject<…, …>, z.ZodObject<…, …>], "kind">; reuseRejectedReason: z.ZodOptional<z.ZodString>; viewId: z.ZodString; }, z.core.$strict>, z.ZodObject<{ expect: z.ZodOptional<z.ZodString>; h: z.ZodNumber; op: z.ZodLiteral<"place_view">; viewId: z.ZodString; w: z.ZodNumber; x: z.ZodNumber; y: z.ZodNumber; }, z.core.$strict>, z.ZodObject<{ expect: z.ZodOptional<z.ZodString>; op: z.ZodLiteral<"upsert_variable">; variable: z.ZodObject<{ default: z.ZodOptional<…>; id: z.ZodString; label: z.ZodString; options: z.ZodOptional<…>; type: z.ZodEnum<…>; urlParam: z.ZodOptional<…>; }, z.core.$strip>; }, z.core.$strict>, z.ZodObject<{ expect: z.ZodOptional<z.ZodString>; id: z.ZodString; op: z.ZodLiteral<"remove_variable">; }, z.core.$strict>, z.ZodObject<{ derivation: z.ZodUnion<readonly […, …]>; expect: z.ZodOptional<z.ZodString>; op: z.ZodLiteral<"upsert_derivation">; }, z.core.$strict>, z.ZodObject<{ expect: z.ZodOptional<z.ZodString>; id: z.ZodString; op: z.ZodLiteral<"remove_derivation">; }, z.core.$strict>, z.ZodObject<{ action: z.ZodUnion<readonly […, …]>; expect: z.ZodOptional<z.ZodString>; op: z.ZodLiteral<"upsert_action">; }, z.core.$strict>, z.ZodObject<{ expect: z.ZodOptional<z.ZodString>; id: z.ZodString; op: z.ZodLiteral<"remove_action">; }, z.core.$strict>, z.ZodObject<{ dependency: z.ZodObject<{ kind: z.ZodEnum<…>; ref: z.ZodObject<…, …>; }, z.core.$strict>; op: z.ZodLiteral<"pin">; }, z.core.$strict>, z.ZodObject<{ item: z.ZodURL; op: z.ZodLiteral<"unpin">; }, z.core.$strict>], "op">>; }, z.core.$strict>

propose_library_item

readonly propose_library_item: z.ZodObject<{ description: z.ZodString; elementId: z.ZodString; kind: z.ZodEnum<{ action: "action"; derivation: "derivation"; query: "query"; view: "view"; }>; title: z.ZodString; }, z.core.$strict>

propose_plan

readonly propose_plan: z.ZodObject<{ plan: z.ZodObject<{ actions: z.ZodArray<z.ZodObject<{ id: z.ZodString; purpose: z.ZodString; }, z.core.$strict>>; derivations: z.ZodArray<z.ZodObject<{ id: z.ZodString; purpose: z.ZodString; }, z.core.$strict>>; goal: z.ZodString; openQuestions: z.ZodArray<z.ZodString>; views: z.ZodArray<z.ZodObject<{ classes: z.ZodArray<z.ZodString>; id: z.ZodString; purpose: z.ZodString; render: z.ZodDiscriminatedUnion<[z.ZodObject<…, …>, z.ZodObject<…, …>, z.ZodObject<…, …>], "with">; title: z.ZodString; }, z.core.$strict>>; }, z.core.$strict>; }, z.core.$strict>

read_component_api

readonly read_component_api: z.ZodObject<{ component: z.ZodString; }, z.core.$strict>

report_harness_issue

readonly report_harness_issue: z.ZodObject<{ category: z.ZodEnum<{ context: "context"; data: "data"; other: "other"; tools: "tools"; validation: "validation"; }>; message: z.ZodString; }, z.core.$strict>

run_sparql

readonly run_sparql: z.ZodObject<{ limit: z.ZodOptional<z.ZodNumber>; query: z.ZodString; }, z.core.$strict>


studioToolsByMode

const studioToolsByMode: Record<StudioMode, readonly StudioToolName[]>


studioToolSchemas

const studioToolSchemas: { [Name in StudioToolName]: z.ZodType<StudioToolInput<Name>> }


thinkingBudget

const thinkingBudget: 2048 = 2048

Enough for a plan or a repair, well inside the turn’s output budget.


visualAdviceSchema

const visualAdviceSchema: z.ZodObject<{ advice: z.ZodArray<z.ZodObject<{ field: z.ZodOptional<z.ZodString>; problem: z.ZodString; }, z.core.$strict>>; }, z.core.$strict>


visualCriticSystemPrompt

const visualCriticSystemPrompt: string

Functions

acceptedSpecs()

acceptedSpecs(state): object[]

Parameters

state
datastoreId

string

realm

"hiremanta-com" | "journey-travel"

runVersion

1

shapes

z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{ startedAt: z.ZodISODateTime; status: z.ZodLiteral<"running">; }, z.core.$strip>, z.ZodObject<{ advice: z.ZodOptional<z.ZodArray<z.ZodString>>; finishedAt: z.ZodISODateTime; rounds: z.ZodNumber; sampled: z.ZodNumber; spec: z.ZodObject<{ classCurie: z.ZodString; fields: z.ZodArray<z.ZodObject<{ name: …; path: …; type: …; }, z.core.$strict>>; record: z.ZodObject<{ badges: z.ZodOptional<…>; currency: z.ZodOptional<…>; fields: z.ZodArray<…>; format: z.ZodOptional<…>; link: z.ZodOptional<…>; subtitle: z.ZodOptional<…>; title: z.ZodString; type: z.ZodLiteral<…>; }, z.core.$strict>; schema: z.ZodString; status: z.ZodEnum<{ curated: "curated"; drafted: "drafted"; }>; }, z.core.$strict>; status: z.ZodLiteral<"accepted">; usage: z.ZodObject<{ cachedPromptTokens: z.ZodNumber; completionTokens: z.ZodNumber; promptTokens: z.ZodNumber; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ finishedAt: z.ZodISODateTime; problems: z.ZodArray<z.ZodString>; rounds: z.ZodNumber; sampled: z.ZodNumber; status: z.ZodLiteral<"gave-up">; usage: z.ZodObject<{ cachedPromptTokens: z.ZodNumber; completionTokens: z.ZodNumber; promptTokens: z.ZodNumber; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ finishedAt: z.ZodISODateTime; status: z.ZodLiteral<"no-data">; }, z.core.$strip>, z.ZodObject<{ error: z.ZodString; finishedAt: z.ZodISODateTime; status: z.ZodLiteral<"failed">; }, z.core.$strip>], "status">>

startedAt

string

updatedAt

string

Returns

object[]


adviseOnHorn()

adviseOnHorn(options): Promise<string[]>

What a second model says about the Horn the Studio just drew.

Advice, never a verdict: it is shown to the person and offered back to the Studio, and it never blocks a save. Anything that goes wrong is no advice rather than an error, as with the shape critic.

Parameters

options
asked?

string

What was asked for, so the critic can say the answer does not answer it.

image

string

A picture of the drawn Horn, as a data URL. Without one there is nothing to judge.

model

LanguageModel

signal?

AbortSignal

Returns

Promise<string[]>


adviseOnShapeView()

adviseOnShapeView(options): Promise<string[]>

Advice on cards the Studio designed, from a model asked to read them as a stranger would. Anything that goes wrong — no tool call, malformed arguments, the model refusing — is no advice rather than an error: this runs beside a coverage run that must finish either way.

Parameters

options
cards

readonly RecordCard[]

image?

string

A picture of the drawn card, as a data URL. With one, the critic judges the drawing rather than the text.

maxCards?

number

model

LanguageModel

signal?

AbortSignal

variants?

readonly ZooVariant[]

Returns

Promise<string[]>


applyHornPatch()

applyHornPatch(horn, ops): PatchResult

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; })[]

ops

readonly ({ expect?: string; op: "set_title"; title: string; } | { expect?: string; op: "set_style"; style: { accent?: "blue" | "orange" | "green" | "amber" | "pink" | "forest" | "indigo" | "red"; density?: "compact" | "comfortable"; radius?: "sharp" | "soft" | "round"; theme?: "light" | "dark"; }; } | { expect?: string; op: "upsert_view"; reuseRejectedReason?: string; view: { 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; }; } | { expect?: string; id: string; op: "remove_view"; } | { 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; }; }; expect?: string; op: "set_binding"; viewId: string; } | { expect?: string; op: "set_render"; render: { component: { hash: string; item: string; revision: string; }; kind: "component"; props: JSONType; } | { kind: "tsx"; reviewed?: { at: string; hash: string; }; source: string; }; reuseRejectedReason?: string; viewId: string; } | { expect?: string; h: number; op: "place_view"; viewId: string; w: number; x: number; y: number; } | { expect?: string; op: "upsert_variable"; variable: { default?: JSONType; id: string; label: string; options?: { values: JSONType[]; } | { 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; }; }; }; type: "string" | "number" | "iri" | "date" | "enum" | "dateRange"; urlParam?: string; }; } | { expect?: string; id: string; op: "remove_variable"; } | { derivation: { 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"; }; expect?: string; op: "upsert_derivation"; } | { expect?: string; id: string; op: "remove_derivation"; } | { action: { 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[]; }; expect?: string; op: "upsert_action"; } | { expect?: string; id: string; op: "remove_action"; } | { dependency: { kind: "query" | "component" | "derivation" | "view" | "action" | "horn"; ref: { hash: string; item: string; revision: string; }; }; op: "pin"; } | { item: string; op: "unpin"; })[]

Returns

PatchResult


assembleStudioMessages()

assembleStudioMessages(input): StudioMessage[]

Parameters

input
history

readonly StudioMessage[]

system

string

usefulContext

string

userMessage

string

Returns

StudioMessage[]


bindCall()

bindCall<Name>(handlers, name, raw): BoundCall | undefined

Type Parameters

Name

Name extends "list_classes" | "describe_class" | "list_computed" | "components_for_class" | "read_component_api" | "look_at_it" | "find_components" | "list_rules" | "run_sparql" | "ask_manta_for_rule" | "investigate_data" | "propose_plan" | "propose_horn_patch" | "propose_library_item" | "report_harness_issue"

Parameters

handlers

StudioToolHandlers

name

Name

raw

unknown

Returns

BoundCall | undefined


boundedKnowledge()

boundedKnowledge(text): string

Parameters

text

string

Returns

string


briefById()

briefById(id): { audience: string; checks: string[]; id: string; question: string; shapes: string[]; title: string; views: object[]; } | undefined

Parameters

id

string

Returns

{ audience: string; checks: string[]; id: string; question: string; shapes: string[]; title: string; views: object[]; } | undefined


briefMessage()

briefMessage(brief): string

Parameters

brief
audience

string

checks

string[]

id

string

question

string

shapes

string[]

title

string

views

object[]

Returns

string


bucketOf()

bucketOf(key): number

Parameters

key

string

Returns

number


buildUsefulContext()

buildUsefulContext(input): UsefulContext

Parameters

input

UsefulContextInput

Returns

UsefulContext


capSummary()

capSummary(text, max?): string

Parameters

text

string

max?

number

Returns

string


cardRendering()

cardRendering(args): string

What the cards say, as the reader will get them. Values are quoted so the model judges the text itself rather than a paraphrase of it, and nothing here varies between two runs over the same data.

Parameters

args
cards

readonly RecordCard[]

maxCards?

number

variants?

readonly ZooVariant[]

Returns

string


cardsOfZoo()

cardsOfZoo(zoo): RecordCard[]

The cards a zoo will draw, or none when the view does not draw record cards.

Parameters

zoo

ShapeZoo

Returns

RecordCard[]


checkBriefViews()

checkBriefViews(args): Promise<BriefFinding[]>

Parameters

args
brief

{ audience: string; checks: string[]; id: string; question: string; shapes: string[]; title: string; views: object[]; }

brief.audience

string

brief.checks

string[]

brief.id

string

brief.question

string

brief.shapes

string[]

brief.title

string

brief.views

object[]

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"; }; 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; })[]; }

horn.about?

string[]

horn.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[]; })[]

horn.audience?

string

horn.baseRevision?

number

horn.datastoreId

string

horn.dependencies

object[]

horn.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"; })[]

horn.iri

string

horn.layout

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

horn.layout.columns

12

horn.layout.items

object[]

horn.layout.kind

"grid"

horn.lock

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

horn.lock.entries

object[]

horn.lock.lockVersion

1

horn.realm

"hiremanta-com" | "journey-travel"

horn.revision

number

horn.runtime

{ kit: string; }

horn.runtime.kit

string

horn.schemaVersion

1

horn.slug

string

horn.style?

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

horn.style.accent?

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

horn.style.density?

"compact" | "comfortable"

horn.style.radius?

"sharp" | "soft" | "round"

horn.style.theme?

"light" | "dark"

horn.summary?

string

horn.title

string

horn.variables

object[]

horn.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"

rows?

number

select

SparqlSelect

shapes

readonly object[]

Returns

Promise<BriefFinding[]>


classesFor()

classesFor(select, shapes): Promise<ClassSummary[]>

Parameters

select

SparqlSelect

shapes

readonly object[]

Returns

Promise<ClassSummary[]>


completeWith()

completeWith(model, request, maxTokens, signal?): Promise<StudioModelResponse>

One round against the model. The loop decides what to do with the tool calls it comes back with.

Parameters

model

LanguageModel

request

StudioModelRequest

maxTokens

number

signal?

AbortSignal

Returns

Promise<StudioModelResponse>


componentApiAnswer()

componentApiAnswer(name, lookup): string

The answer to “how do I call this”: the surface’s own summary, then what the SDK declares.

The summary comes first because an emitted type can be a zod tree — accurate and slow to read — while the calling form above it is the shape to copy.

Parameters

name

string

lookup

ComponentApiLookup

Returns

string


createDryRun()

createDryRun(options): (horn, viewIds) => Promise<DryRunResult[]>

Parameters

options

DryRunOptions

Returns

(horn, viewIds) => Promise<DryRunResult[]>


createVertexAccessTokens()

createVertexAccessTokens(options): VertexAccessTokens

A cached access token, refreshed before it expires. One exchange in flight at a time.

Parameters

options

VertexAuthOptions

Returns

VertexAccessTokens


datastoreFacts()

datastoreFacts(args): Promise<{ classes: ClassSummary[]; computed: DerivedTerm[]; }>

What a turn is told about the datastore before it asks anything: the classes it holds, and what the rules work out about the ones the question is nearest to — which no shape lists, so nothing else would surface it.

Parameters

args
prompt

string

realm

"hiremanta-com" | "journey-travel"

select

SparqlSelect

shapes

readonly object[]

signal?

AbortSignal

Returns

Promise<{ classes: ClassSummary[]; computed: DerivedTerm[]; }>


describeDraftedChanges()

describeDraftedChanges(changes, where): string

The body of the pull request: what to look at, and what to do about it. A reviewer opens each zoo and decides; nothing here is a verdict, because the gate a run passes is not the judgement curated stands for.

Parameters

changes

DraftedChanges

where
datastoreId

string

realm

string

Returns

string


describeHorn()

describeHorn(realm, horn): string

Parameters

realm

"hiremanta-com" | "journey-travel"

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

string


describeHornChange()

describeHornChange(before, after): HornChange

Parameters

before
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; })[]

after
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

HornChange


describeLibraryOffer()

describeLibraryOffer(offer): string

Parameters

offer

LibraryItemOffer

Returns

string


describeLockProblem()

describeLockProblem(problem): string

Parameters

problem

LockProblem

Returns

string


draftedChanges()

draftedChanges(before, after): DraftedChanges

Parameters

before

readonly object[]

after

readonly object[]

Returns

DraftedChanges


elementFingerprints()

elementFingerprints(horn): object

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

object

actions

actions: Record<string, string>

derivations

derivations: Record<string, string>

layout

layout: object

Index Signature

[k: string]: string

style

style: string

title

title: string

variables

variables: Record<string, string>

views

views: Record<string, string>


evaluateProposal()

evaluateProposal(draft, ops, deps): Promise<ProposalResult>

Parameters

draft
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; })[]

ops

readonly ({ expect?: string; op: "set_title"; title: string; } | { expect?: string; op: "set_style"; style: { accent?: "blue" | "orange" | "green" | "amber" | "pink" | "forest" | "indigo" | "red"; density?: "compact" | "comfortable"; radius?: "sharp" | "soft" | "round"; theme?: "light" | "dark"; }; } | { expect?: string; op: "upsert_view"; reuseRejectedReason?: string; view: { 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; }; } | { expect?: string; id: string; op: "remove_view"; } | { 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; }; }; expect?: string; op: "set_binding"; viewId: string; } | { expect?: string; op: "set_render"; render: { component: { hash: string; item: string; revision: string; }; kind: "component"; props: JSONType; } | { kind: "tsx"; reviewed?: { at: string; hash: string; }; source: string; }; reuseRejectedReason?: string; viewId: string; } | { expect?: string; h: number; op: "place_view"; viewId: string; w: number; x: number; y: number; } | { expect?: string; op: "upsert_variable"; variable: { default?: JSONType; id: string; label: string; options?: { values: JSONType[]; } | { 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; }; }; }; type: "string" | "number" | "iri" | "date" | "enum" | "dateRange"; urlParam?: string; }; } | { expect?: string; id: string; op: "remove_variable"; } | { derivation: { 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"; }; expect?: string; op: "upsert_derivation"; } | { expect?: string; id: string; op: "remove_derivation"; } | { action: { 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[]; }; expect?: string; op: "upsert_action"; } | { expect?: string; id: string; op: "remove_action"; } | { dependency: { kind: "query" | "component" | "derivation" | "view" | "action" | "horn"; ref: { hash: string; item: string; revision: string; }; }; op: "pin"; } | { item: string; op: "unpin"; })[]

deps

ProposalDeps

Returns

Promise<ProposalResult>


evaluateShapeViewOnZoo()

evaluateShapeViewOnZoo(args): (spec) => Promise<string[]>

Parameters

args
datastoreId

string

realm

"hiremanta-com" | "journey-travel"

sample?

number

select

SparqlSelect

Returns

(spec) => Promise<string[]>


fingerprint()

fingerprint(value): string

Parameters

value

unknown

Returns

string


formatFailures()

formatFailures(failures, max?): string

Parameters

failures

readonly ProposalFailure[]

max?

number

Returns

string


hasDraftedChanges()

hasDraftedChanges(changes): boolean

Parameters

changes

DraftedChanges

Returns

boolean


hintsToPrune()

hintsToPrune(stats, options?): string[]

Parameters

stats

readonly HintStats[]

options?
minLift?

number

minSessions?

number

Returns

string[]


integrationBriefById()

integrationBriefById(id): { audience: string; checks: string[]; id: string; question: string; shapes: string[]; title: string; views: object[]; } | undefined

Parameters

id

string

Returns

{ audience: string; checks: string[]; id: string; question: string; shapes: string[]; title: string; views: object[]; } | undefined


investigateData()

investigateData(options): Promise<string>

Parameters

options
classes?

readonly string[]

draft

{ 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; })[]; }

draft.about?

string[]

draft.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[]; })[]

draft.audience?

string

draft.baseRevision?

number

draft.datastoreId

string

draft.dependencies

object[]

draft.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"; })[]

draft.iri

string

draft.layout

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

draft.layout.columns

12

draft.layout.items

object[]

draft.layout.kind

"grid"

draft.lock

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

draft.lock.entries

object[]

draft.lock.lockVersion

1

draft.realm

"hiremanta-com" | "journey-travel"

draft.revision

number

draft.runtime

{ kit: string; }

draft.runtime.kit

string

draft.schemaVersion

1

draft.slug

string

draft.style?

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

draft.style.accent?

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

draft.style.density?

"compact" | "comfortable"

draft.style.radius?

"sharp" | "soft" | "round"

draft.style.theme?

"light" | "dark"

draft.summary?

string

draft.title

string

draft.variables

object[]

draft.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; })[]

handlers

StudioToolHandlers

model

LanguageModel

onEvent?

(event) => void

Forwarded so the investigation’s own steps show up beside the turn’s, rather than as one long pause.

question

string

realm

"hiremanta-com" | "journey-travel"

signal?

AbortSignal

Returns

Promise<string>


isStudioToolName()

isStudioToolName(name): name is “list_classes” | “describe_class” | “list_computed” | “components_for_class” | “read_component_api” | “look_at_it” | “find_components” | “list_rules” | “run_sparql” | “ask_manta_for_rule” | “investigate_data” | “propose_plan” | “propose_horn_patch” | “propose_library_item” | “report_harness_issue”

Parameters

name

string

Returns

name is “list_classes” | “describe_class” | “list_computed” | “components_for_class” | “read_component_api” | “look_at_it” | “find_components” | “list_rules” | “run_sparql” | “ask_manta_for_rule” | “investigate_data” | “propose_plan” | “propose_horn_patch” | “propose_library_item” | “report_harness_issue”


libraryOfferProblem()

libraryOfferProblem(offer, horn): ProposalFailure | undefined

Parameters

offer

LibraryItemOffer

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

ProposalFailure | undefined


mergeGeneratedViews()

mergeGeneratedViews(args): object[]

Parameters

args
accepted

readonly object[]

generated

readonly object[]

installed

readonly object[]

Returns

object[]


nextRepairAction()

nextRepairAction(failedRounds, failures): RepairAction

Parameters

failedRounds

number

failures

readonly ProposalFailure[]

Returns

RepairAction


normalizePrivateKey()

normalizePrivateKey(privateKey): string

A PEM stored on one line, which importKey rejects.

Parameters

privateKey

string

Returns

string


parseImports()

parseImports(source): ParsedImport[]

Parameters

source

string

Returns

ParsedImport[]


parseToolArguments()

parseToolArguments(raw): ParsedArguments

Parameters

raw

string

Returns

ParsedArguments


parseVertexServiceAccount()

parseVertexServiceAccount(raw): VertexServiceAccount

Parameters

raw

string

Returns

VertexServiceAccount


planConformance()

planConformance(plan, horn, componentExportOf): PlanDeviation[]

Parameters

plan
actions

object[]

derivations

object[]

goal

string

openQuestions

string[]

views

object[]

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; })[]

componentExportOf

(ref) => string | undefined

Returns

PlanDeviation[]


planProblems()

planProblems(plan, horn): ProposalFailure[]

Parameters

plan
actions

object[]

derivations

object[]

goal

string

openQuestions

string[]

views

object[]

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

ProposalFailure[]


rankClasses()

rankClasses(prompt, classes, realm): ClassSummary[]

Parameters

prompt

string

classes

readonly ClassSummary[]

realm

"hiremanta-com" | "journey-travel"

Returns

ClassSummary[]


readFailure()

readFailure(caught): FailureReading

Parameters

caught

unknown

Returns

FailureReading


readOnlySelect()

readOnlySelect(query, limit, realm?): string

Parameters

query

string

limit

number

realm?

"hiremanta-com" | "journey-travel"

Returns

string


renderLogFailures()

renderLogFailures(entries): ProposalFailure[]

Parameters

entries

readonly RenderLogEntry[]

Returns

ProposalFailure[]


reuseViolations()

reuseViolations(input): ProposalFailure[]

Parameters

input

ReuseInput

Returns

ProposalFailure[]


rowsAsText()

rowsAsText(results, maxRows?): string

Parameters

results

SparqlResults

maxRows?

number

Returns

string


runBrief()

runBrief(options): Promise<BriefResult>

Parameters

options
brief

{ audience: string; checks: string[]; id: string; question: string; shapes: string[]; title: string; views: object[]; }

brief.audience

string

brief.checks

string[]

brief.id

string

brief.question

string

brief.shapes

string[]

brief.title

string

brief.views

object[]

catalog

{ catalogVersion: 1; components: object[]; source: { commit: string; package: string; repository: string; }; }

catalog.catalogVersion

1

catalog.components

object[]

catalog.source

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

catalog.source.commit

string

catalog.source.package

string

catalog.source.repository

string

componentRefs?

Readonly<Record<string, { hash: string; item: string; revision: string; }>>

datastoreId

string

library?

readonly LibraryHit[]

lookup

RevisionLookup

maxSteps?

number

model

LanguageModel

realm

"hiremanta-com" | "journey-travel"

select

SparqlSelect

shapes

readonly object[]

signal?

AbortSignal

views

readonly object[]

Returns

Promise<BriefResult>


runBriefSuite()

runBriefSuite(options): Promise<{ briefs: z.ZodRecord<z.ZodString, z.ZodObject<{ findings: z.ZodArray<z.ZodString>; finishedAt: z.ZodString; horn: z.ZodObject<{ about: z.ZodOptional<z.ZodArray<z.ZodURL>>; actions: z.ZodArray<z.ZodUnion<readonly […, …]>>; audience: z.ZodOptional<z.ZodString>; baseRevision: z.ZodOptional<z.ZodNumber>; datastoreId: z.ZodString; dependencies: z.ZodArray<z.ZodObject<{ kind: z.ZodEnum<…>; ref: z.ZodObject<…, …>; }, z.core.$strict>>; derivations: z.ZodArray<z.ZodUnion<readonly […, …]>>; iri: z.ZodURL; layout: z.ZodObject<{ columns: z.ZodLiteral<12>; items: z.ZodArray<z.ZodObject<…, …>>; kind: z.ZodLiteral<"grid">; }, z.core.$strip>; lock: z.ZodObject<{ entries: z.ZodArray<z.ZodObject<…, …>>; 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<…>; density: z.ZodOptional<…>; radius: z.ZodOptional<…>; theme: z.ZodOptional<…>; }, z.core.$strict>>; summary: z.ZodOptional<z.ZodString>; title: z.ZodString; variables: z.ZodArray<z.ZodObject<{ default: z.ZodOptional<…>; id: z.ZodString; label: z.ZodString; options: z.ZodOptional<…>; type: z.ZodEnum<…>; urlParam: z.ZodOptional<…>; }, z.core.$strip>>; views: z.ZodArray<z.ZodUnion<readonly […, …]>>; }, z.core.$strip>; reply: z.ZodString; status: z.ZodEnum<{ built: "built"; empty: "empty"; step-limit: "step-limit"; }>; steps: z.ZodNumber; usage: z.ZodObject<{ cachedPromptTokens: z.ZodNumber; completionTokens: z.ZodNumber; promptTokens: z.ZodNumber; }, z.core.$strip>; viewIds: z.ZodArray<z.ZodString>; }, z.core.$strip>>; datastoreId: string; realm: string; runVersion: 1; updatedAt: string; }>

Parameters

options
briefs

readonly object[]

check

(brief, horn) => Promise<string[]>

datastoreId

string

now?

() => Date

onProgress?

(progress) => void

realm

"hiremanta-com" | "journey-travel"

run

(brief) => Promise<BriefResult>

store

BriefRunStore

Returns

Promise<{ briefs: z.ZodRecord<z.ZodString, z.ZodObject<{ findings: z.ZodArray<z.ZodString>; finishedAt: z.ZodString; horn: z.ZodObject<{ about: z.ZodOptional<z.ZodArray<z.ZodURL>>; actions: z.ZodArray<z.ZodUnion<readonly […, …]>>; audience: z.ZodOptional<z.ZodString>; baseRevision: z.ZodOptional<z.ZodNumber>; datastoreId: z.ZodString; dependencies: z.ZodArray<z.ZodObject<{ kind: z.ZodEnum<…>; ref: z.ZodObject<…, …>; }, z.core.$strict>>; derivations: z.ZodArray<z.ZodUnion<readonly […, …]>>; iri: z.ZodURL; layout: z.ZodObject<{ columns: z.ZodLiteral<12>; items: z.ZodArray<z.ZodObject<…, …>>; kind: z.ZodLiteral<"grid">; }, z.core.$strip>; lock: z.ZodObject<{ entries: z.ZodArray<z.ZodObject<…, …>>; 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<…>; density: z.ZodOptional<…>; radius: z.ZodOptional<…>; theme: z.ZodOptional<…>; }, z.core.$strict>>; summary: z.ZodOptional<z.ZodString>; title: z.ZodString; variables: z.ZodArray<z.ZodObject<{ default: z.ZodOptional<…>; id: z.ZodString; label: z.ZodString; options: z.ZodOptional<…>; type: z.ZodEnum<…>; urlParam: z.ZodOptional<…>; }, z.core.$strip>>; views: z.ZodArray<z.ZodUnion<readonly […, …]>>; }, z.core.$strip>; reply: z.ZodString; status: z.ZodEnum<{ built: "built"; empty: "empty"; step-limit: "step-limit"; }>; steps: z.ZodNumber; usage: z.ZodObject<{ cachedPromptTokens: z.ZodNumber; completionTokens: z.ZodNumber; promptTokens: z.ZodNumber; }, z.core.$strip>; viewIds: z.ZodArray<z.ZodString>; }, z.core.$strip>>; datastoreId: string; realm: string; runVersion: 1; updatedAt: string; }>


runShapeCoverage()

runShapeCoverage(options): Promise<{ datastoreId: string; realm: "hiremanta-com" | "journey-travel"; runVersion: 1; shapes: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{ startedAt: z.ZodISODateTime; status: z.ZodLiteral<"running">; }, z.core.$strip>, z.ZodObject<{ advice: z.ZodOptional<z.ZodArray<z.ZodString>>; finishedAt: z.ZodISODateTime; rounds: z.ZodNumber; sampled: z.ZodNumber; spec: z.ZodObject<{ classCurie: z.ZodString; fields: z.ZodArray<z.ZodObject<…, …>>; record: z.ZodObject<{ badges: …; currency: …; fields: …; format: …; link: …; subtitle: …; title: …; type: …; }, z.core.$strict>; schema: z.ZodString; status: z.ZodEnum<{ curated: …; drafted: …; }>; }, z.core.$strict>; status: z.ZodLiteral<"accepted">; usage: z.ZodObject<{ cachedPromptTokens: z.ZodNumber; completionTokens: z.ZodNumber; promptTokens: z.ZodNumber; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ finishedAt: z.ZodISODateTime; problems: z.ZodArray<z.ZodString>; rounds: z.ZodNumber; sampled: z.ZodNumber; status: z.ZodLiteral<"gave-up">; usage: z.ZodObject<{ cachedPromptTokens: z.ZodNumber; completionTokens: z.ZodNumber; promptTokens: z.ZodNumber; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ finishedAt: z.ZodISODateTime; status: z.ZodLiteral<"no-data">; }, z.core.$strip>, z.ZodObject<{ error: z.ZodString; finishedAt: z.ZodISODateTime; status: z.ZodLiteral<"failed">; }, z.core.$strip>], "status">>; startedAt: string; updatedAt: string; }>

Parameters

options
advise?

boolean

Have the critic read each accepted card and say what a stranger would not understand. It costs one model call and one sampling query per accepted shape, and what it says is advice: it never changes the verdict.

capture?

(snapshot) => Promise<string | undefined>

Draws the accepted card and hands back a data URL. Absent, the critic reads the card as text instead.

criticModel?

any

The critic’s own model, when the host has one that can look at a picture. Absent uses the Studio’s.

datastoreId

string

limit?

number

maxRounds?

number

model

LanguageModel

now?

() => Date

onProgress?

(progress) => void

onTurnProgress?

(progress) => void

Each step within a shape as it happens; the script prints finished shapes and passes none.

realm

"hiremanta-com" | "journey-travel"

redo?

boolean

retryFailed?

boolean

sample?

number

select

SparqlSelect

shapes

readonly object[]

signal?

AbortSignal

store

CoverageRunStore

views

readonly object[]

wait?

(ms, signal?) => Promise<void>

Returns

Promise<{ datastoreId: string; realm: "hiremanta-com" | "journey-travel"; runVersion: 1; shapes: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{ startedAt: z.ZodISODateTime; status: z.ZodLiteral<"running">; }, z.core.$strip>, z.ZodObject<{ advice: z.ZodOptional<z.ZodArray<z.ZodString>>; finishedAt: z.ZodISODateTime; rounds: z.ZodNumber; sampled: z.ZodNumber; spec: z.ZodObject<{ classCurie: z.ZodString; fields: z.ZodArray<z.ZodObject<…, …>>; record: z.ZodObject<{ badges: …; currency: …; fields: …; format: …; link: …; subtitle: …; title: …; type: …; }, z.core.$strict>; schema: z.ZodString; status: z.ZodEnum<{ curated: …; drafted: …; }>; }, z.core.$strict>; status: z.ZodLiteral<"accepted">; usage: z.ZodObject<{ cachedPromptTokens: z.ZodNumber; completionTokens: z.ZodNumber; promptTokens: z.ZodNumber; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ finishedAt: z.ZodISODateTime; problems: z.ZodArray<z.ZodString>; rounds: z.ZodNumber; sampled: z.ZodNumber; status: z.ZodLiteral<"gave-up">; usage: z.ZodObject<{ cachedPromptTokens: z.ZodNumber; completionTokens: z.ZodNumber; promptTokens: z.ZodNumber; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ finishedAt: z.ZodISODateTime; status: z.ZodLiteral<"no-data">; }, z.core.$strip>, z.ZodObject<{ error: z.ZodString; finishedAt: z.ZodISODateTime; status: z.ZodLiteral<"failed">; }, z.core.$strip>], "status">>; startedAt: string; updatedAt: string; }>


runShapeViewTurn()

runShapeViewTurn(options): Promise<ShapeViewTurnResult>

Parameters

options
draft?

{ classCurie: string; fields: object[]; record: { badges?: string[]; currency?: string; fields: string[]; format?: "number" | "percent" | "integer" | "compact"; link?: string; subtitle?: string; title: string; type: "record"; }; schema: string; status: "drafted" | "curated"; }

The view as it stands, when someone is changing one rather than designing the first.

draft.classCurie

string

draft.fields

object[]

draft.record

{ badges?: string[]; currency?: string; fields: string[]; format?: "number" | "percent" | "integer" | "compact"; link?: string; subtitle?: string; title: string; type: "record"; }

draft.record.badges?

string[]

draft.record.currency?

string

draft.record.fields

string[]

draft.record.format?

"number" | "percent" | "integer" | "compact"

string

draft.record.subtitle?

string

draft.record.title

string

draft.record.type

"record"

draft.schema

string

draft.status

"drafted" | "curated"

evaluate?

(spec) => Promise<string[]>

fillRates?

Readonly<Record<string, number>>

history?

readonly StudioMessage[]

readonly ShapeLink[]

maxRounds?

number

model

LanguageModel

notes?

ReadonlyMap<string, TermNotes>

onProgress?

(progress) => void

realm

"hiremanta-com" | "journey-travel"

request?

string

What they asked for, in their own words. Absent when the turn is the coverage runner’s.

sampled?

number

shape

{ classIri: string; namespace: string; properties: object[]; schema: string; }

shape.classIri

string

shape.namespace

string

shape.properties

object[]

shape.schema

string

signal?

AbortSignal

Returns

Promise<ShapeViewTurnResult>


runStudioTurn()

runStudioTurn(options): Promise<StudioTurnResult>

Parameters

options

StudioTurnOptions

Returns

Promise<StudioTurnResult>


sampleShapeFillRates()

sampleShapeFillRates(shape, select, sample?, signal?): Promise<{ fillRates: Record<string, number>; sampled: number; }>

Parameters

shape
classIri

string

namespace

string

properties

object[]

schema

string

select

SparqlSelect

sample?

number

signal?

AbortSignal

Returns

Promise<{ fillRates: Record<string, number>; sampled: number; }>


scoreBrief()

scoreBrief(args): BriefFinding[]

Parameters

args
brief

{ audience: string; checks: string[]; id: string; question: string; shapes: string[]; title: string; views: object[]; }

brief.audience

string

brief.checks

string[]

brief.id

string

brief.question

string

brief.shapes

string[]

brief.title

string

brief.views

object[]

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"; }; 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; })[]; }

horn.about?

string[]

horn.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[]; })[]

horn.audience?

string

horn.baseRevision?

number

horn.datastoreId

string

horn.dependencies

object[]

horn.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"; })[]

horn.iri

string

horn.layout

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

horn.layout.columns

12

horn.layout.items

object[]

horn.layout.kind

"grid"

horn.lock

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

horn.lock.entries

object[]

horn.lock.lockVersion

1

horn.realm

"hiremanta-com" | "journey-travel"

horn.revision

number

horn.runtime

{ kit: string; }

horn.runtime.kit

string

horn.schemaVersion

1

horn.slug

string

horn.style?

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

horn.style.accent?

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

horn.style.density?

"compact" | "comfortable"

horn.style.radius?

"sharp" | "soft" | "round"

horn.style.theme?

"light" | "dark"

horn.summary?

string

horn.title

string

horn.variables

object[]

horn.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; })[]

shapes

readonly object[]

Returns

BriefFinding[]


scoreStudioOutcome()

scoreStudioOutcome(testCase, outcome): StudioScore

Parameters

testCase
datastoreId

string

expect

{ classes: string[]; computed?: string[]; minViews: number; reuseComponents: string[]; uses?: string[]; visual?: boolean; }

expect.classes

string[]

expect.computed?

string[]

expect.minViews

number

expect.reuseComponents

string[]

expect.uses?

string[]

expect.visual?

boolean

id

string

prompt

string

realm

"hiremanta-com" | "journey-travel"

outcome

StudioOutcome

Returns

StudioScore


selectHints()

selectHints(query): HintSelection

Parameters

query

HintQuery

Returns

HintSelection


selectSkills()

selectSkills(prompt, skills, max?): object[]

Parameters

prompt

string

skills

readonly object[]

max?

number

Returns

object[]


shapeViewContext()

shapeViewContext(args): string

Parameters

args
draft?

{ classCurie: string; fields: object[]; record: { badges?: string[]; currency?: string; fields: string[]; format?: "number" | "percent" | "integer" | "compact"; link?: string; subtitle?: string; title: string; type: "record"; }; schema: string; status: "drafted" | "curated"; }

draft.classCurie

string

draft.fields

object[]

draft.record

{ badges?: string[]; currency?: string; fields: string[]; format?: "number" | "percent" | "integer" | "compact"; link?: string; subtitle?: string; title: string; type: "record"; }

draft.record.badges?

string[]

draft.record.currency?

string

draft.record.fields

string[]

draft.record.format?

"number" | "percent" | "integer" | "compact"

string

draft.record.subtitle?

string

draft.record.title

string

draft.record.type

"record"

draft.schema

string

draft.status

"drafted" | "curated"

fillRates?

Readonly<Record<string, number>>

readonly ShapeLink[]

notes?

ReadonlyMap<string, TermNotes>

realm

"hiremanta-com" | "journey-travel"

sampled?

number

shape

{ classIri: string; namespace: string; properties: object[]; schema: string; }

shape.classIri

string

shape.namespace

string

shape.properties

object[]

shape.schema

string

Returns

string


shouldPlanFirst()

shouldPlanFirst(__namedParameters): boolean

Parameters

__namedParameters
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"; }; 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; })[]; }

horn.about?

string[]

horn.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[]; })[]

horn.audience?

string

horn.baseRevision?

number

horn.datastoreId

string

horn.dependencies

object[]

horn.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"; })[]

horn.iri

string

horn.layout

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

horn.layout.columns

12

horn.layout.items

object[]

horn.layout.kind

"grid"

horn.lock

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

horn.lock.entries

object[]

horn.lock.lockVersion

1

horn.realm

"hiremanta-com" | "journey-travel"

horn.revision

number

horn.runtime

{ kit: string; }

horn.runtime.kit

string

horn.schemaVersion

1

horn.slug

string

horn.style?

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

horn.style.accent?

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

horn.style.density?

"compact" | "comfortable"

horn.style.radius?

"sharp" | "soft" | "round"

horn.style.theme?

"light" | "dark"

horn.summary?

string

horn.title

string

horn.variables

object[]

horn.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; })[]

prompt

string

Returns

boolean


sleep()

sleep(ms, signal?): Promise<void>

Parameters

ms

number

signal?

AbortSignal

Returns

Promise<void>


stableStringify()

stableStringify(value): string

Parameters

value

unknown

Returns

string


stageGuidance()

stageGuidance(stage): string

The bar is docs/standard.md read down to what a turn can act on. Per stage, not in the prompt.

Parameters

stage

"design" | "hydrate" | "review"

Returns

string


stageOf()

stageOf(state): "design" | "hydrate" | "review"

Parameters

state
bound

boolean

drawn

boolean

Returns

"design" | "hydrate" | "review"


studioReadHandlers()

studioReadHandlers(args): StudioToolHandlers

Parameters

args
componentApi?

ComponentApiLookup

The surfaced components’ declarations, where the build read them. Absent, the tool is not offered.

model

LanguageModel

onEvent?

(event) => void

Passed on to the investigation sub-loop, so its steps show up rather than one long pause.

realm

"hiremanta-com" | "journey-travel"

select

SparqlSelect

shapes

readonly object[]

views

readonly object[]

Returns

StudioToolHandlers


studioSystemPrompt()

studioSystemPrompt(options): string

Parameters

options
knowledge?

string

mode

"plan" | "build" | "investigate"

realm

"hiremanta-com" | "journey-travel"

Returns

string


studioToolDefinitions()

studioToolDefinitions(mode, without?): StudioToolDefinition[]

The tools to offer, byte-stable across turns so the model server can reuse its prompt cache.

without drops the ones this run cannot answer. A tool offered with no handler costs a step and teaches the model to distrust the list — ask_manta_for_rule needs a signed-in person, and a brief or coverage run has none. The cache is keyed on the mode and what was dropped, so each variant stays byte-stable.

Parameters

mode

"plan" | "build" | "investigate"

without?

readonly ("list_classes" | "describe_class" | "list_computed" | "components_for_class" | "read_component_api" | "look_at_it" | "find_components" | "list_rules" | "run_sparql" | "ask_manta_for_rule" | "investigate_data" | "propose_plan" | "propose_horn_patch" | "propose_library_item" | "report_harness_issue")[]

Returns

StudioToolDefinition[]


studioWriteHandlers()

studioWriteHandlers(args): StudioToolHandlers

Parameters

args
catalog

{ catalogVersion: 1; components: object[]; source: { commit: string; package: string; repository: string; }; }

catalog.catalogVersion

1

catalog.components

object[]

catalog.source

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

catalog.source.commit

string

catalog.source.package

string

catalog.source.repository

string

componentRefs?

Readonly<Record<string, { hash: string; item: string; revision: string; }>>

The published revision of each catalog component. Absent until the catalog is published, and the reuse rule has nothing to ask for until then.

lookup

RevisionLookup

realm

"hiremanta-com" | "journey-travel"

rows?

number

select

SparqlSelect

stageRule?

RuleStager

Absent where no viewer is present — a script, a test — and the tool then says so rather than failing.

typecheck?

(source) => readonly TypeProblem[]

A compiler over a written view, where the host brought one.

Returns

StudioToolHandlers


summarizeBriefFindings()

summarizeBriefFindings(findings): string[]

Parameters

findings

readonly BriefFinding[]

Returns

string[]


surfaceSearchAnswer()

surfaceSearchAnswer(need, limit?): string

What the surface has for a need, in its own words.

Asked rather than listed: the palette grows with the SDK, and a turn that is told to search finds what was added after its prompt was written.

Parameters

need

string

limit?

number

Returns

string


toModelMessages()

toModelMessages(messages): ModelMessage[]

Parameters

messages

readonly StudioMessage[]

Returns

ModelMessage[]


toolCallDetail()

toolCallDetail(name, input): string | undefined

What a tool call was about, in the call’s own words.

“Querying the datastore” fifteen times says nothing about what is being looked for. This is for the person watching only: it never reaches the model, so it can be as long as a query.

Parameters

name

string

input

unknown

Returns

string | undefined


toolsForStage()

toolsForStage(stage): readonly ("list_classes" | "describe_class" | "list_computed" | "components_for_class" | "read_component_api" | "look_at_it" | "find_components" | "list_rules" | "run_sparql" | "ask_manta_for_rule" | "investigate_data" | "propose_plan" | "propose_horn_patch" | "propose_library_item" | "report_harness_issue")[]

Parameters

stage

"design" | "hydrate" | "review"

Returns

readonly ("list_classes" | "describe_class" | "list_computed" | "components_for_class" | "read_component_api" | "look_at_it" | "find_components" | "list_rules" | "run_sparql" | "ask_manta_for_rule" | "investigate_data" | "propose_plan" | "propose_horn_patch" | "propose_library_item" | "report_harness_issue")[]


tsxViolations()

tsxViolations(input): ProposalFailure[]

Every reason this source may not be saved, most structural first.

Parameters

input

TsxInput

Returns

ProposalFailure[]


undrawnThreshold()

undrawnThreshold(horn, steady?): { column: string; viewId: string; } | undefined

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; })[]

steady?

ReadonlyMap<string, readonly string[]>

Columns the dry run found to be the same in every row, by view.

Returns

{ column: string; viewId: string; } | undefined


unwrapJsonFields()

unwrapJsonFields(value): unknown

Parameters

value

unknown

Returns

unknown


visualEditOps()

visualEditOps(horn, edit): VisualEditResult

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; })[]

edit

VisualEdit

Returns

VisualEditResult


withTransientRetries()

withTransientRetries<T>(run, options?): Promise<T>

Type Parameters

T

T

Parameters

run

() => Promise<T>

options?

RetryOptions

Returns

Promise<T>