The DeepSeek Harness (DSH) ecosystem emphasizes extending capabilities through plugins. During development and debugging, agents need to inspect logs to locate issues, but reading all logs directly can exceed the context window limit. dsh-loglens is designed to solve this problem. It provides Harness with a set of bounded, cursor-aware log inspection tools and renders compact log snapshots in the web interface.

Plugin Positioning

dsh-loglens is a DeepSeek Harness plugin maintained by Monicaxixi. It does not act as a general-purpose log viewer, but provides a set of tools for the model to read, parse, and reset log cursors.

Core Capabilities

The plugin implements its core functionality through four model-facing native tools:

  1. Bounded Windows and Source Management: Supports file sources and configured shell commands. File reading is based on byte offsets and inode checks; command output is size-limited in memory. The model receives configured source IDs, rather than arbitrary commands or paths.
  2. Data Processing: Supports parsing bounded windows, normalizing log severity, grouping duplicate entries, and generating issue fingerprints.
  3. State Management: Uses cursors to track incremental read progress; state is stored atomically in .dsh/.loglens/state.json.
  4. Tool List:
    • logs_list: Lists configured sources and current cursor state.
    • logs_read: Reads a bounded window and returns normalized, fingerprinted compact snapshots.
    • logs_raw: Looks up by event ID or fingerprint to retrieve cached raw events.
    • logs_reset_cursor: Resets the cursor for a specific source to restart incremental reading.

Installation and Activation

Install the plugin to the specified Harness profiles:

dsh plugin --profile headless add github:Monicaxixi/dsh-loglens
dsh plugin --profile web add github:Monicaxixi/dsh-loglens

After installation, restart the corresponding profile. Add a .dsh/logs.yml file to the root directory of the project being inspected. The plugin does not read logs until sources are configured.

Usage Notes

  • Data Limits: Output, caches, and returned events are bounded to prevent context overflow.
  • Dependencies: The host package has no additional runtime dependencies; the browser package declares React as a peer dependency.
  • Security: Commands run with Harness process permissions. Do not place secrets in command-line arguments or .dsh/logs.yml. If a configuration file contains private paths or credentials, do not commit it to version control.
  • Fingerprinting Settings: The fingerprinting feature replaces volatile fields such as timestamps and UUIDs. Review the relevant settings before enabling it on sensitive logs.