René's URL Explorer Experiment


Title: feat(agentic): add `--base` to `devframe connect` port probes by zahidzorbaz · Pull Request #405 · devframes/devframe · GitHub

Open Graph Title: feat(agentic): add `--base` to `devframe connect` port probes by zahidzorbaz · Pull Request #405 · devframes/devframe

X Title: feat(agentic): add `--base` to `devframe connect` port probes by zahidzorbaz · Pull Request #405 · devframes/devframe

Description: Description devframe connect --port couldn't reach a devframe mounted below the root of its host, such as Vite DevTools at /__devtools/. When it failed, it reported the misleading DF0051 ("no MCP endpoint, restart with --mcp"). This PR fixes both parts of the problem. fix(devframe): only accept a JSON object as connection meta. probeDevframeOrigin counted any 2xx answer as a devframe and fell back to {} for an unparseable body. A host with an SPA fallback (Vite serving index.html) therefore passed as a devframe with no MCP route. A candidate now counts only when it answers with a JSON object. With this change: a --port probe on the wrong path yields "no instance" (DF0050) instead of a phantom mcp: null instance; registry liveness checks prune a stale record whose port now serves an unrelated app. feat(agentic): --base for devframe connect port probes. There is a new base option in ConnectServerOptions, exposed as the --base CLI flag (default /). The explicit port probes look for __connection.json under that base. The advertised MCP path is resolved against the same base, as instance-shell already does for registry records. No mount path is hardcoded. Registry records keep their own basePath and ignore --base. The CLI help, the "no instances" hint and the MCP adapter's Discovery section document the flag. probePort is exported for focused tests, following the precedent of resolveAuthToken and buildInstanceRequestHeaders, and the tsnapi snapshot for @devframes/agentic/connect is updated to match. Verified against a live Vite 8.3 + @vitejs/devtools 0.7.5 dev server with an empty registry: before after --port 5174 phantom port-5174, mcp: null, call-tool → DF0051 no instance, call-tool → DF0050 --port 5174 --base /__devtools/ flag doesn't exist mcp.url …/__devtools/__mcp, 11 tools, read-only call-tool succeeds Linked Issues Closes #403 Additional context vitejs/devtools#579 (merged, not yet released) registers Vite DevTools in the instance registry, so default discovery will work there once it ships. This PR covers the --port fallback and the probe itself. Tests: instance-registry.test.ts covers an HTML SPA fallback, a non-object JSON body, meta under a non-root base, and pruning a record whose port serves an SPA. connect.test.ts covers probePort with a base, base normalization, and a root that serves only the SPA fallback. cli/main.test.ts checks the help output. The registry tests fail on main. The new probePort tests fail on main only because probePort isn't exported there. Gates run locally on Windows 11 / Node 24.21: pnpm lint, pnpm knip, pnpm typecheck and pnpm build pass. pnpm test has two failures unrelated to this change: tests/exports.test.ts > devframe > dts: ./internal also fails on a clean main checkout. It's an ordering difference in the snapshot (importAgenticMcp sorted differently). This PR doesn't touch that snapshot. src/utils/serve-static.test.ts hits intermittent ETIMEDOUT connecting to its local server under full-suite load. A different test fails on each run, and the file passes on its own, both on main and on this branch. 🤖 Generated with Claude Code

Open Graph Description: Description devframe connect --port <n> couldn't reach a devframe mounted below the root of its host, such as Vite DevTools at /__devtools/. When it failed, it reported the misleading DF0...

