Skip to content

πŸ¦‹ Nika 0.65.1 β€” Template Injection

Choose a tag to compare

@github-actions github-actions released this 04 Apr 10:27

πŸ¦‹ Nika 0.65.1 β€” Template Injection

Inference as Code Β· April 4, 2026 Β· 3 commits

πŸ§ͺ Tests πŸ”§ Builtins πŸ“¦ Transforms 🌐 Providers
9,930 45 39 9

✧ infer Β· ⎈ exec Β· β˜„ fetch Β· βŠ› invoke Β· ❋ agent


✨ Assemble documents from pre-generated sections -- zero LLM calls. Plus: the jq engine can no longer crash your workflow. A focused patch release that adds one powerful new builtin and plugs a panic safety hole in the jaq-core evaluator.


🧩 nika:inject -- Zero-LLM Document Assembly

Many workflows follow the same pattern: generate a skeleton, then fill in sections from parallel tasks. Before nika:inject, you'd burn an LLM call just to concatenate strings. Now it's a deterministic, instant operation.

The new builtin scans text for marker patterns and replaces each one with dynamic content:

- id: assemble_report
  with:
    template: $generate_skeleton
    summary: $write_summary
    charts: $render_charts
  invoke:
    tool: nika:inject
    params:
      text: "{{with.template}}"
      markers:
        summary: "{{with.summary}}"
        charts: "{{with.charts}}"
      prefix: "<!-- INJECT:"
      suffix: " -->"

Before injection:

# Quarterly Report
<!-- INJECT:summary -->
## Revenue Charts
<!-- INJECT:charts -->

After injection: Both markers replaced with their corresponding content. Zero tokens spent. Instant.

The tool accepts any prefix/suffix pair -- use <!-- INJECT: and --> for HTML, {% and %} for templates, or whatever your format needs. Default delimiters are <!-- INJECT: / -->.

Tip

Pair nika:inject with for_each for multi-section documents. Generate all sections in parallel, collect them as markers, and inject them into a template in one shot.


πŸ›‘οΈ jq Panic Safety

The jaq-core library can panic on certain edge-case jq expressions -- deeply recursive filters, stack overflows, or malformed inputs that hit internal assertion failures. In a nika serve context where untrusted workflows can run jq expressions, this is a real concern.

All jq evaluation is now wrapped in catch_unwind. If jaq-core panics, Nika catches it and returns a proper NikaError instead of terminating the process:

Before: πŸ’₯ thread 'main' panicked at 'assertion failed'
After:  NIKA-094: jq evaluation panicked (expression: .x | .y | .z[999999])

Note

This is a safety net, not a fix for the underlying jaq-core edge cases. The expressions that trigger panics are rare and usually involve adversarial input. But defense in depth means catching what you can.


⬆️ Upgrade Notes

Drop-in replacement for v0.65.0. No breaking changes, no config changes needed.


πŸ“¦ Install

curl -fsSL https://raw.githubusercontent.com/supernovae-st/nika/main/install.sh | sh
Method Command
🍺 Homebrew brew install supernovae-st/tap/nika
πŸ“¦ npm npx @supernovae-st/nika
πŸ¦€ Cargo cargo install nika
🐳 Docker docker run --rm ghcr.io/supernovae-st/nika:0.65.1
πŸ’» VS Code ext install supernovae.nika-lang

πŸ” All binaries: SHA256 checksums Β· SLSA provenance Β· macOS notarization


Made with πŸ’œ by SuperNovae Studio Β· Open Source, AGPL-3.0

Full Changelog: v0.65.0...v0.65.1