Skip to main content
Shared helpers and re-exported types the SDK exposes.

AdapterCompileResult

A compile outcome: the jq program, or a human error to surface loudly.

AdapterMapping

Props Related: AdapterMappingProps

AdapterMappingProps

Properties Related: BindingSourceSchemas, TemplateJqSuggestion

ApiClient

BindingJqField

Props Related: BindingJqFieldProps

BindingJqFieldProps

Properties Related: TemplateJqSuggestion

BindingSourceSchemas

The schemas a field picker draws from when authoring an injection or an adapter: the run’s output and input fields (the state’s fields ride each BindingStateOption). Absent roots offer no picked field — the author uses a literal or a jq expression instead. Properties Related: SchemaFieldPath

BindingStateOption

One state the editor may bind, with the templates already attached to it and its fields. Properties Related: SchemaFieldPath

BindingTemplateJqOption

One template jq of an attached template, as the pickers present it. Properties

BindingTemplateOption

One template the editor may attach to a state (attach-on-use), with its template jq. Properties Related: BindingTemplateJqOption

BindingTemplatedJqField

Props Related: BindingTemplatedJqFieldProps

BindingTemplatedJqFieldProps

Properties Related: TemplateJqSuggestion, TemplatedTextCatalog

FeatureDisabled

The muted, honest OFF state for a feature whose store this deployment has not configured. A role="status" EmptyState (never the loud alert ErrorState): the feature is not broken, it is simply off, and the copy shows the server’s own remediation message. Props Related: FeatureDisabledProps

FeatureDisabledProps

Properties

FieldRoot

Which root of { output, input } a picked field reads.

FieldSource

A picked field: a path into output or input. Properties Related: FieldRoot

InheritedSubject

The subject/scope of the target’s own (inherited) binding for a state this one also names. Properties

InjectionList

Props Related: InjectionListProps

InjectionListProps

Properties Related: ResolvedTemplateJq, TemplateJqSuggestion, TemplatedTextCatalog

JqSource

A raw jq expression over { output, input }. Properties

LiteralSource

A hardcoded literal, authored as JSON text ("a", 42, true, {…}). Properties

MappingRow

One mapping row: a target key of the update jq’s declared input + its value source. Properties Related: MappingSource

MappingSource

The three value sources one mapping row may carry — exactly one at a time. Related: FieldSource, JqSource, LiteralSource

ResolvedTemplateJq

One template jq of an attached template, resolved to the reference a binding stores. Properties Related: BindingTemplateJqOption

SchemaEditor

Props Related: SchemaEditorProps

SchemaEditorChange

What SchemaEditor reports up on every edit. Properties

SchemaEditorProps

Properties Related: SchemaEditorChange

SchemaFieldPath

One selectable field of a schema: the record path + a human label. Properties

SchemaLintResult

The parse/lint outcome for one editor text buffer. Properties

StateAttachRow

Props Related: StateAttachRowProps

StateAttachRowProps

Properties Related: BindingSourceSchemas, BindingStateOption, BindingTemplateOption, InheritedSubject, TemplatedTextCatalog

StateBindingEditor

Props Related: StateBindingEditorProps

StateBindingEditorProps

Properties Related: BindingSourceSchemas, BindingStateOption, BindingTemplateOption, TemplatedTextCatalog

StateBindingSection

Props Related: StateBindingSectionProps

StateBindingSectionProps

Properties Related: BindingSourceSchemas, BindingStateOption, BindingTemplateOption, StateBindingEditorProps, TemplatedTextCatalog

StoragePresenceQueryLike

The storage-presence query result (GET /api/storage) fields this helper reads. Properties

SubjectScopeFields

Props Related: SubjectScopeFieldsProps

SubjectScopeFieldsProps

Properties Related: TemplateJqSuggestion, TemplatedTextCatalog

TemplateJqSuggestion

One template jq offered as an insertable autocomplete entry. Properties

TemplateNamesQueryLike

The stored-template-names query result (GET /api/templates) fields this helper reads. Properties

TemplatedText

TemplatedTextCatalog

