@octanejs/mcp-server 0.2.25 → 0.2.27

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@octanejs/mcp-server",
3
- "version": "0.2.25",
3
+ "version": "0.2.27",
4
4
  "type": "module",
5
5
  "engines": {
6
6
  "node": ">=22.22.2"
@@ -32,6 +32,40 @@ recompute after every render.
32
32
  (`[state, update, getState]`) that reads the latest scheduled hook-cell value.
33
33
  Ordinary two-item destructures keep the allocation-free React shape.
34
34
 
35
+ ## Strong mode reads render snapshots
36
+
37
+ In a module with `"use strong"` or application-wide Strong enabled, reading a
38
+ `useRef` object's `current` while rendering is a compiler error
39
+ (`OCTANE_STRONG_RENDER_REF_READ`). Calling a known third-tuple state getter
40
+ while rendering is also an error (`OCTANE_STRONG_RENDER_STATE_GETTER_CALL`): it
41
+ can read scheduled state that differs from the render snapshot. Reading a
42
+ reassigned module-scope `let` or `var` during render is an error too
43
+ (`OCTANE_STRONG_RENDER_MODULE_STATE_READ`), since the variable can change
44
+ without a witnessed render input. Pass the ref directly to a `ref` prop and
45
+ render from the state tuple's first member. Move changing module values into
46
+ state or context, or pass an immutable snapshot as a prop. Read the ref or call
47
+ the getter in an event, effect, or deferred callback.
48
+ Compatibility modules keep their existing behavior.
49
+
50
+ Reading unshadowed `window`, `document`, `localStorage`, `sessionStorage`,
51
+ `navigator`, `location`, or `matchMedia` while rendering reports
52
+ `OCTANE_STRONG_RENDER_AMBIENT_READ`. This includes `typeof` guards, constant
53
+ browser handle aliases, and `globalThis` property reads except known standard
54
+ language builtins. Computed `globalThis` properties whose names are unknown also
55
+ report the error. Local shadowing, scalar module snapshots, the `globalThis`
56
+ object itself, and standard language builtins such as `globalThis.JSON` remain valid.
57
+ The analysis does not generally prove aliases obtained through defaults,
58
+ returned values, containers, arbitrary deeper properties, or imports. Those
59
+ values still have to satisfy the render-snapshot contract.
60
+
61
+ Use `useSyncExternalStore` with a server snapshot for changing browser state;
62
+ browser reads inside its snapshot callbacks remain legal. Events, effects,
63
+ deferred callbacks, and lazy `useState` or `useReducer` initializers may also
64
+ read browser state. Lazy initialization still runs during server rendering:
65
+ guard unavailable browser APIs there and ensure server and client initial
66
+ output agrees. A guard in an ordinary render calculation still reads ambient
67
+ state and is rejected.
68
+
35
69
  ## Controlled inputs match React — on native events
36
70
 
37
71
  Controlled `value`/`checked` follow React's semantics exactly: the prop drives
package/src/index.js CHANGED
@@ -108,6 +108,12 @@ export const BENCHMARK_SUITES = [
108
108
  'universal-leaf-update',
109
109
  'universal-object-teardown',
110
110
  'universal-template-events',
111
+ 'universal-native-hover',
112
+ 'universal-owner-drafts',
113
+ 'universal-hook-slot',
114
+ 'universal-draft-lookup',
115
+ 'scoped-descriptor-shapes',
116
+ 'memo-wrapper-shapes',
111
117
  'universal-external-store',
112
118
  'lynx-render',
113
119
  'lynx-table',