@astrasyncai/verification-gateway 4.5.0 → 4.5.1

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 (75) hide show
  1. package/dist/adapters/express.js +1 -1
  2. package/dist/adapters/express.js.map +1 -1
  3. package/dist/adapters/express.mjs +1 -1
  4. package/dist/adapters/express.mjs.map +1 -1
  5. package/dist/adapters/mcp.d.mts +3 -394
  6. package/dist/adapters/mcp.d.ts +3 -394
  7. package/dist/adapters/mcp.js +1 -1
  8. package/dist/adapters/mcp.js.map +1 -1
  9. package/dist/adapters/mcp.mjs +1 -1
  10. package/dist/adapters/mcp.mjs.map +1 -1
  11. package/dist/adapters/nextjs.js +1 -1
  12. package/dist/adapters/nextjs.js.map +1 -1
  13. package/dist/adapters/nextjs.mjs +1 -1
  14. package/dist/adapters/nextjs.mjs.map +1 -1
  15. package/dist/adapters/sdk.js +1 -1
  16. package/dist/adapters/sdk.js.map +1 -1
  17. package/dist/adapters/sdk.mjs +1 -1
  18. package/dist/adapters/sdk.mjs.map +1 -1
  19. package/dist/agent/index.js +1 -1
  20. package/dist/agent/index.js.map +1 -1
  21. package/dist/agent/index.mjs +1 -1
  22. package/dist/agent/index.mjs.map +1 -1
  23. package/dist/bin/astrasync-claude-hook.js +1 -1
  24. package/dist/bin/astrasync-codex-hook.js +1 -1
  25. package/dist/bin/astrasync-guard.js +1 -1
  26. package/dist/bin/astrasync.js +2 -1
  27. package/dist/browser/background.js +1 -1
  28. package/dist/browser/background.js.map +1 -1
  29. package/dist/browser/background.mjs +1 -1
  30. package/dist/browser/background.mjs.map +1 -1
  31. package/dist/cli/index.js +1 -1
  32. package/dist/cli/index.js.map +1 -1
  33. package/dist/cli/index.mjs +1 -1
  34. package/dist/cli/index.mjs.map +1 -1
  35. package/dist/codex/index.js +1 -1
  36. package/dist/codex/index.js.map +1 -1
  37. package/dist/codex/index.mjs +1 -1
  38. package/dist/codex/index.mjs.map +1 -1
  39. package/dist/cursor/extension.js +1 -1
  40. package/dist/cursor/extension.js.map +1 -1
  41. package/dist/cursor/extension.mjs +1 -1
  42. package/dist/cursor/extension.mjs.map +1 -1
  43. package/dist/edge-config.js +1 -1
  44. package/dist/edge-config.js.map +1 -1
  45. package/dist/edge-config.mjs +1 -1
  46. package/dist/edge-config.mjs.map +1 -1
  47. package/dist/edge-core/index.js +1 -1
  48. package/dist/edge-core/index.js.map +1 -1
  49. package/dist/edge-core/index.mjs +1 -1
  50. package/dist/edge-core/index.mjs.map +1 -1
  51. package/dist/gateway/gateway.js +1 -1
  52. package/dist/gateway/gateway.js.map +1 -1
  53. package/dist/gateway/gateway.mjs +1 -1
  54. package/dist/gateway/gateway.mjs.map +1 -1
  55. package/dist/index.d.mts +3 -3
  56. package/dist/index.d.ts +3 -3
  57. package/dist/index.js +12 -1
  58. package/dist/index.js.map +1 -1
  59. package/dist/index.mjs +7 -1
  60. package/dist/index.mjs.map +1 -1
  61. package/dist/mcp--DgKOwfu.d.ts +396 -0
  62. package/dist/mcp-BgBJu4Jl.d.mts +396 -0
  63. package/dist/registration/index.js +2 -1
  64. package/dist/registration/index.js.map +1 -1
  65. package/dist/registration/index.mjs +2 -1
  66. package/dist/registration/index.mjs.map +1 -1
  67. package/dist/transport/index.js +1 -1
  68. package/dist/transport/index.js.map +1 -1
  69. package/dist/transport/index.mjs +1 -1
  70. package/dist/transport/index.mjs.map +1 -1
  71. package/dist/verify.js +1 -1
  72. package/dist/verify.js.map +1 -1
  73. package/dist/verify.mjs +1 -1
  74. package/dist/verify.mjs.map +1 -1
  75. package/package.json +1 -1
