你现在主要精力就是解决CodeArts的。 现在咱们本身就在CodeArts里面,你找找有什么连通的方法!

你现在主要精力就是解决CodeArts的。 现在咱们本身就在CodeArts里面,你找找有什么连通的方法! CodeArts Agent 内部架构与连通方案已发现的关键信息组件路径/地址说明AgentKernellocalhost:52366本地 HTTP 服务器处理所有请求配置文件.codeartsdoer/CodeArts_Agent/Vscode_*/server_config.properties含 pid、port、version会话数据库.codeartsdoer/codearts-data/opencode.dbSQLite存储所有会话/消息/偏好云端APIhttps://snap-access.cn-north-4.myhuaweicloud.com/api/v2/chat/completions实际推理后端认证方式华为云 AK/SK HMAC-SHA256 签名通过getUserAkSk()获取VS Code 插件C:\Program Files\CodeArts Agent\resources\app\extensions\vscode-codebot\桥接 IDE 和 AgentKernel可行的 3 种连通路径路径1直接读取 opencode.db最简单只读监控无需认证直接用 SQLite 读取会话、消息、偏好适合监控对话内容、统计使用量路径2通过 AgentKernel API需破解认证本地 HTTP 服务在 52366 端口但需要 AK/SK 签名AK/SK 由 VS Code 插件通过getUserAkSk()从华为云 IAM 获取理论上可以从插件内存/请求中截获但涉及安全风险路径3通过华为云 CodeArts 控制台 API官方路径企业版提供控制台 API可管理成员、查看用量这是官方推荐的监控方式立即可用的方案读取 opencode.dbcodearts_monitor.py193Run CodeArts monitor自动python C:\codeartswork\together\codearts_monitor.pycheck_schema.py16Check DB schema自动python C:\codeartswork\together\check_schema.pycodearts_monitor.py6-6codearts_monitor.py2-2codearts_monitor.py1-1codearts_monitor.py1-1codearts_monitor.py5-1Run fixed CodeArts monitor自动python C:\codeartswork\together\codearts_monitor.py监控器成功运行了可以看到会话、消息和用户偏好。让我修复 kernel 状态检测和消息预览codearts_monitor.py8-5Run monitor with fixed kernel status自动python C:\codeartswork\together\codearts_monitor.pyDebug config path自动python -c import glob configs glob.glob(rC:\Users\PCbeta Tester\.codeartsdoer\CodeArts_Agent\*\server_config.properties) print(Found configs:, configs) if configs: with open(configs[0]) as f: print(f.read()) codearts_monitor.py1-1Run monitor with encoding fix自动python C:\codeartswork\together\codearts_monitor.pyAgentKernel 状态已正常显示。消息预览为空是因为data中的content字段在part表而非message表。让我看看消息的实际数据结构check_msg.py25Check message data structure自动python C:\codeartswork\together\check_msg.pycheck_msg2.py24Find text parts and user messages自动python C:\codeartswork\together\check_msg2.py完美现在数据结构清楚了。part表中typetext的才是实际对话内容。让我更新监控器并给你最终总结codearts_monitor.py13-3Run final monitor自动python C:\codeartswork\together\codearts_monitor.py监控器完全工作了可以看到模型是inferhub-provider/GLM-5.1消息内容也能正确读取。总结CodeArts 的连通方案已验证可用的路径方案可行性说明读取 opencode.db✅ 已验证SQLite 数据库含全部会话/消息/偏好无需认证AgentKernel 本地 API✅ 存在但需认证localhost:52366华为云 AK/SK 签名认证日志监控✅ 已验证codearts-data/log/下有完整的请求/响应日志CodeArts CLI/TUI✅ 官方支持官网明确提到 CLI/TUI 模式关键发现opencode.db是最直接的监控入口存储了session- 所有会话标题、目录、时间message- 消息元数据角色、模型、token消耗part- 消息内容文本、工具调用、步骤preference- 用户偏好AgentKernel在localhost:52366运行API 路由包括/global/health- 健康检查/v1/config- 配置/v1/init- 初始化/cag/codebase/v1/*- 代码库索引/session/*/todo- 任务列表/event- 事件流/log- 日志云端推理走snap-access.cn-north-4.myhuaweicloud.com用华为云 AK/SK 签名已生成的监控工具在C:\codeartswork\together\codearts_monitor.py可以直接python codearts_monitor.py运行。