X Description: Description devframe connect --port &lt;n&gt; couldn&#39;t reach a devframe mounted below the root of its host, such as Vite DevTools at /__devtools/. When it failed, it reported the mi...

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

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:d61238c2-9ab8-d095-0953-6a67fb103fb4
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idE86A:25245F:13B2176:1AEA9EF:6AFB72EC
html-safe-nonceb4499c362829de6363d9f885cd4971421330336d41762144027b36cb721ab9c9
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFODZBOjI1MjQ1RjoxM0IyMTc2OjFBRUE5RUY6NkFGQjcyRUMiLCJ2aXNpdG9yX2lkIjoiNDA0NzExMjE4MTU4OTkwMDYwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac17229725b5452778ed423b7429e566d046d84daff8c9534f1d592a91c9f64056
hovercard-subject-tagpull_request:4624171921
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/405/files
twitter:imagehttps://avatars.githubusercontent.com/u/12610787?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/12610787?s=400&v=4
og:image:altDescription devframe connect --port <n> couldn't reach a devframe mounted below the root of its host, such as Vite DevTools at /__devtools/. When it failed, it reported the misleading DF0...
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/405/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdevframes%2Fdevframe%2Fpull%2F405%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%2F405%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/405/files
Reloadhttps://github.com/devframes/devframe/pull/405/files
Reloadhttps://github.com/devframes/devframe/pull/405/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
devframes:mainhttps://github.com/devframes/devframe/tree/main
zahidzorbaz:fix/connect-base-pathhttps://github.com/zahidzorbaz/devframe/tree/fix/connect-base-path
Conversation 2 https://github.com/devframes/devframe/pull/405
Commits 2 https://github.com/devframes/devframe/pull/405/commits
Checks 12 https://github.com/devframes/devframe/pull/405/checks
Files changed https://github.com/devframes/devframe/pull/405/files
Please reload this pagehttps://github.com/devframes/devframe/pull/405/files
feat(agentic): add --base to devframe connect port probes https://github.com/devframes/devframe/pull/405/files#top
Show all changes 2 commits https://github.com/devframes/devframe/pull/405/files
b2574ce fix(devframe): only accept a JSON object as connection meta zahidzorbaz Sep 24, 2026 https://github.com/devframes/devframe/pull/405/commits/b2574ce2230c0c8a3befccc5dbaba92d60159f7b
f8ee937 feat(agentic): add `--base` to `devframe connect` port probes zahidzorbaz Sep 24, 2026 https://github.com/devframes/devframe/pull/405/commits/f8ee937b6886c30b300ea041ab66705a6313af43
Clear filters https://github.com/devframes/devframe/pull/405/files
Please reload this pagehttps://github.com/devframes/devframe/pull/405/files
Please reload this pagehttps://github.com/devframes/devframe/pull/405/files
7.mcp.md https://github.com/devframes/devframe/pull/405/files#diff-769d96ffd948ba24074be6c6f8b457d5b1cd3df1633a14a996aa98344bc95b57
connect.test.ts https://github.com/devframes/devframe/pull/405/files#diff-3d66b1caf39aec4bf5210c39b0d423c78e810e8a28fb8a08ec4c99830bb29c67
index.ts https://github.com/devframes/devframe/pull/405/files#diff-f18c39ffd3fca9c92a3ac88b95c2477740443efa0acc2ff50b076f975d3b7381
main.test.ts https://github.com/devframes/devframe/pull/405/files#diff-17fff315d8632e54202074e882d1b16d20274cedcf4317658bc41faaea8321fc
main.ts https://github.com/devframes/devframe/pull/405/files#diff-d5ecc953307808823e35418f847f503347cf9b596ec568e4dd63ca5c05c68ef2
instance-registry.test.ts https://github.com/devframes/devframe/pull/405/files#diff-a6ff48a136706b48069a0d56784332b0e1bae262c45adc7a5eac72218b33b40f
instance-registry.ts https://github.com/devframes/devframe/pull/405/files#diff-b15943546f7483122424bc5feb245ce136caefdbd57d167a3727b0ecfb645373
connect.snapshot.d.ts https://github.com/devframes/devframe/pull/405/files#diff-eb3ab008c9a671710157726957636bf19848faf4965ed77e069fc9a39188fdab
connect.snapshot.js https://github.com/devframes/devframe/pull/405/files#diff-6c759f8f4c27c54523a3e8bdbfdaccf80f2ba72cc153f574c93eae7838a3b0fc
docs/content/2.adapters/7.mcp.mdhttps://github.com/devframes/devframe/pull/405/files#diff-769d96ffd948ba24074be6c6f8b457d5b1cd3df1633a14a996aa98344bc95b57
View file https://github.com/zahidzorbaz/devframe/blob/f8ee937b6886c30b300ea041ab66705a6313af43/docs/content/2.adapters/7.mcp.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/devframes/devframe/pull/405/{{ revealButtonHref }}
https://github.com/devframes/devframe/pull/405/files#diff-769d96ffd948ba24074be6c6f8b457d5b1cd3df1633a14a996aa98344bc95b57
https://github.com/devframes/devframe/pull/405/files#diff-769d96ffd948ba24074be6c6f8b457d5b1cd3df1633a14a996aa98344bc95b57
packages/agentic/src/connect/__tests__/connect.test.tshttps://github.com/devframes/devframe/pull/405/files#diff-3d66b1caf39aec4bf5210c39b0d423c78e810e8a28fb8a08ec4c99830bb29c67
View file https://github.com/zahidzorbaz/devframe/blob/f8ee937b6886c30b300ea041ab66705a6313af43/packages/agentic/src/connect/__tests__/connect.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/devframes/devframe/pull/405/{{ revealButtonHref }}
https://github.com/devframes/devframe/pull/405/files#diff-3d66b1caf39aec4bf5210c39b0d423c78e810e8a28fb8a08ec4c99830bb29c67
https://github.com/devframes/devframe/pull/405/files#diff-3d66b1caf39aec4bf5210c39b0d423c78e810e8a28fb8a08ec4c99830bb29c67
https://github.com/devframes/devframe/pull/405/files#diff-3d66b1caf39aec4bf5210c39b0d423c78e810e8a28fb8a08ec4c99830bb29c67
packages/agentic/src/connect/index.tshttps://github.com/devframes/devframe/pull/405/files#diff-f18c39ffd3fca9c92a3ac88b95c2477740443efa0acc2ff50b076f975d3b7381
View file https://github.com/zahidzorbaz/devframe/blob/f8ee937b6886c30b300ea041ab66705a6313af43/packages/agentic/src/connect/index.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/devframes/devframe/pull/405/{{ revealButtonHref }}
https://github.com/devframes/devframe/pull/405/files#diff-f18c39ffd3fca9c92a3ac88b95c2477740443efa0acc2ff50b076f975d3b7381
https://github.com/devframes/devframe/pull/405/files#diff-f18c39ffd3fca9c92a3ac88b95c2477740443efa0acc2ff50b076f975d3b7381
https://github.com/devframes/devframe/pull/405/files#diff-f18c39ffd3fca9c92a3ac88b95c2477740443efa0acc2ff50b076f975d3b7381
https://github.com/devframes/devframe/pull/405/files#diff-f18c39ffd3fca9c92a3ac88b95c2477740443efa0acc2ff50b076f975d3b7381
https://github.com/devframes/devframe/pull/405/files#diff-f18c39ffd3fca9c92a3ac88b95c2477740443efa0acc2ff50b076f975d3b7381
https://github.com/devframes/devframe/pull/405/files#diff-f18c39ffd3fca9c92a3ac88b95c2477740443efa0acc2ff50b076f975d3b7381
packages/devframe/src/cli/main.test.tshttps://github.com/devframes/devframe/pull/405/files#diff-17fff315d8632e54202074e882d1b16d20274cedcf4317658bc41faaea8321fc
View file https://github.com/zahidzorbaz/devframe/blob/f8ee937b6886c30b300ea041ab66705a6313af43/packages/devframe/src/cli/main.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/devframes/devframe/pull/405/{{ revealButtonHref }}
https://github.com/devframes/devframe/pull/405/files#diff-17fff315d8632e54202074e882d1b16d20274cedcf4317658bc41faaea8321fc
packages/devframe/src/cli/main.tshttps://github.com/devframes/devframe/pull/405/files#diff-d5ecc953307808823e35418f847f503347cf9b596ec568e4dd63ca5c05c68ef2
View file https://github.com/zahidzorbaz/devframe/blob/f8ee937b6886c30b300ea041ab66705a6313af43/packages/devframe/src/cli/main.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/devframes/devframe/pull/405/{{ revealButtonHref }}
https://github.com/devframes/devframe/pull/405/files#diff-d5ecc953307808823e35418f847f503347cf9b596ec568e4dd63ca5c05c68ef2
https://github.com/devframes/devframe/pull/405/files#diff-d5ecc953307808823e35418f847f503347cf9b596ec568e4dd63ca5c05c68ef2
https://github.com/devframes/devframe/pull/405/files#diff-d5ecc953307808823e35418f847f503347cf9b596ec568e4dd63ca5c05c68ef2
https://github.com/devframes/devframe/pull/405/files#diff-d5ecc953307808823e35418f847f503347cf9b596ec568e4dd63ca5c05c68ef2
packages/devframe/src/node/instance-registry.test.tshttps://github.com/devframes/devframe/pull/405/files#diff-a6ff48a136706b48069a0d56784332b0e1bae262c45adc7a5eac72218b33b40f
View file https://github.com/zahidzorbaz/devframe/blob/f8ee937b6886c30b300ea041ab66705a6313af43/packages/devframe/src/node/instance-registry.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/devframes/devframe/pull/405/{{ revealButtonHref }}
https://github.com/devframes/devframe/pull/405/files#diff-a6ff48a136706b48069a0d56784332b0e1bae262c45adc7a5eac72218b33b40f
https://github.com/devframes/devframe/pull/405/files#diff-a6ff48a136706b48069a0d56784332b0e1bae262c45adc7a5eac72218b33b40f
https://github.com/devframes/devframe/pull/405/files#diff-a6ff48a136706b48069a0d56784332b0e1bae262c45adc7a5eac72218b33b40f
packages/devframe/src/node/instance-registry.tshttps://github.com/devframes/devframe/pull/405/files#diff-b15943546f7483122424bc5feb245ce136caefdbd57d167a3727b0ecfb645373
View file https://github.com/zahidzorbaz/devframe/blob/f8ee937b6886c30b300ea041ab66705a6313af43/packages/devframe/src/node/instance-registry.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/devframes/devframe/pull/405/{{ revealButtonHref }}
https://github.com/devframes/devframe/pull/405/files#diff-b15943546f7483122424bc5feb245ce136caefdbd57d167a3727b0ecfb645373
https://github.com/devframes/devframe/pull/405/files#diff-b15943546f7483122424bc5feb245ce136caefdbd57d167a3727b0ecfb645373
https://github.com/devframes/devframe/pull/405/files#diff-b15943546f7483122424bc5feb245ce136caefdbd57d167a3727b0ecfb645373
tests/__snapshots__/tsnapi/@devframes/agentic/connect.snapshot.d.tshttps://github.com/devframes/devframe/pull/405/files#diff-eb3ab008c9a671710157726957636bf19848faf4965ed77e069fc9a39188fdab
View file https://github.com/zahidzorbaz/devframe/blob/f8ee937b6886c30b300ea041ab66705a6313af43/tests/__snapshots__/tsnapi/%40devframes/agentic/connect.snapshot.d.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/devframes/devframe/pull/405/{{ revealButtonHref }}
https://github.com/devframes/devframe/pull/405/files#diff-eb3ab008c9a671710157726957636bf19848faf4965ed77e069fc9a39188fdab
https://github.com/devframes/devframe/pull/405/files#diff-eb3ab008c9a671710157726957636bf19848faf4965ed77e069fc9a39188fdab
tests/__snapshots__/tsnapi/@devframes/agentic/connect.snapshot.jshttps://github.com/devframes/devframe/pull/405/files#diff-6c759f8f4c27c54523a3e8bdbfdaccf80f2ba72cc153f574c93eae7838a3b0fc
View file https://github.com/zahidzorbaz/devframe/blob/f8ee937b6886c30b300ea041ab66705a6313af43/tests/__snapshots__/tsnapi/%40devframes/agentic/connect.snapshot.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/devframes/devframe/pull/405/{{ revealButtonHref }}
https://github.com/devframes/devframe/pull/405/files#diff-6c759f8f4c27c54523a3e8bdbfdaccf80f2ba72cc153f574c93eae7838a3b0fc
Please reload this pagehttps://github.com/devframes/devframe/pull/405/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.