René's URL Explorer Experiment


Title: feat(agent): list connected browser tabs and route client tool calls per tab by antfubot · Pull Request #413 · devframes/devframe · GitHub

Open Graph Title: feat(agent): list connected browser tabs and route client tool calls per tab by antfubot · Pull Request #413 · devframes/devframe

X Title: feat(agent): list connected browser tabs and route client tool calls per tab by antfubot · Pull Request #413 · devframes/devframe

Description: Closes #394. MVP of the plan discussed there. What changes With several tabs of the same app open, the MCP surface behaved as if there were one client: devframe connect lists instances per port, and in-page tools (from #376) were silently owned by whichever tab synced last. Ports the #376 bridge onto 0.10 (@devframes/agentic era): agent-flagged in-page channel functions register in a per-document browser-agent registry and sync to the node over the page's RPC connection; the node exposes them as MCP tools and relays calls back. Not yet on main, so it lands here as the foundation. Each tab reports itself with its manifest: a per-tab id (the in-page channel's existing sessionStorage-backed instance id, so it survives reloads), URL, title, visible, focused. Re-synced on connect, tool changes, and focus/blur/visibilitychange. devframe:agent:list-clients (wire devframe_agent_list-clients): built-in tool listing the connected tabs and the tool ids each exposes. Appears once a tab is connected, so a devframe with no agent surface of its own doesn't flip MCP auto-mount. Per-tab routing: tools/list stays deduped (one entry per tool id). Forwarded tools take a reserved client_id argument; an unknown id fails with the new DF0081 listing the live ids. Without client_id, the call goes to the most recently focused visible tab, falling back to the last-synced one — which is what medula's vendored patch approximated with "last sync wins". devframe connect: list-instances nests mcp.clients per instance (fetched in the same MCP session it already opens to list tools); call-tool passes client_id through. Docs: guide section, DF0080 (the #376 jsonSerializable guard, renumbered since DF0078 is taken on main) and DF0081 pages. Verification Unit tests for the routing rules (focus → visible → last synced, client_id targeting/stripping, missing id, no re-publish on focus-only re-sync). Integration test over a live dev server + real MCP client: two WS tabs, tools/list dedup + injected client_id schema, list-clients output, addressed/unaddressed/missing-id calls, focus follow. pnpm lint && pnpm knip && pnpm test && pnpm typecheck && pnpm build green (knip's remaining items are the pre-existing unbuilt-starter hints). Known limits (MVP) A duplicated tab copies sessionStorage, so two tabs can briefly share an id; targeting then picks the better-ranked one. A tab with several RPC connections (host page + dock iframes) lists once per connection. URL/title lag briefly after an SPA navigation until the next focus/visibility/tool event. Supersedes the in-page-tools part of #376 (ported and extended here). This PR was created with the help of an agent.

Open Graph Description: Closes #394. MVP of the plan discussed there. What changes With several tabs of the same app open, the MCP surface behaved as if there were one client: devframe connect lists instances per port, an...

X Description: Closes #394. MVP of the plan discussed there. What changes With several tabs of the same app open, the MCP surface behaved as if there were one client: devframe connect lists instances per port, an...

