Skip to content

feat(skill): add LibTV Video skill + fix NoneType crash#764

Merged
lefarcen merged 11 commits intomainfrom
feat/medeo-video-skill
Apr 2, 2026
Merged

feat(skill): add LibTV Video skill + fix NoneType crash#764
lefarcen merged 11 commits intomainfrom
feat/medeo-video-skill

Conversation

@alchemistklk
Copy link
Copy Markdown
Contributor

Summary

  • Add LibTV Video as bundled static skill (pinned as first in STATIC_SKILL_SLUGS)
  • Seedance 2.0 as default model, auto-appended to prompts
  • Fix TypeError when task_result.images/videos is null in JSON
  • Fix NoneType crash when gateway returns no messages
  • Add tasks command to list all tasks for current key
  • Add recover command for session recovery after agent restart

Test plan

  • check — key validation works
  • create-session — session created, task_id returned
  • query-session — no crash, results extracted correctly
  • tasks — lists completed tasks
  • recover — finds pending sessions with results
  • upload — image upload to LibTV OSS works

alchemistklk and others added 7 commits April 1, 2026 23:22
Add AI video generation skill (Seedance 2.0 via Medeo Gateway) to the
bundled skills shipped with the desktop app.

- SKILL.md with agent instructions for video generation workflow
- medeo_video.py: CLI for setup, check, upload, spawn-task, recover
- feishu_send_video.py: Feishu video delivery script
- Register "medeo-video" in STATIC_SKILL_SLUGS
…753)

* fix(controller): bootstrap skill ledger before first OpenClaw config push

syncAllImmediate() ran before skillhubService.start(), so the first
compiled config was missing static/bundled skills that hadn't been
copied to disk yet. OpenClaw booted with an incomplete agent skills
allowlist, and because config-reload treats agents/skills changes as
kind "none", the snapshot was never rebuilt for existing sessions.

Add SkillhubService.bootstrap() — runs syncNow + copyStaticSkills
before the first config push — so the compiled allowlist is complete
from the start.

* fix(controller): touch SKILL.md after config push to bump OpenClaw snapshot

After syncAll pushes a new config (with updated agent skills allowlist),
touch one SKILL.md in the skills directory to trigger OpenClaw's chokidar
watcher → bumpSkillsSnapshotVersion. Without this, existing sessions keep
using a stale skills snapshot because OpenClaw's config-reload treats
agents/skills changes as kind "none" (no hot-reload action).
* feat(skill): add progress notifications for medeo video generation

Sub-agent now sends stage-change updates to the user via message tool
(composing → rendering → storing) instead of silently waiting until
completion. Poll interval reduced from 3min to 1min for faster feedback.

Final video URL is returned as plain text to the main agent so it can
deliver with conversation context, keeping the interaction natural.

* feat(skill): use cron-based progress monitoring for medeo video

Replace sessions_spawn sub-agent approach with cron systemEvent:
- Main agent sets a 2-minute cron after submitting a video task
- Each cron fires a systemEvent in the same session, prompting the
  agent to check task-status and update the user conversationally
- Agent decides whether to notify based on stage change and time
  since last update — no mechanical notifications
- task-status output reminds agent to remove cron when task finishes
- Support MEDEO_GATEWAY_URL env var override for local testing

* fix(skill): restore production gateway URL, strengthen completion delivery

- GATEWAY_URL defaults to production, overridable via MEDEO_GATEWAY_URL env
- SKILL.md: agent MUST send video URL on completion, not just report status

* fix(skill): hardcode production gateway URL
- Add libtv-video to STATIC_SKILL_SLUGS (pinned as first entry)
- Seedance 2.0 as default model, auto-appended to prompts
- Supports text-to-video, image-to-video, upload, session polling
- Includes recover command for session recovery after agent restart
- All user-facing output in English with friendly status messages
- Fix TypeError when task_result.images/videos is null (use `or []`)
- Fix NoneType crash when gateway returns no messages
- Add `tasks` command to list all tasks for current key
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fd1aef1d2f

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Keep HEAD (feature branch) changes:
- NoneType guard in extract_result_urls
- `or []` pattern for null-safe JSON field access
- tasks command and CLI registration
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Apr 2, 2026

Deploying nexu-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: f52bec9
Status: ✅  Deploy successful!
Preview URL: https://67a6f265.nexu-docs.pages.dev
Branch Preview URL: https://feat-medeo-video-skill.nexu-docs.pages.dev

View logs

…save-img prefix

- Update LIBTV_RES_PATTERN to only match libtv-res.liblib.art/sd-gen-save-img/
- Ignore medeo-res.liblib.art gateway proxy URLs
- Add multi-session discipline SOP and URL rules to SKILL.md
- Add tasks command to SKILL.md command reference
- Use `video_url` instead of hallucinated `libtv_video_url`/`medeo_video_url`/`r2_video_url`
- Default backend to `libtv` instead of `medeo`
- Add `completed_at` timestamp to output
- Extend _save_session to store result_urls and completed_at
- Save results locally on completion in wait-and-deliver, query-session, tasks, recover
- Recover reads completed sessions from local (no API call), only checks pending via API
- Reduces hallucination: agent can always find video URLs from local file
@lefarcen lefarcen merged commit 8208734 into main Apr 2, 2026
24 of 28 checks passed
@lefarcen lefarcen mentioned this pull request Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants