lockermcp 0.1.1__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.
Files changed (37) hide show
  1. lockermcp-0.1.1/.dockerignore +13 -0
  2. lockermcp-0.1.1/.env.example +41 -0
  3. lockermcp-0.1.1/Dockerfile +26 -0
  4. lockermcp-0.1.1/LICENSE +661 -0
  5. lockermcp-0.1.1/MANIFEST.in +32 -0
  6. lockermcp-0.1.1/PKG-INFO +404 -0
  7. lockermcp-0.1.1/README.md +374 -0
  8. lockermcp-0.1.1/RELEASE_NOTES.md +60 -0
  9. lockermcp-0.1.1/demo_handoff.py +65 -0
  10. lockermcp-0.1.1/docker-compose.yml +14 -0
  11. lockermcp-0.1.1/lockerd/__init__.py +3 -0
  12. lockermcp-0.1.1/lockerd/__main__.py +17 -0
  13. lockermcp-0.1.1/lockerd/config.py +61 -0
  14. lockermcp-0.1.1/lockerd/db.py +264 -0
  15. lockermcp-0.1.1/lockerd/hashchain.py +69 -0
  16. lockermcp-0.1.1/lockerd/main.py +428 -0
  17. lockermcp-0.1.1/lockerd/models.py +97 -0
  18. lockermcp-0.1.1/lockerd/payments.py +127 -0
  19. lockermcp-0.1.1/lockermcp/__init__.py +3 -0
  20. lockermcp-0.1.1/lockermcp/__main__.py +11 -0
  21. lockermcp-0.1.1/lockermcp/server.py +259 -0
  22. lockermcp-0.1.1/lockermcp.egg-info/PKG-INFO +404 -0
  23. lockermcp-0.1.1/lockermcp.egg-info/SOURCES.txt +35 -0
  24. lockermcp-0.1.1/lockermcp.egg-info/dependency_links.txt +1 -0
  25. lockermcp-0.1.1/lockermcp.egg-info/entry_points.txt +3 -0
  26. lockermcp-0.1.1/lockermcp.egg-info/requires.txt +10 -0
  27. lockermcp-0.1.1/lockermcp.egg-info/top_level.txt +2 -0
  28. lockermcp-0.1.1/mcp_config.example.json +11 -0
  29. lockermcp-0.1.1/pyproject.toml +55 -0
  30. lockermcp-0.1.1/scripts/dogfood_llm.py +297 -0
  31. lockermcp-0.1.1/scripts/inspect_pad.py +108 -0
  32. lockermcp-0.1.1/scripts/release_build.py +230 -0
  33. lockermcp-0.1.1/scripts/test_handoff_e2e.py +205 -0
  34. lockermcp-0.1.1/setup.cfg +4 -0
  35. lockermcp-0.1.1/tests/test_hardening.py +152 -0
  36. lockermcp-0.1.1/tests/test_lockerd.py +419 -0
  37. lockermcp-0.1.1/tests/test_payments.py +160 -0
@@ -0,0 +1,13 @@
1
+ .venv
2
+ .git
3
+ __pycache__
4
+ *.pyc
5
+ *.db
6
+ *.db-wal
7
+ *.db-shm
8
+ .pytest_cache
9
+ tests
10
+ scripts
11
+ *.egg-info
12
+ build
13
+ dist
@@ -0,0 +1,41 @@
1
+ # Agent Locker runtime configuration. Copy to .env and adjust.
2
+ #
3
+ # Daemon (lockerd) reads: LOCKER_MODE, LOCKER_DB_PATH, LOCKER_READ_LEASE_SECONDS,
4
+ # LOCKER_HOST, LOCKER_PORT,
5
+ # PAYMENT_WALLET_ADDRESS, BASE_RPC_URL, REQUIRED_USDC_UNITS, USDC_CONTRACT
6
+ # MCP server (lockermcp) reads: LOCKER_URL
7
+
8
+ # --- daemon ---
9
+
10
+ # Auth mode: "open" (open access, default), "dev" (alias), or "txid" (pay-per-pad
11
+ # via Base USDC tx-hash receipt checking). "local" and "x402" are legacy aliases.
12
+ LOCKER_MODE=open
13
+
14
+ # SQLite database path (single-file, WAL mode)
15
+ LOCKER_DB_PATH=locker.db
16
+
17
+ # read_once ticket lease window, in seconds
18
+ LOCKER_READ_LEASE_SECONDS=600
19
+
20
+ # HTTP bind address / port
21
+ LOCKER_HOST=127.0.0.1
22
+ LOCKER_PORT=8000
23
+
24
+ # --- txid payments (only used when LOCKER_MODE=txid) ---
25
+
26
+ # Receiving EVM address. Required when LOCKER_MODE=txid (daemon fails closed if unset).
27
+ PAYMENT_WALLET_ADDRESS=
28
+
29
+ # Base JSON-RPC endpoint
30
+ BASE_RPC_URL=https://mainnet.base.org
31
+
32
+ # Minimum payment in USDC atomic units (6 decimals); 2000 = $0.002
33
+ REQUIRED_USDC_UNITS=2000
34
+
35
+ # Base native USDC token contract
36
+ USDC_CONTRACT=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
37
+
38
+ # --- lockermcp (MCP server) ---
39
+
40
+ # URL of the daemon the MCP tools talk to
41
+ LOCKER_URL=http://127.0.0.1:8000
@@ -0,0 +1,26 @@
1
+ # Minimal runtime image for the Agent Locker daemon (FastAPI + aiosqlite).
2
+ # Plain uvicorn (no [standard] extras) so nothing needs to compile on musl.
3
+ FROM python:3.11-alpine
4
+
5
+ # Non-root user
6
+ RUN addgroup -S locker && adduser -S locker -G locker
7
+
8
+ WORKDIR /app
9
+
10
+ COPY pyproject.toml ./
11
+ COPY lockerd/ lockerd/
12
+ RUN pip install --no-cache-dir .
13
+
14
+ # WAL-mode SQLite lives here (see docker-compose volume)
15
+ RUN mkdir -p /data && chown -R locker:locker /data /app
16
+
17
+ USER locker
18
+
19
+ ENV LOCKER_DB_PATH=/data/locker.db \
20
+ LOCKER_MODE=local \
21
+ LOCKER_HOST=0.0.0.0 \
22
+ LOCKER_PORT=8000
23
+
24
+ EXPOSE 8000
25
+
26
+ CMD ["python", "-m", "lockerd"]