Skip to content

Commit 82a0795

Browse files
committed
Update MCP discoverability, agent.txt, and SDK packaging
- Updated agent.txt and .well-known/agent.txt for XAP v0.2 - Added mcp to core dependencies in pyproject.toml - Updated npm package metadata and README - Updated Smithery submission docs - Fixed settlement-intent schema sync - Updated test adapter and base adapter
1 parent 83512d7 commit 82a0795

11 files changed

Lines changed: 44 additions & 43 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ Every agent-to-agent economic interaction produces governed objects that are:
204204
| 0 | `AgentManifest` | Signed, Verity-backed trust credential. How agents find and verify each other. |
205205
| 1 | `AgentIdentity` | Permanent economic passport with append-only reputation. |
206206
| 2 | `NegotiationContract` | Time-bound offer/counter/accept flow with conditional pricing. |
207-
| 3 | `SettlementIntent` | Escrow instruction with declared release conditions and split rules. |
207+
| 3 | `SettlementIntent` | Conditional hold instruction with declared release conditions and split rules. |
208208
| 4 | `ExecutionReceipt` | Tamper-proof record of every economic event. |
209209
| 5 | `VerityReceipt` | Deterministically replayable proof of why a decision was made. |
210210

@@ -262,7 +262,7 @@ xap-mcp
262262
| `xap_verify_manifest` | Verify agent trust credential via Verity receipt replay |
263263
| `xap_create_offer` | Create a negotiation offer |
264264
| `xap_respond_to_offer` | Accept, reject, or counter |
265-
| `xap_settle` | Execute settlement with conditional escrow |
265+
| `xap_settle` | Execute settlement with conditional hold |
266266
| `xap_verify_receipt` | Verify any receipt (public, no auth) |
267267
| `xap_check_balance` | Check sandbox or live balance |
268268
| `xap_verify_workflow` | Verify complete causal chain of multi-agent workflow |

npm/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Once installed, ask Claude (or any MCP client):
4545
- "Find me agents that can do code review for under $0.10"
4646
- "Verify the trust record for agent agnt_7f3a9b2c"
4747
- "Create an offer to QualityGate for $0.005 with quality threshold 8000"
48-
- "Settle the accepted contract and escrow $5.00"
48+
- "Settle the accepted contract and hold $5.00 pending verification"
4949
- "Verify receipt vrt_a1b2c3d4..."
5050
- "Check my sandbox balance"
5151

@@ -57,7 +57,7 @@ Once installed, ask Claude (or any MCP client):
5757
| `xap_verify_manifest` | Verify an agent's signed trust credential (replays Verity receipts) |
5858
| `xap_create_offer` | Create a negotiation offer with conditional pricing |
5959
| `xap_respond_to_offer` | Accept, reject, or counter an offer |
60-
| `xap_settle` | Execute a settlement with conditional escrow |
60+
| `xap_settle` | Execute a settlement with conditional hold |
6161
| `xap_verify_receipt` | Verify any XAP receipt publicly |
6262
| `xap_check_balance` | Check sandbox or live balance |
6363

npm/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"xap",
88
"agent-commerce",
99
"settlement",
10-
"escrow",
10+
"payment-hold",
1111
"verity",
1212
"zexrail",
1313
"anthropic",

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ dependencies = [
2727
"jsonschema>=4.20",
2828
"pynacl>=1.5",
2929
"pydantic>=2.0",
30+
"mcp>=0.1",
3031
]
3132

3233
[project.optional-dependencies]

registry/smithery-submission.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ description: |
88
agent-to-agent commerce. This MCP server gives any AI assistant 7 tools:
99
discover agents by capability and success rate, verify their trust credentials
1010
using cryptographic Verity receipts, create and respond to negotiation offers,
11-
execute conditional settlements with automatic escrow, and verify any receipt
11+
execute conditional settlements with automatic payment hold, and verify any receipt
1212
publicly without an account.
1313

1414
Sandbox mode requires no account — uses fake money with no real effects.
1515
Live mode requires a free ZexRail account.
1616

1717
category: Finance & Commerce
18-
tags: [agents, settlement, escrow, payments, xap, verity, zexrail]
18+
tags: [agents, settlement, payment-hold, payments, xap, verity, zexrail]
1919

2020
install_command: npx -y @agentra/xap-mcp
2121
npm_package: "@agentra/xap-mcp"
@@ -31,7 +31,7 @@ tools:
3131
- name: xap_respond_to_offer
3232
description: Accept, reject, or counter a negotiation offer
3333
- name: xap_settle
34-
description: Execute a settlement with conditional escrow and split payment
34+
description: Execute a settlement with conditional hold and split payment
3535
- name: xap_verify_receipt
3636
description: Verify any XAP receipt publicly (no account required)
3737
- name: xap_check_balance

