diff --git a/.github/workflows/on-release-main.yml b/.github/workflows/on-release-main.yml index 5e1bba1..620606a 100644 --- a/.github/workflows/on-release-main.yml +++ b/.github/workflows/on-release-main.yml @@ -4,6 +4,15 @@ on: release: types: [published] +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: true + jobs: set-version: runs-on: ubuntu-24.04 @@ -51,7 +60,7 @@ jobs: env: UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }} - deploy-docs: + build-docs: needs: publish runs-on: ubuntu-latest steps: @@ -61,14 +70,21 @@ jobs: - name: Set up the environment uses: ./.github/actions/setup-python-env - - name: Deploy documentation - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GIT_AUTHOR_NAME: acp-bot - GIT_AUTHOR_EMAIL: noreply@github.com - GIT_COMMITTER_NAME: acp-bot - GIT_COMMITTER_EMAIL: noreply@github.com - run: | - git config user.name "$GIT_AUTHOR_NAME" - git config user.email "$GIT_AUTHOR_EMAIL" - uv run mkdocs gh-deploy --force --remote-branch gh-pages --remote-name origin + - name: Build site + run: uv run mkdocs build -f mkdocs.yml --clean + + - name: Upload Pages artifact + uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1 + with: + path: site + + deploy-docs: + needs: build-docs + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5 diff --git a/docs/migration-guide-0.8.md b/docs/migration-guide-0.8.md new file mode 100644 index 0000000..efb1d61 --- /dev/null +++ b/docs/migration-guide-0.8.md @@ -0,0 +1,37 @@ +# Migrating to ACP Python SDK 0.8 + +ACP 0.8 keeps the 0.7 public surface but aligns the SDK with the latest ACP schema and tightens a few runtime behaviors. Most teams only need to review the updated schema and terminal helpers. This guide calls out the changes that can affect downstream agents, clients, and tests. + +## 1. ACP schema bumped to 0.10.8 + +- Regenerate any internal copies of ACP schema-derived artifacts against 0.10.8. +- If you vendor schema types, run `make gen-all` or your equivalent pipeline. +- Helper types now include `SessionInfoUpdate` in the `SessionUpdate` union, so downstream code that exhaustively matches update variants should include it. + +## 2. `TerminalHandle` removal + +`TerminalHandle` is no longer part of the public API. If you referenced it directly, switch to the request/response models and terminal IDs returned by `CreateTerminalRequest`/`CreateTerminalResponse`. + +Typical adjustment: + +```python +# Before (0.7.x) +handle = await conn.create_terminal(...) +await conn.terminal_output(session_id=..., terminal_id=handle.id) + +# After (0.8.x) +resp = await conn.create_terminal(...) +await conn.terminal_output(session_id=..., terminal_id=resp.terminal_id) +``` + +## 3. Larger default stdio buffer limits + +The default stdio reader limit is now 50MB to support multimodal payloads. If you run in memory-constrained environments, explicitly set `stdio_buffer_limit_bytes` when calling `run_agent`. + +```python +await run_agent(agent, stdio_buffer_limit_bytes=2 * 1024 * 1024) +``` + +## 4. Documentation and quickstart updates + +Docs and settings examples have been refreshed for ACP 0.10.8. If you maintain internal onboarding material, sync it with the latest docs in `docs/`. diff --git a/mkdocs.yml b/mkdocs.yml index e74cd49..6a7a76e 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -14,6 +14,7 @@ nav: - Experimental Contrib: contrib.md - Releasing: releasing.md - 0.7 Migration Guide: migration-guide-0.7.md + - 0.8 Migration Guide: migration-guide-0.8.md plugins: - search - mkdocstrings: diff --git a/pyproject.toml b/pyproject.toml index c31938f..fc62423 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "agent-client-protocol" -version = "0.7.1" +version = "0.8.0" description = "A Python implement of Agent Client Protocol (ACP, by Zed Industries)" authors = [ { name = "Chojan Shang", email = "psiace@apache.org" }, diff --git a/uv.lock b/uv.lock index 3bc3ea2..ad9247d 100644 --- a/uv.lock +++ b/uv.lock @@ -4,7 +4,7 @@ requires-python = ">=3.10, <3.15" [[package]] name = "agent-client-protocol" -version = "0.7.1" +version = "0.8.0" source = { editable = "." } dependencies = [ { name = "pydantic" },