Siekiera298/dsh-permission-rules ↗★ 0

dsh-permission-rules

Claude Code-style declarative permission rules for DeepSeek Harness: ordered allow/deny/ask rules with tool-name, argument (glob/regex), and workspace-path matching on the tools/pre-execute waterfall, session-log audit, and HMR reload. 适合需要精细控制工具执行权限、审计会话日志的安全敏感型用户。

パッケージ
dsh-permission-rules
互換性
未検証
バージョン
0.1.33
ライセンス
NOASSERTION
最終更新
2026/10/16

同名パッケージの別リポジトリ

インストール

検証済み bundle がないか、互換性チェックに失敗しています。先にリポジトリの説明を読んでください。 README 全文を読む ↗

ドキュメント

README 全文を読む ↗

Configuration

All tunables are Schemastery Config fields (changeable from cordis.yml). An id-targeted override replaces the whole row — restate every key you need. On a 0.1.7-alpha host every field is declared .volatile(), so it is ALSO editable in place from the Plugins settings page: the edit is committed into the running references without remounting the plugin, the runtime reads the new value on its next use, and a change to network.proxyPort, proxyBind, injectEnv or noProxy rebinds the local proxy immediately. The numeric bounds live in the schema, and the config editor resolves the merged config against that schema before persisting, so an out-of-range value is refused at write time. On a host whose Schemastery predates volatile() these fields stay cordis.yml-only.

KeyDefaultMeaning
rulesFile.dsh/rules.yamlRule file location; relative = resolved against the calling session's cwd, absolute = global and validated at mount
fallbackPath(none)Rule file used when per-cwd discovery finds nothing; validated at mount
badFilePolicyfailBad rule file: fail errors the pending tool call loudly; ignore-with-warning warns and continues empty
maxRules256Hard cap on rule count across the effective source chain
maxCachedWorkspaces512Hard cap on cached per-workspace rule loads (LRU eviction)
patternModeglobparams/paths/when.env pattern flavor: glob or regex (tool names are always globs)
watchtrueChokidar watch + reload on change
watchStabilityThresholdMs200Reload debounce window (ms)
languageen/rules output language: en, zh, es, pt, hi
caseInsensitivePaths(win32)paths patterns and workspace-root comparison ignore ASCII case; true on Windows
auditallAudit granularity: all logs every hit AND passthrough; hits skips passthrough events
searchUpfalseWalk parent directories from the session cwd and merge every found rule file, nearest first
maxGlobStars2Hard cap on unbounded */** quantifiers per glob pattern
enforcetruefalse = dry-run mode: deny/ask hits are audit-logged with a dryRun marker and every call passes through
allowUnmarkedAuditfalsePre-marker hosts drop the ignorable marker; the plugin disables session-log audit with a warning. Set true to opt back in
network.enabledtrueMaster switch for the proxy, env injection, and web-tool mode defaults
network.modeautoPolicy mode: auto follows the sandbox preset, or deny-all / whitelist / allow-all
network.autoFallbackallow-allMode used when auto has no sandbox-policy service
network.unlistedaskWhitelist-mode handling of targets no rule matched: ask or deny
network.proxyBind127.0.0.1Local proxy bind address (loopback only)
network.proxyPort0Local proxy port; 0 picks a free ephemeral port
network.proxyMaxRecent100Cap on recent-block records kept for the settings page
network.loopbackallowLoopback targets: allow (Codex parity) or policy
network.injectEnvtrueWhether proxy environment variables are injected for subprocesses
network.noProxyclearSubprocess NO_PROXY handling: clear enforces the policy or preserve
network.upstreamProxyoffUpstream proxy for connections this plugin ALLOWS: off dials directly, inherit reuses the launch environment's proxy names, or an explicit http(s):// proxy URL
network.allowHostActiontrueSettings-page per-block "allow this host" action: false hides the Allow button and makes the permissionRules/allowHost RPC refuse (the rule editor is not affected)
builtin.enabledtrueBuilt-in high-risk baseline: false disables the shipped deny/ask ruleset entirely
builtin.path(shipped)Replacement baseline file (absolute, or relative to process.cwd()); validated at mount