feat(memory-v2): auto-accept candidate memories in active and canary modes

Let Personal Memory candidates pass policy gates without per-user manual review, while keeping shadow mode for explicit human approval.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-07-13 14:16:57 +08:00
parent 7f7aced751
commit b33c943b69
4 changed files with 147 additions and 13 deletions
+1 -1
View File
@@ -37,7 +37,7 @@ test('candidate store saves, lists, counts, and reviews with parameterized SQL',
id: 'pmc_1', userId: 'u1', sessionId: 's1', memoryType: 'episodic',
content: '决定使用 main 发布', importance: 0.9, confidence: 0.9,
policyReason: 'decision_signal', evidence: { sourceId: 's1:0' }, createdAt: 1,
}), { inserted: true });
}, { autoAccept: true }), { inserted: true, status: 'accepted' });
const rows = await store.listCandidates({ limit: 20 });
assert.equal(rows[0].evidence.sourceId, 's1:0');
assert.deepEqual(await store.countByStatus(), { candidate: 1 });