Skip to content

Commit e3271d8

Browse files
committed
Merge remote-tracking branch 'origin/main' into fix/authenticate-mcp-http
# Conflicts: # packages/devframe/src/adapters/mcp/fetch.ts
2 parents f7b7c1e + d719612 commit e3271d8

51 files changed

Lines changed: 1386 additions & 2076 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

alias.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export const alias = {
3434
'devframe/utils/nanoid': r('devframe/src/utils/nanoid.ts'),
3535
'devframe/utils/nostics': r('devframe/src/utils/nostics.ts'),
3636
'devframe/utils/open': r('devframe/src/utils/open.ts'),
37+
'devframe/utils/origin': r('devframe/src/utils/origin.ts'),
3738
'devframe/utils/remote-assets': r('devframe/src/utils/remote-assets.ts'),
3839
'devframe/utils/simple-schema': r('devframe/src/utils/simple-schema.ts'),
3940
'devframe/utils/serve-static': r('devframe/src/utils/serve-static.ts'),

docs/app/app.config.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ export default defineAppConfig({
99
title: 'Devframe',
1010
logo: {
1111
alt: 'Devframe',
12-
light: '/logo.svg',
13-
dark: '/logo.svg',
12+
mark: 'devframe',
1413
},
1514
nav: [
1615
{
@@ -127,12 +126,6 @@ export default defineAppConfig({
127126
items: ['/guide/built-with'],
128127
},
129128
],
130-
posts: [
131-
{
132-
title: 'Blog',
133-
items: ['/posts/pluggable-extensible-playful-devtools'],
134-
},
135-
],
136129
},
137130
ogImage: {
138131
tagline: 'Build a devtool once. Mount it anywhere.',

docs/app/components/LogoMark.vue

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<script setup lang="ts">
2+
defineProps<{
3+
name?: string
4+
}>()
5+
</script>
6+
7+
<template>
8+
<svg class="h-6 w-auto" viewBox="0 0 500 500" fill="none" xmlns="http://www.w3.org/2000/svg">
9+
<g filter="url(#filter0_d_8_208)">
10+
<path d="M238.464 40H66V236.007H104.577C220.688 236.007 232.79 158.437 232.79 121.733C232.79 108.867 243.38 108.867 243.38 121.733C251.318 236.701 356.35 245.457 365.527 246.223L365.542 246.224C374.619 246.981 382.561 251.521 365.542 254.548C253.592 264.765 243.758 364.282 243.38 375.634C243.002 386.986 235.438 399.851 232.79 375.634C222.957 274.603 144.289 257.954 104.577 257.954H66V460.772H238.464C358.356 460.772 452.152 371.472 452.152 251.521C452.152 131.571 356.465 40 238.464 40Z" fill="url(#paint0_radial_8_208)" />
11+
<path d="M238.464 40H66V236.007H104.577C220.688 236.007 232.79 158.437 232.79 121.733C232.79 108.867 243.38 108.867 243.38 121.733C251.318 236.701 356.35 245.457 365.527 246.223L365.542 246.224C374.619 246.981 382.561 251.521 365.542 254.548C253.592 264.765 243.758 364.282 243.38 375.634C243.002 386.986 235.438 399.851 232.79 375.634C222.957 274.603 144.289 257.954 104.577 257.954H66V460.772H238.464C358.356 460.772 452.152 371.472 452.152 251.521C452.152 131.571 356.465 40 238.464 40Z" stroke="#86997F" stroke-opacity="0.5" stroke-width="1.33156" />
12+
</g>
13+
<defs>
14+
<filter id="filter0_d_8_208" x="60.7404" y="39.3342" width="396.671" height="431.358" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
15+
<feFlood flood-opacity="0" result="BackgroundImageFix" />
16+
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha" />
17+
<feOffset dy="4.66045" />
18+
<feGaussianBlur stdDeviation="2.29694" />
19+
<feComposite in2="hardAlpha" operator="out" />
20+
<feColorMatrix type="matrix" values="0 0 0 0 0.25464 0 0 0 0 0.285175 0 0 0 0 0.243391 0 0 0 0.1 0" />
21+
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_8_208" />
22+
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_8_208" result="shape" />
23+
</filter>
24+
<radialGradient id="paint0_radial_8_208" cx="0" cy="0" r="1" gradientTransform="matrix(399.011 555.102 -568.423 408.982 -11.6221 -34.9218)" gradientUnits="userSpaceOnUse">
25+
<stop stop-color="#ADC77F" />
26+
<stop offset="0.71903" stop-color="#517158" />
27+
<stop offset="1" stop-color="#486954" />
28+
</radialGradient>
29+
</defs>
30+
</svg>
31+
</template>

docs/content/1.guide/14.security.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ Devtools ready — authenticate this browser: http://localhost:3000/#devframe_ot
6767

6868
The code rides the URL **fragment** (`#devframe_otp=…`), which browsers never send to the server, keeping the single-use code out of access logs and `Referer` headers. `connectDevframe` reads it, exchanges it, and strips it from the URL. Because the link grants trust to whoever opens it within the code's lifetime, print it only to a trusted channel (the terminal).
6969

70+
The link points at the **public origin**. A standalone dev server derives it from its own bound address; an owned listener uses that address regardless of any inbound `Host` header. A handler or middleware without an explicit `origin` derives one from a request only when the request's own origin is loopback or exactly matches an `allowedOrigins` entry — a raw inbound authority and forwarded headers are never trusted. Set `origin` explicitly for non-loopback handler deployments (behind a proxy, on a LAN, or on a public host) so the magic link always resolves to the address you intend.
71+
7072
For your own auth UI, disable built-in handling with `otpParam: false`, then call `authenticateWithUrlOtp(rpc)` or `consumeOtpFromUrl()` from `devframe/client`.
7173

7274
## Practices for tools built on devframe

docs/content/2.adapters/1.initiate.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ Fetch handlers only hand over `Request`s, so the host framework binds the RPC so
129129

130130
## Auth
131131

132-
The running devframe **gates by default**. The interactive OTP handler wires automatically, printing its code/magic-link banner once the public origin is known (the first request, or the `origin` option). Pass `auth: false` for single-user localhost, or a `DevframeAuthHandler` for a custom scheme.
132+
The running devframe **gates by default**. The interactive OTP handler wires automatically, printing its code/magic-link banner once the public origin is known — from the `origin` option, or derived from a request whose own origin is loopback or exactly matches an `allowedOrigins` entry. A non-loopback deployment (behind a proxy, on a LAN, on a public host) sets `origin` explicitly so the magic link resolves to the intended address; a raw inbound `Host` header and forwarded headers are never trusted. Pass `auth: false` for single-user localhost, or a `DevframeAuthHandler` for a custom scheme.
133133

134134
## Relation to the other adapters
135135

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
title: Add-ons
2+
icon: false
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
title: Devframes
2+
icon: false
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
title: Services
2+
icon: false

docs/content/8.references/6.hub-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ The built-in variants of the open dock union (`DevframeDockEntryRegistry`, `@dev
137137

138138
| Type | The hub UI provider renders |
139139
|---|---|
140-
| `iframe` | the entry's `url` in a kept-alive iframe (per `frameId` when shared); honor `subTabs` soft nav |
140+
| `iframe` | the entry's `url` in a kept-alive iframe (per `frameId` when shared); honor `subTabs` soft nav; show the existing address bar with `addressBar: true`, or configure Back, Reload, and Open externally by passing an `addressBar` object |
141141
| `action` | a dock-rail button; activating runs its client script |
142142
| `custom-render` | a container its client script mounts into |
143143
| `launcher` | a launch call-to-action reflecting `launcher.status` |

packages/devframe/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
"./utils/nanoid": "./dist/utils/nanoid.mjs",
5757
"./utils/nostics": "./dist/utils/nostics.mjs",
5858
"./utils/open": "./dist/utils/open.mjs",
59+
"./utils/origin": "./dist/utils/origin.mjs",
5960
"./utils/remote-assets": "./dist/utils/remote-assets.mjs",
6061
"./utils/simple-schema": "./dist/utils/simple-schema.mjs",
6162
"./utils/serve-static": "./dist/utils/serve-static.mjs",

0 commit comments

Comments
 (0)