substantial 0.2.0b1__tar.gz → 0.2.0b2__tar.gz

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.
Files changed (70) hide show
  1. substantial-0.2.0b1/README.md → substantial-0.2.0b2/PKG-INFO +46 -8
  2. substantial-0.2.0b1/PKG-INFO → substantial-0.2.0b2/README.md +29 -21
  3. {substantial-0.2.0b1 → substantial-0.2.0b2}/pyproject.toml +16 -3
  4. {substantial-0.2.0b1 → substantial-0.2.0b2}/python/substantial/__init__.py +6 -2
  5. substantial-0.2.0b2/python/substantial/boundary/v1/agent_pb2.py +61 -0
  6. {substantial-0.2.0b1 → substantial-0.2.0b2}/python/substantial/boundary/v1/agent_pb2.pyi +12 -4
  7. substantial-0.2.0b2/python/substantial/boundary/v1/plan_pb2.py +86 -0
  8. {substantial-0.2.0b1 → substantial-0.2.0b2}/python/substantial/boundary/v1/plan_pb2.pyi +28 -12
  9. substantial-0.2.0b2/python/substantial/boundary/v1/run_pb2.py +104 -0
  10. {substantial-0.2.0b1 → substantial-0.2.0b2}/python/substantial/boundary/v1/run_pb2.pyi +12 -2
  11. {substantial-0.2.0b1 → substantial-0.2.0b2}/python/substantial/child.py +20 -3
  12. {substantial-0.2.0b1 → substantial-0.2.0b2}/python/substantial/client.py +72 -29
  13. substantial-0.2.0b2/python/substantial/clock.py +86 -0
  14. {substantial-0.2.0b1 → substantial-0.2.0b2}/python/substantial/errors.py +71 -12
  15. substantial-0.2.0b2/python/substantial/layout/v1/layout_pb2.py +94 -0
  16. {substantial-0.2.0b1 → substantial-0.2.0b2}/python/substantial/layout/v1/layout_pb2.pyi +18 -6
  17. {substantial-0.2.0b1 → substantial-0.2.0b2}/python/substantial/plan.py +30 -21
  18. {substantial-0.2.0b1 → substantial-0.2.0b2}/python/substantial/replay.py +39 -29
  19. {substantial-0.2.0b1 → substantial-0.2.0b2}/python/substantial/scheduler.py +8 -8
  20. {substantial-0.2.0b1 → substantial-0.2.0b2}/python/substantial/settings.py +54 -3
  21. {substantial-0.2.0b1 → substantial-0.2.0b2}/python/substantial/step.py +32 -11
  22. {substantial-0.2.0b1 → substantial-0.2.0b2}/python/substantial/stores/__init__.py +33 -6
  23. {substantial-0.2.0b1 → substantial-0.2.0b2}/python/substantial/stores/base.py +5 -0
  24. substantial-0.2.0b2/python/substantial/stores/credentials.py +123 -0
  25. {substantial-0.2.0b1 → substantial-0.2.0b2}/python/substantial/stores/fs.py +3 -0
  26. {substantial-0.2.0b1 → substantial-0.2.0b2}/python/substantial/stores/memory.py +3 -0
  27. substantial-0.2.0b2/python/substantial/stores/redis.py +113 -0
  28. substantial-0.2.0b2/python/substantial/stores/redis_connect.py +199 -0
  29. substantial-0.2.0b2/python/substantial/stores/redis_notify.py +129 -0
  30. substantial-0.2.0b2/python/substantial/stores/redis_store.py +267 -0
  31. {substantial-0.2.0b1 → substantial-0.2.0b2}/python/substantial/stores/retry.py +13 -5
  32. substantial-0.2.0b2/python/substantial/stores/s3.py +120 -0
  33. substantial-0.2.0b2/python/substantial/stores/s3_store.py +317 -0
  34. substantial-0.2.0b2/python/substantial/testing/__init__.py +8 -0
  35. substantial-0.2.0b2/python/substantial/testing/_env.py +237 -0
  36. substantial-0.2.0b2/python/substantial/testing/_store.py +143 -0
  37. substantial-0.2.0b2/python/substantial/testing/_time.py +229 -0
  38. substantial-0.2.0b2/python/substantial/testing/_workers.py +230 -0
  39. substantial-0.2.0b2/python/substantial/testing/_world.py +190 -0
  40. {substantial-0.2.0b1 → substantial-0.2.0b2}/python/substantial/worker.py +80 -35
  41. {substantial-0.2.0b1 → substantial-0.2.0b2}/python/substantial/workflow.py +30 -4
  42. substantial-0.2.0b2/redis/create.lua +13 -0
  43. substantial-0.2.0b2/redis/delete.lua +13 -0
  44. substantial-0.2.0b2/wasm/SHA256SUMS +1 -0
  45. substantial-0.2.0b2/wasm/substantial.wasm +0 -0
  46. substantial-0.2.0b1/python/substantial/boundary/v1/agent_pb2.py +0 -61
  47. substantial-0.2.0b1/python/substantial/boundary/v1/plan_pb2.py +0 -82
  48. substantial-0.2.0b1/python/substantial/boundary/v1/run_pb2.py +0 -102
  49. substantial-0.2.0b1/python/substantial/layout/v1/layout_pb2.py +0 -92
  50. substantial-0.2.0b1/python/substantial/stores/credentials.py +0 -107
  51. substantial-0.2.0b1/python/substantial/stores/s3.py +0 -331
  52. substantial-0.2.0b1/python/substantial/stores/sigv4.py +0 -69
  53. substantial-0.2.0b1/wasm/SHA256SUMS +0 -1
  54. substantial-0.2.0b1/wasm/substantial.wasm +0 -0
  55. {substantial-0.2.0b1 → substantial-0.2.0b2}/.gitignore +0 -0
  56. {substantial-0.2.0b1 → substantial-0.2.0b2}/LICENSE +0 -0
  57. {substantial-0.2.0b1 → substantial-0.2.0b2}/python/substantial/_proto.py +0 -0
  58. {substantial-0.2.0b1 → substantial-0.2.0b2}/python/substantial/boundary/v1/boundary_pb2.py +0 -0
  59. {substantial-0.2.0b1 → substantial-0.2.0b2}/python/substantial/boundary/v1/boundary_pb2.pyi +0 -0
  60. {substantial-0.2.0b1 → substantial-0.2.0b2}/python/substantial/context.py +0 -0
  61. {substantial-0.2.0b1 → substantial-0.2.0b2}/python/substantial/core.py +0 -0
  62. {substantial-0.2.0b1 → substantial-0.2.0b2}/python/substantial/durations.py +0 -0
  63. {substantial-0.2.0b1 → substantial-0.2.0b2}/python/substantial/executor.py +0 -0
  64. {substantial-0.2.0b1 → substantial-0.2.0b2}/python/substantial/iterate.py +0 -0
  65. {substantial-0.2.0b1 → substantial-0.2.0b2}/python/substantial/log.py +0 -0
  66. {substantial-0.2.0b1 → substantial-0.2.0b2}/python/substantial/machines.py +0 -0
  67. {substantial-0.2.0b1 → substantial-0.2.0b2}/python/substantial/messages.py +0 -0
  68. {substantial-0.2.0b1 → substantial-0.2.0b2}/python/substantial/names.py +0 -0
  69. {substantial-0.2.0b1 → substantial-0.2.0b2}/python/substantial/py.typed +0 -0
  70. {substantial-0.2.0b1 → substantial-0.2.0b2}/python/substantial/saga.py +0 -0
@@ -1,8 +1,25 @@
1
+ Metadata-Version: 2.5
2
+ Name: substantial
3
+ Version: 0.2.0-beta.2
4
+ Summary: Brokerless durable execution: the Python host of the Substantial core
5
+ Project-URL: Repository, https://github.com/zifeo/substantial
6
+ License-Expression: MPL-2.0
7
+ License-File: LICENSE
8
+ Requires-Python: >=3.13
9
+ Requires-Dist: protobuf<8,>=7.36.2
10
+ Requires-Dist: rfc8785>=0.1.4
11
+ Requires-Dist: wasmtime>=50.0.1
12
+ Provides-Extra: redis
13
+ Requires-Dist: redis>=8.1.0; extra == 'redis'
14
+ Provides-Extra: s3
15
+ Requires-Dist: aiobotocore>=3.10.0; extra == 's3'
16
+ Description-Content-Type: text/markdown
17
+
1
18
  # Substantial
