@liberseek/boft-cli 0.7.0 → 0.7.1

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 CHANGED
@@ -5,7 +5,7 @@ BOFT CLI runs Pi and other external harnesses inside Codex Desktop.
5
5
  ## Install
6
6
 
7
7
  ```bash
8
- npm install -g @liberseek/boft-cli@0.7.0
8
+ npm install -g @liberseek/boft-cli@0.7.1
9
9
  ```
10
10
 
11
11
  npm automatically installs the matching macOS, Windows, or Linux platform package. Node.js 22 or 24 and the official ChatGPT/Codex Desktop are required.
@@ -24,3 +24,5 @@ The `boft` command starts Codex Desktop. `codexhost` remains available as a comp
24
24
  On macOS, `remote install` installs a current-user Aqua Harness broker so Background SSH Hosts can use native Claude Code login without reading, copying, or unlocking Keychain credentials.
25
25
 
26
26
  If installation used `--omit=optional`, reinstall without that option so npm can select the native package for the current architecture.
27
+
28
+ If startup reports a platform package version mismatch, close Codex Desktop and run the exact reinstall command in the error. This installs both the CLI and its platform package at the same version, replacing stale independently installed payloads. `codexhost --version` reports the CLI package version; startup also validates the platform payload before launching it.
package/bin/boft.js CHANGED
@@ -1,13 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
  import { spawn } from "node:child_process";
3
- import { existsSync, realpathSync } from "node:fs";
3
+ import { existsSync, readFileSync, realpathSync } from "node:fs";
4
4
  import { createRequire } from "node:module";
5
5
  import { homedir } from "node:os";
6
6
  import path from "node:path";
7
7
  import { fileURLToPath } from "node:url";
8
8
 
9
- const version = "0.7.0";
9
+ const version = "0.7.1";
10
10
  const userArguments = process.argv.slice(2);
11
+ const repositoryUrl = "https://github.com/BytePioneer-AI/codex-host";
11
12
  const startupTraceStartedAt = Date.now();
12
13
  function startupTrace(stage) {
13
14
  if (process.env.CODEXHOST_STARTUP_TRACE !== "1") return;
@@ -15,6 +16,25 @@ function startupTrace(stage) {
15
16
  "[codexhost startup +" + (Date.now() - startupTraceStartedAt) + "ms] npm: " + stage,
16
17
  );
17
18
  }
