@restregular/dsh-powerup 0.0.0-stage → 0.2.1

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 RestRegular
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,104 @@
1
- # Temporary Holding Version
1
+ # Power-Up
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
+ Small, opt-in upgrades for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness).
4
+ The first upgrade is a **right-click action menu in the Trajectory view**.
5
+
6
+ ## Install
7
+
8
+ ```bash
9
+ dsh plugin --profile web add @restregular/dsh-powerup
10
+ ```
11
+
12
+ Then open a session, switch to **Trajectory**, and right-click a record row.
13
+
14
+ ## What it does
15
+
16
+ Right-click a trajectory record:
17
+
18
+ - **Copy content** — copy the full text of the record.
19
+ - **Copy as quote** — produce a Markdown blockquote with the record kind.
20
+ - **Quote in composer** — insert that quote into the current input box.
21
+ - **Open record details** — open the host's record inspector.
22
+ - **Fork from here** — fork the session at that record (inclusive).
23
+ - **Copy session ID**.
24
+
25
+ Right-click empty space in the ledger:
26
+
27
+ - **Export trajectory JSON** — save the current trajectory snapshot.
28
+ - **Copy session ID**.
29
+ - **Open the Power-Up page** — the sidebar control panel.
30
+
31
+ The sidebar **Power-Up** page turns the menu on or off and lists the available
32
+ actions. The setting is stored in the browser.
33
+
34
+ ### Menu keys
35
+
36
+ `↑` / `↓` move, `Home` / `End` jump, `Enter` runs, `Esc` closes.
37
+
38
+ ## Update a plugin
39
+
40
+ Open the built-in **Plugins** page. Every third-party card under **Installed
41
+ plugins** gains a small update icon in its action area. Clicking it opens the
42
+ update dialog:
43
+
44
+ 1. The dialog reads the package's published versions from the same registry the
45
+ **Add plugin** dialog uses — the remembered choice, or the Host's configured
46
+ registry, with npmmirror as a configured fallback. Type a version or pick one
47
+ from the dropdown.
48
+ 2. Confirming removes the installed copy, checks the new spec the way **Add
49
+ plugin** does, and installs the selected version without enabling it.
50
+ 3. The dialog then asks whether to enable the new version.
51
+ 4. After enabling, it asks whether to restart DSH. On the desktop app the
52
+ `lib/restart-helper.cjs` helper relaunches the exact executable after the old
53
+ Host exits; under `dsh web` the dialog explains that the terminal owns the
54
+ process.
55
+
56
+ Power-Up does not update itself through this button: removing the plugin would
57
+ unload the dialog mid-flow. Use **Add plugin** with the new package version.
58
+
59
+ ## Design notes
60
+
61
+ - **Theme-safe by construction.** Every surface, border, text color, hover and
62
+ switch state uses the host's `--dsw-alias-*` tokens. The switch follows the
63
+ host convention (`--dsw-alias-border-l3` / `--dsw-alias-switch-thumb` off,
64
+ `--dsw-alias-brand-primary` + `--dsw-alias-label-primary-foreground` on), so
65
+ it stays readable in both light and dark themes. The only literal colors live
66
+ inside the plugin's brand SVG artwork.
67
+ - **Two icons, two jobs.** `icon.svg` is the 256px brand tile shown by the
68
+ Plugin Manager. The sidebar uses the same double-chevron mark as a 16-grid,
69
+ `fill:none`, `stroke:currentColor` line drawing, but without the tile frame:
70
+ the mark gets the full grid, so the chevrons and the amber baseline never
71
+ collide with a border. The reference line artwork is
72
+ `design/sidebar-icon.svg`; the runtime copy lives in `client.js`.
73
+ - **No imports from Harness Client packages.** The menu is plain React + CSS and
74
+ observes the trajectory package's own `data-*` contracts. If those attributes
75
+ change, row-specific actions degrade gracefully; session-level actions in the
76
+ empty ledger area keep working.
77
+ - **The update entry uses the built-in page's contracts.** The Plugins page has
78
+ no per-card slot, so the overlay injects one button into every
79
+ `[data-plugin-group="bundles"] [data-plugin-package]` card and re-asserts it
80
+ after React renders. Version listing is a plain registry `GET`; removal and
81
+ installation use the same `remote.pluginManager` calls as **Add plugin**. Only
82
+ the process restart needs Host code: a loopback-only
83
+ `/dsh-powerup/api/restart` route.
84
+ - **The dialog mirrors the host modal.** The backdrop is
85
+ `--dsw-alias-bg-mask-1` with the shared mask blur, the surface is
86
+ `--dsw-alias-bg-layer-2` with `--dsw-radius-panel` and
87
+ `--dsw-elevation-prominent`, and the primary button uses
88
+ `--dsw-alias-button-primary-fill` / `-hover`, so the dialog follows both
89
+ themes instead of inventing its own palette. The registry picker and version
90
+ list are custom controls built from `--dsw-alias-*` tokens.
91
+
92
+ ## Development
93
+
94
+ ```bash
95
+ node test/smoke.mjs
96
+ ```
97
+
98
+ The smoke test loads the real Client module with React/browser doubles, applies
99
+ it to a fake slot context, and checks registrations, icons, helpers, theme
100
+ tokens, and the manifest.
101
+
102
+ ## License
103
+
104
+ MIT © RestRegular