makepad/libs/ai/services/Cargo.toml
Admin 74faf62ef1 ai: the AI hub gives way to the UI, smaller models, vision and speech
The AI hub serves local models on the LAN and now yields GPU memory to the
UI (shrinks the chat context, then unloads; grows back after; never loads
into the UI reserve), groups models by type, and reports each model's
memory split. LLM decode on Vulkan with Splash kernels, one shared GPU
device per process, vision on chat turns, an on-device text detector,
music models and stems.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-13 12:26:21 +02:00

48 lines
2.5 KiB
TOML

# The AI services layer.
#
# One conversation, many apps. An app EXPOSES an AI service: a manifest (who
# it is, a short brief, the tools it will execute) and a port that receives
# calls and answers them. A HOST owns the conversation: the desktop (wm's
# slide-in chat pane) or an app that embeds the chat panel itself. The host's
# engine aggregates every connected service into one tool table, drives the
# model, routes each call to the service that owns it, and shows the result.
#
# `wire` + `port` are what every app links (platform-only, no widgets, no
# model runtime). Without the default `platform` feature only the data
# slice is left (`wire`, `card`, `state`, `progress_eta`, `mcp`): what a
# headless client needs, with no makepad-platform in its graph. The `engine` feature is what a host links: the agent seam
# and the chat backends — the person's own Claude Code / Codex CLIs, Claude
# Desktop over MCP, the Claude API. The machine's own model (the hub's local
# runtime: Qwen on Metal/CUDA) is the separate `localai` feature.
#
# Design of record: local/agent_state/aichat/DESIGN.md
[package]
name = "makepad-ai-services"
version = "0.1.0"
edition = "2021"
license = "MIT OR Apache-2.0"
description = "What an app exposes to a central AI chat (manifest, tools, calls, results) and the engine that drives many apps from one conversation"
[features]
default = ["platform"]
# The port, the process's `app` service and the engine: everything that
# talks to makepad-platform (Cx, the UI signal, the remote endpoint).
platform = ["dep:makepad-platform", "dep:makepad-remote"]
# The chat backends: the CLI, MCP and cloud providers from the hub. Off by
# default so an app that only exposes a service never links them. No model
# runtime: the hub comes without `llm`.
engine = ["platform", "makepad-ai-hub"]
# The machine's own model: Qwen through the hub's local runtime
# (makepad-ai-llm, the Metal/CUDA stores and their kernel builds).
localai = ["engine", "makepad-ai-hub/localai"]
[dependencies]
makepad-platform = { path = "../../../platform", optional = true }
makepad-micro-serde = { path = "../../micro_serde" }
makepad-strict-json = { path = "../../strict_json" }
makepad-ai-hub = { path = "../hub", default-features = false, optional = true }
# The process's `app` service is served on its makepad-remote endpoint, which these targets lack.
[target.'cfg(not(any(target_arch = "wasm32", target_os = "android")))'.dependencies]
makepad-remote = { path = "../../remote", optional = true }