open-mcp-app 0.0.6 → 0.0.8
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 +11 -1
- package/dist/core/index.js +11 -11
- package/dist/core/index.js.map +1 -1
- package/dist/react/index.d.ts +5 -0
- package/dist/react/index.js +201 -34
- package/dist/react/index.js.map +1 -1
- package/dist/server/index.d.ts +70 -16
- package/dist/server/index.js +339 -349
- package/dist/server/index.js.map +1 -1
- package/dist/styles/theme.css +0 -30
- package/dist/styles/utilities.css +18 -7
- package/dist/vite/index.d.ts +1 -50
- package/dist/vite/index.js +5 -217
- package/dist/vite/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -87,6 +87,17 @@ host.exp.setWidgetState({
|
|
|
87
87
|
const state = host.widgetState;
|
|
88
88
|
```
|
|
89
89
|
|
|
90
|
+
**Behavior:** The SDK de-duplicates identical `exp.setWidgetState` payloads and may throttle rapid updates to avoid render loops.
|
|
91
|
+
|
|
92
|
+
### Connection Resilience
|
|
93
|
+
|
|
94
|
+
The React host client is designed to be safe to call early and often:
|
|
95
|
+
|
|
96
|
+
- **Tool calls queue until ready**: `callTool` waits for the host connection before sending.
|
|
97
|
+
- **In-flight dedupe**: identical concurrent tool calls share a single request.
|
|
98
|
+
- **Buffered logs and notifications**: `log.*` and `exp.sendNotification` are queued until ready.
|
|
99
|
+
- **Widget state dedupe**: repeated `exp.setWidgetState` payloads are ignored to avoid loops.
|
|
100
|
+
|
|
90
101
|
### Update Model Context
|
|
91
102
|
|
|
92
103
|
Explicitly inform the AI model about user actions without triggering an immediate response. Use this when the UI needs the model to know about important interactions (file selections, preferences, etc.) for future turns.
|
|
@@ -149,7 +160,6 @@ export default {
|
|
|
149
160
|
```
|
|
150
161
|
|
|
151
162
|
The Vite plugin provides:
|
|
152
|
-
- Hot Module Replacement in the Creature iframe
|
|
153
163
|
- Automatic port discovery between UI and server
|
|
154
164
|
- Development proxy configuration
|
|
155
165
|
|
package/dist/core/index.js
CHANGED
|
@@ -351,7 +351,7 @@ var ChatGptWebHostClient = class _ChatGptWebHostClient extends Subscribable {
|
|
|
351
351
|
}
|
|
352
352
|
};
|
|
353
353
|
|
|
354
|
-
// node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js
|
|
354
|
+
// ../../node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js
|
|
355
355
|
import * as z3rt from "zod/v3";
|
|
356
356
|
import * as z4mini from "zod/v4-mini";
|
|
357
357
|
function isZ4Schema(s2) {
|
|
@@ -416,7 +416,7 @@ function getLiteralValue(schema) {
|
|
|
416
416
|
return void 0;
|
|
417
417
|
}
|
|
418
418
|
|
|
419
|
-
// node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
|
|
419
|
+
// ../../node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
|
|
420
420
|
import * as z from "zod/v4";
|
|
421
421
|
var RELATED_TASK_META_KEY = "io.modelcontextprotocol/related-task";
|
|
422
422
|
var JSONRPC_VERSION = "2.0";
|
|
@@ -1921,27 +1921,27 @@ var UrlElicitationRequiredError = class extends McpError {
|
|
|
1921
1921
|
}
|
|
1922
1922
|
};
|
|
1923
1923
|
|
|
1924
|
-
// node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js
|
|
1924
|
+
// ../../node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js
|
|
1925
1925
|
function isTerminal(status) {
|
|
1926
1926
|
return status === "completed" || status === "failed" || status === "cancelled";
|
|
1927
1927
|
}
|
|
1928
1928
|
|
|
1929
|
-
// node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js
|
|
1929
|
+
// ../../node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js
|
|
1930
1930
|
import * as z4mini2 from "zod/v4-mini";
|
|
1931
1931
|
|
|
1932
|
-
// node_modules/zod-to-json-schema/dist/esm/selectParser.js
|
|
1932
|
+
// ../../node_modules/zod-to-json-schema/dist/esm/selectParser.js
|
|
1933
1933
|
import { ZodFirstPartyTypeKind as ZodFirstPartyTypeKind3 } from "zod/v3";
|
|
1934
1934
|
|
|
1935
|
-
// node_modules/zod-to-json-schema/dist/esm/parsers/array.js
|
|
1935
|
+
// ../../node_modules/zod-to-json-schema/dist/esm/parsers/array.js
|
|
1936
1936
|
import { ZodFirstPartyTypeKind } from "zod/v3";
|
|
1937
1937
|
|
|
1938
|
-
// node_modules/zod-to-json-schema/dist/esm/parsers/record.js
|
|
1938
|
+
// ../../node_modules/zod-to-json-schema/dist/esm/parsers/record.js
|
|
1939
1939
|
import { ZodFirstPartyTypeKind as ZodFirstPartyTypeKind2 } from "zod/v3";
|
|
1940
1940
|
|
|
1941
|
-
// node_modules/zod-to-json-schema/dist/esm/parsers/string.js
|
|
1941
|
+
// ../../node_modules/zod-to-json-schema/dist/esm/parsers/string.js
|
|
1942
1942
|
var ALPHA_NUMERIC = new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");
|
|
1943
1943
|
|
|
1944
|
-
// node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js
|
|
1944
|
+
// ../../node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js
|
|
1945
1945
|
function getMethodLiteral(schema) {
|
|
1946
1946
|
const shape = getObjectShape(schema);
|
|
1947
1947
|
const methodSchema = shape?.method;
|
|
@@ -1962,7 +1962,7 @@ function parseWithCompat(schema, data) {
|
|
|
1962
1962
|
return result.data;
|
|
1963
1963
|
}
|
|
1964
1964
|
|
|
1965
|
-
// node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js
|
|
1965
|
+
// ../../node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js
|
|
1966
1966
|
var DEFAULT_REQUEST_TIMEOUT_MSEC = 6e4;
|
|
1967
1967
|
var Protocol = class {
|
|
1968
1968
|
constructor(_options) {
|
|
@@ -2879,7 +2879,7 @@ var Protocol = class {
|
|
|
2879
2879
|
}
|
|
2880
2880
|
};
|
|
2881
2881
|
|
|
2882
|
-
// node_modules/@modelcontextprotocol/ext-apps/dist/src/app.js
|
|
2882
|
+
// ../../node_modules/@modelcontextprotocol/ext-apps/dist/src/app.js
|
|
2883
2883
|
var S4 = Object.defineProperty;
|
|
2884
2884
|
var d = (r, v) => {
|
|
2885
2885
|
for (var o in v) S4(r, o, { get: v[o], enumerable: true, configurable: true, set: ($) => v[o] = () => $ });
|