dsh-home-hosted 0.1.3 → 0.2.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/README.md CHANGED
@@ -9,8 +9,8 @@ A DeepSeek Harness plugin for [home-hosted](https://github.com/NamesMT/home-host
9
9
  - **Boot autostart** — installs, verifies and removes the OS entry that starts `home-hosted` at boot (systemd on Linux, launchd on macOS, Run key / Task Scheduler on Windows). Off by default; opt in from the plugin's page.
10
10
  - **Runs its own home-hosted** — the pinned copy ships as a dependency, so the panel that starts at boot is the version this plugin was built against. The page can start that panel, or replace a running one with it.
11
11
  - **Server management** — add, edit, start, stop and restart home-hosted's servers without leaving dsh, with the panel's API as the write path so nothing is restarted behind your back.
12
- - **Reclaim the harness** — a managed `dsh` entry gets `onPortConflict: kill`, so a leftover process holding the web port is reclaimed at boot instead of blocking forever.
13
- - **Agent tools** — off by default, allowlisted one by one; every tool that changes something asks for approval first.
12
+ - **Reclaim the harness** — a managed `dsh` entry follows its own detached restart on POSIX, and uses `onPortConflict: kill` on Windows where a detached restart cannot be identified.
13
+ - **Agent tools** — on by default. `status`, `servers_list`, `servers_lifecycle` (start/stop/restart), `servers_edit` (create/update/delete), `autostart_manage` (install/uninstall), `ui_manage` (status/update/revert/switch the panel's own UI). A tool that changes something asks for approval only in a session that is not already Full access.
14
14
 
15
15
  ## Install
16
16
 
@@ -41,7 +41,7 @@ Everything a person toggles lives in `<stateDir>/settings.json`, including **Opt
41
41
  - The plugin ships its own `home-hosted` (pinned range) and runs that copy by default; Options in the page can switch to a global install instead. Boot entries run a small stable launcher it writes, so a `node_modules` path that moves never breaks boot.
42
42
  - Boot (pre-login) needs privilege somewhere, and the page shows the exact commands when it cannot elevate: on macOS pick the boot-scope **launchd-daemon** (a one-time `sudo` install), on Linux **systemd-system** or `loginctl enable-linger`. A `LaunchAgent` and an XDG entry start at login only.
43
43
  - The panel API token this plugin uses is minted on first write and kept 0600 under the plugin state directory; it is never rendered or logged.
44
- - `onPortConflict: kill` needs home-hosted 0.6.0 or newer; against an older panel the plugin refuses that write and says so, because that panel cannot parse the config it would produce.
44
+ - `onPortConflict: kill` needs home-hosted 0.6.0 or newer; against an older panel the plugin refuses that write and says so, because that panel cannot parse the config it would produce. The POSIX default is `follow`, which needs nothing extra.
45
45
 
46
46
  ## License
47
47
 
package/docs/DESIGN.md CHANGED
@@ -31,6 +31,32 @@ node_modules (flat or pnpm), then PATH — and forwards its argv, so the entry
31
31
  survives plugin upgrades and profile reinstalls. The plugin preflights the
32
32
  launcher the way the unit invokes it and shows the version it answers.
33
33
 
34
+ ## Agent tools are merged and on by default
35
+
36
+ Six tools, not ten: `servers_lifecycle` carries start/stop/restart, `servers_edit`
37
+ carries create/update/delete, `autostart_manage` carries install/uninstall, and
38
+ `ui_manage` drives the panel's own UI (`ui-update` / `ui-revert` / `ui-switch`).
39
+ They are registered on by default; what gates a mutating call is the session's
40
+ own permission mode, not a plugin-level default.
41
+
42
+ ## The dsh entry is the only entry the page manages
43
+
44
+ The page shows one toggle: manage `dsh` as a home-hosted entry, or not. Adding
45
+ one sends a minimal intent (`{ id: 'dsh', autostart: true }`) and the host fills
46
+ the rest from the platform default policy; removing one restores an entry this
47
+ plugin merely adopted, and deletes one it created. Removing an entry the panel
48
+ supervises stops that process — which may be the session asking for it.
49
+
50
+ ## Approvals follow the session's sandbox
51
+
52
+ A mutating agent tool asks the approval service only when the calling session is
53
+ *not* already `danger-full-access` (`ctx.sandboxPolicy.resolve({ session })`).
54
+ Asking anyway made a Full-access run fail whenever the deployment's approvals
55
+ auto-reject — the session had already granted exactly what the tool was asking
56
+ about. Below full access the tool still asks and still fails closed, and the
57
+ refusal names the mode and the remedy (Full access, or an answerable approval
58
+ channel).
59
+
34
60
  ## Config compatibility
35
61
 
36
62
  `onPortConflict: kill` did not exist before home-hosted 0.6.0, and an older panel