From 8fa24893b2c99dcacc858d40f2a3249db5b2841c Mon Sep 17 00:00:00 2001 From: AEP Developer Date: Sat, 15 Aug 2026 01:47:40 +0800 Subject: [PATCH 1/2] Enable official package publishing --- .github/workflows/publish.yml | 68 +++++++++++++++++++++++++++++++++++ README.md | 13 +++++-- pyproject.toml | 2 +- 3 files changed, 79 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..45b8948 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,68 @@ +name: Publish to PyPI +on: + release: + types: [published] + push: + branches: [main] + paths: [pyproject.toml] +permissions: + contents: read + id-token: write +jobs: + publish: + if: github.event_name == 'push' || startsWith(github.ref, 'refs/tags/v') + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/aep-ai-sdk + steps: + - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 + - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 + with: + python-version: "3.12" + - run: python -m pip install build pytest + - run: python -m pip install -e . + - run: python -m pytest + - name: Verify tag matches package version + if: github.event_name == 'release' + run: python -c "import os,tomllib; v=tomllib.load(open('pyproject.toml','rb'))['project']['version']; assert os.environ['GITHUB_REF_NAME']==f'v{v}'" + - run: python -m build + - uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # release/v1 + with: + packages-dir: dist/ + verify-install: + needs: publish + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 + - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 + with: + python-version: "3.12" + - name: Read package version + id: package + run: echo "version=$(python -c \"import tomllib; print(tomllib.load(open('pyproject.toml','rb'))['project']['version'])\")" >> "$GITHUB_OUTPUT" + - name: Wait for PyPI propagation + env: + PACKAGE_VERSION: ${{ steps.package.outputs.version }} + run: | + for attempt in {1..20}; do + if curl --fail --silent "https://pypi.org/pypi/aep-ai-sdk/${PACKAGE_VERSION}/json" >/dev/null; then + exit 0 + fi + if [ "$attempt" -eq 20 ]; then + echo "aep-ai-sdk ${PACKAGE_VERSION} did not become available on PyPI" >&2 + exit 1 + fi + sleep 15 + done + - name: Install the public distribution + env: + PACKAGE_VERSION: ${{ steps.package.outputs.version }} + run: python -m pip install --no-cache-dir "aep-ai-sdk==${PACKAGE_VERSION}" + - name: Import and run an installed-package example + run: >- + python -c "from aep_sdk import AEPClient; + transport=lambda method,url,headers,body:(201,{'id':'agent-1','status':'REGISTERED'}); + client=AEPClient(base_url='https://api.aep.example',api_key='aep_dev_distribution_smoke_key',transport=transport); + agent=client.register_agent(name='Distribution Smoke Agent',endpoint='https://agent.example/a2a',protocol_version='1.0',capabilities=['capability-1']); + assert agent['status']=='REGISTERED'; print(agent['id'])" diff --git a/README.md b/README.md index 57fb3e1..11b37ea 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Official Python Developer SDK from **AEP AI**. ## Release status -`v0.1.0-developer-preview` is a **Developer Preview**. It includes: Agent Identity; +`0.2.0` is a **Developer Preview**. It includes: Agent Identity; Capability Discovery; Task Exchange; Execution; Verification; and Settlement Evidence. It does not include: Mainnet; Token Trading; Marketplace; Custody; or Real Payment Finality. APIs and compatibility guarantees may change. @@ -23,10 +23,13 @@ Real Payment Finality. APIs and compatibility guarantees may change. ## Install ```bash -python -m pip install aep-sdk +python -m pip install aep-ai-sdk ``` -Python 3.12 or newer is recommended. +The distribution name is `aep-ai-sdk`; the Python import remains `aep_sdk`. +Python 3.12 or newer is required. +For reproducible deployments, pin `aep-ai-sdk==0.2.0`. Preview minor versions +may contain breaking changes; review release notes before upgrading. ## Quick Start @@ -62,6 +65,10 @@ public HTTP. Loopback HTTP is development-only and requires the explicit See [aep-examples](https://github.com/aepai-org/aep-examples) and the [SDK guide](https://aepai.org/developers). +Obtain `AEP_API_KEY` through the documented +[Preview credential issuance process](https://aepai.org/developers/access). +There is no public Developer Console. + ## Development ```bash diff --git a/pyproject.toml b/pyproject.toml index ad33fc1..2f7dacf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ requires = ["setuptools>=80.0.0"] build-backend = "setuptools.build_meta" [project] -name = "aep-sdk" +name = "aep-ai-sdk" version = "0.2.0" description = "Python SDK for the AEP Developer Preview" readme = "README.md" From e493e9ffb6d5201f31b92de0561d524ca7625573 Mon Sep 17 00:00:00 2001 From: AEP Developer Date: Sat, 15 Aug 2026 02:01:50 +0800 Subject: [PATCH 2/2] Fix Registry install verification --- .github/workflows/publish.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 45b8948..7e625ee 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -40,7 +40,9 @@ jobs: python-version: "3.12" - name: Read package version id: package - run: echo "version=$(python -c \"import tomllib; print(tomllib.load(open('pyproject.toml','rb'))['project']['version'])\")" >> "$GITHUB_OUTPUT" + run: | + version=$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml','rb'))['project']['version'])") + echo "version=$version" >> "$GITHUB_OUTPUT" - name: Wait for PyPI propagation env: PACKAGE_VERSION: ${{ steps.package.outputs.version }}