Commit Graph

95 Commits

Author SHA1 Message Date
starmen1265 ffed35db0c refactor(deep-analyzer): 简化模板和元数据格式
- 移除重复的 frontmatter 区块
- 简化模板,去掉"## 基本信息"和重复元数据
- frontmatter 添加 analyze_time、bvid、platform 字段
- 修复 argparse 默认值(provider/model 从固定值改为 None)
- 添加 normalize_metadata 调用
- 适配 glm-4.7 的 reasoning_content 模式
- 添加 _parse_json_from_text 解析函数
2026-02-13 12:14:13 +08:00
starmen1265 faaf79428b fix(deep-analyzer): 修复元数据解析和AI调用问题
- 支持 {"metadata": {...}} 格式的元数据
- 从环境变量读取 AI_PROVIDER 和 AI_MODEL
- 修复 glm-4.7 的 reasoning_content 处理
- 修复 _format_time 支持 float 类型
- 支持 Whisper 的 segments 和 text 字段
2026-02-13 11:50:08 +08:00
starmen1265 1fa90ac21c feat(bilibili): 使用 yt-dlp 替换原有下载方案
- 重写 download_video 使用 yt-dlp + Netscape cookie 文件
- 支持 BILIBILI_COOKIE 环境变量
- 更新默认质量为 720P
- 更新 SKILL.md 文档

环境变量已在 ~/.bashrc 中配置
2026-02-13 11:30:59 +08:00
starmen1265 0da1c0fb59 feat(kb-whisper): 新增说话者分离功能
- 新增 kb-whisper-diarization 技能
- 使用 pyannote.audio 实现说话者分离
- 支持区分多个说话者(如访谈节目)
- 输出带 [SPEAKER_00] 标签的字幕
2026-02-13 09:15:44 +08:00
starmen1265 c24889ffa5 docs: 更新待办和内存记录
- 添加 Whisper 编译任务
- 记录 KB Workflow 优化内容
2026-02-13 09:04:37 +08:00
starmen1265 29dd236bb9 feat(kb-workflow): 切换为 Whisper 语音识别
- 将步骤5从 OCR 改为 Whisper 语音识别
- 更新 kb-whisper 支持自动音频转换
- 默认使用中文语言 (zh) 和 base 模型
- 更新输出格式为 {platform}_{id}.txt/.srt/.json
- 添加 FunASR 作为备用方案
2026-02-13 09:04:27 +08:00
starmen1265 9102a973cd feat(kb-whisper): 新增本地语音识别技能,基于 Whisper.cpp 2026-02-13 01:20:27 +08:00
starmen1265 2adc3c1e8d docs: 更新每日记录 2026-02-13 00:44:04 +08:00
starmen1265 98c689eaa5 fix(kb-bilibili): 分离API和下载请求,禁用下载自动解压 2026-02-12 10:19:50 +08:00
starmen1265 9dec66d2bf 修改技能流程 2026-02-12 00:22:23 +08:00
OpenClaw Agent 736ca5bfc1 chore: 清理误提交的临时文件和目录 2026-02-11 01:42:21 +08:00
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