@coreguard/agent-commerce 0.2.1 → 0.4.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/README.md CHANGED
@@ -12,7 +12,7 @@ bytes approved, and for verifying any executed trace against that receipt.
12
12
  - **Fail-closed execution verification** — a consent plus an executed trace
13
13
  yields a verdict with named drift classes (AGR/1 taxonomy); incomplete or
14
14
  ambiguous evidence is never treated as a pass.
15
- - **stdio MCP server** (JSON-RPC 2.0, protocol `2025-06-18`) exposing forty-six tools,
15
+ - **stdio MCP server** (JSON-RPC 2.0, protocol `2025-06-18`) exposing 94 tools,
16
16
  all offline, all deterministic, zero keys.
17
17
 
18
18
  MIT. Node ≥ 18. No network calls, no stored credentials, no wall clock.
@@ -349,7 +349,7 @@ License: MIT.
349
349
 
350
350
  ## Release readiness / MCPRush evidence
351
351
 
352
- - **Release notes:** `docs/releases/0.2.1.md` (latest) · `docs/releases/0.2.0.md`
352
+ - **Release notes:** `docs/releases/0.3.0.md` (latest) · `docs/releases/0.2.1.md`
353
353
  - **Publish readiness checklist:** `docs/releases/0.1.3-publish-readiness.md`
354
354
  - **Security & threat model:** `docs/agent-commerce-mcp-security.md`
355
355
  - **Client compatibility matrix + run log:** `docs/agent-commerce-mcp-compatibility.md`
File without changes
package/mcp.mjs CHANGED
@@ -7,7 +7,7 @@
7
7
  * (one JSON object per line, both directions) — the same shape MCP clients
8
8
  * speak for stdio servers.
9
9
  *
10
- * Tools (all offline/self-hosted, deterministic, zero network keys): 10 core consent/verification tools + 10 Wave 1 Machine Economy tools + 6 Wave 2 CGCP/1 mapping tools (intent/receipt/limits/revoke/audit) + 20 Wave 3 tools (policy reasoning, MCP supply-chain audit, evidence, operations, interop) = 46 total. Optional trust roots enable Ed25519 signature verification for telemetry/delegation; no custody, no broadcast, no network calls; external settlement/physical truth/device identity beyond supplied key material NOT proven.
10
+ * Tools (all offline/self-hosted, deterministic, zero network keys): 10 core consent/verification tools + 10 Wave 1 Machine Economy tools + 6 Wave 2 CGCP/1 mapping tools (intent/receipt/limits/revoke/audit) + 20 Wave 3 tools (policy reasoning, MCP supply-chain audit, evidence, operations, interop) + 24 Wave 4 tools (cross-border/bank/chain/machine/loan evidence) + 24 Wave 5 tools (authority, KYC/AML, reconciliation, chain evidence, machine economy, evidence packs) = 94 total. Optional trust roots enable Ed25519 signature verification for telemetry/delegation; no custody, no broadcast, no network calls; external settlement/physical truth/device identity beyond supplied key material NOT proven.
11
11
  *
12
12
  * BOUNDARIES (standing): synthetic demo data is the caller's; nothing here
