No description
  • Rust 58.6%
  • HTML 30.7%
  • CSS 10.7%
Find a file
Casper Stevens 4300405320 Fix embedded SID: mod CAPACITY_6 to stay within SmartId range
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>
2026-05-18 23:13:32 +02:00
crates Fix embedded SID: mod CAPACITY_6 to stay within SmartId range 2026-05-18 23:13:32 +02:00
docs Rename hero_vidgen → hero_videos throughout 2026-05-18 18:20:07 +02:00
.gitignore Gitignore codegen artifacts (docs/, sdk/, src/lib.rs, src/services/, target/) 2026-05-18 22:04:35 +02:00
Cargo.toml Rename hero_vidgen → hero_videos throughout 2026-05-18 18:20:07 +02:00
Cargo.toml.hero_builder_backup Rename hero_vidgen → hero_videos throughout 2026-05-18 18:20:07 +02:00
LICENSE Initial scaffold — hero_vidgen AI video generation pipeline 2026-05-18 17:59:00 +02:00
README.md Rename hero_vidgen → hero_videos throughout 2026-05-18 18:20:07 +02:00
rust-toolchain.toml Initial scaffold — hero_vidgen AI video generation pipeline 2026-05-18 17:59:00 +02:00

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

  1. Pick a template (e.g. time_travel_vlog) and provide inputs (reference photo, historical period).
  2. The pipeline generates scene prompts via the Hero AI broker, synthesises images via Higgsfield, and animates them via Kling.
  3. 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 /health and /.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 generation
  • ImageGenProvider — submits to Higgsfield API and polls until images are ready
  • VideoGenProvider — submits to Kling image-to-video API and polls until clips are ready
  • hero_videos_sdk — typed client generated from openrpc.json via openrpc_client! macro
  • hero_proc registration and lifecycle via service_hero_videos.nu

Requirements

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