From 9fa5b413f076a396e91c795fcc8dec3cd66dc377 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Mon, 6 Apr 2026 14:53:41 +0100 Subject: [PATCH] style: fix acpx runtime lint types --- extensions/acpx/src/runtime.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/extensions/acpx/src/runtime.ts b/extensions/acpx/src/runtime.ts index 9502203298d..8077c453080 100644 --- a/extensions/acpx/src/runtime.ts +++ b/extensions/acpx/src/runtime.ts @@ -12,11 +12,18 @@ import { type AcpRuntimeHandle, type AcpRuntimeOptions, type AcpRuntimeStatus, - type AcpSessionRecord, - type AcpSessionStore, } from "acpx/runtime"; import type { AcpRuntime } from "../runtime-api.js"; +type AcpSessionRecord = Record & { + name?: string; +}; + +type AcpSessionStore = { + load(sessionId: string): Promise; + save(record: AcpSessionRecord): Promise; +}; + type ResetAwareSessionStore = AcpSessionStore & { markFresh: (sessionKey: string) => void; }; @@ -34,7 +41,7 @@ function createResetAwareSessionStore(baseStore: AcpSessionStore): ResetAwareSes }, async save(record: AcpSessionRecord): Promise { await baseStore.save(record); - const sessionName = record.name.trim(); + const sessionName = typeof record.name === "string" ? record.name.trim() : ""; if (sessionName) { freshSessionKeys.delete(sessionName); }