@ramarivera/coding-agent-langfuse 0.1.24 → 0.1.25

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.
Files changed (2) hide show
  1. package/dist/backfill.js +4 -2
  2. package/package.json +1 -1
package/dist/backfill.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { execFileSync } from "node:child_process";
3
3
  import { createHash } from "node:crypto";
4
- import { existsSync, mkdirSync, readdirSync, readFileSync, statSync, writeFileSync, } from "node:fs";
4
+ import { existsSync, mkdirSync, renameSync, readdirSync, readFileSync, statSync, writeFileSync, } from "node:fs";
5
5
  import { homedir } from "node:os";
6
6
  import { dirname, join } from "node:path";
7
7
  const allAgents = ["claude", "codex", "grok", "opencode", "pi"];
@@ -157,7 +157,9 @@ function loadState(path) {
157
157
  }
158
158
  function saveState(path, state) {
159
159
  mkdirSync(dirname(path), { recursive: true });
160
- writeFileSync(path, `${JSON.stringify(state, null, 2)}\n`);
160
+ const tempPath = `${path}.${process.pid}.tmp`;
161
+ writeFileSync(tempPath, `${JSON.stringify(state, null, 2)}\n`);
162
+ renameSync(tempPath, path);
161
163
  }
162
164
  function listFiles(root, predicate) {
163
165
  if (!existsSync(root))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ramarivera/coding-agent-langfuse",
3
- "version": "0.1.24",
3
+ "version": "0.1.25",
4
4
  "description": "Universal coding-agent Langfuse backfiller and live OTLP helpers",
5
5
  "type": "module",
6
6
  "license": "MIT",