capiscio 1.2.2__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.
- capiscio/__init__.py +10 -0
- capiscio/binaries/capiscio-darwin-arm64 +0 -0
- capiscio/binaries/capiscio-darwin-x64 +0 -0
- capiscio/binaries/capiscio-linux-x64 +0 -0
- capiscio/binaries/capiscio-win-arm64.exe +0 -0
- capiscio/binaries/capiscio-win-x64.exe +0 -0
- capiscio/cli.py +133 -0
- capiscio-1.2.2.dist-info/METADATA +207 -0
- capiscio-1.2.2.dist-info/RECORD +12 -0
- capiscio-1.2.2.dist-info/WHEEL +5 -0
- capiscio-1.2.2.dist-info/entry_points.txt +2 -0
- capiscio-1.2.2.dist-info/top_level.txt +1 -0
capiscio/__init__.py
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Capiscio - A2A Protocol Validator and CLI Tool
|
|
3
|
+
|
|
4
|
+
This package provides a Python wrapper around the Capiscio CLI tool,
|
|
5
|
+
allowing easy installation and usage via pip.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
__version__ = "1.2.2"
|
|
9
|
+
__author__ = "Capiscio Team"
|
|
10
|
+
__email__ = "hello@capiscio.com"
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
capiscio/cli.py
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Capiscio CLI Wrapper
|
|
4
|
+
|
|
5
|
+
This module provides a Python wrapper for the Capiscio CLI tool.
|
|
6
|
+
It automatically detects the current platform and architecture,
|
|
7
|
+
then executes the appropriate pre-built binary.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
import os
|
|
11
|
+
import sys
|
|
12
|
+
import platform
|
|
13
|
+
import subprocess
|
|
14
|
+
from pathlib import Path
|
|
15
|
+
from typing import List, Optional
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def get_platform_binary() -> str:
|
|
19
|
+
"""
|
|
20
|
+
Determine the correct binary name for the current platform and architecture.
|
|
21
|
+
|
|
22
|
+
Returns:
|
|
23
|
+
str: The binary filename for this platform
|
|
24
|
+
|
|
25
|
+
Raises:
|
|
26
|
+
RuntimeError: If the platform/architecture combination is not supported
|
|
27
|
+
"""
|
|
28
|
+
system = platform.system().lower()
|
|
29
|
+
machine = platform.machine().lower()
|
|
30
|
+
|
|
31
|
+
# Normalize architecture names
|
|
32
|
+
if machine in ('x86_64', 'amd64'):
|
|
33
|
+
arch = 'x64'
|
|
34
|
+
elif machine in ('arm64', 'aarch64'):
|
|
35
|
+
arch = 'arm64'
|
|
36
|
+
else:
|
|
37
|
+
# Default to x64 for unknown architectures
|
|
38
|
+
arch = 'x64'
|
|
39
|
+
|
|
40
|
+
# Map platform names
|
|
41
|
+
if system == 'linux':
|
|
42
|
+
return f'capiscio-linux-{arch}'
|
|
43
|
+
elif system == 'darwin': # macOS
|
|
44
|
+
return f'capiscio-darwin-{arch}'
|
|
45
|
+
elif system == 'windows':
|
|
46
|
+
return f'capiscio-win-{arch}.exe'
|
|
47
|
+
else:
|
|
48
|
+
raise RuntimeError(f"Unsupported platform: {system} {machine}")
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def get_binary_path() -> Path:
|
|
52
|
+
"""
|
|
53
|
+
Get the full path to the appropriate binary for this platform.
|
|
54
|
+
|
|
55
|
+
Returns:
|
|
56
|
+
Path: Path to the binary file
|
|
57
|
+
|
|
58
|
+
Raises:
|
|
59
|
+
FileNotFoundError: If the binary doesn't exist
|
|
60
|
+
RuntimeError: If the platform is not supported
|
|
61
|
+
"""
|
|
62
|
+
binary_name = get_platform_binary()
|
|
63
|
+
|
|
64
|
+
# Get the directory where this Python file is located
|
|
65
|
+
package_dir = Path(__file__).parent
|
|
66
|
+
binary_path = package_dir / 'binaries' / binary_name
|
|
67
|
+
|
|
68
|
+
if not binary_path.exists():
|
|
69
|
+
available_binaries = list((package_dir / 'binaries').glob('*'))
|
|
70
|
+
available_names = [b.name for b in available_binaries if b.is_file()]
|
|
71
|
+
|
|
72
|
+
raise FileNotFoundError(
|
|
73
|
+
f"Binary '{binary_name}' not found. "
|
|
74
|
+
f"Available binaries: {', '.join(available_names) or 'none'}"
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
return binary_path
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
def run_capiscio(args: Optional[List[str]] = None) -> int:
|
|
81
|
+
"""
|
|
82
|
+
Execute the Capiscio CLI tool with the given arguments.
|
|
83
|
+
|
|
84
|
+
Args:
|
|
85
|
+
args: Command line arguments to pass to capiscio (default: sys.argv[1:])
|
|
86
|
+
|
|
87
|
+
Returns:
|
|
88
|
+
int: Exit code from the capiscio process
|
|
89
|
+
|
|
90
|
+
Raises:
|
|
91
|
+
FileNotFoundError: If the binary doesn't exist
|
|
92
|
+
RuntimeError: If the platform is not supported
|
|
93
|
+
"""
|
|
94
|
+
if args is None:
|
|
95
|
+
args = sys.argv[1:]
|
|
96
|
+
|
|
97
|
+
binary_path = get_binary_path()
|
|
98
|
+
|
|
99
|
+
# Make sure the binary is executable on Unix-like systems
|
|
100
|
+
if os.name != 'nt': # Not Windows
|
|
101
|
+
os.chmod(binary_path, 0o755)
|
|
102
|
+
|
|
103
|
+
try:
|
|
104
|
+
# Execute the binary with the provided arguments
|
|
105
|
+
result = subprocess.run([str(binary_path)] + args)
|
|
106
|
+
return result.returncode
|
|
107
|
+
except KeyboardInterrupt:
|
|
108
|
+
# Handle Ctrl+C gracefully
|
|
109
|
+
return 130
|
|
110
|
+
except Exception as e:
|
|
111
|
+
print(f"Error executing capiscio: {e}", file=sys.stderr)
|
|
112
|
+
return 1
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
def main() -> int:
|
|
116
|
+
"""
|
|
117
|
+
Main entry point for the capiscio command.
|
|
118
|
+
|
|
119
|
+
This function is called when running `capiscio` from the command line
|
|
120
|
+
after installing the package via pip.
|
|
121
|
+
|
|
122
|
+
Returns:
|
|
123
|
+
int: Exit code
|
|
124
|
+
"""
|
|
125
|
+
try:
|
|
126
|
+
return run_capiscio()
|
|
127
|
+
except Exception as e:
|
|
128
|
+
print(f"capiscio: {e}", file=sys.stderr)
|
|
129
|
+
return 1
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
if __name__ == '__main__':
|
|
133
|
+
sys.exit(main())
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: capiscio
|
|
3
|
+
Version: 1.2.2
|
|
4
|
+
Summary: A2A protocol validator and CLI tool
|
|
5
|
+
Author-email: Capiscio Team <hello@capiscio.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/capiscio/capiscio-cli
|
|
8
|
+
Project-URL: Bug Reports, https://github.com/capiscio/capiscio-cli/issues
|
|
9
|
+
Project-URL: Source, https://github.com/capiscio/capiscio-cli
|
|
10
|
+
Keywords: a2a,protocol,validation,cli
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
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: Operating System :: OS Independent
|
|
22
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
23
|
+
Classifier: Topic :: Internet :: WWW/HTTP
|
|
24
|
+
Classifier: Topic :: Software Development :: Testing
|
|
25
|
+
Requires-Python: >=3.7
|
|
26
|
+
Description-Content-Type: text/markdown
|
|
27
|
+
|
|
28
|
+
# Capiscio CLI - A2A Protocol Validator (Python Package)
|
|
29
|
+
|
|
30
|
+
> **Validator & A2A Protocol Compliance CLI** | The only CLI that actually tests AI agent transport protocols. Validate agent-card.json files, A2A compliance across JSONRPC, GRPC, and REST with live endpoint testing.
|
|
31
|
+
|
|
32
|
+
🌐 **[Learn more about Capiscio](https://capisc.io)** | **[Download Page](https://capisc.io/downloads)** | **[Web Validator](https://capisc.io/validator)**
|
|
33
|
+
|
|
34
|
+
[](https://badge.fury.io/py/capiscio)
|
|
35
|
+
[](https://pypi.org/project/capiscio/)
|
|
36
|
+
[](https://python.org/)
|
|
37
|
+
[](https://github.com/capiscio/capiscio-cli/blob/main/LICENSE)
|
|
38
|
+
|
|
39
|
+
## Installation
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
pip install capiscio
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
**Zero dependencies required** - This package contains pre-built native binaries that work without Python runtime dependencies.
|
|
46
|
+
|
|
47
|
+
## Quick Start
|
|
48
|
+
|
|
49
|
+
**💡 Prefer a web interface?** Try our [online validator at capisc.io](https://capisc.io/validator) - no installation required!
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
# Validate your agent (with signature verification)
|
|
53
|
+
capiscio validate ./agent-card.json
|
|
54
|
+
|
|
55
|
+
# Test live endpoints with cryptographic verification
|
|
56
|
+
capiscio validate https://your-agent.com
|
|
57
|
+
|
|
58
|
+
# Strict validation for production deployment
|
|
59
|
+
capiscio validate ./agent-card.json --strict --json
|
|
60
|
+
|
|
61
|
+
# Skip signature verification when not needed
|
|
62
|
+
capiscio validate ./agent-card.json --skip-signature
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Key Features
|
|
66
|
+
|
|
67
|
+
- **🚀 Transport Protocol Testing** - Actually tests JSONRPC, GRPC, and REST endpoints
|
|
68
|
+
- **🔐 JWS Signature Verification** - Cryptographic validation of agent cards (RFC 7515 compliant)
|
|
69
|
+
- **💻 Native Binaries** - No Node.js or runtime dependencies required
|
|
70
|
+
- **🔍 Smart Discovery** - Finds agent cards automatically with multiple fallbacks
|
|
71
|
+
- **⚡ Three Validation Modes** - Progressive, strict, and conservative
|
|
72
|
+
- **🔧 CI/CD Ready** - JSON output with proper exit codes
|
|
73
|
+
- **🌐 Live Endpoint Testing** - Validates real connectivity, not just schemas
|
|
74
|
+
- **🛡️ Secure by Default** - Signature verification enabled automatically
|
|
75
|
+
|
|
76
|
+
## Usage Examples
|
|
77
|
+
|
|
78
|
+
### Basic Commands
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
capiscio validate [input] [options]
|
|
82
|
+
|
|
83
|
+
# Examples
|
|
84
|
+
capiscio validate # Auto-detect in current directory
|
|
85
|
+
capiscio validate ./agent-card.json # Validate local file (with signatures)
|
|
86
|
+
capiscio validate https://agent.com # Test live agent (with signatures)
|
|
87
|
+
capiscio validate ./agent-card.json --skip-signature # Skip signature verification
|
|
88
|
+
capiscio validate ./agent-card.json --verbose # Detailed output
|
|
89
|
+
capiscio validate ./agent-card.json --registry-ready # Check registry readiness
|
|
90
|
+
capiscio validate https://agent.com --errors-only # Show only problems
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Key Options
|
|
94
|
+
|
|
95
|
+
| Option | Description |
|
|
96
|
+
|--------|-------------|
|
|
97
|
+
| --strict | Strict A2A protocol compliance |
|
|
98
|
+
| --json | JSON output for CI/CD |
|
|
99
|
+
| --verbose | Detailed validation steps |
|
|
100
|
+
| --timeout <ms> | Request timeout (default: 10000) |
|
|
101
|
+
| --schema-only | Skip live endpoint testing |
|
|
102
|
+
| --skip-signature | Skip JWS signature verification |
|
|
103
|
+
| --registry-ready | Registry deployment validation |
|
|
104
|
+
|
|
105
|
+
## Signature Verification (New in v1.2.0)
|
|
106
|
+
|
|
107
|
+
**Secure by default** JWS signature verification for agent cards:
|
|
108
|
+
|
|
109
|
+
### 🔐 Cryptographic Validation
|
|
110
|
+
- **RFC 7515 compliant** JWS (JSON Web Signature) verification
|
|
111
|
+
- **JWKS (JSON Web Key Set)** fetching from trusted sources
|
|
112
|
+
- **Detached signature** support for agent card authentication
|
|
113
|
+
- **HTTPS-only** JWKS endpoints for security
|
|
114
|
+
|
|
115
|
+
### 🛡️ Security Benefits
|
|
116
|
+
- **Authenticity** - Verify agent cards haven't been tampered with
|
|
117
|
+
- **Trust** - Cryptographically confirm the publisher's identity
|
|
118
|
+
- **Security** - Prevent malicious agent card injection
|
|
119
|
+
- **Compliance** - Meet security requirements for production deployments
|
|
120
|
+
|
|
121
|
+
## Why Use Capiscio CLI?
|
|
122
|
+
|
|
123
|
+
**Catch Integration Issues Before Production:**
|
|
124
|
+
- ❌ Schema validators miss broken JSONRPC endpoints
|
|
125
|
+
- ❌ Manual testing doesn't cover all transport protocols
|
|
126
|
+
- ❌ Integration failures happen at runtime
|
|
127
|
+
- ❌ Unsigned agent cards can't be trusted
|
|
128
|
+
- ✅ **Capiscio tests actual connectivity and protocol compliance**
|
|
129
|
+
- ✅ **Capiscio verifies cryptographic signatures for authenticity**
|
|
130
|
+
|
|
131
|
+
**Real Problems This Solves:**
|
|
132
|
+
- JSONRPC methods return wrong error codes
|
|
133
|
+
- GRPC services are unreachable or misconfigured
|
|
134
|
+
- REST endpoints don't match declared capabilities
|
|
135
|
+
- Agent cards validate but agents don't work
|
|
136
|
+
- Unsigned or tampered agent cards pose security risks
|
|
137
|
+
|
|
138
|
+
## Transport Protocol Testing
|
|
139
|
+
|
|
140
|
+
Unlike basic schema validators, Capiscio CLI actually tests your agent endpoints:
|
|
141
|
+
|
|
142
|
+
- **JSONRPC** - Validates JSON-RPC 2.0 compliance and connectivity
|
|
143
|
+
- **GRPC** - Tests gRPC endpoint accessibility
|
|
144
|
+
- **REST** - Verifies HTTP+JSON endpoint patterns
|
|
145
|
+
- **Consistency** - Ensures equivalent functionality across protocols
|
|
146
|
+
|
|
147
|
+
Perfect for testing your own agents and evaluating third-party agents before integration.
|
|
148
|
+
|
|
149
|
+
## CI/CD Integration
|
|
150
|
+
|
|
151
|
+
### GitHub Actions Example:
|
|
152
|
+
```yaml
|
|
153
|
+
- name: Install and Validate Agent
|
|
154
|
+
run: |
|
|
155
|
+
pip install capiscio
|
|
156
|
+
capiscio validate ./agent-card.json --json --strict
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### Docker Example:
|
|
160
|
+
```dockerfile
|
|
161
|
+
RUN pip install capiscio
|
|
162
|
+
COPY agent-card.json .
|
|
163
|
+
RUN capiscio validate ./agent-card.json --strict
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
Exit codes: 0 = success, 1 = validation failed
|
|
167
|
+
|
|
168
|
+
## Platform Support
|
|
169
|
+
|
|
170
|
+
This package contains pre-built binaries for multiple platforms:
|
|
171
|
+
|
|
172
|
+
- **Linux**: x86_64, ARM64
|
|
173
|
+
- **macOS**: Intel (x64), Apple Silicon (ARM64)
|
|
174
|
+
- **Windows**: x64 (ARM64 available via [direct download](https://capisc.io/downloads))
|
|
175
|
+
- **Python**: 3.7+ (no runtime dependencies required)
|
|
176
|
+
|
|
177
|
+
The Python wrapper automatically detects your platform and runs the appropriate native binary.
|
|
178
|
+
|
|
179
|
+
## FAQ
|
|
180
|
+
|
|
181
|
+
**Q: What is the A2A Protocol?**
|
|
182
|
+
A: The Agent-to-Agent (A2A) protocol v0.3.0 is a standardized specification for AI agent discovery, communication, and interoperability. [Learn more at capisc.io](https://capisc.io).
|
|
183
|
+
|
|
184
|
+
**Q: How is this different from schema validators?**
|
|
185
|
+
A: We actually test live JSONRPC, GRPC, and REST endpoints with transport protocol validation, not just JSON schema structure. We also verify JWS signatures for cryptographic authenticity.
|
|
186
|
+
|
|
187
|
+
**Q: Do I need Node.js installed?**
|
|
188
|
+
A: No! This Python package contains pre-built native binaries that work without any Node.js dependency.
|
|
189
|
+
|
|
190
|
+
**Q: Can I validate LLM agent cards?**
|
|
191
|
+
A: Yes! Perfect for AI/LLM developers validating agent configurations and testing third-party agents before integration.
|
|
192
|
+
|
|
193
|
+
## Development
|
|
194
|
+
|
|
195
|
+
This package contains pre-built native binaries compiled for maximum performance and zero dependencies. The CLI provides the same functionality across all platforms without requiring any additional runtime installations.
|
|
196
|
+
|
|
197
|
+
**Source code:** https://github.com/capiscio/capiscio-cli
|
|
198
|
+
|
|
199
|
+
## License
|
|
200
|
+
|
|
201
|
+
MIT License - see the [main repository](https://github.com/capiscio/capiscio-cli/blob/main/LICENSE) for details.
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
**Need help?** [Visit capisc.io](https://capisc.io) | [Open an issue](https://github.com/capiscio/capiscio-cli/issues) | [Documentation](https://capisc.io/cli) | [Web Validator](https://capisc.io/validator)
|
|
206
|
+
|
|
207
|
+
**Keywords**: A2A protocol, AI agent validation, agent-card.json validator, Python CLI, agent-to-agent protocol, LLM agent cards, AI agent discovery, transport protocol testing, JSONRPC validation, GRPC testing, JWS signature verification
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
capiscio/__init__.py,sha256=XO2PkB1ZSslNlud8F003eFA_mJuGmHs6XzebnuwFvEs,255
|
|
2
|
+
capiscio/cli.py,sha256=bQ_BJVsthM1Bd7Y658Gjcj9xadl2zSWGIQjesARm0Tg,3650
|
|
3
|
+
capiscio/binaries/capiscio-darwin-arm64,sha256=BvTrIGd-kfNMPm3ucBvOcB4juK9NGq-GxHbK6P3CSCA,50595728
|
|
4
|
+
capiscio/binaries/capiscio-darwin-x64,sha256=bLNEYPHq9r0enkg6zDaYbTTgLdIxvN1kQYz1m6h22DQ,56817072
|
|
5
|
+
capiscio/binaries/capiscio-linux-x64,sha256=aHpxH9sQWdp96ob-fOOfqoaA_D4V6_rrpM0P8ffF6so,52127941
|
|
6
|
+
capiscio/binaries/capiscio-win-arm64.exe,sha256=nE2EaQd_T9cKnbWkkL_-CQ9ow44H1Wp7tZIlPRTQC6s,29917646
|
|
7
|
+
capiscio/binaries/capiscio-win-x64.exe,sha256=fyO3JSqx0tkiJsviLXenuA7eBdd1cq13ynjCaAS3T-I,43340158
|
|
8
|
+
capiscio-1.2.2.dist-info/METADATA,sha256=IqwKy_ySha49-LV79I6MARd1IHlx9KNPwYWJAqzFg5c,8672
|
|
9
|
+
capiscio-1.2.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
10
|
+
capiscio-1.2.2.dist-info/entry_points.txt,sha256=VopPHB5eo2LBjOFiraE3JiEOzVmJJVwtUPVfXlYS_ns,47
|
|
11
|
+
capiscio-1.2.2.dist-info/top_level.txt,sha256=Kuk2V-rnWre1x0tW87SRnlteIV1NhngUaXo6V1klMHk,9
|
|
12
|
+
capiscio-1.2.2.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
capiscio
|