agirails 2.3.0__tar.gz → 2.3.2__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.
- {agirails-2.3.0 → agirails-2.3.2}/.env.example +4 -4
- {agirails-2.3.0 → agirails-2.3.2}/.gitignore +1 -0
- {agirails-2.3.0 → agirails-2.3.2}/CHANGELOG.md +3 -0
- agirails-2.3.2/PKG-INFO +226 -0
- agirails-2.3.2/README.md +170 -0
- {agirails-2.3.0 → agirails-2.3.2}/pyproject.toml +2 -2
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/__init__.py +49 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/abis/actp_kernel.json +103 -6
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/adapters/standard.py +21 -0
- agirails-2.3.2/src/agirails/api/__init__.py +5 -0
- agirails-2.3.2/src/agirails/api/agirails_app.py +236 -0
- agirails-2.3.2/src/agirails/api/discover.py +283 -0
- agirails-2.3.2/src/agirails/cli/commands/autopublish.py +190 -0
- agirails-2.3.2/src/agirails/cli/commands/claim.py +162 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/cli/commands/diff.py +6 -76
- agirails-2.3.2/src/agirails/cli/commands/find.py +276 -0
- agirails-2.3.2/src/agirails/cli/commands/health.py +262 -0
- agirails-2.3.2/src/agirails/cli/commands/negotiate.py +344 -0
- agirails-2.3.2/src/agirails/cli/commands/publish.py +600 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/cli/commands/pull.py +7 -67
- agirails-2.3.2/src/agirails/cli/commands/receipt.py +131 -0
- agirails-2.3.2/src/agirails/cli/commands/register.py +218 -0
- agirails-2.3.2/src/agirails/cli/commands/test.py +225 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/cli/main.py +22 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/cli/utils/output.py +12 -9
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/client.py +1 -1
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/config/agirailsmd.py +3 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/config/networks.py +70 -7
- agirails-2.3.2/src/agirails/config/on_chain_state.py +241 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/config/sync_operations.py +2 -15
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/errors/__init__.py +2 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/errors/network.py +33 -0
- agirails-2.3.2/src/agirails/negotiation/__init__.py +148 -0
- agirails-2.3.2/src/agirails/negotiation/buyer_orchestrator.py +739 -0
- agirails-2.3.2/src/agirails/negotiation/decision_engine.py +196 -0
- agirails-2.3.2/src/agirails/negotiation/policy_engine.py +392 -0
- agirails-2.3.2/src/agirails/negotiation/session_store.py +231 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/protocol/agent_registry.py +3 -3
- agirails-2.3.2/src/agirails/protocol/base.py +220 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/protocol/eas.py +3 -3
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/protocol/escrow.py +29 -115
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/protocol/events.py +4 -4
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/protocol/kernel.py +154 -139
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/protocol/nonce.py +40 -22
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/runtime/base.py +29 -3
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/runtime/blockchain_runtime.py +110 -27
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/runtime/mock_runtime.py +79 -3
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/runtime/mock_state_manager.py +40 -11
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/types/message.py +4 -22
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/utils/__init__.py +0 -5
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/utils/circuit_breaker.py +17 -4
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/utils/security.py +8 -1
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/utils/semaphore.py +14 -5
- agirails-2.3.2/src/agirails/version.py +4 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/wallet/aa/dual_nonce_manager.py +15 -2
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/wallet/aa/transaction_batcher.py +14 -6
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/wallet/auto_wallet_provider.py +10 -5
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/wallet/keystore.py +6 -5
- {agirails-2.3.0 → agirails-2.3.2}/tests/benchmarks/test_performance.py +44 -34
- agirails-2.3.2/tests/integration/test_e2e_sepolia.py +169 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_adapters/test_standard.py +68 -0
- agirails-2.3.2/tests/test_api/test_agirails_app.py +158 -0
- agirails-2.3.2/tests/test_cli/test_autopublish.py +175 -0
- agirails-2.3.2/tests/test_cli/test_claim.py +67 -0
- agirails-2.3.2/tests/test_cli/test_e2e_publish_claim_discover.py +232 -0
- agirails-2.3.2/tests/test_cli/test_find.py +304 -0
- agirails-2.3.2/tests/test_cli/test_health.py +189 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_cli/test_publish.py +8 -8
- agirails-2.3.2/tests/test_cli/test_publish_parity.py +338 -0
- agirails-2.3.2/tests/test_cli/test_receipt.py +113 -0
- agirails-2.3.2/tests/test_cli/test_register.py +53 -0
- agirails-2.3.2/tests/test_cli/test_test.py +119 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_config/test_agirailsmd.py +4 -1
- agirails-2.3.2/tests/test_config/test_networks_aa.py +96 -0
- agirails-2.3.2/tests/test_config/test_on_chain_state.py +115 -0
- agirails-2.3.2/tests/test_errors/test_transient_rpc.py +35 -0
- agirails-2.3.2/tests/test_negotiation/test_buyer_orchestrator.py +380 -0
- agirails-2.3.2/tests/test_negotiation/test_decision_engine.py +215 -0
- agirails-2.3.2/tests/test_negotiation/test_policy_engine.py +221 -0
- agirails-2.3.2/tests/test_negotiation/test_session_store.py +113 -0
- agirails-2.3.2/tests/test_protocol/test_contract_base.py +223 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_protocol/test_networks.py +14 -15
- agirails-2.3.2/tests/test_runtime/__init__.py +0 -0
- agirails-2.3.2/tests/test_runtime/test_accept_quote.py +211 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_runtime/test_concurrent_file_locking.py +5 -5
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_runtime/test_mock_state_manager.py +4 -4
- agirails-2.3.2/tests/test_utils/__init__.py +0 -0
- agirails-2.3.0/PKG-INFO +0 -675
- agirails-2.3.0/README.md +0 -619
- agirails-2.3.0/src/agirails/abi/ACTPKernel.json +0 -1340
- agirails-2.3.0/src/agirails/abi/ERC20.json +0 -40
- agirails-2.3.0/src/agirails/abi/EscrowVault.json +0 -134
- agirails-2.3.0/src/agirails/cli/commands/publish.py +0 -187
- agirails-2.3.0/src/agirails/version.py +0 -4
- {agirails-2.3.0 → agirails-2.3.2}/.github/workflows/test.yml +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/LICENSE +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/MIGRATION.md +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/abis/agent_registry.json +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/abis/eas.json +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/abis/escrow_vault.json +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/abis/usdc.json +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/adapters/__init__.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/adapters/adapter_registry.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/adapters/adapter_router.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/adapters/base.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/adapters/basic.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/adapters/i_adapter.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/adapters/types.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/adapters/x402_adapter.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/builders/__init__.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/builders/delivery_proof.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/builders/quote.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/cli/__init__.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/cli/commands/__init__.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/cli/commands/balance.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/cli/commands/batch.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/cli/commands/config.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/cli/commands/deploy_check.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/cli/commands/deploy_env.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/cli/commands/init.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/cli/commands/mint.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/cli/commands/pay.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/cli/commands/simulate.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/cli/commands/time.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/cli/commands/tx.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/cli/commands/watch.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/cli/utils/__init__.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/cli/utils/client.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/cli/utils/validation.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/config/__init__.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/config/abis/AgentRegistry.json +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/config/pending_publish.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/config/publish_pipeline.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/erc8004/__init__.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/erc8004/bridge.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/erc8004/reputation_reporter.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/errors/agent.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/errors/base.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/errors/mock.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/errors/storage.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/errors/transaction.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/errors/validation.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/level0/__init__.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/level0/directory.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/level0/provide.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/level0/provider.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/level0/request.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/level1/__init__.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/level1/agent.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/level1/config.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/level1/job.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/level1/pricing.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/protocol/__init__.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/protocol/did.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/protocol/messages.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/protocol/proofs.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/py.typed +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/runtime/__init__.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/runtime/types.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/storage/__init__.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/storage/archive_bundle_builder.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/storage/arweave_client.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/storage/filebase_client.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/storage/types.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/types/__init__.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/types/did.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/types/erc8004.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/types/transaction.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/types/x402.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/utils/canonical_json.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/utils/helpers.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/utils/logger.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/utils/logging.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/utils/nonce_tracker.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/utils/received_nonce_tracker.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/utils/retry.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/utils/secure_nonce.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/utils/used_attestation_tracker.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/utils/validation.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/wallet/__init__.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/wallet/aa/__init__.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/wallet/aa/bundler_client.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/wallet/aa/constants.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/wallet/aa/paymaster_client.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/wallet/aa/user_op_builder.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/src/agirails/wallet/eoa_wallet_provider.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/__init__.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/benchmarks/__init__.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/conftest.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/fixtures/parity/canonical_json.json +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/fixtures/parity/delivery_proof.json +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/fixtures/parity/eip712.json +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/fixtures/parity/service_hash.json +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/integration/__init__.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/integration/test_blockchain_runtime.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/integration/test_eas.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_adapters/__init__.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_adapters/test_adapter_router.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_adapters/test_basic.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_adapters/test_x402_adapter.py +0 -0
- {agirails-2.3.0/tests/test_cli → agirails-2.3.2/tests/test_api}/__init__.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_builders/__init__.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_builders/test_delivery_proof.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_builders/test_quote.py +0 -0
- {agirails-2.3.0/tests/test_config → agirails-2.3.2/tests/test_cli}/__init__.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_cli/test_cli_original.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_cli_deploy/__init__.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_cli_deploy/test_deploy.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_client.py +0 -0
- {agirails-2.3.0/tests/test_runtime → agirails-2.3.2/tests/test_config}/__init__.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_config/test_pending_publish.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_erc8004/__init__.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_erc8004/test_bridge.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_erc8004/test_reputation_reporter.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_errors/__init__.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_errors/test_agent.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_errors/test_base.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_errors/test_network.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_errors/test_transaction.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_errors/test_validation.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_level0/__init__.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_level0/test_directory.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_level0/test_provider.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_level0/test_request.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_level1/__init__.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_level1/test_agent_lifecycle.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_level1/test_config.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_level1/test_pricing.py +0 -0
- {agirails-2.3.0/tests/test_utils → agirails-2.3.2/tests/test_negotiation}/__init__.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_packaging/__init__.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_packaging/test_smoke.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_parity.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_properties/__init__.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_properties/test_state_machine.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_protocol/__init__.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_protocol/test_did.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_protocol/test_eas_verification.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_protocol/test_proofs.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_runtime/test_mock_runtime.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_security/__init__.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_security/test_security_audit.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_storage/__init__.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_storage/conftest.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_storage/test_archive_bundle_builder.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_storage/test_arweave_client.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_storage/test_filebase_client.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_storage/test_types.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_types/__init__.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_types/test_message.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_types/test_transaction.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_utils/test_attestation_replay.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_utils/test_circuit_breaker.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_utils/test_helpers.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_utils/test_helpers_extended.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_utils/test_nonce_tracker.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_utils/test_nonce_tracker_extended.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_utils/test_received_nonce_tracker_extended.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_utils/test_retry.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_utils/test_secure_nonce_concurrency.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_utils/test_security.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_utils/test_security_extended.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_utils/test_validation.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_utils/test_validation_extended.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_wallet/__init__.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_wallet/test_auto_wallet_provider.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_wallet/test_bundler_client.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_wallet/test_dual_nonce_manager.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_wallet/test_keystore.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_wallet/test_transaction_batcher.py +0 -0
- {agirails-2.3.0 → agirails-2.3.2}/tests/test_wallet/test_user_op_builder.py +0 -0
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
# =============================================================================
|
|
9
9
|
|
|
10
10
|
# Client wallet (requester) - Your private key for sending transactions
|
|
11
|
-
# Generate a new wallet
|
|
11
|
+
# Generate a new wallet: use `actp init` or any Ethereum wallet generator
|
|
12
12
|
CLIENT_PRIVATE_KEY=0x_your_client_private_key_here
|
|
13
13
|
|
|
14
14
|
# Provider wallet - Private key for receiving payments (optional)
|
|
@@ -34,17 +34,17 @@ CHAIN_ID=84532
|
|
|
34
34
|
MOCK_USDC_ADDRESS=0x444b4e1A65949AB2ac75979D5d0166Eb7A248Ccb
|
|
35
35
|
|
|
36
36
|
# ACTP Kernel contract
|
|
37
|
-
# ACTP_KERNEL_ADDRESS=
|
|
37
|
+
# ACTP_KERNEL_ADDRESS=0x90a1Bcc218c148F63D036aB2f7B5329C9ee7868d
|
|
38
38
|
|
|
39
39
|
# Escrow Vault contract
|
|
40
|
-
# ESCROW_VAULT_ADDRESS=
|
|
40
|
+
# ESCROW_VAULT_ADDRESS=0xA336967F4481EeE4A8Bb59e35423D273fbf9f5e7
|
|
41
41
|
|
|
42
42
|
# =============================================================================
|
|
43
43
|
# EAS (Ethereum Attestation Service)
|
|
44
44
|
# =============================================================================
|
|
45
45
|
|
|
46
46
|
# Delivery proof schema UID on Base Sepolia
|
|
47
|
-
EAS_DELIVERY_SCHEMA_UID=
|
|
47
|
+
EAS_DELIVERY_SCHEMA_UID=0x1b0ebdf0bd20c28ec9d5362571ce8715a55f46e81c3de2f9b0d8e1b95fb5ffce
|
|
48
48
|
|
|
49
49
|
# =============================================================================
|
|
50
50
|
# Local Development (Optional)
|
|
@@ -90,6 +90,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
90
90
|
|
|
91
91
|
## [Unreleased]
|
|
92
92
|
|
|
93
|
+
> Note: Changelog entries for v2.1.0 through v2.3.1 were not recorded.
|
|
94
|
+
> See git log for detailed changes.
|
|
95
|
+
|
|
93
96
|
### Planned for 2.1.0
|
|
94
97
|
- `BlockchainRuntime` - Real blockchain integration
|
|
95
98
|
- CLI tool implementation (`actp` command)
|
agirails-2.3.2/PKG-INFO
ADDED
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: agirails
|
|
3
|
+
Version: 2.3.2
|
|
4
|
+
Summary: AGIRAILS Python SDK - Agent Commerce Transaction Protocol
|
|
5
|
+
Project-URL: Homepage, https://agirails.io
|
|
6
|
+
Project-URL: Documentation, https://docs.agirails.io
|
|
7
|
+
Project-URL: Repository, https://github.com/agirails/sdk-python
|
|
8
|
+
Project-URL: Issues, https://github.com/agirails/sdk-python/issues
|
|
9
|
+
Author-email: AGIRAILS Team <developers@agirails.io>
|
|
10
|
+
License-Expression: Apache-2.0
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: actp,ai-agents,base,blockchain,escrow,ethereum,payments,web3
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
23
|
+
Classifier: Typing :: Typed
|
|
24
|
+
Requires-Python: >=3.9
|
|
25
|
+
Requires-Dist: aiofiles<25.0.0,>=24.0.0
|
|
26
|
+
Requires-Dist: eth-abi<6.0.0,>=5.0.0
|
|
27
|
+
Requires-Dist: eth-account<0.14.0,>=0.13.0
|
|
28
|
+
Requires-Dist: eth-utils<6.0.0,>=5.0.0
|
|
29
|
+
Requires-Dist: httpx<1.0.0,>=0.27.0
|
|
30
|
+
Requires-Dist: pydantic<3.0.0,>=2.6.0
|
|
31
|
+
Requires-Dist: python-dateutil<3.0.0,>=2.8.0
|
|
32
|
+
Requires-Dist: rich<14.0.0,>=13.0.0
|
|
33
|
+
Requires-Dist: typer<1.0.0,>=0.12.0
|
|
34
|
+
Requires-Dist: typing-extensions<5.0.0,>=4.0.0; python_version < '3.10'
|
|
35
|
+
Requires-Dist: web3<8.0.0,>=7.0.0
|
|
36
|
+
Provides-Extra: dev
|
|
37
|
+
Requires-Dist: black>=24.0.0; extra == 'dev'
|
|
38
|
+
Requires-Dist: hypothesis>=6.100.0; extra == 'dev'
|
|
39
|
+
Requires-Dist: mypy>=1.11.0; extra == 'dev'
|
|
40
|
+
Requires-Dist: pytest-asyncio>=0.24.0; extra == 'dev'
|
|
41
|
+
Requires-Dist: pytest-benchmark>=4.0.0; extra == 'dev'
|
|
42
|
+
Requires-Dist: pytest-cov>=5.0.0; extra == 'dev'
|
|
43
|
+
Requires-Dist: pytest-timeout>=2.3.0; extra == 'dev'
|
|
44
|
+
Requires-Dist: pytest-xdist>=3.5.0; extra == 'dev'
|
|
45
|
+
Requires-Dist: pytest>=8.0.0; extra == 'dev'
|
|
46
|
+
Requires-Dist: ruff>=0.6.0; extra == 'dev'
|
|
47
|
+
Requires-Dist: types-aiofiles>=24.0.0; extra == 'dev'
|
|
48
|
+
Requires-Dist: types-python-dateutil>=2.8.0; extra == 'dev'
|
|
49
|
+
Provides-Extra: mutation
|
|
50
|
+
Requires-Dist: mutmut>=2.4.0; extra == 'mutation'
|
|
51
|
+
Provides-Extra: security
|
|
52
|
+
Requires-Dist: bandit>=1.7.0; extra == 'security'
|
|
53
|
+
Requires-Dist: pip-audit>=2.7.0; extra == 'security'
|
|
54
|
+
Requires-Dist: safety>=3.0.0; extra == 'security'
|
|
55
|
+
Description-Content-Type: text/markdown
|
|
56
|
+
|
|
57
|
+
# AGIRAILS Python SDK
|
|
58
|
+
|
|
59
|
+
[](https://pypi.org/project/agirails/)
|
|
60
|
+
[](https://www.python.org/downloads/)
|
|
61
|
+
[](https://opensource.org/licenses/Apache-2.0)
|
|
62
|
+
[]()
|
|
63
|
+
|
|
64
|
+
The official Python SDK for the **Agent Commerce Transaction Protocol (ACTP)** — enabling AI agents to transact with each other through blockchain-based escrow on Base L2.
|
|
65
|
+
|
|
66
|
+
**Full 1:1 parity with TypeScript SDK v2.5.0+.**
|
|
67
|
+
|
|
68
|
+
## Install
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
pip install agirails==2.3.1
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Features
|
|
75
|
+
|
|
76
|
+
- **Adapter Routing** — priority-based adapter selection (Standard, Basic, X402)
|
|
77
|
+
- **x402 Payments** — HTTP-based instant payments with relay fee splitting
|
|
78
|
+
- **ERC-8004 Identity** — on-chain agent identity resolution and reputation
|
|
79
|
+
- **Keystore Security (AIP-13)** — fail-closed private key policy, `ACTP_KEYSTORE_BASE64` for CI/CD
|
|
80
|
+
- **AGIRAILS.md Source of Truth** — parse, hash, publish, pull, diff agent configs
|
|
81
|
+
- **Smart Wallet (ERC-4337)** — batched transactions with paymaster gas sponsorship
|
|
82
|
+
- **Lazy Publish** — mainnet activation deferred to first real transaction
|
|
83
|
+
- **Three-tier API** — Basic, Standard, and Advanced levels
|
|
84
|
+
- **Mock Runtime** — full local testing without blockchain
|
|
85
|
+
- **CLI** — `actp pay`, `publish`, `pull`, `diff`, `deploy:env`, `deploy:check`
|
|
86
|
+
- **Async-first** — built on asyncio
|
|
87
|
+
- **1,738 tests passing**
|
|
88
|
+
|
|
89
|
+
## Quick Start
|
|
90
|
+
|
|
91
|
+
```python
|
|
92
|
+
import asyncio
|
|
93
|
+
from agirails import ACTPClient
|
|
94
|
+
|
|
95
|
+
async def main():
|
|
96
|
+
client = await ACTPClient.create(mode="mock", requester_address="0x1234...")
|
|
97
|
+
|
|
98
|
+
# Adapter router auto-selects the best path
|
|
99
|
+
# EVM address → ACTP (StandardAdapter)
|
|
100
|
+
result = await client.pay({"to": "0xProvider...", "amount": "10.00"})
|
|
101
|
+
|
|
102
|
+
# HTTP URL → x402 instant payment
|
|
103
|
+
result = await client.pay({"to": "https://api.example.com/pay", "amount": "5.00"})
|
|
104
|
+
|
|
105
|
+
# Agent ID → ERC-8004 resolve → ACTP
|
|
106
|
+
result = await client.pay({"to": "12345", "amount": "10.00"})
|
|
107
|
+
|
|
108
|
+
print(f"Transaction: {result.tx_id}, State: {result.state}")
|
|
109
|
+
|
|
110
|
+
asyncio.run(main())
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## Adapter Routing
|
|
114
|
+
|
|
115
|
+
Priority-based adapter selection matching TypeScript `AdapterRouter`:
|
|
116
|
+
|
|
117
|
+
| Adapter | Priority | Target | Use Case |
|
|
118
|
+
|---------|----------|--------|----------|
|
|
119
|
+
| **X402Adapter** | 70 | `https://...` URLs | Instant HTTP payments with relay fee splitting |
|
|
120
|
+
| **StandardAdapter** | 60 | `0x...` addresses | Full ACTP lifecycle with escrow |
|
|
121
|
+
| **BasicAdapter** | 50 | `0x...` addresses | Simple pay-and-forget (Smart Wallet batched) |
|
|
122
|
+
|
|
123
|
+
## Keystore & Deployment Security (AIP-13)
|
|
124
|
+
|
|
125
|
+
Fail-closed private key policy with network-aware enforcement:
|
|
126
|
+
|
|
127
|
+
| Network | `ACTP_PRIVATE_KEY` | Behavior |
|
|
128
|
+
|---------|-------------------|----------|
|
|
129
|
+
| mock | Allowed | Silent |
|
|
130
|
+
| testnet (base-sepolia) | Allowed | Warn once |
|
|
131
|
+
| mainnet (base-mainnet) | Blocked | Hard fail |
|
|
132
|
+
|
|
133
|
+
**Resolution order:** `ACTP_PRIVATE_KEY` → `ACTP_KEYSTORE_BASE64` + `ACTP_KEY_PASSWORD` → `.actp/keystore.json` → `None`
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
# Generate base64 keystore for CI/CD
|
|
137
|
+
actp deploy:env
|
|
138
|
+
|
|
139
|
+
# Scan repo for exposed secrets
|
|
140
|
+
actp deploy:check
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
## AGIRAILS.md Config Management
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
actp publish --network base-sepolia # Hash + upload to IPFS + register on-chain
|
|
147
|
+
actp pull --network base-sepolia # Fetch config from chain
|
|
148
|
+
actp diff --network base-sepolia # Compare local vs on-chain
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## Transaction Lifecycle
|
|
152
|
+
|
|
153
|
+
```
|
|
154
|
+
INITIATED → QUOTED → COMMITTED → IN_PROGRESS → DELIVERED → SETTLED
|
|
155
|
+
↘ ↘ ↘
|
|
156
|
+
CANCELLED CANCELLED DISPUTED → SETTLED
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
## CLI
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
# Payments
|
|
163
|
+
actp pay <to> <amount> [--deadline TIME]
|
|
164
|
+
actp balance [ADDRESS]
|
|
165
|
+
|
|
166
|
+
# Transaction management
|
|
167
|
+
actp tx list [--state STATE]
|
|
168
|
+
actp tx status <tx_id>
|
|
169
|
+
actp tx deliver <tx_id>
|
|
170
|
+
actp tx settle <tx_id>
|
|
171
|
+
|
|
172
|
+
# Config sync
|
|
173
|
+
actp publish [path]
|
|
174
|
+
actp pull [path] [--network NETWORK]
|
|
175
|
+
actp diff [path] [--network NETWORK]
|
|
176
|
+
|
|
177
|
+
# Deployment security
|
|
178
|
+
actp deploy:env
|
|
179
|
+
actp deploy:check [path] [--fix]
|
|
180
|
+
|
|
181
|
+
# Mock mode
|
|
182
|
+
actp mint <address> <amount>
|
|
183
|
+
actp time advance <duration>
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
## SDK Parity
|
|
187
|
+
|
|
188
|
+
Full 1:1 parity with TypeScript SDK v2.5.0+:
|
|
189
|
+
|
|
190
|
+
| Feature | Python | TypeScript |
|
|
191
|
+
|---------|--------|------------|
|
|
192
|
+
| Adapter Routing | AdapterRouter + 3 adapters | AdapterRouter + 3 adapters |
|
|
193
|
+
| x402 Payments | X402Adapter with relay | X402Adapter with relay |
|
|
194
|
+
| ERC-8004 Identity | ERC8004Bridge + ReputationReporter | ERC8004Bridge + ReputationReporter |
|
|
195
|
+
| Keystore AIP-13 | Full (30-min TTL cache) | Full (30-min TTL cache) |
|
|
196
|
+
| AGIRAILS.md SOT | parse, hash, publish, pull, diff | parse, hash, publish, pull, diff |
|
|
197
|
+
| Smart Wallet | ERC-4337 scaffolding | ERC-4337 full |
|
|
198
|
+
| Lazy Publish | pending-publish lifecycle | pending-publish lifecycle |
|
|
199
|
+
| CLI Commands | pay, publish, pull, diff, deploy:* | pay, publish, pull, diff, deploy:* |
|
|
200
|
+
| State Machine | 8 states, all transitions | 8 states, all transitions |
|
|
201
|
+
| Cross-SDK Tests | Shared test vectors | Shared test vectors |
|
|
202
|
+
|
|
203
|
+
## Testing
|
|
204
|
+
|
|
205
|
+
```bash
|
|
206
|
+
pytest # Run all 1,738 tests
|
|
207
|
+
pytest -v # Verbose output
|
|
208
|
+
pytest tests/test_adapters/ # Adapter tests only
|
|
209
|
+
pytest -k "test_pay" # Pattern match
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
## Requirements
|
|
213
|
+
|
|
214
|
+
- Python 3.9+
|
|
215
|
+
- Dependencies: web3, eth-account, pydantic, aiofiles, httpx, typer, rich
|
|
216
|
+
|
|
217
|
+
## Links
|
|
218
|
+
|
|
219
|
+
- [PyPI](https://pypi.org/project/agirails/)
|
|
220
|
+
- [Documentation](https://docs.agirails.io)
|
|
221
|
+
- [GitHub](https://github.com/agirails/sdk-python)
|
|
222
|
+
- [Discord](https://discord.gg/nuhCt75qe4)
|
|
223
|
+
|
|
224
|
+
## License
|
|
225
|
+
|
|
226
|
+
Apache 2.0 — see [LICENSE](LICENSE) for details.
|
agirails-2.3.2/README.md
ADDED
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
# AGIRAILS Python SDK
|
|
2
|
+
|
|
3
|
+
[](https://pypi.org/project/agirails/)
|
|
4
|
+
[](https://www.python.org/downloads/)
|
|
5
|
+
[](https://opensource.org/licenses/Apache-2.0)
|
|
6
|
+
[]()
|
|
7
|
+
|
|
8
|
+
The official Python SDK for the **Agent Commerce Transaction Protocol (ACTP)** — enabling AI agents to transact with each other through blockchain-based escrow on Base L2.
|
|
9
|
+
|
|
10
|
+
**Full 1:1 parity with TypeScript SDK v2.5.0+.**
|
|
11
|
+
|
|
12
|
+
## Install
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
pip install agirails==2.3.1
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Features
|
|
19
|
+
|
|
20
|
+
- **Adapter Routing** — priority-based adapter selection (Standard, Basic, X402)
|
|
21
|
+
- **x402 Payments** — HTTP-based instant payments with relay fee splitting
|
|
22
|
+
- **ERC-8004 Identity** — on-chain agent identity resolution and reputation
|
|
23
|
+
- **Keystore Security (AIP-13)** — fail-closed private key policy, `ACTP_KEYSTORE_BASE64` for CI/CD
|
|
24
|
+
- **AGIRAILS.md Source of Truth** — parse, hash, publish, pull, diff agent configs
|
|
25
|
+
- **Smart Wallet (ERC-4337)** — batched transactions with paymaster gas sponsorship
|
|
26
|
+
- **Lazy Publish** — mainnet activation deferred to first real transaction
|
|
27
|
+
- **Three-tier API** — Basic, Standard, and Advanced levels
|
|
28
|
+
- **Mock Runtime** — full local testing without blockchain
|
|
29
|
+
- **CLI** — `actp pay`, `publish`, `pull`, `diff`, `deploy:env`, `deploy:check`
|
|
30
|
+
- **Async-first** — built on asyncio
|
|
31
|
+
- **1,738 tests passing**
|
|
32
|
+
|
|
33
|
+
## Quick Start
|
|
34
|
+
|
|
35
|
+
```python
|
|
36
|
+
import asyncio
|
|
37
|
+
from agirails import ACTPClient
|
|
38
|
+
|
|
39
|
+
async def main():
|
|
40
|
+
client = await ACTPClient.create(mode="mock", requester_address="0x1234...")
|
|
41
|
+
|
|
42
|
+
# Adapter router auto-selects the best path
|
|
43
|
+
# EVM address → ACTP (StandardAdapter)
|
|
44
|
+
result = await client.pay({"to": "0xProvider...", "amount": "10.00"})
|
|
45
|
+
|
|
46
|
+
# HTTP URL → x402 instant payment
|
|
47
|
+
result = await client.pay({"to": "https://api.example.com/pay", "amount": "5.00"})
|
|
48
|
+
|
|
49
|
+
# Agent ID → ERC-8004 resolve → ACTP
|
|
50
|
+
result = await client.pay({"to": "12345", "amount": "10.00"})
|
|
51
|
+
|
|
52
|
+
print(f"Transaction: {result.tx_id}, State: {result.state}")
|
|
53
|
+
|
|
54
|
+
asyncio.run(main())
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Adapter Routing
|
|
58
|
+
|
|
59
|
+
Priority-based adapter selection matching TypeScript `AdapterRouter`:
|
|
60
|
+
|
|
61
|
+
| Adapter | Priority | Target | Use Case |
|
|
62
|
+
|---------|----------|--------|----------|
|
|
63
|
+
| **X402Adapter** | 70 | `https://...` URLs | Instant HTTP payments with relay fee splitting |
|
|
64
|
+
| **StandardAdapter** | 60 | `0x...` addresses | Full ACTP lifecycle with escrow |
|
|
65
|
+
| **BasicAdapter** | 50 | `0x...` addresses | Simple pay-and-forget (Smart Wallet batched) |
|
|
66
|
+
|
|
67
|
+
## Keystore & Deployment Security (AIP-13)
|
|
68
|
+
|
|
69
|
+
Fail-closed private key policy with network-aware enforcement:
|
|
70
|
+
|
|
71
|
+
| Network | `ACTP_PRIVATE_KEY` | Behavior |
|
|
72
|
+
|---------|-------------------|----------|
|
|
73
|
+
| mock | Allowed | Silent |
|
|
74
|
+
| testnet (base-sepolia) | Allowed | Warn once |
|
|
75
|
+
| mainnet (base-mainnet) | Blocked | Hard fail |
|
|
76
|
+
|
|
77
|
+
**Resolution order:** `ACTP_PRIVATE_KEY` → `ACTP_KEYSTORE_BASE64` + `ACTP_KEY_PASSWORD` → `.actp/keystore.json` → `None`
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
# Generate base64 keystore for CI/CD
|
|
81
|
+
actp deploy:env
|
|
82
|
+
|
|
83
|
+
# Scan repo for exposed secrets
|
|
84
|
+
actp deploy:check
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## AGIRAILS.md Config Management
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
actp publish --network base-sepolia # Hash + upload to IPFS + register on-chain
|
|
91
|
+
actp pull --network base-sepolia # Fetch config from chain
|
|
92
|
+
actp diff --network base-sepolia # Compare local vs on-chain
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Transaction Lifecycle
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
INITIATED → QUOTED → COMMITTED → IN_PROGRESS → DELIVERED → SETTLED
|
|
99
|
+
↘ ↘ ↘
|
|
100
|
+
CANCELLED CANCELLED DISPUTED → SETTLED
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## CLI
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
# Payments
|
|
107
|
+
actp pay <to> <amount> [--deadline TIME]
|
|
108
|
+
actp balance [ADDRESS]
|
|
109
|
+
|
|
110
|
+
# Transaction management
|
|
111
|
+
actp tx list [--state STATE]
|
|
112
|
+
actp tx status <tx_id>
|
|
113
|
+
actp tx deliver <tx_id>
|
|
114
|
+
actp tx settle <tx_id>
|
|
115
|
+
|
|
116
|
+
# Config sync
|
|
117
|
+
actp publish [path]
|
|
118
|
+
actp pull [path] [--network NETWORK]
|
|
119
|
+
actp diff [path] [--network NETWORK]
|
|
120
|
+
|
|
121
|
+
# Deployment security
|
|
122
|
+
actp deploy:env
|
|
123
|
+
actp deploy:check [path] [--fix]
|
|
124
|
+
|
|
125
|
+
# Mock mode
|
|
126
|
+
actp mint <address> <amount>
|
|
127
|
+
actp time advance <duration>
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## SDK Parity
|
|
131
|
+
|
|
132
|
+
Full 1:1 parity with TypeScript SDK v2.5.0+:
|
|
133
|
+
|
|
134
|
+
| Feature | Python | TypeScript |
|
|
135
|
+
|---------|--------|------------|
|
|
136
|
+
| Adapter Routing | AdapterRouter + 3 adapters | AdapterRouter + 3 adapters |
|
|
137
|
+
| x402 Payments | X402Adapter with relay | X402Adapter with relay |
|
|
138
|
+
| ERC-8004 Identity | ERC8004Bridge + ReputationReporter | ERC8004Bridge + ReputationReporter |
|
|
139
|
+
| Keystore AIP-13 | Full (30-min TTL cache) | Full (30-min TTL cache) |
|
|
140
|
+
| AGIRAILS.md SOT | parse, hash, publish, pull, diff | parse, hash, publish, pull, diff |
|
|
141
|
+
| Smart Wallet | ERC-4337 scaffolding | ERC-4337 full |
|
|
142
|
+
| Lazy Publish | pending-publish lifecycle | pending-publish lifecycle |
|
|
143
|
+
| CLI Commands | pay, publish, pull, diff, deploy:* | pay, publish, pull, diff, deploy:* |
|
|
144
|
+
| State Machine | 8 states, all transitions | 8 states, all transitions |
|
|
145
|
+
| Cross-SDK Tests | Shared test vectors | Shared test vectors |
|
|
146
|
+
|
|
147
|
+
## Testing
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
pytest # Run all 1,738 tests
|
|
151
|
+
pytest -v # Verbose output
|
|
152
|
+
pytest tests/test_adapters/ # Adapter tests only
|
|
153
|
+
pytest -k "test_pay" # Pattern match
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
## Requirements
|
|
157
|
+
|
|
158
|
+
- Python 3.9+
|
|
159
|
+
- Dependencies: web3, eth-account, pydantic, aiofiles, httpx, typer, rich
|
|
160
|
+
|
|
161
|
+
## Links
|
|
162
|
+
|
|
163
|
+
- [PyPI](https://pypi.org/project/agirails/)
|
|
164
|
+
- [Documentation](https://docs.agirails.io)
|
|
165
|
+
- [GitHub](https://github.com/agirails/sdk-python)
|
|
166
|
+
- [Discord](https://discord.gg/nuhCt75qe4)
|
|
167
|
+
|
|
168
|
+
## License
|
|
169
|
+
|
|
170
|
+
Apache 2.0 — see [LICENSE](LICENSE) for details.
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "agirails"
|
|
7
|
-
version = "2.3.
|
|
7
|
+
version = "2.3.2"
|
|
8
8
|
description = "AGIRAILS Python SDK - Agent Commerce Transaction Protocol"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "Apache-2.0"
|
|
@@ -36,7 +36,7 @@ classifiers = [
|
|
|
36
36
|
"Typing :: Typed",
|
|
37
37
|
]
|
|
38
38
|
dependencies = [
|
|
39
|
-
#
|
|
39
|
+
# Pin upper bounds to prevent breaking changes
|
|
40
40
|
"web3>=7.0.0,<8.0.0",
|
|
41
41
|
"eth-account>=0.13.0,<0.14.0",
|
|
42
42
|
"eth-abi>=5.0.0,<6.0.0",
|
|
@@ -352,6 +352,32 @@ from agirails.storage import (
|
|
|
352
352
|
CircuitBreakerConfig,
|
|
353
353
|
)
|
|
354
354
|
|
|
355
|
+
# Negotiation Module (autonomous buyer-side negotiation)
|
|
356
|
+
from agirails.negotiation import (
|
|
357
|
+
DEFAULT_WEIGHTS,
|
|
358
|
+
PolicyEngine,
|
|
359
|
+
BuyerPolicy,
|
|
360
|
+
Constraints,
|
|
361
|
+
MaxUnitPrice,
|
|
362
|
+
MaxDailySpend,
|
|
363
|
+
Negotiation,
|
|
364
|
+
Selection,
|
|
365
|
+
QuoteOffer,
|
|
366
|
+
PolicyViolation,
|
|
367
|
+
PolicyResult,
|
|
368
|
+
DecisionEngine,
|
|
369
|
+
ScoringWeights,
|
|
370
|
+
CandidateStats,
|
|
371
|
+
ScoredCandidate,
|
|
372
|
+
ScoreBreakdown,
|
|
373
|
+
SessionStore,
|
|
374
|
+
SessionMapping,
|
|
375
|
+
BuyerOrchestrator,
|
|
376
|
+
NegotiationResult,
|
|
377
|
+
RoundResult,
|
|
378
|
+
OrchestratorConfig,
|
|
379
|
+
)
|
|
380
|
+
|
|
355
381
|
__all__ = [
|
|
356
382
|
# Version
|
|
357
383
|
"__version__",
|
|
@@ -620,4 +646,27 @@ __all__ = [
|
|
|
620
646
|
"DownloadResult",
|
|
621
647
|
# Types - Circuit Breaker
|
|
622
648
|
"CircuitBreakerConfig",
|
|
649
|
+
# Negotiation Module
|
|
650
|
+
"DEFAULT_WEIGHTS",
|
|
651
|
+
"PolicyEngine",
|
|
652
|
+
"BuyerPolicy",
|
|
653
|
+
"Constraints",
|
|
654
|
+
"MaxUnitPrice",
|
|
655
|
+
"MaxDailySpend",
|
|
656
|
+
"Negotiation",
|
|
657
|
+
"Selection",
|
|
658
|
+
"QuoteOffer",
|
|
659
|
+
"PolicyViolation",
|
|
660
|
+
"PolicyResult",
|
|
661
|
+
"DecisionEngine",
|
|
662
|
+
"ScoringWeights",
|
|
663
|
+
"CandidateStats",
|
|
664
|
+
"ScoredCandidate",
|
|
665
|
+
"ScoreBreakdown",
|
|
666
|
+
"SessionStore",
|
|
667
|
+
"SessionMapping",
|
|
668
|
+
"BuyerOrchestrator",
|
|
669
|
+
"NegotiationResult",
|
|
670
|
+
"RoundResult",
|
|
671
|
+
"OrchestratorConfig",
|
|
623
672
|
]
|
|
@@ -397,6 +397,16 @@
|
|
|
397
397
|
"name": "serviceHash",
|
|
398
398
|
"type": "bytes32",
|
|
399
399
|
"internalType": "bytes32"
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
"name": "agentId",
|
|
403
|
+
"type": "uint256",
|
|
404
|
+
"internalType": "uint256"
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
"name": "requesterAgentId",
|
|
408
|
+
"type": "uint256",
|
|
409
|
+
"internalType": "uint256"
|
|
400
410
|
}
|
|
401
411
|
],
|
|
402
412
|
"outputs": [
|
|
@@ -553,6 +563,26 @@
|
|
|
553
563
|
"name": "platformFeeBpsLocked",
|
|
554
564
|
"type": "uint16",
|
|
555
565
|
"internalType": "uint16"
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
"name": "agentId",
|
|
569
|
+
"type": "uint256",
|
|
570
|
+
"internalType": "uint256"
|
|
571
|
+
},
|
|
572
|
+
{
|
|
573
|
+
"name": "requesterAgentId",
|
|
574
|
+
"type": "uint256",
|
|
575
|
+
"internalType": "uint256"
|
|
576
|
+
},
|
|
577
|
+
{
|
|
578
|
+
"name": "disputeInitiator",
|
|
579
|
+
"type": "address",
|
|
580
|
+
"internalType": "address"
|
|
581
|
+
},
|
|
582
|
+
{
|
|
583
|
+
"name": "disputeBond",
|
|
584
|
+
"type": "uint256",
|
|
585
|
+
"internalType": "uint256"
|
|
556
586
|
}
|
|
557
587
|
]
|
|
558
588
|
}
|
|
@@ -1067,10 +1097,10 @@
|
|
|
1067
1097
|
"internalType": "address"
|
|
1068
1098
|
},
|
|
1069
1099
|
{
|
|
1070
|
-
"name": "
|
|
1071
|
-
"type": "
|
|
1100
|
+
"name": "bondAmount",
|
|
1101
|
+
"type": "uint256",
|
|
1072
1102
|
"indexed": false,
|
|
1073
|
-
"internalType": "
|
|
1103
|
+
"internalType": "uint256"
|
|
1074
1104
|
},
|
|
1075
1105
|
{
|
|
1076
1106
|
"name": "timestamp",
|
|
@@ -1098,10 +1128,22 @@
|
|
|
1098
1128
|
"internalType": "bytes32"
|
|
1099
1129
|
},
|
|
1100
1130
|
{
|
|
1101
|
-
"name": "
|
|
1102
|
-
"type": "
|
|
1131
|
+
"name": "initiator",
|
|
1132
|
+
"type": "address",
|
|
1133
|
+
"indexed": true,
|
|
1134
|
+
"internalType": "address"
|
|
1135
|
+
},
|
|
1136
|
+
{
|
|
1137
|
+
"name": "providerAtFault",
|
|
1138
|
+
"type": "bool",
|
|
1103
1139
|
"indexed": false,
|
|
1104
|
-
"internalType": "
|
|
1140
|
+
"internalType": "bool"
|
|
1141
|
+
},
|
|
1142
|
+
{
|
|
1143
|
+
"name": "bondAmount",
|
|
1144
|
+
"type": "uint256",
|
|
1145
|
+
"indexed": false,
|
|
1146
|
+
"internalType": "uint256"
|
|
1105
1147
|
},
|
|
1106
1148
|
{
|
|
1107
1149
|
"name": "timestamp",
|
|
@@ -1594,6 +1636,12 @@
|
|
|
1594
1636
|
"type": "uint256",
|
|
1595
1637
|
"indexed": false,
|
|
1596
1638
|
"internalType": "uint256"
|
|
1639
|
+
},
|
|
1640
|
+
{
|
|
1641
|
+
"name": "agentId",
|
|
1642
|
+
"type": "uint256",
|
|
1643
|
+
"indexed": false,
|
|
1644
|
+
"internalType": "uint256"
|
|
1597
1645
|
}
|
|
1598
1646
|
],
|
|
1599
1647
|
"anonymous": false
|
|
@@ -1603,6 +1651,55 @@
|
|
|
1603
1651
|
"name": "ReentrancyGuardReentrantCall",
|
|
1604
1652
|
"inputs": []
|
|
1605
1653
|
},
|
|
1654
|
+
{
|
|
1655
|
+
"type": "function",
|
|
1656
|
+
"name": "acceptQuote",
|
|
1657
|
+
"inputs": [
|
|
1658
|
+
{
|
|
1659
|
+
"name": "transactionId",
|
|
1660
|
+
"type": "bytes32",
|
|
1661
|
+
"internalType": "bytes32"
|
|
1662
|
+
},
|
|
1663
|
+
{
|
|
1664
|
+
"name": "newAmount",
|
|
1665
|
+
"type": "uint256",
|
|
1666
|
+
"internalType": "uint256"
|
|
1667
|
+
}
|
|
1668
|
+
],
|
|
1669
|
+
"outputs": [],
|
|
1670
|
+
"stateMutability": "nonpayable"
|
|
1671
|
+
},
|
|
1672
|
+
{
|
|
1673
|
+
"type": "event",
|
|
1674
|
+
"name": "QuoteAccepted",
|
|
1675
|
+
"inputs": [
|
|
1676
|
+
{
|
|
1677
|
+
"name": "transactionId",
|
|
1678
|
+
"type": "bytes32",
|
|
1679
|
+
"indexed": true,
|
|
1680
|
+
"internalType": "bytes32"
|
|
1681
|
+
},
|
|
1682
|
+
{
|
|
1683
|
+
"name": "oldAmount",
|
|
1684
|
+
"type": "uint256",
|
|
1685
|
+
"indexed": false,
|
|
1686
|
+
"internalType": "uint256"
|
|
1687
|
+
},
|
|
1688
|
+
{
|
|
1689
|
+
"name": "newAmount",
|
|
1690
|
+
"type": "uint256",
|
|
1691
|
+
"indexed": false,
|
|
1692
|
+
"internalType": "uint256"
|
|
1693
|
+
},
|
|
1694
|
+
{
|
|
1695
|
+
"name": "timestamp",
|
|
1696
|
+
"type": "uint256",
|
|
1697
|
+
"indexed": false,
|
|
1698
|
+
"internalType": "uint256"
|
|
1699
|
+
}
|
|
1700
|
+
],
|
|
1701
|
+
"anonymous": false
|
|
1702
|
+
},
|
|
1606
1703
|
{
|
|
1607
1704
|
"type": "error",
|
|
1608
1705
|
"name": "SafeERC20FailedOperation",
|