nuwa-skill
alchaincyf
你想蒸馏的下一个员工,何必是同事。蒸馏任何人的思维方式——心智模型、决策启发式、表达DNA。Distill how anyone thinks.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:Stautaffly/dsh-focus-mode
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
English | 简体中文
An external DeepSeek Harness preset with persistent shell sessions, direct tool calls, and TypeScript program execution. No dsh source or frontend patches are required.
Compatibility: dsh >=0.2.1-rc.3, validated against upstream commit 22ddee3792402c3e70ec5f86a63c3e3e895a2f60. Node.js >=24.9 is required. This repository extracts the 0.1.2 plugin implementation; its runtime sources and bundle declaration match that implementation.
The plugin is published as dsh-focus-mode. Use the dsh CLI of the target application with an initialized Web profile; users do not need to clone the repository, prepare a host checkout, or install TypeScript. For a profile named web:
dsh plugin --profile web add dsh-focus-mode
Pin the version (dsh-focus-mode@0.4.1) when an installation must be reproducible. Replace web with your actual profile name, such as web-vanilla; the command changes only the selected profile. Restart that dsh application after installation, refresh the browser, and choose Focus mode in a new session. Installation adds a preset without changing your current default.
Offline installations can use the archive attached to GitHub Releases. Both routes install the same files.
dsh plugin --profile web add https://github.com/Stautaffly/dsh-focus-mode/releases/download/v0.4.1/dsh-focus-mode-0.4.1.tgz
To check that the bundle was discovered, run:
dsh --profile web --dump-config
The output should contain external-preset-focus-mode. The compatibility requirements at the top of this README still apply; this release does not upgrade the host.
Run the same install command with a newer version to replace the current one:
dsh plugin --profile web add dsh-focus-mode@0.4.1
Without a version the CLI resolves the newest published release. Check the Releases page for changes and compatibility notes before upgrading, then restart the application.
Finish sessions using the preset, then remove the bundle from the same profile:
dsh plugin --profile web remove dsh-focus-mode
Restart the application and refresh the browser after removal. Existing sessions retain their recorded preset selection; choose another preset before continuing them without this plugin.
For local builds and installation from a directory or archive, see development.
exec_command({cmd, session_id?, cwd?, run_in_background?, new_session?}) runs a command in an Agent-owned persistent shell. Working directory and environment survive successive calls: omitting session_id reuses this Agent's most recently used live shell, so the caller does not have to carry an id forward. Pass new_session:true to start another shell; cwd starts one for that directory and applies only at creation. A background command that omits session_id starts its own shell, because a background job owns the whole shell.write_stdin({session_id, chars?, run_in_background?, close?}) reads new output or sends input. A newline submits input; a standalone Ctrl-C interrupts. close:true closes the shell and releases its slot.focus_sessions({}) lists the shells this Agent owns with their session_id, running or exited state, whether a call or background job is using each one, and which shell an omitted session_id reuses.session_id, status, created, send, wait, text, and incomplete, plus exit_code, signal, or job_id when they apply. Direct calls render the same [session …] header as before; run_code programs read the fields instead of parsing that header. created tells a new shell apart from a reused one, and an unknown session_id names the live shells.run_code uses the upstream PTC executor. Available plugin tools enter both direct schemas and the program SDK through the host registry; the executor has no tool-name allowlist. Host scope, step admission, restrictions, approvals, guards, cancellation, and logging remain authoritative.job_kill closes that shell, and a shell has at most one monitor. maxBackgroundJobsPerAgent (default 2) bounds how many jobs one Agent runs at a time, so background work cannot consume every shell. A job completes when the shell exits or is closed, not when an individual command finishes: shell liveness or a settled send does not establish that a command finished.maxSessionsPerAgent and disappears from focus_sessions, so finishing a shell can never strand the quota.forgeSession), a command that runs gh pr create, names a change request with gh pr view|edit|checkout, or pushes a branch with git push binds those change requests to the Session, so the change-request panel lists them. A command that merely prints a URL binds nothing, and bindChangeRequests: false turns this off.The preset retains agent instructions, time context, compaction, skills, web tools, deliverables, plugin inspection/management, and workflows. Additional visible tools from Agent Teams, session search, worktrees, or terminal plugins are inherited automatically. Direct schemas plus the program SDK increase prompt size; PTC can keep intermediate results out of the conversation history.
The plugin defaults to four persistent shell sessions per Agent and two background jobs per Agent. Session count is configurable from 1 to 64. reuseMostRecentSession keeps calls that omit session_id on one shell; turn it off to require an explicit session_id or new_session on every call. The upstream jobs registry has a separate concurrent-job limit. The 16-session/16-job example overrides both:
dsh --profile focus-sandbox --patch ./examples/limits-16.patch.yml --dump-config
dsh --profile focus-sandbox --patch ./examples/limits-16.patch.yml
--patch applies to that launch. For a permanent override, merge the example's two rows into the profile's cordis.patch.yml, preserving other settings and existing fields on the jobs row.
In this dsh version, a profile patch replaces a matched row's whole config. The command tools are nested in a preset declaration, so the example restates external-preset-focus-mode and changes persistent-shell → focus-commands → config.maxSessionsPerAgent. A top-level preset: focus-mode / id: focus-commands patch is not supported. Keep a copied preset declaration aligned with future bundle upgrades.
| Command-tool option | Default | Allowed range |
|---|---|---|
backendType |
shell |
Registered terminal backend |
maxSessionsPerAgent |
4 | 1–64 |
maxBackgroundJobsPerAgent |
2 | 1–64 |
reuseMostRecentSession |
true |
boolean |
bindChangeRequests |
true |
boolean |
maxResultBytes |
262144 | 256–16777216 bytes |
yieldMs |
1000 | 0–60000 ms |
pollMs |
50 | 1–10000 ms |
readLines |
10000 | 1–100000 |
Result byte limits include metadata. Truncation retains the tail and reports possible loss; increase the read/retention settings and rerun a command when omitted output is required. Terminal send timeouts and scrollback retention belong to the terminal-bash / terminal-pwsh configuration.
Only plugin developers need a host source checkout. The 0.2.1-rc.3 native/PTC executor packages used by this baseline are not published on npm. Development builds and integration tests therefore use a prepared checkout; they do not substitute the incompatible published alpha versions. .npmrc disables automatic peer installation, and the lockfile pins development tools and ordinary dependencies.
Prepare a separate host checkout at the compatibility commit:
git clone https://github.com/deepseek-ai/deepseek-harness.git ../deepseek-harness
git -C ../deepseek-harness checkout 22ddee3792402c3e70ec5f86a63c3e3e895a2f60
# Follow the host's installation/build instructions, including native addon prerequisites.
Then, from this plugin repository:
npm ci --ignore-scripts
DSH_SOURCE="$PWD/../deepseek-harness" npm run link:host
npm run typecheck
npm run build
DSH_SOURCE="$PWD/../deepseek-harness" npm test
mkdir -p dist
npm run pack:release
Install the resulting archive into a development profile with the official CLI:
dsh plugin --profile focus-sandbox add ./dist/dsh-focus-mode-0.1.2.tgz
The link script creates links only inside this repository's ignored node_modules; it does not install the plugin into the host or edit host files. Re-run it after npm ci. Keep development profiles separate from production profiles.
DSH_SOURCE is explicit; there are no personal paths or vendored host sources. The test configuration reads the host's source aliases and decorator transform, and generates a lazy fixture import map. The 24 existing tests cover real Loader/PTY/jobs behavior, dynamic tool registration and withdrawal, authorization, cancellation/cleanup, pagination, direct/PTC ordering and logs, Web/addon composition, and isolated directory/archive installation and removal. They use no model keys or real model requests.
Runtime code belongs in src/; host integration fixtures and expected output belong in tests/. See plugin organization for a layout that can grow to multiple plugins.
MIT. DeepSeek Harness is a separate upstream project; this is an independently maintained plugin.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: session、sessions。