@nimblebrain/synapse 0.15.0 → 0.17.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.
Files changed (59) hide show
  1. package/README.md +61 -111
  2. package/dist/{chunk-SN7YXLAV.cjs → chunk-EHLQWCYV.cjs} +6 -6
  3. package/dist/{chunk-SN7YXLAV.cjs.map → chunk-EHLQWCYV.cjs.map} +1 -1
  4. package/dist/{chunk-ZMNYUGSF.cjs → chunk-FDMRJZKT.cjs} +576 -662
  5. package/dist/chunk-FDMRJZKT.cjs.map +1 -0
  6. package/dist/{chunk-E7OOOYVR.js → chunk-SRQNQ26I.js} +3 -3
  7. package/dist/{chunk-E7OOOYVR.js.map → chunk-SRQNQ26I.js.map} +1 -1
  8. package/dist/{chunk-RYWW6EHB.cjs → chunk-TXJMGQYF.cjs} +3 -5
  9. package/dist/chunk-TXJMGQYF.cjs.map +1 -0
  10. package/dist/{chunk-J5ICAHK2.js → chunk-UPDBDXQB.js} +4 -5
  11. package/dist/chunk-UPDBDXQB.js.map +1 -0
  12. package/dist/{chunk-GNTQJSQX.js → chunk-VYR6V47N.js} +573 -663
  13. package/dist/chunk-VYR6V47N.js.map +1 -0
  14. package/dist/codegen/cli.cjs +1 -1
  15. package/dist/codegen/cli.js +1 -1
  16. package/dist/codegen/index.d.cts +1 -1
  17. package/dist/codegen/index.d.ts +1 -1
  18. package/dist/connect.iife.global.js +28 -28
  19. package/dist/{detect-C_qmYsh9.d.cts → detect-BHYg26_d.d.cts} +1 -1
  20. package/dist/{detect-Dfd0upoz.d.ts → detect-Bf8Q_0dK.d.ts} +1 -1
  21. package/dist/host/index.cjs +14 -14
  22. package/dist/host/index.d.cts +3 -3
  23. package/dist/host/index.d.ts +3 -3
  24. package/dist/host/index.js +2 -2
  25. package/dist/index.cjs +28 -87
  26. package/dist/index.cjs.map +1 -1
  27. package/dist/index.d.cts +58 -26
  28. package/dist/index.d.ts +58 -26
  29. package/dist/index.js +3 -81
  30. package/dist/index.js.map +1 -1
  31. package/dist/react/index.cjs +81 -140
  32. package/dist/react/index.cjs.map +1 -1
  33. package/dist/react/index.d.cts +66 -82
  34. package/dist/react/index.d.ts +66 -82
  35. package/dist/react/index.js +82 -136
  36. package/dist/react/index.js.map +1 -1
  37. package/dist/{server-ERRDGEZ7.js → server-5N76YCWC.js} +3 -3
  38. package/dist/{server-ERRDGEZ7.js.map → server-5N76YCWC.js.map} +1 -1
  39. package/dist/{server-P54IYX2G.cjs → server-QIYIJHD5.cjs} +3 -3
  40. package/dist/{server-P54IYX2G.cjs.map → server-QIYIJHD5.cjs.map} +1 -1
  41. package/dist/synapse-runtime.iife.global.js +28 -28
  42. package/dist/synapse-ui.iife.global.js +2 -2
  43. package/dist/{types-BSZasM8q.d.cts → types-uEO4VFJ2.d.cts} +87 -166
  44. package/dist/{types-BSZasM8q.d.ts → types-uEO4VFJ2.d.ts} +87 -166
  45. package/dist/ui/index.cjs +403 -91
  46. package/dist/ui/index.cjs.map +1 -1
  47. package/dist/ui/index.d.cts +115 -3
  48. package/dist/ui/index.d.ts +115 -3
  49. package/dist/ui/index.js +401 -93
  50. package/dist/ui/index.js.map +1 -1
  51. package/dist/vite/index.cjs +1 -1
  52. package/dist/vite/index.cjs.map +1 -1
  53. package/dist/vite/index.js +1 -1
  54. package/dist/vite/index.js.map +1 -1
  55. package/package.json +1 -1
  56. package/dist/chunk-GNTQJSQX.js.map +0 -1
  57. package/dist/chunk-J5ICAHK2.js.map +0 -1
  58. package/dist/chunk-RYWW6EHB.cjs.map +0 -1
  59. package/dist/chunk-ZMNYUGSF.cjs.map +0 -1
