Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Agent commerce SDK for Python. The full merchant-side toolkit: identity gating + payment helpers + 402 builders + discovery + Stripe multichain. One install, submodule imports per concern.

Every helper lifts directly from working production code (`agentscore/martin-estate`) — extract from real consumers, not speculation.
Every helper is extracted from a real consumer, not speculated.

## Submodules

Expand Down
6 changes: 2 additions & 4 deletions agentscore_commerce/identity/policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@
return a structured :class:`GateResult`.

All three are additive — vendors that don't need per-product policy can keep
using ``AgentScoreGate(...)`` directly. The pattern was extracted from the
``agentscore/store`` merchant; see its ``store/routes/purchase.py`` for the
full per-request flow including shipping checks (which most merchants will
implement adjacent to the gate).
using ``AgentScoreGate(...)`` directly. Most merchants will implement shipping
checks adjacent to the gate per-request.
"""

from __future__ import annotations
Expand Down
4 changes: 2 additions & 2 deletions agentscore_commerce/stripe_multichain/pi_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
All three are TTL-bounded (default 300s — long enough for an agent to retry, short
enough to bound memory). Backed by Redis when ``redis_url`` is set, falls back to
in-process dict otherwise. Single-instance servers can use the in-memory cache;
ECS Fargate / multi-task deployments need Redis so a deposit lands on whichever
task settles it.
multi-instance deployments need a shared cache (Redis) so a deposit lands on
whichever instance settles it.
"""

from __future__ import annotations
Expand Down
4 changes: 0 additions & 4 deletions examples/per_product_policy_merchant.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@
- shipping_country_allowed / shipping_state_allowed
Per-product shipping allowlists (NULL = ship anywhere).

The pattern was extracted from agentscore/store. See its
``store/routes/purchase.py`` for the full per-request flow including code
redemption + order persistence.

Peer deps:
pip install agentscore-commerce[fastapi]

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "agentscore-commerce"
version = "1.0.1"
version = "1.0.2"
description = "Agent commerce SDK for Python — identity middleware (FastAPI, Flask, Django, AIOHTTP, Sanic, ASGI) + payment helpers + 402 builders + discovery + Stripe multichain. The full merchant-side toolkit for AgentScore-powered agent commerce."
readme = "README.md"
license = "MIT"
Expand Down
7 changes: 5 additions & 2 deletions tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@
import pytest

API_KEY = os.environ.get("AGENTSCORE_API_KEY")
BASE_URL = os.environ.get("AGENTSCORE_BASE_URL", "http://api.dev.agentscore.internal")
BASE_URL = os.environ.get("AGENTSCORE_BASE_URL")
TEST_ADDRESS = "0x339559a2d1cd15059365fc7bd36b3047bba480e0"

pytestmark = pytest.mark.skipif(not API_KEY, reason="AGENTSCORE_API_KEY not set")
pytestmark = pytest.mark.skipif(
not (API_KEY and BASE_URL),
reason="AGENTSCORE_API_KEY and AGENTSCORE_BASE_URL must both be set",
)


def _assess(body=None):
Expand Down
14 changes: 7 additions & 7 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading