refactor: drop session-dir transcript routing

This commit is contained in:
Peter Steinberger
2026-05-08 11:44:58 +01:00
parent 68c9bab69b
commit c5d2df744a
4 changed files with 1 additions and 14 deletions

View File

@@ -9,7 +9,6 @@ import {
createSubsystemLogger,
onSessionTranscriptUpdate,
resolveAgentDir,
resolveSessionTranscriptsDirForAgent,
resolveUserPath,
type OpenClawConfig,
type ResolvedMemorySearchConfig,
@@ -591,13 +590,7 @@ export abstract class MemoryManagerSyncOps {
return false;
}
const scope = resolveSessionTranscriptScope(sessionTranscript);
if (scope) {
return scope.agentId === this.agentId;
}
const sessionsDir = resolveSessionTranscriptsDirForAgent(this.agentId);
const resolvedFile = path.resolve(sessionTranscript);
const resolvedDir = path.resolve(sessionsDir);
return resolvedFile.startsWith(`${resolvedDir}${path.sep}`);
return scope?.agentId === this.agentId;
}
private normalizeTargetSessionTranscripts(sessionTranscripts?: string[]): Set<string> | null {

View File

@@ -66,7 +66,6 @@ function createDeps(overrides?: Partial<QaScenarioRuntimeDeps>): QaScenarioRunti
handleQaAction: fn,
extractQaToolPayload: fn,
formatMemoryDreamingDay: fn,
resolveSessionTranscriptsDirForAgent: fn,
buildAgentSessionKey: fn,
normalizeLowercaseStringOrEmpty: fn,
formatErrorMessage: fn,

View File

@@ -78,7 +78,6 @@ export type QaScenarioRuntimeDeps = {
handleQaAction: QaScenarioRuntimeFunction;
extractQaToolPayload: QaScenarioRuntimeFunction;
formatMemoryDreamingDay: QaScenarioRuntimeFunction;
resolveSessionTranscriptsDirForAgent: QaScenarioRuntimeFunction;
buildAgentSessionKey: QaScenarioRuntimeFunction;
normalizeLowercaseStringOrEmpty: QaScenarioRuntimeFunction;
formatErrorMessage: QaScenarioRuntimeFunction;
@@ -163,7 +162,6 @@ type QaScenarioRuntimeApi<
handleQaAction: TDeps["handleQaAction"];
extractQaToolPayload: TDeps["extractQaToolPayload"];
formatMemoryDreamingDay: TDeps["formatMemoryDreamingDay"];
resolveSessionTranscriptsDirForAgent: TDeps["resolveSessionTranscriptsDirForAgent"];
buildAgentSessionKey: TDeps["buildAgentSessionKey"];
normalizeLowercaseStringOrEmpty: TDeps["normalizeLowercaseStringOrEmpty"];
formatErrorMessage: TDeps["formatErrorMessage"];
@@ -263,7 +261,6 @@ export function createQaScenarioRuntimeApi<
handleQaAction: params.deps.handleQaAction,
extractQaToolPayload: params.deps.extractQaToolPayload,
formatMemoryDreamingDay: params.deps.formatMemoryDreamingDay,
resolveSessionTranscriptsDirForAgent: params.deps.resolveSessionTranscriptsDirForAgent,
buildAgentSessionKey: params.deps.buildAgentSessionKey,
normalizeLowercaseStringOrEmpty: params.deps.normalizeLowercaseStringOrEmpty,
formatErrorMessage: params.deps.formatErrorMessage,

View File

@@ -2,7 +2,6 @@ import { randomUUID } from "node:crypto";
import fs from "node:fs/promises";
import path from "node:path";
import { setTimeout as sleep } from "node:timers/promises";
import { resolveSessionTranscriptsDirForAgent } from "openclaw/plugin-sdk/memory-host-core";
import { formatMemoryDreamingDay } from "openclaw/plugin-sdk/memory-host-status";
import { buildAgentSessionKey } from "openclaw/plugin-sdk/routing";
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/text-runtime";
@@ -181,7 +180,6 @@ function createQaSuiteScenarioDeps(params: QaSuiteScenarioDepsParams) {
handleQaAction,
extractQaToolPayload,
formatMemoryDreamingDay,
resolveSessionTranscriptsDirForAgent,
buildAgentSessionKey,
normalizeLowercaseStringOrEmpty,
formatErrorMessage: params.formatErrorMessage,