fix(agent-kit): separate session cache per agent
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
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import path from "node:path";
|
||||
import { defineConfig } from "vitest/config";
|
||||
|
||||
// biome-ignore lint/style/noDefaultExport: Vitest loads config from default export.
|
||||
export default defineConfig({
|
||||
test: {
|
||||
environment: "node",
|
||||
|
||||
Reference in New Issue
Block a user