@octanejs/mcp-server 0.2.14 → 0.2.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/skills/bridge-react-package.md +1 -0
- package/src/bridge.js +37 -3
- package/src/bridge.test.js +23 -0
- package/src/index.js +3 -0
- package/src/index.test.js +1 -0
package/package.json
CHANGED
|
@@ -24,6 +24,7 @@ of bridging by hand:
|
|
|
24
24
|
| `styled-components` | `@octanejs/styled-components` |
|
|
25
25
|
| `react-router` / `react-router-dom` | `@octanejs/remix-router` |
|
|
26
26
|
| `@lexical/react` | `@octanejs/lexical` |
|
|
27
|
+
| `@monaco-editor/react` | `@octanejs/monaco-editor` |
|
|
27
28
|
| `lucide-react` | `@octanejs/lucide` |
|
|
28
29
|
| `@floating-ui/react` | `@octanejs/floating-ui` |
|
|
29
30
|
| `radix-ui` | `@octanejs/radix` |
|
package/src/bridge.js
CHANGED
|
@@ -6,6 +6,8 @@ import { join, resolve } from 'node:path';
|
|
|
6
6
|
// expected union from the workspace manifests, so publishing a new binding
|
|
7
7
|
// without registering it in either catalog fails the mcp-server tests.
|
|
8
8
|
export const KNOWN_BINDINGS = {
|
|
9
|
+
'@gsap/react': '@octanejs/gsap',
|
|
10
|
+
animejs: '@octanejs/animejs',
|
|
9
11
|
'usehooks-ts': '@octanejs/usehooks-ts',
|
|
10
12
|
zustand: '@octanejs/zustand',
|
|
11
13
|
valtio: '@octanejs/valtio',
|
|
@@ -14,10 +16,12 @@ export const KNOWN_BINDINGS = {
|
|
|
14
16
|
'mobx-react-lite': '@octanejs/mobx',
|
|
15
17
|
'mobx-react': '@octanejs/mobx',
|
|
16
18
|
'@apollo/client': '@octanejs/apollo-client',
|
|
19
|
+
'@solana/react': '@octanejs/solana-react',
|
|
17
20
|
'@tanstack/ai-react': '@octanejs/tanstack-ai',
|
|
18
21
|
'@tanstack/react-devtools': '@octanejs/tanstack-devtools',
|
|
19
22
|
'@tanstack/react-form': '@octanejs/tanstack-form',
|
|
20
23
|
'@tanstack/react-query': '@octanejs/tanstack-query',
|
|
24
|
+
swr: '@octanejs/swr',
|
|
21
25
|
wagmi: '@octanejs/wagmi',
|
|
22
26
|
'@rainbow-me/rainbowkit': '@octanejs/rainbowkit',
|
|
23
27
|
'@tanstack/react-router': '@octanejs/tanstack-router',
|
|
@@ -27,8 +31,11 @@ export const KNOWN_BINDINGS = {
|
|
|
27
31
|
'@tanstack/react-pacer': '@octanejs/tanstack-pacer',
|
|
28
32
|
'@tanstack/react-table': '@octanejs/tanstack-table',
|
|
29
33
|
'@tanstack/react-virtual': '@octanejs/tanstack-virtual',
|
|
34
|
+
'react-window': '@octanejs/window',
|
|
30
35
|
'framer-motion': '@octanejs/motion',
|
|
31
36
|
motion: '@octanejs/motion',
|
|
37
|
+
'@react-spring/web': '@octanejs/spring',
|
|
38
|
+
'@react-spring/parallax': '@octanejs/spring',
|
|
32
39
|
'@stylexjs/stylex': '@octanejs/stylex',
|
|
33
40
|
'styled-components': '@octanejs/styled-components',
|
|
34
41
|
'react-router': '@octanejs/remix-router',
|
|
@@ -37,9 +44,12 @@ export const KNOWN_BINDINGS = {
|
|
|
37
44
|
cmdk: '@octanejs/cmdk',
|
|
38
45
|
'@lexical/react': '@octanejs/lexical',
|
|
39
46
|
'@tiptap/react': '@octanejs/tiptap',
|
|
47
|
+
'react-pdf': '@octanejs/pdf',
|
|
48
|
+
'@monaco-editor/react': '@octanejs/monaco-editor',
|
|
40
49
|
'lucide-react': '@octanejs/lucide',
|
|
41
50
|
'@phosphor-icons/react': '@octanejs/phosphor-icons',
|
|
42
51
|
'@floating-ui/react': '@octanejs/floating-ui',
|
|
52
|
+
'react-popper': '@octanejs/popper',
|
|
43
53
|
'react-aria': '@octanejs/aria',
|
|
44
54
|
'react-aria-components': '@octanejs/aria',
|
|
45
55
|
'react-stately': '@octanejs/aria',
|
|
@@ -47,9 +57,21 @@ export const KNOWN_BINDINGS = {
|
|
|
47
57
|
'react-hook-form': '@octanejs/hook-form',
|
|
48
58
|
'@base-ui-components/react': '@octanejs/base-ui',
|
|
49
59
|
'@dnd-kit/react': '@octanejs/dnd-kit',
|
|
60
|
+
'embla-carousel-react': '@octanejs/embla-carousel',
|
|
61
|
+
'react-dropzone': '@octanejs/dropzone',
|
|
50
62
|
sonner: '@octanejs/sonner',
|
|
51
63
|
'react-error-boundary': '@octanejs/react-error-boundary',
|
|
64
|
+
'react-transition-group': '@octanejs/transition-group',
|
|
65
|
+
'react-day-picker': '@octanejs/day-picker',
|
|
66
|
+
'input-otp': '@octanejs/input-otp',
|
|
67
|
+
vaul: '@octanejs/vaul',
|
|
68
|
+
'react-markdown': '@octanejs/markdown',
|
|
69
|
+
'react-textarea-autosize': '@octanejs/textarea-autosize',
|
|
70
|
+
'react-intersection-observer': '@octanejs/intersection-observer',
|
|
71
|
+
'react-draggable': '@octanejs/draggable',
|
|
72
|
+
'react-colorful': '@octanejs/colorful',
|
|
52
73
|
streamdown: '@octanejs/streamdown',
|
|
74
|
+
'react-syntax-highlighter': '@octanejs/syntax-highlighter',
|
|
53
75
|
// The official plugins are consolidated as subpaths of the same package.
|
|
54
76
|
// The bundled bridge skill documents each exact import rewrite.
|
|
55
77
|
'@streamdown/code': '@octanejs/streamdown',
|
|
@@ -58,12 +80,14 @@ export const KNOWN_BINDINGS = {
|
|
|
58
80
|
'@streamdown/cjk': '@octanejs/streamdown',
|
|
59
81
|
shadcn: '@octanejs/shadcn',
|
|
60
82
|
recharts: '@octanejs/recharts',
|
|
83
|
+
'react-alien-signals': '@octanejs/alien-signals',
|
|
61
84
|
// react-map-gl@8 is a re-export shell; the binding covers the package its
|
|
62
85
|
// ./mapbox subpath resolves to, so both specifiers map here.
|
|
63
86
|
'react-map-gl': '@octanejs/react-map-gl',
|
|
64
87
|
'react-map-gl/mapbox': '@octanejs/react-map-gl',
|
|
65
88
|
'@vis.gl/react-mapbox': '@octanejs/react-map-gl',
|
|
66
89
|
'@react-three/fiber': '@octanejs/three',
|
|
90
|
+
'@react-three/drei': '@octanejs/drei',
|
|
67
91
|
'@visx/visx': '@octanejs/visx',
|
|
68
92
|
'@visx/a11y': '@octanejs/visx',
|
|
69
93
|
'@visx/a11y/react': '@octanejs/visx',
|
|
@@ -115,12 +139,15 @@ export const KNOWN_BINDINGS = {
|
|
|
115
139
|
'@visx/zoom': '@octanejs/visx',
|
|
116
140
|
'react-redux': '@octanejs/redux',
|
|
117
141
|
'@reduxjs/toolkit': '@octanejs/redux-toolkit',
|
|
142
|
+
'@zag-js/react': '@octanejs/zag',
|
|
118
143
|
'@react-rxjs/core': '@octanejs/rxjs',
|
|
119
144
|
'@react-rxjs/utils': '@octanejs/rxjs',
|
|
120
145
|
'@testing-library/react': '@octanejs/testing-library',
|
|
121
146
|
'react-i18next': '@octanejs/i18next',
|
|
147
|
+
'@inertiajs/react': '@octanejs/inertia',
|
|
122
148
|
'@mdx-js/react': '@octanejs/mdx',
|
|
123
149
|
'dexie-react-hooks': '@octanejs/dexie',
|
|
150
|
+
'@livestore/react': '@octanejs/livestore',
|
|
124
151
|
};
|
|
125
152
|
|
|
126
153
|
// Octane-specific ecosystem packages that have no React import to rewrite.
|
|
@@ -143,6 +170,7 @@ export const KNOWN_BINDING_PACKAGE_DIRS = new Set(
|
|
|
143
170
|
|
|
144
171
|
export const KNOWN_VANILLA_CORES = {
|
|
145
172
|
'@apollo/client': '@apollo/client',
|
|
173
|
+
'@solana/react': '@solana/kit',
|
|
146
174
|
'@tanstack/react-query': '@tanstack/query-core',
|
|
147
175
|
wagmi: '@wagmi/core',
|
|
148
176
|
'@tanstack/react-table': '@tanstack/table-core',
|
|
@@ -150,16 +178,20 @@ export const KNOWN_VANILLA_CORES = {
|
|
|
150
178
|
'@tanstack/react-form': '@tanstack/form-core',
|
|
151
179
|
'@floating-ui/react': '@floating-ui/dom',
|
|
152
180
|
'@dnd-kit/react': '@dnd-kit/dom',
|
|
181
|
+
'embla-carousel-react': 'embla-carousel',
|
|
153
182
|
'@xstate/react': 'xstate',
|
|
154
183
|
'react-redux': 'redux',
|
|
155
184
|
'@reduxjs/toolkit': 'redux',
|
|
156
185
|
'react-i18next': 'i18next',
|
|
157
186
|
'react-hook-form': null,
|
|
187
|
+
'react-alien-signals': 'alien-signals',
|
|
158
188
|
zustand: 'zustand/vanilla',
|
|
159
189
|
valtio: 'valtio/vanilla',
|
|
160
190
|
jotai: 'jotai/vanilla',
|
|
161
191
|
'@lexical/react': 'lexical',
|
|
162
192
|
'@tiptap/react': '@tiptap/core',
|
|
193
|
+
'@monaco-editor/react': 'monaco-editor',
|
|
194
|
+
'@livestore/react': '@livestore/livestore',
|
|
163
195
|
};
|
|
164
196
|
|
|
165
197
|
export const REACT_API_MAP = {
|
|
@@ -552,9 +584,11 @@ export function bridgeReportFromSource(source, { packageName } = {}) {
|
|
|
552
584
|
function planFor(report) {
|
|
553
585
|
const steps = [];
|
|
554
586
|
if (report.existingBinding) {
|
|
555
|
-
|
|
556
|
-
`
|
|
557
|
-
|
|
587
|
+
return [
|
|
588
|
+
`Install the official Octane binding: ${report.existingBinding}.`,
|
|
589
|
+
`Replace imports from ${report.target} with imports from ${report.existingBinding}, preserving the imported API names.`,
|
|
590
|
+
'Run the application typecheck and the relevant unit, SSR, hydration, and browser tests; no manual React binding port is needed.',
|
|
591
|
+
];
|
|
558
592
|
}
|
|
559
593
|
if (report.vanillaCore) {
|
|
560
594
|
steps.push(
|
package/src/bridge.test.js
CHANGED
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
detectVanillaCore,
|
|
11
11
|
scanSource,
|
|
12
12
|
KNOWN_BINDINGS,
|
|
13
|
+
KNOWN_VANILLA_CORES,
|
|
13
14
|
KNOWN_NATIVE_BINDINGS,
|
|
14
15
|
KNOWN_BINDING_PACKAGE_DIRS,
|
|
15
16
|
} from './bridge.js';
|
|
@@ -253,6 +254,15 @@ describe('bridgeReportFromSource', () => {
|
|
|
253
254
|
expect(report.plan[0]).toContain('@octanejs/tanstack-query');
|
|
254
255
|
});
|
|
255
256
|
|
|
257
|
+
it('routes the React Monaco adapter to its framework-neutral editor core', () => {
|
|
258
|
+
const report = bridgeReportFromSource(`export {};`, {
|
|
259
|
+
packageName: '@monaco-editor/react',
|
|
260
|
+
});
|
|
261
|
+
expect(report.existingBinding).toBe('@octanejs/monaco-editor');
|
|
262
|
+
expect(report.vanillaCore).toBe('monaco-editor');
|
|
263
|
+
expect(report.plan[0]).toContain('@octanejs/monaco-editor');
|
|
264
|
+
});
|
|
265
|
+
|
|
256
266
|
it('same-name hook usage stays bridgeable', () => {
|
|
257
267
|
const report = bridgeReportFromSource(`
|
|
258
268
|
import { useSyncExternalStore } from 'react';
|
|
@@ -265,6 +275,19 @@ describe('bridgeReportFromSource', () => {
|
|
|
265
275
|
});
|
|
266
276
|
|
|
267
277
|
describe('KNOWN_BINDINGS', () => {
|
|
278
|
+
it('maps react-alien-signals to the Octane binding and vanilla core', () => {
|
|
279
|
+
expect(KNOWN_BINDINGS['react-alien-signals']).toBe('@octanejs/alien-signals');
|
|
280
|
+
expect(KNOWN_VANILLA_CORES['react-alien-signals']).toBe('alien-signals');
|
|
281
|
+
});
|
|
282
|
+
|
|
283
|
+
it('maps react-textarea-autosize to the exact Octane binding', () => {
|
|
284
|
+
expect(KNOWN_BINDINGS['react-textarea-autosize']).toBe('@octanejs/textarea-autosize');
|
|
285
|
+
});
|
|
286
|
+
|
|
287
|
+
it('maps react-window to its exact official Octane binding', () => {
|
|
288
|
+
expect(KNOWN_BINDINGS['react-window']).toBe('@octanejs/window');
|
|
289
|
+
});
|
|
290
|
+
|
|
268
291
|
it('maps Streamdown and every official plugin package to the consolidated binding', () => {
|
|
269
292
|
const upstreamPackages = [
|
|
270
293
|
'streamdown',
|
package/src/index.js
CHANGED
|
@@ -50,6 +50,7 @@ export const BENCHMARK_SUITES = [
|
|
|
50
50
|
'svg-dashboard',
|
|
51
51
|
'dbmon',
|
|
52
52
|
'recursive-context',
|
|
53
|
+
'spa-navigation',
|
|
53
54
|
'signal-favoring',
|
|
54
55
|
'news',
|
|
55
56
|
'hydration-interactivity',
|
|
@@ -82,6 +83,8 @@ export const BENCHMARK_SUITES = [
|
|
|
82
83
|
'lynx-list',
|
|
83
84
|
'universal-leaf-update',
|
|
84
85
|
'lynx-render',
|
|
86
|
+
'lynx-table',
|
|
87
|
+
'lynx-table-web',
|
|
85
88
|
'lynx-bundle-size',
|
|
86
89
|
'codegen-size',
|
|
87
90
|
'compiler-throughput',
|
package/src/index.test.js
CHANGED
|
@@ -28,6 +28,7 @@ describe('@octanejs/mcp-server helpers', () => {
|
|
|
28
28
|
expect(areaForPath('packages/octane/src/runtime.ts')).toBe('core-runtime');
|
|
29
29
|
expect(areaForPath('packages/octane/src/runtime.server.ts')).toBe('ssr');
|
|
30
30
|
expect(areaForPath('packages/zustand/src/index.ts')).toBe('ecosystem-binding');
|
|
31
|
+
expect(areaForPath('packages/alien-signals/src/index.ts')).toBe('ecosystem-binding');
|
|
31
32
|
expect(areaForPath('packages/radix/src/index.ts')).toBe('ecosystem-binding');
|
|
32
33
|
expect(areaForPath('packages/octane-mcp-server/src/index.js')).toBe('mcp-server');
|
|
33
34
|
expect(areaForPath('packages/adapter-vercel/src/index.ts')).toBe('deploy-adapter');
|