@@ -1,115 +1,99 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { ReactNode } from 'react';
3
- import { C as ConnectOptions, A as App, q as Theme, s as ToolResultData, S as SynapseOptions, g as CallToolAsTaskOptions, o as TaskHandle, r as ToolCallResult, e as AgentAction, D as DataChangedEvent, R as RequestFileOptions, i as FileResult, b as ActionReducer, d as Store, m as StoreDispatch, a as Synapse, n as SynapseTheme } from '../types-BSZasM8q.cjs';
3
+ import { C as ConnectOptions, a as CallToolAsTaskOptions, T as TaskHandle, b as ToolCallResult, c as CallToolOptions, R as RequestFileOptions, F as FileResult, A as App, D as DataChangedEvent, M as ModelContext, d as Theme, e as ToolResultData } from '../types-uEO4VFJ2.cjs';
4
4
  import { McpUiHostContext } from '@modelcontextprotocol/ext-apps';
5
5
  import { Task } from '@modelcontextprotocol/sdk/types.js';
6
6
 
7
7
  interface AppProviderProps extends ConnectOptions {
8
8
  children: ReactNode;
9
9
  }
10
- declare function AppProvider({ children, name, version, autoResize }: AppProviderProps): react_jsx_runtime.JSX.Element | null;
10
+ /**
11
+ * Connect on mount and provide the {@link App} to everything below.
12
+ *
13
+ * Renders nothing until the handshake completes, so no hook below can observe
14
+ * a half-connected app and no tool call can be fired into a host that has not
15
+ * answered `ui/initialize` yet.
16
+ */
17
+ declare function AppProvider({ children, ...options }: AppProviderProps): react_jsx_runtime.JSX.Element | null;
11
18
 
19
+ /** The connected app. Throws outside an `<AppProvider>`. */
12
20
  declare function useApp(): App;
13
- declare function useToolResult(): ToolResultData | null;
14
- declare function useToolInput(): Record<string, unknown> | null;
15
- declare function useConnectTheme(): Theme;
16
- declare function useResize(): (width?: number, height?: number) => void;
17
-
18
- interface SynapseProviderProps extends SynapseOptions {
19
- children: ReactNode;
20
- }
21
- declare function SynapseProvider({ children, ...options }: SynapseProviderProps): react_jsx_runtime.JSX.Element;
22
-
23
- declare function useSynapse(): Synapse;
24
- declare function useCallTool<TOutput = unknown>(toolName: string): {
25
- call: (args?: Record<string, unknown>) => Promise<ToolCallResult<TOutput>>;
26
- isPending: boolean;
27
- error: Error | null;
28
- data: TOutput | null;
29
- };
30
- declare function useDataSync(callback: (event: DataChangedEvent) => void): void;
31
21
  /**
32
- * Subscribe to agent actions — typed, declarative commands from the server.
33
- *
34
- * Actions are emitted by tools as deterministic side effects (e.g., "navigate
35
- * to the board I just created"). The UI decides how to handle each action type.
22
+ * The current theme, re-rendering only when it actually moves.
36
23
  *
37
- * @example
38
- * ```tsx
39
- * useAgentAction((action) => {
40
- * if (action.type === "navigate") {
41
- * const { entity, id } = action.payload as NavigatePayload;
42
- * if (entity === "board") setSelectedBoardId(id);
43
- * }
44
- * });
45
- * ```
24
+ * `App` filters `host-context-changed` notifications through a theme equality
25
+ * check, so a context update that leaves the derived theme untouched (a
26
+ * workspace switch, say) does not re-render every themed component.
46
27
  */
