Introduction¶
DeepSeek Harness (DSH) uses an “Effects” mechanism to manage plugin lifecycles, allowing plugins to be destroyed together with their owners. This mechanism is very strong for resource cleanup, but when a plugin fails to load, hangs, or unloads slowly, diagnosing the specific problem from raw logs is very difficult.
dsh-lifecycle-inspector is a standalone community plugin designed to translate DSH’s internal lifecycle state into operator-friendly dashboards and concise diagnostic commands, helping developers quickly locate issues.
What Is This¶
dsh-lifecycle-inspector is a DeepSeek Harness plugin for visualizing Cordis Effects lifecycle diagnostics, checking plugin health status, and validating Teardown cleanup processes.
- Maintainer: Rex16200513
- License: MIT License
- Positioning: A standalone community plugin specifically designed for DSH. It follows DSH’s plugin-first architecture and works by observing existing Cordis lifecycles rather than modifying the Agent loop.
Core Features¶
The plugin provides the following capabilities:
- Native DSH Web dashboard: Provides a health overview, search, filtering to show only problematic items, refresh, and expandable Effect details in Settings → Plugins → Lifecycle.
- Readable lifecycle reports: Classifies underlying Effect labels into services, event listeners, commands, tools, subplugins, and cleanup-sensitive resources.
- Fiber health signals: Highlights failed, hanging, and unloading plugins, and distinguishes active, disabled, destroyed, and unmounted entries.
- Teardown observation: Records recent Fiber transitions and marks cleanup operations that exceed configurable thresholds.
- Agent diagnosability: Exposes a read-only
lifecycle_inspecttool and also supports the/lifecyclecommand. - Lifecycle-safe implementation: The plugin’s own commands, tools, event listeners, HTTP routes, localization, and UI slots are all registered as destroyable Effects.
- Bilingual support: The UI and documentation support English and Chinese, following DSH’s current locale.
Installation and Activation¶
Before installing, ensure the environment meets the requirements:
* DSH Web profile
* Node.js ^22.19.0 || >=24.0.0
Install using the following command:
dsh plugin --profile web add github:Rex16200513/dsh-lifecycle-inspector
After installation, restart the DSH Web process and find the plugin in Settings → Plugins → Lifecycle.
Usage¶
The plugin provides both a CLI tool and an Agent tool.
CLI¶
/lifecycle list
/lifecycle list --verbose
/lifecycle inspect lifecycle-inspector
/lifecycle inspect <plugin-id> --verbose
list: Provides a short health summary.inspect: Accepts a loader path, configured entry ID, full package name, or package name without thedsh-prefix. Add--verboseonly when precise Effect labels are needed.
Agent Tool¶
The Agent can call the read-only lifecycle_inspect tool, which accepts an optional plugin parameter to observe runtime state. It does not unload or modify the plugin.
Configuration¶
The plugin is installed via a DSH patch and includes the following default configuration:
- insert:
- id: lifecycle-inspector
name: dsh-lifecycle-inspector
config:
slowTeardownMs: 2000
historyLimit: 100
slowTeardownMs: Controls when an observed teardown is reported as slow.historyLimit: Limits the number of Fiber transition history entries retained in memory.
Scope and Limitations¶
The plugin validates whether the Cordis Effects tree has been cleaned up—in other words, whether Cordis has completed cleanup for every registered disposer it manages. It cannot prove that the plugin did not create processes, timers, sockets, observers, or other resources outside DSH.
Although external resource probing is a natural direction for feature extension, it should remain in separate providers: the core inspector should remain read-only and report authoritative Cordis state.
Conclusion¶
dsh-lifecycle-inspector provides the ability to examine DSH plugin lifecycles from an internal perspective, suitable for developers who need strict monitoring of resource cleanup processes. Its bilingual documentation and UI lower the barrier to use.