opedd-mcp 0.6.11 → 0.6.12

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.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { type Tool } from "@modelcontextprotocol/sdk/types.js";
3
+ export declare const CURRENT_MSA_VERSION = "master-services-agreement-2026-07-22b";
3
4
  export interface Credentials {
4
5
  apiBase: string;
5
6
  buyerEmail?: string;
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" },
@@ -794,7 +806,7 @@ export async function dispatchTool(name, args, creds = ENV_CREDS) {
794
806
  }
795
807
  // ── purchase_enterprise_license (Phase 10) ─────────────────────────────
796
808
  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;
809
+ 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
810
  if (!Array.isArray(publisher_ids) || publisher_ids.length === 0) {
799
811
  if (scope === "custom") {
800
812
  return err("publisher_ids array is required for scope='custom'");
@@ -804,6 +816,9 @@ export async function dispatchTool(name, args, creds = ENV_CREDS) {
804
816
  return err("buyer_email is required");
805
817
  if (!buyer_org)
806
818
  return err("buyer_org is required");
819
+ if (terms_accepted !== true) {
820
+ return err("terms_accepted must be true — confirm with the buyer that they accept the Opedd Master Services Agreement (opedd.com/terms) before purchasing.");
821
+ }
807
822
  const body = {
808
823
  publisher_ids: publisher_ids ?? [],
809
824
  buyer_email: pelEmail,
@@ -812,6 +827,12 @@ export async function dispatchTool(name, args, creds = ENV_CREDS) {
812
827
  license_tier,
813
828
  duration_months,
814
829
  scope,
830
+ // Genuine assent moment: the agent asserted terms_accepted=true just
831
+ // now. The backend requires the MSA version label (fail-closed since
832
+ // 2026-07-31) and rejects superseded labels — on an MSA version bump
833
+ // this constant must be updated (new package release) to match
834
+ // opedd-backend _shared/msa-version.ts CURRENT_MSA_VERSION.
835
+ terms_version: CURRENT_MSA_VERSION,
815
836
  ...(filter_rules ? { filter_rules } : {}),
816
837
  ...(buyer_webhook_url ? { buyer_webhook_url } : {}),
817
838
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opedd-mcp",
3
- "version": "0.6.11",
3
+ "version": "0.6.12",
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",