Registry file
workers.toml is an array of [[worker]] tables, one per worker type. The clients read it
through the packages (Packages); domain-devkit's
virtufin.domain_devkit.ops.registry_entry and the web app's parseRegistry parse an entry with
the same rules. The file holds org-wide entries only; an operator's own entries live in the TUI's
~/.config/virtufin/tui/workers.toml (Personal entries).
Fields
| Field | Required | Meaning |
|---|---|---|
name |
yes | The registry name; the clients tag a created worker name = <name>. |
mime_type |
yes | The code's MIME type, which picks the WorkManager engine (application/x-dotnet-dll, application/x-native-dll, application/x-python, text/x-python, …). |
description |
no | One line shown in the clients' lists. |
source_url |
no | Where the code is: a fixed URL or a template (below). |
versions |
with a template | Published versions or git refs, oldest first; the last is the default. |
authentication |
no | The credential of the code fetch (below). |
config_schema |
no | JSON Schema (draft 2020-12) of the worker's config, as text: the New Worker form. |
secrets_schema |
no | JSON Schema of the worker's secrets: each property a secret the worker reads. |
topics |
no | Default subscribe topics or topic templates. |
topic_params |
no | Which config key binds each topic placeholder. |
settings |
no | Typed platform settings, input_replay and library_reload, each "on" or "off". |
source_url templates
For NuGet-packaged (.NET) workers and wheel-bundled Python workers (built and published by
virtufin-worker build|publish), source_url is a template: {version} is replaced with one of
the entry's versions (a NuGet URL names it twice).
source_url = "https://git.haenerconsulting.com/api/packages/virtufin/nuget/package/Virtufin.Worker.HttpGet/{version}/Virtufin.Worker.HttpGet.{version}.nupkg"
A single-file, stdlib-only Python worker may instead use a fixed raw-content URL (Gitea's
/raw/branch/<branch>/<path>, not the /src/branch/… web view, which returns HTML) with
mime_type = "text/x-python", or a {ref} template to pin it to a branch or tag.
versions
A static array of published versions (for {version}) or git refs (for {ref}), oldest to
newest; the last is the default the clients offer. Required whenever source_url has a
placeholder: there is no discovery (the WorkManager cannot enumerate an arbitrary registry, and
listing and downloading usually need different credentials). The package feed keeps only recent
versions, so list only versions still published: a pruned version fails CreateWorker with a 404.
topics and topic_params
Default subscribe topics, pre-filled in the New Worker form, for workers whose input topics are
fixed. An entry may be a template with the naming library's placeholders, the identity parameters
of the entity it names, e.g. act.exchange.binance.trade.update.{pair} or
act.exchange.binance.candle.update.{pair}.{interval}. The clients expand it from the worker's
config (one topic per value; pairs × intervals), parsing the template and rendering every topic
with the naming library. A placeholder without a value refuses the create. {worker_id} is the
WorkManager's and is left as is.
The world is no placeholder: templates are written in act, and the worker's world config
(act or hyp.<NAME>) re-binds every topic, so world = "hyp.TEST" subscribes
hyp.TEST.exchange.binance.trade.update.BTC_USDT. Topics outside a world (wrk., x.) keep
theirs.
topic_params binds placeholders to config keys, e.g.
{ pair = "currencypairs", interval = "intervals" } (comma-separated config values); a
placeholder without an entry binds the config key of its own name, and world = "<key>" names
another config key for the world.
settings
The typed CreateWorkerRequest fields the WorkManager or its Runtime acts on, pre-filled in the
New Worker forms and sent as those fields, never as config keys:
input_replay = "off": input topics start at the tail after a move instead of catching up from the worker's input cursor (the order-book workers, which resync from snapshots);library_reload = "off": no reload on a library release (WebSocketFeed).
A worker without them gets the defaults (both on). config_schema lists only keys the worker
reads.
secrets_schema
Each property is the attribute the worker reads; its value in the form is a reference, a key of
the deployment's worker Secret (virtufin-worker-secrets), never the secret itself. default
suggests a reference.
authentication
The credential attached to code_source when a client creates or upgrades a worker from the
entry:
- absent: none, a public fetch;
"virtufin": the org's registry credential, resolved by the WorkManager from its ownVIRTUFIN_REGISTRY_USER/TOKEN; no secret reaches a client. Every entry in this file uses it;- any other name: a personal credential, looked up in the TUI's
~/.config/virtufin/tui/credentials.toml. The web app keeps none and says it cannot create such an entry.
Personal entries
An operator may add [[worker]] blocks to ~/.config/virtufin/tui/workers.toml, never to this
file. The TUI merges the user's file over the package's registry by name: user fields win and
versions is the union. A personal entry's source_url may be relative, a path next to that
file, read from disk and sent inline; versions and authentication do not apply to it. Entries
in this file always use an absolute source_url.
The release rule
Every change to workers.toml is a release of both packages: bump versions.env
LIBRARY_VERSION and add a CHANGELOG.md entry in the same commit
(Add a worker version).