static/.well-known/agent.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ mcp_tools:
2626
xap_verify_manifest Verify agent trust credential (TSA, policy, attestation)
2727
xap_create_offer Create a negotiation offer to an agent
2828
xap_respond_to_offer Accept, reject, or counter a negotiation offer
29-
xap_settle Execute a settlement with conditional escrow
29+
xap_settle Execute a settlement with conditional hold
3030
xap_verify_receipt Verify any XAP receipt (public, no auth)
3131
xap_check_balance Check sandbox or live balance
3232
xap_verify_workflow Verify complete causal chain of multi-agent workflow
@@ -50,7 +50,7 @@ primitives:
5050
- AgentManifest # Signed trust credential (primitive 0)
5151
- AgentIdentity # Economic passport (primitive 1)
5252
- NegotiationContract # Offer/counter/accept (primitive 2)
53-
- SettlementIntent # Conditional escrow (primitive 3)
53+
- SettlementIntent # Conditional hold (primitive 3)
5454
- ExecutionReceipt # Settlement record (primitive 4)
5555
- VerityReceipt # Deterministic replay proof (primitive 5)
5656

static/agent.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ mcp_tools:
2626
xap_verify_manifest Verify agent trust credential (TSA, policy, attestation)
2727
xap_create_offer Create a negotiation offer to an agent
2828
xap_respond_to_offer Accept, reject, or counter a negotiation offer
29-
xap_settle Execute a settlement with conditional escrow
29+
xap_settle Execute a settlement with conditional hold
3030
xap_verify_receipt Verify any XAP receipt (public, no auth)
3131
xap_check_balance Check sandbox or live balance
3232
xap_verify_workflow Verify complete causal chain of multi-agent workflow
@@ -50,7 +50,7 @@ primitives:
5050
- AgentManifest # Signed trust credential (primitive 0)
5151
- AgentIdentity # Economic passport (primitive 1)
5252
- NegotiationContract # Offer/counter/accept (primitive 2)
53-
- SettlementIntent # Conditional escrow (primitive 3)
53+
- SettlementIntent # Conditional hold (primitive 3)
5454
- ExecutionReceipt # Settlement record (primitive 4)
5555
- VerityReceipt # Deterministic replay proof (primitive 5)
5656

tests/test_adapters.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ async def test_release_funds(self, adapter):
6060
assert adapter.balance("agent_22222222") == 2000
6161

6262
@pytest.mark.asyncio
63-
async def test_release_no_escrow(self, adapter):
64-
with pytest.raises(XAPAdapterError, match="No escrow"):
63+
async def test_release_no_payment_hold(self, adapter):
64+
with pytest.raises(XAPAdapterError, match="No payment hold"):
6565
await adapter.release_funds(_make_settlement(), [])
6666

6767
@pytest.mark.asyncio
@@ -75,12 +75,12 @@ async def test_refund(self, adapter):
7575
assert adapter.balance("agent_aabbccdd") == 50000 # fully restored
7676

7777
@pytest.mark.asyncio
78-
async def test_refund_no_escrow(self, adapter):
79-
with pytest.raises(XAPAdapterError, match="No escrow"):
78+
async def test_refund_no_payment_hold(self, adapter):
79+
with pytest.raises(XAPAdapterError, match="No payment hold"):
8080
await adapter.refund(_make_settlement(), 5000)
8181

8282
@pytest.mark.asyncio
83-
async def test_refund_exceeds_escrow(self, adapter):
83+
async def test_refund_exceeds_payment_hold(self, adapter):
8484
adapter.fund_agent("agent_aabbccdd", 50000)
8585
stl = _make_settlement()
8686
await adapter.lock_funds(stl)

xap/adapters/base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ class SettlementAdapter(ABC):
1010

1111
@abstractmethod
1212
async def lock_funds(self, settlement: dict) -> dict:
13-
"""Lock funds in escrow. Returns lock result."""
13+
"""Lock funds in a payment hold. Returns lock result."""
1414

1515
@abstractmethod
1616
async def release_funds(self, settlement: dict, payouts: list[dict]) -> dict:
17-
"""Release escrowed funds to payees. Returns release result."""
17+
"""Release held funds to payees. Returns release result."""
1818

1919
@abstractmethod
2020
async def refund(self, settlement: dict, amount: int) -> dict:
21-
"""Return escrowed funds to payer. Returns refund result."""
21+
"""Return held funds to payer. Returns refund result."""
2222

2323
@abstractmethod
2424
def adapter_type(self) -> str:

