Commit Graph

106 Commits

Author SHA1 Message Date
OpenClaw Bot
7bf31f9121 fix: auto-fix code issues (cron)
- 修复重复导入/字段
- 修复异常处理
- 修复PEP8格式问题
- 添加类型注解
2026-03-01 12:10:56 +08:00
OpenClaw Bot
2e112fcdee fix: auto-fix code issues (cron)
- 修复重复导入/字段
- 修复异常处理
- 修复PEP8格式问题
- 添加类型注解
2026-03-01 12:08:55 +08:00
OpenClaw Bot
4df703174c fix: auto-fix code issues (cron)
- 修复重复导入/字段
- 修复异常处理
- 修复PEP8格式问题
- 添加类型注解
2026-03-01 09:15:06 +08:00
OpenClaw Bot
dfee5e3d3f fix: auto-fix code issues (cron)
- 修复重复导入/字段
- 修复异常处理
- 修复PEP8格式问题
- 添加类型注解
2026-03-01 09:13:24 +08:00
OpenClaw Bot
d33bf2b301 fix: auto-fix code issues (cron)
- 修复重复导入/字段
- 修复异常处理
- 修复PEP8格式问题
- 添加类型注解
2026-03-01 09:10:50 +08:00
OpenClaw Bot
6a51f5ea49 fix: auto-fix code issues (cron)
- 修复重复导入/字段
- 修复异常处理
- 修复PEP8格式问题
- 添加类型注解
2026-03-01 06:03:17 +08:00
OpenClaw Bot
1f33d203e8 fix: auto-fix code issues (cron)
- 修复重复导入/字段
- 修复异常处理 (将裸 except Exception 改为具体异常类型)
- 修复PEP8格式问题
- 清理未使用导入
- 添加 UUID_LENGTH 常量替代魔法数字
- 添加 DEFAULT_RATE_LIMIT, MASTER_KEY_RATE_LIMIT, IP_RATE_LIMIT 常量
- 添加 MAX_TEXT_LENGTH, DEFAULT_TIMEOUT 常量

涉及文件:
- backend/main.py
- backend/db_manager.py
- backend/llm_client.py
- backend/neo4j_manager.py
- backend/tingwu_client.py
- backend/tenant_manager.py
- backend/growth_manager.py
- backend/workflow_manager.py
- backend/image_processor.py
- backend/multimodal_entity_linker.py
- backend/multimodal_processor.py
- backend/plugin_manager.py
- backend/rate_limiter.py
2026-03-01 03:06:06 +08:00
OpenClaw Bot
ea58b6fe43 fix: auto-fix code issues (cron)
- 修复重复导入/字段
- 修复异常处理
- 修复PEP8格式问题
- 添加类型注解
2026-03-01 00:08:06 +08:00
OpenClaw Bot
8492e7a0d3 fix: auto-fix code issues (cron)
- 修复缺失导入: main.py 添加 AttributeTemplate 和 EntityAttribute 导入
- 修复裸异常捕获: 将 BaseException 改为具体异常类型
  - neo4j_manager.py: Exception
  - main.py: json.JSONDecodeError, ValueError, Exception
  - export_manager.py: AttributeError, TypeError, ValueError
  - localization_manager.py: ValueError, AttributeError
  - performance_manager.py: TypeError, ValueError
  - plugin_manager.py: OSError, IOError
