capiscio-sdk 0.2.0__py3-none-any.whl → 2.3.0__py3-none-any.whl

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.
@@ -1,221 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: capiscio-sdk
3
- Version: 0.2.0
4
- Summary: Runtime security middleware for A2A agents
5
- Project-URL: Homepage, https://capisc.io
6
- Project-URL: Documentation, https://docs.capisc.io/sdk-python
7
- Project-URL: Repository, https://github.com/capiscio/capiscio-sdk-python
8
- Project-URL: Issues, https://github.com/capiscio/capiscio-sdk-python/issues
9
- Author-email: Capiscio Team <team@capisc.io>
10
- License: Apache-2.0
11
- License-File: LICENSE
12
- Keywords: a2a,agent,agent-to-agent,middleware,security,validation
13
- Classifier: Development Status :: 3 - Alpha
14
- Classifier: Intended Audience :: Developers
15
- Classifier: License :: OSI Approved :: Apache Software License
16
- Classifier: Programming Language :: Python :: 3
17
- Classifier: Programming Language :: Python :: 3.10
18
- Classifier: Programming Language :: Python :: 3.11
19
- Classifier: Programming Language :: Python :: 3.12
20
- Classifier: Programming Language :: Python :: 3.13
21
- Classifier: Topic :: Security
22
- Classifier: Topic :: Software Development :: Libraries :: Python Modules
23
- Requires-Python: >=3.10
24
- Requires-Dist: a2a-sdk>=0.1.0
25
- Requires-Dist: cachetools>=5.3.0
26
- Requires-Dist: cryptography>=42.0.0
27
- Requires-Dist: httpx>=0.27.0
28
- Requires-Dist: pydantic>=2.0.0
29
- Requires-Dist: pyjwt[crypto]>=2.8.0
30
- Provides-Extra: dev
31
- Requires-Dist: black>=24.0.0; extra == 'dev'
32
- Requires-Dist: mypy>=1.9.0; extra == 'dev'
33
- Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
34
- Requires-Dist: pytest-cov>=4.1.0; extra == 'dev'
35
- Requires-Dist: pytest>=8.0.0; extra == 'dev'
36
- Requires-Dist: ruff>=0.3.0; extra == 'dev'
37
- Requires-Dist: types-cachetools>=5.3.0; extra == 'dev'
38
- Description-Content-Type: text/markdown
39
-
40
- # CapiscIO SDK (Python)
41
-
42
- **Runtime security middleware for A2A (Agent-to-Agent) protocol agents**
43
-
44
- [![PyPI version](https://badge.fury.io/py/capiscio-sdk.svg)](https://badge.fury.io/py/capiscio-sdk)
45
- [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
46
- [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
47
-
48
- ## What is CapiscIO SDK?
49
-
50
- CapiscIO SDK provides **always-on runtime protection** for agents using the [A2A (Agent-to-Agent) protocol](https://github.com/google/A2A). It wraps your agent executor to validate incoming requests, verify signatures, and protect against malicious actors—all without requiring peer cooperation.
51
-
52
- ### Key Features
53
-
54
- - ✅ **Message validation** - Schema and protocol compliance checking
55
- - ✅ **Signature verification** - JWS/JWKS cryptographic validation (RFC 7515)
56
- - ✅ **Upstream protection** - Validate agents you call
57
- - ✅ **Downstream protection** - Validate agents calling you
58
- - ✅ **Rate limiting** - Token bucket algorithm
59
- - ✅ **Caching** - Performance-optimized validation results
60
- - ✅ **Three integration patterns** - Minimal, explicit, or decorator
61
-
62
- ## Installation
63
-
64
- ```bash
65
- pip install capiscio-sdk
66
- ```
67
-
68
- ## Quick Start
69
-
70
-
71
- ### Pattern 1: Minimal (One-liner with Preset)
72
-
73
- ```python
74
- from capiscio_sdk import secure, SecurityConfig
75
- from a2a.server.request_handlers import DefaultRequestHandler
76
- from a2a.server.tasks import InMemoryTaskStore
77
-
78
- # Wrap your agent with security (production defaults)
79
- agent = secure(MyAgentExecutor(), SecurityConfig.production())
80
-
81
- # Use in A2A request handler
82
- handler = DefaultRequestHandler(
83
- agent_executor=agent,
84
- task_store=InMemoryTaskStore()
85
- )
86
-
87
- # Access validation results (three-dimensional scoring)
88
- result = await agent.validate_agent_card(card_url)
89
- print(result.compliance.total, result.trust.total, result.availability.total)
90
- ```
91
-
92
- ### Pattern 2: Granular Control
93
-
94
- ```python
95
- from capiscio_sdk import CapiscIOSecurityExecutor, SecurityConfig
96
-
97
- # Start with a preset, customize what matters to you
98
- config = SecurityConfig.production()
99
- config.downstream.rate_limit_requests_per_minute = 100 # Higher rate limit
100
- config.downstream.require_signatures = True # Enforce signatures
101
- config.upstream.test_endpoints = True # Test before calling
102
- config.fail_mode = "monitor" # Log but don't block yet
103
-
104
- secure_agent = CapiscIOSecurityExecutor(
105
- delegate=MyAgentExecutor(),
106
- config=config
107
- )
108
- ```
109
-
110
- ### Pattern 3: Environment-Driven (12-Factor App)
111
-
112
- ```python
113
- from capiscio_sdk import secure_agent, SecurityConfig
114
- from a2a import AgentExecutor, RequestContext, EventQueue
115
-
116
- @secure_agent(config=SecurityConfig.from_env())
117
- class MyAgentExecutor(AgentExecutor):
118
- async def execute(self, context: RequestContext, event_queue: EventQueue):
119
- # Your agent logic - config loaded from env vars
120
- pass
121
-
122
- # Already secured - use directly!
123
- handler = DefaultRequestHandler(agent_executor=MyAgentExecutor())
124
- ```
125
-
126
- **All 16 configuration options documented in the [Configuration Guide](https://docs.capisc.io/sdk-python/guides/configuration/).**
127
-
128
- ## Why CapiscIO?
129
-
130
- ### The Problem
131
-
132
- When building A2A agents, you face security risks from:
133
- - **Malicious downstream agents** sending invalid/malicious requests
134
- - **Broken upstream dependencies** with invalid agent cards
135
- - **Protocol violations** causing runtime failures
136
- - **Missing signatures** with no authenticity verification
137
-
138
- ### The Solution
139
-
140
- CapiscIO wraps your agent executor and provides:
141
-
142
- 1. **Downstream Protection** - Validates all incoming requests
143
- 2. **Upstream Protection** - Validates agents you call
144
- 3. **Always-On** - Works without peer cooperation
145
- 4. **Performance** - Caching and parallel validation
146
- 5. **Three-Dimensional Scoring** - Compliance, trust, and availability insights
147
-
148
- ## Configuration
149
-
150
- ### Presets
151
-
152
- ```python
153
- # Development - Permissive, verbose logging
154
- SecurityConfig.development()
155
-
156
- # Production - Balanced (default)
157
- SecurityConfig.production()
158
-
159
- # Strict - Maximum security
160
- SecurityConfig.strict()
161
-
162
- # From environment variables
163
- SecurityConfig.from_env()
164
- ```
165
-
166
- ### Custom Configuration
167
-
168
- ```python
169
- from capiscio_sdk import SecurityConfig, DownstreamConfig, UpstreamConfig
170
-
171
- config = SecurityConfig(
172
- downstream=DownstreamConfig(
173
- validate_schema=True,
174
- verify_signatures=True,
175
- require_signatures=False,
176
- enable_rate_limiting=True,
177
- rate_limit_requests_per_minute=100
178
- ),
179
- upstream=UpstreamConfig(
180
- validate_agent_cards=True,
181
- verify_signatures=True,
182
- cache_validation=True,
183
- cache_timeout=3600 # seconds
184
- ),
185
- fail_mode="block", # "block" | "monitor" | "log"
186
- timeout_ms=5000
187
- )
188
- ```
189
-
190
- ## Documentation
191
-
192
- - [Quickstart Guide](docs/quickstart.md)
193
- - [Configuration Reference](docs/configuration.md)
194
- - [API Documentation](docs/api-reference.md)
195
- - [Examples](examples/)
196
-
197
- ## Roadmap
198
-
199
- - **V1.0** (Q4 2025) - Core middleware (this package)
200
- - **V2.0** (Q2 2026) - Extension protocol (validation feedback)
201
- - **V3.0** (Q3 2026) - Platform integration (trust network)
202
- - **V4.0** (Q4 2026) - Enterprise features (policies, audit logs)
203
-
204
- ## Contributing
205
-
206
- We welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
207
-
208
- ## License
209
-
210
- Apache License 2.0 - see [LICENSE](LICENSE) for details.
211
-
212
- ## About A2A
213
-
214
- The [Agent-to-Agent (A2A) protocol](https://github.com/google/A2A) is an open standard for agent interoperability, supported by Google and 50+ partners including Salesforce, ServiceNow, SAP, Intuit, and more. CapiscIO provides the security layer for production A2A deployments.
215
-
216
- ## Support
217
-
218
- - **Issues:** [GitHub Issues](https://github.com/capiscio/capiscio-sdk-python/issues)
219
- - **Discussions:** [GitHub Discussions](https://github.com/capiscio/capiscio-sdk-python/discussions)
220
- - **Documentation:** [docs.capisc.io](https://docs.capisc.io)
221
- - **Website:** [capisc.io](https://capisc.io)
@@ -1,26 +0,0 @@
1
- capiscio_sdk/__init__.py,sha256=FeQaj_zfpzATbqqFP1vsRbJ_XT5NcBFm4vpR7efoqbE,1108
2
- capiscio_sdk/config.py,sha256=S5iclYkxG-29UY4ipVU-7DhmeTR2zell6TiX3yrRvE0,3974
3
- capiscio_sdk/errors.py,sha256=MCDh1fAAswXPpKoZEqVG_eD8rOmHv38GFEFFvz1GRjI,1859
4
- capiscio_sdk/executor.py,sha256=EKM_93thP5utyLEH2DZNTL1KY9YZRyOvWNBMzIgpTsU,7226
5
- capiscio_sdk/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
- capiscio_sdk/types.py,sha256=mMh_4VTYRy0xE3Cng1WJEeHigAFUVroRG1GVHtzTN2E,7980
7
- capiscio_sdk/infrastructure/__init__.py,sha256=5yK7kbk1tcHqlnFIN0lR5N_4ZWWquNivLfHkXOAtso0,152
8
- capiscio_sdk/infrastructure/cache.py,sha256=FjIRRzNbsPxFZrxdeek51IwFSmR682Wpj1bvvmgqwiU,1841
9
- capiscio_sdk/infrastructure/rate_limiter.py,sha256=7Q_GfcooWKjioDeB46PpPb00laDmkLpUYGM0Ui8nXqI,3642
10
- capiscio_sdk/scoring/__init__.py,sha256=OjHeqLe6aZ7yjbpmtt_upqXDwYUnX5CDXTVNngOMHcg,1083
11
- capiscio_sdk/scoring/availability.py,sha256=CzXA1ED48U1Cc06sh0Mtl_kxZP6af-9cceBumTXQhO8,9130
12
- capiscio_sdk/scoring/compliance.py,sha256=JZyYuT18A_eiDNdOz-doTIYwW6YhVPvfRj_siNAkkTY,9780
13
- capiscio_sdk/scoring/trust.py,sha256=u3dposV0zWfh4mW6XzpWDLP7Mora8y3k2_KwVtEuQPw,10955
14
- capiscio_sdk/scoring/types.py,sha256=4D-2kWVrPNxugxug_q-tZiQI5_Cv1ThtSPmOH-KbSrs,10051
15
- capiscio_sdk/validators/__init__.py,sha256=KPqNj0ts7Ys6yYUXp8mucR69yp6TIBjz6db8-Xa3QuQ,532
16
- capiscio_sdk/validators/agent_card.py,sha256=d8VfGXvtHiuU0DuC1W64Z_JPVqOVh-nRMVShOAznJbk,18506
17
- capiscio_sdk/validators/certificate.py,sha256=7RguWk9ahtrxe3TuRqiv5t5vBGta_cUp4qjcx7GwAl0,14373
18
- capiscio_sdk/validators/message.py,sha256=TGVCAwFHcen1v9KLK5UtxVXq61yOqOnd4yudxSxFMmw,15472
19
- capiscio_sdk/validators/protocol.py,sha256=bkaJJXseulTJ4Sdiio8gE8Q_Pyqj0BRsJe6BGHSQSnA,5377
20
- capiscio_sdk/validators/semver.py,sha256=mlF3GO5ZPA-w6FzSxhjcr56sgCdS0YVVAd1dUr1bxWs,6385
21
- capiscio_sdk/validators/signature.py,sha256=lI8XzaKfG_dXSOQXZ40Lda0ntga9EqqC4zAId2kOt6g,8072
22
- capiscio_sdk/validators/url_security.py,sha256=SdpOrB48hrfgAMuLvpWH2P0LLCJtg6QBohGDIye8f1E,9802
23
- capiscio_sdk-0.2.0.dist-info/METADATA,sha256=k3oDfOrYLqCpPighcDEnKPMNX3SRVsBxHfiAO6H7Oyc,7639
24
- capiscio_sdk-0.2.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
25
- capiscio_sdk-0.2.0.dist-info/licenses/LICENSE,sha256=AMM_E-ILcCpX0JALqX3BL9yfgSx654BtkhX-CBFYp1Q,10758
26
- capiscio_sdk-0.2.0.dist-info/RECORD,,