Skip to main content

Module context_loader

Module context_loader 

Source
Expand description

Context Loader - Load files at workflow start

Loads files declared in the context: block at workflow start. Files are made available via {{context.files.alias}} bindings.

§Supported file types

  • .json: Parsed as JSON object
  • .yaml, .yml: Parsed as YAML object
  • .md, .txt, etc.: Loaded as string
  • Glob patterns (*.md): Loaded as array of strings

§Example

context:
  files:
    brand: ./context/brand.md        # String
    persona: ./context/persona.json  # JSON object
    examples: ./context/*.md         # Array of strings
  session: .nika/sessions/prev.json  # Session restore

Re-exports§

pub use crate::store::LoadedContext;

Functions§

load_context
Load context files at workflow start
load_context_analyzed
Load context files from AnalyzedWorkflow’s context_files vec.