dsh-workspace-curator 0.0.0-stage → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 chenxubin2016
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,77 @@
1
- # Temporary Holding Version
1
+ # Workspace curator
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ A DeepSeek Harness (DSH) plugin that adds one **Settings → Workspace curator**
4
+ page for workspace and session housekeeping.
5
+
6
+ ## Features
7
+
8
+ - Lists ungrouped sessions first, then every workspace with its canonical path
9
+ and session count.
10
+ - Adds a workspace from an existing folder (system folder picker or typed path).
11
+ - Renames a workspace and moves it up or down in the registry order.
12
+ - Removes a workspace registration; its folder and sessions stay, and the
13
+ sessions move to **Ungrouped**.
14
+ - Opens a session, archives or restores it, and permanently deletes it.
15
+ - Archiving a running session asks first, then stops its work and archives it.
16
+ - Shows archived, pinned, and running badges, and disables Delete with a
17
+ visible reason when the Host cannot accept it.
18
+
19
+ ## Install
20
+
21
+ From the plugin market: search for **Workspace curator**, or install from npm:
22
+
23
+ ```sh
24
+ dsh plugin --profile web add dsh-workspace-curator
25
+ ```
26
+
27
+ Desktop users install through **Settings → Plugins**. Use the profile name your
28
+ Host actually runs instead of `web` when it differs.
29
+
30
+ Requires DSH `0.2.2-rc.1` or newer.
31
+
32
+ ## Permanent session deletion
33
+
34
+ DSH's session persistence seam has no delete verb, so this bundle ships a small
35
+ Host endpoint. Before removing anything it:
36
+
37
+ 1. collects the session and its subagent descendants;
38
+ 2. refuses while any member is live in this Host process;
39
+ 3. refuses while a composed activity provider reports running work (a turn,
40
+ subagent, background job, or reminder);
41
+ 4. validates every log directory against the persistence-reported layout;
42
+ 5. removes the session log directories;
43
+ 6. detaches the ids from workspace accounts, the archive set, and the pin set;
44
+ 7. announces removal so open pages drop the rows.
45
+
46
+ Only session logs are removed. Uploaded attachments, projection caches, and
47
+ usage statistics are not reclaimed. Deletion is permanent; use **Archive** when
48
+ you only want to hide a session.
49
+
50
+ A session opened during the current DSH run cannot be deleted until the Host
51
+ restarts, because its live Agent still owns a write handle.
52
+
53
+ ## Endpoint trust
54
+
55
+ `/api/workspace-curator` is an exact Fetch route on DSH's shared `/api` channel.
56
+ The connection layer authenticates the browser cookie and applies its
57
+ Host/Origin fence before the handler runs. The handler additionally requires
58
+ `x-workspace-curator: 1` and `content-type: application/json` on `POST`, which a
59
+ cross-site form or simple fetch cannot send. A request without a valid browser
60
+ session receives the connection layer's `401` and never reaches deletion.
61
+
62
+ Run a single DSH Host per session store. The lock file in a session directory is
63
+ an empty placeholder and cannot distinguish an idle session from one another
64
+ Host process is writing.
65
+
66
+ ## Development
67
+
68
+ The package is a plain ES module bundle; no build step is required.
69
+
70
+ - `index.js` — Host route and request handling.
71
+ - `session-delete.js` — deletion tree, activity checks, and storage validation.
72
+ - `client.js` — Settings page registered through the Web client module table.
73
+ - `cordis.patch.yml` — inserts the plugin row.
74
+
75
+ ## License
76
+
77
+ MIT