oh-langfuse 0.1.26 → 0.1.28

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
@@ -33,6 +33,12 @@ function createPromptInterface(options) {
33
33
  question(query) {
34
34
  return new Promise((resolve) => rl.question(query, resolve));
35
35
  },
36
+ pause() {
37
+ rl.pause();
38
+ },
39
+ resume() {
40
+ rl.resume();
41
+ },
36
42
  close() {
37
43
  rl.close();
38
44
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oh-langfuse",
3
- "version": "0.1.26",
3
+ "version": "0.1.28",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Use npm scripts to configure Claude Code / OpenCode / Codex with Langfuse tracing.",
@@ -1,8 +1,11 @@
1
1
  import fs from "node:fs";
2
2
  import fsp from "node:fs/promises";
3
- import path from "node:path";
4
- import os from "node:os";
3
+ import path from "node:path";
4
+ import os from "node:os";
5
5
  import { execFileSync } from "node:child_process";
6
+ import { fileURLToPath } from "node:url";
7
+
8
+ const packageRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
6
9
 
7
10
  const USER_ID_PATTERN = /^[a-z](?:\d{8}|wx\d{7})$/;
8
11
  const USER_ID_PATTERN_TEXT = "^[a-z](?:\\d{8}|wx\\d{7})$";
@@ -235,7 +238,12 @@ async function main() {
235
238
  process.env.CC_LANGFUSE_ZIP_URL ||
236
239
  "https://gitcode.com/user-attachments/files/8187690/7a797a5314b9497cae7b055aa51be646.zip";
237
240
  const zipPath = args.zipPath || args.zippath || process.env.CC_LANGFUSE_ZIP_PATH;
238
- const pyPathArg = args.pyPath || args.pypath || process.env.CC_LANGFUSE_PY_PATH;
241
+ const bundledPyPath = path.join(packageRoot, "langfuse_hook.py");
242
+ const pyPathArg =
243
+ args.pyPath ||
244
+ args.pypath ||
245
+ process.env.CC_LANGFUSE_PY_PATH ||
246
+ (fs.existsSync(bundledPyPath) ? bundledPyPath : "");
239
247
 
240
248
  const userHome = os.homedir();
241
249
  const claudeDir = path.join(userHome, ".claude");