data/stations/
A station definition: a smart object that posts jobs on its chore board while it is enabled and not blocked, and the work a job does: a cycle whose length and output are numbers over the worker’s stats. Content turns each completed cycle’s event into items. An entity becomes one through the manifold-ai:station component, (def: "<key>", priority: 5). Loaded by the server only.
| Registry | manifold-ai:station |
| Files | data/stations/*.ron, *.update.ron, *.final.ron |
| Sides | server: only the server loads it |
| Reads | manifold-ai:smart-object, manifold-ai:offline-model |
| Contract | Population, data stage |
Entry
A record, written Station(..); the name before the parentheses is optional.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
id | string | yes | The station’s key, <mod-id>:<name>. | |
smart_object | string | yes | Its smart object definition (manifold-ai:smart-object key), which needs a slot with slot_tags. An unknown key fails the data stage (DATA010). | |
category | string | yes | Its job category (manifold-ai:job-category key). An unknown key fails the data stage (DATA010). | |
posts | PostPolicy | no | Continuous(max_open_jobs: 1) | How it posts jobs. |
slot_tags | list of string | no | ["slot.work"] | The slot tags a job reserves. |
work | StationWork | yes | The work loop. | |
blocked_when | condition or None | no | never | A condition in the work context over the station’s facts that withdraws its jobs while it holds (Ext(atom: "manifold:station_has_tag", args: (tag: "station.state.full"))). |
offline | string or None | no | no offline work | Its offline model (manifold-ai:offline-model key), for work done while nobody is near. An unknown key fails the data stage (DATA010). |
Example
No bundled file declares one yet. From the reference’s test fixture, crates/manifold-server-state/tests/data-reference-fixture/data/stations/workbench.ron, which the data stage loads in its tests:
StationDef(
id: "dataref-fixture:station/workbench",
smart_object: "dataref-fixture:so/workbench",
category: "dataref-fixture:job/carpentry",
work: (cycle_secs: 30, output: "dataref-fixture:work/plank"),
)
Types
PostPolicy
How a station posts jobs.
| Variant | Written | Description |
|---|---|---|
Continuous | Continuous(max_open_jobs: ..) | Keeps jobs on the board while it posts. |
Continuous fields:
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
max_open_jobs | u8 | yes | How many, at least 1. |
StationWork
A station’s work loop: numbers in the work context (This the worker, Target the station).
A record: StationWork(..) or (..).
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
cycle_secs | number | yes | Seconds per cycle. | |
output | string | yes | The event key each completed cycle carries ("mymod:work/harvest"), which content turns into items. Also written Event(".."). | |
quality | number or None | no | none | The output’s quality. |
yield_mult | number or None | no | none | The output’s yield multiplier. |