@vtxmacro/cli 2026.10.55 → 2026.10.57
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/bin/exo-harness.ts +5 -0
- package/bin/vtx-mcp.js +20 -10
- package/bin/vtx-service-bootstrap.js +20 -10
- package/bin/vtx-service-launcher.js +51 -18
- package/bin/vtx.js +352 -256
- package/package.json +1 -1
package/bin/exo-harness.ts
CHANGED
|
@@ -1533,6 +1533,11 @@ var runtime_policy_generated_default = {
|
|
|
1533
1533
|
min_query_length: 2
|
|
1534
1534
|
}
|
|
1535
1535
|
},
|
|
1536
|
+
insights: {
|
|
1537
|
+
privileged_admin_settings: {
|
|
1538
|
+
access_token_ttl_seconds: 900
|
|
1539
|
+
}
|
|
1540
|
+
},
|
|
1536
1541
|
referrals: {
|
|
1537
1542
|
code_max_length: 24,
|
|
1538
1543
|
dashboard_default_limit: 20
|
package/bin/vtx-mcp.js
CHANGED
|
@@ -43,7 +43,7 @@ var init_define_VTX_PI_MODEL_POLICY = __esm({
|
|
|
43
43
|
var agent_cli_release_default;
|
|
44
44
|
var init_agent_cli_release = __esm({
|
|
45
45
|
"agent-cli-release.json"() {
|
|
46
|
-
agent_cli_release_default = { package_name: "@vtxmacro/cli", package_version: "2026.10.
|
|
46
|
+
agent_cli_release_default = { package_name: "@vtxmacro/cli", package_version: "2026.10.57", codex_package_name: "@openai/codex", codex_version: "0.155.0", copilot_sdk_package_name: "@github/copilot-sdk", copilot_sdk_version: "1.0.0-beta.8", copilot_cli_package_name: "@github/copilot", copilot_cli_version: "1.0.80", deepseek_harness_version: "0.1.1-rc.2", deepseek_harness_packages: ["@deepseek-ai/dsh-agent", "@deepseek-ai/dsh-agent-instructions", "@deepseek-ai/dsh-agent-loop", "@deepseek-ai/dsh-agent-spine-demo", "@deepseek-ai/dsh-anonymous-user-id", "@deepseek-ai/dsh-atomic-write", "@deepseek-ai/dsh-attachment", "@deepseek-ai/dsh-brand", "@deepseek-ai/dsh-code-runtime", "@deepseek-ai/dsh-credentials", "@deepseek-ai/dsh-fs", "@deepseek-ai/dsh-goal", "@deepseek-ai/dsh-goal-round-driver", "@deepseek-ai/dsh-home-paths", "@deepseek-ai/dsh-invariants", "@deepseek-ai/dsh-jobs", "@deepseek-ai/dsh-jobs-local", "@deepseek-ai/dsh-launch-environment", "@deepseek-ai/dsh-llm", "@deepseek-ai/dsh-llm-deepseek", "@deepseek-ai/dsh-llm-retry", "@deepseek-ai/dsh-output-retention", "@deepseek-ai/dsh-sandbox", "@deepseek-ai/dsh-sandbox-policy", "@deepseek-ai/dsh-scope", "@deepseek-ai/dsh-session", "@deepseek-ai/dsh-session-checkpoint-policy", "@deepseek-ai/dsh-session-persistence", "@deepseek-ai/dsh-session-persistence-jsonl", "@deepseek-ai/dsh-session-projection", "@deepseek-ai/dsh-session-title", "@deepseek-ai/dsh-settings", "@deepseek-ai/dsh-shell", "@deepseek-ai/dsh-shell-env", "@deepseek-ai/dsh-skill", "@deepseek-ai/dsh-skill-filesystem", "@deepseek-ai/dsh-subprocess", "@deepseek-ai/dsh-system-prompt", "@deepseek-ai/dsh-timeout", "@deepseek-ai/dsh-tool-bash", "@deepseek-ai/dsh-tool-goal", "@deepseek-ai/dsh-tool-jobs", "@deepseek-ai/dsh-tool-skill", "@deepseek-ai/dsh-tools", "@deepseek-ai/dsh-typert-protocol", "@deepseek-ai/dsh-user-approval"], deepseek_cordis_package_name: "@deepseek-ai/cordis", deepseek_cordis_version: "4.0.1", deepseek_support_packages: { "@deepseek-ai/cordis-plugin-timer": "1.1.3" }, platforms: { "linux-x64": { package_name: "@openai/codex-linux-x64", target: "x86_64-unknown-linux-musl", binary_name: "codex", sha256: "660e159a49e823ac8e5986cb238f73158ce4b957d40d9292f8de90862644b501" }, "win32-x64": { package_name: "@openai/codex-win32-x64", target: "x86_64-pc-windows-msvc", binary_name: "codex.exe", sha256: "e4c11374bd9de8ad5c3b7617fd4654bb7839901edb0863f9930666863c7a021b" } }, pi_coding_agent_package_name: "@earendil-works/pi-coding-agent", pi_ai_package_name: "@earendil-works/pi-ai", pi_version: "0.85.1", pi_support_packages: ["@earendil-works/pi-agent-core", "@earendil-works/pi-telemetry", "@earendil-works/pi-tui", "@earendil-works/chord"], grok_version: "1.0.30", grok_platforms: { "linux-x64": { package_name: "@xai-official/grok-linux-x64", binary_name: "grok", sha256: "504dd6546ab991b75d36698242875ce461489cd1f8cd84285873cb55bd5c7d54" }, "win32-x64": { package_name: "@xai-official/grok-win32-x64", binary_name: "grok.exe", sha256: "48736d1a4342a801ea26d0ecde4c516b653f791399065adaa55973f83abd8867" } } };
|
|
47
47
|
}
|
|
48
48
|
});
|
|
49
49
|
|
|
@@ -3133,6 +3133,11 @@ var runtime_policy_generated_default = {
|
|
|
3133
3133
|
min_query_length: 2
|
|
3134
3134
|
}
|
|
3135
3135
|
},
|
|
3136
|
+
insights: {
|
|
3137
|
+
privileged_admin_settings: {
|
|
3138
|
+
access_token_ttl_seconds: 900
|
|
3139
|
+
}
|
|
3140
|
+
},
|
|
3136
3141
|
referrals: {
|
|
3137
3142
|
code_max_length: 24,
|
|
3138
3143
|
dashboard_default_limit: 20
|
|
@@ -3799,6 +3804,15 @@ var defaultCurrentProcessIdentity = async () => {
|
|
|
3799
3804
|
throw error;
|
|
3800
3805
|
}
|
|
3801
3806
|
};
|
|
3807
|
+
var processExists = (pid) => {
|
|
3808
|
+
try {
|
|
3809
|
+
process.kill(pid, 0);
|
|
3810
|
+
return true;
|
|
3811
|
+
} catch (error) {
|
|
3812
|
+
if (error.code === "ESRCH") return false;
|
|
3813
|
+
throw error;
|
|
3814
|
+
}
|
|
3815
|
+
};
|
|
3802
3816
|
var processLockObservationCache = /* @__PURE__ */ new Map();
|
|
3803
3817
|
var inferenceProcessIdentitiesMatch = (stored, observed) => stored === observed;
|
|
3804
3818
|
function inferenceBaseDir(env) {
|
|
@@ -4020,6 +4034,10 @@ var inspectProcessLockFile = async (path, label, probes) => {
|
|
|
4020
4034
|
const cached = processLockObservationCache.get(cacheKey);
|
|
4021
4035
|
const observedIdentity = cached && cached.dev === stat.dev && cached.ino === stat.ino && cached.pid === ownerPid && cached.storedIdentity === storedIdentity && Date.now() - cached.observedAtMs < HOST_CORE_POLICY.process_lock_identity_cache_ms ? cached.observedIdentity : await probes.observeIdentity(ownerPid);
|
|
4022
4036
|
if (!observedIdentity) {
|
|
4037
|
+
if (!probes.isProcessAlive(ownerPid)) {
|
|
4038
|
+
stale = true;
|
|
4039
|
+
return { state: "stale", handle, stat };
|
|
4040
|
+
}
|
|
4023
4041
|
throw new Error("Inference host could not verify the existing lock owner identity.");
|
|
4024
4042
|
}
|
|
4025
4043
|
processLockObservationCache.set(cacheKey, {
|
|
@@ -4195,15 +4213,7 @@ async function acquireInferenceHostProcessLock(path, dependencies = {}) {
|
|
|
4195
4213
|
const probes = {
|
|
4196
4214
|
currentBootIdentity: dependencies.currentBootIdentity ?? (() => readInferenceSystemBootIdentity()),
|
|
4197
4215
|
observeIdentity: dependencies.processIdentity ?? defaultProcessIdentity,
|
|
4198
|
-
isProcessAlive: dependencies.processAlive ??
|
|
4199
|
-
try {
|
|
4200
|
-
process.kill(pid, 0);
|
|
4201
|
-
return true;
|
|
4202
|
-
} catch (error) {
|
|
4203
|
-
if (error.code === "ESRCH") return false;
|
|
4204
|
-
throw error;
|
|
4205
|
-
}
|
|
4206
|
-
})
|
|
4216
|
+
isProcessAlive: dependencies.processAlive ?? processExists
|
|
4207
4217
|
};
|
|
4208
4218
|
const [ownerIdentity, bootIdentity] = await Promise.all([
|
|
4209
4219
|
(dependencies.currentProcessIdentity ?? defaultCurrentProcessIdentity)(),
|
|
@@ -14,7 +14,7 @@ import { dirname as dirname4, relative as relative4, resolve as resolve4 } from
|
|
|
14
14
|
import { fileURLToPath } from "node:url";
|
|
15
15
|
|
|
16
16
|
// agent-cli-release.json
|
|
17
|
-
var agent_cli_release_default = { package_name: "@vtxmacro/cli", package_version: "2026.10.
|
|
17
|
+
var agent_cli_release_default = { package_name: "@vtxmacro/cli", package_version: "2026.10.57", codex_package_name: "@openai/codex", codex_version: "0.155.0", copilot_sdk_package_name: "@github/copilot-sdk", copilot_sdk_version: "1.0.0-beta.8", copilot_cli_package_name: "@github/copilot", copilot_cli_version: "1.0.80", deepseek_harness_version: "0.1.1-rc.2", deepseek_harness_packages: ["@deepseek-ai/dsh-agent", "@deepseek-ai/dsh-agent-instructions", "@deepseek-ai/dsh-agent-loop", "@deepseek-ai/dsh-agent-spine-demo", "@deepseek-ai/dsh-anonymous-user-id", "@deepseek-ai/dsh-atomic-write", "@deepseek-ai/dsh-attachment", "@deepseek-ai/dsh-brand", "@deepseek-ai/dsh-code-runtime", "@deepseek-ai/dsh-credentials", "@deepseek-ai/dsh-fs", "@deepseek-ai/dsh-goal", "@deepseek-ai/dsh-goal-round-driver", "@deepseek-ai/dsh-home-paths", "@deepseek-ai/dsh-invariants", "@deepseek-ai/dsh-jobs", "@deepseek-ai/dsh-jobs-local", "@deepseek-ai/dsh-launch-environment", "@deepseek-ai/dsh-llm", "@deepseek-ai/dsh-llm-deepseek", "@deepseek-ai/dsh-llm-retry", "@deepseek-ai/dsh-output-retention", "@deepseek-ai/dsh-sandbox", "@deepseek-ai/dsh-sandbox-policy", "@deepseek-ai/dsh-scope", "@deepseek-ai/dsh-session", "@deepseek-ai/dsh-session-checkpoint-policy", "@deepseek-ai/dsh-session-persistence", "@deepseek-ai/dsh-session-persistence-jsonl", "@deepseek-ai/dsh-session-projection", "@deepseek-ai/dsh-session-title", "@deepseek-ai/dsh-settings", "@deepseek-ai/dsh-shell", "@deepseek-ai/dsh-shell-env", "@deepseek-ai/dsh-skill", "@deepseek-ai/dsh-skill-filesystem", "@deepseek-ai/dsh-subprocess", "@deepseek-ai/dsh-system-prompt", "@deepseek-ai/dsh-timeout", "@deepseek-ai/dsh-tool-bash", "@deepseek-ai/dsh-tool-goal", "@deepseek-ai/dsh-tool-jobs", "@deepseek-ai/dsh-tool-skill", "@deepseek-ai/dsh-tools", "@deepseek-ai/dsh-typert-protocol", "@deepseek-ai/dsh-user-approval"], deepseek_cordis_package_name: "@deepseek-ai/cordis", deepseek_cordis_version: "4.0.1", deepseek_support_packages: { "@deepseek-ai/cordis-plugin-timer": "1.1.3" }, platforms: { "linux-x64": { package_name: "@openai/codex-linux-x64", target: "x86_64-unknown-linux-musl", binary_name: "codex", sha256: "660e159a49e823ac8e5986cb238f73158ce4b957d40d9292f8de90862644b501" }, "win32-x64": { package_name: "@openai/codex-win32-x64", target: "x86_64-pc-windows-msvc", binary_name: "codex.exe", sha256: "e4c11374bd9de8ad5c3b7617fd4654bb7839901edb0863f9930666863c7a021b" } }, pi_coding_agent_package_name: "@earendil-works/pi-coding-agent", pi_ai_package_name: "@earendil-works/pi-ai", pi_version: "0.85.1", pi_support_packages: ["@earendil-works/pi-agent-core", "@earendil-works/pi-telemetry", "@earendil-works/pi-tui", "@earendil-works/chord"], grok_version: "1.0.30", grok_platforms: { "linux-x64": { package_name: "@xai-official/grok-linux-x64", binary_name: "grok", sha256: "504dd6546ab991b75d36698242875ce461489cd1f8cd84285873cb55bd5c7d54" }, "win32-x64": { package_name: "@xai-official/grok-win32-x64", binary_name: "grok.exe", sha256: "48736d1a4342a801ea26d0ecde4c516b653f791399065adaa55973f83abd8867" } } };
|
|
18
18
|
|
|
19
19
|
// lib/runtime-policy.generated.json
|
|
20
20
|
var runtime_policy_generated_default = {
|
|
@@ -1405,6 +1405,11 @@ var runtime_policy_generated_default = {
|
|
|
1405
1405
|
min_query_length: 2
|
|
1406
1406
|
}
|
|
1407
1407
|
},
|
|
1408
|
+
insights: {
|
|
1409
|
+
privileged_admin_settings: {
|
|
1410
|
+
access_token_ttl_seconds: 900
|
|
1411
|
+
}
|
|
1412
|
+
},
|
|
1408
1413
|
referrals: {
|
|
1409
1414
|
code_max_length: 24,
|
|
1410
1415
|
dashboard_default_limit: 20
|
|
@@ -2136,6 +2141,15 @@ var defaultCurrentProcessIdentity = async () => {
|
|
|
2136
2141
|
throw error;
|
|
2137
2142
|
}
|
|
2138
2143
|
};
|
|
2144
|
+
var processExists = (pid) => {
|
|
2145
|
+
try {
|
|
2146
|
+
process.kill(pid, 0);
|
|
2147
|
+
return true;
|
|
2148
|
+
} catch (error) {
|
|
2149
|
+
if (error.code === "ESRCH") return false;
|
|
2150
|
+
throw error;
|
|
2151
|
+
}
|
|
2152
|
+
};
|
|
2139
2153
|
var processLockObservationCache = /* @__PURE__ */ new Map();
|
|
2140
2154
|
var inferenceProcessIdentitiesMatch = (stored, observed) => stored === observed;
|
|
2141
2155
|
async function ensureInferencePrivateDirectory(path, dependencies = {}) {
|
|
@@ -2351,6 +2365,10 @@ var inspectProcessLockFile = async (path, label, probes) => {
|
|
|
2351
2365
|
const cached = processLockObservationCache.get(cacheKey);
|
|
2352
2366
|
const observedIdentity = cached && cached.dev === stat.dev && cached.ino === stat.ino && cached.pid === ownerPid && cached.storedIdentity === storedIdentity && Date.now() - cached.observedAtMs < HOST_CORE_POLICY.process_lock_identity_cache_ms ? cached.observedIdentity : await probes.observeIdentity(ownerPid);
|
|
2353
2367
|
if (!observedIdentity) {
|
|
2368
|
+
if (!probes.isProcessAlive(ownerPid)) {
|
|
2369
|
+
stale = true;
|
|
2370
|
+
return { state: "stale", handle, stat };
|
|
2371
|
+
}
|
|
2354
2372
|
throw new Error("Inference host could not verify the existing lock owner identity.");
|
|
2355
2373
|
}
|
|
2356
2374
|
processLockObservationCache.set(cacheKey, {
|
|
@@ -2526,15 +2544,7 @@ async function acquireInferenceHostProcessLock(path, dependencies = {}) {
|
|
|
2526
2544
|
const probes = {
|
|
2527
2545
|
currentBootIdentity: dependencies.currentBootIdentity ?? (() => readInferenceSystemBootIdentity()),
|
|
2528
2546
|
observeIdentity: dependencies.processIdentity ?? defaultProcessIdentity,
|
|
2529
|
-
isProcessAlive: dependencies.processAlive ??
|
|
2530
|
-
try {
|
|
2531
|
-
process.kill(pid, 0);
|
|
2532
|
-
return true;
|
|
2533
|
-
} catch (error) {
|
|
2534
|
-
if (error.code === "ESRCH") return false;
|
|
2535
|
-
throw error;
|
|
2536
|
-
}
|
|
2537
|
-
})
|
|
2547
|
+
isProcessAlive: dependencies.processAlive ?? processExists
|
|
2538
2548
|
};
|
|
2539
2549
|
const [ownerIdentity, bootIdentity] = await Promise.all([
|
|
2540
2550
|
(dependencies.currentProcessIdentity ?? defaultCurrentProcessIdentity)(),
|
|
@@ -1389,6 +1389,11 @@ var runtime_policy_generated_default = {
|
|
|
1389
1389
|
min_query_length: 2
|
|
1390
1390
|
}
|
|
1391
1391
|
},
|
|
1392
|
+
insights: {
|
|
1393
|
+
privileged_admin_settings: {
|
|
1394
|
+
access_token_ttl_seconds: 900
|
|
1395
|
+
}
|
|
1396
|
+
},
|
|
1392
1397
|
referrals: {
|
|
1393
1398
|
code_max_length: 24,
|
|
1394
1399
|
dashboard_default_limit: 20
|
|
@@ -2071,6 +2076,15 @@ var defaultCurrentProcessIdentity = async () => {
|
|
|
2071
2076
|
throw error;
|
|
2072
2077
|
}
|
|
2073
2078
|
};
|
|
2079
|
+
var processExists = (pid) => {
|
|
2080
|
+
try {
|
|
2081
|
+
process.kill(pid, 0);
|
|
2082
|
+
return true;
|
|
2083
|
+
} catch (error) {
|
|
2084
|
+
if (error.code === "ESRCH") return false;
|
|
2085
|
+
throw error;
|
|
2086
|
+
}
|
|
2087
|
+
};
|
|
2074
2088
|
var processLockObservationCache = /* @__PURE__ */ new Map();
|
|
2075
2089
|
var inferenceProcessIdentitiesMatch = (stored, observed) => stored === observed;
|
|
2076
2090
|
async function ensureInferencePrivateDirectory(path, dependencies = {}) {
|
|
@@ -2286,6 +2300,10 @@ var inspectProcessLockFile = async (path, label, probes) => {
|
|
|
2286
2300
|
const cached = processLockObservationCache.get(cacheKey);
|
|
2287
2301
|
const observedIdentity = cached && cached.dev === stat.dev && cached.ino === stat.ino && cached.pid === ownerPid && cached.storedIdentity === storedIdentity && Date.now() - cached.observedAtMs < HOST_CORE_POLICY.process_lock_identity_cache_ms ? cached.observedIdentity : await probes.observeIdentity(ownerPid);
|
|
2288
2302
|
if (!observedIdentity) {
|
|
2303
|
+
if (!probes.isProcessAlive(ownerPid)) {
|
|
2304
|
+
stale = true;
|
|
2305
|
+
return { state: "stale", handle, stat };
|
|
2306
|
+
}
|
|
2289
2307
|
throw new Error("Inference host could not verify the existing lock owner identity.");
|
|
2290
2308
|
}
|
|
2291
2309
|
processLockObservationCache.set(cacheKey, {
|
|
@@ -2461,15 +2479,7 @@ async function acquireInferenceHostProcessLock(path, dependencies = {}) {
|
|
|
2461
2479
|
const probes = {
|
|
2462
2480
|
currentBootIdentity: dependencies.currentBootIdentity ?? (() => readInferenceSystemBootIdentity()),
|
|
2463
2481
|
observeIdentity: dependencies.processIdentity ?? defaultProcessIdentity,
|
|
2464
|
-
isProcessAlive: dependencies.processAlive ??
|
|
2465
|
-
try {
|
|
2466
|
-
process.kill(pid, 0);
|
|
2467
|
-
return true;
|
|
2468
|
-
} catch (error) {
|
|
2469
|
-
if (error.code === "ESRCH") return false;
|
|
2470
|
-
throw error;
|
|
2471
|
-
}
|
|
2472
|
-
})
|
|
2482
|
+
isProcessAlive: dependencies.processAlive ?? processExists
|
|
2473
2483
|
};
|
|
2474
2484
|
const [ownerIdentity, bootIdentity] = await Promise.all([
|
|
2475
2485
|
(dependencies.currentProcessIdentity ?? defaultCurrentProcessIdentity)(),
|
|
@@ -2549,6 +2559,7 @@ var launcherSibling = (manifest, suffix) => {
|
|
|
2549
2559
|
if (!manifest.endsWith(".service.json")) throw new Error("Invalid service manifest path.");
|
|
2550
2560
|
return `${manifest.slice(0, -".service.json".length)}${suffix}`;
|
|
2551
2561
|
};
|
|
2562
|
+
var launcherLockPath = (manifest) => launcherSibling(manifest, ".service-launcher.lock");
|
|
2552
2563
|
var within = (parent, child) => {
|
|
2553
2564
|
const part = relative2(resolve2(parent), resolve2(child));
|
|
2554
2565
|
return Boolean(part) && !part.startsWith("..") && !isAbsolute2(part);
|
|
@@ -2609,7 +2620,7 @@ var targetForSelection = async (selection) => {
|
|
|
2609
2620
|
// lib/inference-host/service-launcher.ts
|
|
2610
2621
|
var runInferenceHostServiceLauncher = async (manifestPathValue, lockPathValue, dependencies = {}) => {
|
|
2611
2622
|
const manifestPath = resolve3(manifestPathValue);
|
|
2612
|
-
const lock = await acquireInferenceHostProcessLock(
|
|
2623
|
+
const lock = await acquireInferenceHostProcessLock(launcherLockPath(manifestPath));
|
|
2613
2624
|
const lifetime = new AbortController();
|
|
2614
2625
|
let child = null;
|
|
2615
2626
|
const stop = () => {
|
|
@@ -2671,8 +2682,8 @@ var runInferenceHostServiceLauncher = async (manifestPathValue, lockPathValue, d
|
|
|
2671
2682
|
manifest = JSON.parse(await readFile3(manifestPath, "utf8"));
|
|
2672
2683
|
let state = await readLauncherState(manifestPath);
|
|
2673
2684
|
if (!state) throw new Error("Service launcher recovery state is missing.");
|
|
2674
|
-
const rollback = async (reason) => {
|
|
2675
|
-
if (!state.previous || !await desired()) return false;
|
|
2685
|
+
const rollback = async (reason, whileStopped = false) => {
|
|
2686
|
+
if (!state.previous || !whileStopped && !await desired()) return false;
|
|
2676
2687
|
const failed = state.active;
|
|
2677
2688
|
await writeLauncherSelection(manifestPath, state.previous.selection);
|
|
2678
2689
|
await writeAtomicInferencePrivateFile(launcherSibling(manifestPath, ".service-release-rejection.json"), `${JSON.stringify({
|
|
@@ -2688,20 +2699,31 @@ var runInferenceHostServiceLauncher = async (manifestPathValue, lockPathValue, d
|
|
|
2688
2699
|
return true;
|
|
2689
2700
|
};
|
|
2690
2701
|
if (state.pending && state.previous && await desired()) await rollback("bootstrap_interrupted_before_readiness");
|
|
2702
|
+
const endAttemptForStop = async () => {
|
|
2703
|
+
if (state.pending) {
|
|
2704
|
+
state.pending = false;
|
|
2705
|
+
await writeLauncherState(manifestPath, state);
|
|
2706
|
+
}
|
|
2707
|
+
return 0;
|
|
2708
|
+
};
|
|
2691
2709
|
while (await desired()) {
|
|
2692
2710
|
state.pending = true;
|
|
2693
2711
|
await writeLauncherState(manifestPath, state);
|
|
2694
|
-
if (!await desired()) return
|
|
2712
|
+
if (!await desired()) return await endAttemptForStop();
|
|
2695
2713
|
const launchedAt = Date.now();
|
|
2696
2714
|
const runtimePath = launcherSibling(manifestPath, ".service-runtime.json");
|
|
2697
2715
|
await rm3(runtimePath, { force: true });
|
|
2698
|
-
if (!await desired()) return
|
|
2716
|
+
if (!await desired()) return await endAttemptForStop();
|
|
2717
|
+
let stopRequested = false;
|
|
2699
2718
|
child = runCore(manifest.executable, state.active, ["--service-manifest", manifestPath, "--service-lock", resolve3(lockPathValue)]);
|
|
2700
2719
|
const readiness = new AbortController();
|
|
2701
2720
|
const watchingStop = new AbortController();
|
|
2702
2721
|
const stopped = (async () => {
|
|
2703
2722
|
while (!watchingStop.signal.aborted) {
|
|
2704
|
-
if (!await desired())
|
|
2723
|
+
if (!await desired()) {
|
|
2724
|
+
stopRequested = true;
|
|
2725
|
+
return { kind: "stop", code: 0 };
|
|
2726
|
+
}
|
|
2705
2727
|
await new Promise((done) => {
|
|
2706
2728
|
if (watchingStop.signal.aborted) {
|
|
2707
2729
|
done();
|
|
@@ -2793,7 +2815,12 @@ var runInferenceHostServiceLauncher = async (manifestPathValue, lockPathValue, d
|
|
|
2793
2815
|
}
|
|
2794
2816
|
}
|
|
2795
2817
|
}
|
|
2796
|
-
|
|
2818
|
+
const failedReadiness = first.kind === "timeout" || first.kind === "exit" && first.code !== 0 && first.code !== EXIT_CODE_TEMPFAIL;
|
|
2819
|
+
const failure = first.kind === "timeout" ? "bootstrap_readiness_timeout" : "bootstrap_exited";
|
|
2820
|
+
if (!await desired()) {
|
|
2821
|
+
if (failedReadiness) await rollback(failure, true);
|
|
2822
|
+
return await endAttemptForStop();
|
|
2823
|
+
}
|
|
2797
2824
|
if (code === EXIT_CODE_TEMPFAIL) {
|
|
2798
2825
|
const selected = await readLauncherSelection(manifestPath);
|
|
2799
2826
|
if (selected && selected.package_version !== state.active.package_version) {
|
|
@@ -2813,13 +2840,19 @@ var runInferenceHostServiceLauncher = async (manifestPathValue, lockPathValue, d
|
|
|
2813
2840
|
await writeLauncherState(manifestPath, state);
|
|
2814
2841
|
continue;
|
|
2815
2842
|
}
|
|
2816
|
-
state = {
|
|
2843
|
+
state = {
|
|
2844
|
+
schema_version: state.schema_version,
|
|
2845
|
+
active: next,
|
|
2846
|
+
previous: failedReadiness ? state.previous : state.active,
|
|
2847
|
+
pending: false
|
|
2848
|
+
};
|
|
2817
2849
|
await writeLauncherState(manifestPath, state);
|
|
2818
2850
|
await log("service_launcher_handoff", next.package_version);
|
|
2819
2851
|
continue;
|
|
2820
2852
|
}
|
|
2821
2853
|
}
|
|
2822
|
-
if (!
|
|
2854
|
+
if (!failedReadiness && (stopRequested || first.kind === "ready" && code === 0)) continue;
|
|
2855
|
+
if (!await rollback(failure)) return code || 1;
|
|
2823
2856
|
}
|
|
2824
2857
|
return 0;
|
|
2825
2858
|
} finally {
|