Skip to main content

Crate stateknot

Crate stateknot 

Source
Expand description

§StateKnot

Durable agent orchestration for Rust.

The facade exposes the implementation-backed core contracts, executable graph runtime, and PostgreSQL 16/17 durability provider under explicit modules. The project remains pre-alpha: these modules are usable for the current vertical validation slice, but they are not a stable compatibility promise. See the project repository for the current status, architecture plan, and roadmap.

Re-exports§

pub use stateknot_artifact_store as artifacts;
pub use stateknot_core as core;
pub use stateknot_integrations as integrations;
pub use stateknot_runtime as runtime;
pub use stateknot_store_postgres as postgres;

Modules§

agent_host
Concrete ownership of co-located ingress, execution and maintenance roles. Experimental concrete owner for co-located HTTP, Worker and maintenance roles. Does not install OS signal handlers, public health routes or schema migrations.
agent_http
Authenticated, bounded HTTP v1 ingress for durable Agent operations. Authenticated JSON HTTP v1 and opt-in activity SSE over the durable Agent service. No constructor starts a listener, scheduler or provider. TLS, credential verification, replica-wide ingress quotas and worker deployment are explicit host responsibilities. Activity SSE is opt-in; stable release acceptance is separate.
agent_maintenance
Independently owned deadline, child, Join and failure-close maintenance. Owned, bounded maintenance over the existing durable Agent state machines. No node execution, implicit migrations, retention, pool closure or public routes.
agent_worker
Independently owned, bounded durable scheduling Worker lifecycle. Owned execution role over the existing fenced PostgreSQL schedulers. Hosts separately operate ingress, reconcilers, credential/configuration distribution and an OS supervisor. No migrations or public routes are added.
in_process_agent
Strongly typed in-process execution over the durable service and owned roles. Strongly typed, HTTP-free Agent execution that preserves durable admission, authorization, PostgreSQL recovery, Worker fencing, and maintenance roles.

Structs§

McpComputeNode
MCP-backed pure Graph computation without Worker database credentials.
McpComputeNodeBinding
Immutable, operator-reviewed binding for a repeatable, effect-free Worker.
McpErrorReconciliationRequest
Closed v1 failure-evidence request, without retry, usage or provenance authority. Retain every field and both IDs across lost responses. The evidence policy must approve the failure message for public Run/Agent surfaces before granting access.
McpReconciliationGrant
Trusted policy decision and authenticated subject-to-tenant mapping.
McpReconciliationRequest
Closed wire request. Identity, fence, policy and schemas are host-selected. Retain these exact values and the event ID when the response is lost.
McpToolErrorReconciler
Privileged MCP Tool that resolves Unknown to Failed without dispatching a provider.
McpToolReconciler
A privileged control-plane MCP Tool; expose only on an authenticated endpoint.
WorkerInputProjection
Explicit top-level state fields that a compute Worker may receive.
WorkerInputProjectionError
Invalid, duplicate or excessive projection field selection.

Enums§

McpComputeNodeBuildError
Public-safe startup failure; never includes a remote payload or credential.
McpComputeOutput
Host-selected interpretation of a Worker’s structured JSON result.
McpKnownToolEffect
Authoritatively resolved write effect; uncertainty cannot enter this profile. Neither variant proves that the provider charged nothing or that retry is safe.
McpReconciliationError
Closed, payload-safe ingress failures. No raw SQL/provider error is exposed.

Traits§

McpErrorReconciliationAuthorizer
Mandatory failure/effect evidence policy, independent of success-result authority. Authenticate the namespaced subject, map tenant/principal, check this exact resource and authoritative effect evidence, and approve the public message. Deny partial/uncertain effects; a Worker claim or HTTP status is not evidence. Runs before every database lookup, including duplicate receipt recovery.
McpReconciliationAuthorizer
Mandatory resource- and evidence-aware authorization, before any DB lookup.

Functions§

mcp_compute_tool_digest
Computes the SHA-256 pin of a reviewed MCP Tool’s complete RFC 8785 descriptor. Obtain the descriptor through a trusted release process, not trust-on-first-use against a running Worker.