Scan your whole stack
From OX Research Newsroom
Are you using @lensmcp/protocol-types?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v1.26.31
@lensmcp/protocol-types was last scanned on 24 Nov 2026 at version 1.26.31. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 1.26.31 LATEST | 24 Nov 2026 | No rules fired |
| 1.26.30 | 24 Nov 2026 | No rules fired |
| 1.26.29 | 24 Nov 2026 | No rules fired |
| 1.26.28 | 24 Nov 2026 | Not shown |
| 1.26.27 | 23 Nov 2026 | Not shown |
Findings for v1.26.31. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 1.26.31; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
The shared event protocol for LensMCP — Zod schemas and inferred TypeScript types for the events, trace nodes, edges, and resources that flow between producers and consumers.
LensMCP is an observability lens for coding agents. This package is the wire contract that keeps every part of the system in sync: a single set of Zod schemas (and the TypeScript types inferred from them) describing the events emitted by instrumentation, the trace graph (nodes + edges) those events build up, the per-domain attribute shapes, and the MCP resources consumers read.
Because the schemas and types are derived from the same definitions, producers (browser/React, Node/Nest taps, the gateway) and consumers (@lensmcp/core, the MCP server, the dashboard) share one source of truth — emit-side validation and read-side typing never drift apart.
yarn add @lensmcp/protocol-types
Requires Node >=18. zod is a runtime dependency.
Validate an event on the producer side, and type it on the consumer side, from the same schema:
import {
BaseEventSchema,
type BaseEvent,
type EventSource,
} from '@lensmcp/protocol-types';
// Producer: parse/validate before emitting (throws on bad shape).
const event = BaseEventSchema.parse({
id: 'evt_01',
sessionId: 'sess_abc',
timestamp: Date.now(),
source: 'react',
category: 'render',
severity: 'warning',
context: { sessionId: 'sess_abc', route: '/dashboard' },
fingerprint: 'render:Slow:/dashboard',
title: 'Slow render',
});
// Consumer: the inferred type is the contract.
function handle(e: BaseEvent) {
const from: EventSource = e.source;
console.log(from, e.category, e.severity);
}
Use .safeParse() when you want to branch on validity instead of throwing:
const result = BaseEventSchema.safeParse(input);
if (!result.success) {
// result.error is a ZodError
}
Every schema follows the XxxSchema (value) + Xxx (inferred type) naming convention, so you can import whichever you need.
event.ts)BaseEventSchema / BaseEvent — the common envelope on every emitted event: id, sessionId, timestamp, source, category, severity, context, fingerprint, title, plus optional message, location, relatedFiles, relatedUrls, and raw.EventSourceSchema / EventSource — where the event came from:
nx, vite, typescript, eslint, rollup, client-runtime, chrome, react, valtio, nestjs, nextjs, db, redis, queue, memory, visual, perf, security, gateway, external.EventCategorySchema / EventCategory — what kind of signal it is:
build, lint, typecheck, test, runtime, render, visual, trace, state, network, backend, db, memory, performance, security, deps, cluster.SeveritySchema / Severity — debug, info, warning, error, fatal.context.ts)TraceContextSchema / TraceContext — the correlation envelope carried on events and nodes: sessionId plus optional browser identifiers (browserContextId, tabId, frameId, route, url), flow identifiers (flowId, originType, originNodeId, causedByNodeId), request identifiers (requestId, traceparent), and hashed actor identifiers (userActionId, userIdHash, tenantIdHash).FlowOriginTypeSchema / FlowOriginType — what kicked off a flow (e.g. user-click, user-input, keyboard, route-load, effect, memo-recompute, timer, raf, idle-callback, websocket-message, broadcast-channel, post-message, storage-event, service-worker-message, media-query-change, visibility-change, resize, intersection-observer, mutation-observer, backend-response, hmr-update).node.ts, edge.ts)TraceNodeSchema / TraceNode — a node in the trace graph: identity (id, parentTraceNodeId, logicalId, instanceId, generation), type, lifecycle, context, timing (startTime, endTime, durationMs), optional location, and an open attributes record.TraceNodeTypeSchema / TraceNodeType — the node taxonomy spanning the browser process tree, React UI, user interaction, network/API, backend (Nest app/module/provider, requests, DB/Redis ops, queue jobs, loops, promises), state, visual, memory, and build/dev events.LifecycleSchema / Lifecycle — created, active, completed, disposed, errored.TraceEdgeSchema / TraceEdge — a directed relationship between nodes: from, to, axis, type, timestamp, optional attributes.EdgeAxisSchema / EdgeAxis — the relationship dimension: ownership, caused, async, data, render, state, network, backend, db, visual, performance, memory, lifecycle.attributes.ts)Typed attributes payloads for specific node types, each with its XxxSchema + Xxx pair:
RenderAttrs, RenderPhase (mount | update), and the discriminated RenderWhy (props / react-state / context / valtio-path / parent-render / hook-dep-changed / force).EffectRunAttrs, ValtioUpdateAttrs.ServerRequestAttrs, plus LoopAttrs / LoopPattern (N+1, sequential-await, growing-allocation).MemoryOwnerAttrs, MemoryMutationAttrs, with MemoryContainerKind and MemoryMutationOperation enums.VisualFrameAttrs and VisualViolationAttrs, plus Rect, VisualFrameCause, VisualChangeKind, VisualRuleType, VisualRuleTiming, and VisualViolationSeverity.source-location.ts)SourceLocationSchema / SourceLocation — file plus optional line, column, symbol, componentName, hookName. Reused across events, nodes, and resources to point back at code.resources.ts)The MCP-facing read models, all built on a shared envelope:
ResourceEnvelopeSchema / ResourceEnvelope — the header on every resource JSON (schemaVersion, revision, optional $schema and updatedAt).URI_SCHEMES / UriScheme — the well-known LensMCP resource URI schemes (each maps 1:1 to a FrontMCP @App package): agent, events, build, lint, typecheck, test, runtime, render, visual, flow, story, trace, graph, bundle, security, perf, deps, memory, browser, react, valtio, nest, next, process.AgentCurrentStatusSchema / AgentCurrentStatus (agent://current-status) — rollup status (AgentStatusKind: starting | clean | warning | failing), blocking / warnings items (AgentBlockingItem), suggestedReads, and per-domain checks (AgentChecks).AgentSessionSchema / AgentSession (agent://session) — session capabilities: supported resources/tools/jobs/channels, default subscriptions, transports, host info, and project info.tokens.ts)Symbol-based dependency-injection tokens for FrontMCP @Provider registrations — SessionToken, EventBusToken, GraphStoreToken, ResourceStoreToken, StorageToken (union type LensmcpToken). The interfaces stay abstract here; packages like @lensmcp/core ship the concrete implementations.
schema-version.ts)SCHEMA_VERSION (currently 1) and the SchemaVersion literal type — stamped into ResourceEnvelope so consumers can detect protocol drift.producers @lensmcp/protocol-types consumers
───────── ────────────────────── ─────────
browser / React tap ─┐ ┌─► @lensmcp/core
node / NestJS taps ─┼──► Zod schemas + inferred types ──────┼─► MCP server
gateway ─┘ (the wire contract) └─► dashboard
Every @lensmcp instrumentation library and the gateway validate and emit events against these schemas; @lensmcp/core and the MCP server consume them with the matching inferred types. One definition, validated on the way out and typed on the way in — so the protocol can't silently drift between producer and consumer.
Part of LensMCP. Apache-2.0.
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.