
















@@ -384,135 +384,6 @@ describe("memory cli", () => {
384384});
385385});
386386387-it("reports dreaming blocked when another explicit heartbeat agent excludes main", async () => {
388-loadConfig.mockReturnValue({
389-plugins: {
390-entries: {
391-"memory-core": {
392-config: {
393-dreaming: {
394-enabled: true,
395-},
396-},
397-},
398-},
399-},
400-agents: {
401-defaults: {
402-heartbeat: {
403-every: "30m",
404-},
405-},
406-list: [
407-{ id: "main", default: true },
408-{
409-id: "ops",
410-heartbeat: {
411-every: "1h",
412-},
413-},
414-],
415-},
416-});
417-const close = vi.fn(async () => {});
418-mockManager({
419-probeVectorAvailability: vi.fn(async () => true),
420-status: () => makeMemoryStatus({ workspaceDir: "/tmp/openclaw" }),
421- close,
422-});
423-424-const log = spyRuntimeLogs(defaultRuntime);
425-await runMemoryCli(["status", "--agent", "main"]);
426-427-expect(log).toHaveBeenCalledWith(
428-expect.stringContaining(
429-'Dreaming status: blocked - dreaming is enabled but will not run because heartbeat is disabled for "main". See https://docs.openclaw.ai/concepts/dreaming#troubleshooting',
430-),
431-);
432-expect(close).toHaveBeenCalled();
433-});
434-435-it('reports dreaming blocked when main heartbeat interval is "0m"', async () => {
436-loadConfig.mockReturnValue({
437-plugins: {
438-entries: {
439-"memory-core": {
440-config: {
441-dreaming: {
442-enabled: true,
443-},
444-},
445-},
446-},
447-},
448-agents: {
449-defaults: {
450-heartbeat: {
451-every: "0m",
452-},
453-},
454-list: [{ id: "main", default: true }],
455-},
456-});
457-const close = vi.fn(async () => {});
458-mockManager({
459-probeVectorAvailability: vi.fn(async () => true),
460-status: () => makeMemoryStatus({ workspaceDir: "/tmp/openclaw" }),
461- close,
462-});
463-464-const log = spyRuntimeLogs(defaultRuntime);
465-await runMemoryCli(["status"]);
466-467-expect(log).toHaveBeenCalledWith(
468-expect.stringContaining(
469-'Dreaming status: blocked - dreaming is enabled but will not run because heartbeat is disabled for "main". See https://docs.openclaw.ai/concepts/dreaming#troubleshooting',
470-),
471-);
472-expect(close).toHaveBeenCalled();
473-});
474-475-it("reports dreaming blocked for the configured default agent when it is not main", async () => {
476-resolveDefaultAgentId.mockReturnValue("ops");
477-loadConfig.mockReturnValue({
478-plugins: {
479-entries: {
480-"memory-core": {
481-config: {
482-dreaming: {
483-enabled: true,
484-},
485-},
486-},
487-},
488-},
489-agents: {
490-defaults: {
491-heartbeat: {
492-every: "0m",
493-},
494-},
495-list: [{ id: "ops", default: true }],
496-},
497-});
498-const close = vi.fn(async () => {});
499-mockManager({
500-probeVectorAvailability: vi.fn(async () => true),
501-status: () => makeMemoryStatus({ workspaceDir: "/tmp/openclaw" }),
502- close,
503-});
504-505-const log = spyRuntimeLogs(defaultRuntime);
506-await runMemoryCli(["status", "--agent", "ops"]);
507-508-expect(log).toHaveBeenCalledWith(
509-expect.stringContaining(
510-'Dreaming status: blocked - dreaming is enabled but will not run because heartbeat is disabled for "ops". See https://docs.openclaw.ai/concepts/dreaming#troubleshooting',
511-),
512-);
513-expect(close).toHaveBeenCalled();
514-});
515-516387it("repairs invalid recall metadata and stale locks with status --fix", async () => {
517388await withTempWorkspace(async (workspaceDir) => {
518389const storePath = path.join(workspaceDir, "memory", ".dreams", "short-term-recall.json");
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。