Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Success means the report contains:
}
```

The check reads Coinbase's public x402 Bazaar catalog, confirms all nine canonical Omni routes, and validates the `0.003` Base Sepolia USDC quote. It creates no signature or payment.
The check reads Coinbase's public x402 Bazaar catalog, confirms all nine canonical Omni routes, and validates the current `0.010` Base Sepolia USDC market-risk quote. It creates no signature or payment.

## Five-minute local demo

Expand Down
4 changes: 2 additions & 2 deletions dist/omni.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,14 +262,14 @@ export interface OmniX402Recipe {
label: string;
resourceUrl: string;
schema: string;
priceUsdc: 0.001 | 0.002 | 0.003;
priceUsdc: 0.001 | 0.003 | 0.005 | 0.01;
category: "market_intelligence";
purpose: string;
method?: "GET" | "POST";
headers?: Record<string, string>;
body?: string;
expectedPayment: {
amount: 0.001 | 0.002 | 0.003;
amount: 0.001 | 0.003 | 0.005 | 0.01;
network: typeof OMNI_BASE_SEPOLIA_NETWORK;
asset: typeof OMNI_BASE_SEPOLIA_USDC;
payTo: typeof OMNI_X402_RECEIVER;
Expand Down
2 changes: 1 addition & 1 deletion dist/omni.d.ts.map

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions dist/omni.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export function createOmniX402Recipe(input) {
url.searchParams.set("limit", String(boundedInteger(input.limit ?? 20, 1, 20, "limit")));
label = "Public trader profile";
schema = "trader_profile.v1";
priceUsdc = 0.002;
priceUsdc = 0.005;
purpose = "evaluate_public_trader_profile";
break;
}
Expand All @@ -103,7 +103,7 @@ export function createOmniX402Recipe(input) {
url.searchParams.set("side", input.side);
label = `${symbol} liquidation ${input.view ?? "summary"}`;
schema = "hyperliquid_liquidation_map.v1";
priceUsdc = 0.002;
priceUsdc = 0.005;
purpose = `evaluate_${symbol.toLowerCase()}_liquidation_risk`;
break;
}
Expand All @@ -116,7 +116,7 @@ export function createOmniX402Recipe(input) {
url.searchParams.set("limit", String(boundedInteger(input.limit ?? 10, 1, 20, "limit")));
label = `${symbol} trader ranking: ${rank}`;
schema = "hyperliquid_trader_leaderboard.v1";
priceUsdc = 0.002;
priceUsdc = 0.003;
purpose = `rank_public_${symbol.toLowerCase()}_traders_by_${rank}`;
break;
}
Expand All @@ -128,7 +128,7 @@ export function createOmniX402Recipe(input) {
url.searchParams.set("limit", String(boundedInteger(input.limit ?? 5, 1, 10, "limit")));
label = `${symbol} composite market risk`;
schema = "market_risk_snapshot.v1";
priceUsdc = 0.003;
priceUsdc = 0.01;
purpose = `build_current_${symbol.toLowerCase()}_risk_brief`;
break;
}
Expand All @@ -141,7 +141,7 @@ export function createOmniX402Recipe(input) {
url.searchParams.set("include_liquidations", String(input.includeLiquidations ?? true));
label = `${symbol} market snapshot`;
schema = "hyperliquid_market_snapshot.v1";
priceUsdc = 0.003;
priceUsdc = 0.005;
purpose = `evaluate_${symbol.toLowerCase()}_price_and_liquidation_structure`;
break;
}
Expand Down Expand Up @@ -180,7 +180,7 @@ export function createOmniX402Recipe(input) {
url.pathname += `market-carry/${symbol}`;
label = `${symbol} current market carry`;
schema = "hyperliquid_market_carry.v1";
priceUsdc = 0.001;
priceUsdc = 0.003;
purpose = `evaluate_current_${symbol.toLowerCase()}_market_carry`;
note =
"Current funding annualization is mechanical and is not a forecast or historical series.";
Expand Down
2 changes: 1 addition & 1 deletion dist/partner-check.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export interface DesignPartnerCheckReport {
listedRoutes: number;
canonicalRoutes: string[];
canonicalMarketRisk: {
amountUsdc: 0.003;
amountUsdc: 0.01;
network: "eip155:84532";
asset: string;
payTo: string;
Expand Down
2 changes: 1 addition & 1 deletion dist/partner-check.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions dist/partner-check.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ export async function runDesignPartnerCheck(options = {}) {
const quote = listing.accepts.find((accept) => accept.network === "eip155:84532");
if (!quote)
throw new DesignPartnerCheckError("catalog", "Canonical route has no Base Sepolia quote");
if (quote.amount !== "3000")
throw new DesignPartnerCheckError("catalog", `Expected 3000 atomic USDC; received ${quote.amount}`);
if (quote.amount !== "10000")
throw new DesignPartnerCheckError("catalog", `Expected 10000 atomic USDC; received ${quote.amount}`);
if (quote.asset.toLowerCase() !== BASE_SEPOLIA_USDC.toLowerCase()) {
throw new DesignPartnerCheckError("catalog", "Canonical route uses an unexpected Base Sepolia asset");
}
Expand All @@ -57,7 +57,7 @@ export async function runDesignPartnerCheck(options = {}) {
listedRoutes: resources.length,
canonicalRoutes: [...CANONICAL_OMNI_ROUTES],
canonicalMarketRisk: {
amountUsdc: 0.003,
amountUsdc: 0.01,
network: "eip155:84532",
asset: quote.asset,
payTo: quote.payTo,
Expand Down Expand Up @@ -95,9 +95,9 @@ export async function runDesignPartnerCheck(options = {}) {
deniedScopes: ["wallet.transfer", "trading.execute", "cookies.*"],
spendPolicy: {
currency: "USDC",
perRequestMax: 0.003,
dailyMax: 0.003,
approvalRequiredAbove: 0.003,
perRequestMax: 0.01,
dailyMax: 0.01,
approvalRequiredAbove: 0.01,
},
resourcePolicy: {
allowedDomains: ["omniterminal.app"],
Expand Down Expand Up @@ -127,7 +127,7 @@ export async function runDesignPartnerCheck(options = {}) {
purpose: "external_partner_market_risk_brief",
idempotencyKey: globalThis.crypto.randomUUID(),
expectedPayment: {
amount: 0.003,
amount: 0.01,
network: "eip155:84532",
asset: BASE_SEPOLIA_USDC,
payTo: receiver,
Expand Down
4 changes: 2 additions & 2 deletions docs/design-partner-checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Open `acm-no-spend-report.json`. Success requires:
```

