@mcp-index/sdk 0.7.0 → 0.8.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.
Files changed (2) hide show
  1. package/README.md +16 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -48,6 +48,22 @@ The verdict is a **contract-diff, not a safety oracle** — it tells you the con
48
48
  *changed* versus your pin, not that the new contract is safe. It does not "block attacks"
49
49
  or "guarantee safe." You decide what a HOLD means for your agent.
50
50
 
51
+ ## Result-content scanning (opt-in, OFF by default)
52
+
53
+ Beyond the contract diff, the SDK can scan a tool's **returned result** (text blocks and
54
+ `structuredContent`) for prompt-injection / exfiltration / credential-path markers — the
55
+ attack where a *compromised result*, not a changed contract, tries to steer your agent. It
56
+ is **off by default** (zero behavior change) and enabled per-wrap:
57
+
58
+ ```ts
59
+ const safe = wrap(session, { scanResults: true, onHold: (v) => { /* … */ } });
60
+ ```
61
+
62
+ Once on, a tainted result is **withheld under `Guard` / `Strict`** and **passes through
63
+ under `Monitor`** (flag-only), mirroring the contract-diff postures; an optional `onHold`
64
+ callback receives the verdict instead of throwing. Added in 0.7.0; parity with the Python
65
+ client's `wrap(..., scan_results=...)`.
66
+
51
67
  ## Drift telemetry (opt-in, OFF by default)
52
68
 
53
69
  The SDK can report **that** a tool's contract drifted — so mcpindex can track drift on servers
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mcp-index/sdk",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "Pre-flight MCP tool-contract drift interceptor — one-line wrap() over an MCP client session that HOLDs a tool call before your agent runs it when the contract drifted from your pin. No credential handling.",
5
5
  "license": "PolyForm-Noncommercial-1.0.0",
6
6
  "author": "Bhartis LLC",