13
13
  * contacts any platform or payment network (no contact/integration/endorsement
@@ -58,6 +58,8 @@ import {
58
58
  } from "./machine-economy.mjs";
59
59
  import { createIntent, issueReceipt, verifyReceipt as verifyCgcpReceipt, checkLimits, revokeConsent, auditTransaction, CGCP_MCP_BOUNDARY } from "./cgcp-mcp-tools.mjs";
60
60
  import { WAVE3_TOOLS, WAVE3_HANDLERS, WAVE3_VALIDATORS, WAVE3_BOUNDARY } from "./wave3.mjs";
61
+ import { WAVE4_TOOLS, WAVE4_HANDLERS, WAVE4_VALIDATORS, WAVE4_BOUNDARY } from "./wave4.mjs";
62
+ import { WAVE5_TOOLS, WAVE5_HANDLERS, WAVE5_VALIDATORS, WAVE5_BOUNDARY } from "./wave5.mjs";
61
63
 
62
64
  const PROTOCOL_VERSION = "2025-06-18";
63
65
 
@@ -127,6 +129,56 @@ const TOOL_NAMES = Object.freeze([
127
129
  "coreguard_translate_receipt",
128
130
  "coreguard_emit_test_vectors",
129
131
  "coreguard_describe_surface",
132
+ // Wave 4 (CG-W4/1) — cross-border/bank/chain/machine/loan evidence tools. Offline, caller-supplied evidence only.
133
+ "coreguard_parse_iso20022_payment",
134
+ "coreguard_verify_cross_border_instruction",
135
+ "coreguard_assess_fx_quote_risk",
136
+ "coreguard_verify_swift_remittance_evidence",
137
+ "coreguard_verify_bank_transfer_evidence",
138
+ "coreguard_assess_sanctions_screening_evidence",
139
+ "coreguard_verify_invoice_match",
140
+ "coreguard_generate_payment_compliance_packet",
141
+ "coreguard_verify_stellar_settlement_evidence",
142
+ "coreguard_verify_evm_settlement_evidence",
143
+ "coreguard_verify_coredao_settlement_evidence",
144
+ "coreguard_verify_pi_payment_evidence",
145
+ "coreguard_assess_bridge_risk",
146
+ "coreguard_assess_defi_position_risk",
147
+ "coreguard_verify_web3_signature_evidence",
148
+ "coreguard_verify_stablecoin_reserve_evidence",
149
+ "coreguard_create_robot_mission_receipt",
150
+ "coreguard_verify_robot_mission_evidence",
151
+ "coreguard_assess_machine_sla",
152
+ "coreguard_assess_loan_application",
153
+ "coreguard_verify_collateral_packet",
154
+ "coreguard_assess_credit_line_utilization",
155
+ "coreguard_verify_escrow_milestone",
156
+ "coreguard_create_incident_war_room",
157
+ // Wave 5 (CG-W5/1) — authority, KYC/AML, reconciliation, chain evidence and machine economy. Offline, caller-supplied evidence only.
158
+ "coreguard_canonicalize_payment_instruction",
159
+ "coreguard_verify_payment_authorization_chain",
160
+ "coreguard_verify_kyc_evidence",
161
+ "coreguard_verify_ubo_evidence",
162
+ "coreguard_verify_travel_rule_packet",
163
+ "coreguard_verify_aml_alert_disposition",
164
+ "coreguard_verify_sanctions_list_version",
165
+ "coreguard_verify_fx_rate_lock",
166
+ "coreguard_reconcile_multi_ledger",
167
+ "coreguard_verify_camt054_notification",
168
+ "coreguard_verify_mt103_fields",
169
+ "coreguard_verify_beneficiary_change",
170
+ "coreguard_verify_stellar_path_payment",
171
+ "coreguard_verify_evm_permit_evidence",
172
+ "coreguard_verify_coredao_delegation_evidence",
173
+ "coreguard_verify_pi_attestation_chain",
174
+ "coreguard_verify_erc4337_userop_evidence",
175
+ "coreguard_verify_token_approval_revocation",
176
+ "coreguard_create_machine_budget_lease",
177
+ "coreguard_verify_machine_budget_consumption",
178
+ "coreguard_verify_robot_handoff_chain",
179
+ "coreguard_verify_agent_authority_intersection",
180
+ "coreguard_create_inference_receipt",
181
+ "coreguard_export_evidence_pack",
130
182
  ]);
131
183
 
132
184
  /**
@@ -181,6 +233,8 @@ function requireString(args, key) {
181
233
  /** Per-tool input validation. Returns null when the arguments are usable. */
182
234
  const VALIDATORS = Object.freeze({
183
235
  ...WAVE3_VALIDATORS,
236
+ ...WAVE4_VALIDATORS,
237
+ ...WAVE5_VALIDATORS,
184
238
  coreguard_authorize(args) {
185
239
  const missing = requireObjects(args, ["intent", "policy", "declaredTrace"]);
186
240
  if (missing) return missing;
@@ -685,6 +739,8 @@ const TOOLS = Object.freeze([
685
739
  outputSchema: { type: "object", description: "CGCP/1 audit report with chain status and optional filters.", properties: { type: { type: "string" }, spec: { type: "string" }, report: { type: "object" }, mapping: { type: "string" }, boundary: { type: "string" }, callerContext: { type: "object" } }, additionalProperties: true },
686
740
  },
687
741
  ...WAVE3_TOOLS,
742
+ ...WAVE4_TOOLS,
743
+ ...WAVE5_TOOLS,
688
744
  ]);
689
745
 
690
746
  function withCallerContext(value, args) {
@@ -776,6 +832,14 @@ async function callTool(name, args, { consumedSet } = {}) {
776
832
  const ctx = { toolNames: TOOL_NAMES, version: PACKAGE.version, serverName: SERVER_INFO.name, protocolVersion: PROTOCOL_VERSION };
777
833
  return success(withCallerContext(WAVE3_HANDLERS[name](a, ctx), a));
778
834
  }
835
+ if (WAVE4_HANDLERS[name]) {
836
+ const ctx = { toolNames: TOOL_NAMES, version: PACKAGE.version, serverName: SERVER_INFO.name, protocolVersion: PROTOCOL_VERSION };
837
+ return success(withCallerContext(WAVE4_HANDLERS[name](a, ctx), a));
838
+ }
839
+ if (WAVE5_HANDLERS[name]) {
840
+ const ctx = { toolNames: TOOL_NAMES, version: PACKAGE.version, serverName: SERVER_INFO.name, protocolVersion: PROTOCOL_VERSION };
841
+ return success(withCallerContext(WAVE5_HANDLERS[name](a, ctx), a));
842
+ }
779
843
  return failure(ERROR_CODES.UNKNOWN_TOOL, `unknown tool: ${String(name)}`);
780
844
  } catch (err) {
781
845
  return failure(ERROR_CODES.TOOL_ERROR, err?.message ?? String(err));
@@ -840,8 +904,12 @@ export function createMcpHandler({ write } = {}) {
840
904
 
841
905
  export function selfCheck() {
842
906
  return [
843
- ["tools exposed", TOOL_NAMES.length === 46 && TOOL_NAMES[0] === "coreguard_authorize" && TOOL_NAMES[9] === "coreguard_consumption_status" && TOOL_NAMES[19] === "coreguard_verify_delegation_chain" && TOOL_NAMES[25] === "coreguard_audit_transaction" && TOOL_NAMES[45] === "coreguard_describe_surface"],
907
+ ["tools exposed", TOOL_NAMES.length === 94 && TOOL_NAMES[0] === "coreguard_authorize" && TOOL_NAMES[9] === "coreguard_consumption_status" && TOOL_NAMES[19] === "coreguard_verify_delegation_chain" && TOOL_NAMES[25] === "coreguard_audit_transaction" && TOOL_NAMES[45] === "coreguard_describe_surface" && TOOL_NAMES[69] === "coreguard_create_incident_war_room" && TOOL_NAMES[93] === "coreguard_export_evidence_pack"],
844
908
  ["wave 3 declares schemas for every tool", WAVE3_TOOLS.length === 20 && WAVE3_TOOLS.every((t) => t.name.startsWith("coreguard_") && t.inputSchema?.required?.length > 0 && t.outputSchema?.type === "object" && WAVE3_HANDLERS[t.name])],
909
+ ["wave 4 declares schemas for every tool", WAVE4_TOOLS.length === 24 && WAVE4_TOOLS.every((t) => t.name.startsWith("coreguard_") && t.inputSchema && t.outputSchema?.type === "object" && WAVE4_HANDLERS[t.name])],
910
+ ["wave 4 boundary travels", WAVE4_BOUNDARY.includes("VERIFIED ≠ SAFE")],
911
+ ["wave 5 declares schemas for every tool", WAVE5_TOOLS.length === 24 && WAVE5_TOOLS.every((t) => t.name.startsWith("coreguard_") && t.inputSchema?.required?.length > 0 && t.outputSchema?.type === "object" && WAVE5_HANDLERS[t.name])],
912
+ ["wave 5 boundary travels", WAVE5_BOUNDARY.includes("VERIFIED ≠ SAFE") && WAVE5_BOUNDARY.includes("no settlement finality")],
845
913
  ["wave 3 boundary travels", WAVE3_BOUNDARY.includes("VERIFIED ≠ SAFE")],
846
914
  ["protocol version pinned", PROTOCOL_VERSION === "2025-06-18"],
847
915
  ["spec surfaced", CONSENT_SPEC === "CGCR/1" && AGENT_COMMERCE_VERSION === "AC-SDK/1"],
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@coreguard/agent-commerce",
3
- "version": "0.2.1",
4
- "description": "CoreGuard Agent Commerce: consent receipts (CGCR/1) and fail-closed execution verification (AGR/1) for agentic purchases — SDK, REST surface, and a stdio MCP server (46 tools, JSON-RPC 2.0, offline, zero keys)",
3
+ "version": "0.4.0",
4
+ "description": "CoreGuard Agent Commerce: consent receipts (CGCR/1) and fail-closed execution verification (AGR/1) for agentic purchases — SDK, REST surface, and a stdio MCP server (94 tools, JSON-RPC 2.0, offline, zero keys)",
5
5
  "type": "module",
6
6
  "main": "./index.mjs",
7
7
  "exports": {
@@ -36,17 +36,21 @@
36
36
  "./prod/observability.mjs": "./prod/observability.mjs",
37
37
  "./prod/kms-anchor.mjs": "./prod/kms-anchor.mjs",
38
38
  "./machine-economy.mjs": "./machine-economy.mjs",
39
- "./cgcp-mcp-tools.mjs": "./cgcp-mcp-tools.mjs"
39
+ "./cgcp-mcp-tools.mjs": "./cgcp-mcp-tools.mjs",
40
+ "./wave4.mjs": "./wave4.mjs",
41
+ "./wave5.mjs": "./wave5.mjs"
40
42
  },
41
43
  "bin": {
42
44
  "coreguard-agent-commerce-mcp": "./bin/mcp.mjs",
43
45
  "coreguard-trust-card": "./bin/trust-card.mjs"
44
46
  },
45
47
  "files": [
48
+ "README.md",
46
49
  "aer1.mjs",
47
50
  "anchor.mjs",
48
51
  "attest.mjs",
49
52
  "bin/mcp.mjs",
53
+ "bin/trust-card.mjs",
50
54
  "cgcp-mcp-tools.mjs",
51
55
  "client.mjs",
52
56
  "composition.mjs",
@@ -73,17 +77,17 @@
73
77
  "prod/schema.mjs",
74
78
  "prod/sqlite-storage.mjs",
75
79
  "profile-ref.mjs",
76
- "README.md",
77
80
  "reference.mjs",
78
81
  "risk-cli.mjs",
79
82
  "risk.mjs",
80
83
  "server.json",
81
84
  "spend.mjs",
82
- "trust.mjs",
83
85
  "trust-card-cli.mjs",
84
86
  "trust-card.mjs",
85
- "bin/trust-card.mjs",
86
- "wave3.mjs"
87
+ "trust.mjs",
88
+ "wave3.mjs",
89
+ "wave4.mjs",
90
+ "wave5.mjs"
87
91
  ],
88
92
  "engines": {
89
93
  "node": ">=18"
package/server.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
3
  "name": "io.github.EslaM-X/coreguard-agent-commerce",
4
- "description": "Fail-closed consent receipts and execution verification for agentic purchases. 46 MCP tools.",
4
+ "description": "Fail-closed consent receipts and execution verification for agentic purchases. 94 MCP tools.",
5
5
  "repository": {
6
6
  "url": "https://github.com/coreguard-global/CoreGuard",
7
7
  "source": "github"
8
8
  },
9
- "version": "0.2.1",
9
+ "version": "0.4.0",
10
10
  "packages": [
11
11
  {
12
12
  "registryType": "npm",
13
13
  "identifier": "@coreguard/agent-commerce",
14
- "version": "0.2.1",
14
+ "version": "0.4.0",
15
15
  "transport": {
16
16
  "type": "stdio"
17
17
  }