@protobase/cli 0.100.9 → 0.100.11

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.9";
2
+ var version = "0.100.11";
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.9",
3
+ "version": "0.100.11",
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.9",
47
- "@protobase/layout": "0.100.9",
48
- "@protobase/query": "0.100.9",
49
- "@protobase/schema": "0.100.9",
50
- "@protobase/server": "0.100.9",
51
- "@protobase/ui": "0.100.9",
52
- "@protobase/workflows": "0.100.9",
46
+ "@protobase/config": "0.100.11",
47
+ "@protobase/layout": "0.100.11",
48
+ "@protobase/query": "0.100.11",
49
+ "@protobase/schema": "0.100.11",
50
+ "@protobase/server": "0.100.11",
51
+ "@protobase/ui": "0.100.11",
52
+ "@protobase/workflows": "0.100.11",
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",
@@ -19,7 +19,7 @@ Pages of your own, built from blocks in a JSX layout.
19
19
  - [Full-width pages](../reference/blocks.md#page): A page fills the whole area beside the sidebar instead of a centred column, for a dashboard with many blocks.
20
20
  - [Data blocks](../reference/blocks.md#data): Counts, tables, single records, rows of cards, field values and progress bars.
21
21
  - [Related records](../reference/layouts.md#related-records) (beta): Layouts repeat over a record's related records, the records a JSON list of keys points at and the items of a JSON list with `ReferenceManyField`, `ReferenceArrayField`, `ArrayField`, `RecordsIterator` and `ReferenceField`, nested as deep as needed, and a table draws such a list.
22
- - [Read plans](../reference/layouts.md#how-a-page-reads-its-data) (beta): The build plans one read per data block ahead of time, derives the fields each read needs, and checks every nested read's indexes. Every read of a page's records, card rows, tables, threads, charts, counts, related lists and the custom components that declare their reads starts at once when it opens, and a data block's [text form](../reference/layouts.md#a-pages-text-with-its-records) lists its records; record rows, tables, threads and record cards inside the records of another block, and custom components that fetch their own data, still load on their own.
22
+ - [Read plans](../reference/layouts.md#how-a-page-reads-its-data) (beta): The build plans one read per data block ahead of time, derives the fields each read needs, and checks every nested read's indexes. Every read of a page's records, card rows, record rows, tables, threads, charts, counts, related lists and the custom components that declare their reads starts at once when it opens, and a data block's [text form](../reference/layouts.md#a-pages-text-with-its-records) lists its records; record rows of favorites or saved searches, and tables, threads, record cards and record rows inside the records of another block, and custom components that fetch their own data, still load on their own.
23
23
  - [Table columns on a phone](../reference/blocks.md#columns-on-a-phone): Table blocks choose which columns show at mobile width by priority, with a sensible default, and fall back to a Markdown table.
24
24
  - [Row buttons](../reference/blocks.md#row-buttons) (experimental): A table's rows carry a button labelled by a field of the row, such as its next step; the row decides where it goes: a record tab a field names, a list with a filter built from its fields, a list whose resource and filter its fields hold, or an outside https link a field holds. On mobile width the button sits under the row's first cell.
25
25
  - [Record rows](../reference/blocks.md#recordrow): A sideways row of cards for a filter, favorites or saved searches, with a count and new-record marks.
@@ -35,7 +35,8 @@ Graphs of steps the server runs along their edges, written in a language a model
35
35
  - [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
36
  - [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
37
  - [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; they do not run yet.
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
40
  - [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.
40
41
  - [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.
41
42
  - [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.
@@ -211,7 +211,7 @@ export default defineConfig(({ command }) => ({ webhooks: { allowPrivateAddresse
211
211
 
212
212
  ## workflows
213
213
 
214
- - **Type:** `{ schema?: string; secrets?: string[]; allowPrivateAddresses?: boolean; plugins?: string[]; storage?: { root?: string; endpoints?: string[] }; customSteps?: boolean }`
214
+ - **Type:** `{ schema?: string; secrets?: string[]; allowPrivateAddresses?: boolean; plugins?: string[]; storage?: { root?: string; endpoints?: string[] }; customSteps?: boolean; runners?: { claimSeconds?: number; leaseSeconds?: number; coldWaitSeconds?: number; warmWaitSeconds?: number } }`
215
215
  - **Default:** off; `{}` turns them on
216
216
 
217
217
  Workflows that people and models make in the app, kept with their versions, runs and steps in a schema of the app's database that `protobase migration` writes, and run by the `workflows.segment` job. Records steps act as each workflow's last editor, with the roles they hold now, read from the app's sign-in; a project that signs people in otherwise exports its own, `async ({ id, tenant }) => [...]`, as the default of `workflows/saved-by-roles.ts`. See [Workflows](../workflows.md).
@@ -280,12 +280,23 @@ export default defineConfig({ workflows: { storage: { root: './data/workflow-sto
280
280
  - **Type:** `boolean`
281
281
  - **Default:** `false`
282
282
 
283
- Turns on [custom steps](../workflows.md#custom-workflow-steps), step types the app's authors keep as records, each saved version a type of its own, `custom:<name>:<version>`. Their tables come with the next `protobase migration` after you turn them on. Any other value than `true` or `false` stops startup.
283
+ Turns on [custom steps](../workflows.md#custom-workflow-steps), step types the app's authors keep as records, each saved version a type of its own, `custom:<name>:<version>`, and the [runners](../workflows.md#runners) that run them. Their tables come with the next `protobase migration` after you turn them on. Their jobs' arguments are sealed with the app's secret, its sign-in's (`auth`), else `PROTOBASE_SECRET`, so startup stops without either. Any other value than `true` or `false` stops startup.
284
284
 
285
285
  ```ts
286
286
  export default defineConfig({ workflows: { customSteps: true } })
287
287
  ```
288
288
 
289
+ ## workflows.runners
290
+
291
+ - **Type:** `{ claimSeconds?: number; leaseSeconds?: number; coldWaitSeconds?: number; warmWaitSeconds?: number }`
292
+ - **Default:** `{ claimSeconds: 50, leaseSeconds: 30, coldWaitSeconds: 5, warmWaitSeconds: 1 }`
293
+
294
+ How custom steps' jobs reach [runners](../workflows.md#runners), with `customSteps` on, each in seconds: how long a claim is held open waiting for a job (`claimSeconds`), how long a runner holds a job without a heartbeat before it goes back to the queue (`leaseSeconds`), how long a job whose best free runner lacks its image waits for one that has it (`coldWaitSeconds`), and how long a job whose best free runner has its image waits for a warm instance (`warmWaitSeconds`), as [How jobs are placed](../workflows.md#how-jobs-are-placed) says. Startup stops on a setting it does not know, a time that is no number above 0, or a wait below 0.
295
+
296
+ ```ts
297
+ export default defineConfig({ workflows: { customSteps: true, runners: { coldWaitSeconds: 10 } } })
298
+ ```
299
+
289
300
  ## notifications
290
301
 
291
302
  - **Type:** `{ ui?: boolean; schema?: string; devices?: { table?: string; columns?: Record<string, string> }; history?: { table?: string; columns?: Record<string, string> } }`
@@ -161,7 +161,7 @@ Each entry is a record of the stack while its children draw, so `Field`, `Show`,
161
161
  ## How a page reads its data
162
162
 
163
163
  :::caution[Beta]
164
- On the web, a `RecordRow`, and a `Table`, `Thread` or `RecordCards` inside the records of another block, still read once they draw, as the marked limits below say.
164
+ On the web, a `RecordRow` of a view with `listOf` or `searchesOf`, and a `Table`, `Thread`, `RecordCards` or `RecordRow` inside the records of another block, still read once they draw, as the marked limits below say.
165
165
  :::
166
166
 
167
167
  The build compiles each page into a read plan: one ordinary API read per data block, each known before any record is read, so all of them start together when the page opens and none waits for another's rows. There is no combined page query: each read is a request of its own. `/api/meta` sends each user the plan of the page as they see it, so it holds no read of a resource they cannot read and no field they cannot read.
@@ -179,7 +179,7 @@ Each read in the plan (`page.reads.reads`) names its block by a JSON Pointer int
179
179
 
180
180
  A [custom component](custom-components.md#reads) is planned when it declares its reads: the page starts them with the others, each of several a part of its own named by its resource prop (`/children/0#edges`), and the component draws from them. One that declares none is outside the plan (`page.reads.outside`): whatever it reads, it reads by itself once it draws, and `protobase doctor` lists it.
181
181
 
182
- <gap>A `RecordRow` cannot start its read when the page opens because starting its paged rows ahead of it is not implemented, so it reads once it draws, under a `Show` or `Match` once its condition holds.</gap> <gap>A `Table`, `Thread` or `RecordCards` inside the records of another block cannot start its read when the page opens because a planned read with per-record labels, photos and totals is not implemented, so it reads once it draws.</gap> <gap>A `Chart` cannot sit inside a repeated record because grouping a chart per record is not implemented.</gap>
182
+ <gap>A `RecordRow` of a view with `listOf` or `searchesOf` cannot start its read when the page opens because starting the user's saved records or searches ahead of it is not implemented, so it reads once it draws, under a `Show` or `Match` once its condition holds.</gap> <gap>A `Table`, `Thread`, `RecordCards` or `RecordRow` inside the records of another block cannot start its read when the page opens because a planned read with per-record labels, photos and totals is not implemented, so it reads once it draws.</gap> <gap>A `Chart` cannot sit inside a repeated record because grouping a chart per record is not implemented.</gap>
183
183
 
184
184
  ## Field values
185
185
 
@@ -313,7 +313,7 @@ A Task whose `Resource` is a step type followed by `.waitForTaskToken`, the Stat
313
313
  - **Its time.** `TimeoutSeconds` counts from the try's start, its hand-off included, as in Step Functions, and may be up to 366 days, its default; past it the Task fails with `States.Timeout`. `HeartbeatSeconds`, less than `TimeoutSeconds`, fails it with `States.HeartbeatTimeout` when no heartbeat came in that time since the hand-off or the last one. The step type's own call still ends within 300 seconds.
314
314
  - **Once only.** The hand-off happens once per try: a run that stops after it, as when its worker restarts, only waits again; one that stops before it was marked hands off again with a new token, under a new idempotency key, so a receiver that drops repeated keys still gets it. An answer that comes while the hand-off is still running counts, even if the hand-off then fails. A [replay](#replaying-a-run) hands nothing off and goes on with what the replayed run was sent. A Task that waits caches nothing, so `Cache` is refused on it.
315
315
  - **Where it may be read.** `$states.context.Task.Token` is read only in such a Task's `Arguments`.
316
- - **In the editor.** A Task's form has *Wait for an outside result*, which adds `.waitForTaskToken`, with *Wait at most* (`TimeoutSeconds`) and *Heartbeat within* (`HeartbeatSeconds`); its node is named for its step type, *then waits*.
316
+ - **In the editor.** A Task's form has *Wait for an outside result*, which adds `.waitForTaskToken`, with *Wait at most* (`TimeoutSeconds`) and *Heartbeat within* (`HeartbeatSeconds`); its node is named for its step type, *then waits*. A [custom step's](#custom-workflow-steps) form has no switch, since it waits for its runner already, and always shows both fields.
317
317
 
318
318
  ### Blocks
319
319
 
@@ -527,7 +527,7 @@ A stored file is read from where its configuration points now. <gap>Changing a c
527
527
  ## Custom workflow steps
528
528
 
529
529
  :::caution[In development]
530
- A custom step is saved, listed and checked, but it does not run: a run that reaches one fails. It cannot yet be built, tested or given limits on its resources and network.
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.
531
531
  :::
532
532
 
533
533
  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 +538,7 @@ Turn them on with `customSteps` in `workflows`:
538
538
  export default defineConfig({ workflows: { customSteps: true } })
539
539
  ```
540
540
 
541
- Their tables, `workflows.custom_steps` and `workflows.custom_step_versions`, come with the next [`protobase migration`](cli.md#migration) after you turn them on.
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.
542
542
 
543
543
  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
544
 
@@ -586,7 +586,71 @@ Its arguments are the manifest's `input` and `store`, `{ configuration, path? }`
586
586
 
587
587
  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
588
 
589
- - <gap>A custom step cannot run because building its image and running its container are not implemented; a run that reaches one fails with `States.Runtime` and the cause `Custom steps do not run yet`.</gap>
589
+ A run hands a custom step to one of its tenant's [runners](#runners) as a [waiting Task](#waiting-for-an-outside-result) hands off its work: it queues a **job** with its arguments, then waits, holding no worker, until the runner that claimed the job completes it. So `Retry`, `Catch`, `HeartbeatSeconds` and the once-only answer work as for any waiting Task, and a retry queues a new job with a new token. Its `TimeoutSeconds` counts from the try's start, its time in the queue included, and is 300 by default, as for any step type, up to 366 days; past it the Task fails with `States.Timeout`. A custom step waits for its runner already, so `.waitForTaskToken` on its `Resource` is refused, naming the `Resource` to write, and so is `Cache`. A run of a custom step that was deleted meanwhile fails with `States.Runtime`.
590
+
591
+ ### Runners
592
+
593
+ :::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.
595
+ :::
596
+
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.
598
+
599
+ | Field | |
600
+ | --- | --- |
601
+ | `name` | What you call it. |
602
+ | `labels` | A list of at most 20 labels, each lowercase letters, digits and `_.:-`, such as `["gpu"]`. |
603
+ | `revoked` | Set to `true` to refuse the runner from its next call on: the jobs it holds go back to the queue, for another runner. It cannot be set back; register the machine again as a new runner. |
604
+ | `registered_at`, `platform`, `kinds` | When it registered, and the platform and kinds of steps it gave then. Read-only. |
605
+ | `state`, `polled_at`, `polling_until` | What it said of itself with its last claim, when it made it, and until when that claim is held open. Read-only. |
606
+
607
+ Deleting a runner refuses its token as revoking it does.
608
+
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:
610
+
611
+ ```http
612
+ POST /api/runners/v1/register
613
+ { "token": "pbr_once_...", "platform": "linux/amd64", "kinds": ["container"] }
614
+ ```
615
+
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.
617
+
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.
619
+
620
+ | Call | Body | Answer |
621
+ | --- | --- | --- |
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. |
623
+ | `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
+ | `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. |
625
+ | `POST /api/runners/v1/jobs/<id>/complete` | `{ "output": { ... } }`, or `{ "error": "Unreadable", "cause": "..." }` | `{}`, ending the job and its Task. |
626
+
627
+ 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
+
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`.
630
+
631
+ 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
+
633
+ ### How jobs are placed
634
+
635
+ The app places each job with one runner that holds a claim open, of the job's tenant, that runs `container` steps, has a free slot and every label the job needs, preferring, best first:
636
+
637
+ 1. a runner with a warm instance of the same step version that takes another job;
638
+ 2. one with a snapshot of that version's image ready;
639
+ 3. one with the image;
640
+ 4. any other.
641
+
642
+ A job whose best free runner has nothing of its image waits up to 5 seconds for one with it to claim, and one whose best has its image waits up to 1 second for a warm instance; then it takes the best runner free. It waits only while a runner of its tenant that holds a claim open or runs a job, busy or not, said with its last claim that it has what the job waits for: the image, a snapshot or a warm instance of that step version for the first wait, a warm instance for the second. With none, it takes the best runner free at once. Pulling an image takes far longer than either wait, so a short wait usually starts the job sooner. A waiting job keeps its place and lets later jobs take the runner it left. Within a tenant the oldest job picks first, and tenants with waiting jobs take turns. Each claim takes one job, and its runner claims again for the next. [`workflows.runners`](config/jobs-and-events.md#workflowsrunners) sets the claim's time, the lease and both waits.
643
+
644
+ Placing runs as a job is queued, as a claim comes, and every second while a server process holds a claim open, one placing at a time across all the app's processes, so a job queued on one process reaches a runner whose claim another holds within a second.
645
+
646
+ ### Jobs
647
+
648
+ 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
+
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>
653
+ - <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>
590
654
  - <gap>A custom step cannot limit its memory, CPU, time or network because those fields of its manifest are not implemented.</gap>
591
655
  - <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>
592
656
 
@@ -700,6 +764,8 @@ The workflow resources take only [named grants](access.md#resources-that-need-na
700
764
  | `storage_configurations.create`, `storage_configurations.update`, `storage_configurations.delete` | Make, change and delete storage configurations. |
701
765
  | `workflow_custom_steps.read`, `workflow_custom_step_versions.read` | Read the [custom steps](#custom-workflow-steps) and their versions. A workflow's author needs neither to use them: the step types are listed to whoever may read workflows. |
702
766
  | `workflow_custom_steps.create`, `workflow_custom_steps.update`, `workflow_custom_steps.delete` | Make, change and delete custom steps. Each change of a manifest is a new version. |
767
+ | `workflow_runners.read`, `workflow_custom_step_jobs.read` | Read the [runners](#runners) and the jobs they claim, the jobs' input and output included. |
768
+ | `workflow_runners.create`, `workflow_runners.update`, `workflow_runners.delete` | Make, revoke and delete runners. Issuing a runner's registration token needs the right to change it. |
703
769
 
704
770
  ```ts
705
771
  defineRoles({
@@ -731,7 +797,7 @@ Every limit fails closed: a run or step that passes one fails, rather than going
731
797
  | --- | --- |
732
798
  | A definition | 256 KiB as JSON, 100 states, Maps included; an expression 4,096 characters. |
733
799
  | An expression's evaluation | 1 second, and 300 levels deep; beyond, `States.QueryEvaluationError`. |
734
- | A Task's `TimeoutSeconds` | 300 by default, and at most; for a Task that [waits for an outside result](#waiting-for-an-outside-result), 366 days. |
800
+ | A Task's `TimeoutSeconds` | 300 by default, and at most; for a Task that [waits for an outside result](#waiting-for-an-outside-result), 366 days, its default; for a [custom step](#custom-workflow-steps), 300 by default and 366 days at most. |
735
801
  | A retrier's `MaxAttempts` | 19. |
736
802
  | The wait before a retry | 1 day, however `BackoffRate` grows it. |
737
803
  | A Map's items | 10,000; beyond, the Map fails with `States.DataLimitExceeded` before any item runs. |