Expand description
The compiled binary form of .faf — FAFb v2 (re-export of faf-fafb).
Modules§
- canon
- The canonical chunk table — FAFb v2 is CLOSED CANONICAL.
- compile
- Compile/decompile API for .faf ↔ .fafb conversion — FAFb v2, closed canonical.
- error
- FAFB Error Types
- flags
- FAFB Feature Flags
- header
- FAFB Header Implementation
- priority
- FAFB Priority System
- section
- FAFB Section Entry and Section Table
- string_
table - FAFb v2 String Table
Structs§
- Canonical
Chunk - One canonical chunk: name, classification, default priority.
- Compile
Options - Options for compilation
- Decompiled
Fafb - A decompiled .fafb file with header, section table, string table, and raw data
- Fafb
Header - The 32-byte FAFB file header
- Flags
- Helper struct for working with flags
- Priority
- Priority level with semantic meaning
- Section
Entry - A single section entry in the section table
- Section
Table - The section table containing all section entries
- String
Table - A string table mapping u8 indices to UTF-8 names
Enums§
- Chunk
Classification - Chunk classification, stored in bits 0–1 of
SectionEntry.flags. - Fafb
Error - Errors that can occur when working with .fafb files
Constants§
- CANONICAL_
CHUNKS - The canonical chunk table — the complete, closed set of FAFb v2 section names, in serialization order. This IS the format: there is no chunk 14.
- CLASSIFICATION_
MASK - Classification mask for the low 2 bits of section flags.
- FLAG_
COMPRESSED - Content is zstd compressed
- FLAG_
EMBEDDINGS - Contains pre-computed embeddings
- FLAG_
MODEL_ HINTS - Contains model-specific hints
- FLAG_
RESOLVED - File is output of chain resolution (enterprise)
- FLAG_
SIGNED - Contains cryptographic signature
- FLAG_
STRING_ TABLE - Contains a string table (always set in unified format)
- FLAG_
TOKENIZED - Contains token boundaries
- FLAG_
WEIGHTED - Contains attention weights
- HEADER_
SIZE - Header size in bytes
- MAGIC
- Magic number identifying FAFB files: “FAFB” in ASCII
- MAGIC_
U32 - Magic number as u32 (little-endian)
- MAX_
FILE_ SIZE - Maximum allowed file size (DoS protection): 10MB
- MAX_
SECTIONS - Maximum allowed section count (DoS protection)
- PRIORITY_
CRITICAL - Critical priority - never truncate (name, version)
- PRIORITY_
HIGH - High priority - truncate last (key_files, tech_stack)
- PRIORITY_
LOW - Low priority - truncate first (verbose context)
- PRIORITY_
MEDIUM - Medium priority - normal truncation (architecture, commands)
- PRIORITY_
OPTIONAL - Optional priority - can be omitted entirely
- SECTION_
ENTRY_ SIZE - Size of a single section entry in bytes
- VERSION
- Library version
- VERSION_
MAJOR - Format major version
- VERSION_
MINOR - Current format minor version (additive changes)
Functions§
- canonical_
chunk - Look up a canonical chunk by name.
- compile
- Compile a .faf YAML source string into .fafb v2 binary bytes.
- decompile
- Decompile .fafb v2 binary bytes into a structured representation.
- is_
canonical - Is this top-level key part of the canonical chunk set?
Type Aliases§
- Fafb
Result - Result type for FAFB operations