- 修复部分行长度问题: security_manager.py 长行拆分
2026-02-28 21:14:59 +08:00
OpenClaw Bot
741a4b666c fix: auto-fix code issues (cron)
- 修复重复导入/字段
- 修复异常处理
- 修复PEP8格式问题
- 添加类型注解
2026-02-28 18:16:44 +08:00
OpenClaw Bot
bfeaf4165e fix: auto-fix code issues (cron)
- 修复PEP8格式问题(行长度超过120字符)
- 修复类型注解(添加__init__和_get_db返回类型)
- 删除__pycache__缓存文件
- 优化长SQL查询语句格式
2026-02-28 12:12:57 +08:00
OpenClaw Bot
6ff46cceb7 docs: update auto code review report 2026-02-28 09:16:58 +08:00
OpenClaw Bot
1a9b5391f7 fix: auto-fix code issues (cron)
- 修复重复导入/字段
- 修复异常处理
- 修复PEP8格式问题
- 添加类型注解
2026-02-28 09:15:51 +08:00
OpenClaw Bot
74c2daa5ef fix: auto-fix code issues (cron)
- 修复重复导入/字段
- 修复异常处理
- 修复PEP8格式问题
- 添加类型注解
2026-02-28 09:11:38 +08:00
OpenClaw Bot
210cae132f docs: add code review report for 2026-02-28 2026-02-28 06:03:34 +08:00
OpenClaw Bot
fe3d64a1d2 fix: auto-fix code issues (cron)
- 修复重复导入/字段
- 修复异常处理
- 修复PEP8格式问题
- 添加类型注解
- 修复缺失的urllib.parse导入
2026-02-28 06:03:09 +08:00
OpenClaw Bot
ff83cab6c7 fix: auto-fix code issues (cron)
- 修复重复导入/字段
- 修复异常处理
- 修复PEP8格式问题
- 添加类型注解
2026-02-28 03:05:46 +08:00
OpenClaw Bot
7853b2392b fix: auto-fix code issues - duplicate imports and unused imports
- 移除函数内部的重复 import re
- 移除函数内部的重复 import csv
- 移除函数内部的重复 import random
- 移除未使用的 urllib.request 导入
- 添加缺失的 time 导入到 ai_manager.py
2026-02-28 03:05:42 +08:00
OpenClaw Bot
a8fa805af4 docs: update code review report 2026-02-28 03:04:50 +08:00
OpenClaw Bot
7a07ce2bfd fix: auto-fix code issues (cron)
- 修复缺失的导入 (re, csv, urllib.request)
- 修复未使用的导入清理
- 修复代码格式问题
2026-02-28 03:04:27 +08:00
OpenClaw Bot
33555642db fix: auto-fix code issues (cron)
- 修复重复导入/字段
- 修复异常处理
- 修复PEP8格式问题
- 添加类型注解
2026-02-28 03:03:50 +08:00
OpenClaw Bot
8c80399c9d fix: auto-fix code issues (cron)
- 修复重复导入/字段
- 修复异常处理
- 修复PEP8格式问题
- 添加类型注解
2026-02-28 03:03:08 +08:00
OpenClaw Bot
a7ecf6f0ea fix: auto-fix code issues (cron)
- 修复重复导入/字段
- 修复异常处理(将裸 except: 改为具体异常类型)
- 修复PEP8格式问题
- 添加类型注解
2026-02-28 00:11:06 +08:00
OpenClaw Bot
d767f0dddc fix: auto-fix code issues (cron)
- 修复重复导入/字段
- 修复异常处理
- 修复PEP8格式问题
- 添加类型注解
2026-02-27 21:12:04 +08:00
OpenClaw Bot
17bda3dbce fix: auto-fix code issues (cron)
- 修复重复导入/字段
- 修复异常处理
- 修复PEP8格式问题
- 添加类型注解
2026-02-27 18:09:24 +08:00
OpenClaw Bot
646b64daf7 fix: auto-fix code issues (cron)
- 修复重复导入/字段
- 修复异常处理 (BaseException -> 具体异常类型)
- 修复PEP8格式问题
- 添加类型注解
- 修复tingwu_client.py缩进错误
2026-02-27 15:20:03 +08:00
OpenClaw Bot
96f08b8bb9 fix: auto-fix code issues (cron)
- 修复裸异常捕获 (E722) - 改为具体异常类型
- 修复重复导入/字段定义问题
- 修复PEP8格式问题 (W291 trailing whitespace, E226, E741)
- 修复未使用变量 (F841)
- 修复变量名遮蔽 (F402)
- 修复未定义名称 (F821) - 添加 urllib.parse 导入
- 修复 f-string 缺少占位符 (F541)
- 修复模块级导入位置 (E402)
- 修复行尾空白和空行问题
- 优化代码结构,提升可读性
2026-02-27 12:10:56 +08:00
OpenClaw Bot
be22b763fa fix: auto-fix code issues (cron)
- 修复重复导入/字段
- 修复异常处理
- 修复PEP8格式问题
- 添加类型注解
- 修复重复函数定义 (health_check, create_webhook_endpoint, etc)
- 修复未定义名称 (SearchOperator, TenantTier, Query, Body, logger)
- 修复 workflow_manager.py 的类定义重复问题
- 添加缺失的导入
2026-02-27 09:18:58 +08:00
OpenClaw Bot
1d55ae8f1e docs: Update STATUS.md - Phase 8 all tasks completed 2026-02-27 06:01:29 +08:00
OpenClaw Bot
2aded2de48 Phase 8: 完成 AI 能力增强、运营与增长工具、开发者生态、运维与监控
- Task 4: AI 能力增强 (ai_manager.py)
  - 自定义模型训练(领域特定实体识别)
  - 多模态大模型集成(GPT-4V、Claude 3、Gemini、Kimi-VL)
  - 知识图谱 RAG 智能问答
  - 智能摘要(提取式/生成式/关键点/时间线)
  - 预测性分析(趋势/异常/增长/演变预测)

