@amaster.ai/employee-runtime-connector 0.1.0-beta.2 → 0.1.0-beta.21
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 +10 -0
- package/dist/amaster-runtime-daemon.mjs +7188 -8174
- package/dist/amaster-runtime.mjs +24 -1
- package/package.json +7 -1
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.21";
|
|
9
9
|
|
|
10
10
|
const CAPABILITIES = [
|
|
11
11
|
"remote_registration",
|
|
@@ -13,6 +13,7 @@ const CAPABILITIES = [
|
|
|
13
13
|
"executor_discovery",
|
|
14
14
|
"workspace_binding",
|
|
15
15
|
"run_wakeup",
|
|
16
|
+
"runtime_actions_v2",
|
|
16
17
|
"model_call",
|
|
17
18
|
"run_cancel",
|
|
18
19
|
"run_terminate",
|
|
@@ -91,6 +92,27 @@ const envFile = process.env.AMASTER_RUNTIME_ENV_FILE || join(configDir, "runtime
|
|
|
91
92
|
const pidFile = process.env.AMASTER_RUNTIME_PID_FILE || join(configDir, "runtime-daemon.pid");
|
|
92
93
|
const logFile = process.env.AMASTER_RUNTIME_LOG_FILE || join(configDir, "runtime-daemon.log");
|
|
93
94
|
|
|
95
|
+
function assertDaemonPathCoherence() {
|
|
96
|
+
const explicitPaths = [
|
|
97
|
+
["AMASTER_RUNTIME_ENV_FILE", process.env.AMASTER_RUNTIME_ENV_FILE],
|
|
98
|
+
["AMASTER_RUNTIME_PID_FILE", process.env.AMASTER_RUNTIME_PID_FILE],
|
|
99
|
+
["AMASTER_RUNTIME_LOG_FILE", process.env.AMASTER_RUNTIME_LOG_FILE],
|
|
100
|
+
].map(([name, value]) => [name, String(value ?? "").trim()])
|
|
101
|
+
.filter(([, value]) => value);
|
|
102
|
+
if (explicitPaths.length === 0 || explicitPaths.length === 3) return;
|
|
103
|
+
const mismatched = explicitPaths.filter(([, value]) => dirname(resolve(value)) !== configDir);
|
|
104
|
+
if (mismatched.length === 0) return;
|
|
105
|
+
const mismatchSummary = mismatched
|
|
106
|
+
.map(([name, value]) => `${name}=${resolve(value)}`)
|
|
107
|
+
.join(", ");
|
|
108
|
+
const suggestedStateHome = dirname(resolve(mismatched[0][1]));
|
|
109
|
+
throw new Error([
|
|
110
|
+
`${mismatchSummary} is outside runtime state home ${configDir}.`,
|
|
111
|
+
`Set AMASTER_RUNTIME_STATE_HOME=${suggestedStateHome} so env/pid/log state shares one root,`,
|
|
112
|
+
"or explicitly set AMASTER_RUNTIME_ENV_FILE, AMASTER_RUNTIME_PID_FILE, and AMASTER_RUNTIME_LOG_FILE.",
|
|
113
|
+
].join(" "));
|
|
114
|
+
}
|
|
115
|
+
|
|
94
116
|
function exactSemver(value) {
|
|
95
117
|
const normalized = typeof value === "string" ? value.trim() : "";
|
|
96
118
|
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 +786,7 @@ function spawnDaemonForeground(args = []) {
|
|
|
764
786
|
}
|
|
765
787
|
|
|
766
788
|
function commandDaemon(argv) {
|
|
789
|
+
assertDaemonPathCoherence();
|
|
767
790
|
const [action = "status", ...rest] = argv;
|
|
768
791
|
if (action === "status") {
|
|
769
792
|
commandStatus();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amaster.ai/employee-runtime-connector",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.21",
|
|
4
4
|
"description": "AMaster Employee runtime connector CLI and daemon",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -15,6 +15,8 @@
|
|
|
15
15
|
"scripts": {
|
|
16
16
|
"build": "node scripts/build.mjs",
|
|
17
17
|
"clean": "node scripts/clean.mjs",
|
|
18
|
+
"phase0b:live": "node probes/runtime-v2-phase0b/live-probe.mjs",
|
|
19
|
+
"phase0b:test": "node --test probes/runtime-v2-phase0b/*.test.mjs",
|
|
18
20
|
"typecheck": "node --check scripts/build.mjs && node --check scripts/bundle.mjs && node --check src/amaster-runtime.mjs && node --check src/amaster-runtime-daemon.mjs",
|
|
19
21
|
"test": "pnpm run build && node --test test/*.test.mjs src/amaster-runtime-daemon/*.test.mjs",
|
|
20
22
|
"prepack": "pnpm run test"
|
|
@@ -24,5 +26,9 @@
|
|
|
24
26
|
},
|
|
25
27
|
"engines": {
|
|
26
28
|
"node": ">=20"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"esbuild": "^0.27.3",
|
|
32
|
+
"smol-toml": "1.7.0"
|
|
27
33
|
}
|
|
28
34
|
}
|