@protobase/cli 0.100.17 → 0.100.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
1
  //#region package.json
2
- var version = "0.100.17";
2
+ var version = "0.100.19";
3
3
  //#endregion
4
4
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@protobase/cli",
3
- "version": "0.100.17",
3
+ "version": "0.100.19",
4
4
  "description": "The protobase command: scaffold, doctor, dev, build and serve a Protobase project.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -43,13 +43,13 @@
43
43
  "dependencies": {
44
44
  "@better-auth/core": "^1.7.12",
45
45
  "@hono/node-server": "^2.1.3",
46
- "@protobase/config": "0.100.17",
47
- "@protobase/layout": "0.100.17",
48
- "@protobase/query": "0.100.17",
49
- "@protobase/schema": "0.100.17",
50
- "@protobase/server": "0.100.17",
51
- "@protobase/ui": "0.100.17",
52
- "@protobase/workflows": "0.100.17",
46
+ "@protobase/config": "0.100.19",
47
+ "@protobase/layout": "0.100.19",
48
+ "@protobase/query": "0.100.19",
49
+ "@protobase/schema": "0.100.19",
50
+ "@protobase/server": "0.100.19",
51
+ "@protobase/ui": "0.100.19",
52
+ "@protobase/workflows": "0.100.19",
53
53
  "@react-email/render": "^2.1.0",
54
54
  "@scalar/hono-api-reference": "^0.12.10",
55
55
  "@sentry/vite-plugin": "^11.10.0",
@@ -7,10 +7,11 @@ Graphs of steps the server runs along their edges, written in a language a model
7
7
  - [Workflows](../reference/workflows.md#turning-them-on) (beta): Workflows kept in the app's database, each changed definition checked and kept as a version, run on the app's own jobs.
8
8
  - [Workflow language](../reference/workflows.md#the-document) (beta): The States Language with JSONata expressions, every value read by name, so a model writes and edits it as a small, local change.
9
9
  - [Checked on save](../reference/workflows.md#reading-values-by-name) (beta): A definition that does not fit the language, has an edge to no step, reads a value nothing gives or leaves out an argument its step type needs is refused, naming the step and the field.
10
- - [Workflow editor](../reference/workflows.md#the-editor) (beta): The admin app draws a workflow as a graph that lays itself out, to add, connect and remove steps of every trigger and step type of the app, its plugins' included, each with a form for its input beside the graph, with every problem the save would refuse shown on its step as it is edited.
10
+ - [Workflow editor](../reference/workflows.md#the-editor) (beta): The admin app draws a workflow as a graph that lays itself out around the nodes you move, to add, connect and remove steps of every trigger and step type of the app, its plugins' included, each with a form for its input beside the graph, with every problem the save would refuse shown on its step as it is edited.
11
11
  - [One page per workflow](../reference/workflows.md#the-workflows-page) (beta): A workflow's focus page is its graph, with Add step, Test run, Runs and Publish beside it in a panel, so you build, test and debug without leaving it; in the sidebar, Workflows lists the workflows.
12
12
  - [Pins and wires](../reference/workflows.md#the-workflows-page) (beta): A step's inputs and the values it gives are pins coloured by type; drag an output pin to an input to read that value there, and a wire that does not fit is refused, saying why.
13
13
  - [Break and Make](../reference/workflows.md#the-workflows-page) (beta): Take an object apart into a pin for each field, such as a record's fields, or build one from a pin per field, with no extra step to run.
14
+ - [Move nodes by hand](../reference/workflows.md#the-workflows-page) (beta): Drag a node of the graph where you want it; it stays there, marked, for everyone who edits the workflow, and the rest lays itself out around it until you unpin it or tidy up. Pins and Simple each keep their own places, and moving nodes makes no new version.
14
15
  - [Pins or Simple](../reference/workflows.md#the-workflows-page) (beta): Draw the graph with every pin and wire, or with only the steps and the lines between them, and switch at any time; nothing saved changes.
15
16
  - [Build on the graph](../reference/workflows.md#the-workflows-page) (beta): Click a step's handle to add a step right there, or drag from it to another step to connect them; the wheel and a pinch zoom the graph, and dragging pans it.
16
17
  - [Branches, steps per item and retries](../reference/workflows.md#states) (beta): Choices, a step per item with their results merged, waits, and per-step retries, timeouts and error paths.
@@ -35,8 +36,9 @@ Graphs of steps the server runs along their edges, written in a language a model
35
36
  - [Record triggers](../reference/workflows.md#apprecord) (beta): A workflow starts once for each record that becomes ready, at once or when a time in it comes, read as the user who saved the enabled version.
36
37
  - [Triggers turned on while the app runs](../reference/workflows.md#turning-a-trigger-on) (beta): Publishing a saved version registers its trigger on every server process, and turning the workflow off stops it, with no restart; a save goes live only once it is published.
37
38
  - [Workflow plugins](../reference/workflow-plugins.md) (beta): A file of the app or a package adds trigger and step types through the same public interface the built-in types use.
38
- - [Custom workflow steps](../reference/workflows.md#custom-workflow-steps) (in development): Keep a step type of your own as a record, a container built from a Dockerfile with its input and output as JSON Schema, each saved version a step type a workflow names and is checked against; a run hands it to a runner you register, which claims it over HTTP, but no runner program ships yet.
39
- - [Runners](../reference/workflows.md#runners) (in development): Register a machine with a one-time token and it claims your custom steps' jobs over a held-open HTTP call, heartbeats and completes them, each job placed with the runner that has its image or a warm instance, waiting a moment for one; revoking a runner puts its jobs back in the queue.
39
+ - [Custom workflow steps](../reference/workflows.md#custom-workflow-steps) (in development): Keep a step type of your own as a record, a container built from a Dockerfile with its input and output as JSON Schema, each saved version a step type a workflow names and is checked against; a run hands it to one of your runners, which builds its image and runs it in a container with no network, taking and giving files through your storage configurations.
40
+ - [Runners](../reference/workflows.md#runners) (in development): Install a runner on a Linux machine with one command and a one-time token; it claims your custom steps' jobs over HTTP and runs each in a hardened Docker or Podman container, each job placed with the runner that has its image, waiting a moment for one; revoking a runner puts its jobs back in the queue.
41
+ - [Custom step builds](../reference/workflows.md#builds) (in development): Each runner builds the images of the custom step versions it runs from their Dockerfiles, listed on each version's page, and builds those of a workflow as you publish it, so its first run finds them ready.
40
42
  - [Blocks](../reference/workflows.md#blocks) (beta): build your own step from other steps. A block runs once and is cached by what it reads, so a workflow that reaches it again, in this run or another, reuses its result, such as a file fetched from a link that expires.
41
43
  - [Step cache](../reference/workflow-plugins.md#caching-results) (beta): A plugin's step reuses the result of an identical earlier call from any run or workflow, as its plugin decides, while secrets always come in with their current value; a workflow can force it on, and the graph marks a step forced on against its plugin's advice.
42
44
  - [Guarded requests for plugins](../reference/workflow-plugins.md#sending-requests) (beta): A plugin's requests reach only public addresses, follow no redirect and read at most 10 MiB.
@@ -106,12 +106,12 @@ In an app with [workflows](workflows.md), the endpoint also offers tools to find
106
106
  | --- | --- |
107
107
  | `list_workflow_types` | The step types a Task names as its `Resource` and the triggers a definition holds, built-in and [plugin](workflow-plugins.md) ones alike, with the [custom steps](workflows.md#custom-workflow-steps) of the person's tenant, each by id with its label, description, input as JSON Schema and, when the type declares one, its output, the errors a step fails with, and whether the app can run it. |
108
108
  | `list_workflows` | A page of the workflows the person may read, newest change first, without their definitions: `filter` on `name`, `page_size` (20 by default, at most 100) and `page_token`. |
109
- | `get_workflow` | One workflow with its whole definition and its ETag. |
109
+ | `get_workflow` | One workflow with its whole definition, its [layout](workflows.md#layout), the nodes moved by hand in each view, and its ETag. |
110
110
  | `validate_workflow` | Checks a `state_machine`, with its `trigger` and `execution_order`, or a workflow's `id` with an `edit` of its saved definition, as a save checks it, and saves nothing: `{ valid: true }`, or `{ valid: false, problems }`. A valid one may come with `warnings` in the same shape, which a save goes through with, such as a [Wait after a Block](workflows.md#blocks); `create_workflow` and `update_workflow` return them with what they saved. A record trigger is checked against the resources and fields the person may read, so a resource they cannot read is not a resource of the app. |
111
111
  | `get_workflow_run` | A run's status, input, output, error and cause, with its steps in the order they ran, each with its state, scope, try, status, input, output, assigned variables, logs, error and cause; `state` reads one state's steps, a page of 20 by default. |
112
112
  | `list_connections` | The person's own [connected accounts](workflows.md#connecting-an-account), by each connection the app's plugins declare: its key and label, and each account's `id`, scopes and `needs_sign_in`. A definition's `connections` binds an account by its `id`. It returns no token, and no one else's accounts. |
113
- | `create_workflow` | Creates a workflow from its `name`, `description` and `state_machine`, with its `trigger` and `execution_order`, and returns its `id`, `version` and ETag. A state machine from Step Functions [imports](workflows.md#importing-from-step-functions) its HTTP tasks as `app:http` steps, with `connection_headers` naming each connection's header; `update_workflow` and `validate_workflow` import one the same way. |
114
- | `update_workflow` | Changes a workflow's definition by an `edit` or whole, as `state_machine`, `trigger` and `execution_order`, and its `name` or `description`, and returns its `id`, new `version` and ETag. With the `etag` that `get_workflow` gave, it fails when someone changed the workflow since; an edit without one is saved against the version it was applied to. |
113
+ | `create_workflow` | Creates a workflow from its `name`, `description` and `state_machine`, with its `trigger`, `execution_order` and `layout`, none by default, and returns its `id`, `version` and ETag. A state machine from Step Functions [imports](workflows.md#importing-from-step-functions) its HTTP tasks as `app:http` steps, with `connection_headers` naming each connection's header; `update_workflow` and `validate_workflow` import one the same way. |
114
+ | `update_workflow` | Changes a workflow's definition by an `edit` or whole, as `state_machine`, `trigger` and `execution_order`, and its `name`, `description` or `layout`, written whole, and returns its `id`, new `version` and ETag; a change of the layout alone keeps the version. With the `etag` that `get_workflow` gave, it fails when someone changed the workflow since; an edit without one is saved against the version it was applied to. |
115
115
  | `run_workflow` | Starts a run of a workflow's version saved last, or of the `version` it names, with an `input`, and returns its `run_id` and `status`. With `rerun_of`, a failed run's id, it [re-runs](workflows.md#re-running-a-failed-run) that run from its last checkpoint instead, on its input, and with `rerun_from` any ended run that kept its trace from that state; with `replay: true` too, it [replays](workflows.md#replaying-a-run) any ended run of the workflow on its current version, with that run's input, sending none of its outside writes. |
116
116
  | `enable_workflow` | Publishes the saved `version` it names (`enabled: true`), which puts the workflow's trigger on it, or turns the workflow off, and returns its `enabled_version`. A save never goes live by itself. One that uses a [connected account](workflows.md#connecting-an-account) is turned on only by the account's owner in the admin app: the tool answers `own-sign-in-only` and says so. |
117
117
  | `new_webhook_url` | Issues a new URL and secret for a workflow that starts from a [webhook trigger](workflows.md#appwebhook), keeping a `secret` the sender makes when given one, and returns `{ url, secret }`, shown this once; the old URL stops. |
@@ -22,8 +22,8 @@ It adds five resources, over a `workflows` schema that [`protobase migration`](c
22
22
 
23
23
  | Resource | |
24
24
  | --- | --- |
25
- | `workflows` | A name, a description and the definition, in fields of its own: `state_machine`, `trigger`, `execution_order`, `connections` and `trace`. Each save that changes one of them is checked, and kept as the workflow's next version, saved by the caller. |
26
- | `workflow_versions` | Every version of every definition as it was saved, its five fields together, with who saved it and when. Read-only. |
25
+ | `workflows` | A name, a description and the definition, in fields of its own: `state_machine`, `trigger`, `execution_order`, `connections` and `trace`. Each save that changes one of them is checked, and kept as the workflow's next version, saved by the caller. Beside them, its [`layout`](#layout), which a save of alone keeps as no version. |
26
+ | `workflow_versions` | Every version of every definition as it was saved, its five fields together, with its `layout` then, who saved it and when. Read-only. |
27
27
  | `workflow_runs` | A run, started by creating it with `workflow_id`, an `input` and, if it says, its own `trace`, and a saved `version` to run another than the published one, or on a workflow that is off the one saved last, or with `rerun_of` to [re-run a failed run](#re-running-a-failed-run), and `replay: true` too to [replay a run](#replaying-a-run); it runs the version its workflow had then, and a re-run or a replay the input of the run it names. Its status, output, error, timing and trace file are written by the runner. |
28
28
  | `workflow_triggers` | The trigger of each enabled workflow that has one besides `manual`: its type, status and last error. Read-only. |
29
29
  | `workflow_resolutions` | Each time someone [marked a workflow resolved](#run-status), by whom and when. Created only. |
@@ -100,6 +100,25 @@ Every value in the state machine is JSON; a string written as `{% ... %}` is a J
100
100
 
101
101
  The document holds no layout: the [editor](#the-editor) lays the graph out from its edges.
102
102
 
103
+ ### Layout
104
+
105
+ A workflow's `layout`, a field beside its definition, keeps only where nodes of the editor's graph were [moved by hand](#the-workflows-page), for everyone who edits the workflow; the editor lays out every other node, and `{}`, the default, lays out them all. Each view of the graph, *Pins* and *Simple*, keeps its own positions, under `pins` and `simple`: a node moved in one view stays where the layout puts it in the other. Each position is `{ "x": <number>, "y": <number> }`, from the top left of the canvas, or of the Map or Block the node is inside, under a key:
106
+
107
+ | Key | The node |
108
+ | --- | --- |
109
+ | `Save` | The state `Save`. |
110
+ | `$trigger` | The trigger. |
111
+ | `Save.record` | In `pins` only: a Break of `record` in what `Save` gives; `Save.#break` one of the whole of it, `$trigger.customer` one of the run's input, and `Save.#status` one of `Save`'s status in data order. |
112
+ | `Save.#make.data` | In `pins` only: a Make of `Save`'s argument `data`. |
113
+
114
+ In a state's name or a field, `%`, `.` and a leading `#` or `$` are written `%25`, `%2E`, `%23` and `%24`, so the state `Step.1` is `Step%2E1`.
115
+
116
+ ```json
117
+ { "pins": { "Save": { "x": 420, "y": 180 }, "Save.record": { "x": 700, "y": 160 } }, "simple": { "Save": { "x": 300, "y": 40 } } }
118
+ ```
119
+
120
+ No run reads it, so a save that changes only the layout makes no new version and leaves what is published as it is. Each version keeps the layout the workflow had when it was saved, so an older version, and the runs on it, open as they looked then. A save keeps `pins` and `simple` and drops any other view; a view that is not an object saves as `{}`. In each view it keeps a key only where it is the trigger's or names a state the workflow has, alone, or in `pins` also before a dot, and drops the others, such as those of a state removed or renamed; it reads nothing else of a position, so one may hold more than `x` and `y`. A layout that is not an object saves as `{}`. A state machine [imported from Step Functions](#importing-from-step-functions) comes with no layout.
121
+
103
122
  ### Execution order from the data
104
123
 
105
124
  :::caution[Beta]
@@ -359,7 +378,7 @@ A version can be published or looked at, not compared with another beyond a coun
359
378
 
360
379
  The bar under the breadcrumb holds what is live, the version shown, *Add step*, *Runs*, how the work stands, *Test run*, *Save* and *Publish*, with the rest behind "...": *Discard changes*, *Workflow details*, *Turn off* and *Delete*. The graph takes the rest of the page; the wheel and a pinch zoom it towards the pointer, and dragging its empty space with any mouse button pans it, with Shift-drag selecting a box; a trackpad's two-finger scroll zooms too. Choosing a step opens its form in the panel beside the graph, and the graph makes room. *Workflow details* leads to the workflow's standard form at `?standard=true`, with its name, description and published version and the Trigger, Runs and Versions tables.
361
380
 
362
- - **Save and Publish.** *Save* makes a new version and changes nothing that is live, so a change can be tried first. *Publish* asks in the panel, says what changes and how many steps differ, warns about a version with no test run, and names the trigger it starts. With unsaved changes it saves them first, and a refused save stops there. *Turn off* stops the workflow; runs in progress stay on their version.
381
+ - **Save and Publish.** *Save* makes a new version and changes nothing that is live, so a change can be tried first; a save that only moves nodes makes none. *Publish* asks in the panel, says what changes and how many steps differ, warns about a version with no test run, and names the trigger it starts. With unsaved changes it saves them first, and a refused save stops there. *Turn off* stops the workflow; runs in progress stay on their version.
363
382
  - **Versions.** *Version* chooses which saved version the graph shows, each marked as the latest and as live; it lists the latest 100. <gap>The version selector cannot offer a version older than the latest 100 because loading more of them into it is not implemented.</gap> Such a version still opens by its address. The latest version is the one you edit. An older one is read-only, with *Edit latest version* in the notice, and publishing it goes back to it. The version is in the address, `/workflows/<id>?version=<number>`, so a link opens it.
364
383
  - **Runs.** *Runs* lists the workflow's latest 20 runs in the panel, with status, time, version, how long each took, whether a person or a trigger started it, and its input; each is a link. A run shows as marks on the graph, as [Following and debugging a run](#following-and-debugging-a-run) says. On the latest version the graph stays editable under the marks, so a failure can be read and fixed in one place: a step changed since the run says so. A run of an older version opens from the panel on that version, read-only. The run is in the address, `?run=<id>`, and a run's own address, `/workflow_runs/<id>`, opens the workflow's page with the run on the latest version; for a run of an older version, *Show on version* in the notice shows the version it ran on. *Hide run* takes the marks away.
365
384
  - **A step's data.** With a run shown, a chosen step's panel has two tabs, *Data* and *Settings*: its error, output, input, variables and logs in the run, and its form. *Use as test input* starts a test run from the run's input, the first step's input or any step's output, and *Copy JSON* copies it whole.
@@ -370,7 +389,8 @@ The bar under the breadcrumb holds what is live, the version shown, *Add step*,
370
389
 
371
390
  A user who may read a workflow but not change it gets the same page, its fields and graph locked, without Save or Publish. On a mobile screen the bar holds what is live, *Runs* and *Test run*, or *Save* with unsaved changes, and the rest behind "..."; a step's form can be changed, and steps are added on a wider screen.
372
391
 
373
- - **The graph lays itself out.** The trigger is on the left, each state is a box, a Map is a box around the states it runs for each item, and each edge is drawn from the field that names it: a state's `Next`, a Choice's rules (labelled with their condition) and its `Default` ("Otherwise"), and a Task's or Map's catchers ("On error", dashed). The graph is laid out in layers, from left to right, each time a state, an edge, a pin or a wire is added, removed or renamed; the document keeps no positions, so the graph a person sees is the one a model or the API wrote, and the one they edit is what a model reads back. The canvas zooms with the wheel, a pinch and its buttons, and pans by dragging.
392
+ - **The graph lays itself out.** The trigger is on the left, each state is a box, a Map is a box around the states it runs for each item, and each edge is drawn from the field that names it: a state's `Next`, a Choice's rules (labelled with their condition) and its `Default` ("Otherwise"), and a Task's or Map's catchers ("On error", dashed). The graph is laid out in layers, from left to right, each time a state, an edge, a pin or a wire is added, removed or renamed; the document keeps no positions, so the graph a person sees is the one a model or the API wrote, and the one they edit is what a model reads back. The canvas zooms with the wheel, a pinch and its buttons, and pans by dragging the empty canvas.
393
+ - **Moving nodes by hand.** Dragging a node, a step, the trigger, a Break or a Make, puts it where it is let go, as do the arrow keys on the chosen node. It stays there, marked with a pin, and the nodes not moved are laid out around it, also as steps and connections change: one the layout would put under it goes below it, and a Map or Block grows around a node moved inside it. *Pins* and *Simple* each keep their own places, so a node moved in one view stays where the layout puts it in the other. The pin's *Unpin* hands the node back to the layout, and *Tidy up*, above the graph, lays the view shown out again, forgetting every node moved in it and leaving the other view's. Where nodes were moved is the workflow's [layout](#layout), shared with everyone who edits it and saved by *Save*; it makes no new version and needs no publish. An older version opens with the layout it was saved with, which cannot be changed. <gap>A step renamed in the editor cannot keep the place it was moved to because carrying its layout key over to its new name is not implemented.</gap>
374
394
  - **Adding a step.** *Add step* opens a searchable picker in the panel: every step type the app can run, its plugins' included, each with what it does, then Choice, For each item, Wait, Set values, Succeed and Fail. Search finds other words too, such as *email* for Send mail. It says where the step lands, and choosing a step on the graph changes that. Clicking or tapping one of a step's handles, which grows into a plus under the pointer, opens the same picker for a step right there: at the bottom handle after the step, at a Choice's *When* as a new rule and at its *Otherwise* as its `Default`, at *On error* on the path of every error, and at the trigger's as the first step. Where the handle led to a step already, the new one goes in between and goes on to that step, such as between the trigger and the first step; a Succeed or Fail there stays unconnected. A new step is named `Step 1`, `Step 2` and so on, and goes after the chosen step, taking over where it went on to, or after the last step; into the Map chosen; or first, with the trigger chosen. After a Choice or a step that ends the run it stays unconnected, and so does a Succeed or Fail that would cut off the steps after it, such as one added between two steps or first in a workflow that has steps.
375
395
  - **Pins and wires.** Execution runs along the square handles in a box's header, and data along round pins below it, coloured by type: each argument of a Task's step type is a pin on the left, with its type on hover, and each value a step returns, or the trigger gives the run, is a pin on the right, such as an HTTP request's *Status*, *Headers* and *Body* and a record trigger's *Record*. A record, an HTTP body with a `body_schema`, headers and any other object with a title are one pin each. Dragging an output pin to an input pin wires them: the input reads that value by name, the step it comes from gets a variable keeping its result when it has none, and taking the wire away empties the input. A wire is refused over a pin that does not take it, saying why, such as *Whole number does not fit Text*, or that the step does not run before. An input no wire reads shows its value on its row, to type there where it is text, a number, true or false or a choice; an expression shows as ƒ and an object as {…}, both edited in the step's form. Inputs a type does not need and that hold nothing fold away behind *N more inputs*.
376
396
  - **Break and Make.** Letting go of a wire from an object pin on the empty canvas offers *Break <Type>*, a node with a pin for each field of the object, such as a record's fields; from an object input, *Make <Type>*, which builds it from a pin per field, such as the fields a records step writes. They are the editor's own: they run no step and leave no trace, the inputs that use them read `$fetch.body.ip` and hold `{ "name": "{% $fetch.body.ip %}" }`, and opening a workflow draws a Break for each object a read goes into and a Make for each argument written as an object whose fields read values. One that nothing reads yet goes with a reload.
@@ -527,7 +547,7 @@ A stored file is read from where its configuration points now. <gap>Changing a c
527
547
  ## Custom workflow steps
528
548
 
529
549
  :::caution[In development]
530
- A custom step is saved, listed and checked, and a run hands it to a registered runner, but no runner program ships yet: Protobase neither builds its image nor runs its container. It cannot yet take or give files through its runner, be tested, or be given limits on its resources and network.
550
+ A custom step is saved, listed and checked, and a run hands it to a registered [runner](#runners), which builds its image and runs its container. Each runner builds its own images, as there is no image registry; a job's container has no network; and a step cannot yet be tested on its own, or given limits on its resources in its manifest.
531
551
  :::
532
552
 
533
553
  A **custom step** is a step type the app's authors keep as a record: a container built from a Dockerfile, with the input it takes and the output it gives as JSON Schema. Each save that changes its manifest is a new version, and every version is a step type of its own, `custom:<name>:<version>`, such as `custom:invoice_pdf:2`, so changing a custom step never changes a workflow that names an earlier version.
@@ -538,7 +558,7 @@ Turn them on with `customSteps` in `workflows`:
538
558
  export default defineConfig({ workflows: { customSteps: true } })
539
559
  ```
540
560
 
541
- Their jobs' arguments are sealed with the app's secret, its sign-in's, else `PROTOBASE_SECRET`; without either, startup stops. Their tables, `workflows.custom_steps` and `workflows.custom_step_versions`, come with the next [`protobase migration`](cli.md#migration) after you turn them on.
561
+ Their jobs' arguments are sealed with the app's secret, its sign-in's, else `PROTOBASE_SECRET`; without either, startup stops. Their tables, `workflows.custom_steps` and `workflows.custom_step_versions` with those of their runners, jobs and builds, come with the next [`protobase migration`](cli.md#migration) after you turn them on.
542
562
 
543
563
  A custom step is a record of `workflow_custom_steps`, which you create and change on its standard pages, linked from each workflow's page, through the API or over MCP. Each save is checked, and refused with a 400 problem whose `problems` name each field, such as `container.dockerfile`:
544
564
 
@@ -548,7 +568,7 @@ A custom step is a record of `workflow_custom_steps`, which you create and chang
548
568
  | `label`, `description` | What the step picker and the type list show. |
549
569
  | `kind` | `container`, the only kind there is. |
550
570
  | `container` | `{ dockerfile, files, command }`. `dockerfile` is text of at most 64 KiB whose first instruction is `FROM`, after `ARG` lines and comments only. `files` are the files beside it, by a relative path that has no `..` segment, each with its text, at most 1 MiB together, `{}` for none. `command` is a list of non-empty texts, such as `["python", "main.py"]`, or left out for the image's own. |
551
- | `input`, `output` | The JSON Schema of the step's arguments and of its result, each an object (`"type": "object"`) that compiles. `{ "x-file": true }` is a [stored file](#storing-files): in `input`, an argument that takes one, and in `output`, a file the step stores. `input` may not declare `store`. |
571
+ | `input`, `output` | The JSON Schema of the step's arguments and of its result, each an object (`"type": "object"`) that compiles. `{ "x-file": true }` is a [stored file](#storing-files): in `input`, an argument that takes one, and in `output`, a file the step stores. It marks only a property of the schema itself, such as `properties.video`; one inside another schema, such as in `allOf` or `items`, is refused. A file input's name is the name of the folder its container gets it in, so it is letters, digits, `_`, `.` and `-`, starting with a letter, a digit or `_`. `input` may not declare `store`. |
552
572
  | `error_prefix`, `errors` | The prefix of its error names, `Custom` by default, and the errors it fails with by name, each with what it means, such as `{ "Refused": "the renderer refused the invoice" }`: the step fails as `Invoice.Refused`. Each is a capital, then letters and digits; the prefix is not `States`. |
553
573
  | `version` | The version its last change made, which the save numbers. Read-only. |
554
574
 
@@ -582,7 +602,7 @@ A Task names a version in its `Resource`:
582
602
  }
583
603
  ```
584
604
 
585
- Its arguments are the manifest's `input` and `store`, `{ configuration, path? }`, the [storage configuration](#storing-files) it stores the files it gives in, as `app:http` takes it; a version whose `output` gives a file needs it. The save checks the arguments it needs and types its pins from the manifest, as it does any step type's, and its errors are `<error_prefix>.<Name>`. A `Resource` that names no version, such as `custom:invoice_pdf`, is refused, naming the latest: `"custom:invoice_pdf" names no version: write custom:invoice_pdf:2`. A version of another tenant's custom step, or one deleted, is refused as an unknown step type.
605
+ Its arguments are the manifest's `input` and `store`, `{ configuration, path? }`, the [storage configuration](#storing-files) it stores the files it gives in, as `app:http` takes it; a version whose `output` gives a file needs it. Each file goes under the folder `path` names, else a folder of the step in its run, by its path in the container's output folder: `{ "configuration": "videos", "path": "converted" }` keeps a container's `clip-720.mp4` as `converted/clip-720.mp4` in `videos`. The save checks the arguments it needs and types its pins from the manifest, as it does any step type's, and its errors are `<error_prefix>.<Name>`. A `Resource` that names no version, such as `custom:invoice_pdf`, is refused, naming the latest: `"custom:invoice_pdf" names no version: write custom:invoice_pdf:2`. A version of another tenant's custom step, or one deleted, is refused as an unknown step type.
586
606
 
587
607
  The editor's step picker lists each custom step at its latest version under *Custom steps*, and a Task's form takes any version, naming each by its label and number, such as *Invoice PDF, version 2*, and `GET /api/workflows/types`, `list_workflow_types` and `validate_workflow` take them, each with the custom steps of the caller's tenant: whoever may read workflows reads them, as they do a plugin's types, and only creating, changing and deleting them is granted.
588
608
 
@@ -591,10 +611,10 @@ A run hands a custom step to one of its tenant's [runners](#runners) as a [waiti
591
611
  ### Runners
592
612
 
593
613
  :::caution[In development]
594
- No runner program ships yet, so a runner is a program of your own that makes these calls. Its jobs take and give no files, and a claim is answered only with a job, no order to prepare an image or keep instances warm.
614
+ A runner builds every image it runs itself, from the version's Dockerfile, as there is no image registry to pull one from. A job's container has no network, and a claim is answered with a job or an order to prepare an image, never one to keep instances warm, drain or stop.
595
615
  :::
596
616
 
597
- A **runner** is a machine that runs custom steps' jobs: a record of `workflow_runners`, linked from each workflow's page, of one tenant, whose jobs it alone takes. It connects out to the app and claims work; the app never connects to it.
617
+ A **runner** is a machine that runs custom steps' jobs: a record of `workflow_runners`, linked from each workflow's page, of one tenant, whose jobs it alone takes. It connects out to the app and claims work; the app never connects to it. Protobase's runner program, `protobase-runner`, is one executable for Linux on x86_64 or arm64 that runs each job in a container under Docker or Podman, and builds the images.
598
618
 
599
619
  | Field | |
600
620
  | --- | --- |
@@ -606,27 +626,123 @@ A **runner** is a machine that runs custom steps' jobs: a record of `workflow_ru
606
626
 
607
627
  Deleting a runner refuses its token as revoking it does.
608
628
 
609
- **Registering one.** Make the runner, then issue its one-time registration token with `POST /api/workflows/runners/<id>/registration`, which needs the right to change that runner in your tenant; anyone else gets 404. It answers `{ token, expires_at }` once, a `pbr_once_...` token valid one hour, and the app keeps only its SHA-256, so it cannot show it again; a token issued again replaces the earlier one, until the runner registers. The machine then exchanges it, with no sign-in, for its own token:
629
+ #### Installing a runner
630
+
631
+ Make the runner, then issue its one-time registration token with `POST /api/workflows/runners/<id>/registration`, which needs the right to change that runner in your tenant; anyone else gets 404. It answers `{ token, expires_at, command, endpoint }` once: a `pbr_once_...` token valid one hour, of which the app keeps only the SHA-256, so it cannot show it again, the one command that installs the runner with it, and the address of the runner's calls. Both are under the path of the app's system endpoints, `/api` unless its `basePath` moves them, as `/backend` for `/backend/v1`. A token issued again replaces the earlier one, until the runner registers. Run the command on the machine, as the user the runner runs as:
632
+
633
+ ```sh
634
+ curl -fsSL https://app.example.com/api/runners/install.sh | sh -s -- --token pbr_once_...
635
+ ```
636
+
637
+ `GET /api/runners/install.sh` serves the install script to anyone, written for the app that serves it. It:
638
+
639
+ 1. finds the machine's platform, and downloads `protobase-runner` of the app's own Protobase version for it to `~/.local/bin`;
640
+ 2. checks that `docker` or `podman` works for the user, and recommends rootless mode when it runs as root, as a job that escaped its container would then be root on the machine;
641
+ 3. registers the runner with the token, keeping its own token and its settings in `~/.config/protobase-runner/config.json`, readable by that user only;
642
+ 4. writes a systemd user unit, `protobase-runner.service`, running `protobase-runner run`, and enables and starts it with `systemctl --user`. To keep it running while the user is logged out, run `loginctl enable-linger <user>`, as the script says when it is needed.
643
+
644
+ Its options: `--url` the app's address, by default the one that served it, which is `https://`, as the runner's token travels on it, or `http://` only on the machine itself (`localhost`, `127.0.0.0/8` or `::1`); `--api-path` the path of its system endpoints, by default the one it was served under; `--bin-dir` the folder of the executable; `--binary-url` another download of the executable, such as a `file://` one; `--service false` to start the runner yourself, `true` by default; and the runner's settings, which it passes on to `protobase-runner register --url <app> --api-path /api --token pbr_once_...`. That command, and `protobase-runner run`, are also how you install a runner by hand.
645
+
646
+ | Setting | Default | |
647
+ | --- | --- | --- |
648
+ | `--slots` | half the machine's CPUs, at least 1 | How many jobs it runs at once. |
649
+ | `--cpus` | `2` | The CPUs a job's container may use. |
650
+ | `--memory-mb` | `2048` | The memory a job's container may use, with no swap beyond it. |
651
+ | `--pids` | `256` | The processes a job's container may run. |
652
+ | `--tmp-mb` | `256` | The size of a job's `/tmp`. |
653
+ | `--work-dir` | `~/.cache/protobase-runner` | Where each job's and build's folder goes, deleted after it. |
654
+ | `--engine` | `docker` when it works, else `podman` | Which one runs the containers; it is the one checked for builds. |
655
+ | `--build` | `true` when the engine builds | Whether it builds images, so it is sent `prepare` and takes jobs whose image it lacks. `true` or `false`. |
656
+ | `--build-timeout-seconds` | `1800` | The longest a build may take. |
657
+ | `--cleaner-image` | busybox 1.37.0, pinned by its digest | The image that removes what a job's container left, pulled on its first use. A runner with no access to a public registry gives one it can reach, or loads it first, as with `docker load`. |
658
+
659
+ They are kept in its config file; change them there and restart it.
660
+
661
+ #### How a job runs
662
+
663
+ For each job it claims, the runner downloads the job's input files into a fresh folder, builds the step's image when it has not got it, and runs the container hardened:
664
+
665
+ ```sh
666
+ docker run --rm --name protobase-job-<id> --network none \
667
+ --read-only --tmpfs /tmp:rw,noexec,nosuid,size=256m \
668
+ --cap-drop ALL --security-opt no-new-privileges \
669
+ --pids-limit 256 --memory 2048m --memory-swap 2048m --cpus 2 \
670
+ --user 65532:65532 \
671
+ -v <job folder>/in:/protobase/in:ro,z -v <job folder>/out:/protobase/out:z \
672
+ -e PROTOBASE_INPUT=/protobase/in/input.json -e PROTOBASE_IN=/protobase/in -e PROTOBASE_OUT=/protobase/out \
673
+ -e INPUT_<NAME> ... <image> <command>
674
+ ```
675
+
676
+ So the container has no network, a read-only root with a small `/tmp` that runs nothing, no capabilities and no way to gain any, user 65532 whatever its image says, limits on its processes, memory and CPUs, and of the machine only the job's two folders: its inputs, read-only, and its output folder, both relabelled (`z`) so SELinux lets the container use them. It never gets the engine's socket or the runner's environment. The runner sends its heartbeats throughout, sends its lines of output to the job's logs in batches, and kills it at the job's deadline, or once a heartbeat answers stop, completing nothing then. A line of output is at most 64 KiB, and a longer one is cut into lines; when the app takes them slower than the container writes them, at most 10 batches wait, and the oldest lines past them are dropped and counted in the next batch. A completion the app does not take is sent once more; one it takes neither time leaves the job to its lease, never failed in its place.
677
+
678
+ It deletes the job's folder after. What the container's user left there that the runner's user may not remove, such as a folder it made unwritable, the runner's own cleaner image removes, never the step's: its `rm` runs as root in the container, which under rootless Docker or Podman is the runner's own user, with every capability dropped but `DAC_OVERRIDE` and `FOWNER`, hardened and limited as a job is, with only the job's folder, named `protobase-clean-<id>`. It is killed and removed after 60 seconds or at the job's deadline, and the runner says so, or when it fails, or when its image cannot be pulled, which leaves the files.
679
+
680
+ Stopping the runner, as `systemctl --user stop` does, or a refusal of its token, stops its jobs' containers and its build, and waits up to 90 seconds for them to clean up; a stopped build reports no end, so the app may ask for it again.
681
+
682
+ **For an image's author**, what goes in and out is plain files and variables:
683
+
684
+ | | |
685
+ | --- | --- |
686
+ | `$PROTOBASE_INPUT` | The path of `input.json`: the step's arguments, without `store`, each file replaced by `{ "path", "name", "type", "size" }`, its `path` where it is in the container. |
687
+ | `$PROTOBASE_IN` | The input folder, read-only, holding each input file at `<input>/<file name>`, such as `/protobase/in/video/sample.mp4`. |
688
+ | `INPUT_<NAME>` | Each argument that is text, a number or `true` or `false`, also as a variable named by its name in capitals, other characters as `_`: `height` is `INPUT_HEIGHT`. |
689
+ | `$PROTOBASE_OUT` | The output folder, the one place the container writes to besides `/tmp`. |
690
+ | `$PROTOBASE_OUT/output.json` | What the step gives, its `output`, read once the container exits with 0. Each output the manifest marks `x-file` is a path relative to `$PROTOBASE_OUT`, such as `"video": "clip-720.mp4"`: the runner stores that file through `store` and gives the [stored file](#storing-files) in its place. A file that is not there, is reached through a link or leaves the folder fails the step as `Custom.InvalidOutput`, and so do a missing `output.json` and one that is not JSON. |
691
+ | `$PROTOBASE_OUT/error.json` | `{ "error": "UnsupportedInput", "cause": "..." }` fails the step with that error, whatever the exit code: one of the manifest's `errors` as `<error_prefix>.<Name>`, such as `Ffmpeg.UnsupportedInput`. |
692
+ | Any other exit | Fails the step as `Custom.Failed`, the last 2,000 characters of its stderr the cause. |
693
+
694
+ A step that counts the lines of a text file, for example:
695
+
696
+ ```json
697
+ {
698
+ "name": "count_lines",
699
+ "label": "Count lines",
700
+ "container": {
701
+ "dockerfile": "FROM debian:bookworm-slim\nCOPY count.sh /usr/local/bin/count\nRUN chmod 755 /usr/local/bin/count\n",
702
+ "files": { "count.sh": "#!/bin/sh\nset -eu\nfile=$(ls \"$PROTOBASE_IN\"/text/*)\nlines=$(wc -l < \"$file\")\necho \"$lines lines\" > \"$PROTOBASE_OUT/report.txt\"\nprintf '{ \"lines\": %d, \"report\": \"report.txt\" }' \"$lines\" > \"$PROTOBASE_OUT/output.json\"\n" },
703
+ "command": ["count"]
704
+ },
705
+ "input": { "type": "object", "required": ["text"], "properties": { "text": { "x-file": true } } },
706
+ "output": { "type": "object", "required": ["lines"], "properties": { "lines": { "type": "integer" }, "report": { "x-file": true } } }
707
+ }
708
+ ```
709
+
710
+ #### Builds
711
+
712
+ A runner builds a version's image from its `dockerfile` and `files` alone, in a fresh folder, on the engine's default network so its `FROM` and `RUN` lines can fetch what they need, within its build time limit. Under rootless Docker or Podman a build's `RUN` lines are not root on the machine. It tags the image `protobase-custom-<hash of the app, tenant and step>:<version>` and labels it `org.protobase.step=custom:<name>:<version>`, so runners of other apps on the same machine never take it for theirs, and each claim lists the images it has from those labels.
713
+
714
+ Each build is a record of `workflow_custom_step_builds`, read-only, listed on its version's page: its runner and step version, its `status` (`building`, `ready` or `failed`), its image's `digest` once ready, the last 10,000 characters of its `log`, and when it started and finished. A job whose image does not build fails as `Custom.Failed`, the end of the log its cause.
715
+
716
+ **Prepare on publish.** Publishing a workflow's version keeps the custom step versions it uses as wanted, until another version is published or the workflow is turned off. A claim that no job reaches is then answered `{ "order": "prepare", "step", "build" }` for a wanted version whose image the runner lacks, when the runner builds: it builds the image before it claims again, so the first run finds it ready. Each runner is sent it once per version, until it lists the image or its build failed.
717
+
718
+ #### The runner's calls
719
+
720
+ `protobase-runner` makes these calls, and any program of your own may make them instead. The registration, with no sign-in, exchanges the one-time token for the runner's own:
610
721
 
611
722
  ```http
612
723
  POST /api/runners/v1/register
613
- { "token": "pbr_once_...", "platform": "linux/amd64", "kinds": ["container"] }
724
+ { "token": "pbr_once_...", "platform": "linux/amd64", "kinds": ["container", "build"] }
614
725
  ```
615
726
 
616
- It answers `{ runner: { id, name, labels }, token }`, the runner's own `pbr_...` token, also given once and kept only as its SHA-256. A registration token is used once: used again it is refused as `RegistrationTokenUsed` (409), more than an hour old as `RegistrationTokenExpired` (410), and one of no runner, or of a revoked one, as `InvalidRegistrationToken` (401), each the problem's title.
727
+ It answers `{ runner: { id, name, labels, tenant }, token }`, the runner's own `pbr_...` token, also given once and kept only as its SHA-256. A registration token is used once: used again it is refused as `RegistrationTokenUsed` (409), more than an hour old as `RegistrationTokenExpired` (410), and one of no runner, or of a revoked one, as `InvalidRegistrationToken` (401), each the problem's title.
617
728
 
618
- **The runner's calls.** Every other call carries the runner's own token as `Authorization: Bearer pbr_...`; a revoked or deleted runner's is refused with 401. An address refused 30 times in a minute waits a minute.
729
+ Every other call carries the runner's own token as `Authorization: Bearer pbr_...`; a revoked or deleted runner's is refused with 401. An address refused 30 times in a minute waits a minute.
619
730
 
620
731
  | Call | Body | Answer |
621
732
  | --- | --- | --- |
622
- | `POST /api/runners/v1/claim` | What the runner says of itself: `{ "platform": "linux/amd64", "kinds": ["container"], "labels": [], "capacity": { "slots": 2 }, "images": [{ "step": "custom:ocr:4", "snapshot": true }], "instances": [{ "step": "custom:ocr:4", "free": 3 }] }` | Held open up to 50 seconds until a job is placed with the runner: `{ "order": "job", "job": { "id", "step", "input", "deadline", "heartbeat_seconds", "lease_seconds" } }`, or `{ "order": "none" }` when its time ran out. Claim again at once. |
733
+ | `POST /api/runners/v1/claim` | What the runner says of itself: `{ "platform": "linux/amd64", "kinds": ["container", "build"], "labels": [], "capacity": { "slots": 2 }, "images": [{ "step": "custom:ocr:4", "snapshot": true }], "instances": [{ "step": "custom:ocr:4", "free": 3 }] }` | Held open up to 50 seconds until a job is placed with the runner: `{ "order": "job", "job": { "id", "step", "input", "deadline", "heartbeat_seconds", "lease_seconds", "files", "output_files", "build", "command" } }`; `{ "order": "prepare", "step", "build" }`; or `{ "order": "none" }` when its time ran out. Claim again at once. |
623
734
  | `POST /api/runners/v1/jobs/<id>/heartbeat` | `{}` | `{ "stop": false }`, extending the runner's hold of the job and counting as a heartbeat of its Task; `{ "stop": true }` once the runner no longer holds it, as when its try timed out, its run ended or its lease ran out: stop the job. |
624
735
  | `POST /api/runners/v1/jobs/<id>/log` | `{ "lines": ["..."] }`, at most 100 | `{}`; the job keeps its last 100 lines, each up to 1,000 characters, with the workflows' secrets and the token blanked out. |
736
+ | `GET /api/runners/v1/jobs/<id>/inputs/<input>` | | The bytes of the job's input file `<input>`, streamed from its storage configuration or the run's files. |
737
+ | `PUT /api/runners/v1/jobs/<id>/outputs/<path>` | A file the container gave, its type as `Content-Type` | The stored file, `{ configuration, path, name, type, size }`, streamed into the step's `store` under its folder at `<path>`. |
625
738
  | `POST /api/runners/v1/jobs/<id>/complete` | `{ "output": { ... } }`, or `{ "error": "Unreadable", "cause": "..." }` | `{}`, ending the job and its Task. |
739
+ | `POST /api/runners/v1/builds` | `{ "step": "custom:ocr:4", "status": "building" }` as a build starts, then `{ "step", "status": "ready", "digest", "log" }` or `{ "step", "status": "failed", "log" }` | `{ id }`, the build. |
626
740
 
627
741
  A claim's `images` are the steps whose images the runner holds, by step version, each with whether a snapshot of it is ready, and its `instances` the warm instances it keeps, each with how many more jobs it takes now; all three lists may be left out when empty. A claim is also the runner's sign of life: a runner whose claim is no longer held is given no job.
628
742
 
629
- A job's `input` is the Task's arguments as given, secrets included, and `deadline` when its `TimeoutSeconds` pass. The runner gets no task token: its own token and its hold of the job prove it may answer, and the app answers the Task for it. Send a heartbeat every `heartbeat_seconds`, a third of the shorter of `lease_seconds` and the Task's `HeartbeatSeconds`. A completion's `output` must fit the custom step's `output` schema, or the Task fails with `Custom.InvalidOutput` and what does not fit as its cause; an output over 256 KiB fails it the same way. An `error` that is one of the step's `errors`, by its name or in full, fails the Task as `<error_prefix>.<Name>`, such as `Ocr.Unreadable`, which a `Catch` takes; any other fails it as `Custom.Failed`, the name given in the cause. A completion of a job whose Task ended already is refused with 409 and the title `TaskTimedOut`.
743
+ A job's `input` is the Task's arguments as given, secrets included, and `deadline` when its `TimeoutSeconds` pass. Its `files` are its input files, each `{ input, name, type, size, url }`: an argument the version's `input` marks `x-file` that the Task gave, a stored file or a file of the run, and `url` the path on the app it streams from. An argument so marked that is neither fails the Task as `Storage.InvalidArguments` before any runner gets it. `output_files` are the outputs the version marks `x-file`, `build` is `{ dockerfile, files, command }` and `command` the version's command. A job's file routes answer only the runner that holds it, and only while it runs: once it ended, went back to the queue or to another runner they are refused with 409, and they read and store as the run's last editor, so a runner reaches no storage configuration the workflow could not, and holds no storage key itself. Upload a job's files before you complete it.
744
+
745
+ The runner gets no task token: its own token and its hold of the job prove it may answer, and the app answers the Task for it. Send a heartbeat every `heartbeat_seconds`, a third of the shorter of `lease_seconds` and the Task's `HeartbeatSeconds`. A completion's `output` must fit the custom step's `output` schema, or the Task fails with `Custom.InvalidOutput` and what does not fit as its cause; an output over 256 KiB fails it the same way. An `error` that is one of the step's `errors`, by its name or in full, fails the Task as `<error_prefix>.<Name>`, such as `Ocr.Unreadable`, which a `Catch` takes; `Custom.InvalidOutput` and `Custom.Failed` fail it as themselves; any other fails it as `Custom.Failed`, the name given in the cause. A completion of a job whose Task ended already is refused with 409 and the title `TaskTimedOut`.
630
746
 
631
747
  A runner that holds a job sends heartbeats within `lease_seconds`, 30 by default. When none comes, the job goes back to the queue, once, for any runner; the second time, its Task fails with `States.HeartbeatTimeout`, which a `Retry` can take up with a new job.
632
748
 
@@ -647,11 +763,12 @@ Placing runs as a job is queued, as a claim comes, and every second while a serv
647
763
 
648
764
  Each job is a record of `workflow_custom_step_jobs`, read-only, listed on its runner's page: its run and state, its step and version, its `input` with the workflows' secrets blanked out, its `status` (`queued`, `running`, `succeeded`, `failed` or `timed_out`), the runner that holds or held it and until when (`lease_until`), how often it went back to the queue (`requeues`), when it was queued, claimed and finished, and its `output`, `error`, `cause` and `logs`. Its arguments as given are not among its fields: while it waits they are kept sealed with the app's secret, opened only into the claim answer, and dropped once it ends. Of its try's token it keeps only the hash. A job whose try ends without it, by its time or its run's end, is `timed_out`.
649
765
 
650
- - <gap>A custom step cannot run without a runner program of your own because Protobase's runner, which builds a step's image and runs its container, is not implemented.</gap>
651
- - <gap>A custom step's runner cannot take or give files because the runners' file routes are not implemented.</gap>
652
- - <gap>A runner cannot be told to prepare an image, keep warm instances, drain or stop because those orders are not implemented; a claim is answered only with a job or none.</gap>
766
+ - <gap>A runner cannot pull a custom step's image another runner built because an image registry is not implemented; each runner builds the images it runs.</gap>
767
+ - <gap>A custom step's container cannot reach the network because network access for jobs is not implemented.</gap>
768
+ - <gap>A runner cannot keep warm instances of a custom step, or be told to drain or stop, because those orders are not implemented; a claim is answered with a job, `prepare` or none.</gap>
769
+ - <gap>A runner cannot be installed on macOS or Windows because only Linux executables are built.</gap>
653
770
  - <gap>A runner's registration token cannot be issued in the admin app because its action is not implemented; `POST /api/workflows/runners/<id>/registration` issues it.</gap>
654
- - <gap>A custom step cannot limit its memory, CPU, time or network because those fields of its manifest are not implemented.</gap>
771
+ - <gap>A custom step cannot set its own memory, CPU or disk because those fields of its manifest are not implemented; its runner's settings limit every job alike.</gap>
655
772
  - <gap>A custom step cannot be saved or tested over MCP with tools of its own because those tools are not implemented; `create_record` and `update_record` save it.</gap>
656
773
 
657
774
  ## Runs and their steps