Commit Graph

73 Commits

Author SHA1 Message Date
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
OpenClaw Bot
d040cb7657 docs: Update STATUS.md with deployment status 2026-02-21 06:03:20 +08:00
OpenClaw Bot
f38e060fa7 Phase 5: Enhance Neo4j graph visualization
- Path visualization optimization:
  - Add flowing dash animation to show path direction
  - Add glow effects to start/end nodes
  - Add path info panel with length and node count stats
  - Add gradient color connections

- Community visualization enhancement:
  - Add focus mode: click community to highlight
  - Dim non-focused communities
  - Add intra-community links to show internal relationships
  - Show density stats in community list

- Neighbor query visualization:
  - Add glow effect to center node
  - Add fade-in effects to connections

- Update STATUS.md to mark Phase 5 Neo4j integration complete
2026-02-21 00:14:47 +08:00
OpenClaw Bot
9e7f68ece7 docs: Update README - Phase 5 completed, all features done 2026-02-20 18:07:37 +08:00
OpenClaw Bot
af02fffd0c Update STATUS.md with latest deployment info 2026-02-20 18:07:10 +08:00
OpenClaw Bot
0286e96909 Phase 5: Add Neo4j graph analysis frontend panel
- Add graph analysis sidebar button and panel UI in workbench.html
- Implement graph statistics display (nodes, edges, density, components)
- Implement centrality analysis ranking display
- Implement community detection visualization using D3.js force layout
- Implement shortest path query and visualization
- Implement neighbor node query and visualization
- Add Neo4j connection status indicator
- Add data sync to Neo4j functionality
- Update STATUS.md marking frontend graph panel as completed
- Style consistent with dark theme using #00d4ff as primary color
2026-02-20 18:06:42 +08:00
OpenClaw Bot
6521d4b45f Update STATUS.md with Neo4j deployment status 2026-02-20 12:07:39 +08:00
OpenClaw Bot
403e1cde28 Phase 5: Add Neo4j graph database integration
- Add neo4j_manager.py with full graph operations support
- Data sync: projects, entities, relations to Neo4j
- Graph queries: shortest path, all paths, neighbors, common neighbors
- Graph algorithms: centrality analysis, community detection
- Add 11 new API endpoints for graph operations
- Update docker-compose.yml with Neo4j service
- Update requirements.txt with neo4j driver
2026-02-20 12:04:41 +08:00
OpenClaw Bot
44c07b9984 docs: update roadmap - remove collaboration features, prioritize Neo4j and API platform 2026-02-20 08:29:49 +08:00
OpenClaw Bot
6318cd0af9 Phase 5: 完成导出功能
- 新增 export_manager.py 导出管理模块
- 知识图谱导出 SVG/PNG
- 实体数据导出 Excel/CSV
- 关系数据导出 CSV
- 项目报告导出 PDF
- 转录文本导出 Markdown
- 项目完整数据导出 JSON
- 前端添加导出面板和功能
- 更新依赖: pandas, openpyxl, reportlab, cairosvg
2026-02-20 06:06:23 +08:00
OpenClaw Bot
2470064f65 Fix attribute history API response 2026-02-20 00:22:30 +08:00
OpenClaw Bot
98d39228c3 Fix AttributeHistory dataclass to match schema 2026-02-20 00:21:52 +08:00
OpenClaw Bot
d1ab36a543 Fix get_attribute_history query to not use template_id column 2026-02-20 00:21:14 +08:00
OpenClaw Bot
a3e782d365 Fix EntityAttribute dataclass to include name, type, and options fields 2026-02-20 00:20:14 +08:00
OpenClaw Bot
91b5e4d46a Fix get_entity_attributes query to use LEFT JOIN and sort_order 2026-02-20 00:19:33 +08:00
OpenClaw Bot
1833163a95 Add created_at and updated_at fields to Entity dataclass 2026-02-20 00:18:49 +08:00
OpenClaw Bot
43a86e2ed6 Add embedding field to Entity dataclass 2026-02-20 00:18:12 +08:00
OpenClaw Bot
bd5f497ccb Update entity attribute API to support flexible attribute creation 2026-02-20 00:17:33 +08:00
OpenClaw Bot
f5c859b850 Fix remaining display_order references in main.py 2026-02-20 00:16:14 +08:00
OpenClaw Bot
66ae5091ed Fix main.py: display_order -> sort_order 2026-02-20 00:15:26 +08:00
OpenClaw Bot
4d516f8328 更新 README.md 和 STATUS.md - 标记实体属性扩展完成 2026-02-20 00:14:55 +08:00
OpenClaw Bot
ffbf0df3ce Fix attribute template column name: display_order -> sort_order 2026-02-20 00:14:37 +08:00
OpenClaw Bot
fcb09a4442 Phase 5: 实体属性扩展功能完成
- 新增数据库表: entity_attributes, attribute_templates, attribute_history
- 新增后端 API: 属性模板管理、实体属性 CRUD、属性历史查询、属性筛选搜索
- 支持属性类型: text, number, date, select, multiselect, boolean
- 更新 STATUS.md 和 README.md
2026-02-20 00:13:32 +08:00
OpenClaw Bot
22b235d2e3 Fix db_manager.py duplicate code 2026-02-20 00:12:58 +08:00
OpenClaw Bot
7b67f3756e Phase 5: 实体属性扩展功能
- 数据库层:
  - 新增 entity_attributes 表存储自定义属性
  - 新增 attribute_templates 表管理属性模板
  - 新增 attribute_history 表记录属性变更历史

