Skip to content

πŸ¦‹ Nika 0.61.0 β€” SDK Launch

Choose a tag to compare

@github-actions github-actions released this 02 Apr 11:45

πŸ¦‹ Nika 0.61.0 β€” SDK Launch

Inference as Code Β· April 2, 2026 Β· 140 commits

πŸ§ͺ Tests πŸ”§ Builtins πŸ“¦ Transforms 🌐 Providers
9,407 38 31 9

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


πŸš€ The SDK Release

This is the biggest Nika release ever. 140 commits. Three SDKs shipping simultaneously. A new project configuration system. Five security patches. And a serve layer that finally deserves the word "production."

Until v0.61.0, Nika was a CLI tool. You wrote YAML, you ran nika run, you read the output. Powerful, but isolated. Starting today, Nika is an embeddable engine. Your Rust service, your Node.js backend, your Python pipeline β€” they can all run Nika workflows natively, with full streaming and type safety.


πŸ¦€ nika-sdk β€” Rust SDK

The Rust SDK ships with two transports, because sometimes you want the network and sometimes you don't:

Transport Latency Use Case
EmbeddedTransport ~0ms Same-process execution. No HTTP, no serialization overhead. The engine runs in your tokio runtime.
RemoteTransport Network HTTP + SSE streaming to a remote nika serve instance. Automatic retry with exponential backoff.
use nika_sdk::{NikaClient, EmbeddedTransport, RunRequest};

// In-process execution β€” zero network
let client = NikaClient::embedded().await?;

let request = RunRequest::new("research-topic")
    .input("topic", "quantum computing");

// Stream events as they happen
let mut stream = client.stream(request).await?;
while let Some(event) = stream.next().await {
    match event? {
        Event::InferChunk { text, .. } => print!("{text}"),
        Event::TaskCompleted { task_id, .. } => eprintln!("βœ… {task_id}"),
        Event::JobCompleted { output, .. } => {
            println!("\n\nπŸ“‹ Final output:\n{output}");
            break;
        }
        _ => {}
    }
}

The embedded transport is the killer feature. Your Rust service doesn't need a running nika serve β€” it is the engine. Same DAG executor, same provider routing, same structured output 5-layer defense. Zero overhead.


πŸ“¦ nika-napi β€” Node.js SDK

Native addon via napi-rs 3.x. Not a REST wrapper β€” the Nika engine compiles to a .node binary that runs in your V8 process.

import { NikaEngine } from '@supernovae-st/nika-napi';

const engine = await NikaEngine.create();

// AsyncGenerator streaming β€” native JavaScript pattern
const stream = engine.run('translate-article', {
  inputs: { url: 'https://blog.com/post', locales: ['fr', 'ja'] },
});

for await (const event of stream) {
  // Discriminated TypeScript unions β€” event.type narrows the type
  if (event.type === 'InferChunk') {
    process.stdout.write(event.text);
  }
}

Why napi-rs and not a REST client? Because AsyncGenerator streaming is a native JavaScript pattern. You get backpressure for free. TypeScript discriminated unions mean your IDE knows exactly which fields exist on each event type. And zero-copy where possible means the Rust engine hands data directly to V8 without serialization.


🐍 nika-py β€” Python SDK

PyO3 0.24 bindings with Pythonic ergonomics. EventStream implements the iterator protocol, so for event in stream just works.

from nika_py import NikaEngine

engine = NikaEngine()

# Iterator protocol β€” Pythonic streaming
stream = engine.run("research-topic", inputs={"topic": "LLM agents"})

for event in stream:
    if event.type == "InferChunk":
        print(event.text, end="", flush=True)
    elif event.type == "TaskCompleted":
        print(f"\nβœ… {event.task_id}")

Key details:

  • pythonize β€” Rust serde_json::Value converts to native Python dicts, not JSON strings. event.output["name"] works as expected.
  • __eq__ support β€” Events are comparable: event == other_event does structural equality.
  • .pyi type stubs β€” Full type annotations for IDE autocompletion. MyPy and Pyright see every field.

πŸ“‹ nika.toml β€” The Root Marker

Every serious tool needs a project file. Git has .git/. Cargo has Cargo.toml. Nika now has nika.toml.

[project]
name = "my-saas"

[provider]
default = "anthropic"
model = "claude-sonnet-4-20250514"

[tools]
working_dir = "."
allow_exec = true
allow_network = true

[policy]
max_token_spend = 100000

[artifacts]
dir = "./output"

[serve]
bind = "127.0.0.1:3000"
max_concurrent = 6

Walk-up discovery: Nika walks up from your current directory to find nika.toml, exactly like Git finds .git/. This is the project root marker β€” it tells Nika where your project starts.

