DSH Timegap Plugin

August 22, 2026 ยท View on GitHub

A local DSH bundle that injects elapsed-time context when a user resumes a conversation after an idle interval.

Local Plugin Layout

This project follows the local DSH plugin layout used by the other projects under D:/Programs:

  • package.json declares an ESM package and dsh.bundle.patch.
  • cordis.patch.yml inserts the package by its npm name.
  • index.js exports the named name, inject, and apply plugin API.
  • The web profile links the project through link:D:/Programs/dsh-timegap-plugin and lists @doiiarx/dsh-timegap-plugin in dsh.profile.bundles.

This keeps the plugin source, bundle declaration, and profile lifecycle together. Do not mount the implementation as a standalone file from $DSH_HOME/cordis.patch.yml.

Behavior

On the first model step after a user message, the plugin compares the current time to the most recent model-visible session event. If the elapsed time meets thresholdMinutes (default: 60), it appends a plugin-sourced user message containing relative elapsed time and absolute timestamps. It suppresses repeated notices for the same idle interval.

timegap_config reads or changes the in-memory enabled and thresholdMinutes settings. These values reset when the DSH host restarts.