47
- declare function useAgentAction(callback: (action: AgentAction) => void): void;
28
+ declare function useTheme(): Theme;
48
29
  /**
49
- * Subscribe to the full ext-apps host context.
50
- *
51
- * Returns the host context bag — spec-standardized fields (`theme`, `styles`,
52
- * `displayMode`, `toolInfo`) plus any host extensions. Re-renders on every
53
- * `ui/notifications/host-context-changed` notification.
30
+ * The full ext-apps host context — spec fields (`theme`, `styles`,
31
+ * `displayMode`, `toolInfo`) plus whatever the host publishes alongside.
32
+ * Re-renders on every `host-context-changed`.
54
33
  *
55
- * Prefer `useTheme()` when only theming matters (it filters no-op fires and
56
- * returns a typed `SynapseTheme`). Reach for `useHostContext()` for non-theme
57
- * fields like host-specific extensions, e.g. on NimbleBrain:
34
+ * Prefer `useTheme()` when only theming matters: it filters no-op fires.
35
+ * Reach for this one for host extensions, e.g. on NimbleBrain:
58
36
  *
59
37
  * ```tsx
60
38
  * const { workspace } = useHostContext<{ workspace?: { id: string } }>();
61
39
  * ```
62
40
  */
63
41
  declare function useHostContext<T extends McpUiHostContext = McpUiHostContext>(): T;
42
+ /** The latest tool result pushed by the host, or `null` before one arrives. */
43
+ declare function useToolResult(): ToolResultData | null;
44
+ /** The arguments the host is calling the bound tool with, as they arrive. */
45
+ declare function useToolInput(): Record<string, unknown> | null;
46
+ /** Ask the host to resize this app's frame. */
47
+ declare function useResize(): (width?: number, height?: number) => void;
48
+ interface UseCallToolResult<TOutput> {
49
+ call: (args?: Record<string, unknown>, options?: CallToolOptions) => Promise<ToolCallResult<TOutput>>;
50
+ isPending: boolean;
51
+ error: Error | null;
52
+ data: TOutput | null;
53
+ }
54
+ /** Call one tool, with pending/error/data state for the latest call. */
55
+ declare function useCallTool<TOutput = unknown>(toolName: string): UseCallToolResult<TOutput>;
56
+ /** Run `callback` whenever the agent changes data this app displays. */
57
+ declare function useDataSync(callback: (event: DataChangedEvent) => void): void;
64
58
  /**
65
- * Re-renders only when the derived `SynapseTheme` actually changes (mode,
66
- * primaryColor, or any token value). Routes through `synapse.onThemeChanged`
67
- * — which is itself a `themesEqual`-filtered selector over the unified host
68
- * context — so a host-context update that doesn't move the theme (e.g. a
69
- * workspace switch) does NOT cause this hook's consumers to re-render.
70
- *
71
- * Building this on `useHostContext` instead would skip the filter: every
72
- * host-context-changed notification produces a new context reference, which
73
- * would propagate through `useState` and force a re-render even when the
74
- * derived theme is unchanged.
75
- */
76
- declare function useTheme(): SynapseTheme;
77
- declare function useAction(): (action: string, params?: Record<string, unknown>) => void;
78
- declare function useChat(): (message: string, context?: {
79
- action?: string;
80
- entity?: string;
81
- }) => void;
82
- /**
83
- * Push the app's visible state to the agent via ext-apps `ui/update-model-context`.
84
- *
85
- * **Imperative** (no args) — returns a push function you call manually:
86
- * ```tsx
87
- * const push = useVisibleState();
88
- * push({ board: selectedBoard }, "Viewing board X");
89
- * ```
59
+ * Push what the user is looking at to the agent (ext-apps
60
+ * `ui/update-model-context`), debounced so a selection the user drags through
61
+ * costs one frame rather than thirty.
90
62
  *
91
- * **Declarative** (factory + deps) — auto-pushes when deps change:
63
+ * **Declarative** — pushes when `deps` change:
92
64
  * ```tsx
93
- * useVisibleState(() => ({
65
+ * useModelContext(() => ({
94
66
  * state: { board: selectedBoard },
95
67
  * summary: `Viewing "${selectedBoard?.name}"`,
96
68
  * }), [selectedBoard]);
97
69
  * ```
70
+ *
71
+ * **Imperative** — returns a push function:
72
+ * ```tsx
73
+ * const push = useModelContext();
74
+ * push({ board: selectedBoard }, "Viewing board X");
75
+ * ```
76
+ *
77
+ * The debounce lives here rather than on `app.updateModelContext`, which
78
+ * sends immediately: the rapid-change problem is a React one, and the plain
79
+ * method should do what it says.
98
80
  */
