opedd-mcp 0.6.11 → 0.6.13
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 +5 -5
- package/dist/index.d.ts +1 -0
- package/dist/index.js +29 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -89,11 +89,11 @@ Exposes up to 17 tools to any AI assistant (some are conditional on env vars):
|
|
|
89
89
|
| Tool | Description |
|
|
90
90
|
|------|-------------|
|
|
91
91
|
| `lookup_content` | Look up an article by URL — returns title, publisher, pricing |
|
|
92
|
-
| `purchase_license` | Buy a single-article license via Stripe — returns OP-XXXX-XXXX key |
|
|
92
|
+
| `purchase_license` | Buy a single-article license via Stripe — returns OP-XXXX-XXXX key. Requires `terms_accepted: true` (genuine buyer assent to opedd.com/terms; recorded with the licence) |
|
|
93
93
|
| `verify_license` | Verify a license key — returns validity, article, publisher, blockchain proof |
|
|
94
94
|
| `browse_registry` | Browse the public Opedd registry — lists issued LICENSES (use `publisher_directory` to browse publishers themselves) |
|
|
95
95
|
| `publisher_directory` | Browse the public Opedd publisher catalog — paginated publishers with article counts + pricing + sample articles (primary buyer-discovery surface for AI labs) |
|
|
96
|
-
| `purchase_enterprise_license` | Buy a bulk enterprise license covering multiple publishers (Phase 10) — returns Stripe `client_secret` |
|
|
96
|
+
| `purchase_enterprise_license` | Buy a bulk enterprise license covering multiple publishers (Phase 10) — returns Stripe `client_secret`. Requires `terms_accepted: true`; the current Master Services Agreement version label is recorded with the licence (the backend rejects superseded labels) |
|
|
97
97
|
| `rsl_get` | Fetch a publisher's RSL Standard manifest — public discovery surface; `jsonld: true` returns CDSM Article 4(3) signed receipt (Phase 12 W1.1) |
|
|
98
98
|
| `detect_platform` | Detect the content platform behind a URL — returns suggested onboarding workflow for Substack / Beehiiv / Ghost / Medium / Brevo / custom (Phase 12 W3.1) |
|
|
99
99
|
|
|
@@ -107,8 +107,8 @@ Exposes up to 17 tools to any AI assistant (some are conditional on env vars):
|
|
|
107
107
|
|
|
108
108
|
| Tool | Description |
|
|
109
109
|
|------|-------------|
|
|
110
|
-
| `list_feed` | List articles from a buyer's licensed catalog with `since` delta-feed support (Phase 11 M5) |
|
|
111
|
-
| `stream_feed_ndjson` | Bulk-export up to 1000 articles per call via NDJSON wire format (Phase 11 M3) |
|
|
110
|
+
| `list_feed` | List articles from a buyer's licensed catalog with `since` delta-feed support (Phase 11 M5). Flat-fee scopes carry full `content_body`; metered (filtered-scope) keys get a discovery-only feed (`content_body: null`, `content_access: "metered_per_call"`) — fetch text via `get_content` (billed per call) |
|
|
111
|
+
| `stream_feed_ndjson` | Bulk-export up to 1000 articles per call via NDJSON wire format (Phase 11 M3). Same per-scope content contract as `list_feed` — metered keys export metadata only |
|
|
112
112
|
|
|
113
113
|
**Requires `OPEDD_BUYER_JWT` (Supabase JWT) — buyer account + audit + compliance + EU AI Act surfaces**
|
|
114
114
|
|
|
@@ -266,7 +266,7 @@ npm run build # compiles to dist/
|
|
|
266
266
|
| | Opedd | Generic search APIs |
|
|
267
267
|
|---|---|---|
|
|
268
268
|
| **What you get** | Licensed content + license key + on-chain proof — all in one API call | Scraped web content, no rights |
|
|
269
|
-
| **Content delivery** | Full article text
|
|
269
|
+
| **Content delivery** | Full article text via API (JSON) — bulk on flat-fee licenses, per-call (metered) on filtered licenses; real-time feed via webhooks | Scraped snippets or full-page dumps |
|
|
270
270
|
| **Content quality** | Curated publisher content (niche B2B newsletters, expert analysis) | Whatever's on the open web |
|
|
271
271
|
| **Rights** | Verifiable license key per article, publisher-authorized | No rights clearance |
|
|
272
272
|
| **Proof** | On-chain (Tempo blockchain) — independently verifiable | None |
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -5,6 +5,12 @@ import { CallToolRequestSchema, ListToolsRequestSchema, } from "@modelcontextpro
|
|
|
5
5
|
import { pathToFileURL } from "node:url";
|
|
6
6
|
import { initTelemetry, captureToolCall, shutdownTelemetry } from "./telemetry.js";
|
|
7
7
|
import { SERVER_VERSION } from "./version.js";
|
|
8
|
+
// ─── Configuration ────────────────────────────────────────────────────────────
|
|
9
|
+
// Current Opedd Master Services Agreement version label. MUST match
|
|
10
|
+
// opedd-backend supabase/functions/_shared/msa-version.ts CURRENT_MSA_VERSION
|
|
11
|
+
// (the backend rejects superseded labels). On an MSA version bump, update this
|
|
12
|
+
// constant and cut a new package release.
|
|
13
|
+
export const CURRENT_MSA_VERSION = "master-services-agreement-2026-07-22b";
|
|
8
14
|
export function envCredentials() {
|
|
9
15
|
return {
|
|
10
16
|
apiBase: process.env.OPEDD_API_URL ?? "https://api.opedd.com",
|
|
@@ -322,11 +328,17 @@ function buildTools(has) {
|
|
|
322
328
|
"Returns a Stripe client_secret for payment completion + the enterprise_license_id. " +
|
|
323
329
|
"After payment, an ent_* access key is emailed to buyer_email. " +
|
|
324
330
|
"Scopes: 'custom' (pass-through publisher_ids), 'platform_wide' (auto-resolve all opted-in publishers), 'filtered' (Phase 10 filter_rules). " +
|
|
325
|
-
"License tiers: 'rag' (= ai_retrieval), 'training' (= ai_training, flat-fee not metered), 'inference' (= ai_retrieval), 'full_ai' (writes both retrieval + training records)."
|
|
331
|
+
"License tiers: 'rag' (= ai_retrieval), 'training' (= ai_training, flat-fee not metered), 'inference' (= ai_retrieval), 'full_ai' (writes both retrieval + training records). " +
|
|
332
|
+
"The buyer must accept the Opedd Master Services Agreement (opedd.com/terms) before purchase — set terms_accepted=true to record it.",
|
|
326
333
|
inputSchema: {
|
|
327
334
|
type: "object",
|
|
328
|
-
required: ["publisher_ids", "buyer_email", "buyer_org"],
|
|
335
|
+
required: ["publisher_ids", "buyer_email", "buyer_org", "terms_accepted"],
|
|
329
336
|
properties: {
|
|
337
|
+
terms_accepted: {
|
|
338
|
+
type: "boolean",
|
|
339
|
+
description: "REQUIRED. Set true only after the buyer (your principal) has accepted the Opedd Master Services Agreement at opedd.com/terms. " +
|
|
340
|
+
"The current MSA version label is recorded with the licence; purchases without genuine acceptance are rejected (HTTP 400).",
|
|
341
|
+
},
|
|
330
342
|
publisher_ids: {
|
|
331
343
|
type: "array",
|
|
332
344
|
items: { type: "string" },
|
|
@@ -403,6 +415,9 @@ function buildTools(has) {
|
|
|
403
415
|
TOOLS.push({
|
|
404
416
|
name: "list_feed",
|
|
405
417
|
description: "List articles from a buyer's licensed catalog via GET /enterprise-license (Phase 10 + 11). " +
|
|
418
|
+
"Content contract: flat-fee scopes (custom/platform_wide) include full content_body; METERED " +
|
|
419
|
+
"(filtered-scope) keys get a discovery-only feed — content_body is null and content_access is " +
|
|
420
|
+
"'metered_per_call'; fetch article text via get_content (each retrieval is billed). " +
|
|
406
421
|
"Returns JSON-format response with paginated articles. " +
|
|
407
422
|
"Use `since` (ISO 8601) for delta-feed polling — only articles published after the timestamp. " +
|
|
408
423
|
"Use `cursor` for pagination across pages. " +
|
|
@@ -430,6 +445,8 @@ function buildTools(has) {
|
|
|
430
445
|
name: "stream_feed_ndjson",
|
|
431
446
|
description: "Bulk-export a buyer's licensed catalog via GET /enterprise-license?format=ndjson (Phase 11 M3). " +
|
|
432
447
|
"Returns up to 1000 articles per call (collected from line-delimited JSON wire format). " +
|
|
448
|
+
"Same per-scope content contract as list_feed: METERED (filtered-scope) keys export metadata only " +
|
|
449
|
+
"(content_body null, content_access 'metered_per_call') — use get_content for article text. " +
|
|
433
450
|
"Each article emits one usage_records row (analytics-only sentinel 'bulk-export:<request_id>:<article_id>' — not metered-billable per the revenue-model bifurcation invariant). " +
|
|
434
451
|
"Use `since` (ISO 8601) for delta-feed. Use `cursor` to paginate beyond 1000. " +
|
|
435
452
|
"Backend supports 5000 articles per call; the MCP cap is 1000 for transport reasonability. " +
|
|
@@ -794,7 +811,7 @@ export async function dispatchTool(name, args, creds = ENV_CREDS) {
|
|
|
794
811
|
}
|
|
795
812
|
// ── purchase_enterprise_license (Phase 10) ─────────────────────────────
|
|
796
813
|
case "purchase_enterprise_license": {
|
|
797
|
-
const { publisher_ids, buyer_email: pelEmail, buyer_org, billing_type = "annual", license_tier = "rag", duration_months = 12, scope = "custom", filter_rules, buyer_webhook_url, } = args;
|
|
814
|
+
const { publisher_ids, buyer_email: pelEmail, buyer_org, billing_type = "annual", license_tier = "rag", duration_months = 12, scope = "custom", filter_rules, buyer_webhook_url, terms_accepted, } = args;
|
|
798
815
|
if (!Array.isArray(publisher_ids) || publisher_ids.length === 0) {
|
|
799
816
|
if (scope === "custom") {
|
|
800
817
|
return err("publisher_ids array is required for scope='custom'");
|
|
@@ -804,6 +821,9 @@ export async function dispatchTool(name, args, creds = ENV_CREDS) {
|
|
|
804
821
|
return err("buyer_email is required");
|
|
805
822
|
if (!buyer_org)
|
|
806
823
|
return err("buyer_org is required");
|
|
824
|
+
if (terms_accepted !== true) {
|
|
825
|
+
return err("terms_accepted must be true — confirm with the buyer that they accept the Opedd Master Services Agreement (opedd.com/terms) before purchasing.");
|
|
826
|
+
}
|
|
807
827
|
const body = {
|
|
808
828
|
publisher_ids: publisher_ids ?? [],
|
|
809
829
|
buyer_email: pelEmail,
|
|
@@ -812,6 +832,12 @@ export async function dispatchTool(name, args, creds = ENV_CREDS) {
|
|
|
812
832
|
license_tier,
|
|
813
833
|
duration_months,
|
|
814
834
|
scope,
|
|
835
|
+
// Genuine assent moment: the agent asserted terms_accepted=true just
|
|
836
|
+
// now. The backend requires the MSA version label (fail-closed since
|
|
837
|
+
// 2026-07-31) and rejects superseded labels — on an MSA version bump
|
|
838
|
+
// this constant must be updated (new package release) to match
|
|
839
|
+
// opedd-backend _shared/msa-version.ts CURRENT_MSA_VERSION.
|
|
840
|
+
terms_version: CURRENT_MSA_VERSION,
|
|
815
841
|
...(filter_rules ? { filter_rules } : {}),
|
|
816
842
|
...(buyer_webhook_url ? { buyer_webhook_url } : {}),
|
|
817
843
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opedd-mcp",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.13",
|
|
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",
|