@creature-ai/sdk 0.1.19 → 0.1.21
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/dist/server/index.d.ts +0 -6
- package/dist/server/index.js +15 -13
- package/dist/server/index.js.map +1 -1
- package/package.json +1 -1
package/dist/server/index.d.ts
CHANGED
|
@@ -184,12 +184,6 @@ interface ToolResult {
|
|
|
184
184
|
inlineHeight?: number;
|
|
185
185
|
/** Whether this is an error result */
|
|
186
186
|
isError?: boolean;
|
|
187
|
-
/**
|
|
188
|
-
* Skip widget creation for this tool call.
|
|
189
|
-
* When true, no PIP/panel is created even if the tool has a `ui` configured.
|
|
190
|
-
* Use for read-only operations (read, list, delete) that shouldn't open UI.
|
|
191
|
-
*/
|
|
192
|
-
noWidget?: boolean;
|
|
193
187
|
}
|
|
194
188
|
/**
|
|
195
189
|
* Tool handler function type.
|
package/dist/server/index.js
CHANGED
|
@@ -14150,13 +14150,6 @@ var App = class {
|
|
|
14150
14150
|
*/
|
|
14151
14151
|
formatServerlessResult(result, instanceId, websocketUrl) {
|
|
14152
14152
|
const text = result.text || JSON.stringify(result.data || {});
|
|
14153
|
-
if (result.noWidget) {
|
|
14154
|
-
return {
|
|
14155
|
-
content: [{ type: "text", text }],
|
|
14156
|
-
structuredContent: result.data ? { ...result.data } : void 0,
|
|
14157
|
-
...result.isError && { isError: true }
|
|
14158
|
-
};
|
|
14159
|
-
}
|
|
14160
14153
|
return {
|
|
14161
14154
|
content: [{ type: "text", text }],
|
|
14162
14155
|
structuredContent: {
|
|
@@ -14295,7 +14288,12 @@ var App = class {
|
|
|
14295
14288
|
uri,
|
|
14296
14289
|
name: config.name,
|
|
14297
14290
|
description: config.description,
|
|
14298
|
-
mimeType: MIME_TYPES.MCP_APPS
|
|
14291
|
+
mimeType: MIME_TYPES.MCP_APPS,
|
|
14292
|
+
_meta: {
|
|
14293
|
+
ui: {
|
|
14294
|
+
multiInstance: config.multiInstance
|
|
14295
|
+
}
|
|
14296
|
+
}
|
|
14299
14297
|
});
|
|
14300
14298
|
}
|
|
14301
14299
|
return { jsonrpc: "2.0", result: { resources }, id };
|
|
@@ -14641,7 +14639,12 @@ var App = class {
|
|
|
14641
14639
|
uri,
|
|
14642
14640
|
{
|
|
14643
14641
|
mimeType: MIME_TYPES.MCP_APPS,
|
|
14644
|
-
description: config.description
|
|
14642
|
+
description: config.description,
|
|
14643
|
+
_meta: {
|
|
14644
|
+
ui: {
|
|
14645
|
+
multiInstance: config.multiInstance
|
|
14646
|
+
}
|
|
14647
|
+
}
|
|
14645
14648
|
},
|
|
14646
14649
|
async () => {
|
|
14647
14650
|
let html = typeof config.html === "function" ? await config.html() : config.html;
|
|
@@ -14822,16 +14825,15 @@ var App = class {
|
|
|
14822
14825
|
*/
|
|
14823
14826
|
formatToolResult(result, instanceId, websocketUrl) {
|
|
14824
14827
|
const text = result.text || JSON.stringify(result.data || {});
|
|
14825
|
-
const skipWidget = result.noWidget;
|
|
14826
14828
|
const structuredContent = {
|
|
14827
14829
|
...result.data,
|
|
14828
14830
|
...result.title && { title: result.title },
|
|
14829
14831
|
...result.inlineHeight && { inlineHeight: result.inlineHeight },
|
|
14830
|
-
|
|
14831
|
-
|
|
14832
|
+
...instanceId && { instanceId },
|
|
14833
|
+
...websocketUrl && { websocketUrl }
|
|
14832
14834
|
};
|
|
14833
14835
|
const meta = {};
|
|
14834
|
-
if (
|
|
14836
|
+
if (instanceId) {
|
|
14835
14837
|
meta["openai/widgetSessionId"] = instanceId;
|
|
14836
14838
|
}
|
|
14837
14839
|
return {
|