merge: chore/cleanup-remove-bloat-and-secrets into main
This commit is contained in:
commit
bde2f3a97d
1173 changed files with 437609 additions and 0 deletions
53
app/domain/x402/__init__.py
Normal file
53
app/domain/x402/__init__.py
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
"""x402 domain — auto-registers its health check + HTTP routes.
|
||||
|
||||
T34 from v4.0. Sovereign-first x402 payment layer for AI agents.
|
||||
|
||||
Re-exports the legacy models (PaymentFacilitator, X402Tier) for backward
|
||||
compatibility with v1 routers that import from app.domain.x402.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
from app.core import health as health_mod
|
||||
from app.core.health import DomainHealth
|
||||
|
||||
|
||||
async def _health_check() -> DomainHealth:
|
||||
"""x402 health: catalog + middleware available."""
|
||||
try:
|
||||
from app.domain.x402.middleware import PRICING
|
||||
return DomainHealth(
|
||||
name="x402",
|
||||
healthy=True,
|
||||
details={"tools": len(PRICING), "middleware": "available"},
|
||||
)
|
||||
except Exception as e:
|
||||
return DomainHealth(name="x402", healthy=False, error=str(e))
|
||||
|
||||
|
||||
health_mod.register_health_check("x402", _health_check)
|
||||
|
||||
|
||||
# Re-export models for backward compat with v1 routers and tests
|
||||
from app.domain.x402.models import (
|
||||
PaymentFacilitator,
|
||||
PaymentReceipt,
|
||||
ToolCatalog,
|
||||
ToolCatalogEntry,
|
||||
ToolPricing,
|
||||
X402Tier,
|
||||
)
|
||||
|
||||
# Re-export the new T34 router
|
||||
from app.domain.x402.router import router # noqa: E402
|
||||
from app.domain.x402.service import X402Service
|
||||
|
||||
__all__ = [
|
||||
"PaymentFacilitator",
|
||||
"PaymentReceipt",
|
||||
"ToolCatalog",
|
||||
"ToolCatalogEntry",
|
||||
"ToolPricing",
|
||||
"X402Service",
|
||||
"X402Tier",
|
||||
"router",
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue