Skip to content

JiuwenSwarm is an intelligent AI Agent built on openJiuwen. It extends the powerful capabilities of large language models directly to your fingertips through various communication apps you use daily.

Python

feat(dreaming): Add Dream Memory Module and Supporting Capabilities

white202593cd203f8dcd
diff --git a/jiuwenclaw/agents/harness/common/memory/dreaming/__init__.py b/jiuwenswarm/agents/harness/common/memory/dreaming/__init__.py
similarity index 100%
rename from jiuwenclaw/agents/harness/common/memory/dreaming/__init__.py
rename to jiuwenswarm/agents/harness/common/memory/dreaming/__init__.py
diff --git a/jiuwenclaw/agents/harness/common/memory/dreaming/sweeper.py b/jiuwenswarm/agents/harness/common/memory/dreaming/sweeper.py
similarity index 100%
rename from jiuwenclaw/agents/harness/common/memory/dreaming/sweeper.py
rename to jiuwenswarm/agents/harness/common/memory/dreaming/sweeper.py
diff --git a/jiuwenswarm/server/runtime/agent_adapter/interface_deep.py b/jiuwenswarm/server/runtime/agent_adapter/interface_deep.py
index 7475547b09..1a00830afc 100644
--- a/jiuwenswarm/server/runtime/agent_adapter/interface_deep.py
+++ b/jiuwenswarm/server/runtime/agent_adapter/interface_deep.py
@@ -5632,8 +5632,8 @@ class JiuWenClawDeepAdapter:
if self._dreaming_started:
return
try:
- from jiuwenclaw.agents.harness.common.memory.dreaming import start_dreaming
- from jiuwenclaw.common.utils import get_agent_sessions_dir
+ from jiuwenswarm.agents.harness.common.memory.dreaming import start_dreaming
+ from jiuwenswarm.common.utils import get_agent_sessions_dir
sessions_dir = str(get_agent_sessions_dir() or "")
mode = getattr(self, "_dreaming_mode", "agent")
output_name = "memory" if mode == "agent" else "coding_memory"
@@ -5653,7 +5653,7 @@ class JiuWenClawDeepAdapter:
if not self._dreaming_started:
return
try:
- from jiuwenclaw.agents.harness.common.memory.dreaming import stop_dreaming
+ from jiuwenswarm.agents.harness.common.memory.dreaming import stop_dreaming
mode = getattr(self, "_dreaming_mode", "agent")
await stop_dreaming(mode=mode)
self._dreaming_started = False
diff --git a/tests/system_tests/test_dreaming_e2e.py b/tests/system_tests/test_dreaming_e2e.py
index 8eedf89861..1442c28b18 100644
--- a/tests/system_tests/test_dreaming_e2e.py
+++ b/tests/system_tests/test_dreaming_e2e.py
@@ -23,7 +23,7 @@ import pytest
pytestmark = [pytest.mark.integration, pytest.mark.system]
try:
- from jiuwenclaw.agents.harness.common.memory.dreaming import DreamingOrchestrator # noqa: F401
+ from jiuwenswarm.agents.harness.common.memory.dreaming import DreamingOrchestrator # noqa: F401
except ImportError:
pytest.skip("openjiuwen dreaming module is not available", allow_module_level=True)
@@ -72,7 +72,7 @@ class TestDreamingE2EAgent:
@pytest.mark.asyncio
async def test_sweep_writes_dreaming_md(self, tmp_path):
- from jiuwenclaw.agents.harness.common.memory.dreaming.sweeper import Sweeper
+ from jiuwenswarm.agents.harness.common.memory.dreaming.sweeper import Sweeper
sessions_root = tmp_path / "sessions"
output_dir = tmp_path / "memory"
@@ -109,7 +109,7 @@ class TestDreamingE2EAgent:
@pytest.mark.asyncio
async def test_dedup_skips_existing_title(self, tmp_path):
- from jiuwenclaw.agents.harness.common.memory.dreaming.sweeper import Sweeper
+ from jiuwenswarm.agents.harness.common.memory.dreaming.sweeper import Sweeper
sessions_root = tmp_path / "sessions"
output_dir = tmp_path / "memory"
@@ -147,7 +147,7 @@ class TestDreamingE2EAgent:
@pytest.mark.asyncio
async def test_incremental_scan_reprocesses_updated_session(self, tmp_path):
- from jiuwenclaw.agents.harness.common.memory.dreaming.sweeper import Sweeper
+ from jiuwenswarm.agents.harness.common.memory.dreaming.sweeper import Sweeper
sessions_root = tmp_path / "sessions"
output_dir = tmp_path / "memory"
@@ -213,7 +213,7 @@ class TestDreamingE2EAgent:
@pytest.mark.asyncio
async def test_skips_unchanged_session(self, tmp_path):
- from jiuwenclaw.agents.harness.common.memory.dreaming.sweeper import Sweeper
+ from jiuwenswarm.agents.harness.common.memory.dreaming.sweeper import Sweeper
sessions_root = tmp_path / "sessions"
output_dir = tmp_path / "memory"
@@ -257,7 +257,7 @@ class TestDreamingE2ECode:
@pytest.mark.asyncio
async def test_sweep_writes_consolidated_files(self, tmp_path):
- from jiuwenclaw.agents.harness.common.memory.dreaming.sweeper import Sweeper
+ from jiuwenswarm.agents.harness.common.memory.dreaming.sweeper import Sweeper
sessions_root = tmp_path / "sessions"
output_dir = tmp_path / "coding_memory"
@@ -293,7 +293,7 @@ class TestDreamingE2ECode:
@pytest.mark.asyncio
async def test_content_hash_dedup(self, tmp_path):
- from jiuwenclaw.agents.harness.common.memory.dreaming.sweeper import Sweeper
+ from jiuwenswarm.agents.harness.common.memory.dreaming.sweeper import Sweeper
sessions_root = tmp_path / "sessions"
output_dir = tmp_path / "coding_memory"
@@ -328,7 +328,7 @@ class TestDreamingE2ELifecycle:
@pytest.mark.asyncio
async def test_start_stop(self, tmp_path, monkeypatch):
- from jiuwenclaw.agents.harness.common.memory.dreaming import (
+ from jiuwenswarm.agents.harness.common.memory.dreaming import (
start_dreaming,
stop_dreaming,
get_dreaming_orchestrator,
@@ -357,7 +357,7 @@ class TestDreamingE2ELifecycle:
@pytest.mark.asyncio
async def test_start_disabled_config(self, tmp_path, monkeypatch):
- from jiuwenclaw.agents.harness.common.memory.dreaming import (
+ from jiuwenswarm.agents.harness.common.memory.dreaming import (
start_dreaming,
get_dreaming_orchestrator,
)
diff --git a/tests/unit_tests/agentserver/memory/test_dreaming_sweeper.py b/tests/unit_tests/agentserver/memory/test_dreaming_sweeper.py
index 5368c8cbfc..c30a9146db 100644
--- a/tests/unit_tests/agentserver/memory/test_dreaming_sweeper.py
+++ b/tests/unit_tests/agentserver/memory/test_dreaming_sweeper.py
@@ -27,7 +27,7 @@ from unittest import mock
import pytest
try:
- from jiuwenclaw.agents.harness.common.memory.dreaming.sweeper import Sweeper # noqa: F401
+ from jiuwenswarm.agents.harness.common.memory.dreaming.sweeper import Sweeper # noqa: F401
_DREAMING_AVAILABLE = True
except ImportError:
_DREAMING_AVAILABLE = False