style: fix acpx runtime lint types

This commit is contained in:
Peter Steinberger
2026-04-06 14:53:41 +01:00
parent bfbe1c149c
commit 9fa5b413f0

View File

@@ -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<string, unknown> & {
name?: string;
};
type AcpSessionStore = {
load(sessionId: string): Promise<AcpSessionRecord | undefined>;
save(record: AcpSessionRecord): Promise<void>;
};
type ResetAwareSessionStore = AcpSessionStore & {
markFresh: (sessionKey: string) => void;
};
@@ -34,7 +41,7 @@ function createResetAwareSessionStore(baseStore: AcpSessionStore): ResetAwareSes
},
async save(record: AcpSessionRecord): Promise<void> {
await baseStore.save(record);
const sessionName = record.name.trim();
const sessionName = typeof record.name === "string" ? record.name.trim() : "";
if (sessionName) {
freshSessionKeys.delete(sessionName);
}