The stored templates a TemplatedText field’s id picker offers, with the fetch’s loading/error state — resolved by the door screen and passed to the editor, which holds no data edge of its own. Absent leaves every templated-text field with the inline source only. Properties Related: TemplatedTextTemplateOption

UpdateList

Props Related: UpdateListProps

UpdateListProps

Properties Related: BindingSourceSchemas, ResolvedTemplateJq, TemplateJqSuggestion, TemplatedTextCatalog

appendTjq

Append a tjq_<name>({…}) template call to the current expression (space-separated when non-empty). Parameters

comboElementNames

Project a combo’s elements to their bare extension names (drops any config). Parameters

compileAdapter

Compile a mapping form into ONE adapter jq that constructs the update jq’s declared input over { output, input }. An empty form compiles to the empty object {}; a blank target, a duplicate target, or an invalid source is a loud error. Parameters Related: AdapterCompileResult, MappingRow

defaultRowsForInput

One row per declared input key, each defaulting to a picked output field. Parameters Related: MappingRow

downloadBlob

Stream a Blob (an export- or content-route response) to the user as a file download via a transient object URL. The object URL is revoked on the next tick — revoking it synchronously can cancel the download before the browser commits it. Parameters

effectiveHidden

Effective hidden after the tri-state override. overlayHidden is the overlay’s hidden (true/false), or null/undefined when the overlay defers or has no row; declaredHidden is the plugin’s own hidden. Overlay opinion wins; absence defers to the declaration. Parameters

encodeTemplateSegment

Encode a template-name slug for a jq identifier: each - becomes _. Under the slug invariant (no consecutive or trailing hyphens) the result carries no __ and no trailing _, which is what makes the first __ in a call name the template boundary. Parameters

errorMessage

Normalize an unknown thrown/rejected value (a TanStack Query error, a rejected mutation, a zod/ApiError) into a human-readable string for the loud ErrorState / Field surfaces. This only turns a caught value into displayable text — it never swallows the failure; the caller decides where to show it, and the message is always shown, never blank. Parameters

extensionElementName

The bare extension name of one combo element (drops any config). Parameters

extensionsQueryKey

The extension catalog (GET /api/extensions). The extensions feature keys its read-only catalog on it; a tool’s extension-combo save (in the tools feature) creates or tears down branch tools, so it invalidates this key too — a cross-feature reference that must resolve to one authoritative constant.

featureDisabledMessage

The remediation line for a refusal: the skeleton’s own message (which names the missing configuration), else its machine code. The client NEVER composes this — a refusal carrying neither is a contract breach and raises. Parameters

fieldPathToJq

A picked field rendered as a jq path, e.g. .output.user.name / .input["odd key"]. Parameters Related: FieldRoot

fieldPathsFromSchema

Flatten a JSON schema’s properties into selectable field paths (top-level and every nested object level), each labelled with its dotted path — the picker source for the adapter’s output/input roots. A non-object or property-less schema yields no fields (the field control then falls back to a free path input). Parameters Related: SchemaFieldPath

findByRef

Find one resolved template jq by the reference a binding stores. Parameters Related: ResolvedTemplateJq

generateTemplateCall

The single-expression form of a named template update built from a mapping form: tjq_<enc(template)>__<name>({…}) for a qualified ref, tjq_<name>({…}) for a bare one (see the module note on the __ boundary invariant). Parameters Related: MappingRow

hiddenToolNames

The set of tool names whose EFFECTIVE visibility is hidden, from the native declarations (listToolTags) merged with the tool_meta overlay (listToolMeta). A picker excludes exactly these names from its options; the server stays the authority (a slipped-through name is rejected loudly there), so a name in the set that is not among a picker’s options is simply inert. The union of both sources is walked so an overlay row that force-hides a tool carrying no native tag entry is still caught, and an overlay false on a plugin-hidden tool correctly keeps it OUT of the set (unhidden). Parameters

isFeatureDisabled

True when error is a disabled-feature refusal from the skeleton: an HTTP 501, or a code ending -not-configured. The code is authoritative; the 501 status is the fallback signal — either alone is enough. Parameters