The catalog section should name all nine canonical Omni route templates and show the canonical
`0.003` Base Sepolia USDC market-risk quote. This
current `0.010` Base Sepolia USDC market-risk quote. This
step performs a read-only CDP Bazaar request and creates no signature or payment.

Record the minutes from opening this page to the successful report.
Expand Down Expand Up @@ -75,7 +75,7 @@ The command creates one 15-minute grant restricted to:

- scope `x402.pay`;
- `omniterminal.app` and `market_intelligence`;
- exactly `0.003` USDC on Base Sepolia;
- exactly `0.010` USDC on Base Sepolia;
- the canonical USDC contract and Omni receiver;
- no wallet transfer, trading execution, or cookies.

Expand Down
4 changes: 2 additions & 2 deletions docs/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ npx --yes https://github.com/InTheta/agent-capability-middleware/archive/refs/ta
> acm-no-spend-report.json
```

This installs the pinned preview, reads Coinbase's public x402 Bazaar catalog, verifies all nine canonical Omni route templates and the `0.003` Base Sepolia USDC market-risk quote, then exits without signing or paying.
This installs the pinned preview, reads Coinbase's public x402 Bazaar catalog, verifies all nine canonical Omni route templates and the current `0.010` Base Sepolia USDC market-risk quote, then exits without signing or paying.

Expected fields:

Expand Down Expand Up @@ -52,7 +52,7 @@ unset ACM_API_KEY ACM_CONFIRM_TESTNET_SPEND

If that deployment requires a workload key, enter it separately through the hidden prompt documented in the [external developer checklist](design-partner-checklist.md).

The flow binds one request to its resource, purpose, `0.003` USDC maximum, Base Sepolia network, USDC contract, Omni receiver, grant, and idempotency key. It accepts the result only when paid, receipted, fresh, and schema-matched. It then revokes the grant and proves another settlement cannot occur.
The flow binds one request to its resource, purpose, `0.010` USDC maximum, Base Sepolia network, USDC contract, Omni receiver, grant, and idempotency key. It accepts the result only when paid, receipted, fresh, and schema-matched. It then revokes the grant and proves another settlement cannot occur.

Required paid-report evidence:

Expand Down
12 changes: 6 additions & 6 deletions docs/omni-agent-recipes.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ This command plans requests only. It does not create a grant, sign, or pay.
| Give me the current broad crypto briefing | `hourly_market_briefing` | `/news` | `0.001` USDC |
| What is the current market-wide context only? | `news_context` | `/news` | `0.001` USDC |
| What happened during this exact historical window? | `historical_news` | `/news` or `/news/:symbol` | `0.001` USDC |
| Where are the summary, buckets, clusters, cumulative flow, or nearest liquidation areas? | `liquidations` | `/liquidations/:symbol` | `0.002` USDC |
| Which public wallets are best/worst by PnL, largest by value/size, largest wallets, closest, or most at risk? | `traders` | `/traders/:symbol` | `0.002` USDC |
| What is known about this public wallet, its positions, or balances? | `trader_profile` | `/trader-profile/:address` | `0.002` USDC |
| Give me one joined 15- or 60-minute news and liquidation risk input | `market_risk` | `/market-risk/:symbol` | `0.003` USDC |
| Give me price structure plus liquidation levels | `market_snapshot` | `/market-snapshot/:symbol` | `0.003` USDC |
| Where are the summary, buckets, clusters, cumulative flow, or nearest liquidation areas? | `liquidations` | `/liquidations/:symbol` | `0.005` USDC |
| Which public wallets are best/worst by PnL, largest by value/size, largest wallets, closest, or most at risk? | `traders` | `/traders/:symbol` | `0.003` USDC |
| What is known about this public wallet, its positions, or balances? | `trader_profile` | `/trader-profile/:address` | `0.005` USDC |
| Give me one joined 15- or 60-minute news and liquidation risk input | `market_risk` | `/market-risk/:symbol` | `0.010` USDC |
| Give me price structure plus liquidation levels | `market_snapshot` | `/market-snapshot/:symbol` | `0.005` USDC |
| Resolve current market names or aliases into canonical instruments | `entity_resolution` | `POST /symbols/resolve` | `0.001` USDC |
| Give me current funding, basis, open interest, and carry | `market_carry` | `/market-carry/:symbol` | `0.001` USDC |
| Give me current funding, basis, open interest, and carry | `market_carry` | `/market-carry/:symbol` | `0.003` USDC |

The 60-minute briefing is not a new LLM call. It combines events from the latest 60-minute slice
with the existing market context refreshed every 15 minutes over a 24-hour source window. This
Expand Down
12 changes: 6 additions & 6 deletions docs/x402-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ Omni Terminal currently exposes nine canonical Base Sepolia paid route forms:
|---|---|---:|
| AI News Pulse | `/api/x402/v1/news/{symbol}?limit=5` | `0.001` test USDC |
| Market News Pulse | `/api/x402/v1/news` | `0.001` test USDC |
| Public Trader Profile | `/api/x402/v1/trader-profile/{address}` | `0.002` test USDC |
| Liquidation Map | `/api/x402/v1/liquidations/{symbol}` | `0.002` test USDC |
| Trader Leaderboard | `/api/x402/v1/traders/{symbol}` | `0.002` test USDC |
| Market Risk Snapshot | `/api/x402/v1/market-risk/{symbol}` | `0.003` test USDC |
| Market Snapshot | `/api/x402/v1/market-snapshot/{symbol}` | `0.003` test USDC |
| Public Trader Profile | `/api/x402/v1/trader-profile/{address}` | `0.005` USDC |
| Liquidation Map | `/api/x402/v1/liquidations/{symbol}` | `0.005` USDC |
| Trader Leaderboard | `/api/x402/v1/traders/{symbol}` | `0.003` USDC |
| Market Risk Snapshot | `/api/x402/v1/market-risk/{symbol}` | `0.010` USDC |
| Market Snapshot | `/api/x402/v1/market-snapshot/{symbol}` | `0.005` USDC |
| Market Entity Resolution | `POST /api/x402/v1/symbols/resolve` | `0.001` test USDC |
| Market Carry | `/api/x402/v1/market-carry/{symbol}` | `0.001` test USDC |
| Market Carry | `/api/x402/v1/market-carry/{symbol}` | `0.003` USDC |

Successful Omni responses expose `schema`, `generated_at`, `data_as_of`, and `freshness`. Consumers
using a current route should fail closed unless `freshness.status` is `fresh`; an exact historical
Expand Down
2 changes: 1 addition & 1 deletion examples/omni-catalog.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const grant = await client.createGrant({
userId: process.env.ACM_USER_ID ?? "user_demo",
agentId: agent.id,
scopes: ["x402.pay"],
spendPolicy: { currency: "USDC", perRequestMax: 0.003, dailyMax: 0.05, approvalRequiredAbove: 0.003 },
spendPolicy: { currency: "USDC", perRequestMax: 0.01, dailyMax: 0.05, approvalRequiredAbove: 0.01 },
resourcePolicy: { allowedDomains: [new URL(origin).hostname], allowedCategories: ["market_intelligence"] },
expiresInSeconds: 900,
});
Expand Down
14 changes: 7 additions & 7 deletions examples/omni-x402.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const marketRiskListing = discovery.resources.find((resource) =>
if (!marketRiskListing) throw new Error("Canonical Omni market-risk route is not present in CDP Bazaar");
const marketRiskQuote = marketRiskListing.accepts.find((accept) => accept.network === "eip155:84532");
if (!marketRiskQuote) throw new Error("Canonical Omni market-risk route has no Base Sepolia quote");
if (marketRiskQuote.amount !== "3000") throw new Error(`Expected 3000 atomic USDC, received ${marketRiskQuote.amount}`);
if (marketRiskQuote.amount !== "10000") throw new Error(`Expected 10000 atomic USDC, received ${marketRiskQuote.amount}`);
if (marketRiskQuote.asset.toLowerCase() !== "0x036cbd53842c5426634e7929541ec2318f3dcf7e") {
throw new Error("Canonical Omni market-risk quote uses an unexpected asset");
}
Expand All @@ -34,7 +34,7 @@ console.log(JSON.stringify({
listedRoutes: discovery.resources.length,
canonicalMarketRisk: {
route: marketRiskListing.resource,
amountUsdc: 0.003,
amountUsdc: 0.01,
network: marketRiskQuote.network,
asset: marketRiskQuote.asset,
payTo: marketRiskQuote.payTo,
Expand All @@ -51,7 +51,7 @@ if (process.env.ACM_CONFIRM_TESTNET_SPEND !== "yes") {
source: "cdp_bazaar",
listedRoutes: discovery.resources.length,
canonicalMarketRisk: {
amountUsdc: 0.003,
amountUsdc: 0.01,
network: marketRiskQuote.network,
asset: marketRiskQuote.asset,
payTo: marketRiskQuote.payTo,
Expand Down Expand Up @@ -81,9 +81,9 @@ const grant = await client.createGrant({
scopes: ["x402.pay"],
spendPolicy: {
currency: "USDC",
perRequestMax: 0.003,
perRequestMax: 0.01,
dailyMax: 0.05,
approvalRequiredAbove: 0.003,
approvalRequiredAbove: 0.01,
},
resourcePolicy: {
allowedDomains: [new URL(resourceUrl).hostname],
Expand All @@ -110,7 +110,7 @@ const paymentRequest = {
purpose: "summarize_current_market_intelligence",
idempotencyKey: randomUUID(),
expectedPayment: {
amount: 0.003,
amount: 0.01,
network: "eip155:84532",
asset: "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
payTo: omniReceiver,
Expand Down Expand Up @@ -162,7 +162,7 @@ await writeReport({
},
payment: {
resource: resourceUrl,
amountUsdc: 0.003,
amountUsdc: 0.01,
network: marketRiskQuote.network,
asset: marketRiskQuote.asset,
payTo: marketRiskQuote.payTo,
Expand Down
4 changes: 2 additions & 2 deletions scripts/verify-partner-check.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const listing = {
accepts: [{
scheme: "exact",
network: "eip155:84532",
amount: "3000",
amount: "10000",
asset: "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
payTo: receiver,
}],
Expand All @@ -28,7 +28,7 @@ const noSpend = await runDesignPartnerCheck({
});
assert.equal(noSpend.mode, "no_spend");
assert.deepEqual(noSpend.catalog.canonicalRoutes, CANONICAL_OMNI_ROUTES);
assert.equal(noSpend.catalog.canonicalMarketRisk.amountUsdc, 0.003);
assert.equal(noSpend.catalog.canonicalMarketRisk.amountUsdc, 0.01);
assert.equal(noSpend.secretsIncluded, false);
assert.equal("payment" in noSpend, false);

Expand Down
Loading
Loading