@vivix-labs/studio-chat-mcp 0.1.1 → 0.1.3
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 +27 -2
- package/dist/chat-ui/index.html +19 -19
- package/dist/server.js +515 -52
- package/dist/shared.d.ts +26 -0
- package/package.json +1 -1
- package/skills/vivix-studio-chat/SKILL.md +13 -2
package/dist/shared.d.ts
CHANGED
|
@@ -82,12 +82,19 @@ export interface OperationChat<O = unknown> {
|
|
|
82
82
|
actions: Readonly<
|
|
83
83
|
Record<string, string | OperationTarget | ChatActionBinding | ChatMessageBinding>
|
|
84
84
|
>;
|
|
85
|
+
/** Installed server code resolves native actions from input or signed bindingContext.
|
|
86
|
+
* The adapter admits these exact same-scope targets through host.operations. */
|
|
87
|
+
dynamicActions?: (context: unknown) => Readonly<Record<string, ChatActionBinding>>;
|
|
85
88
|
}
|
|
86
89
|
|
|
87
90
|
export interface ChatCardProps {
|
|
88
91
|
data: Record<string, unknown>;
|
|
89
92
|
projectId: string;
|
|
90
93
|
target: OperationTarget;
|
|
94
|
+
/** Download an original card media URL through the MCP Apps host, when supported. */
|
|
95
|
+
download?(media: { uri: string; name: string }): Promise<void>;
|
|
96
|
+
/** Read bytes of a local media path declared by this card, without a public URL. */
|
|
97
|
+
readMedia?(input: LocalMediaRead): Promise<LocalMediaChunk>;
|
|
91
98
|
action(
|
|
92
99
|
name: string,
|
|
93
100
|
input?: Record<string, unknown>,
|
|
@@ -95,6 +102,25 @@ export interface ChatCardProps {
|
|
|
95
102
|
): Promise<ChatCardResult>;
|
|
96
103
|
}
|
|
97
104
|
|
|
105
|
+
export interface LocalMediaSnapshot {
|
|
106
|
+
sizeBytes: number;
|
|
107
|
+
mtimeMs: number;
|
|
108
|
+
inode: number;
|
|
109
|
+
device: number;
|
|
110
|
+
}
|
|
111
|
+
export interface LocalMediaRead {
|
|
112
|
+
path: string;
|
|
113
|
+
offset: number;
|
|
114
|
+
expected?: LocalMediaSnapshot;
|
|
115
|
+
}
|
|
116
|
+
export interface LocalMediaChunk {
|
|
117
|
+
base64: string;
|
|
118
|
+
nextOffset: number;
|
|
119
|
+
totalBytes: number;
|
|
120
|
+
mimeType: string;
|
|
121
|
+
snapshot: LocalMediaSnapshot;
|
|
122
|
+
}
|
|
123
|
+
|
|
98
124
|
/** The sandbox receives projection data and errors, never executable bundle metadata. */
|
|
99
125
|
export interface ChatCardResult {
|
|
100
126
|
text: string;
|
package/package.json
CHANGED
|
@@ -24,6 +24,13 @@ returned `scope`, `target`, schemas and examples. General conversation component
|
|
|
24
24
|
default to user scope and do not require creating a business project. The MCP
|
|
25
25
|
entry point reads the enabled provider's live catalog. Choose from that catalog.
|
|
26
26
|
|
|
27
|
+
For a reusable card button calling one native operation, explicitly search this
|
|
28
|
+
connection with `kind:"nativeOperation"` and describe the returned target with the
|
|
29
|
+
same kind. Read its input schema, effects and confirm. Configure target.mode=native
|
|
30
|
+
and inputBindings as described in the installed chat-components interaction guide.
|
|
31
|
+
The native operation needs no chat view or receiver envelope. Keep the original
|
|
32
|
+
scope and let the Host handle execution, approvals and request-key recovery.
|
|
33
|
+
|
|
27
34
|
Prepare props from the user's actual topic, draft or candidates. Open the
|
|
28
35
|
returned route with `run_studio_action`, using its actual scope and input.
|
|
29
36
|
Scope each prompt action to the clicked operation and use the latest interaction
|
|
@@ -40,8 +47,12 @@ readable URL does not prove the native host permits it. Report a URL-safety
|
|
|
40
47
|
rejection separately from expiry or decoding; do not proxy, rehost or disable
|
|
41
48
|
checks to evade that rejection. A changed UI resource must be tested in a
|
|
42
49
|
connection that actually loads the new resource version.
|
|
43
|
-
Use existing valid URLs directly.
|
|
44
|
-
|
|
50
|
+
Use existing valid URLs directly. For audio/video already available on the local
|
|
51
|
+
MCP Host, supply its absolute `path` instead of `src` in the component's media
|
|
52
|
+
item. The card reads `path + offset` through the App-only `read_local_media`
|
|
53
|
+
channel and loads the complete file before playback. It needs no preview ID,
|
|
54
|
+
import or public URL. A remote MCP Host cannot read a path on the user's computer.
|
|
55
|
+
This whole-file preview does not provide progressive long-video playback.
|
|
45
56
|
|
|
46
57
|
If discovery returns no ready matching capability, report that status and retain
|
|
47
58
|
the draft. For an unmet general presentation need, follow the installed
|