Skip to content

feat: webmcp:call events + onCall hook (0.2.0) - #2

Merged
ralyodio merged 1 commit into
masterfrom
feat/call-events
Nov 11, 2026
Merged

ralyodio merged 1 commit into
masterfrom
feat/call-events

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor
  • onCall({ name, ok, ms, error? }) option on registerTool/registerTools/bridgeMcpServer/registerForms; never sees input or result; a throwing listener cannot break the tool.
  • embed.js re-emits it as a webmcp:call DOM event (incl. tools added later via window.ProfullstackWebMCP), and no-ops if loaded twice.
  • README: events + the crawlproof stats.js plugin (data-webmcp).

Tests: 14/14 unit; Chrome 155 e2e via crawlproof stats.js: tool calls arrive as webmcp_tool beacons, no query text leaked.

🤖 Generated with Claude Code

Every agent call reports { name, ok, ms, error? } (never input or result)
through options.onCall; the embed re-emits it as a webmcp:call DOM event
so analytics (crawlproof stats.js) can count tool use. Embed now guards
against loading twice (site tag + stats.js plugin).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ralyodio
ralyodio merged commit d7da3a8 into master Nov 11, 2026
1 check passed
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