@vtxmacro/cli 2026.10.56 → 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/vtx-mcp.js +15 -10
- package/bin/vtx-service-bootstrap.js +15 -10
- package/bin/vtx-service-launcher.js +46 -18
- package/bin/vtx.js +165 -65
- package/package.json +1 -1
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
|
|
|
@@ -3804,6 +3804,15 @@ var defaultCurrentProcessIdentity = async () => {
|
|
|
3804
3804
|
throw error;
|
|
3805
3805
|
}
|
|
3806
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
|
+
};
|
|
3807
3816
|
var processLockObservationCache = /* @__PURE__ */ new Map();
|
|
3808
3817
|
var inferenceProcessIdentitiesMatch = (stored, observed) => stored === observed;
|
|
3809
3818
|
function inferenceBaseDir(env) {
|
|
@@ -4025,6 +4034,10 @@ var inspectProcessLockFile = async (path, label, probes) => {
|
|
|
4025
4034
|
const cached = processLockObservationCache.get(cacheKey);
|
|
4026
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);
|
|
4027
4036
|
if (!observedIdentity) {
|
|
4037
|
+
if (!probes.isProcessAlive(ownerPid)) {
|
|
4038
|
+
stale = true;
|
|
4039
|
+
return { state: "stale", handle, stat };
|
|
4040
|
+
}
|
|
4028
4041
|
throw new Error("Inference host could not verify the existing lock owner identity.");
|
|
4029
4042
|
}
|
|
4030
4043
|
processLockObservationCache.set(cacheKey, {
|
|
@@ -4200,15 +4213,7 @@ async function acquireInferenceHostProcessLock(path, dependencies = {}) {
|
|
|
4200
4213
|
const probes = {
|
|
4201
4214
|
currentBootIdentity: dependencies.currentBootIdentity ?? (() => readInferenceSystemBootIdentity()),
|
|
4202
4215
|
observeIdentity: dependencies.processIdentity ?? defaultProcessIdentity,
|
|
4203
|
-
isProcessAlive: dependencies.processAlive ??
|
|
4204
|
-
try {
|
|
4205
|
-
process.kill(pid, 0);
|
|
4206
|
-
return true;
|
|
4207
|
-
} catch (error) {
|
|
4208
|
-
if (error.code === "ESRCH") return false;
|
|
4209
|
-
throw error;
|
|
4210
|
-
}
|
|
4211
|
-
})
|
|
4216
|
+
isProcessAlive: dependencies.processAlive ?? processExists
|
|
4212
4217
|
};
|
|
4213
4218
|
const [ownerIdentity, bootIdentity] = await Promise.all([
|
|
4214
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 = {
|
|
@@ -2141,6 +2141,15 @@ var defaultCurrentProcessIdentity = async () => {
|
|
|
2141
2141
|
throw error;
|
|
2142
2142
|
}
|
|
2143
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
|
+
};
|
|
2144
2153
|
var processLockObservationCache = /* @__PURE__ */ new Map();
|
|
2145
2154
|
var inferenceProcessIdentitiesMatch = (stored, observed) => stored === observed;
|
|
2146
2155
|
async function ensureInferencePrivateDirectory(path, dependencies = {}) {
|
|
@@ -2356,6 +2365,10 @@ var inspectProcessLockFile = async (path, label, probes) => {
|
|
|
2356
2365
|
const cached = processLockObservationCache.get(cacheKey);
|
|
2357
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);
|
|
2358
2367
|
if (!observedIdentity) {
|
|
2368
|
+
if (!probes.isProcessAlive(ownerPid)) {
|
|
2369
|
+
stale = true;
|
|
2370
|
+
return { state: "stale", handle, stat };
|
|
2371
|
+
}
|
|
2359
2372
|
throw new Error("Inference host could not verify the existing lock owner identity.");
|
|
2360
2373
|
}
|
|
2361
2374
|
processLockObservationCache.set(cacheKey, {
|
|
@@ -2531,15 +2544,7 @@ async function acquireInferenceHostProcessLock(path, dependencies = {}) {
|
|
|
2531
2544
|
const probes = {
|
|
2532
2545
|
currentBootIdentity: dependencies.currentBootIdentity ?? (() => readInferenceSystemBootIdentity()),
|
|
2533
2546
|
observeIdentity: dependencies.processIdentity ?? defaultProcessIdentity,
|
|
2534
|
-
isProcessAlive: dependencies.processAlive ??
|
|
2535
|
-
try {
|
|
2536
|
-
process.kill(pid, 0);
|
|
2537
|
-
return true;
|
|
2538
|
-
} catch (error) {
|
|
2539
|
-
if (error.code === "ESRCH") return false;
|
|
2540
|
-
throw error;
|
|
2541
|
-
}
|
|
2542
|
-
})
|
|
2547
|
+
isProcessAlive: dependencies.processAlive ?? processExists
|
|
2543
2548
|
};
|
|
2544
2549
|
const [ownerIdentity, bootIdentity] = await Promise.all([
|
|
2545
2550
|
(dependencies.currentProcessIdentity ?? defaultCurrentProcessIdentity)(),
|
|
@@ -2076,6 +2076,15 @@ var defaultCurrentProcessIdentity = async () => {
|
|
|
2076
2076
|
throw error;
|
|
2077
2077
|
}
|
|
2078
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
|
+
};
|
|
2079
2088
|
var processLockObservationCache = /* @__PURE__ */ new Map();
|
|
2080
2089
|
var inferenceProcessIdentitiesMatch = (stored, observed) => stored === observed;
|
|
2081
2090
|
async function ensureInferencePrivateDirectory(path, dependencies = {}) {
|
|
@@ -2291,6 +2300,10 @@ var inspectProcessLockFile = async (path, label, probes) => {
|
|
|
2291
2300
|
const cached = processLockObservationCache.get(cacheKey);
|
|
2292
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);
|
|
2293
2302
|
if (!observedIdentity) {
|
|
2303
|
+
if (!probes.isProcessAlive(ownerPid)) {
|
|
2304
|
+
stale = true;
|
|
2305
|
+
return { state: "stale", handle, stat };
|
|
2306
|
+
}
|
|
2294
2307
|
throw new Error("Inference host could not verify the existing lock owner identity.");
|
|
2295
2308
|
}
|
|
2296
2309
|
processLockObservationCache.set(cacheKey, {
|
|
@@ -2466,15 +2479,7 @@ async function acquireInferenceHostProcessLock(path, dependencies = {}) {
|
|
|
2466
2479
|
const probes = {
|
|
2467
2480
|
currentBootIdentity: dependencies.currentBootIdentity ?? (() => readInferenceSystemBootIdentity()),
|
|
2468
2481
|
observeIdentity: dependencies.processIdentity ?? defaultProcessIdentity,
|
|
2469
|
-
isProcessAlive: dependencies.processAlive ??
|
|
2470
|
-
try {
|
|
2471
|
-
process.kill(pid, 0);
|
|
2472
|
-
return true;
|
|
2473
|
-
} catch (error) {
|
|
2474
|
-
if (error.code === "ESRCH") return false;
|
|
2475
|
-
throw error;
|
|
2476
|
-
}
|
|
2477
|
-
})
|
|
2482
|
+
isProcessAlive: dependencies.processAlive ?? processExists
|
|
2478
2483
|
};
|
|
2479
2484
|
const [ownerIdentity, bootIdentity] = await Promise.all([
|
|
2480
2485
|
(dependencies.currentProcessIdentity ?? defaultCurrentProcessIdentity)(),
|
|
@@ -2554,6 +2559,7 @@ var launcherSibling = (manifest, suffix) => {
|
|
|
2554
2559
|
if (!manifest.endsWith(".service.json")) throw new Error("Invalid service manifest path.");
|
|
2555
2560
|
return `${manifest.slice(0, -".service.json".length)}${suffix}`;
|
|
2556
2561
|
};
|
|
2562
|
+
var launcherLockPath = (manifest) => launcherSibling(manifest, ".service-launcher.lock");
|
|
2557
2563
|
var within = (parent, child) => {
|
|
2558
2564
|
const part = relative2(resolve2(parent), resolve2(child));
|
|
2559
2565
|
return Boolean(part) && !part.startsWith("..") && !isAbsolute2(part);
|
|
@@ -2614,7 +2620,7 @@ var targetForSelection = async (selection) => {
|
|
|
2614
2620
|
// lib/inference-host/service-launcher.ts
|
|
2615
2621
|
var runInferenceHostServiceLauncher = async (manifestPathValue, lockPathValue, dependencies = {}) => {
|
|
2616
2622
|
const manifestPath = resolve3(manifestPathValue);
|
|
2617
|
-
const lock = await acquireInferenceHostProcessLock(
|
|
2623
|
+
const lock = await acquireInferenceHostProcessLock(launcherLockPath(manifestPath));
|
|
2618
2624
|
const lifetime = new AbortController();
|
|
2619
2625
|
let child = null;
|
|
2620
2626
|
const stop = () => {
|
|
@@ -2676,8 +2682,8 @@ var runInferenceHostServiceLauncher = async (manifestPathValue, lockPathValue, d
|
|
|
2676
2682
|
manifest = JSON.parse(await readFile3(manifestPath, "utf8"));
|
|
2677
2683
|
let state = await readLauncherState(manifestPath);
|
|
2678
2684
|
if (!state) throw new Error("Service launcher recovery state is missing.");
|
|
2679
|
-
const rollback = async (reason) => {
|
|
2680
|
-
if (!state.previous || !await desired()) return false;
|
|
2685
|
+
const rollback = async (reason, whileStopped = false) => {
|
|
2686
|
+
if (!state.previous || !whileStopped && !await desired()) return false;
|
|
2681
2687
|
const failed = state.active;
|
|
2682
2688
|
await writeLauncherSelection(manifestPath, state.previous.selection);
|
|
2683
2689
|
await writeAtomicInferencePrivateFile(launcherSibling(manifestPath, ".service-release-rejection.json"), `${JSON.stringify({
|
|
@@ -2693,20 +2699,31 @@ var runInferenceHostServiceLauncher = async (manifestPathValue, lockPathValue, d
|
|
|
2693
2699
|
return true;
|
|
2694
2700
|
};
|
|
2695
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
|
+
};
|
|
2696
2709
|
while (await desired()) {
|
|
2697
2710
|
state.pending = true;
|
|
2698
2711
|
await writeLauncherState(manifestPath, state);
|
|
2699
|
-
if (!await desired()) return
|
|
2712
|
+
if (!await desired()) return await endAttemptForStop();
|
|
2700
2713
|
const launchedAt = Date.now();
|
|
2701
2714
|
const runtimePath = launcherSibling(manifestPath, ".service-runtime.json");
|
|
2702
2715
|
await rm3(runtimePath, { force: true });
|
|
2703
|
-
if (!await desired()) return
|
|
2716
|
+
if (!await desired()) return await endAttemptForStop();
|
|
2717
|
+
let stopRequested = false;
|
|
2704
2718
|
child = runCore(manifest.executable, state.active, ["--service-manifest", manifestPath, "--service-lock", resolve3(lockPathValue)]);
|
|
2705
2719
|
const readiness = new AbortController();
|
|
2706
2720
|
const watchingStop = new AbortController();
|
|
2707
2721
|
const stopped = (async () => {
|
|
2708
2722
|
while (!watchingStop.signal.aborted) {
|
|
2709
|
-
if (!await desired())
|
|
2723
|
+
if (!await desired()) {
|
|
2724
|
+
stopRequested = true;
|
|
2725
|
+
return { kind: "stop", code: 0 };
|
|
2726
|
+
}
|
|
2710
2727
|
await new Promise((done) => {
|
|
2711
2728
|
if (watchingStop.signal.aborted) {
|
|
2712
2729
|
done();
|
|
@@ -2798,7 +2815,12 @@ var runInferenceHostServiceLauncher = async (manifestPathValue, lockPathValue, d
|
|
|
2798
2815
|
}
|
|
2799
2816
|
}
|
|
2800
2817
|
}
|
|
2801
|
-
|
|
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
|
+
}
|
|
2802
2824
|
if (code === EXIT_CODE_TEMPFAIL) {
|
|
2803
2825
|
const selected = await readLauncherSelection(manifestPath);
|
|
2804
2826
|
if (selected && selected.package_version !== state.active.package_version) {
|
|
@@ -2818,13 +2840,19 @@ var runInferenceHostServiceLauncher = async (manifestPathValue, lockPathValue, d
|
|
|
2818
2840
|
await writeLauncherState(manifestPath, state);
|
|
2819
2841
|
continue;
|
|
2820
2842
|
}
|
|
2821
|
-
state = {
|
|
2843
|
+
state = {
|
|
2844
|
+
schema_version: state.schema_version,
|
|
2845
|
+
active: next,
|
|
2846
|
+
previous: failedReadiness ? state.previous : state.active,
|
|
2847
|
+
pending: false
|
|
2848
|
+
};
|
|
2822
2849
|
await writeLauncherState(manifestPath, state);
|
|
2823
2850
|
await log("service_launcher_handoff", next.package_version);
|
|
2824
2851
|
continue;
|
|
2825
2852
|
}
|
|
2826
2853
|
}
|
|
2827
|
-
if (!
|
|
2854
|
+
if (!failedReadiness && (stopRequested || first.kind === "ready" && code === 0)) continue;
|
|
2855
|
+
if (!await rollback(failure)) return code || 1;
|
|
2828
2856
|
}
|
|
2829
2857
|
return 0;
|
|
2830
2858
|
} finally {
|
package/bin/vtx.js
CHANGED
|
@@ -122,7 +122,7 @@ var init_routing = __esm({
|
|
|
122
122
|
var agent_cli_release_default;
|
|
123
123
|
var init_agent_cli_release = __esm({
|
|
124
124
|
"agent-cli-release.json"() {
|
|
125
|
-
agent_cli_release_default = { package_name: "@vtxmacro/cli", package_version: "2026.10.
|
|
125
|
+
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" } } };
|
|
126
126
|
}
|
|
127
127
|
});
|
|
128
128
|
|
|
@@ -4911,15 +4911,7 @@ async function acquireInferenceHostProcessLock(path, dependencies = {}) {
|
|
|
4911
4911
|
const probes = {
|
|
4912
4912
|
currentBootIdentity: dependencies.currentBootIdentity ?? (() => readInferenceSystemBootIdentity()),
|
|
4913
4913
|
observeIdentity: dependencies.processIdentity ?? defaultProcessIdentity,
|
|
4914
|
-
isProcessAlive: dependencies.processAlive ??
|
|
4915
|
-
try {
|
|
4916
|
-
process.kill(pid, 0);
|
|
4917
|
-
return true;
|
|
4918
|
-
} catch (error48) {
|
|
4919
|
-
if (error48.code === "ESRCH") return false;
|
|
4920
|
-
throw error48;
|
|
4921
|
-
}
|
|
4922
|
-
})
|
|
4914
|
+
isProcessAlive: dependencies.processAlive ?? processExists
|
|
4923
4915
|
};
|
|
4924
4916
|
const [ownerIdentity, bootIdentity] = await Promise.all([
|
|
4925
4917
|
(dependencies.currentProcessIdentity ?? defaultCurrentProcessIdentity)(),
|
|
@@ -4991,7 +4983,7 @@ async function acquireInferenceHostProcessLock(path, dependencies = {}) {
|
|
|
4991
4983
|
}
|
|
4992
4984
|
};
|
|
4993
4985
|
}
|
|
4994
|
-
var HOST_CORE_POLICY, loadInferenceReceiptDurabilityTimeoutMs, loadInferenceAgentDataRequestTimeoutMs, loadInferenceAgentCommandLockPolicy, InferenceHostProcessLockBusyError, INFERENCE_CREDENTIAL_NAMESPACE, MAX_INFERENCE_PRIVATE_FILE_BYTES, WINDOWS_PRIVATE_ACL_MODES, WINDOWS_PRIVATE_ACL_BROKER_SCRIPT, WINDOWS_IDENTITY_COMMAND_TIMEOUT_MS, WINDOWS_PRIVATE_ACL_BROKER_STARTUP_TIMEOUT_MS, SMALL_IDENTITY_COMMAND_TIMEOUT_MS, windowsPowerShellEnvironment, windowsPrivateAclBrokerInvocation, WindowsPrivateAclBroker, defaultWindowsPrivateAclBroker, runWindowsPrivateAcl, windowsAclCache, windowsAclIdentity, aclCacheKey, secureWindowsPrivatePath, invalidateWindowsAclCache, rebindHardenedWindowsAclAfterRename, rebindHardenedWindowsDirectoryAfterOwnedMutation, isWindowsPrivateAclVerificationFailure, isDefaultWindowsPrivatePath, secureExistingWindowsPath, linuxProcessIdentity, windowsProcessIdentityInvocation, windowsBootIdentityInvocation, windowsProcessIdentity, darwinProcessIdentity, runSmallIdentityCommand, cachedSystemBootIdentity, readInferenceSystemBootIdentity, defaultProcessIdentity, cachedCurrentProcessIdentity, defaultCurrentProcessIdentity, readInferenceHostProcessLockStatus, processLockObservationCache, inferenceProcessIdentitiesMatch, resolveInferenceHostApiUrl, inferenceHostSupervisorServiceManifestPath, DEFAULT_INFERENCE_HOST_INSTANCE, SAFE_INFERENCE_HOST_INSTANCE, requireNamedInstancePath, credentialStoreIdentity, inferenceHostCredentialContextPath, inferenceHostCredentialContextTransitionPath, credentialContextForConfig, WINDOWS_PRIVATE_FILE_REPLACE_ERROR_CODES, PROCESS_LOCK_PUBLICATION_GRACE_MS, PROCESS_LOCK_MAX_RECORD_BYTES, PROCESS_LOCK_GUARD_ELECTION_LEASE_MS, PROCESS_LOCK_GUARD_ELECTION_STALE_MS, PROCESS_LOCK_GUARD_ELECTION_ATTEMPTS, PROCESS_LOCK_GUARD_ELECTION_BACKOFF_MS, PROCESS_LOCK_LABEL, PROCESS_LOCK_GUARD_LABEL, sameProcessLockFile, openExclusiveProcessLockFile, inspectProcessLockFile, removeVerifiedStaleProcessLockFile, removeStaleProcessLockReclaimGuard, acquireProcessLockReclaimGuard;
|
|
4986
|
+
var HOST_CORE_POLICY, loadInferenceReceiptDurabilityTimeoutMs, loadInferenceAgentDataRequestTimeoutMs, loadInferenceAgentCommandLockPolicy, InferenceHostProcessLockBusyError, INFERENCE_CREDENTIAL_NAMESPACE, MAX_INFERENCE_PRIVATE_FILE_BYTES, WINDOWS_PRIVATE_ACL_MODES, WINDOWS_PRIVATE_ACL_BROKER_SCRIPT, WINDOWS_IDENTITY_COMMAND_TIMEOUT_MS, WINDOWS_PRIVATE_ACL_BROKER_STARTUP_TIMEOUT_MS, SMALL_IDENTITY_COMMAND_TIMEOUT_MS, windowsPowerShellEnvironment, windowsPrivateAclBrokerInvocation, WindowsPrivateAclBroker, defaultWindowsPrivateAclBroker, runWindowsPrivateAcl, windowsAclCache, windowsAclIdentity, aclCacheKey, secureWindowsPrivatePath, invalidateWindowsAclCache, rebindHardenedWindowsAclAfterRename, rebindHardenedWindowsDirectoryAfterOwnedMutation, isWindowsPrivateAclVerificationFailure, isDefaultWindowsPrivatePath, secureExistingWindowsPath, linuxProcessIdentity, windowsProcessIdentityInvocation, windowsBootIdentityInvocation, windowsProcessIdentity, darwinProcessIdentity, runSmallIdentityCommand, cachedSystemBootIdentity, readInferenceSystemBootIdentity, defaultProcessIdentity, cachedCurrentProcessIdentity, defaultCurrentProcessIdentity, processExists, readInferenceHostProcessLockStatus, processLockObservationCache, inferenceProcessIdentitiesMatch, resolveInferenceHostApiUrl, inferenceHostSupervisorServiceManifestPath, DEFAULT_INFERENCE_HOST_INSTANCE, SAFE_INFERENCE_HOST_INSTANCE, requireNamedInstancePath, credentialStoreIdentity, inferenceHostCredentialContextPath, inferenceHostCredentialContextTransitionPath, credentialContextForConfig, WINDOWS_PRIVATE_FILE_REPLACE_ERROR_CODES, PROCESS_LOCK_PUBLICATION_GRACE_MS, PROCESS_LOCK_MAX_RECORD_BYTES, PROCESS_LOCK_GUARD_ELECTION_LEASE_MS, PROCESS_LOCK_GUARD_ELECTION_STALE_MS, PROCESS_LOCK_GUARD_ELECTION_ATTEMPTS, PROCESS_LOCK_GUARD_ELECTION_BACKOFF_MS, PROCESS_LOCK_LABEL, PROCESS_LOCK_GUARD_LABEL, sameProcessLockFile, openExclusiveProcessLockFile, inspectProcessLockFile, removeVerifiedStaleProcessLockFile, removeStaleProcessLockReclaimGuard, acquireProcessLockReclaimGuard;
|
|
4995
4987
|
var init_config2 = __esm({
|
|
4996
4988
|
"lib/inference-host/config.ts"() {
|
|
4997
4989
|
"use strict";
|
|
@@ -5609,6 +5601,15 @@ while(($line=[Console]::In.ReadLine()) -ne $null) {
|
|
|
5609
5601
|
throw error48;
|
|
5610
5602
|
}
|
|
5611
5603
|
};
|
|
5604
|
+
processExists = (pid) => {
|
|
5605
|
+
try {
|
|
5606
|
+
process.kill(pid, 0);
|
|
5607
|
+
return true;
|
|
5608
|
+
} catch (error48) {
|
|
5609
|
+
if (error48.code === "ESRCH") return false;
|
|
5610
|
+
throw error48;
|
|
5611
|
+
}
|
|
5612
|
+
};
|
|
5612
5613
|
readInferenceHostProcessLockStatus = async (path) => {
|
|
5613
5614
|
const raw = await readInferencePrivateFile(path, "Inference host process lock");
|
|
5614
5615
|
if (raw === null) return { state: "not_running" };
|
|
@@ -5622,7 +5623,7 @@ while(($line=[Console]::In.ReadLine()) -ne $null) {
|
|
|
5622
5623
|
readInferenceSystemBootIdentity()
|
|
5623
5624
|
]);
|
|
5624
5625
|
if (boot !== owner2.boot_identity) return { state: "stale" };
|
|
5625
|
-
if (identity3 === null) return { state: "unknown" };
|
|
5626
|
+
if (identity3 === null) return { state: processExists(owner2.pid) ? "unknown" : "stale" };
|
|
5626
5627
|
return { state: identity3 === owner2.process_identity ? "running" : "stale" };
|
|
5627
5628
|
} catch {
|
|
5628
5629
|
return { state: "unknown" };
|
|
@@ -5740,6 +5741,10 @@ while(($line=[Console]::In.ReadLine()) -ne $null) {
|
|
|
5740
5741
|
const cached2 = processLockObservationCache.get(cacheKey);
|
|
5741
5742
|
const observedIdentity = cached2 && cached2.dev === stat2.dev && cached2.ino === stat2.ino && cached2.pid === ownerPid && cached2.storedIdentity === storedIdentity && Date.now() - cached2.observedAtMs < HOST_CORE_POLICY.process_lock_identity_cache_ms ? cached2.observedIdentity : await probes.observeIdentity(ownerPid);
|
|
5742
5743
|
if (!observedIdentity) {
|
|
5744
|
+
if (!probes.isProcessAlive(ownerPid)) {
|
|
5745
|
+
stale = true;
|
|
5746
|
+
return { state: "stale", handle, stat: stat2 };
|
|
5747
|
+
}
|
|
5743
5748
|
throw new Error("Inference host could not verify the existing lock owner identity.");
|
|
5744
5749
|
}
|
|
5745
5750
|
processLockObservationCache.set(cacheKey, {
|
|
@@ -44363,7 +44368,7 @@ $items = @(Get-CimInstance Win32_Process | Where-Object { $_.Name -in @('node.ex
|
|
|
44363
44368
|
}
|
|
44364
44369
|
}
|
|
44365
44370
|
if ((options.platform ?? process.platform) !== "win32") {
|
|
44366
|
-
const
|
|
44371
|
+
const processExists2 = options.processExists ?? ((pid) => {
|
|
44367
44372
|
try {
|
|
44368
44373
|
process.kill(pid, 0);
|
|
44369
44374
|
return true;
|
|
@@ -44371,7 +44376,7 @@ $items = @(Get-CimInstance Win32_Process | Where-Object { $_.Name -in @('node.ex
|
|
|
44371
44376
|
return error48.code !== "ESRCH";
|
|
44372
44377
|
}
|
|
44373
44378
|
});
|
|
44374
|
-
if ([...pids].some((pid) =>
|
|
44379
|
+
if ([...pids].some((pid) => processExists2(pid)) || processExists2(-options.guardianPid)) {
|
|
44375
44380
|
throw new Error("Codex guardian process tree is still running; recovery evidence was preserved.");
|
|
44376
44381
|
}
|
|
44377
44382
|
return;
|
|
@@ -50696,7 +50701,7 @@ var init_durable_adapter = __esm({
|
|
|
50696
50701
|
// lib/inference-host/service-launcher-state.ts
|
|
50697
50702
|
import { access as access6, readFile as readFile12, rm as rm15 } from "node:fs/promises";
|
|
50698
50703
|
import { dirname as dirname16, isAbsolute as isAbsolute7, join as join17, relative as relative4, resolve as resolve13 } from "node:path";
|
|
50699
|
-
var launcherSibling, within, launcherSelection, readLauncherSelection, readLauncherState, writeLauncherState, targetForSelection;
|
|
50704
|
+
var launcherSibling, launcherLockPath, within, launcherSelection, readLauncherSelection, readLauncherState, writeLauncherState, targetForSelection;
|
|
50700
50705
|
var init_service_launcher_state = __esm({
|
|
50701
50706
|
"lib/inference-host/service-launcher-state.ts"() {
|
|
50702
50707
|
"use strict";
|
|
@@ -50709,6 +50714,7 @@ var init_service_launcher_state = __esm({
|
|
|
50709
50714
|
if (!manifest.endsWith(".service.json")) throw new Error("Invalid service manifest path.");
|
|
50710
50715
|
return `${manifest.slice(0, -".service.json".length)}${suffix}`;
|
|
50711
50716
|
};
|
|
50717
|
+
launcherLockPath = (manifest) => launcherSibling(manifest, ".service-launcher.lock");
|
|
50712
50718
|
within = (parent, child) => {
|
|
50713
50719
|
const part = relative4(resolve13(parent), resolve13(child));
|
|
50714
50720
|
return Boolean(part) && !part.startsWith("..") && !isAbsolute7(part);
|
|
@@ -50771,7 +50777,7 @@ import { homedir as homedir4 } from "node:os";
|
|
|
50771
50777
|
import { dirname as dirname17, join as join18, resolve as resolve14 } from "node:path";
|
|
50772
50778
|
import { Transform } from "node:stream";
|
|
50773
50779
|
import { pipeline } from "node:stream/promises";
|
|
50774
|
-
var SERVICE_NAME, SYSTEMD_UNIT, LAUNCHD_LABEL, SERVICE_POLICY, ATOMIC_REPLACEMENT_READ_ATTEMPTS, SERVICE_COOPERATIVE_STOP_SECONDS, pollAttemptsWithin, INFERENCE_HOST_SERVICE_DRAIN_COMMAND, INFERENCE_HOST_SERVICE_QUIESCE_COMMAND, InferenceHostBootstrapRestartRequiredError, inferenceHostServiceChildEnvironment, isWindowsSubsystemForLinux, inferenceHostServiceManifestPath, inferenceHostServiceDesiredPath, inferenceHostServiceLogPath, inferenceHostServiceRotatedLogPath, inferenceHostServiceRuntimePath, xmlEscape, plistEscape, systemdQuote, defaultRunCommand, probeInferenceHostLauncher, managerName, assertRuntimeEnvironment, withoutConcurrencyLimit, assertServicePath, manifestGeneration, assertWorker, assertManifest, assertServiceRuntimeState, assertDesiredState, readInferenceHostServiceManifest, readManifestAcrossAtomicReplacement, readInferenceHostServiceRuntime, readRuntimeAcrossAtomicReplacement, readInferenceHostServiceDesired, readDesiredAcrossAtomicReplacement, writeDesired, runtimeEnvironment, serviceBootstrapArguments, windowsOwnedCommandLine, vbScriptString, windowsServiceLauncher, windowsTaskXml, systemdUnit, launchAgentPlist, sameWorker, sameServiceDefinition, sameWorkerSet, InferenceHostServiceManager, serviceLogSinks, serviceLogSize, rotateServiceLog, writeServiceLog, appendServiceLog, spawnInferenceHostServiceChild, runInferenceHostServiceSupervisor;
|
|
50780
|
+
var SERVICE_NAME, SYSTEMD_UNIT, LAUNCHD_LABEL, SERVICE_POLICY, ATOMIC_REPLACEMENT_READ_ATTEMPTS, SERVICE_COOPERATIVE_STOP_SECONDS, pollAttemptsWithin, lockStillHeld, INFERENCE_HOST_SERVICE_DRAIN_COMMAND, INFERENCE_HOST_SERVICE_QUIESCE_COMMAND, InferenceHostBootstrapRestartRequiredError, inferenceHostServiceChildEnvironment, isWindowsSubsystemForLinux, inferenceHostServiceManifestPath, inferenceHostServiceDesiredPath, inferenceHostServiceLogPath, inferenceHostServiceRotatedLogPath, inferenceHostServiceRuntimePath, xmlEscape, plistEscape, systemdQuote, defaultRunCommand, probeInferenceHostLauncher, managerName, assertRuntimeEnvironment, withoutConcurrencyLimit, assertServicePath, manifestGeneration, assertWorker, assertManifest, assertServiceRuntimeState, assertDesiredState, readInferenceHostServiceManifest, readManifestAcrossAtomicReplacement, readInferenceHostServiceRuntime, readRuntimeAcrossAtomicReplacement, readInferenceHostServiceDesired, readDesiredAcrossAtomicReplacement, writeDesired, runtimeEnvironment, serviceBootstrapArguments, windowsOwnedCommandLine, vbScriptString, windowsServiceLauncher, windowsTaskXml, systemdUnit, launchAgentPlist, sameWorker, sameServiceDefinition, sameWorkerSet, InferenceHostServiceManager, serviceLogSinks, serviceLogSize, rotateServiceLog, writeServiceLog, appendServiceLog, spawnInferenceHostServiceChild, runInferenceHostServiceSupervisor;
|
|
50775
50781
|
var init_service = __esm({
|
|
50776
50782
|
"lib/inference-host/service.ts"() {
|
|
50777
50783
|
"use strict";
|
|
@@ -50793,6 +50799,7 @@ var init_service = __esm({
|
|
|
50793
50799
|
ATOMIC_REPLACEMENT_READ_ATTEMPTS = runtime_policy_generated_default.external_inference.host_core.atomic_replacement_read_attempts;
|
|
50794
50800
|
SERVICE_COOPERATIVE_STOP_SECONDS = Math.ceil(SERVICE_POLICY.cooperative_stop_timeout_ms / MS_PER_SECOND);
|
|
50795
50801
|
pollAttemptsWithin = (milliseconds) => Math.ceil(milliseconds / SERVICE_POLICY.startup_poll_interval_ms);
|
|
50802
|
+
lockStillHeld = (error48) => error48 instanceof Error && (error48.message.includes("Another inference host process already owns") || error48.message.includes("could not verify the existing lock owner identity"));
|
|
50796
50803
|
INFERENCE_HOST_SERVICE_DRAIN_COMMAND = "vtx-inference-host-service-drain-v1";
|
|
50797
50804
|
INFERENCE_HOST_SERVICE_QUIESCE_COMMAND = "vtx-inference-host-service-quiesce-v1";
|
|
50798
50805
|
InferenceHostBootstrapRestartRequiredError = class extends Error {
|
|
@@ -51358,6 +51365,7 @@ WantedBy=default.target
|
|
|
51358
51365
|
generation: randomUUID12(),
|
|
51359
51366
|
installed_at: this.now().toISOString()
|
|
51360
51367
|
});
|
|
51368
|
+
await this.awaitNoLauncherFinishingStop();
|
|
51361
51369
|
await writeAtomicInferencePrivateFile(
|
|
51362
51370
|
this.manifestPath(),
|
|
51363
51371
|
`${JSON.stringify(restoredManifest, null, JSON_INDENT_SPACES)}
|
|
@@ -51437,6 +51445,7 @@ ${result.stderr}`)) {
|
|
|
51437
51445
|
this.serviceBootstrapLockPath()
|
|
51438
51446
|
);
|
|
51439
51447
|
const definition = this.platform === "win32" ? windowsTaskXml(this.windowsLauncherPath(), this.windowsDirectory, this.username) : this.platform === "darwin" ? launchAgentPlist(manifest.executable, args, manifest.log_path) : systemdUnit(manifest.executable, args);
|
|
51448
|
+
if (desiredRunning) await this.awaitNoLauncherFinishingStop();
|
|
51440
51449
|
const existingRecovery = await readLauncherState(this.manifestPath());
|
|
51441
51450
|
let managerInstallAttempted = false;
|
|
51442
51451
|
try {
|
|
@@ -51582,10 +51591,11 @@ ${cleanup.stderr}`)) {
|
|
|
51582
51591
|
}
|
|
51583
51592
|
if (previous) {
|
|
51584
51593
|
try {
|
|
51585
|
-
await this.uninstallUnlocked(true);
|
|
51594
|
+
await this.uninstallUnlocked({ reconfiguring: true });
|
|
51586
51595
|
} catch (error48) {
|
|
51596
|
+
const restored = await readInferenceHostServiceDesired(this.desiredPath()).catch(() => false);
|
|
51587
51597
|
throw new Error(
|
|
51588
|
-
"Inference-host service reconfiguration could not stop the previous supervisor; its desired state was restored.",
|
|
51598
|
+
restored ? "Inference-host service reconfiguration could not stop the previous supervisor; its desired state was restored." : "Inference-host service reconfiguration could not stop the previous supervisor; it stays stopped.",
|
|
51589
51599
|
{ cause: error48 }
|
|
51590
51600
|
);
|
|
51591
51601
|
}
|
|
@@ -51693,6 +51703,7 @@ ${cleanup.stderr}`)) {
|
|
|
51693
51703
|
if (!await readInferenceHostServiceManifest(this.manifestPath())) {
|
|
51694
51704
|
throw new Error("Inference-host service is not installed.");
|
|
51695
51705
|
}
|
|
51706
|
+
await this.awaitNoLauncherFinishingStop();
|
|
51696
51707
|
await writeDesired(this.desiredPath(), true, this.now());
|
|
51697
51708
|
const result = await this.managerCommand("start");
|
|
51698
51709
|
if (result.exitCode !== 0 && !/already running|in progress/iu.test(`${result.stdout}
|
|
@@ -51708,7 +51719,7 @@ ${result.stderr}`)) {
|
|
|
51708
51719
|
}
|
|
51709
51720
|
}
|
|
51710
51721
|
async stop() {
|
|
51711
|
-
return await this.withControlLock(async () => await this.stopUnlocked());
|
|
51722
|
+
return await this.withControlLock(async () => await this.stopUnlocked({ restoreOnFailure: false }));
|
|
51712
51723
|
}
|
|
51713
51724
|
/**
|
|
51714
51725
|
* Quiesce the complete installed worker boundary while one exact instance's
|
|
@@ -51732,7 +51743,7 @@ ${result.stderr}`)) {
|
|
|
51732
51743
|
await options.prepare?.(context);
|
|
51733
51744
|
const before = await this.status();
|
|
51734
51745
|
if (recordedDesiredRunning || before.manager_active) {
|
|
51735
|
-
await this.stopUnlocked(true);
|
|
51746
|
+
await this.stopUnlocked({ restoreOnFailure: true, preserveManifestGeneration: true });
|
|
51736
51747
|
} else {
|
|
51737
51748
|
await writeDesired(this.desiredPath(), false, this.now());
|
|
51738
51749
|
}
|
|
@@ -51774,44 +51785,98 @@ ${result.stderr}`)) {
|
|
|
51774
51785
|
return { result, status: restoredStatus };
|
|
51775
51786
|
});
|
|
51776
51787
|
}
|
|
51777
|
-
|
|
51788
|
+
/**
|
|
51789
|
+
* True once no process holds any of these locks, false when one still does
|
|
51790
|
+
* after the cooperative-stop window.
|
|
51791
|
+
*/
|
|
51792
|
+
async processLocksReleased(lockPaths) {
|
|
51793
|
+
for (let attempt2 = 0; attempt2 < this.stopWaitAttempts; attempt2 += 1) {
|
|
51794
|
+
let allReleased = true;
|
|
51795
|
+
for (const lockPath of lockPaths) {
|
|
51796
|
+
try {
|
|
51797
|
+
const probe = await this.acquireProcessLock(lockPath);
|
|
51798
|
+
await probe.release();
|
|
51799
|
+
} catch (error48) {
|
|
51800
|
+
if (lockStillHeld(error48)) {
|
|
51801
|
+
allReleased = false;
|
|
51802
|
+
break;
|
|
51803
|
+
}
|
|
51804
|
+
throw error48;
|
|
51805
|
+
}
|
|
51806
|
+
}
|
|
51807
|
+
if (allReleased) return true;
|
|
51808
|
+
await this.sleep(SERVICE_POLICY.startup_poll_interval_ms);
|
|
51809
|
+
}
|
|
51810
|
+
return false;
|
|
51811
|
+
}
|
|
51812
|
+
/**
|
|
51813
|
+
* A stop is no verdict on a release whose readiness attempt it ended. A
|
|
51814
|
+
* stable launcher installed before that rule (it is never replaced) leaves
|
|
51815
|
+
* the attempt pending when it stops, and its next start then rolls the
|
|
51816
|
+
* release back as if it had crashed. Once the stop has outlasted the
|
|
51817
|
+
* launcher, end that attempt here, under the launcher's own lock.
|
|
51818
|
+
*/
|
|
51819
|
+
async endLauncherAttemptForStop() {
|
|
51820
|
+
let lock2 = null;
|
|
51821
|
+
for (let attempt2 = 0; attempt2 < this.stopWaitAttempts && !lock2; attempt2 += 1) {
|
|
51822
|
+
try {
|
|
51823
|
+
lock2 = await this.acquireProcessLock(launcherLockPath(this.manifestPath()));
|
|
51824
|
+
} catch (error48) {
|
|
51825
|
+
if (!lockStillHeld(error48)) throw error48;
|
|
51826
|
+
await this.sleep(SERVICE_POLICY.startup_poll_interval_ms);
|
|
51827
|
+
}
|
|
51828
|
+
}
|
|
51829
|
+
if (!lock2) return;
|
|
51830
|
+
try {
|
|
51831
|
+
const state2 = await readLauncherState(this.manifestPath()).catch(() => null);
|
|
51832
|
+
if (state2?.pending) await writeLauncherState(this.manifestPath(), { ...state2, pending: false });
|
|
51833
|
+
} finally {
|
|
51834
|
+
await lock2.release();
|
|
51835
|
+
}
|
|
51836
|
+
}
|
|
51837
|
+
/**
|
|
51838
|
+
* Desired-running goes back to true only once no launcher is still finishing
|
|
51839
|
+
* a stop. A launcher judges its core's exit by the desired state it reads
|
|
51840
|
+
* afterwards, and the stable launcher an older release installed (it is
|
|
51841
|
+
* never replaced) reads a true there as its ready release failing and rolls
|
|
51842
|
+
* it back.
|
|
51843
|
+
*/
|
|
51844
|
+
async awaitNoLauncherFinishingStop() {
|
|
51845
|
+
if (await readInferenceHostServiceDesired(this.desiredPath())) return;
|
|
51846
|
+
if (!await this.processLocksReleased([launcherLockPath(this.manifestPath())])) {
|
|
51847
|
+
throw new Error(
|
|
51848
|
+
`Inference-host service launcher was still finishing a stop after ${SERVICE_COOPERATIVE_STOP_SECONDS} seconds; start the service once it has stopped.`
|
|
51849
|
+
);
|
|
51850
|
+
}
|
|
51851
|
+
}
|
|
51852
|
+
/**
|
|
51853
|
+
* A requested stop (`service stop`, uninstall) fences automatic restart: if
|
|
51854
|
+
* it cannot finish cooperatively it says so and leaves desired-running
|
|
51855
|
+
* false, so the service finishes its in-flight work and stays stopped. Only
|
|
51856
|
+
* the internal quiesces (guarded recovery, a reconfiguration that replaces
|
|
51857
|
+
* the definition) restore the supervisor they paused.
|
|
51858
|
+
*/
|
|
51859
|
+
async stopUnlocked(options) {
|
|
51778
51860
|
const manifest = await readInferenceHostServiceManifest(this.manifestPath());
|
|
51779
51861
|
if (!manifest) {
|
|
51780
51862
|
throw new Error("Inference-host service is not installed.");
|
|
51781
51863
|
}
|
|
51782
|
-
const restoreOnFailure = await readInferenceHostServiceDesired(this.desiredPath());
|
|
51864
|
+
const restoreOnFailure = options.restoreOnFailure && await readInferenceHostServiceDesired(this.desiredPath());
|
|
51865
|
+
const launcherStatus = await readInferenceHostProcessLockStatus(launcherLockPath(this.manifestPath())).catch(() => ({ state: "unknown" }));
|
|
51866
|
+
const launcherWasRunning = launcherStatus.state === "running" || launcherStatus.state === "unknown";
|
|
51783
51867
|
await writeDesired(this.desiredPath(), false, this.now());
|
|
51784
51868
|
try {
|
|
51785
|
-
const
|
|
51869
|
+
const serviceReleased = await this.processLocksReleased([
|
|
51786
51870
|
`${this.config.supervisorProcessLockPath}.service`,
|
|
51787
|
-
this.serviceBootstrapLockPath()
|
|
51788
|
-
|
|
51789
|
-
|
|
51790
|
-
for (let attempt2 = 0; attempt2 < this.stopWaitAttempts; attempt2 += 1) {
|
|
51791
|
-
let allReleased = true;
|
|
51792
|
-
for (const serviceLockPath of serviceLockPaths) {
|
|
51793
|
-
try {
|
|
51794
|
-
const probe = await this.acquireProcessLock(serviceLockPath);
|
|
51795
|
-
await probe.release();
|
|
51796
|
-
} catch (error48) {
|
|
51797
|
-
if (error48 instanceof Error && error48.message.includes("Another inference host process already owns")) {
|
|
51798
|
-
allReleased = false;
|
|
51799
|
-
break;
|
|
51800
|
-
}
|
|
51801
|
-
throw error48;
|
|
51802
|
-
}
|
|
51803
|
-
}
|
|
51804
|
-
if (allReleased) {
|
|
51805
|
-
serviceReleased = true;
|
|
51806
|
-
break;
|
|
51807
|
-
}
|
|
51808
|
-
await this.sleep(SERVICE_POLICY.startup_poll_interval_ms);
|
|
51809
|
-
}
|
|
51871
|
+
this.serviceBootstrapLockPath(),
|
|
51872
|
+
launcherLockPath(this.manifestPath())
|
|
51873
|
+
]);
|
|
51810
51874
|
if (!serviceReleased) {
|
|
51811
51875
|
throw new Error(
|
|
51812
51876
|
`Inference-host updater or workers did not stop cooperatively within ${SERVICE_COOPERATIVE_STOP_SECONDS} seconds; refusing forced termination while cleanup may be pending.`
|
|
51813
51877
|
);
|
|
51814
51878
|
}
|
|
51879
|
+
if (launcherWasRunning) await this.endLauncherAttemptForStop();
|
|
51815
51880
|
const result = await this.managerCommand("stop");
|
|
51816
51881
|
if (result.exitCode !== 0 && !/not running|not found|does not exist|not loaded|cannot find|no such process/iu.test(`${result.stdout}
|
|
51817
51882
|
${result.stderr}`)) {
|
|
@@ -51825,7 +51890,7 @@ ${result.stderr}`)) {
|
|
|
51825
51890
|
} catch (error48) {
|
|
51826
51891
|
if (!restoreOnFailure) throw error48;
|
|
51827
51892
|
try {
|
|
51828
|
-
await this.restoreRunningSupervisor(manifest,
|
|
51893
|
+
await this.restoreRunningSupervisor(manifest, options.preserveManifestGeneration ?? false);
|
|
51829
51894
|
} catch (restoreError) {
|
|
51830
51895
|
throw new Error(
|
|
51831
51896
|
"Inference-host stop failed and the previous supervisor could not be restored.",
|
|
@@ -51910,12 +51975,14 @@ ${result.stderr}`)) {
|
|
|
51910
51975
|
async uninstall() {
|
|
51911
51976
|
return await this.withControlLock(async () => await this.uninstallUnlocked());
|
|
51912
51977
|
}
|
|
51913
|
-
|
|
51978
|
+
/** A reconfiguration keeps the recovery files and restores the supervisor it could not stop. */
|
|
51979
|
+
async uninstallUnlocked(options = { reconfiguring: false }) {
|
|
51980
|
+
const preserveRecovery = options.reconfiguring;
|
|
51914
51981
|
const manifest = await readInferenceHostServiceManifest(this.manifestPath());
|
|
51915
51982
|
if (!manifest) throw new Error("Inference-host service is not installed.");
|
|
51916
51983
|
const current = await this.status();
|
|
51917
51984
|
if (current.desired_running || current.manager_active) {
|
|
51918
|
-
await this.stopUnlocked();
|
|
51985
|
+
await this.stopUnlocked({ restoreOnFailure: options.reconfiguring });
|
|
51919
51986
|
} else {
|
|
51920
51987
|
await writeDesired(this.desiredPath(), false, this.now());
|
|
51921
51988
|
}
|
|
@@ -105066,7 +105133,7 @@ var init_execution_capacity = __esm({
|
|
|
105066
105133
|
});
|
|
105067
105134
|
|
|
105068
105135
|
// lib/runtime/owed-protection-warnings.ts
|
|
105069
|
-
var storageKey, isWarning, identity2, distinctProtectionWarnings, owedProtectionWarnings, store, oweProtectionWarnings, forgetProtectionWarnings;
|
|
105136
|
+
var storageKey, isWarning, identity2, owesProtectionRecord, distinctProtectionWarnings, owedProtectionWarnings, store, oweProtectionWarnings, forgetProtectionWarnings;
|
|
105070
105137
|
var init_owed_protection_warnings = __esm({
|
|
105071
105138
|
"lib/runtime/owed-protection-warnings.ts"() {
|
|
105072
105139
|
"use strict";
|
|
@@ -105081,6 +105148,7 @@ var init_owed_protection_warnings = __esm({
|
|
|
105081
105148
|
return record6 != null && typeof record6 === "object" && typeof record6.symbol === "string" && typeof record6.action === "string" && typeof record6.status === "string" && (record6.order_id === null || typeof record6.order_id === "string") && record6.execution_metadata != null && typeof record6.execution_metadata === "object";
|
|
105082
105149
|
};
|
|
105083
105150
|
identity2 = (warning) => JSON.stringify(warning);
|
|
105151
|
+
owesProtectionRecord = (report) => report.status === "executed" && report.order_id != null && (report.execution_metadata?.entry_order_id != null || report.execution_metadata?.previous_order_id != null);
|
|
105084
105152
|
distinctProtectionWarnings = (warnings) => {
|
|
105085
105153
|
const seen = /* @__PURE__ */ new Set();
|
|
105086
105154
|
return warnings.filter((warning) => {
|
|
@@ -105688,6 +105756,17 @@ var init_protective_oversized_leg = __esm({
|
|
|
105688
105756
|
}
|
|
105689
105757
|
});
|
|
105690
105758
|
|
|
105759
|
+
// lib/runtime/protective-report-entry.ts
|
|
105760
|
+
var init_protective_report_entry = __esm({
|
|
105761
|
+
"lib/runtime/protective-report-entry.ts"() {
|
|
105762
|
+
"use strict";
|
|
105763
|
+
init_define_VTX_CLAUDE_CODE_POLICY();
|
|
105764
|
+
init_define_VTX_EXO_POLICY();
|
|
105765
|
+
init_define_VTX_GROK_POLICY();
|
|
105766
|
+
init_define_VTX_PI_MODEL_POLICY();
|
|
105767
|
+
}
|
|
105768
|
+
});
|
|
105769
|
+
|
|
105691
105770
|
// lib/runtime/native-position-protection.ts
|
|
105692
105771
|
var nativeProtectionSettings, memberSetting, KINDS, formatTriggerOrNull, nativePositionTriggerPrice, nativeEntryRequest, HALF_UP_DIGIT, roundDecimalHalfUp, nativeTrailingRetracement, nativeAfterFillActions, classifyNativeOrderEnd, isOpenInDirection, nativePlacementGate, nativeStrayOrderDecision, FIRED_TRIGGER_CONDITION, TRAILING_ORDER_TYPE, closingSide, DECIMAL_PATTERN, decimalUnits2, fractionDigits, nativePlaceCover, positiveOrderId, nativeRearmDecision, nativeLostStopCrossed, readListedProtectiveRow, explainAbsentProtectiveOrder, readServerNativeProtectionState, nativeFillOpenedPosition, nativePositionEndedSince, flatReadEndsPosition;
|
|
105693
105772
|
var init_native_position_protection = __esm({
|
|
@@ -106233,14 +106312,23 @@ var init_native_protection_device = __esm({
|
|
|
106233
106312
|
if (!stopLoss?.trailing || !(Number(size) > 0)) return null;
|
|
106234
106313
|
return nativeTrailingRetracement({ mode: stopLoss.mode, value: stopLoss.value, lotSize: Number(size), sizeDecimals });
|
|
106235
106314
|
};
|
|
106236
|
-
lotReport = (symbol2, lot, status, metadata) =>
|
|
106237
|
-
|
|
106238
|
-
|
|
106239
|
-
|
|
106240
|
-
|
|
106241
|
-
|
|
106242
|
-
|
|
106243
|
-
|
|
106315
|
+
lotReport = (symbol2, lot, status, metadata) => {
|
|
106316
|
+
const entry = status === "executed" ? lotFillOrderId(lot) : null;
|
|
106317
|
+
return {
|
|
106318
|
+
order_id: lot.orderId == null ? null : String(lot.orderId),
|
|
106319
|
+
symbol: symbol2,
|
|
106320
|
+
// The lot is the trailing stop; the whole-position stop stays AUTO_SL (protective_fill_attribution.leg_action).
|
|
106321
|
+
action: "AUTO_TRAILING_SL",
|
|
106322
|
+
status,
|
|
106323
|
+
execution_metadata: {
|
|
106324
|
+
trailing_lot: true,
|
|
106325
|
+
protected_size: lot.size,
|
|
106326
|
+
retracement: lot.retracement,
|
|
106327
|
+
...metadata,
|
|
106328
|
+
...entry != null ? { entry_order_id: entry } : {}
|
|
106329
|
+
}
|
|
106330
|
+
};
|
|
106331
|
+
};
|
|
106244
106332
|
sendTrailingLot = async (args) => {
|
|
106245
106333
|
const { io } = args;
|
|
106246
106334
|
if (!io.placeTrailingLot) return { lot: args.lot, report: null };
|
|
@@ -106539,7 +106627,8 @@ var init_native_protection_device = __esm({
|
|
|
106539
106627
|
trigger_price: trigger,
|
|
106540
106628
|
position_tpsl: true,
|
|
106541
106629
|
protected_size: args.protectedSize,
|
|
106542
|
-
|
|
106630
|
+
// The same stop: VTX records it under its predecessor's decision.
|
|
106631
|
+
...newOrderId != null ? { replaced_order_id: String(orderId), previous_order_id: String(orderId) } : {}
|
|
106543
106632
|
}
|
|
106544
106633
|
}
|
|
106545
106634
|
};
|
|
@@ -107191,6 +107280,9 @@ var init_native_protection_device = __esm({
|
|
|
107191
107280
|
execution_metadata: {
|
|
107192
107281
|
reason_code: retried ? "protective_place_rejected" : refused ? retiredReason : args.reasonCode,
|
|
107193
107282
|
...args.member.orderId != null ? { replaced_order_id: String(args.member.orderId) } : {},
|
|
107283
|
+
// A lost stop placed again as the same stop (not a re-arm on a new
|
|
107284
|
+
// position): VTX records it under its predecessor's decision.
|
|
107285
|
+
...!refused && args.member.orderId != null && args.reasonCode === "protective_stop_replaced" ? { previous_order_id: String(args.member.orderId) } : {},
|
|
107194
107286
|
trigger_price: args.trigger,
|
|
107195
107287
|
position_tpsl: true,
|
|
107196
107288
|
protected_size: Math.abs(position.size),
|
|
@@ -107749,6 +107841,7 @@ var init_runtime_execution = __esm({
|
|
|
107749
107841
|
init_protective_stop_replacement();
|
|
107750
107842
|
init_protective_entry_cover();
|
|
107751
107843
|
init_protective_oversized_leg();
|
|
107844
|
+
init_protective_report_entry();
|
|
107752
107845
|
init_error_surface_contract();
|
|
107753
107846
|
init_native_position_protection();
|
|
107754
107847
|
init_native_protection_device();
|
|
@@ -109558,6 +109651,7 @@ var init_runtime_execution = __esm({
|
|
|
109558
109651
|
positionTpsl,
|
|
109559
109652
|
metadata: {
|
|
109560
109653
|
trigger_price: candidates[index].triggerPrice,
|
|
109654
|
+
entry_order_id: fill.orderId,
|
|
109561
109655
|
entry_filled_size: fill.filledSize,
|
|
109562
109656
|
entry_average_price: fill.averagePrice
|
|
109563
109657
|
}
|
|
@@ -112186,6 +112280,7 @@ var init_runtime_execution = __esm({
|
|
|
112186
112280
|
metadata: {
|
|
112187
112281
|
reason_code: decision.reasonCode,
|
|
112188
112282
|
replaced_order_id: lostOrderId,
|
|
112283
|
+
entry_order_id: group.entryOrderId,
|
|
112189
112284
|
trigger_price: triggerPrice,
|
|
112190
112285
|
live_position_size: livePositionSize2,
|
|
112191
112286
|
...acknowledgement.state === "fulfilled" ? { acknowledgement_state: "fulfilled" } : {}
|
|
@@ -112789,7 +112884,8 @@ var init_runtime_execution = __esm({
|
|
|
112789
112884
|
metadata: {
|
|
112790
112885
|
trigger_price: replacementTriggerPrice,
|
|
112791
112886
|
previous_trigger_price: leg.triggerPrice,
|
|
112792
|
-
previous_order_id: orderId
|
|
112887
|
+
previous_order_id: orderId,
|
|
112888
|
+
entry_order_id: reservation.sourceGroup.entryOrderId
|
|
112793
112889
|
}
|
|
112794
112890
|
}));
|
|
112795
112891
|
return { reports, stop: false };
|
|
@@ -115756,9 +115852,11 @@ var init_protection_warning_delivery = __esm({
|
|
|
115756
115852
|
owesWarning = (report) => report.status === "failed" && (report.action === "AUTO_SL" || report.action === "AUTO_TP") && report.execution_metadata?.manual_intervention === true;
|
|
115757
115853
|
hasPendingClientProtection = (profileId) => hasPendingClientProtectiveGroups(profileId) || owedProtectionWarnings(profileId).length > 0;
|
|
115758
115854
|
deliverProtectionWarnings = async (profileId, results, signal) => {
|
|
115855
|
+
const reports = results.flatMap((result) => result.reports);
|
|
115856
|
+
oweProtectionWarnings(profileId, reports.filter(owesProtectionRecord));
|
|
115759
115857
|
const pending3 = distinctProtectionWarnings([
|
|
115760
115858
|
...owedProtectionWarnings(profileId),
|
|
115761
|
-
...
|
|
115859
|
+
...reports.filter((report) => owesWarning(report) || owesProtectionRecord(report))
|
|
115762
115860
|
]);
|
|
115763
115861
|
for (let start = 0; start < pending3.length; start += REPORTS_PER_REQUEST) {
|
|
115764
115862
|
const chunk = pending3.slice(start, start + REPORTS_PER_REQUEST);
|
|
@@ -116299,7 +116397,7 @@ var init_browser_observability = __esm({
|
|
|
116299
116397
|
init_define_VTX_GROK_POLICY();
|
|
116300
116398
|
init_define_VTX_PI_MODEL_POLICY();
|
|
116301
116399
|
init_runtime_policy_generated2();
|
|
116302
|
-
CLIENT_SOURCE_VERSION = typeof process !== "undefined" && true && "
|
|
116400
|
+
CLIENT_SOURCE_VERSION = typeof process !== "undefined" && true && "6e697ce34f8b8c49c59cd6ba767c041fbee06d58".trim() && "6e697ce34f8b8c49c59cd6ba767c041fbee06d58".trim() !== "unstamped" ? "6e697ce34f8b8c49c59cd6ba767c041fbee06d58".trim() : null;
|
|
116303
116401
|
listenersInstalled = false;
|
|
116304
116402
|
state = {
|
|
116305
116403
|
loadedAtMs: Date.now(),
|
|
@@ -120005,6 +120103,7 @@ var init_device_trailing_maintenance = __esm({
|
|
|
120005
120103
|
init_api2();
|
|
120006
120104
|
init_constants();
|
|
120007
120105
|
init_network_debug();
|
|
120106
|
+
init_protection_warning_delivery();
|
|
120008
120107
|
init_runtime_redaction();
|
|
120009
120108
|
init_runtime_execution();
|
|
120010
120109
|
init_runtime_handoff();
|
|
@@ -120059,6 +120158,7 @@ var init_device_trailing_maintenance = __esm({
|
|
|
120059
120158
|
outcome: failed2 > 0 ? "error" : "ok"
|
|
120060
120159
|
});
|
|
120061
120160
|
}
|
|
120161
|
+
await deliverProtectionWarnings(input.profileId, results, input.signal);
|
|
120062
120162
|
const nextDueAtMs = nextClientTrailingStopDueAtMs(input.profileId, input.intervalMs);
|
|
120063
120163
|
return { recheckAtMs: nextDueAtMs == null ? null : Math.max(nextDueAtMs, ranAtMs + pollMs) };
|
|
120064
120164
|
};
|
|
@@ -129102,9 +129202,9 @@ var init_local_analysis = __esm({
|
|
|
129102
129202
|
RUNTIME_SOURCE_DEFINITION_VERSION = "runtime-source-v1";
|
|
129103
129203
|
DECISION_INPUT_DEFINITION_VERSION = "decision-input-v1";
|
|
129104
129204
|
CONTEXT_ENVELOPE_DEFINITION_VERSION = "context-envelope-v2.1";
|
|
129105
|
-
CLIENT_RUNTIME_SOURCE_VERSION = typeof process !== "undefined" && true && "
|
|
129106
|
-
"
|
|
129107
|
-
) ? "
|
|
129205
|
+
CLIENT_RUNTIME_SOURCE_VERSION = typeof process !== "undefined" && true && "6e697ce34f8b8c49c59cd6ba767c041fbee06d58".trim() && !["unknown", "unstamped", "development"].includes(
|
|
129206
|
+
"6e697ce34f8b8c49c59cd6ba767c041fbee06d58".trim().toLowerCase()
|
|
129207
|
+
) ? "6e697ce34f8b8c49c59cd6ba767c041fbee06d58".trim() : null;
|
|
129108
129208
|
CLIENT_MAIN_PROMPT_RENDERER = "client_runtime.buildLocalRuntimePromptArtifacts:v1";
|
|
129109
129209
|
CLIENT_REVIEW_PROMPT_RENDERER = "client_runtime.review_prompt_assembly:v1";
|
|
129110
129210
|
resolveEffectivePromptRuntimeProvenance = (input) => ({
|