Skip to content

Commit c2d5ec5

Browse files
committed
merge: origin/main into feat/agent-mcp-wave-phase-3
Resolves conflicts from #158 (knip integration): - packages/hub/package.json: keep our @standard-schema/spec addition, take main's removal of the (knip-flagged unused) birpc dependency - pnpm-lock.yaml: regenerated via `pnpm install --lockfile-only` Also fixes two knip findings the merge exposed in this branch's own new surface (unchecked by knip before it landed on main): - instance-registry.ts: DEVFRAME_INSTANCES_DIR_ENV / DEVFRAME_DISABLE_INSTANCE_REGISTRY_ENV / resolveInstancesDir / probeDevframeInstance drop `export` — module-internal per the barrel's existing "read/probe/prune helpers stay internal" comment, nothing outside the file used them - packages/next: DevframeNextHostMcpOptions (the `mountMcp` options type) now re-exported from the package barrel, alongside its sibling option types — a real gap, not a knip false positive
2 parents d7a2fbb + 7962b8d commit c2d5ec5

60 files changed

Lines changed: 783 additions & 705 deletions

File tree

Some content is hidden

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

‎.github/workflows/ci.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ permissions:
1212
jobs:
1313
unit-test:
1414
uses: sxzz/workflows/.github/workflows/unit-test.yml@main
15+
with:
16+
lint: pnpm run lint && pnpm run knip
1517

1618
e2e:
1719
runs-on: ubuntu-latest

‎.gitignore‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,6 @@ playwright/.cache
2323
blob-report
2424
.ecosystem
2525
storybook-static
26+
27+
# Agent skills from npm packages (managed by skills-npm)
28+
**/skills/npm-*

‎AGENTS.md‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ pnpm dev # tsdown --watch
2424
pnpm test # pnpm build && vitest (api snapshot guards against stale dist)
2525
pnpm typecheck # turbo run typecheck (per-package tsc --noEmit)
2626
pnpm lint --fix # ESLint via @antfu/eslint-config
27+
pnpm knip # unused files/dependencies/exports across every workspace
2728
pnpm start # tsx src/index.ts
2829
```
2930

@@ -33,6 +34,8 @@ The `pnpm test` script intentionally runs `build` first so `tsnapi` snapshots co
3334

3435
`pnpm typecheck` runs `scripts/verify-typecheck-coverage.ts` first — it fails the command (and CI, since CI just runs `pnpm typecheck`) if any workspace package has a `tsconfig.json` but no `typecheck` script, so a new package can't silently join the same blind spot. A package that genuinely can't typecheck yet needs a documented exception in that script, not a missing script.
3536

37+
`pnpm knip` finds unused files, dependencies, and exports across every workspace (config in `knip.jsonc`). It runs against source directly — no prior build needed. Most workspaces need no configuration; `knip.jsonc` only carries per-workspace overrides for cases knip's defaults can't infer on their own: a package's non-`index.ts` `exports` subpaths (knip's package.json→`dist`→`src` source mapping needs a workspace `tsconfig.json` `outDir`, which conflicts with this repo's cross-workspace `src/*.ts` imports, so multi-entry packages list their `exports`-mapped entry files explicitly instead — keep that list in sync with each `tsdown.config.ts`), config files knip's plugins don't discover in a nested location (a Next.js app rooted below the workspace root, `storybook-solidjs-vite` not matching the Storybook plugin trigger), and dependencies referenced dynamically outside its static import graph (icon collections consumed by UnoCSS at build time, plugin packages loaded via a runtime `import()` string). Prefer fixing the underlying gap or a scoped `ignoreDependencies`/`entry` override over a blanket `ignore`.
38+
3639
## Conventions
3740

3841
- RPC functions must use `defineRpcFunction`; always namespace IDs `devframes:plugin:<slug>:<fn-name>` (matching the plugin's `@devframes/plugin-<slug>` package name).
@@ -145,7 +148,7 @@ Range allocation:
145148
## Before PRs
146149

147150
```sh
148-
pnpm lint && pnpm test && pnpm typecheck && pnpm build
151+
pnpm lint && pnpm knip && pnpm test && pnpm typecheck && pnpm build
149152
```
150153

151154
Follow conventional commits (`feat:`, `fix:`, etc.).

‎README.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ Framework-neutral foundation for building devframes.
3030
</a>
3131
</p>
3232

33+
## Credits
34+
35+
The `devframe connect` MCP connector (discovery + gateway tools + agent-steering errors) follows the architecture Vercel's [`next-devtools-mcp`](https://github.com/vercel/next-devtools-mcp) validated: the real MCP endpoint lives inside the framework, and a thin external connector discovers and proxies it.
36+
3337
## License
3438

3539
[MIT](./LICENSE.md) License © [Anthony Fu](https://github.com/antfu)

‎design/uno.config.ts‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,3 @@ export const designConfig = defineConfig({
4949
'z-drawer-content': 'z-[90]',
5050
},
5151
})
52-
53-
export default designConfig

‎examples/files-inspector/tests/_utils.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { resolve } from 'pathe'
1919
import devframe from '../src/devframe'
2020

2121
const HERE = fileURLToPath(new URL('.', import.meta.url))
22-
export const CLIENT_DIST = resolve(HERE, '../dist/client')
22+
const CLIENT_DIST = resolve(HERE, '../dist/client')
2323

2424
/**
2525
* Asserts the Preact client has been built. Tests boot a dev server

‎examples/json-render/package.json‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,5 @@
2323
"@devframes/json-render-ui": "workspace:*",
2424
"cac": "catalog:deps",
2525
"devframe": "workspace:*"
26-
},
27-
"devDependencies": {
28-
"get-port-please": "catalog:deps"
2926
}
3027
}

‎examples/next-devframe-hub/src/client/postcss.config.mjs‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/** @type {import('postcss-load-config').Config} */
21
export default {
32
plugins: {
43
'@unocss/postcss': {},

‎examples/next-runtime-snapshot/package.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
"devframe": "workspace:*",
2626
"next": "catalog:frontend",
2727
"react": "catalog:frontend",
28-
"react-dom": "catalog:frontend"
28+
"react-dom": "catalog:frontend",
29+
"valibot": "catalog:deps"
2930
},
3031
"devDependencies": {
3132
"@types/react": "catalog:types",

‎examples/next-runtime-snapshot/src/client/app/components/connect.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { useMemo } from 'react'
99
// bundle stays free of node-only server code.
1010
const NAMESPACE = 'example:next-runtime-snapshot'
1111

12-
export type SnapshotCtx = DevframeScopedClientContext<typeof NAMESPACE>
12+
type SnapshotCtx = DevframeScopedClientContext<typeof NAMESPACE>
1313

1414
interface ConnectionState {
1515
ctx: SnapshotCtx | null

0 commit comments

Comments
 (0)