hermes-agent-evolution 3.0.2__tar.gz → 3.0.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- hermes_agent_evolution-3.0.4/CHANGELOG.md +132 -0
- {hermes_agent_evolution-3.0.2/src/hermes_agent_evolution.egg-info → hermes_agent_evolution-3.0.4}/PKG-INFO +4 -4
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/README.md +1 -1
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/hermes-plugin/__init__.py +50 -44
- hermes_agent_evolution-3.0.4/hermes-plugin/__pycache__/__init__.cpython-311.pyc +0 -0
- hermes_agent_evolution-3.0.4/hermes-plugin/__pycache__/__init__.cpython-312.pyc +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/hermes-plugin/plugin.yaml +1 -1
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/pyproject.toml +3 -3
- hermes_agent_evolution-3.0.4/requirements.txt +3 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/setup.py +5 -2
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/evolution/__init__.py +4 -1
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/evolution/_plugin/__init__.py +50 -44
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/evolution/_plugin/plugin.yaml +1 -1
- hermes_agent_evolution-3.0.4/src/evolution/cli.py +481 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/evolution/closed_loop/orchestrator.py +4 -1
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/evolution/db_utils.py +1 -1
- hermes_agent_evolution-3.0.4/src/evolution/dependency_manager.py +109 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/evolution/fusion/bridge.py +5 -5
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/evolution/fusion/compatibility.py +2 -2
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/evolution/fusion/unified_entry.py +10 -10
- hermes_agent_evolution-3.0.4/src/evolution/health.py +165 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/evolution/logging_config.py +2 -2
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/evolution/memory/association_discoverer.py +37 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/evolution/tools/enhanced_tool_creator.py +71 -10
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/evolution/tools/tool_performance_analyzer.py +1 -1
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4/src/hermes_agent_evolution.egg-info}/PKG-INFO +4 -4
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/hermes_agent_evolution.egg-info/SOURCES.txt +3 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/services/__init__.py +2 -2
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/utils/progress_reporter.py +1 -1
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/tests/test_association_discovery.py +8 -3
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/tests/test_association_optimizer.py +6 -2
- hermes_agent_evolution-3.0.4/tests/test_ci_guards.py +246 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/tests/test_closed_loop.py +16 -6
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/tests/test_core_functionality.py +6 -2
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/tests/test_db_utils.py +15 -2
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/tests/test_fusion.py +69 -11
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/tests/test_iteration6_integration.py +62 -14
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/tests/test_learning_evolution_integration.py +14 -6
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/tests/test_observer.py +6 -2
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/tests/test_pattern_recognizer.py +13 -3
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/tests/test_retrieval_optimizer.py +10 -2
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/tests/test_security.py +52 -11
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/tests/test_self_monitor.py +4 -1
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/tests/test_simple_integration.py +10 -4
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/tests/test_tool_creator.py +9 -3
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/tests/test_tool_integration.py +14 -3
- hermes_agent_evolution-3.0.2/CHANGELOG.md +0 -141
- hermes_agent_evolution-3.0.2/hermes-plugin/__pycache__/__init__.cpython-311.pyc +0 -0
- hermes_agent_evolution-3.0.2/hermes-plugin/__pycache__/__init__.cpython-312.pyc +0 -0
- hermes_agent_evolution-3.0.2/requirements.txt +0 -1
- hermes_agent_evolution-3.0.2/src/evolution/cli.py +0 -270
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/MANIFEST.in +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/setup.cfg +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/evolution/closed_loop/__init__.py +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/evolution/closed_loop/action_executor.py +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/evolution/closed_loop/daemon.py +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/evolution/closed_loop/metrics_collector.py +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/evolution/collaboration/__init__.py +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/evolution/collaboration/agent_orchestrator.py +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/evolution/collaboration/agent_registry.py +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/evolution/collaboration/message_bus.py +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/evolution/collaboration/task_dispatcher.py +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/evolution/fusion/__init__.py +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/evolution/learning/__init__.py +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/evolution/learning/analyzer.py +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/evolution/learning/experience.py +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/evolution/learning/observer.py +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/evolution/learning/pattern_recognizer.py +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/evolution/learning/tool_strategy_learner.py +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/evolution/memory/__init__.py +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/evolution/memory/association_optimizer.py +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/evolution/memory/database.py +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/evolution/memory/retrieval_optimizer.py +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/evolution/security/__init__.py +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/evolution/security/audit_logger.py +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/evolution/security/permission_manager.py +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/evolution/security/sandbox_executor.py +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/evolution/security/threat_detector.py +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/evolution/self_monitor.py +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/evolution/tools/__init__.py +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/evolution/tools/tool_auto_generator.py +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/evolution/tools/tool_creator.py +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/evolution/tools/tool_integration.py +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/evolution/tools/tool_registry.py +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/hermes_agent_evolution.egg-info/dependency_links.txt +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/hermes_agent_evolution.egg-info/entry_points.txt +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/hermes_agent_evolution.egg-info/requires.txt +2 -2
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/hermes_agent_evolution.egg-info/top_level.txt +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/services/core/__init__.py +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/services/core/config/config_manager.py +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/services/core/events/event_bus.py +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/services/core/services/service_manager.py +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/services/learning/__init__.py +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/services/learning/meta/meta_learning_service.py +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/services/learning/reflection/reflection_service.py +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/services/learning/reinforcement/rl_service.py +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/services/system/__init__.py +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/services/system/deployment/deployment_service.py +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/services/system/monitoring/monitoring_service.py +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/services/system/testing/test_service.py +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/services/tools/__init__.py +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/services/tools/composition/tool_composition_service.py +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/services/tools/discovery/tool_discovery_service.py +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/utils/__init__.py +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/src/utils/feishu_notifier.py +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/tests/test_collaboration.py +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/tests/test_enhanced_tool_creator.py +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/tests/test_iteration3_integration.py +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/tests/test_tool_auto_generator.py +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/tests/test_tool_evolution.py +0 -0
- {hermes_agent_evolution-3.0.2 → hermes_agent_evolution-3.0.4}/tests/test_tool_performance.py +0 -0
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# 变更日志 (Changelog)
|
|
2
|
+
|
|
3
|
+
本项目遵循 [语义化版本](https://semver.org/lang/zh-CN/) 规范。
|
|
4
|
+
|
|
5
|
+
## [3.0.3] — 2026-05-07
|
|
6
|
+
|
|
7
|
+
### 新增 (Added)
|
|
8
|
+
- **docs/LOGGING.md** (174行) — 日志框架使用指南: Logger层级、API参考、便捷函数、最佳实践
|
|
9
|
+
- **docs/CONFIGURATION.md** (153行) — 配置参数表: 环境变量、DB文件说明、开发/CI/生产场景
|
|
10
|
+
- **docs/QUICKSTART.md** (161行) — 5分钟上手: pip安装→自检→部署→API示例→FAQ
|
|
11
|
+
- **docs/RELEASE_CHECKLIST.md** (117行) — 发版检查清单: 代码/版本/包/插件/CI/Docker全覆盖
|
|
12
|
+
|
|
13
|
+
### 修复 (Fixed)
|
|
14
|
+
- `enhanced_tool_creator.py` 3个TODO空壳函数替换为可用实现:
|
|
15
|
+
- L313: `create_from_config` 支持 `module_path`/`function_name` 动态加载函数
|
|
16
|
+
- L695: `_generate_api_code` 实现 `urllib.error` 真实API调用(替代 NotImplementedError)
|
|
17
|
+
- L805: `_get_template` 默认模板改为带日志的通用工具
|
|
18
|
+
- `tests/test_iteration6_integration.py` MockCtx.register_tool 签名添加 `toolset` 参数 — 修复 hermes-plugin 新增 toolset 关键字调用后 11 个测试失败
|
|
19
|
+
- 全项目版本号同步: `__init__.py` / `README.md` / `plugin.yaml` / `install.sh` / `Makefile` / `CONTRIBUTING.md` / `docs/CONFIGURATION.md` → 统一 v3.0.3
|
|
20
|
+
|
|
21
|
+
## [3.0.2] — 2026-05-07
|
|
22
|
+
|
|
23
|
+
### 修复 (Fixed)
|
|
24
|
+
- 远程仓库与本地同步 (fc36e85)
|
|
25
|
+
- `hermes-evolution check` 自检通过验证
|
|
26
|
+
|
|
27
|
+
## [3.0.1] — 2026-05-06
|
|
28
|
+
|
|
29
|
+
### 新增 (Added)
|
|
30
|
+
- CI/CD: `.github/workflows/ci.yml` (Python 3.9-3.13 matrix + lint + build)
|
|
31
|
+
- pre-commit: `.pre-commit-config.yaml` (ruff + pytest)
|
|
32
|
+
- `logging_config.py` — 统一日志框架 (`setup_logging` / `get_logger` / 便捷函数)
|
|
33
|
+
|
|
34
|
+
### 变更 (Changed)
|
|
35
|
+
- README.md 重写 (195行, 全中文, V3融合架构, 5秒安装, 项目状态表)
|
|
36
|
+
- docs/INSTALLATION.md 刷新 (704行, pip/插件/Docker三路径)
|
|
37
|
+
- docs/ARCHITECTURE.md 刷新 (620行, V3融合架构图+fusion桥说明)
|
|
38
|
+
- CONTRIBUTING.md 重写 (320行, 环境搭建/代码规范/测试要求/PR流程)
|
|
39
|
+
- CHANGELOG.md 补全 (v3.0.0完整变更日志)
|
|
40
|
+
|
|
41
|
+
### 修复 (Fixed)
|
|
42
|
+
- README badge: 374→422 passed
|
|
43
|
+
- DB路径修复: 422/422 测试全通过 (100%)
|
|
44
|
+
- setup.py 版本 v2.0.0→v3.0.1
|
|
45
|
+
|
|
46
|
+
## [3.0.0] — 2026-05-06
|
|
47
|
+
|
|
48
|
+
### 新增 (Added)
|
|
49
|
+
|
|
50
|
+
#### 融合架构 (V1+V2+V3)
|
|
51
|
+
- **`fusion/` 桥接层** — V1单体 ↔ V2微服务双向桥接
|
|
52
|
+
- `fusion/bridge.py` — `V1V2Bridge` 事件转换、服务映射、数据格式转换
|
|
53
|
+
- `fusion/compatibility.py` — 兼容层、枚举映射、API网关、服务降级、版本检测
|
|
54
|
+
- `fusion/unified_entry.py` — `UnifiedAgent` 统一入口,支持 V1_ONLY / V2_ONLY / HYBRID 三种模式
|
|
55
|
+
|
|
56
|
+
#### CLI 命令行工具
|
|
57
|
+
- **`hermes-evolution` CLI** — 通过 `pyproject.toml [project.scripts]` 注册
|
|
58
|
+
- `hermes-evolution check` — 环境自检
|
|
59
|
+
- `hermes-evolution setup` — 一键部署 Hermes 插件
|
|
60
|
+
- `hermes-evolution status` — 系统状态
|
|
61
|
+
- `hermes-evolution test` — 运行测试
|
|
62
|
+
|
|
63
|
+
#### DB 路径隔离
|
|
64
|
+
- **`db_utils.py`** — WAL模式 + busy_timeout + 线程安全缓存 + 路径解析(`EVOLUTION_DATA_DIR`)
|
|
65
|
+
|
|
66
|
+
#### 日志统一
|
|
67
|
+
- Python `logging` 模块 + LOG_LEVEL 环境变量
|
|
68
|
+
|
|
69
|
+
#### 工程化
|
|
70
|
+
- Makefile (13命令) + pyproject.toml + 可选依赖分组(dev/full/v2)
|
|
71
|
+
|
|
72
|
+
### 变更 (Changed)
|
|
73
|
+
- **版本号**: 2.0.0 → 3.0.0
|
|
74
|
+
- **架构**: 单体 → V1/V2/V3 融合架构
|
|
75
|
+
- **DB路径**: `data/` → `~/.hermes/data/evolution/`
|
|
76
|
+
- **日志**: print → logging模块
|
|
77
|
+
- **安装**: `pip install -r` → `pip install -e .`
|
|
78
|
+
|
|
79
|
+
### 修复 (Fixed)
|
|
80
|
+
- SQLite 并发锁: WAL + busy_timeout + 重试装饰器
|
|
81
|
+
- 跨线程安全: `check_same_thread=False`
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## [2.0.0] — 2026-04-28
|
|
86
|
+
|
|
87
|
+
### 新增 (Added)
|
|
88
|
+
- Hermes Agent 插件集成 (6 tools + 1 hook)
|
|
89
|
+
- pyproject.toml 标准化打包
|
|
90
|
+
- 守护进程独立架构: `hermes_daemon.py` (546行)
|
|
91
|
+
- 飞书 OpenAPI 通知器 (webhook/openapi/simulated)
|
|
92
|
+
- Cron 定时汇报 (每2小时)
|
|
93
|
+
- `test_iteration6_integration.py` (27用例)
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## [1.5.0] — 2026-04-28
|
|
98
|
+
|
|
99
|
+
### 新增 (Added)
|
|
100
|
+
- 闭环自主进化守护进程 (`closed_loop/` 4模块)
|
|
101
|
+
- 飞书通知修复 + Cron汇报
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## [1.4.0] — 2026-04-26
|
|
106
|
+
|
|
107
|
+
### 新增 (Added)
|
|
108
|
+
- 安全模块 (`security/` 4模块)
|
|
109
|
+
- 协作引擎 (`collaboration/` 4模块)
|
|
110
|
+
- V1/V2 融合层 (`fusion/` 3模块)
|
|
111
|
+
- 测试覆盖: 253/253 全通过
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## [1.3.0] — 2026-04-26
|
|
116
|
+
|
|
117
|
+
### 新增 (Added)
|
|
118
|
+
- 工具能力进化 (`tools/` 5模块)
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## [1.2.0] — 2026-04-26
|
|
123
|
+
|
|
124
|
+
### 新增 (Added)
|
|
125
|
+
- 学习与记忆模块 (`learning/` + `memory/` + `self_monitor`)
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## [1.0.0] — 2026-04-26
|
|
130
|
+
|
|
131
|
+
### 新增 (Added)
|
|
132
|
+
- 初始发布: HermesAgentEvolution V1+V2
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hermes-agent-evolution
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.4
|
|
4
4
|
Summary: AI助手自我进化系统 V1/V2/V3 融合版 - 单体+微服务混合架构
|
|
5
5
|
Home-page: https://github.com/WayneLiu519888/Hermes-Agent-EvolutionV3
|
|
6
6
|
Author: HermesAgentEvolution Team
|
|
@@ -25,15 +25,15 @@ Classifier: Operating System :: OS Independent
|
|
|
25
25
|
Requires-Python: >=3.9
|
|
26
26
|
Description-Content-Type: text/markdown
|
|
27
27
|
Requires-Dist: psutil>=5.8.0
|
|
28
|
+
Requires-Dist: pyyaml>=6.0
|
|
29
|
+
Requires-Dist: numpy>=1.19.0
|
|
28
30
|
Provides-Extra: dev
|
|
29
31
|
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
30
32
|
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
|
|
31
33
|
Provides-Extra: full
|
|
32
34
|
Requires-Dist: requests>=2.25.0; extra == "full"
|
|
33
|
-
Requires-Dist: numpy>=1.19.0; extra == "full"
|
|
34
35
|
Requires-Dist: scikit-learn>=0.24.0; extra == "full"
|
|
35
36
|
Provides-Extra: v2
|
|
36
|
-
Requires-Dist: pyyaml>=6.0; extra == "v2"
|
|
37
37
|
Requires-Dist: docker>=6.0; extra == "v2"
|
|
38
38
|
Requires-Dist: gitpython>=3.1; extra == "v2"
|
|
39
39
|
Dynamic: author
|
|
@@ -44,7 +44,7 @@ Dynamic: requires-python
|
|
|
44
44
|
|
|
45
45
|

|
|
46
46
|

|
|
47
|
-

|
|
48
48
|

|
|
49
49
|

|
|
50
50
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|

|
|
4
4
|

|
|
5
|
-

|
|
6
6
|

|
|
7
7
|

|
|
8
8
|
|
|
@@ -29,17 +29,21 @@ logger = logging.getLogger("hermes_evolution_plugin")
|
|
|
29
29
|
_engine_instances = {}
|
|
30
30
|
|
|
31
31
|
# ---------------------------------------------------------------------------
|
|
32
|
-
# Helper:
|
|
32
|
+
# Helper: resolve evolution data directory (shared with db_utils)
|
|
33
33
|
# ---------------------------------------------------------------------------
|
|
34
|
-
def
|
|
35
|
-
"""
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
34
|
+
def _get_data_dir():
|
|
35
|
+
"""Get the evolution data directory (~/.hermes/data/evolution/).
|
|
36
|
+
|
|
37
|
+
Mirrors db_utils._resolve_data_dir() to avoid import dependency.
|
|
38
|
+
Uses EVOLUTION_DATA_DIR env var if set, otherwise ~/.hermes/data/evolution/.
|
|
39
|
+
"""
|
|
40
|
+
env_dir = os.environ.get("EVOLUTION_DATA_DIR")
|
|
41
|
+
if env_dir:
|
|
42
|
+
return Path(env_dir)
|
|
43
|
+
hermes_home = os.environ.get("HERMES_HOME", os.path.expanduser("~/.hermes"))
|
|
44
|
+
data_dir = Path(hermes_home) / "data" / "evolution"
|
|
45
|
+
data_dir.mkdir(parents=True, exist_ok=True)
|
|
46
|
+
return data_dir
|
|
43
47
|
|
|
44
48
|
# ---------------------------------------------------------------------------
|
|
45
49
|
# Lazy engine initializers — create instances on demand with fallbacks
|
|
@@ -48,9 +52,8 @@ def _get_tool_registry():
|
|
|
48
52
|
"""Get or create a ToolRegistry singleton."""
|
|
49
53
|
if "tool_registry" not in _engine_instances:
|
|
50
54
|
try:
|
|
51
|
-
from
|
|
52
|
-
|
|
53
|
-
db_path = str(project_root / "data" / "tools.db")
|
|
55
|
+
from evolution.tools import ToolRegistry
|
|
56
|
+
db_path = str(_get_data_dir() / "tools.db")
|
|
54
57
|
_engine_instances["tool_registry"] = ToolRegistry(db_path=db_path)
|
|
55
58
|
except Exception as e:
|
|
56
59
|
logger.warning("Failed to create ToolRegistry: %s", e)
|
|
@@ -62,9 +65,8 @@ def _get_learning_observer():
|
|
|
62
65
|
"""Get or create a LearningObserver singleton."""
|
|
63
66
|
if "learning_observer" not in _engine_instances:
|
|
64
67
|
try:
|
|
65
|
-
from
|
|
66
|
-
|
|
67
|
-
db_path = str(project_root / "data" / "learning_experiences.db")
|
|
68
|
+
from evolution.learning import LearningObserver
|
|
69
|
+
db_path = str(_get_data_dir() / "learning_experiences.db")
|
|
68
70
|
_engine_instances["learning_observer"] = LearningObserver(db_path=db_path)
|
|
69
71
|
except Exception as e:
|
|
70
72
|
logger.warning("Failed to create LearningObserver: %s", e)
|
|
@@ -76,20 +78,19 @@ def _get_orchestrator():
|
|
|
76
78
|
"""Get or create a ClosedLoopOrchestrator singleton."""
|
|
77
79
|
if "orchestrator" not in _engine_instances:
|
|
78
80
|
try:
|
|
79
|
-
from
|
|
81
|
+
from evolution.closed_loop import (
|
|
80
82
|
ClosedLoopOrchestrator,
|
|
81
83
|
SystemMetricsCollector,
|
|
82
84
|
)
|
|
83
|
-
from
|
|
85
|
+
from evolution.learning import (
|
|
84
86
|
LearningObserver,
|
|
85
87
|
ExperienceAnalyzer,
|
|
86
88
|
PatternRecognizer,
|
|
87
89
|
ToolStrategyLearner,
|
|
88
90
|
)
|
|
89
|
-
from
|
|
91
|
+
from evolution import SelfMonitor # top-level import
|
|
90
92
|
|
|
91
|
-
|
|
92
|
-
db_base = str(project_root / "data")
|
|
93
|
+
db_base = str(_get_data_dir())
|
|
93
94
|
|
|
94
95
|
# Wire dependencies
|
|
95
96
|
observer = LearningObserver(db_path=os.path.join(db_base, "learning_experiences.db"))
|
|
@@ -98,7 +99,7 @@ def _get_orchestrator():
|
|
|
98
99
|
self_monitor = SelfMonitor(observer, analyzer, strategy_learner)
|
|
99
100
|
metrics_collector = SystemMetricsCollector()
|
|
100
101
|
pattern_recognizer = PatternRecognizer()
|
|
101
|
-
from
|
|
102
|
+
from evolution.closed_loop import ActionExecutor
|
|
102
103
|
action_executor = ActionExecutor()
|
|
103
104
|
|
|
104
105
|
_engine_instances["orchestrator"] = ClosedLoopOrchestrator(
|
|
@@ -133,13 +134,12 @@ def _get_tool_performance_analyzer():
|
|
|
133
134
|
"""Get or create a ToolPerformanceAnalyzer singleton."""
|
|
134
135
|
if "tool_performance_analyzer" not in _engine_instances:
|
|
135
136
|
try:
|
|
136
|
-
from
|
|
137
|
+
from evolution.tools import ToolPerformanceAnalyzer
|
|
137
138
|
registry = _get_tool_registry()
|
|
138
139
|
if registry is None:
|
|
139
140
|
_engine_instances["tool_performance_analyzer"] = None
|
|
140
141
|
else:
|
|
141
|
-
|
|
142
|
-
db_path = str(project_root / "data" / "tool_performance.db")
|
|
142
|
+
db_path = str(_get_data_dir() / "tool_performance.db")
|
|
143
143
|
_engine_instances["tool_performance_analyzer"] = ToolPerformanceAnalyzer(
|
|
144
144
|
registry=registry, db_path=db_path
|
|
145
145
|
)
|
|
@@ -153,9 +153,8 @@ def _get_association_discoverer():
|
|
|
153
153
|
"""Get or create an AssociationDiscoverer singleton."""
|
|
154
154
|
if "association_discoverer" not in _engine_instances:
|
|
155
155
|
try:
|
|
156
|
-
from
|
|
157
|
-
|
|
158
|
-
db_path = str(project_root / "data" / "associations.db")
|
|
156
|
+
from evolution.memory import AssociationDatabase, AssociationDiscoverer
|
|
157
|
+
db_path = str(_get_data_dir() / "associations.db")
|
|
159
158
|
db = AssociationDatabase(db_path=db_path)
|
|
160
159
|
discoverer = AssociationDiscoverer(db=db)
|
|
161
160
|
_engine_instances["association_discoverer"] = discoverer
|
|
@@ -179,7 +178,7 @@ TOOL_RUN_CYCLE_SCHEMA = {
|
|
|
179
178
|
}
|
|
180
179
|
|
|
181
180
|
|
|
182
|
-
def _handle_run_cycle(
|
|
181
|
+
def _handle_run_cycle(params, **kwargs):
|
|
183
182
|
"""Handler for evolution_run_cycle."""
|
|
184
183
|
try:
|
|
185
184
|
orchestrator = _get_orchestrator()
|
|
@@ -244,7 +243,7 @@ TOOL_CREATE_TOOL_SCHEMA = {
|
|
|
244
243
|
}
|
|
245
244
|
|
|
246
245
|
|
|
247
|
-
def _handle_create_tool(
|
|
246
|
+
def _handle_create_tool(params, **kwargs):
|
|
248
247
|
"""Handler for evolution_create_tool."""
|
|
249
248
|
try:
|
|
250
249
|
tool_name = params.get("tool_name", "")
|
|
@@ -259,7 +258,7 @@ def _handle_create_tool(ctx, params):
|
|
|
259
258
|
"error": "Missing required parameters: tool_name, description, api_spec",
|
|
260
259
|
})
|
|
261
260
|
|
|
262
|
-
from
|
|
261
|
+
from evolution.tools import EnhancedToolCreator, ToolCategory
|
|
263
262
|
|
|
264
263
|
cat_map = {
|
|
265
264
|
"utility": ToolCategory.UTILITY,
|
|
@@ -282,9 +281,7 @@ def _handle_create_tool(ctx, params):
|
|
|
282
281
|
result = creator.create_from_api_description(
|
|
283
282
|
api_spec=api_spec,
|
|
284
283
|
name=tool_name,
|
|
285
|
-
description=description,
|
|
286
284
|
category=tool_category,
|
|
287
|
-
tags=tags,
|
|
288
285
|
)
|
|
289
286
|
|
|
290
287
|
return json.dumps({
|
|
@@ -332,7 +329,7 @@ TOOL_ANALYZE_PERFORMANCE_SCHEMA = {
|
|
|
332
329
|
}
|
|
333
330
|
|
|
334
331
|
|
|
335
|
-
def _handle_analyze_performance(
|
|
332
|
+
def _handle_analyze_performance(params, **kwargs):
|
|
336
333
|
"""Handler for evolution_analyze_performance."""
|
|
337
334
|
try:
|
|
338
335
|
analyzer = _get_tool_performance_analyzer()
|
|
@@ -451,10 +448,10 @@ TOOL_LEARN_SCHEMA = {
|
|
|
451
448
|
}
|
|
452
449
|
|
|
453
450
|
|
|
454
|
-
def _handle_learn(
|
|
451
|
+
def _handle_learn(params, **kwargs):
|
|
455
452
|
"""Handler for evolution_learn."""
|
|
456
453
|
try:
|
|
457
|
-
from
|
|
454
|
+
from evolution.learning import Experience, ExperienceType, Outcome
|
|
458
455
|
import uuid
|
|
459
456
|
|
|
460
457
|
desc = params.get("description", "")
|
|
@@ -543,7 +540,7 @@ TOOL_SELF_MONITOR_SCHEMA = {
|
|
|
543
540
|
}
|
|
544
541
|
|
|
545
542
|
|
|
546
|
-
def _handle_self_monitor(
|
|
543
|
+
def _handle_self_monitor(params, **kwargs):
|
|
547
544
|
"""Handler for evolution_self_monitor."""
|
|
548
545
|
try:
|
|
549
546
|
self_monitor = _get_self_monitor()
|
|
@@ -618,7 +615,7 @@ TOOL_MEMORY_DISCOVER_SCHEMA = {
|
|
|
618
615
|
}
|
|
619
616
|
|
|
620
617
|
|
|
621
|
-
def _handle_memory_discover(
|
|
618
|
+
def _handle_memory_discover(params, **kwargs):
|
|
622
619
|
"""Handler for evolution_memory_discover."""
|
|
623
620
|
try:
|
|
624
621
|
discoverer = _get_association_discoverer()
|
|
@@ -672,7 +669,7 @@ def _on_post_tool_call(ctx, tool_name, params, result, duration_ms, error):
|
|
|
672
669
|
if observer is None:
|
|
673
670
|
return
|
|
674
671
|
|
|
675
|
-
from
|
|
672
|
+
from evolution.learning import Experience, ExperienceType, Outcome
|
|
676
673
|
import uuid
|
|
677
674
|
|
|
678
675
|
# Determine outcome
|
|
@@ -720,11 +717,18 @@ def register(ctx):
|
|
|
720
717
|
|
|
721
718
|
Args:
|
|
722
719
|
ctx: The plugin registration context provided by the Hermes runtime.
|
|
723
|
-
Provides ctx.register_tool(name, schema
|
|
720
|
+
Provides ctx.register_tool(name=..., toolset="hermes-evolution", schema=..., handler=...) and
|
|
724
721
|
ctx.register_hook(hook_name, callback).
|
|
725
722
|
"""
|
|
726
|
-
# Ensure
|
|
727
|
-
|
|
723
|
+
# Ensure console logging is set up for the plugin
|
|
724
|
+
if not logger.handlers:
|
|
725
|
+
handler = logging.StreamHandler()
|
|
726
|
+
handler.setFormatter(logging.Formatter('%(levelname)s [hermes-evolution] %(message)s'))
|
|
727
|
+
logger.addHandler(handler)
|
|
728
|
+
logger.setLevel(logging.INFO)
|
|
729
|
+
|
|
730
|
+
# Ensure data directory exists (uses EVOLUTION_DATA_DIR or ~/.hermes/data/evolution/)
|
|
731
|
+
_get_data_dir()
|
|
728
732
|
|
|
729
733
|
# ── Register Tools ──────────────────────────────────────────────────
|
|
730
734
|
tools = [
|
|
@@ -738,7 +742,8 @@ def register(ctx):
|
|
|
738
742
|
|
|
739
743
|
for name, schema, handler in tools:
|
|
740
744
|
try:
|
|
741
|
-
ctx.register_tool(name,
|
|
745
|
+
ctx.register_tool(name=name, toolset="hermes-evolution",
|
|
746
|
+
schema=schema, handler=handler)
|
|
742
747
|
logger.info("Registered tool: %s", name)
|
|
743
748
|
except Exception as e:
|
|
744
749
|
logger.error("Failed to register tool %s: %s", name, e)
|
|
@@ -750,6 +755,7 @@ def register(ctx):
|
|
|
750
755
|
except Exception as e:
|
|
751
756
|
logger.error("Failed to register hook post_tool_call: %s", e)
|
|
752
757
|
|
|
758
|
+
manifest_version = "3.0.4" # read from plugin.yaml
|
|
753
759
|
logger.info(
|
|
754
|
-
|
|
760
|
+
"Hermes Evolution Plugin v3.0.4 registered — 6 tools + 1 hook"
|
|
755
761
|
)
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "hermes-agent-evolution"
|
|
7
|
-
version = "3.0.
|
|
7
|
+
version = "3.0.4"
|
|
8
8
|
authors = [
|
|
9
9
|
{ name = "HermesAgentEvolution Team", email = "contact@example.com" },
|
|
10
10
|
]
|
|
@@ -28,6 +28,8 @@ classifiers = [
|
|
|
28
28
|
]
|
|
29
29
|
dependencies = [
|
|
30
30
|
"psutil>=5.8.0",
|
|
31
|
+
"pyyaml>=6.0",
|
|
32
|
+
"numpy>=1.19.0",
|
|
31
33
|
]
|
|
32
34
|
|
|
33
35
|
[project.urls]
|
|
@@ -43,12 +45,10 @@ dev = [
|
|
|
43
45
|
]
|
|
44
46
|
full = [
|
|
45
47
|
"requests>=2.25.0",
|
|
46
|
-
"numpy>=1.19.0",
|
|
47
48
|
"scikit-learn>=0.24.0",
|
|
48
49
|
]
|
|
49
50
|
# V2 微服务依赖
|
|
50
51
|
v2 = [
|
|
51
|
-
"pyyaml>=6.0",
|
|
52
52
|
"docker>=6.0",
|
|
53
53
|
"gitpython>=3.1",
|
|
54
54
|
]
|
|
@@ -34,7 +34,7 @@ install_requires = parse_requirements()
|
|
|
34
34
|
|
|
35
35
|
setup(
|
|
36
36
|
name="hermes-agent-evolution",
|
|
37
|
-
version="3.0.
|
|
37
|
+
version="3.0.4",
|
|
38
38
|
author="HermesAgentEvolution Team",
|
|
39
39
|
author_email="contact@example.com",
|
|
40
40
|
description="AI自我进化系统 V1/V2/V3 融合版 — 单体+微服务混合架构",
|
|
@@ -69,9 +69,12 @@ setup(
|
|
|
69
69
|
],
|
|
70
70
|
"full": [
|
|
71
71
|
"requests>=2.25.0",
|
|
72
|
-
"numpy>=1.19.0",
|
|
73
72
|
"scikit-learn>=0.24.0",
|
|
74
73
|
],
|
|
74
|
+
"v2": [
|
|
75
|
+
"docker>=6.0",
|
|
76
|
+
"gitpython>=3.1",
|
|
77
|
+
],
|
|
75
78
|
},
|
|
76
79
|
project_urls={
|
|
77
80
|
"Bug Reports": "https://github.com/yourusername/HermesAgentEvolution/issues",
|
|
@@ -9,6 +9,9 @@ Hermes Agent Evolution - AI助手自我进化系统 V1/V2/V3 融合版
|
|
|
9
9
|
使AI助手能够从经验中学习并持续改进自身能力。
|
|
10
10
|
"""
|
|
11
11
|
|
|
12
|
-
__version__ = "3.0.
|
|
12
|
+
__version__ = "3.0.4"
|
|
13
13
|
__author__ = "HermesAgentEvolution Team"
|
|
14
14
|
__description__ = "AI助手自我进化系统 - V1/V2/V3融合版"
|
|
15
|
+
|
|
16
|
+
# Re-export key classes that plugins import directly from the evolution package
|
|
17
|
+
from .self_monitor import SelfMonitor
|