mirror of
https://github.com/runkids/skillshare.git
synced 2026-11-19 02:17:09 +00:00
* feat(mcp): pin tool definitions in mcp check --live and warn when they change An Agent reads a server's tool names and descriptions as instructions, and a server can change them after the user reviewed it (a "rug pull"). The MCP spec 2026-07-28 local-server security guide notes the protocol does nothing about this and advises clients that re-prompt on a changed definition; most clients do not. `mcp check --live` now records one SHA-256 per tool over name, description and inputSchema the first time a server answers, in mcp/tool-pins.json of the state directory, keyed by scope and server. Later probes report a changed or new tool as a `tool-change` warning and a removed one as info, until `--accept-tools` (only with --live) records the current definitions. Without --live the pins are never read or written. An unreadable pin file is never rewritten, since it may hold other servers' pins. The dashboard words both warnings in every locale. * fix(mcp): keep schema numbers exact, name the scope to accept in, and log acceptance Codex review on #560: - Tool definitions were decoded through float64 before hashing, so a schema bound changed from 9007199254740992 to 9007199254740993 hashed the same and raised no warning. Numbers now keep their literal text. - The suggested accept command left out -g/-p; run from inside a project after a global check, it would accept the project's server instead. It now names the scope of the check that warned. - Accepting changed tool definitions approves a possible rug pull, but left no record. --accept-tools now writes an operations log entry with the servers it accepted. * fix(mcp): log a tool acceptance only when its baseline was saved Codex review on #560: when comparing succeeded but writing tool-pins.json failed (lock held, state directory unwritable), the report kept its "accepted" finding, so the operations log listed the server as accepted with status ok although its old pins remained. Such a server is now logged under `failed` and the entry's status is error. * fix(mcp): log first pins as accepted and report errors in the accept entry Codex review on #560: - A check that accepted one server but found an error on another still logged status ok, while the command itself exited 1. A server with an error is now listed under `failed` and the entry's status is error. - --accept-tools on a server's first probe records its baseline, but the finding says "pinned", so the entry listed nothing as accepted. A first pin counts as accepted now. * chore(release): request version 0.25.11 The MCP pin checks (#559, #560) and the backup staging fix (#558) ship as 0.25.11 instead of the computed 0.26.0, per maintainer decision. Release-As: 0.25.11
React + TypeScript + Vite
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel (or oxc when used in rolldown-vite) for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
React Compiler
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.
Expanding the ESLint configuration
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...
// Remove tseslint.configs.recommended and replace with this
tseslint.configs.recommendedTypeChecked,
// Alternatively, use this for stricter rules
tseslint.configs.strictTypeChecked,
// Optionally, add this for stylistic rules
tseslint.configs.stylisticTypeChecked,
// Other configs...
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])
You can also install eslint-plugin-react-x and eslint-plugin-react-dom for React-specific lint rules:
// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...
// Enable lint rules for React
reactX.configs['recommended-typescript'],
// Enable lint rules for React DOM
reactDom.configs.recommended,
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])