oh-langfuse 0.1.75 → 0.1.76

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/bin/cli.js CHANGED
@@ -1,9 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import fs from "fs";
3
3
  import path from "path";
4
- import readline from "readline";
5
- import { fileURLToPath } from "url";
6
- import { spawnSync } from "child_process";
4
+ import readline from "readline";
5
+ import { fileURLToPath } from "url";
6
+ import { spawnSync } from "child_process";
7
+ import { resolveOpencodeCli } from "../scripts/resolve-opencode-cli.mjs";
7
8
 
8
9
  const rootDir = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
9
10
  const scriptsDir = path.join(rootDir, "scripts");
@@ -159,12 +160,13 @@ function detectPython() {
159
160
  return { ok: false, command: null, version: "", pipOk: false, pipVersion: "" };
160
161
  }
161
162
 
162
- function detectOpencode() {
163
- const candidates = process.platform === "win32" ? ["opencode.cmd", "opencode"] : ["opencode"];
164
- for (const cmd of candidates) {
165
- const r = commandExists(cmd, ["--version"]);
166
- if (r.ok) return { ok: true, command: cmd, version: r.stdout || r.stderr };
167
- }
163
+ function detectOpencode() {
164
+ const resolved = resolveOpencodeCli();
165
+ const candidates = [resolved, ...(process.platform === "win32" ? ["opencode.cmd", "opencode"] : ["opencode"])].filter(Boolean);
166
+ for (const cmd of candidates) {
167
+ const r = commandExists(cmd, ["--version"]);
168
+ if (r.ok) return { ok: true, command: cmd, version: r.stdout || r.stderr };
169
+ }
168
170
  return { ok: false, command: null, version: "" };
169
171
  }
170
172
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oh-langfuse",
3
- "version": "0.1.75",
3
+ "version": "0.1.76",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Use npm scripts to configure Claude Code / OpenCode / Codex with Langfuse tracing.",