Expand description
FAF WASM SDK — the kernel for the edge.
A thin wasm-bindgen shell over the workspace kernel: scoring is
faf-kernel, the binary form is
faf-fafb. No scoring or format logic lives
here — the same engine that runs in the CLI and the MCP server runs in the
browser and at the edge, so there is nothing to drift.
7 pure-function exports. No classes. JSON / bytes in, JSON / bytes out.
§Usage (JavaScript)
import init, { sdk_version, score_faf, validate_faf,
compile_fafb, decompile_fafb, score_fafb, fafb_info } from 'faf-wasm-sdk';
await init();
const result = score_faf(yamlContent); // JSON string (always-33 Mk4)
const bytes = compile_fafb(yamlContent); // Uint8Array (FAFb v2)
const json = decompile_fafb(bytes); // JSON stringFunctions§
- compile_
fafb - Compile YAML to a FAFb v2 binary — returns Uint8Array.
- decompile_
fafb - Decompile a FAFb binary to JSON (full content) — returns JSON string.
- fafb_
info - Get FAFb file info (header + section metadata, no content) — returns JSON.
- score_
faf - Score FAF YAML content with the Mk4 kernel (always-33) — returns JSON.
- score_
fafb - Score a FAFb binary — returns JSON string (same shape as
score_faf). - sdk_
version - Get SDK version.
- validate_
faf - Validate FAF YAML content — true if it parses as a YAML mapping.