958db6c0545ffa4fb53918b7a6da8784c6a618e3

Author
TheEdgeOfRage <git@theedgeofrage.com>
Committer
TheEdgeOfRage <git@theedgeofrage.com>
Date

Message

Update pi herdr extension

Diff

 1diff --git a/dot_pi/private_agent/extensions/herdr-agent-state.ts b/dot_pi/private_agent/extensions/herdr-agent-state.ts
 2index 67bc41889abc2791d6dcdfe8279bdc24186cc6fe..276c964daf6a61f593ab3a8d3f7c1e0ed626d1b1 100644
 3--- a/dot_pi/private_agent/extensions/herdr-agent-state.ts
 4+++ b/dot_pi/private_agent/extensions/herdr-agent-state.ts
 5@@ -2,10 +2,11 @@
 6 // managed by herdr; reinstalling or updating the integration overwrites this file.
 7 // add custom hooks/plugins beside this file instead of editing it.
 8 // HERDR_INTEGRATION_ID=pi
 9-// HERDR_INTEGRATION_VERSION=8
10+// HERDR_INTEGRATION_VERSION=9
11 // @ts-nocheck
12 
13 import net from "node:net";
14+import path from "node:path";
15 
16 const HERDR_ENV = process.env.HERDR_ENV;
17 const socketPath = process.env.HERDR_SOCKET_PATH;
18@@ -74,7 +75,10 @@ function updateSessionRef(ctx: any): void {
19   try {
20     const file = ctx?.sessionManager?.getSessionFile?.();
21     currentAgentSessionPath =
22-      typeof file === "string" && file.startsWith("/") ? file : undefined;
23+      typeof file === "string" &&
24+      (path.posix.isAbsolute(file) || path.win32.isAbsolute(file))
25+        ? file
26+        : undefined;
27   } catch {
28     currentAgentSessionPath = undefined;
29   }