@amaster.ai/employee-runtime-connector 0.1.0-beta.10 → 0.1.0-beta.11
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.
|
@@ -2335,7 +2335,7 @@ import { chmodSync, copyFileSync, existsSync, lstatSync, mkdirSync, readFileSync
|
|
|
2335
2335
|
import { homedir, hostname } from "node:os";
|
|
2336
2336
|
import { basename, delimiter, dirname, extname, isAbsolute, join, relative, resolve } from "node:path";
|
|
2337
2337
|
import { spawn, spawnSync } from "node:child_process";
|
|
2338
|
-
const CONNECTOR_VERSION = "0.1.0-beta.
|
|
2338
|
+
const CONNECTOR_VERSION = "0.1.0-beta.11";
|
|
2339
2339
|
const MAX_INFERRED_ARTIFACT_UPLOADS = 20;
|
|
2340
2340
|
const MAX_CHECKPOINT_BYTES = 20 * 1024 * 1024;
|
|
2341
2341
|
const CHECKPOINT_TTL_MS = 24 * 60 * 60 * 1000;
|
package/dist/amaster-runtime.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { dirname, join, resolve } from "node:path";
|
|
|
5
5
|
import { homedir, hostname } from "node:os";
|
|
6
6
|
import { fileURLToPath } from "node:url";
|
|
7
7
|
|
|
8
|
-
const CONNECTOR_VERSION = "0.1.0-beta.
|
|
8
|
+
const CONNECTOR_VERSION = "0.1.0-beta.11";
|
|
9
9
|
|
|
10
10
|
const CAPABILITIES = [
|
|
11
11
|
"remote_registration",
|
|
@@ -91,6 +91,27 @@ const envFile = process.env.AMASTER_RUNTIME_ENV_FILE || join(configDir, "runtime
|
|
|
91
91
|
const pidFile = process.env.AMASTER_RUNTIME_PID_FILE || join(configDir, "runtime-daemon.pid");
|
|
92
92
|
const logFile = process.env.AMASTER_RUNTIME_LOG_FILE || join(configDir, "runtime-daemon.log");
|
|
93
93
|
|
|
94
|
+
function assertDaemonPathCoherence() {
|
|
95
|
+
const explicitPaths = [
|
|
96
|
+
["AMASTER_RUNTIME_ENV_FILE", process.env.AMASTER_RUNTIME_ENV_FILE],
|
|
97
|
+
["AMASTER_RUNTIME_PID_FILE", process.env.AMASTER_RUNTIME_PID_FILE],
|
|
98
|
+
["AMASTER_RUNTIME_LOG_FILE", process.env.AMASTER_RUNTIME_LOG_FILE],
|
|
99
|
+
].map(([name, value]) => [name, String(value ?? "").trim()])
|
|
100
|
+
.filter(([, value]) => value);
|
|
101
|
+
if (explicitPaths.length === 0 || explicitPaths.length === 3) return;
|
|
102
|
+
const mismatched = explicitPaths.filter(([, value]) => dirname(resolve(value)) !== configDir);
|
|
103
|
+
if (mismatched.length === 0) return;
|
|
104
|
+
const mismatchSummary = mismatched
|
|
105
|
+
.map(([name, value]) => `${name}=${resolve(value)}`)
|
|
106
|
+
.join(", ");
|
|
107
|
+
const suggestedStateHome = dirname(resolve(mismatched[0][1]));
|
|
108
|
+
throw new Error([
|
|
109
|
+
`${mismatchSummary} is outside runtime state home ${configDir}.`,
|
|
110
|
+
`Set AMASTER_RUNTIME_STATE_HOME=${suggestedStateHome} so env/pid/log state shares one root,`,
|
|
111
|
+
"or explicitly set AMASTER_RUNTIME_ENV_FILE, AMASTER_RUNTIME_PID_FILE, and AMASTER_RUNTIME_LOG_FILE.",
|
|
112
|
+
].join(" "));
|
|
113
|
+
}
|
|
114
|
+
|
|
94
115
|
function exactSemver(value) {
|
|
95
116
|
const normalized = typeof value === "string" ? value.trim() : "";
|
|
96
117
|
const match = normalized.match(/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$/);
|
|
@@ -764,6 +785,7 @@ function spawnDaemonForeground(args = []) {
|
|
|
764
785
|
}
|
|
765
786
|
|
|
766
787
|
function commandDaemon(argv) {
|
|
788
|
+
assertDaemonPathCoherence();
|
|
767
789
|
const [action = "status", ...rest] = argv;
|
|
768
790
|
if (action === "status") {
|
|
769
791
|
commandStatus();
|