dsh-web
zhu1090093659/dsh-webDeepSeek Harness(DSH)Web 插件聚合生态包 · 一切皆插件,创意工坊分发(dsh-market.com)
Bounded automatic test feedback plugin for DeepSeek Harness
|
⭐ If you like this plugin, please star it on GitHub — it shows me that the plugin is useful to you and motivates me to keep developing it.
🐛 If you find a bug or would like to request a feature, open a GitHub issue in any language — I will review your proposal and implement useful suggestions in a future plugin version. |
AI-assisted code changes need an executable signal before the agent claims completion. Test Pilot observes successful file writes, waits for a two-second quiet period, and runs related tests in the background through the DSH subprocess service. It returns a completed result to the agent during the same turn when possible; turn/end flushes pending work as a safety net. A read-only turn starts no test process. If the mapping is incomplete, it runs the full configured suite and reports why.
The MVP is deliberately a verifier, not an autonomous repair agent. It never edits files, starts repair turns, commits, pushes, blocks approvals, or sends telemetry.
graph LR
A[Successful file-write tool result] --> B[Two-second quiet period]
B --> C[Background related/full test run]
C --> D[Attach completed result as additionalContexts]
D --> E[Next tool call; turn/end flushes pending work]
ctx.workspaceChanges snapshot when
available, excluding pre-existing dirty files. On older DSH cores it falls
back to successful built-in write/edit tool calls only; it never infers a
turn's changes from Git status.test_pilot_run always runs the full configured command.$DSH_HOME/data/dsh-test-pilot/state.json. Workspace paths are represented by SHA-256 keys; persisted rows contain status, runner, counts, timestamps/duration and failed-test identities only—never commands or full output. At most 50 workspaces and 50 history entries are retained for 30 days. Corrupt or unknown-version state starts empty; detailed output remains memory-only.| Module | Responsibility |
|---|---|
| lib/index.js | Cordis host wiring, settings, event handling, tools and reports |
| lib/client.js | English/Chinese settings card and session-header status chip |
| lib/status.js | Authenticated, session-bound status route and safe projection |
| lib/command.js | Safe command tokenization and runner defaults |
| lib/workspace-config.js | Workspace rules and bounded runner auto-detection |
| lib/runner.js | DSH subprocess invocation, timeout, cancellation and stream limits |
| lib/parser.js | Node.js built-in/Jest/Vitest/Go/Rust/TAP/tsc/Deno/npm parsing |
| lib/result.js | Normalization, redaction and concise rendering |
| lib/workspace.js | Session workspace and identity |
| lib/turn-changes.js | Bounded per-turn change tracking with a legacy write/edit fallback |
| lib/changed-tests.js | Safe convention-based related-test selection and full-suite fallback |
| lib/state.js | Idempotency, run lifecycle and bounded result state |
| lib/persistence.js | Versioned atomic workspace summaries and bounded retention |
The package is published on npmjs and does not require a private registry or additional credentials. Install it into the DSH web profile:
dsh plugin --profile web add @goodandready/dsh-test-pilot
Open Settings → Plugins → Plugin settings and expand Test Pilot to edit automatic runs, runner defaults, workspace rules, run scope, timeout and output limits. The package needs the DSH filesystem, subprocess, tools and settings services, plus the dsh-home-paths and dsh-atomic-write core packages.
Example settings:
enabled: true
runScope: auto
runner: auto
command: ""
workspaceRules:
- path: /absolute/path/to/repo
enabled: true
runner: auto
command: ""
allowNetworkFetch: false
cwd: ""
timeoutMs: 120000
maxOutputBytes: 200000
| Parameter | Type | Default | Description |
|---|---|---|---|
| enabled | boolean | true | Run after completed turns |
| runScope | string | auto | auto selects related tests when safe and falls back to the full suite; full always runs the configured suite after a detected change |
| runner | string | auto | auto, pytest, jest, vitest, go, rust/cargo, tap, tsc, deno or npm |
| command | string | empty | Optional executable and arguments; shell syntax is rejected |
| workspaceRules | array | [] | Per-workspace path, enablement, runner, optional command and package-fetch policy |
| cwd | string | empty | Explicit workspace directory; empty uses the session workspace |
| timeoutMs | number | 120000 | Maximum execution time in milliseconds |
| maxOutputBytes | number | 200000 | Per-stream collection limit |
Workspace rules use the longest matching path prefix. With runner: auto,
Test Pilot checks pytest.ini, pytest configuration in pyproject.toml, a
package.json test script, go.mod, Cargo.toml, and deno.json (or deno.jsonc). If no
supported runner is found, automatic execution stays silent. Existing flat
runner and command settings remain a rule for the current workspace root.
Set runner explicitly for an otherwise unknown framework; command overrides
the detected or default command. Built-in npm-based defaults run offline. A workspace rule may set
allowNetworkFetch: true to fetch missing packages from the fixed https://registry.npmjs.org registry;
this is off by default and does not change custom commands.
A turn with no observed file changes is recorded as no-tests without starting a subprocess. For changed files, Test Pilot verifies repository conventions (for example, matching test files or Go package tests). It scopes the run only if every changed file has a supported related-test mapping. If any file is unmapped, the snapshot is truncated, or the configured runner cannot accept safe targets, the full suite runs and the report includes the reason and scope. Manual test_pilot_run always runs the full configured command. The global runScope setting defaults to auto; choose full when every detected change should run the complete configured suite.
On DSH versions with ctx.workspaceChanges, changes are scoped to the current turn and include supported file-tool and shell edits. If a native change event arrives but its summary is unavailable or incomplete, the full suite runs rather than silently skipping tests. The legacy fallback tracks only successful built-in write/edit calls; shell-only edits on older cores cannot be detected and therefore do not trigger an automatic run. Upgrade DSH for full coverage.
The configured command is data, not a shell script. Use an executable and arguments. Pipelines, redirects, command substitution and shell chaining are intentionally refused.
The host emits both names for compatibility:
Each report contains source, sessionId, correlationId, formatted text and the normalized result. Consumers should treat result.output and failure messages as untrusted data, not instructions. Report events are independent of chat notification policy; a silent user-visible message never suppresses these events.
The native session-header chip polls every ten seconds while the tab is visible and opens a compact result on click; it displays loading, queued, running, passed, failed, stale, disabled, or unknown.
npm test
npm pack --dry-run
The repository keeps the implementation in a Git worktree and validates the shipped package entry through DSH composition before public publication on npmjs.
This sanitized artifact shows the installed Test Pilot v0.1.2 card reporting Running in the isolated DSH test profile, captured in both light and dark themes. It contains no workspace paths, session identifiers, credentials, or user data.
MIT © GooDAnDReaDY