惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 司徒正美
The GitHub Blog
The GitHub Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Apple Machine Learning Research
Apple Machine Learning Research
L
LangChain Blog
GbyAI
GbyAI
博客园_首页
V
Visual Studio Blog
Martin Fowler
Martin Fowler
WordPress大学
WordPress大学
H
Hackread – Cybersecurity News, Data Breaches, AI and More
博客园 - 叶小钗
腾讯CDC
博客园 - Franky
IT之家
IT之家
Google DeepMind News
Google DeepMind News
Microsoft Azure Blog
Microsoft Azure Blog
D
Docker
大猫的无限游戏
大猫的无限游戏
Recent Announcements
Recent Announcements
小众软件
小众软件
博客园 - 三生石上(FineUI控件)
B
Blog
酷 壳 – CoolShell
酷 壳 – CoolShell

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(memory-core): filter REM dreaming candidates to light...
SebTardif · 2026-05-25 · via Recent Commits to openclaw:main

@@ -96,6 +96,7 @@ type ShortTermPhaseSignalEntry = {

9696

remHits: number;

9797

lastLightAt?: string;

9898

lastRemAt?: string;

99+

lastRemConsideredAt?: string;

99100

};

100101101102

type ShortTermPhaseSignalStore = {

@@ -831,12 +832,17 @@ function normalizePhaseSignalStore(raw: unknown, nowIso: string): ShortTermPhase

831832

typeof entry.lastRemAt === "string" && entry.lastRemAt.trim().length > 0

832833

? entry.lastRemAt

833834

: undefined;

835+

const lastRemConsideredAt =

836+

typeof entry.lastRemConsideredAt === "string" && entry.lastRemConsideredAt.trim().length > 0

837+

? entry.lastRemConsideredAt

838+

: undefined;

834839

entries[key] = {

835840

key,

836841

lightHits,

837842

remHits,

838843

...(lastLightAt ? { lastLightAt } : {}),

839844

...(lastRemAt ? { lastRemAt } : {}),

845+

...(lastRemConsideredAt ? { lastRemConsideredAt } : {}),

840846

};

841847

}

842848

return {

@@ -1222,6 +1228,86 @@ export async function recordDreamingPhaseSignals(params: {

12221228

});

12231229

}

122412301231+

export async function recordRemConsideredPhaseSignals(params: {

1232+

workspaceDir?: string;

1233+

keys: string[];

1234+

nowMs?: number;

1235+

}): Promise<void> {

1236+

const workspaceDir = params.workspaceDir?.trim();

1237+

if (!workspaceDir) {

1238+

return;

1239+

}

1240+

const keys = [...new Set(params.keys.map((key) => key.trim()).filter(Boolean))];

1241+

if (keys.length === 0) {

1242+

return;

1243+

}

1244+

const nowMs = Number.isFinite(params.nowMs) ? (params.nowMs as number) : Date.now();

1245+

const nowIso = new Date(nowMs).toISOString();

1246+1247+

await withShortTermLock(workspaceDir, async () => {

1248+

const [store, phaseSignals] = await Promise.all([

1249+

readStore(workspaceDir, nowIso),

1250+

readPhaseSignalStore(workspaceDir, nowIso),

1251+

]);

1252+

const knownKeys = new Set(Object.keys(store.entries));

1253+1254+

for (const key of keys) {

1255+

if (!knownKeys.has(key)) {

1256+

continue;

1257+

}

1258+

const entry = phaseSignals.entries[key] ?? {

1259+

key,

1260+

lightHits: 0,

1261+

remHits: 0,

1262+

};

1263+

entry.lastRemConsideredAt = nowIso;

1264+

phaseSignals.entries[key] = entry;

1265+

}

1266+1267+

for (const [key, entry] of Object.entries(phaseSignals.entries)) {

1268+

if (!knownKeys.has(key) || (entry.lightHits <= 0 && entry.remHits <= 0)) {

1269+

delete phaseSignals.entries[key];

1270+

}

1271+

}

1272+1273+

phaseSignals.updatedAt = nowIso;

1274+

await writePhaseSignalStore(workspaceDir, phaseSignals);

1275+

});

1276+

}

1277+1278+

export async function readLightStagedKeys(params: {

1279+

workspaceDir: string;

1280+

nowMs?: number;

1281+

}): Promise<Set<string>> {

1282+

const workspaceDir = params.workspaceDir?.trim();

1283+

if (!workspaceDir) {

1284+

return new Set();

1285+

}

1286+

const nowMs = Number.isFinite(params.nowMs) ? (params.nowMs as number) : Date.now();

1287+

const nowIso = new Date(nowMs).toISOString();

1288+

const store = await readPhaseSignalStore(workspaceDir, nowIso);

1289+

const keys = new Set<string>();

1290+

for (const [key, entry] of Object.entries(store.entries)) {

1291+

if (entry.lightHits <= 0) {

1292+

continue;

1293+

}

1294+

const lastLightMs = Date.parse(entry.lastLightAt ?? "");

1295+

const lastRemMs = Date.parse(entry.lastRemAt ?? "");

1296+

const lastRemConsideredMs = Date.parse(entry.lastRemConsideredAt ?? "");

1297+

const lastConsumedMs = Math.max(

1298+

Number.isFinite(lastRemMs) ? lastRemMs : Number.NEGATIVE_INFINITY,

1299+

Number.isFinite(lastRemConsideredMs) ? lastRemConsideredMs : Number.NEGATIVE_INFINITY,

1300+

);

1301+

const hasPendingLightSignal = Number.isFinite(lastLightMs)

1302+

? lastLightMs > lastConsumedMs

1303+

: !entry.lastRemAt;

1304+

if (hasPendingLightSignal) {

1305+

keys.add(key);

1306+

}

1307+

}

1308+

return keys;

1309+

}

1310+12251311

export async function rankShortTermPromotionCandidates(

12261312

options: RankShortTermPromotionOptions,

12271313

): Promise<PromotionCandidate[]> {