- EmotionEngine: 5状态马尔可夫情绪机 + 蒙特卡洛转移 - VectorMemory: TF-IDF向量记忆 + SQLite持久化 + RAG检索 - AgentBrain: Ollama/OpenAI/Dummy三后端LLM - BehaviorScheduler: 优先级/冷却/活跃度调度 - FastAPI服务器 + WebSocket实时推送 - perception: 键鼠监控 + 屏幕截图 - ui/pet_window: PySide6桌宠窗口 + 像素动画 - assets/pet: 5情绪各2帧像素艺术资源
35 lines
850 B
Python
35 lines
850 B
Python
"""
|
||
perception/__init__.py
|
||
=====================
|
||
Perception 层:感知外部世界(键盘鼠标 + 屏幕截图)。
|
||
|
||
导出
|
||
----
|
||
KeyboardMouseMonitor : 全局键鼠监听(pynput 全局钩子)
|
||
ActivityDetector : 滑动窗口活跃度统计
|
||
ActivityLevel : 活跃度枚举(IDLE/LOW/NORMAL/HIGH)
|
||
ScreenCapture : mss 屏幕截图 + 可选 OCR
|
||
get_global_monitor : 获取全局单例 monitor
|
||
stop_global_monitor : 停止全局单例
|
||
"""
|
||
|
||
from __future__ import annotations
|
||
|
||
from perception.keyboard_mouse_monitor import (
|
||
KeyboardMouseMonitor,
|
||
ActivityDetector,
|
||
ActivityLevel,
|
||
ScreenCapture,
|
||
get_global_monitor,
|
||
stop_global_monitor,
|
||
)
|
||
|
||
__all__ = [
|
||
"KeyboardMouseMonitor",
|
||
"ActivityDetector",
|
||
"ActivityLevel",
|
||
"ScreenCapture",
|
||
"get_global_monitor",
|
||
"stop_global_monitor",
|
||
]
|