22-ai-00/dsh-enhanced--plugins-assistant-policy ↗★ 2
@dsh-enhanced/assistant-policy
A DeepSeek Harness plugin for Assistant Policy.
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:22-ai-00/dsh-enhanced#bb3fb924f1bdb946901614b8b848ac3a1d60c642&path:plugins/assistant-policy说明文档
阅读完整 README ↗最小配置
下面只允许 primary preset 在指定 workspace 的前台会话读取文件;bash 和后台任务仍会被拒绝:
- id: dsh-enhanced-assistant-policy
name: '@dsh-enhanced/assistant-policy'
config:
databasePath: !!js dshHomePath('assistant-policy/policy.sqlite')
proposalMaintenanceIntervalMs: 15000
toolDefaultEffect: deny
autoReview:
enabled: true
timeoutMs: 30000
maxTokens: 512
rules:
- id: allow-primary-workspace-read
effect: allow
subject:
kind: agent
id: primary
workspace: /absolute/path/to/workspace
actions: [execute]
resource:
kind: tool
id: read
context:
initiators: [foreground]
budgets: []
匹配支持完整字符串中的 * 通配符。任意匹配的 deny 都优先于 allow;同 effect 先选更具体的规则,再按声明顺序决定。工具身份来自 DSH 0.1.2-rc.1 的 Agent.session.header.agentPreset 与绝对 cwd,缺少 agent、preset 或 workspace 时直接拒绝,调用方参数不能伪造这些字段。