@kvasar/google-stitch 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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "openclaw-google-stitch",
3
3
  "name": "Google Stitch MCP",
4
- "version": "0.1.11",
4
+ "version": "0.1.13",
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.11",
3
+ "version": "0.1.13",
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",
@@ -45,12 +45,14 @@ export class StitchMCPClient {
45
45
  this.connected = true;
46
46
  }
47
47
  }
48
- async createProject(title?: string) {
48
+ async createProject(name: string) {
49
49
  await this.connect();
50
50
 
51
51
  return this.client.callTool({
52
52
  name: "create_project",
53
- arguments: title ? { title } : {},
53
+ arguments: {
54
+ name: name,
55
+ },
54
56
  });
55
57
  }
56
58
 
@@ -72,4 +74,19 @@ export class StitchMCPClient {
72
74
  },
73
75
  });
74
76
  }
77
+
78
+ async listProjects(filter?: string) {
79
+ return this.request("list_projects", {
80
+ ...(filter ? { filter } : {}),
81
+ });
82
+ }
83
+
84
+ async request(toolName: string, params?: Record<string, any>) {
85
+ await this.connect();
86
+
87
+ return this.client.callTool({
88
+ name: toolName,
89
+ arguments: params ?? {},
90
+ });
91
+ }
75
92
  }
@@ -7,7 +7,7 @@ import { Type } from "@sinclair/typebox";
7
7
  import { StitchMCPClient } from "../services/stitch-mcp-client.js";
8
8
 
9
9
  export interface CreateProjectParams {
10
- title?: string;
10
+ name: string;
11
11
  }
12
12
 
13
13
  export function createProjectTool(client: StitchMCPClient) {
@@ -20,7 +20,7 @@ export function createProjectTool(client: StitchMCPClient) {
20
20
  ),
21
21
  }),
22
22
  async execute(_id: string, params: CreateProjectParams) {
23
- const result = await client.createProject(params.title);
23
+ const result = await client.createProject(params.name);
24
24
  return {
25
25
  content: [{ type: "text" as const, text: JSON.stringify(result, null, 2) }],
26
26
  };
@@ -1,7 +1,36 @@
1
- export const listProjectsTool = (client:any) => ({
2
- name: "list_projects",
3
- description: "list projects",
4
- async execute(_: string, params: any) {
5
- return await client.request?.("list_projects", params);
6
- },
7
- });
1
+ import { Type } from "@sinclair/typebox";
2
+ import { StitchMCPClient } from "../services/stitch-mcp-client.js";
3
+
4
+ export interface ListProjectsParams {
5
+ filter?: string;
6
+ }
7
+
8
+ export function listProjectsTool(client: StitchMCPClient) {
9
+ return {
10
+ name: "list_projects" as const,
11
+ description:
12
+ "Lists all Stitch projects accessible to the user. By default, it lists projects owned by the user.",
13
+
14
+ parameters: Type.Object({
15
+ filter: Type.Optional(
16
+ Type.String({
17
+ description:
18
+ "Optional. AIP-160 filter on `view` field. Supported: `view=owned` (default), `view=shared`.",
19
+ })
20
+ ),
21
+ }),
22
+
23
+ async execute(_id: string, params: ListProjectsParams) {
24
+ const result = await client.listProjects(params?.filter);
25
+
26
+ return {
27
+ content: [
28
+ {
29
+ type: "text" as const,
30
+ text: JSON.stringify(result, null, 2),
31
+ },
32
+ ],
33
+ };
34
+ },
35
+ };
36
+ }
@@ -1,7 +0,0 @@
1
- export const generateScreenFromTextTool = (client:any) => ({
2
- name: "generate_screen_from_text",
3
- description: "generate screen from text",
4
- async execute(_: string, params: any) {
5
- return await client.request?.("generate_screen_from_text", params);
6
- },
7
- });