capiscio-sdk 0.3.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,126 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: capiscio-sdk
3
- Version: 0.3.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: fastapi>=0.100.0; extra == 'dev'
33
- Requires-Dist: mypy>=1.9.0; extra == 'dev'
34
- Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
35
- Requires-Dist: pytest-cov>=4.1.0; extra == 'dev'
36
- Requires-Dist: pytest>=8.0.0; extra == 'dev'
37
- Requires-Dist: ruff>=0.3.0; extra == 'dev'
38
- Requires-Dist: starlette>=0.27.0; extra == 'dev'
39
- Requires-Dist: types-cachetools>=5.3.0; extra == 'dev'
40
- Provides-Extra: web
41
- Requires-Dist: fastapi>=0.100.0; extra == 'web'
42
- Requires-Dist: starlette>=0.27.0; extra == 'web'
43
- Description-Content-Type: text/markdown
44
-
45
- # CapiscIO SDK (Python)
46
-
47
- **Enforcement-First Security for A2A Agents.**
48
-
49
- [![PyPI version](https://badge.fury.io/py/capiscio-sdk.svg)](https://badge.fury.io/py/capiscio-sdk)
50
- [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
51
- [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
52
-
53
- **CapiscIO** is the "Customs Officer" for your AI Agent. It provides military-grade Identity and Integrity enforcement for the [Agent-to-Agent (A2A) Protocol](https://github.com/google/A2A) with **zero configuration**.
54
-
55
- ## 🚀 The 60-Second Upgrade
56
-
57
- Turn any FastAPI application into a Verified A2A Agent in 3 lines of code.
58
-
59
- ```python
60
- from fastapi import FastAPI
61
- from capiscio_sdk.simple_guard import SimpleGuard
62
- from capiscio_sdk.integrations.fastapi import CapiscioMiddleware
63
-
64
- # 1. Initialize Guard (Auto-generates keys in dev_mode)
65
- guard = SimpleGuard(dev_mode=True)
66
-
67
- app = FastAPI()
68
-
69
- # 2. Add Enforcement Middleware
70
- app.add_middleware(CapiscioMiddleware, guard=guard)
71
-
72
- @app.post("/agent/task")
73
- async def handle_task(request: Request):
74
- # 🔒 Only reachable if Identity + Integrity are verified
75
- caller = request.state.agent_id
76
- return {"status": "accepted", "verified_caller": caller}
77
- ```
78
-
79
- ## 🛡️ What You Get (Out of the Box)
80
-
81
- 1. **Zero-Config Identity**:
82
- * Auto-generates **Ed25519** keys and `agent-card.json` on first run.
83
- * No manual key management required for development.
84
-
85
- 2. **Payload Integrity**:
86
- * Enforces **SHA-256 Body Hash (`bh`)** verification.
87
- * Blocks tampered payloads instantly (returns `403 Forbidden`).
88
-
89
- 3. **Replay Protection**:
90
- * Enforces strict **60-second** token expiration (`exp`).
91
- * Prevents replay attacks and ensures freshness.
92
-
93
- 4. **Performance Telemetry**:
94
- * Adds `<1ms` overhead.
95
- * Includes `Server-Timing` headers for transparent monitoring.
96
-
97
- ## Installation
98
-
99
- ```bash
100
- pip install capiscio-sdk
101
- ```
102
-
103
- ## How It Works
104
-
105
- ### 1. The Handshake
106
- CapiscIO enforces the **A2A Trust Protocol**:
107
- * **Sender**: Signs the request body (JWS + Body Hash).
108
- * **Receiver**: Verifies the signature and re-hashes the body to ensure integrity.
109
-
110
- ### 2. The "Customs Officer"
111
- The `SimpleGuard` acts as a local authority. It manages your agent's "Passport" (Agent Card) and verifies the "Visas" (Tokens) of incoming requests.
112
-
113
- ### 3. Telemetry
114
- Every response includes a `Server-Timing` header showing exactly how fast the verification was:
115
- ```http
116
- Server-Timing: capiscio-auth;dur=0.618;desc="CapiscIO Verification"
117
- ```
118
-
119
- ## Documentation
120
-
121
- - [Official Documentation](https://docs.capisc.io)
122
- - [A2A Protocol Spec](https://github.com/google/A2A)
123
-
124
- ## License
125
-
126
- Apache License 2.0 - see [LICENSE](LICENSE) for details.