diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml deleted file mode 100644 index be7ef46..0000000 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ /dev/null @@ -1,69 +0,0 @@ -name: Bug Report -description: Tell us about a regression or defect in the ACP Python SDK. -title: "bug: " -labels: ["bug"] -body: - - type: markdown - attributes: - value: > - Thanks for filing a detailed bug. Fill out every section so we can - reproduce the issue quickly and keep the SDK solid. - - - type: textarea - id: summary - attributes: - label: Summary - description: What went wrong? Keep it short but specific. - placeholder: "Streaming updates stop after the second prompt…" - validations: - required: true - - - type: textarea - id: repro - attributes: - label: Reproduction steps - description: > - Commands, code, or payloads that trigger the bug. Include any relevant - input files or snippets (redact secrets). - validations: - required: true - - - type: textarea - id: expected - attributes: - label: Expected result - placeholder: "Tool call should finish and emit a completed status…" - validations: - required: true - - - type: textarea - id: actual - attributes: - label: Actual result - placeholder: "Agent hangs and no further session/update payloads arrive…" - validations: - required: true - - - type: input - id: versions - attributes: - label: Versions / environment - description: > - Include SDK version, ACP schema tag (if pinned), Python version, and OS. - placeholder: "sdk 0.5.1 (schema v0.4.7), Python 3.12.2 on macOS 14.4" - validations: - required: true - - - type: textarea - id: logs - attributes: - label: Logs & screenshots - description: Paste relevant stack traces, JSON snippets, or console output. - render: shell - - - type: checkboxes - id: willing-to-pr - attributes: - label: Open to submitting a fix? - options: - - label: I’m willing to open a PR for this bug. diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml deleted file mode 100644 index 9495c0b..0000000 --- a/.github/ISSUE_TEMPLATE/config.yml +++ /dev/null @@ -1,8 +0,0 @@ -blank_issues_enabled: false -contact_links: - - name: Ask a question - url: https://github.com/agentclientprotocol/python-sdk/discussions/new?category=q-a - about: Usage questions, architecture ideas, and doc clarifications live best in Discussions. - - name: Read the docs - url: https://agentclientprotocol.github.io/python-sdk/ - about: The published docs cover quickstart steps, contrib helpers, and release workflows. diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml deleted file mode 100644 index bd17e70..0000000 --- a/.github/ISSUE_TEMPLATE/feature-request.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: Feature Request -description: Pitch an improvement for the ACP Python SDK docs, runtime, or tooling. -title: "feat: " -labels: ["enhancement"] -body: - - type: markdown - attributes: - value: > - Feature requests work best when they focus on the problem first. Tell us - what you’re trying to achieve and why existing APIs aren’t enough. - - - type: textarea - id: problem - attributes: - label: Problem statement - description: > - What use case is blocked? Include relevant transports, helpers, or user - journeys. - placeholder: "Need a helper to batch tool call updates when streaming…" - validations: - required: true - - - type: textarea - id: proposal - attributes: - label: Proposed solution - description: > - Sketch the API or behaviour you’d like to see. Code snippets welcome. - validations: - required: true - - - type: textarea - id: alternatives - attributes: - label: Alternatives considered - description: > - Mention workarounds you’ve tried or other approaches we should weigh. - - - type: textarea - id: extra - attributes: - label: Additional context - description: Links, screenshots, related issues, etc. - - - type: checkboxes - id: willing-to-help - attributes: - label: Can you help build it? - options: - - label: I can contribute code or docs for this request. diff --git a/.github/actions/setup-python-env/action.yml b/.github/actions/setup-python-env/action.yml deleted file mode 100644 index 3df4963..0000000 --- a/.github/actions/setup-python-env/action.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: "Setup Python Environment" -description: "Set up Python environment for the given Python version" - -inputs: - python-version: - description: "Python version to use" - required: true - default: "3.12" - uv-version: - description: "uv version to use" - required: true - default: "0.6.14" - -runs: - using: "composite" - steps: - - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 - with: - python-version: ${{ inputs.python-version }} - - - name: Install uv - uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e - with: - version: ${{ inputs.uv-version }} - enable-cache: "true" - cache-suffix: ${{ matrix.python-version }} - - - name: Install Python dependencies - run: uv sync --all-extras --all-groups --frozen - shell: bash diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md deleted file mode 100644 index 8b7b80b..0000000 --- a/.github/pull_request_template.md +++ /dev/null @@ -1,35 +0,0 @@ -## Summary - - - - -## Related issues - - - - -## Testing - - - - -## Docs & screenshots - - - - -## Checklist - -- [ ] Conventional Commit title (e.g. `feat:`, `fix:`). -- [ ] Tests cover the change or are not required (explain above). -- [ ] Docs/examples updated when behaviour is user-facing. -- [ ] Schema regenerations (`make gen-all`) are called out if applicable. diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 4e40a81..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,74 +0,0 @@ -name: Main - -on: - push: - branches: - - main - pull_request: - types: [opened, synchronize, reopened, ready_for_review] - -jobs: - quality: - runs-on: ubuntu-latest - steps: - - name: Check out - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 - - - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 - with: - path: ~/.cache/prek - key: prek-${{ hashFiles('.pre-commit-config.yaml') }} - - - name: Set up the environment - uses: ./.github/actions/setup-python-env - - - name: Run checks - run: make check - - tests-and-type-check: - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] - fail-fast: false - defaults: - run: - shell: bash - steps: - - name: Check out - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 - - - name: Set up the environment - uses: ./.github/actions/setup-python-env - with: - python-version: ${{ matrix.python-version }} - - - name: Run tests - run: make test - - - name: Check typing - run: make check - - check-docs: - runs-on: ubuntu-latest - steps: - - name: Check out - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 - - - name: Set up the environment - uses: ./.github/actions/setup-python-env - - - name: Check if documentation can be built - run: make docs-test - - check-links: - runs-on: ubuntu-latest - steps: - - name: Check out - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 - - - name: Link Checker - id: lychee - uses: lycheeverse/lychee-action@1ef33e2493308e49729a7789ddd73e7f8bed8f45 - with: - fail: false diff --git a/.github/workflows/on-release-main.yml b/.github/workflows/on-release-main.yml deleted file mode 100644 index 5e1bba1..0000000 --- a/.github/workflows/on-release-main.yml +++ /dev/null @@ -1,74 +0,0 @@ -name: release-main - -on: - release: - types: [published] - -jobs: - set-version: - runs-on: ubuntu-24.04 - steps: - - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 - - - name: Export tag - id: vars - run: echo tag=${GITHUB_REF#refs/*/} >> $GITHUB_OUTPUT - if: ${{ github.event_name == 'release' }} - - - name: Update project version - run: | - sed -i "s/^version = \".*\"/version = \"$RELEASE_VERSION\"/" pyproject.toml - env: - RELEASE_VERSION: ${{ steps.vars.outputs.tag }} - if: ${{ github.event_name == 'release' }} - - - name: Upload updated pyproject.toml - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 - with: - name: pyproject-toml - path: pyproject.toml - - publish: - runs-on: ubuntu-latest - needs: [set-version] - steps: - - name: Check out - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 - - - name: Set up the environment - uses: ./.github/actions/setup-python-env - - - name: Download updated pyproject.toml - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 - with: - name: pyproject-toml - - - name: Build package - run: uv build - - - name: Publish package - run: uv publish - env: - UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }} - - deploy-docs: - needs: publish - runs-on: ubuntu-latest - steps: - - name: Check out - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 - - - 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 diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 88ea146..0000000 --- a/.gitignore +++ /dev/null @@ -1,218 +0,0 @@ -docs/source - -# From https://raw.githubusercontent.com/github/gitignore/main/Python.gitignore - -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[codz] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -wheels/ -share/python-wheels/ -*.egg-info/ -.installed.cfg -*.egg -MANIFEST - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.nox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*.cover -*.py.cover -.hypothesis/ -.pytest_cache/ -cover/ - -# Translations -*.mo -*.pot - -# Django stuff: -*.log -local_settings.py -db.sqlite3 -db.sqlite3-journal - -# Flask stuff: -instance/ -.webassets-cache - -# Scrapy stuff: -.scrapy - -# Sphinx documentation -docs/_build/ - -# PyBuilder -.pybuilder/ -target/ - -# Jupyter Notebook -.ipynb_checkpoints - -# IPython -profile_default/ -ipython_config.py - -# pyenv -# For a library or package, you might want to ignore these files since the code is -# intended to run in multiple environments; otherwise, check them in: -# .python-version - -# pipenv -# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. -# However, in case of collaboration, if having platform-specific dependencies or dependencies -# having no cross-platform support, pipenv may install dependencies that don't work, or not -# install all needed dependencies. -#Pipfile.lock - -# UV -# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control. -# This is especially recommended for binary packages to ensure reproducibility, and is more -# commonly ignored for libraries. -#uv.lock - -# poetry -# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. -# This is especially recommended for binary packages to ensure reproducibility, and is more -# commonly ignored for libraries. -# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control -#poetry.lock -#poetry.toml - -# pdm -# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. -# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python. -# https://pdm-project.org/en/latest/usage/project/#working-with-version-control -#pdm.lock -#pdm.toml -.pdm-python -.pdm-build/ - -# pixi -# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control. -#pixi.lock -# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one -# in the .venv directory. It is recommended not to include this directory in version control. -.pixi - -# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm -__pypackages__/ - -# Celery stuff -celerybeat-schedule -celerybeat.pid - -# SageMath parsed files -*.sage.py - -# Environments -.env -.envrc -.venv -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ - -# Spyder project settings -.spyderproject -.spyproject - -# Rope project settings -.ropeproject - -# mkdocs documentation -/site - -# mypy -.mypy_cache/ -.dmypy.json -dmypy.json - -# Pyre type checker -.pyre/ - -# pytype static type analyzer -.pytype/ - -# Cython debug symbols -cython_debug/ - -# PyCharm -# JetBrains specific template is maintained in a separate JetBrains.gitignore that can -# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore -# and can be added to the global gitignore or merged into this file. For a more nuclear -# option (not recommended) you can uncomment the following to ignore the entire idea folder. -#.idea/ - -# Abstra -# Abstra is an AI-powered process automation framework. -# Ignore directories containing user credentials, local state, and settings. -# Learn more at https://abstra.io/docs -.abstra/ - -# Visual Studio Code -# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore -# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore -# and can be added to the global gitignore or merged into this file. However, if you prefer, -# you could uncomment the following to ignore the entire vscode folder -# .vscode/ - -# Ruff stuff: -.ruff_cache/ - -# PyPI configuration file -.pypirc - -# Cursor -# Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to -# exclude from AI features like autocomplete and code analysis. Recommended for sensitive data -# refer to https://docs.cursor.com/context/ignore-files -.cursorignore -.cursorindexingignore - -# Marimo -marimo/_static/ -marimo/_lsp/ -__marimo__/ - -# .zed -.zed/ - -# others -reference/ -.DS_Store diff --git a/tests/real_user/__init__.py b/.nojekyll similarity index 100% rename from tests/real_user/__init__.py rename to .nojekyll diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml deleted file mode 100644 index 40b46dc..0000000 --- a/.pre-commit-config.yaml +++ /dev/null @@ -1,23 +0,0 @@ -repos: - - repo: https://github.com/pre-commit/pre-commit-hooks - rev: "v5.0.0" - hooks: - - id: check-case-conflict - - id: check-merge-conflict - - id: check-toml - - id: check-yaml - - id: check-json - exclude: ^.devcontainer/devcontainer.json - - id: pretty-format-json - exclude: ^.devcontainer/devcontainer.json - args: [--autofix, --no-sort-keys] - - id: end-of-file-fixer - - id: trailing-whitespace - - - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.12.7" - hooks: - - id: ruff-check - args: [ --exit-non-zero-on-fix ] - exclude: ^src/acp/(meta|schema)\.py$ - - id: ruff-format diff --git a/404.html b/404.html new file mode 100644 index 0000000..d4e3ab1 --- /dev/null +++ b/404.html @@ -0,0 +1,482 @@ + + + +
+ + + + + + + + + + + + + + + + + + +
-
-
-# Agent Client Protocol (Python)
-
-Build ACP-compliant agents and clients in Python with generated schema models, asyncio transports, helper builders, and runnable demos.
-
-> Releases track the upstream ACP schema; contributions that tighten coverage or tooling are always welcome.
-
-## Install
-
-```bash
-pip install agent-client-protocol
-# or
-uv add agent-client-protocol
-```
-
-## At a glance
-
-- **Spec parity:** Generated Pydantic models in `acp.schema` track every ACP release so payloads stay valid.
-- **Runtime ergonomics:** Async base classes, stdio JSON-RPC plumbing, and lifecycle helpers keep custom agents tiny.
-- **Examples ready:** Streaming, permissions, Gemini bridge, and duet demos live under `examples/`.
-- **Helper builders:** `acp.helpers` mirrors the Go/TS SDK APIs for content blocks, tool calls, and session updates.
-- **Contrib utilities:** Session accumulators, tool call trackers, and permission brokers share patterns from real deployments.
-
-## Who benefits
-
-- Agent authors who need typed models, helper builders, and event-stream ergonomics for ACP-compatible assistants.
-- Client integrators embedding ACP parties inside Python applications or wrapping existing CLIs via stdio.
-- Tooling teams experimenting with permission flows, streaming UX, or Gemini bridges without re-implementing transports.
-See real adopters like kimi-cli in the [Use Cases list](https://agentclientprotocol.github.io/python-sdk/use-cases/).
-
-## How to get started
-
-- Follow the [Quickstart guide](https://agentclientprotocol.github.io/python-sdk/quickstart/) for installation, echo-agent validation, editor wiring (e.g. Zed), and programmatic launch recipes.
-- Browse the [example gallery](https://github.com/agentclientprotocol/python-sdk/tree/main/examples) to see progressively richer integrations you can copy or extend.
-- Skim the [docs hub](https://agentclientprotocol.github.io/python-sdk/) for focused references on contrib helpers, releasing, and transport details.
-
-## Quick links
-
-| Need | Link |
-|--------------------|------------------------------------------------------------------------|
-| Docs hub |