chore(release): cut amplifier-agent 0.17.0 - #158
Merged
Conversation
The vertical rail in the "Architecture at a glance" diagram runs at column 49, but the corner closing it sat at column 47, so the box did not meet its own edge. Cosmetic, but it is the first diagram a visitor sees. 🤖 Generated with [Amplifier](https://github.com/microsoft/amplifier) Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
Coordinated engine + TypeScript SDK release. amplifier-agent moves to 0.17.0 and amplifier-agent-ts to 0.8.0; both must be upgraded together, because PROTOCOL_VERSION moved 0.3.0 -> 0.4.0 and a wrapper pinned to the old value refuses the new engine with protocol_version_mismatch. The protocol bump is purely additive: no existing field changed shape or meaning. The minor moves so a host can gate on the new usage fields being present. amplifier-agent-py is not part of this release. It has never been published, so its 0.3.0 manifest is not yet behind any tag; its source already carries the 0.4.0 protocol pin and ships with that package's first release. Restructures the changelog block this release publishes: the two duplicate ### Fixed headings under [Unreleased] are merged, and --prompt-file moves to ### Added, where a new CLI flag belongs. 🤖 Generated with [Amplifier](https://github.com/microsoft/amplifier) Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Coordinated engine + TypeScript SDK release.
amplifier-agent(engine + CLI)v0.17.0amplifier-agent-ts(TS SDK)wrapper-v0.8.0amplifier-agent-py(Py SDK)What changed for a user
Real per-turn token and cost usage.
metadata.tokensIn/tokensOutwere hardcoded to0on every path; they now report what the turn actually spent, summed across every LLM call including those made by delegated sub-agents. Three newmetadatafields carry the rest:cacheReadTokens,cacheWriteTokens, andcostUsd(a decimal string, never a float). Both wrapper SDKs surface the same data on their terminal events via a newUsagetype, and gain astderr_tail_bytesoption.amplifier-agent run --prompt-file <path>. A second transport for the prompt, since argv is a bounded channel (Linux caps a single element at 131072 bytes, Windows the whole command line at 32767 chars) and a prompt is unbounded caller data. Wrappers spill automatically at 16384 bytes.HTTP face:
usage.prompt_tokenswas over-reported.extract_usage()summedinputTokens + cacheReadTokens + cacheWriteTokenson the premise the three are disjoint. They are not —inputTokensis the gross total and already contains the cache reads, so the cached portion was counted twice. On a cache-heavy turn, the normal case in an agent loop, that roughly doubles the reported prompt for any OpenAI-compatible client doing its own cost arithmetic.Plus wrapper fixes:
--is now emitted before the positional prompt (a prompt beginning with-previously died with exit 2 before the engine booted), thestderr_tailcap measures UTF-8 bytes rather than characters, and the Python wrapper's MCP config spill writes with an explicit UTF-8 encoding instead of inheriting the locale codepage.Scope of impact
Coordinated cross-component.
PROTOCOL_VERSIONmoved0.3.0->0.4.0, purely additive — no existing field changed shape or meaning; the minor moves so a host can gate on the new fields being present.The engine and
amplifier-agent-tsmust be upgraded together. A wrapper pinned to0.3.0refuses an engine on0.4.0withprotocol_version_mismatch, and the reverse holds. The refusal is deliberate and loud; there is no silent-degradation path.amplifier-agent-pyis not part of this release. It has never been published, so its0.3.0manifest is not behind any tag. Its source already carries the0.4.0pin and the prompt-spill and MCP-encoding fixes; those reach consumers with that package's first release, which will also be the first exercise of its OIDC trusted-publisher handshake.amplifier-app-paperclipandamplifier-app-nanoclawcaret-pinamplifier-agent-ts, so a minor wrapper release propagates to them without action.Downstream:
amplifier-app-opencodeneeds a floor bumpYes —
MIN_AGENT_VERSIONshould move0.16.0->0.17.0, in a separate PR on that repo.Worth being precise about why, because the obvious reason is the wrong one. opencode drives the engine through the HTTP face only —
serve,/v1/models,/v1/chat/completions,/v1/skills,/v1/modes. It never spawns through a wrapper SDK, so it has no stdio protocol handshake andPROTOCOL_VERSIONdoes not gate it.What does reach it is the
prompt_tokensfix above, on/v1/chat/completions— opencode's own surface. Its Python launcher does not parse theusageblock, but opencode's TUI displays those counts, so below this floor a user sees a prompt figure inflated by the entire cached portion of every turn.That makes this a correctness bump rather than a capability requirement: opencode runs against 0.16.0, it just reports wrong numbers. It is a stronger rationale than the last two floor moves, which
prereqs.pyrecords as pure adoption bumps to keepAGENT_PINNED_REFfrom drifting a release behind.Verification
make verifypasses clean on this branch — lint, format, pyright,verify-codegen(spec.md + 32 schemas),verify-wheel(6 checks against a builtamplifier_agent-0.17.0-py3-none-any.whl),verify-parity(Python and TypeScript runners agree on every fixture), and the TypeScript build plus 157 wrapper tests across 21 files.tests/e2e/is not covered here or in CI, since e2e and evals need a DTU.Merging this publishes nothing
The tag push is the release, and it happens after merge.
install.shandamplifier-agent updateinstall from git and resolve "latest" through the GitHub Releases API, whichrelease-notes.ymlcreates on tag push.🤖 Generated with Amplifier