@appaflytech/wappa-mcp 0.0.10 → 0.0.12
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 +40 -0
- package/dist/auth.d.ts +25 -0
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +35 -0
- package/dist/auth.js.map +1 -1
- package/dist/client.d.ts +39 -2
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +159 -6
- package/dist/client.js.map +1 -1
- package/dist/factory.d.ts +32 -0
- package/dist/factory.d.ts.map +1 -0
- package/dist/factory.js +286 -0
- package/dist/factory.js.map +1 -0
- package/dist/http/auth.d.ts +33 -0
- package/dist/http/auth.d.ts.map +1 -0
- package/dist/http/auth.js +55 -0
- package/dist/http/auth.js.map +1 -0
- package/dist/http/session.d.ts +30 -0
- package/dist/http/session.d.ts.map +1 -0
- package/dist/http/session.js +56 -0
- package/dist/http/session.js.map +1 -0
- package/dist/http/transport.d.ts +21 -0
- package/dist/http/transport.d.ts.map +1 -0
- package/dist/http/transport.js +101 -0
- package/dist/http/transport.js.map +1 -0
- package/dist/index.d.ts +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +26 -262
- package/dist/index.js.map +1 -1
- package/dist/server.d.ts +25 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +94 -0
- package/dist/server.js.map +1 -0
- package/dist/tools/ai-chat-sessions.d.ts +143 -0
- package/dist/tools/ai-chat-sessions.d.ts.map +1 -0
- package/dist/tools/ai-chat-sessions.js +144 -0
- package/dist/tools/ai-chat-sessions.js.map +1 -0
- package/dist/tools/app-users.d.ts +440 -0
- package/dist/tools/app-users.d.ts.map +1 -0
- package/dist/tools/app-users.js +347 -0
- package/dist/tools/app-users.js.map +1 -0
- package/dist/tools/component-categories.d.ts +157 -0
- package/dist/tools/component-categories.d.ts.map +1 -0
- package/dist/tools/component-categories.js +162 -0
- package/dist/tools/component-categories.js.map +1 -0
- package/dist/tools/countries.d.ts +148 -0
- package/dist/tools/countries.d.ts.map +1 -0
- package/dist/tools/countries.js +142 -0
- package/dist/tools/countries.js.map +1 -0
- package/dist/tools/db-routines.d.ts +229 -0
- package/dist/tools/db-routines.d.ts.map +1 -0
- package/dist/tools/db-routines.js +233 -0
- package/dist/tools/db-routines.js.map +1 -0
- package/dist/tools/dynamic-entities.d.ts +166 -0
- package/dist/tools/dynamic-entities.d.ts.map +1 -1
- package/dist/tools/dynamic-entities.js +156 -0
- package/dist/tools/dynamic-entities.js.map +1 -1
- package/dist/tools/entities.d.ts +119 -0
- package/dist/tools/entities.d.ts.map +1 -1
- package/dist/tools/entities.js +413 -4
- package/dist/tools/entities.js.map +1 -1
- package/dist/tools/error-logs.d.ts +67 -0
- package/dist/tools/error-logs.d.ts.map +1 -0
- package/dist/tools/error-logs.js +74 -0
- package/dist/tools/error-logs.js.map +1 -0
- package/dist/tools/general.d.ts.map +1 -1
- package/dist/tools/general.js +218 -0
- package/dist/tools/general.js.map +1 -1
- package/dist/tools/layouts.d.ts +21 -0
- package/dist/tools/layouts.d.ts.map +1 -1
- package/dist/tools/layouts.js +20 -2
- package/dist/tools/layouts.js.map +1 -1
- package/dist/tools/operations.d.ts +184 -0
- package/dist/tools/operations.d.ts.map +1 -0
- package/dist/tools/operations.js +217 -0
- package/dist/tools/operations.js.map +1 -0
- package/dist/tools/organizations.d.ts +178 -0
- package/dist/tools/organizations.d.ts.map +1 -0
- package/dist/tools/organizations.js +158 -0
- package/dist/tools/organizations.js.map +1 -0
- package/dist/tools/page-entities.d.ts +522 -0
- package/dist/tools/page-entities.d.ts.map +1 -0
- package/dist/tools/page-entities.js +535 -0
- package/dist/tools/page-entities.js.map +1 -0
- package/dist/tools/pages.d.ts +226 -0
- package/dist/tools/pages.d.ts.map +1 -1
- package/dist/tools/pages.js +473 -17
- package/dist/tools/pages.js.map +1 -1
- package/dist/tools/plans.d.ts +293 -0
- package/dist/tools/plans.d.ts.map +1 -0
- package/dist/tools/plans.js +213 -0
- package/dist/tools/plans.js.map +1 -0
- package/dist/tools/plugins.d.ts +230 -0
- package/dist/tools/plugins.d.ts.map +1 -0
- package/dist/tools/plugins.js +218 -0
- package/dist/tools/plugins.js.map +1 -0
- package/dist/tools/push-notifications.d.ts +261 -0
- package/dist/tools/push-notifications.d.ts.map +1 -0
- package/dist/tools/push-notifications.js +246 -0
- package/dist/tools/push-notifications.js.map +1 -0
- package/dist/tools/queries.d.ts +274 -0
- package/dist/tools/queries.d.ts.map +1 -1
- package/dist/tools/queries.js +319 -17
- package/dist/tools/queries.js.map +1 -1
- package/dist/tools/query-categories.d.ts +192 -0
- package/dist/tools/query-categories.d.ts.map +1 -0
- package/dist/tools/query-categories.js +204 -0
- package/dist/tools/query-categories.js.map +1 -0
- package/dist/tools/regions.d.ts +148 -0
- package/dist/tools/regions.d.ts.map +1 -0
- package/dist/tools/regions.js +148 -0
- package/dist/tools/regions.js.map +1 -0
- package/dist/tools/roles.d.ts +284 -0
- package/dist/tools/roles.d.ts.map +1 -0
- package/dist/tools/roles.js +291 -0
- package/dist/tools/roles.js.map +1 -0
- package/dist/tools/settings.d.ts +160 -0
- package/dist/tools/settings.d.ts.map +1 -0
- package/dist/tools/settings.js +187 -0
- package/dist/tools/settings.js.map +1 -0
- package/dist/tools/showcases.d.ts +184 -0
- package/dist/tools/showcases.d.ts.map +1 -0
- package/dist/tools/showcases.js +179 -0
- package/dist/tools/showcases.js.map +1 -0
- package/dist/tools/storage.d.ts +297 -0
- package/dist/tools/storage.d.ts.map +1 -0
- package/dist/tools/storage.js +302 -0
- package/dist/tools/storage.js.map +1 -0
- package/dist/tools/subscriptions.d.ts +166 -0
- package/dist/tools/subscriptions.d.ts.map +1 -0
- package/dist/tools/subscriptions.js +144 -0
- package/dist/tools/subscriptions.js.map +1 -0
- package/dist/tools/system-tools.d.ts +124 -0
- package/dist/tools/system-tools.d.ts.map +1 -0
- package/dist/tools/system-tools.js +147 -0
- package/dist/tools/system-tools.js.map +1 -0
- package/dist/tools/system-variables.d.ts +167 -0
- package/dist/tools/system-variables.d.ts.map +1 -0
- package/dist/tools/system-variables.js +176 -0
- package/dist/tools/system-variables.js.map +1 -0
- package/dist/tools/users.d.ts +266 -0
- package/dist/tools/users.d.ts.map +1 -0
- package/dist/tools/users.js +235 -0
- package/dist/tools/users.js.map +1 -0
- package/dist/tools/workflows.d.ts +278 -0
- package/dist/tools/workflows.d.ts.map +1 -0
- package/dist/tools/workflows.js +267 -0
- package/dist/tools/workflows.js.map +1 -0
- package/package.json +12 -3
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Tools for WAP Workflows
|
|
3
|
+
* Workflows = step-based automation flows (run, preview, AI-assisted build) per site.
|
|
4
|
+
* Site-scoped routes: /{site}/Workflows
|
|
5
|
+
*/
|
|
6
|
+
import { WapClient } from "../client.js";
|
|
7
|
+
export declare function getWorkflowTools(client: WapClient): {
|
|
8
|
+
list_workflows: {
|
|
9
|
+
description: string;
|
|
10
|
+
inputSchema: {
|
|
11
|
+
type: "object";
|
|
12
|
+
properties: {
|
|
13
|
+
name: {
|
|
14
|
+
type: string;
|
|
15
|
+
description: string;
|
|
16
|
+
};
|
|
17
|
+
description: {
|
|
18
|
+
type: string;
|
|
19
|
+
description: string;
|
|
20
|
+
};
|
|
21
|
+
pageIndex: {
|
|
22
|
+
type: string;
|
|
23
|
+
description: string;
|
|
24
|
+
};
|
|
25
|
+
pageLength: {
|
|
26
|
+
type: string;
|
|
27
|
+
description: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
handler: (args: {
|
|
32
|
+
name?: string;
|
|
33
|
+
description?: string;
|
|
34
|
+
pageIndex?: number;
|
|
35
|
+
pageLength?: number;
|
|
36
|
+
}) => Promise<{
|
|
37
|
+
content: {
|
|
38
|
+
type: "text";
|
|
39
|
+
text: string;
|
|
40
|
+
}[];
|
|
41
|
+
}>;
|
|
42
|
+
};
|
|
43
|
+
get_workflow: {
|
|
44
|
+
description: string;
|
|
45
|
+
inputSchema: {
|
|
46
|
+
type: "object";
|
|
47
|
+
properties: {
|
|
48
|
+
id: {
|
|
49
|
+
type: string;
|
|
50
|
+
description: string;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
required: string[];
|
|
54
|
+
};
|
|
55
|
+
handler: (args: {
|
|
56
|
+
id: string;
|
|
57
|
+
}) => Promise<{
|
|
58
|
+
content: {
|
|
59
|
+
type: "text";
|
|
60
|
+
text: string;
|
|
61
|
+
}[];
|
|
62
|
+
}>;
|
|
63
|
+
};
|
|
64
|
+
create_workflow: {
|
|
65
|
+
description: string;
|
|
66
|
+
inputSchema: {
|
|
67
|
+
type: "object";
|
|
68
|
+
properties: {
|
|
69
|
+
name: {
|
|
70
|
+
type: string;
|
|
71
|
+
description: string;
|
|
72
|
+
};
|
|
73
|
+
description: {
|
|
74
|
+
type: string;
|
|
75
|
+
description: string;
|
|
76
|
+
};
|
|
77
|
+
steps: {
|
|
78
|
+
type: string;
|
|
79
|
+
description: string;
|
|
80
|
+
};
|
|
81
|
+
authorizationRequired: {
|
|
82
|
+
type: string;
|
|
83
|
+
description: string;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
required: string[];
|
|
87
|
+
};
|
|
88
|
+
handler: (args: {
|
|
89
|
+
name: string;
|
|
90
|
+
description?: string;
|
|
91
|
+
steps: unknown[];
|
|
92
|
+
authorizationRequired?: boolean;
|
|
93
|
+
}) => Promise<{
|
|
94
|
+
content: {
|
|
95
|
+
type: "text";
|
|
96
|
+
text: string;
|
|
97
|
+
}[];
|
|
98
|
+
}>;
|
|
99
|
+
};
|
|
100
|
+
update_workflow: {
|
|
101
|
+
description: string;
|
|
102
|
+
inputSchema: {
|
|
103
|
+
type: "object";
|
|
104
|
+
properties: {
|
|
105
|
+
id: {
|
|
106
|
+
type: string;
|
|
107
|
+
description: string;
|
|
108
|
+
};
|
|
109
|
+
name: {
|
|
110
|
+
type: string;
|
|
111
|
+
description: string;
|
|
112
|
+
};
|
|
113
|
+
description: {
|
|
114
|
+
type: string;
|
|
115
|
+
description: string;
|
|
116
|
+
};
|
|
117
|
+
steps: {
|
|
118
|
+
type: string;
|
|
119
|
+
description: string;
|
|
120
|
+
};
|
|
121
|
+
authorizationRequired: {
|
|
122
|
+
type: string;
|
|
123
|
+
description: string;
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
required: string[];
|
|
127
|
+
};
|
|
128
|
+
handler: (args: {
|
|
129
|
+
id: string;
|
|
130
|
+
name: string;
|
|
131
|
+
description?: string;
|
|
132
|
+
steps: unknown[];
|
|
133
|
+
authorizationRequired?: boolean;
|
|
134
|
+
}) => Promise<{
|
|
135
|
+
content: {
|
|
136
|
+
type: "text";
|
|
137
|
+
text: string;
|
|
138
|
+
}[];
|
|
139
|
+
}>;
|
|
140
|
+
};
|
|
141
|
+
delete_workflow: {
|
|
142
|
+
description: string;
|
|
143
|
+
inputSchema: {
|
|
144
|
+
type: "object";
|
|
145
|
+
properties: {
|
|
146
|
+
id: {
|
|
147
|
+
type: string;
|
|
148
|
+
description: string;
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
required: string[];
|
|
152
|
+
};
|
|
153
|
+
handler: (args: {
|
|
154
|
+
id: string;
|
|
155
|
+
}) => Promise<{
|
|
156
|
+
content: {
|
|
157
|
+
type: "text";
|
|
158
|
+
text: string;
|
|
159
|
+
}[];
|
|
160
|
+
}>;
|
|
161
|
+
};
|
|
162
|
+
run_workflow: {
|
|
163
|
+
description: string;
|
|
164
|
+
inputSchema: {
|
|
165
|
+
type: "object";
|
|
166
|
+
properties: {
|
|
167
|
+
id: {
|
|
168
|
+
type: string;
|
|
169
|
+
description: string;
|
|
170
|
+
};
|
|
171
|
+
variables: {
|
|
172
|
+
type: string;
|
|
173
|
+
description: string;
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
required: string[];
|
|
177
|
+
};
|
|
178
|
+
handler: (args: {
|
|
179
|
+
id: string;
|
|
180
|
+
variables?: Record<string, unknown>;
|
|
181
|
+
}) => Promise<{
|
|
182
|
+
content: {
|
|
183
|
+
type: "text";
|
|
184
|
+
text: string;
|
|
185
|
+
}[];
|
|
186
|
+
}>;
|
|
187
|
+
};
|
|
188
|
+
preview_workflow: {
|
|
189
|
+
description: string;
|
|
190
|
+
inputSchema: {
|
|
191
|
+
type: "object";
|
|
192
|
+
properties: {
|
|
193
|
+
steps: {
|
|
194
|
+
type: string;
|
|
195
|
+
description: string;
|
|
196
|
+
};
|
|
197
|
+
parameters: {
|
|
198
|
+
type: string;
|
|
199
|
+
description: string;
|
|
200
|
+
};
|
|
201
|
+
};
|
|
202
|
+
required: string[];
|
|
203
|
+
};
|
|
204
|
+
handler: (args: {
|
|
205
|
+
steps: unknown[];
|
|
206
|
+
parameters?: Record<string, unknown>;
|
|
207
|
+
}) => Promise<{
|
|
208
|
+
content: {
|
|
209
|
+
type: "text";
|
|
210
|
+
text: string;
|
|
211
|
+
}[];
|
|
212
|
+
}>;
|
|
213
|
+
};
|
|
214
|
+
ai_suggest_workflow: {
|
|
215
|
+
description: string;
|
|
216
|
+
inputSchema: {
|
|
217
|
+
type: "object";
|
|
218
|
+
properties: {
|
|
219
|
+
messages: {
|
|
220
|
+
type: string;
|
|
221
|
+
description: string;
|
|
222
|
+
};
|
|
223
|
+
currentCode: {
|
|
224
|
+
type: string;
|
|
225
|
+
description: string;
|
|
226
|
+
};
|
|
227
|
+
context: {
|
|
228
|
+
type: string;
|
|
229
|
+
description: string;
|
|
230
|
+
};
|
|
231
|
+
};
|
|
232
|
+
required: string[];
|
|
233
|
+
};
|
|
234
|
+
handler: (args: {
|
|
235
|
+
messages: Array<{
|
|
236
|
+
role: string;
|
|
237
|
+
content: string;
|
|
238
|
+
}>;
|
|
239
|
+
currentCode?: string;
|
|
240
|
+
context?: string;
|
|
241
|
+
}) => Promise<{
|
|
242
|
+
content: {
|
|
243
|
+
type: "text";
|
|
244
|
+
text: string;
|
|
245
|
+
}[];
|
|
246
|
+
}>;
|
|
247
|
+
};
|
|
248
|
+
ai_build_workflow: {
|
|
249
|
+
description: string;
|
|
250
|
+
inputSchema: {
|
|
251
|
+
type: "object";
|
|
252
|
+
properties: {
|
|
253
|
+
messages: {
|
|
254
|
+
type: string;
|
|
255
|
+
description: string;
|
|
256
|
+
};
|
|
257
|
+
currentWorkflow: {
|
|
258
|
+
type: string;
|
|
259
|
+
description: string;
|
|
260
|
+
};
|
|
261
|
+
};
|
|
262
|
+
required: string[];
|
|
263
|
+
};
|
|
264
|
+
handler: (args: {
|
|
265
|
+
messages: Array<{
|
|
266
|
+
role: string;
|
|
267
|
+
content: string;
|
|
268
|
+
}>;
|
|
269
|
+
currentWorkflow?: string;
|
|
270
|
+
}) => Promise<{
|
|
271
|
+
content: {
|
|
272
|
+
type: "text";
|
|
273
|
+
text: string;
|
|
274
|
+
}[];
|
|
275
|
+
}>;
|
|
276
|
+
};
|
|
277
|
+
};
|
|
278
|
+
//# sourceMappingURL=workflows.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflows.d.ts","sourceRoot":"","sources":["../../src/tools/workflows.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,SAAS;;;;;;;;;;;;;;;;;;;;;;;;wBAwBtB;YACpB,IAAI,CAAC,EAAE,MAAM,CAAC;YACd,WAAW,CAAC,EAAE,MAAM,CAAC;YACrB,SAAS,CAAC,EAAE,MAAM,CAAC;YACnB,UAAU,CAAC,EAAE,MAAM,CAAC;SACrB;;;;;;;;;;;;;;;;;;;wBAgCqB;YAAE,EAAE,EAAE,MAAM,CAAA;SAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAqCd;YACpB,IAAI,EAAE,MAAM,CAAC;YACb,WAAW,CAAC,EAAE,MAAM,CAAC;YACrB,KAAK,EAAE,OAAO,EAAE,CAAC;YACjB,qBAAqB,CAAC,EAAE,OAAO,CAAC;SACjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAgCqB;YACpB,EAAE,EAAE,MAAM,CAAC;YACX,IAAI,EAAE,MAAM,CAAC;YACb,WAAW,CAAC,EAAE,MAAM,CAAC;YACrB,KAAK,EAAE,OAAO,EAAE,CAAC;YACjB,qBAAqB,CAAC,EAAE,OAAO,CAAC;SACjC;;;;;;;;;;;;;;;;;;;wBA0BqB;YAAE,EAAE,EAAE,MAAM,CAAA;SAAE;;;;;;;;;;;;;;;;;;;;;;;wBA6Bd;YACpB,EAAE,EAAE,MAAM,CAAC;YACX,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;SACrC;;;;;;;;;;;;;;;;;;;;;;;wBAkCqB;YACpB,KAAK,EAAE,OAAO,EAAE,CAAC;YACjB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;SACtC;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAyCqB;YACpB,QAAQ,EAAE,KAAK,CAAC;gBAAE,IAAI,EAAE,MAAM,CAAC;gBAAC,OAAO,EAAE,MAAM,CAAA;aAAE,CAAC,CAAC;YACnD,WAAW,CAAC,EAAE,MAAM,CAAC;YACrB,OAAO,CAAC,EAAE,MAAM,CAAC;SAClB;;;;;;;;;;;;;;;;;;;;;;;wBAsCqB;YACpB,QAAQ,EAAE,KAAK,CAAC;gBAAE,IAAI,EAAE,MAAM,CAAC;gBAAC,OAAO,EAAE,MAAM,CAAA;aAAE,CAAC,CAAC;YACnD,eAAe,CAAC,EAAE,MAAM,CAAC;SAC1B;;;;;;;EAkBN"}
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Tools for WAP Workflows
|
|
3
|
+
* Workflows = step-based automation flows (run, preview, AI-assisted build) per site.
|
|
4
|
+
* Site-scoped routes: /{site}/Workflows
|
|
5
|
+
*/
|
|
6
|
+
export function getWorkflowTools(client) {
|
|
7
|
+
return {
|
|
8
|
+
// ─── List Workflows ────────────────────────────────────
|
|
9
|
+
list_workflows: {
|
|
10
|
+
description: "Site üzerindeki tüm workflow'ları (otomasyon akışlarını) listeler. İsim ve açıklama ile filtrelenebilir.",
|
|
11
|
+
inputSchema: {
|
|
12
|
+
type: "object",
|
|
13
|
+
properties: {
|
|
14
|
+
name: { type: "string", description: "Workflow adı ile filtrele" },
|
|
15
|
+
description: {
|
|
16
|
+
type: "string",
|
|
17
|
+
description: "Workflow açıklaması ile filtrele",
|
|
18
|
+
},
|
|
19
|
+
pageIndex: {
|
|
20
|
+
type: "number",
|
|
21
|
+
description: "Sayfa numarası (0-based)",
|
|
22
|
+
},
|
|
23
|
+
pageLength: {
|
|
24
|
+
type: "number",
|
|
25
|
+
description: "Sayfa boyutu (varsayılan: 20)",
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
handler: async (args) => {
|
|
30
|
+
const params = {};
|
|
31
|
+
if (args.name)
|
|
32
|
+
params.name = args.name;
|
|
33
|
+
if (args.description)
|
|
34
|
+
params.description = args.description;
|
|
35
|
+
if (args.pageIndex !== undefined)
|
|
36
|
+
params.pageIndex = String(args.pageIndex);
|
|
37
|
+
if (args.pageLength !== undefined)
|
|
38
|
+
params.pageLength = String(args.pageLength);
|
|
39
|
+
const result = await client.request("GET", "/{site}/Workflows", undefined, params);
|
|
40
|
+
return {
|
|
41
|
+
content: [
|
|
42
|
+
{ type: "text", text: JSON.stringify(result, null, 2) },
|
|
43
|
+
],
|
|
44
|
+
};
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
// ─── Get Workflow ──────────────────────────────────────
|
|
48
|
+
get_workflow: {
|
|
49
|
+
description: "Belirli bir workflow'un detaylarını ID ile getirir.",
|
|
50
|
+
inputSchema: {
|
|
51
|
+
type: "object",
|
|
52
|
+
properties: {
|
|
53
|
+
id: { type: "string", description: "Workflow ID (GUID)" },
|
|
54
|
+
},
|
|
55
|
+
required: ["id"],
|
|
56
|
+
},
|
|
57
|
+
handler: async (args) => {
|
|
58
|
+
const result = await client.request("GET", `/{site}/Workflows/${args.id}`);
|
|
59
|
+
return {
|
|
60
|
+
content: [
|
|
61
|
+
{ type: "text", text: JSON.stringify(result, null, 2) },
|
|
62
|
+
],
|
|
63
|
+
};
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
// ─── Create Workflow ───────────────────────────────────
|
|
67
|
+
create_workflow: {
|
|
68
|
+
description: `Yeni bir workflow (otomasyon akışı) oluşturur.
|
|
69
|
+
'name': Workflow adı (zorunlu).
|
|
70
|
+
'description': Açıklama.
|
|
71
|
+
'steps': Workflow adımları dizisi. Her adım stepId, activityName (Start/End/CallService/RunJs/Delay/Condition/SetVariable/Transform/SendEmail/DatabaseQuery/Loop/RunQuery vb.), onSuccessStepId, onFailStepId ve adım tipine özel alanlar (httpMethod, url, headers, body, jsCode, delayMs, conditionExpression, variableKey/variableValue, transformCode, emailTo/emailSubject/emailBody, sqlQuery, loopExpression/loopCode, queryName/queryType) içerir.
|
|
72
|
+
'authorizationRequired': Çalıştırmak için yetki gerekip gerekmediği.`,
|
|
73
|
+
inputSchema: {
|
|
74
|
+
type: "object",
|
|
75
|
+
properties: {
|
|
76
|
+
name: { type: "string", description: "Workflow adı" },
|
|
77
|
+
description: { type: "string", description: "Workflow açıklaması" },
|
|
78
|
+
steps: {
|
|
79
|
+
type: "array",
|
|
80
|
+
description: "Workflow adımları dizisi. Her eleman bir step nesnesi (stepId, activityName ve tipe özel alanlar).",
|
|
81
|
+
},
|
|
82
|
+
authorizationRequired: {
|
|
83
|
+
type: "boolean",
|
|
84
|
+
description: "Çalıştırmak için yetkilendirme gerekli mi",
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
required: ["name", "steps"],
|
|
88
|
+
},
|
|
89
|
+
handler: async (args) => {
|
|
90
|
+
const result = await client.request("POST", "/{site}/Workflows", args);
|
|
91
|
+
return {
|
|
92
|
+
content: [
|
|
93
|
+
{ type: "text", text: JSON.stringify(result, null, 2) },
|
|
94
|
+
],
|
|
95
|
+
};
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
// ─── Update Workflow ───────────────────────────────────
|
|
99
|
+
update_workflow: {
|
|
100
|
+
description: "Mevcut bir workflow'u günceller. 'name', 'description', 'steps' (adım dizisi) ve 'authorizationRequired' alanlarını alır.",
|
|
101
|
+
inputSchema: {
|
|
102
|
+
type: "object",
|
|
103
|
+
properties: {
|
|
104
|
+
id: { type: "string", description: "Güncellenecek workflow ID" },
|
|
105
|
+
name: { type: "string", description: "Yeni workflow adı" },
|
|
106
|
+
description: { type: "string", description: "Yeni açıklama" },
|
|
107
|
+
steps: {
|
|
108
|
+
type: "array",
|
|
109
|
+
description: "Güncellenmiş workflow adımları dizisi (stepId, activityName ve tipe özel alanlar).",
|
|
110
|
+
},
|
|
111
|
+
authorizationRequired: {
|
|
112
|
+
type: "boolean",
|
|
113
|
+
description: "Çalıştırmak için yetkilendirme gerekli mi",
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
required: ["id", "name", "steps"],
|
|
117
|
+
},
|
|
118
|
+
handler: async (args) => {
|
|
119
|
+
const { id, ...data } = args;
|
|
120
|
+
const result = await client.request("PUT", `/{site}/Workflows/${id}`, data);
|
|
121
|
+
return {
|
|
122
|
+
content: [
|
|
123
|
+
{ type: "text", text: JSON.stringify(result, null, 2) },
|
|
124
|
+
],
|
|
125
|
+
};
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
// ─── Delete Workflow ───────────────────────────────────
|
|
129
|
+
delete_workflow: {
|
|
130
|
+
description: "Bir workflow'u siler. DİKKAT: Bu işlem geri alınamaz.",
|
|
131
|
+
inputSchema: {
|
|
132
|
+
type: "object",
|
|
133
|
+
properties: {
|
|
134
|
+
id: { type: "string", description: "Silinecek workflow ID" },
|
|
135
|
+
},
|
|
136
|
+
required: ["id"],
|
|
137
|
+
},
|
|
138
|
+
handler: async (args) => {
|
|
139
|
+
const result = await client.request("DELETE", `/{site}/Workflows/${args.id}`);
|
|
140
|
+
return {
|
|
141
|
+
content: [
|
|
142
|
+
{ type: "text", text: JSON.stringify(result, null, 2) },
|
|
143
|
+
],
|
|
144
|
+
};
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
// ─── Run Workflow ──────────────────────────────────────
|
|
148
|
+
run_workflow: {
|
|
149
|
+
description: "Kayıtlı bir workflow'u ID ile çalıştırır. 'variables' nesnesi içindeki anahtar-değer çiftleri workflow'a parametre olarak geçirilir.",
|
|
150
|
+
inputSchema: {
|
|
151
|
+
type: "object",
|
|
152
|
+
properties: {
|
|
153
|
+
id: { type: "string", description: "Çalıştırılacak workflow ID" },
|
|
154
|
+
variables: {
|
|
155
|
+
type: "object",
|
|
156
|
+
description: "Workflow'a geçirilecek parametreler (anahtar-değer çiftleri). Boş bırakılabilir.",
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
required: ["id"],
|
|
160
|
+
},
|
|
161
|
+
handler: async (args) => {
|
|
162
|
+
const result = await client.request("POST", `/{site}/Workflows/run/${args.id}`, args.variables ?? {});
|
|
163
|
+
return {
|
|
164
|
+
content: [
|
|
165
|
+
{ type: "text", text: JSON.stringify(result, null, 2) },
|
|
166
|
+
],
|
|
167
|
+
};
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
// ─── Preview Workflow ──────────────────────────────────
|
|
171
|
+
preview_workflow: {
|
|
172
|
+
description: "Kaydetmeden bir workflow'u önizler/test çalıştırır. 'steps' adım dizisi ve 'parameters' (parametre nesnesi) ile gönderilir.",
|
|
173
|
+
inputSchema: {
|
|
174
|
+
type: "object",
|
|
175
|
+
properties: {
|
|
176
|
+
steps: {
|
|
177
|
+
type: "array",
|
|
178
|
+
description: "Önizlenecek workflow adımları dizisi (stepId, activityName ve tipe özel alanlar).",
|
|
179
|
+
},
|
|
180
|
+
parameters: {
|
|
181
|
+
type: "object",
|
|
182
|
+
description: "Önizleme sırasında workflow'a geçirilecek parametreler (anahtar-değer çiftleri).",
|
|
183
|
+
},
|
|
184
|
+
},
|
|
185
|
+
required: ["steps"],
|
|
186
|
+
},
|
|
187
|
+
handler: async (args) => {
|
|
188
|
+
const body = {
|
|
189
|
+
steps: args.steps,
|
|
190
|
+
parameters: args.parameters ?? {},
|
|
191
|
+
};
|
|
192
|
+
const result = await client.request("POST", "/{site}/Workflows/preview", body);
|
|
193
|
+
return {
|
|
194
|
+
content: [
|
|
195
|
+
{ type: "text", text: JSON.stringify(result, null, 2) },
|
|
196
|
+
],
|
|
197
|
+
};
|
|
198
|
+
},
|
|
199
|
+
},
|
|
200
|
+
// ─── AI Suggest ────────────────────────────────────────
|
|
201
|
+
ai_suggest_workflow: {
|
|
202
|
+
description: "Yapay zekadan workflow JS kodu için öneri alır (sohbet tabanlı). 'messages' sohbet geçmişi (role: user/assistant, content), 'currentCode' mevcut kod, 'context' bağlam bilgisi ile gönderilir.",
|
|
203
|
+
inputSchema: {
|
|
204
|
+
type: "object",
|
|
205
|
+
properties: {
|
|
206
|
+
messages: {
|
|
207
|
+
type: "array",
|
|
208
|
+
description: "Sohbet mesajları dizisi. Her eleman { role: 'user' | 'assistant', content: string } biçimindedir.",
|
|
209
|
+
},
|
|
210
|
+
currentCode: {
|
|
211
|
+
type: "string",
|
|
212
|
+
description: "Üzerinde çalışılan mevcut JS kodu",
|
|
213
|
+
},
|
|
214
|
+
context: {
|
|
215
|
+
type: "string",
|
|
216
|
+
description: "Yapay zekaya verilecek ek bağlam bilgisi",
|
|
217
|
+
},
|
|
218
|
+
},
|
|
219
|
+
required: ["messages"],
|
|
220
|
+
},
|
|
221
|
+
handler: async (args) => {
|
|
222
|
+
const body = {
|
|
223
|
+
messages: args.messages,
|
|
224
|
+
currentCode: args.currentCode ?? "",
|
|
225
|
+
context: args.context ?? "",
|
|
226
|
+
};
|
|
227
|
+
const result = await client.request("POST", "/{site}/Workflows/ai-suggest", body);
|
|
228
|
+
return {
|
|
229
|
+
content: [
|
|
230
|
+
{ type: "text", text: JSON.stringify(result, null, 2) },
|
|
231
|
+
],
|
|
232
|
+
};
|
|
233
|
+
},
|
|
234
|
+
},
|
|
235
|
+
// ─── AI Build ──────────────────────────────────────────
|
|
236
|
+
ai_build_workflow: {
|
|
237
|
+
description: "Yapay zekadan tam bir workflow (adım dizisi) oluşturmasını ister (sohbet tabanlı). 'messages' sohbet geçmişi (role: user/assistant, content), 'currentWorkflow' mevcut workflow tanımı ile gönderilir.",
|
|
238
|
+
inputSchema: {
|
|
239
|
+
type: "object",
|
|
240
|
+
properties: {
|
|
241
|
+
messages: {
|
|
242
|
+
type: "array",
|
|
243
|
+
description: "Sohbet mesajları dizisi. Her eleman { role: 'user' | 'assistant', content: string } biçimindedir.",
|
|
244
|
+
},
|
|
245
|
+
currentWorkflow: {
|
|
246
|
+
type: "string",
|
|
247
|
+
description: "Üzerinde çalışılan mevcut workflow tanımı (metin/JSON)",
|
|
248
|
+
},
|
|
249
|
+
},
|
|
250
|
+
required: ["messages"],
|
|
251
|
+
},
|
|
252
|
+
handler: async (args) => {
|
|
253
|
+
const body = {
|
|
254
|
+
messages: args.messages,
|
|
255
|
+
currentWorkflow: args.currentWorkflow ?? "",
|
|
256
|
+
};
|
|
257
|
+
const result = await client.request("POST", "/{site}/Workflows/ai-build", body);
|
|
258
|
+
return {
|
|
259
|
+
content: [
|
|
260
|
+
{ type: "text", text: JSON.stringify(result, null, 2) },
|
|
261
|
+
],
|
|
262
|
+
};
|
|
263
|
+
},
|
|
264
|
+
},
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
//# sourceMappingURL=workflows.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflows.js","sourceRoot":"","sources":["../../src/tools/workflows.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,MAAM,UAAU,gBAAgB,CAAC,MAAiB;IAChD,OAAO;QACL,0DAA0D;QAC1D,cA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@@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appaflytech/wappa-mcp",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.12",
|
|
4
4
|
"description": "MCP Server for WAPPA (Content Management System & Web Site Tools) Admin API — Claude Code integration for component, page, widget, and site management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
8
|
"bin": {
|
|
9
|
-
"wappa-mcp": "dist/index.js"
|
|
9
|
+
"wappa-mcp": "dist/index.js",
|
|
10
|
+
"wappa-mcp-http": "dist/server.js"
|
|
10
11
|
},
|
|
11
12
|
"files": [
|
|
12
13
|
"dist",
|
|
@@ -17,6 +18,8 @@
|
|
|
17
18
|
"build": "tsc",
|
|
18
19
|
"dev": "tsc --watch",
|
|
19
20
|
"start": "node dist/index.js",
|
|
21
|
+
"start:http": "node dist/server.js",
|
|
22
|
+
"dev:http": "tsx watch src/server.ts",
|
|
20
23
|
"prepare": "npm run build",
|
|
21
24
|
"sync:components": "tsx scripts/sync-from-admin-ui.ts",
|
|
22
25
|
"test": "vitest run --config vitest.config.ts",
|
|
@@ -46,10 +49,16 @@
|
|
|
46
49
|
},
|
|
47
50
|
"dependencies": {
|
|
48
51
|
"@modelcontextprotocol/sdk": "^1.12.1",
|
|
52
|
+
"cors": "^2.8.5",
|
|
49
53
|
"dotenv": "^17.4.2",
|
|
54
|
+
"express": "^4.21.0",
|
|
55
|
+
"express-rate-limit": "^7.5.0",
|
|
56
|
+
"helmet": "^8.0.0",
|
|
50
57
|
"zod": "^4.3.6"
|
|
51
58
|
},
|
|
52
59
|
"devDependencies": {
|
|
60
|
+
"@types/cors": "^2.8.17",
|
|
61
|
+
"@types/express": "^4.17.21",
|
|
53
62
|
"@types/node": "^22.19.17",
|
|
54
63
|
"@vitest/coverage-v8": "^4.1.7",
|
|
55
64
|
"esbuild": "^0.25.0",
|
|
@@ -57,4 +66,4 @@
|
|
|
57
66
|
"typescript": "^5.7.0",
|
|
58
67
|
"vitest": "^4.1.7"
|
|
59
68
|
}
|
|
60
|
-
}
|
|
69
|
+
}
|