dsh-home-hosted 0.7.6 → 0.8.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 +1 -1
- package/docs/BOOT.md +1 -1
- package/docs/DESIGN.md +8 -6
- package/docs/ENTRIES.md +2 -1
- package/docs/PANEL.md +26 -6
- package/docs/WORKSPACES.md +4 -8
- package/lib/client.js +7 -7
- package/lib/index.js +34 -67
- package/lib/index.js.map +3 -3
- package/lib/types/home-hosted/launch.d.ts +0 -1
- package/lib/types/home-hosted/layout.d.ts +7 -5
- package/lib/types/home-hosted/panel-control.d.ts +5 -4
- package/lib/types/home-hosted/resolve.d.ts +9 -3
- package/lib/types/service.d.ts +14 -19
- package/lib/types/shared/contracts.d.ts +7 -4
- package/lib/types/util/exec.d.ts +8 -4
- package/lib/types/util/fsx.d.ts +0 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -179,7 +179,7 @@ Topic docs, one per area — written for whoever has to touch it next:
|
|
|
179
179
|
|
|
180
180
|
One entry (`dsh`), one toggle: the panel keeps it alive, restarts it and reclaims its port. A
|
|
181
181
|
detached restart is recognised on macOS and Linux (`follow`); Windows cannot prove identity through
|
|
182
|
-
a `.cmd` shim, so it uses `onPortConflict: kill`. The plugin pins home-hosted 0.
|
|
182
|
+
a `.cmd` shim, so it uses `onPortConflict: kill`. The plugin pins home-hosted 0.8+, so every key it
|
|
183
183
|
writes is one that panel parses.
|
|
184
184
|
<sub>Web only — see **dsh Desktop** above.</sub>
|
|
185
185
|
|
package/docs/BOOT.md
CHANGED
|
@@ -232,7 +232,7 @@ would be: `BootStatus.recommended` is the host's own `recommend()` answer, and `
|
|
|
232
232
|
to it when nothing is installed (`pickOf(mechanism ?? before.mechanism ?? before.recommended)`). So
|
|
233
233
|
"Automatic" says which mechanism the next install would use, instead of leaving a person to install it
|
|
234
234
|
and read the result. The sentence is only shown while nothing is installed under that mechanism, and it
|
|
235
|
-
is absent — never "undefined" — when
|
|
235
|
+
is absent — never "undefined" — when a response omits the field.
|
|
236
236
|
|
|
237
237
|
The `Details` block describes the mechanism that is actually **installed**, which is a different one
|
|
238
238
|
while a switch is pending, so both it and the picker read one shared lookup rather than each formatting
|
package/docs/DESIGN.md
CHANGED
|
@@ -35,12 +35,14 @@ its page.
|
|
|
35
35
|
|
|
36
36
|
## Config compatibility was dropped, deliberately
|
|
37
37
|
|
|
38
|
-
`onPortConflict: kill`
|
|
39
|
-
|
|
40
|
-
panel's version and refuse or drop
|
|
41
|
-
`home-hosted@^0.
|
|
42
|
-
|
|
43
|
-
|
|
38
|
+
`onPortConflict: kill` (0.6.0), `persistent` (0.6.3), `restart <id>` (0.7.13) and the nullable-`label`
|
|
39
|
+
patch (0.7.21) all predate the release this plugin pins. The plugin used to consult the answering
|
|
40
|
+
panel's version and refuse or drop those keys (`KILL_UNSUPPORTED`), and later to retry a `restart` as a
|
|
41
|
+
stop-then-start pair. Both are gone: it pins `home-hosted@^0.8.0`, which refuses an older panel
|
|
42
|
+
outright, so neither check could ever fire again.
|
|
43
|
+
|
|
44
|
+
An old state root is upgraded by running the latest 0.7.x **once, before installing 0.8** — its first
|
|
45
|
+
run moves the state into `.hh/`.
|
|
44
46
|
|
|
45
47
|
## Tests
|
|
46
48
|
|
package/docs/ENTRIES.md
CHANGED
|
@@ -130,7 +130,8 @@ entry's own successor, and it still refuses to touch the panel or any process th
|
|
|
130
130
|
This process may itself be the entry being managed (`HHOSTED_SERVER_ID`).
|
|
131
131
|
|
|
132
132
|
- Deleting that entry is refused: it would stop the session doing the deleting.
|
|
133
|
-
- Starting/restarting it is allowed — that is the "reclaim now" case —
|
|
133
|
+
- Starting/restarting it is allowed — that is the "reclaim now" case — and it does end this session:
|
|
134
|
+
an explicit stop tears the entry down even when it is `persistent`. The UI says the page will
|
|
134
135
|
disconnect, and the agent tools need approval first.
|
|
135
136
|
|
|
136
137
|
## A managed entry that was deleted
|
package/docs/PANEL.md
CHANGED
|
@@ -51,9 +51,27 @@ Verified against a real 0.7.20 panel and its own CLI: `PATCH {port:null}` delete
|
|
|
51
51
|
and `bootstrap` have a schema that admits `null`; `_hh` is still exactly four routes; and every route,
|
|
52
52
|
subcommand and flag this plugin drives is unchanged. The console **file** — `.hh/.logs/home-hosted.log`
|
|
53
53
|
plus its `.1`, and the 5 MB rotation — is unchanged too, and this plugin's reader still matches
|
|
54
|
-
`home-hosted logs` line for line.
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
`home-hosted logs` line for line.
|
|
55
|
+
|
|
56
|
+
**0.8.0 is the release that stopped relocating an old state root, and this plugin follows it.** A
|
|
57
|
+
0.6.x root used to be moved into `.hh/` on the first run of 0.7; 0.8 refuses such a root instead, before
|
|
58
|
+
any command resolves a path into it, so that a config sitting at the old paths is never read as an empty
|
|
59
|
+
panel. Nothing is changed or deleted by that refusal. **If you are upgrading from 0.7 or earlier, run
|
|
60
|
+
the latest 0.7.x once first** — that release performs the move — **then install 0.8.** The plugin's own
|
|
61
|
+
floor is `0.8.0` for the same reason: a 0.7.x panel is one it cannot drive, so it says so rather than
|
|
62
|
+
degrading. That removed the last version-conditional code here — a stop-then-start fallback for a panel
|
|
63
|
+
without `restart <id>` — along with the `panel.migrate` action, whose CLI no longer performs that move.
|
|
64
|
+
|
|
65
|
+
**0.7.21 widens that nullable set by one field, and it closed a bug here.** Clearing a server's label
|
|
66
|
+
sent an empty string, which the panel accepts and saves — so the entry kept a blank label instead of
|
|
67
|
+
falling back to its id, and nothing reported a failure. Only `null` clears the key, and 0.7.21 is the
|
|
68
|
+
release that let the *patch* schema carry one for `label`; before it, that request was refused with
|
|
69
|
+
`label must be a string (was null)`. The editor now sends `null`, and the parity guard reads the
|
|
70
|
+
nullable fields from the pinned release instead of a list that went stale at exactly this bump. The
|
|
71
|
+
release's other five fixes — proxy pid identity, a duplicate liveness predicate, a removed entry
|
|
72
|
+
recreating its own log, an unflushed log batch, a Windows test skip — touch nothing this plugin names:
|
|
73
|
+
no `.proxy/proxy.json`, `ProxyService`, `terminatePid`, or `DELETE /api/logs`, and `serverSchema`,
|
|
74
|
+
`CONFIG_SCHEMA`, `/_hh` and the CLI are unchanged.
|
|
57
75
|
|
|
58
76
|
That copy resolves to a pnpm path carrying a version and a peer hash, which moves on the next install
|
|
59
77
|
and disappears when the profile is rebuilt. A boot entry that baked it in would fail exactly when it
|
|
@@ -93,9 +111,11 @@ over. `authNotice` turns it off; `{url}` is read per 401.
|
|
|
93
111
|
that is the whole out-of-the-box path when nothing is running.
|
|
94
112
|
|
|
95
113
|
`panel.takeover` replaces an answering panel with the preferred copy. Stopping the old panel also stops
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
114
|
+
the non-persistent servers it supervises — this dsh only if it is one, which an entry this plugin
|
|
115
|
+
manages is not: it is written `persistent: true`, so it survives the panel and the session stays up.
|
|
116
|
+
The guard still refuses unless this session is an adopted entry with `autostart: true`, because a
|
|
117
|
+
non-persistent entry would have nothing to bring it back. A detached helper does the work and logs to
|
|
118
|
+
`bin/panel-takeover.log`.
|
|
99
119
|
|
|
100
120
|
`panel.start`, `panel.takeover` and `cli.installGlobal` answer a *successful* envelope whose payload
|
|
101
121
|
can still carry `ok: false` — the page reads the payload's `detail`/`output` rather than trusting
|
package/docs/WORKSPACES.md
CHANGED
|
@@ -42,8 +42,8 @@ machines. The RPC endpoint still defaults an absent value (the page always sends
|
|
|
42
42
|
call should not break), but a model is never left to guess.
|
|
43
43
|
|
|
44
44
|
A pre-0.7 root is not read or written at all. It is recognised (`legacyRoot` on the status), refused on
|
|
45
|
-
every write, and
|
|
46
|
-
|
|
45
|
+
every write, and the refusal names the one remedy: run the latest 0.7.x once — its first run moves the
|
|
46
|
+
state into `.hh/` — before installing 0.8. Nothing is changed or deleted by the refusal.
|
|
47
47
|
|
|
48
48
|
## Several panels on one machine
|
|
49
49
|
|
|
@@ -76,12 +76,8 @@ that endpoint has, least invasive first:
|
|
|
76
76
|
credential, but no live status either, and a running panel applies a changed definition at that
|
|
77
77
|
entry's next start;
|
|
78
78
|
- `cli` runs the CLI against its state root — the only runtime path the panel itself offers.
|
|
79
|
-
`start`/`stop` act on one entry
|
|
80
|
-
|
|
81
|
-
local panel older than that refused the command before touching anything, so the plugin falls
|
|
82
|
-
back to the stop-then-start pair and reports `downgraded` in the result — the refusal is
|
|
83
|
-
detected from the CLI's own text, including the `Unexpected argument` a 0.7.12 CLI prints for
|
|
84
|
-
the positional id;
|
|
79
|
+
`start`/`stop` act on one entry, and a restart is the CLI's own `restart <id>`, which is what the
|
|
80
|
+
panel's UI does and leaves no window in which the entry is down;
|
|
85
81
|
- `api` mints a token for that panel, enrols it and uses its HTTP API — the only way to get live
|
|
86
82
|
status, and it replaces any token that panel had, which the question says outright.
|
|
87
83
|
|