acp-sdk 0.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- acp_sdk-0.0.1/.github/ISSUE_TEMPLATE/bug_report.md +38 -0
- acp_sdk-0.0.1/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
- acp_sdk-0.0.1/.github/workflows/check-lock.yml +25 -0
- acp_sdk-0.0.1/.github/workflows/main-checks.yml +13 -0
- acp_sdk-0.0.1/.github/workflows/publish-pypi.yml +55 -0
- acp_sdk-0.0.1/.github/workflows/pull-request-checks.yml +8 -0
- acp_sdk-0.0.1/.github/workflows/shared.yml +69 -0
- acp_sdk-0.0.1/.gitignore +167 -0
- acp_sdk-0.0.1/.pre-commit-config.yaml +24 -0
- acp_sdk-0.0.1/.python-version +1 -0
- acp_sdk-0.0.1/CLAUDE.md +114 -0
- acp_sdk-0.0.1/CODE_OF_CONDUCT.md +128 -0
- acp_sdk-0.0.1/CONTRIBUTING.md +66 -0
- acp_sdk-0.0.1/LICENSE +22 -0
- acp_sdk-0.0.1/PKG-INFO +46 -0
- acp_sdk-0.0.1/README.md +9 -0
- acp_sdk-0.0.1/RELEASE.md +15 -0
- acp_sdk-0.0.1/SECURITY.md +14 -0
- acp_sdk-0.0.1/examples/README.md +5 -0
- acp_sdk-0.0.1/examples/clients/simple-chatbot/.python-version +1 -0
- acp_sdk-0.0.1/examples/clients/simple-chatbot/README.MD +110 -0
- acp_sdk-0.0.1/examples/clients/simple-chatbot/mcp_simple_chatbot/.env.example +1 -0
- acp_sdk-0.0.1/examples/clients/simple-chatbot/mcp_simple_chatbot/main.py +430 -0
- acp_sdk-0.0.1/examples/clients/simple-chatbot/mcp_simple_chatbot/requirements.txt +4 -0
- acp_sdk-0.0.1/examples/clients/simple-chatbot/mcp_simple_chatbot/servers_config.json +12 -0
- acp_sdk-0.0.1/examples/clients/simple-chatbot/mcp_simple_chatbot/test.db +0 -0
- acp_sdk-0.0.1/examples/clients/simple-chatbot/pyproject.toml +48 -0
- acp_sdk-0.0.1/examples/clients/simple-chatbot/uv.lock +555 -0
- acp_sdk-0.0.1/examples/highlevel/agents.py +26 -0
- acp_sdk-0.0.1/examples/highlevel/complex_inputs.py +30 -0
- acp_sdk-0.0.1/examples/highlevel/desktop.py +25 -0
- acp_sdk-0.0.1/examples/highlevel/echo.py +30 -0
- acp_sdk-0.0.1/examples/highlevel/memory.py +349 -0
- acp_sdk-0.0.1/examples/highlevel/parameter_descriptions.py +21 -0
- acp_sdk-0.0.1/examples/highlevel/readme-quickstart.py +18 -0
- acp_sdk-0.0.1/examples/highlevel/screenshot.py +29 -0
- acp_sdk-0.0.1/examples/highlevel/simple_echo.py +14 -0
- acp_sdk-0.0.1/examples/highlevel/text_me.py +72 -0
- acp_sdk-0.0.1/examples/highlevel/unicode_example.py +64 -0
- acp_sdk-0.0.1/examples/servers/simple-prompt/.python-version +1 -0
- acp_sdk-0.0.1/examples/servers/simple-prompt/README.md +55 -0
- acp_sdk-0.0.1/examples/servers/simple-prompt/mcp_simple_prompt/__init__.py +1 -0
- acp_sdk-0.0.1/examples/servers/simple-prompt/mcp_simple_prompt/__main__.py +5 -0
- acp_sdk-0.0.1/examples/servers/simple-prompt/mcp_simple_prompt/server.py +127 -0
- acp_sdk-0.0.1/examples/servers/simple-prompt/pyproject.toml +47 -0
- acp_sdk-0.0.1/examples/servers/simple-resource/.python-version +1 -0
- acp_sdk-0.0.1/examples/servers/simple-resource/README.md +48 -0
- acp_sdk-0.0.1/examples/servers/simple-resource/mcp_simple_resource/__init__.py +1 -0
- acp_sdk-0.0.1/examples/servers/simple-resource/mcp_simple_resource/__main__.py +5 -0
- acp_sdk-0.0.1/examples/servers/simple-resource/mcp_simple_resource/server.py +84 -0
- acp_sdk-0.0.1/examples/servers/simple-resource/pyproject.toml +47 -0
- acp_sdk-0.0.1/examples/servers/simple-tool/.python-version +1 -0
- acp_sdk-0.0.1/examples/servers/simple-tool/README.md +48 -0
- acp_sdk-0.0.1/examples/servers/simple-tool/mcp_simple_tool/__init__.py +1 -0
- acp_sdk-0.0.1/examples/servers/simple-tool/mcp_simple_tool/__main__.py +5 -0
- acp_sdk-0.0.1/examples/servers/simple-tool/mcp_simple_tool/server.py +97 -0
- acp_sdk-0.0.1/examples/servers/simple-tool/pyproject.toml +47 -0
- acp_sdk-0.0.1/pyproject.toml +86 -0
- acp_sdk-0.0.1/src/acp/__init__.py +138 -0
- acp_sdk-0.0.1/src/acp/cli/__init__.py +6 -0
- acp_sdk-0.0.1/src/acp/cli/claude.py +139 -0
- acp_sdk-0.0.1/src/acp/cli/cli.py +471 -0
- acp_sdk-0.0.1/src/acp/client/__init__.py +0 -0
- acp_sdk-0.0.1/src/acp/client/__main__.py +79 -0
- acp_sdk-0.0.1/src/acp/client/session.py +372 -0
- acp_sdk-0.0.1/src/acp/client/sse.py +142 -0
- acp_sdk-0.0.1/src/acp/client/stdio.py +153 -0
- acp_sdk-0.0.1/src/acp/py.typed +0 -0
- acp_sdk-0.0.1/src/acp/server/__init__.py +3 -0
- acp_sdk-0.0.1/src/acp/server/__main__.py +50 -0
- acp_sdk-0.0.1/src/acp/server/highlevel/__init__.py +9 -0
- acp_sdk-0.0.1/src/acp/server/highlevel/agents/__init__.py +5 -0
- acp_sdk-0.0.1/src/acp/server/highlevel/agents/agent_manager.py +110 -0
- acp_sdk-0.0.1/src/acp/server/highlevel/agents/base.py +22 -0
- acp_sdk-0.0.1/src/acp/server/highlevel/agents/templates.py +23 -0
- acp_sdk-0.0.1/src/acp/server/highlevel/context.py +185 -0
- acp_sdk-0.0.1/src/acp/server/highlevel/exceptions.py +25 -0
- acp_sdk-0.0.1/src/acp/server/highlevel/prompts/__init__.py +4 -0
- acp_sdk-0.0.1/src/acp/server/highlevel/prompts/base.py +167 -0
- acp_sdk-0.0.1/src/acp/server/highlevel/prompts/manager.py +50 -0
- acp_sdk-0.0.1/src/acp/server/highlevel/prompts/prompt_manager.py +33 -0
- acp_sdk-0.0.1/src/acp/server/highlevel/resources/__init__.py +23 -0
- acp_sdk-0.0.1/src/acp/server/highlevel/resources/base.py +48 -0
- acp_sdk-0.0.1/src/acp/server/highlevel/resources/resource_manager.py +94 -0
- acp_sdk-0.0.1/src/acp/server/highlevel/resources/templates.py +80 -0
- acp_sdk-0.0.1/src/acp/server/highlevel/resources/types.py +185 -0
- acp_sdk-0.0.1/src/acp/server/highlevel/server.py +704 -0
- acp_sdk-0.0.1/src/acp/server/highlevel/tools/__init__.py +4 -0
- acp_sdk-0.0.1/src/acp/server/highlevel/tools/base.py +83 -0
- acp_sdk-0.0.1/src/acp/server/highlevel/tools/tool_manager.py +53 -0
- acp_sdk-0.0.1/src/acp/server/highlevel/utilities/__init__.py +1 -0
- acp_sdk-0.0.1/src/acp/server/highlevel/utilities/func_metadata.py +210 -0
- acp_sdk-0.0.1/src/acp/server/highlevel/utilities/logging.py +43 -0
- acp_sdk-0.0.1/src/acp/server/highlevel/utilities/types.py +54 -0
- acp_sdk-0.0.1/src/acp/server/lowlevel/__init__.py +3 -0
- acp_sdk-0.0.1/src/acp/server/lowlevel/helper_types.py +9 -0
- acp_sdk-0.0.1/src/acp/server/lowlevel/server.py +628 -0
- acp_sdk-0.0.1/src/acp/server/models.py +17 -0
- acp_sdk-0.0.1/src/acp/server/session.py +315 -0
- acp_sdk-0.0.1/src/acp/server/sse.py +175 -0
- acp_sdk-0.0.1/src/acp/server/stdio.py +83 -0
- acp_sdk-0.0.1/src/acp/server/websocket.py +61 -0
- acp_sdk-0.0.1/src/acp/shared/__init__.py +0 -0
- acp_sdk-0.0.1/src/acp/shared/context.py +14 -0
- acp_sdk-0.0.1/src/acp/shared/exceptions.py +14 -0
- acp_sdk-0.0.1/src/acp/shared/memory.py +87 -0
- acp_sdk-0.0.1/src/acp/shared/progress.py +40 -0
- acp_sdk-0.0.1/src/acp/shared/session.py +409 -0
- acp_sdk-0.0.1/src/acp/shared/version.py +3 -0
- acp_sdk-0.0.1/src/acp/types.py +1258 -0
- acp_sdk-0.0.1/tests/__init__.py +0 -0
- acp_sdk-0.0.1/tests/client/__init__.py +0 -0
- acp_sdk-0.0.1/tests/client/test_config.py +52 -0
- acp_sdk-0.0.1/tests/client/test_session.py +100 -0
- acp_sdk-0.0.1/tests/client/test_stdio.py +38 -0
- acp_sdk-0.0.1/tests/conftest.py +6 -0
- acp_sdk-0.0.1/tests/issues/test_100_tool_listing.py +35 -0
- acp_sdk-0.0.1/tests/issues/test_129_resource_templates.py +44 -0
- acp_sdk-0.0.1/tests/issues/test_141_resource_templates.py +118 -0
- acp_sdk-0.0.1/tests/issues/test_152_resource_mime_type.py +146 -0
- acp_sdk-0.0.1/tests/issues/test_176_progress_token.py +46 -0
- acp_sdk-0.0.1/tests/issues/test_88_random_error.py +111 -0
- acp_sdk-0.0.1/tests/server/__init__.py +0 -0
- acp_sdk-0.0.1/tests/server/fastmcp/__init__.py +0 -0
- acp_sdk-0.0.1/tests/server/fastmcp/prompts/__init__.py +0 -0
- acp_sdk-0.0.1/tests/server/fastmcp/prompts/test_base.py +206 -0
- acp_sdk-0.0.1/tests/server/fastmcp/prompts/test_manager.py +112 -0
- acp_sdk-0.0.1/tests/server/fastmcp/resources/__init__.py +0 -0
- acp_sdk-0.0.1/tests/server/fastmcp/resources/test_file_resources.py +119 -0
- acp_sdk-0.0.1/tests/server/fastmcp/resources/test_function_resources.py +138 -0
- acp_sdk-0.0.1/tests/server/fastmcp/resources/test_resource_manager.py +141 -0
- acp_sdk-0.0.1/tests/server/fastmcp/resources/test_resource_template.py +188 -0
- acp_sdk-0.0.1/tests/server/fastmcp/resources/test_resources.py +101 -0
- acp_sdk-0.0.1/tests/server/fastmcp/servers/__init__.py +0 -0
- acp_sdk-0.0.1/tests/server/fastmcp/servers/test_file_server.py +123 -0
- acp_sdk-0.0.1/tests/server/fastmcp/test_func_metadata.py +401 -0
- acp_sdk-0.0.1/tests/server/fastmcp/test_parameter_descriptions.py +30 -0
- acp_sdk-0.0.1/tests/server/fastmcp/test_server.py +744 -0
- acp_sdk-0.0.1/tests/server/fastmcp/test_tool_manager.py +322 -0
- acp_sdk-0.0.1/tests/server/test_read_resource.py +109 -0
- acp_sdk-0.0.1/tests/server/test_session.py +101 -0
- acp_sdk-0.0.1/tests/server/test_stdio.py +68 -0
- acp_sdk-0.0.1/tests/shared/test_memory.py +47 -0
- acp_sdk-0.0.1/tests/shared/test_session.py +126 -0
- acp_sdk-0.0.1/tests/shared/test_sse.py +254 -0
- acp_sdk-0.0.1/tests/test_examples.py +72 -0
- acp_sdk-0.0.1/tests/test_types.py +32 -0
- acp_sdk-0.0.1/uv.lock +786 -0
@@ -0,0 +1,38 @@
|
|
1
|
+
---
|
2
|
+
name: Bug report
|
3
|
+
about: Create a report to help us improve
|
4
|
+
title: ''
|
5
|
+
labels: ''
|
6
|
+
assignees: ''
|
7
|
+
|
8
|
+
---
|
9
|
+
|
10
|
+
**Describe the bug**
|
11
|
+
A clear and concise description of what the bug is.
|
12
|
+
|
13
|
+
**To Reproduce**
|
14
|
+
Steps to reproduce the behavior:
|
15
|
+
1. Go to '...'
|
16
|
+
2. Click on '....'
|
17
|
+
3. Scroll down to '....'
|
18
|
+
4. See error
|
19
|
+
|
20
|
+
**Expected behavior**
|
21
|
+
A clear and concise description of what you expected to happen.
|
22
|
+
|
23
|
+
**Screenshots**
|
24
|
+
If applicable, add screenshots to help explain your problem.
|
25
|
+
|
26
|
+
**Desktop (please complete the following information):**
|
27
|
+
- OS: [e.g. iOS]
|
28
|
+
- Browser [e.g. chrome, safari]
|
29
|
+
- Version [e.g. 22]
|
30
|
+
|
31
|
+
**Smartphone (please complete the following information):**
|
32
|
+
- Device: [e.g. iPhone6]
|
33
|
+
- OS: [e.g. iOS8.1]
|
34
|
+
- Browser [e.g. stock browser, safari]
|
35
|
+
- Version [e.g. 22]
|
36
|
+
|
37
|
+
**Additional context**
|
38
|
+
Add any other context about the problem here.
|
@@ -0,0 +1,20 @@
|
|
1
|
+
---
|
2
|
+
name: Feature request
|
3
|
+
about: Suggest an idea for this project
|
4
|
+
title: ''
|
5
|
+
labels: ''
|
6
|
+
assignees: ''
|
7
|
+
|
8
|
+
---
|
9
|
+
|
10
|
+
**Is your feature request related to a problem? Please describe.**
|
11
|
+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
12
|
+
|
13
|
+
**Describe the solution you'd like**
|
14
|
+
A clear and concise description of what you want to happen.
|
15
|
+
|
16
|
+
**Describe alternatives you've considered**
|
17
|
+
A clear and concise description of any alternative solutions or features you've considered.
|
18
|
+
|
19
|
+
**Additional context**
|
20
|
+
Add any other context or screenshots about the feature request here.
|
@@ -0,0 +1,25 @@
|
|
1
|
+
name: Check uv.lock
|
2
|
+
|
3
|
+
on:
|
4
|
+
pull_request:
|
5
|
+
paths:
|
6
|
+
- "pyproject.toml"
|
7
|
+
- "uv.lock"
|
8
|
+
push:
|
9
|
+
paths:
|
10
|
+
- "pyproject.toml"
|
11
|
+
- "uv.lock"
|
12
|
+
|
13
|
+
jobs:
|
14
|
+
check-lock:
|
15
|
+
runs-on: ubuntu-latest
|
16
|
+
steps:
|
17
|
+
- uses: actions/checkout@v4
|
18
|
+
|
19
|
+
- name: Install uv
|
20
|
+
run: |
|
21
|
+
curl -LsSf https://astral.sh/uv/install.sh | sh
|
22
|
+
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
23
|
+
|
24
|
+
- name: Check uv.lock is up to date
|
25
|
+
run: uv lock --check
|
@@ -0,0 +1,55 @@
|
|
1
|
+
name: Publishing
|
2
|
+
|
3
|
+
on:
|
4
|
+
release:
|
5
|
+
types: [published]
|
6
|
+
|
7
|
+
jobs:
|
8
|
+
release-build:
|
9
|
+
name: Build distribution
|
10
|
+
runs-on: ubuntu-latest
|
11
|
+
needs: [checks]
|
12
|
+
steps:
|
13
|
+
- uses: actions/checkout@v4
|
14
|
+
|
15
|
+
- name: Install uv
|
16
|
+
uses: astral-sh/setup-uv@v3
|
17
|
+
|
18
|
+
- name: "Set up Python"
|
19
|
+
uses: actions/setup-python@v5
|
20
|
+
with:
|
21
|
+
python-version-file: ".python-version"
|
22
|
+
|
23
|
+
- name: Install the project
|
24
|
+
run: uv sync --frozen --all-extras --dev
|
25
|
+
|
26
|
+
- name: Build
|
27
|
+
run: uv build
|
28
|
+
|
29
|
+
- name: Upload artifacts
|
30
|
+
uses: actions/upload-artifact@v4
|
31
|
+
with:
|
32
|
+
name: release-dists
|
33
|
+
path: dist/
|
34
|
+
|
35
|
+
checks:
|
36
|
+
uses: ./.github/workflows/shared.yml
|
37
|
+
|
38
|
+
pypi-publish:
|
39
|
+
name: Upload release to PyPI
|
40
|
+
runs-on: ubuntu-latest
|
41
|
+
environment: release
|
42
|
+
needs:
|
43
|
+
- release-build
|
44
|
+
permissions:
|
45
|
+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
|
46
|
+
|
47
|
+
steps:
|
48
|
+
- name: Retrieve release distributions
|
49
|
+
uses: actions/download-artifact@v4
|
50
|
+
with:
|
51
|
+
name: release-dists
|
52
|
+
path: dist/
|
53
|
+
|
54
|
+
- name: Publish package distributions to PyPI
|
55
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
@@ -0,0 +1,69 @@
|
|
1
|
+
name: Shared Checks
|
2
|
+
|
3
|
+
on:
|
4
|
+
workflow_call:
|
5
|
+
|
6
|
+
jobs:
|
7
|
+
format:
|
8
|
+
runs-on: ubuntu-latest
|
9
|
+
steps:
|
10
|
+
- uses: actions/checkout@v4
|
11
|
+
|
12
|
+
- name: Install uv
|
13
|
+
uses: astral-sh/setup-uv@v3
|
14
|
+
with:
|
15
|
+
enable-cache: true
|
16
|
+
|
17
|
+
- name: "Set up Python"
|
18
|
+
uses: actions/setup-python@v5
|
19
|
+
with:
|
20
|
+
python-version-file: ".python-version"
|
21
|
+
|
22
|
+
- name: Install the project
|
23
|
+
run: uv sync --frozen --all-extras --dev
|
24
|
+
|
25
|
+
- name: Run ruff format check
|
26
|
+
run: uv run --frozen ruff check .
|
27
|
+
|
28
|
+
typecheck:
|
29
|
+
runs-on: ubuntu-latest
|
30
|
+
steps:
|
31
|
+
- uses: actions/checkout@v4
|
32
|
+
|
33
|
+
- name: Install uv
|
34
|
+
uses: astral-sh/setup-uv@v3
|
35
|
+
with:
|
36
|
+
enable-cache: true
|
37
|
+
|
38
|
+
- name: "Set up Python"
|
39
|
+
uses: actions/setup-python@v5
|
40
|
+
with:
|
41
|
+
python-version-file: ".python-version"
|
42
|
+
|
43
|
+
- name: Install the project
|
44
|
+
run: uv sync --frozen --all-extras --dev
|
45
|
+
|
46
|
+
- name: Run pyright
|
47
|
+
run: uv run --frozen pyright
|
48
|
+
|
49
|
+
build:
|
50
|
+
runs-on: ubuntu-latest
|
51
|
+
|
52
|
+
steps:
|
53
|
+
- uses: actions/checkout@v4
|
54
|
+
|
55
|
+
- name: Install uv
|
56
|
+
uses: astral-sh/setup-uv@v3
|
57
|
+
with:
|
58
|
+
enable-cache: true
|
59
|
+
|
60
|
+
- name: "Set up Python"
|
61
|
+
uses: actions/setup-python@v5
|
62
|
+
with:
|
63
|
+
python-version-file: ".python-version"
|
64
|
+
|
65
|
+
- name: Install the project
|
66
|
+
run: uv sync --frozen --all-extras --dev
|
67
|
+
|
68
|
+
- name: Run pytest
|
69
|
+
run: uv run --frozen pytest
|
acp_sdk-0.0.1/.gitignore
ADDED
@@ -0,0 +1,167 @@
|
|
1
|
+
.DS_Store
|
2
|
+
|
3
|
+
# Byte-compiled / optimized / DLL files
|
4
|
+
__pycache__/
|
5
|
+
*.py[cod]
|
6
|
+
*$py.class
|
7
|
+
|
8
|
+
# C extensions
|
9
|
+
*.so
|
10
|
+
|
11
|
+
# Distribution / packaging
|
12
|
+
.Python
|
13
|
+
build/
|
14
|
+
develop-eggs/
|
15
|
+
dist/
|
16
|
+
downloads/
|
17
|
+
eggs/
|
18
|
+
.eggs/
|
19
|
+
lib/
|
20
|
+
lib64/
|
21
|
+
parts/
|
22
|
+
sdist/
|
23
|
+
var/
|
24
|
+
wheels/
|
25
|
+
share/python-wheels/
|
26
|
+
*.egg-info/
|
27
|
+
.installed.cfg
|
28
|
+
*.egg
|
29
|
+
MANIFEST
|
30
|
+
|
31
|
+
# PyInstaller
|
32
|
+
# Usually these files are written by a python script from a template
|
33
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
34
|
+
*.manifest
|
35
|
+
*.spec
|
36
|
+
|
37
|
+
# Installer logs
|
38
|
+
pip-log.txt
|
39
|
+
pip-delete-this-directory.txt
|
40
|
+
|
41
|
+
# Unit test / coverage reports
|
42
|
+
htmlcov/
|
43
|
+
.tox/
|
44
|
+
.nox/
|
45
|
+
.coverage
|
46
|
+
.coverage.*
|
47
|
+
.cache
|
48
|
+
nosetests.xml
|
49
|
+
coverage.xml
|
50
|
+
*.cover
|
51
|
+
*.py,cover
|
52
|
+
.hypothesis/
|
53
|
+
.pytest_cache/
|
54
|
+
cover/
|
55
|
+
|
56
|
+
# Translations
|
57
|
+
*.mo
|
58
|
+
*.pot
|
59
|
+
|
60
|
+
# Django stuff:
|
61
|
+
*.log
|
62
|
+
local_settings.py
|
63
|
+
db.sqlite3
|
64
|
+
db.sqlite3-journal
|
65
|
+
|
66
|
+
# Flask stuff:
|
67
|
+
instance/
|
68
|
+
.webassets-cache
|
69
|
+
|
70
|
+
# Scrapy stuff:
|
71
|
+
.scrapy
|
72
|
+
|
73
|
+
# Sphinx documentation
|
74
|
+
docs/_build/
|
75
|
+
|
76
|
+
# PyBuilder
|
77
|
+
.pybuilder/
|
78
|
+
target/
|
79
|
+
|
80
|
+
# Jupyter Notebook
|
81
|
+
.ipynb_checkpoints
|
82
|
+
|
83
|
+
# IPython
|
84
|
+
profile_default/
|
85
|
+
ipython_config.py
|
86
|
+
|
87
|
+
# pyenv
|
88
|
+
# For a library or package, you might want to ignore these files since the code is
|
89
|
+
# intended to run in multiple environments; otherwise, check them in:
|
90
|
+
# .python-version
|
91
|
+
|
92
|
+
# pipenv
|
93
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
94
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
95
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
96
|
+
# install all needed dependencies.
|
97
|
+
#Pipfile.lock
|
98
|
+
|
99
|
+
# poetry
|
100
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
101
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
102
|
+
# commonly ignored for libraries.
|
103
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
104
|
+
#poetry.lock
|
105
|
+
|
106
|
+
# pdm
|
107
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
108
|
+
#pdm.lock
|
109
|
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
110
|
+
# in version control.
|
111
|
+
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
|
112
|
+
.pdm.toml
|
113
|
+
.pdm-python
|
114
|
+
.pdm-build/
|
115
|
+
|
116
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
117
|
+
__pypackages__/
|
118
|
+
|
119
|
+
# Celery stuff
|
120
|
+
celerybeat-schedule
|
121
|
+
celerybeat.pid
|
122
|
+
|
123
|
+
# SageMath parsed files
|
124
|
+
*.sage.py
|
125
|
+
|
126
|
+
# Environments
|
127
|
+
.env
|
128
|
+
.venv
|
129
|
+
env/
|
130
|
+
venv/
|
131
|
+
ENV/
|
132
|
+
env.bak/
|
133
|
+
venv.bak/
|
134
|
+
|
135
|
+
# Spyder project settings
|
136
|
+
.spyderproject
|
137
|
+
.spyproject
|
138
|
+
|
139
|
+
# Rope project settings
|
140
|
+
.ropeproject
|
141
|
+
|
142
|
+
# mkdocs documentation
|
143
|
+
/site
|
144
|
+
|
145
|
+
# mypy
|
146
|
+
.mypy_cache/
|
147
|
+
.dmypy.json
|
148
|
+
dmypy.json
|
149
|
+
|
150
|
+
# Pyre type checker
|
151
|
+
.pyre/
|
152
|
+
|
153
|
+
# pytype static type analyzer
|
154
|
+
.pytype/
|
155
|
+
|
156
|
+
# Cython debug symbols
|
157
|
+
cython_debug/
|
158
|
+
|
159
|
+
# PyCharm
|
160
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
161
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
162
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
163
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
164
|
+
#.idea/
|
165
|
+
|
166
|
+
# vscode
|
167
|
+
.vscode/
|
@@ -0,0 +1,24 @@
|
|
1
|
+
fail_fast: true
|
2
|
+
|
3
|
+
repos:
|
4
|
+
- repo: https://github.com/pre-commit/mirrors-prettier
|
5
|
+
rev: v3.1.0
|
6
|
+
hooks:
|
7
|
+
- id: prettier
|
8
|
+
types_or: [yaml, json5]
|
9
|
+
|
10
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
11
|
+
rev: v0.8.1
|
12
|
+
hooks:
|
13
|
+
- id: ruff-format
|
14
|
+
- id: ruff
|
15
|
+
args: [--fix, --exit-non-zero-on-fix]
|
16
|
+
|
17
|
+
- repo: local
|
18
|
+
hooks:
|
19
|
+
- id: uv-lock-check
|
20
|
+
name: Check uv.lock is up to date
|
21
|
+
entry: uv lock --check
|
22
|
+
language: system
|
23
|
+
files: ^(pyproject\.toml|uv\.lock)$
|
24
|
+
pass_filenames: false
|
@@ -0,0 +1 @@
|
|
1
|
+
3.10
|
acp_sdk-0.0.1/CLAUDE.md
ADDED
@@ -0,0 +1,114 @@
|
|
1
|
+
# Development Guidelines
|
2
|
+
|
3
|
+
This document contains critical information about working with this codebase. Follow these guidelines precisely.
|
4
|
+
|
5
|
+
## Core Development Rules
|
6
|
+
|
7
|
+
1. Package Management
|
8
|
+
- ONLY use uv, NEVER pip
|
9
|
+
- Installation: `uv add package`
|
10
|
+
- Running tools: `uv run tool`
|
11
|
+
- Upgrading: `uv add --dev package --upgrade-package package`
|
12
|
+
- FORBIDDEN: `uv pip install`, `@latest` syntax
|
13
|
+
|
14
|
+
2. Code Quality
|
15
|
+
- Type hints required for all code
|
16
|
+
- Public APIs must have docstrings
|
17
|
+
- Functions must be focused and small
|
18
|
+
- Follow existing patterns exactly
|
19
|
+
- Line length: 88 chars maximum
|
20
|
+
|
21
|
+
3. Testing Requirements
|
22
|
+
- Framework: `uv run pytest`
|
23
|
+
- Async testing: use anyio, not asyncio
|
24
|
+
- Coverage: test edge cases and errors
|
25
|
+
- New features require tests
|
26
|
+
- Bug fixes require regression tests
|
27
|
+
|
28
|
+
- For commits fixing bugs or adding features based on user reports add:
|
29
|
+
```bash
|
30
|
+
git commit --trailer "Reported-by:<name>"
|
31
|
+
```
|
32
|
+
Where `<name>` is the name of the user.
|
33
|
+
|
34
|
+
- For commits related to a Github issue, add
|
35
|
+
```bash
|
36
|
+
git commit --trailer "Github-Issue:#<number>"
|
37
|
+
```
|
38
|
+
- NEVER ever mention a `co-authored-by` or similar aspects. In particular, never
|
39
|
+
mention the tool used to create the commit message or PR.
|
40
|
+
|
41
|
+
## Pull Requests
|
42
|
+
|
43
|
+
- Create a detailed message of what changed. Focus on the high level description of
|
44
|
+
the problem it tries to solve, and how it is solved. Don't go into the specifics of the
|
45
|
+
code unless it adds clarity.
|
46
|
+
|
47
|
+
- Always add `jerome3o-anthropic` and `jspahrsummers` as reviewer.
|
48
|
+
|
49
|
+
- NEVER ever mention a `co-authored-by` or similar aspects. In particular, never
|
50
|
+
mention the tool used to create the commit message or PR.
|
51
|
+
|
52
|
+
## Python Tools
|
53
|
+
|
54
|
+
## Code Formatting
|
55
|
+
|
56
|
+
1. Ruff
|
57
|
+
- Format: `uv run ruff format .`
|
58
|
+
- Check: `uv run ruff check .`
|
59
|
+
- Fix: `uv run ruff check . --fix`
|
60
|
+
- Critical issues:
|
61
|
+
- Line length (88 chars)
|
62
|
+
- Import sorting (I001)
|
63
|
+
- Unused imports
|
64
|
+
- Line wrapping:
|
65
|
+
- Strings: use parentheses
|
66
|
+
- Function calls: multi-line with proper indent
|
67
|
+
- Imports: split into multiple lines
|
68
|
+
|
69
|
+
2. Type Checking
|
70
|
+
- Tool: `uv run pyright`
|
71
|
+
- Requirements:
|
72
|
+
- Explicit None checks for Optional
|
73
|
+
- Type narrowing for strings
|
74
|
+
- Version warnings can be ignored if checks pass
|
75
|
+
|
76
|
+
3. Pre-commit
|
77
|
+
- Config: `.pre-commit-config.yaml`
|
78
|
+
- Runs: on git commit
|
79
|
+
- Tools: Prettier (YAML/JSON), Ruff (Python)
|
80
|
+
- Ruff updates:
|
81
|
+
- Check PyPI versions
|
82
|
+
- Update config rev
|
83
|
+
- Commit config first
|
84
|
+
|
85
|
+
## Error Resolution
|
86
|
+
|
87
|
+
1. CI Failures
|
88
|
+
- Fix order:
|
89
|
+
1. Formatting
|
90
|
+
2. Type errors
|
91
|
+
3. Linting
|
92
|
+
- Type errors:
|
93
|
+
- Get full line context
|
94
|
+
- Check Optional types
|
95
|
+
- Add type narrowing
|
96
|
+
- Verify function signatures
|
97
|
+
|
98
|
+
2. Common Issues
|
99
|
+
- Line length:
|
100
|
+
- Break strings with parentheses
|
101
|
+
- Multi-line function calls
|
102
|
+
- Split imports
|
103
|
+
- Types:
|
104
|
+
- Add None checks
|
105
|
+
- Narrow string types
|
106
|
+
- Match existing patterns
|
107
|
+
|
108
|
+
3. Best Practices
|
109
|
+
- Check git status before commits
|
110
|
+
- Run formatters before type checks
|
111
|
+
- Keep changes minimal
|
112
|
+
- Follow existing patterns
|
113
|
+
- Document public APIs
|
114
|
+
- Test thoroughly
|
@@ -0,0 +1,128 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our
|
6
|
+
community a harassment-free experience for everyone, regardless of age, body
|
7
|
+
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
8
|
+
identity and expression, level of experience, education, socio-economic status,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity
|
10
|
+
and orientation.
|
11
|
+
|
12
|
+
We pledge to act and interact in ways that contribute to an open, welcoming,
|
13
|
+
diverse, inclusive, and healthy community.
|
14
|
+
|
15
|
+
## Our Standards
|
16
|
+
|
17
|
+
Examples of behavior that contributes to a positive environment for our
|
18
|
+
community include:
|
19
|
+
|
20
|
+
* Demonstrating empathy and kindness toward other people
|
21
|
+
* Being respectful of differing opinions, viewpoints, and experiences
|
22
|
+
* Giving and gracefully accepting constructive feedback
|
23
|
+
* Accepting responsibility and apologizing to those affected by our mistakes,
|
24
|
+
and learning from the experience
|
25
|
+
* Focusing on what is best not just for us as individuals, but for the
|
26
|
+
overall community
|
27
|
+
|
28
|
+
Examples of unacceptable behavior include:
|
29
|
+
|
30
|
+
* The use of sexualized language or imagery, and sexual attention or
|
31
|
+
advances of any kind
|
32
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
33
|
+
* Public or private harassment
|
34
|
+
* Publishing others' private information, such as a physical or email
|
35
|
+
address, without their explicit permission
|
36
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
37
|
+
professional setting
|
38
|
+
|
39
|
+
## Enforcement Responsibilities
|
40
|
+
|
41
|
+
Community leaders are responsible for clarifying and enforcing our standards of
|
42
|
+
acceptable behavior and will take appropriate and fair corrective action in
|
43
|
+
response to any behavior that they deem inappropriate, threatening, offensive,
|
44
|
+
or harmful.
|
45
|
+
|
46
|
+
Community leaders have the right and responsibility to remove, edit, or reject
|
47
|
+
comments, commits, code, wiki edits, issues, and other contributions that are
|
48
|
+
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
49
|
+
decisions when appropriate.
|
50
|
+
|
51
|
+
## Scope
|
52
|
+
|
53
|
+
This Code of Conduct applies within all community spaces, and also applies when
|
54
|
+
an individual is officially representing the community in public spaces.
|
55
|
+
Examples of representing our community include using an official e-mail address,
|
56
|
+
posting via an official social media account, or acting as an appointed
|
57
|
+
representative at an online or offline event.
|
58
|
+
|
59
|
+
## Enforcement
|
60
|
+
|
61
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
62
|
+
reported to the community leaders responsible for enforcement at
|
63
|
+
mcp-coc@anthropic.com.
|
64
|
+
All complaints will be reviewed and investigated promptly and fairly.
|
65
|
+
|
66
|
+
All community leaders are obligated to respect the privacy and security of the
|
67
|
+
reporter of any incident.
|
68
|
+
|
69
|
+
## Enforcement Guidelines
|
70
|
+
|
71
|
+
Community leaders will follow these Community Impact Guidelines in determining
|
72
|
+
the consequences for any action they deem in violation of this Code of Conduct:
|
73
|
+
|
74
|
+
### 1. Correction
|
75
|
+
|
76
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed
|
77
|
+
unprofessional or unwelcome in the community.
|
78
|
+
|
79
|
+
**Consequence**: A private, written warning from community leaders, providing
|
80
|
+
clarity around the nature of the violation and an explanation of why the
|
81
|
+
behavior was inappropriate. A public apology may be requested.
|
82
|
+
|
83
|
+
### 2. Warning
|
84
|
+
|
85
|
+
**Community Impact**: A violation through a single incident or series
|
86
|
+
of actions.
|
87
|
+
|
88
|
+
**Consequence**: A warning with consequences for continued behavior. No
|
89
|
+
interaction with the people involved, including unsolicited interaction with
|
90
|
+
those enforcing the Code of Conduct, for a specified period of time. This
|
91
|
+
includes avoiding interactions in community spaces as well as external channels
|
92
|
+
like social media. Violating these terms may lead to a temporary or
|
93
|
+
permanent ban.
|
94
|
+
|
95
|
+
### 3. Temporary Ban
|
96
|
+
|
97
|
+
**Community Impact**: A serious violation of community standards, including
|
98
|
+
sustained inappropriate behavior.
|
99
|
+
|
100
|
+
**Consequence**: A temporary ban from any sort of interaction or public
|
101
|
+
communication with the community for a specified period of time. No public or
|
102
|
+
private interaction with the people involved, including unsolicited interaction
|
103
|
+
with those enforcing the Code of Conduct, is allowed during this period.
|
104
|
+
Violating these terms may lead to a permanent ban.
|
105
|
+
|
106
|
+
### 4. Permanent Ban
|
107
|
+
|
108
|
+
**Community Impact**: Demonstrating a pattern of violation of community
|
109
|
+
standards, including sustained inappropriate behavior, harassment of an
|
110
|
+
individual, or aggression toward or disparagement of classes of individuals.
|
111
|
+
|
112
|
+
**Consequence**: A permanent ban from any sort of public interaction within
|
113
|
+
the community.
|
114
|
+
|
115
|
+
## Attribution
|
116
|
+
|
117
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
118
|
+
version 2.0, available at
|
119
|
+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
120
|
+
|
121
|
+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
|
122
|
+
enforcement ladder](https://github.com/mozilla/diversity).
|
123
|
+
|
124
|
+
[homepage]: https://www.contributor-covenant.org
|
125
|
+
|
126
|
+
For answers to common questions about this code of conduct, see the FAQ at
|
127
|
+
https://www.contributor-covenant.org/faq. Translations are available at
|
128
|
+
https://www.contributor-covenant.org/translations.
|