Skip to main content

Module composition

Module composition 

Source
Expand description

Language-neutral executable tool-composition contract.

A composition run is a tiny program over already-typed tool bindings. The runtime must expose it as a parent run with child tool operations, not as an opaque “execute code” blob, so policy, transcript, replay, and host approval surfaces can keep reasoning about each child call normally.

Structs§

BindingManifest
Stable prompt-visible manifest for a composition run.
BindingManifestEntry
Prompt-visible description of one callable binding.
BindingManifestOptions
BindingPolicyStatus
Policy metadata attached to a manifest binding.
ClosureCompositionToolHost
Dispatches every binding call to a caller-supplied Harn closure.
CompositionChildCall
Child tool call made by a composition snippet. This is intentionally close to AgentEvent::ToolCall, but includes parent-run correlation and the policy/annotation context the composition executor used when deciding whether the call was allowed.
CompositionChildResult
Terminal or intermediate result for a child binding operation. Consumers should pair this with the corresponding CompositionChildCall to recover the policy annotations and requested side-effect level for the operation.
CompositionExecutionLimits
CompositionExecutionReport
CompositionExecutionRequest
CompositionRunEnvelope
Identity and policy envelope for one composition run.
CompositionToolOutput
StaticCompositionToolHost

Enums§

BindingPolicyDisposition
Policy disposition for a binding projected into a composition manifest.
CompositionFailureCategory
Stable failure taxonomy for a composition run. Tool-level failures stay on CompositionChildResult; this classifies why the parent composition itself failed or stopped.

Constants§

BINDING_MANIFEST_SCHEMA_VERSION
COMPOSITION_EXECUTION_SCHEMA_VERSION

Traits§

CompositionToolHost

Functions§

binding_manifest_from_tool_surface
Build a binding manifest from a Harn tool registry, MCP tools/list payload, or provider-native tool array.
binding_manifest_hash
Stable digest for a binding manifest value. Producers should build manifests with deterministic object key order before hashing.
composition_crystallization_trace
composition_report_events
composition_search_examples
composition_snippet_hash
Stable digest for the prompt-visible snippet body.
composition_typescript_declarations
execute_harn_composition
Execute a read-only Harn-native composition snippet against a manifest.
register_composition_builtins