@agentshouse/mdruntime
MD App的无头核心:输入的Markdown文档的本地房间 查询、搜索、观察、房间草稿和队列保存以同步 通过适应器提供商.
安装
npm install @agentshouse/mdruntime
条目
| 条目 | 对于 |
|---|---|
@agentshouse/mdruntime/client | 主持人客户端: connectMdRuntime(port) |
@agentshouse/mdruntime/host | 为运行时服务的主机 : serveMdRuntime |
@agentshouse/mdruntime | 共享类型 |
@agentshouse/mdruntime/memory | 测试 : createMemoryAdapter,一个模拟适应器 |
@agentshouse/mdruntime/tables | 主机数据库: Authored store's并打开了文件表, answerRuntime |
@agentshouse/mdruntime/react | 对客户端的反应 : useObserve, (中文(简体) ), useSave· ; useExpected期望商店的读者; useLane,读取一个动作道 |
使用量
App代码取取客户主机的手; 在House App桥取取:
import { houseBridge } from '@agentshouse/app-bridge';
const runtime = await houseBridge().runtime;
const rooms = await runtime.rooms();
const notes = await runtime.query({ types: ['note'], select: 'all', limit: 20 });
observe('storage-loss') 报告 null,稳定代码 storage-loss 何时
未同步的房间草稿和待修改丢失,或 visit 当主机持有
以访问结束的数据库; 准备状态 persistence 答案为
memory。主机提供用户阵容.
在House中,桥的物体 页面保持为 window.houseBridge 将聊天放在
House服务于页面:安装和捆绑任何内容。 把它装入元素中
填充,其中按元素宽度列出用户的聊天内容,按 CSS 定制
作为聊天按钮,House在工作表中打开它的点:
const chat = await window.houseBridge.chat.mount(element, { conversation });
element.style.setProperty('--chat-accent', '#2a6cf0');
chat.update({ conversation: null, agent });
const button = await window.houseBridge.chat.mountButton({});
button.open({ agent });
App的代理遵循规则,包括本地查询、搜索、房间草稿、保存和
聊天,这是 apps/ 《豪斯指南》的几页 guide/open 打开.
许可证
麻省理工学院