Skip to main content

Module wire

Module wire 

Source

Structs§

AccountId
Represents a Golem account
AgentId
Represents a Golem agent
BinaryRestrictions
BinaryValuePayload
CardId
Represents a Golem permission card
ComponentId
============================================================ Platform identifiers
CustomToolError
A declared tool failure shared by invocation and oplog interfaces.
Datetime
DurationValuePayload
Signed duration as total nanoseconds.
EnvironmentId
FieldDiscriminator
FixedListSpec
MapEntry
MapSpec
Map key types are restricted to primitives. Enforced at schema construction time, not by the WIT type itself.
MetadataEnvelope
Typed metadata envelope. Holds non-validation, non-rendering-critical information (docs, aliases, examples, deprecation, role). Per-scalar validation constraints live on the relevant scalar’s typed substructure, not here.
NamedFieldType
NumericRestrictions
Inline numeric refinement. none on a numeric type means unconstrained (the common case). The empty restriction set is never encoded as some: producers normalize it to none, decoders normalize a decoded empty to none. unit is schema/help metadata only.
PathSpec
PermissionCard
An unforgeable handle to a permission card held by the runtime. The handle is opaque to guests: components can hold, pass, derive, install, and revoke cards only through the golem:permissions interfaces. When carried in a schema-value-tree (see schema-value-node::permission-card-handle) the handle is transferred by ownership; the host converts it to/from its internal trusted card-store representation at the boundary. The wire form is the card-id (UUID) alone — no grants, parents, or metadata cross the wire as authority.
PermissionCardSpec
PromiseId
A promise ID is a value that can be passed to an external Golem API to complete that promise from an arbitrary external source, while Golem agents can await for this completion.
QuantitySpec
QuantityValue
— Quantity — Fixed-point decimal value with unit: numeric value = mantissa * 10^(-scale). unit is a free-form string at the value level; the schema’s quantity-spec constrains the accepted set.
QuotaToken
============================================================ Capability resources
QuotaTokenSpec
ResultSpec
SchemaGraph
============================================================ Schema graph (self-contained type carrier)
SchemaTypeDef
A named type definition inside a schema-graph.
SchemaTypeNode
============================================================ Schema type
SchemaValueStream
An affine wrapper around a native Component Model stream of schema values. The indirection lets a stream occur anywhere in a recursive schema-value-tree while preserving the native stream endpoint.
SchemaValueTree
============================================================ Schema value (always paired with a schema-graph)
Secret
An unforgeable handle to sensitive material held by the runtime. The handle is opaque to guests: components can pass it through schema values and reveal it only through capability-gated host interfaces.
SecretSpec
— Capability nodes —
TextRestrictions
— Text / Binary restrictions —
TextValuePayload
TypedSchemaValue
============================================================ Wire carriers
UnionBranch
UnionSpec
— Discriminated union —
UnionValuePayload
UrlRestrictions
— URL —
Uuid
============================================================ Common embedded value types
VariantCaseType
VariantValuePayload

Enums§

DiscriminatorRule
How the decoder identifies that a value belongs to a given union branch.
NumericBound
— Numeric restrictions — A numeric bound usable across every numeric representation. Float bounds carry canonical IEEE-754 f64 bits (NaN/inf rejected, -0.0 normalized); comparisons decode the bits to f64 and compare numerically.
PathDirection
— Path —
PathKind
ResultValuePayload
Result payload: exactly one of ok-value / err-value is set. Each inner option allows result<_, _> cases whose ok/err type is unit (no payload).
Role
Open registry; unknown roles fall back to structural handling.
SchemaTypeBody
The structural body of a schema-type-node.
SchemaValueNode
ToolError
ToolRpcError

Functions§

parse_uuid
Parses a UUID from a string
uuid_to_string
Converts a UUID to a string

Type Aliases§

DefIndex
Index into a schema-graph’s defs list.
OplogIndex
An index into the persistent log storing all performed operations of an agent
TypeId
Stable, language-independent identifier for a named type definition. Must be unique within the enclosing schema-graph. Conventional format is a dot-separated namespace path (e.g., "myapp.users.user"). Each SDK provides a default derivation rule (typically based on the local language’s type name); cross-language interop requires the same type-id on every side, which users can pin via the SDK’s named attribute.
TypeNodeIndex
============================================================ Carrier indices
ValueNodeIndex
Index into a schema-value-tree’s value-nodes list.