Documentation
¶
Overview ¶
Package capability resolves flow-node names into runnable action.AnyAction values at flow-execution time.
Three resolution backends are supported, tried in this order:
- Static — the caller-supplied registry (in-process actions).
- Remote — HTTP/JSON or exec-based proxies declared in the .flow manifest via :remote= and :exec= modifiers.
- WASM — WebAssembly modules loaded via wazero, declared via :wasm= in the manifest.
Static lookups always win: an in-process action shadows a manifest-declared remote with the same name. This lets callers override individual capabilities during development without editing the .flow manifest.
Manifest syntax (all modifiers are colon-separated, in any order):
agent.orchestrator:remote="http://10.0.0.5:9001/solve":timeout=30s@Prompt hint tools.ripgrep:exec="rg --json":timeout=10s@Search files skills.lint:wasm="./skills/lint.wasm":timeout=15s@Lint Go code
The annotation (everything after the first unquoted '@') is stripped by the parser and is never passed to the runtime.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Binding ¶
type Binding struct {
Name string
Kind Kind
Target string // URL, shell command, or wasm file path
Timeout string // raw duration string; parsed by the resolver
}
Binding is a single manifest-declared capability. Name is the node identifier used in the pipeline (e.g. "agent.orchestrator"); the remaining fields describe how to reach it.
func ParseBindings ¶
ParseBindings scans a raw .flow manifest for capability declarations.
Recognised modifiers:
:remote="http://host:port/path" -> HTTP binding :exec="cmd arg1 arg2" -> exec binding :wasm="./skills/foo.wasm" -> WASM binding :timeout="30s" -> per-binding timeout hint
Only the tail atom of each pipeline line is examined; head atoms inherit their bindings from their own declaration lines. Duplicate names are resolved last-wins.