fix(controller): ensure new skills are visible to agent on first ask#753
Merged
lefarcen merged 2 commits intofeat/medeo-video-skillfrom Apr 1, 2026
Merged
Conversation
β¦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.
β¦apshot 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).
alchemistklk
approved these changes
Apr 1, 2026
lefarcen
added a commit
that referenced
this pull request
Apr 2, 2026
* feat(skill): add Medeo Video as bundled static skill 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 * feat(skill): hardcode gateway URL, default duration 15s, max 20s, remove --gateway-url * feat(skill): passthrough env vars to sub-agent, expand feishu credential lookup * fix(controller): ensure new skills are visible to agent on first ask (#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): cron-based progress monitoring for medeo video (#754) * 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 * feat(skill): add LibTV Video as bundled static skill - 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 --------- Co-authored-by: lefarcen <935902669@qq.com>
lefarcen
added a commit
that referenced
this pull request
Apr 2, 2026
* feat(skill): add Medeo Video as bundled static skill 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 * feat(skill): hardcode gateway URL, default duration 15s, max 20s, remove --gateway-url * feat(skill): passthrough env vars to sub-agent, expand feishu credential lookup * fix(controller): ensure new skills are visible to agent on first ask (#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): cron-based progress monitoring for medeo video (#754) * 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 * feat(skill): add LibTV Video as bundled static skill - 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(skill): fix NoneType crash in libtv query, add tasks command - 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 * fix(skill): restrict libtv result URL to libtv-res.liblib.art/sd-gen-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 * fix(skill): use correct API field names in libtv tasks command - 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 * fix(skill): persist result_urls to local for offline recovery - 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 --------- Co-authored-by: lefarcen <935902669@qq.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Fix a race condition where newly bundled or installed skills are invisible to the agent, even though they're on disk and in the config allowlist.
Why
Two issues caused skills to be invisible:
Cold-start ordering:
syncAllImmediate()pushed the first config to OpenClaw beforeskillhubService.start()copied static/bundled skills to disk. The first compiled config was missing these skills.Stale snapshot in existing sessions: Even after a config push with the correct allowlist, OpenClaw's config-reload treats
agents/skillschanges askind: "none"(no action). Existing sessions keep using a stale skills snapshot and never see newly added skills β until a full restart.How
Fix 1 β Bootstrap ordering (
skillhub-service.ts,bootstrap.ts):SkillhubService.bootstrap()β runssyncNow()+copyStaticSkills()before the first config pushbootstrapController()beforesyncAllImmediate()start()still calls them again safelyFix 2 β Touch SKILL.md after config push (
openclaw-sync-service.ts):syncAllsuccessfully pushes a config change, touch oneSKILL.mdin the skills directorybumpSkillsSnapshotVersion()β existing sessions rebuild their snapshot on the next turnOpenClawWatchTrigger.touchSkill()helperconfigPushedis true (no unnecessary touches)Affected areas
Checklist
pnpm typecheckpassespnpm testpasses (new: 4 bootstrap ordering tests)anytypes introduced