Skip to main content

The manifest, taji-plugin.toml

Source of truth: schema/taji.json, parsed by Manifest::try_parse in engine/crates/taji-plugin/src/lib.rs; schema_defs_documented in engine/crates/taji/tests/docs.rs holds this page to it. The manifest is the one declaration every runtime and the window read: what a plugin is, what it adds and what it may reach.

An unknown table or key is refused: taji-plugin.toml: <why>. A plugin is compiled in, or a process speaking taji-plugin/1; [process] makes it one. A process plugin is also refused:

  • a [[kernel.fields]] row, a skill other than ["SKILL.md"], a verb route with {desk}, a node path with {, and a [[kernel.indicators]] row with no source;
  • a taji range that is missing or excludes the kernel's (0.7.0);
  • an id that is a first-party provider's, venue's or key record's word.

An installed plugin without [process] is refused [[kernel.verbs]], [[kernel.nodes]] and [[kernel.fields]] (409 unsupported).

Top level​

Schema type Manifest.

KeyTypeRequired, defaultRule
idstringrequired^[a-z0-9_-]+$; the word GET /read/plugins lists it by
namestringrequiredthe plugin's name, as Connections shows it
versionstringrequiredsemver (MAJOR.MINOR.PATCH, as Cargo and npm require); the version an alert on one of its scripts pins (<script>@<version>)
aboutstringnonethe line atop its Connections page
freeboolfalseits data costs nothing
termsstringnoneits vendor's terms where they bear on how Taji reads it, said on the first run's board and on GET /read/plugins; a keyless source has no [[link]] form whose risk could carry them
claimsstring list[id]route and node prefixes it owns, each ^[a-z0-9_-]+(/[a-z0-9_-]+)*$; a verb route or node path outside every claim is refused
skillstring list[]skill fragment paths, relative to the skill's directory: SKILL.md is appended as its own section, any other written whole. An installed plugin's SKILL.md opens with --- frontmatter holding name (the plugin's id) and a description of at most 1,024 characters, and is under 500 lines
tajistringsee belowthe semver range of the contract's version (">=0.7, <0.8"); required of a process plugin and of one with [ui]; parsed and unused in a compiled-in plugin without [ui]
kernel, grants, process, link, sources, sign_in, products, ui, marktablesnoneeach below
id = "acme"
name = "Acme"
version = "0.1.0"
about = "Acme's levels."
taji = ">=0.7, <0.8"

[mark]​

Schema type Mark. The plugin's logo, served at GET /plugin/<id>/mark.

KeyTypeRequired, defaultRule
filestringrequiredui/<name>.svg or ui/<name>.png, <name> of [a-z0-9_-]
opticalnumbernonea scale above 0 that sets it level with the other logos

A compiled-in plugin hands the bytes to Build::mark, held to the manifest as Build::skill is.

[mark]
file = "ui/acme.svg"
optical = 1.1

[[kernel.verbs]]​

Schema type Verb. POST /verb/<route> and, where it has a name, the bridge's tool.

KeyTypeRequired, defaultRule
routestringrequiredits segments under a claim; {name} binds a segment, desk/{desk}/ scopes it to a desk
descriptionstringrequiredwhat it does, for the agent and GET /describe
schematablerequireda JSON Schema object for the body; advisory: the kernel checks only that the body is a JSON object (else 400 bad_args), so the handler validates
namestringnone^[a-z0-9_]+$; the agent tool's name and the verb's word on GET /read/plugins. It needs scopes holding agent. A process plugin's starts with its id (hyphens as underscores) and _
answersdirect, changesdirectdirect: the 200 holds the answer; changes: a 202 naming the node whose changed frame carries the outcome
heldboolfalsewaits out a trading boot in flight before it runs, and runs one at a time
scopeslist of local, agent, page["local", "page"]who may call it. It holds local; agent only where named; sheet is refused. A venue arm's verbs are closed to agent
[[kernel.verbs]]
route = "acme/refresh"
name = "acme_refresh"
description = "Refetch Acme's levels."
schema = { type = "object", additionalProperties = false }
scopes = ["local", "agent"]

[[kernel.nodes]]​

Schema type Node. GET /read/<path> and GET /describe/<path>.

KeyTypeRequiredRule
pathstringrequiredat the root or under desk/{desk}/, under a claim
descriptionstringrequiredits GET /describe line
[[kernel.nodes]]
path = "acme/status"
description = "Whether Acme is reachable."

[[kernel.fields]]​

Schema type Field. A key inside a core node.

KeyTypeRequiredRule
nodestringrequired"" the root, desk/{desk} a Desk's summary (GET /read/desk/<id>)
keystringrequired^[a-z0-9_]+$
descriptionstringnonewhat the key holds

[[kernel.indicators]]​

Schema type Indicator. A catalog name; a name another plugin holds is refused.

KeyTypeRequiredRule
namestringrequired^[a-z0-9_]+$
sourcestringa process plugin'sa path beside the manifest, of the TypeScript script the kernel compiles; absent, a compiled-in plugin's native definition of that name
teststringnonea path beside the manifest, of the script's test
categorystringnoneits catalog group, one of the built-in indicators' categories (Momentum, Moving Average, Session, Trend, Volatility, Volume); absent, the plugin's id
descriptionstringnoneits one-line catalog description
needstablesnonethe data the script reads, each a needs row; the catalog marks it ready or names the providers that would serve it
[[kernel.indicators]]
name = "acme_pulse"
source = "indicators/acme_pulse.ts"

[grants]​

What a process plugin may reach; absent or empty, no network and no reads. Parsed and unused in a compiled-in plugin.

KeyTypeRule
net.hostsstring listreached through the plugin's own proxy, CONNECT only: a DNS name of two labels or more (port 443), name:port, *.suffix (never bare *), or ip:port, the only way to loopback or private space. Never localhost or a port Taji listens on
readsstring listproducts its process may get beyond its own, and its framed pane may get and stream: a core product's word of GET /get/<product> or another plugin's <id>.<name>, each ^[a-z0-9_.-]+$, listed once. A product its own [[sources]] rows declare needs no entry; nothing is granted by an id's prefix
  • A literal reaches exactly its address. An installed plugin's literal must be public; one under TAJI_PLUGINS may name loopback or private space.
  • On Windows an installed plugin with an entry or a [sign_in] is refused: its sandbox would reach any network Windows calls private, a home Wi-Fi's say, past its proxy. One under TAJI_PLUGINS does not have this limit.
  • No entry here or in [sign_in] hosts names a host a compiled-in venue reaches, or its local order endpoint (an IB Gateway's default port on loopback; the proxy also refuses the Gateway a link sealed). Security says why.
[grants]
net = { hosts = ["api.example.com", "*.cdn.example.com:8443"] }
reads = ["bars"]

[process]​

Schema type Process.

KeyTypeRequired, defaultRule
runstring listrequiredthe argv; run[0] is relative to the manifest's directory
call_timeout_sint301 to 600; how long a call waits for its answer
pythontablenone[process.python], empty is enough: run[0] is a script Taji's own Python runs, resolved from TAJI_PYTHON, else python/ beside the packaged bin/, else .python in a debug checkout
python.lockstringnonea path inside the directory: a hashed uv pip compile --universal --generate-hashes requirements file, wheels only; absent, the standard library and the SDK alone
[process]
run = ["acme"]
call_timeout_s = 60

Schema types Link, LinkField and LinkStep. A form the Connections sheet draws, in text alone: never markup, a URL it opens or a verb. At most 8 forms per manifest; a form id another plugin serves is refused.

KeyTypeRequired, defaultRule
formstringrequiredthe plugin's id or <id>-<word>; what taji-link <form> names
kindfields, oauth, startrequiredfields: the user types; oauth: a browser sign-in after the fields; start: nothing to type
groupstringrequiredthe sheet's heading, at most 40 characters
titlestringrequiredthe form's name, at most 80
ledestringrequiredthe sentence under the title, at most 500
nextstringrequiredwhat it asks once the vault is open, at most 400
riskstringrequiredwhether real money is at stake, in a sentence, at most 400
actstringrequiredthe button's words, at most 40
brieftablerequiredwhy, reads, never, need, each required, at most 300 characters
envpaper, livenonethe forms of one plugin with an env are one Paper/Live choice
waitingstringConnectingthe act's words while its link waits, at most 40
pasteboolfalsewhile its sign-in waits, a box for the address the browser stopped on
relink, redostringnonefor a sign-in that lapses: the sentence before its due time and "sign in again" (relink), the act's words for a sign-in to redo (redo), at most 200
refusalstablenonea refusal word to the sentence this form says for it, at most 300 characters each
holdstablenonea key of refusals to the seconds a link that failed so stays held
fieldstablesnoneat most 8
sourceslist of [label, url]nonelabel at most 40 characters, url https://
stepstablesnoneat most 8
pairsboolfalsethe kernel adds a pair step after type: the user proves the channel is theirs
afterstringnonewhat the user does once linked, at most 200
after_opentablenoneto (an https:// page for after) and label (at most 40 characters), both required

[[link.fields]]​

KeyTypeRequired, defaultRule
namestringrequired^[a-z0-9_]+$; the key it is posted under
labelstringrequiredthe caption, at most 40 characters
kindtext, secret, urlrequiredsecret is masked, never prefilled, cleared at the post; text and url are shown
defaultstringnoneshown until the user types, and posted for a blank, at most 200 characters; never a secret's
helpstringnonea hint under the field, at most 200
heldboolfalsea secret the user keeps, never posted by an agent; secret fields only
onstringnonea step of the form that asks for this field, optionally and aside; text fields only. It is never sealed or carried, and neither type nor the vault counts it

[[link.steps]]​

Each is read on GET /read/flows as a kind: "do" step, after the kernel's vault (where the form seals a key and the vault is shut) and before its type, pair and sign_in.

KeyTypeRequired, defaultRule
idstringrequired^[a-z_]+$, unique in the form, none of vault, type, sign_in, pair
titlestringrequiredat most 60 characters
saystringrequiredwhat it tells the user, at most 400
openstringnonean https:// URL, app:messages, settings:full-disk-access or settings:automation; a process plugin's is https:// only
failsstring listnonekeys of the form's refusals that land on this step, each on one step only
yoursboolfalsea step only the user may do, never an agent
wait_sintnone0 to 2,592,000 seconds it waits on someone else; never on the first step

What a form posts​

GET /read/link/forms serves each [[link]] with the verb it posts, which the kernel chooses (seat in engine/crates/taji/src/entitlements/forms.rs):

The plugin's [sign_in]postHeld by
kind = "key"link/data/linka_plugins_form_posts_its_sign_in_verb in engine/crates/taji-open/tests/signs_in.rs
kind = "oauth"link/plugin/oauththe same test
nonenulla_manifest_form_without_a_seat_serves_null

A key is sealed only once your process answers check with ok: a 401 or 403 refusal is 409 rejected with its reason, any other 502 unreachable, and neither seals it (check in engine/crates/taji-host/src/source.rs; a_refused_key_is_never_sealed in engine/crates/taji/src/entitlements/data_key.rs).

[[link]]
form = "acme"
kind = "fields"
group = "Data"
title = "Acme"
lede = "Paste your key."
next = "Paste the key"
risk = "Reads data; places no orders."
act = "Link"
brief = { why = "Levels.", reads = "Levels.", never = "Orders.", need = "A key." }
fields = [{ name = "key", label = "API key", kind = "secret" }]
refusals = { bad_key = "Make a new key." }
steps = [{ id = "key", title = "Make a key", say = "Make a read-only key.", open = "https://acme.example/keys", fails = ["bad_key"] }]

[[sources]]​

Schema types Source and SourceRead. A data source it registers, by provider id. A compiled-in plugin's row holds id alone, its facts being its code's; a process plugin's declares reads.

KeyTypeRequired, defaultRule
idstringrequired^[a-z0-9][a-z0-9-]{0,63}$, declared once; in a process plugin the plugin's id or <id>-<word>, and no first-party provider's
readstablesa process plugin's, at least oneeach below
permitsint22 to 64: the calls in flight at once
barstablerequired where a read is barstimeframes: 1m, D or both, required (the kernel folds 5m, 30m, 1h and 4h from 1m); adjustment: raw (default), split, split-spinoff or split-dividend-spinoff, the basis its equity bars are on

[[sources.reads]]​

KeyTypeRequiredRule
classword or listrequiredequity, index, future, option, crypto, future_option or forex
productword or listrequireda core product below, or <id>.<name>, one of the plugin's own [[products]]
spanstringrequiredhistory, live or now, as the table below allows
capacityintnoneat least 1: how many items a live read streams at once; a live read's alone, and one product has one capacity across its classes
delay_sinta live read'sthe seconds its rows run behind their inputs (0 adds none); a live read states it and no other read may. The kernel states the product as late as the latest of that and each [grants] reads product a process streams (chains, depth, trades), as routed for the item now

A class or product that is a list of distinct words stands for a read per (class, product) pair.

productspanclass
index_dailyhistoryindex
barshistory, liveany
quoteslive, nowany
depthnow, liveany
chainshistoryoption
tradesliveany
earningshistoryequity
<id>.<name>history, liveany

A stored product (store = true) that no read serves at history is read at history from the rows its process pushed.

[[sources]]
id = "acme"
reads = [
{ class = "index", product = "acme.levels", span = "history" },
{ class = "index", product = "acme.levels", span = "live", delay_s = 0 },
]

[sign_in]​

Schema type SignIn. How a process plugin's one source links, and what the relay lets a marker do. It needs [process], and one [[sources]] row whose id is the plugin's.

KeyTypeRequiredRule
kindkey, oauthrequireda data key, or an OAuth sign-in
hostsstring listrequired, at least onewhat the relay reaches and a marker is bound to: a DNS name (port 443), name:port or a loopback ip:port; never *.suffix or a public literal. An installed plugin names no literal at all
sealtablesnoneeach url (http:// or https://) and fields, the JSON pointers in its answer moved into the login. A seal may not replace key (kind key) or client_id and client_secret (kind oauth); refresh_token stays sealable
postsstring listnoneurl prefixes a marker rides by any method, beside GET, a websocket and a POST to a seal url
authorizestringoauthwhere the sign-in starts: https://, no user@
tokenstringoautha seal url: a 400 or 401 from it unlinks
callbackstringoauthhttp://localhost:<port>[/path] or https://127.0.0.1:<port>[/path]
client_authbasic, formoauthhow the client authenticates at token
scopes, audiencestringnonewhat an OAuth sign-in asks
resourcestringnonean RFC 8707 resource indicator, sent on the authorize request and the code exchange
pkceboolfalsewhether the sign-in uses PKCE

Every seal, posts and token url's host is one of hosts.

[sign_in]
kind = "key"
hosts = ["api.example.com"]

An OAuth sign-in adds the fields it needs:

[sign_in]
kind = "oauth"
hosts = ["auth.example.com", "api.example.com"]
authorize = "https://auth.example.com/authorize"
token = "https://auth.example.com/token"
callback = "http://localhost:7791/callback"
client_auth = "basic"
pkce = true
seal = [{ url = "https://auth.example.com/token", fields = ["/refresh_token"] }]

[[products]]​

Schema types Product, Column, Word and ProductRow. A data product the plugin owns, read as <id>.<name>; a process plugin's alone.

KeyTypeRequired, defaultRule
namestringrequired^[a-z0-9_]+$, declared once
descriptionstringrequiredwhat the product holds, as GET /describe says it
shapevalues, profile, cells, marksnonepresent, a feature product
storeboolfalsea feature product's alone; see below
modelstringa product with an estimated column1 to 1,000 characters: how those columns are computed
wordstablesnonethe query words it takes beyond the kernel's
columnstablesrequired, at least onethe row objects' keys, in order
needstablesnonethe data its sources read to compute it, each a needs row

A product read at history declares ts_utc, a non-nullable int column of epoch seconds, shape or not.

[[products.columns]]​

KeyTypeRequired, defaultRule
namestringrequired^[a-z0-9_]+$, declared once; never knowable_utc, recorded, version (the kernel serves them on every row) or forming (an every or timeframe read adds it)
typestringrequiredstring, int, float, decimal, bool, date (YYYY-MM-DD), list<float>, list<decimal> or list<int>
nullableboolfalsewhether a row may hold null
unitstringnoneprice, usd, shares, contracts, ratio, percent or count; on an int, float, decimal or list column alone
estimatedboolfalsecomputed under the product's model, not observed
foldsumnonea cells product's int, float or list column other than ts_utc, ts_ms, span_ms, step and price; the kernel sums it over a time slice, a list per price and a scalar over the slice, where it takes the max per price and the last row's scalars otherwise (What a layer reads)
docstringnoneone sentence on what the column holds

[[products.words]]​

A Word row, also a layer's style row.

KeyTypeRequiredRule
namestringrequired^[a-z_]+$; a product's word is none the kernel reads on a read: symbols, from, to, limit, provider, class, refresh, wait, at, cursor, store_only, timeframe, session, adjustment, first, stype, legs, names, desk_id, dry_run, product, type, id, accounts, chart, style, box, reversal, lines, one_step_back, ticks, levels, every
typeint, float, bool, stringrequiredthe value's type
defaultof typerequiredwithin min and max; an int's is an integer
min, maxnumbernoneon int and float alone, inclusive, with min <= default <= max
valuesstring listnonea string word's choices, 1 to 32 distinct, default one of them
docstringnoneone sentence on what the word changes

needs​

Schema type Need. One input a product, or a script of [[kernel.indicators]], reads. The kernel checks each against your linked providers and serves the answer as readiness on the plugin's layers, panes and catalog rows: per class it is read on, the needs no linked provider serves there, each naming the providers that would. A need on a plugin's <id>.<name> is served while that plugin is enabled and its product's own needs are.

KeyTypeRequiredRule
productstringrequireda core product's word of GET /get/<product>, or <id>.<name>
spanhistory, liverequiredhow it is read
classstringnonean instrument class word; absent, the chart's
fieldsstring listnonea core product's optional columns it reads, each listed once and one some provider may fill (data coverage); a provider serves the need only where it fills each, or the inputs Taji computes it from (an option's iv from its bid and ask, IV rank from iv). Never on <id>.<name>
needs = [{ product = "trades", span = "live", fields = ["off_exchange", "size"] }]

Shapes​

A product with shape is a feature product. On every shape but marks a row is one instant: a second row at one instant, pushed or answered, is dropped, and plugin check's rows FAILs it. On marks a row is one event: rows sharing an instant are all kept. Every shape declares ts_utc, a non-nullable int; cells and marks may also declare ts_ms (epoch milliseconds), a non-nullable int.

shapeOne row isRequired columns besides ts_utcStock renderer
valuesscalars at an instantone or more int, float or decimaltaji.levels
profilea by-price distributionprice: list<decimal>, value: list<float>taji.profile
cellsone time column of a price gridspan_ms: int, price: list<decimal>, value: list<float>taji.heatmap, taji.footprint
marksone eventprice: decimal, size: floattaji.bubbles

store makes the kernel record the product's rows, pushed or answered, per item and words, asking history only for unrecorded spans. The record holds no plugin version, so an upgrade recomputes none, each row's version naming its computer. A stored product your sources serve live alone is read from the rows you pushed, history never asked.

[[products]]
name = "levels"
description = "Resting sizes by price."
columns = [{ name = "ts_utc", type = "int" }, { name = "price", type = "decimal" }, { name = "size", type = "float", nullable = true }]

[[products]]
name = "heat"
description = "Resting size by price and minute."
shape = "cells"
store = true
words = [{ name = "min_size", type = "float", default = 10.0, min = 0.0, doc = "Hide cells under this size." }]
columns = [
{ name = "ts_utc", type = "int" },
{ name = "ts_ms", type = "int" },
{ name = "span_ms", type = "int" },
{ name = "price", type = "list<decimal>" },
{ name = "value", type = "list<float>", unit = "contracts" },
]

[ui]​

Schema types Ui, UiPane, UiItem and UiLayer. The window half: panes and menu items drawn in sandboxed frames, and chart layers. See a plugin's window half. It declares at least one row, needs taji, and holds at most 8 rows in each table. Every kind and id is <id>.<word>, <word> of ^[a-z0-9_]+$, unique in its table; every label is 1 to 40 characters with no control character. A plugin with panes or items ships a ui directory holding index.js and each pane's icon; layers alone need no frame.

[[ui.panes]]​

KeyTypeRequiredRule
kindstringrequiredthe pane kind's word
labelstringrequiredthe name the window shows
readsstring listnonethe GET routes the pane draws as the wire's route table spells them (/get/bars, /read/desk/<id>/layout), unique, ^/[^\s?#]+$. GET /read/desk/<id>/layout carries them per pane; install refuses 400 reads unless the table or the plugin's own products (/get/<id>.<name>) hold each
iconstringnonethe dock's and the gallery's glyph: ui/<name>.svg or .png

[[ui.items]]​

KeyTypeRequiredRule
slotstringrequired<name>[.<name>]@<n>, n from 1 with no leading zero; a slot the window does not know stays dormant
idstringrequiredthe row's word
labelstringrequiredthe row's text
orderintrequiredposition among the rows, lowest first
hintstringnonea second line under the row, at most 200 characters, no control character

[[ui.layers]]​

Draw a chart layer says what each field takes.

KeyTypeRequired, defaultRule
idstringrequiredthe layer's word
labelstringrequiredits name in the chart's layer list
productstringrequiredone of the plugin's own products that has a shape, as <id>.<name>
rendererstringrequireda stock renderer of the product's shape (table above) or ui/<name>.js
shaderstringnoneui/<name>.wgsl; refused with taji.heatmap, taji.bubbles, taji.footprint and taji.levels
slotbehind, above, dock, mainaboveunder the price series, over it, inside the plot at the price axis, or after the behind layers under a narrowed candle, as the footprint draws
styleWord rowsnoneits settings, held to a product word's rules
[ui]
items = [{ slot = "chart.menu@1", id = "acme.refresh", label = "Refresh Acme", order = 10 }]
layers = [{ id = "acme.heat", label = "Acme heat", product = "acme.heat", renderer = "taji.heatmap", slot = "behind" }]

Example​

A complete signed-in source with its own product, read and streamed:

id = "acme"
name = "Acme"
version = "0.1.0"
taji = ">=0.7, <0.8"

[process]
run = ["acme"]

[[sources]]
id = "acme"
reads = [
{ class = "index", product = "acme.levels", span = "history" },
{ class = "index", product = "acme.levels", span = "live", delay_s = 0 },
]

[[products]]
name = "levels"
description = "Resting sizes by price."
columns = [{ name = "ts_utc", type = "int" }, { name = "price", type = "decimal" }, { name = "size", type = "float", nullable = true }]

[sign_in]
kind = "key"
hosts = ["api.example.com"]

[[link]]
form = "acme"
kind = "fields"
group = "Data"
title = "Acme"
lede = "Paste your key."
next = "Paste the key"
risk = "Reads data; places no orders."
act = "Link"
brief = { why = "Levels.", reads = "Levels.", never = "Orders.", need = "A key." }
fields = [{ name = "key", label = "API key", kind = "secret" }]
refusals = { bad_key = "Make a new key." }
steps = [{ id = "key", title = "Make a key", say = "Make a read-only key.", open = "https://acme.example/keys", fails = ["bad_key"] }]

See also​