herdr-remote 0.2.11 → 0.2.13
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/dist/tui.mjs +373 -324
- package/herdr-plugin.toml +2 -2
- package/package.json +1 -1
- package/src/agent-status.js +114 -0
- package/src/herdr-api.js +123 -0
- package/src/herdr-command.js +72 -0
- package/src/herdr-plugin.js +9 -5
- package/src/host-connector.js +162 -1
- package/src/i18n/en.js +2 -0
- package/src/i18n/zh.js +2 -0
- package/src/service.js +7 -1
package/src/service.js
CHANGED
|
@@ -26,7 +26,7 @@ const {
|
|
|
26
26
|
} = require('./terminal-palette');
|
|
27
27
|
const { resolveSocketPath } = require('./socket-discovery');
|
|
28
28
|
const { preferredLanAddress } = require('./net-interfaces');
|
|
29
|
-
const { findHerdrCommand, resolveHerdrCommand } = require('./herdr-command');
|
|
29
|
+
const { MIN_HERDR_VERSION, findHerdrCommand, herdrVersion, resolveHerdrCommand } = require('./herdr-command');
|
|
30
30
|
|
|
31
31
|
const RUNTIME_VERSION = 2;
|
|
32
32
|
|
|
@@ -418,6 +418,9 @@ async function statusServices() {
|
|
|
418
418
|
// Where Herdr was found, and whether it was found at all: under a service
|
|
419
419
|
// manager this is the first thing to check when sessions will not start.
|
|
420
420
|
const herdr = findHerdrCommand();
|
|
421
|
+
// Only worth spawning when there is something to spawn; an unresolved command
|
|
422
|
+
// has already answered the question the version would.
|
|
423
|
+
const installed = herdr.found ? herdrVersion({ command: herdr.command }) : { version: null, supported: true };
|
|
421
424
|
return {
|
|
422
425
|
ok: true,
|
|
423
426
|
mode: config.relay.mode,
|
|
@@ -439,6 +442,9 @@ async function statusServices() {
|
|
|
439
442
|
herdrCommand: herdr.command,
|
|
440
443
|
herdrCommandFound: herdr.found,
|
|
441
444
|
herdrCommandSource: herdr.source,
|
|
445
|
+
herdrVersion: installed.version,
|
|
446
|
+
herdrVersionSupported: installed.supported,
|
|
447
|
+
herdrVersionMinimum: MIN_HERDR_VERSION,
|
|
442
448
|
},
|
|
443
449
|
publicUrl: resolvePublicUrl(config, lanAddress),
|
|
444
450
|
startedAt: state.startedAt || null,
|