xap/adapters/test_adapter.py

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class TestAdapter(SettlementAdapter):
1313

1414
def __init__(self) -> None:
1515
self._balances: dict[str, int] = {}
16-
self._escrow: dict[str, int] = {}
16+
self._payment_hold: dict[str, int] = {}
1717
self._transactions: list[dict] = []
1818

1919
def fund_agent(self, agent_id: str, amount: int) -> None:
@@ -27,12 +27,12 @@ def fund_agent(self, agent_id: str, amount: int) -> None:
2727
})
2828

2929
async def lock_funds(self, settlement: dict) -> dict:
30-
"""Move funds from payer to escrow."""
30+
"""Move funds from payer to payment hold."""
3131
payer = settlement["payer_agent"]
3232
amount = settlement["total_amount_minor_units"]
3333
stl_id = settlement["settlement_id"]
3434

35-
if stl_id in self._escrow:
35+
if stl_id in self._payment_hold:
3636
raise XAPAdapterError(f"Funds already locked for settlement {stl_id}")
3737

3838
balance = self._balances.get(payer, 0)
@@ -42,7 +42,7 @@ async def lock_funds(self, settlement: dict) -> dict:
4242
)
4343

4444
self._balances[payer] -= amount
45-
self._escrow[stl_id] = amount
45+
self._payment_hold[stl_id] = amount
4646
self._transactions.append({
4747
"type": "lock",
4848
"settlement_id": stl_id,
@@ -53,57 +53,57 @@ async def lock_funds(self, settlement: dict) -> dict:
5353
return {"status": "locked", "amount": amount}
5454

5555
async def release_funds(self, settlement: dict, payouts: list[dict]) -> dict:
56-
"""Release escrowed funds to payees according to split."""
56+
"""Release held funds to payees according to split."""
5757
stl_id = settlement["settlement_id"]
5858

59-
if stl_id not in self._escrow:
60-
raise XAPAdapterError(f"No escrow found for settlement {stl_id}")
59+
if stl_id not in self._payment_hold:
60+
raise XAPAdapterError(f"No payment hold found for settlement {stl_id}")
6161

62-
escrowed = self._escrow[stl_id]
62+
held = self._payment_hold[stl_id]
6363
total_payout = sum(p["amount_minor_units"] for p in payouts)
6464

65-
if total_payout > escrowed:
65+
if total_payout > held:
6666
raise XAPAdapterError(
67-
f"Payout total {total_payout} exceeds escrowed {escrowed}"
67+
f"Payout total {total_payout} exceeds held amount {held}"
6868
)
6969

7070
for payout in payouts:
7171
agent = payout["agent_id"]
7272
amt = payout["amount_minor_units"]
7373
self._balances[agent] = self._balances.get(agent, 0) + amt
7474

75-
del self._escrow[stl_id]
75+
del self._payment_hold[stl_id]
7676
self._transactions.append({
7777
"type": "release",
7878
"settlement_id": stl_id,
7979
"payouts": payouts,
8080
"timestamp": datetime.now(timezone.utc).isoformat(),
8181
})
8282

83-
remainder = escrowed - total_payout
83+
remainder = held - total_payout
8484
if remainder > 0:
8585
payer = settlement["payer_agent"]
8686
self._balances[payer] = self._balances.get(payer, 0) + remainder
8787

8888
return {"status": "released", "total_released": total_payout}
8989

9090
async def refund(self, settlement: dict, amount: int) -> dict:
91-
"""Return escrowed funds to payer."""
91+
"""Return held funds to payer."""
9292
stl_id = settlement["settlement_id"]
9393
payer = settlement["payer_agent"]
9494

95-
if stl_id not in self._escrow:
96-
raise XAPAdapterError(f"No escrow found for settlement {stl_id}")
95+
if stl_id not in self._payment_hold:
96+
raise XAPAdapterError(f"No payment hold found for settlement {stl_id}")
9797

98-
escrowed = self._escrow[stl_id]
99-
if amount > escrowed:
98+
held = self._payment_hold[stl_id]
99+
if amount > held:
100100
raise XAPAdapterError(
101-
f"Refund amount {amount} exceeds escrowed {escrowed}"
101+
f"Refund amount {amount} exceeds held amount {held}"
102102
)
103103

104-
self._escrow[stl_id] -= amount
105-
if self._escrow[stl_id] == 0:
106-
del self._escrow[stl_id]
104+
self._payment_hold[stl_id] -= amount
105+
if self._payment_hold[stl_id] == 0:
106+
del self._payment_hold[stl_id]
107107

108108
self._balances[payer] = self._balances.get(payer, 0) + amount
109109
self._transactions.append({

0 commit comments

Comments
 (0)