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

@fuxi-ailabs/workflow-rsi-dsh-console

v0.1.0-alpha.1

Published

DSH 操作台 bundle:在独立的 DSH 宿主里查看 workflow-rsi(只读工具),由人在 /wrsi 命令里确认写操作

Readme

@fuxi-ailabs/workflow-rsi-dsh-console — workflow-rsi 操作台(DSH bundle)

十六次修订 FR-267~272。在一个独立的 DSH 宿主里查看 workflow-rsi:操作台 agent 只有只读工具,写操作只由人在 /wrsi 命令里带 --confirm 执行。workflow-rsi 的判定、状态、证据与注册表都不进任何 DSH 进程(INV-62);本包只经 wrsi-server 的 HTTP API 与 wie 子进程访问 workflow-rsi,不 import @evolution/*,workflow-rsi 的包也不 import 本包。

接入卡见 docs/dsh-接入卡.md,验收记录见 docs/dsh-验收表.md。

前提

| 项 | 要求 | |---|---| | Node | ≥ 22.19(构建与 DSH 宿主都用它) | | DSH | engines.dsh 为 0.1.6-alpha.2 \|\| ^0.2.1-rc.2;已在 0.1.6-alpha.2 与 0.2.1-rc.2 上实跑验收(见验收表) | | pnpm | dsh plugin … add 内部调用 pnpm。已验证 pnpm 11.25.0;若 corepack 缓存的 pnpm 不完整(报 Cannot find module …/pnpm.cjs),把一个可用的 pnpm 放到 PATH 前面再执行 | | wrsi-server | workflow-rsi 本体 npm install -g @fuxi-ailabs/workflow-rsi 提供 wrsi-server 与 wie。由使用者自己启动并保持运行;本插件不启动、不重启它。需要它的 key 文件路径 | | wie(可选) | 闭环与工作计划的查询、loop-resume、plan-decide 需要;不配置时这些功能返回不可用 |

安装

dsh wrsi-console --from-default-profile web --dump-config    # 建 profile(web、tui 或 headless 均可,取决于 DSH 版本提供哪些模板)
dsh plugin --profile wrsi-console add @fuxi-ailabs/workflow-rsi-dsh-console
dsh --profile wrsi-console --dump-config | grep -A3 'id: wrsi-console'   # 确认 bundle 行已合成

从源码安装时先 npm run build -w @fuxi-ailabs/workflow-rsi-dsh-console,再把上面的包名换成 <本仓>/packages/evolution-dsh-console。包里只发 dist、cordis.patch.yml、README、component.json 与 docs。

dsh plugin … add 把本包加进 profile 的 bundle 列表,bundle 的 patch 插入一行 wrsi-console。在 profile 自己的 cordis.patch.yml 里补 key 与 wie:

- id: wrsi-console
  config:
    server_url: http://127.0.0.1:8799
    key_file: /abs/path/wrsi-server.key
    wie: { argv: [wie], config: /abs/path/wie.config.json }      # 从源码运行时写 [node, /abs/path/workflow-rsi/bin/wie.mjs]
    timeout_ms: 30000

| 配置 | 含义 | 默认 | |---|---|---| | server_url | wrsi-server 的 http(s) origin | http://127.0.0.1:8799 | | key_file | wrsi-server 的 key 文件绝对路径(可写 ~/…) | 无;不配时 HTTP 类功能不可用 | | wie.argv / wie.config | wie 命令前缀与它的配置文件 | 无;不配时 wie 类功能不可用 | | timeout_ms | 单次 HTTP 请求或 wie 子进程的超时 | 30000 |

未知字段在插件加载时报错。key 每次请求时从 key_file 读(server 重启后 key 会变),只放进请求头 x-wrsi-key,输出里出现时替换为 <key>。

调用约定

只读工具(给操作台 agent)

| 工具 | 参数 | 调用 | |---|---|---| | wrsi_state | 无 | GET /api/state | | wrsi_sessions | 无 | GET /api/sessions | | wrsi_session | id | GET /api/sessions/<id> | | wrsi_request | session、seq(≥1) | 请求视图、记录检查与 tracking、该请求的事件 | | wrsi_assets | space、kind、status、tier、category、target、workflow、target_branch、session、pr、producer、scope、commit、since、until、outcome、presence、effect(都可选) | GET /api/assets | | wrsi_runs | 无 | GET /api/runs | | wrsi_run_insights | since、until、where[]、group_by、a[]、b[] | GET /api/runs/insights | | wrsi_loop_status | id(可选) | wie loop status <id>;不给 id 时 wie loop list | | wrsi_plan_status | plan | wie plan status --plan <plan> | | wrsi_trials | since、until、method(都可选) | GET /api/trials | | wrsi_report | since、until | GET /api/report/rsi |

每个工具返回同一种结构:

{ "available": true,  "ok": true,  "data": { … } }          // 成功:data 为 workflow-rsi 的原始返回
{ "available": true,  "ok": false, "error": "404 no such session" }   // workflow-rsi 返回了错误
{ "available": false, "reason": "wrsi-server http://127.0.0.1:8799 is not reachable (…)" }   // 用不了

结果超过 20000 字符时截断,末尾写明还剩多少字符。tools/pre-execute 守卫拒绝任何名字以 wrsi_ 开头、但不在上表里的工具,不论是谁注册的。

/wrsi 命令(给人)

  • 读:status、sessions、session <id>、assets [key=value …]、loop [<id>]、plan <计划 uri>
  • 写(缺 --confirm 时只回显将要执行的操作,不执行):admit <uri> --reason <文字>、publish、loop-resume <id> <rerun|fix|give-up|merge-done>、plan-decide <计划> <需求集/Dnn> <裁决>

调用例子(实测记录)

以下取自 AC-212 实跑(dsh 0.1.6-alpha.2;wrsi-server 与模型为本机替身)。模型请求 wrsi_state,DSH 的 --json 事件流里是:

{"type":"tool_call","callId":"call_1","tool":"wrsi_state","input":{}}
{"type":"tool_result","callId":"call_1","status":"completed","result":"{\n  \"available\": true,\n  \"ok\": true,\n  \"data\": {\n    \"business\": \"migbot-full\",\n    \"actor\": \"wjm\",\n    \"echo\": \"<key>\"\n  }\n}"}

替身服务把 key 原样回显在 echo 里,输出中已替换为 <key>。

写命令不带 --confirm 时(单元测试 AC-210 的输出):

/wrsi admit asset://b/rubric/r@1 --reason "复核通过"
Not run. This would admit asset://b/rubric/r@1 with the reason "复核通过" (POST /api/assets/transition).
Repeat the command with --confirm to run it.

常见错误

| 情形 | 返回 | |---|---| | wrsi-server 没启动或地址错 | {available:false, reason:"wrsi-server <url> is not reachable (…)"} | | key_file 不存在或读不了 | {available:false, reason:"key file <path> is not readable (ENOENT)"} | | key 错(server 重启后换了 key) | {available:false, reason:"wrsi-server rejected the key (a restarted server has a new key file)"} | | 没配置 wie | {available:false, reason:"wie is not configured"} | | 所配 wie 版本没有该命令(例如没有闭环) | {available:false, reason:"the configured wie has no \"loop list\" command"} | | workflow-rsi 返回错误(如会话不存在) | {available:true, ok:false, error:"404 no such session"} | | /wrsi 子命令或参数写错 | 返回用法说明,不执行 |

插件不重试,也不在不可用时猜测结果。

依赖的服务(E01)

  • 谁启动:wrsi-server 由使用者在自己的终端启动并维护;本插件只做客户端,不启动、不停止、不重启它。
  • 地址与边界:server_url 只接受 http(s) origin;wrsi-server 只监听本机,并校验 Host 与 Origin,所有 /api 请求要带 x-wrsi-key。
  • 不可用时:见上表“常见错误”,返回 available: false 与原因。

写操作的副作用(E03)

| 命令 | 实际做什么 | 重复执行 | 失败时 | |---|---|---|---| | admit | POST /api/assets/transition(action: admit),注册表追加一条准入记录 | 资产已准入时,服务端拒绝并返回 asset must be … (is admitted) | 原样返回服务端错误,注册表不变 | | publish | POST /api/assets/publish,把资产记录推送到 Workflow owner 的资产仓 | 已推送的提交不会重复产生 | 原样返回错误(例如 server 没配资产仓时返回 501) | | loop-resume | wie loop resume <id> --decision …,闭环账本追加 loop.resumed | 只对等人(ESCALATED)或等合入(AWAITING_MERGE)的闭环有效,其他状态 wie 报错 | 原样返回 wie 的错误输出 | | plan-decide | wie plan decide,工作计划台账追加一条裁决 | 再次裁决同一事项会追加新记录,以最后一条为准 | 原样返回 wie 的错误输出 |

每次写操作插件只发一次请求或起一次 wie,不自动重试;写入都落在 workflow-rsi 的只追加台账里,没有需要插件清理的状态。

子进程(E05)

wie 子进程用固定的可执行文件与参数数组启动(不经 shell),超时取 timeout_ms,结束即回收。插件自己不持有其他进程或连接。

测试

npm test -w @fuxi-ailabs/workflow-rsi-dsh-console      # 替身 server 与替身 wie 上的 AC-209~211
node --test tests/dsh-console-install.test.mjs   # 根目录:真实 dsh 安装与启动(AC-212,没有 dsh 时跳过)