@agentshouse/mdruntime-families

中文文档
0.1.0-c84f271bc2772发布于 2026/11/06MITTypeScriptES Module近 30 天下载 2.7万

react-admin and Refine data providers over the MD Runtime client

原始使用文档
文档目录3 节
  1. Install
  2. Usage
  3. License

@agentshouse/mdruntime-families

react-admin and Refine data providers over the @agentshouse/mdruntime client, so an App built on either framework reads and writes its Rooms.

Install

npm install @agentshouse/mdruntime-families @agentshouse/mdruntime

Usage

Each resource names the MD Type of its records and the folder they live in. A record's id is its Path in the Room, prefixed by the Room's locator and / when the App reaches several Rooms; a new record is created in the first.

import { QueryClient } from '@tanstack/react-query';
import { dataProvider } from '@agentshouse/mdruntime-families/react-admin';

const resources = { contacts: { type: 'contact', folder: 'contacts' } };
const queryClient = new QueryClient();
const provider = dataProvider(runtime, { resources, queryClient });
// <Admin dataProvider={provider} queryClient={queryClient}>
import { dataProvider, liveProvider } from '@agentshouse/mdruntime-families/refine';

// <Refine dataProvider={dataProvider(runtime, { resources })}
//   liveProvider={liveProvider(runtime, { resources })} options={{ liveMode: 'auto' }}>

runtime is the client the host hands the App. A filter or sort field such as address.city reads the value at /address/city. react-admin filters compare for equality, a list for membership, and the suffixes _gt, _gte, _lt, _lte and _neq compare as named; Refine filters take eq, ne, lt, gt, lte, gte, in, nin, or and and. A field the Room schema declares a reference, at any depth, holds the referenced record's id; id and a reference compare only for equality and membership. Pages and totals are counted over every matching record, and a page reads only its own window of the Room; a list asked for without a page reads every record, window by window. react-admin's update writes the fields that differ from previousData, based on it, so the Save of a field another writer changed meanwhile is refused; Refine's update and either updateMany compare with the stored record. A Room the Runtime holds locked is left out of every list, and a read or a write of a record in it rejects with the code room-locked. A list stays current: react-admin's queries of a resource are invalidated, and Refine's live mode refetches, when a record a page or a read shows changes, a record a filter names starts or stops matching it, a page's total changes, or a Room the list left out as locked unlocks.

License

MIT

版本与发布记录

@agentshouse/mdruntime-families 共发布 226 个版本,首次发布于 2026/10/12;过去 12 个月发布了 226 个版本。

版本发布日期距今
0.1.0-c84f271bc2772latest2026/11/061 天前
0.1.0-cf714e8949a6b2026/11/062 天前
0.1.0-ccd936c24f4de2026/11/062 天前
0.1.0-c67ca26b9e9e92026/11/062 天前
0.1.0-c5956ccc097612026/11/052 天前
0.1.0-c33655aa1149c2026/11/052 天前

其他发布通道:pushed → 0.1.0-cbb5721b3710c。

关于 @agentshouse/mdruntime-families 的常见问题

@agentshouse/mdruntime-families 是什么?

react-admin and Refine data providers over the MD Runtime client

如何安装 @agentshouse/mdruntime-families?

在项目目录运行 npm install @agentshouse/mdruntime-families,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(>=18)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@agentshouse/mdruntime-families 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@agentshouse/mdruntime-families 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@agentshouse/mdruntime-families 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=24.22.1。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@agentshouse/mdruntime-families 可以商用吗?

@agentshouse/mdruntime-families 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@agentshouse/mdruntime-families 的下载量有多少?

根据 npm 官方下载统计,@agentshouse/mdruntime-families 在 2026/10/05 – 2026/11/03 这 30 天内被下载 27,130 次,日均约 904 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@agentshouse/mdruntime-families 还在维护吗?

最新版本 0.1.0-c84f271bc2772 发布于 2026/11/06(1 天前);至今共发布 226 个版本,其中过去 12 个月发布了 226 个;首次发布于 2026/10/12。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。