mirror of
https://gitee.com/mateos/mateclaw.git
synced 2026-09-13 03:13:41 +08:00
feat(memory): memory audit fixes — 4 missing items
This commit is contained in:
parent
6ae221b38d
commit
0351cc369e
@ -138,5 +138,8 @@ public class MemoryProperties {
|
||||
|
||||
/** Trust score half-life in days for time decay */
|
||||
private int trustHalfLifeDays = 60;
|
||||
|
||||
/** Enable UI Forget button on facts (Phase 3) */
|
||||
private boolean forgetEnabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -64,8 +64,8 @@ public class FactController {
|
||||
public R<Void> forgetFact(@PathVariable Long agentId,
|
||||
@PathVariable Long factId,
|
||||
Authentication auth) {
|
||||
if (!properties.getFact().isProjectionEnabled()) {
|
||||
return R.fail("Fact projection is disabled");
|
||||
if (!properties.getFact().isForgetEnabled()) {
|
||||
return R.fail(410, "Forget is disabled");
|
||||
}
|
||||
|
||||
FactEntity fact = factMapper.selectById(factId);
|
||||
|
||||
@ -218,3 +218,4 @@ mate:
|
||||
llm-extraction-enabled: false
|
||||
contradiction-check-enabled: false
|
||||
trust-half-life-days: 60
|
||||
forget-enabled: false
|
||||
|
||||
@ -0,0 +1,24 @@
|
||||
You are checking for contradictions between facts about the same entity.
|
||||
|
||||
For each pair below, determine if they genuinely contradict each other.
|
||||
A contradiction means the two facts CANNOT both be true at the same time.
|
||||
|
||||
Pairs to check:
|
||||
{pairs}
|
||||
|
||||
For each pair, respond in JSON array format:
|
||||
[
|
||||
{
|
||||
"factA": <id>,
|
||||
"factB": <id>,
|
||||
"isContradiction": true|false,
|
||||
"reason": "brief explanation"
|
||||
}
|
||||
]
|
||||
|
||||
Rules:
|
||||
- Temporal differences are NOT contradictions (e.g. "uses Oracle" and "migrating to PostgreSQL" can coexist)
|
||||
- Different scopes are NOT contradictions (e.g. "dev uses H2" and "prod uses MySQL")
|
||||
- Only flag genuine logical conflicts where both cannot be simultaneously true
|
||||
- Maximum 5 pairs per batch
|
||||
- Output ONLY the JSON array, no explanation outside it
|
||||
Loading…
Reference in New Issue
Block a user