Skip to content

Commit d58c76d

Browse files
build: wire dual-package publish, release-please two-package mode, and rye workspace
Updates the generator/automation scripts to match the slim/heavy package layout from the previous commit: - bin/publish-pypi: builds + publishes both packages (heavy from adk/ via $AGENTEX_PYPI_TOKEN, slim from root via $AGENTEX_SDK_CLIENT_PYPI_TOKEN). Falls back to $PYPI_TOKEN for back-compat if either dedicated token is unset. - release-please-config.json: two-package mode with components (agentex-sdk-client at root, agentex-sdk at adk/). include-component- in-tag flipped to true so tags become e.g. agentex-sdk-client-v0.11.4 and agentex-sdk-v0.11.4 (avoids tag collisions across packages). - .release-please-manifest.json: seed adk/ at the current version 0.11.4 so release-please's first run produces matched releases. - pyproject.toml: [tool.rye.workspace] members = ["adk"] so `rye sync` installs both packages editably for development. Not yet covered (deferred — needs Stainless dashboard + PyPI maintainer): - .github/workflows/ci.yml currently runs `rye build` for root only. Needs an additional `cd adk && rye build` step. - scripts/utils/upload-artifact.sh uploads dist/*.whl to Stainless preview storage — single-wheel flow, only covers root. Lower priority since it's a preview channel, not the canonical release. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 4ad75f7 commit d58c76d

4 files changed

Lines changed: 38 additions & 4 deletions

File tree

.release-please-manifest.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
".": "0.11.4"
2+
".": "0.11.4",
3+
"adk": "0.11.4"
34
}

bin/publish-pypi

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,28 @@
11
#!/usr/bin/env bash
22

3+
# Publish both the Stainless-managed slim `agentex-sdk-client` package (built
4+
# from this repo's root) and the hand-authored `agentex-sdk` ADK overlay
5+
# (built from adk/). The two packages contribute disjoint files to the same
6+
# `agentex.*` namespace; `agentex-sdk` pins `agentex-sdk-client` as a runtime
7+
# dep so installing `agentex-sdk` transitively pulls in the slim client.
8+
#
9+
# Tokens:
10+
# - $AGENTEX_SDK_CLIENT_PYPI_TOKEN — auths publishing the slim client
11+
# - $AGENTEX_PYPI_TOKEN (alias $PYPI_TOKEN for back-compat) — auths
12+
# publishing the heavy ADK overlay (which continues to claim the
13+
# `agentex-sdk` name on PyPI)
14+
315
set -eux
16+
17+
# Heavy ADK overlay (adk/) — keeps the existing `agentex-sdk` PyPI name.
18+
(
19+
cd adk
20+
mkdir -p dist
21+
rye build --clean
22+
rye publish --yes --token="${AGENTEX_PYPI_TOKEN:-$PYPI_TOKEN}"
23+
)
24+
25+
# Slim Stainless-managed client (root) — new `agentex-sdk-client` PyPI name.
426
mkdir -p dist
527
rye build --clean
6-
rye publish --yes --token=$PYPI_TOKEN
28+
rye publish --yes --token="${AGENTEX_SDK_CLIENT_PYPI_TOKEN:-$PYPI_TOKEN}"

pyproject.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ dev = [
5555
# The `agentex` CLI entry point ships from the ADK package — see
5656
# `adk/pyproject.toml`. The slim client has no CLI surface.
5757

58+
[tool.rye.workspace]
59+
# `rye sync` from the root installs both this slim package and the ADK
60+
# overlay editably, so contributors can iterate on agentex.lib.* code while
61+
# also seeing the Stainless-generated client.
62+
members = ["adk"]
63+
5864
[tool.rye]
5965
managed = true
6066
# version pins are in requirements-dev.lock

release-please-config.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
{
22
"packages": {
3-
".": {}
3+
".": {
4+
"component": "agentex-sdk-client"
5+
},
6+
"adk": {
7+
"component": "agentex-sdk"
8+
}
49
},
510
"$schema": "https://raw.githubusercontent.com/stainless-api/release-please/main/schemas/config.json",
611
"include-v-in-tag": true,
7-
"include-component-in-tag": false,
12+
"include-component-in-tag": true,
813
"versioning": "prerelease",
914
"prerelease": true,
1015
"bump-minor-pre-major": true,

0 commit comments

Comments
 (0)