Commit Graph

72 Commits

Author SHA1 Message Date
OpenClaw Agent 7963da40fc refactor(kb-workflow): 完善SKILL.md,明确每个步骤的子技能名称和输入输出 2026-02-10 22:46:21 +08:00
OpenClaw Agent 51decc247d refactor(kb-workflow): 简化SKILL.md,删除步骤2-6的代码
只保留简洁的步骤描述:启动子代理并传入上一步返回结果
2026-02-10 22:43:44 +08:00
OpenClaw Agent 28d64e711d refactor(kb-workflow): 简化SKILL.md,删除sessions_spawn代码流程
改为命令行调用方式的简洁描述
2026-02-10 22:32:13 +08:00
OpenClaw Agent e370b6b39f refactor(kb-workflow): 改用Prompt-based模式
- SKILL.md: 重写为详细workflow指导,主代理直接读取执行
- kb_workflow.py: 简化为辅助工具函数库
- skill_main.py: 简化为触发检测入口
- SkillBug.md: 记录架构变更

主代理读取SKILL.md后,按照指导调用sessions_spawn,无需配置allowlist
2026-02-10 20:46:06 +08:00
OpenClaw Agent 679cca3b2c feat(kb-workflow): 优化OCR处理逻辑
- 无论content步骤有没有字幕,都执行ocr步骤
- ocr超时设置为30分钟(1800秒)
- 如果没有字幕文件但有视频文件,使用视频作为ocr源
2026-02-10 20:34:11 +08:00
OpenClaw Agent 11c62dd383 refactor(kb-workflow): 重构为真正的编排者,使用sessions_spawn调用子agent
- kb_workflow.py: 重构为编排者,使用sessions_spawn调用子技能
- skill_main.py: 新增技能入口,处理用户消息
- SKILL.md: 更新文档,明确架构和流程
- SkillBug.md: 新增问题记录文档

设计原则:
- workflow不读文件内容,从文件名提取平台
- 使用sessions_spawn调用子agent
- 子技能自己定义输入输出格式
2026-02-10 20:31:33 +08:00
OpenClaw Agent 49ebbdff0a cleanup: 删除kb-workflow遗留代码
- 删除 kb_handler.py,不在SKILL.md要求中
- 删除 kb_pipeline.py,不在SKILL.md要求中
- 修改 bilibili_extractor.py 使用 kb-link-parser 解析短链
- 添加 SkillBug.md 记录问题

Skills should follow their SKILL.md specifications only.
2026-02-10 18:20:50 +08:00
OpenClaw Agent 173d7379cb feat: 添加自然语言触发支持
- 支持'保存到知识库'/'订阅到知识库'触发词
- 自动检测链接并处理
- 更新SKILL.md文档
2026-02-10 17:55:25 +08:00
OpenClaw Agent f66a50cd3f fix: 复制 obsidian-kb 的 src 目录以解决依赖缺失 2026-02-10 17:34:54 +08:00
OpenClaw Agent 11f6c21740 feat: 添加进度反馈机制(--progress参数) 2026-02-10 17:28:40 +08:00
OpenClaw Agent 0bc3d98d0b fix: 添加文件覆盖保护避免去重冲突 2026-02-10 17:13:45 +08:00
OpenClaw Agent aa695c7cb7 feat(kb-deep-analyzer): Increase output limits for detailed analysis
## Increased limits:
| Stage | Before | After |
|-------|--------|-------|
| Per chunk | 500 tokens / 300 chars | 2000 tokens / 800 chars |
| Summary | 150 chars | 300 chars |
| Full analysis | 500 chars | 1500 chars |
| Short video | 100 chars | 200 chars |
| JSON response | 2000 tokens | 4000 tokens |

| Added items:
| - Topics: 3-4 → 5
| - Insights: 2-3 → 4
| - Actions: 1-2 → 3
2026-02-10 16:51:45 +08:00
OpenClaw Agent 08066334c4 feat(kb-deep-analyzer): Smart subtitle chunking strategy
## 改进内容

### 动态分段
- 根据字符数动态计算分段数
- 每个chunk最多3000字符
- 限制最小3段,最多20段

### 自然断点分割
- 优先级:段落(双换行) > 句末(。\n) > 句号 > 换行
- 不截断,保持语义完整

