@zixt/host 0.0.128 → 0.0.130
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/index.js +13 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -28,7 +28,7 @@ import { homedir as homedir4 } from "node:os";
|
|
|
28
28
|
// package.json
|
|
29
29
|
var package_default = {
|
|
30
30
|
name: "@zixt/host",
|
|
31
|
-
version: "0.0.
|
|
31
|
+
version: "0.0.130",
|
|
32
32
|
type: "module",
|
|
33
33
|
exports: {
|
|
34
34
|
".": "./src/client.ts",
|
|
@@ -21003,7 +21003,8 @@ var AttentionItem = external_exports.object({
|
|
|
21003
21003
|
"task",
|
|
21004
21004
|
"readiness",
|
|
21005
21005
|
"integration",
|
|
21006
|
-
"schedule"
|
|
21006
|
+
"schedule",
|
|
21007
|
+
"manager_questionnaire"
|
|
21007
21008
|
]),
|
|
21008
21009
|
id: external_exports.string().min(1),
|
|
21009
21010
|
version: external_exports.string().min(1)
|
|
@@ -25600,6 +25601,9 @@ function watchForUpdates(options) {
|
|
|
25600
25601
|
};
|
|
25601
25602
|
}
|
|
25602
25603
|
|
|
25604
|
+
// src/exit-codes.ts
|
|
25605
|
+
var DO_NOT_RESTART_EXIT_CODE = 64;
|
|
25606
|
+
|
|
25603
25607
|
// src/runners/process-tree.ts
|
|
25604
25608
|
import { spawn as spawn3 } from "node:child_process";
|
|
25605
25609
|
import { readFile as readFile3 } from "node:fs/promises";
|
|
@@ -26629,8 +26633,9 @@ var CONTAINMENT_SUMMARY = {
|
|
|
26629
26633
|
probation_commit: "could not commit its probation evidence"
|
|
26630
26634
|
};
|
|
26631
26635
|
function describeWorkerExit(record2) {
|
|
26636
|
+
const controlledStop = record2.containment === null && record2.signal === null && record2.code === DO_NOT_RESTART_EXIT_CODE;
|
|
26632
26637
|
return {
|
|
26633
|
-
summary: record2.containment ? CONTAINMENT_SUMMARY[record2.containment] : record2.signal ? `was killed by ${record2.signal}` : `exited unexpectedly with code ${record2.code ?? "unknown"}`,
|
|
26638
|
+
summary: controlledStop ? "stopped because this Machine needed attention" : record2.containment ? CONTAINMENT_SUMMARY[record2.containment] : record2.signal ? `was killed by ${record2.signal}` : `exited unexpectedly with code ${record2.code ?? "unknown"}`,
|
|
26634
26639
|
context: {
|
|
26635
26640
|
...record2.version ? { version: record2.version } : {},
|
|
26636
26641
|
...record2.pid === null ? {} : { pid: record2.pid },
|
|
@@ -26640,7 +26645,8 @@ function describeWorkerExit(record2) {
|
|
|
26640
26645
|
heartbeats: record2.heartbeats,
|
|
26641
26646
|
readiness: record2.readinessMilestones,
|
|
26642
26647
|
...record2.msSinceHeartbeat === null ? {} : { sinceHeartbeat: `${record2.msSinceHeartbeat}ms` }
|
|
26643
|
-
}
|
|
26648
|
+
},
|
|
26649
|
+
replayNext: controlledStop ? "This was a controlled stop, not a crash. Review the earlier Host message if this Machine still needs attention" : "This Machine restarted itself; report it if the same exit repeats"
|
|
26644
26650
|
};
|
|
26645
26651
|
}
|
|
26646
26652
|
|
|
@@ -27852,7 +27858,6 @@ var SUPERVISOR_PROTOCOL_ENV = "ZIXT_HOST_SUPERVISOR_PROTOCOL";
|
|
|
27852
27858
|
var SUPERVISOR_VERSION_ENV = "ZIXT_HOST_SUPERVISOR_VERSION";
|
|
27853
27859
|
var SUPERVISOR_PROTOCOL = "2";
|
|
27854
27860
|
var SUPERVISOR_RELOAD_EXIT_CODE = 76;
|
|
27855
|
-
var DO_NOT_RESTART_EXIT_CODE = 64;
|
|
27856
27861
|
var RESTART_BACKOFF_MS = 2e3;
|
|
27857
27862
|
var MAX_RESTART_BACKOFF_MS = 6e4;
|
|
27858
27863
|
var CRASH_STREAK_RESET_MS = 6e4;
|
|
@@ -44590,12 +44595,12 @@ clientForConsole.current = client;
|
|
|
44590
44595
|
var diagnosticsRoot = configuredWorkerDiagnosticsRoot();
|
|
44591
44596
|
var reportedWorkerExits = diagnosticsRoot ? await readWorkerExits(diagnosticsRoot) : [];
|
|
44592
44597
|
for (const { record: record2 } of reportedWorkerExits) {
|
|
44593
|
-
const { summary, context } = describeWorkerExit(record2);
|
|
44598
|
+
const { summary, context, replayNext } = describeWorkerExit(record2);
|
|
44594
44599
|
replayConsoleLine("error", `The previous Zixt Host worker ${summary}`, {
|
|
44595
44600
|
machine,
|
|
44596
44601
|
at: record2.at,
|
|
44597
44602
|
...context,
|
|
44598
|
-
next:
|
|
44603
|
+
next: replayNext
|
|
44599
44604
|
});
|
|
44600
44605
|
for (const line of record2.stderr) replayConsoleLine("error", "Previous worker output", { line });
|
|
44601
44606
|
}
|
|
@@ -44632,7 +44637,7 @@ function shutdown(exitCode = 0) {
|
|
|
44632
44637
|
// the honoured code can differ from the verdict this stop was for.
|
|
44633
44638
|
...code === exitCode ? {} : { requested: exitCode },
|
|
44634
44639
|
activeTasks: activeSessions,
|
|
44635
|
-
next: "The Host restarts automatically; report this if it repeats"
|
|
44640
|
+
next: code === DO_NOT_RESTART_EXIT_CODE ? "Resolve the earlier Host message, then start the Host again" : "The Host restarts automatically; report this if it repeats"
|
|
44636
44641
|
}
|
|
44637
44642
|
);
|
|
44638
44643
|
}
|