AI Agent Hub
Back to plugins
⚙️

dsh-plugin-hooks-ordering

Workflow Updated 2026.08.25

Run the following command in DeepSeek Harness:

dsh plugin install xinyuehtx/dsh-plugin-hooks-ordering

Paste the following prompt into your AI chat to install this plugin:

In DeepSeek Harness, run the command `dsh plugin install xinyuehtx/dsh-plugin-hooks-ordering` to install this plugin, which provides deterministic ordering for your Cordis hooks. Source: https://github.com/xinyuehtx/dsh-plugin-hooks-ordering

About this plugin

In the Cordis framework, hook execution order often relies on the randomness of plugin loading, making critical logic like "authentication must run before logging" unreliable. Traditional prepend can only decide "whether to be at the front," and suffers from a "last-wins" race condition, while inject dependencies are too rigid to handle flexible cross-plugin relative ordering. dsh-plugin-hooks-ordering introduces a "coordinator" mechanism to provide stable deterministic ordering for both waterfall and serial hooks. It uses a topological sort algorithm, allowing developers to precisely control plugin execution order simply by declaring before and after names, completely freeing them from the shackles of load timing. Additionally, the plugin supports a visualizable constraint DAG log to facilitate debugging complex dependencies.

Use Cases

  • Ensuring authentication logic executes before logging.
  • Coordinating hook order for multiple independent contributing packages in DeepSeek-Harness.
  • Replacing random load order with declarative before/after configuration.

Best For

  • Cordis framework developers responsible for workflow orchestration.
  • DeepSeek-Harness ecosystem maintainers needing stable dependencies.
  • Independent plugin authors encountering order conflicts.