@agenttrust-sdk/mcp 0.3.1 → 0.3.3
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.
- package/README.md +25 -3
- package/dist/chain.js +4 -2
- package/dist/chain.js.map +1 -1
- package/dist/config.d.ts +22 -2
- package/dist/config.js +165 -15
- package/dist/config.js.map +1 -1
- package/dist/embedded-docs/mcp/hosted-endpoint.mdx +1 -1
- package/dist/embedded-docs/mcp/install.mdx +12 -3
- package/dist/embedded-docs/mcp/tools.mdx +2 -2
- package/dist/embedded-docs/quickstart.mdx +83 -0
- package/dist/errors.d.ts +79 -0
- package/dist/errors.js +277 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.js +13 -6
- package/dist/index.js.map +1 -1
- package/dist/server.js +19 -16
- package/dist/server.js.map +1 -1
- package/dist/tools/discovery/docs.d.ts +6 -0
- package/dist/tools/discovery/docs.js +13 -1
- package/dist/tools/discovery/docs.js.map +1 -1
- package/dist/tools/discovery/facilitator-walkthrough.d.ts +5 -0
- package/dist/tools/discovery/facilitator-walkthrough.js +13 -2
- package/dist/tools/discovery/facilitator-walkthrough.js.map +1 -1
- package/dist/tools/index.js +2 -0
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/read/get-quantu-reputation.d.ts +23 -3
- package/dist/tools/read/get-quantu-reputation.js +32 -7
- package/dist/tools/read/get-quantu-reputation.js.map +1 -1
- package/dist/tools/read/simulate-payment.js +13 -13
- package/dist/tools/read/simulate-payment.js.map +1 -1
- package/dist/tools/write/emit-feedback.d.ts +4 -4
- package/dist/tools/write/emit-feedback.js +55 -12
- package/dist/tools/write/emit-feedback.js.map +1 -1
- package/dist/tools/write/init-authority.d.ts +43 -0
- package/dist/tools/write/init-authority.js +92 -0
- package/dist/tools/write/init-authority.js.map +1 -0
- package/dist/tools/write/init-policy.d.ts +23 -3
- package/dist/tools/write/init-policy.js +92 -15
- package/dist/tools/write/init-policy.js.map +1 -1
- package/dist/tools/write/request-validation.js +6 -2
- package/dist/tools/write/request-validation.js.map +1 -1
- package/dist/tools/write/respond-to-validation.d.ts +3 -2
- package/dist/tools/write/respond-to-validation.js +10 -7
- package/dist/tools/write/respond-to-validation.js.map +1 -1
- package/dist/tools/write/set-killswitch.d.ts +10 -0
- package/dist/tools/write/set-killswitch.js +63 -14
- package/dist/tools/write/set-killswitch.js.map +1 -1
- package/package.json +15 -16
- package/scripts/install-claude-desktop.sh +0 -0
- package/dist/embedded-docs/getting-started/architecture-overview.mdx +0 -85
- package/dist/embedded-docs/reference/formal-verification.mdx +0 -19
- package/dist/embedded-docs/sdk/atomic-tx-invariant.mdx +0 -37
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Atomic-tx invariant
|
|
3
|
-
description: SDK and facilitator rules that keep policy checks tied to settlement.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
AgentTrust treats a policy check as useful only when the facilitator enforces the same payment context through settlement.
|
|
7
|
-
|
|
8
|
-
Production settlement must compose:
|
|
9
|
-
|
|
10
|
-
1. `gate_payment`
|
|
11
|
-
2. SPL transfer
|
|
12
|
-
3. `emit_feedback`
|
|
13
|
-
|
|
14
|
-
All three succeed, or all three revert. That is the invariant that keeps a Pay.sh payment from settling without the AgentTrust feedback record, and keeps feedback from being emitted for a payment that never moved.
|
|
15
|
-
|
|
16
|
-
## Adapter responsibilities
|
|
17
|
-
|
|
18
|
-
The adapter validates that the retry proof still matches the verify-time context:
|
|
19
|
-
|
|
20
|
-
| Check | Why it exists |
|
|
21
|
-
| --- | --- |
|
|
22
|
-
| `paymentIdHash` replay binding | prevents duplicate or raced settlement calls |
|
|
23
|
-
| amount, mint, recipient cross-check | prevents paying a different asset or recipient than the policy checked |
|
|
24
|
-
| facilitator fee payer != transfer authority | prevents self-pay feedback |
|
|
25
|
-
| SERVICE-signed challenge | prevents forged `paymentRequirements` racing a legitimate one |
|
|
26
|
-
| idempotent feedback lookup | makes retries return a stable receipt instead of double-emitting |
|
|
27
|
-
|
|
28
|
-
## Demo vs production
|
|
29
|
-
|
|
30
|
-
`examples/pay-sh-demo` stubs `validateOnChainTx` and `emitFeedbackCpi` so the route can run in CI. Production fills those same dependency seams with RPC parsing and the Anchor feedback call.
|
|
31
|
-
|
|
32
|
-
| Source | Path |
|
|
33
|
-
| --- | --- |
|
|
34
|
-
| facilitator routes | [`trustgate/server/src/routes/settle.ts`](https://github.com/agenttrust-labs/agenttrust/blob/main/trustgate/server/src/routes/settle.ts) |
|
|
35
|
-
| Pay.sh proof validator | [`trustgate/server/src/facilitators/pay-sh/proof-validator.ts`](https://github.com/agenttrust-labs/agenttrust/blob/main/trustgate/server/src/facilitators/pay-sh/proof-validator.ts) |
|
|
36
|
-
| Pay.sh feedback helper | [`trustgate/server/src/facilitators/pay-sh/feedback.ts`](https://github.com/agenttrust-labs/agenttrust/blob/main/trustgate/server/src/facilitators/pay-sh/feedback.ts) |
|
|
37
|
-
| Pay.sh demo deps | [`examples/pay-sh-demo/src/deps.ts`](https://github.com/agenttrust-labs/agenttrust/blob/main/examples/pay-sh-demo/src/deps.ts) |
|