@octanejs/mcp-server 0.2.15 → 0.2.17
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/README.md +1 -1
- package/package.json +1 -1
- package/skills/bridge-react-package.md +2 -0
- package/src/bridge.js +33 -3
- package/src/bridge.test.js +28 -0
- package/src/index.js +3 -0
- package/src/index.test.js +16 -0
package/README.md
CHANGED
|
@@ -163,7 +163,7 @@ one manifest suite by name (`js-framework`, `todomvc`, `weather-app`,
|
|
|
163
163
|
`controlled-form`, `external-store-fanout`, `external-store-integrations`,
|
|
164
164
|
`scheduler-responsiveness`, `suspense-recovery`, `event-delegation`,
|
|
165
165
|
`application-composition`, `scaling-curves`, `streaming-ssr`,
|
|
166
|
-
`streaming-backpressure`, `compiler-throughput`, `codegen-size`,
|
|
166
|
+
`streaming-backpressure`, `compiler-throughput`, `codegen-size`, `hook-memo`,
|
|
167
167
|
`bundle-size`, `bundle-reachability`, `three-renderer`, `three-bundle-size`, …)
|
|
168
168
|
or every suite with `all`; `quick` selects the reduced-iteration smoke pass. The
|
|
169
169
|
suite list mirrors the runner manifest and `node benchmarks/bench.mjs --list`.
|
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` |
|
|
@@ -44,6 +45,7 @@ of bridging by hand:
|
|
|
44
45
|
| `@reduxjs/toolkit` | `@octanejs/redux-toolkit` |
|
|
45
46
|
| `@testing-library/react` | `@octanejs/testing-library` |
|
|
46
47
|
| `@mdx-js/react` | `@octanejs/mdx` |
|
|
48
|
+
| `ink` | `@octanejs/ink` |
|
|
47
49
|
|
|
48
50
|
The `octane_bindings` tool returns the same map machine-readably. For anything
|
|
49
51
|
else, run the `octane_bridge_react_package` tool to get a scan of the
|
package/src/bridge.js
CHANGED
|
@@ -18,9 +18,11 @@ export const KNOWN_BINDINGS = {
|
|
|
18
18
|
'@apollo/client': '@octanejs/apollo-client',
|
|
19
19
|
'@solana/react': '@octanejs/solana-react',
|
|
20
20
|
'@tanstack/ai-react': '@octanejs/tanstack-ai',
|
|
21
|
+
'@tanstack/react-db': '@octanejs/tanstack-db',
|
|
21
22
|
'@tanstack/react-devtools': '@octanejs/tanstack-devtools',
|
|
22
23
|
'@tanstack/react-form': '@octanejs/tanstack-form',
|
|
23
24
|
'@tanstack/react-query': '@octanejs/tanstack-query',
|
|
25
|
+
swr: '@octanejs/swr',
|
|
24
26
|
wagmi: '@octanejs/wagmi',
|
|
25
27
|
'@rainbow-me/rainbowkit': '@octanejs/rainbowkit',
|
|
26
28
|
'@tanstack/react-router': '@octanejs/tanstack-router',
|
|
@@ -30,8 +32,11 @@ export const KNOWN_BINDINGS = {
|
|
|
30
32
|
'@tanstack/react-pacer': '@octanejs/tanstack-pacer',
|
|
31
33
|
'@tanstack/react-table': '@octanejs/tanstack-table',
|
|
32
34
|
'@tanstack/react-virtual': '@octanejs/tanstack-virtual',
|
|
35
|
+
'react-window': '@octanejs/window',
|
|
33
36
|
'framer-motion': '@octanejs/motion',
|
|
34
37
|
motion: '@octanejs/motion',
|
|
38
|
+
'@react-spring/web': '@octanejs/spring',
|
|
39
|
+
'@react-spring/parallax': '@octanejs/spring',
|
|
35
40
|
'@stylexjs/stylex': '@octanejs/stylex',
|
|
36
41
|
'styled-components': '@octanejs/styled-components',
|
|
37
42
|
'react-router': '@octanejs/remix-router',
|
|
@@ -40,9 +45,12 @@ export const KNOWN_BINDINGS = {
|
|
|
40
45
|
cmdk: '@octanejs/cmdk',
|
|
41
46
|
'@lexical/react': '@octanejs/lexical',
|
|
42
47
|
'@tiptap/react': '@octanejs/tiptap',
|
|
48
|
+
'react-pdf': '@octanejs/pdf',
|
|
49
|
+
'@monaco-editor/react': '@octanejs/monaco-editor',
|
|
43
50
|
'lucide-react': '@octanejs/lucide',
|
|
44
51
|
'@phosphor-icons/react': '@octanejs/phosphor-icons',
|
|
45
52
|
'@floating-ui/react': '@octanejs/floating-ui',
|
|
53
|
+
'react-popper': '@octanejs/popper',
|
|
46
54
|
'react-aria': '@octanejs/aria',
|
|
47
55
|
'react-aria-components': '@octanejs/aria',
|
|
48
56
|
'react-stately': '@octanejs/aria',
|
|
@@ -50,9 +58,21 @@ export const KNOWN_BINDINGS = {
|
|
|
50
58
|
'react-hook-form': '@octanejs/hook-form',
|
|
51
59
|
'@base-ui-components/react': '@octanejs/base-ui',
|
|
52
60
|
'@dnd-kit/react': '@octanejs/dnd-kit',
|
|
61
|
+
'embla-carousel-react': '@octanejs/embla-carousel',
|
|
62
|
+
'react-dropzone': '@octanejs/dropzone',
|
|
53
63
|
sonner: '@octanejs/sonner',
|
|
54
64
|
'react-error-boundary': '@octanejs/react-error-boundary',
|
|
65
|
+
'react-transition-group': '@octanejs/transition-group',
|
|
66
|
+
'react-day-picker': '@octanejs/day-picker',
|
|
67
|
+
'input-otp': '@octanejs/input-otp',
|
|
68
|
+
vaul: '@octanejs/vaul',
|
|
69
|
+
'react-markdown': '@octanejs/markdown',
|
|
70
|
+
'react-textarea-autosize': '@octanejs/textarea-autosize',
|
|
71
|
+
'react-intersection-observer': '@octanejs/intersection-observer',
|
|
72
|
+
'react-draggable': '@octanejs/draggable',
|
|
73
|
+
'react-colorful': '@octanejs/colorful',
|
|
55
74
|
streamdown: '@octanejs/streamdown',
|
|
75
|
+
'react-syntax-highlighter': '@octanejs/syntax-highlighter',
|
|
56
76
|
// The official plugins are consolidated as subpaths of the same package.
|
|
57
77
|
// The bundled bridge skill documents each exact import rewrite.
|
|
58
78
|
'@streamdown/code': '@octanejs/streamdown',
|
|
@@ -61,12 +81,14 @@ export const KNOWN_BINDINGS = {
|
|
|
61
81
|
'@streamdown/cjk': '@octanejs/streamdown',
|
|
62
82
|
shadcn: '@octanejs/shadcn',
|
|
63
83
|
recharts: '@octanejs/recharts',
|
|
84
|
+
'react-alien-signals': '@octanejs/alien-signals',
|
|
64
85
|
// react-map-gl@8 is a re-export shell; the binding covers the package its
|
|
65
86
|
// ./mapbox subpath resolves to, so both specifiers map here.
|
|
66
87
|
'react-map-gl': '@octanejs/react-map-gl',
|
|
67
88
|
'react-map-gl/mapbox': '@octanejs/react-map-gl',
|
|
68
89
|
'@vis.gl/react-mapbox': '@octanejs/react-map-gl',
|
|
69
90
|
'@react-three/fiber': '@octanejs/three',
|
|
91
|
+
'@react-three/drei': '@octanejs/drei',
|
|
70
92
|
'@visx/visx': '@octanejs/visx',
|
|
71
93
|
'@visx/a11y': '@octanejs/visx',
|
|
72
94
|
'@visx/a11y/react': '@octanejs/visx',
|
|
@@ -118,11 +140,13 @@ export const KNOWN_BINDINGS = {
|
|
|
118
140
|
'@visx/zoom': '@octanejs/visx',
|
|
119
141
|
'react-redux': '@octanejs/redux',
|
|
120
142
|
'@reduxjs/toolkit': '@octanejs/redux-toolkit',
|
|
143
|
+
'@zag-js/react': '@octanejs/zag',
|
|
121
144
|
'@react-rxjs/core': '@octanejs/rxjs',
|
|
122
145
|
'@react-rxjs/utils': '@octanejs/rxjs',
|
|
123
146
|
'@testing-library/react': '@octanejs/testing-library',
|
|
124
147
|
'react-i18next': '@octanejs/i18next',
|
|
125
148
|
'@inertiajs/react': '@octanejs/inertia',
|
|
149
|
+
ink: '@octanejs/ink',
|
|
126
150
|
'@mdx-js/react': '@octanejs/mdx',
|
|
127
151
|
'dexie-react-hooks': '@octanejs/dexie',
|
|
128
152
|
'@livestore/react': '@octanejs/livestore',
|
|
@@ -149,6 +173,7 @@ export const KNOWN_BINDING_PACKAGE_DIRS = new Set(
|
|
|
149
173
|
export const KNOWN_VANILLA_CORES = {
|
|
150
174
|
'@apollo/client': '@apollo/client',
|
|
151
175
|
'@solana/react': '@solana/kit',
|
|
176
|
+
'@tanstack/react-db': '@tanstack/db',
|
|
152
177
|
'@tanstack/react-query': '@tanstack/query-core',
|
|
153
178
|
wagmi: '@wagmi/core',
|
|
154
179
|
'@tanstack/react-table': '@tanstack/table-core',
|
|
@@ -156,16 +181,19 @@ export const KNOWN_VANILLA_CORES = {
|
|
|
156
181
|
'@tanstack/react-form': '@tanstack/form-core',
|
|
157
182
|
'@floating-ui/react': '@floating-ui/dom',
|
|
158
183
|
'@dnd-kit/react': '@dnd-kit/dom',
|
|
184
|
+
'embla-carousel-react': 'embla-carousel',
|
|
159
185
|
'@xstate/react': 'xstate',
|
|
160
186
|
'react-redux': 'redux',
|
|
161
187
|
'@reduxjs/toolkit': 'redux',
|
|
162
188
|
'react-i18next': 'i18next',
|
|
163
189
|
'react-hook-form': null,
|
|
190
|
+
'react-alien-signals': 'alien-signals',
|
|
164
191
|
zustand: 'zustand/vanilla',
|
|
165
192
|
valtio: 'valtio/vanilla',
|
|
166
193
|
jotai: 'jotai/vanilla',
|
|
167
194
|
'@lexical/react': 'lexical',
|
|
168
195
|
'@tiptap/react': '@tiptap/core',
|
|
196
|
+
'@monaco-editor/react': 'monaco-editor',
|
|
169
197
|
'@livestore/react': '@livestore/livestore',
|
|
170
198
|
};
|
|
171
199
|
|
|
@@ -559,9 +587,11 @@ export function bridgeReportFromSource(source, { packageName } = {}) {
|
|
|
559
587
|
function planFor(report) {
|
|
560
588
|
const steps = [];
|
|
561
589
|
if (report.existingBinding) {
|
|
562
|
-
|
|
563
|
-
`
|
|
564
|
-
|
|
590
|
+
return [
|
|
591
|
+
`Install the official Octane binding: ${report.existingBinding}.`,
|
|
592
|
+
`Replace imports from ${report.target} with imports from ${report.existingBinding}, preserving the imported API names.`,
|
|
593
|
+
'Run the application typecheck and the relevant unit, SSR, hydration, and browser tests; no manual React binding port is needed.',
|
|
594
|
+
];
|
|
565
595
|
}
|
|
566
596
|
if (report.vanillaCore) {
|
|
567
597
|
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,24 @@ 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
|
+
|
|
291
|
+
it('maps TanStack React DB to the Octane binding and framework-neutral core', () => {
|
|
292
|
+
expect(KNOWN_BINDINGS['@tanstack/react-db']).toBe('@octanejs/tanstack-db');
|
|
293
|
+
expect(KNOWN_VANILLA_CORES['@tanstack/react-db']).toBe('@tanstack/db');
|
|
294
|
+
});
|
|
295
|
+
|
|
268
296
|
it('maps Streamdown and every official plugin package to the consolidated binding', () => {
|
|
269
297
|
const upstreamPackages = [
|
|
270
298
|
'streamdown',
|
package/src/index.js
CHANGED
|
@@ -65,6 +65,7 @@ export const BENCHMARK_SUITES = [
|
|
|
65
65
|
'application-composition',
|
|
66
66
|
'scaling-curves',
|
|
67
67
|
'store-selector-fanout',
|
|
68
|
+
'hook-store-composition',
|
|
68
69
|
'effectful-list',
|
|
69
70
|
'list-clear',
|
|
70
71
|
'memo-wall',
|
|
@@ -82,11 +83,13 @@ export const BENCHMARK_SUITES = [
|
|
|
82
83
|
'async-composition',
|
|
83
84
|
'lynx-list',
|
|
84
85
|
'universal-leaf-update',
|
|
86
|
+
'universal-external-store',
|
|
85
87
|
'lynx-render',
|
|
86
88
|
'lynx-table',
|
|
87
89
|
'lynx-table-web',
|
|
88
90
|
'lynx-bundle-size',
|
|
89
91
|
'codegen-size',
|
|
92
|
+
'hook-memo',
|
|
90
93
|
'compiler-throughput',
|
|
91
94
|
'bundle-size',
|
|
92
95
|
'bundle-reachability',
|
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');
|
|
@@ -76,6 +77,21 @@ describe('@octanejs/mcp-server helpers', () => {
|
|
|
76
77
|
.map((line) => line.trim())
|
|
77
78
|
.filter((line) => line && line !== 'Available suites:');
|
|
78
79
|
expect(suites).toEqual(BENCHMARK_SUITES);
|
|
80
|
+
|
|
81
|
+
// The public MCP schema must accept every runner suite, not just keep
|
|
82
|
+
// an exported helper list in sync.
|
|
83
|
+
const server = createServer({ repoRoot });
|
|
84
|
+
const client = new Client({ name: 'octane-mcp-test', version: '1.0.0' });
|
|
85
|
+
const [clientTransport, serverTransport] = InMemoryTransport.createLinkedPair();
|
|
86
|
+
try {
|
|
87
|
+
await Promise.all([server.connect(serverTransport), client.connect(clientTransport)]);
|
|
88
|
+
const tools = await client.listTools();
|
|
89
|
+
const benchmark = tools.tools.find((tool) => tool.name === 'octane_benchmark');
|
|
90
|
+
expect(benchmark?.inputSchema.properties?.benchmark?.enum).toEqual(['all', ...suites]);
|
|
91
|
+
} finally {
|
|
92
|
+
await client.close();
|
|
93
|
+
await server.close();
|
|
94
|
+
}
|
|
79
95
|
});
|
|
80
96
|
|
|
81
97
|
it('classifies every maintained binding and recommends its test project', () => {
|