Artifact Vault: Establishing Ownership and Version Control for DSH Session Files

Introduction

The default DSH workspace is a single flat, sprawling folder where files generated across different sessions are all mixed together, and you can only guess which session owns a file based on its name. As sessions accumulate, files scatter, versions get tangled, and disk usage becomes opaque—making it increasingly difficult to track and clean up agent development work.

Artifact Vault solves this by reading session event logs to attribute files to their originating sessions, grouping them by version, and providing a visual management interface with a recycle bin. Each session gets its own dedicated workspace, transforming a “jumble of scattered files” into a manageable inventory.

Plugin Overview

Artifact Vault is a DSH plugin maintained by Zjb0702, categorized under admin-security. It creates an independent workspace folder for each session, tracks tool write paths to identify file ownership, and supports version grouping, status tagging, untracked file cleanup, a recycle bin, and C-drive disk usage analysis.

Core Features

Session Workspaces

Once enabled, each session gets its own dedicated folder under the project directory:

<project-directory>/sessions/20261118-a1b2c3d4/
├── tools/      Temporary scripts, probe code, and one-off commands written at runtime
└── artifacts/  Deliverables: documents, spreadsheets, presentations, images, data, archives

The folder name is composed of the session creation date and an 8-character short ID derived from the session ID (alphanumeric only, avoiding 0/o/1/l/i to prevent ambiguity). The plugin injects workspace conventions into the model’s context: tools/ for scripts, artifacts/ for deliverables. New sessions follow this automatically.

Session Identification & File Attribution

Rather than relying on file names or manual registration, the plugin reads each session’s own event log (write paths recorded in tool/call events) to reconstruct “which files this session wrote.”

  • Historical sessions are indexed as well—no prior plugin installation required
  • Only paths actually written by tools are recorded, including write / edit / apply_patch operations and files declared via present
  • Files produced by subagents are merged back into their parent session
  • Session titles are taken from the session’s own title (session/title record); if a title hasn’t been generated yet, it falls back to the first user message

Four Tabs

Tab Purpose
Sessions One row per session: title, short ID, artifact count, disk usage, last activity time. Click to expand details: workspace folder, counts and sizes for the tools/artifacts/loose partitions, and a version list grouped by “directory + filename (version suffix stripped) + extension” (v1, v2 …).
Untracked Scans the workspace for files not associated with any session, grouped by top-level directory (collapsed by default). Use “Delete Folder” to recycle an entire folder at once, or expand and select rows for “Delete Selected” batch recycling.
Storage Top section shows cleanup priority cards (① tool scripts → ② artifacts → ③ loose files, cleaned in stages), a workspace enable toggle, a per-session usage bar chart ranked by size, and the recycle bin: restore, permanent delete, empty.
Duplicates Finds duplicate files by content hash, showing which sessions own each file and how much space the duplicates consume.

Version Grouping & Status Tags

Files like 方案 v1.docx / 方案 v2.docx / 方案-最终版.docx in the same directory are grouped together, numbered by first write time. Each version carries a status tag:

  • Labeled: Formally delivered via the present tool in the session (or manually labeled by you), indicating it’s a meaningful deliverable rather than an intermediate file
  • Inferred: Path came from low-confidence signals like shell redirection or cp—possibly an intermediate product
  • Modified After: File was changed after the session ended
  • Missing: The recorded file no longer exists (deleted or moved)

