Skip to content

refactor(bridge): share formatTaskResultForAgent between MCP servers - #64

Open
KazKozDev wants to merge 1 commit into
mainfrom
chore/share-task-formatter
Open

KazKozDev wants to merge 1 commit into
mainfrom
chore/share-task-formatter

Conversation

@KazKozDev

Copy link
Copy Markdown
Owner

What this changes

formatTaskResultForAgent sat in both weboperator-bridge/bridge.js (HTTP MCP) and mcp-server.js (stdio MCP), 60 lines identical character for character. It now lives once in tools.js, which both servers already import and the npm package already ships. Behaviour does not change.

Why

Two copies drift: a fix to how a finished task is summarized would reach only one transport.

How it was verified

  • ./scripts/check.sh passes locally (bridge and MCP smoke tests, 419 unit tests, lint, knip, build)
  • New test in scripts/mcp-tools.test.mjs: an answer from done, then from extracted data, a failure message and a missing task

Checklist

  • One concern per PR
  • Commit messages follow Conventional Commits
  • No docs or CHANGELOG change needed

Security-sensitive areas

  • weboperator-bridge parsing, binding, or authentication: not touched; only result formatting moved
  • None of the above

🤖 Generated with Claude Code

bridge.js (HTTP MCP) and mcp-server.js (stdio MCP) each carried the same
60-line function, character for character. It now lives once in
tools.js, which both already import and the npm package already ships,
and gets a unit test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-22T10:12:47.192524Z
We couldn’t complete this review. Comment @codex review to try again.
0329c4a PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

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.

1 participant