3-layer merge: Compiled defaults < nika.toml values < environment variable overrides. Set sane defaults in the file, override per-environment with env vars.

nika init creates it: The interactive wizard (powered by cliclack prompts) generates nika.toml + .mcp.json + .gitignore in one shot. Pass --yes for non-interactive CI usage.


πŸ” Security Hardening β€” 5 Patches

This release includes five security fixes discovered during the pre-SDK audit:

Fix Severity Details
πŸ›‘οΈ Shell quoting bypass HIGH 'sudo' and "rm" bypassed NIKA-053 blocklist. Quotes now stripped before matching.
πŸ”‘ Secret redaction HIGH Custom API keys from $env were visible in traces. Now value-based redaction covers all secrets, not just well-known provider keys.
🌐 Webhook SSRF HIGH DNS pinning on webhook URLs, redirect blocking, IPv6-mapped IPv4 addresses blocked.
πŸ”’ Vault hardening MEDIUM 0o700 directory perms, Argon2i raised to 6 iterations, file locking, passphrase min 12 chars.
πŸ” Serve auth MEDIUM Token min 32 chars, X-Request-Id capped 128 chars, CORS origin validation.

⚑ Serve Gets Production-Ready

Beyond the SDKs, the serve layer gained three critical capabilities:

πŸ“¦ Artifact API β€” GET /v1/jobs/{id}/artifacts lists all artifacts produced by a workflow run. GET /v1/jobs/{id}/artifacts/{name} downloads with correct MIME type. Your frontend can fetch generated reports, images, and data files directly.

⚑ Typed SSE Events β€” Server-Sent Events now carry structured event types instead of raw text lines. TaskStarted, TaskCompleted, TaskFailed, InferChunk, ForEachProgress β€” each with typed fields. Clients can switch on event type without parsing.

πŸ’Ύ Checkpoint Store β€” Interrupted jobs resume from their last checkpoint. If a 20-task workflow fails on task 15, restarting picks up from task 15, not task 1. Checkpoints stored in SQLite alongside job state.


πŸ”§ Everything Else

New features:

  • 🎯 {{skills.NAME}} template resolution β€” reference skill file content directly in with: blocks, not just as system prompt injection
  • πŸ” BLAKE3 checksums for text/JSON/YAML/Markdown artifacts (.blake3 sidecar files)
  • πŸ“Š ProviderAutoRetried trace event with attempt number and backoff duration
  • 🧹 nika clean umbrella command β€” nika clean traces, nika clean media, nika clean cache, or nika clean all
  • πŸ” nika check security phase β€” warns about unescaped shell interpolation with word-boundary regex
  • πŸ—οΈ CI: SDK publish pipelines for npm + PyPI with ARM Linux cross-compilation via zig

Bug fixes (15+):

  • SdkError::Cancelled β€” distinct error variant for cancelled jobs
  • SSE CRLF + buffer limit β€” handle \r\n\r\n boundaries, 1 MiB cap
  • JobStatus enum β€” #[serde(other)] for forward compatibility
  • Job reaping β€” embedded transport reaps terminal jobs above 1,024 entries
  • Artifact YAML validation before write
  • nika:dag_info task count includes for_each expansion
  • nika:emit accepts data as alias for payload
  • Schema path resolution aligned between nika check and nika run
  • Provider chain cleared on routing override
  • fail_fast:false partial results unblock downstream tasks
  • Embedded executor as default (in-process, not subprocess)
  • SSE routes excluded from TimeoutLayer
  • MCP NIKA-XXX error codes in tool responses
  • npm scope corrected to @supernovae-st
  • SDK version synced from release tag before publish

πŸ“¦ Install

Method Command
πŸš€ Quick curl -fsSL https://raw.githubusercontent.com/supernovae-st/nika/main/install.sh | sh
🍺 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.61.0
πŸ’» VS Code Search "Nika" or ext install supernovae.nika-lang
πŸͺŸ Scoop scoop bucket add nika https://github.com/supernovae-st/scoop-nika && scoop install nika
🐧 AUR yay -S nika-bin

πŸ¦‹ Nika Evolution
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
v0.42  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘  8,188 tests
v0.48  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘  8,200 tests
v0.52  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘  8,938 tests
v0.56  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘  9,093 tests
v0.58  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘  9,109 tests
v0.61  β–ˆβ–ˆοΏ½οΏ½β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ  9,407 tests ← you are here
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

πŸ”§ 38 builtins Β· πŸ“¦ 31 transforms Β· 🌐 7+1+1 providers Β· πŸ¦€ 16 crates

Made with πŸ’œ by SuperNovae Studio β€” Open Source, AGPL-3.0

Full Changelog: v0.58.1...v0.61.0