dsh-preset-tool-guard: Restrict Tool Visibility by Agent Preset

dsh's tool resolution inherits along the agent→preset→global chain, meaning a preset cannot individually narrow the tools mounted globally. Presets like minimal will also see all host-side providers. KouzakiUmi's dsh-preset-tool-guard mounts once at the host level, reads the combined preset at agent/created, and calls ctx.tools.restrict() within the Agent's own scope. It applies a per-preset whitelist based on allowlists, deny rules, and prefixes. Obscured tools return UNKNOWN_TOOL without affecting other Agents. Installation requires Node ^22.19 or >=24; add it via dsh plugin --profile and restart. Configuration is written in the profile's cordis.patch.yml, and dryRun can be used first for parameter tuning.

Read More