feat(agent): reorganize imports and improve code structure

- Standardize import organization with clear sections (standard library, third-party, local)
- Move sys.path modification to top of imports for better clarity
- Fix circular import issues by reordering imports
- Remove duplicate imports and ensure proper import grouping
- Maintain all existing functionality while improving code readability
This commit is contained in:
YueGuobin committed 2026-03-05 18:06:36 +08:00
1 parent 08b5b44a50
commit 16559d2ce2
7 files changed
+27 -31

No files matched your search

@@ -66,6 +66,7 @@ Author: Guobin Yue
import ast
import json
import logging
from datetime import datetime
from typing import Any
logger = logging.getLogger(__name__)
@@ -309,8 +310,6 @@ def normalize_tool_response(
>>> normalize_tool_response([{"device_name": "R1", "status": "success"}])
{'success': True, 'total': 1, 'successful': 1, 'failed': 0, 'data': [...], 'metadata': {}}
"""
from datetime import datetime
metadata = {
"tool_name": tool_name,
"normalized_at": datetime.utcnow().isoformat()