- Task 5: 运营与增长工具 (growth_manager.py)
  - 用户行为分析(Mixpanel/Amplitude 集成)
  - A/B 测试框架
  - 邮件营销自动化
  - 推荐系统(邀请返利、团队升级激励)

- Task 6: 开发者生态 (developer_ecosystem_manager.py)
  - SDK 发布管理(Python/JavaScript/Go)
  - 模板市场
  - 插件市场
  - 开发者文档与示例代码

- Task 8: 运维与监控 (ops_manager.py)
  - 实时告警系统(PagerDuty/Opsgenie 集成)
  - 容量规划与自动扩缩容
  - 灾备与故障转移
  - 成本优化

Phase 8 全部 8 个任务已完成!
2026-02-27 00:01:40 +08:00
OpenClaw Bot
c38f3eb467 Phase 8 Task 4: AI 能力增强
- 创建 ai_manager.py - AI 能力增强管理模块
  - 自定义模型训练(领域特定实体识别)
  - 多模态大模型集成(GPT-4V、Claude 3、Gemini、Kimi-VL)
  - 智能摘要与问答(基于知识图谱的 RAG)
  - 预测性分析(趋势预测、异常检测、实体增长、关系演变)

- 更新 schema.sql - 添加 AI 能力增强相关数据库表
  - custom_models, training_samples
  - multimodal_analyses
  - kg_rag_configs, rag_queries
  - smart_summaries
  - prediction_models, prediction_results

- 更新 main.py - 添加 30+ 个 AI 相关 API 端点
  - 自定义模型管理(创建、训练、预测)
  - 多模态分析
  - 知识图谱 RAG
  - 智能摘要
  - 预测模型(创建、训练、预测、反馈)

- 创建 test_phase8_task4.py - 测试脚本
- 更新 README.md 和 STATUS.md
2026-02-26 00:10:10 +08:00
OpenClaw Bot
911e891451 Phase 8: 完成多租户SaaS架构、订阅计费系统、企业级功能
- 任务1: 多租户SaaS架构 (tenant_manager.py)
- 任务2: 订阅与计费系统 (subscription_manager.py)
- 任务3: 企业级功能 (enterprise_manager.py)
- 更新 schema.sql 添加所有相关表
- 更新 main.py 添加所有API端点
- 更新 README.md 进度表
2026-02-25 18:42:29 +08:00
OpenClaw Bot
5743d05bb5 Add Phase 8 Task 1 summary document 2026-02-25 12:13:26 +08:00
OpenClaw Bot
e3d7794ae7 Phase 8 Task 1: 多租户 SaaS 架构
- 创建 tenant_manager.py 多租户管理模块
  - 租户管理(CRUD、slug、状态管理)
  - 自定义域名绑定(DNS/文件验证)
  - 品牌白标(Logo、主题色、自定义 CSS/JS)
  - 成员管理(邀请、角色、权限)
  - 资源使用统计和限制检查
  - 租户上下文管理器

- 更新 schema.sql 添加租户相关表
  - tenants, tenant_domains, tenant_branding
  - tenant_members, tenant_permissions, tenant_usage

