Skip to content

release: 0.4.0 — breakdown and expiring_soon - #11

Merged
agentx402-bot merged 1 commit into
mainfrom
release/0.4.0
Aug 2, 2026
Merged

release: 0.4.0 — breakdown and expiring_soon#11
agentx402-bot merged 1 commit into
mainfrom
release/0.4.0

Conversation

@agentx402-bot

Copy link
Copy Markdown
Contributor

Cuts @agentx402-ai/core 0.4.0. Publishing happens via the GitHub Release → OIDC trusted-publishing path once this lands and v0.4.0 is tagged.

What ships

Two optional UsageBlock fields the platform already emits on the wire, added in #10 and unreleased until now. Both additive — no existing export changes, and a 0.3.0 consumer keeps working against a service that sends them.

Releasing them is what makes them usable: a client cannot read a field its own types do not declare. AgentRAG emits both today, so until this lands every consumer has to widen the type by hand.

  • breakdown — composite-op itemization for responses whose charge has more than one leg (an AgentRAG ask that also ingested pages). The top-level price_usd remains the primary verb's price on the taken path, so a request's total is price_usd plus the sum of breakdown[].price_usd — these are not alternatives, and adding them is not double-counting. Absent on single-leg ops rather than an empty array, so breakdown?.length is never 0.
  • expiring_soon — literal true when the collection named by the response is inside the final 24 hours of its lifetime, omitted otherwise. Never false, so presence is the only correct test.

Also fixed

package-lock.json carried 0.2.0 while package.json was at 0.3.0 — a drift introduced at the 0.3.0 release and unnoticed since. Both now move together.

Verification

npm ci --ignore-scripts exit 0 (the publish workflow runs exactly this, so a lock/package mismatch would have failed the release), biome ci clean across 19 files, npm run build exit 0, 147 tests passing.

The publish workflow's own guard — tag must equal package.json version — simulated locally: tag v0.4.0 vs v0.4.0, match.

Mirrors two optional UsageBlock fields the platform already emits on the wire.
Both are additive; no existing export changes and a 0.3.0 consumer keeps working.

Releasing them is what makes them usable: a client cannot read a field its own
types do not declare, and AgentRAG emits both today, so until now every consumer
had to widen the type by hand.

`breakdown` itemizes a composite op's extra charge legs — the top-level
price_usd stays the primary verb's price, so a request's total is price_usd plus
the sum of breakdown[].price_usd. `expiring_soon` is present as literal true
only inside a collection's final 24h, so presence is the only correct test.

Also brings package-lock.json's version field along: it still read 0.2.0, a
drift introduced at the 0.3.0 release.
@agentx402-bot
agentx402-bot merged commit 679bef6 into main Aug 2, 2026
3 checks passed
@agentx402-bot
agentx402-bot deleted the release/0.4.0 branch August 2, 2026 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant