diff --git a/external_plugins/react-monitor-agent/.zcode-plugin/plugin.json b/external_plugins/react-monitor-agent/.zcode-plugin/plugin.json new file mode 100644 index 00000000..41f2adf0 --- /dev/null +++ b/external_plugins/react-monitor-agent/.zcode-plugin/plugin.json @@ -0,0 +1,24 @@ +{ + "name": "react-monitor-agent", + "version": "0.1.3", + "description": "Human-agent operation board built on review replay and checkpoints: the agent works, you replay a structured timeline and decide at key frames. The bundled skill guides your agent to clone the GitHub repo and run it — zero-dependency Node event service on :8790 plus React board on :5173, offline FIXTURE demo included.", + "description_i18n": { + "en": "Human-agent operation board built on review replay and checkpoints: the agent works, you replay a structured timeline and decide at key frames. The bundled skill guides your agent to clone the GitHub repo and run it — zero-dependency Node event service on :8790 plus React board on :5173, offline FIXTURE demo included.", + "zh-CN": "人机协作操作板,以「审查回放 + 检查点」为协作单位:agent 干活,人回放结构化时间线、在关键帧拍板。内置技能引导 agent 从 GitHub 克隆主仓并跑起来——零依赖 Node 事件服务(:8790)+ React 操作板(:5173),自带离线 FIXTURE 演示模式。" + }, + "author": { + "name": "Lumos-789", + "url": "https://github.com/Lumos-789" + }, + "homepage": "https://github.com/Lumos-789/react-monitor-agent", + "repository": "https://github.com/Lumos-789/react-monitor-agent", + "license": "MIT", + "keywords": [ + "human-agent", + "review-replay", + "checkpoint", + "operation-board", + "agent-oversight" + ], + "skills": "skills" +} diff --git a/external_plugins/react-monitor-agent/LICENSE b/external_plugins/react-monitor-agent/LICENSE new file mode 100644 index 00000000..b6c14d9c --- /dev/null +++ b/external_plugins/react-monitor-agent/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Lumos-789 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/external_plugins/react-monitor-agent/README.md b/external_plugins/react-monitor-agent/README.md new file mode 100644 index 00000000..103fb566 --- /dev/null +++ b/external_plugins/react-monitor-agent/README.md @@ -0,0 +1,71 @@ +

React Monitor Agent icon

+ +

React-Monitor-Agent

+ +> 人机协作的正确单位不是「对话」,是**审查回放 + 检查点**。 + +回应 DeepSeek《Exploring Super-agent Design》(2026-10-31,`dsh-superagent-prototype`)之问:**基于 session 聊天窗口的设计,是路径依赖。** + +演示视频: [B 站《DeepSeek 问:agent 为什么只有聊天窗?我做了个操作板》](https://www.bilibili.com/video/BV1QLxp6DEdX) + +## 三个概念 + +- **操作板 Operation Board** — 只承载两类一等目标: + - **Context Track 上下文建设**(非业务产出:知识、规则、流程定义) + - **Work Track 业务执行**(coding 及一切真业务) +- **审查回放 Review Replay** — agent 工作过程的结构化时间线叙事(录屏/截图/diff/文本混合节点),随时回放,不再实时盯滚动流。 +- **检查点 Checkpoint** — 回放中等人决策的关键帧,类型决定按钮子集: + +| 检查点 | 触发 | 动作 | +|---|---|---| +| 方案 Plan | 方案/选型待拍板 | 批准 / 否定 / 改向 / 补充 | +| 阶段 Progress | 里程碑成果 | 批准 / 改向 / 补充 | +| 风险 Risk | agent 自报拿不准 | 批准 / 否定 / 补充 | +| 完工 Delivery | 交付物最终审查 | 完工 / 否定 / 补充 | + +检查点**模板保底 + agent 可加**;否定/改向后旧分支**灰掉保留**(审计完整)。 + +## 与 dsh-superagent 的关系 + +dsh 管 **agent 侧的自律**(准入/授权/自治边界,panel 是工单列表);rma 管**人侧的审查带宽**(叙事回放,交互富而深)。互补不互斥——dsh 让 agent 少打扰人,rma 让人被打扰时看得快、答得快。 + +## 快速开始 + +```bash +# rma-core:零依赖 Node 服务(端口 8790,事件存 ~/.rma/) +cd core && npm ci && npm run dev + +# rma-board:Web 操作板(端口 5173) +cd app && npm ci && npm run dev + +# 验证(改动后自检):core 测试全绿,app 类型检查+构建通过 +npm run verify +``` + +打开 http://localhost:5173 即见操作板。前端默认 **FIXTURE 演示模式**(离线可跑,内置三工程:二维码名片生成器/竞品调研报告/superagent docs 蒸馏),回放中的检查点决策可真实点击——你的选择会改变时间线走向;要连真 core 时 `VITE_RMA_MODE=live npm run dev`。 + +## 插件安装 + +本仓同时是 **skill 壳型插件仓**(不内嵌产品源码,引导 agent 克隆本仓并按「快速开始」跑起服务): + +- **DSH**: 仓根即 bundle——`package.json` 声明 `dsh.bundle`(patch 指向 `cordis.patch.yml`),`index.js` 以 bundledSkillDir 挂载 `skills/react-monitor-agent/`。 +- **ZCode**: `.zcode-plugin/plugin.json`(目前仅挂本地 dev marketplace 验证,未对外发布)。 +- 两条渠道都只是安装/配置/排障入口;产品本体始终是 `core/` + `app/`,直接克隆即可用。 + +## 结构 + +``` +core/ rma-core — 事件库(JSONL append-only)+ 检查点引擎 + localhost API +app/ rma-board — React 操作板 + 审查回放 + 完工态三屏 +demo-projects/ 演示工程事件流 +``` + +## 状态 + +- 2026-10-31 立项;11-01 全链可用:core 测试全绿,三屏 UI + 决策回注全链路(curl 实证)。 +- 2026-11-04 发布候选 0.1.2:删掉未使用的 shadcn 组件与依赖,补 lint/build 统一验证,准备 ZCode 提交。 +- 路线图:DSH bundle 原生适配器(agent 进程内插件,自动事件采集)。 + +## License + +MIT diff --git a/external_plugins/react-monitor-agent/README_CN.md b/external_plugins/react-monitor-agent/README_CN.md new file mode 100644 index 00000000..103fb566 --- /dev/null +++ b/external_plugins/react-monitor-agent/README_CN.md @@ -0,0 +1,71 @@ +

React Monitor Agent icon

+ +

React-Monitor-Agent

+ +> 人机协作的正确单位不是「对话」,是**审查回放 + 检查点**。 + +回应 DeepSeek《Exploring Super-agent Design》(2026-10-31,`dsh-superagent-prototype`)之问:**基于 session 聊天窗口的设计,是路径依赖。** + +演示视频: [B 站《DeepSeek 问:agent 为什么只有聊天窗?我做了个操作板》](https://www.bilibili.com/video/BV1QLxp6DEdX) + +## 三个概念 + +- **操作板 Operation Board** — 只承载两类一等目标: + - **Context Track 上下文建设**(非业务产出:知识、规则、流程定义) + - **Work Track 业务执行**(coding 及一切真业务) +- **审查回放 Review Replay** — agent 工作过程的结构化时间线叙事(录屏/截图/diff/文本混合节点),随时回放,不再实时盯滚动流。 +- **检查点 Checkpoint** — 回放中等人决策的关键帧,类型决定按钮子集: + +| 检查点 | 触发 | 动作 | +|---|---|---| +| 方案 Plan | 方案/选型待拍板 | 批准 / 否定 / 改向 / 补充 | +| 阶段 Progress | 里程碑成果 | 批准 / 改向 / 补充 | +| 风险 Risk | agent 自报拿不准 | 批准 / 否定 / 补充 | +| 完工 Delivery | 交付物最终审查 | 完工 / 否定 / 补充 | + +检查点**模板保底 + agent 可加**;否定/改向后旧分支**灰掉保留**(审计完整)。 + +## 与 dsh-superagent 的关系 + +dsh 管 **agent 侧的自律**(准入/授权/自治边界,panel 是工单列表);rma 管**人侧的审查带宽**(叙事回放,交互富而深)。互补不互斥——dsh 让 agent 少打扰人,rma 让人被打扰时看得快、答得快。 + +## 快速开始 + +```bash +# rma-core:零依赖 Node 服务(端口 8790,事件存 ~/.rma/) +cd core && npm ci && npm run dev + +# rma-board:Web 操作板(端口 5173) +cd app && npm ci && npm run dev + +# 验证(改动后自检):core 测试全绿,app 类型检查+构建通过 +npm run verify +``` + +打开 http://localhost:5173 即见操作板。前端默认 **FIXTURE 演示模式**(离线可跑,内置三工程:二维码名片生成器/竞品调研报告/superagent docs 蒸馏),回放中的检查点决策可真实点击——你的选择会改变时间线走向;要连真 core 时 `VITE_RMA_MODE=live npm run dev`。 + +## 插件安装 + +本仓同时是 **skill 壳型插件仓**(不内嵌产品源码,引导 agent 克隆本仓并按「快速开始」跑起服务): + +- **DSH**: 仓根即 bundle——`package.json` 声明 `dsh.bundle`(patch 指向 `cordis.patch.yml`),`index.js` 以 bundledSkillDir 挂载 `skills/react-monitor-agent/`。 +- **ZCode**: `.zcode-plugin/plugin.json`(目前仅挂本地 dev marketplace 验证,未对外发布)。 +- 两条渠道都只是安装/配置/排障入口;产品本体始终是 `core/` + `app/`,直接克隆即可用。 + +## 结构 + +``` +core/ rma-core — 事件库(JSONL append-only)+ 检查点引擎 + localhost API +app/ rma-board — React 操作板 + 审查回放 + 完工态三屏 +demo-projects/ 演示工程事件流 +``` + +## 状态 + +- 2026-10-31 立项;11-01 全链可用:core 测试全绿,三屏 UI + 决策回注全链路(curl 实证)。 +- 2026-11-04 发布候选 0.1.2:删掉未使用的 shadcn 组件与依赖,补 lint/build 统一验证,准备 ZCode 提交。 +- 路线图:DSH bundle 原生适配器(agent 进程内插件,自动事件采集)。 + +## License + +MIT diff --git a/external_plugins/react-monitor-agent/assets/react-monitor-agent/icon.png b/external_plugins/react-monitor-agent/assets/react-monitor-agent/icon.png new file mode 100644 index 00000000..dd8de467 Binary files /dev/null and b/external_plugins/react-monitor-agent/assets/react-monitor-agent/icon.png differ diff --git a/external_plugins/react-monitor-agent/assets/react-monitor-agent/icon.svg b/external_plugins/react-monitor-agent/assets/react-monitor-agent/icon.svg new file mode 100644 index 00000000..ac7cd71d --- /dev/null +++ b/external_plugins/react-monitor-agent/assets/react-monitor-agent/icon.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/external_plugins/react-monitor-agent/cordis.patch.yml b/external_plugins/react-monitor-agent/cordis.patch.yml new file mode 100644 index 00000000..0511a651 --- /dev/null +++ b/external_plugins/react-monitor-agent/cordis.patch.yml @@ -0,0 +1,3 @@ +- insert: + - id: react-monitor-agent + name: react-monitor-agent diff --git a/external_plugins/react-monitor-agent/index.js b/external_plugins/react-monitor-agent/index.js new file mode 100644 index 00000000..05cd198e --- /dev/null +++ b/external_plugins/react-monitor-agent/index.js @@ -0,0 +1,17 @@ +import { fileURLToPath } from "node:url"; +import { apply as applySkillFilesystem } from "@deepseek-ai/dsh-skill-filesystem"; + +const skillsRoot = fileURLToPath(new URL("./skills/", import.meta.url)); + +export const name = "react-monitor-agent"; +export const inject = ["skills"]; + +export function apply(ctx) { + applySkillFilesystem(ctx, { + providerName: name, + includeDefaultRoots: false, + bundledSkillDir: skillsRoot, + watch: false, + }); + return ctx; +} diff --git a/external_plugins/react-monitor-agent/skills/react-monitor-agent/SKILL.md b/external_plugins/react-monitor-agent/skills/react-monitor-agent/SKILL.md new file mode 100644 index 00000000..b38488d0 --- /dev/null +++ b/external_plugins/react-monitor-agent/skills/react-monitor-agent/SKILL.md @@ -0,0 +1,74 @@ +--- +name: react-monitor-agent +description: Install, run and troubleshoot React-Monitor-Agent (rma), a human-agent operation board of review replay + checkpoints — zero-dependency Node event service on 127.0.0.1:8790 plus React board on localhost:5173 with an offline FIXTURE demo mode. Use when the user says "装 react-monitor-agent", "把 rma 操作板跑起来", "review replay board", "审查回放操作板", or wants to try the board locally. +--- + +# React-Monitor-Agent (rma) — install / run / troubleshoot + +rma 是人机协作操作板:agent 把工作过程写成结构化时间线(审查回放),人在关键帧(检查点:方案/阶段/风险/完工)上拍板。本 skill 是**安装壳**——引导你把 GitHub 主仓克隆到用户机器并跑起来;产品源码不内嵌在本插件里,永远以主仓为准。 + +## 前置要求(先逐项确认,缺了先向用户报告再动手) + +- Node **>= 20**(`node -v`;core 的 engines 硬要求) +- git 可用 +- 端口 **8790**(core)与 **5173**(board)空闲:`lsof -i :8790 -i :5173` 无占用 +- 两个终端窗口/面板(core 与 board 各一个,都是常驻 dev 进程) + +## 安装并跑起来 + +1. **克隆主仓**(装到用户指定的目录;用户没说就先问,或用其惯用 projects 目录): + + ```bash + git clone https://github.com/Lumos-789/react-monitor-agent.git + ``` + +2. **起 rma-core**(零运行时依赖的 Node 服务,监听 `127.0.0.1:8790`,事件数据存 `~/.rma/`): + + ```bash + cd react-monitor-agent/core + npm ci + npm run dev + ``` + + 数据目录为空时自动灌入演示 fixture(`RMA_NO_SEED=1` 可关);`RMA_HOME` 可改数据目录,`RMA_PORT` 可改端口。 + +3. **起 rma-board**(React 操作板,监听 `localhost:5173`): + + ```bash + cd react-monitor-agent/app + npm ci + npm run dev + ``` + +4. **验证**(全部满足才算装好): + + ```bash + curl http://127.0.0.1:8790/api/health # core 存活 + ``` + + - 打开 http://localhost:5173 能看到操作板; + - 前端**默认 FIXTURE 离线演示模式**(无需 core 即可浏览内置示例工程,回放里的检查点决策可真实点击); + - 要连真 core:`cd app && VITE_RMA_MODE=live npm run dev`(看板顶部徽章标注当前模式:「演示数据」=FIXTURE 离线,「实时数据」=已连真 core)。 + +## 配置项一览 + +| 环境变量 | 作用端 | 默认 | 说明 | +|---|---|---|---| +| `RMA_PORT` | core | `8790` | 服务端口 | +| `RMA_HOME` | core | `~/.rma` | 事件数据目录 | +| `RMA_NO_SEED` | core | 未设 | 设 `1` 则空目录不灌演示 fixture | +| `RMA_SEED_FIXTURE` | core | 内置 | 指定自定义 fixture 路径 | +| `VITE_RMA_MODE` | board | fixture | 设 `live` 连接真 core | + +## 排障 + +- **`EADDRINUSE` / 端口占用**:`lsof -i :8790`(或 5173)找到进程;core 可用 `RMA_PORT=` 换端口,board 必须**保持在 5173**(core CORS 白名单只放行 localhost:5173;board dev 开了 strictPort,5173 被占会直接报错退出、不会静默换端口),先腾出 5173 再起。 +- **board live 模式连不上 core**:先 `curl http://127.0.0.1:8790/api/health` 确认 core 活着;core 没起或被 `RMA_PORT` 改过端口都会导致连不上。 +- **`npm ci` 报 engines / 语法错误**:`node -v` 低于 20 → 升级 Node,不在仓内改 engines。 +- **改完代码自检**(对齐主仓 README 的验证口径):`cd core && npm test` 全绿;`cd app && npm run build` 通过。 +- 其余问题去主仓 README/issue 查,不在本插件里猜。 + +## 边界 + +- 本 skill 只负责装、跑、排障;产品功能(检查点决策、回放交互、事件接入)以主仓 README 与代码为准。 +- 两个 dev 进程都是前台常驻,退出即停;没有装系统服务的步骤,别替用户加。 diff --git a/marketplace.json b/marketplace.json index c7f09a06..a41e2464 100644 --- a/marketplace.json +++ b/marketplace.json @@ -10,7 +10,10 @@ "url": "https://z.ai" }, "unlistedPlugins": [ - { "name": "openpencil", "source": "./external_plugins/openpencil" } + { + "name": "openpencil", + "source": "./external_plugins/openpencil" + } ], "plugins": [ { @@ -827,7 +830,9 @@ }, { "name": "excalidraw", - "componentTypes": ["ui"], + "componentTypes": [ + "ui" + ], "displayName": "Excalidraw", "displayName_i18n": { "en": "Excalidraw", @@ -850,7 +855,9 @@ "name": "photocraft", "icon": "https://cdn-zcode.z.ai/zcode/official-plugin/assets/photocraft/icon.png", "source": "./external_plugins/photocraft", - "componentTypes": ["ui"], + "componentTypes": [ + "ui" + ], "displayName": "PhotoCraft", "displayName_i18n": { "en": "PhotoCraft", @@ -877,7 +884,9 @@ "name": "vectorcraft", "icon": "https://cdn-zcode.z.ai/zcode/official-plugin/assets/vectorcraft/icon.png", "source": "./external_plugins/vectorcraft", - "componentTypes": ["ui"], + "componentTypes": [ + "ui" + ], "displayName": "VectorCraft", "displayName_i18n": { "en": "VectorCraft", @@ -904,7 +913,9 @@ "name": "pdfcraft", "icon": "https://cdn-zcode.z.ai/zcode/official-plugin/assets/pdfcraft/icon.png", "source": "./external_plugins/pdfcraft", - "componentTypes": ["ui"], + "componentTypes": [ + "ui" + ], "displayName": "PdfCraft", "displayName_i18n": { "en": "PdfCraft", @@ -931,7 +942,9 @@ "name": "designcraft", "icon": "https://cdn-zcode.z.ai/zcode/official-plugin/assets/designcraft/icon.png", "source": "./external_plugins/designcraft", - "componentTypes": ["ui"], + "componentTypes": [ + "ui" + ], "displayName": "DesignCraft", "displayName_i18n": { "en": "DesignCraft", @@ -958,7 +971,9 @@ "name": "wordcraft", "icon": "https://cdn-zcode.z.ai/zcode/official-plugin/assets/wordcraft/icon.png", "source": "./external_plugins/wordcraft", - "componentTypes": ["ui"], + "componentTypes": [ + "ui" + ], "displayName": "WordCraft", "displayName_i18n": { "en": "WordCraft", @@ -985,7 +1000,9 @@ "name": "gridcraft", "icon": "https://cdn-zcode.z.ai/zcode/official-plugin/assets/gridcraft/icon.png", "source": "./external_plugins/gridcraft", - "componentTypes": ["ui"], + "componentTypes": [ + "ui" + ], "displayName": "GridCraft", "displayName_i18n": { "en": "GridCraft", @@ -1012,7 +1029,9 @@ "name": "deckcraft", "icon": "https://cdn-zcode.z.ai/zcode/official-plugin/assets/deckcraft/icon.png", "source": "./external_plugins/deckcraft", - "componentTypes": ["ui"], + "componentTypes": [ + "ui" + ], "displayName": "DeckCraft", "displayName_i18n": { "en": "DeckCraft", @@ -1039,7 +1058,9 @@ "name": "cadcraft", "icon": "https://cdn-zcode.z.ai/zcode/official-plugin/assets/cadcraft/icon.png", "source": "./external_plugins/cadcraft", - "componentTypes": ["ui"], + "componentTypes": [ + "ui" + ], "displayName": "CADCraft", "displayName_i18n": { "en": "CADCraft", @@ -1066,7 +1087,9 @@ "name": "soundcraft", "icon": "https://cdn-zcode.z.ai/zcode/official-plugin/assets/soundcraft/icon.png", "source": "./external_plugins/soundcraft", - "componentTypes": ["ui"], + "componentTypes": [ + "ui" + ], "displayName": "SoundCraft", "displayName_i18n": { "en": "SoundCraft", @@ -1149,7 +1172,9 @@ }, "category": "developer-tools", "icon": "https://cdn-zcode.z.ai/zcode/official-plugin/assets/kicad/icon.png", - "componentTypes": ["ui"], + "componentTypes": [ + "ui" + ], "displayName": "KiCad", "displayName_i18n": { "en": "KiCad", @@ -1443,6 +1468,35 @@ "mcp", "verification" ] + }, + { + "name": "react-monitor-agent", + "source": "./external_plugins/react-monitor-agent", + "icon": "assets/react-monitor-agent/icon.png", + "description": "Human-agent operation board built on review replay and checkpoints: the agent works, you replay a structured timeline and decide at key frames. The bundled skill guides your agent to clone the GitHub repo and run it — zero-dependency Node event service on :8790 plus React board on :5173, offline FIXTURE demo included.", + "description_i18n": { + "en": "Human-agent operation board built on review replay and checkpoints: the agent works, you replay a structured timeline and decide at key frames. The bundled skill guides your agent to clone the GitHub repo and run it — zero-dependency Node event service on :8790 plus React board on :5173, offline FIXTURE demo included.", + "zh-CN": "人机协作操作板,以「审查回放 + 检查点」为协作单位:agent 干活,人回放结构化时间线、在关键帧拍板。内置技能引导 agent 从 GitHub 克隆主仓并跑起来——零依赖 Node 事件服务(:8790)+ React 操作板(:5173),自带离线 FIXTURE 演示模式。" + }, + "version": "0.1.3", + "author": { + "name": "Lumos-789", + "url": "https://github.com/Lumos-789" + }, + "category": "developer-tools", + "keywords": [ + "human-agent", + "review-replay", + "checkpoint", + "operation-board", + "agent-oversight" + ], + "examplePrompts": [], + "examplePrompts_i18n": {}, + "displayName": "React Monitor Agent", + "displayName_i18n": { + "zh-CN": "人机协作操作板" + } } ] -} \ No newline at end of file +}