@ramarivera/coding-agent-langfuse 0.1.34 → 0.1.36
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 +4 -3
- package/dist/service.js +10 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -78,9 +78,10 @@ The Windows path intentionally uses a per-user Scheduled Task for the default
|
|
|
78
78
|
service binary; raw `sc.exe` is not a good fit for a transient npm command.
|
|
79
79
|
|
|
80
80
|
The generated services are package-manager agnostic. By default the installer
|
|
81
|
-
uses
|
|
82
|
-
|
|
83
|
-
|
|
81
|
+
uses `npx` through the service `PATH` (`/usr/bin/env npx` on macOS and Linux)
|
|
82
|
+
with a conservative cross-platform PATH. Use `--npx-path` and `--path` when a
|
|
83
|
+
host keeps Node.js somewhere outside the normal npm/Homebrew/system locations,
|
|
84
|
+
including nvm, fnm, Volta, asdf, mise, or another shell manager.
|
|
84
85
|
|
|
85
86
|
## Backfill windows
|
|
86
87
|
|
package/dist/service.js
CHANGED
|
@@ -20,7 +20,7 @@ Service options:
|
|
|
20
20
|
--state PATH Dedupe state file
|
|
21
21
|
--home PATH Home directory to scan (default: current user home)
|
|
22
22
|
--package-spec SPEC npx package spec (default: ${defaultPackageSpec})
|
|
23
|
-
--npx-path PATH npx executable path for host services (default:
|
|
23
|
+
--npx-path PATH npx executable path for host services (default: npx/npx.cmd)
|
|
24
24
|
--batch-size N OTLP spans per POST (default: 10)
|
|
25
25
|
--poll-interval-ms N Delay between --follow scans (default: 5000)
|
|
26
26
|
--post-delay-ms N Delay after each successful OTLP POST (default: 0)
|
|
@@ -306,6 +306,7 @@ WantedBy=default.target
|
|
|
306
306
|
`;
|
|
307
307
|
}
|
|
308
308
|
function renderLaunchdPlist(options, command) {
|
|
309
|
+
const programArguments = launchdCommand(command);
|
|
309
310
|
return `<?xml version="1.0" encoding="UTF-8"?>
|
|
310
311
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
311
312
|
<plist version="1.0">
|
|
@@ -314,7 +315,7 @@ function renderLaunchdPlist(options, command) {
|
|
|
314
315
|
<string>${escapeXml(options.name)}</string>
|
|
315
316
|
<key>ProgramArguments</key>
|
|
316
317
|
<array>
|
|
317
|
-
${
|
|
318
|
+
${programArguments.map((part) => ` <string>${escapeXml(part)}</string>`).join("\n")}
|
|
318
319
|
</array>
|
|
319
320
|
<key>EnvironmentVariables</key>
|
|
320
321
|
<dict>
|
|
@@ -383,8 +384,6 @@ function defaultServiceName(agents, platform) {
|
|
|
383
384
|
: `coding-agent-langfuse-${suffix}`;
|
|
384
385
|
}
|
|
385
386
|
function defaultPathEnv(homeDir, platform) {
|
|
386
|
-
if (process.env.PATH)
|
|
387
|
-
return process.env.PATH;
|
|
388
387
|
if (platform === "win32") {
|
|
389
388
|
return [
|
|
390
389
|
"%APPDATA%\\npm",
|
|
@@ -407,7 +406,13 @@ function defaultNpxPath(platform) {
|
|
|
407
406
|
if (platform === "win32") {
|
|
408
407
|
return findExecutable("npx.cmd", "where") ?? "npx.cmd";
|
|
409
408
|
}
|
|
410
|
-
return
|
|
409
|
+
return "npx";
|
|
410
|
+
}
|
|
411
|
+
function launchdCommand(command) {
|
|
412
|
+
const [program, ...args] = command;
|
|
413
|
+
if (!program)
|
|
414
|
+
return command;
|
|
415
|
+
return program.includes("/") ? command : ["/usr/bin/env", program, ...args];
|
|
411
416
|
}
|
|
412
417
|
function findExecutable(name, finder) {
|
|
413
418
|
try {
|