@kvasar/google-stitch 0.1.25 → 0.1.28

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 CHANGED
@@ -2,22 +2,6 @@
2
2
 
3
3
  Integrate Google Stitch MCP (Model Context Protocol) into OpenClaw to search resources, execute workflows, and monitor status.
4
4
 
5
- ## Installation
6
-
7
- 1. Clone or copy this plugin into your OpenClaw workspace:
8
- ```bash
9
- cd ~/.openclaw/workspace
10
- git clone <repo-url> openclaw-google-stitch-mcp
11
- ```
12
- 2. Install dependencies:
13
- ```bash
14
- cd openclaw-google-stitch-mcp
15
- npm install
16
- ```
17
- 3. Verify TypeScript and tests:
18
- ```bash
19
- npm run check
20
- ```
21
5
 
22
6
  ## Configuration
23
7
 
@@ -45,88 +29,6 @@ Example configuration (in OpenClaw config file or UI):
45
29
  }
46
30
  ```
47
31
 
48
- A sample configuration file is provided in `config/.example.json`.
49
-
50
- ## Tools Reference
51
-
52
- ### `stitch_search`
53
-
54
- Search Stitch MCP resources and workflows.
55
-
56
- **Parameters:**
57
- - `query` (string, required): Search query string.
58
- - `filters` (object, optional): Optional filters (e.g., `{ "type": "flow" }`).
59
-
60
- **Example:**
61
- ```json
62
- {
63
- "query": "data pipeline",
64
- "filters": { "type": "flow" }
65
- }
66
- ```
67
-
68
- **Response:** JSON with `resources` array and `total`.
69
-
70
- ---
71
-
72
- ### `stitch_execute_flow`
73
-
74
- Execute a Stitch flow/action.
75
-
76
- **Parameters:**
77
- - `flowId` (string, required): Identifier of the flow (from `stitch_search`).
78
- - `inputs` (object, optional): Input parameters for the flow.
79
-
80
- **Example:**
81
- ```json
82
- {
83
- "flowId": "flow_12345",
84
- "inputs": { "source": "bigquery", "dataset": "analytics.events" }
85
- }
86
- ```
87
-
88
- **Response:** Initial execution result with `executionId` and `status`.
89
-
90
- ---
91
-
92
- ### `stitch_status`
93
-
94
- Check execution status or service health.
95
-
96
- **Parameters:**
97
- - `executionId` (string, optional): Execution ID to poll. If omitted, returns service health.
98
-
99
- **Example (check execution):**
100
- ```json
101
- {
102
- "executionId": "exec_67890"
103
- }
104
- ```
105
-
106
- **Example (health):**
107
- ```json
108
- {}
109
- ```
110
-
111
- **Response:** Status object with `healthy` (boolean) for health, or detailed execution status.
112
-
113
- ---
114
-
115
- ## Error Handling
116
-
117
- The plugin surfaces errors with `isError: true` and a message. Common errors:
118
-
119
- - **Configuration missing**: Ensure `apiKey` and `endpoint` are set.
120
- - **Authentication/HTTP errors**: Check API key validity and endpoint reachability.
121
- - **JSON-RPC errors**: Inspect `error.message` from Stitch; may indicate invalid method or parameters.
122
- - **Network**: The client retries up to 3 times with exponential backoff; persistent failures are reported.
123
-
124
- ## Development
125
-
126
- - **TypeScript**: `npm run typecheck`
127
- - **Tests**: `npm test` (Vitest)
128
- - **Watch**: `npm run test:watch`
129
-
130
32
  ### Project Structure
131
33
 
132
34
  ```
@@ -140,8 +42,7 @@ openclaw-google-stitch-mcp/
140
42
  │ ├── stitch_execute_flow.ts
141
43
  │ └── stitch_status.ts
142
44
  ├── skills/
143
- │ └── google-stitch/
144
- │ └── SKILL.md
45
+ │ └── SKILL.md
145
46
  ├── tests/unit/
146
47
  │ └── stitch-mcp-client.test.ts
147
48
  ├── config/
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "openclaw-google-stitch",
3
3
  "name": "Google Stitch MCP",
4
- "version": "0.1.25",
4
+ "version": "0.1.28",
5
5
  "description": "Integrates Google Stitch MCP services into OpenClaw",
6
6
  "skills": ["skills"],
7
7
  "configSchema": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kvasar/google-stitch",
3
- "version": "0.1.25",
3
+ "version": "0.1.28",
4
4
  "description": "OpenClaw plugin for Google Stitch UI generation, screen design, variants, and design systems",
