Skip to content

Releases: Nexa-Language/Nexa

Nexa v2.1.0 — Production Hardening for Nexa Code

17 May 17:04

Choose a tag to compare

Nexa v2.1.0 Release Notes

Release Date: 2026-05-17

🎯 Summary

Nexa v2.1.0 focuses on Production Hardening for Nexa Code — enabling the first Harness Native AI programming assistant to run without python! escape hatches. Four P0 features bring agent-level streaming, structured output, tool call control, and spawn pipeline to the language.

🆕 New Features

1. Agent-Level Streaming (stream: true)

agent Coder {
    stream: true  // 逐 token 实时输出
}

2. Structured Output / JSON Mode

agent Planner {
    output_format: "json",
    output_schema: {
        steps: [{title: "string", description: "string"}],
        estimated_time: "string"
    }
}

Compiler auto-generates Pydantic models and passes response_format to OpenAI API.

3. Tool Call Control

agent Coder {
    max_tool_calls: 10,
    tool_call_strategy: "auto"  // "auto" | "required" | "none"
}
  • max_tool_calls: limits tool call rounds per request
  • tool_call_strategy: controls whether tools are auto/required/none

4. Spawn Pipeline

results = task |>> spawn [Agent1, Agent2, Agent3];

Parallel multi-agent execution via dag_fanout — each agent runs concurrently.

📊 Changes

Component Files Changes
Parser src/nexa_parser.py json_object_val agent property, spawn_pipeline_stmt, parallel_block grammar
AST Transformer src/ast_transformer.py New handlers for all 4 features
Code Generator src/code_generator.py Agent property codegen + _generate_spawn_pipeline + _generate_parallel_block + _generate_output_schema_function
Runtime src/runtime/agent.py output_format, output_schema, max_tool_calls, tool_call_strategy in NexaAgent

📁 New Examples

  • examples/v2.1/01_streaming_agent.nx
  • examples/v2.1/02_structured_output.nx
  • examples/v2.1/03_tool_call_control.nx
  • examples/v2.1/04_spawn_pipeline.nx

🔄 Migration from v2.0

All v2.0 code is fully backward compatible. New features are opt-in via agent properties.

Nexa v1.3.0 — Agent-Native Tooling + Compiler Architecture Overhaul

23 Apr 10:53

Choose a tag to compare

Nexa v1.3.0 — Agent-Native Tooling + Compiler Architecture Overhaul

Nexa v1.3.0 引入了 Agent-Native CLI 工具系统,并完成了编译器架构文档的全面重写。

新特性

P0-3: Agent-Native Tooling — 41 tests

  • nexa inspect — 结构化分析 agents/tools/flows (含依赖关系图)
  • nexa validate — 语义验证 (prompt/model/工具配置完整性)
  • nexa lint — 风格和最佳实践检查
  • nexa intent-check — Intent 覆盖率验证
  • nexa intent-coverage — 覆盖率百分比报告

编译器架构重写 (v0.9-alpha → v1.3)

  • AST Transformer Scoring System — _score_ast_node() 消歧策略
  • BOILERPLATE Code Generation Pattern — 每个功能模块的导入和辅助函数模板
  • Handle-as-dict Pattern — _nexa_* 前缀键的 Python dict 表示
  • Thread-safe Registry Pattern — _registry_lock + _id_counter 全局注册表
  • StdTool Namespace Pattern — std.* 命名空间通过 StdTool 注册
  • ContractViolation 跨模块集成 — HTTP/KV/Concurrent/ADT
  • DSL 声明模式 — 统一的 module_type name { declarations } 语法

新增文件

  • src/runtime/inspector.py — 结构化分析引擎
  • src/runtime/validator.py — 语义验证引擎

参考文档

Nexa v1.2.0 — Design by Contract (DbC)

23 Apr 10:52

Choose a tag to compare

Nexa v1.2.0 — Design by Contract (DbC)

Nexa v1.2.0 引入了 Design by Contract 系统,将契约式编程范式带到 Agent 编程领域。

新特性

P0-2: Design by Contract — 47 tests

  • requires (前置条件) — 函数/方法调用前必须满足
  • ensures (后置条件) — 函数/方法返回后必须满足
  • invariant (不变条件) — 对象生命周期中始终满足
  • ContractViolation 跨模块集成 (HTTP/KV/Concurrent/ADT)
  • 语义契约 — 支持自然语言条件 (LLM 评判器验证)

ContractViolation 集成

模块 映射
HTTP Server 401 → requires, 403 → ensures
KV Store 失败操作 → ensures violation
Concurrent 任务失败 → contract violation
ADT 无效操作 → ContractViolation

新增文件

  • src/runtime/contracts.py — ContractSpec, ContractClause, ContractViolation, check_requires, check_ensures, capture_old_values

参考文档

Nexa v1.1.0 — Intent-Driven Development (IDD)

23 Apr 10:51

Choose a tag to compare

Nexa v1.1.0 — Intent-Driven Development (IDD)

Nexa v1.1.0 引入了核心差异化特性——Intent-Driven Development 系统,让需求文档变成可执行测试。

新特性

P0-1: Intent-Driven Development (IDD) — 104 tests

  • IAL (Intent Assertion Language) — 术语重写引擎
  • .nxintent 文件格式 — YAML 格式需求文档
  • @implements 注解 — 需求→代码→验证闭环
  • 模糊 Intent 匹配 — 近似匹配解析

CLI 命令

  • nexa intent-check — 验证代码是否符合 intent
  • nexa intent-coverage — 显示特性覆盖率
  • nexa inspect — 结构化分析

新增文件

  • src/ial/primitives.py — Intent 原语定义
  • src/ial/vocabulary.py — Intent 术语词汇管理
  • src/ial/standard.py — 标准术语词汇 (40+ 内置 intents)
  • src/ial/resolve.py — Intent 解析引擎
  • src/ial/execute.py — Intent 执行和验证引擎

参考文档

Nexa-v1.0.0-Code

23 Apr 09:32

Choose a tag to compare

Nexa-v1.0.0-Code Pre-release
Pre-release

The First Release of Nexa.