@@ -1,395 +1,4 @@
1
- import { Request, Response, RequestHandler } from 'express';
2
- import { a as AccessLevel, G as GatewayConfig, x as VerificationResult } from '../types-C0zfSXMB.mjs';
1
+ import 'express';
2
+ import '../types-C0zfSXMB.mjs';
3
+ export { M as MCP_VERIFIED_HOP_HEADER, b as McpMiddlewareOptions, P as ParsedMcpRequest, T as ToolGateConfig, c as createMcpMiddleware, i as isVerifiedHopValidFor, m as mcpRiskTier, d as mcpToPdlss, p as parseMcpJsonRpc, e as parseVerifiedHop, s as serializeVerifiedHop } from '../mcp-BgBJu4Jl.mjs';
3
4
  import '../metadata-capture.mjs';
4
-
5
- /**
6
- * X-Astra-Verified-Hop — cross-hop verify-access dedupe marker.
7
- *
8
- * Header carrying upstream verify-access proof so an inner-hop endpoint can
9
- * dedupe (skip verify-access when the same ASTRA-id was already verified a
10
- * few ms earlier). Emitted by the MCP adapter toward tool fetches and by the
11
- * edge gateway toward the origin at authenticate/authorize depth. Value
12
- * format:
13
- *
14
- * {astraId};{sessionId};{checkedAt-ms}
15
- *
16
- * Receivers MUST validate that `checkedAt` is recent (≤ 60s window
17
- * recommended) and that `astraId` matches the agent identity claimed on the
18
- * inner hop. The header alone is NOT proof-of-identity — it's an UNSIGNED
19
- * dedupe advisory: trust it (`trustVerifiedHop`) only where every network
20
- * path to the inner hop crosses a stripping gateway or an equivalent trusted
21
- * boundary, exactly like the unsigned X-AstraSync-* attestation headers.
22
- * Pair with the existing X-Astra-Id auth.
23
- */
24
- declare const MCP_VERIFIED_HOP_HEADER = "X-Astra-Verified-Hop";
25
- interface VerifiedHopMarker {
26
- astraId: string;
27
- sessionId?: string;
28
- checkedAt: number;
29
- }
30
- declare function serializeVerifiedHop(marker: VerifiedHopMarker): string;
31
- declare function parseVerifiedHop(value: string | undefined | null): VerifiedHopMarker | null;
32
- /**
33
- * Returns true when `marker.astraId` matches the inner-hop's claimed
34
- * ASTRA-id AND the marker is recent enough. Inner-hop middleware uses this
35
- * to skip a duplicate verify-access call.
36
- */
37
- declare function isVerifiedHopValidFor(marker: VerifiedHopMarker | null, expectedAstraId: string, opts?: {
38
- maxAgeMs?: number;
39
- now?: number;
40
- }): boolean;
41
-
42
- /**
43
- * MCP server-side helpers — companion to `transport/mcp.ts` (which handles the
44
- * agent-side `_meta.astrasync` block).
45
- *
46
- * Surfaces a body-aware policy hook the existing `createMiddleware` couldn't
47
- * provide — MCP traffic is JSON-RPC over a single endpoint (`/mcp`), so the
48
- * default route-pattern gating is too coarse: every request looks the same
49
- * URL-wise, but `initialize` is low-risk handshake while `tools/call` of a
50
- * payment tool is high-risk. Cohort-3 beta merchants flagged this 🟡 in the
51
- * v2.9.5 round.
52
- *
53
- * What lives here:
54
- * - `parseMcpJsonRpc(body)` — peels JSON-RPC method + tool name + agent
55
- * id without committing to a particular MCP
56
- * server framework.
57
- * - `mcpToPdlss(parsed)` — canonical mapping JSON-RPC method → PDLSS
58
- * purpose / action / resource. Doc-stable
59
- * so audits can correlate.
60
- * - `mcpRiskTier(parsed)` — recommended `minAccessLevel` per method
61
- * so a single MCP middleware can split
62
- * `initialize` / `tools/list` (low gate)
63
- * from `tools/call` (high gate).
64
- * - `MCP_VERIFIED_HOP_HEADER` — header convention for the dedupe pattern
65
- * when an MCP tool calls an inner REST hop.
66
- * - `serialize/parseVerifiedHop` helpers.
67
- *
68
- * The Express MCP adapter is in `adapters/mcp.ts` and consumes these.
69
- */
70
-
71
- /**
72
- * Output of `parseMcpJsonRpc`. Self-describing so the middleware doesn't have
73
- * to re-introspect the body to figure out gating.
74
- */
75
- interface ParsedMcpRequest {
76
- /** JSON-RPC method (e.g. `tools/call`, `initialize`, `tools/list`). */
77
- method: string;
78
- /** Set when method === 'tools/call'; the tool name from `params.name`. */
79
- toolName?: string;
80
- /** Initialize-specific protocolVersion handshake info, when present. */
81
- protocolVersion?: string;
82
- /**
83
- * Agent id read from the body, in priority order:
84
- * 1. `params._meta.astrasync.agentId` (the canonical SDK location, see
85
- * `transport/mcp.ts → setMcpMeta`)
86
- * 2. `params.arguments.agent_id` (legacy / hand-written tool callers)
87
- * Header-supplied id (X-Astra-Id) is read separately by the adapter and
88
- * compared to this for the mismatch check.
89
- */
90
- agentIdFromBody?: string;
91
- /**
92
- * Purpose extracted from the MCP body
93
- * with the symmetric precedence chain. Sourced from `_meta.astrasync.purpose`
94
- * (canonical SDK location) OR `params.arguments.purpose` (legacy /
95
- * conventional callers). The discriminator is on `purposeSourceFromBody`.
96
- * Adapter combines this with the `X-Astra-Purpose` header (header wins)
97
- * before mapping; final fallback at `mcpToPdlss` is `undefined`.
98
- */
99
- purposeFromBody?: string;
100
- /** Which body location resolved `purposeFromBody`. */
101
- purposeSourceFromBody?: 'meta' | 'tool_argument';
102
- /**
103
- * Action extracted from the MCP body with the same
104
- * symmetric chain as purpose. Sourced from `_meta.astrasync.action`
105
- * (canonical) OR `params.arguments.action` (legacy). Adapter combines
106
- * with the `X-Astra-Action` header (header wins) before mapping; final
107
- * fallback at `mcpToPdlss` is the transport-layer default
108
- * (`tools/call:<toolname>` or just `<method>`).
109
- */
110
- actionFromBody?: string;
111
- /** Which body location resolved `actionFromBody`. */
112
- actionSourceFromBody?: 'meta' | 'tool_argument';
113
- /** True for handshake methods that must succeed before any tool call. */
114
- isInitialize: boolean;
115
- /** True for `tools/call`. */
116
- isToolCall: boolean;
117
- /** True for low-risk introspection (`tools/list`, `prompts/list`, etc.). */
118
- isIntrospection: boolean;
119
- }
120
- /**
121
- * Peel the JSON-RPC envelope. Returns `null` if the body isn't a JSON-RPC
122
- * request (callers can short-circuit with a 400 or treat as untyped traffic).
123
- *
124
- * Accepts both single-request and notification shapes. Batch requests are
125
- * NOT supported here — the verify-access contract is single-agent-per-call;
126
- * a batch body should be split before policy gating.
127
- */
128
- declare function parseMcpJsonRpc(body: unknown): ParsedMcpRequest | null;
129
- /**
130
- * PDLSS mapping for an MCP request. The platform's PDLSS taxonomy is
131
- * `purpose / action / resource`; for MCP traffic the audit-useful dimensions
132
- * are the JSON-RPC method and (for `tools/call`) the tool name.
133
- *
134
- * v2.5.0 rules:
135
- * - `resource` defaults to the HTTP request path (e.g. `/mcp`). Per-tool
136
- * overrides via `toolGates` config let merchants map tools to specific
137
- * backend resources (e.g. `/api/catalog`).
138
- * - `purpose` defaults to `undefined` (backend evaluator applies
139
- * skip-when-undefined). Per-tool overrides via `toolGates` config let
140
- * merchants declare the semantic purpose each tool fulfils.
141
- * - `action` comes only from declarations (toolGate config, header, or
142
- * body). For `tools/call` with none declared it is `undefined` —
143
- * evaluation is purpose-only, because a raw tool name is a transport
144
- * token, not a PDLSS action, and sending it as one guarantees an
145
- * action-policy mismatch. For other JSON-RPC methods the method string
146
- * is used.
147
- */
148
- interface McpPdlssMapping {
149
- purpose: string | undefined;
150
- /**
151
- * `undefined` when a `tools/call` request declared no action anywhere —
152
- * the verify-access call then evaluates purpose-only. Tool names never
153
- * travel as PDLSS actions.
154
- */
155
- action: string | undefined;
156
- resource: string;
157
- purposeSource: 'header' | 'meta' | 'tool_argument' | 'tool_gate' | undefined;
158
- actionSource: 'header' | 'meta' | 'tool_argument' | 'tool_gate' | 'transport_layer' | undefined;
159
- }
160
- /**
161
- * v2.5.0 — PDLSS field derivation for MCP requests.
162
- *
163
- * Purpose precedence:
164
- * - If `toolGate.purpose` is provided, it is authoritative (header/body ignored).
165
- * - Otherwise: header → body `_meta` → body `arguments` → `undefined`.
166
- *
167
- * Resource precedence:
168
- * - `toolGate.resource` if provided, else `requestPath`.
169
- *
170
- * Action precedence (3.1.0 — toolGate override added for
171
- * symmetry with purpose; 4.1.0 — the bare-tool-name fallback for
172
- * `tools/call` was removed):
173
- * - `toolGate.action` authoritative → header → body `_meta` → body
174
- * `arguments` → then: `undefined` for `tools/call` (purpose-only
175
- * evaluation — tool names are transport tokens, never PDLSS actions),
176
- * or the JSON-RPC method string for other methods (transport_layer).
177
- *
178
- * @param requestPath The HTTP request path (e.g. '/mcp'). Required.
179
- * @param toolGate Resolved per-tool config from `toolGates`, if present.
180
- */
181
- declare function mcpToPdlss(parsed: ParsedMcpRequest, requestPath: string, headerPurpose?: string, headerAction?: string, toolGate?: {
182
- purpose?: string;
183
- action?: string;
184
- resource?: string;
185
- }): McpPdlssMapping;
186
- /**
187
- * Recommended minimum access level per method type. The MCP middleware uses
188
- * this to split low-risk handshake / introspection traffic from high-risk
189
- * tool execution.
190
- *
191
- * - `initialize` / `notifications/initialized` → `none` (handshake must work for unregistered probes)
192
- * - `tools/list` / `prompts/list` / `resources/list` → `none` (introspection is public-surface)
193
- * - `ping` → `none`
194
- * - `resources/read` → `read-only`
195
- * - `tools/call` → `standard` (default — overridable per-tool)
196
- * - everything else → `standard` (least-privilege fallback)
197
- */
198
- declare function mcpRiskTier(parsed: ParsedMcpRequest): AccessLevel;
199
-
200
- /**
201
- * AstraSync Universal Verification Gateway — MCP middleware
202
- *
203
- * Express-shaped middleware tailored to the JSON-RPC body of an MCP
204
- * (Model Context Protocol) endpoint. Closes the cohort-3 gaps the default
205
- * `createMiddleware` couldn't:
206
- *
207
- * (a) **Body-aware gating**. All MCP traffic targets the same `/mcp` URL.
208
- * The default route-pattern matcher can't tell `initialize` (low risk)
209
- * from `tools/call start_checkout` (high risk). This middleware peels
210
- * the JSON-RPC body and applies a per-method risk tier.
211
- *
212
- * (b) **PDLSS mapping**. Derives purpose, action, and resource from
213
- * `toolGates` config and request context. See `transport/mcp-server.ts`
214
- * `mcpToPdlss()` for the exact mapping.
215
- *
216
- * (c) **Inner-hop dedupe**. Outbound responses set
217
- * `X-Astra-Verified-Hop` so a downstream REST endpoint that the tool
218
- * calls can skip a duplicate verify-access. The receiving REST
219
- * middleware checks `parseVerifiedHop` and skips when valid.
220
- *
221
- * (d) **Header-vs-body identity precedence**. Reads ASTRA-id from
222
- * `X-Astra-Id` first, body second. If both are present and disagree,
223
- * returns a structured 400 by default (configurable). Pre-fix,
224
- * integrators had to re-discover this on their own.
225
- *
226
- * Usage:
227
- *
228
- * ```typescript
229
- * import express from 'express';
230
- * import { createMcpMiddleware } from '@astrasyncai/verification-gateway/mcp';
231
- *
232
- * const app = express();
233
- * app.use(express.json());
234
- *
235
- * app.post(
236
- * '/mcp',
237
- * createMcpMiddleware({
238
- * apiBaseUrl: 'https://astrasync.ai/api',
239
- * apiKey: process.env.ASTRASYNC_API_KEY,
240
- * // Per-tool gates — tools not listed get the default tier from
241
- * // `mcpRiskTier` (`tools/call` → 'standard'). Use the object form:
242
- * // gated tools need a PDLSS purpose (and ideally an action).
243
- * toolGates: {
244
- * browse_catalog: { minAccessLevel: 'read-only', purpose: 'shopping' },
245
- * start_checkout: {
246
- * minAccessLevel: 'standard',
247
- * purpose: 'shopping',
248
- * action: 'shopping.purchase',
249
- * },
250
- * },
251
- * }),
252
- * yourMcpServerHandler,
253
- * );
254
- * ```
255
- */
256
-
257
- declare global {
258
- namespace Express {
259
- interface Request {
260
- mcpRequest?: ParsedMcpRequest;
261
- }
262
- }
263
- }
264
- /**
265
- * Extended per-tool gate with optional PDLSS purpose + action + resource
266
- * overrides.
267
- *
268
- * When `purpose` is set, it is authoritative for that tool — the agent's
269
- * `X-Astra-Purpose` header is ignored. This lets the merchant declare what
270
- * semantic purpose each tool fulfils rather than trusting agent self-declaration.
271
- *
272
- * When `action` is set (symmetric with `purpose`), it is
273
- * authoritative over `X-Astra-Action` / body declarations, letting the
274
- * merchant pin a dotted-verb action (e.g. `shopping.search`) for a tool
275
- * whose callers would otherwise leave the action undeclared (purpose-only
276
- * evaluation — raw tool names never travel as PDLSS actions).
277
- *
278
- * When `resource` is set, it overrides the default (`req.path`) for that
279
- * tool's verify-access call — e.g. mapping `list_products` to `/api/catalog`.
280
- */
281
- interface ToolGateConfig {
282
- minAccessLevel: AccessLevel;
283
- purpose?: string;
284
- action?: string;
285
- resource?: string;
286
- }
287
- interface McpMiddlewareOptions extends GatewayConfig {
288
- /**
289
- * Per-tool gating for `tools/call` invocations. Tools not listed inherit
290
- * the default tier from `mcpRiskTier` (`tools/call` → `'standard'`).
291
- *
292
- * Use the **object form** — it lets the merchant declare the PDLSS
293
- * `purpose` (required for any gated tool: the backend rejects gated calls
294
- * with no resolvable purpose) and pin a dotted-verb `action`:
295
- * ```typescript
296
- * toolGates: {
297
- * list_products: { minAccessLevel: 'read-only',
298
- * purpose: 'shopping',
299
- * action: 'shopping.search',
300
- * resource: '/api/catalog' },
301
- * start_checkout: { minAccessLevel: 'standard',
302
- * purpose: 'shopping',
303
- * action: 'shopping.purchase',
304
- * resource: '/api/checkout/*' },
305
- * }
306
- * ```
307
- *
308
- * The bare access-level string shorthand (`browse_catalog: 'read-only'`)
309
- * is a legacy form and a known footgun: it carries no purpose, so the call
310
- * only succeeds when the AGENT declares one (an `X-Astra-Purpose` header
311
- * or `params._meta.astrasync.purpose`) — otherwise it fails fast with a
312
- * `PDLSS_PURPOSE_REQUIRED` 400. It also declares no action, so evaluation
313
- * is purpose-only (the SDK never sends the raw tool name as the PDLSS
314
- * action). `createMcpMiddleware` logs a warning at construction for every
315
- * bare-string gate.
316
- *
317
- * When `tools/call` arrives for a tool not declared in `toolGates`, the SDK
318
- * falls back to a risk-tier default based on the method classification
319
- * (`mcpRiskTier`). For `tools/call` the fallback is `'standard'`. Best
320
- * practice: declare every tool you expose explicitly.
321
- *
322
- * The action axis for non-tools/call MCP methods (`tools/list`,
323
- * `resources/list`, `prompts/list`, etc.) is the literal JSON-RPC method
324
- * name (e.g. `'tools/list'`). Merchants gating MCP traffic by action should
325
- * declare per-tool gates in `toolGates`, not endpoint-level `allowedActions`
326
- * — the latter applies to REST-style action values, not MCP method strings.
327
- */
328
- toolGates?: Record<string, AccessLevel | ToolGateConfig>;
329
- /**
330
- * Per-method override (e.g. tighten `tools/list` to `'read-only'` if you
331
- * don't want unregistered probes seeing your tool catalogue). Matches by
332
- * exact JSON-RPC method string.
333
- */
334
- methodGates?: Record<string, AccessLevel>;
335
- /**
336
- * What to do when the agent id supplied in the X-Astra-Id header
337
- * disagrees with the agent id in the JSON-RPC body
338
- * (`params._meta.astrasync.agentId` or `params.arguments.agent_id`).
339
- *
340
- * - `'reject'` (default) — return 400 `AGENT_ID_MISMATCH`. Safest.
341
- * - `'prefer-header'` — log + verify against the header value. Keeps
342
- * bodies that were authored before X-Astra-Id was the canonical
343
- * identity slot working.
344
- * - `'prefer-body'` — log + verify against the body value. Useful in
345
- * reverse-proxy setups that strip auth headers.
346
- */
347
- onAgentIdMismatch?: 'reject' | 'prefer-header' | 'prefer-body';
348
- /** Skip verification + dedupe entirely. For testing. */
349
- skip?: boolean;
350
- /** Custom denied handler. Defaults to a structured JSON-RPC error response. */
351
- onDenied?: (result: VerificationResult, req: Request, res: Response) => void;
352
- /**
353
- * If `true`, trust an inbound `X-Astra-Verified-Hop` header to skip
354
- * verify-access when it carries a recent marker for the resolved agent.
355
- *
356
- * **DEFAULT FLIPPED TO `false` in SDK 2.4.13.** The marker
357
- * is plaintext semicolon-delimited with no HMAC, so any client that sets
358
- * the header (with the right format + fresh timestamp + matching ASTRA-id)
359
- * skipped verify-access entirely. The per-process verify-access result
360
- * cache already dedupes legitimate repeat calls — this optimization
361
- * provided no additional savings, only a bypass surface.
362
- *
363
- * Set this to `true` ONLY if you control every upstream MCP hop that sets
364
- * the header AND you trust the network path between hops (mTLS, internal
365
- * VPC, etc.). For most installs, leave at the safe default.
366
- *
367
- * A future SDK release will either remove this option entirely OR add
368
- * HMAC signing to the marker.
369
- */
370
- trustVerifiedHop?: boolean;
371
- /** Window for accepting an upstream verified-hop marker. Default 60_000ms. */
372
- verifiedHopMaxAgeMs?: number;
373
- /**
374
- * Automatically record grant/deny decisions for every MCP call. Default
375
- * `true` — matches the express adapter.
376
- */
377
- recordDecisions?: boolean;
378
- /** Forward runtime challenge (default `true`). */
379
- enableRuntimeChallenge?: boolean;
380
- /**
381
- * Posture when the MCP middleware itself throws an internal error.
382
- * Default `'open'` for backward compatibility in SDK 2.4.13. Shadow logs
383
- * record what WOULD be denied with `failOnError: 'closed'` so merchants
384
- * can grep correlationId for impact analysis during the observation
385
- * window. Default flips to `'closed'` in a follow-up release.
386
- */
387
- failOnError?: 'open' | 'closed';
388
- }
389
- /**
390
- * Create the MCP middleware. Attach AFTER `express.json()` — the body must
391
- * already be a parsed object.
392
- */
393
- declare function createMcpMiddleware(options: McpMiddlewareOptions): RequestHandler;
394
-
395
- export { MCP_VERIFIED_HOP_HEADER, type McpMiddlewareOptions, type ParsedMcpRequest, type ToolGateConfig, createMcpMiddleware, isVerifiedHopValidFor, mcpRiskTier, mcpToPdlss, parseMcpJsonRpc, parseVerifiedHop, serializeVerifiedHop };