mirror of
https://github.com/mudler/LocalAI.git
synced 2026-08-04 12:22:22 -04:00
* feat(mcp): add scheduling client contracts Assisted-by: Hephaestus:openai/gpt-5.5 Signed-off-by: Owen Adirah <owenadira@gmail.com> * feat(mcp): add scheduling HTTP client support Assisted-by: Hephaestus:openai/gpt-5.5 Signed-off-by: Owen Adirah <owenadira@gmail.com> * feat(mcp): add in-process scheduling stubs Assisted-by: Hephaestus:openai/gpt-5.5 Signed-off-by: Owen Adirah <owenadira@gmail.com> * feat(mcp): register scheduling tools Assisted-by: Hephaestus:openai/gpt-5.5 Signed-off-by: Owen Adirah <owenadira@gmail.com> * test(mcp): map scheduling tools to REST routes Assisted-by: Hephaestus:openai/gpt-5.5 Signed-off-by: Owen Adirah <owenadira@gmail.com> * docs(mcp): document scheduling assistant tools Assisted-by: Hephaestus:openai/gpt-5.5 Signed-off-by: Owen Adirah <owenadira@gmail.com> * fix(mcp): wire in-process scheduling Use an explicit MCP scheduling DTO and route in-process scheduling calls through the distributed node registry so the embedded assistant matches the REST scheduling surface. Assisted-by: Hephaestus:openai/gpt-5.5 Signed-off-by: Owen Adirah <owenadira@gmail.com> * fix(mcp): narrow scheduling dto Assisted-by: Hephaestus:openai/gpt-5.5 [opencode] Signed-off-by: Owen Adirah <owenadira@gmail.com> --------- Signed-off-by: Owen Adirah <owenadira@gmail.com>
59 lines
2.5 KiB
Go
59 lines
2.5 KiB
Go
package localaitools
|
|
|
|
// Tool names exposed by the LocalAI Assistant MCP server. Use these
|
|
// constants — never bare strings — when registering tools, asserting the
|
|
// catalog in tests, or referencing tool names from other packages. The
|
|
// embedded skill prompts under prompts/ keep the bare strings because
|
|
// go:embed-ed markdown can't reference Go constants; TestPromptsContain
|
|
// SafetyAnchors guards that those strings stay aligned.
|
|
const (
|
|
// Read-only tools.
|
|
ToolGallerySearch = "gallery_search"
|
|
ToolListInstalledModels = "list_installed_models"
|
|
ToolListGalleries = "list_galleries"
|
|
ToolGetJobStatus = "get_job_status"
|
|
ToolGetModelConfig = "get_model_config"
|
|
ToolListBackends = "list_backends"
|
|
ToolListKnownBackends = "list_known_backends"
|
|
ToolSystemInfo = "system_info"
|
|
ToolListNodes = "list_nodes"
|
|
ToolListScheduling = "list_scheduling"
|
|
ToolGetScheduling = "get_scheduling"
|
|
ToolVRAMEstimate = "vram_estimate"
|
|
ToolGetBranding = "get_branding"
|
|
ToolGetUsageStats = "get_usage_stats"
|
|
ToolGetPIIEvents = "get_pii_events"
|
|
ToolGetMiddlewareStatus = "get_middleware_status"
|
|
ToolGetRouterDecisions = "get_router_decisions"
|
|
ToolListVoiceProfiles = "list_voice_profiles"
|
|
|
|
// Mutating tools — guarded by Options.DisableMutating and the
|
|
// LLM-side safety prompt (see prompts/10_safety.md).
|
|
ToolInstallModel = "install_model"
|
|
ToolImportModelURI = "import_model_uri"
|
|
ToolDeleteModel = "delete_model"
|
|
ToolEditModelConfig = "edit_model_config"
|
|
ToolReloadModels = "reload_models"
|
|
ToolLoadModel = "load_model"
|
|
ToolInstallBackend = "install_backend"
|
|
ToolUpgradeBackend = "upgrade_backend"
|
|
ToolToggleModelState = "toggle_model_state"
|
|
ToolToggleModelPinned = "toggle_model_pinned"
|
|
ToolSetBranding = "set_branding"
|
|
ToolSetAlias = "set_alias"
|
|
ToolCreateVoiceProfile = "create_voice_profile"
|
|
ToolDeleteVoiceProfile = "delete_voice_profile"
|
|
ToolSetNodeVRAMBudget = "set_node_vram_budget"
|
|
ToolSetScheduling = "set_scheduling"
|
|
ToolDeleteScheduling = "delete_scheduling"
|
|
|
|
// ToolListAliases is read-only but lives here so the alias tools stay
|
|
// grouped; the catalog tests assert its read-only placement.
|
|
ToolListAliases = "list_aliases"
|
|
)
|
|
|
|
// DefaultServerName is the MCP Implementation.Name surfaced when
|
|
// Options.ServerName is empty. Use the constant when you want a stable
|
|
// reference across packages (e.g. test fixtures, CLI defaults).
|
|
const DefaultServerName = "localai-admin"
|