makepad/libs/ai/hub/Cargo.toml
Admin e37c263b9c ai backbone: the hub era — makepad_ai deleted, every backend is a hub pipe; machine residency elections, job leases, ETA placement; the store only stores; creator pipelines run in the app (aicore)
Squashed from work:
- asset-ai: FastH3 4-step fast video backend; clip keyframes on the wire
- asset-ui: loop video chains — text→image→video that ends where it began
- h3: safetensors -> pruned-Q4_K GGUF quantizer for the 24GB DiT tiers
- h3_quant_gguf verify: row-error gates calibrated to the measured Q4_K floor
- asset-ai realtime: the feedback loop — the source anchors, the drifted frame inits
- asset-ai realtime: a feedback loop survives a resize and travels by default
- asset-ai realtime: the feedback loop frees itself from the feed handshake and pauses for its listener
- asset-ai realtime: the outbound encode leaves the loop's critical path
- asset-ai ocr: the ocr domain — Chandra 2 at page resolution, and the tower goes planner-owned
- llm slots: a lane can hold an image span — embedding prefill and a rope cursor of its own
- vision tower on CUDA: the encode leg gets its two missing kernels
- llm/ocr: one M-RoPE grid encoder for both image paths, and a livelock made an error
- vision tower on CUDA: the f16 GEMM keeps the precision it was throwing away
- live: a feed that moves box takes its trip with it — one seed image
- vision tower on CUDA: the tiled attention becomes bit-exact, and tensor cores go
- llm prefill on CUDA: the MMA attention kernel gets the tile a 4-to-1 model needs
- asset-ai ocr: the CUDA encode lane joins the integration — vision-parity sits beside run's three arms, and the kernels
- Merge branch 'ocr-perf-integration' into work
- asset-ai: the live anchor can follow the trip, and text leaves the 5090
- asset-ai: the camera moves the world, and the world starts still
- asset-import: the EA strategy classics, in the one 2D contract
- rtsmap: one seeded generator for tiled strategy maps
- asset-ui: one card for the strategy classics, with a pack dropdown
- asset-ai: music3 reference-audio path, ocr/h3 backends, registry
- asset: mp4 sample index for range-streaming, chat tools, import profiles
- cnc: tiberium is twelve growth frames, not twelve empty variants
- platform: native file and save dialogs, in-house on all three desktops
- chat: the scan holds out for a lane home
- chat: a full home queues you — take the free lane
- chat: the preload has a percentage, and the boundless cap stops showing
- llm cuda: the 32x2 attention tile — even GQA ratios stay on MMA
- sa3 gets a bake path: the sfx model's tables precomputed by a diffusion-side bin
- sqlite_query: anti-join regression test
- td import: HARV's second frame block is its harvesting cycle, not a turret
- asset-ui: sprite enhancement runs on the 32B dev DiT — distillation, not the prompt, was the ceiling
- ai-hub: makepad-asset-ai becomes makepad-ai-hub at libs/ai/hub, the chat pane becomes makepad-chat-ui, the service bin
- asset-ui: test health fixtures grow the realtime field they were born without
- ai-hub: one home at ~/.makepad — weights/ run/ cache/ logs/, the service cache migrates from ai_content by a single re
- ai-hub: subprocess workers die with the node — process groups everywhere, PDEATHSIG on linux, one KILL_ON_JOB_CLOSE Jo
- ai-hub: the hub object — AiHub::in_process, pipes vocabulary, and the local LLM engine generalized out of mpfiles (aic
- strict-json: the dependency-free JSON module gets its own crate; asset-client re-exports it so nothing downstream move
- ai-hub: the machine layer — node entries, the 0600 machine token, and the residency election that IS the lock (aicore
- ai-hub: MPHUB1 — the fabric beacon only dedicated nodes can send (aicore §4)
- ai-hub: job leases — work lives only while it is renewed (aicore §8)
- asset-creator: the pipeline library is born — specs, the deps gate, and the derived-state law (aicore §9)
- ai-hub: RAM residency facts — the CPU-side twin of residency.rs (aicore §3)
- ai-hub: ETA placement primitives — relative GPU throughput, the four-term estimate, and an observable breakdown (aicor
- ai-hub: leases go live on the wire — origin fields on submit, /job/<id>/keepalive, /bye, and the reaper that cancels w
- ai-hub: the chat providers move in — fleet qwen, openai, grok, claude/codex/grok CLIs, the responses driver, and the w
- asset-creator: the engine — one pipeline run against the hub, deps-gated, spliced, cancellable, resumable-by-construct
- ai-hub: the machine node mode — --machine binds loopback, registers in ~/.makepad/run, and exits on its own once idle
- asset-creator: makepad-creator-run — the detached client for runs that must outlive a window (aicore §9)
- ai-hub: a native Claude Messages-API provider — API-key or Claude Code OAuth, bounded SSE streaming, injected tools (a
- route + converse: off makepad_ai — the Agent seam moves to converse, route's cloud dispatcher rides the hub's Claude p
- asset-creator: the preset tables move in — fifteen chain-policy constants shared by every creator app (aicore §9 / P6)
- makepad_ai is deleted — every backend is a hub pipe, the agent seam lives with its consumers (aicore §14, decided 2026
- ai-hub: loads hold the machine residency election — set_model_state claims on Loaded and publishes the service port (a
- ai-hub: chats run the machine election — route to a serving holder, wait on a loading one, claim and publish when open
- ai-hub: pick_for_domain_eta — ETA-ranked placement over the shared hard-filter core (aicore §6 / P4)
- asset-creator: the engine picks a provider per stage at dispatch time — a chain's later stages see fresh fleet state (
- ai-hub: the fabric secret gates the service HTTP surface — bearer on everything but /health and the ticketed peer path
- vj: DREAM runs execute in the app — pipelines.rs becomes the run it used to watch (aicore §9 / F1)
- asset-creator: the runner — generate one thing and put it in the catalog, one implementation for every surface (aicore
- chat-ui: the session runs in the app — no broker anywhere on the chat path (aicore P8 / F5)
- asset-store: assets.query is a first-class query endpoint — the bounded SQL surface outlives the broker (aicore P8 / F
- asset-creator: CreatorTools — the chat tool pack for a store that only stores (aicore §9 / P8)
- asset-store: the shrink — the store stores (aicore P7)
- importer + asset-server host: the coordination era ends (aicore P7)
- store config purge + asset-ui goes fleet-direct; the derive protocol gets its route proof (aicore P7)
- client + chat dispatcher: the dead wire comes out (aicore P7/P8)
- ai-hub: 0.3.0 — the health version says which era a node runs
- ai-hub: the default fleet is 'gen' — apps hear the LAN without env plumbing
- ai-hub: the preload note percents the prefill, not the job bar
- ai-hub: conversations keep their KV — the wire mirror, the lane identity, the in-turn dynamic context (aicore §7)
- ai-hub: an open-think model is thinking from its first token
- libs: the zero-warning sweep — stitch casts say what they mean, xatlas keeps upstream's surface quietly
- zero-warning sweep, round two — the first full-workspace pass
- zero-warning sweep, round three — the model lanes and the deep examples
- zero-warning sweep, round four — the last stragglers
- zero-warning sweep, round five — vj and chat-ui
- zero-warning sweep, round six — three cascades

Co-authored-by: Claude <info@makepad.nl>
2026-09-01 16:46:31 +02:00

162 lines
8.3 KiB
TOML

[package]
name = "makepad-ai-hub"
version = "0.3.0"
edition = "2021"
description = "AI content generation service: wraps local GPU model runtimes (image/mesh/video/audio) behind an HTTP port, with on-demand HuggingFace model download"
license = "MIT OR Apache-2.0"
# Standalone workspace: this crate pulls in platform/network and the
# per-family model crates under libs/ai, so it stays out of the root
# workspace member list.
[workspace]
[features]
# Native backends only. Python/Torch oracles stay off unless a box
# explicitly enables `python-backends`.
default = [
"flux",
"paint",
"paint-cuda",
"llm",
"tts",
"indextts",
"video",
"interpolate",
"audio",
"mesh",
"matte-native",
"depth-native",
"segment-native",
"upscale-native",
"motion-native",
"rig-native",
"splat-native",
]
# Box-provisioned Python/Torch reference backends (FlashWorld, Music3,
# Depth-Anything-3, and the rig/motion oracles). Not in default: a native
# service must not advertise or instantiate a Python runtime.
python-backends = []
# Real Flux image generation via makepad-ai-flux.
flux = ["dep:makepad-ai-flux", "dep:makepad-ai-common"]
# The generative-PBR paint domain: mesh GLB + reference image -> PBR-textured
# GLB + semantic maps + provenance manifest. Ships the deterministic
# "paint-test" tier everywhere. Default also enables `paint-cuda`, so a
# Windows/Linux fleet box advertises Hunyuan Paint and downloads weights
# like any other registry model.
paint = ["dep:makepad-ai-paint", "dep:makepad-gltf", "dep:makepad-remesh", "dep:makepad-xatlas"]
# Windows/Linux CUDA Hunyuan executor (in default).
paint-cuda = ["paint", "makepad-ai-paint/cuda-taps"]
# Real LLM prompt expansion via makepad-ai-llm (Qwen3.5/3.6 GGUF).
llm = ["dep:makepad-ai-llm"]
# Real Kokoro speech synthesis via makepad-ai-speech.
tts = ["dep:makepad-ai-speech"]
# Real IndexTTS-2.5 character-voice TTS via makepad-ai-speech.
indextts = ["dep:makepad-ai-speech", "dep:makepad-ai-common"]
# Real MiniMax H3 video generation via makepad-ai-h3 plus the hardware
# video file encoder (makepad-video). Does NOT pull the UI platform crate.
video = ["dep:makepad-ai-h3", "dep:makepad-ai-common", "dep:makepad-video"]
# Native Practical-RIFE v4.26 frame interpolation as an optional post-stage
# of the video backend (`interpolate: 2|4`). Independent of `video`: the
# stage sits after the generator, so the stubbed CI video path exercises it
# too. Weights ride along with each H3 tier through the "interpolate" file
# role, so the domain never grows a second selectable model.
interpolate = ["dep:makepad-ai-rife", "dep:makepad-ai-common"]
# Real SA3 / MOSS / Woosh / ACE / Music3 audio via the sfx + music crates.
audio = ["dep:makepad-ai-sfx", "dep:makepad-ai-music", "dep:makepad-ai-common"]
# Real TRELLIS.2 image->GLB via makepad-ai-trellis plus the in-repo remesher.
# Also needs H3's noise helper and BiRefNet (via matte-native).
mesh = ["matte-native", "depth-native", "dep:makepad-ai-trellis", "dep:makepad-ai-h3", "dep:makepad-ai-common", "dep:makepad-remesh", "dep:makepad-gltf", "dep:makepad-xatlas"]
# Native BiRefNet image matting. Separate from `mesh` so a matte-only
# service does not pull TRELLIS/remesh.
matte-native = ["dep:makepad-ai-vision", "dep:makepad-ai-common"]
# Native DA3METRIC-LARGE metric depth. Independent of `mesh`.
depth-native = ["dep:makepad-ai-vision", "dep:makepad-ai-common"]
# Native SAM 3.1 multiplex segmentation. Independent of `mesh`.
segment-native = ["dep:makepad-ai-vision", "dep:makepad-ai-common"]
# Native RealESRGAN x4plus general-image upscaling. Independent of `mesh`.
upscale-native = ["dep:makepad-ai-vision", "dep:makepad-ai-common"]
# Native HY-Motion decode -> rig retarget -> animated GLB.
motion-native = ["dep:makepad-ai-motion", "dep:makepad-ai-common", "dep:makepad-gltf", "dep:makepad-render"]
# Native TripoSplat image -> 3D gaussian splat. Needs BiRefNet (via
# matte-native) for the cutout and the FLUX.2 VAE encoder (via the flux
# family crate, which makepad-ai-splat depends on directly).
splat-native = ["matte-native", "dep:makepad-ai-splat", "dep:makepad-ai-common"]
# Native SkinTokens checkpoint conversion, inference, surface transfer and
# lossless skinned-GLB augmentation. The reference Torch/bpy backend remains
# separately available as `rig-oracle` through `python-backends`.
rig-native = ["dep:makepad-ai-rig", "dep:makepad-ai-common", "dep:makepad-gltf"]
[dependencies]
makepad-micro-serde = { path = "../../micro_serde" }
makepad-base64 = { path = "../../base64" }
makepad-network = { path = "../../../platform/network" }
makepad-strict-json = { path = "../../strict_json" }
# Reuse-group UDP bind for the fleet beacon listener (several apps on one
# machine listen at once); the client crate owns that socket helper.
makepad-asset-client = { path = "../../asset/client" }
makepad-zune-core = { path = "../../zune/zune-core" }
makepad-zune-png = { path = "../../zune/zune-png" }
# Vision-domain request images arrive as PNG or JPEG.
makepad-zune-jpeg = { path = "../../zune/zune-jpeg" }
makepad-zip-file = { path = "../../zip_file" }
# Music reference clips arrive as any audio file the in-repo decoders read
# (MP3 / FLAC / Ogg Vorbis here, WAV in crate::wav). No deps, no unsafe.
makepad-audio-decode = { path = "../../audio_decode" }
makepad-ai-common = { path = "../../ai/models/common", optional = true }
makepad-ai-flux = { path = "../../ai/models/flux", optional = true }
makepad-ai-h3 = { path = "../../ai/models/h3", optional = true }
makepad-ai-rife = { path = "../../ai/models/rife", optional = true }
makepad-ai-vision = { path = "../../ai/models/vision", optional = true }
makepad-ai-rig = { path = "../../ai/models/rig", optional = true }
makepad-ai-motion = { path = "../../ai/models/motion", optional = true }
makepad-ai-sfx = { path = "../../ai/models/sfx", optional = true }
makepad-ai-music = { path = "../../ai/models/music", optional = true }
makepad-ai-trellis = { path = "../../ai/models/trellis", optional = true }
makepad-ai-splat = { path = "../../ai/models/splat", optional = true }
makepad-ai-paint = { path = "../../ai/models/paint", optional = true }
makepad-remesh = { path = "../../remesh", optional = true }
makepad-gltf = { path = "../../gltf", optional = true }
makepad-xatlas = { path = "../../xatlas", optional = true }
makepad-render = { path = "../../render", optional = true }
makepad-ai-llm = { path = "../../ai/llm", optional = true }
makepad-ai-speech = { path = "../../ai/models/speech", optional = true }
makepad-video = { path = "../../../platform/video", optional = true }
# The `mkfl` motion payload: ONE definition, shared with the VJ's import
# converter (which fills the same box from a classical, model-free flow
# field). Default features off — the enhance stage owns its own codec seam
# and only needs the format.
makepad-video-flow = { path = "../../video_flow", default-features = false }
[dev-dependencies]
# Test-only: tests/service_e2e.rs drives the realtime websocket endpoint
# through the in-repo plain-TCP websocket client.
makepad-live-id = { path = "../../live_id" }
# Test-only: the h264 realtime round-trip test acts as its own client,
# encoding/decoding with the same hardware codec seam the service uses
# internally (behind the crate's own optional/default `video` feature).
makepad-video = { path = "../../../platform/video" }
# The standing "is chat slow right now?" check. Its own code is std-only —
# no HTTP or JSON crate — so what it measures is the box, not a client
# library, and it keeps working when the wire grows fields it has never
# heard of.
[[bin]]
name = "chat-bench"
path = "src/bin/chat_bench.rs"
# The standing "where does a long conversation go insane, and which subsystem
# did it?" gate. Two arms per rung — one cold request at depth against the same
# content grown turn by turn — so a failure names the incremental path or the
# position/arena math instead of just saying "long contexts are bad". Std-only
# for the same reason chat-bench is.
[[bin]]
name = "context-ladder"
path = "src/bin/context_ladder.rs"
# The OCR bench: every page image in a directory through the resident ocr
# backend (local weights) or through a box's wire, one HTML per page, and
# the numbers that decide the model — seconds per page, image/output tokens,
# retries — plus `--score` to rank transcriptions against a reference.
[[bin]]
name = "ocr-bench"
path = "src/bin/ocr_bench.rs"