diff --git a/CHANGELOG.md b/CHANGELOG.md index 673feab..cc1c1aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,27 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [4.2.0] - 2026-06-23 + +### Added + +- Native structured-output enforcement. `LlmClient` gains + `native_structured_support()`, `complete_structured()`, and + `complete_streaming_structured()` (all with non-breaking default impls). The + structured engine now forces the provider `tool_choice` for tool mode and + requests native `response_format` (`json_schema` / `json_object`) where the + provider supports it, instead of merely offering a tool the model could ignore. + +### Fixed + +- Stabilized JSON-object generation. Forced `tool_choice` on both the blocking + and streaming paths guarantees the model emits the structured object rather + than prose or malformed tool arguments. +- Hardened the planner / pre-analysis JSON parsing: it now reuses the robust + shared extractor (markdown fences, surrounding prose, braces inside strings) + and adds one repair retry, replacing the previous naive first-`{`/last-`}` + slice that hard-errored on fenced or prose-wrapped output. + ## [4.1.0] - 2026-06-23 ### Changed diff --git a/Cargo.lock b/Cargo.lock index 032527d..2a23729 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -37,7 +37,7 @@ dependencies = [ [[package]] name = "a3s-code-core" -version = "4.1.0" +version = "4.2.0" dependencies = [ "a3s-acl 0.2.0", "a3s-ahp", diff --git a/core/Cargo.toml b/core/Cargo.toml index d3fe22c..2740ec0 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "a3s-code-core" -version = "4.1.0" +version = "4.2.0" edition = "2021" authors = ["A3S Lab Team"] license = "MIT" diff --git a/sdk/node/Cargo.toml b/sdk/node/Cargo.toml index f0bda25..caa7fce 100644 --- a/sdk/node/Cargo.toml +++ b/sdk/node/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "a3s-code-node" -version = "4.1.0" +version = "4.2.0" edition = "2021" authors = ["A3S Lab Team"] license = "MIT" @@ -11,7 +11,7 @@ description = "A3S Code Node.js bindings - Native addon via napi-rs" crate-type = ["cdylib"] [dependencies] -a3s-code-core = { version = "4.1.0", path = "../../core", features = ["ahp", "s3", "serve"] } +a3s-code-core = { version = "4.2.0", path = "../../core", features = ["ahp", "s3", "serve"] } napi = { version = "2", features = ["async", "napi6", "serde-json"] } napi-derive = "2" tokio = { version = "1.35", features = ["full"] } diff --git a/sdk/node/examples/package-lock.json b/sdk/node/examples/package-lock.json index 5528d60..3a92f0d 100644 --- a/sdk/node/examples/package-lock.json +++ b/sdk/node/examples/package-lock.json @@ -18,7 +18,7 @@ }, "..": { "name": "@a3s-lab/code", - "version": "4.1.0", + "version": "4.2.0", "license": "MIT", "devDependencies": { "@napi-rs/cli": "^2", @@ -27,12 +27,12 @@ "typescript": "^5.9.3" }, "optionalDependencies": { - "@a3s-lab/code-darwin-arm64": "4.1.0", - "@a3s-lab/code-linux-arm64-gnu": "4.1.0", - "@a3s-lab/code-linux-arm64-musl": "4.1.0", - "@a3s-lab/code-linux-x64-gnu": "4.1.0", - "@a3s-lab/code-linux-x64-musl": "4.1.0", - "@a3s-lab/code-win32-x64-msvc": "4.1.0" + "@a3s-lab/code-darwin-arm64": "4.2.0", + "@a3s-lab/code-linux-arm64-gnu": "4.2.0", + "@a3s-lab/code-linux-arm64-musl": "4.2.0", + "@a3s-lab/code-linux-x64-gnu": "4.2.0", + "@a3s-lab/code-linux-x64-musl": "4.2.0", + "@a3s-lab/code-win32-x64-msvc": "4.2.0" } }, "node_modules/@a3s-lab/code": { diff --git a/sdk/node/package-lock.json b/sdk/node/package-lock.json index f9622a8..e3af6c9 100644 --- a/sdk/node/package-lock.json +++ b/sdk/node/package-lock.json @@ -1,12 +1,12 @@ { "name": "@a3s-lab/code", - "version": "4.1.0", + "version": "4.2.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@a3s-lab/code", - "version": "4.1.0", + "version": "4.2.0", "license": "MIT", "devDependencies": { "@napi-rs/cli": "^2", @@ -15,12 +15,12 @@ "typescript": "^5.9.3" }, "optionalDependencies": { - "@a3s-lab/code-darwin-arm64": "4.1.0", - "@a3s-lab/code-linux-arm64-gnu": "4.1.0", - "@a3s-lab/code-linux-arm64-musl": "4.1.0", - "@a3s-lab/code-linux-x64-gnu": "4.1.0", - "@a3s-lab/code-linux-x64-musl": "4.1.0", - "@a3s-lab/code-win32-x64-msvc": "4.1.0" + "@a3s-lab/code-darwin-arm64": "4.2.0", + "@a3s-lab/code-linux-arm64-gnu": "4.2.0", + "@a3s-lab/code-linux-arm64-musl": "4.2.0", + "@a3s-lab/code-linux-x64-gnu": "4.2.0", + "@a3s-lab/code-linux-x64-musl": "4.2.0", + "@a3s-lab/code-win32-x64-msvc": "4.2.0" } }, "node_modules/@a3s-lab/code-darwin-arm64": { diff --git a/sdk/node/package.json b/sdk/node/package.json index 14ccdab..36ecb22 100644 --- a/sdk/node/package.json +++ b/sdk/node/package.json @@ -1,6 +1,6 @@ { "name": "@a3s-lab/code", - "version": "4.1.0", + "version": "4.2.0", "description": "A3S Code - Native Node.js bindings for the coding-agent runtime", "main": "index.js", "types": "index.d.ts", @@ -43,11 +43,11 @@ "test:helpers": "node test-helpers.mjs" }, "optionalDependencies": { - "@a3s-lab/code-darwin-arm64": "4.1.0", - "@a3s-lab/code-linux-x64-gnu": "4.1.0", - "@a3s-lab/code-linux-x64-musl": "4.1.0", - "@a3s-lab/code-linux-arm64-gnu": "4.1.0", - "@a3s-lab/code-linux-arm64-musl": "4.1.0", - "@a3s-lab/code-win32-x64-msvc": "4.1.0" + "@a3s-lab/code-darwin-arm64": "4.2.0", + "@a3s-lab/code-linux-x64-gnu": "4.2.0", + "@a3s-lab/code-linux-x64-musl": "4.2.0", + "@a3s-lab/code-linux-arm64-gnu": "4.2.0", + "@a3s-lab/code-linux-arm64-musl": "4.2.0", + "@a3s-lab/code-win32-x64-msvc": "4.2.0" } } diff --git a/sdk/python-bootstrap/pyproject.toml b/sdk/python-bootstrap/pyproject.toml index 29f20a1..6a98a25 100644 --- a/sdk/python-bootstrap/pyproject.toml +++ b/sdk/python-bootstrap/pyproject.toml @@ -7,7 +7,7 @@ name = "a3s-code" # Keep in sync with crates/code core release. The bootstrap loader fetches # the matching native wheel from `https://github.com/AI45Lab/Code/releases/tag/v` # at import time. -version = "4.1.0" +version = "4.2.0" description = "A3S Code Python SDK — pure-Python bootstrap that fetches the native wheel from GitHub Releases" readme = "README.md" license = {text = "MIT"} diff --git a/sdk/python-bootstrap/src/a3s_code/_bootstrap.py b/sdk/python-bootstrap/src/a3s_code/_bootstrap.py index d48963e..fa1b0e5 100644 --- a/sdk/python-bootstrap/src/a3s_code/_bootstrap.py +++ b/sdk/python-bootstrap/src/a3s_code/_bootstrap.py @@ -31,7 +31,7 @@ # Version is the bootstrap's own version, which equals the matching native # wheel version on GH Releases. Bumped by the release workflow. -__version__ = "4.1.0" +__version__ = "4.2.0" _DEFAULT_BASE_URL = "https://github.com/AI45Lab/Code/releases/download" _REQUEST_TIMEOUT_S = 120 diff --git a/sdk/python/Cargo.toml b/sdk/python/Cargo.toml index d8d1a40..72ff19d 100644 --- a/sdk/python/Cargo.toml +++ b/sdk/python/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "a3s-code-py" -version = "4.1.0" +version = "4.2.0" edition = "2021" authors = ["A3S Lab Team"] license = "MIT" @@ -12,7 +12,7 @@ name = "a3s_code" crate-type = ["cdylib"] [dependencies] -a3s-code-core = { version = "4.1.0", path = "../../core", features = ["ahp", "s3", "serve"] } +a3s-code-core = { version = "4.2.0", path = "../../core", features = ["ahp", "s3", "serve"] } pyo3 = "0.23" tokio = { version = "1.35", features = ["full"] } serde_json = "1.0" diff --git a/sdk/python/pyproject.toml b/sdk/python/pyproject.toml index e4a93ec..b713687 100644 --- a/sdk/python/pyproject.toml +++ b/sdk/python/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "maturin" [project] name = "a3s-code" -version = "4.1.0" +version = "4.2.0" description = "A3S Code - Native Python bindings for the coding-agent runtime" readme = "README.md" license = {text = "MIT"}