lockstock-integrations 1.1.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.
- lockstock_integrations-1.1.0/.gitignore +60 -0
- lockstock_integrations-1.1.0/CHANGELOG.md +75 -0
- lockstock_integrations-1.1.0/PKG-INFO +141 -0
- lockstock_integrations-1.1.0/PYPI_PUBLICATION_PLAN.md +285 -0
- lockstock_integrations-1.1.0/README.md +101 -0
- lockstock_integrations-1.1.0/examples/demo_capability_enforcement.py +207 -0
- lockstock_integrations-1.1.0/examples/poe_lockstock_agent.py +285 -0
- lockstock_integrations-1.1.0/examples/test_live_api.py +143 -0
- lockstock_integrations-1.1.0/examples/test_openai_lockstock.py +114 -0
- lockstock_integrations-1.1.0/lockstock_a2a/__init__.py +23 -0
- lockstock_integrations-1.1.0/lockstock_a2a/adapter.py +216 -0
- lockstock_integrations-1.1.0/lockstock_a2a/agent_card.py +169 -0
- lockstock_integrations-1.1.0/lockstock_a2a/task_handler.py +294 -0
- lockstock_integrations-1.1.0/lockstock_claude/__init__.py +10 -0
- lockstock_integrations-1.1.0/lockstock_claude/hooks.py +182 -0
- lockstock_integrations-1.1.0/lockstock_claude/skills.py +145 -0
- lockstock_integrations-1.1.0/lockstock_core/__init__.py +10 -0
- lockstock_integrations-1.1.0/lockstock_core/client.py +281 -0
- lockstock_integrations-1.1.0/lockstock_core/types.py +264 -0
- lockstock_integrations-1.1.0/lockstock_langgraph/__init__.py +19 -0
- lockstock_integrations-1.1.0/lockstock_langgraph/checkpointer.py +225 -0
- lockstock_integrations-1.1.0/lockstock_langgraph/middleware.py +295 -0
- lockstock_integrations-1.1.0/lockstock_openai/__init__.py +15 -0
- lockstock_integrations-1.1.0/lockstock_openai/guardrails.py +352 -0
- lockstock_integrations-1.1.0/lockstock_openai/tracing.py +220 -0
- lockstock_integrations-1.1.0/pyproject.toml +53 -0
- lockstock_integrations-1.1.0/test_trinity_lockstock.py +255 -0
- lockstock_integrations-1.1.0/tests/__init__.py +0 -0
- lockstock_integrations-1.1.0/tests/test_chain_sync.py +423 -0
- lockstock_integrations-1.1.0/tests/test_e2e_provisioning.py +424 -0
- lockstock_integrations-1.1.0/tests/test_generator_sync.py +169 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Environment files
|
|
2
|
+
.env
|
|
3
|
+
.env.*
|
|
4
|
+
.envrc
|
|
5
|
+
*.seal
|
|
6
|
+
|
|
7
|
+
# Secrets and tokens
|
|
8
|
+
*.key
|
|
9
|
+
*.pem
|
|
10
|
+
*_PRIVATE*
|
|
11
|
+
*_SECRET*
|
|
12
|
+
*token*
|
|
13
|
+
*TOKEN*
|
|
14
|
+
|
|
15
|
+
# Temporary files
|
|
16
|
+
*.tmp
|
|
17
|
+
*.log
|
|
18
|
+
*.swp
|
|
19
|
+
*.swo
|
|
20
|
+
*~
|
|
21
|
+
.DS_Store
|
|
22
|
+
|
|
23
|
+
# IDE
|
|
24
|
+
.vscode/
|
|
25
|
+
.idea/
|
|
26
|
+
*.iml
|
|
27
|
+
|
|
28
|
+
# Node
|
|
29
|
+
node_modules/
|
|
30
|
+
npm-debug.log
|
|
31
|
+
package-lock.json
|
|
32
|
+
|
|
33
|
+
# Python
|
|
34
|
+
__pycache__/
|
|
35
|
+
*.pyc
|
|
36
|
+
*.pyo
|
|
37
|
+
*.pyd
|
|
38
|
+
.Python
|
|
39
|
+
*.egg-info/
|
|
40
|
+
dist/
|
|
41
|
+
build/
|
|
42
|
+
|
|
43
|
+
# Coordination tmp
|
|
44
|
+
/tmp/
|
|
45
|
+
/acp-environment/tmp/
|
|
46
|
+
|
|
47
|
+
# Test artifacts
|
|
48
|
+
*.test
|
|
49
|
+
test-*.json
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
# Added by cargo
|
|
53
|
+
|
|
54
|
+
/target
|
|
55
|
+
|
|
56
|
+
# Dev infrastructure (belongs in coordination repo, not product repos)
|
|
57
|
+
acp-relay/
|
|
58
|
+
queue/
|
|
59
|
+
guard_ingest/target/
|
|
60
|
+
# Note: guard_ingest/Cargo.lock SHOULD be committed for reproducible builds
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to lockstock-integrations 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
|
+
## [1.1.0] - 2026-02-05
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
- **BREAKING**: Converted to chain-based authentication (NO SECRETS)
|
|
12
|
+
- `LockStockGuardrail.from_liberty()` now uses Chain Authority Mode
|
|
13
|
+
- Guard daemon tracks chain state (hash, matrix, sequence), not secrets
|
|
14
|
+
- Guard uses `current_hash` as HMAC key for signing
|
|
15
|
+
- Genesis token is BURNED to create initial chain state
|
|
16
|
+
- NO persistent secrets exist after genesis
|
|
17
|
+
- Removed secret retrieval from `from_liberty()` method
|
|
18
|
+
- Added chain state tracking (`current_hash`, `current_sequence`, `current_matrix`)
|
|
19
|
+
- Added `_ensure_chain_initialized()` method to sync chain state from Guard
|
|
20
|
+
- Added `_verify_with_server()` method for server communication
|
|
21
|
+
- Updated `validate()` to use Guard's `sign_and_advance()` instead of legacy `verify()`
|
|
22
|
+
|
|
23
|
+
### Security
|
|
24
|
+
- Implements correct security model: secrets NEVER leave Guard daemon
|
|
25
|
+
- Guard performs all HMAC signing internally using chain state
|
|
26
|
+
- Application only receives signatures, never secrets
|
|
27
|
+
- Aligns with TECHNICAL_SPECIFICATION.md line 1: "YOU DO NOT NEED AGENT SECRETS FOR ANYTHING"
|
|
28
|
+
|
|
29
|
+
### Migration Guide
|
|
30
|
+
If upgrading from v1.0.1:
|
|
31
|
+
1. No code changes required - `from_liberty()` API is unchanged
|
|
32
|
+
2. Ensure Guard daemon supports `sign_and_advance()` method
|
|
33
|
+
3. Ensure Guard daemon has chain state synced from server
|
|
34
|
+
|
|
35
|
+
## [1.0.1] - 2026-02-05 [YANKED]
|
|
36
|
+
|
|
37
|
+
**YANKED**: This version implements WRONG security model (secret-based instead of chain-based)
|
|
38
|
+
|
|
39
|
+
### Why Yanked
|
|
40
|
+
- Uses legacy `guard.get(agent_id)` to retrieve secrets
|
|
41
|
+
- Violates "secrets NEVER leave daemon" security model
|
|
42
|
+
- Genesis token should be BURNED, not converted to persistent secret
|
|
43
|
+
- Chain state (hash) should be HMAC key, not a separate secret
|
|
44
|
+
|
|
45
|
+
### What Was Added (WRONG)
|
|
46
|
+
- Implemented `LockStockGuardrail.from_liberty()` using secret retrieval (INCORRECT)
|
|
47
|
+
- Retrieved hardware-bound secrets from Guard daemon (WRONG APPROACH)
|
|
48
|
+
|
|
49
|
+
### Fix
|
|
50
|
+
Upgrade to v1.1.0 which implements correct chain-based authentication
|
|
51
|
+
|
|
52
|
+
## [1.0.0] - 2026-02-05
|
|
53
|
+
|
|
54
|
+
### Fixed
|
|
55
|
+
- **CRITICAL**: Fixed SHELL generator mismatch with server (was Matrix(1,1,0,1), now Matrix(1,4,0,1))
|
|
56
|
+
- This resolves "Topology violation: matrix multiplication check failed" errors when using Shell capability
|
|
57
|
+
- Server was updated to v1.0.8+ with distinct SHELL generator but Python SDK was not synchronized
|
|
58
|
+
- Discovered during production verification testing on RunPod before PyPI publish
|
|
59
|
+
- All 7/7 production tests now pass including Shell capability
|
|
60
|
+
|
|
61
|
+
### Breaking Changes
|
|
62
|
+
- SHELL generator matrix changed from Matrix(1, 1, 0, 1) to Matrix(1, 4, 0, 1) to match server v1.0.8+
|
|
63
|
+
- Agents using SDK versions prior to 1.0.0 will fail Shell capability verification with topology violations
|
|
64
|
+
- Upgrade required for all deployed agents using Shell capability
|
|
65
|
+
|
|
66
|
+
## [0.1.0] - 2026-01-XX
|
|
67
|
+
|
|
68
|
+
### Added
|
|
69
|
+
- Initial release
|
|
70
|
+
- Core LockStockClient with matrix state management
|
|
71
|
+
- Integration modules for OpenAI, LangGraph, and Claude
|
|
72
|
+
- Support for all capability types: Deploy, Restart, Backup, Rollback, Heartbeat, Checkpoint, Teleport, FileRead, FileWrite, Network, Shell, Database, Handoff, Delegate
|
|
73
|
+
- GL(2, F_65537) matrix group for topological state transitions
|
|
74
|
+
- HMAC-SHA256 signature generation
|
|
75
|
+
- Audit trail support
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: lockstock-integrations
|
|
3
|
+
Version: 1.1.0
|
|
4
|
+
Summary: LockStock compliance runtime integrations for AI Agent SDKs
|
|
5
|
+
Project-URL: Homepage, https://d3cipher.ai
|
|
6
|
+
Project-URL: Documentation, https://d3cipher.ai/docs
|
|
7
|
+
Project-URL: Repository, https://gitlab.com/d3cipher/lockstock
|
|
8
|
+
Author-email: d3cipher <dev@d3cipher.ai>
|
|
9
|
+
License-Expression: MIT
|
|
10
|
+
Keywords: ai-agents,audit,authentication,compliance,lockstock
|
|
11
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Topic :: Security :: Cryptography
|
|
19
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
20
|
+
Requires-Python: >=3.10
|
|
21
|
+
Requires-Dist: httpx>=0.25.0
|
|
22
|
+
Requires-Dist: pydantic>=2.0.0
|
|
23
|
+
Provides-Extra: adk
|
|
24
|
+
Requires-Dist: google-adk>=0.1.0; extra == 'adk'
|
|
25
|
+
Provides-Extra: all
|
|
26
|
+
Requires-Dist: anthropic>=0.25.0; extra == 'all'
|
|
27
|
+
Requires-Dist: crewai>=0.50.0; extra == 'all'
|
|
28
|
+
Requires-Dist: google-adk>=0.1.0; extra == 'all'
|
|
29
|
+
Requires-Dist: langgraph>=0.2.0; extra == 'all'
|
|
30
|
+
Requires-Dist: openai-agents>=0.6.0; extra == 'all'
|
|
31
|
+
Provides-Extra: claude
|
|
32
|
+
Requires-Dist: anthropic>=0.25.0; extra == 'claude'
|
|
33
|
+
Provides-Extra: crewai
|
|
34
|
+
Requires-Dist: crewai>=0.50.0; extra == 'crewai'
|
|
35
|
+
Provides-Extra: langgraph
|
|
36
|
+
Requires-Dist: langgraph>=0.2.0; extra == 'langgraph'
|
|
37
|
+
Provides-Extra: openai
|
|
38
|
+
Requires-Dist: openai-agents>=0.6.0; extra == 'openai'
|
|
39
|
+
Description-Content-Type: text/markdown
|
|
40
|
+
|
|
41
|
+
# LockStock Integrations
|
|
42
|
+
|
|
43
|
+
Universal compliance runtime for AI Agent SDKs. LockStock provides cryptographic identity, capability authorization, and audit trails for agents running on any framework.
|
|
44
|
+
|
|
45
|
+
## Supported Frameworks
|
|
46
|
+
|
|
47
|
+
| Integration | Framework | Status |
|
|
48
|
+
|-------------|-----------|--------|
|
|
49
|
+
| `lockstock_claude` | Claude Agent SDK | Alpha |
|
|
50
|
+
| `lockstock_openai` | OpenAI Agents SDK | Alpha |
|
|
51
|
+
| `lockstock_langgraph` | LangGraph | Alpha |
|
|
52
|
+
| `lockstock_a2a` | A2A Protocol | Alpha |
|
|
53
|
+
| `lockstock_adk` | Google ADK | Planned |
|
|
54
|
+
| `lockstock_crewai` | CrewAI | Planned |
|
|
55
|
+
|
|
56
|
+
## Installation
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
# Install with specific framework support
|
|
60
|
+
pip install lockstock-integrations[claude]
|
|
61
|
+
pip install lockstock-integrations[openai]
|
|
62
|
+
pip install lockstock-integrations[langgraph]
|
|
63
|
+
|
|
64
|
+
# Install with all frameworks
|
|
65
|
+
pip install lockstock-integrations[all]
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Quick Start
|
|
69
|
+
|
|
70
|
+
### Claude Agent SDK
|
|
71
|
+
|
|
72
|
+
```python
|
|
73
|
+
from lockstock_claude import LockStockHook
|
|
74
|
+
|
|
75
|
+
# Create hook with your agent credentials
|
|
76
|
+
hook = LockStockHook(
|
|
77
|
+
agent_id="agent_abc123",
|
|
78
|
+
api_key="lsk_admin_...",
|
|
79
|
+
endpoint="https://lockstock-api-i9kp.onrender.com"
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
# Use as pre-tool-execution hook
|
|
83
|
+
# The hook will verify capabilities before each tool call
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### OpenAI Agents SDK
|
|
87
|
+
|
|
88
|
+
```python
|
|
89
|
+
from lockstock_openai import LockStockGuardrail
|
|
90
|
+
|
|
91
|
+
guardrail = LockStockGuardrail(agent_id="agent_abc123")
|
|
92
|
+
|
|
93
|
+
# Add to your agent's guardrails
|
|
94
|
+
agent = Agent(
|
|
95
|
+
name="my-agent",
|
|
96
|
+
guardrails=[guardrail]
|
|
97
|
+
)
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### LangGraph
|
|
101
|
+
|
|
102
|
+
```python
|
|
103
|
+
from lockstock_langgraph import lockstock_middleware
|
|
104
|
+
|
|
105
|
+
# Wrap your graph with LockStock middleware
|
|
106
|
+
app = lockstock_middleware(
|
|
107
|
+
graph=your_graph,
|
|
108
|
+
agent_id="agent_abc123"
|
|
109
|
+
)
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Architecture
|
|
113
|
+
|
|
114
|
+
```
|
|
115
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
116
|
+
│ YOUR AGENT RUNTIME │
|
|
117
|
+
│ (Claude Agent SDK / OpenAI / LangGraph / CrewAI / ADK) │
|
|
118
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
119
|
+
│
|
|
120
|
+
▼
|
|
121
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
122
|
+
│ LOCKSTOCK INTEGRATION │
|
|
123
|
+
│ │
|
|
124
|
+
│ • Pre-tool-execution hooks │
|
|
125
|
+
│ • Capability verification │
|
|
126
|
+
│ • Audit trail logging │
|
|
127
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
128
|
+
│
|
|
129
|
+
▼
|
|
130
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
131
|
+
│ LOCKSTOCK CORE API │
|
|
132
|
+
│ │
|
|
133
|
+
│ • /verify - Capability authorization │
|
|
134
|
+
│ • /bootstrap - Agent identity initialization │
|
|
135
|
+
│ • Hash chain - Cryptographic audit trail │
|
|
136
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## License
|
|
140
|
+
|
|
141
|
+
MIT License - See LICENSE file for details.
|
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
# PyPI Publication Plan - lockstock-integrations v1.1.0
|
|
2
|
+
|
|
3
|
+
**Date**: 2026-02-05
|
|
4
|
+
**Status**: Ready for Publication
|
|
5
|
+
**Version**: 1.1.0 (Chain-Based Authentication)
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Current Status
|
|
10
|
+
|
|
11
|
+
### ✅ Completed
|
|
12
|
+
|
|
13
|
+
1. **Code Implementation**
|
|
14
|
+
- v1.1.0 chain-based authentication implemented
|
|
15
|
+
- `LockStockGuardrail.from_liberty()` uses NO secrets
|
|
16
|
+
- Guard daemon integration complete
|
|
17
|
+
- All integrations updated (OpenAI, LangGraph, Claude)
|
|
18
|
+
|
|
19
|
+
2. **Documentation**
|
|
20
|
+
- CHANGELOG.md updated with v1.1.0 notes
|
|
21
|
+
- v1.0.1 marked as [YANKED]
|
|
22
|
+
- NO_SECRETS_ARCHITECTURE.md created
|
|
23
|
+
- TEST_VERIFICATION.md documents 7/7 tests passing
|
|
24
|
+
- CLAUDE.md updated with warnings
|
|
25
|
+
|
|
26
|
+
3. **Testing Infrastructure**
|
|
27
|
+
- test_trinity_lockstock.py updated to v1.1.0 pattern
|
|
28
|
+
- test_e2e_provisioning.py created (comprehensive E2E test)
|
|
29
|
+
- test_chain_sync.py created (chain state verification)
|
|
30
|
+
- test_generator_sync.py exists (generator matrix validation)
|
|
31
|
+
|
|
32
|
+
4. **Version Configuration**
|
|
33
|
+
- pyproject.toml shows version = "1.1.0"
|
|
34
|
+
- All dependencies specified correctly
|
|
35
|
+
|
|
36
|
+
### 🚧 Remaining Tasks
|
|
37
|
+
|
|
38
|
+
1. **Yank v1.0.1 from PyPI**
|
|
39
|
+
- Package was published with WRONG security model
|
|
40
|
+
- Must be yanked to prevent usage
|
|
41
|
+
- Command: `twine yank lockstock-integrations==1.0.1 -r pypi -c "Wrong security model - use v1.1.0"`
|
|
42
|
+
|
|
43
|
+
2. **Build v1.1.0 Package**
|
|
44
|
+
- Clean old builds
|
|
45
|
+
- Build new wheel and sdist
|
|
46
|
+
- Verify package contents
|
|
47
|
+
|
|
48
|
+
3. **Publish to PyPI**
|
|
49
|
+
- Upload v1.1.0 to PyPI
|
|
50
|
+
- Verify package appears correctly
|
|
51
|
+
- Test installation
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Step-by-Step Publication Process
|
|
56
|
+
|
|
57
|
+
### Prerequisites
|
|
58
|
+
|
|
59
|
+
Ensure you have:
|
|
60
|
+
- `twine` installed: `pip install twine`
|
|
61
|
+
- `build` installed: `pip install build`
|
|
62
|
+
- PyPI credentials configured
|
|
63
|
+
|
|
64
|
+
### Step 1: Yank v1.0.1
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
# Yank the incorrect v1.0.1
|
|
68
|
+
twine yank lockstock-integrations==1.0.1 -r pypi \
|
|
69
|
+
-c "Wrong security model - use v1.1.0 instead"
|
|
70
|
+
|
|
71
|
+
# Verify yanked status
|
|
72
|
+
# Visit: https://pypi.org/project/lockstock-integrations/1.0.1/
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Step 2: Clean Build Directory
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
cd lockstock-integrations
|
|
79
|
+
rm -rf dist/lockstock_integrations-1.1.0*
|
|
80
|
+
rm -rf build/
|
|
81
|
+
rm -rf *.egg-info/
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Step 3: Build Package
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
cd lockstock-integrations
|
|
88
|
+
python -m build
|
|
89
|
+
|
|
90
|
+
# Expected output:
|
|
91
|
+
# dist/lockstock_integrations-1.1.0-py3-none-any.whl
|
|
92
|
+
# dist/lockstock_integrations-1.1.0.tar.gz
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Step 4: Verify Package Contents
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
# List wheel contents
|
|
99
|
+
unzip -l dist/lockstock_integrations-1.1.0-py3-none-any.whl
|
|
100
|
+
|
|
101
|
+
# Check for:
|
|
102
|
+
# - lockstock_openai/guardrails.py (v1.1.0 chain-based)
|
|
103
|
+
# - lockstock_core/client.py
|
|
104
|
+
# - lockstock_claude/
|
|
105
|
+
# - lockstock_langgraph/
|
|
106
|
+
# - All __init__.py files
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### Step 5: Upload to PyPI
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
cd lockstock-integrations
|
|
113
|
+
twine upload dist/lockstock_integrations-1.1.0*
|
|
114
|
+
|
|
115
|
+
# Enter PyPI credentials when prompted
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### Step 6: Verify Publication
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
# Check PyPI page
|
|
122
|
+
# https://pypi.org/project/lockstock-integrations/
|
|
123
|
+
|
|
124
|
+
# Test installation in clean environment
|
|
125
|
+
python -m venv test_env
|
|
126
|
+
source test_env/bin/activate
|
|
127
|
+
pip install lockstock-integrations==1.1.0
|
|
128
|
+
|
|
129
|
+
# Verify imports work
|
|
130
|
+
python -c "from lockstock_openai import LockStockGuardrail; print('OK')"
|
|
131
|
+
python -c "from lockstock_core import LockStockClient; print('OK')"
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## Testing Before Publication
|
|
137
|
+
|
|
138
|
+
### Unit Tests
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
cd lockstock-integrations
|
|
142
|
+
|
|
143
|
+
# Run generator sync test
|
|
144
|
+
python tests/test_generator_sync.py
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Integration Tests
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
# Test with live agent (requires Guard daemon and agent provisioned)
|
|
151
|
+
export AGENT_ID="agent_test#1"
|
|
152
|
+
export GENESIS_TOKEN="your_token_here"
|
|
153
|
+
|
|
154
|
+
# E2E provisioning test
|
|
155
|
+
python tests/test_e2e_provisioning.py $AGENT_ID $GENESIS_TOKEN
|
|
156
|
+
|
|
157
|
+
# Chain sync test
|
|
158
|
+
python tests/test_chain_sync.py $AGENT_ID
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### Trinity Test (Full Stack)
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
# Full OpenAI agent test with POE API
|
|
165
|
+
cd lockstock-integrations
|
|
166
|
+
python test_trinity_lockstock.py
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
## Post-Publication Verification
|
|
172
|
+
|
|
173
|
+
### 1. Customer Quickstart Flow
|
|
174
|
+
|
|
175
|
+
Verify a new customer can:
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
# 1. Install from PyPI
|
|
179
|
+
pip install lockstock-integrations[openai]
|
|
180
|
+
|
|
181
|
+
# 2. Provision agent identity
|
|
182
|
+
# (Requires genesis token from dashboard)
|
|
183
|
+
|
|
184
|
+
# 3. Bind with Guard daemon
|
|
185
|
+
lockstock-guard bind --agent agent_test#1 --token GENESIS_TOKEN
|
|
186
|
+
|
|
187
|
+
# 4. Use in code
|
|
188
|
+
python -c "
|
|
189
|
+
from lockstock_openai import LockStockGuardrail
|
|
190
|
+
|
|
191
|
+
guardrail = LockStockGuardrail.from_liberty(
|
|
192
|
+
agent_id='agent_test#1',
|
|
193
|
+
socket_path='/var/run/lockstock-guard/guard.sock'
|
|
194
|
+
)
|
|
195
|
+
print('✓ NO SECRETS USED!')
|
|
196
|
+
"
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
### 2. Verify Documentation
|
|
200
|
+
|
|
201
|
+
Check that PyPI page shows:
|
|
202
|
+
- Correct v1.1.0 version
|
|
203
|
+
- CHANGELOG with v1.0.1 marked as YANKED
|
|
204
|
+
- Installation instructions
|
|
205
|
+
- Framework support matrix
|
|
206
|
+
- Link to documentation
|
|
207
|
+
|
|
208
|
+
### 3. Verify GitHub/GitLab
|
|
209
|
+
|
|
210
|
+
Ensure repository has:
|
|
211
|
+
- v1.1.0 git tag
|
|
212
|
+
- CHANGELOG.md updated
|
|
213
|
+
- README.md accurate
|
|
214
|
+
- docs/NO_SECRETS_ARCHITECTURE.md visible
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
## What This Release Fixes
|
|
219
|
+
|
|
220
|
+
### v1.0.1 Problems (YANKED)
|
|
221
|
+
|
|
222
|
+
❌ Retrieved secrets from Guard daemon using `guard.get()`
|
|
223
|
+
❌ Stored secrets in SDK classes
|
|
224
|
+
❌ Violated "secrets never leave daemon" security model
|
|
225
|
+
❌ Used persistent secret as HMAC key
|
|
226
|
+
|
|
227
|
+
### v1.1.0 Solutions
|
|
228
|
+
|
|
229
|
+
✅ NO secret retrieval or storage
|
|
230
|
+
✅ Guard daemon tracks chain state internally
|
|
231
|
+
✅ `current_hash` IS the HMAC key
|
|
232
|
+
✅ Genesis token is BURNED, not converted to secret
|
|
233
|
+
✅ Chain-based authentication throughout
|
|
234
|
+
|
|
235
|
+
---
|
|
236
|
+
|
|
237
|
+
## Customer-Facing Message
|
|
238
|
+
|
|
239
|
+
When customers ask about the v1.0.1 → v1.1.0 change:
|
|
240
|
+
|
|
241
|
+
> **v1.1.0 implements the correct chain-based authentication model.**
|
|
242
|
+
>
|
|
243
|
+
> v1.0.1 was yanked because it implemented a secret-storage pattern that violated LockStock's security architecture. In LockStock:
|
|
244
|
+
>
|
|
245
|
+
> - **Genesis tokens are BURNED** after one use (not stored)
|
|
246
|
+
> - **Chain state evolves** with each action (hash, matrix, sequence)
|
|
247
|
+
> - **current_hash IS the HMAC key** (no separate persistent secret)
|
|
248
|
+
> - **NO secrets exist** anywhere in the system after genesis
|
|
249
|
+
>
|
|
250
|
+
> **Migration from v1.0.1 to v1.1.0:**
|
|
251
|
+
> - API is unchanged - `from_liberty()` works the same
|
|
252
|
+
> - Ensure Guard daemon supports `sign_and_advance()` method
|
|
253
|
+
> - Ensure Guard daemon has synced chain state from server
|
|
254
|
+
> - No code changes required in your agent
|
|
255
|
+
|
|
256
|
+
---
|
|
257
|
+
|
|
258
|
+
## Success Criteria
|
|
259
|
+
|
|
260
|
+
v1.1.0 publication is successful when:
|
|
261
|
+
|
|
262
|
+
- ✅ v1.0.1 is yanked on PyPI
|
|
263
|
+
- ✅ v1.1.0 is published and installable
|
|
264
|
+
- ✅ Package contents are correct
|
|
265
|
+
- ✅ All tests pass in clean environment
|
|
266
|
+
- ✅ Customer quickstart flow works end-to-end
|
|
267
|
+
- ✅ Documentation is accurate
|
|
268
|
+
- ✅ Audit trail shows topological causal ordering
|
|
269
|
+
|
|
270
|
+
---
|
|
271
|
+
|
|
272
|
+
## Contact
|
|
273
|
+
|
|
274
|
+
If issues arise during publication:
|
|
275
|
+
- Check Guard daemon is running: `lockstock-guard status`
|
|
276
|
+
- Verify server is accessible: `curl https://lockstock-api-i9kp.onrender.com/health`
|
|
277
|
+
- Review audit logs: `https://lockstock-api-i9kp.onrender.com/api/guard/audit`
|
|
278
|
+
|
|
279
|
+
---
|
|
280
|
+
|
|
281
|
+
**Ready for Publication**: YES
|
|
282
|
+
**Blocking Issues**: NONE
|
|
283
|
+
**Next Step**: Execute Step 1 (Yank v1.0.1)
|
|
284
|
+
|
|
285
|
+
**WE HAVE NO SECRETS TO KEEP!**
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# LockStock Integrations
|
|
2
|
+
|
|
3
|
+
Universal compliance runtime for AI Agent SDKs. LockStock provides cryptographic identity, capability authorization, and audit trails for agents running on any framework.
|
|
4
|
+
|
|
5
|
+
## Supported Frameworks
|
|
6
|
+
|
|
7
|
+
| Integration | Framework | Status |
|
|
8
|
+
|-------------|-----------|--------|
|
|
9
|
+
| `lockstock_claude` | Claude Agent SDK | Alpha |
|
|
10
|
+
| `lockstock_openai` | OpenAI Agents SDK | Alpha |
|
|
11
|
+
| `lockstock_langgraph` | LangGraph | Alpha |
|
|
12
|
+
| `lockstock_a2a` | A2A Protocol | Alpha |
|
|
13
|
+
| `lockstock_adk` | Google ADK | Planned |
|
|
14
|
+
| `lockstock_crewai` | CrewAI | Planned |
|
|
15
|
+
|
|
16
|
+
## Installation
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# Install with specific framework support
|
|
20
|
+
pip install lockstock-integrations[claude]
|
|
21
|
+
pip install lockstock-integrations[openai]
|
|
22
|
+
pip install lockstock-integrations[langgraph]
|
|
23
|
+
|
|
24
|
+
# Install with all frameworks
|
|
25
|
+
pip install lockstock-integrations[all]
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Quick Start
|
|
29
|
+
|
|
30
|
+
### Claude Agent SDK
|
|
31
|
+
|
|
32
|
+
```python
|
|
33
|
+
from lockstock_claude import LockStockHook
|
|
34
|
+
|
|
35
|
+
# Create hook with your agent credentials
|
|
36
|
+
hook = LockStockHook(
|
|
37
|
+
agent_id="agent_abc123",
|
|
38
|
+
api_key="lsk_admin_...",
|
|
39
|
+
endpoint="https://lockstock-api-i9kp.onrender.com"
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
# Use as pre-tool-execution hook
|
|
43
|
+
# The hook will verify capabilities before each tool call
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### OpenAI Agents SDK
|
|
47
|
+
|
|
48
|
+
```python
|
|
49
|
+
from lockstock_openai import LockStockGuardrail
|
|
50
|
+
|
|
51
|
+
guardrail = LockStockGuardrail(agent_id="agent_abc123")
|
|
52
|
+
|
|
53
|
+
# Add to your agent's guardrails
|
|
54
|
+
agent = Agent(
|
|
55
|
+
name="my-agent",
|
|
56
|
+
guardrails=[guardrail]
|
|
57
|
+
)
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### LangGraph
|
|
61
|
+
|
|
62
|
+
```python
|
|
63
|
+
from lockstock_langgraph import lockstock_middleware
|
|
64
|
+
|
|
65
|
+
# Wrap your graph with LockStock middleware
|
|
66
|
+
app = lockstock_middleware(
|
|
67
|
+
graph=your_graph,
|
|
68
|
+
agent_id="agent_abc123"
|
|
69
|
+
)
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Architecture
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
76
|
+
│ YOUR AGENT RUNTIME │
|
|
77
|
+
│ (Claude Agent SDK / OpenAI / LangGraph / CrewAI / ADK) │
|
|
78
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
79
|
+
│
|
|
80
|
+
▼
|
|
81
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
82
|
+
│ LOCKSTOCK INTEGRATION │
|
|
83
|
+
│ │
|
|
84
|
+
│ • Pre-tool-execution hooks │
|
|
85
|
+
│ • Capability verification │
|
|
86
|
+
│ • Audit trail logging │
|
|
87
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
88
|
+
│
|
|
89
|
+
▼
|
|
90
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
91
|
+
│ LOCKSTOCK CORE API │
|
|
92
|
+
│ │
|
|
93
|
+
│ • /verify - Capability authorization │
|
|
94
|
+
│ • /bootstrap - Agent identity initialization │
|
|
95
|
+
│ • Hash chain - Cryptographic audit trail │
|
|
96
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## License
|
|
100
|
+
|
|
101
|
+
MIT License - See LICENSE file for details.
|