|
|
@@ -29,22 +29,21 @@ sys.path.insert(0, str(Path(__file__).parent.parent.parent))
|
|
|
from dotenv import load_dotenv
|
|
|
load_dotenv()
|
|
|
|
|
|
-from agent.llm.prompts import SimplePrompt
|
|
|
-from agent.core.runner import AgentRunner, RunConfig
|
|
|
-from agent.trace import (
|
|
|
+from cyber_agent.llm.prompts import SimplePrompt
|
|
|
+from cyber_agent.core.runner import AgentRunner, RunConfig
|
|
|
+from cyber_agent.trace import (
|
|
|
FileSystemTraceStore,
|
|
|
Trace,
|
|
|
Message,
|
|
|
)
|
|
|
-from agent.llm import create_qwen_llm_call
|
|
|
-from agent.cli import InteractiveController
|
|
|
-from agent.utils import setup_logging
|
|
|
-from agent.tools.builtin.browser.baseClass import init_browser_session, kill_browser_session
|
|
|
+from cyber_agent.llm import create_qwen_llm_call
|
|
|
+from cyber_agent.cli import InteractiveController
|
|
|
+from cyber_agent.utils import setup_logging
|
|
|
+from cyber_agent.tools.builtin.browser.baseClass import init_browser_session, kill_browser_session
|
|
|
|
|
|
# 导入自定义工具(触发 @tool 注册)
|
|
|
-from agent.tools.builtin.toolhub import toolhub_health, toolhub_search, toolhub_call, image_uploader, image_downloader # noqa: F401
|
|
|
-from agent.tools.builtin.knowledge import requirement_search, requirement_list # noqa: F401
|
|
|
-from agent.tools.builtin.librarian import upload_knowledge # noqa: F401
|
|
|
+from cyber_agent.tools.builtin.toolhub import toolhub_health, toolhub_search, toolhub_call, image_uploader, image_downloader # noqa: F401
|
|
|
+from cyber_agent.tools.builtin.knowledge import requirement_search, requirement_list # noqa: F401
|
|
|
from evaluate_tool import evaluate_image # noqa: F401
|
|
|
from examples.production_restore.tools.category_query import search_category_tree, extract_requirements_from_table # noqa: F401
|
|
|
|
|
|
@@ -75,7 +74,7 @@ async def main():
|
|
|
print("2. 加载 presets...")
|
|
|
presets_path = base_dir / "presets.json"
|
|
|
if presets_path.exists():
|
|
|
- from agent.core.presets import load_presets_from_json
|
|
|
+ from cyber_agent.core.presets import load_presets_from_json
|
|
|
load_presets_from_json(str(presets_path))
|
|
|
print(f" - 已加载项目 presets")
|
|
|
else:
|