Skip to content

refactor(mcp): centralize version banner metadata#85

Merged
steipete merged 2 commits intosteipete:mainfrom
0xble:upstream-refactor-mcp-version
Mar 13, 2026
Merged

refactor(mcp): centralize version banner metadata#85
steipete merged 2 commits intosteipete:mainfrom
0xble:upstream-refactor-mcp-version

Conversation

@0xble
Copy link
Contributor

@0xble 0xble commented Feb 28, 2026

Summary

  • add a single source of truth for MCP version metadata (PeekabooMCPVersion)
  • replace hardcoded Peekaboo MCP 3.0.0-beta4 strings across MCP tool descriptions
  • use centralized version constants in MCP server identity and list --item_type server_status
  • add regression tests ensuring list tool description and server status output use centralized version metadata

Why

MCP version strings were duplicated across many files. This causes drift and confusion (e.g. mixed/stale beta labels) and makes version updates error-prone.

Changes

  • Core/PeekabooCore/Sources/PeekabooAgentRuntime/MCP/PeekabooMCPVersion.swift
    • new centralized metadata:
      • serverName
      • current
      • banner
  • PeekabooMCPServer.swift
    • replace hardcoded serverName/serverVersion
  • MCP tool files (analyze/click/dock/drag/hotkey/list/agent/menu/move/permissions/scroll/see/sleep/space/swipe/type/window)
    • replace hardcoded Peekaboo MCP 3.0.0-beta4 with \(PeekabooMCPVersion.banner)
  • MCPToolExecutionTests.swift
    • add tests to verify:
      • ListTool.description includes PeekabooMCPVersion.banner
      • server_status output includes Version: \(PeekabooMCPVersion.current)

Validation

  • swift test --package-path Core/PeekabooCore --filter MCPToolExecutionTests --no-parallel (passed)
  • swift test --package-path Core/PeekabooCore --filter MCPToolDescriptionTests --no-parallel (passed)
  • swift test --package-path Core/PeekabooCore --filter PeekabooMCPServerTests --no-parallel (passed)
  • swift test --package-path Core/PeekabooCore --filter MCP --no-parallel (blocked)
    • fails on pre-existing MCPSpecificToolTests dialog schema expectations (window/index), unrelated to this change set.

nerveband added a commit to nerveband/Peekaboo that referenced this pull request Mar 7, 2026
@steipete steipete force-pushed the upstream-refactor-mcp-version branch from a57d474 to d591eba Compare March 13, 2026 03:48
@steipete steipete merged commit 9261ddf into steipete:main Mar 13, 2026
1 of 2 checks passed
@steipete
Copy link
Owner

Landed via temp rebase onto main.

  • Gate: pnpm run lint && pnpm run build:cli && pnpm run test:safe
  • Land commit: d591eba57c1ef18b8d3d24ad61215815b3eeb5f4
  • Merge commit: 9261ddf

Thanks @0xble!

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.

2 participants