2
19
 
3
20
  Brokerless durable execution for Rust, Python and TypeScript.
4
21
 
5
- Write a workflow as a plain async function. Substantial records the result of each step, so after a crash, a restart or a deploy the function picks up where it was, without running finished steps again. Retries, sleeps of days and messages from the outside wait without holding a process. The only infrastructure is a store: memory, a directory or S3. No broker, no server.
22
+ Write a workflow as a plain async function. Substantial records the result of each step, so after a crash, a restart or a deploy the function picks up where it was, without running finished steps again. Retries, sleeps of days and messages from the outside wait without holding a process. The only infrastructure is a store: memory, a directory, S3 or Redis. No broker, no server.
6
23
 
7
24
  ## Example
8
25
 
@@ -173,31 +190,39 @@ Run it with `node checkout.ts` or `deno run -A checkout.ts`. Steps and workflows
173
190
  Python 3.13 or later:
174
191
 
175
192
  ```sh
176
- uv add substantial==0.2.0b1 # or: pip install substantial==0.2.0b1
193
+ uv add substantial==0.2.0b2 # or: pip install substantial==0.2.0b2
194
+ uv add "substantial[s3]==0.2.0b2" # with S3 stores, or: pip install "substantial[s3]==0.2.0b2"
195
+ uv add "substantial[redis]==0.2.0b2" # with Redis stores, or: pip install "substantial[redis]==0.2.0b2"
177
196
  ```
178
197
 
179
- The exact pin installs the pre-release; without one, pip needs `--pre` and uv `--prerelease=allow`.
198
+ The exact pin installs the pre-release; without one, pip needs `--pre` and uv `--prerelease=allow`. The `s3` extra adds aiobotocore, which `s3://` stores need, and the `redis` extra redis-py, which Redis stores need.
180
199
 
181
200
  Rust 1.97 or later, with what the example uses:
182
201
 
183
202
  ```sh
184
- cargo add substantial@0.2.0-beta.1
203
+ cargo add substantial@0.2.0-beta.2
185
204
  cargo add tokio --features macros,rt-multi-thread
186
205
  cargo add serde --features derive
187
206
  cargo add anyhow
188
207
  ```
189
208
 
