Skip to content

Mock ​

确定性 mock 模型回合,走真实 dsh AgentLoop 与 ToolRuntime:/mock run 与 /mock replay 不依赖真实模型即可测试工具、策略与事件流。不稳定,接口可能变化。

来源:官方 official · 状态:unstable

安装 ​

sh
dsh plugin --profile <name> add 'github:Ephemeral-AI-Lab/dsh-plugins#main&path:plugins/mock'

在 Mayfly 中:/plugin install mock(或 /plugin 浏览)。安装后重启并新建会话生效。

前端支持 ​

✅ 工具Mayfly 终端:工具/命令完整可用
✅dsh Web:工具 + 专属面板

提供 ​

  • 工具: 无
  • 命令: /mock
  • 能力披露: llm-adapter-override

审核信息 ​

审核版本: dsh-mock@0.1.1(2026-09-04) 收录是披露与审查,不是沙箱——安装第三方插件等同于安装任意 npm 包。

链接 ​

仓库 · 文档

README ​

# 🧪 dsh-mock

> ⚠️ **Unstable release:** `dsh-mock@0.1.1` is available for early testing.
> The command, API, and UI surface may change before a stable release.

## 📦 Install

Add the plugin to the DSH `web` profile with one command:

```powershell
dsh plugin --profile web add dsh-mock@0.1.1
```

Or install the npm package directly:

```powershell
npm install dsh-mock@0.1.1
```

This is an external Cordis plugin. It registers the internal per-turn provider
route `mock` with the `mock` model and routes accepted `/mock run` and `/mock replay`
commands through the public AgentLoop request waterfall. The route is
deliberately omitted from the advertised model catalog, so the normal model
selector remains unchanged; only the slash command activates it. The plugin
also registers `mock` in the public slash-command catalog, and its command
handler queues the exact line as a normal AgentLoop follow-up. The adapter
emits ordinary model chunks; the host AgentLoop and ToolRuntime execute and
record the actual calls.

Replay is read-only and in-memory. A relative path is resolved against the
current session's absolute `session.header.cwd`; when that value is missing,
relative paths are rejected. Absolute paths are accepted for read-only input,
and the plugin never creates, copies, rewrites, renames, or deletes a replay
source. `--overwrite-wait-time-ms` changes only explicit waits in the detached
canonical plan.

The plugin emits ephemeral `mock/status` events for a host UI bridge. The
bridge should render a compact status row above the existing composer and
leave normal DSH tool/result/error cards authoritative.

预览版 · v0.1.4-rc.1