From b24198d47b423ecef8a815b044d9e384aae584cc Mon Sep 17 00:00:00 2001 From: zhanghanduo Date: Thu, 29 Oct 2026 23:21:03 +0800 Subject: [PATCH] chore(release): prepare AgentCore 0.18.2 --- CHANGELOG.md | 10 ++++++++++ changes/83.fix.md | 1 - changes/trajectory-cache-consistency.fix.md | 1 - pyproject.toml | 2 +- uv.lock | 2 +- 5 files changed, 12 insertions(+), 4 deletions(-) delete mode 100644 changes/83.fix.md delete mode 100644 changes/trajectory-cache-consistency.fix.md diff --git a/CHANGELOG.md b/CHANGELOG.md index bae86e8..8d2e6ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,16 @@ the GitHub Release body, so a release with no entry here fails. Versioning follows [docs/versioning.md](docs/versioning.md). +## [0.18.2] - 2026-10-29 + +### Fixed + +- Trajectory JSON snapshots now follow the loop's actual conversation history, including capped and blocked native tool calls, synthetic replies, post-processed result bodies, observer injections, rollbacks and compaction. Awaited trajectory hooks prevent immediate invalid-call results from appearing before their assistant event. +- Assistant messages preserve the normalizer's reasoning policy and native content blocks. Consumers that need flattened text should use `agent_core.messages.text_of(message["content"])`. JSONL continues to retain execution events and original tool outputs, including events later removed from conversation history. +- Routine snapshots reuse the spool prefix by reference. Nested in-place edits are checked against redacted rendered lines after compactor runs, compaction/rollback notices, and on completion or cancellation; inline image base64 is never hashed. Unannounced nested edits by other observers appear at the next deep check or final snapshot. Image redaction, configured body limits and coalesced atomic writes remain in place. +- Diagnostic annotations follow a copied assistant only when it shares mutable content/tool-call containers or blocks with exactly one vanished source and has no competing copy. Cached strings cannot transfer another turn's usage or stop reason. Ambiguous, deep-copied and scalar-only copied messages retain their diagnostics in JSONL when enabled; direct identity bindings remain intact. +- Cyclic or otherwise unencodable host metadata preserves the message's position with `trace_error` instead of freezing later snapshots. Source deduplication uses object identity without recursively comparing message dictionaries. Completion and cancellation force the latest snapshot, and a cancellation after completion preserves the terminal snapshot. + ## [0.18.1] - 2026-10-14 ### Fixed diff --git a/changes/83.fix.md b/changes/83.fix.md deleted file mode 100644 index 241abf4..0000000 --- a/changes/83.fix.md +++ /dev/null @@ -1 +0,0 @@ -Fix trajectory JSON snapshots to follow the loop's actual message history, including capped and blocked native tool calls, synthetic replies, post-processed tool bodies, observer injections, rollbacks and compaction. Await trajectory hooks so immediate invalid-call results cannot precede their assistant event. Preserve normalizer-controlled reasoning and native content blocks, diagnostic fields, image redaction, configured body limits and coalesced atomic writes; flush the current history on completion or cancellation. JSONL remains the event log with original tool outputs, including events later removed from conversation history. Snapshots re-render only new or changed messages, keep diagnostics through compaction copies, tolerate non-JSON values, and are not overwritten by a cancellation after completion. diff --git a/changes/trajectory-cache-consistency.fix.md b/changes/trajectory-cache-consistency.fix.md deleted file mode 100644 index e4e6b81..0000000 --- a/changes/trajectory-cache-consistency.fix.md +++ /dev/null @@ -1 +0,0 @@ -Fix trajectory snapshots missing edits nested inside existing history containers. Routine snapshots still reuse the spool prefix by reference comparison; after a compactor run, a rollback or context-limit notice, and on completion or cancellation, the redacted rendered lines are compared as well, so inline image data is never hashed. Recover diagnostic annotations after history copies only when the copy shares mutable content/tool-call containers or blocks with exactly one vanished assistant, accounting for assistants without diagnostics and resumed history; cached strings cannot transfer another turn's usage or stop reason. Source deduplication uses object identity so cyclic metadata never triggers recursive message comparisons. Messages with unencodable host metadata (cycles, non-string keys) keep their place in the snapshot with a `trace_error` instead of failing it. Ambiguous or scalar-only copied annotations remain available in the JSONL event log when enabled. diff --git a/pyproject.toml b/pyproject.toml index 728547c..1562b9e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "apodex-agent-core" -version = "0.18.1" +version = "0.18.2" description = "Shared, product-neutral runtime primitives for Apodex agents" readme = "README.md" license = "Apache-2.0" diff --git a/uv.lock b/uv.lock index cdf9069..edbde9a 100644 --- a/uv.lock +++ b/uv.lock @@ -50,7 +50,7 @@ wheels = [ [[package]] name = "apodex-agent-core" -version = "0.18.1" +version = "0.18.2" source = { editable = "." } dependencies = [ { name = "anthropic", extra = ["bedrock"] },