Skip to content

Commit dae2fc6

Browse files
claudeZhiXiao-Lin
authored andcommitted
chore(release): prepare v3.2.0
Bumps Rust core, Node SDK, and Python SDK to 3.2.0 and documents the subagent task tracker work that landed across #35#41 + #38. Changes - Bump all five version files (core/sdk Cargo.toml, sdk/node/package.json, sdk/python/pyproject.toml) plus Node lockfiles and Cargo.lock. - Mark SubagentStatus #[non_exhaustive] so future variants are non- breaking. The Cancelled variant added in this release still counts as a breaking change for exhaustive matchers — flagged in the CHANGELOG. - Add a [3.2.0] section to CHANGELOG.md covering: the tracker query API, SubagentProgress emission, the Cancelled status and cancel_subagent_task entry point, Node + Python SDK exposure of all of the above, the regen-stable Node .d.ts split, and the TaskExecutor / register_task_with_mcp signature additions. - Extend README with a "What's new in 3.2" block and a Delegation table that lays out the observe + cancel API across Rust, Node, and Python. Preflight done locally - cargo fmt --all --check - cargo test -p a3s-code-core --lib (1661 passed) - cargo test -p a3s-code-core --tests (all green) - scripts/check_release_versions.sh (consistent at 3.2.0) - (cd sdk/node && npm run build:debug && npm test && npm run test:types) Not run here: release.sh / git tag. This commit is for review only; tagging + publishing happens after the PR lands.
1 parent be9d45b commit dae2fc6

11 files changed

Lines changed: 142 additions & 29 deletions

File tree

CHANGELOG.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,81 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [3.2.0] - 2026-05-24
9+
10+
### Added
11+
12+
- Added a queryable subagent task tracker so callers can observe delegated
13+
child runs by `task_id` instead of scanning `run_events()`. The tracker is
14+
a materialized view over the existing `SubagentStart` / `SubagentProgress`
15+
/ `SubagentEnd` event stream — the stream remains the authoritative record.
16+
- Added three new APIs on `AgentSession` (and mirrored bindings on the Node
17+
and Python SDKs):
18+
- `subagent_task(task_id)` — look up a task snapshot by id.
19+
- `subagent_tasks()` — list every delegated subagent task observed in this
20+
session, oldest first.
21+
- `pending_subagent_tasks()` — list only tasks still in `running` state.
22+
- Added emission of `SubagentProgress` events from the child loop forwarder.
23+
Two milestones are surfaced today: `status = "tool_completed"` after each
24+
child tool ends (metadata: tool, exit_code, output_bytes, optional
25+
error_kind) and `status = "turn_completed"` after each child LLM turn
26+
(metadata: turn, prompt/completion/total tokens). Noisy events (TextDelta,
27+
ToolStart, ToolOutputDelta, nested subagent events) are intentionally not
28+
translated; consumers needing token-level streaming should subscribe to the
29+
raw event stream directly.
30+
- Added `SubagentStatus::Cancelled` and `AgentSession::cancel_subagent_task(id)`
31+
for interrupting in-flight delegated child runs without cancelling the parent
32+
run. Bindings on both SDKs (`session.cancelSubagentTask(taskId)` /
33+
`session.cancel_subagent_task(task_id)`). A late `SubagentEnd` from a
34+
cancelled child does not downgrade the terminal status — it stays
35+
`Cancelled`.
36+
- Added `SubagentTaskSnapshot` carrying `task_id`, `parent_session_id`,
37+
`child_session_id`, `agent`, `description`, `status`, `started_ms`,
38+
`updated_ms`, optional `finished_ms` / `output` / `success`, and a
39+
`progress` log. The Cancellation path also propagates a real cancellation
40+
token into the child loop via `AgentLoop::execute_with_session`, so the
41+
signal honors existing LLM-streaming yield points.
42+
- Added `InMemorySubagentTaskTracker` and `SubagentProgressEntry` to the
43+
public crate-root re-exports of `a3s-code-core` alongside the existing
44+
`SubagentStatus` / `SubagentTaskSnapshot` types.
45+
46+
### Changed
47+
48+
- Marked `SubagentStatus` `#[non_exhaustive]` so future variants can be added
49+
without a major version bump.
50+
- Reshaped the Node SDK type layout to survive `napi-rs` regeneration. The
51+
build now writes generated declarations to `generated.d.ts`; hand-authored
52+
types that mirror JSON wire shapes (`ToolErrorKind`, `VerificationStatus`,
53+
`VerificationCheck`, `VerificationReport`, `ToolArtifact`) now live in
54+
`extra-types.d.ts`; the published `index.d.ts` is a small hand-authored
55+
aggregator that re-exports both. The `types` field in `package.json` still
56+
points at `index.d.ts`, so consumer imports are unchanged. A new
57+
`npm run test:types` script type-checks the aggregator to guard against
58+
future regressions.
59+
60+
### Fixed
61+
62+
- Fixed `TaskExecutor::execute` and `execute_background` so the emitted
63+
`SubagentStart` carries the real parent session id (previously
64+
`String::new()`), and `execute_background` returns the same `task_id`
65+
that appears in lifecycle events (previously a throwaway id). The
66+
background path also pre-emits `SubagentStart` synchronously so callers
67+
that query the tracker immediately after scheduling do not race the
68+
spawned task.
69+
70+
### Breaking
71+
72+
- `TaskExecutor::execute`, `execute_parallel`, and `execute_background` now
73+
take an additional `parent_session_id: Option<&str>` (or
74+
`Option<String>` for the background variant) so the emitted lifecycle
75+
events can be correctly associated with the parent session. Direct
76+
callers of `TaskExecutor` need to pass `None` (or the parent session id)
77+
to keep current behavior.
78+
- `register_task_with_mcp` gained a trailing
79+
`subagent_tracker: Option<Arc<InMemorySubagentTaskTracker>>` parameter so
80+
the session bootstrap path can share a single tracker Arc with the
81+
executor and the live `AgentSession`. Pass `None` to opt out.
82+
883
## [3.1.0] - 2026-05-23
984

