opedd-mcp 0.6.9 → 0.6.10
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.js +12 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -141,8 +141,13 @@ function buildTools(has) {
|
|
|
141
141
|
"License types: 'human' = republication rights, 'ai' = training dataset rights, 'ai_inference' = inference/RAG rights.",
|
|
142
142
|
inputSchema: {
|
|
143
143
|
type: "object",
|
|
144
|
-
required: ["license_type"],
|
|
144
|
+
required: ["license_type", "terms_accepted"],
|
|
145
145
|
properties: {
|
|
146
|
+
terms_accepted: {
|
|
147
|
+
type: "boolean",
|
|
148
|
+
description: "REQUIRED. Set true only after the buyer (your principal) has accepted the Opedd licence terms at opedd.com/terms. " +
|
|
149
|
+
"The acceptance timestamp is recorded with the licence; purchases without genuine acceptance are rejected.",
|
|
150
|
+
},
|
|
146
151
|
article_url: {
|
|
147
152
|
type: "string",
|
|
148
153
|
description: "URL of the article to license (use this OR article_id)",
|
|
@@ -686,6 +691,10 @@ export async function dispatchTool(name, args, creds = ENV_CREDS) {
|
|
|
686
691
|
if (!article_url && !article_id) {
|
|
687
692
|
return err("Either article_url or article_id is required");
|
|
688
693
|
}
|
|
694
|
+
const termsAccepted = args.terms_accepted;
|
|
695
|
+
if (termsAccepted !== true) {
|
|
696
|
+
return err("terms_accepted must be true — confirm with the buyer that they accept the Opedd licence terms (opedd.com/terms) before purchasing.");
|
|
697
|
+
}
|
|
689
698
|
const buyerEmail = argEmail || creds.buyerEmail;
|
|
690
699
|
if (!buyerEmail) {
|
|
691
700
|
return err("buyer_email is required (or set the OPEDD_BUYER_EMAIL env var)");
|
|
@@ -698,6 +707,8 @@ export async function dispatchTool(name, args, creds = ENV_CREDS) {
|
|
|
698
707
|
const body = {
|
|
699
708
|
license_type,
|
|
700
709
|
buyer_email: buyerEmail,
|
|
710
|
+
// Genuine assent moment: the agent asserted terms_accepted=true just now.
|
|
711
|
+
terms_accepted_at: new Date().toISOString(),
|
|
701
712
|
payment: { method: "stripe_pm", payment_method_id: paymentMethodId },
|
|
702
713
|
...(article_id ? { article_id } : { article_url }),
|
|
703
714
|
...(buyer_name ? { buyer_name } : {}),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opedd-mcp",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.10",
|
|
4
4
|
"description": "Licensed, rights-cleared content for AI agents — verifiable license keys, on-chain proof, and EU AI Act attestation. The MCP alternative to unlicensed scraping for RAG and AI search.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|