mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-24 17:44:28 +00:00
Gateway: harden custom session-store discovery (#44176)
Merged via squash.
Prepared head SHA: 52ebbf5188
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
This commit is contained in:
committed by
GitHub
parent
dc3bb1890b
commit
46f0bfc55b
@@ -767,7 +767,8 @@ describe("listSessionsFromStore search", () => {
|
||||
describe("loadCombinedSessionStoreForGateway includes disk-only agents (#32804)", () => {
|
||||
test("ACP agent sessions are visible even when agents.list is configured", async () => {
|
||||
await withStateDirEnv("openclaw-acp-vis-", async ({ stateDir }) => {
|
||||
const agentsDir = path.join(stateDir, "agents");
|
||||
const customRoot = path.join(stateDir, "custom-state");
|
||||
const agentsDir = path.join(customRoot, "agents");
|
||||
const mainDir = path.join(agentsDir, "main", "sessions");
|
||||
const codexDir = path.join(agentsDir, "codex", "sessions");
|
||||
fs.mkdirSync(mainDir, { recursive: true });
|
||||
@@ -792,7 +793,7 @@ describe("loadCombinedSessionStoreForGateway includes disk-only agents (#32804)"
|
||||
const cfg = {
|
||||
session: {
|
||||
mainKey: "main",
|
||||
store: path.join(stateDir, "agents", "{agentId}", "sessions", "sessions.json"),
|
||||
store: path.join(customRoot, "agents", "{agentId}", "sessions", "sessions.json"),
|
||||
},
|
||||
agents: {
|
||||
list: [{ id: "main", default: true }],
|
||||
|
||||
Reference in New Issue
Block a user