envarpay 0.1.0a6__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.
- envarpay-0.1.0a6/.dockerignore +16 -0
- envarpay-0.1.0a6/.github/ISSUE_TEMPLATE/bug_report.yml +25 -0
- envarpay-0.1.0a6/.github/ISSUE_TEMPLATE/config.yml +5 -0
- envarpay-0.1.0a6/.github/ISSUE_TEMPLATE/feature_request.yml +14 -0
- envarpay-0.1.0a6/.github/workflows/ci.yml +39 -0
- envarpay-0.1.0a6/.github/workflows/container.yml +39 -0
- envarpay-0.1.0a6/.github/workflows/publish-python.yml +89 -0
- envarpay-0.1.0a6/.github/workflows/runtime-build.yml +70 -0
- envarpay-0.1.0a6/.github/workflows/task-escrow.yml +49 -0
- envarpay-0.1.0a6/.gitignore +13 -0
- envarpay-0.1.0a6/CHANGELOG.md +55 -0
- envarpay-0.1.0a6/CONTRIBUTING.md +36 -0
- envarpay-0.1.0a6/Dockerfile +18 -0
- envarpay-0.1.0a6/LICENSE +22 -0
- envarpay-0.1.0a6/PKG-INFO +100 -0
- envarpay-0.1.0a6/README.md +198 -0
- envarpay-0.1.0a6/README.pypi.md +62 -0
- envarpay-0.1.0a6/README.zh-CN.md +151 -0
- envarpay-0.1.0a6/SECURITY.md +16 -0
- envarpay-0.1.0a6/assets/README.md +29 -0
- envarpay-0.1.0a6/assets/banner.svg +17 -0
- envarpay-0.1.0a6/assets/mermaid-config.json +13 -0
- envarpay-0.1.0a6/assets/payment-flow.mmd +15 -0
- envarpay-0.1.0a6/assets/payment-flow.svg +1 -0
- envarpay-0.1.0a6/contracts/task/MockUSDC.json +327 -0
- envarpay-0.1.0a6/contracts/task/MockUSDC.sol +8 -0
- envarpay-0.1.0a6/contracts/task/TaskEscrow.sol +91 -0
- envarpay-0.1.0a6/contracts/task/compile.cjs +9 -0
- envarpay-0.1.0a6/contracts/task/package-lock.json +4044 -0
- envarpay-0.1.0a6/contracts/task/package.json +1 -0
- envarpay-0.1.0a6/docs/configuration.md +189 -0
- envarpay-0.1.0a6/docs/directory-and-recovery.md +112 -0
- envarpay-0.1.0a6/docs/evidence/2026-09-29-matrix.json +965 -0
- envarpay-0.1.0a6/docs/evidence/poc.json +183 -0
- envarpay-0.1.0a6/docs/getting-started.md +192 -0
- envarpay-0.1.0a6/docs/integrations/existing-runtime-validation.md +30 -0
- envarpay-0.1.0a6/docs/integrations/goose.md +119 -0
- envarpay-0.1.0a6/docs/integrations/hermes.md +152 -0
- envarpay-0.1.0a6/docs/integrations/index.md +52 -0
- envarpay-0.1.0a6/docs/integrations/langgraph.md +147 -0
- envarpay-0.1.0a6/docs/integrations/openclaw.md +150 -0
- envarpay-0.1.0a6/docs/integrations/opencode.md +120 -0
- envarpay-0.1.0a6/docs/integrations/other-runtimes.md +26 -0
- envarpay-0.1.0a6/docs/integrations/pydantic-ai.md +141 -0
- envarpay-0.1.0a6/docs/integrations/validation.md +73 -0
- envarpay-0.1.0a6/docs/migration-envarpay.md +30 -0
- envarpay-0.1.0a6/docs/packages.md +120 -0
- envarpay-0.1.0a6/docs/proof-of-concept.md +49 -0
- envarpay-0.1.0a6/docs/python-sdk.md +61 -0
- envarpay-0.1.0a6/docs/selling.md +150 -0
- envarpay-0.1.0a6/docs/tasks/README.md +137 -0
- envarpay-0.1.0a6/docs/tasks/evidence/base-sepolia/bridge-proof.json +8 -0
- envarpay-0.1.0a6/docs/tasks/evidence/base-sepolia/deployment.json +8 -0
- envarpay-0.1.0a6/docs/tasks/evidence/base-sepolia/independent-audit.json +143 -0
- envarpay-0.1.0a6/docs/tasks/evidence/base-sepolia/native-seller-events.jsonl +8 -0
- envarpay-0.1.0a6/docs/tasks/evidence/base-sepolia/pydantic-buyer.json +73 -0
- envarpay-0.1.0a6/docs/tasks/evidence/base-sepolia/pydantic-resume.json +20 -0
- envarpay-0.1.0a6/docs/tasks/evidence/base-sepolia/pydantic-second-rpc.json +17 -0
- envarpay-0.1.0a6/docs/tasks/evidence/base-sepolia/reject-native-tools.json +79 -0
- envarpay-0.1.0a6/docs/tasks/evidence/base-sepolia/reject-second-rpc.json +17 -0
- envarpay-0.1.0a6/docs/tasks/evidence/base-sepolia/replay-proof.json +10 -0
- envarpay-0.1.0a6/docs/tasks/evidence/base-sepolia/run-metadata.json +21 -0
- envarpay-0.1.0a6/docs/tasks/evidence/base-sepolia/seller-proof.json +8 -0
- envarpay-0.1.0a6/docs/tasks/evidence/base-sepolia/sepolia-expiry-v1-funding_proof-receipt.json +1 -0
- envarpay-0.1.0a6/docs/tasks/evidence/base-sepolia/sepolia-expiry-v1-settlement_proof-receipt.json +1 -0
- envarpay-0.1.0a6/docs/tasks/evidence/base-sepolia/sepolia-expiry-v1-status.json +46 -0
- envarpay-0.1.0a6/docs/tasks/evidence/base-sepolia/sepolia-hermes-reject-v1-funding_proof-receipt.json +1 -0
- envarpay-0.1.0a6/docs/tasks/evidence/base-sepolia/sepolia-hermes-reject-v1-settlement_proof-receipt.json +1 -0
- envarpay-0.1.0a6/docs/tasks/evidence/base-sepolia/sepolia-hermes-reject-v1-status.json +46 -0
- envarpay-0.1.0a6/docs/tasks/evidence/base-sepolia/sepolia-hermes-success-v1-funding_proof-receipt.json +1 -0
- envarpay-0.1.0a6/docs/tasks/evidence/base-sepolia/sepolia-hermes-success-v1-result.json +21 -0
- envarpay-0.1.0a6/docs/tasks/evidence/base-sepolia/sepolia-hermes-success-v1-settlement_proof-receipt.json +1 -0
- envarpay-0.1.0a6/docs/tasks/evidence/base-sepolia/sepolia-hermes-success-v1-status.json +46 -0
- envarpay-0.1.0a6/docs/tasks/evidence/base-sepolia/sepolia-pydantic-v1-funding_proof-receipt.json +1 -0
- envarpay-0.1.0a6/docs/tasks/evidence/base-sepolia/sepolia-pydantic-v1-result.json +21 -0
- envarpay-0.1.0a6/docs/tasks/evidence/base-sepolia/sepolia-pydantic-v1-settlement_proof-receipt.json +1 -0
- envarpay-0.1.0a6/docs/tasks/evidence/base-sepolia/sepolia-pydantic-v1-status.json +46 -0
- envarpay-0.1.0a6/docs/tasks/evidence/base-sepolia/sepolia-recovery-v1-funding_proof-receipt.json +1 -0
- envarpay-0.1.0a6/docs/tasks/evidence/base-sepolia/sepolia-recovery-v1-result.json +21 -0
- envarpay-0.1.0a6/docs/tasks/evidence/base-sepolia/sepolia-recovery-v1-settlement_proof-receipt.json +1 -0
- envarpay-0.1.0a6/docs/tasks/evidence/base-sepolia/sepolia-recovery-v1-status.json +46 -0
- envarpay-0.1.0a6/docs/tasks/evidence/base-sepolia/success-native-tools.json +93 -0
- envarpay-0.1.0a6/docs/tasks/evidence/base-sepolia/success-second-rpc.json +17 -0
- envarpay-0.1.0a6/docs/tasks/evidence/base-sepolia/transaction-journal.json +102 -0
- envarpay-0.1.0a6/docs/tasks/evidence/native-final-local-summary.json +94 -0
- envarpay-0.1.0a6/docs/tasks/evidence/native-hermes-final-tools.json +57 -0
- envarpay-0.1.0a6/docs/tasks/evidence/native-pydantic-final.json +63 -0
- envarpay-0.1.0a6/docs/tasks/testnet-acceptance.md +68 -0
- envarpay-0.1.0a6/examples/Dockerfile.hermes +9 -0
- envarpay-0.1.0a6/examples/Dockerfile.sdk +13 -0
- envarpay-0.1.0a6/examples/cross-framework/Dockerfile.goose +16 -0
- envarpay-0.1.0a6/examples/cross-framework/Dockerfile.hermes +13 -0
- envarpay-0.1.0a6/examples/cross-framework/Dockerfile.opencode +13 -0
- envarpay-0.1.0a6/examples/cross-framework/Dockerfile.python +32 -0
- envarpay-0.1.0a6/examples/cross-framework/README.md +151 -0
- envarpay-0.1.0a6/examples/cross-framework/audit_run.py +313 -0
- envarpay-0.1.0a6/examples/cross-framework/build_artifacts.py +215 -0
- envarpay-0.1.0a6/examples/cross-framework/native_cli.py +219 -0
- envarpay-0.1.0a6/examples/cross-framework/native_python.py +155 -0
- envarpay-0.1.0a6/examples/cross-framework/offline/Dockerfile.goose +6 -0
- envarpay-0.1.0a6/examples/cross-framework/offline/Dockerfile.hermes +12 -0
- envarpay-0.1.0a6/examples/cross-framework/offline/Dockerfile.openclaw +8 -0
- envarpay-0.1.0a6/examples/cross-framework/offline/Dockerfile.opencode +8 -0
- envarpay-0.1.0a6/examples/cross-framework/offline/Dockerfile.pydantic +7 -0
- envarpay-0.1.0a6/examples/cross-framework/offline/Dockerfile.python +10 -0
- envarpay-0.1.0a6/examples/cross-framework/profiles/goose/buyer/config/goose/config.yaml +19 -0
- envarpay-0.1.0a6/examples/cross-framework/profiles/goose/seller/config/goose/config.yaml +6 -0
- envarpay-0.1.0a6/examples/cross-framework/profiles/hermes/buyer/config.yaml +28 -0
- envarpay-0.1.0a6/examples/cross-framework/profiles/hermes/seller/config.yaml +14 -0
- envarpay-0.1.0a6/examples/cross-framework/profiles/openclaw/buyer/openclaw.json +60 -0
- envarpay-0.1.0a6/examples/cross-framework/profiles/openclaw/seller/openclaw.json +44 -0
- envarpay-0.1.0a6/examples/cross-framework/profiles/opencode/buyer/opencode.json +40 -0
- envarpay-0.1.0a6/examples/cross-framework/profiles/opencode/seller/opencode.json +27 -0
- envarpay-0.1.0a6/examples/cross-framework/sources.json +49 -0
- envarpay-0.1.0a6/examples/hermes_smoke.py +50 -0
- envarpay-0.1.0a6/examples/integrations/python_agents.py +126 -0
- envarpay-0.1.0a6/examples/tasks/audit.py +82 -0
- envarpay-0.1.0a6/examples/tasks/buyer.toml +17 -0
- envarpay-0.1.0a6/examples/tasks/deploy.py +117 -0
- envarpay-0.1.0a6/examples/tasks/seller.toml +21 -0
- envarpay-0.1.0a6/plans/README.md +7 -0
- envarpay-0.1.0a6/plans/distribution-and-adapters.zh-CN.md +101 -0
- envarpay-0.1.0a6/plans/task-escrow.md +20 -0
- envarpay-0.1.0a6/pyproject.toml +59 -0
- envarpay-0.1.0a6/src/envarpay/__init__.py +20 -0
- envarpay-0.1.0a6/src/envarpay/__main__.py +3 -0
- envarpay-0.1.0a6/src/envarpay/backend.py +55 -0
- envarpay-0.1.0a6/src/envarpay/chain.py +128 -0
- envarpay-0.1.0a6/src/envarpay/cli.py +315 -0
- envarpay-0.1.0a6/src/envarpay/config.py +244 -0
- envarpay-0.1.0a6/src/envarpay/directory.py +93 -0
- envarpay-0.1.0a6/src/envarpay/host_config.py +74 -0
- envarpay-0.1.0a6/src/envarpay/receiving.py +65 -0
- envarpay-0.1.0a6/src/envarpay/runtime_http.py +152 -0
- envarpay-0.1.0a6/src/envarpay/seller.py +402 -0
- envarpay-0.1.0a6/src/envarpay/service.py +155 -0
- envarpay-0.1.0a6/src/envarpay/setup.py +367 -0
- envarpay-0.1.0a6/src/envarpay/storage.py +170 -0
- envarpay-0.1.0a6/src/envarpay/tasks/__init__.py +1 -0
- envarpay-0.1.0a6/src/envarpay/tasks/chain.py +277 -0
- envarpay-0.1.0a6/src/envarpay/tasks/cli.py +115 -0
- envarpay-0.1.0a6/src/envarpay/tasks/client.py +235 -0
- envarpay-0.1.0a6/src/envarpay/tasks/config.py +109 -0
- envarpay-0.1.0a6/src/envarpay/tasks/escrow.json +394 -0
- envarpay-0.1.0a6/src/envarpay/tasks/models.py +60 -0
- envarpay-0.1.0a6/src/envarpay/tasks/server.py +233 -0
- envarpay-0.1.0a6/src/envarpay/tasks/store.py +109 -0
- envarpay-0.1.0a6/src/envarpay/transport.py +56 -0
- envarpay-0.1.0a6/src/envarpay/wallet.py +344 -0
- envarpay-0.1.0a6/tests/conftest.py +118 -0
- envarpay-0.1.0a6/tests/fixtures/real-sepolia-receipt.json +67 -0
- envarpay-0.1.0a6/tests/tasks/test_deployment_wait.py +43 -0
- envarpay-0.1.0a6/tests/tasks/test_local_evm.py +493 -0
- envarpay-0.1.0a6/tests/tasks/test_task_policy.py +97 -0
- envarpay-0.1.0a6/tests/test_host_config.py +42 -0
- envarpay-0.1.0a6/tests/test_http_backend_config.py +60 -0
- envarpay-0.1.0a6/tests/test_onboarding.py +225 -0
- envarpay-0.1.0a6/tests/test_payments.py +233 -0
- envarpay-0.1.0a6/tests/test_policy.py +147 -0
- envarpay-0.1.0a6/tests/test_receiving.py +89 -0
- envarpay-0.1.0a6/tests/test_recovery.py +331 -0
- envarpay-0.1.0a6/tests/test_runtime_http.py +151 -0
- envarpay-0.1.0a6/tests/test_service.py +109 -0
- envarpay-0.1.0a6/tests/test_setup.py +79 -0
- envarpay-0.1.0a6/tests/test_transport.py +182 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
name: Bug report
|
|
2
|
+
description: Report a reproducible integration or correctness problem
|
|
3
|
+
body:
|
|
4
|
+
- type: markdown
|
|
5
|
+
attributes:
|
|
6
|
+
value: "Never include private keys, API tokens, signed authorizations or state databases. Use private security reporting for vulnerabilities."
|
|
7
|
+
- type: input
|
|
8
|
+
id: version
|
|
9
|
+
attributes:
|
|
10
|
+
label: EnvarPay version and Python version
|
|
11
|
+
validations:
|
|
12
|
+
required: true
|
|
13
|
+
- type: textarea
|
|
14
|
+
id: reproduce
|
|
15
|
+
attributes:
|
|
16
|
+
label: Minimal reproduction
|
|
17
|
+
description: Use redacted configuration and synthetic inputs.
|
|
18
|
+
validations:
|
|
19
|
+
required: true
|
|
20
|
+
- type: textarea
|
|
21
|
+
id: expected
|
|
22
|
+
attributes:
|
|
23
|
+
label: Expected and actual behavior
|
|
24
|
+
validations:
|
|
25
|
+
required: true
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
name: Integration or feature request
|
|
2
|
+
description: Describe an agent, wallet or workflow you want to connect
|
|
3
|
+
body:
|
|
4
|
+
- type: textarea
|
|
5
|
+
id: need
|
|
6
|
+
attributes:
|
|
7
|
+
label: What are you trying to do?
|
|
8
|
+
validations:
|
|
9
|
+
required: true
|
|
10
|
+
- type: textarea
|
|
11
|
+
id: protocol
|
|
12
|
+
attributes:
|
|
13
|
+
label: Runtime, protocol and existing integration
|
|
14
|
+
description: Link to official documentation if available.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
test:
|
|
14
|
+
name: Python ${{ matrix.python }}
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
strategy:
|
|
17
|
+
fail-fast: false
|
|
18
|
+
matrix:
|
|
19
|
+
python: ['3.11', '3.13']
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@v4
|
|
22
|
+
- uses: actions/setup-python@v5
|
|
23
|
+
with:
|
|
24
|
+
python-version: ${{ matrix.python }}
|
|
25
|
+
cache: pip
|
|
26
|
+
cache-dependency-path: pyproject.toml
|
|
27
|
+
- run: python -m pip install -e '.[test]'
|
|
28
|
+
- run: ruff check src tests examples
|
|
29
|
+
- run: ruff format --check src tests examples
|
|
30
|
+
- run: pytest -q
|
|
31
|
+
- run: python -m build
|
|
32
|
+
- name: Install wheel in a separate environment
|
|
33
|
+
run: |
|
|
34
|
+
python -m venv /tmp/envarpay-wheel
|
|
35
|
+
/tmp/envarpay-wheel/bin/pip install dist/*.whl
|
|
36
|
+
/tmp/envarpay-wheel/bin/envarpay --version
|
|
37
|
+
/tmp/envarpay-wheel/bin/pip check
|
|
38
|
+
|
|
39
|
+
# No wallets, API keys or blockchain payments are used by CI.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
name: Service container
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
paths:
|
|
6
|
+
- Dockerfile
|
|
7
|
+
- .dockerignore
|
|
8
|
+
- .github/workflows/container.yml
|
|
9
|
+
- pyproject.toml
|
|
10
|
+
- README.pypi.md
|
|
11
|
+
- src/**
|
|
12
|
+
workflow_dispatch:
|
|
13
|
+
|
|
14
|
+
permissions:
|
|
15
|
+
contents: read
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
build:
|
|
19
|
+
strategy:
|
|
20
|
+
fail-fast: false
|
|
21
|
+
matrix:
|
|
22
|
+
runner: [ubuntu-latest, ubuntu-24.04-arm]
|
|
23
|
+
runs-on: ${{ matrix.runner }}
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@v4
|
|
26
|
+
with:
|
|
27
|
+
persist-credentials: false
|
|
28
|
+
- run: docker build -t envarpay:check .
|
|
29
|
+
- run: docker run --rm --network none envarpay:check --version
|
|
30
|
+
- name: Check non-root setup without signing
|
|
31
|
+
run: |
|
|
32
|
+
docker run --rm --network none --entrypoint sh envarpay:check -ec '
|
|
33
|
+
test "$(id -u)" = 10001
|
|
34
|
+
envarpay init --role buyer --pay-to 0x3333333333333333333333333333333333333333 --directory /data/check --json
|
|
35
|
+
envarpay doctor --config /data/check/buyer.toml
|
|
36
|
+
test ! -e /data/check/buyer.key
|
|
37
|
+
'
|
|
38
|
+
|
|
39
|
+
# Builds only. No registry credentials, image push, model call or blockchain payment.
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
name: Python distribution
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
paths:
|
|
6
|
+
- .github/workflows/publish-python.yml
|
|
7
|
+
- pyproject.toml
|
|
8
|
+
- README.pypi.md
|
|
9
|
+
- src/**
|
|
10
|
+
workflow_dispatch:
|
|
11
|
+
inputs:
|
|
12
|
+
tag:
|
|
13
|
+
description: Existing release tag matching pyproject.toml (for example v0.1.0a6)
|
|
14
|
+
type: string
|
|
15
|
+
required: true
|
|
16
|
+
publish:
|
|
17
|
+
description: Publish the verified artifacts to PyPI (requires configured Trusted Publisher)
|
|
18
|
+
type: boolean
|
|
19
|
+
default: false
|
|
20
|
+
|
|
21
|
+
permissions:
|
|
22
|
+
contents: read
|
|
23
|
+
|
|
24
|
+
concurrency:
|
|
25
|
+
group: python-distribution-${{ github.event_name }}-${{ inputs.tag || github.ref }}
|
|
26
|
+
cancel-in-progress: false
|
|
27
|
+
|
|
28
|
+
jobs:
|
|
29
|
+
build:
|
|
30
|
+
runs-on: ubuntu-latest
|
|
31
|
+
steps:
|
|
32
|
+
- uses: actions/checkout@v4
|
|
33
|
+
with:
|
|
34
|
+
ref: ${{ github.event_name == 'workflow_dispatch' && format('refs/tags/{0}', inputs.tag) || github.sha }}
|
|
35
|
+
persist-credentials: false
|
|
36
|
+
- uses: actions/setup-python@v5
|
|
37
|
+
with:
|
|
38
|
+
python-version: '3.13'
|
|
39
|
+
- name: Verify selected release
|
|
40
|
+
env:
|
|
41
|
+
RELEASE_TAG: ${{ inputs.tag }}
|
|
42
|
+
MANUAL: ${{ github.event_name == 'workflow_dispatch' }}
|
|
43
|
+
run: |
|
|
44
|
+
python - <<'PY'
|
|
45
|
+
import os, pathlib, re, tomllib
|
|
46
|
+
project = tomllib.loads(pathlib.Path("pyproject.toml").read_text())["project"]
|
|
47
|
+
assert project["name"] == "envarpay"
|
|
48
|
+
if os.environ["MANUAL"] == "true":
|
|
49
|
+
tag = os.environ["RELEASE_TAG"]
|
|
50
|
+
assert re.fullmatch(r"v[0-9]+\.[0-9]+\.[0-9]+(?:a[0-9]+|b[0-9]+|rc[0-9]+)?", tag)
|
|
51
|
+
assert tag == "v" + project["version"], "Tag and package version must match"
|
|
52
|
+
PY
|
|
53
|
+
- run: python -m pip install build 'twine>=7,<8'
|
|
54
|
+
- run: python -m build
|
|
55
|
+
- run: python -m twine check --strict dist/*
|
|
56
|
+
- name: Inspect the installed wheel
|
|
57
|
+
run: |
|
|
58
|
+
python -m venv /tmp/envarpay-release-check
|
|
59
|
+
/tmp/envarpay-release-check/bin/pip install dist/*.whl
|
|
60
|
+
/tmp/envarpay-release-check/bin/envarpay --version
|
|
61
|
+
/tmp/envarpay-release-check/bin/pip check
|
|
62
|
+
- name: Record artifact hashes
|
|
63
|
+
run: sha256sum dist/* >> "$GITHUB_STEP_SUMMARY"
|
|
64
|
+
- uses: actions/upload-artifact@v4
|
|
65
|
+
with:
|
|
66
|
+
name: python-distribution
|
|
67
|
+
path: dist/
|
|
68
|
+
if-no-files-found: error
|
|
69
|
+
|
|
70
|
+
publish:
|
|
71
|
+
if: ${{ github.event_name == 'workflow_dispatch' && inputs.publish }}
|
|
72
|
+
needs: build
|
|
73
|
+
runs-on: ubuntu-latest
|
|
74
|
+
environment:
|
|
75
|
+
name: pypi
|
|
76
|
+
url: https://pypi.org/project/envarpay/
|
|
77
|
+
permissions:
|
|
78
|
+
id-token: write
|
|
79
|
+
steps:
|
|
80
|
+
- uses: actions/download-artifact@v4
|
|
81
|
+
with:
|
|
82
|
+
name: python-distribution
|
|
83
|
+
path: dist/
|
|
84
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
85
|
+
with:
|
|
86
|
+
packages-dir: dist/
|
|
87
|
+
|
|
88
|
+
# No tag push, PR or merge publishes a package. Publishing is an explicit manual
|
|
89
|
+
# action after the PyPI owner configures the repository/workflow/environment trust.
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
name: Runtime build artifacts (no payments)
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
pull_request:
|
|
6
|
+
paths:
|
|
7
|
+
- .github/workflows/runtime-build.yml
|
|
8
|
+
- examples/cross-framework/build_artifacts.py
|
|
9
|
+
- examples/cross-framework/sources.json
|
|
10
|
+
|
|
11
|
+
permissions:
|
|
12
|
+
contents: read
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
python-wheels:
|
|
16
|
+
runs-on: ubuntu-24.04-arm
|
|
17
|
+
timeout-minutes: 30
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
with:
|
|
21
|
+
persist-credentials: false
|
|
22
|
+
- uses: actions/setup-python@v5
|
|
23
|
+
with:
|
|
24
|
+
python-version: '3.13'
|
|
25
|
+
- run: python examples/cross-framework/build_artifacts.py python
|
|
26
|
+
- uses: actions/upload-artifact@v4
|
|
27
|
+
with:
|
|
28
|
+
name: runtime-python-linux-arm64
|
|
29
|
+
path: runtime-artifacts/
|
|
30
|
+
retention-days: 7
|
|
31
|
+
hermes-wheels:
|
|
32
|
+
runs-on: ubuntu-24.04-arm
|
|
33
|
+
timeout-minutes: 30
|
|
34
|
+
steps:
|
|
35
|
+
- uses: actions/checkout@v4
|
|
36
|
+
with:
|
|
37
|
+
persist-credentials: false
|
|
38
|
+
- uses: actions/setup-python@v5
|
|
39
|
+
with:
|
|
40
|
+
python-version: '3.14'
|
|
41
|
+
- run: python -m pip install uv
|
|
42
|
+
- run: python examples/cross-framework/build_artifacts.py hermes
|
|
43
|
+
- uses: actions/upload-artifact@v4
|
|
44
|
+
with:
|
|
45
|
+
name: runtime-hermes-linux-arm64
|
|
46
|
+
path: runtime-artifacts/
|
|
47
|
+
retention-days: 7
|
|
48
|
+
native-cli:
|
|
49
|
+
strategy:
|
|
50
|
+
fail-fast: false
|
|
51
|
+
matrix:
|
|
52
|
+
runtime: [goose, opencode, openclaw]
|
|
53
|
+
runs-on: ubuntu-24.04-arm
|
|
54
|
+
timeout-minutes: 60
|
|
55
|
+
steps:
|
|
56
|
+
- uses: actions/checkout@v4
|
|
57
|
+
with:
|
|
58
|
+
persist-credentials: false
|
|
59
|
+
- uses: actions/setup-node@v4
|
|
60
|
+
with:
|
|
61
|
+
node-version: '26'
|
|
62
|
+
- run: python3 examples/cross-framework/build_artifacts.py ${{ matrix.runtime }}
|
|
63
|
+
- uses: actions/upload-artifact@v4
|
|
64
|
+
with:
|
|
65
|
+
name: runtime-${{ matrix.runtime }}-linux-arm64
|
|
66
|
+
path: runtime-artifacts/
|
|
67
|
+
retention-days: 7
|
|
68
|
+
|
|
69
|
+
# These jobs only compile/download public dependencies. No wallet, model key,
|
|
70
|
+
# facilitator call, agent delivery or chain-payment acceptance runs here.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
name: Task escrow
|
|
2
|
+
on:
|
|
3
|
+
pull_request:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
jobs:
|
|
10
|
+
local-evm:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
- uses: actions/setup-node@v4
|
|
15
|
+
with:
|
|
16
|
+
node-version: '22'
|
|
17
|
+
- uses: actions/setup-python@v5
|
|
18
|
+
with:
|
|
19
|
+
python-version: '3.13'
|
|
20
|
+
- run: pip install -e '.[test,task]'
|
|
21
|
+
- run: npm ci --ignore-scripts --prefix contracts/task
|
|
22
|
+
- run: npm run build --prefix contracts/task
|
|
23
|
+
- name: Check reproducible contract artifact
|
|
24
|
+
run: git diff --exit-code -- src/envarpay/tasks/escrow.json contracts/task/MockUSDC.json
|
|
25
|
+
- name: Run local EVM tests without public funds
|
|
26
|
+
run: |
|
|
27
|
+
node contracts/task/node_modules/ganache/dist/node/cli.js --server.host 127.0.0.1 --server.port 18546 --chain.chainId 31337 --wallet.deterministic --miner.blockTime 1 --logging.quiet > /tmp/evm.log 2>&1 &
|
|
28
|
+
EVM_PID=$!
|
|
29
|
+
trap 'kill "$EVM_PID"' EXIT
|
|
30
|
+
python - <<'PY'
|
|
31
|
+
import time, urllib.request
|
|
32
|
+
for _ in range(40):
|
|
33
|
+
try:
|
|
34
|
+
urllib.request.urlopen('http://127.0.0.1:18546', timeout=1)
|
|
35
|
+
except urllib.error.HTTPError:
|
|
36
|
+
break
|
|
37
|
+
except OSError:
|
|
38
|
+
time.sleep(.25)
|
|
39
|
+
else:
|
|
40
|
+
break
|
|
41
|
+
PY
|
|
42
|
+
ENVARPAY_TASK_TEST_RPC=http://127.0.0.1:18546 pytest -q tests/tasks
|
|
43
|
+
- run: python -m build
|
|
44
|
+
- name: Verify clean task wheel install
|
|
45
|
+
run: |
|
|
46
|
+
python -m venv /tmp/task-wheel
|
|
47
|
+
/tmp/task-wheel/bin/pip install 'dist/'*.whl 'web3>=7,<8'
|
|
48
|
+
/tmp/task-wheel/bin/envarpay task --help
|
|
49
|
+
/tmp/task-wheel/bin/python -c 'from envarpay.tasks.chain import artifact; assert artifact()["abi"]'
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.0a6 — unreleased distribution candidate
|
|
4
|
+
|
|
5
|
+
- Replace fragile README diagram/badge rendering with repository-owned SVG assets.
|
|
6
|
+
- Add a PyPI-specific long description, manual Trusted Publishing preparation and an agent-independent non-root container build.
|
|
7
|
+
- Document actual registry availability and the distinct roles of Python/TypeScript SDKs, MCP services and native plugins.
|
|
8
|
+
- Include the 0.1.0a5 security baseline; no registry upload or new payment is implied.
|
|
9
|
+
|
|
10
|
+
## 0.1.0a5
|
|
11
|
+
|
|
12
|
+
- Require patched Starlette 1.3.1 or newer for the HTTP services.
|
|
13
|
+
- Recover unresolved purchases only on their original network and asset.
|
|
14
|
+
- Query the original seller when an error response omitted the settlement transaction, without creating another signature or settlement.
|
|
15
|
+
|
|
16
|
+
## 0.1.0a4 — unreleased
|
|
17
|
+
|
|
18
|
+
- Add agent/role-aware initialization with exact decimal USDC amounts, wallet connection files and a personalized SETUP.md. No automatic wallet-key creation or payment.
|
|
19
|
+
- Show readable setup instructions (`--json` provides machine-readable output), and configured recipients, prices and limits in doctor output.
|
|
20
|
+
- Add dedicated guides for six frameworks, a configuration reference, seller recipes and portable native Python examples.
|
|
21
|
+
- Preserve private-service setup and exclude its generated access token from Git.
|
|
22
|
+
- Fix direct CLI status/reconcile access without a prior sync command; align the SDK Docker recipe with the new source version.
|
|
23
|
+
|
|
24
|
+
## 0.1.0a3
|
|
25
|
+
|
|
26
|
+
- Connect existing authenticated MCP/HTTP services without embedding Hermes.
|
|
27
|
+
- Add optional directory discovery, reporting, original-operation recovery, remote-wallet access and opt-in receiving updates.
|
|
28
|
+
|
|
29
|
+
## 0.1.0a2 — source preview
|
|
30
|
+
|
|
31
|
+
- Unify distribution, CLI and Python import as envarpay; preserve original config and ledger paths.
|
|
32
|
+
- Add host-config snippets for OpenClaw, Hermes, OpenCode and Goose without editing personal configs.
|
|
33
|
+
- Add an experimental bounded HTTP runtime connector for dedicated existing agent services.
|
|
34
|
+
- Add native Docker buyer/seller harnesses, reviewed profiles and offline source-build recipes for six frameworks.
|
|
35
|
+
- Record 28 real cross-framework paid deliveries and two failed settlements, with raw-RPC audit and per-transaction evidence.
|
|
36
|
+
- Isolate local TCP tests from inherited/system proxies; add onboarding/policy-generation tests.
|
|
37
|
+
- Gateway HTTP acceptance, full 30/30 acceptance, mainnet and PyPI publication remain pending.
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
## 0.1.0a1
|
|
41
|
+
|
|
42
|
+
Initial public alpha of EnvarPay, extracted from the earlier two-Hermes payment POC.
|
|
43
|
+
|
|
44
|
+
- Python SDK and CLI for seller payment gates and bounded buyer wallets.
|
|
45
|
+
- Existing MCP backends and optional official Hermes integration.
|
|
46
|
+
- MCP Streamable HTTP, SSE and stdio; official x402 v2 exact USDC / EIP-3009.
|
|
47
|
+
- Upfront settlement plus exact Transfer and nonce verification before execution.
|
|
48
|
+
- Persistent local budget reservations, original-authorization storage, duplicate
|
|
49
|
+
request protection and read-only reconciliation.
|
|
50
|
+
- Setup/configuration helpers, English/Chinese guides and MIT licensing.
|
|
51
|
+
|
|
52
|
+
Defaults: Base Sepolia, payment disabled, 10000 atomic test-USDC per call and total.
|
|
53
|
+
No automatic refunds, multi-host recovery, external signer provider, A2A task
|
|
54
|
+
support or new mainnet verification is claimed. See [POC evidence](docs/proof-of-concept.md)
|
|
55
|
+
for the distinction between the prior real payment and package/CI tests.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Contributing to EnvarPay
|
|
2
|
+
|
|
3
|
+
Useful first contributions include another MCP client integration, reproductions
|
|
4
|
+
of SDK compatibility issues, clearer onboarding and stronger failure-path tests.
|
|
5
|
+
Before a large change, open an issue describing the user need and protocol scope.
|
|
6
|
+
|
|
7
|
+
## Local development
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
python -m venv .venv
|
|
11
|
+
source .venv/bin/activate
|
|
12
|
+
python -m pip install -e '.[test]'
|
|
13
|
+
ruff check src tests examples
|
|
14
|
+
ruff format --check src tests examples
|
|
15
|
+
pytest -q
|
|
16
|
+
python -m build
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Tests use real local MCP transports and simulated facilitator responses. They
|
|
20
|
+
do not transfer funds or call a model API. Keep that distinction explicit when
|
|
21
|
+
reporting results. Never add a private key, API token, `.env`, state database or
|
|
22
|
+
signed authorization to a PR or issue.
|
|
23
|
+
|
|
24
|
+
## Pull requests
|
|
25
|
+
|
|
26
|
+
- Keep the change focused; describe the observable behavior and validation.
|
|
27
|
+
- Preserve standard MCP and x402 wire formats. Avoid private settlement endpoints.
|
|
28
|
+
- Keep payment disabled in examples, use testnet defaults, and retain budgets on
|
|
29
|
+
uncertain outcomes. Do not silently replace a signed authorization on retry.
|
|
30
|
+
- Test monetary behavior and failures, including duplicate/concurrent requests.
|
|
31
|
+
- Do not make a mainnet payment, publish a package, or use production credentials
|
|
32
|
+
as part of a test run.
|
|
33
|
+
- Contributions are made under the repository's [MIT license](LICENSE).
|
|
34
|
+
|
|
35
|
+
Security findings belong in the [private vulnerability reporting channel](https://github.com/EnvarAI/EnvarPay/security/advisories/new),
|
|
36
|
+
not in a public issue with live credentials or an exploitable authorization.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Agent-independent service image. No Hermes/OpenClaw/model runtime is bundled.
|
|
2
|
+
FROM python:3.13-slim AS build
|
|
3
|
+
WORKDIR /build
|
|
4
|
+
COPY pyproject.toml README.pypi.md LICENSE ./
|
|
5
|
+
COPY src ./src
|
|
6
|
+
RUN python -m pip wheel --no-cache-dir --wheel-dir /wheels .
|
|
7
|
+
|
|
8
|
+
FROM python:3.13-slim
|
|
9
|
+
COPY --from=build /wheels /wheels
|
|
10
|
+
RUN python -m pip install --no-cache-dir --no-index --find-links=/wheels envarpay \
|
|
11
|
+
&& python -m pip check \
|
|
12
|
+
&& groupadd --gid 10001 envarpay \
|
|
13
|
+
&& useradd --uid 10001 --gid 10001 --no-create-home envarpay \
|
|
14
|
+
&& mkdir /data && chown 10001:10001 /data && chmod 700 /data
|
|
15
|
+
USER 10001:10001
|
|
16
|
+
WORKDIR /data
|
|
17
|
+
ENTRYPOINT ["envarpay"]
|
|
18
|
+
CMD ["--help"]
|
envarpay-0.1.0a6/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 EnvarAI contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: envarpay
|
|
3
|
+
Version: 0.1.0a6
|
|
4
|
+
Summary: Get your agents paid. MCP and x402 payment SDK and CLI for agents.
|
|
5
|
+
Project-URL: Homepage, https://github.com/EnvarAI/EnvarPay
|
|
6
|
+
Project-URL: Repository, https://github.com/EnvarAI/EnvarPay
|
|
7
|
+
Project-URL: Issues, https://github.com/EnvarAI/EnvarPay/issues
|
|
8
|
+
Project-URL: Documentation, https://github.com/EnvarAI/EnvarPay/tree/main/docs
|
|
9
|
+
Author: EnvarAI contributors
|
|
10
|
+
License-Expression: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: agents,hermes,mcp,payments,usdc,x402
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Requires-Python: >=3.11
|
|
19
|
+
Requires-Dist: httpx<1,>=0.28
|
|
20
|
+
Requires-Dist: jsonschema<5,>=4.20
|
|
21
|
+
Requires-Dist: loguru<1,>=0.7
|
|
22
|
+
Requires-Dist: mcp==1.28.1
|
|
23
|
+
Requires-Dist: pydantic<3,>=2.11
|
|
24
|
+
Requires-Dist: starlette<2,>=1.3.1
|
|
25
|
+
Requires-Dist: tomli-w<2,>=1.2
|
|
26
|
+
Requires-Dist: uvicorn<1,>=0.31
|
|
27
|
+
Requires-Dist: x402[evm,mcp]==2.24.0
|
|
28
|
+
Provides-Extra: task
|
|
29
|
+
Requires-Dist: web3<8,>=7; extra == 'task'
|
|
30
|
+
Provides-Extra: test
|
|
31
|
+
Requires-Dist: build>=1.2; extra == 'test'
|
|
32
|
+
Requires-Dist: pytest-asyncio>=0.25; extra == 'test'
|
|
33
|
+
Requires-Dist: pytest>=8; extra == 'test'
|
|
34
|
+
Requires-Dist: respx>=0.22; extra == 'test'
|
|
35
|
+
Requires-Dist: ruff>=0.12; extra == 'test'
|
|
36
|
+
Requires-Dist: web3<8,>=7; extra == 'test'
|
|
37
|
+
Description-Content-Type: text/markdown
|
|
38
|
+
|
|
39
|
+
# EnvarPay
|
|
40
|
+
|
|
41
|
+
Add a budgeted payment wallet and an upfront USDC payment gate to existing agents.
|
|
42
|
+
EnvarPay uses the official MCP and x402 v2 SDKs. Your agent keeps its own runtime,
|
|
43
|
+
model and tools.
|
|
44
|
+
|
|
45
|
+
## Install
|
|
46
|
+
|
|
47
|
+
These registry commands apply after publication. For the current source preview,
|
|
48
|
+
see [installation channels](https://github.com/EnvarAI/EnvarPay/blob/main/docs/packages.md).
|
|
49
|
+
|
|
50
|
+
For a persistent CLI installation:
|
|
51
|
+
|
|
52
|
+
```sh
|
|
53
|
+
uv tool install envarpay==0.1.0a6
|
|
54
|
+
envarpay --help
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
For the Python API, use an isolated environment:
|
|
58
|
+
|
|
59
|
+
```sh
|
|
60
|
+
python -m pip install envarpay==0.1.0a6
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Python 3.11 or newer is required. Keep the wallet environment separate from
|
|
64
|
+
frameworks using a different MCP major version.
|
|
65
|
+
|
|
66
|
+
## Choose a capability
|
|
67
|
+
|
|
68
|
+
- **Pay:** `envarpay wallet` exposes policy-constrained MCP tools to your agent.
|
|
69
|
+
- **Receive:** `envarpay serve` puts a payment gate in front of a private MCP or HTTP service.
|
|
70
|
+
- **Set up:** `envarpay init --agent NAME --role buyer|seller|both` generates editable configs and instructions.
|
|
71
|
+
- **Inspect:** `envarpay doctor`, `status` and the explicit original-operation recovery flow.
|
|
72
|
+
|
|
73
|
+
Start with the guide for your framework:
|
|
74
|
+
|
|
75
|
+
- [OpenClaw](https://github.com/EnvarAI/EnvarPay/blob/main/docs/integrations/openclaw.md)
|
|
76
|
+
- [Hermes](https://github.com/EnvarAI/EnvarPay/blob/main/docs/integrations/hermes.md)
|
|
77
|
+
- [OpenCode](https://github.com/EnvarAI/EnvarPay/blob/main/docs/integrations/opencode.md)
|
|
78
|
+
- [Goose](https://github.com/EnvarAI/EnvarPay/blob/main/docs/integrations/goose.md)
|
|
79
|
+
- [LangGraph / LangChain](https://github.com/EnvarAI/EnvarPay/blob/main/docs/integrations/langgraph.md)
|
|
80
|
+
- [Pydantic AI](https://github.com/EnvarAI/EnvarPay/blob/main/docs/integrations/pydantic-ai.md)
|
|
81
|
+
|
|
82
|
+
MCP connections work across languages. An agent does not need to be written in
|
|
83
|
+
Python to connect to this service. This distribution includes a Python SDK and
|
|
84
|
+
CLI; it does not claim to include a TypeScript SDK or a framework-native plugin.
|
|
85
|
+
|
|
86
|
+
## Alpha boundaries
|
|
87
|
+
|
|
88
|
+
Payments default to **off**, using Base Sepolia test USDC and explicit recipient,
|
|
89
|
+
tool and budget policies. Preserve the original request ID, authorization and
|
|
90
|
+
ledger on uncertainty. A paid request can still fail during execution; payment
|
|
91
|
+
does not establish output quality or an automatic refund.
|
|
92
|
+
|
|
93
|
+
The historical [testnet matrix](https://github.com/EnvarAI/EnvarPay/blob/main/docs/integrations/validation.md)
|
|
94
|
+
records 28 successful paid deliveries and two failed settlements across six
|
|
95
|
+
native frameworks. Package installation and CI are not additional payment evidence.
|
|
96
|
+
|
|
97
|
+
[Repository](https://github.com/EnvarAI/EnvarPay) ·
|
|
98
|
+
[Configuration](https://github.com/EnvarAI/EnvarPay/blob/main/docs/configuration.md) ·
|
|
99
|
+
[Python API](https://github.com/EnvarAI/EnvarPay/blob/main/docs/python-sdk.md) ·
|
|
100
|
+
[Security](https://github.com/EnvarAI/EnvarPay/security/advisories/new)
|