the runtime your coding agents live on
Rust agentagent-orchestrationaiai-agentsclaude-codeclicodexcoding-agentsdeveloper-toolsdevtoolsmultiplexerrustterminalterminal-multiplexerterminal-uitmuxtuiworkspace-manager
fix(omp): support Windows session paths (#2092)
Wiedzmina07871a55ee7
diff --git a/src/integration/assets/herdr-agent-state.test.ts b/src/integration/assets/herdr-agent-state.test.tsindex 1dadbd5fa..f54332ce2 100644--- a/src/integration/assets/herdr-agent-state.test.ts+++ b/src/integration/assets/herdr-agent-state.test.ts@@ -227,6 +227,17 @@ for (const integration of integrations) {});}+test("OMP accepts POSIX and Windows session paths", async () => {+ const { isAbsoluteSessionPath } = await importFresh("./omp/herdr-agent-state.ts");++ expect(isAbsoluteSessionPath("/tmp/omp-session.jsonl")).toBe(true);+ expect(isAbsoluteSessionPath("C:\\Users\\User\\.omp\\agent\\sessions\\omp-session.jsonl")).toBe(+ true,+ );+ expect(isAbsoluteSessionPath("C:/Users/User/.omp/agent/sessions/omp-session.jsonl")).toBe(true);+ expect(isAbsoluteSessionPath("relative/omp-session.jsonl")).toBe(false);+});+test("Pi reports idle only after the agent settles", async () => {const requests = await startRecordingServer("pi-settled");const { handlers, pi } = createExtensionHarness();diff --git a/src/integration/assets/omp/herdr-agent-state.ts b/src/integration/assets/omp/herdr-agent-state.tsindex b3f88c932..88f804aab 100644--- a/src/integration/assets/omp/herdr-agent-state.ts+++ b/src/integration/assets/omp/herdr-agent-state.ts@@ -2,10 +2,11 @@// managed by herdr; reinstalling or updating the integration overwrites this file.// add custom hooks/plugins beside this file instead of editing it.// HERDR_INTEGRATION_ID=omp-// HERDR_INTEGRATION_VERSION=7+// HERDR_INTEGRATION_VERSION=8// @ts-nocheckimport net from "node:net";+import path from "node:path";const HERDR_ENV = process.env.HERDR_ENV;const socketPath = process.env.HERDR_SOCKET_PATH;@@ -84,11 +85,17 @@ function nextReportSeq(): number {return reportSeq;}+export function isAbsoluteSessionPath(file: unknown): file is string {+ return (+ typeof file === "string" &&+ (path.posix.isAbsolute(file) || path.win32.isAbsolute(file))+ );+}+function updateSessionRef(ctx: any): void {try {const file = ctx?.sessionManager?.getSessionFile?.();- currentAgentSessionPath =- typeof file === "string" && file.startsWith("/") ? file : undefined;+ currentAgentSessionPath = isAbsoluteSessionPath(file) ? file : undefined;} catch {currentAgentSessionPath = undefined;}diff --git a/src/integration/mod.rs b/src/integration/mod.rsindex 77d8ddda4..b691dce95 100644--- a/src/integration/mod.rs+++ b/src/integration/mod.rs@@ -25,7 +25,7 @@ const PI_EXTENSION_ASSET: &str = include_str!("assets/pi/herdr-agent-state.ts");const PI_INTEGRATION_VERSION: u32 = 7;const OMP_EXTENSION_INSTALL_NAME: &str = "herdr-omp-agent-state.ts";const OMP_EXTENSION_ASSET: &str = include_str!("assets/omp/herdr-agent-state.ts");-const OMP_INTEGRATION_VERSION: u32 = 7;+const OMP_INTEGRATION_VERSION: u32 = 8;const CLAUDE_HOOK_INSTALL_NAME: &str = if cfg!(windows) {"herdr-agent-state.ps1"} else {