capiscio-sdk 0.2.0__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.
- capiscio_sdk-0.2.0/.github/markdown-link-check-config.json +6 -0
- capiscio_sdk-0.2.0/.github/workflows/docs.yml +67 -0
- capiscio_sdk-0.2.0/.github/workflows/pr-checks.yml +192 -0
- capiscio_sdk-0.2.0/.github/workflows/publish.yml +117 -0
- capiscio_sdk-0.2.0/.gitignore +59 -0
- capiscio_sdk-0.2.0/.python-version +1 -0
- capiscio_sdk-0.2.0/CHANGELOG.md +112 -0
- capiscio_sdk-0.2.0/CONTRIBUTING.md +204 -0
- capiscio_sdk-0.2.0/LICENSE +190 -0
- capiscio_sdk-0.2.0/PKG-INFO +221 -0
- capiscio_sdk-0.2.0/QUICK_REFERENCE.md +181 -0
- capiscio_sdk-0.2.0/README.md +182 -0
- capiscio_sdk-0.2.0/RELEASE_GUIDE.md +201 -0
- capiscio_sdk-0.2.0/SECURITY.md +94 -0
- capiscio_sdk-0.2.0/capiscio_sdk/__init__.py +42 -0
- capiscio_sdk-0.2.0/capiscio_sdk/config.py +114 -0
- capiscio_sdk-0.2.0/capiscio_sdk/errors.py +69 -0
- capiscio_sdk-0.2.0/capiscio_sdk/executor.py +216 -0
- capiscio_sdk-0.2.0/capiscio_sdk/infrastructure/__init__.py +5 -0
- capiscio_sdk-0.2.0/capiscio_sdk/infrastructure/cache.py +73 -0
- capiscio_sdk-0.2.0/capiscio_sdk/infrastructure/rate_limiter.py +110 -0
- capiscio_sdk-0.2.0/capiscio_sdk/py.typed +0 -0
- capiscio_sdk-0.2.0/capiscio_sdk/scoring/__init__.py +42 -0
- capiscio_sdk-0.2.0/capiscio_sdk/scoring/availability.py +299 -0
- capiscio_sdk-0.2.0/capiscio_sdk/scoring/compliance.py +314 -0
- capiscio_sdk-0.2.0/capiscio_sdk/scoring/trust.py +340 -0
- capiscio_sdk-0.2.0/capiscio_sdk/scoring/types.py +353 -0
- capiscio_sdk-0.2.0/capiscio_sdk/types.py +234 -0
- capiscio_sdk-0.2.0/capiscio_sdk/validators/__init__.py +18 -0
- capiscio_sdk-0.2.0/capiscio_sdk/validators/agent_card.py +444 -0
- capiscio_sdk-0.2.0/capiscio_sdk/validators/certificate.py +384 -0
- capiscio_sdk-0.2.0/capiscio_sdk/validators/message.py +360 -0
- capiscio_sdk-0.2.0/capiscio_sdk/validators/protocol.py +162 -0
- capiscio_sdk-0.2.0/capiscio_sdk/validators/semver.py +202 -0
- capiscio_sdk-0.2.0/capiscio_sdk/validators/signature.py +234 -0
- capiscio_sdk-0.2.0/capiscio_sdk/validators/url_security.py +269 -0
- capiscio_sdk-0.2.0/docs/assets/.!58931!favicon.ico +0 -0
- capiscio_sdk-0.2.0/docs/assets/favicon.ico +0 -0
- capiscio_sdk-0.2.0/docs/assets/logo.png +0 -0
- capiscio_sdk-0.2.0/docs/getting-started/concepts.md +492 -0
- capiscio_sdk-0.2.0/docs/getting-started/installation.md +202 -0
- capiscio_sdk-0.2.0/docs/getting-started/quickstart.md +347 -0
- capiscio_sdk-0.2.0/docs/guides/configuration.md +802 -0
- capiscio_sdk-0.2.0/docs/guides/scoring.md +359 -0
- capiscio_sdk-0.2.0/docs/includes/abbreviations.md +26 -0
- capiscio_sdk-0.2.0/docs/index.md +296 -0
- capiscio_sdk-0.2.0/docs/javascripts/extra.js +69 -0
- capiscio_sdk-0.2.0/docs/stylesheets/extra.css +109 -0
- capiscio_sdk-0.2.0/docs/stylesheets/unified.css +196 -0
- capiscio_sdk-0.2.0/examples/README.md +131 -0
- capiscio_sdk-0.2.0/examples/simple_agent/README.md +144 -0
- capiscio_sdk-0.2.0/examples/simple_agent/agent_executor.py +89 -0
- capiscio_sdk-0.2.0/examples/simple_agent/main.py +58 -0
- capiscio_sdk-0.2.0/examples/simple_agent/requirements.txt +8 -0
- capiscio_sdk-0.2.0/examples/simple_agent/test_client.py +183 -0
- capiscio_sdk-0.2.0/mkdocs.yml +289 -0
- capiscio_sdk-0.2.0/pyproject.toml +77 -0
- capiscio_sdk-0.2.0/tests/__init__.py +1 -0
- capiscio_sdk-0.2.0/tests/e2e/__init__.py +1 -0
- capiscio_sdk-0.2.0/tests/integration/__init__.py +1 -0
- capiscio_sdk-0.2.0/tests/integration/test_real_executor.py +754 -0
- capiscio_sdk-0.2.0/tests/unit/__init__.py +1 -0
- capiscio_sdk-0.2.0/tests/unit/test_agent_card.py +330 -0
- capiscio_sdk-0.2.0/tests/unit/test_cache.py +72 -0
- capiscio_sdk-0.2.0/tests/unit/test_certificate.py +286 -0
- capiscio_sdk-0.2.0/tests/unit/test_config.py +70 -0
- capiscio_sdk-0.2.0/tests/unit/test_errors.py +53 -0
- capiscio_sdk-0.2.0/tests/unit/test_executor.py +184 -0
- capiscio_sdk-0.2.0/tests/unit/test_message_validator.py +132 -0
- capiscio_sdk-0.2.0/tests/unit/test_protocol_validator.py +94 -0
- capiscio_sdk-0.2.0/tests/unit/test_rate_limiter.py +95 -0
- capiscio_sdk-0.2.0/tests/unit/test_semver_validator.py +94 -0
- capiscio_sdk-0.2.0/tests/unit/test_signature_validator.py +69 -0
- capiscio_sdk-0.2.0/tests/unit/test_types.py +66 -0
- capiscio_sdk-0.2.0/tests/unit/test_url_security.py +116 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
name: Documentation Validation
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
pull_request:
|
|
8
|
+
branches:
|
|
9
|
+
- main
|
|
10
|
+
workflow_dispatch:
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
pull-requests: write
|
|
15
|
+
issues: write
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
# Build and validate documentation (no deployment)
|
|
19
|
+
validate:
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
steps:
|
|
22
|
+
- name: Checkout repository
|
|
23
|
+
uses: actions/checkout@v4
|
|
24
|
+
|
|
25
|
+
- name: Setup Python
|
|
26
|
+
uses: actions/setup-python@v5
|
|
27
|
+
with:
|
|
28
|
+
python-version: '3.11'
|
|
29
|
+
cache: 'pip'
|
|
30
|
+
|
|
31
|
+
- name: Install dependencies
|
|
32
|
+
run: |
|
|
33
|
+
pip install --upgrade pip
|
|
34
|
+
pip install mkdocs-material \
|
|
35
|
+
"mkdocstrings[python]>=0.24" \
|
|
36
|
+
mkdocs-git-revision-date-localized-plugin
|
|
37
|
+
|
|
38
|
+
- name: Validate documentation build
|
|
39
|
+
run: mkdocs build --strict
|
|
40
|
+
|
|
41
|
+
- name: Check for broken links
|
|
42
|
+
uses: gaurav-nelson/github-action-markdown-link-check@v1
|
|
43
|
+
with:
|
|
44
|
+
use-quiet-mode: 'yes'
|
|
45
|
+
folder-path: 'docs'
|
|
46
|
+
config-file: '.github/markdown-link-check-config.json'
|
|
47
|
+
continue-on-error: true
|
|
48
|
+
|
|
49
|
+
- name: Upload build artifact
|
|
50
|
+
uses: actions/upload-artifact@v4
|
|
51
|
+
with:
|
|
52
|
+
name: docs-build
|
|
53
|
+
path: site/
|
|
54
|
+
retention-days: 7
|
|
55
|
+
|
|
56
|
+
- name: Add success comment
|
|
57
|
+
if: github.event_name == 'pull_request'
|
|
58
|
+
uses: actions/github-script@v7
|
|
59
|
+
with:
|
|
60
|
+
script: |
|
|
61
|
+
github.rest.issues.createComment({
|
|
62
|
+
issue_number: context.issue.number,
|
|
63
|
+
owner: context.repo.owner,
|
|
64
|
+
repo: context.repo.repo,
|
|
65
|
+
body: '✅ Documentation validation passed!\n\n> Unified docs will be deployed from [capiscio-docs](https://github.com/capiscio/capiscio-docs) repo.'
|
|
66
|
+
})
|
|
67
|
+
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
name: PR Checks
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
- develop
|
|
8
|
+
push:
|
|
9
|
+
branches:
|
|
10
|
+
- main
|
|
11
|
+
- develop
|
|
12
|
+
|
|
13
|
+
permissions:
|
|
14
|
+
contents: read
|
|
15
|
+
pull-requests: write
|
|
16
|
+
issues: write
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
test:
|
|
20
|
+
name: Test Python ${{ matrix.python-version }}
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
strategy:
|
|
23
|
+
fail-fast: false
|
|
24
|
+
matrix:
|
|
25
|
+
python-version: ['3.10', '3.11', '3.12', '3.13']
|
|
26
|
+
|
|
27
|
+
steps:
|
|
28
|
+
- name: Checkout code
|
|
29
|
+
uses: actions/checkout@v4
|
|
30
|
+
|
|
31
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
32
|
+
uses: actions/setup-python@v5
|
|
33
|
+
with:
|
|
34
|
+
python-version: ${{ matrix.python-version }}
|
|
35
|
+
cache: 'pip'
|
|
36
|
+
|
|
37
|
+
- name: Install dependencies
|
|
38
|
+
run: |
|
|
39
|
+
python -m pip install --upgrade pip
|
|
40
|
+
pip install -e ".[dev]"
|
|
41
|
+
|
|
42
|
+
- name: Run linting (ruff)
|
|
43
|
+
run: |
|
|
44
|
+
ruff check .
|
|
45
|
+
continue-on-error: true
|
|
46
|
+
|
|
47
|
+
- name: Run type checking (mypy)
|
|
48
|
+
run: |
|
|
49
|
+
mypy capiscio_sdk
|
|
50
|
+
continue-on-error: true
|
|
51
|
+
|
|
52
|
+
- name: Run unit tests
|
|
53
|
+
run: |
|
|
54
|
+
pytest tests/unit/ -v --tb=short --cov=capiscio_sdk --cov-report=xml --cov-report=term
|
|
55
|
+
|
|
56
|
+
- name: Run integration tests
|
|
57
|
+
run: |
|
|
58
|
+
pytest tests/integration/ -v --tb=short
|
|
59
|
+
|
|
60
|
+
- name: Upload coverage to Codecov
|
|
61
|
+
if: matrix.python-version == '3.11'
|
|
62
|
+
uses: codecov/codecov-action@v4
|
|
63
|
+
with:
|
|
64
|
+
file: ./coverage.xml
|
|
65
|
+
flags: unittests
|
|
66
|
+
name: codecov-umbrella
|
|
67
|
+
fail_ci_if_error: false
|
|
68
|
+
env:
|
|
69
|
+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
70
|
+
|
|
71
|
+
security-scan:
|
|
72
|
+
name: Security Scan
|
|
73
|
+
runs-on: ubuntu-latest
|
|
74
|
+
|
|
75
|
+
steps:
|
|
76
|
+
- name: Checkout code
|
|
77
|
+
uses: actions/checkout@v4
|
|
78
|
+
|
|
79
|
+
- name: Set up Python
|
|
80
|
+
uses: actions/setup-python@v5
|
|
81
|
+
with:
|
|
82
|
+
python-version: '3.11'
|
|
83
|
+
|
|
84
|
+
- name: Install dependencies
|
|
85
|
+
run: |
|
|
86
|
+
python -m pip install --upgrade pip
|
|
87
|
+
pip install -e ".[dev]"
|
|
88
|
+
|
|
89
|
+
- name: Run safety check
|
|
90
|
+
run: |
|
|
91
|
+
safety check --json || true
|
|
92
|
+
continue-on-error: true
|
|
93
|
+
|
|
94
|
+
- name: Run bandit security scan
|
|
95
|
+
run: |
|
|
96
|
+
bandit -r capiscio_sdk -f json -o bandit-report.json || true
|
|
97
|
+
continue-on-error: true
|
|
98
|
+
|
|
99
|
+
- name: Upload bandit report
|
|
100
|
+
if: always()
|
|
101
|
+
uses: actions/upload-artifact@v4
|
|
102
|
+
with:
|
|
103
|
+
name: bandit-report
|
|
104
|
+
path: bandit-report.json
|
|
105
|
+
|
|
106
|
+
build-check:
|
|
107
|
+
name: Build Check
|
|
108
|
+
runs-on: ubuntu-latest
|
|
109
|
+
|
|
110
|
+
steps:
|
|
111
|
+
- name: Checkout code
|
|
112
|
+
uses: actions/checkout@v4
|
|
113
|
+
|
|
114
|
+
- name: Set up Python
|
|
115
|
+
uses: actions/setup-python@v5
|
|
116
|
+
with:
|
|
117
|
+
python-version: '3.11'
|
|
118
|
+
|
|
119
|
+
- name: Install build dependencies
|
|
120
|
+
run: |
|
|
121
|
+
python -m pip install --upgrade pip
|
|
122
|
+
python -m pip install build twine
|
|
123
|
+
|
|
124
|
+
- name: Build package
|
|
125
|
+
run: python -m build
|
|
126
|
+
|
|
127
|
+
- name: Check package with twine
|
|
128
|
+
run: python -m twine check dist/*
|
|
129
|
+
|
|
130
|
+
- name: Upload build artifacts
|
|
131
|
+
uses: actions/upload-artifact@v4
|
|
132
|
+
with:
|
|
133
|
+
name: dist
|
|
134
|
+
path: dist/
|
|
135
|
+
|
|
136
|
+
docs-check:
|
|
137
|
+
name: Documentation Check
|
|
138
|
+
runs-on: ubuntu-latest
|
|
139
|
+
|
|
140
|
+
steps:
|
|
141
|
+
- name: Checkout code
|
|
142
|
+
uses: actions/checkout@v4
|
|
143
|
+
|
|
144
|
+
- name: Set up Python
|
|
145
|
+
uses: actions/setup-python@v5
|
|
146
|
+
with:
|
|
147
|
+
python-version: '3.11'
|
|
148
|
+
|
|
149
|
+
- name: Install dependencies
|
|
150
|
+
run: |
|
|
151
|
+
pip install --upgrade pip
|
|
152
|
+
pip install mkdocs-material "mkdocstrings[python]>=0.24"
|
|
153
|
+
|
|
154
|
+
- name: Build documentation
|
|
155
|
+
run: mkdocs build --strict
|
|
156
|
+
|
|
157
|
+
- name: Check for broken links
|
|
158
|
+
uses: gaurav-nelson/github-action-markdown-link-check@v1
|
|
159
|
+
with:
|
|
160
|
+
use-quiet-mode: 'yes'
|
|
161
|
+
folder-path: 'docs'
|
|
162
|
+
config-file: '.github/markdown-link-check-config.json'
|
|
163
|
+
continue-on-error: true
|
|
164
|
+
|
|
165
|
+
all-checks-passed:
|
|
166
|
+
name: All Checks Passed
|
|
167
|
+
needs: [test, security-scan, build-check, docs-check]
|
|
168
|
+
runs-on: ubuntu-latest
|
|
169
|
+
if: always()
|
|
170
|
+
|
|
171
|
+
steps:
|
|
172
|
+
- name: Check if all jobs passed
|
|
173
|
+
run: |
|
|
174
|
+
if [ "${{ needs.test.result }}" != "success" ] || \
|
|
175
|
+
[ "${{ needs.build-check.result }}" != "success" ] || \
|
|
176
|
+
[ "${{ needs.docs-check.result }}" != "success" ]; then
|
|
177
|
+
echo "Some required checks failed"
|
|
178
|
+
exit 1
|
|
179
|
+
fi
|
|
180
|
+
echo "All required checks passed!"
|
|
181
|
+
|
|
182
|
+
- name: Add PR comment
|
|
183
|
+
if: github.event_name == 'pull_request'
|
|
184
|
+
uses: actions/github-script@v7
|
|
185
|
+
with:
|
|
186
|
+
script: |
|
|
187
|
+
github.rest.issues.createComment({
|
|
188
|
+
issue_number: context.issue.number,
|
|
189
|
+
owner: context.repo.owner,
|
|
190
|
+
repo: context.repo.repo,
|
|
191
|
+
body: '✅ All checks passed! Ready for review.'
|
|
192
|
+
})
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*.*.*' # Trigger on version tags like v0.1.0, v1.0.0, etc.
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
# Run full test suite before publishing
|
|
10
|
+
test:
|
|
11
|
+
name: Test Suite
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
strategy:
|
|
14
|
+
matrix:
|
|
15
|
+
python-version: ['3.10', '3.11', '3.12', '3.13']
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- name: Checkout code
|
|
19
|
+
uses: actions/checkout@v4
|
|
20
|
+
|
|
21
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
22
|
+
uses: actions/setup-python@v5
|
|
23
|
+
with:
|
|
24
|
+
python-version: ${{ matrix.python-version }}
|
|
25
|
+
cache: 'pip'
|
|
26
|
+
|
|
27
|
+
- name: Install dependencies
|
|
28
|
+
run: |
|
|
29
|
+
python -m pip install --upgrade pip
|
|
30
|
+
pip install -e ".[dev]"
|
|
31
|
+
|
|
32
|
+
- name: Run tests
|
|
33
|
+
run: |
|
|
34
|
+
pytest tests/ -v --tb=short
|
|
35
|
+
|
|
36
|
+
build-and-publish:
|
|
37
|
+
needs: test # Only publish if tests pass
|
|
38
|
+
runs-on: ubuntu-latest
|
|
39
|
+
|
|
40
|
+
permissions:
|
|
41
|
+
contents: write # For creating release
|
|
42
|
+
id-token: write # Required for trusted publishing
|
|
43
|
+
|
|
44
|
+
steps:
|
|
45
|
+
- name: Checkout code
|
|
46
|
+
uses: actions/checkout@v4
|
|
47
|
+
with:
|
|
48
|
+
fetch-depth: 0 # Full history for changelog
|
|
49
|
+
|
|
50
|
+
- name: Set up Python
|
|
51
|
+
uses: actions/setup-python@v5
|
|
52
|
+
with:
|
|
53
|
+
python-version: '3.11'
|
|
54
|
+
|
|
55
|
+
- name: Install build dependencies
|
|
56
|
+
run: |
|
|
57
|
+
python -m pip install --upgrade pip
|
|
58
|
+
python -m pip install build twine
|
|
59
|
+
|
|
60
|
+
- name: Extract version from tag
|
|
61
|
+
id: get_version
|
|
62
|
+
run: |
|
|
63
|
+
VERSION=${GITHUB_REF#refs/tags/v}
|
|
64
|
+
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
|
|
65
|
+
echo "Publishing version: $VERSION"
|
|
66
|
+
|
|
67
|
+
- name: Build package
|
|
68
|
+
run: python -m build
|
|
69
|
+
|
|
70
|
+
- name: Check package
|
|
71
|
+
run: python -m twine check dist/*
|
|
72
|
+
|
|
73
|
+
- name: Publish to PyPI
|
|
74
|
+
id: pypi-publish
|
|
75
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
76
|
+
with:
|
|
77
|
+
# Using trusted publishing - no password needed
|
|
78
|
+
# Configure at https://pypi.org/manage/account/publishing/
|
|
79
|
+
skip-existing: true
|
|
80
|
+
verbose: true
|
|
81
|
+
|
|
82
|
+
- name: Create GitHub Release
|
|
83
|
+
if: success() # Only create release if PyPI publish succeeded
|
|
84
|
+
uses: softprops/action-gh-release@v2
|
|
85
|
+
with:
|
|
86
|
+
files: dist/*
|
|
87
|
+
generate_release_notes: true
|
|
88
|
+
body: |
|
|
89
|
+
# CapiscIO SDK ${{ steps.get_version.outputs.VERSION }}
|
|
90
|
+
|
|
91
|
+
## Installation
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
pip install capiscio-sdk==${{ steps.get_version.outputs.VERSION }}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Or upgrade:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
pip install --upgrade capiscio-sdk
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## What's Changed
|
|
104
|
+
|
|
105
|
+
See [CHANGELOG.md](https://github.com/capiscio/capiscio-sdk-python/blob/main/CHANGELOG.md) for detailed changes.
|
|
106
|
+
|
|
107
|
+
## Documentation
|
|
108
|
+
|
|
109
|
+
- [Getting Started](https://docs.capisc.io/sdk-python/getting-started/quickstart/)
|
|
110
|
+
- [Configuration Guide](https://docs.capisc.io/sdk-python/guides/configuration/)
|
|
111
|
+
- [API Reference](https://docs.capisc.io/sdk-python/api/)
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
**Full Changelog**: https://github.com/capiscio/capiscio-sdk-python/compare/${{ github.event.before }}...${{ github.ref_name }}
|
|
116
|
+
env:
|
|
117
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.so
|
|
6
|
+
.Python
|
|
7
|
+
build/
|
|
8
|
+
develop-eggs/
|
|
9
|
+
dist/
|
|
10
|
+
downloads/
|
|
11
|
+
eggs/
|
|
12
|
+
.eggs/
|
|
13
|
+
lib/
|
|
14
|
+
lib64/
|
|
15
|
+
parts/
|
|
16
|
+
sdist/
|
|
17
|
+
var/
|
|
18
|
+
wheels/
|
|
19
|
+
*.egg-info/
|
|
20
|
+
.installed.cfg
|
|
21
|
+
*.egg
|
|
22
|
+
MANIFEST
|
|
23
|
+
|
|
24
|
+
# Virtual environments
|
|
25
|
+
.venv/
|
|
26
|
+
venv/
|
|
27
|
+
ENV/
|
|
28
|
+
env/
|
|
29
|
+
|
|
30
|
+
# IDEs
|
|
31
|
+
.vscode/
|
|
32
|
+
.idea/
|
|
33
|
+
*.swp
|
|
34
|
+
*.swo
|
|
35
|
+
*~
|
|
36
|
+
.DS_Store
|
|
37
|
+
|
|
38
|
+
# Testing
|
|
39
|
+
.pytest_cache/
|
|
40
|
+
.coverage
|
|
41
|
+
htmlcov/
|
|
42
|
+
.tox/
|
|
43
|
+
.mypy_cache/
|
|
44
|
+
.ruff_cache/
|
|
45
|
+
|
|
46
|
+
# Distribution / packaging
|
|
47
|
+
pip-wheel-metadata/
|
|
48
|
+
|
|
49
|
+
# Jupyter Notebook
|
|
50
|
+
.ipynb_checkpoints
|
|
51
|
+
|
|
52
|
+
# Environment variables
|
|
53
|
+
.env
|
|
54
|
+
.env.local
|
|
55
|
+
|
|
56
|
+
# Documentation
|
|
57
|
+
docs/_build/
|
|
58
|
+
site/
|
|
59
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.13.8
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [0.1.0] - 2025-01-10
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- **Comprehensive Integration Tests (26 tests)**
|
|
12
|
+
- Real A2A SDK integration testing with official types
|
|
13
|
+
- All Part types tested: TextPart, FilePart (bytes/URI), DataPart, mixed parts
|
|
14
|
+
- Both role values tested: user, agent
|
|
15
|
+
- Optional fields tested: contextId, taskId, metadata
|
|
16
|
+
- Edge cases: empty text, long text (10KB), Unicode/special characters
|
|
17
|
+
- Security patterns: XSS attempts, SQL injection, oversized messages (100+ parts), null bytes
|
|
18
|
+
- Malformed messages: invalid roles, empty messageId, empty parts array
|
|
19
|
+
- Coverage: All tests passing in ~1.27 seconds
|
|
20
|
+
|
|
21
|
+
- **GitHub Actions CI/CD**
|
|
22
|
+
- `pr-checks.yml`: Comprehensive PR validation (Python 3.10-3.13, linting, type checking, tests, security scanning)
|
|
23
|
+
- Enhanced `publish.yml`: Now runs full test suite before publishing to PyPI
|
|
24
|
+
- `docs.yml`: Automated documentation deployment (GitHub Pages, Cloudflare Pages)
|
|
25
|
+
|
|
26
|
+
- **Foundation Layer**
|
|
27
|
+
- Core types: `ValidationResult`, `ValidationIssue`, `ValidationSeverity`, `RateLimitInfo`, `CacheEntry`
|
|
28
|
+
- Error hierarchy: 7 exception classes for different security scenarios
|
|
29
|
+
- Configuration system with 4 presets: `development()`, `production()`, `strict()`, `from_env()`
|
|
30
|
+
|
|
31
|
+
- **Validators**
|
|
32
|
+
- `MessageValidator`: Validates A2A v0.3.0 message structure
|
|
33
|
+
- Required fields: `messageId` (non-empty string), `role` (enum), `parts` (array)
|
|
34
|
+
- Optional fields: `contextId`, `taskId`, `metadata`
|
|
35
|
+
- Supports all Part types: `TextPart`, `FilePart` (FileWithBytes/FileWithUri), `DataPart`
|
|
36
|
+
- Part validation: kind discriminator ("text"|"file"|"data") with type-specific validation
|
|
37
|
+
- `ProtocolValidator`: Validates protocol version, headers, and message types
|
|
38
|
+
|
|
39
|
+
- **Infrastructure**
|
|
40
|
+
- `ValidationCache`: TTL-based in-memory cache with invalidation support
|
|
41
|
+
- `RateLimiter`: Token bucket algorithm with per-identifier rate limiting
|
|
42
|
+
- Configurable cache size and TTL
|
|
43
|
+
|
|
44
|
+
- **Security Executor**
|
|
45
|
+
- `CapiscIOSecurityExecutor`: Main wrapper for agent executors
|
|
46
|
+
- Three integration patterns:
|
|
47
|
+
- Minimal: `secure(agent)` - one-liner integration
|
|
48
|
+
- Explicit: `CapiscIOSecurityExecutor(agent, config)` - full control
|
|
49
|
+
- Decorator: `@secure_agent(config)` - pythonic decorator pattern
|
|
50
|
+
- Configurable fail modes: `block`, `monitor`, `log`
|
|
51
|
+
- Request rate limiting with identifier-based buckets
|
|
52
|
+
- Validation result caching for performance
|
|
53
|
+
|
|
54
|
+
- **Documentation**
|
|
55
|
+
- Complete rewrite of all examples to use official A2A SDK types
|
|
56
|
+
- Updated configuration guide with correct A2A message fields
|
|
57
|
+
- Comprehensive quickstart with real-world integration examples
|
|
58
|
+
- API reference documentation
|
|
59
|
+
- Apache 2.0 license, Contributing guidelines, Security policy
|
|
60
|
+
|
|
61
|
+
### Technical Details
|
|
62
|
+
- Python 3.10+ support (tested on 3.10, 3.11, 3.12, 3.13)
|
|
63
|
+
- Type hints with `py.typed` marker
|
|
64
|
+
- Pydantic models for validation
|
|
65
|
+
- Token bucket rate limiting algorithm
|
|
66
|
+
- TTL-based caching with LRU eviction
|
|
67
|
+
- Delegate pattern for attribute access
|
|
68
|
+
|
|
69
|
+
### Test Coverage
|
|
70
|
+
- **Total: 150 tests, 99.3% passing (149 passing, 1 skipped)**
|
|
71
|
+
- Unit tests: 124 tests (including 14 MessageValidator tests)
|
|
72
|
+
- Integration tests: 26 tests (all passing)
|
|
73
|
+
- Skipped: 1 module (test_executor.py - covered by integration tests)
|
|
74
|
+
|
|
75
|
+
### Release Notes
|
|
76
|
+
This is an **early 0.1.0 release**. While the middleware has comprehensive test coverage (150 tests) and validates all official A2A message structures correctly, it has not yet been battle-tested in production environments. We recommend:
|
|
77
|
+
|
|
78
|
+
- ✅ **Safe for**: Development environments, testing, evaluation
|
|
79
|
+
- ⚠️ **Use with monitoring**: Staging environments, non-critical production
|
|
80
|
+
- ❌ **Not yet ready for**: Mission-critical production without extensive internal testing
|
|
81
|
+
|
|
82
|
+
**Planned for v1.0**: Load testing, stress testing, concurrent request testing, performance benchmarking, production hardening based on real-world feedback
|
|
83
|
+
|
|
84
|
+
### Installation
|
|
85
|
+
```bash
|
|
86
|
+
pip install capiscio-sdk==0.1.0
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## [Unreleased]
|
|
92
|
+
|
|
93
|
+
### Planned for v0.2.0
|
|
94
|
+
- Signature verification (crypto validation)
|
|
95
|
+
- Agent card validation
|
|
96
|
+
- Upstream agent testing
|
|
97
|
+
- Integration tests
|
|
98
|
+
- End-to-end tests
|
|
99
|
+
- Performance benchmarks
|
|
100
|
+
|
|
101
|
+
### Planned for v1.0.0
|
|
102
|
+
- Full A2A v1.0 compliance
|
|
103
|
+
- Production-ready hardening
|
|
104
|
+
- Performance optimizations
|
|
105
|
+
- Comprehensive documentation
|
|
106
|
+
- CI/CD pipeline
|
|
107
|
+
- PyPI release
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
[0.1.0]: https://github.com/capiscio/capiscio-sdk-python/releases/tag/v0.1.0
|
|
112
|
+
|