Introduction

DeepSeek Harness (DSH) uses a plugin-based architecture that allows developers to extend functionality as needed. When building automated agents or workflows, you often encounter scenarios that require scheduled command execution, execution history logging, and failure retry handling. The dsh-delivery-ledger plugin is designed for exactly this purpose. It combines scheduled task scheduling with a delivery ledger and borrows from the delivery_obligations governance logic used by Hermes Agent.

Plugin Positioning

This is a scheduled task executor and delivery ledger. The plugin generates a ledger entry for each task execution, supports status-based queries, and provides a resend mechanism. Its core value lies in window-aligned deduplication and Hermes-style resend semantics, ensuring that repeated tasks are not executed redundantly due to process jitter.

Core Features

  • ledger_create: Registers a scheduled task by specifying the command to execute and the interval in seconds. The plugin includes its own scheduler and triggers on aligned windows.
  • ledger_list: Queries the ledger, with filtering by status (ok/failed/abandoned).
  • ledger_retry: Resends the most recent failed or abandoned window. On resend, the attempt value increments while dueAt remains unchanged.

Design and Limitations

  • Storage: The ledger uses an append-only JSONL format and is stored at $DSH_HOME/ledger/<task-id>.jsonl.
  • Execution Mechanism: Window alignment (interval boundaries) plus same-window deduplication prevents duplicate execution caused by process jitter. Commands are executed via /bin/sh -c with a 10s timeout.
  • Scheduling State: The task registry is kept in memory only; there is no persistent scheduling across processes (v1 boundary).
  • No Dependencies: Zero network, zero LLM calls; purely local execution.

Installation and Activation

Install the plugin in a DSH environment:

dsh plugin --profile web add "github:leetom314/dsh-delivery-ledger#main"

Typical Usage

  • Register a Task: Call the ledger_create interface with the command and interval.
  • View the Ledger: Call the ledger_list interface with a filter (for example, view only the failed status).
  • Resend Retry: Call the ledger_retry interface to resend a specified task.

Use Cases and Notes

This plugin is suitable for scheduled task scenarios that require strict auditing and deduplication control. When using it, note the following:
* Task scheduling is currently kept in memory only; registered tasks will be lost after a process restart (v1 limitation).
* Code execution depends on the permissions of the current DSH process.
* It is recommended to review the source code and license (MIT) before installation.

Conclusion

The above describes the core features and usage of dsh-delivery-ledger. For more details, see the plugin catalog page or the GitHub repository.