Opengraph URL: https://github.com/devframes/devframe/pull/413

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:5d3c8d59-8361-7385-ff31-8d2991b26e43
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idB1EA:375283:952BF5:D197D2:6AFB72D7
html-safe-nonce662cba05235c4df9e620fb2f2804dff040552ec52400f8333f8b768584162c56
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMUVBOjM3NTI4Mzo5NTJCRjU6RDE5N0QyOjZBRkI3MkQ3IiwidmlzaXRvcl9pZCI6IjI3MzEwMTIzMDc2NTQ3NjczMTkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacadeaffed6bd613086cbcf62a8fa402957369f3971d8a024b4cbaa5ed5cdcc735
hovercard-subject-tagpull_request:4687866225
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/devframes/devframe/pull/413/files
twitter:imagehttps://avatars.githubusercontent.com/u/291667613?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/291667613?s=400&v=4
og:image:altCloses #394. MVP of the plan discussed there. What changes With several tabs of the same app open, the MCP surface behaved as if there were one client: devframe connect lists instances per port, an...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None0e29e7974fdda2feeaf5c891efd4b23b0734b23480232b62c7bdef13f40b5b48
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/devframes/devframe git https://github.com/devframes/devframe.git
octolytics-dimension-user_id279879373
octolytics-dimension-user_logindevframes
octolytics-dimension-repository_id1231722386
octolytics-dimension-repository_nwodevframes/devframe
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1231722386
octolytics-dimension-repository_network_root_nwodevframes/devframe
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release2e8872b770cc4d5d0cc1f2026afab747a268e2ce
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/devframes/devframe/pull/413/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdevframes%2Fdevframe%2Fpull%2F413%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdevframes%2Fdevframe%2Fpull%2F413%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=devframes%2Fdevframe
Reloadhttps://github.com/devframes/devframe/pull/413/files
Reloadhttps://github.com/devframes/devframe/pull/413/files
Reloadhttps://github.com/devframes/devframe/pull/413/files
devframeshttps://github.com/devframes
devframehttps://github.com/devframes/devframe
Codehttps://github.com/devframes/devframe
Issues12 (12)https://github.com/devframes/devframe/issues
Pull requests13 (13)https://github.com/devframes/devframe/pulls
Actionshttps://github.com/devframes/devframe/actions
Security and qualityhttps://github.com/devframes/devframe/security
Insightshttps://github.com/devframes/devframe/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fdevframes%2Fdevframe%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fdevframes%2Fdevframe%2Fissues%2Fnew%2Fchoose
antfuhttps://github.com/antfu
mainhttps://github.com/devframes/devframe/tree/main
feat/mcp-list-client-tabshttps://github.com/devframes/devframe/tree/feat/mcp-list-client-tabs
Conversation 3 https://github.com/devframes/devframe/pull/413
Commits 2 https://github.com/devframes/devframe/pull/413/commits
Checks 13 https://github.com/devframes/devframe/pull/413/checks
Files changed https://github.com/devframes/devframe/pull/413/files
Please reload this pagehttps://github.com/devframes/devframe/pull/413/files
feat(agent): list connected browser tabs and route client tool calls per tab https://github.com/devframes/devframe/pull/413/files#top
Show all changes 2 commits https://github.com/devframes/devframe/pull/413/files
0077dd9 feat(agent): list connected browser tabs and route client tool calls … antfubot Sep 30, 2026 https://github.com/devframes/devframe/pull/413/commits/0077dd9a2b93aec9cac65f010e5b15e869a98f92
51cbf58 test(agent): cover every tab-routing rule found load-bearing by ablation antfubot Oct 28, 2026 https://github.com/devframes/devframe/pull/413/commits/51cbf58d4e54a00cf2600f4adaa82af239da3cf8
Clear filters https://github.com/devframes/devframe/pull/413/files
Please reload this pagehttps://github.com/devframes/devframe/pull/413/files
Please reload this pagehttps://github.com/devframes/devframe/pull/413/files
12.in-page-channel.md https://github.com/devframes/devframe/pull/413/files#diff-f9e65433663b743c562bf4965a8d919433975fed38a5feea0822e059e63ef38a
15.agent-native.md https://github.com/devframes/devframe/pull/413/files#diff-256cfb005765d3bb9564fe00fb2221c0453f7f4c809809eac90cd691096cc40b
DF0082.md https://github.com/devframes/devframe/pull/413/files#diff-9697d51edebd85b1af55214deb775b8f2d07cdb412062f9a0b90f6e52f615351
index.md https://github.com/devframes/devframe/pull/413/files#diff-98be74a69c00df291caec3fa9122f7b7afc74b917b7ea8714472bdd2b7fd23f8
index.ts https://github.com/devframes/devframe/pull/413/files#diff-f18c39ffd3fca9c92a3ac88b95c2477740443efa0acc2ff50b076f975d3b7381
mcp-client-tools.test.ts https://github.com/devframes/devframe/pull/413/files#diff-84c0cc07c716eb735debace36c9336ac888f2a568c9afd5e250e2da359566816
browser-agent-rpc.test.ts https://github.com/devframes/devframe/pull/413/files#diff-ca82cb44010732905906b4021233c5ca2ada622ede4a8ba0d70ba0f8100bb36a
browser-agent-rpc.ts https://github.com/devframes/devframe/pull/413/files#diff-df159bfe8c07549ccd1c65b04a1f3ecfa7c4698007d81c0961b2c3fd6966f854
browser-agent.ts https://github.com/devframes/devframe/pull/413/files#diff-e71b218749f10d73e070169373789fcd5443e8066856b34f75b755a474cdb41d
index.ts https://github.com/devframes/devframe/pull/413/files#diff-72dbffb2b642032c03600440619d44cbe1c09da87b2f0f3fcde6f0f68969560e
client-agent.test.ts https://github.com/devframes/devframe/pull/413/files#diff-f011bbb69befc8701d8e32ebee029fa3dce8885b86971ff3a8572b75b786744e
client-agent.ts https://github.com/devframes/devframe/pull/413/files#diff-9545f7e64de7b4dd41faf4eaacd8a47bfa6b5877bcefa55234524052f54d1389
diagnostics.ts https://github.com/devframes/devframe/pull/413/files#diff-509316a0571ce8effd61922fd33d28e974c8cb509b3d59a3fdb15a5ee20bdc3f
agent-sync-client-tools.ts https://github.com/devframes/devframe/pull/413/files#diff-0171a07bf76e47e1170472faca9d1ac6c0323ec41be7f0785d6fe52af24b94f2
index.ts https://github.com/devframes/devframe/pull/413/files#diff-8b972b84e23027d156f6cc30d080b6c100ea270b1978c9777d59f0ebb51d4578
rpc-augments.ts https://github.com/devframes/devframe/pull/413/files#diff-0135bad2e2bf47805db160f6e9daf5a631a5d5362f3bb793cc546e021f672378
index.snapshot.d.ts https://github.com/devframes/devframe/pull/413/files#diff-e36c6d402239a03e9a6e3a7c285d18780f3584e9dd275c7e5220a6fc41fb160d
internal.snapshot.d.ts https://github.com/devframes/devframe/pull/413/files#diff-cf90d6f74b3f49997e90ee080ce227993bfabf8fadfa4f1d20f7644c507b10d0
internal.snapshot.js https://github.com/devframes/devframe/pull/413/files#diff-8a4cb2424cc69992ffad201b9ba00373e932f4a1a17138220fff449eb9108dc3
docs/content/1.guide/12.in-page-channel.mdhttps://github.com/devframes/devframe/pull/413/files#diff-f9e65433663b743c562bf4965a8d919433975fed38a5feea0822e059e63ef38a
View file https://github.com/devframes/devframe/blob/51cbf58d4e54a00cf2600f4adaa82af239da3cf8/docs/content/1.guide/12.in-page-channel.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/devframes/devframe/pull/413/{{ revealButtonHref }}
https://github.com/devframes/devframe/pull/413/files#diff-f9e65433663b743c562bf4965a8d919433975fed38a5feea0822e059e63ef38a
https://github.com/devframes/devframe/pull/413/files#diff-f9e65433663b743c562bf4965a8d919433975fed38a5feea0822e059e63ef38a
docs/content/1.guide/15.agent-native.mdhttps://github.com/devframes/devframe/pull/413/files#diff-256cfb005765d3bb9564fe00fb2221c0453f7f4c809809eac90cd691096cc40b
View file https://github.com/devframes/devframe/blob/51cbf58d4e54a00cf2600f4adaa82af239da3cf8/docs/content/1.guide/15.agent-native.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/devframes/devframe/pull/413/{{ revealButtonHref }}
https://github.com/devframes/devframe/pull/413/files#diff-256cfb005765d3bb9564fe00fb2221c0453f7f4c809809eac90cd691096cc40b
https://github.com/devframes/devframe/pull/413/files#diff-256cfb005765d3bb9564fe00fb2221c0453f7f4c809809eac90cd691096cc40b
docs/content/6.errors/DF0082.mdhttps://github.com/devframes/devframe/pull/413/files#diff-9697d51edebd85b1af55214deb775b8f2d07cdb412062f9a0b90f6e52f615351
View file https://github.com/devframes/devframe/blob/51cbf58d4e54a00cf2600f4adaa82af239da3cf8/docs/content/6.errors/DF0082.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/devframes/devframe/pull/413/{{ revealButtonHref }}
docs/content/6.errors/index.mdhttps://github.com/devframes/devframe/pull/413/files#diff-98be74a69c00df291caec3fa9122f7b7afc74b917b7ea8714472bdd2b7fd23f8
View file https://github.com/devframes/devframe/blob/51cbf58d4e54a00cf2600f4adaa82af239da3cf8/docs/content/6.errors/index.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/devframes/devframe/pull/413/{{ revealButtonHref }}
https://github.com/devframes/devframe/pull/413/files#diff-98be74a69c00df291caec3fa9122f7b7afc74b917b7ea8714472bdd2b7fd23f8
https://github.com/devframes/devframe/pull/413/files#diff-98be74a69c00df291caec3fa9122f7b7afc74b917b7ea8714472bdd2b7fd23f8
packages/agentic/src/connect/index.tshttps://github.com/devframes/devframe/pull/413/files#diff-f18c39ffd3fca9c92a3ac88b95c2477740443efa0acc2ff50b076f975d3b7381
View file https://github.com/devframes/devframe/blob/51cbf58d4e54a00cf2600f4adaa82af239da3cf8/packages/agentic/src/connect/index.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/devframes/devframe/pull/413/{{ revealButtonHref }}
https://github.com/devframes/devframe/pull/413/files#diff-f18c39ffd3fca9c92a3ac88b95c2477740443efa0acc2ff50b076f975d3b7381
https://github.com/devframes/devframe/pull/413/files#diff-f18c39ffd3fca9c92a3ac88b95c2477740443efa0acc2ff50b076f975d3b7381
https://github.com/devframes/devframe/pull/413/files#diff-f18c39ffd3fca9c92a3ac88b95c2477740443efa0acc2ff50b076f975d3b7381
https://github.com/devframes/devframe/pull/413/files#diff-f18c39ffd3fca9c92a3ac88b95c2477740443efa0acc2ff50b076f975d3b7381
https://github.com/devframes/devframe/pull/413/files#diff-f18c39ffd3fca9c92a3ac88b95c2477740443efa0acc2ff50b076f975d3b7381
https://github.com/devframes/devframe/pull/413/files#diff-f18c39ffd3fca9c92a3ac88b95c2477740443efa0acc2ff50b076f975d3b7381
https://github.com/devframes/devframe/pull/413/files#diff-f18c39ffd3fca9c92a3ac88b95c2477740443efa0acc2ff50b076f975d3b7381
https://github.com/devframes/devframe/pull/413/files#diff-f18c39ffd3fca9c92a3ac88b95c2477740443efa0acc2ff50b076f975d3b7381
https://github.com/devframes/devframe/pull/413/files#diff-f18c39ffd3fca9c92a3ac88b95c2477740443efa0acc2ff50b076f975d3b7381
packages/agentic/src/mcp/__tests__/mcp-client-tools.test.tshttps://github.com/devframes/devframe/pull/413/files#diff-84c0cc07c716eb735debace36c9336ac888f2a568c9afd5e250e2da359566816
View file https://github.com/devframes/devframe/blob/51cbf58d4e54a00cf2600f4adaa82af239da3cf8/packages/agentic/src/mcp/__tests__/mcp-client-tools.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/devframes/devframe/pull/413/{{ revealButtonHref }}
packages/devframe/src/client/browser-agent-rpc.test.tshttps://github.com/devframes/devframe/pull/413/files#diff-ca82cb44010732905906b4021233c5ca2ada622ede4a8ba0d70ba0f8100bb36a
View file https://github.com/devframes/devframe/blob/51cbf58d4e54a00cf2600f4adaa82af239da3cf8/packages/devframe/src/client/browser-agent-rpc.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/devframes/devframe/pull/413/{{ revealButtonHref }}
https://github.com/devframes/devframe/pull/413/files#diff-ca82cb44010732905906b4021233c5ca2ada622ede4a8ba0d70ba0f8100bb36a
https://github.com/devframes/devframe/pull/413/files#diff-ca82cb44010732905906b4021233c5ca2ada622ede4a8ba0d70ba0f8100bb36a
Please reload this pagehttps://github.com/devframes/devframe/pull/413/files
Please reload this pagehttps://github.com/devframes/devframe/pull/413/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.