fix(memory-v2): improve pgvector recall and WeChat memory injection
Add keyword fallback and dedupe for pgvector resolve, score personal vs episodic memories by relevance, record WeChat recall product events, and disable broken chatrecall on Postgres session storage. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+8
-1
@@ -45,6 +45,13 @@ export function resolveSandboxMcpNodeExecPath(overridePath) {
|
||||
|
||||
const LOOPBACK_PG_HOSTS = new Set(['127.0.0.1', 'localhost', '::1']);
|
||||
|
||||
export function isChatRecallExtensionSupported(env = process.env) {
|
||||
const sessionDbUrl = String(env?.GOOSE_SESSION_DB_URL ?? '').trim().toLowerCase();
|
||||
if (!sessionDbUrl) return true;
|
||||
// Goose chatrecall still uses SQLite transaction syntax when persisting extension state.
|
||||
return !sessionDbUrl.startsWith('postgres');
|
||||
}
|
||||
|
||||
function rewritePgUnixSocketUrlForContainer(sourceUrl, hostGateway) {
|
||||
const raw = String(sourceUrl ?? '').trim();
|
||||
const authorityMatch = raw.match(/^(postgres(?:ql)?:\/\/[^@/]+@)\/(.*)$/i);
|
||||
@@ -739,7 +746,7 @@ export function buildAgentExtensionPolicy(
|
||||
if (capabilities.code_sandbox && enableCodeExecutionExtension) {
|
||||
extensions.push(makeExtension('platform', 'code_execution', []));
|
||||
}
|
||||
if (capabilities.chat_recall) {
|
||||
if (capabilities.chat_recall && isChatRecallExtensionSupported(process.env)) {
|
||||
extensions.push(makeExtension('platform', 'chatrecall', []));
|
||||
}
|
||||
if (
|
||||
|
||||
Reference in New Issue
Block a user