codex2voice 0.1.2 → 0.1.3

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/cli.js +8 -5
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -678,6 +678,10 @@ function parseSpeechCandidatesDetailed(jsonlChunk, options = {}) {
678
678
  var SESSIONS_DIR = path6.join(os4.homedir(), ".codex", "sessions");
679
679
  var POLL_INTERVAL_MS = 140;
680
680
  var DISCOVERY_INTERVAL_MS = 900;
681
+ function shouldReplayFromStart(stat, wrapperStartedAt) {
682
+ if (!Number.isFinite(stat.birthtimeMs) || stat.birthtimeMs <= 0) return false;
683
+ return stat.birthtimeMs >= wrapperStartedAt - 5e3;
684
+ }
681
685
  function getSessionDayDir(date) {
682
686
  const yyyy = date.getFullYear().toString();
683
687
  const mm = String(date.getMonth() + 1).padStart(2, "0");
@@ -747,10 +751,9 @@ async function runCodexWrapper(args, options = {}) {
747
751
  if (trackedFiles.has(filePath)) return;
748
752
  try {
749
753
  const stat = await fs8.stat(filePath);
750
- const recentMs = Math.max(stat.birthtimeMs || 0, stat.mtimeMs || 0);
751
- const shouldReplayFromStart = recentMs >= wrapperStartedAt - 5e3;
752
- trackedFiles.set(filePath, { offset: shouldReplayFromStart ? 0 : stat.size });
753
- debug(`tracking file: ${filePath} from offset=${shouldReplayFromStart ? 0 : stat.size}`);
754
+ const replayFromStart = shouldReplayFromStart(stat, wrapperStartedAt);
755
+ trackedFiles.set(filePath, { offset: replayFromStart ? 0 : stat.size });
756
+ debug(`tracking file: ${filePath} from offset=${replayFromStart ? 0 : stat.size}`);
754
757
  } catch {
755
758
  }
756
759
  })
@@ -843,7 +846,7 @@ async function runIngestFromStdin(force = false) {
843
846
  // package.json
844
847
  var package_default = {
845
848
  name: "codex2voice",
846
- version: "0.1.2",
849
+ version: "0.1.3",
847
850
  description: "ElevenLabs voice companion CLI for Codex",
848
851
  repository: {
849
852
  type: "git",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codex2voice",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "ElevenLabs voice companion CLI for Codex",
5
5
  "repository": {
6
6
  "type": "git",