### 时间估算
- 用字符比例估算每段时间
- 长视频时间轴更准确
2026-02-10 16:41:15 +08:00
OpenClaw Agent 3cfd36cf4e fix(kb-deep-analyzer): Fix video analysis threshold
- Change threshold from LONG_VIDEO_THRESHOLD (30min) to SHORT_VIDEO_THRESHOLD (10min)
- Now videos 10+ minutes use chunked analysis for deeper insights
2026-02-10 16:30:41 +08:00
OpenClaw Agent db9bcc20c9 docs: Add GLM-4 test results and configuration 2026-02-10 16:29:38 +08:00
OpenClaw Agent 3faf121edb feat(kb-deep-analyzer): Support GLM-4 with custom base URL
- Support AI_BASE_URL environment variable for custom API endpoint
- Add --base-url CLI argument
- Fix zhipu API endpoint to use coding/paas/v4 path
2026-02-10 16:24:31 +08:00
OpenClaw Agent 38f1624b05 docs: Update TODO with completed Git and cleanup features 2026-02-10 16:10:56 +08:00
OpenClaw Agent f41fb6167d feat(kb-workflow): Add Git version control and cleanup
## Git Version Management
- Git repository in archive/ directory
- Environment variables for configuration (KB_GIT_ROOT, KB_GIT_REMOTE, etc.)
- Auto commit after archive with retry (3 attempts)
- Status command shows git status

## Subscription Management
- Subscriptions stored in archive/subscriptions/
- Track processed items to avoid duplicates
- Git tracked for history

## Automatic Cleanup
- Cleanup strategy based on file type and age
- video/frame retention: 7 days
- metadata/reports: permanent
- archive/: Git managed

## New Commands
- --trigger git-init: Initialize git repository
- --trigger git-status: Show git status
- --trigger cleanup: Clean expired temporary files
2026-02-10 16:09:50 +08:00
OpenClaw Agent 8b43416ab7 feat(kb-deep-analyzer): Enhance template and metadata
- Add complete metadata to frontmatter (bvid, cvid, mid, platform)
- Add AI-generated tags in analysis prompt
- Update templates to include full metadata
- Add tags_string for YAML array format
2026-02-10 15:42:09 +08:00
OpenClaw Agent f2309bf2d1 feat(kb-workflow): Add complete file storage structure
- Define clear file storage rules:
  - content/downloads/ for video files
  - content/subtitles/ for subtitle files
  - frames/ for video frames
- Track all created files in process results
- Add directory structure documentation
- Show file counts and total size in status
2026-02-10 15:28:41 +08:00
OpenClaw Agent 3f74bcd377 docs: Add subtitle enhancement tasks to TODO
- Add visual model subtitle extraction (GPT-4V/Claude/GLM-4V)
- Add ASR subtitle extraction (Whisper/讯飞/阿里云)
2026-02-10 15:16:47 +08:00
OpenClaw Agent f4c6612849 docs: Add workspace configuration and memory files
- AGENTS.md: Update agent workspace guidelines (read TODO.md in workflow)
- TODO.md: Add security inspection and TTS configuration tasks
- memory/: Add knowledge base refactoring progress notes
- .gitignore: Add debug/ directory
2026-02-10 14:56:18 +08:00
OpenClaw Agent 47355b36d9 feat(kb-bilibili-content): Add article content extraction using Playwright
- Replace API-based article extraction with Playwright scraping
- Support Bilibili article (专栏) content extraction
- Extract full article text using .read-article-holder selector
- Use async Playwright API for proper async/await support
2026-02-10 14:53:05 +08:00
OpenClaw Agent 56907e31f5 refactor(kb-zhihu-metadata): Simplify to only support zvideo and zhuanlan
- Remove question, answer, user types (not needed for knowledge base)
- Keep only zvideo (知乎视频) and zhuanlan (知乎专栏文章)
- Update URL patterns and extraction logic
- Simplified CLI interface
2026-02-10 14:46:39 +08:00
OpenClaw Agent d216ce4ba7 feat(kb-bilibili-metadata): Add UP subscription tracking support
- Enhance _extract_up_async() with subscription tracking:
  - video_count: Number of videos
  - article_count: Number of articles
  - subscription_info: Last video/article for update detection
