Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ function listErrorCodes(prefix: string): string[] {
function guideItems(prefix: string): DefaultTheme.NavItemWithLink[] {
return [
{ text: 'Introduction', link: `${prefix}/guide/` },
{ text: 'Built with Devframe', link: `${prefix}/guide/built-with` },
{ text: 'Devframe Definition', link: `${prefix}/guide/devframe-definition` },
{ text: 'RPC', link: `${prefix}/guide/rpc` },
{ text: 'Shared State', link: `${prefix}/guide/shared-state` },
Expand Down
17 changes: 17 additions & 0 deletions docs/guide/built-with.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
outline: deep
---

# Built with Devframe

Real-world devtools shipping on Devframe:

- [**Vite DevTools**](https://devtools.vite.dev/) — the host that bundles multiple devframes into one UI (docks, command palette, terminals). Mount your own definition into it via the [`vite` adapter](/adapters/vite).
- [**ESLint Config Inspector**](https://github.com/eslint/config-inspector) — official ESLint tool for inspecting flat configs.
- [**node-modules-inspector**](https://github.com/antfu/node-modules-inspector) — interactive visualizer for your `node_modules` dependency graph.

End-to-end examples in this repo, exercising the full adapter surface:

- [**counter**](https://github.com/devframes/devframe/tree/main/examples/counter) — smallest possible demo, exercises all adapters.
- [**files-inspector**](https://github.com/devframes/devframe/tree/main/examples/files-inspector) — lists files in cwd via RPC; exercises CLI dev/build/spa surfaces.
- [**streaming-chat**](https://github.com/devframes/devframe/tree/main/examples/streaming-chat) — streams synthetic chat tokens from server to client via `ctx.rpc.streaming`.
13 changes: 0 additions & 13 deletions docs/guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,16 +109,3 @@ Devframe has zero dependencies on Vite or any `@vitejs/*` package — the same d
- [RPC](./rpc) — define type-safe server functions your client can call
- [Agent-Native](./agent-native) — expose your devframe to Claude Desktop, Cursor, or any MCP client

## Built with Devframe

Real-world devtools shipping on Devframe:

- [**Vite DevTools**](https://devtools.vite.dev/) — the host that bundles multiple devframes into one UI (docks, command palette, terminals). Mount your own definition into it via the [`vite` adapter](/adapters/vite).
- [**ESLint Config Inspector**](https://github.com/eslint/config-inspector) — official ESLint tool for inspecting flat configs.
- [**node-modules-inspector**](https://github.com/antfu/node-modules-inspector) — interactive visualizer for your `node_modules` dependency graph.

End-to-end examples in this repo, exercising the full adapter surface:

- [**devframe-counter**](https://github.com/devframes/devframe/tree/main/examples/devframe-counter) — smallest possible demo, exercises all adapters.
- [**devframe-files-inspector**](https://github.com/devframes/devframe/tree/main/examples/devframe-files-inspector) — lists files in cwd via RPC; exercises CLI dev/build/spa surfaces.
- [**devframe-streaming-chat**](https://github.com/devframes/devframe/tree/main/examples/devframe-streaming-chat) — streams synthetic chat tokens from server to client via `ctx.rpc.streaming`.
2 changes: 1 addition & 1 deletion docs/guide/streaming.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,5 +234,5 @@ When you need authoritative state rather than every intermediate value, [shared
## Reference

- API surface: `RpcStreamingHost`, `RpcStreamingChannel<T>`, `StreamSink<T>`, `StreamReader<T>` in `devframe/types`.
- Working example: [`devframe/examples/devframe-streaming-chat`](https://github.com/vitejs/devtools/tree/main/devframe/examples/devframe-streaming-chat).
- Working example: [`examples/streaming-chat`](https://github.com/devframes/devframe/tree/main/examples/streaming-chat).
- Errors: [`DF0029`](../errors/DF0029) (overflow), [`DF0030`](../errors/DF0030) (unknown stream id), [`DF0031`](../errors/DF0031) (write to closed stream), [`DF0032`](../errors/DF0032) (channel name collision).
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "devframe-counter-example",
"name": "counter-example",
"type": "module",
"version": "0.2.0",
"private": true,
"description": "Smallest end-to-end devframe demo — exercises all six adapters.",
"main": "src/devframe.ts",
"bin": {
"devframe-counter": "./bin.mjs"
"counter": "./bin.mjs"
},
"scripts": {
"dev": "node bin.mjs",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ The Preact client showcases two patterns relevant to devframe authors:

```sh
pnpm install
pnpm -C examples/devframe-files-inspector run build # build the Preact client
pnpm -C examples/devframe-files-inspector run dev # http://127.0.0.1:9876/__devframe-files-inspector/
pnpm -C examples/devframe-files-inspector run cli:build # static deploy in ./dist/static
serve examples/devframe-files-inspector/dist/static # any static host works (relative paths)
pnpm -C examples/devframe-files-inspector run test # E2E tests
pnpm -C examples/files-inspector run build # build the Preact client
pnpm -C examples/files-inspector run dev # http://127.0.0.1:9876/__devframe-files-inspector/
pnpm -C examples/files-inspector run cli:build # static deploy in ./dist/static
serve examples/files-inspector/dist/static # any static host works (relative paths)
pnpm -C examples/files-inspector run test # E2E tests
```

## File map
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "devframe-files-inspector-example",
"name": "files-inspector-example",
"type": "module",
"version": "0.2.0",
"private": true,
"description": "End-to-end devframe demo — lists files in cwd via RPC, exercises CLI dev/build/spa surfaces.",
"main": "src/devframe.ts",
"bin": {
"devframe-files-inspector": "./bin.mjs"
"files-inspector": "./bin.mjs"
},
"scripts": {
"build": "vite build --config src/client/vite.config.ts",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const CLIENT_DIST = resolve(HERE, '../dist/client')
export function assertClientBuilt(): void {
if (!existsSync(path.join(CLIENT_DIST, 'index.html'))) {
throw new Error(
`[devframe-files-inspector] dist/client missing — run \`pnpm -C examples/devframe-files-inspector run build\` first.`,
`[devframe-files-inspector] dist/client missing — run \`pnpm -C examples/files-inspector run build\` first.`,
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ client (re)joins mid-stream.
## Run it

```sh
pnpm -C devframe/examples/devframe-streaming-chat run build
pnpm -C devframe/examples/devframe-streaming-chat run dev
pnpm -C examples/streaming-chat run build
pnpm -C examples/streaming-chat run dev
```

Then open http://localhost:9897/ — type a prompt, watch tokens stream
Expand All @@ -37,7 +37,7 @@ in, refresh the page mid-conversation, cancel a long answer, click
## Run the tests

```sh
pnpm -C devframe/examples/devframe-streaming-chat run test
pnpm -C examples/streaming-chat run test
```

Tests boot the server in-process and exercise the full WS round-trip:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "devframe-streaming-chat-example",
"name": "streaming-chat-example",
"type": "module",
"version": "0.2.0",
"private": true,
"description": "End-to-end devframe demo — streams synthetic chat tokens from server to client via `ctx.rpc.streaming`. Mirrors the AI-deltas use case from issue #306.",
"main": "src/devframe.ts",
"bin": {
"devframe-streaming-chat": "./bin.mjs"
"streaming-chat": "./bin.mjs"
},
"scripts": {
"build": "vite build --config src/client/vite.config.ts",
Expand Down
6 changes: 3 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion skills/devframe/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ Readable.fromWeb(reader.readable).pipe(targetNodeWritable)
| Per-call lifecycles with cancellation | Cross-cutting fire-and-forget signals | Diff-based sync between clients |
| Replay on reconnect | | |

For chat-style UIs that combine both: keep the **conversation log** in shared state (survives reconnects), and use a streaming channel for **active responses**. The action that starts a response appends a placeholder to shared state; on producer close, commit the joined content back to shared state. Working example: [`devframe/examples/devframe-streaming-chat`](https://github.com/vitejs/devtools/tree/main/devframe/examples/devframe-streaming-chat).
For chat-style UIs that combine both: keep the **conversation log** in shared state (survives reconnects), and use a streaming channel for **active responses**. The action that starts a response appends a placeholder to shared state; on producer close, commit the joined content back to shared state. Working example: [`examples/streaming-chat`](https://github.com/devframes/devframe/tree/main/examples/streaming-chat).

## Mounting into a host (Vite DevTools example)

Expand Down
4 changes: 2 additions & 2 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
"outputLogs": "new-only",
"outputs": ["dist/**"]
},
"devframe-files-inspector-example#build": {
"files-inspector-example#build": {
"outputLogs": "new-only",
"dependsOn": ["devframe#build"],
"outputs": ["dist/**"]
},
"devframe-streaming-chat-example#build": {
"streaming-chat-example#build": {
"outputLogs": "new-only",
"dependsOn": ["devframe#build"],
"outputs": ["dist/**"]
Expand Down
4 changes: 2 additions & 2 deletions vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ export default defineConfig({
test: {
projects: [
'packages/devframe',
'examples/devframe-files-inspector',
'examples/devframe-streaming-chat',
'examples/files-inspector',
'examples/streaming-chat',
'tests',
],
testTimeout: 10000,
Expand Down
Loading