5
5
  "type": "module",
6
6
  "main": "./index.ts",
package/skills/SKILL.md CHANGED
@@ -54,7 +54,7 @@ Use the appropriate Stitch tool depending on the user request.
54
54
 
55
55
  If the user wants to start a new design workspace:
56
56
 
57
- - `create_project`
57
+ - `stitch_create_project`
58
58
 
59
59
  Example prompts:
60
60
 
@@ -64,7 +64,7 @@ Example prompts:
64
64
 
65
65
  If the user wants existing project info:
66
66
 
67
- - `get_project`
67
+ - `stitch_get_project`
68
68
 
69
69
  Example prompts:
70
70
 
@@ -73,7 +73,7 @@ Example prompts:
73
73
  - What’s in my project?
74
74
 
75
75
 
76
- - `list_projects`
76
+ - `stitch_list_projects`
77
77
 
78
78
  Example prompts:
79
79
 
@@ -87,7 +87,7 @@ Example prompts:
87
87
 
88
88
  For creating new screens from prompts:
89
89
 
90
- - `generate_screen_from_text`
90
+ - `stitch_generate_screen_from_text`
91
91
 
92
92
  Example prompts:
93
93
 
@@ -146,7 +146,7 @@ Never call the tool with only a string prompt.
146
146
 
147
147
  Lists all screens within a given Stitch project.
148
148
 
149
- - `list_screens`
149
+ - `stitch_list_screens`
150
150
 
151
151
  Required parameters:
152
152
  - `projectId`: the Stitch project ID (without the `projects/` prefix)
@@ -189,7 +189,7 @@ Example:
189
189
 
190
190
  For modifying existing screens:
191
191
 
192
- - `edit_screens`
192
+ - `stitch_edit_screens`
193
193
 
194
194
  Example prompts:
195
195
 
@@ -204,7 +204,7 @@ Example prompts:
204
204
 
205
205
  For alternative designs:
206
206
 
207
- - `generate_variants`
207
+ - `stitch_generate_variants`
208
208
 
209
209
  Use when the user requests:
210
210
 
@@ -227,7 +227,7 @@ For brand consistency and theming:
227
227
 
228
228
 
229
229
 
230
- - `create_design_system`
230
+ - `stitch_create_design_system`
231
231
 
232
232
  Example prompts:
233
233
 
@@ -235,7 +235,7 @@ Example prompts:
235
235
  - Set up a design system with blue as the primary color
236
236
  - Create a brand identity with Geist font and minimal roundness
237
237
 
238
- - `update_design_system`
238
+ - `stitch_update_design_system`
239
239
 
240
240
  Example prompts:
241
241
 
@@ -244,7 +244,7 @@ Example prompts:
244
244
  - Update the roundness to fully rounded
245
245
 
246
246
 
247
- - `list_design_systems`
247
+ - `stitch_list_design_systems`
248
248
 
249
249
  Example prompts:
250
250
 
@@ -253,7 +253,7 @@ Example prompts:
253
253
  - What design systems do I have?
254
254
 
255
255
 
256
- - `apply_design_system`
256
+ - `stitch_apply_design_system`
257
257
 
258
258
  Applies a design system to one or more screens, modifying their appearance to match the system’s tokens (colors, fonts, shapes).
259
259
 
