npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@mxf-dev/core

v5.0.2

Published

Model Exchange Framework core: events, schemas, types, services, and protocol contracts

Readme

@mxf-dev/core

Core foundation of the Model Exchange Framework (MXF): the event system, payload schemas, shared types and interfaces, runtime configuration, MXP protocol layer, MCP protocol contracts, services, and utilities that the MXF server and the @mxf-dev/sdk agent client are built on.

Most applications should depend on @mxf-dev/sdk instead — it re-exports the core surface agents need. Depend on @mxf-dev/core directly when building server-side extensions or custom tooling.

Install

bun add @mxf-dev/core   # or: npm install @mxf-dev/core

Requires Node.js >= 20.19 or Bun >= 1.2. ESM-only.

Upgrading to 5.0

Update core and SDK together. McpToolHandlerResult.content now accepts either the internal result object or a native MCP content-block array. Narrow with Array.isArray() before accessing .data; retain native isError, structuredContent, _meta, and all content blocks. External MCP servers must return an explicit content array, including [] for no content.

New request, activation-limit, and history-trim events expose agent execution. Server controls add per-agent filesystem roots, private DM reads, and switches for correction, MXP, and intelligent assignment. Existing server history needs the explicit channel-history migration before writers resume. See the 5.0 upgrade guide and server controls. Use SDK 5.0.2 or later: earlier 5.0.x SDKs sent the model the word Success instead of an external server's payload in the default prompt mode.

Upgrading to 4.0

Core and SDK versions must match. Two exported contracts require consumer changes:

  • QValueManager.setPersistenceCallback(write, read) now requires both callbacks. The reader returns the persisted Q-value, or undefined if none exists, and rejects on storage failure. Persisted values must be finite and in [0, 1]. Server startup registers MemoryService's reader and writer. Cache eviction now retains unpersisted rewards and refuses admission when no clean, idle entry can be evicted.
  • SdkReconnectedEventData and its payload helper require a nonempty sdkInstanceId. SDK lifecycle callbacks supply it automatically, isolating reconnect notifications between instances signed in as the same user.

This release also fixes provider request settings and usage reporting, nested JSON path validation, workspace symlink checks, graph path traversal, and memory retrieval scoring. See the SDK upgrade guide for session memory and task lifecycle changes.

Optional peer dependencies

Features that need a heavy or platform-specific library declare it as an optional peer dependency, so installing @mxf-dev/core does not drag it in. Each is loaded on first use and throws a clear install message if it is missing — nothing silently degrades.

| Package | Install it to use | Why it is optional | |---------|-------------------|--------------------| | puppeteer | BrowserManager, WebSearchService | Downloads a ~170MB Chromium | | bcrypt | The User model (password hashing) | Native module, compiled at install | | @tensorflow/tfjs | MxfMLService (set TENSORFLOW_ENABLED) | Large; only needed for ML features | | socket.io | Server-side event transport | Not needed by every consumer |

bun add puppeteer   # only if you use the browser tools

Usage

import { Events, EventBus, Logger, ConfigManager } from '@mxf-dev/core';

// The full module tree is addressable through subpath exports:
import { TokenEstimator } from '@mxf-dev/core/utils/TokenEstimator';
import { createTaskEventPayload } from '@mxf-dev/core/schemas/EventPayloadSchema';

Event names always come from Events (never string literals), and event payloads are built with the helpers in @mxf-dev/core/schemas/EventPayloadSchema.

License

Apache-2.0