π¦ Nika 0.65.1 β Template Injection
π¦ 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