Grain's published workflow vocabulary — protocol, run, gate, artifact, stop_reason.
Project description
grain-contracts
Grain owns the workflow capability, so Grain publishes the words for it: protocol, run, gate,
artifact, stop_reason.
This distribution carries only those types, with zero dependencies, so a service can speak
Grain's vocabulary without installing Grain's CLI. grain-kit re-exports the same types from
grain.contracts.workflow. Anything that wants to talk about a Grain workflow — a Postgres-backed
Missions runtime, an agent driving Grain headlessly — imports these types rather than inventing a
parallel set that drifts.
from grain_contracts.workflow import Run, StepRecord, Gate, RunStatus, StopReason
run = Run.from_dict(payload) # payload is a grain.workflow-run/v1 mapping
if run.status is RunStatus.AWAITING_GATE:
...
Types only. No reducer, no store, no I/O — contracts share types, not code. The storage-agnostic
run store and the pure advance() reducer are a separate promise, published as their own package.
Source and issues · MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file grain_contracts-0.1.0.tar.gz.
File metadata
- Download URL: grain_contracts-0.1.0.tar.gz
- Upload date:
- Size: 8.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2f8f5adac8c518fc5fda75ab8815581c5b4017574ab5e171209ad05377503e41
|
|
| MD5 |
d5694365187fa4682f475b6028c4aaef
|
|
| BLAKE2b-256 |
1a769f61391969425c0b7f5d61bf2e10e83e757f9f8041f37e39302dc8251abe
|
File details
Details for the file grain_contracts-0.1.0-py3-none-any.whl.
File metadata
- Download URL: grain_contracts-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1137366ce245c9c7ed7b71e2491e76555e9e9434febb26e4c514566065a35c8c
|
|
| MD5 |
05ecbe159796b016e0993bc245f5e96a
|
|
| BLAKE2b-256 |
f2e85fc9c41313b939132ec83ec25c414d3c179719d591c802f2eb144ca67c75
|