wavekat-flow 0.0.5

Declarative call-flow ("Receptionist") document model for the WaveKat voice platform. Types are generated from the normative JSON Schema (schema/flow.v1.schema.json), the single source of truth shared with the @wavekat/flow-schema npm package.
Documentation

Crates.io docs.rs

The call-flow ("Receptionist") document model for the WaveKat voice platform: the declarative IVR document — greeting, hours check, menu, voicemail, transfer — that WaveKat voice lines run.

The model types are generated at build time from the normative JSON Schema (schema/flow.v1.schema.json), the single source of truth shared with the @wavekat/flow-schema npm package. Both languages run the same conformance corpus, so a document means the identical thing to the TypeScript authoring side and this crate.

[!WARNING] Early development (0.0.x). API may change between releases.

What's inside

Module What it does
model (re-exported at root) Generated document types (Flow, Node, Prompt, …) plus hand-written helpers (Flow::from_yaml, Node::exits, …)
validate Semantic validation: reachability, caller traps, exit-set exactness, DTMF and prompt rules
hours Business-hours / timezone math (IANA zones, holiday exceptions)
engine The flow interpreter + the FlowEffects async trait your runtime implements
trace Serializable run traces emitted by the engine
FLOW_V1_SCHEMA The normative JSON Schema, bundled as a string for structural validation

Quick start

cargo add wavekat-flow
use wavekat_flow::{validate, Flow};

let flow = Flow::from_yaml(
    r#"
schema_version: 1
id: flow_min
name: Minimal greeting then hangup
entry: hello
nodes:
  hello:
    kind: greeting
    prompt: Hi there.
    exits: { next: bye }
  bye:
    kind: hangup
    prompt: Goodbye.
"#,
)?;

if let Err(errors) = validate::validate(&flow) {
    for e in &errors {
        eprintln!("{}: {e}", e.code());
    }
}

One format, two languages

This crate is the Rust half of the format. Authoring, comment-preserving edits, and the TypeScript twin of the validator live in @wavekat/flow-schema. The schema, the shared conformance corpus, and the full design rationale live in the wavekat-flow repository.

License

Licensed under Apache 2.0.

Copyright 2026 WaveKat.