Management Actions

  • Copy Path, Copy Folder Path, Download (retrieve file directly in the browser)
  • Recycle: Moves to the plugin’s own recycle bin (manifest at <DSH_HOME>/artifact-vault/index.json, file bytes stored in .dsh-artifact-vault-trash/<id>/ on the source file’s drive). The file disappears from its original location immediately but can be restored
  • Bulk folder deletion / Batch delete: When a folder contains 100+ files, no need to click one by one—use “Delete Folder” to recycle the whole folder, or select multiple rows for batch recycling
  • Bulk restore from recycle bin: A recycled folder exists as a single entry; restoring puts the entire folder back in place. Artifact groups are collapsed by default—click the header row to expand the version list
  • Partition-based cleanup: On the session detail page, clean tools/ (scripts), artifacts/ (deliverables), and loose files separately; on the “Storage” tab, clean across all sessions in stages
  • Label: Assign a readable name to a version so you can recognize “Client Final Version” at a glance next time
  • Scan & Update: Index new sessions and new writes; Refresh Sizes: Recalculate file sizes
  • Sort: Session list, session usage, artifact versions, and recycle bin all support sorting by size / modification time / name / session usage, with ascending/descending toggle
  • C-drive Usage Analysis: Bottom of the Storage tab shows ~/.dsh category breakdown, lists safe-to-free plans (logs from deleted sessions, re-downloadable/rebuildable plugin caches). Before cleanup, displays reclaimable space and impact scope. Check items and confirm to execute. Never touches workspace artifacts, tool scripts, or active session logs

Tool for the Model

The plugin registers an artifact_declare tool: the model can use it to register deliverables when handing them off:

{ "path": "artifacts/方案.docx", "label": "客户最终版", "note": "含报价" }

Registered artifacts appear directly as “Labeled” under the corresponding session—no path guessing involved.

Configuration Options

These keys can be set in the bundle’s patch line config:

Key Default Description
sessionFolders true Enable “one workspace folder per session”; disable to revert to a single flat directory
sessionsDirName sessions Parent directory name for workspaces
toolsDirName tools Subdirectory name for tool scripts
artifactsDirName artifacts Subdirectory name for deliverables
sessionFolderRoot "" Specify where workspaces are created; empty uses the session’s original working directory
autoAdoptSessions true New sessions automatically switch into their own workspace
adoptSessionsCreatedAfter 0 Time lower bound for auto-adoption (millisecond timestamp); 0 means use the plugin’s current startup time, i.e., only auto-adopt sessions created after startup; older sessions must be enabled manually in the panel
skipSessionIds [] Session IDs excluded from workspace adoption
keepBaseWritable true Retain write permissions on the project root after switching workspace
promptRule true Inject tools/ artifacts/ conventions into the model’s context
trashOnSourceDrive true Recycle bin bytes stored on the source file’s drive (instant rename, no home-drive space used); false reverts to old behavior at <DSH_HOME>/artifact-vault/trash/
trashDirName .dsh-artifact-vault-trash Same-drive staging directory name (located under each scan root)
autoScan true Background periodic incremental session indexing
scanIntervalMinutes 10 Periodic scan interval (minutes)
maxScanPerBatch 6 Max sessions read per scan
includeSubagents true Merge subagent artifacts into parent session
roots [] Additional scan root directories; empty means use each session’s working directory
maxUntrackedDepth 4 Directory depth for “Untracked” scan
maxUntrackedFiles 6000 File cap for “Untracked” scan
ignoreDirs node_modules, .git, .venv, etc. Directory names skipped during “Untracked” scan (dependencies and cache dirs; output dirs like out/dist are NOT skipped unless you add them yourself)

Index and recycle bin data are stored under <DSH_HOME>/artifact-vault/ (default ~/.dsh/artifact-vault/) as a pure JSON file—delete it to reset.

Installation & Enablement

Install via the official command in DSH:

dsh plugin add github:Zjb0702/dsh-artifact-vault

After installation, open Settings (gear icon, bottom-left) → the “Artifact Vault” section in the left navigation. The page contains four tabs: Sessions / Untracked / Storage / Duplicates.

Use Cases & Notes

Suitable for users who need to manage agent session output files, track file ownership, and clean up disk space.

Note: The plugin runs with the current DSH process’s permissions. Review the source code and license before installing. The plugin only tracks files written via tool calls—files generated by manually typed terminal commands or written by other editors will not be automatically attributed to a session; they will appear under “Untracked.”

Ecosystem Context

DeepSeek Harness (DSH) is built on the philosophy of “everything is a plugin.” The community directory is an independent site with no official affiliation to DeepSeek or High-Flyer.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye