flow

module
v0.10.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2026 License: Apache-2.0

README

Nexss Flow

Nexss Flow is a Go runtime and language for composing .nflow programs from registered actions. The nflow CLI runs flows and inspects the active compiler surface.

Quick start

Requires Go 1.26 or later. From the repository root:

go run ./cmd/nflow help
go run ./cmd/nflow run examples/00_flow_basics/04_data_transformation.nflow

The example projects a nested value into a new shape and prints:

{
  "id": 101,
  "name": "Ada",
  "status": "active",
  "summary": "Ada (ID: 101) is active"
}

Examples

These introductory examples currently run successfully from the repository root:

Documentation

Microkernel and extensions

Nexss Flow uses a microkernel-style design: core.Bundle is the contract through which bundles contribute action libraries and compiler extensions. The CLI assembles its built-in bundles, while @require can load a bundle for a flow; a package's presence under extensions/ alone does not enable it. See the extension guide for the current bundle model.

Directories

Path Synopsis
cli
selftest
Package selftest runs the Nexss Flow self-test suite: a feature-by- feature check of every registered bundle, run in-process against the binary's own compiler and runtime.
Package selftest runs the Nexss Flow self-test suite: a feature-by- feature check of every registered bundle, run in-process against the binary's own compiler and runtime.
cmd
nflow command
Plik: flow/core/resolver.go
Plik: flow/core/resolver.go
extensions
assert
Package assert provides the `assert(cond, msg)` keyword and the `@assert: expr` directive.
Package assert provides the `assert(cond, msg)` keyword and the `@assert: expr` directive.
config
Package config provides the @config and @config.load directives that populate meta["config"], which OnPreprocess forwards to the compiler as a compile-time key-value map.
Package config provides the @config and @config.load directives that populate meta["config"], which OnPreprocess forwards to the compiler as a compile-time key-value map.
decide
Package decide provides the `decide` action: it evaluates a state against a registered decision backend and returns structured answers.
Package decide provides the `decide` action: it evaluates a state against a registered decision backend and returns structured answers.
description
Package description provides the `@description "..."` directive, which records a human-readable summary of a .nflow file into meta["description"].
Package description provides the `@description "..."` directive, which records a human-readable summary of a .nflow file into meta["description"].
external
Package external provides three actions for calling code that lives outside the Flow process: exec (shell), http.request (HTTP client), and wasm (Wazero WASI modules).
Package external provides three actions for calling code that lives outside the Flow process: exec (shell), http.request (HTTP client), and wasm (Wazero WASI modules).
fs
Package fs ships the file-system stream source and operators: fs.walk as a source; fs.filter, fs.read, fs.sort, fs.write, and the terminal sinks out.stdout and out.file as stream operators.
Package fs ships the file-system stream source and operators: fs.walk as a source; fs.filter, fs.read, fs.sort, fs.write, and the terminal sinks out.stdout and out.file as stream operators.
hook
Package hook provides the `@hook:name` directive, which attaches every named hook from the kernel registry to the compiled pipeline, and the hook.probe action that reads HookProbeKey from the context to prove a hook fired.
Package hook provides the `@hook:name` directive, which attaches every named hook from the kernel registry to the compiled pipeline, and the hook.probe action that reads HookProbeKey from the context to prove a hook fired.
include
Package include provides the `@include "file.nflow"` directive.
Package include provides the `@include "file.nflow"` directive.
loop
Package loop provides the `loop(body) until(cond)` keyword.
Package loop provides the `loop(body) until(cond)` keyword.
macros
Package macros extends the compiler with a @macro engine.
Package macros extends the compiler with a @macro engine.
modifiers_auth
Package modifiers_auth ships the identity guards :auth, :role=, :perm=, and :feature=.
Package modifiers_auth ships the identity guards :auth, :role=, :perm=, and :feature=.
modifiers_core
Package modifiers_core ships the execution modifiers :timeout=, :retry=, :concurrency=, :cache=, :coalesce, :dedup, :idempotent, and :rate_limit=.
Package modifiers_core ships the execution modifiers :timeout=, :retry=, :concurrency=, :cache=, :coalesce, :dedup, :idempotent, and :rate_limit=.
modifiers_meta
Package modifiers_meta ships the metadata modifiers :name=, :desc=, :description=, :status=, :tag=, :scope=, and the flags :read_only, :audit, :debug, :deprecated, :strict, :lenient.
Package modifiers_meta ships the metadata modifiers :name=, :desc=, :description=, :status=, :tag=, :scope=, and the flags :read_only, :audit, :debug, :deprecated, :strict, :lenient.
nodes_bench
Package nodes_bench provides bench.run (measure latency distribution of an action), bench.save (write results to a file), and bench.compare (diff against a stored baseline).
Package nodes_bench provides bench.run (measure latency distribution of an action), bench.save (write results to a file), and bench.compare (diff against a stored baseline).
nodes_dispatch
Package nodes_dispatch provides the `dispatch` action, which selects one action from a named pool (or explicit member list) and invokes it with the supplied payload.
Package nodes_dispatch provides the `dispatch` action, which selects one action from a named pool (or explicit member list) and invokes it with the supplied payload.
nodes_distribute
Package nodes_distribute provides distribute.map (bounded-concurrency fan-out over a slice) and distribute.reduce (fold the map output into a single value).
Package nodes_distribute provides distribute.map (bounded-concurrency fan-out over a slice) and distribute.reduce (fold the map output into a single value).
nodes_log
Package nodes_log provides log.info, log.warn, and log.error as pass-through nodes.
Package nodes_log provides log.info, log.warn, and log.error as pass-through nodes.
nodes_supervisor
Package nodes_supervisor provides the supervisor action: it compiles and runs a set of named child pipelines concurrently, isolating each child's panic, error, and timeout.
Package nodes_supervisor provides the supervisor action: it compiles and runs a set of named child pipelines concurrently, isolating each child's panic, error, and timeout.
on
Package on provides the `@on event "protocol:target"` directive, which records an EventTrigger into meta["on_event"].
Package on provides the `@on event "protocol:target"` directive, which records an EventTrigger into meta["on_event"].
on_error
Package on_error provides the `@on_error { when ...
Package on_error provides the `@on_error { when ...
pipeline
Package pipeline provides the `@pipeline NAME ...
Package pipeline provides the `@pipeline NAME ...
pool
Package pool provides the `@pool NAME [member1, member2] { strategy: "round_robin" }` directive.
Package pool provides the `@pool NAME [member1, member2] { strategy: "round_robin" }` directive.
projection
Package projection adds the `{ ...
Package projection adds the `{ ...
render
Package render provides the render.markdown stream operator, which reformats FileContent into a single Markdown document.
Package render provides the render.markdown stream operator, which reformats FileContent into a single Markdown document.
retry
Package retry adds retry resilience to individual Flow atoms through the AtomAdvise contract.
Package retry adds retry resilience to individual Flow atoms through the AtomAdvise contract.
runtime
Package runtime ships the primitive actions every .nflow pipeline starts from: const, noop, debug, fail, pick, wrap, with, env, uuid, call, dispatch_by_prefix, json.clean.
Package runtime ships the primitive actions every .nflow pipeline starts from: const, noop, debug, fail, pick, wrap, with, env, uuid, call, dispatch_by_prefix, json.clean.
schema
Package schema provides the `@schema NAME { Field Type `json:"..." validate:"..."` ...
Package schema provides the `@schema NAME { Field Type `json:"..." validate:"..."` ...
selftestkit
Package selftestkit ships the coverage fixtures the self-test suite references as `cov.*`.
Package selftestkit ships the coverage fixtures the self-test suite references as `cov.*`.
syntax
Package syntax ships the four binary operators every .nflow file relies on: ->, |, &, ||.
Package syntax ships the four binary operators every .nflow file relies on: ->, |, &, ||.
Plik: flow/runner/config.go
Plik: flow/runner/config.go

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL