mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-10 12:32:27 +00:00
refactor: align dreaming status with sqlite labels
This commit is contained in:
@@ -76,6 +76,8 @@ describe("dreaming controller", () => {
|
||||
remPhaseHitCount: 4,
|
||||
promotedTotal: 21,
|
||||
promotedToday: 2,
|
||||
storeLabel: "sqlite:plugin_state_entries/memory-core/dreaming.short-term-recall",
|
||||
phaseSignalLabel: "sqlite:plugin_state_entries/memory-core/dreaming.phase-signals",
|
||||
shortTermEntries: [
|
||||
{
|
||||
key: "memory:memory/2026-04-05.md:1:2",
|
||||
@@ -171,6 +173,8 @@ describe("dreaming controller", () => {
|
||||
totalSignalCount: 20,
|
||||
phaseSignalCount: 11,
|
||||
promotedToday: 2,
|
||||
storeLabel: "sqlite:plugin_state_entries/memory-core/dreaming.short-term-recall",
|
||||
phaseSignalLabel: "sqlite:plugin_state_entries/memory-core/dreaming.phase-signals",
|
||||
shortTermEntries: [
|
||||
expect.objectContaining({
|
||||
snippet: "Emma prefers shorter, lower-pressure check-ins.",
|
||||
|
||||
@@ -67,8 +67,8 @@ export type DreamingStatus = {
|
||||
remPhaseHitCount: number;
|
||||
promotedTotal: number;
|
||||
promotedToday: number;
|
||||
storePath?: string;
|
||||
phaseSignalPath?: string;
|
||||
storeLabel?: string;
|
||||
phaseSignalLabel?: string;
|
||||
storeError?: string;
|
||||
phaseSignalError?: string;
|
||||
shortTermEntries: DreamingEntry[];
|
||||
@@ -683,8 +683,8 @@ function normalizeDreamingStatus(raw: unknown): DreamingStatus | null {
|
||||
}
|
||||
: undefined;
|
||||
const timezone = normalizeTrimmedString(record.timezone);
|
||||
const storePath = normalizeTrimmedString(record.storePath);
|
||||
const phaseSignalPath = normalizeTrimmedString(record.phaseSignalPath);
|
||||
const storeLabel = normalizeTrimmedString(record.storeLabel);
|
||||
const phaseSignalLabel = normalizeTrimmedString(record.phaseSignalLabel);
|
||||
const storeError = normalizeTrimmedString(record.storeError);
|
||||
const phaseSignalError = normalizeTrimmedString(record.phaseSignalError);
|
||||
|
||||
@@ -704,8 +704,8 @@ function normalizeDreamingStatus(raw: unknown): DreamingStatus | null {
|
||||
remPhaseHitCount: normalizeFiniteInt(record.remPhaseHitCount, 0),
|
||||
promotedTotal: normalizeFiniteInt(record.promotedTotal, 0),
|
||||
promotedToday: normalizeFiniteInt(record.promotedToday, 0),
|
||||
...(storePath ? { storePath } : {}),
|
||||
...(phaseSignalPath ? { phaseSignalPath } : {}),
|
||||
...(storeLabel ? { storeLabel } : {}),
|
||||
...(phaseSignalLabel ? { phaseSignalLabel } : {}),
|
||||
...(storeError ? { storeError } : {}),
|
||||
...(phaseSignalError ? { phaseSignalError } : {}),
|
||||
shortTermEntries: normalizeDreamingEntries(record.shortTermEntries),
|
||||
|
||||
Reference in New Issue
Block a user