@vtxmacro/cli 2026.8.19 → 2026.8.20

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.
Files changed (2) hide show
  1. package/bin/vtx.js +31 -5
  2. package/package.json +1 -1
package/bin/vtx.js CHANGED
@@ -38,7 +38,7 @@ var init_agent_cli_release = __esm({
38
38
  "agent-cli-release.json"() {
39
39
  agent_cli_release_default = {
40
40
  package_name: "@vtxmacro/cli",
41
- package_version: "2026.8.19",
41
+ package_version: "2026.8.20",
42
42
  codex_package_name: "@openai/codex",
43
43
  codex_version: "0.147.0",
44
44
  platforms: {
@@ -29825,7 +29825,7 @@ import { createWriteStream, readFileSync } from "node:fs";
29825
29825
  import { access as access3, chmod as chmod3, mkdir as mkdir3, readFile as readFile5, rm as rm4, writeFile as writeFile2 } from "node:fs/promises";
29826
29826
  import { homedir as homedir2 } from "node:os";
29827
29827
  import { dirname as dirname4, join as join5, resolve as resolve4 } from "node:path";
29828
- var SERVICE_NAME, SYSTEMD_UNIT, LAUNCHD_LABEL, SERVICE_COOPERATIVE_STOP_SECONDS, isWindowsSubsystemForLinux, inferenceHostServiceManifestPath, inferenceHostServiceDesiredPath, inferenceHostServiceLogPath, xmlEscape, plistEscape, systemdQuote, defaultRunCommand, managerName, assertManifest, assertDesiredState, readInferenceHostServiceManifest, readInferenceHostServiceDesired, readDesiredAcrossAtomicReplacement, writeDesired, runtimeEnvironment, serviceArguments, windowsTaskXml, systemdUnit, launchAgentPlist, InferenceHostServiceManager, appendServiceLog, spawnServiceChild, runInferenceHostServiceSupervisor;
29828
+ var SERVICE_NAME, SYSTEMD_UNIT, LAUNCHD_LABEL, SERVICE_COOPERATIVE_STOP_SECONDS, isWindowsSubsystemForLinux, inferenceHostServiceManifestPath, inferenceHostServiceDesiredPath, inferenceHostServiceLogPath, xmlEscape, plistEscape, systemdQuote, defaultRunCommand, managerName, assertManifest, assertDesiredState, readInferenceHostServiceManifest, readInferenceHostServiceDesired, readDesiredAcrossAtomicReplacement, writeDesired, runtimeEnvironment, serviceArguments, windowsOwnedCommandLine, vbScriptString, windowsServiceLauncher, windowsTaskXml, systemdUnit, launchAgentPlist, InferenceHostServiceManager, appendServiceLog, spawnServiceChild, runInferenceHostServiceSupervisor;
29829
29829
  var init_service = __esm({
29830
29830
  "lib/inference-host/service.ts"() {
29831
29831
  "use strict";
@@ -29970,7 +29970,20 @@ var init_service = __esm({
29970
29970
  "--service-manifest",
29971
29971
  manifestPath
29972
29972
  ];
29973
- windowsTaskXml = (executable, args, username) => `<?xml version="1.0" encoding="UTF-16"?>
29973
+ windowsOwnedCommandLine = (values) => {
29974
+ if (values.some((value) => value.includes('"') || value.includes("\0"))) {
29975
+ throw new Error("Windows inference-host service paths contain unsupported characters.");
29976
+ }
29977
+ return values.map((value) => `"${value}"`).join(" ");
29978
+ };
29979
+ vbScriptString = (value) => `"${value.replaceAll('"', '""')}"`;
29980
+ windowsServiceLauncher = (executable, args) => `Option Explicit\r
29981
+ Dim shell, exitCode\r
29982
+ Set shell = CreateObject("WScript.Shell")\r
29983
+ exitCode = shell.Run(${vbScriptString(windowsOwnedCommandLine([executable, ...args]))}, 0, True)\r
29984
+ WScript.Quit exitCode\r
29985
+ `;
29986
+ windowsTaskXml = (launcherPath, windowsDirectory, username) => `<?xml version="1.0" encoding="UTF-16"?>
29974
29987
  <Task version="1.4" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
29975
29988
  <RegistrationInfo><Description>${xmlEscape(SERVICE_NAME)}</Description></RegistrationInfo>
29976
29989
  <Triggers>
@@ -29984,13 +29997,14 @@ var init_service = __esm({
29984
29997
  <Principals><Principal id="Author"><UserId>${xmlEscape(username)}</UserId><LogonType>InteractiveToken</LogonType><RunLevel>LeastPrivilege</RunLevel></Principal></Principals>
29985
29998
  <Settings>
29986
29999
  <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
30000
+ <Hidden>true</Hidden>
29987
30001
  <DisallowStartIfOnBatteries>false</DisallowStartIfOnBatteries>
29988
30002
  <StopIfGoingOnBatteries>false</StopIfGoingOnBatteries>
29989
30003
  <StartWhenAvailable>true</StartWhenAvailable>
29990
30004
  <ExecutionTimeLimit>PT0S</ExecutionTimeLimit>
29991
30005
  <RestartOnFailure><Interval>PT1M</Interval><Count>255</Count></RestartOnFailure>
29992
30006
  </Settings>
29993
- <Actions Context="Author"><Exec><Command>${xmlEscape(executable)}</Command><Arguments>${xmlEscape(args.map((arg) => `"${arg.replaceAll('"', '\\"')}"`).join(" "))}</Arguments></Exec></Actions>
30007
+ <Actions Context="Author"><Exec><Command>${xmlEscape(`${windowsDirectory}\\System32\\wscript.exe`)}</Command><Arguments>${xmlEscape(`//B //NoLogo "${launcherPath}"`)}</Arguments></Exec></Actions>
29994
30008
  </Task>
29995
30009
  `;
29996
30010
  systemdUnit = (executable, args) => `[Unit]
@@ -30031,6 +30045,7 @@ WantedBy=default.target
30031
30045
  this.executable = resolve4(dependencies.executable ?? process.execPath);
30032
30046
  this.script = resolve4(dependencies.script ?? process.argv[1] ?? "");
30033
30047
  this.username = dependencies.username ?? ([process.env.USERDOMAIN, process.env.USERNAME].filter(Boolean).join("\\") || process.env.USER || "");
30048
+ this.windowsDirectory = (dependencies.windowsDirectory ?? process.env.SystemRoot ?? process.env.WINDIR ?? "C:\\Windows").replace(/[\\/]+$/u, "");
30034
30049
  this.runCommand = dependencies.runCommand ?? defaultRunCommand;
30035
30050
  this.now = dependencies.now ?? (() => /* @__PURE__ */ new Date());
30036
30051
  this.sleep = dependencies.sleep ?? (async (milliseconds) => {
@@ -30096,6 +30111,9 @@ WantedBy=default.target
30096
30111
  if (this.platform === "darwin") return join5(this.home, "Library", "LaunchAgents", `${LAUNCHD_LABEL}.plist`);
30097
30112
  return join5(this.home, ".config", "systemd", "user", SYSTEMD_UNIT);
30098
30113
  }
30114
+ windowsLauncherPath() {
30115
+ return `${this.config.statePath}.service-launcher.vbs`;
30116
+ }
30099
30117
  async managerCommand(action) {
30100
30118
  const definition = this.definitionPath();
30101
30119
  if (this.platform === "win32") {
@@ -30157,7 +30175,7 @@ WantedBy=default.target
30157
30175
  runtime_environment: runtimeEnvironment(this.config)
30158
30176
  });
30159
30177
  const args = serviceArguments(this.script, this.manifestPath());
30160
- const definition = this.platform === "win32" ? windowsTaskXml(this.executable, args, this.username) : this.platform === "darwin" ? launchAgentPlist(this.executable, args, this.logPath()) : systemdUnit(this.executable, args);
30178
+ const definition = this.platform === "win32" ? windowsTaskXml(this.windowsLauncherPath(), this.windowsDirectory, this.username) : this.platform === "darwin" ? launchAgentPlist(this.executable, args, this.logPath()) : systemdUnit(this.executable, args);
30161
30179
  let managerInstallAttempted = false;
30162
30180
  try {
30163
30181
  await writeAtomicInferencePrivateFile(this.manifestPath(), `${JSON.stringify(manifest, null, 2)}
@@ -30165,6 +30183,10 @@ WantedBy=default.target
30165
30183
  await writeDesired(this.desiredPath(), options.startImmediately !== false, this.now());
30166
30184
  await mkdir3(dirname4(this.definitionPath()), { recursive: true, mode: 448 });
30167
30185
  if (this.platform === "win32") {
30186
+ await writeAtomicInferencePrivateFile(
30187
+ this.windowsLauncherPath(),
30188
+ windowsServiceLauncher(this.executable, args)
30189
+ );
30168
30190
  await writeFile2(this.definitionPath(), `\uFEFF${definition}`, {
30169
30191
  encoding: "utf16le",
30170
30192
  mode: 384
@@ -30205,6 +30227,9 @@ ${cleanup.stderr}`)) {
30205
30227
  }
30206
30228
  }
30207
30229
  await rm4(this.definitionPath(), { force: true }).catch(() => void 0);
30230
+ if (this.platform === "win32") {
30231
+ await rm4(this.windowsLauncherPath(), { force: true }).catch(() => void 0);
30232
+ }
30208
30233
  await rm4(this.manifestPath(), { force: true }).catch(() => void 0);
30209
30234
  await rm4(this.desiredPath(), { force: true }).catch(() => void 0);
30210
30235
  if (this.platform === "linux") {
@@ -30321,6 +30346,7 @@ ${result2.stderr}`)) {
30321
30346
  throw new Error(`Background service uninstall failed: ${result2.stderr.trim()}`);
30322
30347
  }
30323
30348
  await rm4(this.definitionPath(), { force: true });
30349
+ if (this.platform === "win32") await rm4(this.windowsLauncherPath(), { force: true });
30324
30350
  if (this.platform === "linux") await this.runCommand("systemctl", ["--user", "daemon-reload"]);
30325
30351
  await rm4(this.manifestPath(), { force: true });
30326
30352
  await rm4(this.desiredPath(), { force: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vtxmacro/cli",
3
- "version": "2026.8.19",
3
+ "version": "2026.8.20",
4
4
  "description": "VTX Macro CLI, MCP server, and durable subscription inference host.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",