@atrib/agent 0.4.0 → 0.4.1
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 +9 -9
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -48,12 +48,12 @@ All detection logic lives in `packages/agent/src/transaction.ts` and runs agains
|
|
|
48
48
|
|
|
49
49
|
| Protocol | Sponsor / origin | Detection signal | Spec reference |
|
|
50
50
|
| ------------------------------------ | ---------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
|
|
51
|
-
| **ACP**. Agentic Commerce Protocol | Stripe / OpenAI; `github.com/agentic-commerce-protocol` | `status === "completed"` + embedded `order` on `/checkout_sessions/{id}/complete`, or `order_create` / `order_update` webhook | [§
|
|
52
|
-
| **UCP**. Universal Commerce Protocol | `github.com/universal-commerce-protocol/ucp` | Same shape as ACP + top-level `ucp.version` envelope | [§
|
|
53
|
-
| **x402** | Coinbase. `github.com/coinbase/x402` | HTTP `PAYMENT-RESPONSE` header (v2) or legacy `X-PAYMENT-RESPONSE` (v1) on the 200 response | [§
|
|
54
|
-
| **MPP**. Machine Payments Protocol | Tempo Labs / Stripe; IETF `draft-ryan-httpauth-payment-01` | HTTP `Payment-Receipt` header on 200 success response | [§
|
|
55
|
-
| **AP2**. Agentic Payment Protocol | Google; `github.com/google-agentic-commerce/AP2` | Successful AP2 `PaymentReceipt` or `CheckoutReceipt`; v0.1 `ap2.mandates.PaymentMandate` remains a fallback | [§
|
|
56
|
-
| **a2a-x402** | Google. `github.com/google-agentic-commerce/a2a-x402` | A2A task `status.message.metadata["x402.payment.status"] === "payment-completed"` + `receipts[].success === true` | [§
|
|
51
|
+
| **ACP**. Agentic Commerce Protocol | Stripe / OpenAI; `github.com/agentic-commerce-protocol` | `status === "completed"` + embedded `order` on `/checkout_sessions/{id}/complete`, or `order_create` / `order_update` webhook | [Payments profile §2.1](https://github.com/creatornader/atrib/blob/main/docs/payments-profile.md#21-acp-agentic-commerce-protocol) |
|
|
52
|
+
| **UCP**. Universal Commerce Protocol | `github.com/universal-commerce-protocol/ucp` | Same shape as ACP + top-level `ucp.version` envelope | [Payments profile §2.2](https://github.com/creatornader/atrib/blob/main/docs/payments-profile.md#22-ucp-universal-commerce-protocol) |
|
|
53
|
+
| **x402** | Coinbase. `github.com/coinbase/x402` | HTTP `PAYMENT-RESPONSE` header (v2) or legacy `X-PAYMENT-RESPONSE` (v1) on the 200 response | [Payments profile §2.3](https://github.com/creatornader/atrib/blob/main/docs/payments-profile.md#23-x402) |
|
|
54
|
+
| **MPP**. Machine Payments Protocol | Tempo Labs / Stripe; IETF `draft-ryan-httpauth-payment-01` | HTTP `Payment-Receipt` header on 200 success response | [Payments profile §2.4](https://github.com/creatornader/atrib/blob/main/docs/payments-profile.md#24-mpp-machine-payments-protocol) |
|
|
55
|
+
| **AP2**. Agentic Payment Protocol | Google; `github.com/google-agentic-commerce/AP2` | Successful AP2 `PaymentReceipt` or `CheckoutReceipt`; v0.1 `ap2.mandates.PaymentMandate` remains a fallback | [Payments profile §2.5](https://github.com/creatornader/atrib/blob/main/docs/payments-profile.md#25-ap2-and-a2a-x402) |
|
|
56
|
+
| **a2a-x402** | Google. `github.com/google-agentic-commerce/a2a-x402` | A2A task `status.message.metadata["x402.payment.status"] === "payment-completed"` + `receipts[].success === true` | [Payments profile §2.5](https://github.com/creatornader/atrib/blob/main/docs/payments-profile.md#25-ap2-and-a2a-x402) (reported as AP2 crypto path) |
|
|
57
57
|
|
|
58
58
|
**The linking mechanism is the same across all six:** the session `context_id` (16-byte anchor, equal to the W3C OTel trace-id by default) travels with the outbound payment request; via `X-atrib-Context` HTTP header for protocols that don't expose a free-form metadata field, or via `params._meta.atrib` for any payment protocol running over MCP transport. When the merchant's side sees the payment-completed signal, atrib writes a transaction record with that `context_id`, and the attribution graph can reconstruct the full chain from contributing tool calls → transaction → settlement.
|
|
59
59
|
|
|
@@ -370,12 +370,12 @@ The entire atrib integration is wrapped in defensive error handling at every ada
|
|
|
370
370
|
| [§1.3](https://github.com/creatornader/atrib/blob/main/atrib-spec.md#13-canonical-serialization) | JCS canonical serialization of records |
|
|
371
371
|
| [§1.4](https://github.com/creatornader/atrib/blob/main/atrib-spec.md#14-signing-and-verification) | Ed25519 signing and verification |
|
|
372
372
|
| [§1.5](https://github.com/creatornader/atrib/blob/main/atrib-spec.md#15-context-propagation) | Context propagation via `params._meta` and W3C trace context |
|
|
373
|
-
| [§1.7](https://github.com/creatornader/atrib/blob/main/atrib-spec.md#17-transaction-event-hooks) | Transaction event hooks
|
|
373
|
+
| [§1.7](https://github.com/creatornader/atrib/blob/main/atrib-spec.md#17-transaction-event-hooks) | Transaction event boundary; per-rail hooks live in the [payments profile §2](https://github.com/creatornader/atrib/blob/main/docs/payments-profile.md#2-transaction-detection-hooks) per [D147](https://github.com/creatornader/atrib/blob/main/DECISIONS.md#d147-payments-profile-spin-out-from-protocol-core) |
|
|
374
374
|
| [§2](https://github.com/creatornader/atrib/blob/main/atrib-spec.md#2-merkle-log-protocol) | Merkle log protocol (Tessera-backed, tlog-tiles spec) |
|
|
375
375
|
| [§3](https://github.com/creatornader/atrib/blob/main/atrib-spec.md#3-graph-query-interface) | Graph query interface (fact layer only) |
|
|
376
|
-
| [§4](https://github.com/creatornader/atrib/blob/main/
|
|
376
|
+
| [Payments profile §4](https://github.com/creatornader/atrib/blob/main/docs/payments-profile.md#4-policy-document-format) | Policy format (merchant-side value distribution; relocated from [spec §4](https://github.com/creatornader/atrib/blob/main/atrib-spec.md#4-attribution-policy-format) per [D147](https://github.com/creatornader/atrib/blob/main/DECISIONS.md#d147-payments-profile-spin-out-from-protocol-core)) |
|
|
377
377
|
| [§5.3](https://github.com/creatornader/atrib/blob/main/atrib-spec.md#53-atribmcp-mcp-server-middleware) | Agent-side middleware behavior |
|
|
378
|
-
| [§5.4](https://github.com/creatornader/atrib/blob/main/atrib-spec.md#54-atribagent-agent-middleware) | Path 1 / Path 2 transaction
|
|
378
|
+
| [§5.4](https://github.com/creatornader/atrib/blob/main/atrib-spec.md#54-atribagent-agent-middleware) | Agent middleware; the Path 1 / Path 2 detection contract lives in the [payments profile §3](https://github.com/creatornader/atrib/blob/main/docs/payments-profile.md#3-sdk-transaction-detection) per [D147](https://github.com/creatornader/atrib/blob/main/DECISIONS.md#d147-payments-profile-spin-out-from-protocol-core) |
|
|
379
379
|
| [§5.8](https://github.com/creatornader/atrib/blob/main/atrib-spec.md#58-degradation-contract) | Degradation contract; silent failure never breaks the host |
|
|
380
380
|
|
|
381
381
|
The full protocol spec is at [`atrib-spec.md`](https://github.com/creatornader/atrib/blob/main/atrib-spec.md).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atrib/agent",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@noble/hashes": "^2.2.0",
|
|
42
42
|
"canonicalize": "^3.0.0",
|
|
43
43
|
"@atrib/mcp": "0.21.0",
|
|
44
|
-
"@atrib/verify": "0.
|
|
44
|
+
"@atrib/verify": "0.10.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@types/node": "^25.9.3",
|