Introduction¶
In DeepSeek Harness (DSH), sessions are displayed grouped by workspace. The official client separates “directory no longer exists” and “session archiving” into two distinct mechanisms: when the directory cannot be verified, new sessions cannot enter the workspace, and existing sessions tend to scatter into “No Project” in the sidebar. If you use the “Remove Project” menu and then re-add the same directory, you often start with an empty project, and old sessions are not automatically restored. Daily tasks like switching drives, changing paths, or temporarily moving project folders can easily clutter the sidebar.
The following introduces the community plugin dsh-plugin-workspace-archive (Maintainer: WindFromKadath, Category: Workflow). Without modifying app.asar or writing to the official storages/ and sessions/ directories, it uses official APIs to bridge the link between “workspace disappearance” and “session archiving / grouping,” and is published on npm with zero runtime dependencies.
What is this¶
dsh-plugin-workspace-archive is a Cordis plugin for DSH: when a registered workspace directory is deleted or moved, it archives the sessions registered by the plugin under that path. When the same directory or registration reappears, it unarchives them and attaches the members in the ledger back to that workspace. It also supports automatically attaching sessions in “No Project” whose working directory exactly matches a registered path. Manual archiving of an entire workspace can be triggered via the model tool workspace_archive or slash commands in the input box; these use a separate ledger from the automatic flow and do not revoke each other.
Plugin bookkeeping is stored in a sidecar file within the DSH home directory. It relies solely on official APIs (e.g., Workspace.attachSession) and does not import packages other than the standard library.
Core Features¶
Automatic: Directory Disappearance and Return¶
| Trigger | Result |
|---|---|
| Registered workspace directory is deleted or moved | Archives plugin-registered sessions under that path (hidden in the default sidebar view, still visible in “All Conversations”) |
| Menu “Delete Workspace” (folder still exists) | Also treated as disappearance and archived; official deletion of the registration is immediate, and the plugin does not wait for the confirmation window |
| Directory or registration returns | Unarchives sessions archived by the plugin and attaches all members in the ledger back to the workspace at that path (including sessions you manually archived before disappearance—they remain archived but return to their respective groups) |
Directory absence goes through a default confirmation window of approximately 3 seconds (confirmDelayMs) to avoid false triggers during network drive lag or renaming processes; “Delete Workspace” is processed immediately if the plugin has already seen the registration in the current run.
Startup Attachment: Orphaned Sessions in “No Project”¶
Approximately 5 seconds after startup (adoptDelayMs), if a session is not in any workspace member list and its working directory in the header exactly matches a registered workspace path (after normalization), it is automatically attached to that workspace. This can be disabled by setting adoptUngrouped: false. This logic runs only once at startup.
Manual: Whole Workspace Archive and Restore¶
- Model-invoked tool
workspace_archive:action='archive'archives sessions in that workspace that are not yet archived by the official system;action='unarchive'only restores the batch tracked by this tool, leaving those you manually archived via the official interface untouched. - Input box commands (registered by host
dsh-commands, optional in the command modal): /archive-workspace <path or title>/restore-workspace <path or title>
Manual archiving and automatic archiving are two separate lists: if a directory “disappears and returns,” sessions you manually archived for the whole workspace will not be automatically released; the automatically archived batch cannot be mixed into the manual list via accidental operations other than /restore-workspace.
Three Rules (Constraints from the README)¶
- Sessions you archive yourself in the official interface will not be automatically unarchived by the plugin; they remain hidden after being attached back to the group until you manually unarchive them.
- Archiving/restoring generally only processes sessions recorded in the plugin’s ledger; it does not reverse-lookup by working directory (the only exception is the “No Project” attachment at startup).
- Manual and automatic lists do not revoke each other.
What It Cannot Do¶
Under the premise of using only official APIs, it cannot “migrate” a session from one workspace to another (this requires changing the cwd in the session log, for which there is no public API). The plugin does not delete sessions, delete folders, or perform cross-machine synchronization. Renaming a directory is equivalent to a new path; if it does not match the cwd when attaching back, the plugin only logs the event and does not modify data.
Environment Requirements¶
- DSH Desktop or CLI; development and verification baseline is
0.2.0-rc.2(dsh.engines.dshinpackage.jsonis>=0.2.0-rc.2 <0.3.0). - Node.js 22.5+ (provided by the host).
- Zero runtime dependencies.
Installation and Activation¶
Installation from npm is recommended (README states 0.1.0 has been available since 2026-10-08; the current release version in the repository is 0.2.0 per the CHANGELOG):
dsh plugin add dsh-plugin-workspace-archive
To pin a specific version:
dsh plugin add dsh-plugin-workspace-archive@0.2.0
You can also install via a local directory link as described in the README, or use GitHub specifications (e.g., dsh plugin add github:WindFromKadath/dsh-plugin-workspace-archive#<commit>).
You must restart DSH after installation: plugins and bundles are loaded at startup, and hot-reloading is not supported.
Profile patches can override default values (defined in resolveConfig in src/index.js). Common options include: dryRun, confirmDelayMs, pollIntervalMs, watch, adoptUngrouped, adoptDelayMs.
Typical Usage¶
- Install and restart DSH, then use your workspaces normally; the plugin registers members in the background and archives or restores them when directory changes occur.
- Temporarily move or delete a project folder: after the confirmation window, registered sessions under that workspace will be archived; after the folder or registration is restored, sessions will be unarchived and return to the sidebar group.
- When you don’t want to wait for the model, execute
/archive-workspace /path/to/projector match by title in the input box; use/restore-workspaceto restore (only restores the batch archived by this command/tool). - If you do not want to automatically claim “No Project” sessions at startup, set
adoptUngrouped: falsein your profile.
Use Cases and Notes¶
Who is it for: DSH users who frequently move, rename, or temporarily remove project directories; developers who want sidebar grouping and session archiving status to align with folder lifecycle without manually modifying official storage files.
Permissions and Security: The plugin runs with the current DSH process permissions and can call official workspace and session APIs. Before installation, it is recommended to review the source code and the MIT License on GitHub to ensure compliance with your environment policies.
Ecosystem Note: DSH adopts an “everything is a plugin” extension approach; community directories like SkillHub are independent sites and have no official affiliation with DeepSeek / Hikvision (Fantasy Field). The 0 GitHub stars for this plugin (directory page data) does not mean the functionality is unverified—the repository provides npm test (157 offline assertions) and npm run rm-test (69 real-device DSH runtime assertions), neither of which touches a real profile.
Other Limitations: If “Delete → Re-add” occurs while the plugin is not running, the attachment is based on the last snapshot of the sidecar; newly appearing orphaned sessions may require a restart to be grouped again. Archiving does not equal hiding the workspace row; the official client may still display empty groups.
Links¶
- Community Directory Page: https://www.skillhub.cn/plugins/WindFromKadath/dsh-plugin-workspace-archive
- Source Code and README: https://github.com/WindFromKadath/dsh-plugin-workspace-archive
Following the steps above, you can maintain consistency between workspace directory deletion, moving, and returning, and sidebar session archiving and grouping, without touching official session files. When you need to consolidate an entire workspace, simply use slash commands or workspace_archive.