fix: temporarily disable routers to isolate Pydantic validation issue and add agent endpoints to working routers

- Comment out most routers in main.py to isolate Pydantic issue
- Keep only blockchain router enabled for testing
- Fix database warmup to use get_session() instead of SessionDep()
- Add blockchain router to __init__.py exports
- Add test endpoint to agent_router for verification
- Duplicate agent network and execution receipt endpoints in client and exchange routers as temporary workaround
This commit is contained in:
oib
2026-03-05 12:57:40 +01:00
parent 40cf275985
commit 0c090c96fa
29 changed files with 2752 additions and 183 deletions

View File

@@ -502,20 +502,20 @@ def balance(ctx):
# Method 1: Try direct balance endpoint
try:
response = client.get(
f"{config.coordinator_url.rstrip('/')}/rpc/getBalance/{wallet_data['address']}?chain_id=ait-devnet",
f"{config.get('coordinator_url').rstrip('/')}/rpc/getBalance/{wallet_data['address']}?chain_id=ait-devnet",
timeout=5,
)
if response.status_code == 200:
result = response.json()
blockchain_balance = result.get("balance", 0)
except Exception as e:
except Exception:
pass
# Method 2: Try addresses list endpoint
if blockchain_balance is None:
try:
response = client.get(
f"{config.coordinator_url.rstrip('/')}/rpc/addresses?chain_id=ait-devnet",
f"{config.get('coordinator_url').rstrip('/')}/rpc/addresses?chain_id=ait-devnet",
timeout=5,
)
if response.status_code == 200:
@@ -532,7 +532,7 @@ def balance(ctx):
if blockchain_balance is None:
try:
response = client.post(
f"{config.coordinator_url.rstrip('/')}/rpc/admin/mintFaucet?chain_id=ait-devnet",
f"{config.get('coordinator_url').rstrip('/')}/rpc/admin/mintFaucet?chain_id=ait-devnet",
json={"address": wallet_data["address"], "amount": 1},
timeout=5,
)
@@ -559,7 +559,7 @@ def balance(ctx):
ctx.obj.get("output_format", "table"),
)
return
except Exception as e:
except Exception:
pass
# Fallback to local balance only