209
+ Redis stores need the `redis` feature: `cargo add substantial@0.2.0-beta.2 --features redis`.
210
+
190
211
  TypeScript, on Node 24 or later, or Deno, from [JSR](https://jsr.io/@substantial/substantial):
191
212
 
192
213
  ```sh
193
- npx jsr add @substantial/substantial@0.2.0-beta.1
194
- deno add jsr:@substantial/substantial@0.2.0-beta.1
214
+ npx jsr add @substantial/substantial@0.2.0-beta.2
215
+ deno add jsr:@substantial/substantial@0.2.0-beta.2
195
216
  ```
196
217
 
218
+ `s3://` stores also need the AWS SDK: `npm install @aws-sdk/client-s3`, or `deno add npm:@aws-sdk/client-s3`. Redis stores need `@redis/client`: `npm install @redis/client`, or `deno add npm:@redis/client`.
219
+
197
220
  ## A tour
198
221
 
199
222
  The API is the same in every host: `snake_case` in Python and Rust, `camelCase` in TypeScript. The snippets are Python, with Rust and TypeScript folded under each, inside a workflow unless they start from `sub` or `run`. The library is imported as `s` (`import substantial as s`, `import * as s from "@substantial/substantial"`, `use substantial as s;`): `s.` declares, `c.` acts. [The reference][reference] covers each host, and [its table of actions][I-21] gives every call in all three.
200
223
 
224
+ [The integration guide][integration] runs the worker inside a web service on several pods, and [the testing guide][testing] tests workflows on a virtual clock.
225
+
201
226
  ### Rules of workflow code
202
227
 
203
228
  A run replays its function from the first line at every wakeup. So side effects go in steps, the clock and randomness come from `c.now()`, `c.random()` and `c.uuid()`, which are recorded, and the function makes the same calls on every replay, branching only on inputs, step results and messages. Values are JSON, up to 64 MiB each (`ValueTooLarge`). More in [I-1], [I-2] and [I-15].
@@ -524,11 +549,14 @@ A run started with a version is replayed only by that version's code, so old and
524
549
  | `memory://<ns>` | memory, in the process, for tests |
525
550
  | `file:<path>` | a directory, for development and one machine |
526
551
  | `s3://<endpoint>/<bucket>/<ns>?region=<r>` | S3 with conditional writes: AWS, MinIO, Ceph RGW, R2 |
552
+ | `redis://<host>:<port>/<ns>?db=0&replicas=0`, `redis+sentinel://`, `redis+cluster://` | Redis or Valkey 7.2+ with AOF, one server, Sentinel or a cluster, every create fsynced on every replica; workers wake as soon as a run is started or messaged |
527
553
 
528
554
  ```python
529
555
  sub = await s.Substantial.open("s3://s3.eu-central-1.amazonaws.com/shop/prod?region=eu-central-1",
530
556
  credentials="env")
531
557
  sub = await s.Substantial.open(url, credentials=role_keys) # a function returning s.Credentials
558
+ sub = await s.Substantial.open("redis+sentinel://10.0.0.1:26379,10.0.0.2:26379/shop?master=main&db=0&replicas=all",
559
+ credentials=s.Password("...", username="shop"))
532
560
  ```
533
561
 
534
562
  <details>
@@ -537,16 +565,22 @@ sub = await s.Substantial.open(url, credentials=role_keys) # a function return
537
565
  ```rust
538
566
  let sub = s::Substantial::open(url).credentials(s::Credentials::Env).await?;
539
567
  let sub = s::Substantial::open(url).credentials(s::Credentials::provider(role_keys)).await?;
568
+ let sub = s::Substantial::open(redis_url)
569
+ .credentials(s::Credentials::Password { password: "...".into(), username: Some("shop".into()) })
570
+ .await?;
540
571
  ```
541
572
 
542
573
  ```ts
543
574
  const sub = await s.Substantial.open(url, { credentials: "env" });
544
575
  const sub = await s.Substantial.open(url, { credentials: roleKeys });
576
+ const sub = await s.Substantial.open(redisUrl, {
577
+ credentials: new s.Password({ password: "...", username: "shop" }),
578
+ });
545
579
  ```
546
580
 
547
581
  </details>
548
582
 
549
- S3 takes `"env"` (`AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `AWS_SESSION_TOKEN`), explicit `s.Credentials(...)`, or a function, sync or async, returning keys with an optional `expires_at`: it is called at open and again within 5 minutes of that expiry, for roles and other temporary keys. `s3+http://` reaches a local server. Ended runs stay in the store: never delete keys under a namespace, by hand or with a lifecycle rule. More in [I-16].
583
+ S3 takes `"env"` (`AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `AWS_SESSION_TOKEN`), explicit `s.Credentials(...)`, or a function, sync or async, returning keys with an optional `expires_at`: it is called at open and again within 5 minutes of that expiry, for roles and other temporary keys. `s3+http://` reaches a local server. Redis takes none, `"env"` (`REDIS_PASSWORD`, `REDIS_USERNAME`), a password, or such a function returning one (`s::Credentials::password_provider` in Rust). Ended runs are deleted 30 days after their chain ends, or after the `retention` a worker or a workflow sets, `s.FOREVER` keeping them; never delete keys under a namespace yourself, by hand or with a lifecycle rule. More in [I-16].
550
584
 
551
585
  ### Workers
552
586
 
@@ -572,7 +606,7 @@ await sub.worker([checkout, verify], { preset: "service", concurrency: 32 }).ser
572
606
 
573
607
  </details>
574
608
 
575
- A preset, `script` or `service`, sets every setting; `concurrency`, `max_idle`, `shutdown_grace`, `claim_ttl`, `continue_as_new_after` and `step_timeout` can be overridden by name. `serve()` stops on SIGTERM or Ctrl-C, letting steps in flight end. A worker logs a warning for each run that ends failed or cancelled, and a worker that dies logs at once and fails the `result()` waits of its process. The runs of a worker that crashed are taken over by the others within 35 seconds. More in [I-18].
609
+ A preset, `script` or `service`, sets every setting; `concurrency`, `max_idle`, `shutdown_grace`, `claim_ttl`, `continue_as_new_after`, `step_timeout` and `retention` can be overridden by name. `serve()` stops on SIGTERM or Ctrl-C, letting steps in flight end. A worker logs a warning for each run that ends failed or cancelled, and a worker that dies logs at once and fails the `result()` waits of its process. The runs of a worker that crashed are taken over by the others within 35 seconds. More in [I-18].
576
610
 
577
611
  ## How it works
578
612
 
@@ -590,6 +624,8 @@ uv run pytest
590
624
  npm ci && npm run check && npm test
591
625
  ```
592
626
 
627
+ The Redis tests run, in Rust with `--features redis`, when `SUBSTANTIAL_REDIS_URL`, `SUBSTANTIAL_REDIS_SENTINEL_URL` or `SUBSTANTIAL_REDIS_CLUSTER_URL` is set, against the Valkey of `dev/redis.compose.yaml`, `dev/redis-sentinel.compose.yaml` or `dev/redis-cluster.compose.yaml`, whose headers give each URL.
628
+
593
629
  The S3 tests run when `SUBSTANTIAL_S3_URL` is set, against a local RustFS:
594
630
 
595
631
  ```sh
@@ -623,4 +659,6 @@ Each host has two examples on a file or memory store, `first_workflow` and `back
623
659
  [I-18]: https://github.com/zifeo/substantial/blob/main/docs/interfaces.md#i-18-workers
624
660
  [I-21]: https://github.com/zifeo/substantial/blob/main/docs/interfaces.md#i-21-actions-in-each-host
625
661
  [I-22]: https://github.com/zifeo/substantial/blob/main/docs/interfaces.md#i-22-for-implementers
662
+ [integration]: https://github.com/zifeo/substantial/blob/main/docs/integration.md
626
663
  [reference]: https://github.com/zifeo/substantial/blob/main/docs/interfaces.md
664
+ [testing]: https://github.com/zifeo/substantial/blob/main/docs/testing.md
@@ -1,21 +1,8 @@
1
- Metadata-Version: 2.5
2
- Name: substantial
3
- Version: 0.2.0-beta.1
4
- Summary: Brokerless durable execution: the Python host of the Substantial core
5
- Project-URL: Repository, https://github.com/zifeo/substantial
6
- License-Expression: MPL-2.0
7
- License-File: LICENSE
8
- Requires-Python: >=3.13
9
- Requires-Dist: httpx>=0.28.1
10
- Requires-Dist: protobuf<8,>=7.36.2
11
- Requires-Dist: wasmtime>=50.0.1
12
- Description-Content-Type: text/markdown
13
-
14
1
  # Substantial
15
2
 
16
3
  Brokerless durable execution for Rust, Python and TypeScript.
17
4
 
18
- Write a workflow as a plain async function. Substantial records the result of each step, so after a crash, a restart or a deploy the function picks up where it was, without running finished steps again. Retries, sleeps of days and messages from the outside wait without holding a process. The only infrastructure is a store: memory, a directory or S3. No broker, no server.
5
+ Write a workflow as a plain async function. Substantial records the result of each step, so after a crash, a restart or a deploy the function picks up where it was, without running finished steps again. Retries, sleeps of days and messages from the outside wait without holding a process. The only infrastructure is a store: memory, a directory, S3 or Redis. No broker, no server.
19
6
 
20
7
  ## Example
21
8
 
@@ -186,31 +173,39 @@ Run it with `node checkout.ts` or `deno run -A checkout.ts`. Steps and workflows
186
173
  Python 3.13 or later:
187
174
 
188
175
  ```sh
189
- uv add substantial==0.2.0b1 # or: pip install substantial==0.2.0b1
176
+ uv add substantial==0.2.0b2 # or: pip install substantial==0.2.0b2
177
+ uv add "substantial[s3]==0.2.0b2" # with S3 stores, or: pip install "substantial[s3]==0.2.0b2"
178
+ uv add "substantial[redis]==0.2.0b2" # with Redis stores, or: pip install "substantial[redis]==0.2.0b2"
190
179
  ```
191
180
 
192
- The exact pin installs the pre-release; without one, pip needs `--pre` and uv `--prerelease=allow`.
181
+ The exact pin installs the pre-release; without one, pip needs `--pre` and uv `--prerelease=allow`. The `s3` extra adds aiobotocore, which `s3://` stores need, and the `redis` extra redis-py, which Redis stores need.
193
182
 
194
183
  Rust 1.97 or later, with what the example uses:
195
184
 
196
185
  ```sh
197
- cargo add substantial@0.2.0-beta.1
186
+ cargo add substantial@0.2.0-beta.2
198
187
  cargo add tokio --features macros,rt-multi-thread
199
188
  cargo add serde --features derive
200
189
  cargo add anyhow
201
190
  ```
202
191
 
192
+ Redis stores need the `redis` feature: `cargo add substantial@0.2.0-beta.2 --features redis`.
193
+
203
194
  TypeScript, on Node 24 or later, or Deno, from [JSR](https://jsr.io/@substantial/substantial):
204
195
 
205
196
  ```sh
206
- npx jsr add @substantial/substantial@0.2.0-beta.1
207
- deno add jsr:@substantial/substantial@0.2.0-beta.1
197
+ npx jsr add @substantial/substantial@0.2.0-beta.2
198
+ deno add jsr:@substantial/substantial@0.2.0-beta.2
208
199
  ```
209
200
 
201
+ `s3://` stores also need the AWS SDK: `npm install @aws-sdk/client-s3`, or `deno add npm:@aws-sdk/client-s3`. Redis stores need `@redis/client`: `npm install @redis/client`, or `deno add npm:@redis/client`.
202
+
210
203
  ## A tour
211
204
 
212
205
  The API is the same in every host: `snake_case` in Python and Rust, `camelCase` in TypeScript. The snippets are Python, with Rust and TypeScript folded under each, inside a workflow unless they start from `sub` or `run`. The library is imported as `s` (`import substantial as s`, `import * as s from "@substantial/substantial"`, `use substantial as s;`): `s.` declares, `c.` acts. [The reference][reference] covers each host, and [its table of actions][I-21] gives every call in all three.
213
206
 
207
+ [The integration guide][integration] runs the worker inside a web service on several pods, and [the testing guide][testing] tests workflows on a virtual clock.
208
+
214
209
  ### Rules of workflow code
215
210
 
216
211
  A run replays its function from the first line at every wakeup. So side effects go in steps, the clock and randomness come from `c.now()`, `c.random()` and `c.uuid()`, which are recorded, and the function makes the same calls on every replay, branching only on inputs, step results and messages. Values are JSON, up to 64 MiB each (`ValueTooLarge`). More in [I-1], [I-2] and [I-15].
@@ -537,11 +532,14 @@ A run started with a version is replayed only by that version's code, so old and
537
532
  | `memory://<ns>` | memory, in the process, for tests |
538
533
  | `file:<path>` | a directory, for development and one machine |
539
534
  | `s3://<endpoint>/<bucket>/<ns>?region=<r>` | S3 with conditional writes: AWS, MinIO, Ceph RGW, R2 |
535
+ | `redis://<host>:<port>/<ns>?db=0&replicas=0`, `redis+sentinel://`, `redis+cluster://` | Redis or Valkey 7.2+ with AOF, one server, Sentinel or a cluster, every create fsynced on every replica; workers wake as soon as a run is started or messaged |
540
536
 
541
537
  ```python
542
538
  sub = await s.Substantial.open("s3://s3.eu-central-1.amazonaws.com/shop/prod?region=eu-central-1",
543
539
  credentials="env")
544
540
  sub = await s.Substantial.open(url, credentials=role_keys) # a function returning s.Credentials
541
+ sub = await s.Substantial.open("redis+sentinel://10.0.0.1:26379,10.0.0.2:26379/shop?master=main&db=0&replicas=all",
542
+ credentials=s.Password("...", username="shop"))
545
543
  ```
546
544
 
547
545
  <details>
@@ -550,16 +548,22 @@ sub = await s.Substantial.open(url, credentials=role_keys) # a function return
550
548
  ```rust
551
549
  let sub = s::Substantial::open(url).credentials(s::Credentials::Env).await?;
552
550
  let sub = s::Substantial::open(url).credentials(s::Credentials::provider(role_keys)).await?;
551
+ let sub = s::Substantial::open(redis_url)
552
+ .credentials(s::Credentials::Password { password: "...".into(), username: Some("shop".into()) })
553
+ .await?;
553
554
  ```
554
555
 
555
556
  ```ts
556
557
  const sub = await s.Substantial.open(url, { credentials: "env" });
557
558
  const sub = await s.Substantial.open(url, { credentials: roleKeys });
559
+ const sub = await s.Substantial.open(redisUrl, {
560
+ credentials: new s.Password({ password: "...", username: "shop" }),
561
+ });
558
562
  ```
559
563
 
560
564
  </details>
561
565
 
562
- S3 takes `"env"` (`AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `AWS_SESSION_TOKEN`), explicit `s.Credentials(...)`, or a function, sync or async, returning keys with an optional `expires_at`: it is called at open and again within 5 minutes of that expiry, for roles and other temporary keys. `s3+http://` reaches a local server. Ended runs stay in the store: never delete keys under a namespace, by hand or with a lifecycle rule. More in [I-16].
566
+ S3 takes `"env"` (`AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `AWS_SESSION_TOKEN`), explicit `s.Credentials(...)`, or a function, sync or async, returning keys with an optional `expires_at`: it is called at open and again within 5 minutes of that expiry, for roles and other temporary keys. `s3+http://` reaches a local server. Redis takes none, `"env"` (`REDIS_PASSWORD`, `REDIS_USERNAME`), a password, or such a function returning one (`s::Credentials::password_provider` in Rust). Ended runs are deleted 30 days after their chain ends, or after the `retention` a worker or a workflow sets, `s.FOREVER` keeping them; never delete keys under a namespace yourself, by hand or with a lifecycle rule. More in [I-16].
563
567
 
564
568
  ### Workers
565
569
 
@@ -585,7 +589,7 @@ await sub.worker([checkout, verify], { preset: "service", concurrency: 32 }).ser
585
589
 
586
590
  </details>
587
591
 
588
- A preset, `script` or `service`, sets every setting; `concurrency`, `max_idle`, `shutdown_grace`, `claim_ttl`, `continue_as_new_after` and `step_timeout` can be overridden by name. `serve()` stops on SIGTERM or Ctrl-C, letting steps in flight end. A worker logs a warning for each run that ends failed or cancelled, and a worker that dies logs at once and fails the `result()` waits of its process. The runs of a worker that crashed are taken over by the others within 35 seconds. More in [I-18].
592
+ A preset, `script` or `service`, sets every setting; `concurrency`, `max_idle`, `shutdown_grace`, `claim_ttl`, `continue_as_new_after`, `step_timeout` and `retention` can be overridden by name. `serve()` stops on SIGTERM or Ctrl-C, letting steps in flight end. A worker logs a warning for each run that ends failed or cancelled, and a worker that dies logs at once and fails the `result()` waits of its process. The runs of a worker that crashed are taken over by the others within 35 seconds. More in [I-18].
589
593
 
590
594
  ## How it works
591
595
 
@@ -603,6 +607,8 @@ uv run pytest
603
607
  npm ci && npm run check && npm test
604
608
  ```
605
609
 
610
+ The Redis tests run, in Rust with `--features redis`, when `SUBSTANTIAL_REDIS_URL`, `SUBSTANTIAL_REDIS_SENTINEL_URL` or `SUBSTANTIAL_REDIS_CLUSTER_URL` is set, against the Valkey of `dev/redis.compose.yaml`, `dev/redis-sentinel.compose.yaml` or `dev/redis-cluster.compose.yaml`, whose headers give each URL.
611
+
606
612
  The S3 tests run when `SUBSTANTIAL_S3_URL` is set, against a local RustFS:
607
613
 
608
614
  ```sh
@@ -636,4 +642,6 @@ Each host has two examples on a file or memory store, `first_workflow` and `back
636
642
  [I-18]: https://github.com/zifeo/substantial/blob/main/docs/interfaces.md#i-18-workers
637
643
  [I-21]: https://github.com/zifeo/substantial/blob/main/docs/interfaces.md#i-21-actions-in-each-host
638
644
  [I-22]: https://github.com/zifeo/substantial/blob/main/docs/interfaces.md#i-22-for-implementers
645
+ [integration]: https://github.com/zifeo/substantial/blob/main/docs/integration.md
639
646
  [reference]: https://github.com/zifeo/substantial/blob/main/docs/interfaces.md
647
+ [testing]: https://github.com/zifeo/substantial/blob/main/docs/testing.md
@@ -1,26 +1,32 @@
1
1
  [project]
2
2
  name = "substantial"
3
- version = "0.2.0-beta.1"
3
+ version = "0.2.0-beta.2"
4
4
  description = "Brokerless durable execution: the Python host of the Substantial core"
5
5
  readme = "README.md"
6
6
  license = "MPL-2.0"
7
7
  license-files = ["LICENSE"]
8
8
  requires-python = ">=3.13"
9
9
  dependencies = [
10
- "httpx>=0.28.1",
11
10
  "protobuf>=7.36.2,<8",
11
+ "rfc8785>=0.1.4",
12
12
  "wasmtime>=50.0.1",
13
13
  ]
14
14
 
15
+ [project.optional-dependencies]
16
+ s3 = ["aiobotocore>=3.10.0"]
17
+ redis = ["redis>=8.1.0"]
18
+
15
19
  [project.urls]
16
20
  Repository = "https://github.com/zifeo/substantial"
17
21
 
18
22
  [dependency-groups]
19
23
  dev = [
24
+ "substantial[s3,redis]",
20
25
  "pytest>=9.2.0",
21
26
  "pytest-asyncio>=1.4.1",
22
27
  "pytest-cov>=7.1.0",
23
28
  "ruff>=0.17.3",
29
+ "starlette>=1.10.0",
24
30
  ]
25
31
 
26
32
  [build-system]
@@ -30,10 +36,13 @@ build-backend = "hatchling.build"
30
36
  [tool.hatch.build.targets.wheel]
31
37
  packages = ["python/substantial"]
32
38
 
33
- # The core ships inside the package; the repository keeps its only copy in wasm/.
39
+ # The core and the Redis scripts ship inside the package; the repository keeps their only copies
40
+ # in wasm/ and redis/.
34
41
  [tool.hatch.build.targets.wheel.force-include]
35
42
  "wasm/substantial.wasm" = "substantial/wasm/substantial.wasm"
36
43
  "wasm/SHA256SUMS" = "substantial/wasm/SHA256SUMS"
44
+ "redis/create.lua" = "substantial/redis/create.lua"
45
+ "redis/delete.lua" = "substantial/redis/delete.lua"
37
46
 
38
47
  # only-include, not include: a full walk meets rust/wasm, a symlink to wasm/, first and skips wasm/.
39
48
  [tool.hatch.build.targets.sdist]
@@ -41,6 +50,8 @@ only-include = [
41
50
  "python/substantial",
42
51
  "wasm/substantial.wasm",
43
52
  "wasm/SHA256SUMS",
53
+ "redis/create.lua",
54
+ "redis/delete.lua",
44
55
  "LICENSE",
45
56
  "README.md",
46
57
  ]
@@ -51,6 +62,8 @@ cache-keys = [
51
62
  { file = "pyproject.toml" },
52
63
  { file = "wasm/substantial.wasm" },
53
64
  { file = "wasm/SHA256SUMS" },
65
+ { file = "redis/create.lua" },
66
+ { file = "redis/delete.lua" },
54
67
  ]
55
68
 
56
69
  [tool.pytest.ini_options]
@@ -6,6 +6,7 @@ from the loop's thread. The code of each replay runs on a loop of its own that t
6
6
  (I-24); step attempts run on the caller's loop, synchronous ones in its default executor.
7
7
  """
8
8
 
9
+ from substantial import testing
9
10
  from substantial.child import Child
10
11
  from substantial.client import Run, RunStatus, Substantial
11
12
  from substantial.context import Context
@@ -33,13 +34,14 @@ from substantial.errors import (
33
34
  ValueTooLarge,
34
35
  WaitTimeout,
35
36
  )
36
- from substantial.settings import ContinueAsNewAfter
37
+ from substantial.settings import FOREVER, ContinueAsNewAfter
37
38
  from substantial.step import Step, step, step_key
38
- from substantial.stores import Credentials
39
+ from substantial.stores import Credentials, Password
39
40
  from substantial.worker import Worker
40
41
  from substantial.workflow import Permanent, Retry, Workflow, workflow
41
42
 
42
43
  __all__ = [
44
+ "FOREVER",
43
45
  "Cancelled",
44
46
  "Child",
45
47
  "ConfigError",
@@ -54,6 +56,7 @@ __all__ = [
54
56
  "NonDeterminism",
55
57
  "NotCompressible",
56
58
  "NotInWorkflow",
59
+ "Password",
57
60
  "Permanent",
58
61
  "Retry",
59
62
  "RolledBack",
@@ -79,5 +82,6 @@ __all__ = [
79
82
  "seconds",
80
83
  "step",
81
84
  "step_key",
85
+ "testing",
82
86
  "workflow",
83
87
  ]
@@ -0,0 +1,61 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
4
+ # source: substantial/boundary/v1/agent.proto
5
+ # Protobuf Python Version: 7.36.2
6
+ """Generated protocol buffer code."""
7
+ from google.protobuf import descriptor as _descriptor
8
+ from google.protobuf import descriptor_pool as _descriptor_pool
9
+ from google.protobuf import runtime_version as _runtime_version
10
+ from google.protobuf import symbol_database as _symbol_database
11
+ from google.protobuf.internal import builder as _builder
12
+ _runtime_version.ValidateProtobufRuntimeVersion(
13
+ _runtime_version.Domain.PUBLIC,
14
+ 7,
15
+ 36,
16
+ 2,
17
+ '',
18
+ 'substantial/boundary/v1/agent.proto'
19
+ )
20
+ # @@protoc_insertion_point(imports)
21
+
22
+ _sym_db = _symbol_database.Default()
23
+
24
+
25
+ from substantial.boundary.v1 import boundary_pb2 as substantial_dot_boundary_dot_v1_dot_boundary__pb2
26
+ from substantial.boundary.v1 import run_pb2 as substantial_dot_boundary_dot_v1_dot_run__pb2
27
+ from substantial.layout.v1 import layout_pb2 as substantial_dot_layout_dot_v1_dot_layout__pb2
28
+
29
+
30
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n#substantial/boundary/v1/agent.proto\x12\x17substantial.boundary.v1\x1a&substantial/boundary/v1/boundary.proto\x1a!substantial/boundary/v1/run.proto\x1a\"substantial/layout/v1/layout.proto\"\x89\x01\n\x06Served\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x10\n\x08versions\x18\x02 \x03(\r\x12\x18\n\x0bunversioned\x18\x03 \x01(\x08H\x00\x88\x01\x01\x12\x35\n\tretention\x18\x04 \x01(\x0b\x32\".substantial.boundary.v1.RetentionB\x0e\n\x0c_unversioned\"\xd2\x03\n\x0b\x41gentConfig\x12\x0e\n\x06prefix\x18\x01 \x01(\t\x12\x12\n\npartitions\x18\x02 \x01(\r\x12\x0e\n\x06worker\x18\x03 \x01(\t\x12\x32\n\tworkflows\x18\x04 \x03(\x0b\x32\x1f.substantial.boundary.v1.Served\x12\x13\n\x0b\x63oncurrency\x18\x05 \x01(\r\x12\x14\n\x0c\x63laim_ttl_ms\x18\x06 \x01(\x04\x12\x15\n\rclaim_skew_ms\x18\x07 \x01(\x04\x12\x13\n\x0bmax_idle_ms\x18\x08 \x01(\x04\x12\x10\n\x08\x64ue_page\x18\t \x01(\r\x12\x11\n\tdue_pages\x18\n \x01(\r\x12\x16\n\x0esnapshot_every\x18\x0b \x01(\x04\x12\x12\n\nop_retries\x18\x0c \x01(\r\x12\x0c\n\x04seed\x18\r \x01(\x0c\x12\x36\n\x08settings\x18\x0e \x01(\x0b\x32$.substantial.boundary.v1.RunSettings\x12\x13\n\x0bstore_waits\x18\x0f \x01(\x08\x12\x14\n\x0cwait_seconds\x18\x10 \x01(\r\x12\x14\n\x0ctombstone_ms\x18\x11 \x01(\x04\x12\x18\n\x10retention_min_ms\x18\x12 \x01(\x04\x12\x12\n\nrecheck_ms\x18\x13 \x01(\x04\"t\n\tReplayEnd\x12-\n\x04idle\x18\x01 \x01(\x0b\x32\x1d.substantial.boundary.v1.IdleH\x00\x12\x31\n\x07\x64ropped\x18\x02 \x01(\x0b\x32\x1e.substantial.boundary.v1.EmptyH\x00\x42\x05\n\x03\x65nd\"\xd3\x04\n\x0c\x41gentRequest\x12+\n\x04next\x18\x01 \x01(\x0b\x32\x1b.substantial.layout.v1.TimeH\x00\x12:\n\x04\x66\x65\x65\x64\x18\x02 \x01(\x0b\x32*.substantial.boundary.v1.AgentRequest.FeedH\x00\x12\x41\n\x06\x63ommit\x18\x03 \x01(\x0b\x32/.substantial.boundary.v1.AgentRequest.RunCommitH\x00\x12I\n\x0creplay_ended\x18\x04 \x01(\x0b\x32\x31.substantial.boundary.v1.AgentRequest.ReplayEndedH\x00\x12.\n\x04wake\x18\x05 \x01(\x0b\x32\x1e.substantial.boundary.v1.EmptyH\x00\x12\x32\n\x08shutdown\x18\x06 \x01(\x0b\x32\x1e.substantial.boundary.v1.EmptyH\x00\x1a\x45\n\x04\x46\x65\x65\x64\x12\n\n\x02id\x18\x01 \x01(\x04\x12\x31\n\x06result\x18\x02 \x01(\x0b\x32!.substantial.boundary.v1.OpResult\x1aI\n\tRunCommit\x12\x0b\n\x03run\x18\x01 \x01(\t\x12/\n\x06\x63ommit\x18\x02 \x01(\x0b\x32\x1f.substantial.boundary.v1.Commit\x1aK\n\x0bReplayEnded\x12\x0b\n\x03run\x18\x01 \x01(\t\x12/\n\x03\x65nd\x18\x02 \x01(\x0b\x32\".substantial.boundary.v1.ReplayEndB\t\n\x07request\"\xcb\x04\n\x0c\x41gentCommand\x12<\n\x05store\x18\x01 \x01(\x0b\x32+.substantial.boundary.v1.AgentCommand.StoreH\x00\x12>\n\x06replay\x18\x02 \x01(\x0b\x32,.substantial.boundary.v1.AgentCommand.ReplayH\x00\x12\x44\n\tcommitted\x18\x03 \x01(\x0b\x32/.substantial.boundary.v1.AgentCommand.CommittedH\x00\x12\x15\n\x0bstop_replay\x18\x04 \x01(\tH\x00\x12\x31\n\nwait_until\x18\x05 \x01(\x0b\x32\x1b.substantial.layout.v1.TimeH\x00\x12.\n\x04stop\x18\x06 \x01(\x0b\x32\x1e.substantial.boundary.v1.EmptyH\x00\x1a\x41\n\x05Store\x12\n\n\x02id\x18\x01 \x01(\x04\x12,\n\x02op\x18\x02 \x01(\x0b\x32 .substantial.boundary.v1.StoreOp\x1aG\n\x06Replay\x12\x0b\n\x03run\x18\x01 \x01(\t\x12\x30\n\x05input\x18\x02 \x01(\x0b\x32!.substantial.boundary.v1.RunInput\x1a\x66\n\tCommitted\x12\x0b\n\x03run\x18\x01 \x01(\t\x12\t\n\x01n\x18\x02 \x01(\x04\x12\x0b\n\x03won\x18\x03 \x01(\x08\x12\x34\n\x05inbox\x18\x04 \x03(\x0b\x32%.substantial.boundary.v1.InboxMessageB\t\n\x07\x63ommand\"\xba\x01\n\rAgentResponse\x12\x33\n\x05\x65rror\x18\x01 \x01(\x0b\x32\".substantial.boundary.v1.CoreErrorH\x00\x12\x38\n\x07\x63ommand\x18\x02 \x01(\x0b\x32%.substantial.boundary.v1.AgentCommandH\x00\x12.\n\x04\x64one\x18\x03 \x01(\x0b\x32\x1e.substantial.boundary.v1.EmptyH\x00\x42\n\n\x08responseb\x06proto3')
31
+
32
+ _globals = globals()
33
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
34
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'substantial.boundary.v1.agent_pb2', _globals)
35
+ if not _descriptor._USE_C_DESCRIPTORS:
36
+ DESCRIPTOR._loaded_options = None
37
+ _globals['_SERVED']._serialized_start=176
38
+ _globals['_SERVED']._serialized_end=313
39
+ _globals['_AGENTCONFIG']._serialized_start=316
40
+ _globals['_AGENTCONFIG']._serialized_end=782
41
+ _globals['_REPLAYEND']._serialized_start=784
42
+ _globals['_REPLAYEND']._serialized_end=900
43
+ _globals['_AGENTREQUEST']._serialized_start=903
44
+ _globals['_AGENTREQUEST']._serialized_end=1498
45
+ _globals['_AGENTREQUEST_FEED']._serialized_start=1266
46
+ _globals['_AGENTREQUEST_FEED']._serialized_end=1335
47
+ _globals['_AGENTREQUEST_RUNCOMMIT']._serialized_start=1337
48
+ _globals['_AGENTREQUEST_RUNCOMMIT']._serialized_end=1410
49
+ _globals['_AGENTREQUEST_REPLAYENDED']._serialized_start=1412
50
+ _globals['_AGENTREQUEST_REPLAYENDED']._serialized_end=1487
51
+ _globals['_AGENTCOMMAND']._serialized_start=1501
52
+ _globals['_AGENTCOMMAND']._serialized_end=2088
53
+ _globals['_AGENTCOMMAND_STORE']._serialized_start=1835
54
+ _globals['_AGENTCOMMAND_STORE']._serialized_end=1900
55
+ _globals['_AGENTCOMMAND_REPLAY']._serialized_start=1902
56
+ _globals['_AGENTCOMMAND_REPLAY']._serialized_end=1973
57
+ _globals['_AGENTCOMMAND_COMMITTED']._serialized_start=1975
58
+ _globals['_AGENTCOMMAND_COMMITTED']._serialized_end=2077
59
+ _globals['_AGENTRESPONSE']._serialized_start=2091
60
+ _globals['_AGENTRESPONSE']._serialized_end=2277
61
+ # @@protoc_insertion_point(module_scope)
@@ -10,17 +10,19 @@ from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
10
10
  DESCRIPTOR: _descriptor.FileDescriptor
11
11
 
12
12
  class Served(_message.Message):
13
- __slots__ = ("name", "versions", "unversioned")
13
+ __slots__ = ("name", "versions", "unversioned", "retention")
14
14
  NAME_FIELD_NUMBER: _ClassVar[int]
15
15
  VERSIONS_FIELD_NUMBER: _ClassVar[int]
16
16
  UNVERSIONED_FIELD_NUMBER: _ClassVar[int]
17
+ RETENTION_FIELD_NUMBER: _ClassVar[int]
17
18
  name: str
18
19
  versions: _containers.RepeatedScalarFieldContainer[int]
19
20
  unversioned: bool
20
- def __init__(self, name: _Optional[str] = ..., versions: _Optional[_Iterable[int]] = ..., unversioned: _Optional[bool] = ...) -> None: ...
21
+ retention: _run_pb2.Retention
22
+ def __init__(self, name: _Optional[str] = ..., versions: _Optional[_Iterable[int]] = ..., unversioned: _Optional[bool] = ..., retention: _Optional[_Union[_run_pb2.Retention, _Mapping]] = ...) -> None: ...
21
23
 
22
24
  class AgentConfig(_message.Message):
23
- __slots__ = ("prefix", "partitions", "worker", "workflows", "concurrency", "claim_ttl_ms", "claim_skew_ms", "max_idle_ms", "due_page", "due_pages", "snapshot_every", "op_retries", "seed", "settings", "store_waits", "wait_seconds")
25
+ __slots__ = ("prefix", "partitions", "worker", "workflows", "concurrency", "claim_ttl_ms", "claim_skew_ms", "max_idle_ms", "due_page", "due_pages", "snapshot_every", "op_retries", "seed", "settings", "store_waits", "wait_seconds", "tombstone_ms", "retention_min_ms", "recheck_ms")
24
26
  PREFIX_FIELD_NUMBER: _ClassVar[int]
25
27
  PARTITIONS_FIELD_NUMBER: _ClassVar[int]
26
28
  WORKER_FIELD_NUMBER: _ClassVar[int]
@@ -37,6 +39,9 @@ class AgentConfig(_message.Message):
37
39
  SETTINGS_FIELD_NUMBER: _ClassVar[int]
38
40
  STORE_WAITS_FIELD_NUMBER: _ClassVar[int]
39
41
  WAIT_SECONDS_FIELD_NUMBER: _ClassVar[int]
42
+ TOMBSTONE_MS_FIELD_NUMBER: _ClassVar[int]
43
+ RETENTION_MIN_MS_FIELD_NUMBER: _ClassVar[int]
44
+ RECHECK_MS_FIELD_NUMBER: _ClassVar[int]
40
45
  prefix: str
41
46
  partitions: int
42
47
  worker: str
@@ -53,7 +58,10 @@ class AgentConfig(_message.Message):
53
58
  settings: _run_pb2.RunSettings
54
59
  store_waits: bool
55
60
  wait_seconds: int
56
- def __init__(self, prefix: _Optional[str] = ..., partitions: _Optional[int] = ..., worker: _Optional[str] = ..., workflows: _Optional[_Iterable[_Union[Served, _Mapping]]] = ..., concurrency: _Optional[int] = ..., claim_ttl_ms: _Optional[int] = ..., claim_skew_ms: _Optional[int] = ..., max_idle_ms: _Optional[int] = ..., due_page: _Optional[int] = ..., due_pages: _Optional[int] = ..., snapshot_every: _Optional[int] = ..., op_retries: _Optional[int] = ..., seed: _Optional[bytes] = ..., settings: _Optional[_Union[_run_pb2.RunSettings, _Mapping]] = ..., store_waits: _Optional[bool] = ..., wait_seconds: _Optional[int] = ...) -> None: ...
61
+ tombstone_ms: int
62
+ retention_min_ms: int
63
+ recheck_ms: int
64
+ def __init__(self, prefix: _Optional[str] = ..., partitions: _Optional[int] = ..., worker: _Optional[str] = ..., workflows: _Optional[_Iterable[_Union[Served, _Mapping]]] = ..., concurrency: _Optional[int] = ..., claim_ttl_ms: _Optional[int] = ..., claim_skew_ms: _Optional[int] = ..., max_idle_ms: _Optional[int] = ..., due_page: _Optional[int] = ..., due_pages: _Optional[int] = ..., snapshot_every: _Optional[int] = ..., op_retries: _Optional[int] = ..., seed: _Optional[bytes] = ..., settings: _Optional[_Union[_run_pb2.RunSettings, _Mapping]] = ..., store_waits: _Optional[bool] = ..., wait_seconds: _Optional[int] = ..., tombstone_ms: _Optional[int] = ..., retention_min_ms: _Optional[int] = ..., recheck_ms: _Optional[int] = ...) -> None: ...
57
65
 
58
66
  class ReplayEnd(_message.Message):
59
67
  __slots__ = ("idle", "dropped")
@@ -0,0 +1,86 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
4
+ # source: substantial/boundary/v1/plan.proto
5
+ # Protobuf Python Version: 7.36.2
6
+ """Generated protocol buffer code."""
7
+ from google.protobuf import descriptor as _descriptor
8
+ from google.protobuf import descriptor_pool as _descriptor_pool
9
+ from google.protobuf import runtime_version as _runtime_version
10
+ from google.protobuf import symbol_database as _symbol_database
11
+ from google.protobuf.internal import builder as _builder
12
+ _runtime_version.ValidateProtobufRuntimeVersion(
13
+ _runtime_version.Domain.PUBLIC,
14
+ 7,
15
+ 36,
16
+ 2,
17
+ '',
18
+ 'substantial/boundary/v1/plan.proto'
19
+ )
20
+ # @@protoc_insertion_point(imports)
21
+
22
+ _sym_db = _symbol_database.Default()
23
+
24
+
25
+ from substantial.boundary.v1 import boundary_pb2 as substantial_dot_boundary_dot_v1_dot_boundary__pb2
26
+ from substantial.layout.v1 import layout_pb2 as substantial_dot_layout_dot_v1_dot_layout__pb2
27
+
28
+
29
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"substantial/boundary/v1/plan.proto\x12\x17substantial.boundary.v1\x1a&substantial/boundary/v1/boundary.proto\x1a\"substantial/layout/v1/layout.proto\"\xbd\x03\n\tPlanInput\x12\x31\n\x04send\x18\x01 \x01(\x0b\x32!.substantial.boundary.v1.SendPlanH\x00\x12\x35\n\x06\x63reate\x18\x02 \x01(\x0b\x32#.substantial.boundary.v1.CreatePlanH\x00\x12\x31\n\x04open\x18\x03 \x01(\x0b\x32!.substantial.boundary.v1.OpenPlanH\x00\x12\x33\n\x05start\x18\x04 \x01(\x0b\x32\".substantial.boundary.v1.StartPlanH\x00\x12\x35\n\x06result\x18\x05 \x01(\x0b\x32#.substantial.boundary.v1.ResultPlanH\x00\x12\x35\n\x06status\x18\x06 \x01(\x0b\x32#.substantial.boundary.v1.StatusPlanH\x00\x12\x35\n\x06\x63\x61ncel\x18\x07 \x01(\x0b\x32#.substantial.boundary.v1.CancelPlanH\x00\x12\x31\n\x04read\x18\x08 \x01(\x0b\x32!.substantial.boundary.v1.ReadPlanH\x00\x42\x06\n\x04plan\"\xbb\x01\n\x08SendPlan\x12\x0e\n\x06prefix\x18\x01 \x01(\t\x12\x12\n\npartitions\x18\x02 \x01(\r\x12\r\n\x05\x63hain\x18\x03 \x01(\t\x12\x0c\n\x04name\x18\x04 \x01(\t\x12+\n\x05value\x18\x05 \x01(\x0b\x32\x1c.substantial.layout.v1.Value\x12\n\n\x02id\x18\x06 \x01(\t\x12(\n\x03now\x18\x07 \x01(\x0b\x32\x1b.substantial.layout.v1.Time\x12\x0b\n\x03ord\x18\x08 \x01(\t\"6\n\nCreatePlan\x12\x0e\n\x06prefix\x18\x01 \x01(\t\x12\x12\n\npartitions\x18\x02 \x01(\rJ\x04\x08\x03\x10\x04\" \n\x08OpenPlan\x12\x0e\n\x06prefix\x18\x01 \x01(\tJ\x04\x08\x02\x10\x03\"\xc6\x01\n\tStartPlan\x12\x0e\n\x06prefix\x18\x01 \x01(\t\x12\x12\n\npartitions\x18\x02 \x01(\r\x12\x10\n\x08workflow\x18\x03 \x01(\t\x12\x14\n\x07version\x18\x04 \x01(\rH\x00\x88\x01\x01\x12+\n\x05input\x18\x05 \x01(\x0b\x32\x1c.substantial.layout.v1.Value\x12\n\n\x02id\x18\x06 \x01(\t\x12(\n\x03now\x18\x07 \x01(\x0b\x32\x1b.substantial.layout.v1.TimeB\n\n\x08_version\"Y\n\nResultPlan\x12\x0e\n\x06prefix\x18\x01 \x01(\t\x12\x12\n\npartitions\x18\x02 \x01(\r\x12\r\n\x05\x63hain\x18\x03 \x01(\t\x12\x10\n\x03run\x18\x04 \x01(\tH\x00\x88\x01\x01\x42\x06\n\x04_run\"i\n\nStatusPlan\x12\x0e\n\x06prefix\x18\x01 \x01(\t\x12\x12\n\npartitions\x18\x02 \x01(\r\x12\r\n\x05\x63hain\x18\x03 \x01(\t\x12(\n\x03now\x18\x04 \x01(\x0b\x32\x1b.substantial.layout.v1.Time\"\x92\x01\n\nCancelPlan\x12\x0e\n\x06prefix\x18\x01 \x01(\t\x12\x12\n\npartitions\x18\x02 \x01(\r\x12\r\n\x05\x63hain\x18\x03 \x01(\t\x12\x0e\n\x06reason\x18\x04 \x01(\t\x12\n\n\x02id\x18\x05 \x01(\t\x12(\n\x03now\x18\x06 \x01(\x0b\x32\x1b.substantial.layout.v1.Time\x12\x0b\n\x03ord\x18\x07 \x01(\t\"J\n\x08ReadPlan\x12\x0e\n\x06prefix\x18\x01 \x01(\t\x12\x12\n\npartitions\x18\x02 \x01(\r\x12\r\n\x05\x63hain\x18\x03 \x01(\t\x12\x0b\n\x03key\x18\x04 \x01(\t\"{\n\x0bPlanRequest\x12.\n\x04next\x18\x01 \x01(\x0b\x32\x1e.substantial.boundary.v1.EmptyH\x00\x12\x31\n\x04\x66\x65\x65\x64\x18\x02 \x01(\x0b\x32!.substantial.boundary.v1.OpResultH\x00\x42\t\n\x07request\"?\n\x07NoChain\x12\x34\n\x0f\x63ollected_until\x18\x01 \x01(\x0b\x32\x1b.substantial.layout.v1.Time\"A\n\tRunExists\x12\x34\n\x0f\x63ollected_until\x18\x01 \x01(\x0b\x32\x1b.substantial.layout.v1.Time\"\x92\x02\n\x04Sent\x12\x12\n\x08\x61\x63\x63\x65pted\x18\x01 \x01(\tH\x00\x12\x38\n\x07refused\x18\x02 \x01(\x0b\x32%.substantial.boundary.v1.Sent.RefusedH\x00\x12\x34\n\x08no_chain\x18\x03 \x01(\x0b\x32 .substantial.boundary.v1.NoChainH\x00\x12\x37\n\x06\x66\x61iled\x18\x04 \x01(\x0b\x32%.substantial.boundary.v1.StoreFailureH\x00\x1a\x45\n\x07Refused\x12\x0b\n\x03run\x18\x01 \x01(\t\x12-\n\x06status\x18\x02 \x01(\x0e\x32\x1d.substantial.layout.v1.StatusB\x06\n\x04sent\"y\n\x06Opened\x12\x14\n\npartitions\x18\x01 \x01(\rH\x00\x12\x16\n\x0clayout_error\x18\x02 \x01(\tH\x00\x12\x37\n\x06\x66\x61iled\x18\x03 \x01(\x0b\x32%.substantial.boundary.v1.StoreFailureH\x00\x42\x08\n\x06opened\"\xee\x01\n\x07Started\x12\x31\n\x07\x63reated\x18\x01 \x01(\x0b\x32\x1e.substantial.boundary.v1.EmptyH\x00\x12\x32\n\x08\x65xisting\x18\x02 \x01(\x0b\x32\x1e.substantial.boundary.v1.EmptyH\x00\x12\x38\n\nrun_exists\x18\x03 \x01(\x0b\x32\".substantial.boundary.v1.RunExistsH\x00\x12\x37\n\x06\x66\x61iled\x18\x04 \x01(\x0b\x32%.substantial.boundary.v1.StoreFailureH\x00\x42\t\n\x07started\"\xf9\x02\n\tRunResult\x12\x39\n\x05\x65nded\x18\x01 \x01(\x0b\x32(.substantial.boundary.v1.RunResult.EndedH\x00\x12\x34\n\x08no_chain\x18\x03 \x01(\x0b\x32 .substantial.boundary.v1.NoChainH\x00\x12\x37\n\x06\x66\x61iled\x18\x04 \x01(\x0b\x32%.substantial.boundary.v1.StoreFailureH\x00\x12@\n\tnot_ended\x18\x05 \x01(\x0b\x32+.substantial.boundary.v1.RunResult.NotEndedH\x00\x1a\x43\n\x05\x45nded\x12\x0b\n\x03run\x18\x01 \x01(\t\x12-\n\x06result\x18\x02 \x01(\x0b\x32\x1d.substantial.layout.v1.Result\x1a+\n\x08NotEnded\x12\x0b\n\x03run\x18\x01 \x01(\t\x12\x12\n\nresult_key\x18\x02 \x01(\tB\x08\n\x06resultJ\x04\x08\x02\x10\x03\"\x81\x02\n\x08RunState\x12\x36\n\x06status\x18\x01 \x01(\x0b\x32$.substantial.boundary.v1.RunState.OfH\x00\x12\x34\n\x08no_chain\x18\x02 \x01(\x0b\x32 .substantial.boundary.v1.NoChainH\x00\x12\x37\n\x06\x66\x61iled\x18\x03 \x01(\x0b\x32%.substantial.boundary.v1.StoreFailureH\x00\x1a\x45\n\x02Of\x12\x0b\n\x03run\x18\x01 \x01(\t\x12\x32\n\x06status\x18\x02 \x01(\x0e\x32\".substantial.boundary.v1.RunStatusB\x07\n\x05state\"\xab\x01\n\tReadValue\x12-\n\x05value\x18\x01 \x01(\x0b\x32\x1c.substantial.layout.v1.ValueH\x00\x12.\n\x04none\x18\x02 \x01(\x0b\x32\x1e.substantial.boundary.v1.EmptyH\x00\x12\x37\n\x06\x66\x61iled\x18\x03 \x01(\x0b\x32%.substantial.boundary.v1.StoreFailureH\x00\x42\x06\n\x04read\"\xfb\x02\n\x08PlanStep\x12\x31\n\x05store\x18\x01 \x01(\x0b\x32 .substantial.boundary.v1.StoreOpH\x00\x12-\n\x04sent\x18\x02 \x01(\x0b\x32\x1d.substantial.boundary.v1.SentH\x00\x12\x31\n\x06opened\x18\x03 \x01(\x0b\x32\x1f.substantial.boundary.v1.OpenedH\x00\x12\x33\n\x07started\x18\x04 \x01(\x0b\x32 .substantial.boundary.v1.StartedH\x00\x12\x34\n\x06result\x18\x05 \x01(\x0b\x32\".substantial.boundary.v1.RunResultH\x00\x12\x33\n\x06status\x18\x06 \x01(\x0b\x32!.substantial.boundary.v1.RunStateH\x00\x12\x32\n\x04read\x18\x07 \x01(\x0b\x32\".substantial.boundary.v1.ReadValueH\x00\x42\x06\n\x04step\"\xb2\x01\n\x0cPlanResponse\x12\x33\n\x05\x65rror\x18\x01 \x01(\x0b\x32\".substantial.boundary.v1.CoreErrorH\x00\x12\x31\n\x04step\x18\x02 \x01(\x0b\x32!.substantial.boundary.v1.PlanStepH\x00\x12.\n\x04\x64one\x18\x03 \x01(\x0b\x32\x1e.substantial.boundary.v1.EmptyH\x00\x42\n\n\x08response*\xd8\x01\n\tRunStatus\x12\x1a\n\x16RUN_STATUS_UNSPECIFIED\x10\x00\x12\x16\n\x12RUN_STATUS_PENDING\x10\x01\x12\x16\n\x12RUN_STATUS_RUNNING\x10\x02\x12\x18\n\x14RUN_STATUS_SUSPENDED\x10\x03\x12\x18\n\x14RUN_STATUS_COMPLETED\x10\x04\x12\x15\n\x11RUN_STATUS_FAILED\x10\x05\x12\x18\n\x14RUN_STATUS_CANCELLED\x10\x06\"\x04\x08\x07\x10\x07*\x14RUN_STATUS_CONTINUEDb\x06proto3')
30
+
31
+ _globals = globals()
32
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
33
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'substantial.boundary.v1.plan_pb2', _globals)
34
+ if not _descriptor._USE_C_DESCRIPTORS:
35
+ DESCRIPTOR._loaded_options = None
36
+ _globals['_RUNSTATUS']._serialized_start=3767
37
+ _globals['_RUNSTATUS']._serialized_end=3983
38
+ _globals['_PLANINPUT']._serialized_start=140
39
+ _globals['_PLANINPUT']._serialized_end=585
40
+ _globals['_SENDPLAN']._serialized_start=588
41
+ _globals['_SENDPLAN']._serialized_end=775
42
+ _globals['_CREATEPLAN']._serialized_start=777
43
+ _globals['_CREATEPLAN']._serialized_end=831
44
+ _globals['_OPENPLAN']._serialized_start=833
45
+ _globals['_OPENPLAN']._serialized_end=865
46
+ _globals['_STARTPLAN']._serialized_start=868
47
+ _globals['_STARTPLAN']._serialized_end=1066
48
+ _globals['_RESULTPLAN']._serialized_start=1068
49
+ _globals['_RESULTPLAN']._serialized_end=1157
50
+ _globals['_STATUSPLAN']._serialized_start=1159
51
+ _globals['_STATUSPLAN']._serialized_end=1264
52
+ _globals['_CANCELPLAN']._serialized_start=1267
53
+ _globals['_CANCELPLAN']._serialized_end=1413
54
+ _globals['_READPLAN']._serialized_start=1415
55
+ _globals['_READPLAN']._serialized_end=1489
56
+ _globals['_PLANREQUEST']._serialized_start=1491
57
+ _globals['_PLANREQUEST']._serialized_end=1614
58
+ _globals['_NOCHAIN']._serialized_start=1616
59
+ _globals['_NOCHAIN']._serialized_end=1679
60
+ _globals['_RUNEXISTS']._serialized_start=1681
61
+ _globals['_RUNEXISTS']._serialized_end=1746
62
+ _globals['_SENT']._serialized_start=1749
63
+ _globals['_SENT']._serialized_end=2023
64
+ _globals['_SENT_REFUSED']._serialized_start=1946
65
+ _globals['_SENT_REFUSED']._serialized_end=2015
66
+ _globals['_OPENED']._serialized_start=2025
67
+ _globals['_OPENED']._serialized_end=2146
68
+ _globals['_STARTED']._serialized_start=2149
69
+ _globals['_STARTED']._serialized_end=2387
70
+ _globals['_RUNRESULT']._serialized_start=2390
71
+ _globals['_RUNRESULT']._serialized_end=2767
72
+ _globals['_RUNRESULT_ENDED']._serialized_start=2639
73
+ _globals['_RUNRESULT_ENDED']._serialized_end=2706
74
+ _globals['_RUNRESULT_NOTENDED']._serialized_start=2708
75
+ _globals['_RUNRESULT_NOTENDED']._serialized_end=2751
76
+ _globals['_RUNSTATE']._serialized_start=2770
77
+ _globals['_RUNSTATE']._serialized_end=3027
78
+ _globals['_RUNSTATE_OF']._serialized_start=2949
79
+ _globals['_RUNSTATE_OF']._serialized_end=3018
80
+ _globals['_READVALUE']._serialized_start=3030
81
+ _globals['_READVALUE']._serialized_end=3201
82
+ _globals['_PLANSTEP']._serialized_start=3204
83
+ _globals['_PLANSTEP']._serialized_end=3583
84
+ _globals['_PLANRESPONSE']._serialized_start=3586
85
+ _globals['_PLANRESPONSE']._serialized_end=3764
86
+ # @@protoc_insertion_point(module_scope)