@vivix-labs/studio-chat-mcp 0.1.11 → 0.1.13
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 +122 -0
- package/dist/chat-ui/index.html +21 -21
- package/dist/server.js +23 -10
- package/dist/shared.d.ts +2 -0
- package/package.json +8 -8
package/dist/server.js
CHANGED
|
@@ -29429,7 +29429,7 @@ data:
|
|
|
29429
29429
|
// package.json
|
|
29430
29430
|
var package_default = {
|
|
29431
29431
|
name: "@vivix-labs/studio-chat-mcp",
|
|
29432
|
-
version: "0.1.
|
|
29432
|
+
version: "0.1.13",
|
|
29433
29433
|
type: "module",
|
|
29434
29434
|
engines: {
|
|
29435
29435
|
node: ">=22.12.0"
|
|
@@ -37794,12 +37794,24 @@ var options = {
|
|
|
37794
37794
|
requestKey: external_exports.string().min(1).max(200).refine((value) => Boolean(value.trim())).optional(),
|
|
37795
37795
|
approval: external_exports.string().min(1).optional()
|
|
37796
37796
|
};
|
|
37797
|
-
var
|
|
37797
|
+
var jsonObjectInput = external_exports.preprocess(
|
|
37798
|
+
(value) => {
|
|
37799
|
+
if (typeof value !== "string") return value;
|
|
37800
|
+
try {
|
|
37801
|
+
const parsed = JSON.parse(value);
|
|
37802
|
+
return parsed && typeof parsed === "object" && !Array.isArray(parsed) ? parsed : value;
|
|
37803
|
+
} catch {
|
|
37804
|
+
return value;
|
|
37805
|
+
}
|
|
37806
|
+
},
|
|
37807
|
+
external_exports.record(external_exports.string(), external_exports.unknown())
|
|
37808
|
+
);
|
|
37809
|
+
var chatRunSchema = external_exports.object({ target: targetSchema, input: jsonObjectInput, ...options }).strict();
|
|
37798
37810
|
var chatActionSchema = external_exports.object({
|
|
37799
37811
|
target: targetSchema,
|
|
37800
37812
|
binding: external_exports.string().min(1).max(65536),
|
|
37801
37813
|
action: operationId,
|
|
37802
|
-
input:
|
|
37814
|
+
input: jsonObjectInput.optional(),
|
|
37803
37815
|
...options
|
|
37804
37816
|
}).strict();
|
|
37805
37817
|
var projectionSchema = external_exports.object({
|
|
@@ -38496,17 +38508,17 @@ var routing = (value, context) => {
|
|
|
38496
38508
|
message: "Use either scope or legacy projectId, not both."
|
|
38497
38509
|
});
|
|
38498
38510
|
};
|
|
38499
|
-
var runInput = external_exports.object({ ...common, input:
|
|
38511
|
+
var runInput = external_exports.object({ ...common, input: jsonObjectInput }).strict().superRefine(routing);
|
|
38500
38512
|
var actionInput = external_exports.object({
|
|
38501
38513
|
...common,
|
|
38502
38514
|
binding: external_exports.string().min(1).max(65536),
|
|
38503
38515
|
action: identifier,
|
|
38504
|
-
input:
|
|
38516
|
+
input: jsonObjectInput.optional()
|
|
38505
38517
|
}).strict().superRefine(routing);
|
|
38506
38518
|
function mapChatResult(result) {
|
|
38507
38519
|
const { bindings: _bindings, ...structuredContent } = result.structuredContent;
|
|
38508
38520
|
return {
|
|
38509
|
-
content: [{ type: "text", text: result.text }],
|
|
38521
|
+
content: result.text ? [{ type: "text", text: result.text }] : [],
|
|
38510
38522
|
structuredContent,
|
|
38511
38523
|
...(result.view || result.message) && {
|
|
38512
38524
|
_meta: {
|
|
@@ -38655,8 +38667,8 @@ function createChatServer(options2) {
|
|
|
38655
38667
|
"query_studio_media",
|
|
38656
38668
|
{
|
|
38657
38669
|
title: "Read Studio media records",
|
|
38658
|
-
description: "Run a discovered, read-only media query on this same Host. Read its input schema first. Use the actual returned fixed refs when selecting historical files; this never invokes a write or generation.",
|
|
38659
|
-
inputSchema: external_exports.object({ scope: scopeSchema.default(userScope), target, input:
|
|
38670
|
+
description: "Run a discovered, read-only media query on this same Host. Read its input schema first. `input` is a JSON object; a JSON-encoded object string is accepted and normalized. Use the actual returned fixed refs when selecting historical files; this never invokes a write or generation.",
|
|
38671
|
+
inputSchema: external_exports.object({ scope: scopeSchema.default(userScope), target, input: jsonObjectInput }).strict()
|
|
38660
38672
|
},
|
|
38661
38673
|
({ scope, target: selected, input: input2 }) => readResult("Media records read.", () => queryStudioMedia(host, scope, selected, input2))
|
|
38662
38674
|
);
|
|
@@ -38677,7 +38689,7 @@ function createChatServer(options2) {
|
|
|
38677
38689
|
"run_studio_action",
|
|
38678
38690
|
{
|
|
38679
38691
|
title: "Run Studio action",
|
|
38680
|
-
description: "Open a component or declared project card using the scope, target and contract returned by this connection discovery tools. Default interface headings, field labels, group headings and buttons to English unless the user requests another interface language. Preserve story names, story text and user input in their original language. User-scope components work without a business project. Project business operations require the selected project scope. Legacy projectId calls remain supported. Preserve requestKey and original input for uncertain recovery.",
|
|
38692
|
+
description: "Open a component or declared project card using the scope, target and contract returned by this connection discovery tools. `input` is a JSON object; a JSON-encoded object string is accepted and normalized. Default interface headings, field labels, group headings and buttons to English unless the user requests another interface language. Preserve story names, story text and user input in their original language. User-scope components work without a business project. Project business operations require the selected project scope. Legacy projectId calls remain supported. Preserve requestKey and original input for uncertain recovery.",
|
|
38681
38693
|
inputSchema: runInput,
|
|
38682
38694
|
_meta: { ui: { resourceUri: chatResourceUri } }
|
|
38683
38695
|
},
|
|
@@ -38687,7 +38699,7 @@ function createChatServer(options2) {
|
|
|
38687
38699
|
"studio_card_action",
|
|
38688
38700
|
{
|
|
38689
38701
|
title: "Studio card action",
|
|
38690
|
-
description: "Call an action declared by the operation that opened this card. Keep its original projectId, source target and Host binding. The adapter resolves the destination. The Host validates input, enforces permissions and confirmation, and preserves the request key. Business parameters belong in input.",
|
|
38702
|
+
description: "Call an action declared by the operation that opened this card. Keep its original projectId, source target and Host binding. The adapter resolves the destination. The Host validates input, enforces permissions and confirmation, and preserves the request key. Business parameters belong in input, which is a JSON object; a JSON-encoded object string is accepted and normalized.",
|
|
38691
38703
|
inputSchema: actionInput,
|
|
38692
38704
|
_meta: { ui: { visibility: ["app"] } }
|
|
38693
38705
|
},
|
|
@@ -38741,6 +38753,7 @@ function createChatServer(options2) {
|
|
|
38741
38753
|
// The component's CSP restricts HTTPS media to its declared media origins.
|
|
38742
38754
|
// This outer policy must permit those origins before the component can narrow them.
|
|
38743
38755
|
ui: {
|
|
38756
|
+
prefersBorder: false,
|
|
38744
38757
|
csp: {
|
|
38745
38758
|
connectDomains: [],
|
|
38746
38759
|
resourceDomains: [...options2.resourceDomains ?? defaultResourceDomains, "data:", "blob:"],
|
package/dist/shared.d.ts
CHANGED
|
@@ -91,6 +91,8 @@ export interface ChatCardProps {
|
|
|
91
91
|
data: Record<string, unknown>;
|
|
92
92
|
projectId: string;
|
|
93
93
|
target: OperationTarget;
|
|
94
|
+
/** Theme the host currently displays. Absent when the host declares none; it may change while mounted. */
|
|
95
|
+
theme?: 'light' | 'dark';
|
|
94
96
|
/** Download an original card media URL through the MCP Apps host, when supported. */
|
|
95
97
|
download?(media: { uri: string; name: string }): Promise<void>;
|
|
96
98
|
/** Read bytes of a local media path declared by this card, without a public URL. */
|
package/package.json
CHANGED
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vivix-labs/studio-chat-mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.13",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=22.12.0"
|
|
7
7
|
},
|
|
8
|
-
"scripts": {
|
|
9
|
-
"build": "tsx scripts/build-chat-mcp.ts build",
|
|
10
|
-
"package": "tsx scripts/build-chat-mcp.ts package",
|
|
11
|
-
"check": "tsc --noEmit",
|
|
12
|
-
"test": "tsx --test tests/*.test.ts chat-ui/*.test.ts"
|
|
13
|
-
},
|
|
14
8
|
"devDependencies": {
|
|
15
9
|
"@modelcontextprotocol/client": "2.4.0",
|
|
16
10
|
"@modelcontextprotocol/core": "2.4.0",
|
|
@@ -46,5 +40,11 @@
|
|
|
46
40
|
"access": "public",
|
|
47
41
|
"registry": "https://registry.npmjs.org/",
|
|
48
42
|
"tag": "beta"
|
|
43
|
+
},
|
|
44
|
+
"scripts": {
|
|
45
|
+
"build": "tsx scripts/build-chat-mcp.ts build",
|
|
46
|
+
"package": "tsx scripts/build-chat-mcp.ts package",
|
|
47
|
+
"check": "tsc --noEmit",
|
|
48
|
+
"test": "tsx --test tests/*.test.ts chat-ui/*.test.ts"
|
|
49
49
|
}
|
|
50
|
-
}
|
|
50
|
+
}
|