Skip to content

Add missing mcp-client.mjs to services directory#4

Open
yourfriendfitz wants to merge 1 commit intoengindearing-projects:mainfrom
yourfriendfitz:fix/homebrew-packaging-issue-3
Open

Add missing mcp-client.mjs to services directory#4
yourfriendfitz wants to merge 1 commit intoengindearing-projects:mainfrom
yourfriendfitz:fix/homebrew-packaging-issue-3

Conversation

@yourfriendfitz
Copy link
Copy Markdown

Summary

  • Adds the missing mcp-client.mjs module to services/, which is imported by tools.mjs and claude-sessions.mjs
  • Without this file, the gateway crashes on startup: Cannot find module './mcp-client.mjs'

Additional context

This is part of the fix for #3. The gateway crash was caused by two issues:

  1. This repo: services/mcp-client.mjs was never committed (fixed by this PR)
  2. homebrew-tap repo: The Homebrew formula flattens the apps/cli/ directory structure into libexec/, breaking relative imports that reference ../../../../shared/ or ../apps/cli/lib/. The formula at engindearing-projects/homebrew-tap needs a separate fix to either:
    • Preserve the apps/cli/ directory prefix in libexec/
    • Or rewrite imports during packaging

Homebrew formula fix needed (separate PR to homebrew-tap)

The current formula does:

libexec.install "apps/cli/bin", "apps/cli/commands", "apps/cli/lib",
                "apps/cli/src", "apps/cli/tui", "apps/cli/package.json"

This should instead preserve the monorepo path:

(libexec/"apps/cli").install Dir["apps/cli/*"]

And update the wrapper script to point at the correct entry:

(bin/"familiar").write <<~SH
  #!/bin/bash
  export FAMILIAR_PROJECT_DIR="#{libexec}"
  exec bun "#{libexec}/apps/cli/bin/familiar.mjs" "$@"
SH

Test plan

  • Run familiar doctor — gateway should start without module errors
  • Run familiar status — all services healthy
  • Run familiar — TUI launches

Closes #3

🤖 Generated with Claude Code

The MCP client module was missing from services/, causing the gateway
to crash on startup with "Cannot find module './mcp-client.mjs'".
This file is imported by tools.mjs and claude-sessions.mjs.

Closes engindearing-projects#3

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Homebrew formula has broken import paths due to flattened monorepo structure

1 participant