- 更新 main.py 添加租户 API 端点
  - /api/v1/tenants/* 租户管理
  - /api/v1/tenants/{id}/domains 域名管理
  - /api/v1/tenants/{id}/branding 品牌配置
  - /api/v1/tenants/{id}/members 成员管理
  - /api/v1/tenants/{id}/usage 使用统计
  - /api/v1/resolve-tenant 域名解析

- 创建 test_phase8_task1.py 测试脚本
2026-02-25 12:12:50 +08:00
OpenClaw Bot
1e74d94e11 docs: add Phase 8 roadmap - commercialization and scale 2026-02-25 09:54:29 +08:00
OpenClaw Bot
9e460a7ead Add Phase 7 complete summary document 2026-02-24 18:16:17 +08:00
OpenClaw Bot
e4550b066e Phase 7 Task 6 & 8: 高级搜索与发现 + 性能优化与扩展
- 新增 search_manager.py 搜索管理模块
  - FullTextSearch: 全文搜索引擎 (FTS5)
  - SemanticSearch: 语义搜索引擎 (sentence-transformers)
  - EntityPathDiscovery: 实体关系路径发现 (BFS/DFS)
  - KnowledgeGapDetector: 知识缺口检测器

- 新增 performance_manager.py 性能管理模块
  - CacheManager: Redis 缓存层 (支持内存回退)
  - DatabaseSharding: 数据库分片管理
  - TaskQueue: 异步任务队列 (Celery + Redis)
  - PerformanceMonitor: 性能监控器

- 更新 schema.sql 添加新表
  - search_indexes, embeddings, fts_transcripts
  - cache_stats, task_queue, performance_metrics, shard_mappings

- 更新 main.py 添加 API 端点
  - 搜索: /search/fulltext, /search/semantic, /entities/{id}/paths
  - 性能: /cache/stats, /performance/metrics, /tasks, /health

- 更新 requirements.txt 添加依赖
  - sentence-transformers==2.5.1
  - redis==5.0.1
  - celery==5.3.6

- 创建测试脚本和文档
  - test_phase7_task6_8.py
  - docs/PHASE7_TASK6_8_SUMMARY.md

Phase 7 全部完成!
2026-02-24 18:15:35 +08:00
OpenClaw Bot
7a2dc5f810 Phase 7 Task 4: Add collaboration API endpoints and schema
- Add collaboration_manager import and COLLABORATION_AVAILABLE flag
- Add get_collab_manager() singleton function
- Add collaboration API endpoints:
  - Project share links (create, list, verify, access, revoke)
  - Comments (add, get, update, resolve, delete)
  - Change history (get, stats, versions, revert)
  - Team members (invite, list, update role, remove, check permissions)
- Add collaboration tables to schema.sql:
  - project_shares, comments, change_history, team_members
  - Related indexes for performance
2026-02-24 00:17:13 +08:00
OpenClaw Bot
243f41de8f Merge remote changes 2026-02-24 00:13:24 +08:00
OpenClaw Bot
c557cc52c4 Phase 7 Task 4: 协作与共享模块
- 创建 collaboration_manager.py 协作管理模块
  - CollaborationManager: 协作管理主类
  - 项目分享链接管理 - 支持只读/评论/编辑/管理员权限
  - 评论和批注系统 - 支持实体、关系、转录文本评论
  - 变更历史追踪 - 记录所有数据操作变更
  - 团队成员管理 - 支持多角色权限控制

- 更新 schema.sql 添加协作相关数据库表
  - project_shares: 项目分享表
  - comments: 评论表
  - change_history: 变更历史表
  - team_members: 团队成员表

- 更新 main.py 添加协作相关 API 端点
  - 项目分享相关端点
  - 评论和批注相关端点
  - 变更历史相关端点
  - 团队成员管理端点

- 更新 README.md 和 STATUS.md
2026-02-24 00:13:09 +08:00
OpenClaw Bot
befef850fc Add Phase 7 Task 3 summary document 2026-02-23 18:11:52 +08:00
OpenClaw Bot
95a558acc9 Phase 7 Task 3: 数据安全与合规
- 创建 security_manager.py 安全模块
  - SecurityManager: 安全管理主类
  - 审计日志系统 - 记录所有数据操作
  - 端到端加密 - AES-256-GCM 加密项目数据
  - 数据脱敏 - 支持手机号、邮箱、身份证等敏感信息脱敏
  - 数据访问策略 - 基于用户、角色、IP、时间的访问控制
  - 访问审批流程 - 敏感数据访问需要审批

- 更新 schema.sql 添加安全相关数据库表
  - audit_logs: 审计日志表
  - encryption_configs: 加密配置表
  - masking_rules: 脱敏规则表
  - data_access_policies: 数据访问策略表
  - access_requests: 访问请求表

- 更新 main.py 添加安全相关 API 端点
  - GET /api/v1/audit-logs - 查询审计日志
  - GET /api/v1/audit-logs/stats - 审计统计
  - POST /api/v1/projects/{id}/encryption/enable - 启用加密
  - POST /api/v1/projects/{id}/encryption/disable - 禁用加密
  - POST /api/v1/projects/{id}/encryption/verify - 验证密码
  - GET /api/v1/projects/{id}/encryption - 获取加密配置
  - POST /api/v1/projects/{id}/masking-rules - 创建脱敏规则
  - GET /api/v1/projects/{id}/masking-rules - 获取脱敏规则
  - PUT /api/v1/masking-rules/{id} - 更新脱敏规则
  - DELETE /api/v1/masking-rules/{id} - 删除脱敏规则
  - POST /api/v1/projects/{id}/masking/apply - 应用脱敏
  - POST /api/v1/projects/{id}/access-policies - 创建访问策略
  - GET /api/v1/projects/{id}/access-policies - 获取访问策略
  - POST /api/v1/access-policies/{id}/check - 检查访问权限
  - POST /api/v1/access-requests - 创建访问请求
  - POST /api/v1/access-requests/{id}/approve - 批准访问
  - POST /api/v1/access-requests/{id}/reject - 拒绝访问

- 更新 requirements.txt 添加 cryptography 依赖

- 更新 STATUS.md 和 README.md 记录完成状态
2026-02-23 18:11:11 +08:00
OpenClaw Bot
847e183b85 Add Phase 7 Task 7 summary document 2026-02-23 12:10:01 +08:00
OpenClaw Bot
797ca58e8e Phase 7 Task 7: 插件与集成系统
- 创建 plugin_manager.py 模块
  - PluginManager: 插件管理主类
  - ChromeExtensionHandler: Chrome 插件处理
  - BotHandler: 飞书/钉钉/Slack 机器人处理
  - WebhookIntegration: Zapier/Make Webhook 集成
  - WebDAVSync: WebDAV 同步管理

- 创建完整的 Chrome 扩展代码
  - manifest.json, background.js, content.js, content.css
  - popup.html/js: 弹出窗口界面
  - options.html/js: 设置页面
  - 支持网页剪藏、选中文本保存、项目选择

- 更新 schema.sql 添加插件相关数据库表
  - plugins: 插件配置表
  - bot_sessions: 机器人会话表
  - webhook_endpoints: Webhook 端点表
  - webdav_syncs: WebDAV 同步配置表
  - plugin_activity_logs: 插件活动日志表

- 更新 main.py 添加插件相关 API 端点
  - GET/POST /api/v1/plugins - 插件管理
  - POST /api/v1/plugins/chrome/clip - Chrome 插件保存网页
  - POST /api/v1/bots/webhook/{platform} - 接收机器人消息
  - GET /api/v1/bots/sessions - 机器人会话列表
  - POST /api/v1/webhook-endpoints - 创建 Webhook 端点
  - POST /webhook/{type}/{token} - 接收外部 Webhook
  - POST /api/v1/webdav-syncs - WebDAV 同步配置
  - POST /api/v1/webdav-syncs/{id}/test - 测试 WebDAV 连接
  - POST /api/v1/webdav-syncs/{id}/sync - 触发 WebDAV 同步

- 更新 requirements.txt 添加插件依赖
  - beautifulsoup4: HTML 解析
  - webdavclient3: WebDAV 客户端

- 更新 STATUS.md 和 README.md 开发进度
2026-02-23 12:09:15 +08:00
OpenClaw Bot
08535e54ba Fix duplicate dependency in requirements.txt 2026-02-23 00:15:32 +08:00
OpenClaw Bot
bb5c2361e8 Update README.md with Phase 7 progress tracking 2026-02-23 00:06:27 +08:00
OpenClaw Bot
2e8f160f8b Phase 7: Add workflow automation module
- Create workflow_manager.py with APScheduler integration
- Add WebhookNotifier supporting Feishu/DingTalk/Slack
- Update schema.sql with workflows, workflow_logs, webhook_configs tables
- Add workflow API endpoints (CRUD, trigger, logs)
- Add webhook API endpoints (CRUD, test)
- Update requirements.txt with APScheduler dependency
- Update STATUS.md with Phase 7 progress
2026-02-23 00:05:41 +08:00
OpenClaw Bot
0975de7f0a docs: add Phase 7 roadmap - intelligent automation and ecosystem expansion 2026-02-22 18:05:48 +08:00
OpenClaw Bot
540deb3a9c docs: Update README with Phase 6 API Platform features 2026-02-21 18:12:58 +08:00
OpenClaw Bot
f360e1eec5 Phase 6: API Platform - Add authentication to existing endpoints and frontend API Key management UI 2026-02-21 18:12:07 +08:00