99
- declare function useVisibleState(): (state: Record<string, unknown>, summary?: string) => void;
100
- declare function useVisibleState(factory: () => {
101
- state: Record<string, unknown>;
102
- summary?: string;
103
- }, deps: unknown[]): void;
104
- declare function useFileUpload(): {
81
+ declare function useModelContext(): (state: Record<string, unknown>, summary?: string) => void;
82
+ declare function useModelContext(factory: () => ModelContext, deps: unknown[]): void;
83
+ /** Send a user message into the agent conversation. */
84
+ declare function useSendMessage(): (text: string, context?: {
85
+ action?: string;
86
+ entity?: string;
87
+ }) => void;
88
+ /** Trigger a host-side action. No-op off a NimbleBrain host. */
89
+ declare function useAction(): (name: string, params?: Record<string, unknown>) => void;
90
+ interface UseFileUploadResult {
105
91
  pickFile: (options?: RequestFileOptions) => Promise<FileResult | null>;
106
92
  pickFiles: (options?: RequestFileOptions) => Promise<FileResult[]>;
107
93
  isPending: boolean;
108
- };
109
- declare function useStore<TState, TActions extends Record<string, ActionReducer<TState, any>>>(store: Store<TState, TActions>): {
110
- state: TState;
111
- dispatch: StoreDispatch<TActions>;
112
- };
94
+ }
95
+ /** The host's native file picker, with a pending flag. NimbleBrain only. */
96
+ declare function useFileUpload(): UseFileUploadResult;
113
97
  interface UseCallToolAsTaskResult<TInput, TOutput> {
114
98
  /**
115
99
  * Start (or re-start) a task-augmented tool call. Returns the
@@ -140,7 +124,7 @@ interface UseCallToolAsTaskResult<TInput, TOutput> {
140
124
  cancel(): Promise<void>;
141
125
  }
142
126
  /**
143
- * React hook wrapper around `synapse.callToolAsTask`.
127
+ * React wrapper around `callToolAsTask(app, …)`.
144
128
  *
145
129
  * Handles the full MCP 2025-11-25 task lifecycle:
146
130
  *
@@ -162,4 +146,4 @@ interface UseCallToolAsTaskResult<TInput, TOutput> {
162
146
  */
163
147
  declare function useCallToolAsTask<TInput = Record<string, unknown>, TOutput = unknown>(toolName: string): UseCallToolAsTaskResult<TInput, TOutput>;
164
148
 
165
- export { AppProvider, type AppProviderProps, SynapseProvider, type SynapseProviderProps, type UseCallToolAsTaskResult, useAction, useAgentAction, useApp, useCallTool, useCallToolAsTask, useChat, useConnectTheme, useDataSync, useFileUpload, useHostContext, useResize, useStore, useSynapse, useTheme, useToolInput, useToolResult, useVisibleState };
149
+ export { AppProvider, type AppProviderProps, type UseCallToolAsTaskResult, type UseCallToolResult, type UseFileUploadResult, useAction, useApp, useCallTool, useCallToolAsTask, useDataSync, useFileUpload, useHostContext, useModelContext, useResize, useSendMessage, useTheme, useToolInput, useToolResult };
@@ -1,115 +1,99 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { ReactNode } from 'react';
3
- import { C as ConnectOptions, A as App, q as Theme, s as ToolResultData, S as SynapseOptions, g as CallToolAsTaskOptions, o as TaskHandle, r as ToolCallResult, e as AgentAction, D as DataChangedEvent, R as RequestFileOptions, i as FileResult, b as ActionReducer, d as Store, m as StoreDispatch, a as Synapse, n as SynapseTheme } from '../types-BSZasM8q.js';
3
+ import { C as ConnectOptions, a as CallToolAsTaskOptions, T as TaskHandle, b as ToolCallResult, c as CallToolOptions, R as RequestFileOptions, F as FileResult, A as App, D as DataChangedEvent, M as ModelContext, d as Theme, e as ToolResultData } from '../types-uEO4VFJ2.js';
4
4
  import { McpUiHostContext } from '@modelcontextprotocol/ext-apps';
5
5
  import { Task } from '@modelcontextprotocol/sdk/types.js';
6
6
 
7
7
  interface AppProviderProps extends ConnectOptions {
8
8
  children: ReactNode;
9
9
  }
10
- declare function AppProvider({ children, name, version, autoResize }: AppProviderProps): react_jsx_runtime.JSX.Element | null;
10
+ /**
11
+ * Connect on mount and provide the {@link App} to everything below.
12
+ *
13
+ * Renders nothing until the handshake completes, so no hook below can observe
14
+ * a half-connected app and no tool call can be fired into a host that has not
15
+ * answered `ui/initialize` yet.
16
+ */
17
+ declare function AppProvider({ children, ...options }: AppProviderProps): react_jsx_runtime.JSX.Element | null;
11
18
 
19
+ /** The connected app. Throws outside an `<AppProvider>`. */
12
20
  declare function useApp(): App;
13
- declare function useToolResult(): ToolResultData | null;
14
- declare function useToolInput(): Record<string, unknown> | null;
15
- declare function useConnectTheme(): Theme;
16
- declare function useResize(): (width?: number, height?: number) => void;
17
-
18
- interface SynapseProviderProps extends SynapseOptions {
19
- children: ReactNode;
20
- }
21
- declare function SynapseProvider({ children, ...options }: SynapseProviderProps): react_jsx_runtime.JSX.Element;
22
-
23
- declare function useSynapse(): Synapse;
24
- declare function useCallTool<TOutput = unknown>(toolName: string): {
25
- call: (args?: Record<string, unknown>) => Promise<ToolCallResult<TOutput>>;
26
- isPending: boolean;
27
- error: Error | null;
28
- data: TOutput | null;
29
- };
30
- declare function useDataSync(callback: (event: DataChangedEvent) => void): void;
31
21
  /**
32
- * Subscribe to agent actions — typed, declarative commands from the server.
33
- *
34
- * Actions are emitted by tools as deterministic side effects (e.g., "navigate
35
- * to the board I just created"). The UI decides how to handle each action type.
22
+ * The current theme, re-rendering only when it actually moves.
36
23
  *
37
- * @example
38
- * ```tsx
39
- * useAgentAction((action) => {
40
- * if (action.type === "navigate") {
41
- * const { entity, id } = action.payload as NavigatePayload;
42
- * if (entity === "board") setSelectedBoardId(id);
43
- * }
44
- * });
45
- * ```
24
+ * `App` filters `host-context-changed` notifications through a theme equality
25
+ * check, so a context update that leaves the derived theme untouched (a
26
+ * workspace switch, say) does not re-render every themed component.
46
27
  */
47
- declare function useAgentAction(callback: (action: AgentAction) => void): void;
28
+ declare function useTheme(): Theme;
48
29
  /**
49
- * Subscribe to the full ext-apps host context.
50
- *
51
- * Returns the host context bag — spec-standardized fields (`theme`, `styles`,
52
- * `displayMode`, `toolInfo`) plus any host extensions. Re-renders on every
53
- * `ui/notifications/host-context-changed` notification.
30
+ * The full ext-apps host context — spec fields (`theme`, `styles`,
31
+ * `displayMode`, `toolInfo`) plus whatever the host publishes alongside.
32
+ * Re-renders on every `host-context-changed`.
54
33
  *
55
- * Prefer `useTheme()` when only theming matters (it filters no-op fires and
56
- * returns a typed `SynapseTheme`). Reach for `useHostContext()` for non-theme
57
- * fields like host-specific extensions, e.g. on NimbleBrain:
34
+ * Prefer `useTheme()` when only theming matters: it filters no-op fires.
35
+ * Reach for this one for host extensions, e.g. on NimbleBrain:
58
36
  *
59
37
  * ```tsx
60
38
  * const { workspace } = useHostContext<{ workspace?: { id: string } }>();
61
39
  * ```
62
40
  */
63
41
  declare function useHostContext<T extends McpUiHostContext = McpUiHostContext>(): T;
42
+ /** The latest tool result pushed by the host, or `null` before one arrives. */
43
+ declare function useToolResult(): ToolResultData | null;
44
+ /** The arguments the host is calling the bound tool with, as they arrive. */
45
+ declare function useToolInput(): Record<string, unknown> | null;
46
+ /** Ask the host to resize this app's frame. */
47
+ declare function useResize(): (width?: number, height?: number) => void;
48
+ interface UseCallToolResult<TOutput> {
49
+ call: (args?: Record<string, unknown>, options?: CallToolOptions) => Promise<ToolCallResult<TOutput>>;
50
+ isPending: boolean;
51
+ error: Error | null;
52
+ data: TOutput | null;
53
+ }
54
+ /** Call one tool, with pending/error/data state for the latest call. */
55
+ declare function useCallTool<TOutput = unknown>(toolName: string): UseCallToolResult<TOutput>;
56
+ /** Run `callback` whenever the agent changes data this app displays. */
57
+ declare function useDataSync(callback: (event: DataChangedEvent) => void): void;
64
58
  /**
65
- * Re-renders only when the derived `SynapseTheme` actually changes (mode,
66
- * primaryColor, or any token value). Routes through `synapse.onThemeChanged`
67
- * — which is itself a `themesEqual`-filtered selector over the unified host
68
- * context — so a host-context update that doesn't move the theme (e.g. a
69
- * workspace switch) does NOT cause this hook's consumers to re-render.
70
- *
71
- * Building this on `useHostContext` instead would skip the filter: every
72
- * host-context-changed notification produces a new context reference, which
73
- * would propagate through `useState` and force a re-render even when the
74
- * derived theme is unchanged.
75
- */
76
- declare function useTheme(): SynapseTheme;
77
- declare function useAction(): (action: string, params?: Record<string, unknown>) => void;
78
- declare function useChat(): (message: string, context?: {
79
- action?: string;
80
- entity?: string;
81
- }) => void;
82
- /**
83
- * Push the app's visible state to the agent via ext-apps `ui/update-model-context`.
84
- *
85
- * **Imperative** (no args) — returns a push function you call manually:
86
- * ```tsx
87
- * const push = useVisibleState();
88
- * push({ board: selectedBoard }, "Viewing board X");
89
- * ```
59
+ * Push what the user is looking at to the agent (ext-apps
60
+ * `ui/update-model-context`), debounced so a selection the user drags through
61
+ * costs one frame rather than thirty.
90
62
  *
91
- * **Declarative** (factory + deps) — auto-pushes when deps change:
63
+ * **Declarative** — pushes when `deps` change:
92
64
  * ```tsx
93
- * useVisibleState(() => ({
65
+ * useModelContext(() => ({
94
66
  * state: { board: selectedBoard },
95
67
  * summary: `Viewing "${selectedBoard?.name}"`,
96
68
  * }), [selectedBoard]);
97
69
  * ```
70
+ *
71
+ * **Imperative** — returns a push function:
72
+ * ```tsx
73
+ * const push = useModelContext();
74
+ * push({ board: selectedBoard }, "Viewing board X");
75
+ * ```
76
+ *
77
+ * The debounce lives here rather than on `app.updateModelContext`, which
78
+ * sends immediately: the rapid-change problem is a React one, and the plain
79
+ * method should do what it says.
98
80
  */
99
- declare function useVisibleState(): (state: Record<string, unknown>, summary?: string) => void;
100
- declare function useVisibleState(factory: () => {
101
- state: Record<string, unknown>;
102
- summary?: string;
103
- }, deps: unknown[]): void;
104
- declare function useFileUpload(): {
81
+ declare function useModelContext(): (state: Record<string, unknown>, summary?: string) => void;
82
+ declare function useModelContext(factory: () => ModelContext, deps: unknown[]): void;
83
+ /** Send a user message into the agent conversation. */
84
+ declare function useSendMessage(): (text: string, context?: {
85
+ action?: string;
86
+ entity?: string;
87
+ }) => void;
88
+ /** Trigger a host-side action. No-op off a NimbleBrain host. */
89
+ declare function useAction(): (name: string, params?: Record<string, unknown>) => void;
90
+ interface UseFileUploadResult {
105
91
  pickFile: (options?: RequestFileOptions) => Promise<FileResult | null>;
106
92
  pickFiles: (options?: RequestFileOptions) => Promise<FileResult[]>;
107
93
  isPending: boolean;
108
- };
109
- declare function useStore<TState, TActions extends Record<string, ActionReducer<TState, any>>>(store: Store<TState, TActions>): {
110
- state: TState;
111
- dispatch: StoreDispatch<TActions>;
112
- };
94
+ }
95
+ /** The host's native file picker, with a pending flag. NimbleBrain only. */
96
+ declare function useFileUpload(): UseFileUploadResult;
113
97
  interface UseCallToolAsTaskResult<TInput, TOutput> {
114
98
  /**
115
99
  * Start (or re-start) a task-augmented tool call. Returns the
@@ -140,7 +124,7 @@ interface UseCallToolAsTaskResult<TInput, TOutput> {
140
124
  cancel(): Promise<void>;
141
125
  }
142
126
  /**
143
- * React hook wrapper around `synapse.callToolAsTask`.
127
+ * React wrapper around `callToolAsTask(app, …)`.
144
128
  *
145
129
  * Handles the full MCP 2025-11-25 task lifecycle:
146
130
  *
@@ -162,4 +146,4 @@ interface UseCallToolAsTaskResult<TInput, TOutput> {
162
146
  */
163
147
  declare function useCallToolAsTask<TInput = Record<string, unknown>, TOutput = unknown>(toolName: string): UseCallToolAsTaskResult<TInput, TOutput>;
164
148
 
165
- export { AppProvider, type AppProviderProps, SynapseProvider, type SynapseProviderProps, type UseCallToolAsTaskResult, useAction, useAgentAction, useApp, useCallTool, useCallToolAsTask, useChat, useConnectTheme, useDataSync, useFileUpload, useHostContext, useResize, useStore, useSynapse, useTheme, useToolInput, useToolResult, useVisibleState };
149
+ export { AppProvider, type AppProviderProps, type UseCallToolAsTaskResult, type UseCallToolResult, type UseFileUploadResult, useAction, useApp, useCallTool, useCallToolAsTask, useDataSync, useFileUpload, useHostContext, useModelContext, useResize, useSendMessage, useTheme, useToolInput, useToolResult };