@aiworkbench/vibe-ide 0.0.1
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/core/boot.d.ts +15 -0
- package/dist/core/boot.d.ts.map +1 -0
- package/dist/core/bridge-shim.d.ts +9 -0
- package/dist/core/bridge-shim.d.ts.map +1 -0
- package/dist/core/filesystem.d.ts +39 -0
- package/dist/core/filesystem.d.ts.map +1 -0
- package/dist/core/inject-shim.d.ts +6 -0
- package/dist/core/inject-shim.d.ts.map +1 -0
- package/dist/core/install.d.ts +14 -0
- package/dist/core/install.d.ts.map +1 -0
- package/dist/core/preview-channel.d.ts +79 -0
- package/dist/core/preview-channel.d.ts.map +1 -0
- package/dist/core/process.d.ts +20 -0
- package/dist/core/process.d.ts.map +1 -0
- package/dist/ide-theme.css +248 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7699 -0
- package/dist/mcp/mcp-adapter.d.ts +45 -0
- package/dist/mcp/mcp-adapter.d.ts.map +1 -0
- package/dist/mcp/mcp-tools.d.ts +467 -0
- package/dist/mcp/mcp-tools.d.ts.map +1 -0
- package/dist/react/provider.d.ts +12 -0
- package/dist/react/provider.d.ts.map +1 -0
- package/dist/react/use-vibe-ide.d.ts +11 -0
- package/dist/react/use-vibe-ide.d.ts.map +1 -0
- package/dist/react/vibe-ide-bridge-relay.d.ts +14 -0
- package/dist/react/vibe-ide-bridge-relay.d.ts.map +1 -0
- package/dist/react/vibe-ide-layout.d.ts +10 -0
- package/dist/react/vibe-ide-layout.d.ts.map +1 -0
- package/dist/react/vibe-ide-preview-pane.d.ts +7 -0
- package/dist/react/vibe-ide-preview-pane.d.ts.map +1 -0
- package/dist/react/vibe-ide-toolbar.d.ts +15 -0
- package/dist/react/vibe-ide-toolbar.d.ts.map +1 -0
- package/dist/templates/generated.d.ts +22 -0
- package/dist/templates/generated.d.ts.map +1 -0
- package/dist/types.d.ts +187 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +41 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WebContainer MCP tool executor.
|
|
3
|
+
*
|
|
4
|
+
* Refactored from usecase-editor to:
|
|
5
|
+
* - Accept configurable `onApprovalRequest` callback instead of window events
|
|
6
|
+
* - Accept configurable `maxToolSteps` instead of importing host constants
|
|
7
|
+
* - Not set any window globals (no `window.__VIBE_IDE_ADAPTER__`)
|
|
8
|
+
*/
|
|
9
|
+
import type { WebContainer } from "@webcontainer/api";
|
|
10
|
+
import type { WebContainerMcpAdapterOptions } from "../types";
|
|
11
|
+
import type { WebContainerToolCall } from "./mcp-tools";
|
|
12
|
+
interface WriteCoalescer {
|
|
13
|
+
write(path: string, content: string): void;
|
|
14
|
+
flushImmediate?: (files: {
|
|
15
|
+
path: string;
|
|
16
|
+
content: string;
|
|
17
|
+
}[]) => Promise<void>;
|
|
18
|
+
}
|
|
19
|
+
export declare class WebContainerMcpAdapter {
|
|
20
|
+
private instance;
|
|
21
|
+
private coalescer?;
|
|
22
|
+
private devServerUrlReference;
|
|
23
|
+
private callCount;
|
|
24
|
+
private deleteCount;
|
|
25
|
+
private maxCallsPerCycle;
|
|
26
|
+
private maxDeletesBeforeApproval;
|
|
27
|
+
private onApprovalRequest?;
|
|
28
|
+
constructor(instance: WebContainer, coalescer?: WriteCoalescer | undefined, options?: WebContainerMcpAdapterOptions);
|
|
29
|
+
setDevServerUrl(url: string | null): void;
|
|
30
|
+
resetCallCount(): void;
|
|
31
|
+
private normalizePath;
|
|
32
|
+
private sanitizePath;
|
|
33
|
+
private isRequiresApproval;
|
|
34
|
+
private requestApproval;
|
|
35
|
+
private listFiles;
|
|
36
|
+
private ensureParentDirectory;
|
|
37
|
+
executeTool(toolCall: WebContainerToolCall): Promise<string>;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Create a WebContainer MCP adapter instance. Unlike the host version, this
|
|
41
|
+
* does NOT set `window.__VIBE_IDE_ADAPTER__` — the caller retains the reference.
|
|
42
|
+
*/
|
|
43
|
+
export declare function createWebContainerMcpAdapter(instance: WebContainer, coalescer?: WriteCoalescer, options?: WebContainerMcpAdapterOptions): WebContainerMcpAdapter;
|
|
44
|
+
export {};
|
|
45
|
+
//# sourceMappingURL=mcp-adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-adapter.d.ts","sourceRoot":"","sources":["../../src/mcp/mcp-adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAkB,MAAM,mBAAmB,CAAC;AACtE,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,UAAU,CAAC;AAC9D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AASxD,UAAU,cAAc;IACtB,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3C,cAAc,CAAC,EAAE,CACf,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,EAAE,KACvC,OAAO,CAAC,IAAI,CAAC,CAAC;CACpB;AAED,qBAAa,sBAAsB;IAY/B,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,SAAS,CAAC;IAZpB,OAAO,CAAC,qBAAqB,CAAuB;IACpD,OAAO,CAAC,SAAS,CAAK;IACtB,OAAO,CAAC,WAAW,CAAK;IACxB,OAAO,CAAC,gBAAgB,CAAS;IACjC,OAAO,CAAC,wBAAwB,CAAS;IACzC,OAAO,CAAC,iBAAiB,CAAC,CAGH;gBAGb,QAAQ,EAAE,YAAY,EACtB,SAAS,CAAC,EAAE,cAAc,YAAA,EAClC,OAAO,CAAC,EAAE,6BAA6B;IAQlC,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAIlC,cAAc;IAKrB,OAAO,CAAC,aAAa;IAiCrB,OAAO,CAAC,YAAY;IAmBpB,OAAO,CAAC,kBAAkB;YAmBZ,eAAe;YAoCf,SAAS;YAsCT,qBAAqB;IAO7B,WAAW,CAAC,QAAQ,EAAE,oBAAoB,GAAG,OAAO,CAAC,MAAM,CAAC;CAoOnE;AAMD;;;GAGG;AACH,wBAAgB,4BAA4B,CAC1C,QAAQ,EAAE,YAAY,EACtB,SAAS,CAAC,EAAE,cAAc,EAC1B,OAAO,CAAC,EAAE,6BAA6B,GACtC,sBAAsB,CAExB"}
|
|
@@ -0,0 +1,467 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schemas and JSON tool definitions for WebContainer MCP tools.
|
|
3
|
+
*/
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
export declare const webContainerToolArgumentSchemas: {
|
|
6
|
+
readonly read_file: z.ZodObject<{
|
|
7
|
+
path: z.ZodString;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
path: string;
|
|
10
|
+
}, {
|
|
11
|
+
path: string;
|
|
12
|
+
}>;
|
|
13
|
+
readonly write_file: z.ZodObject<{
|
|
14
|
+
path: z.ZodString;
|
|
15
|
+
content: z.ZodString;
|
|
16
|
+
}, "strip", z.ZodTypeAny, {
|
|
17
|
+
path: string;
|
|
18
|
+
content: string;
|
|
19
|
+
}, {
|
|
20
|
+
path: string;
|
|
21
|
+
content: string;
|
|
22
|
+
}>;
|
|
23
|
+
readonly batch_write_files: z.ZodEffects<z.ZodObject<{
|
|
24
|
+
files: z.ZodArray<z.ZodObject<{
|
|
25
|
+
path: z.ZodString;
|
|
26
|
+
content: z.ZodString;
|
|
27
|
+
}, "strip", z.ZodTypeAny, {
|
|
28
|
+
path: string;
|
|
29
|
+
content: string;
|
|
30
|
+
}, {
|
|
31
|
+
path: string;
|
|
32
|
+
content: string;
|
|
33
|
+
}>, "many">;
|
|
34
|
+
}, "strip", z.ZodTypeAny, {
|
|
35
|
+
files: {
|
|
36
|
+
path: string;
|
|
37
|
+
content: string;
|
|
38
|
+
}[];
|
|
39
|
+
}, {
|
|
40
|
+
files: {
|
|
41
|
+
path: string;
|
|
42
|
+
content: string;
|
|
43
|
+
}[];
|
|
44
|
+
}>, {
|
|
45
|
+
files: {
|
|
46
|
+
path: string;
|
|
47
|
+
content: string;
|
|
48
|
+
}[];
|
|
49
|
+
}, {
|
|
50
|
+
files: {
|
|
51
|
+
path: string;
|
|
52
|
+
content: string;
|
|
53
|
+
}[];
|
|
54
|
+
}>;
|
|
55
|
+
readonly delete_file: z.ZodObject<{
|
|
56
|
+
path: z.ZodString;
|
|
57
|
+
}, "strip", z.ZodTypeAny, {
|
|
58
|
+
path: string;
|
|
59
|
+
}, {
|
|
60
|
+
path: string;
|
|
61
|
+
}>;
|
|
62
|
+
readonly list_files: z.ZodObject<{
|
|
63
|
+
path: z.ZodString;
|
|
64
|
+
recursive: z.ZodOptional<z.ZodBoolean>;
|
|
65
|
+
}, "strip", z.ZodTypeAny, {
|
|
66
|
+
path: string;
|
|
67
|
+
recursive?: boolean | undefined;
|
|
68
|
+
}, {
|
|
69
|
+
path: string;
|
|
70
|
+
recursive?: boolean | undefined;
|
|
71
|
+
}>;
|
|
72
|
+
readonly list_dir: z.ZodObject<{
|
|
73
|
+
path: z.ZodString;
|
|
74
|
+
recursive: z.ZodOptional<z.ZodBoolean>;
|
|
75
|
+
}, "strip", z.ZodTypeAny, {
|
|
76
|
+
path: string;
|
|
77
|
+
recursive?: boolean | undefined;
|
|
78
|
+
}, {
|
|
79
|
+
path: string;
|
|
80
|
+
recursive?: boolean | undefined;
|
|
81
|
+
}>;
|
|
82
|
+
readonly get_project_structure: z.ZodObject<{
|
|
83
|
+
exclude: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
84
|
+
}, "strip", z.ZodTypeAny, {
|
|
85
|
+
exclude?: string[] | undefined;
|
|
86
|
+
}, {
|
|
87
|
+
exclude?: string[] | undefined;
|
|
88
|
+
}>;
|
|
89
|
+
readonly get_preview_url: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
90
|
+
readonly run_command: z.ZodObject<{
|
|
91
|
+
command: z.ZodString;
|
|
92
|
+
args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
93
|
+
}, "strip", z.ZodTypeAny, {
|
|
94
|
+
command: string;
|
|
95
|
+
args?: string[] | undefined;
|
|
96
|
+
}, {
|
|
97
|
+
command: string;
|
|
98
|
+
args?: string[] | undefined;
|
|
99
|
+
}>;
|
|
100
|
+
};
|
|
101
|
+
export declare const WebContainerToolSchema: z.ZodUnion<[z.ZodObject<{
|
|
102
|
+
name: z.ZodLiteral<"read_file">;
|
|
103
|
+
arguments: z.ZodObject<{
|
|
104
|
+
path: z.ZodString;
|
|
105
|
+
}, "strip", z.ZodTypeAny, {
|
|
106
|
+
path: string;
|
|
107
|
+
}, {
|
|
108
|
+
path: string;
|
|
109
|
+
}>;
|
|
110
|
+
}, "strip", z.ZodTypeAny, {
|
|
111
|
+
name: "read_file";
|
|
112
|
+
arguments: {
|
|
113
|
+
path: string;
|
|
114
|
+
};
|
|
115
|
+
}, {
|
|
116
|
+
name: "read_file";
|
|
117
|
+
arguments: {
|
|
118
|
+
path: string;
|
|
119
|
+
};
|
|
120
|
+
}>, z.ZodObject<{
|
|
121
|
+
name: z.ZodLiteral<"write_file">;
|
|
122
|
+
arguments: z.ZodObject<{
|
|
123
|
+
path: z.ZodString;
|
|
124
|
+
content: z.ZodString;
|
|
125
|
+
}, "strip", z.ZodTypeAny, {
|
|
126
|
+
path: string;
|
|
127
|
+
content: string;
|
|
128
|
+
}, {
|
|
129
|
+
path: string;
|
|
130
|
+
content: string;
|
|
131
|
+
}>;
|
|
132
|
+
}, "strip", z.ZodTypeAny, {
|
|
133
|
+
name: "write_file";
|
|
134
|
+
arguments: {
|
|
135
|
+
path: string;
|
|
136
|
+
content: string;
|
|
137
|
+
};
|
|
138
|
+
}, {
|
|
139
|
+
name: "write_file";
|
|
140
|
+
arguments: {
|
|
141
|
+
path: string;
|
|
142
|
+
content: string;
|
|
143
|
+
};
|
|
144
|
+
}>, z.ZodObject<{
|
|
145
|
+
name: z.ZodLiteral<"batch_write_files">;
|
|
146
|
+
arguments: z.ZodEffects<z.ZodObject<{
|
|
147
|
+
files: z.ZodArray<z.ZodObject<{
|
|
148
|
+
path: z.ZodString;
|
|
149
|
+
content: z.ZodString;
|
|
150
|
+
}, "strip", z.ZodTypeAny, {
|
|
151
|
+
path: string;
|
|
152
|
+
content: string;
|
|
153
|
+
}, {
|
|
154
|
+
path: string;
|
|
155
|
+
content: string;
|
|
156
|
+
}>, "many">;
|
|
157
|
+
}, "strip", z.ZodTypeAny, {
|
|
158
|
+
files: {
|
|
159
|
+
path: string;
|
|
160
|
+
content: string;
|
|
161
|
+
}[];
|
|
162
|
+
}, {
|
|
163
|
+
files: {
|
|
164
|
+
path: string;
|
|
165
|
+
content: string;
|
|
166
|
+
}[];
|
|
167
|
+
}>, {
|
|
168
|
+
files: {
|
|
169
|
+
path: string;
|
|
170
|
+
content: string;
|
|
171
|
+
}[];
|
|
172
|
+
}, {
|
|
173
|
+
files: {
|
|
174
|
+
path: string;
|
|
175
|
+
content: string;
|
|
176
|
+
}[];
|
|
177
|
+
}>;
|
|
178
|
+
}, "strip", z.ZodTypeAny, {
|
|
179
|
+
name: "batch_write_files";
|
|
180
|
+
arguments: {
|
|
181
|
+
files: {
|
|
182
|
+
path: string;
|
|
183
|
+
content: string;
|
|
184
|
+
}[];
|
|
185
|
+
};
|
|
186
|
+
}, {
|
|
187
|
+
name: "batch_write_files";
|
|
188
|
+
arguments: {
|
|
189
|
+
files: {
|
|
190
|
+
path: string;
|
|
191
|
+
content: string;
|
|
192
|
+
}[];
|
|
193
|
+
};
|
|
194
|
+
}>, z.ZodObject<{
|
|
195
|
+
name: z.ZodLiteral<"delete_file">;
|
|
196
|
+
arguments: z.ZodObject<{
|
|
197
|
+
path: z.ZodString;
|
|
198
|
+
}, "strip", z.ZodTypeAny, {
|
|
199
|
+
path: string;
|
|
200
|
+
}, {
|
|
201
|
+
path: string;
|
|
202
|
+
}>;
|
|
203
|
+
}, "strip", z.ZodTypeAny, {
|
|
204
|
+
name: "delete_file";
|
|
205
|
+
arguments: {
|
|
206
|
+
path: string;
|
|
207
|
+
};
|
|
208
|
+
}, {
|
|
209
|
+
name: "delete_file";
|
|
210
|
+
arguments: {
|
|
211
|
+
path: string;
|
|
212
|
+
};
|
|
213
|
+
}>, z.ZodObject<{
|
|
214
|
+
name: z.ZodLiteral<"list_files">;
|
|
215
|
+
arguments: z.ZodObject<{
|
|
216
|
+
path: z.ZodString;
|
|
217
|
+
recursive: z.ZodOptional<z.ZodBoolean>;
|
|
218
|
+
}, "strip", z.ZodTypeAny, {
|
|
219
|
+
path: string;
|
|
220
|
+
recursive?: boolean | undefined;
|
|
221
|
+
}, {
|
|
222
|
+
path: string;
|
|
223
|
+
recursive?: boolean | undefined;
|
|
224
|
+
}>;
|
|
225
|
+
}, "strip", z.ZodTypeAny, {
|
|
226
|
+
name: "list_files";
|
|
227
|
+
arguments: {
|
|
228
|
+
path: string;
|
|
229
|
+
recursive?: boolean | undefined;
|
|
230
|
+
};
|
|
231
|
+
}, {
|
|
232
|
+
name: "list_files";
|
|
233
|
+
arguments: {
|
|
234
|
+
path: string;
|
|
235
|
+
recursive?: boolean | undefined;
|
|
236
|
+
};
|
|
237
|
+
}>, z.ZodObject<{
|
|
238
|
+
name: z.ZodLiteral<"list_dir">;
|
|
239
|
+
arguments: z.ZodObject<{
|
|
240
|
+
path: z.ZodString;
|
|
241
|
+
recursive: z.ZodOptional<z.ZodBoolean>;
|
|
242
|
+
}, "strip", z.ZodTypeAny, {
|
|
243
|
+
path: string;
|
|
244
|
+
recursive?: boolean | undefined;
|
|
245
|
+
}, {
|
|
246
|
+
path: string;
|
|
247
|
+
recursive?: boolean | undefined;
|
|
248
|
+
}>;
|
|
249
|
+
}, "strip", z.ZodTypeAny, {
|
|
250
|
+
name: "list_dir";
|
|
251
|
+
arguments: {
|
|
252
|
+
path: string;
|
|
253
|
+
recursive?: boolean | undefined;
|
|
254
|
+
};
|
|
255
|
+
}, {
|
|
256
|
+
name: "list_dir";
|
|
257
|
+
arguments: {
|
|
258
|
+
path: string;
|
|
259
|
+
recursive?: boolean | undefined;
|
|
260
|
+
};
|
|
261
|
+
}>, z.ZodObject<{
|
|
262
|
+
name: z.ZodLiteral<"get_project_structure">;
|
|
263
|
+
arguments: z.ZodObject<{
|
|
264
|
+
exclude: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
265
|
+
}, "strip", z.ZodTypeAny, {
|
|
266
|
+
exclude?: string[] | undefined;
|
|
267
|
+
}, {
|
|
268
|
+
exclude?: string[] | undefined;
|
|
269
|
+
}>;
|
|
270
|
+
}, "strip", z.ZodTypeAny, {
|
|
271
|
+
name: "get_project_structure";
|
|
272
|
+
arguments: {
|
|
273
|
+
exclude?: string[] | undefined;
|
|
274
|
+
};
|
|
275
|
+
}, {
|
|
276
|
+
name: "get_project_structure";
|
|
277
|
+
arguments: {
|
|
278
|
+
exclude?: string[] | undefined;
|
|
279
|
+
};
|
|
280
|
+
}>, z.ZodObject<{
|
|
281
|
+
name: z.ZodLiteral<"get_preview_url">;
|
|
282
|
+
arguments: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
283
|
+
}, "strip", z.ZodTypeAny, {
|
|
284
|
+
name: "get_preview_url";
|
|
285
|
+
arguments: {};
|
|
286
|
+
}, {
|
|
287
|
+
name: "get_preview_url";
|
|
288
|
+
arguments: {};
|
|
289
|
+
}>, z.ZodObject<{
|
|
290
|
+
name: z.ZodLiteral<"run_command">;
|
|
291
|
+
arguments: z.ZodObject<{
|
|
292
|
+
command: z.ZodString;
|
|
293
|
+
args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
294
|
+
}, "strip", z.ZodTypeAny, {
|
|
295
|
+
command: string;
|
|
296
|
+
args?: string[] | undefined;
|
|
297
|
+
}, {
|
|
298
|
+
command: string;
|
|
299
|
+
args?: string[] | undefined;
|
|
300
|
+
}>;
|
|
301
|
+
}, "strip", z.ZodTypeAny, {
|
|
302
|
+
name: "run_command";
|
|
303
|
+
arguments: {
|
|
304
|
+
command: string;
|
|
305
|
+
args?: string[] | undefined;
|
|
306
|
+
};
|
|
307
|
+
}, {
|
|
308
|
+
name: "run_command";
|
|
309
|
+
arguments: {
|
|
310
|
+
command: string;
|
|
311
|
+
args?: string[] | undefined;
|
|
312
|
+
};
|
|
313
|
+
}>]>;
|
|
314
|
+
export type WebContainerToolCall = z.infer<typeof WebContainerToolSchema>;
|
|
315
|
+
export declare const webContainerToolsDefinition: ({
|
|
316
|
+
name: string;
|
|
317
|
+
description: string;
|
|
318
|
+
parameters: {
|
|
319
|
+
type: string;
|
|
320
|
+
properties: {
|
|
321
|
+
path: {
|
|
322
|
+
type: string;
|
|
323
|
+
description?: undefined;
|
|
324
|
+
};
|
|
325
|
+
content?: undefined;
|
|
326
|
+
files?: undefined;
|
|
327
|
+
recursive?: undefined;
|
|
328
|
+
exclude?: undefined;
|
|
329
|
+
command?: undefined;
|
|
330
|
+
args?: undefined;
|
|
331
|
+
};
|
|
332
|
+
required: string[];
|
|
333
|
+
};
|
|
334
|
+
} | {
|
|
335
|
+
name: string;
|
|
336
|
+
description: string;
|
|
337
|
+
parameters: {
|
|
338
|
+
type: string;
|
|
339
|
+
properties: {
|
|
340
|
+
path: {
|
|
341
|
+
type: string;
|
|
342
|
+
description?: undefined;
|
|
343
|
+
};
|
|
344
|
+
content: {
|
|
345
|
+
type: string;
|
|
346
|
+
};
|
|
347
|
+
files?: undefined;
|
|
348
|
+
recursive?: undefined;
|
|
349
|
+
exclude?: undefined;
|
|
350
|
+
command?: undefined;
|
|
351
|
+
args?: undefined;
|
|
352
|
+
};
|
|
353
|
+
required: string[];
|
|
354
|
+
};
|
|
355
|
+
} | {
|
|
356
|
+
name: string;
|
|
357
|
+
description: string;
|
|
358
|
+
parameters: {
|
|
359
|
+
type: string;
|
|
360
|
+
properties: {
|
|
361
|
+
files: {
|
|
362
|
+
type: string;
|
|
363
|
+
items: {
|
|
364
|
+
type: string;
|
|
365
|
+
properties: {
|
|
366
|
+
path: {
|
|
367
|
+
type: string;
|
|
368
|
+
};
|
|
369
|
+
content: {
|
|
370
|
+
type: string;
|
|
371
|
+
};
|
|
372
|
+
};
|
|
373
|
+
required: string[];
|
|
374
|
+
};
|
|
375
|
+
};
|
|
376
|
+
path?: undefined;
|
|
377
|
+
content?: undefined;
|
|
378
|
+
recursive?: undefined;
|
|
379
|
+
exclude?: undefined;
|
|
380
|
+
command?: undefined;
|
|
381
|
+
args?: undefined;
|
|
382
|
+
};
|
|
383
|
+
required: string[];
|
|
384
|
+
};
|
|
385
|
+
} | {
|
|
386
|
+
name: string;
|
|
387
|
+
description: string;
|
|
388
|
+
parameters: {
|
|
389
|
+
type: string;
|
|
390
|
+
properties: {
|
|
391
|
+
path: {
|
|
392
|
+
type: string;
|
|
393
|
+
description: string;
|
|
394
|
+
};
|
|
395
|
+
recursive: {
|
|
396
|
+
type: string;
|
|
397
|
+
};
|
|
398
|
+
content?: undefined;
|
|
399
|
+
files?: undefined;
|
|
400
|
+
exclude?: undefined;
|
|
401
|
+
command?: undefined;
|
|
402
|
+
args?: undefined;
|
|
403
|
+
};
|
|
404
|
+
required: string[];
|
|
405
|
+
};
|
|
406
|
+
} | {
|
|
407
|
+
name: string;
|
|
408
|
+
description: string;
|
|
409
|
+
parameters: {
|
|
410
|
+
type: string;
|
|
411
|
+
properties: {
|
|
412
|
+
exclude: {
|
|
413
|
+
type: string;
|
|
414
|
+
items: {
|
|
415
|
+
type: string;
|
|
416
|
+
};
|
|
417
|
+
};
|
|
418
|
+
path?: undefined;
|
|
419
|
+
content?: undefined;
|
|
420
|
+
files?: undefined;
|
|
421
|
+
recursive?: undefined;
|
|
422
|
+
command?: undefined;
|
|
423
|
+
args?: undefined;
|
|
424
|
+
};
|
|
425
|
+
required: never[];
|
|
426
|
+
};
|
|
427
|
+
} | {
|
|
428
|
+
name: string;
|
|
429
|
+
description: string;
|
|
430
|
+
parameters: {
|
|
431
|
+
type: string;
|
|
432
|
+
properties: {
|
|
433
|
+
path?: undefined;
|
|
434
|
+
content?: undefined;
|
|
435
|
+
files?: undefined;
|
|
436
|
+
recursive?: undefined;
|
|
437
|
+
exclude?: undefined;
|
|
438
|
+
command?: undefined;
|
|
439
|
+
args?: undefined;
|
|
440
|
+
};
|
|
441
|
+
required: never[];
|
|
442
|
+
};
|
|
443
|
+
} | {
|
|
444
|
+
name: string;
|
|
445
|
+
description: string;
|
|
446
|
+
parameters: {
|
|
447
|
+
type: string;
|
|
448
|
+
properties: {
|
|
449
|
+
command: {
|
|
450
|
+
type: string;
|
|
451
|
+
};
|
|
452
|
+
args: {
|
|
453
|
+
type: string;
|
|
454
|
+
items: {
|
|
455
|
+
type: string;
|
|
456
|
+
};
|
|
457
|
+
};
|
|
458
|
+
path?: undefined;
|
|
459
|
+
content?: undefined;
|
|
460
|
+
files?: undefined;
|
|
461
|
+
recursive?: undefined;
|
|
462
|
+
exclude?: undefined;
|
|
463
|
+
};
|
|
464
|
+
required: string[];
|
|
465
|
+
};
|
|
466
|
+
})[];
|
|
467
|
+
//# sourceMappingURL=mcp-tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-tools.d.ts","sourceRoot":"","sources":["../../src/mcp/mcp-tools.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyClC,CAAC;AAEX,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAqCjC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAE1E,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAgGvC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* VibeIdeProvider — top-level context provider managing the WebContainer
|
|
3
|
+
* lifecycle. Accepts Bridge, chat adapter, and preview policy from the host.
|
|
4
|
+
*
|
|
5
|
+
* No Redux, no Next.js, no `@aiworkbench/vibe-bridge` — all host-specific
|
|
6
|
+
* concerns flow through the typed adapter interfaces.
|
|
7
|
+
*/
|
|
8
|
+
import React from "react";
|
|
9
|
+
import type { VibeIdeContextValue, VibeIdeProviderProps } from "../types";
|
|
10
|
+
export declare const VibeIdeContext: React.Context<VibeIdeContextValue | null>;
|
|
11
|
+
export declare function VibeIdeProvider({ draftId, templateId, bridge, chat, previewPolicy: previewPolicyProp, persistence, approval, templateVars, initialTree, bootOptions, children, }: VibeIdeProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
//# sourceMappingURL=provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../src/react/provider.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAON,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EAGV,mBAAmB,EAGnB,oBAAoB,EACrB,MAAM,UAAU,CAAC;AAQlB,eAAO,MAAM,cAAc,2CAAkD,CAAC;AA8B9E,wBAAgB,eAAe,CAAC,EAC9B,OAAO,EACP,UAAU,EACV,MAAM,EACN,IAAI,EACJ,aAAa,EAAE,iBAAiB,EAChC,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,WAAW,EACX,WAAW,EACX,QAAQ,GACT,EAAE,oBAAoB,2CA2MtB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useVibeIde — context consumer hook for the VibeIdeProvider.
|
|
3
|
+
*/
|
|
4
|
+
import type { VibeIdeContextValue } from "../types";
|
|
5
|
+
/**
|
|
6
|
+
* Access the IDE context. Must be used within a `<VibeIdeProvider>`.
|
|
7
|
+
*
|
|
8
|
+
* @throws If called outside a provider.
|
|
9
|
+
*/
|
|
10
|
+
export declare function useVibeIde(): VibeIdeContextValue;
|
|
11
|
+
//# sourceMappingURL=use-vibe-ide.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-vibe-ide.d.ts","sourceRoot":"","sources":["../../src/react/use-vibe-ide.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAEpD;;;;GAIG;AACH,wBAAgB,UAAU,IAAI,mBAAmB,CAMhD"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* VibeIdeBridgeRelay — capability-gated bridge relay between the host and
|
|
3
|
+
* the preview iframe.
|
|
4
|
+
*
|
|
5
|
+
* Refactored from usecase-editor's `bridge-relay.tsx`:
|
|
6
|
+
* - No Redux, no `useIde()` — uses `useVibeIde()` from this package
|
|
7
|
+
* - Uses host's `previewPolicy` for approval instead of hardcoded constants
|
|
8
|
+
* - Self-contained approval dialog (no dependency on host UI)
|
|
9
|
+
*/
|
|
10
|
+
import React from "react";
|
|
11
|
+
export declare function VibeIdeBridgeRelay({ iframeRef, }: {
|
|
12
|
+
iframeRef: React.RefObject<HTMLIFrameElement | null>;
|
|
13
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
14
|
+
//# sourceMappingURL=vibe-ide-bridge-relay.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vibe-ide-bridge-relay.d.ts","sourceRoot":"","sources":["../../src/react/vibe-ide-bridge-relay.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAmD,MAAM,OAAO,CAAC;AA8ExE,wBAAgB,kBAAkB,CAAC,EACjC,SAAS,GACV,EAAE;IACD,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC;CACtD,kDAweA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* VibeIdeSplitLayout — two-pane IDE layout with a resizable split.
|
|
3
|
+
*
|
|
4
|
+
* Uses pure CSS resize (no `react-split` dependency) for the left/right split.
|
|
5
|
+
* The host provides `leftPane` content; the right pane is managed internally
|
|
6
|
+
* (Preview / Code / Terminal tabs).
|
|
7
|
+
*/
|
|
8
|
+
import type { VibeIdeSplitLayoutProps } from "../types";
|
|
9
|
+
export declare function VibeIdeSplitLayout({ leftPane, toolbar, }: VibeIdeSplitLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
//# sourceMappingURL=vibe-ide-layout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vibe-ide-layout.d.ts","sourceRoot":"","sources":["../../src/react/vibe-ide-layout.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,uBAAuB,EAAgB,MAAM,UAAU,CAAC;AAuEtE,wBAAgB,kBAAkB,CAAC,EACjC,QAAQ,EACR,OAAO,GACR,EAAE,uBAAuB,2CAqFzB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* VibeIdePreviewPane — iframe with loading/blocked/error overlays.
|
|
3
|
+
*
|
|
4
|
+
* Renders the BridgeRelay as a sibling to gate bridge capabilities.
|
|
5
|
+
*/
|
|
6
|
+
export declare function VibeIdePreviewPane(): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=vibe-ide-preview-pane.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vibe-ide-preview-pane.d.ts","sourceRoot":"","sources":["../../src/react/vibe-ide-preview-pane.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,wBAAgB,kBAAkB,4CAwIjC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* VibeIdeToolbar — tab pills, URL bar, and restart button for the right pane.
|
|
3
|
+
*
|
|
4
|
+
* No Redux — reads/writes `activeRightPane` from the IDE context.
|
|
5
|
+
*/
|
|
6
|
+
import React from "react";
|
|
7
|
+
interface VibeIdeToolbarProps {
|
|
8
|
+
/** Extra toolbar content injected after the tab pills. */
|
|
9
|
+
extra?: React.ReactNode;
|
|
10
|
+
/** Collapse callback — hides the left pane. */
|
|
11
|
+
onCollapse?: () => void;
|
|
12
|
+
}
|
|
13
|
+
export declare function VibeIdeToolbar({ extra, onCollapse }: VibeIdeToolbarProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=vibe-ide-toolbar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vibe-ide-toolbar.d.ts","sourceRoot":"","sources":["../../src/react/vibe-ide-toolbar.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,UAAU,mBAAmB;IAC3B,0DAA0D;IAC1D,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,+CAA+C;IAC/C,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB;AAED,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,mBAAmB,2CAkHxE"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IDE template generator — produces FileSystemTree objects from the official
|
|
3
|
+
* vibe-kit/templates/* source of truth, with IDE-specific modifications:
|
|
4
|
+
*
|
|
5
|
+
* 1. Strips the dev toolbar from index.html
|
|
6
|
+
* 2. Adds the `vibe-dev-bridge-injector` Vite plugin
|
|
7
|
+
* 3. Resolves Eta placeholders (<%= it.xxx %>) with IDE defaults or user vars
|
|
8
|
+
* 4. Adds `toast` to default manifest permissions
|
|
9
|
+
* 5. Omits `.env.example`, `.gitignore`, `mock-bridge.ts` (not needed in IDE)
|
|
10
|
+
*/
|
|
11
|
+
import type { FileSystemTree } from "@webcontainer/api";
|
|
12
|
+
import type { TemplateId, TemplateVars } from "../types";
|
|
13
|
+
/**
|
|
14
|
+
* Generate a `FileSystemTree` for the IDE, derived from the official
|
|
15
|
+
* vibe-kit templates with IDE-specific modifications applied.
|
|
16
|
+
*
|
|
17
|
+
* @param templateId - Which framework template to generate
|
|
18
|
+
* @param templateVars - Optional overrides for project name, permissions, etc.
|
|
19
|
+
* @returns A `FileSystemTree` ready to mount into a WebContainer
|
|
20
|
+
*/
|
|
21
|
+
export declare function getVibeIdeTemplateTree(templateId: TemplateId, templateVars?: TemplateVars): FileSystemTree;
|
|
22
|
+
//# sourceMappingURL=generated.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated.d.ts","sourceRoot":"","sources":["../../src/templates/generated.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAggBzD;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,UAAU,EACtB,YAAY,CAAC,EAAE,YAAY,GAC1B,cAAc,CAkBhB"}
|