@ggui-ai/mcp-apps-react-native 0.11.0 → 0.12.0

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": "@ggui-ai/mcp-apps-react-native",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
4
4
  "description": "React Native SDK for ggui — components and hooks for embedding agent-generated UIs in mobile apps.",
5
5
  "keywords": [
6
6
  "ggui",
@@ -58,9 +58,9 @@
58
58
  },
59
59
  "dependencies": {
60
60
  "@modelcontextprotocol/ext-apps": "^1.7.2",
61
- "@ggui-ai/design": "0.11.0",
62
- "@ggui-ai/protocol": "0.11.0",
63
- "@ggui-ai/iframe-runtime": "0.11.0"
61
+ "@ggui-ai/iframe-runtime": "0.12.0",
62
+ "@ggui-ai/protocol": "0.12.0",
63
+ "@ggui-ai/design": "0.12.0"
64
64
  },
65
65
  "devDependencies": {
66
66
  "@modelcontextprotocol/sdk": "^1.27.0",
@@ -164,7 +164,12 @@ export async function dispatchHostBridgeRequest(
164
164
  // `define`), and a hand-maintained literal would silently drift
165
165
  // from the published version at every release.
166
166
  hostInfo: { name: 'ggui-react-native', version: 'unstamped' },
167
- hostCapabilities: {},
167
+ // Truthful positive advertisement (kit R2 grade, ggui#600 OPEN
168
+ // FINDING closed): a wired tools/call relay advertises
169
+ // `serverTools` so the runtime never spends a failed user
170
+ // gesture probing a capability the host actually has.
171
+ hostCapabilities:
172
+ ctx.onToolCall !== undefined ? { serverTools: {} } : {},
168
173
  hostContext: {
169
174
  locale: ctx.locale,
170
175
  containerDimensions: ctx.containerDimensions,
@@ -93,9 +93,33 @@ export interface ThemeProviderProps {
93
93
  children: ReactNode;
94
94
  }
95
95
 
96
+ /**
97
+ * TERMINAL CONSUMER of the theme-mode ladder (adversarial-cycle
98
+ * ruling, ggui#598 leg 4): the RN provider paints the NATIVE chrome
99
+ * around the WebView — there is no downstream layer left to fill an
100
+ * absent opinion, and React Native must render with SOME concrete
101
+ * scheme. The `?? 'light'` here is therefore the documented
102
+ * terminal-consumer default (the same posture as the design package's
103
+ * css-tokens terminal default), NOT a mid-ladder defaulting: it fires
104
+ * only after the embedder's explicit prop AND the OS scheme are both
105
+ * absent (`useColorScheme()` → null, rare). Mid-ladder code — anything
106
+ * with a layer below it — must never default; it delegates to
107
+ * `@ggui-ai/protocol/integrations/theme-binding` and lets absence
108
+ * propagate (the composition law).
109
+ *
110
+ * @internal — exported for the precedence pin; production caller is
111
+ * `ThemeProvider`.
112
+ */
113
+ export function resolveNativeScheme(
114
+ prop: 'light' | 'dark' | undefined,
115
+ system: 'light' | 'dark' | null | undefined,
116
+ ): 'light' | 'dark' {
117
+ return prop ?? system ?? 'light';
118
+ }
119
+
96
120
  export function ThemeProvider({ colorScheme: colorSchemeProp, children }: ThemeProviderProps) {
97
121
  const systemScheme = useColorScheme();
98
- const effectiveScheme = colorSchemeProp ?? systemScheme ?? 'light';
122
+ const effectiveScheme = resolveNativeScheme(colorSchemeProp, systemScheme);
99
123
  const [reduceMotionEnabled, setReduceMotionEnabled] = useState(false);
100
124
 
101
125
  useEffect(() => {