1d174ee5c9
Each agent now maintains its own session cache file instead of sharing a single agent-sessions.json. This prevents session ID conflicts when multiple agents operate on the same thread+role pair. Changes: - getCachePath() now takes agentName parameter - getCachedSessionId/setCachedSessionId require agentName as first param - Cache files named <agent>-sessions.json (e.g., hermes-sessions.json) - Agent wrappers inject their agent name into cache calls - Add comprehensive tests for session cache isolation - Handle malformed JSON gracefully (treat as empty cache) Fixes #461
15 lines
292 B
TypeScript
15 lines
292 B
TypeScript
import path from "node:path";
|
|
import { defineConfig } from "vitest/config";
|
|
|
|
export default defineConfig({
|
|
test: {
|
|
environment: "node",
|
|
include: ["src/**/__tests__/**/*.test.ts"],
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(import.meta.dirname, "./src"),
|
|
},
|
|
},
|
|
});
|