Introduction

When developing agents using dsh web, there are often moments where the agent has written a batch of files in the workspace, and you want to browse the directory, check logs, or take a screenshot yourself instead of letting the model describe them one by one. Common approaches involve setting up a separate static file service—adding another process and port to maintain; or falling back to the terminal to type ls, which slows down efficiency when there are many files.

DSH’s philosophy is “everything is a plugin”. The @open-agfs/dsh-agfs introduced below is a concrete implementation of this idea: it mounts the file browser web application directly onto the dsh web host webserver, without opening a separate port or spawning a subprocess.

What is @open-agfs/dsh-agfs

Maintained by openAGFS, MIT licensed, current version 0.1.9. It consists of three parts:

  • A React frontend and REST API provided by the host webserver;
  • A /dsh-agfs dialog command;
  • Two model tools: browse_files and read_file.

The division of labor is clear: humans browse, search, preview, and organize files in the browser; the model lists, searches, and reads text files under the browse root via tools. Both parties face the same browse root, so there is no need to start a separate service just for “viewing files”.

Core Features

File Browsing

  • List and search, text preview (markdown, code, logs), image preview;
  • Folder creation, renaming, copying, deletion;
  • Breadcrumb navigation to go back to the root directory step by step;
  • View switching (list/card grid) and three display sizes (window panel, full view, fullscreen);
  • Sidebar provides project directories, quick access (Desktop/Downloads/Documents, etc.), custom root directory, and drives;
  • Toolbar search supports recursive mode with a limit of 200 matches.

The frontend is distributed offline with the package: React/ReactDOM are bundled inside the package, so startup requires no CDN and no Babel dependency (icons are still loaded via cdnjs, see known limitations below).

Session Integration

  • Open locally (local mode only): A floating button in the bottom right corner allows opening the current directory in the system file manager;
  • One-click AI analysis (local mode only): Right-click on a file or folder and enter requirements; dsh will create a workspace and wake up a new session for analysis.

Model Tools

The plugin registers two model tools:

  • browse_files (parameters path, keyword, recursive): Lists directories, or searches for entry names by keyword, optionally recursive;
  • read_file (parameter path): Reads the content of text files under the browse root.

With these two tools, the model can directly view directory structures and file contents, not just filenames.

Path Security and Response Headers

Browsing is restricted to the browsable root; when strictRoot is enabled, real path checking is performed, and symlink/junction escapes are intercepted and return a 400 envelope. There is also a readOnly read-only mode and remoteMode. The response carries security headers: X-Content-Type-Options: nosniff, X-Frame-Options: DENY, Referrer-Policy: no-referrer.

The API endpoint is located under ${basePath}/api/file_browser/, and the path is also restricted to the browsable root; search supports recursive=1 with a limit of 200 matches and a directory depth limit of 5.

Installation and Activation

The plugin is installed via a single line of dsh.bundle, activated via profile layer. Node version requirement: ^22.19.0 || >=24.0.0.

Method 1: Dialog Installation

Directly ask the agent to install in the DeepSeek Harness dialog, for example:

Install the file-browser plugin dsh-agfs

The agent will invoke the shell tool to execute:

dsh plugin --profile web add @open-agfs/dsh-agfs

This chain requires the agent’s shell tool (bash/pwsh) to be available. The web profile disables the shell tool by default; it needs to be enabled in Settings → tools/permissions, or allowed when the agent requests approval. If it is inconvenient to enable the shell tool, use Method 2.

Method 2: CLI One-line Installation

dsh plugin --profile web add @open-agfs/dsh-agfs

Upgrade to the latest version:

dsh plugin --profile web add @open-agfs/dsh-agfs@latest

Regardless of the method, the dsh web needs to be restarted after installation for changes to take effect.

Source Code Overlay (Development & Debugging)

Starting from a repository checkout, you can mount the source code via --patch:

- insert:
    - id: dsh-agfs
      name: 'file:///absolute/path/to/dsh-agfs/src/index.ts'

Then run dsh web --patch ./overlay.yml.

Typical Usage

After the steps above, run in the dialog:

/dsh-agfs

The system’s default browser will open the file browser and report the URL; when the current session has a workspace directory (session cwd), the browser will directly locate to that workspace.

If openOnCommand: false is configured, this step only reports the URL and does not automatically open the browser.

Configuration

Configuration is stored in the profile’s user patch layer ($DSH_HOME/profiles/<name>/cordis.patch.yml):

- id: dsh-agfs
  config:
    fileRoot: 'D:/projects/my-project'
    readOnly: true

Common configuration options:

  • fileRoot: The root directory of the file browser;
  • readOnly: Read-only mode;
  • strictRoot: Real path checking to intercept symlink/junction escapes;
  • remoteMode: Remote mode;
  • openOnCommand: Whether /dsh-agfs automatically opens the system default browser.

Suitable Scenarios and Precautions

Suitable scenarios: performing daily development in dsh web and needing to manually verify files produced by the agent; wanting the model to have the ability to list directories, search entry names, and read text files without needing to maintain a separate file service for this purpose.

Precautions before use:

  1. The plugin runs with the permissions of the current dsh process. Before installing, it is recommended to read the source code and license (MIT) to ensure it meets your security requirements.
  2. Font Awesome icons are still loaded from cdnjs. The application itself is usable without a network (React/ReactDOM are distributed with the package), but icons will be missing.
  3. Search only matches entry names; recursive content search is not implemented. Recursive mode has a limit of 200 matches and a directory depth limit of 5.
  4. Thumbnails are transmitted directly as original images without scaling.
  5. The browser triggered by openOnCommand opens on the host running dsh, which might be unexpected behavior for remote clients.

Conclusion

A quick recap: @open-agfs/dsh-agfs mounts the file browser into the dsh web host process, without opening ports or spawning subprocesses; /dsh-agfs goes directly to the current session’s workspace, and browse_files and read_file allow the model to view files under the browse root directly. If you are using DSH for development, it is worth a try.

  • GitHub repository: https://github.com/openAGFS/dsh-agfs
  • Community directory listing: https://www.skillhub.cn/plugins/openAGFS/dsh-agfs (An independently maintained community directory site, with no official affiliation to DeepSeek / Hypothesis)