Commit Graph

84 Commits

Author SHA1 Message Date
OpenClaw Agent fa85add7c4 docs(kb-workflow): 强调OCR步骤为耗时步骤
- 严禁跳过,必须等待完成
- 定时汇报进度(每2-3分钟)
- 超时时间30分钟
2026-02-11 01:37:45 +08:00
OpenClaw Agent 672a811c54 fix(kb-workflow): 修正路径管理和子技能逻辑
- kb_workflow.py: 修复目录查询命令(--pending, --metadata等)
- bilibili_metadata.py: headless默认True,逻辑保持纯净
- deep_analyzer.py: 添加缺失的pathlib.Path导入
- SKILL.md: 更新步骤说明,明确由workflow提供路径给子技能

fix: 修复Playwright启动失败(NameError)和路径自动获取问题
2026-02-11 01:35:43 +08:00
OpenClaw Agent 4794f3e914 docs: 修正Workflow执行流程说明,主代理直接调用子技能 2026-02-11 01:13:43 +08:00
OpenClaw Agent df15f9a6fb refactor: 统一CLI输出格式为标准JSON 2026-02-11 01:10:45 +08:00
OpenClaw Agent 06f279451a feat: 支持嵌套格式元数据(kb-bilibili-metadata 输出) 2026-02-11 01:04:18 +08:00
OpenClaw Agent 8b7371feed feat: 增加视频截帧功能,支持--video参数自动截帧+OCR 2026-02-11 01:00:31 +08:00
OpenClaw Agent 2e779306a5 docs: 补充辅助命令文档 2026-02-11 00:37:30 +08:00
OpenClaw Agent ce92b3b3fb refactor: 删除多余的历史文件,保留核心kb_workflow.py 2026-02-11 00:34:30 +08:00
OpenClaw Agent 5658529a84 docs: 更新SKILL.md 2026-02-11 00:33:53 +08:00
OpenClaw Agent 38c6c5354e feat: 完善CLI目录参数处理逻辑 2026-02-10 23:57:18 +08:00
OpenClaw Agent 48ace388da Revert "feat(kb-workflow): 补全CLI参数调用逻辑"
This reverts commit 61dad2414d.
2026-02-10 23:46:24 +08:00
OpenClaw Agent 61dad2414d feat(kb-workflow): 补全CLI参数调用逻辑
新增参数:
- --pending: 链接解析
- --metadata: 元数据提取
- --content: 内容下载
- --ocr: OCR处理
- --analyze: 深度分析
- --extract_platform: 提取平台名称
- --link_file, --meta_file, --text_file, --source: 输入文件路径
2026-02-10 23:43:20 +08:00
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