Releasing the client libraries
Every client library is released from one v* tag. The publish-contracts.yml workflow runs the
drift and version checks, then publishes each package at the tag’s version:
| Library | Package | Published to |
|---|---|---|
| TypeScript | @re-cinq/agent-contracts | npm |
| Go | packages/agent-contracts-go | Go module tag on this repo |
| Java | com.re-cinq:agent-contracts | GitHub Packages (Maven) |
| Python | re-cinq-agent-contracts | PyPI |
| C# | ReCinq.AgentContracts | GitHub Packages (NuGet) |
| Rust | agent-contracts | Not published; consumers depend on the git tag |
No registry secret is stored in the repository. npm and PyPI use trusted publishing over OIDC, and
GitHub Packages uses the workflow’s GITHUB_TOKEN.
One-time setup
Section titled “One-time setup”-
npm. The first publish of
@re-cinq/agent-contractsis done once with a token. Then add a trusted publisher on npmjs.com for this repository andpublish-contracts.yml. -
PyPI. On pypi.org, under Account → Publishing, add a pending GitHub publisher:
Field Value PyPI project name re-cinq-agent-contractsOwner re-cinqRepository name ai-agent-subsystemWorkflow name publish-contracts.ymlEnvironment name empty The first tag creates the project and the pending publisher becomes a normal one.
-
GitHub Packages. After the first release, set the Maven and NuGet packages to public in the organisation’s package settings and link them to this repository. Consumers still need a GitHub token with
read:packagesto download them.
Cutting a release
Section titled “Cutting a release”-
Set every package to the new version in a release PR, and move the
UnreleasedCHANGELOG entries under that version:Terminal window scripts/bump-contracts-version.sh 0.16.0 -
Merge the PR once CI is green, then tag
main:Terminal window git tag v0.16.0git push origin v0.16.0 -
Watch the Publish agent-contracts run.
scripts/check-contracts-version.shfails the run when a manifest does not match the tag, so a missed bump never republishes an old version.
A failure in the npm or PyPI job almost always means the registry’s trusted-publisher setting is wrong, not the workflow.