@kvasar/google-stitch 0.1.12 → 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.
package/openclaw.plugin.json
CHANGED
package/package.json
CHANGED
|
@@ -74,4 +74,19 @@ export class StitchMCPClient {
|
|
|
74
74
|
},
|
|
75
75
|
});
|
|
76
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
|
+
}
|
|
77
92
|
}
|
|
@@ -1,7 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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
|
+
}
|