@@ -16,7 +16,7 @@ const ApplyDesignSystemSchema = Type.Object({
16
16
  type ApplyDesignSystemParams = Static<typeof ApplyDesignSystemSchema>;
17
17
 
18
18
  export const applyDesignSystemTool = (client: any) => ({
19
- name: "apply_design_system",
19
+ name: "stitch_apply_design_system",
20
20
  description: "Applies a design system asset to one or more screens, updating colors, fonts, and shapes",
21
21
  parameters: ApplyDesignSystemSchema,
22
22
  async execute(_: string, params: ApplyDesignSystemParams) {
@@ -81,7 +81,7 @@ const CreateDesignSystemSchema = Type.Object({
81
81
  type CreateDesignSystemParams = Static<typeof CreateDesignSystemSchema>;
82
82
 
83
83
  export const createDesignSystemTool = (client: any) => ({
84
- name: "create_design_system",
84
+ name: "stitch_create_design_system",
85
85
  description: "Creates a new design system with colors, typography, roundness, and theme tokens for a Stitch project",
86
86
  parameters: CreateDesignSystemSchema,
87
87
  async execute(_: string, params: CreateDesignSystemParams) {
@@ -12,7 +12,7 @@ export interface CreateProjectParams {
12
12
 
13
13
  export function createProjectTool(client: StitchMCPClient) {
14
14
  return {
15
- name: "create_project" as const,
15
+ name: "stitch_create_project" as const,
16
16
  description: "Creates a new Stitch project. A project is a container for UI designs and frontend code.",
17
17
  parameters: Type.Object({
18
18
  title: Type.Optional(
@@ -38,7 +38,7 @@ const EditScreensSchema = Type.Object({
38
38
  type EditScreensParams = Static<typeof EditScreensSchema>;
39
39
 
40
40
  export const editScreensTool = (client: any) => ({
41
- name: "edit_screens",
41
+ name: "stitch_edit_screens",
42
42
  description:
43
43
  "Edits existing screens using a text prompt. This process may take a few minutes.",
44
44
  parameters: EditScreensSchema,
@@ -87,7 +87,7 @@ type GenerateScreenParams = Static<typeof GenerateScreenSchema>;
87
87
 
88
88
  export function generateScreenFromTextTool(client: StitchMCPClient) {
89
89
  return {
90
- name: "generate_screen_from_text",
90
+ name: "stitch_generate_screen_from_text",
91
91
  description: "Generate a UI screen from a natural language prompt",
92
92
  parameters: GenerateScreenSchema,
93
93
  async execute(_id: string, params: GenerateScreenParams) {
@@ -72,7 +72,7 @@ const GenerateVariantsSchema = Type.Object({
72
72
  type GenerateVariantsParams = Static<typeof GenerateVariantsSchema>;
73
73
 
74
74
  export const generateVariantsTool = (client: any) => ({
75
- name: "generate_variants",
75
+ name: "stitch_generate_variants",
76
76
  description:
77
77
  "Generates design variants of existing screens based on selected screens and variant options.",
78
78
 
@@ -7,7 +7,7 @@ const GetProjectSchema = Type.Object({
7
7
  type GetProjectParams = Static<typeof GetProjectSchema>;
8
8
 
9
9
  export const getProjectTool = (client: any) => ({
10
- name: "get_project",
10
+ name: "stitch_get_project",
11
11
  description: "get project",
12
12
  parameters: GetProjectSchema,
13
13
  async execute(_: string, params: GetProjectParams) {
@@ -54,7 +54,7 @@ export const getScreenTool = (client: StitchMCPClient) => ({
54
54
  );
55
55
  }
56
56
 
57
- const screen = (await client.request("get_screen", {
57
+ const screen = (await client.request("stitch_get_screen", {
58
58
  name,
59
59
  projectId,
60
60
  screenId
@@ -7,7 +7,7 @@ const ListDesignSystemsSchema = Type.Object({
7
7
  type ListDesignSystemsParams = Static<typeof ListDesignSystemsSchema>;
8
8
 
9
9
  export const listDesignSystemsTool = (client:any) => ({
10
- name: "list_design_systems",
10
+ name: "stitch_list_design_systems",
11
11
  description: "Lists design systems accessible to the user, optionally filtered by project",
12
12
  parameters: ListDesignSystemsSchema,
13
13
  async execute(_: string, params: ListDesignSystemsParams) {
@@ -7,7 +7,7 @@ export interface ListProjectsParams {
7
7
 
8
8
  export function listProjectsTool(client: StitchMCPClient) {
9
9
  return {
10
- name: "list_projects" as const,
10
+ name: "stitch_list_projects" as const,
11
11
  description:
12
12
  "Lists all Stitch projects accessible to the user. By default, it lists projects owned by the user.",
13
13
 
@@ -33,7 +33,7 @@ type Screen = {
33
33
  };
34
34
 
35
35
  export const listScreensTool = (client: StitchMCPClient) => ({
36
- name: "list_screens",
36
+ name: "stitch_list_screens",
37
37
  description: "Lists all screens within a given Stitch project",
38
38
  parameters: Type.Object({
39
39
  projectId: Type.String({
@@ -42,7 +42,7 @@ const UpdateDesignSystemSchema = Type.Object({
42
42
  type UpdateDesignSystemParams = Static<typeof UpdateDesignSystemSchema>;
43
43
 
44
44
  export const updateDesignSystemTool = (client: any) => ({
45
- name: "update_design_system",
45
+ name: "stitch_update_design_system",
46
46
 
47
47
  description:
48
48
  "Updates an existing design system. Identifies the asset by its name field.",