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

mm_kernel

v0.9.9

Published

面向 AI/LLM 的微内核工作流引擎 — 21器架构,201个通用模块,schema 驱动,零外部依赖启动

Readme

mm_kernel

npm version npm downloads License: MIT Node.js Version

面向 AI / LLM 的微内核工作流引擎 —— 21器架构,201个通用模块,schema 驱动,零外部依赖启动。

定位

| 其他平台 | mm_kernel | |---------|-----------| | 面向(可视化拖拽) | 面向 AI/LLM(schema 驱动 + JSON 可生成) | | 模块需手动配置参数 | 模块有完整 params/returns schema,LLM 可直接理解 | | 工作流需手动连线 | 工作流有 input_schema/output_schema,LLM 可自动生成 |

对比分析

| 维度 | mm_kernel | n8n / Node-RED | Dify / Coze | Temporal | Argo Workflows | |------|:--:|:--:|:--:|:--:|:--:| | 定义方式 | JSON 静态文件 | 可视化拖拽 | 可视化+AI | SDK 代码 | YAML/JSON DSL | | 启动方式 | node index.js | Docker | Docker | Server+DB | K8s/云 | | 模块覆盖 | 201个(21类) | 400+节点 | 30+内置 | SDK扩展 | 10+内置 | | LLM友好 | schema驱动+模块目录 | 无 | 原生支持 | 无 | 无 | | 变量语法 | {{ }} ART模板 | {{ }} | {{ }} | 代码变量 | $.path | | 步骤引用 | 命名 $steps.id.field | 节点连线 | 节点连线 | 代码调用 | $.path | | 错误处理 | 步骤级 on_error/skip/retry/fallback | 可配置 | 可配置 | 自动重试/补偿 | 可重试 | | 并行执行 | dispatcher/parallel Promise.all | 多分支 | 并行节点 | 原生 | DAG | | 全局配置 | $.config.get('模块名') | 环境变量 | 环境变量 | 配置中心 | ConfigMap | | 热更新 | chokidar监听 | 需重启 | 需重启 | 自动 | N/A | | 协议支持 | HTTP/MQTT/WS/JSON-RPC | HTTP/Webhook | HTTP | gRPC | HTTP | | 分布式 | 无(单进程) | 单进程 | 有 | 有 | K8s原生 |

优势

  • 最轻量:零外部依赖,node index.js 即启动
  • LLM 原生友好:模块 schema 对标 OpenAI tool 格式,getModuleCatalog() 直接喂给 LLM
  • 21器分类全面:从接收→解析→转换→验证→过滤→匹配→调度→查询→执行→计算→管理→循环→渲染→发送→观察→设计→生成→审查→固化→对话 → gateway,覆盖所有通用场景,支持 group 二级分类
  • 模块热插拔:新建 common/mod/{分类}/{模块}/ 目录,放 {分类}.json + index.js,chokidar 自动加载
  • 协议无关:同一 workflow 可通过 HTTP/MQTT/WS/JSON-RPC 四种协议触发

待完善

  • 无可视化编辑器(定位是 AI 生成 JSON,非手动拖拽)
  • 无分布式持久化(单进程内存执行)
  • 社区生态刚起步

安装

npm install mm_kernel

一行启动,一行运行

const mm = require('mm_kernel');

(async () => {
  // 启动内核(工作流目录默认指向 项目根目录/common/workflow)
  const app = await mm.start({ app_name: 'my_app' });

  // 执行工作流:使用 templates/demo/hello.json 模板(将模板复制到 common/workflow 后生效)
  const result = await app.run('demo', 'hello', {
    values: [1, 2, 3]
  });

  console.log(result.output);
})();

安装后可从 node_modules/mm_kernel/templates/ 复制工作流模板到项目的 common/workflow/ 目录直接使用,或参照模板编写自己的工作流。


文档索引

入门必读

| 文档 | 说明 | |------|------| | 核心概念 | 器 / 模块 / 工作流 / 步骤 / ctx 等基础概念 | | 快速开始 | 全局配置、新增模块 | | 实战案例 | 3 个端到端完整工作流(Hello World、用户注册、订单处理) |

深入理解

| 文档 | 说明 | |------|------| | ctx 上下文详解 | ctx 结构、数据流转、变量引用原理 | | 架构设计 | 内核 Boot 与 WorkflowEngine 执行流程 | | 模块体系说明 | 21 器职责、统一返回格式、完整模块清单 | | Workflow 编写指南 | 变量插值、条件分发、并行执行、错误处理 |

参考手册

| 文档 | 说明 | |------|------| | API 参考 | Kernel / WorkflowEngine / $.config 完整接口 | | LLM 集成指南 | 模块目录获取、System Prompt 示例 | | 二次开发指南 | 项目结构、自定义模块、目录加载优先级 | | 多协议触发指南 | HTTP / MQTT / WebSocket / JSON-RPC 调用示例 |

实践指南

| 文档 | 说明 | |------|------| | 最佳实践 | 工作流设计、模块开发、性能优化、易犯错误 | | 调试与排错 | 启动诊断、常见错误排查、应急排查清单 |

分析报告

| 文档 | 说明 | |------|------| | 工作流覆盖分析 | 12 种主流 APP 类型的模块覆盖验证 | | RPG Maker 对比分析 | 21 器架构与 RPG Maker 事件脚本的映射对比 | | 正式可用差距分析 | 项目成熟度评分(准生产 8.55/10) | | 小商店需求规格 | 商用多商户小商店需求(95个workflow、19张表、0个新模块、~34h) |

License

MIT