@kvasar/google-stitch 0.1.0 → 0.1.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/index.ts +39 -0
- package/openclaw.plugin.json +1 -1
- package/package.json +6 -3
package/index.ts
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
|
|
2
|
+
import { StitchMCPClient } from "./src/services/stitch-mcp-client.js";
|
|
3
|
+
import { createProjectTool } from "./src/tools/create_project.js";
|
|
4
|
+
import { getProjectTool } from "./src/tools/get_project.js";
|
|
5
|
+
import { listProjectsTool } from "./src/tools/list_projects.js";
|
|
6
|
+
import { listScreensTool } from "./src/tools/list_screens.js";
|
|
7
|
+
import { getScreenTool } from "./src/tools/get_screen.js";
|
|
8
|
+
import { generateScreenFromTextTool } from "./src/tools/generate_screen_from_text.js";
|
|
9
|
+
import { editScreensTool } from "./src/tools/edit_screens.js";
|
|
10
|
+
import { generateVariantsTool } from "./src/tools/generate_variants.js";
|
|
11
|
+
import { createDesignSystemTool } from "./src/tools/create_design_system.js";
|
|
12
|
+
import { updateDesignSystemTool } from "./src/tools/update_design_system.js";
|
|
13
|
+
import { listDesignSystemsTool } from "./src/tools/list_design_systems.js";
|
|
14
|
+
import { applyDesignSystemTool } from "./src/tools/apply_design_system.js";
|
|
15
|
+
|
|
16
|
+
export default definePluginEntry({
|
|
17
|
+
id: "openclaw-google-stitch",
|
|
18
|
+
name: "Google Stitch",
|
|
19
|
+
description: "Google Stitch integration for UI generation and design workflows",
|
|
20
|
+
register(api) {
|
|
21
|
+
const cfg = api.config as { apiKey?: string; endpoint?: string };
|
|
22
|
+
if (!cfg?.apiKey || !cfg?.endpoint) {
|
|
23
|
+
throw new Error("Missing required configuration: apiKey and endpoint");
|
|
24
|
+
}
|
|
25
|
+
const client = new StitchMCPClient(cfg as {apiKey:string; endpoint:string});
|
|
26
|
+
api.registerTool(createProjectTool(client));
|
|
27
|
+
api.registerTool(getProjectTool(client));
|
|
28
|
+
api.registerTool(listProjectsTool(client));
|
|
29
|
+
api.registerTool(listScreensTool(client));
|
|
30
|
+
api.registerTool(getScreenTool(client));
|
|
31
|
+
api.registerTool(generateScreenFromTextTool(client));
|
|
32
|
+
api.registerTool(editScreensTool(client));
|
|
33
|
+
api.registerTool(generateVariantsTool(client));
|
|
34
|
+
api.registerTool(createDesignSystemTool(client));
|
|
35
|
+
api.registerTool(updateDesignSystemTool(client));
|
|
36
|
+
api.registerTool(listDesignSystemsTool(client));
|
|
37
|
+
api.registerTool(applyDesignSystemTool(client));
|
|
38
|
+
},
|
|
39
|
+
});
|
package/openclaw.plugin.json
CHANGED
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kvasar/google-stitch",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "OpenClaw plugin for Google Stitch UI generation, screen design, variants, and design systems",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.ts",
|
|
7
7
|
"files": [
|
|
8
|
+
"index.ts",
|
|
8
9
|
"src/",
|
|
9
10
|
"openclaw.plugin.json",
|
|
10
11
|
"tsconfig.json",
|
|
@@ -19,7 +20,9 @@
|
|
|
19
20
|
"build": "tsc"
|
|
20
21
|
},
|
|
21
22
|
"openclaw": {
|
|
22
|
-
"extensions": [
|
|
23
|
+
"extensions": [
|
|
24
|
+
"./src/index.ts"
|
|
25
|
+
],
|
|
23
26
|
"tools": [
|
|
24
27
|
"create_project",
|
|
25
28
|
"get_project",
|
|
@@ -54,4 +57,4 @@
|
|
|
54
57
|
"prototype"
|
|
55
58
|
],
|
|
56
59
|
"license": "MIT"
|
|
57
|
-
}
|
|
60
|
+
}
|