feat: add hm-options package for Home Manager options
Add a new MCP server for Home Manager options, mirroring the functionality of nixos-options but targeting the home-manager repository. Changes: - Add shared options.Indexer interface for both implementations - Add internal/homemanager package with indexer and channel aliases - Add cmd/hm-options CLI entry point - Parameterize MCP server with ServerConfig for name/instructions - Parameterize nix/package.nix for building both packages - Add hm-options package and NixOS module to flake.nix - Add nix/hm-options-module.nix for systemd deployment Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -15,7 +15,7 @@ import (
|
||||
// testHTTPTransport creates a transport with a test server
|
||||
func testHTTPTransport(t *testing.T, config HTTPConfig) (*HTTPTransport, *httptest.Server) {
|
||||
// Use a mock store
|
||||
server := NewServer(nil, log.New(io.Discard, "", 0))
|
||||
server := NewServer(nil, log.New(io.Discard, "", 0), DefaultNixOSConfig())
|
||||
|
||||
if config.SessionTTL == 0 {
|
||||
config.SessionTTL = 30 * time.Minute
|
||||
@@ -459,7 +459,7 @@ func TestHTTPTransportSSEKeepalive(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestHTTPTransportSSEKeepaliveDisabled(t *testing.T) {
|
||||
server := NewServer(nil, log.New(io.Discard, "", 0))
|
||||
server := NewServer(nil, log.New(io.Discard, "", 0), DefaultNixOSConfig())
|
||||
config := HTTPConfig{
|
||||
SSEKeepAlive: -1, // Explicitly disabled
|
||||
}
|
||||
@@ -545,7 +545,7 @@ func TestHTTPTransportOptionsRequest(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestHTTPTransportDefaultConfig(t *testing.T) {
|
||||
server := NewServer(nil, log.New(io.Discard, "", 0))
|
||||
server := NewServer(nil, log.New(io.Discard, "", 0), DefaultNixOSConfig())
|
||||
transport := NewHTTPTransport(server, HTTPConfig{})
|
||||
|
||||
// Verify defaults are applied
|
||||
@@ -581,7 +581,7 @@ func TestHTTPTransportDefaultConfig(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestHTTPTransportCustomConfig(t *testing.T) {
|
||||
server := NewServer(nil, log.New(io.Discard, "", 0))
|
||||
server := NewServer(nil, log.New(io.Discard, "", 0), DefaultNixOSConfig())
|
||||
config := HTTPConfig{
|
||||
Address: "0.0.0.0:9090",
|
||||
Endpoint: "/api/mcp",
|
||||
|
||||
Reference in New Issue
Block a user