kestrel-feature-workflows
First-class agent workflow orchestration for Kestrel Sovereign.
The package also installs a host-scoped WorkflowsHostFeature that owns the
durable, engine-neutral operator run plane. It registers the public SDK
RunService at host scope as workflows.runs version 1.0.0, persists
accepted launches and their recovery outbox in the host database, and exposes
a fenced producer lifecycle for installed execution features. The run plane
does not add HTTP routes or engine-specific fields.
Absolute artifact links fail closed unless their exact HTTPS origins are
listed in the package-owned KESTREL_WORKFLOWS_ARTIFACT_ORIGINS environment
variable as a JSON array, for example
["https://artifacts.example.com","https://cdn.example.com:8443"]. Entries
must be exact HTTPS origins: paths, queries, fragments, credentials, and
non-HTTPS URLs are rejected. The value is limited to 16 KiB, 100 origins, and
2,048 characters per origin. Canonical /authorized/artifacts/<artifact_id>
links remain same-origin and need no allowlist entry.
Alternate hosts may instead provide the existing
workflows.artifact_origins context mapping. If both sources are present,
their normalized origin sets must be identical or host-feature startup fails;
otherwise the environment source is used when set. Malformed values fail
startup without logging their contents.
Workflows is orchestration on top of the existing Signal Dispatcher. Stages
dispatch signals (ACTION / ARTIFACT / COGNITION); durability, dedupe,
locks, causation tracking, retention, and redaction all come from the
dispatcher. Workflows adds what the dispatcher lacks: multi-stage sequencing and
fan-out, per-stage gates (including an adversarial red_team_clear gate),
reverse-order saga compensation, a cancellation barrier, DID-signed versioned
workflow definitions, and constitutional-boundary enforcement.
Execution is lease-owned: runnable runs and open stage/compensation attempts are atomically claimed by an executor and heartbeated. Recovery reuses the persisted attempt idempotency key and dispatch linkage; it advances confirmed effects, never reruns completed stages, and fails safely when an external effect cannot be determined. This provides exactly-once workflow transitions and at-most-once effects where downstream idempotency supports it, not a blanket exactly-once guarantee for arbitrary external systems.
Installation
uv pip install kestrel-feature-workflows
The package registers WorkflowsFeature through kestrel_sovereign.features
and WorkflowsHostFeature through kestrel_sovereign.host_features.
Operator Runs API and console
Workflows 0.5.0 exposes its durable, engine-neutral run plane at
/api/workflows/runs. Authenticated operators can page and filter run records,
inspect stages, numbered attempts, typed external job correlations, and
artifact metadata, apply pause/resume/cancel/retry controls with idempotency and
sequence preconditions, and follow one authorized run through a polling-backed
SSE stream. Cross-tenant and absent identifiers share the same not-found
response, and artifact dereference returns metadata only.
WorkflowsHostFeature also contributes the capability-gated Runs panel to
the Console from package-owned JavaScript and CSS. The panel uses authenticated
streaming with polling fallback, renders generic SDK fields only, and offers an
optional correlation handoff to an installed Observability panel.
In zero-config solo mode, the HTTP surface grants operator access only to the
Sovereign API-key caller. A generic authenticated OAuth/JWT caller receives no
implicit owner or control rights, even when it shares the default tenant.
OAuth/Castle deployments must inject a policy-owned
workflows.operator_context_resolver (under the host workflows configuration
mapping) that returns the SDK OperatorContext authorized for that request.
The host-provided resolver, rather than the fallback, is responsible for user,
tenant, boundary, capability, action, and expiry policy.
The HTTP and Console surfaces intentionally do not launch runs. Launch remains
the feature-owned RunService.launch_run boundary used by installed execution
features, where source attribution, target boundaries, capabilities, tenancy,
and idempotency are authorized before acceptance. No Talon-, Eye-, Flight-,
repository-, command-, or filesystem-specific fields are part of this API.
Development
uv sync --extra test
uv run --extra test pytest -q
npm test
Design
See docs/architecture/WORKFLOWS_FEATURE_DESIGN.md (v4.1) and
WORKFLOWS_DEVELOPER_GUIDE.md in the kestrel-sovereign repository for the full
design and the stage-to-signal reduction.
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 kestrel_feature_workflows-0.5.0.tar.gz.
File metadata
- Download URL: kestrel_feature_workflows-0.5.0.tar.gz
- Upload date:
- Size: 427.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e728c11227ef342d12ce436070d4879f3d96cfde1140102e3f63341f78de35e
|
|
| MD5 |
556297f747d921ed3b673cbc4dc3c02b
|
|
| BLAKE2b-256 |
8b31f0fbe1308d61f6272a62e274fbe17761765f806ebfe3239473dff6f233d5
|
Provenance
The following attestation bundles were made for kestrel_feature_workflows-0.5.0.tar.gz:
Publisher:
publish.yml on KestrelSovereignAI/kestrel-feature-workflows
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kestrel_feature_workflows-0.5.0.tar.gz -
Subject digest:
0e728c11227ef342d12ce436070d4879f3d96cfde1140102e3f63341f78de35e - Sigstore transparency entry: 2437285555
- Sigstore integration time:
-
Permalink:
KestrelSovereignAI/kestrel-feature-workflows@cc6ef49d473a5c8af919642e003ff573dbd54341 -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/KestrelSovereignAI
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@cc6ef49d473a5c8af919642e003ff573dbd54341 -
Trigger Event:
push
-
Statement type:
File details
Details for the file kestrel_feature_workflows-0.5.0-py3-none-any.whl.
File metadata
- Download URL: kestrel_feature_workflows-0.5.0-py3-none-any.whl
- Upload date:
- Size: 141.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f23d6e1b93ef3e306eef4ae13f0613cc8cccffb8415707141e6c2f0dc63d052a
|
|
| MD5 |
1ec3ae839e940e9825c36ece37bde3cc
|
|
| BLAKE2b-256 |
7c4885c7b0a6cef6e98d9303375e37fbf8565fbfd9beccc4bb8857a80b2dde64
|
Provenance
The following attestation bundles were made for kestrel_feature_workflows-0.5.0-py3-none-any.whl:
Publisher:
publish.yml on KestrelSovereignAI/kestrel-feature-workflows
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kestrel_feature_workflows-0.5.0-py3-none-any.whl -
Subject digest:
f23d6e1b93ef3e306eef4ae13f0613cc8cccffb8415707141e6c2f0dc63d052a - Sigstore transparency entry: 2437285785
- Sigstore integration time:
-
Permalink:
KestrelSovereignAI/kestrel-feature-workflows@cc6ef49d473a5c8af919642e003ff573dbd54341 -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/KestrelSovereignAI
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@cc6ef49d473a5c8af919642e003ff573dbd54341 -
Trigger Event:
push
-
Statement type: