@octanejs/mcp-server 0.2.15 → 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 +30 -3
- package/src/bridge.test.js +23 -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
|
@@ -21,6 +21,7 @@ export const KNOWN_BINDINGS = {
|
|
|
21
21
|
'@tanstack/react-devtools': '@octanejs/tanstack-devtools',
|
|
22
22
|
'@tanstack/react-form': '@octanejs/tanstack-form',
|
|
23
23
|
'@tanstack/react-query': '@octanejs/tanstack-query',
|
|
24
|
+
swr: '@octanejs/swr',
|
|
24
25
|
wagmi: '@octanejs/wagmi',
|
|
25
26
|
'@rainbow-me/rainbowkit': '@octanejs/rainbowkit',
|
|
26
27
|
'@tanstack/react-router': '@octanejs/tanstack-router',
|
|
@@ -30,8 +31,11 @@ export const KNOWN_BINDINGS = {
|
|
|
30
31
|
'@tanstack/react-pacer': '@octanejs/tanstack-pacer',
|
|
31
32
|
'@tanstack/react-table': '@octanejs/tanstack-table',
|
|
32
33
|
'@tanstack/react-virtual': '@octanejs/tanstack-virtual',
|
|
34
|
+
'react-window': '@octanejs/window',
|
|
33
35
|
'framer-motion': '@octanejs/motion',
|
|
34
36
|
motion: '@octanejs/motion',
|
|
37
|
+
'@react-spring/web': '@octanejs/spring',
|
|
38
|
+
'@react-spring/parallax': '@octanejs/spring',
|
|
35
39
|
'@stylexjs/stylex': '@octanejs/stylex',
|
|
36
40
|
'styled-components': '@octanejs/styled-components',
|
|
37
41
|
'react-router': '@octanejs/remix-router',
|
|
@@ -40,9 +44,12 @@ export const KNOWN_BINDINGS = {
|
|
|
40
44
|
cmdk: '@octanejs/cmdk',
|
|
41
45
|
'@lexical/react': '@octanejs/lexical',
|
|
42
46
|
'@tiptap/react': '@octanejs/tiptap',
|
|
47
|
+
'react-pdf': '@octanejs/pdf',
|
|
48
|
+
'@monaco-editor/react': '@octanejs/monaco-editor',
|
|
43
49
|
'lucide-react': '@octanejs/lucide',
|
|
44
50
|
'@phosphor-icons/react': '@octanejs/phosphor-icons',
|
|
45
51
|
'@floating-ui/react': '@octanejs/floating-ui',
|
|
52
|
+
'react-popper': '@octanejs/popper',
|
|
46
53
|
'react-aria': '@octanejs/aria',
|
|
47
54
|
'react-aria-components': '@octanejs/aria',
|
|
48
55
|
'react-stately': '@octanejs/aria',
|
|
@@ -50,9 +57,21 @@ export const KNOWN_BINDINGS = {
|
|
|
50
57
|
'react-hook-form': '@octanejs/hook-form',
|
|
51
58
|
'@base-ui-components/react': '@octanejs/base-ui',
|
|
52
59
|
'@dnd-kit/react': '@octanejs/dnd-kit',
|
|
60
|
+
'embla-carousel-react': '@octanejs/embla-carousel',
|
|
61
|
+
'react-dropzone': '@octanejs/dropzone',
|
|
53
62
|
sonner: '@octanejs/sonner',
|
|
54
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',
|
|
55
73
|
streamdown: '@octanejs/streamdown',
|
|
74
|
+
'react-syntax-highlighter': '@octanejs/syntax-highlighter',
|
|
56
75
|
// The official plugins are consolidated as subpaths of the same package.
|
|
57
76
|
// The bundled bridge skill documents each exact import rewrite.
|
|
58
77
|
'@streamdown/code': '@octanejs/streamdown',
|
|
@@ -61,12 +80,14 @@ export const KNOWN_BINDINGS = {
|
|
|
61
80
|
'@streamdown/cjk': '@octanejs/streamdown',
|
|
62
81
|
shadcn: '@octanejs/shadcn',
|
|
63
82
|
recharts: '@octanejs/recharts',
|
|
83
|
+
'react-alien-signals': '@octanejs/alien-signals',
|
|
64
84
|
// react-map-gl@8 is a re-export shell; the binding covers the package its
|
|
65
85
|
// ./mapbox subpath resolves to, so both specifiers map here.
|
|
66
86
|
'react-map-gl': '@octanejs/react-map-gl',
|
|
67
87
|
'react-map-gl/mapbox': '@octanejs/react-map-gl',
|
|
68
88
|
'@vis.gl/react-mapbox': '@octanejs/react-map-gl',
|
|
69
89
|
'@react-three/fiber': '@octanejs/three',
|
|
90
|
+
'@react-three/drei': '@octanejs/drei',
|
|
70
91
|
'@visx/visx': '@octanejs/visx',
|
|
71
92
|
'@visx/a11y': '@octanejs/visx',
|
|
72
93
|
'@visx/a11y/react': '@octanejs/visx',
|
|
@@ -118,6 +139,7 @@ export const KNOWN_BINDINGS = {
|
|
|
118
139
|
'@visx/zoom': '@octanejs/visx',
|
|
119
140
|
'react-redux': '@octanejs/redux',
|
|
120
141
|
'@reduxjs/toolkit': '@octanejs/redux-toolkit',
|
|
142
|
+
'@zag-js/react': '@octanejs/zag',
|
|
121
143
|
'@react-rxjs/core': '@octanejs/rxjs',
|
|
122
144
|
'@react-rxjs/utils': '@octanejs/rxjs',
|
|
123
145
|
'@testing-library/react': '@octanejs/testing-library',
|
|
@@ -156,16 +178,19 @@ export const KNOWN_VANILLA_CORES = {
|
|
|
156
178
|
'@tanstack/react-form': '@tanstack/form-core',
|
|
157
179
|
'@floating-ui/react': '@floating-ui/dom',
|
|
158
180
|
'@dnd-kit/react': '@dnd-kit/dom',
|
|
181
|
+
'embla-carousel-react': 'embla-carousel',
|
|
159
182
|
'@xstate/react': 'xstate',
|
|
160
183
|
'react-redux': 'redux',
|
|
161
184
|
'@reduxjs/toolkit': 'redux',
|
|
162
185
|
'react-i18next': 'i18next',
|
|
163
186
|
'react-hook-form': null,
|
|
187
|
+
'react-alien-signals': 'alien-signals',
|
|
164
188
|
zustand: 'zustand/vanilla',
|
|
165
189
|
valtio: 'valtio/vanilla',
|
|
166
190
|
jotai: 'jotai/vanilla',
|
|
167
191
|
'@lexical/react': 'lexical',
|
|
168
192
|
'@tiptap/react': '@tiptap/core',
|
|
193
|
+
'@monaco-editor/react': 'monaco-editor',
|
|
169
194
|
'@livestore/react': '@livestore/livestore',
|
|
170
195
|
};
|
|
171
196
|
|
|
@@ -559,9 +584,11 @@ export function bridgeReportFromSource(source, { packageName } = {}) {
|
|
|
559
584
|
function planFor(report) {
|
|
560
585
|
const steps = [];
|
|
561
586
|
if (report.existingBinding) {
|
|
562
|
-
|
|
563
|
-
`
|
|
564
|
-
|
|
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
|
+
];
|
|
565
592
|
}
|
|
566
593
|
if (report.vanillaCore) {
|
|
567
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.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');
|