- Update CLI to support UP subscription queries
- All collection types now support basic_info + subscription status
2026-02-10 14:34:12 +08:00
OpenClaw Agent 26accdd726 fix(kb-bilibili-content): Improve browser headers and cookie support
- Add complete browser headers for better API compatibility
- Read BILIBILI_COOKIE from environment variable
- Add debug print statements for troubleshooting
2026-02-10 14:29:35 +08:00
OpenClaw Agent 4cdbc825ce feat(kb-bilibili-metadata): Add series/readlist/favlist metadata extraction
- Add extract_series_async() for series collection metadata
- Add extract_readlist_async() for article list metadata
- Add extract_favlist_async() for favorite list metadata
- Add CLI support for new types: series, readlist, favlist
- Update bilibili_metadata.py with new extraction functions
- Add --mid parameter for series type

Note: These types record basic info and subscription status only,
not the full content list (which may be large).
2026-02-10 14:27:14 +08:00
OpenClaw Agent 51347f671b feat: Improve kb-bilibili-content video download
- Simplify download logic using playurl API
- Support video download without Cookie (FLV format)
- Improve subtitle extraction
- Better error handling and progress display
- Remove unnecessary dependencies
2026-02-10 13:40:03 +08:00
OpenClaw Agent a7ab478dbc fix: Improve kb-bilibili-metadata output format
- Wrap result in standard format with success/data/metadata
- Change default headless to False (use API by default)
- Add error handling with structured output
- Improve CLI output readability
2026-02-10 13:18:58 +08:00
OpenClaw Agent 066395164a feat: Add Xiaohongshu (小红书) URL support
- Add xhslink.com short link resolution
- Add xiaohongshu.com note/explore/notes URL patterns
- Add discovery/item pattern (resolved from short links)
- Add user profile pattern
- Support multiple Xiaohongshu URL formats
2026-02-10 13:00:38 +08:00
OpenClaw Agent c14575ed1f feat: Add comprehensive Zhihu URL support
- Add zhuanlan article support (zhuanlan.zhihu.com/p/{id})
- Add organization page support (zhihu.com/org/{name})
- Add organization subpages: answers, zvideos, asks, posts, pins
- Add zvideo support (zhihu.com/zvideo/{id})
- Improve URL pattern matching for various Zhihu content types
2026-02-10 12:51:38 +08:00
OpenClaw Agent 3fb5af33ab feat: Add mobile opus URL support for Bilibili
- Support m.bilibili.com/opus/{id} for dynamic posts
- Handle mobile URLs when resolving short links
2026-02-10 12:38:24 +08:00
OpenClaw Agent a3623b5338 feat: Add mobile URL support for Bilibili
- Support m.bilibili.com/space/{id} for UP主 accounts
- Handle mobile video URLs when resolving short links
2026-02-10 12:35:06 +08:00
OpenClaw Agent d72090b957 feat: Add automatic short link resolution for b23.tv
- Use requests library to follow redirects and resolve b23.tv short links
- Automatically extract BV ID from resolved URL
- Support both short links and full URLs seamlessly
2026-02-10 12:33:34 +08:00
OpenClaw Agent 115d6e042e fix: Improve kb-link-parser URL patterns
- Add playlist pattern for bilibili series (lists/xxx?type=series)
- Add favlist pattern for bilibili favorites (favlist?fid=xxx)
- Add readlist pattern for bilibili article collections (read/readlist/rlxxx)
- Reorder pattern matching to check specific patterns before generic space pattern
2026-02-10 12:30:55 +08:00
OpenClaw Agent 5507b1d986 feat: Add KB knowledge base series skills
- kb-link-parser: Multi-platform URL parser (Bilibili, YouTube, Zhihu)
- kb-bilibili-metadata: Bilibili video/article/up主 metadata extractor
- kb-zhihu-metadata: Zhihu question/answer/user metadata extractor
- kb-bilibili-content: Bilibili video download and content extraction
- kb-ocr-processor: OCR text extraction from video frames
- kb-deep-analyzer: AI-powered deep content analysis
- kb-workflow: Workflow orchestration (inbox, archive, subscriptions, report)

