oh-langfuse 0.1.69 → 0.1.70
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/package.json
CHANGED
|
@@ -977,6 +977,26 @@ function writeOpencodeCommandShim(opencodeDir, { publicKey, secretKey, baseUrl,
|
|
|
977
977
|
cmd.push(' call "%APPDATA%\\npm\\opencode.cmd" %*');
|
|
978
978
|
cmd.push(" exit /b %ERRORLEVEL%");
|
|
979
979
|
cmd.push(")");
|
|
980
|
+
cmd.push('if exist "%APPDATA%\\npm\\node_modules\\opencode-ai\\bin\\opencode.exe" (');
|
|
981
|
+
cmd.push(' call "%APPDATA%\\npm\\node_modules\\opencode-ai\\bin\\opencode.exe" %*');
|
|
982
|
+
cmd.push(" exit /b %ERRORLEVEL%");
|
|
983
|
+
cmd.push(")");
|
|
984
|
+
cmd.push('if exist "%APPDATA%\\npm\\node_modules\\opencode-ai\\node_modules\\opencode-windows-x64\\bin\\opencode.exe" (');
|
|
985
|
+
cmd.push(' call "%APPDATA%\\npm\\node_modules\\opencode-ai\\node_modules\\opencode-windows-x64\\bin\\opencode.exe" %*');
|
|
986
|
+
cmd.push(" exit /b %ERRORLEVEL%");
|
|
987
|
+
cmd.push(")");
|
|
988
|
+
cmd.push('if exist "%APPDATA%\\npm\\node_modules\\opencode-ai\\node_modules\\opencode-windows-x64-baseline\\bin\\opencode.exe" (');
|
|
989
|
+
cmd.push(' call "%APPDATA%\\npm\\node_modules\\opencode-ai\\node_modules\\opencode-windows-x64-baseline\\bin\\opencode.exe" %*');
|
|
990
|
+
cmd.push(" exit /b %ERRORLEVEL%");
|
|
991
|
+
cmd.push(")");
|
|
992
|
+
cmd.push('if exist "%APPDATA%\\npm\\node_modules\\opencode-windows-x64\\bin\\opencode.exe" (');
|
|
993
|
+
cmd.push(' call "%APPDATA%\\npm\\node_modules\\opencode-windows-x64\\bin\\opencode.exe" %*');
|
|
994
|
+
cmd.push(" exit /b %ERRORLEVEL%");
|
|
995
|
+
cmd.push(")");
|
|
996
|
+
cmd.push('if exist "%APPDATA%\\npm\\node_modules\\opencode-windows-x64-baseline\\bin\\opencode.exe" (');
|
|
997
|
+
cmd.push(' call "%APPDATA%\\npm\\node_modules\\opencode-windows-x64-baseline\\bin\\opencode.exe" %*');
|
|
998
|
+
cmd.push(" exit /b %ERRORLEVEL%");
|
|
999
|
+
cmd.push(")");
|
|
980
1000
|
cmd.push('for /f "delims=" %%O in (\'where.exe opencode 2^>nul\') do (');
|
|
981
1001
|
cmd.push(' if /I not "%%~fO"=="%~f0" (');
|
|
982
1002
|
cmd.push(' call "%%O" %*');
|
|
@@ -984,7 +1004,7 @@ function writeOpencodeCommandShim(opencodeDir, { publicKey, secretKey, baseUrl,
|
|
|
984
1004
|
cmd.push(" )");
|
|
985
1005
|
cmd.push(")");
|
|
986
1006
|
cmd.push("echo [ERROR] OpenCode CLI not found. Install OpenCode CLI first. 1>&2");
|
|
987
|
-
cmd.push("echo Try: npm install -g opencode-
|
|
1007
|
+
cmd.push("echo Try: npm install -g opencode-ai@latest 1>&2");
|
|
988
1008
|
cmd.push("echo Then run: npx oh-langfuse@latest update opencode 1>&2");
|
|
989
1009
|
cmd.push("exit /b 127");
|
|
990
1010
|
fs.writeFileSync(shim, cmd.join("\r\n") + "\r\n", "utf8");
|
|
@@ -1021,14 +1041,12 @@ function writeOpencodeCommandShim(opencodeDir, { publicKey, secretKey, baseUrl,
|
|
|
1021
1041
|
"fi",
|
|
1022
1042
|
'if [ -n "$OH_LANGFUSE_BROKEN_OPENCODE" ]; then',
|
|
1023
1043
|
' echo "[ERROR] OpenCode CLI was found but failed to start: $OH_LANGFUSE_BROKEN_OPENCODE" >&2',
|
|
1024
|
-
' echo "Try: npm install -g opencode-
|
|
1025
|
-
' echo "If that package fails on your host, try opencode-linux-x64-baseline or opencode-linux-x64-musl." >&2',
|
|
1044
|
+
' echo "Try: npm install -g opencode-ai@latest --registry=https://registry.npmjs.org/" >&2',
|
|
1026
1045
|
' echo "Then run: npx --registry=https://registry.npmjs.org/ -y oh-langfuse@latest update opencode --npmRegistry=https://registry.npmjs.org/" >&2',
|
|
1027
1046
|
" exit 127",
|
|
1028
1047
|
"fi",
|
|
1029
1048
|
'echo "[ERROR] OpenCode CLI not found. Install OpenCode CLI first." >&2',
|
|
1030
|
-
'echo "Try: npm install -g opencode-
|
|
1031
|
-
'echo "If that package fails on your host, try opencode-linux-x64-baseline or opencode-linux-x64-musl." >&2',
|
|
1049
|
+
'echo "Try: npm install -g opencode-ai@latest" >&2',
|
|
1032
1050
|
'echo "Then run: npx oh-langfuse@latest update opencode" >&2',
|
|
1033
1051
|
"exit 127",
|
|
1034
1052
|
""
|
|
@@ -26,10 +26,15 @@ export function resolveOpencodeCli(preferred) {
|
|
|
26
26
|
if (process.env.LOCALAPPDATA) {
|
|
27
27
|
candidates.push(path.join(process.env.LOCALAPPDATA, "Programs", "opencode", "opencode.exe"));
|
|
28
28
|
}
|
|
29
|
-
if (process.env.APPDATA) {
|
|
30
|
-
candidates.push(path.join(process.env.APPDATA, "npm", "opencode.cmd"));
|
|
31
|
-
candidates.push(path.join(process.env.APPDATA, "npm", "opencode"));
|
|
32
|
-
|
|
29
|
+
if (process.env.APPDATA) {
|
|
30
|
+
candidates.push(path.join(process.env.APPDATA, "npm", "opencode.cmd"));
|
|
31
|
+
candidates.push(path.join(process.env.APPDATA, "npm", "opencode"));
|
|
32
|
+
candidates.push(path.join(process.env.APPDATA, "npm", "node_modules", "opencode-ai", "bin", "opencode.exe"));
|
|
33
|
+
candidates.push(path.join(process.env.APPDATA, "npm", "node_modules", "opencode-ai", "node_modules", "opencode-windows-x64", "bin", "opencode.exe"));
|
|
34
|
+
candidates.push(path.join(process.env.APPDATA, "npm", "node_modules", "opencode-ai", "node_modules", "opencode-windows-x64-baseline", "bin", "opencode.exe"));
|
|
35
|
+
candidates.push(path.join(process.env.APPDATA, "npm", "node_modules", "opencode-windows-x64", "bin", "opencode.exe"));
|
|
36
|
+
candidates.push(path.join(process.env.APPDATA, "npm", "node_modules", "opencode-windows-x64-baseline", "bin", "opencode.exe"));
|
|
37
|
+
}
|
|
33
38
|
candidates.push(path.join(home, "scoop", "shims", "opencode.exe"));
|
|
34
39
|
} else {
|
|
35
40
|
candidates.push(path.join(home, ".opencode", "bin", "opencode"));
|