Implement consensus and memory management for workspace events
- Add ConsensusSnapshot and ConsensusSlot classes for structured consensus state representation. - Introduce OnlineLanguageLearner for stateful online learning with experience replay and EWC regularization. - Create WorkspaceEvent and ActionEvent classes for serializable event types. - Develop InMemoryVectorMemoryStore for storing and querying workspace events. - Implement ActionPolicy to manage action selection and motor parameterization. - Establish a unified WorkspaceRuntime for managing the agent's lifecycle and interactions. - Enhance tests in test_smoke.py to cover new functionalities and ensure correctness.
This commit is contained in:
@@ -35,6 +35,20 @@ from .jlens import (
|
||||
DirectedModulation,
|
||||
CounterfactualReflection,
|
||||
)
|
||||
from .consensus import (
|
||||
ConsensusSlot,
|
||||
ConsensusSnapshot,
|
||||
)
|
||||
from .events import (
|
||||
WorkspaceEvent,
|
||||
ActionEvent,
|
||||
)
|
||||
from .memory import (
|
||||
MemoryRecord,
|
||||
MemoryStore,
|
||||
InMemoryVectorMemoryStore,
|
||||
Hippocampus,
|
||||
)
|
||||
from .multimodal import (
|
||||
MultimodalConfig,
|
||||
MultimodalJSpaceModel,
|
||||
@@ -42,6 +56,19 @@ from .multimodal import (
|
||||
AudioEncoder, AudioDecoder,
|
||||
TextEncoder, TextDecoder,
|
||||
)
|
||||
from .continual import (
|
||||
OnlineLanguageLearner,
|
||||
)
|
||||
from .policy import (
|
||||
ACTION_LABELS,
|
||||
compose_action_params,
|
||||
ReflexRule,
|
||||
ActionGate,
|
||||
ActionValueModel,
|
||||
MotorController,
|
||||
ActionDecision,
|
||||
ActionPolicy,
|
||||
)
|
||||
from .realtime import (
|
||||
Frame,
|
||||
CameraStream,
|
||||
@@ -66,12 +93,12 @@ from .platform import (
|
||||
)
|
||||
from .embodied import (
|
||||
MouseActuator, KeyboardActuator, AudioActuator, ScreenActuator,
|
||||
Cerebellum, CentralNervousSystem, Hippocampus, BasalGanglia,
|
||||
Cerebellum, CentralNervousSystem, BasalGanglia,
|
||||
EmbodiedAgent,
|
||||
)
|
||||
from .autonomous import (
|
||||
CuriosityDrive, PersistentState, SelfModel, MetaLearner,
|
||||
AutonomousMind,
|
||||
from .runtime import (
|
||||
CuriosityDrive, RuntimeStateStore, PersistentState, SelfModel, MetaLearner,
|
||||
WorkspaceRuntime, AutonomousMind,
|
||||
)
|
||||
from .modules import (
|
||||
ExternalModule, SmallModelModule, KnowledgeBaseModule,
|
||||
@@ -94,11 +121,18 @@ __all__ = [
|
||||
# J-lens 可解释性
|
||||
"JLensConfig", "JLensProbe", "JLensSuite",
|
||||
"WorkspaceAblator", "DirectedModulation", "CounterfactualReflection",
|
||||
"ConsensusSlot", "ConsensusSnapshot",
|
||||
"WorkspaceEvent", "ActionEvent",
|
||||
"MemoryRecord", "MemoryStore", "InMemoryVectorMemoryStore",
|
||||
# 多模态
|
||||
"MultimodalConfig", "MultimodalJSpaceModel",
|
||||
"VisualEncoder", "VisualDecoder",
|
||||
"AudioEncoder", "AudioDecoder",
|
||||
"TextEncoder", "TextDecoder",
|
||||
# 动作策略
|
||||
"ACTION_LABELS", "compose_action_params", "ReflexRule",
|
||||
"ActionGate", "ActionValueModel", "MotorController",
|
||||
"ActionDecision", "ActionPolicy",
|
||||
# 实时 I/O
|
||||
"Frame", "CameraStream", "MicrophoneStream", "AudioPlayer",
|
||||
"MultimodalStream", "SensoryMotorLoop",
|
||||
@@ -114,11 +148,12 @@ __all__ = [
|
||||
"Cerebellum", "CentralNervousSystem", "Hippocampus", "BasalGanglia",
|
||||
"EmbodiedAgent",
|
||||
# 自主心智(最重要的能力)
|
||||
"CuriosityDrive", "PersistentState", "SelfModel", "MetaLearner",
|
||||
"AutonomousMind",
|
||||
"CuriosityDrive", "RuntimeStateStore", "PersistentState",
|
||||
"SelfModel", "MetaLearner", "WorkspaceRuntime", "AutonomousMind",
|
||||
# 外挂模块系统(可热插拔)
|
||||
"ExternalModule", "SmallModelModule", "KnowledgeBaseModule",
|
||||
"ToolModule", "ModuleDock",
|
||||
# 自主进化
|
||||
"EvolutionTrainer",
|
||||
"OnlineLanguageLearner",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user