How t-auto/dsh-ops works
dsh-ops is a DSH performance-tools plugin: users receive repository/file tools, a bash-first shell with PowerShell fallback, managed background jobs, and an opt-in native PTC batch/result capability. The main runtime path is DSH component registration, followed by policy-governed tool execution; native Rust workers provide file and PTC operations. The map includes documented capabilities whose detailed implementation was not sampled. Evidence is limited to the excerpts, SOURCE INDEX references, and README statements provided.
Main entry points: index.js Component registration · lib.rs Native dispatch · worker.js PTC worker bridge · session-shells.js Bash session tool
Components 29
Plugin and policy
- Component registration
lib/index.js - Configuration
lib/config.js - Tool policy
lib/policy.js - Permission checks
lib/permissions.js - Workspace preparation
lib/workspace-preparation.js - Runtime discovery
lib/binary.js
Shell execution
- Shell discovery
lib/shells.js - Bash session tool
lib/session-shells.js - Bash IPC bridge
lib/bash-ipc.js
File tools
- File tool contracts
lib/file/contract.js - File worker bridge
lib/file/worker.js
PTC and jobs
- PTC tool contract
lib/ptc/contract.js - PTC worker bridge
lib/ptc/worker.js - PTC runtime discovery
lib/ptc/runtime.js - Background job tools
lib/components/background/index.js - Job management
lib/jobs.js
Native runtime
- IPC security
native/bash-ipc/security.h - Native file operations
native/src/file.rs - Path confinement
native/src/file_path.rs - Worker request contract
native/src/contract.rs - Native dispatch
native/src/lib.rs - Audit and result store
native/src/store.rs - Paged results
native/src/results.rs - Batch execution
native/src/batch.rs
Other components
- DSH user / agent
- DSH policy and process services
- FastCtx runtime
- Bundled bash / PowerShell
- Native worker executable
Connections 40
- DSH user / agent → Component registration: selects component
README.md - Component registration → Configuration: resolves config
lib/index.js - Component registration → Tool policy: registers tools
lib/index.js - Component registration → Runtime discovery: resolves runtime
lib/index.js - Component registration → Shell discovery: resolves shells
lib/index.js - Component registration → File tool contracts: publishes tools
lib/index.js - Component registration → Bash session tool: mounts bash
lib/index.js - Component registration → PTC runtime discovery: resolves worker
lib/index.js - Runtime discovery → FastCtx runtime: locates executable
lib/binary.js - Component registration → FastCtx runtime: starts runtime
lib/index.js - Shell discovery → Bundled bash / PowerShell: finds executables
README.md - Component registration → Bundled bash / PowerShell: provides shell tools
README.md - Bash session tool → Workspace preparation: prepares workspace
lib/session-shells.js - Bash session tool → DSH policy and process services: confines and spawns
lib/session-shells.js - Bash session tool → Bash IPC bridge: executes via bridge
lib/session-shells.js - Bash IPC bridge → IPC security: uses security helpers
- DSH user / agent → File tool contracts: requests file operation
README.md - File tool contracts → File worker bridge: defines operations
lib/file/runtime.js - File worker bridge → Permission checks: checks write access
lib/file/worker.js - File worker bridge → DSH policy and process services: resolves policy and spawns
lib/file/worker.js - File worker bridge → Native dispatch: dispatches request
- Native dispatch → Worker request contract: validates request
native/src/lib.rs - Native dispatch → Native file operations: dispatches file tools
native/src/lib.rs - Native file operations → Path confinement: uses path handling
native/src/file.rs - DSH user / agent → Background job tools: starts or manages jobs
README.md - Component registration → Background job tools: publishes job tools
lib/index.js - Background job tools → Job management: manages jobs
- DSH user / agent → PTC tool contract: requests batch or result
README.md - Component registration → PTC tool contract: loads opt-in component
README.md - PTC tool contract → PTC worker bridge: defines tool operations
lib/ptc/index.js - PTC worker bridge → Permission checks: checks authorization
lib/ptc/worker.js - PTC worker bridge → Workspace preparation: prepares workspace
lib/ptc/worker.js - PTC worker bridge → DSH policy and process services: confines and spawns
lib/ptc/worker.js - PTC worker bridge → PTC runtime discovery: resolves worker
lib/ptc/worker.js - PTC runtime discovery → Native worker executable: selects executable
lib/ptc/runtime.js - PTC worker bridge → Native dispatch: dispatches request
- Native dispatch → Batch execution: runs batch
native/src/lib.rs - Native dispatch → Paged results: runs result queries
native/src/lib.rs - Native dispatch → Audit and result store: opens durable store
native/src/lib.rs - Batch execution → Paged results: stores bounded results
native/src/batch.rs