How yexi-by/dsh-unrestricted works
dsh-unrestricted is a DSH plugin that conditionally fuses its rules into each agent’s system prompt while preserving the host’s tools and permissions. The principal flow is request assembly through anchor validation and mode-specific fusion, with a settings card for toggling, status, and previews. README documents Standard, Cordis, PTC, Plan, Minimal, and subagent behavior; the sampled host code confirms assembly interception and preview/status support, but not every internal mode path.
Main entry points: node.js Prompt assembly hook · controller.ts UI controller · index.tsx UI registration · UnrestrictedCard.tsx Settings card
Components 15
Settings UI
- Settings card
src/client/UnrestrictedCard.tsx - UI controller
src/client/controller.ts - UI registration
src/client/index.tsx - Localized copy
src/client/locales.ts - Card styling
src/client/styles.ts
Prompt integration
- Prompt assembly hook
src/node.js - Mode validation
src/node.js - Status and preview RPC
src/node.js - Profile toggle
src/node.js
Fusion rules
- Anchor-based fusion
src/rules.js - Mode prompt sections
src/rules.js - Prompt preview
src/rules.js
Other components
- Plugin user
- DSH runtime
- Model request
Connections 21
- Plugin user → Settings card: configures
README.md - UI registration → UI controller: creates
src/client/index.tsx - UI registration → Settings card: registers
src/client/index.tsx - UI registration → Card styling: injects
src/client/index.tsx - UI registration → Localized copy: registers
src/client/index.tsx - Settings card → UI controller: reads state
src/client/UnrestrictedCard.tsx - Settings card → Localized copy: renders text
src/client/UnrestrictedCard.tsx - UI controller → Status and preview RPC: requests status
src/client/controller.ts - UI controller → Status and preview RPC: requests preview
src/client/controller.ts - UI controller → Profile toggle: reads toggle
src/client/controller.ts - Plugin user → DSH runtime: starts request
README.md - DSH runtime → Prompt assembly hook: assembles prompt
README.md - Prompt assembly hook → Profile toggle: checks toggle
src/node.js - Prompt assembly hook → Mode validation: checks anchors
src/node.js - Mode validation → Anchor-based fusion: validates sections
src/node.js - Prompt assembly hook → Anchor-based fusion: fuses sections
src/node.js - Anchor-based fusion → Mode prompt sections: adds rules
src/rules.js - Prompt assembly hook → Status and preview RPC: records preview
src/node.js - Status and preview RPC → Prompt preview: renders preview
src/node.js - Prompt preview → Anchor-based fusion: uses fusion
src/rules.js - Prompt assembly hook → Model request: provides prompt
README.md