@linzumi/cli 0.0.16-beta → 0.0.17-beta

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
@@ -234,7 +234,7 @@ privileges as your shell. Every action is auditable from the thread.
234
234
  ## Pinning a version
235
235
 
236
236
  ```bash
237
- npm install -g @linzumi/cli@0.0.16-beta
237
+ npm install -g @linzumi/cli@0.0.17-beta
238
238
  linzumi --version
239
239
  ```
240
240
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@linzumi/cli",
3
- "version": "0.0.16-beta",
3
+ "version": "0.0.17-beta",
4
4
  "description": "Linzumi CLI — point a Codex agent at the real code on your laptop, with your team watching and steering from shared threads.",
5
5
  "type": "module",
6
6
  "bin": {
package/src/index.ts CHANGED
@@ -121,7 +121,7 @@ async function main(args: readonly string[]): Promise<void> {
121
121
  process.stdout.write(connectGuideText());
122
122
  return;
123
123
  case "version":
124
- process.stdout.write("linzumi 0.0.16-beta\n");
124
+ process.stdout.write("linzumi 0.0.17-beta\n");
125
125
  return;
126
126
  case "auth":
127
127
  await runAuthCommand(parsed.args);
@@ -614,7 +614,7 @@ export async function parseRunnerArgs(
614
614
  }
615
615
 
616
616
  if (values.get("version") === true) {
617
- process.stdout.write("linzumi 0.0.16-beta\n");
617
+ process.stdout.write("linzumi 0.0.17-beta\n");
618
618
  process.exit(0);
619
619
  }
620
620
 
@@ -14,7 +14,7 @@ import {
14
14
  writeFileSync,
15
15
  } from "node:fs";
16
16
  import { tmpdir } from "node:os";
17
- import { delimiter, dirname, join } from "node:path";
17
+ import { basename, delimiter, dirname, join } from "node:path";
18
18
  import { chooseLoopbackPort } from "./codexAppServer";
19
19
  import { resolveAllowedCwd } from "./localCapabilities";
20
20
  import type { InstalledEditorRuntime } from "./localEditorRuntime";
@@ -366,8 +366,6 @@ export function codeServerArgs(
366
366
  "--disable-update-check",
367
367
  "--disable-workspace-trust",
368
368
  "--disable-getting-started-override",
369
- "--reconnection-grace-time",
370
- "10",
371
369
  "--app-name",
372
370
  "Kandan",
373
371
  "--user-data-dir",
@@ -742,7 +740,7 @@ async function startCollaborationSidecar(
742
740
  ]);
743
741
 
744
742
  const child = spawn(
745
- process.execPath,
743
+ nodeRuntimeExecutable(),
746
744
  [
747
745
  join(
748
746
  profile.collaborationServerDir,
@@ -796,6 +794,19 @@ async function startCollaborationSidecar(
796
794
  }
797
795
  }
798
796
 
797
+ export function nodeRuntimeExecutable(
798
+ env: NodeJS.ProcessEnv = process.env,
799
+ execPath = process.execPath,
800
+ ): string {
801
+ const configured = env.LINZUMI_NODE_BIN?.trim();
802
+
803
+ if (configured !== undefined && configured !== "") {
804
+ return configured;
805
+ }
806
+
807
+ return basename(execPath).toLowerCase().includes("bun") ? "node" : execPath;
808
+ }
809
+
799
810
  async function installLocalTarball(
800
811
  archivePath: string,
801
812
  destinationDir: string,
@@ -814,8 +825,9 @@ function codeServerEnv(
814
825
  userDataDir: string,
815
826
  collaboration?: RunningLocalEditorCollaboration | undefined,
816
827
  ): NodeJS.ProcessEnv {
828
+ const { PORT: _port, ...hostEnv } = env;
817
829
  const base = {
818
- ...env,
830
+ ...hostEnv,
819
831
  HOME: userDataDir,
820
832
  XDG_CACHE_HOME: join(userDataDir, "xdg-cache"),
821
833
  XDG_CONFIG_HOME: join(userDataDir, "xdg-config"),
@@ -18,7 +18,7 @@ import {
18
18
  rmSync,
19
19
  writeFileSync,
20
20
  } from "node:fs";
21
- import { homedir, tmpdir } from "node:os";
21
+ import { homedir } from "node:os";
22
22
  import { dirname, join, resolve } from "node:path";
23
23
  import { Readable } from "node:stream";
24
24
  import { pipeline } from "node:stream/promises";
@@ -388,7 +388,7 @@ async function installRuntime(args: {
388
388
  > {
389
389
  mkdirSync(args.cacheRoot, { recursive: true });
390
390
 
391
- const tempRoot = mkdtempSync(join(tmpdir(), "linzumi-editor-runtime-install-"));
391
+ const tempRoot = mkdtempSync(join(args.cacheRoot, ".install-"));
392
392
  const archivePath = join(tempRoot, "runtime.tar.gz");
393
393
  const extractRoot = join(tempRoot, "runtime");
394
394