πdag
Struct OverDAG
Capability witness for migration and identity replacement of one [DAG].
Struct DAG
A directed acyclic graph (DAG) is a collection of [Vertex]s and [Edge]s that describe how to walk the graph.
Struct DAGInnerV1
Version one stored layout for [DAG].
The stable [DAG] cannot contain these fields because its published layout must remain unchanged while stored data evolves.
Struct DAGCreatedEvent
Emitted when a new DAG is created.
Struct DAGVertexAddedEvent
Emitted when a vertex is added to a DAG.
Struct DAGEntryVertexInputPortAddedEvent
Emitted when an entry input port is added to a vertex within an entry group.
Struct DAGEdgeAddedEvent
Emitted when an edge is added to a DAG.
Struct DAGOutputAddedEvent
Emitted when an output is added to a vertex in a DAG.
Struct DAGDefaultValueAddedEvent
Emitted when a default value is added to a vertex input port in a DAG.
Struct DAGFinalizedEvent
Emitted when a DAG becomes an immutable execution contract.
Constants
Function new
Creates a new empty DAG and returns its bound owner capability.
Function new_with_owner_cap
Alias for [new] that makes capability custody explicit at call sites.
Function finalize
Consumes construction authority and freezes this DAG as an immutable promise.
Any cloned owner capabilities become inert because a frozen object can never be passed by mutable reference. Callers should complete Tool registration and Agent skill binding before this transition.
Function add_vertex
Adds one vertex already bound to its registered Tool ID and immutable schema.
Tool Registry is the active caller because it owns the authoritative registration mapping.
Function with_post_failure_action
Configures the DAG-wide default post-failure action.
Runtime precedence is vertex override, then DAG default, then implicit Terminate.
Function with_vertex_post_failure_action
Configures the vertex-level post-failure action override.
Runtime precedence is vertex override, then DAG default, then implicit Terminate.
Function set_vertex_verifier_mode
Selects the verifier for one offchain vertex. New vertices default to None.
Function with_entry_port
Add a new input port to the vertex which has to be provided by the client when they begin execution with the default entry group.
Function with_entry_port_in_group
Add a new input port to the vertex which has to be provided by the client when they begin execution with the provided entry group.
An entry input is a dynamic source. The port cannot already have a default value or an incoming edge; the same constraint applies whichever construction call comes first.
Function with_entry
Use this after [add_vertex] to add that vertex to the default entry group.
See also [with_entry_in_group]
Function with_entry_in_group
Use this after [add_vertex] to add that vertex to the given entry group.
Special case for vertices that are meant to have no input ports and should be executed as soon as the execution begins.
[begin_execution] will start execution of this vertex only if it has no input ports.
Function with_edge
Adds a new edge to the DAG. The caller must ensure all constraints required by the workflow engine are upheld.
Function with_output
Adds a new output to the DAG.
Function with_default_value
The input port must not have a dynamic input source. A default excludes both an incoming edge and an entry input, regardless of construction order. Compatible multiple edge routes remain allowed where the edge shape permits them.
Function rebuild
Consumes the input [DAG] and returns a copy of it with a new ID.
This is useful if you want to build a [DAG] over multiple txs or ahead of time.
The [DAG] can be an owned object only to be rebuilt and shared at a more convenient time.
(On Sui an object can be shared only in the tx that created it.)
Function is_finalized
Returns whether construction authority has been closed for this DAG.
Function assert_finalized
Requires the DAG to be an immutable execution contract.
Function assert_dag_owner
Assert that owner controls this [DAG].
Function dag_vertex_tool_fqn
Returns the fully qualified tool name of the given vertex.
Aborts with EVertexNotFound if the vertex does not exist in the DAG.
Function vertex_count
Returns the number of vertices in the DAG.
Function has_vertex
Returns true if the DAG contains the given vertex.
Function is_vertex_onchain_tool
Returns whether the vertex uses an on-chain Tool.
Function dag_runtime_vertex_tool_fqn
Returns the fully qualified tool name of the given runtime vertex.
Aborts with EVertexNotFound if the vertex does not exist in the DAG.
Function dag_vertex_tool_id
Returns the stable Tool object ID pinned to a DAG vertex.
Function dag_vertex_meta_schema
Returns the immutable Tool interface bound to a DAG vertex.
Function dag_vertex_verifier_mode
Returns the verifier selected for an offchain vertex.
Function dag_vertex_post_failure_action
Returns the post-failure action configured for a DAG vertex.
Function has_entry_group
Returns true if the DAG contains the given entry group.
Function entry_group_vertex_count
Returns the number of vertices in an entry group.
Function is_entry_group_vertex
Returns whether an entry group contains a vertex.
Function entry_group_vertex_port_count
Returns the number of required ports for one entry vertex.
Function is_entry_group_vertex_port
Returns whether an entry vertex requires a port.
Function default_value_for_input
Returns the default value configured for a vertex input port, or none if there is none.
Function effective_input_payload_sha256
Returns the SHA-256 hash of a vertex's effective input payload, or an empty vector if any input port has no value.
Function vertex_input_ports_len
Returns the number of input ports on the given vertex.
Aborts with EVertexNotFound if the vertex does not exist in the DAG.
Function sorted_input_ports_for_vertex
Returns the input ports of the given vertex in sorted order.
Aborts with EVertexNotFound if the vertex does not exist in the DAG.
Function is_vertex_offchain_tool
Returns whether the vertex uses an off-chain Tool.
Aborts with EVertexNotFound if the vertex does not exist in the DAG.
Function vertex_tool_fqns
Returns the fully qualified tool names of all vertices in the DAG.
Function vertex_names
Returns the names of all vertices in linked-table order.
Function has_edges_from
Returns true if the vertex has any outgoing edges.
Function has_outgoing_edges_for_variant
Returns true if the vertex has an outgoing edge originating from the given output variant.
Function edges_from
Returns the outgoing edges of the given vertex.
Aborts if the vertex has no outgoing edges.
Function resolve_err_eval_failure_policy
Resolve _err_eval failure policy from DAG policy and evidence kind.
Function err_eval_record_outcome_for_variant
Return the _err_eval outcome that matches the current output variant.
Last updated

