dsh-if

Adds an /if slash command to DSH: the first line is a condition and the remaining lines are an instruction. A fork subagent that inherits the session tools, system prompt and message history judges the condition and answers YES or NO, and only on YES is the instruction sent to the main agent as an ordinary user message, while a NO sends nothing. The condition, judge prompt and verdict never enter the main transcript. While the agent is busy the command queues with ordinary messages, editable, removable and steerable from the queue panel, and a setting switches to the 0.2.x background mode. The judge runs read-only, and falls back to a one-shot model call over a plain transcript when the host has no context-inheriting fork provider. Supports DSH 0.2.1-rc.5 and later (verified on 0.2.1-rc.5 and 0.2.2-rc.1) and Node.js 20.3 or later.

Overview

Adds an /if slash command to DSH: the first line is a condition and the remaining lines are an instruction. A fork subagent that inherits the session tools, system prompt and message history judges the condition and answers YES or NO, and only on YES is the instruction sent to the main agent as an ordinary user message, while a NO sends nothing. The condition, judge prompt and verdict never enter the main transcript. While the agent is busy the command queues with ordinary messages, editable, removable and steerable from the queue panel, and a setting switches to the 0.2.x background mode. The judge runs read-only, and falls back to a one-shot model call over a plain transcript when the host has no context-inheriting fork provider. Supports DSH 0.2.1-rc.5 and later (verified on 0.2.1-rc.5 and 0.2.2-rc.1) and Node.js 20.3 or later.

Installation

Install from npm

dsh plugin --profile web add dsh-if

Resolves a published tarball rather than cloning the repository, and installs without any extra setup. Swap `web` for your profile name if you run another one.

Install from GitHub

dsh plugin --profile web add github:TLEWA/dsh-if

Installing from GitHub runs the project's build script, which pnpm blocks until you allowlist it — run the command once and pnpm prints the exact key to add under `allowBuilds` in ~/.dsh/profiles/web/pnpm-workspace.yaml.

Version compatibility

Compatibility is unconfirmed. Check the project documentation for supported versions.