19
+ function printStarPrompt() {
20
+ const locale =
21
+ process.env.LC_ALL ??
22
+ process.env.LC_MESSAGES ??
23
+ process.env.LANG ??
24
+ Intl.DateTimeFormat().resolvedOptions().locale;
25
+ const prompt = /^zh(?:[_-]|$)/iu.test(locale)
26
+ ? "⭐ 如果这个项目对你有帮助,请给我们一个 Star ⭐"
27
+ : "⭐ If this project helps you, please give us a Star ⭐";
28
+ const useColor =
29
+ process.stdout.isTTY && process.env.NO_COLOR === undefined && process.env.TERM !== "dumb";
30
+ if (useColor) {
31
+ console.log(
32
+ "\u001B[33m" + prompt + "\u001B[0m\n\u001B[36m" + repositoryUrl + "\u001B[0m",
33
+ );
34
+ return;
35
+ }
36
+ console.log(prompt + "\n" + repositoryUrl);
37
+ }
18
38
  if (
19
39
  userArguments.length === 1 &&
20
40
  (userArguments[0] === "--version" || userArguments[0] === "-v")
@@ -22,6 +42,9 @@ if (
22
42
  console.log(version);
23
43
  process.exit(0);
24
44
  }
45
+ if (userArguments.length === 0 || userArguments[0] === "launch") {
46
+ printStarPrompt();
47
+ }
25
48
  startupTrace("entry");
26
49
 
27
50
  const platformPackages = {
@@ -63,6 +86,17 @@ try {
63
86
  }
64
87
  }
65
88
 
89
+ let platformVersion;
90
+ try {
91
+ platformVersion = JSON.parse(readFileSync(path.join(packageRoot, "package.json"), "utf8"))?.version;
92
+ } catch {
93
+ fail(`cannot read platform package metadata: ${packageRoot}`);
94
+ }
95
+ if (platformVersion !== version) {
96
+ fail(
97
+ `platform package version mismatch: '${platformPackage}' at '${packageRoot}' has ${JSON.stringify(platformVersion) ?? "no version"}; expected ${version}. Close Codex Desktop, then run: npm install -g @liberseek/boft-cli@${version} ${platformPackage}@${version}`,
98
+ );
99
+ }
66
100
  startupTrace("platform package resolved");
67
101
  const executableSuffix = process.platform === "win32" ? ".exe" : "";
68
102
  const launcher = path.join(packageRoot, "bin", `boft${executableSuffix}`);
package/bin/codexhost.js CHANGED
@@ -1,13 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
  import { spawn } from "node:child_process";
3
- import { existsSync, realpathSync } from "node:fs";
3
+ import { existsSync, readFileSync, realpathSync } from "node:fs";
4
4
  import { createRequire } from "node:module";
5
5
  import { homedir } from "node:os";
6
6
  import path from "node:path";
7
7
  import { fileURLToPath } from "node:url";
8
8
 
9
- const version = "0.7.0";
9
+ const version = "0.7.1";
10
10
  const userArguments = process.argv.slice(2);
11
+ const repositoryUrl = "https://github.com/BytePioneer-AI/codex-host";
11
12
  const startupTraceStartedAt = Date.now();
12
13
  function startupTrace(stage) {
13
14
  if (process.env.CODEXHOST_STARTUP_TRACE !== "1") return;
@@ -15,6 +16,25 @@ function startupTrace(stage) {
15
16
  "[codexhost startup +" + (Date.now() - startupTraceStartedAt) + "ms] npm: " + stage,
16
17
  );
17
18
  }
19
+ function printStarPrompt() {
20
+ const locale =
21
+ process.env.LC_ALL ??
22
+ process.env.LC_MESSAGES ??
23
+ process.env.LANG ??
24
+ Intl.DateTimeFormat().resolvedOptions().locale;
25
+ const prompt = /^zh(?:[_-]|$)/iu.test(locale)
26
+ ? "⭐ 如果这个项目对你有帮助,请给我们一个 Star ⭐"
27
+ : "⭐ If this project helps you, please give us a Star ⭐";
28
+ const useColor =
29
+ process.stdout.isTTY && process.env.NO_COLOR === undefined && process.env.TERM !== "dumb";
30
+ if (useColor) {
31
+ console.log(
32
+ "\u001B[33m" + prompt + "\u001B[0m\n\u001B[36m" + repositoryUrl + "\u001B[0m",
33
+ );
34
+ return;
35
+ }
36
+ console.log(prompt + "\n" + repositoryUrl);
37
+ }
18
38
  if (
19
39
  userArguments.length === 1 &&
20
40
  (userArguments[0] === "--version" || userArguments[0] === "-v")
@@ -22,6 +42,9 @@ if (
22
42
  console.log(version);
23
43
  process.exit(0);
24
44
  }
45
+ if (userArguments.length === 0 || userArguments[0] === "launch") {
46
+ printStarPrompt();
47
+ }
25
48
  startupTrace("entry");
26
49
 
27
50
  const platformPackages = {
@@ -63,6 +86,17 @@ try {
63
86
  }
64
87
  }
65
88
 
89
+ let platformVersion;
90
+ try {
91
+ platformVersion = JSON.parse(readFileSync(path.join(packageRoot, "package.json"), "utf8"))?.version;
92
+ } catch {
93
+ fail(`cannot read platform package metadata: ${packageRoot}`);
94
+ }
95
+ if (platformVersion !== version) {
96
+ fail(
97
+ `platform package version mismatch: '${platformPackage}' at '${packageRoot}' has ${JSON.stringify(platformVersion) ?? "no version"}; expected ${version}. Close Codex Desktop, then run: npm install -g @liberseek/boft-cli@${version} ${platformPackage}@${version}`,
98
+ );
99
+ }
66
100
  startupTrace("platform package resolved");
67
101
  const executableSuffix = process.platform === "win32" ? ".exe" : "";
68
102
  const launcher = path.join(packageRoot, "bin", `boft${executableSuffix}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@liberseek/boft-cli",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "description": "BOFT CLI runs Pi and other external harnesses inside Codex Desktop.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -15,12 +15,12 @@
15
15
  "node": ">=22"
16
16
  },
17
17
  "optionalDependencies": {
18
- "@liberseek/boft-cli-darwin-arm64": "0.7.0",
19
- "@liberseek/boft-cli-darwin-x64": "0.7.0",
20
- "@liberseek/boft-cli-win32-x64": "0.7.0",
21
- "@liberseek/boft-cli-win32-arm64": "0.7.0",
22
- "@liberseek/boft-cli-linux-x64": "0.7.0",
23
- "@liberseek/boft-cli-linux-arm64": "0.7.0"
18
+ "@liberseek/boft-cli-darwin-arm64": "0.7.1",
19
+ "@liberseek/boft-cli-darwin-x64": "0.7.1",
20
+ "@liberseek/boft-cli-win32-x64": "0.7.1",
21
+ "@liberseek/boft-cli-win32-arm64": "0.7.1",
22
+ "@liberseek/boft-cli-linux-x64": "0.7.1",
23
+ "@liberseek/boft-cli-linux-arm64": "0.7.1"
24
24
  },
25
25
  "keywords": [
26
26
  "codex",