jqKey

An object key rendered for jq: a bare identifier, or a quoted string otherwise. Parameters

lintSchemaText

Parse and structurally lint a JSON-Schema editor buffer.
  • Empty text is VALID (an unset, optional schema) with a null schema.
  • Malformed JSON is INVALID; the parser message is surfaced verbatim.
  • A top-level value that is not a JSON object (an array or a scalar) is INVALID.
  • When requireTitle, a top-level string "title" is REQUIRED (the response_format contract the backend enforces); its absence is INVALID.
The parsed object is returned untouched — no key is normalized, reordered, or dropped — so a schema carrying $defs/anyOf round-trips exactly. Parameters Related: SchemaLintResult

mergeToolBadges

A tool’s effective badges: native ∪ overlay, deduped and case-insensitively sorted. The atomic rule every badge surface merges by, so the tools list and the pickers show one and the same set. Parameters

parseAdapter

Recover the mapping rows from a stored adapter jq, or null if it is not the generated shape. Parameters Related: MappingRow

parseFieldPath

Recover a field source from a pure path expression, or null if it is not one. Parameters Related: FieldSource

parseTemplateCall

Recover { callName, adapter } from a tjq_<callName>(<adapter>) call, or null otherwise. callName is the RAW jq identifier — NEVER split here (a jq name may carry its own __ past the template boundary); resolve it to a catalog ref with resolveCallName. Parameters

resolveCallName

Resolve a jq call name (enc(template)__name, or a bare name) back to the catalog ref, driven by the catalog — never by string splitting, since a jq name may carry its own __ past the template boundary and enc maps -_. Under the template-slug invariant (no consecutive/trailing hyphens ⇒ enc(template) has no __ and no trailing _) the FIRST __ is the one true boundary, so the longest encoded-template prefix whose remainder is a jq the template declares is the unique qualified match; failing that, a bare name a single template declares. null when nothing claims it. Parameters Related: BindingTemplateOption

resolveTemplateJq

Every template jq the given attached templates offer for a purpose (or all purposes when purpose is omitted), each carrying the reference a binding stores. Parameters Related: BindingTemplateOption, ResolvedTemplateJq

rowValueJq

The jq fragment ONE row’s value compiles to — the row’s “show jq”. Parameters Related: AdapterCompileResult, MappingSource

stateTemplatesKey

The state-template document catalog (GET /api/state-templates). Read by the states feature AND every state-binding door screen (the templates a binding attaches), keyed here so the two never fetch the same catalog under diverging tuples.

statesCatalogFromList

The states catalog from listStates(); per-state attachments are resolved lazily elsewhere. Parameters Related: BindingStateOption

statesListKey

The state catalog (GET /api/states). The states feature owns it, and every door screen that hosts the state-binding editor (a preset, a route, a hook, a schedule) reads the same catalog to populate the binding’s state picker — so both key the one authoritative tuple and a single fetch serves both.

subMcpKey

The discovered sub-MCP mounts (GET /api/sub-mcp). The settings feature reads this map (its scope mapper lists the mounts) while the manifest feature owns the create/delete controls that mutate it; both must key and invalidate the exact same tuple, so it lives here rather than as a literal duplicated across the two features (which cannot import each other).

templatedTextCatalog

Parameters Related: StoragePresenceQueryLike, TemplateNamesQueryLike, TemplatedTextCatalog

templatesCatalogFromList

The template catalog (with each template’s template jq) from listStateTemplates(). Parameters Related: BindingTemplateOption

tokensPayloadKey

The api-key payloads; read by settings AND the hooks execution-key picker.

toolBadgesByName

The raw-name → merged-badges map a tool picker reads to render the SELECTED tool’s badges, from the native declarations (listToolTags) merged with the tool_meta overlay (listToolMeta) — the SAME union the tools list shows. Only tools with at least one badge appear; a name with none is simply absent (the picker shows no chips). Both sources’ names are walked, so an overlay row that badges a tool carrying no native tag entry is still surfaced. Parameters

toolsListKey

The registered-tool master list (GET /api/tools).