Skip to content

feat(mcp): McpProviderBridge + LLM persona harness from this session#1533

Merged
rubenvdlinde merged 10 commits into
integration/all-or-prsfrom
feat/mcp-personas-session-2026-05-18
May 18, 2026
Merged

feat(mcp): McpProviderBridge + LLM persona harness from this session#1533
rubenvdlinde merged 10 commits into
integration/all-or-prsfrom
feat/mcp-personas-session-2026-05-18

Conversation

@rubenvdlinde
Copy link
Copy Markdown
Contributor

Summary

Brings two pieces of work from the session that produced commit 4a60368d6 ("docs(integrations): sync 24-leaf docs+screenshots") back onto the rollup branch:

  • lib/Tool/McpProviderBridge.php — adapter from `IMcpToolProvider` → `ToolInterface` so the chat orchestrator's ToolRegistry can surface per-app MCP tools to the LLM. Depends on the `IMcpToolProvider` interface that already lives on this branch (from `71ebebdd2 feat(chat-ai): SSE streaming + IMcpToolProvider + Message.context`).
  • tests/mcp-personas/ — LLM-driven persona test harness + 11 scenarios. Self-contained PHP that drives Ollama (qwen3.5-optimized) against the live MCP endpoint; tool_succeeded asserts catch silent isError returns; pre_sql cleanup hook keeps sweeps idempotent.

Why now

The working tree was sitting on `chore/sync-integration-leaves-to-documentation` with these as untracked files. We're moving back onto `integration/all-or-prs` so the container picks up the chat-companion code (which restores the AI pin on /apps/openbuilt/); this PR preserves the session work first.

Diff vs target

  • 13 new files, 0 modifications to existing files
  • All 13 paths are local-only on this branch (target has no conflicting paths)
  • 2 commits, split code-vs-tests

Test plan

  • Tree builds — `composer check:strict` clean
  • Once `ai-chat-companion-orchestrator` is applied, re-run `php tests/mcp-personas/harness.php tests/mcp-personas/scenarios/*.json` — all 11 scenarios pass back-to-back

Notes

`McpProviderBridge` imports `OCA\OpenRegister\Mcp\IMcpToolProvider` — present on this target branch but not on `development`. The bridge is safe to merge here; merging back to development requires the orchestrator change to land first.

Adds the cobalt-background DetailHero variant + bumps to preset 1.5.1 for the full-bleed clipping fix. See https://mydash.conduction.nl/ for the live look.
# Conflicts:
#	docs/package-lock.json
#	docs/package.json
ci(docs): sync documentation branch with development
…cumentation

ci(docs): sync journeydoc tutorials
…all-or-prs

Brings the leaf-system documentation from the integration tracking
branch onto the documentation branch:

* 19 leaf doc pages (1 overview + 18 leaves) — each with LeafCard
  metadata, Pair brand diagram, What it does / Setup / Local
  verification setup (curl + JSON sample) / Configuration / Using it /
  Troubleshooting / Related sections.
* 25 PNG screenshots in docs/static/screenshots/integrations/ — each
  shows the corresponding tab active in the standalone OR
  IntegrationsView with real linked data.
* docs/Integrations/index.md reorganized to lead with the leaf system
  + per-leaf grid.
* docs/Integrations/verification-report.md — auto-generated against
  the live container with all 24 providers operational.
* leaf-system.md, pluggable-integration-registry.md, xwiki-openconnector-source.yaml
  — the umbrella references.

Source of truth: PR #1515 (integration/all-or-prs → development)
ships the lib + frontend code that backs these docs. This commit
contains docs only; the docusaurus build pipeline picks them up via
the regular documentation-branch sync.
Adapter from OCA\OpenRegister\Mcp\IMcpToolProvider to the chat
orchestrator's OCA\OpenRegister\Tool\ToolInterface. Per-app MCP tool
providers (DecideskToolProvider, OpenBuiltToolProvider, …) are
discovered + exposed via the MCP JSON-RPC endpoint, but the chat
orchestrator (ResponseGenerationHandler) feeds the LLM from
ToolRegistry which speaks ToolInterface, not IMcpToolProvider. This
bridge closes that gap: ToolRegistry registers one McpProviderBridge
per IMcpToolProvider and each provider's tool descriptors surface as
individual LLphant functions; executeFunction() forwards back through
provider->invokeTool().

Drafted during the persona-harness work in this session — depends on
ai-chat-companion-orchestrator's IMcpToolProvider interface (already
present on integration/all-or-prs but not yet on this branch's
checkout state). The bridge itself compiles standalone and is
imported only when both sides exist.
Self-contained PHP harness that drives a real LLM (Ollama, qwen3.5-optimized)
against the live OpenRegister MCP endpoint. Each scenario describes a
persona + a goal in natural language; the harness loops LLM → tool_call
→ MCP execute → tool_result until the LLM emits a final answer or hits
max_turns, then runs DB asserts to verify side effects.

Scenarios cover the full OpenBuilt authoring lifecycle (create app,
add schema, add page, add widget, add menu item, publish) and the
Decidesk meeting lifecycle (chair starts, secretary preps, coordinator
checks tasks, PM reviews recents, secretary tracks action items).

Harness features:
- tool_succeeded assert (stronger than tool_called — requires non-error
  return) to catch silent failures
- pre_sql cleanup hook for idempotent back-to-back sweeps
- direct postgres asserts via docker exec, no NC bootstrap needed

Acceptance target for ai-chat-companion-orchestrator: all 11 scenarios
must pass on a back-to-back sweep once the orchestrator's IMcpToolProvider
interface, built-in providers, ChatHealthController + ChatStreamController
are in place.
@rubenvdlinde rubenvdlinde merged commit 1329a76 into integration/all-or-prs May 18, 2026
@rubenvdlinde rubenvdlinde deleted the feat/mcp-personas-session-2026-05-18 branch May 18, 2026 08:53
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