1085
### Added

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,29 @@ Intent -> Context -> Action -> Observation -> Verification -> Compaction
3333

3434
Everything else is an extension of that loop.
3535

36+
### What's new in 3.2
37+
38+
- **Subagent task tracker** — every delegated child run is now observable
39+
through a queryable view fed by the existing `subagent_start` /
40+
`subagent_progress` / `subagent_end` event stream. The new
41+
`AgentSession::subagent_task(id)`, `subagent_tasks()`, and
42+
`pending_subagent_tasks()` APIs (mirrored on Node and Python) let
43+
dashboards introspect child runs without scanning `run_events()`.
44+
- **Mid-task progress milestones** — the child loop forwarder now
45+
synthesizes `SubagentProgress` events for `tool_completed` and
46+
`turn_completed`, so callers see intermediate state instead of just
47+
Start → End.
48+
- **Cancel by task id**`AgentSession::cancel_subagent_task(id)`
49+
(and `session.cancelSubagentTask` / `session.cancel_subagent_task`
50+
on the SDKs) interrupts an in-flight delegated run without
51+
cancelling the parent. A late `SubagentEnd` from a cancelled child
52+
does not downgrade the terminal status — it stays `Cancelled`.
53+
54+
Full migration notes are in [CHANGELOG.md](./CHANGELOG.md). The
55+
`TaskExecutor` signature additions and the `SubagentStatus` variant
56+
addition are the only breaking changes; `SubagentStatus` is now
57+
`#[non_exhaustive]` so future variants are non-breaking.
58+
3659
### What's new in 3.0
3760

3861
- **Cloud-native workspace**`S3WorkspaceBackend` with ETag
@@ -1115,6 +1138,20 @@ Core delegation primitives:
11151138
- `task` — run one focused delegated child run
11161139
- `parallel_task` — run independent delegated child runs concurrently
11171140