- 后端 API:
  - GET/POST /api/v1/projects/{id}/attribute-templates - 属性模板管理
  - GET/POST/PUT/DELETE /api/v1/entities/{id}/attributes - 实体属性 CRUD
  - GET /api/v1/entities/{id}/attributes/history - 属性变更历史
  - GET /api/v1/projects/{id}/entities/search-by-attributes - 属性筛选搜索

- 前端 UI:
  - 实体详情面板添加属性展示
  - 属性编辑表单(支持文本、数字、日期、单选、多选)
  - 属性模板管理界面
  - 属性变更历史查看
  - 知识库实体卡片显示属性预览
  - 属性筛选搜索栏
2026-02-20 00:10:49 +08:00
OpenClaw Bot
626fa7e1c0 docs: update Phase 4/5/6 roadmap with completed features and next priorities 2026-02-19 18:18:00 +08:00
OpenClaw Bot
acb1d311ad 更新 STATUS.md: 记录 Phase 5 知识推理功能完成 2026-02-19 18:09:33 +08:00
OpenClaw Bot
9dd54b3a38 Phase 5: 知识推理与问答增强
- 新增 knowledge_reasoner.py 推理引擎
- 支持因果/对比/时序/关联四种推理类型
- 智能项目总结 API (全面/高管/技术/风险)
- 实体关联路径发现功能
- 前端推理面板 UI 和交互
- 更新 API 端点和健康检查

Refs: Phase 5 开发任务
2026-02-19 18:07:00 +08:00
OpenClaw Bot
cfdf37fc31 docs: Update STATUS.md with deployment info 2026-02-19 12:11:33 +08:00
OpenClaw Bot
8404e83a1c fix: Move static files mount to end of file to not override API routes 2026-02-19 12:11:09 +08:00
OpenClaw Bot
1fa94e0ca4 fix: Add backend directory to Python path for proper imports 2026-02-19 12:09:12 +08:00
OpenClaw Bot
bc07aab4bb Phase 5: Add Timeline View feature
- Add backend API endpoints for timeline data:
  - GET /api/v1/projects/{id}/timeline
  - GET /api/v1/projects/{id}/timeline/summary
  - GET /api/v1/entities/{id}/timeline

- Add database methods for timeline queries in db_manager.py

- Add frontend timeline view:
  - New sidebar button for timeline view
  - Timeline panel with date-grouped events
  - Visual distinction between mentions and relations
  - Entity filter dropdown
  - Statistics cards
  - Interactive event cards

- Update STATUS.md with Phase 5 progress
- Add view switching functions (switchView, switchKBTab)
- Add knowledge base loading functions
2026-02-19 12:06:14 +08:00
OpenClaw Bot
1f4fe5a33e Phase 4: Agent Assistant + Provenance + Entity Cards + Confidence Indicators
- Add llm_client.py for Kimi API integration with RAG and streaming support
- Add Agent API endpoints: query, command, suggest
- Add Provenance API for relation source tracking
- Add Entity details API with mentions and relations
- Add Entity evolution analysis API
- Update workbench.html with Agent panel, entity cards, provenance modal
- Update app.js with Agent chat, entity hover cards, relation provenance
- Add low-confidence entity highlighting
- Update STATUS.md with Phase 4 progress
2026-02-19 09:58:39 +08:00
OpenClaw Bot
087a8d9c4d docs: add Phase 4/5 development roadmap and checklist 2026-02-19 09:53:12 +08:00