openagent-cli 1.0.5 → 1.0.8

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.
Binary file
package/bin/openagent.js CHANGED
@@ -14,15 +14,20 @@ if (args.includes("--version") || args.includes("-v")) {
14
14
  const binDir = __dirname
15
15
  const exe = path.join(binDir, "open-agent.exe")
16
16
 
17
- const env = { ...process.env, OPENAGENT_NPM_VERSION: currentVersion }
17
+ let latest
18
18
  try {
19
- const latest = execSync("npm view openagent-cli version", { timeout: 3000, encoding: "utf-8" }).trim()
20
- if (latest && latest !== currentVersion) {
21
- env.OPENAGENT_UPDATE_AVAILABLE = latest
22
- }
19
+ latest = execSync("npm view openagent-cli version", { timeout: 3000, encoding: "utf-8" }).trim()
23
20
  } catch {}
24
21
 
25
- const child = spawn(exe, args, { stdio: "inherit", env })
22
+ const childArgs = [...args]
23
+ if (!args.some(a => a.startsWith("--npm-version"))) {
24
+ childArgs.unshift(`--npm-version=${currentVersion}`)
25
+ }
26
+ if (latest && latest !== currentVersion && !args.some(a => a.startsWith("--npm-update-available"))) {
27
+ childArgs.unshift(`--npm-update-available=${latest}`)
28
+ }
29
+
30
+ const child = spawn(exe, childArgs, { stdio: "inherit" })
26
31
  child.on("exit", (code) => process.exit(code ?? 1))
27
32
 
28
33
  process.on("SIGINT", () => child.kill("SIGINT"))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openagent-cli",
3
- "version": "1.0.5",
3
+ "version": "1.0.8",
4
4
  "description": "OpenAgent - AI coding agent. Run from any directory.",
5
5
  "bin": {
6
6
  "openagent": "bin/openagent.js"