PAKIKNOWLEDGE/dsh-auto-classifier0

dsh-auto-classifier

Autonomous (auto) mode permission classifier for DeepSeek Harness: a Claude-Code-auto-mode-like classifier over tools/pre-execute and approval/request, a selectable 'auto' permission preset, LLM semantic judge, git checkpointing, agent discipline guidance, and a web control page in Settings → Plugins.

AI Analysis

适合需要为 DSH 引入自主运行模式、精细化权限控制、自动审批决策以及 Git 状态回滚的安全管理与自动化任务。

Package
dsh-auto-classifier
Version
0.1.14
Last updated
Aug 16, 2026

Install

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:PAKIKNOWLEDGE/dsh-auto-classifier

Configuration (auto-classifier row in cordis.patch.yml)

KeyDefaultMeaning
presetNameautoThe permission preset under which the classifier is authoritative
defaultDecisionallowDecision when no rule matches and no judge (deny = fail closed)
llmJudgefalseEnable the model semantic judge (one call per unmatched operation)
judgeProvider / judgeBaseURL / judgeApiKey / judgeModelemptyExplicit judge credentials (since v0.1.14), set in the web control page. When a non-empty API key + model + base URL are present, the judge calls that provider directly over HTTPS (OpenAI-compatible /chat/completions, or Anthropic /messages when the provider/base URL is Anthropic) with zero dependency on the harness llm registry or its config-file credentials. Empty judgeApiKey falls back to llmProvider/llmModel below.
llmProvider / llmModeldeepseek-official / deepseek-v4-flashJudge model via the harness llm service (fallback when no direct credentials are set)
judgeStagesbothboth = fast filter + thinking re-review on flag; fast / thinking = single stage
denyMessageKafka doorkeeper copyFixed text appended to classifier denials (explains the sandbox_permissions channel does not apply); empty to disable
hardDenyMessagehard-boundary noteExtra sentence appended when a deny RULE (HARD) blocked the call — suggests running the step outside auto mode
judgeMaxUserMessages / judgeUserMessageChars3 / 400How many recent user messages (truncated) the judge sees as intent evidence
judgeToolHistory6How many recent tool calls (name + target, stripped) the judge sees for session context
judgeFastMaxTokens / judgeThinkingTimeoutMs8 / 30000Stage-1 output cap and stage-2 abort timeout
scanWriteContent / writeContentScanCharsfalse / 2000When on, judge write/edit payloads that carry a deny-pattern hit (content truncated to this many chars)
bypassWindow5How many recent denials participate in suspectedBypass matching
pwshStricttrueUnmatched command-tool calls go to the judge / strict default (more conservative than path tools, mirroring Claude Code's default for PowerShell)
denyPatterns / allowPatternsbuilt-inTool(pattern) regex arrays, override or extend
denialLimitConsecutive / denialLimitTotal3 / 20Denial caps, hard-stop hint past them
gitSnapshotOnAllowtrueSnapshot the git worktree before allowing an escalation
gitSnapshotIntervalMs30000Per-session snapshot interval floor