Also add:
- ARCHITECTURE_FLOWCHART.md: System architecture diagrams
- DETAILED_DESIGN.md: Complete design documentation
2026-02-10 12:18:52 +08:00
OpenClaw Agent 2f5a269866 feat(bilibili-analyzer): 支持字幕区域裁剪
- 新增 --crop-ratio 参数,提取底部1/N区域(默认1/4)
- 新增 --no-crop 参数,禁用裁剪提取完整帧
- 优化字幕识别效率,只处理字幕区域
2026-02-09 23:51:42 +08:00
OpenClaw Agent 732dfb6549 清理GitHub相关技能 2026-02-09 23:37:58 +08:00
OpenClaw Agent 79381bf0ba 移除不需要的AI/开发技能 2026-02-09 23:25:01 +08:00
OpenClaw Agent 59d873e1ad 清理workspace:删除临时文件、测试脚本和项目文档 2026-02-09 23:19:15 +08:00
OpenClaw Agent 6051d05f0c 修改-analyzer技能 2026-02-09 22:21:51 +08:00
OpenClaw Agent e9872afd25 feat: 更新子代理监督规则和文件存放规则
- 新增子代理监督规则(子代理必须严格遵守技能要求,违规打回重做)
- 新增文件存放规则(默认输出到~/work/)
- 将MEMORY.md中的规则同步到AGENTS.md
2026-02-09 20:24:56 +08:00
OpenClaw Agent 00e55259a7 Update: workspace changes 2026-02-09 18:43:33 +08:00
OpenClaw Agent e0a2b323d9 Update obsidian-kb skill and add find-skills
- obsidian-kb: Add OCR processors (easyocr, tesseract)
- obsidian-kb: Fix subtitle detection with test files
- obsidian-kb: Add cookie verification script
- Add find-skills skill for discovering capabilities
- Add video processing scripts
- Update clawhub lock file
2026-02-09 11:53:42 +08:00
OpenClaw Agent d66eade77e docs: 更新实施计划 - 所有 Checkpoints 已完成
- 所有核心模块已实现
- 集成主流程完成
- 配置和文档已更新
- 代码已提交推送

项目状态:✅ 已完成所有 Checkpoints (1-6)
测试状态:⏳ 待实际视频验证

下一步:可在生产环境中直接使用硬字幕提取功能
2026-02-09 00:39:00 +08:00
OpenClaw Agent 1e96b8785c feat(hard-subtitle): 集成硬字幕提取功能
- 添加 VideoStreamExtractor - B站 API + OpenCV 流式读取
- 添加 SubtitleDetector - MSER 检测 + 颜色过滤 + LRU 缓存
- 添加 OCRProcessor - PaddleOCR 集成 + 批量识别 + 过滤去重
- 添加 HardSubtitleExtractor - 主协调器,整合所有模块
- 更新 BilibiliExtractor - 优先官方字幕,降级硬字幕提取
- 更新 __init__.py - 导出所有新模块
- 添加配置项支持
- 完成完整实施计划 Checkpoint 5

功能:
- 支持官方 CC 字幕(WBI API)
- 支持硬字幕提取(PaddleOCR)
- 自动检测字幕区域
- 字幕结果缓存
- 去重和噪声过滤
2026-02-09 00:37:16 +08:00
OpenClaw Agent cd80837c86 fix(bilibili): 改进字幕提取,支持 WBI API 和多语言优先级
- 使用 WBI API 获取字幕信息(支持 AI 字幕)
- 优先选择中文字幕(ai-zh > zh-CN > zh-Hans)
- 添加硬字幕提取实施计划
- 改进错误处理,静默失败不影响主流程
2026-02-09 00:24:19 +08:00
OpenClaw Agent f952c963d0 添加知乎 DrissionPage 计划和 Playwright 完成报告 2026-02-08 05:57:53 +08:00
OpenClaw Agent 1737800a3c 清理临时测试文件和报告 2026-02-08 05:57:40 +08:00
OpenClaw Agent 30eb8489a2 添加知乎 DrissionPage 完成报告和更新 .gitignore
- 添加最终完成报告到 memory/completion-reports/
- 更新 .gitignore 排除测试文件和临时报告
2026-02-08 05:57:22 +08:00