Skip to content

feat(plugin): add runtime mode detection utility (#1211)#1217

Merged
JeremyDev87 merged 1 commit into
masterfrom
taskmaestro/1775225492/pane-1
Apr 3, 2026
Merged

feat(plugin): add runtime mode detection utility (#1211)#1217
JeremyDev87 merged 1 commit into
masterfrom
taskmaestro/1775225492/pane-1

Conversation

@JeremyDev87

Copy link
Copy Markdown
Owner

Summary

  • New hooks/lib/runtime_mode.py with detect_runtime_mode() and is_mcp_available()
  • Checks ~/.claude/mcp.json for codingbuddy MCP server entry
  • Returns "mcp" or "standalone" — gracefully handles missing file, parse errors, absent keys
  • Foundation for standalone mode support in prompt injection, health check, and user-prompt-submit hooks

Test plan

  • 8 pytest cases: codingbuddy entry, codingbuddy-rules (case-insensitive), no match, missing file, parse error, missing mcpServers key, is_mcp_available true/false
  • TypeScript type-check passes
  • Full workspace: 234 test files, 5822 tests passed

Closes #1211

New hooks/lib/runtime_mode.py with detect_runtime_mode() and
is_mcp_available() — checks ~/.claude/mcp.json for codingbuddy
MCP server entry to distinguish MCP vs standalone environments.

Gracefully handles missing file, parse errors, and absent keys.
8 pytest cases cover all detection paths.
@vercel

vercel Bot commented Apr 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
codingbuddy-landing Ready Ready Preview, Comment Apr 3, 2026 2:19pm

@JeremyDev87 JeremyDev87 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Review complete — all comments addressed

Code Review:

  • runtime_mode.py: clean utility with detect_runtime_mode() + is_mcp_available()
  • Case-insensitive key matching for mcp.json entries
  • Graceful fallback to "standalone" on all error paths
  • test_runtime_mode.py: 8 tests covering mcp detection, standalone fallback, parse errors, missing file
  • No unused imports, no dead code
  • CI: 28/28 checks pass

LGTM

@JeremyDev87 JeremyDev87 self-assigned this Apr 3, 2026
@JeremyDev87 JeremyDev87 merged commit d347b22 into master Apr 3, 2026
28 checks passed
@JeremyDev87 JeremyDev87 deleted the taskmaestro/1775225492/pane-1 branch April 3, 2026 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(plugin): add runtime mode detection utility (standalone vs MCP)

1 participant