Skip to content

WebMCP: make human selection the agent handoff - #56

Merged
erinepshovel-code merged 6 commits into
mainfrom
agent/webmcp-featured-selection
Sep 2, 2026
Merged

erinepshovel-code merged 6 commits into
mainfrom
agent/webmcp-featured-selection

Conversation

@erinepshovel-code

Copy link
Copy Markdown
Contributor

Purpose

Make the WebMCP page a true shared human/agent skill-selection surface rather than a machine-oriented registry console.

Changes

  • present only msdmd metadata-block skills plus the exact meta skill to both humans and MCP agents
  • keep descriptions collapsed in native <details> controls
  • remove exact skill-name/query entry from the human path
  • selecting a card opens its description, records the exact canonical skill in visible page state and ?skill=..., and enables click-only inspect/closure actions
  • keep selection read-only: the selected skill constrains agent behavior but does not grant repository write authority
  • preserve full skill-lib as canonical source; the public adapter derives one shared curated view

hmmm

Selection is instruction, not permission. The agent still needs its own authorized tool boundary to deliver change.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 2, 2026

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-02T11:11:02.686100Z 667b0ef 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.

@erinepshovel-code
erinepshovel-code merged commit c10b66b into main Sep 2, 2026
5 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 667b0efcdb

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/webmcp/index.njk
<p class="eyebrow">WebMCP Challenge · live public surface</p>
<h1 id="webmcp-title">The Interdependency WebMCP</h1>
<p><strong>The page is the provider.</strong> Humans can browse and operate the skill registry here; WebMCP-capable browsers receive the same five operations through <code>document.modelContext.registerTool(...)</code>; remote MCP clients connect to the website-owned Render runtime.</p>
<p><strong>The page is the provider.</strong> Human and agent use the same commit-pinned skill material. A human chooses the skill; the page records that exact selection; the agent can then use the selected canonical skill with its separately authorized tools to deliver the requested change.</p>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Keep the WebMCP API copy in sync with its test

Running node --test tests/webmcp.test.mjs tests/mcp-server.test.mjs now fails because this replacement removes document.modelContext.registerTool from the page while tests/webmcp.test.mjs still requires that phrase. This makes the repository's npm test suite fail on every checkout; either preserve the API reference in this paragraph or update the assertion to match the intended copy.

Useful? React with 👍 / 👎.

Comment thread src/webmcp/index.njk
<p>These are the skills exposed by the same commit-pinned registry used by WebMCP and the remote MCP server. The description shown here is the registry's human-readable statement of when and why each skill is used.</p>
<p class="eyebrow">Human selection surface</p>
<h2 id="skill-catalog-title">Choose the skill the agent should use</h2>
<p>The public human catalogue is deliberately narrow: msdmd and its metadata-block applications first, followed by the METAPAT meta skill. Other <code>skill-lib</code> skills remain canonical and available to agents, but are not presented as primary human choices here.</p>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Stop claiming filtered skills are available to agents

For every non-meta procedural skill, such as repo-audit-repair, this statement is false for both advertised agent surfaces: browser WebMCP and the remote MCP server both use createSkillRegistry, whose new isPresentedSkill filter removes those records from list, find, inspect, and closure operations. The updated test even verifies that searching for repo-audit-repair returns nothing, so either retain these skills in the agent-facing registry or clarify that they are not available through this site's agent APIs.

Useful? React with 👍 / 👎.

Comment thread src/assets/js/webmcp.js
Comment on lines +136 to +137
url.searchParams.set('skill', skill.name);
globalThis.history.replaceState(null, '', `${url.pathname}${url.search}${url.hash}`);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Propagate the selection to the remote MCP path

When a visitor uses the advertised remote MCP path, setting ?skill= only modifies that visitor's local page URL and DOM; the remote server is stateless and its inspect/closure tools still require callers to supply an exact name. Consequently the remote agent receives no selected skill identity despite the page depicting the selection as flowing to remote MCP, so this path needs an actual handoff mechanism or must be described as browser-local only.

Useful? React with 👍 / 👎.

Comment on lines +55 to +58
for (const skill of skills) {
for (const dependency of skill.depends_on) {
if (!byName.has(dependency)) {
throw new Error(`presented skill dependency is not presented: ${skill.name} -> ${dependency}`);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Accept valid dependencies outside the presented subset

If a future metadata-block skill declares a dependency on a procedural skill other than meta, the source projection remains valid under normalizeRegistry, but this new check makes createSkillRegistry throw. Because both the browser page and remote server construct this adapter at startup, one valid cross-scope dependency from the automatically refreshed upstream registry would disable the entire public surface; either include such prerequisites when resolving closures or enforce the restriction during refresh so the verified fallback can be used.

Useful? React with 👍 / 👎.

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