@codexhost/cli-win32-arm64 0.3.0 → 0.3.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
@@ -7,7 +7,7 @@ Run Pi and Claude Code as first-class external harnesses inside Codex Desktop.
7
7
  ## Install
8
8
 
9
9
  ```bash
10
- npm install -g @codexhost/cli@0.3.0
10
+ npm install -g @codexhost/cli@0.3.1
11
11
  ```
12
12
 
13
13
  Do not install this package directly. npm selects it through the optional dependencies of `@codexhost/cli`.
@@ -1 +1 @@
1
- {"schemaVersion":1,"version":"0.3.0","distribution":"npm","target":"windows-arm64"}
1
+ {"schemaVersion":1,"version":"0.3.1","distribution":"npm","target":"windows-arm64"}
@@ -45631,6 +45631,16 @@ function isExecutable(candidate, platform) {
45631
45631
  return false;
45632
45632
  }
45633
45633
  }
45634
+ function claudeNpmNativeExecutable(npmDirectory) {
45635
+ return path4.join(npmDirectory, "node_modules", "@anthropic-ai", "claude-code", "bin", "claude.exe");
45636
+ }
45637
+ function runnableCandidate(candidate, platform) {
45638
+ if (platform === "win32" && path4.basename(candidate).toLowerCase() === "claude.cmd") {
45639
+ const nativeExecutable = claudeNpmNativeExecutable(path4.dirname(candidate));
45640
+ return isExecutable(nativeExecutable, platform) ? nativeExecutable : void 0;
45641
+ }
45642
+ return candidate;
45643
+ }
45634
45644
  function nvmCandidates(homeDirectory) {
45635
45645
  const versionsDirectory = path4.join(homeDirectory, ".nvm", "versions", "node");
45636
45646
  try {
@@ -45643,6 +45653,7 @@ function userInstallCandidates(platform, environment, homeDirectory) {
45643
45653
  if (platform === "win32") {
45644
45654
  const appData = environment.APPDATA ?? path4.join(homeDirectory, "AppData", "Roaming");
45645
45655
  return [
45656
+ claudeNpmNativeExecutable(path4.join(appData, "npm")),
45646
45657
  path4.join(appData, "npm", "claude.cmd"),
45647
45658
  path4.join(homeDirectory, ".local", "bin", "claude.exe"),
45648
45659
  path4.join(homeDirectory, ".local", "bin", "claude.cmd")
@@ -45667,7 +45678,7 @@ function resolveClaudeCodeExecutable(input = {}) {
45667
45678
  ...candidates(command, platform, environment),
45668
45679
  ...configuredCommand ? [] : userInstallCandidates(platform, environment, homeDirectory)
45669
45680
  ];
45670
- const executable2 = resolutionCandidates.find((candidate) => isExecutable(candidate, platform));
45681
+ const executable2 = resolutionCandidates.map((candidate) => runnableCandidate(candidate, platform)).find((candidate) => candidate !== void 0 && isExecutable(candidate, platform));
45671
45682
  if (!executable2)
45672
45683
  throw new ClaudeCodeExecutableError("Claude Code is not installed");
45673
45684
  return path4.resolve(executable2);
@@ -68879,22 +68890,27 @@ function createRemoteAppServerWebSocketListener(input) {
68879
68890
  closing = (async () => {
68880
68891
  for (const socket of webSockets.clients) socket.terminate();
68881
68892
  await new Promise((resolve2) => webSockets.close(() => resolve2()));
68882
- if (listening) {
68893
+ const closeServer = async () => {
68894
+ if (!listening) return;
68883
68895
  await new Promise(
68884
68896
  (resolve2, reject) => server.close((error54) => error54 ? reject(error54) : resolve2())
68885
68897
  );
68886
- }
68887
- await Promise.allSettled(sessions);
68888
- if (process.platform !== "win32" && ownedSocketIdentity) {
68889
- const identity = ownedSocketIdentity;
68898
+ };
68899
+ if (process.platform !== "win32" && listening) {
68890
68900
  await withRemoteAppServerSocketInitializationLock(input.socketPath, async () => {
68891
- const current = await unixSocketIdentity(input.socketPath);
68892
- if (current && sameUnixFileIdentity2(current, identity)) {
68893
- await rm6(input.socketPath, { force: true });
68901
+ await closeServer();
68902
+ if (ownedSocketIdentity) {
68903
+ const current = await unixSocketIdentity(input.socketPath);
68904
+ if (current && sameUnixFileIdentity2(current, ownedSocketIdentity)) {
68905
+ await rm6(input.socketPath, { force: true });
68906
+ }
68907
+ ownedSocketIdentity = null;
68894
68908
  }
68895
68909
  });
68896
- ownedSocketIdentity = null;
68910
+ } else {
68911
+ await closeServer();
68897
68912
  }
68913
+ await Promise.allSettled(sessions);
68898
68914
  closed.resolve(void 0);
68899
68915
  })();
68900
68916
  return closing;
package/bin/codexhost.exe CHANGED
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codexhost/cli-win32-arm64",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Run Pi and Claude Code as first-class external harnesses inside Codex Desktop.",
5
5
  "type": "module",
6
6
  "files": [