Repository navigation
v2.0.0
Added
-
HomebridgeClientaccepts afetchoption, used for every request instead of the global fetch. Glass UI passes one that trusts its own self-signed certificate, so the Assistant's tools work when the UI runs over HTTPS. -
New package
@mp-consulting/homebridge-ai-core(2.0.0,packages/ai-core). The AI building blocks that don't need MCP — providers, redaction, config, prompts, tokens,generateJson, usage, the Assistant features and the plugin-UI routes (registerAiRoutes,testAiConnectionfrom./plugin) — now ship on their own withajvas the only runtime dependency. Homebridge plugins should depend on it instead of ai-kit, so they no longer install@modelcontextprotocol/sdk,socket.io-clientandzod. ItsPluginUiServerparameter is typed structurally, so@homebridge/plugin-ui-utilsis not a dependency. ai-core also exportsaddUsage,ZERO_USAGE,TrimOptions,PromptTemplate,McpPromptNameand theDEFAULT_*config constants, which ai-kit re-exports too. -
The Assistant (AI core,
.export). Provider adapters over plainfetchfor Claude (anthropic, defaultclaude-sonnet-5-5), OpenAI, Gemini and any OpenAI-compatible server (Ollama, LM Studio), each declaring its capabilities (tools, streaming, context size). Uniformchat()/stream()API with tool calling. -
Agent loop
runAgent(): connects a provider to the MCP tools through the MCP SDK's in-memory transport. Destructive tools are refused unless aconfirmcallback allows them; providers without tool calling get a prompt-only answer. -
Features:
diagnoseLogs,generatePluginConfig(schema-checked, secrets restored),explainDeviceError,assessPluginUpdate(low/medium/high risk),suggestOrganization,dailyDigest,ask. Inputs are redacted and trimmed to the provider's context window; all stream throughonChunk. -
Utilities:
generateJson(ajv validation with one repair retry),trimToContext/estimateTokens,UsageTrackerwith Claude prices,PROMPTStemplates,redactTextfor free text,readAiConfig/resolveAiConfig. -
Homebridge plugin. The package is now also a Homebridge platform plugin (
HomebridgeAiKit) withconfig.schema.jsonand a custom settings page (built with@mp-consulting/homebridge-ui-kit) to choose the provider and model, test the connection, serve MCP over HTTP and copy configs for Claude Desktop, Claude Code and Cursor. -
./pluginexport:registerAiRoutes(server)adds/ai/status,/ai/explain,/ai/askand/ai/configto any plugin's custom UI server, streamingai:chunk/ai:done/ai:errorevents; plustestAiConnectionandmcpClientSnippets. -
MCP over Streamable HTTP:
homebridge-ai-kit mcp --http [--port 8582] [--host 127.0.0.1]andrunHttpServer(). Requires a bearer token (HOMEBRIDGE_AI_MCP_TOKEN) and binds to 127.0.0.1 by default. -
API-token login:
HOMEBRIDGE_TOKEN(a Glass UIhbg_…token) replaces username and password.new HomebridgeClient({ url, token, getToken, … })takes options, andgetTokenlets Glass UI act with each user's short-lived token. -
New MCP tools:
install_plugin,update_plugin,uninstall_pluginandget_plugin_job(Glass UI plugin jobs, polled until done),list_child_bridges,restart_child_bridge,stop_child_bridge,start_child_bridge, andpatch_configfor editing one platform or accessory block. -
MCP resources with subscriptions:
homebridge://accessories,homebridge://logs/recentandhomebridge://status, updated live from the UI's socket.io namespaces with a polling fallback. -
MCP prompts:
diagnose-logs,plan-upgradeandaudit-config, sharing their text with the Assistant's templates.
Changed
- Renamed to
@mp-consulting/homebridge-ai-kit(was@mp-consulting/homebridge-mcp-server). The package becomes the home for all AI features shared by Homebridge Glass UI and the MP Consulting plugins; the MCP server is its first part. - New command:
homebridge-ai-kit mcp. Thehomebridge-mcp-servercommand is kept as an alias, and the environment variables are unchanged, so existing MCP client configs keep working. - The MCP server reports its name as
homebridge-ai-kitinstead ofhomebridge-mcp-server. Clients that match on the server name need updating. - Breaking for library users: the package entry point no longer starts the server. Import
createServerandHomebridgeClientfrom@mp-consulting/homebridge-ai-kit/mcp; secret redaction (redactSecrets,restoreSecrets) is exported from the main entry. set_accessorychecks the value before sending it against the characteristic's format, range, step, valid values and write permission, and coerces e.g."50"to50.- Redaction no longer hides token counts such as
maxOutputTokensorcontextTokens. - The repository is an npm workspace. ai-kit depends on
@mp-consulting/homebridge-ai-core^2.0.0and re-exports all of it from.and./pluginunder the same names, so imports from ai-kit (Homebridge Glass UI) keep working.ajvis no longer a direct dependency of ai-kit. Rootbuild,typecheck,lint,testandtest:coveragecover both packages, building ai-core first. - Releases publish two packages. The publish workflow publishes ai-core first (skipped when that version is already on npm), then ai-kit. Before the first release, configure npm trusted publishing (OIDC) for the new
@mp-consulting/homebridge-ai-corepackage name, and make sure ai-core is published before ai-kit. - Before release:
@mp-consulting/homebridge-ui-kitis referenced asfile:../homebridge-ui-kit(dev dependency, assets copied at build) until ui-kit 1.2.0 is published; change it to^1.2.0before releasing.