dsh-localdesk 0.0.0-stage → 0.4.2

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/CHANGELOG.md ADDED
@@ -0,0 +1,69 @@
1
+ # Changelog
2
+
3
+ All notable changes to this package. Format follows [Keep a Changelog](https://keepachangelog.com/), versions follow SemVer.
4
+
5
+ ## 0.4.1 - 2026-11-23
6
+
7
+ ### Added
8
+
9
+ - `GET /dsh-mydesk/state` carries the Host version, and the desk warns when the Host half is older than the loaded page, telling the user to restart DSH. This covers the case where a client update lands but the Host module is still the previous generation.
10
+
11
+ ### Fixed
12
+
13
+ - The "+N not shown" line no longer appears while a filter is active; the hidden count refers to rows the filter never evaluated.
14
+
15
+ ## 0.4.2 - 2026-11-24
16
+
17
+ ### Changed
18
+
19
+ - Renamed the package from `dsh-mydesk` to `dsh-localdesk`: the old name was published to npm by another author before this package could claim it. Routes moved to `/dsh-localdesk/*`, slot ids to `localdesk` / `localdesk-island`, and the test seam to `DSH_LOCALDESK_HOME`. Display name ("My desk" / 「我的工作台」) is unchanged.
20
+
21
+ ## Unreleased
22
+
23
+ ### Fixed
24
+
25
+ - The freshness label no longer claims "updated just now" after a failed refresh; it keeps the last successful read time, matching the stale banner.
26
+ - The island pill labels its total when every item is idle, instead of showing a bare number.
27
+
28
+ ## 0.4.0 - 2026-11-23
29
+
30
+ ### Added
31
+
32
+ - Desk search box (title, path, owner, meta, tags) and status chips (All / Running / Waiting / Changed). Filtering is client-side; the summary stays global and section counts follow the filter.
33
+ - i18n coverage guard in `test/probe.mjs`: every `t('key')` must exist in both dictionaries, and EN/ZH key sets must match (68 keys each).
34
+
35
+ ### Changed
36
+
37
+ - Kim verdict recorded: its local databases are SQLCipher-encrypted and only the external `mycli` can read them, so Kim stays covered by the generic app-data watcher (decision D11).
38
+ - Locale metadata and README describe the full source list and the island.
39
+
40
+ ## 0.3.0 - 2026-11-23
41
+
42
+ ### Added
43
+
44
+ - Frame-wide island in `shell.overlay`: collapsed run/wait/changed counts (10s), expandable card with the top five items and an **Open desk** button (2.5s while open), Esc/outside-click to collapse, hidden when there is nothing to show.
45
+ - Shared `activateItem` routing for desk rows and island rows.
46
+
47
+ ## 0.2.0 - 2026-11-23
48
+
49
+ ### Added
50
+
51
+ - `codex` source: parses `~/.codex/sessions/**/rollout-*.jsonl` (head 256KB, tail 64KB, per-file cache) for project, event count, CLI version, provider, and running/idle/done from `task_started` / `task_complete` / `turn_aborted`.
52
+ - `wechat` source: reads DSH's own `~/.dsh/channel-wechat/peer-sessions.json` and channel-log mtime; never touches WeChat's store.
53
+ - `files` source: newest change under `.claude`, `.cursor`, and Kim's known data subdirectories.
54
+ - `DSH_MYDESK_HOME` test seam so the probe runs against a fixture tree.
55
+
56
+ ### Fixed
57
+
58
+ - Codex `session_meta` lines can exceed 16KB; the old head read truncated them and lost `cwd` and `session_id`.
59
+ - Kim's data subdirectories are directories, not files; the app-data watcher now considers directory mtimes too.
60
+
61
+ ## 0.1.0 - 2026-11-23
62
+
63
+ ### Added
64
+
65
+ - Unified `Item` / `Source` kernel with per-source probe, budget, timeout, and health so one failing source cannot blank the desk.
66
+ - `dsh` source: Sessions (turn state from each Session log), background jobs (registry events, all owners), scheduled tasks, goals, Team tasks (deduplicated by task id).
67
+ - `process` source: allowlisted `pgrep` for DeepSeek Harness, Kim, and WeChat.
68
+ - Sidebar entry and main panel; read-only `GET /dsh-mydesk/state` behind the app's connection trust; allowlisted `POST /dsh-mydesk/open` (app bundle or `http(s)` URL, fixed argv).
69
+ - `test/probe.mjs` contract harness running both halves against a fake Cordis context.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 dsh-mydesk contributors
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,61 @@
1
- # Temporary Holding Version
1
+ # dsh-localdesk
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 read-only observatory for your machine: what is running right now, and what just changed.
4
+
5
+ ## What it shows (0.4.1 / P4)
6
+
7
+ | Section | Source | Per row |
8
+ | --- | --- | --- |
9
+ | Sessions | live DSH Agents + each Session's own log | directory, model, turn, last activity; click to open |
10
+ | Background jobs | `jobs` registry events (all owners) | command, owner Session, progress, output size |
11
+ | Scheduled tasks | `schedule.catalog()` | title, timing, next run, target Session |
12
+ | Goals | `goals.get(agent)` | objective, phase, rounds |
13
+ | Team tasks | `agentTeams.listTasks(agent)` | subject, status, owner, blocked |
14
+ | Codex sessions | `~/.codex/sessions/**/rollout-*.jsonl` (head + tail only) | project, event count, CLI version, provider, running/idle/done |
15
+ | WeChat channel | DSH's own `~/.dsh/channel-wechat/peer-sessions.json` | peer, linked Session; click to open |
16
+ | App data | mtimes under `.claude`, `.cursor`, Kim's data dirs | which app data changed, when, which child moved |
17
+ | Local apps | allowlisted `pgrep` | app name, matching processes; click to bring it forward |
18
+
19
+ ## Where it lives
20
+
21
+ - Sidebar entry **My desk** (「我的工作台」) and its main panel.
22
+ - A frame-wide island at the top of the window: collapsed it shows run / wait / changed counts and refreshes every 10s; click it for the top five items and an **Open desk** button. It hides itself when there is nothing to show, refreshes every 2.5s while open, and closes on Esc or an outside click.
23
+ - One read-only route `GET /dsh-localdesk/state` behind the same connection trust as the app.
24
+ - One action route `POST /dsh-localdesk/open`, used only when you click a row whose target is a local app. It accepts an allowlisted app name or an `http(s)` URL, never a shell string.
25
+
26
+ ## Filtering
27
+
28
+ The desk has a search box (title, path, owner, meta, tags) and status chips (All / Running / Waiting / Changed). Filtering is client-side: the summary above stays global, section counts show what survived the filter, and an empty result says so instead of hiding the page.
29
+
30
+ ## Boundaries
31
+
32
+ - **Read-only**: no Session event is appended, no task state changes, nothing leaves the machine.
33
+ - **This process, this machine**: DSH items come from the current process; Codex, app-data and app rows come from the machine. Durable Sessions from other DSH processes are not listed yet (P2 scope kept this out).
34
+ - **No content reads**: only metadata — titles, states, timestamps, counts.
35
+ - **Kim is not read**: its local databases are SQLCipher-encrypted; only the separate `mycli` tool can open them. The Kim row you see comes from the generic app-data watcher, not from decryption.
36
+ - Plugin subprocesses are not sandboxed by DSH, so every command this plugin runs is fixed-argv and allowlisted (see `docs/DECISIONS.md` D8).
37
+
38
+ ## Layout
39
+
40
+ - Sources live in `index.js` behind one `Item` contract (see `docs/CONTRACTS.md`); the client renders that contract and nothing else.
41
+ - `test/probe.mjs` runs both halves against fixtures and a fake Cordis context: `node test/probe.mjs` (64 checks).
42
+ - The island is client-only; it reads the same `/state` route with a lower cadence while collapsed.
43
+ - No screenshots are bundled: this environment has no browser control to capture the real page. The layout follows the shipped DSH management pages and uses only `--dsw-alias-*` theme tokens.
44
+
45
+ ## Compatibility
46
+
47
+ - Requires Node `^22.19.0 || >=24.0.0` (the DSH app runtime).
48
+ - Hard dependencies: `webServer`, `connection`, `agents`. Without them the plugin does not activate.
49
+ - Optional services: `jobs`, `schedule`, `goals`, `agentTeams`, `subprocess`. A profile that lacks one degrades per source — that source reports `unavailable`/`error`, every other source keeps working (the probe covers exactly this).
50
+ - A source that fails at scan time is isolated: its card shows an error, the rest of the desk still renders.
51
+ - The Host reports its version through `/state`; if the page is newer than the Host half (a client update without a restart), the desk says so and asks for a restart instead of silently showing an older source set.
52
+
53
+ ## Install
54
+
55
+ ```bash
56
+ # Plugins > Add plugin, pick this directory — or install the local package.
57
+ ```
58
+
59
+ ## License
60
+
61
+ MIT