Skip to content

feat: add python wasm release workflow#2409

Open
mehtarac wants to merge 3 commits into
strands-agents:mainfrom
mehtarac:wasm_release_wf
Open

feat: add python wasm release workflow#2409
mehtarac wants to merge 3 commits into
strands-agents:mainfrom
mehtarac:wasm_release_wf

Conversation

@mehtarac
Copy link
Copy Markdown
Member

@mehtarac mehtarac commented Jun 1, 2026

Description

The monorepo now produces three releasable packages: the TypeScript SDK (npm), Python 1.x (PyPI), and the new Python WASM 2.x (PyPI). The Python WASM package embeds a compiled .wasm binary from the TypeScript SDK and ships it as a single wheel. This PR adds the release workflow for that third package and prepares strands-py-wasm for PyPI publishing by resolving a direct URL dependency that PyPI rejects.

The existing Python 1.x workflow is tightened from python/v* to python/v1.* tags; it is scoped to the 1.x line and will be removed at EOL. A new workflow (python-wasm-pypi-publish-on-release.yml) handles python-wasm/v* releases with this pipeline:

  • validate TS (reuses typescript-ts-check.yml, typescript-ts-test.yml) →
  • validate Python (reuses wasm-py-check.yml) →
  • build WASM →
  • build wheel →
  • publish to PyPI.

The pgrayy-wasmtime dependency is switched from a git+https:// direct reference to a versioned PyPI package. PyPI's upload endpoint rejects direct URL references per PEP 440, so this change is required for publishing. Reference issue

Related Issues

Documentation PR

Type of Change

New feature

Testing

How have you tested the change? Verify that the changes do not break functionality or introduce warnings in consuming repositories: agents-docs, agents-tools, agents-cli

To verify locally that the wheel builds correctly:

npm ci
npm run build -w strands-ts
npm run build -w strands-wasm
cd strands-py-wasm
cp ../LICENSE.APACHE LICENSE.APACHE
sed -i 's/^version = .*/version = "2.0.0rc1"/' pyproject.toml
hatch build
unzip -p dist/*.whl '*.dist-info/METADATA' | grep Requires-Dist
# Should show pgrayy-wasmtime>=46.0.7 with no git URLs
unzip -l dist/*.whl | grep wasm
  • I ran hatch run prepare

Checklist

  • I have read the CONTRIBUTING document
  • I have added any necessary tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • I have added an appropriate example to the documentation to outline the feature, or no new docs are needed
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@mehtarac mehtarac marked this pull request as ready for review June 1, 2026 14:58
Comment thread strands-py-wasm/pyproject.toml Outdated
Comment on lines +15 to +23
call-ts-check:
if: github.event_name == 'workflow_dispatch' || startsWith(github.event.release.tag_name, 'python-wasm/v')
uses: ./.github/workflows/typescript-ts-check.yml
permissions:
contents: read
with:
ref: ${{ github.event.release.target_commitish || github.sha }}

call-ts-test:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to run these?

@github-actions github-actions Bot added size/m and removed size/m labels Jun 1, 2026
@mehtarac mehtarac deployed to auto-approve June 1, 2026 22:00 — with GitHub Actions Active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants