plugin-x402-endpoints 0.2.0 → 0.3.0
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/dist/index.cjs +191 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +11 -150
- package/dist/index.js +191 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/index.d.cts +0 -150
package/dist/index.cjs
CHANGED
|
@@ -1939,6 +1939,190 @@ var catalog_default = {
|
|
|
1939
1939
|
}
|
|
1940
1940
|
}
|
|
1941
1941
|
}
|
|
1942
|
+
},
|
|
1943
|
+
{
|
|
1944
|
+
tool: "agent_due_diligence",
|
|
1945
|
+
action: "X402_AGENT_DUE_DILIGENCE",
|
|
1946
|
+
path: "/agent/due-diligence",
|
|
1947
|
+
method: "POST",
|
|
1948
|
+
price: "$0.50",
|
|
1949
|
+
description: "Vet any company, crypto project, counterparty or domain before engaging: one call composes a risk DOSSIER \u2014 synthesis + detected signals + sources + 0-100 risk score + GO/CAUTION/STOP verdict + recommendation + a signed, offline-verifiable receipt. Is this entity a scam, fraud, sanctioned, or safe to deal with? Replaces 3-4 manual web searches plus the synthesis an agent would have to do itself, composed from live public web signals. Counterparty / vendor / project due-diligence for agents. Price: $0.50 per call (x402 payment, USDC on Base mainnet).",
|
|
1950
|
+
llm_usage_prompt: "Composed risk dossier on any entity/project/counterparty/domain: summary + signals + sources + 0-100 score + GO/CAUTION/STOP verdict + signed receipt. One call replaces 3-4 lookups. Input: target.",
|
|
1951
|
+
tags: [
|
|
1952
|
+
"due-diligence",
|
|
1953
|
+
"kyb",
|
|
1954
|
+
"counterparty-risk",
|
|
1955
|
+
"risk-dossier",
|
|
1956
|
+
"agent-decision"
|
|
1957
|
+
],
|
|
1958
|
+
inputSchema: {
|
|
1959
|
+
type: "object",
|
|
1960
|
+
properties: {
|
|
1961
|
+
target: {
|
|
1962
|
+
type: "string",
|
|
1963
|
+
description: "Entity / project / counterparty / domain to vet, e.g. 'Acme DeFi Labs'"
|
|
1964
|
+
},
|
|
1965
|
+
target_type: {
|
|
1966
|
+
type: "string",
|
|
1967
|
+
description: "Optional: entity | project | counterparty | domain | wallet"
|
|
1968
|
+
},
|
|
1969
|
+
context: {
|
|
1970
|
+
type: "string",
|
|
1971
|
+
description: "Optional: why you're engaging / what you're about to do"
|
|
1972
|
+
}
|
|
1973
|
+
},
|
|
1974
|
+
required: [
|
|
1975
|
+
"target"
|
|
1976
|
+
]
|
|
1977
|
+
}
|
|
1978
|
+
},
|
|
1979
|
+
{
|
|
1980
|
+
tool: "agent_analysis_report",
|
|
1981
|
+
action: "X402_AGENT_ANALYSIS_REPORT",
|
|
1982
|
+
path: "/agent/analysis-report",
|
|
1983
|
+
method: "POST",
|
|
1984
|
+
price: "$0.25",
|
|
1985
|
+
description: "Structured analysis report on any URL, company, product or subject in one call: positioning + strengths + risks + opportunities + 0-100 actionable score + STRONG/MODERATE/WEAK rating + recommendation + provenance + a signed receipt. A fixed-schema research report an agent can consume without re-parsing, composed from live public web signals. Competitive / investment / partnership analysis for agents. Price: $0.25 per call (x402 payment, USDC on Base mainnet).",
|
|
1986
|
+
llm_usage_prompt: "Fixed-schema analysis report on a URL/company/subject: positioning + strengths + risks + opportunities + 0-100 score + STRONG/MODERATE/WEAK + signed receipt. Input: input (+ optional focus).",
|
|
1987
|
+
tags: [
|
|
1988
|
+
"analysis-report",
|
|
1989
|
+
"market-analysis",
|
|
1990
|
+
"competitive",
|
|
1991
|
+
"research",
|
|
1992
|
+
"agent-decision"
|
|
1993
|
+
],
|
|
1994
|
+
inputSchema: {
|
|
1995
|
+
type: "object",
|
|
1996
|
+
properties: {
|
|
1997
|
+
input: {
|
|
1998
|
+
type: "string",
|
|
1999
|
+
description: "URL, company, product or subject, e.g. 'stripe.com'"
|
|
2000
|
+
},
|
|
2001
|
+
focus: {
|
|
2002
|
+
type: "string",
|
|
2003
|
+
description: "Optional: investment | competitive | partnership | security | general"
|
|
2004
|
+
}
|
|
2005
|
+
},
|
|
2006
|
+
required: [
|
|
2007
|
+
"input"
|
|
2008
|
+
]
|
|
2009
|
+
}
|
|
2010
|
+
},
|
|
2011
|
+
{
|
|
2012
|
+
tool: "agent_clearance",
|
|
2013
|
+
action: "X402_AGENT_CLEARANCE",
|
|
2014
|
+
path: "/agent/clearance",
|
|
2015
|
+
method: "POST",
|
|
2016
|
+
price: "$0.25",
|
|
2017
|
+
description: "Safety preflight before an agent runs a DESTRUCTIVE, costly or IRREVERSIBLE action (delete, deploy, transfer funds, publish, overwrite): risk assessment + reversibility check + timing + CLEAR/LIMIT/REVIEW/BLOCK verdict + a cryptographically SIGNED ClearancePacket (decision, approved amount, policy version, evidence hash, expiry, rationale) the agent keeps as proof of authorization. Should I run this action, or stop and ask a human? Stops a mistake far costlier than the call price. Agent action guardrail / clearance / human-in-the-loop gate. Price: $0.25 per call (x402 payment, USDC on Base mainnet).",
|
|
2018
|
+
llm_usage_prompt: "Preflight clearance before a destructive/costly/irreversible agent action: risk + reversibility + timing + CLEAR/LIMIT/REVIEW/BLOCK + a signed Ed25519 ClearancePacket. Input: action (+ action_type, amount_usd).",
|
|
2019
|
+
tags: [
|
|
2020
|
+
"preflight",
|
|
2021
|
+
"action-clearance",
|
|
2022
|
+
"reversibility",
|
|
2023
|
+
"agent-safety",
|
|
2024
|
+
"guardrail"
|
|
2025
|
+
],
|
|
2026
|
+
inputSchema: {
|
|
2027
|
+
type: "object",
|
|
2028
|
+
properties: {
|
|
2029
|
+
action: {
|
|
2030
|
+
type: "string",
|
|
2031
|
+
description: "Action about to run, e.g. 'delete the production users table'"
|
|
2032
|
+
},
|
|
2033
|
+
action_type: {
|
|
2034
|
+
type: "string",
|
|
2035
|
+
description: "Optional: delete|deploy|send|spend|transfer|publish|email|overwrite|approve|rotate|shutdown|other"
|
|
2036
|
+
},
|
|
2037
|
+
amount_usd: {
|
|
2038
|
+
type: "number",
|
|
2039
|
+
description: "Monetary stake in USD if applicable, e.g. 250"
|
|
2040
|
+
},
|
|
2041
|
+
reversible: {
|
|
2042
|
+
type: "boolean",
|
|
2043
|
+
description: "Optional caller hint: is the action reversible?"
|
|
2044
|
+
},
|
|
2045
|
+
target: {
|
|
2046
|
+
type: "string",
|
|
2047
|
+
description: "Optional target (table, address, repo, recipient)"
|
|
2048
|
+
},
|
|
2049
|
+
context: {
|
|
2050
|
+
type: "string",
|
|
2051
|
+
description: "Optional extra context (environment, prior approval)"
|
|
2052
|
+
}
|
|
2053
|
+
},
|
|
2054
|
+
required: [
|
|
2055
|
+
"action"
|
|
2056
|
+
]
|
|
2057
|
+
}
|
|
2058
|
+
},
|
|
2059
|
+
{
|
|
2060
|
+
tool: "agent_output_qa",
|
|
2061
|
+
action: "X402_AGENT_OUTPUT_QA",
|
|
2062
|
+
path: "/agent/output-qa",
|
|
2063
|
+
method: "POST",
|
|
2064
|
+
price: "$0.10",
|
|
2065
|
+
description: "Review and improve an agent's outbound text (email, social post, customer reply) before sending: a multi-criteria scorecard (clarity, spam-safety, tone, length, personalization, CTA, compliance \u2014 each 0-100) + poor/fair/good/excellent rating + top suggestions + a ready-to-send IMPROVED REWRITE. Will this message land or get flagged as spam? One call scores and rewrites. Output review / spam check / copy QA for agents. Price: $0.10 per call (x402 payment, USDC on Base mainnet).",
|
|
2066
|
+
llm_usage_prompt: "Score an agent's outbound text on 7 criteria (clarity, spam-safety, tone, length, personalization, CTA, compliance) + rating + suggestions + improved rewrite. Input: output (+ format, goal).",
|
|
2067
|
+
tags: [
|
|
2068
|
+
"output-qa",
|
|
2069
|
+
"email-review",
|
|
2070
|
+
"content-scoring",
|
|
2071
|
+
"rewrite",
|
|
2072
|
+
"agent-decision"
|
|
2073
|
+
],
|
|
2074
|
+
inputSchema: {
|
|
2075
|
+
type: "object",
|
|
2076
|
+
properties: {
|
|
2077
|
+
output: {
|
|
2078
|
+
type: "string",
|
|
2079
|
+
description: "The agent's outbound text to review (email, post, reply)"
|
|
2080
|
+
},
|
|
2081
|
+
format: {
|
|
2082
|
+
type: "string",
|
|
2083
|
+
description: "Optional: email | social_post | customer_reply | other"
|
|
2084
|
+
},
|
|
2085
|
+
goal: {
|
|
2086
|
+
type: "string",
|
|
2087
|
+
description: "Optional intended goal, e.g. 'book a demo'"
|
|
2088
|
+
}
|
|
2089
|
+
},
|
|
2090
|
+
required: [
|
|
2091
|
+
"output"
|
|
2092
|
+
]
|
|
2093
|
+
}
|
|
2094
|
+
},
|
|
2095
|
+
{
|
|
2096
|
+
tool: "agent_content_scan",
|
|
2097
|
+
action: "X402_AGENT_CONTENT_SCAN",
|
|
2098
|
+
path: "/agent/content-scan",
|
|
2099
|
+
method: "POST",
|
|
2100
|
+
price: "$0.10",
|
|
2101
|
+
description: "Scan any external content before an agent INGESTS it (SKILL.md, web page, user input, tool output) for prompt-injection, data exfiltration, dangerous code execution, hidden/invisible unicode and instruction overrides: 0-100 risk score + SAFE/WARN/BLOCK verdict + structured findings with matched evidence. Is it safe to feed this content to my agent? A fast, cheap, deterministic, high-volume pre-ingest firewall. Prompt-injection / skill-audit / untrusted-content security check for agents. Price: $0.10 per call (x402 payment, USDC on Base mainnet).",
|
|
2102
|
+
llm_usage_prompt: "Deterministic pre-ingest scan for prompt-injection, exfiltration, dangerous exec, hidden unicode and instruction overrides: 0-100 risk score + SAFE/WARN/BLOCK + structured findings. Input: content.",
|
|
2103
|
+
tags: [
|
|
2104
|
+
"content-scan",
|
|
2105
|
+
"prompt-injection",
|
|
2106
|
+
"exfiltration",
|
|
2107
|
+
"agent-security",
|
|
2108
|
+
"safe-ingest"
|
|
2109
|
+
],
|
|
2110
|
+
inputSchema: {
|
|
2111
|
+
type: "object",
|
|
2112
|
+
properties: {
|
|
2113
|
+
content: {
|
|
2114
|
+
type: "string",
|
|
2115
|
+
description: "Raw content to scan before ingestion (SKILL.md, web page, user input, tool output)"
|
|
2116
|
+
},
|
|
2117
|
+
source_type: {
|
|
2118
|
+
type: "string",
|
|
2119
|
+
description: "Optional: skill | webpage | user_input | tool_output | document"
|
|
2120
|
+
}
|
|
2121
|
+
},
|
|
2122
|
+
required: [
|
|
2123
|
+
"content"
|
|
2124
|
+
]
|
|
2125
|
+
}
|
|
1942
2126
|
}
|
|
1943
2127
|
]
|
|
1944
2128
|
};
|
|
@@ -2038,12 +2222,15 @@ async function readBody(resp) {
|
|
|
2038
2222
|
}
|
|
2039
2223
|
}
|
|
2040
2224
|
async function callEndpoint(ep, params, cfg) {
|
|
2041
|
-
const
|
|
2042
|
-
const
|
|
2225
|
+
const method = (ep.method || "GET").toUpperCase();
|
|
2226
|
+
const isPost = method === "POST";
|
|
2227
|
+
const url = isPost ? `${cfg.baseUrl}${ep.path}` : buildUrl(cfg.baseUrl, ep.path, params);
|
|
2228
|
+
const headers = isPost ? { accept: "application/json", "content-type": "application/json" } : { accept: "application/json" };
|
|
2229
|
+
const reqInit = isPost ? { method, headers, body: JSON.stringify(params || {}) } : { method, headers };
|
|
2043
2230
|
const paidFetch = await getPaidFetch(cfg).catch(() => null);
|
|
2044
2231
|
if (paidFetch) {
|
|
2045
2232
|
try {
|
|
2046
|
-
const resp2 = await paidFetch(url,
|
|
2233
|
+
const resp2 = await paidFetch(url, reqInit);
|
|
2047
2234
|
const body2 = await readBody(resp2);
|
|
2048
2235
|
if (resp2.status === 200) return { kind: "data", status: 200, data: body2 };
|
|
2049
2236
|
if (resp2.status === 402) {
|
|
@@ -2061,7 +2248,7 @@ async function callEndpoint(ep, params, cfg) {
|
|
|
2061
2248
|
}
|
|
2062
2249
|
let resp;
|
|
2063
2250
|
try {
|
|
2064
|
-
resp = await fetch(url,
|
|
2251
|
+
resp = await fetch(url, reqInit);
|
|
2065
2252
|
} catch (err) {
|
|
2066
2253
|
return { kind: "error", message: "request failed", detail: `${err?.name}: ${err?.message}` };
|
|
2067
2254
|
}
|