- Rust 58.6%
- HTML 30.7%
- CSS 10.7%
UUID v4 truncated to u64 is almost always > CAPACITY_6 (2.1B), causing from_global_id to return Err, and unwrap_or_default to give 0000 every time. Take mod CAPACITY_6 first. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| crates | ||
| docs | ||
| .gitignore | ||
| Cargo.toml | ||
| Cargo.toml.hero_builder_backup | ||
| LICENSE | ||
| README.md | ||
| rust-toolchain.toml | ||
Hero Videos
AI video content generation pipeline — turn a workflow template and user assets into short-form video clips, powered by AI prompt generation, image synthesis, and video animation.
New here? Start with concepts.md.
How It Works
- Pick a template (e.g.
time_travel_vlog) and provide inputs (reference photo, historical period). - The pipeline generates scene prompts via the Hero AI broker, synthesises images via Higgsfield, and animates them via Kling.
- You get back a job ID to poll — when done, the output is a set of video clip URLs ready to assemble.
New templates can be registered at runtime to support any short-form video concept.
Current State
The service is fully implemented and running:
- All four binaries build and install (
hero_videos,hero_videos_server,hero_videos_admin,hero_videos_ui) - All sockets bind and serve
/healthand/.well-known/heroservice.json - hero_router discovers and proxies the service
- Admin dashboard renders at
/hero_videos/admin/(Bootstrap UI, connection status, theme, live jobs and templates) - User-facing UI renders at
/hero_videos/app/— submit jobs, track progress, view output video clips - All RPC methods respond:
info,rpc.health,run_workflow,list_templates,register_template,get_job,list_jobs,cancel_job PromptGenProvider— calls hero_aibroker via Unix socket for JSON prompt generationImageGenProvider— submits to Higgsfield API and polls until images are readyVideoGenProvider— submits to Kling image-to-video API and polls until clips are readyhero_videos_sdk— typed client generated fromopenrpc.jsonviaopenrpc_client!macro- hero_proc registration and lifecycle via
service_hero_videos.nu
Requirements
- Rust 1.95+
- hero_proc (process supervisor)
- hero_aibroker (AI broker)
- Higgsfield API key
- Kling API key
Quick Start
# Register and start via nushell
nu -c "use ~/hero/code/hero_skills/nutools/modules/services/service_hero_videos.nu; service_hero_videos start"
# Or build and register manually
cd $CODEROOT/hero_videos
lab build --release --install
Service Architecture
| Binary | Purpose |
|---|---|
hero_videos |
Lifecycle CLI — start, stop, status |
hero_videos_server |
OpenRPC daemon — workflow engine, providers, job management |
hero_videos_admin |
Admin dashboard — operator UI |
hero_videos_ui |
User-facing web UI — submit and track video generation jobs |
Only hero_videos handles lifecycle flags. The other binaries run as plain foreground processes supervised by hero_proc.
Sockets
| Socket | Path | Protocol |
|---|---|---|
rpc.sock |
$HERO_SOCKET_DIR/hero_videos/rpc.sock |
OpenRPC (JSON-RPC 2.0) |
admin.sock |
$HERO_SOCKET_DIR/hero_videos/admin.sock |
HTTP (admin dashboard) |
web_app.sock |
$HERO_SOCKET_DIR/hero_videos/web_app.sock |
HTTP (user UI) |
See hero_sockets for the socket convention.
Configuration
Secrets are stored in hero_proc — no .env files:
lab secrets set HIGGSFIELD_API_KEY <value>
lab secrets set KLING_API_KEY <value>
See docs/configuration.md for all options.
Troubleshooting
Service won't start: Check hero_proc service logs hero_videos. Ensure HIGGSFIELD_API_KEY and KLING_API_KEY are set in hero_proc secrets.
Prompt generation fails: Ensure hero_aibroker is running — hero_proc service status hero_aibroker.
Backend Down in admin: Ensure hero_videos_server is running — hero_proc job list | grep videos.
Documentation
License
Apache-2.0