Moeblack / dsh-preset-kit

목록에 있음

DSH 插件:把 agent preset 作为插件包发布——软链接安装、热更新、归属登记、干净卸载 | Publish DeepSeek Harness agent presets as plugins: symlink installs, hot reload, ownership records, clean uninstall

master기타 소스 보기

설치

npx -y @deepseek-ai/dsh plugin --profile web add github:Moeblack/dsh-preset-kit

이 설치 명령은 GitHub 저장소 주소에서 생성된 확인되지 않은 시작점입니다.

README

유지 관리자가 작성한 문서 스냅샷입니다.

GitHub에서 보기 ↗
커밋 3525652동기화 2026. 8. 18.

dsh-preset-kit

Publish agent presets into a DeepSeek Harness home: copy installs refreshed on every boot, owner tracking, and clean uninstall.

Why

dsh treats presets as local files: a preset is a directory under $DSH_HOME/.agent-presets/<id>/ holding agent.cordis.yml (+ optional preset.yml). Bundles cannot add preset roots — composeProfile replaces the agent-presets row's roots with the shipped root at the top overlay — so a plugin that ships a preset has to write into the user root itself.

This kit is that shared piece: publish, conflict rules, ownership records, and uninstall, so every preset-carrying plugin does not reinvent it.

Hot reload vs. boot refresh

  • dsh-agent-presets re-reads its roots on every list()/resolve(), so a preset that appears in the user root is visible immediately — no restart.
  • dsh's preset scanner does not follow symlinks (readdir file types + isDirectory()), so the default mode is copy. Republish on every plugin boot (the natural apply() cadence) to refresh the copied preset from its source — upgrading the plugin and restarting dsh updates the preset.
  • symlink mode exists for tooling that consumes the user root itself, but a symlinked preset is invisible to dsh.

API

import { publishPresetSync } from 'dsh-preset-kit'

// In a Cordis plugin apply():
const undo = publishPresetSync({
  id: 'minimal-web',                    // /^[a-z0-9][a-z0-9-]*$/
  dir: new URL('./presets/minimal-web/', import.meta.url).pathname,
  owner: 'dsh-minimal-web',             // your package name
})
ctx.effect(() => undo, 'preset-publish')

Async variants for scripts: publishPreset, unpublishPreset, listPublished. dshHome defaults to $DSH_HOME, then ~/.dsh.

Ownership rules

  • Publishing into an id already published by the same owner replaces it.
  • Publishing into an id published by a different owner throws.
  • Publishing into a preset directory the user authored by hand (no publisher record) throws — never overwrite a person's work.
  • unpublishPreset removes only its own publication; the undo function is safe to run after a manual rm.

Records live in $DSH_HOME/.agent-presets/.publishers/<id>.json.

저장소 정보

언어
TypeScript
라이선스
보고되지 않음
마지막 업데이트
2026. 8. 15. 오전 10:45

신중하게 설치하기

소스 코드, 권한, 수명 주기 스크립트, 의존성 및 네트워크 접근을 검토하고 신뢰하지 않는 플러그인은 격리 환경에서 테스트하세요.