1141+
Once a child run is in flight, the parent session can observe and steer
1142+
it through the subagent task tracker:
1143+
1144+
| Operation | Rust | Node | Python |
1145+
|---|---|---|---|
1146+
| Look up a task by id | `session.subagent_task(id)` | `session.subagentTask(id)` | `session.subagent_task(id)` |
1147+
| List subagent tasks (this session) | `session.subagent_tasks()` | `session.subagentTasks()` | `session.subagent_tasks()` |
1148+
| List only in-flight subagent tasks | `session.pending_subagent_tasks()` | `session.pendingSubagentTasks()` | `session.pending_subagent_tasks()` |
1149+
| Observe mid-task milestones | `subagent_progress` in `run_events()` | same | same |
1150+
| Cancel an in-flight task | `session.cancel_subagent_task(id)` | `session.cancelSubagentTask(id)` | `session.cancel_subagent_task(id)` |
1151+
1152+
The tracker is a materialized view over the existing event stream; the
1153+
stream remains the authoritative record.
1154+
11181155
Built-in subagents are available through these primitives and through automatic
11191156
delegation:
11201157

core/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "a3s-code-core"
3-
version = "3.1.0"
3+
version = "3.2.0"
44
edition = "2021"
55
authors = ["A3S Lab Team"]
66
license = "MIT"

core/src/subagent_task_tracker.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ use tokio_util::sync::CancellationToken;
1313

1414
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
1515
#[serde(rename_all = "snake_case")]
16+
#[non_exhaustive]
1617
pub enum SubagentStatus {
1718
Running,
1819
Completed,

sdk/node/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "a3s-code-node"
3-
version = "3.1.0"
3+
version = "3.2.0"
44
edition = "2021"
55
authors = ["A3S Lab Team"]
66
license = "MIT"
@@ -11,7 +11,7 @@ description = "A3S Code Node.js bindings - Native addon via napi-rs"
1111
crate-type = ["cdylib"]
1212

1313
[dependencies]
14-
a3s-code-core = { version = "3.1.0", path = "../../core", features = ["ahp", "s3"] }
14+
a3s-code-core = { version = "3.2.0", path = "../../core", features = ["ahp", "s3"] }
1515
napi = { version = "2", features = ["async", "napi6", "serde-json"] }
1616
napi-derive = "2"
1717
tokio = { version = "1.35", features = ["full"] }

sdk/node/examples/package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/node/package-lock.json

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/node/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@a3s-lab/code",
3-
"version": "3.1.0",
3+
"version": "3.2.0",
44
"description": "A3S Code - Native Node.js bindings for the coding-agent runtime",
55
"main": "index.js",
66
"types": "index.d.ts",
@@ -43,11 +43,11 @@
4343
"test:helpers": "node test-helpers.mjs"
4444
},
4545
"optionalDependencies": {
46-
"@a3s-lab/code-darwin-arm64": "3.1.0",
47-
"@a3s-lab/code-linux-x64-gnu": "3.1.0",
48-
"@a3s-lab/code-linux-x64-musl": "3.1.0",
49-
"@a3s-lab/code-linux-arm64-gnu": "3.1.0",
50-
"@a3s-lab/code-linux-arm64-musl": "3.1.0",
51-
"@a3s-lab/code-win32-x64-msvc": "3.1.0"
46+
"@a3s-lab/code-darwin-arm64": "3.2.0",
47+
"@a3s-lab/code-linux-x64-gnu": "3.2.0",
48+
"@a3s-lab/code-linux-x64-musl": "3.2.0",
49+
"@a3s-lab/code-linux-arm64-gnu": "3.2.0",
50+
"@a3s-lab/code-linux-arm64-musl": "3.2.0",
51+
"@a3s-lab/code-win32-x64-msvc": "3.2.0"
5252
}
5353
}

sdk/python/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "a3s-code-py"
3-
version = "3.1.0"
3+
version = "3.2.0"
44
edition = "2021"
55
authors = ["A3S Lab Team"]
66
license = "MIT"
@@ -12,7 +12,7 @@ name = "a3s_code"
1212
crate-type = ["cdylib"]
1313

1414
[dependencies]
15-
a3s-code-core = { version = "3.1.0", path = "../../core", features = ["ahp", "s3"] }
15+
a3s-code-core = { version = "3.2.0", path = "../../core", features = ["ahp", "s3"] }
1616
pyo3 = "0.23"
1717
tokio = { version = "1.35", features = ["full"] }
1818
serde_json = "1.0"

0 commit comments

Comments
 (0)