@lyrra/mcp-server 1.1.2 → 1.1.5

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.
Files changed (105) hide show
  1. package/README.md +59 -242
  2. package/dist/auth-session.js +160 -0
  3. package/dist/eduflow-block-docs.js +438 -0
  4. package/dist/index.js +179 -12
  5. package/dist/lyrra-http.js +80 -0
  6. package/dist/openapi-parse.js +61 -0
  7. package/dist/register-eduflow-block-tools.js +31 -0
  8. package/package.json +36 -13
  9. package/Dockerfile +0 -16
  10. package/dist/client.d.ts +0 -23
  11. package/dist/client.d.ts.map +0 -1
  12. package/dist/client.js +0 -92
  13. package/dist/client.js.map +0 -1
  14. package/dist/config.d.ts +0 -8
  15. package/dist/config.d.ts.map +0 -1
  16. package/dist/config.js +0 -8
  17. package/dist/config.js.map +0 -1
  18. package/dist/http-server.d.ts +0 -8
  19. package/dist/http-server.d.ts.map +0 -1
  20. package/dist/http-server.js +0 -476
  21. package/dist/http-server.js.map +0 -1
  22. package/dist/index.d.ts +0 -3
  23. package/dist/index.d.ts.map +0 -1
  24. package/dist/index.js.map +0 -1
  25. package/dist/resources/block-types.d.ts +0 -318
  26. package/dist/resources/block-types.d.ts.map +0 -1
  27. package/dist/resources/block-types.js +0 -297
  28. package/dist/resources/block-types.js.map +0 -1
  29. package/dist/resources/flow-schema.d.ts +0 -147
  30. package/dist/resources/flow-schema.d.ts.map +0 -1
  31. package/dist/resources/flow-schema.js +0 -143
  32. package/dist/resources/flow-schema.js.map +0 -1
  33. package/dist/server-factory.d.ts +0 -8
  34. package/dist/server-factory.d.ts.map +0 -1
  35. package/dist/server-factory.js +0 -82
  36. package/dist/server-factory.js.map +0 -1
  37. package/dist/tools/admin.d.ts +0 -265
  38. package/dist/tools/admin.d.ts.map +0 -1
  39. package/dist/tools/admin.js +0 -118
  40. package/dist/tools/admin.js.map +0 -1
  41. package/dist/tools/ai-designer.d.ts +0 -297
  42. package/dist/tools/ai-designer.d.ts.map +0 -1
  43. package/dist/tools/ai-designer.js +0 -89
  44. package/dist/tools/ai-designer.js.map +0 -1
  45. package/dist/tools/analytics.d.ts +0 -95
  46. package/dist/tools/analytics.d.ts.map +0 -1
  47. package/dist/tools/analytics.js +0 -44
  48. package/dist/tools/analytics.js.map +0 -1
  49. package/dist/tools/auth.d.ts +0 -61
  50. package/dist/tools/auth.d.ts.map +0 -1
  51. package/dist/tools/auth.js +0 -36
  52. package/dist/tools/auth.js.map +0 -1
  53. package/dist/tools/blocks.d.ts +0 -401
  54. package/dist/tools/blocks.d.ts.map +0 -1
  55. package/dist/tools/blocks.js +0 -167
  56. package/dist/tools/blocks.js.map +0 -1
  57. package/dist/tools/connections.d.ts +0 -173
  58. package/dist/tools/connections.d.ts.map +0 -1
  59. package/dist/tools/connections.js +0 -81
  60. package/dist/tools/connections.js.map +0 -1
  61. package/dist/tools/eduflow.d.ts +0 -409
  62. package/dist/tools/eduflow.d.ts.map +0 -1
  63. package/dist/tools/eduflow.js +0 -139
  64. package/dist/tools/eduflow.js.map +0 -1
  65. package/dist/tools/participants.d.ts +0 -221
  66. package/dist/tools/participants.d.ts.map +0 -1
  67. package/dist/tools/participants.js +0 -70
  68. package/dist/tools/participants.js.map +0 -1
  69. package/dist/tools/presentation.d.ts +0 -233
  70. package/dist/tools/presentation.d.ts.map +0 -1
  71. package/dist/tools/presentation.js +0 -57
  72. package/dist/tools/presentation.js.map +0 -1
  73. package/dist/tools/projects.d.ts +0 -131
  74. package/dist/tools/projects.d.ts.map +0 -1
  75. package/dist/tools/projects.js +0 -55
  76. package/dist/tools/projects.js.map +0 -1
  77. package/dist/tools/resources.d.ts +0 -93
  78. package/dist/tools/resources.d.ts.map +0 -1
  79. package/dist/tools/resources.js +0 -37
  80. package/dist/tools/resources.js.map +0 -1
  81. package/dist/tools/store.d.ts +0 -125
  82. package/dist/tools/store.d.ts.map +0 -1
  83. package/dist/tools/store.js +0 -66
  84. package/dist/tools/store.js.map +0 -1
  85. package/mcp-config.example.json +0 -14
  86. package/src/client.ts +0 -106
  87. package/src/config.ts +0 -7
  88. package/src/http-server.ts +0 -591
  89. package/src/index.ts +0 -23
  90. package/src/resources/block-types.ts +0 -298
  91. package/src/resources/flow-schema.ts +0 -148
  92. package/src/server-factory.ts +0 -109
  93. package/src/tools/admin.ts +0 -128
  94. package/src/tools/ai-designer.ts +0 -97
  95. package/src/tools/analytics.ts +0 -49
  96. package/src/tools/auth.ts +0 -39
  97. package/src/tools/blocks.ts +0 -180
  98. package/src/tools/connections.ts +0 -83
  99. package/src/tools/eduflow.ts +0 -150
  100. package/src/tools/participants.ts +0 -77
  101. package/src/tools/presentation.ts +0 -61
  102. package/src/tools/projects.ts +0 -61
  103. package/src/tools/resources.ts +0 -41
  104. package/src/tools/store.ts +0 -67
  105. package/tsconfig.json +0 -19
@@ -1,409 +0,0 @@
1
- import { z } from 'zod';
2
- import { LyrraClient } from '../client.js';
3
- export declare function createEduflowTools(c: LyrraClient): {
4
- eduflow_list: {
5
- description: string;
6
- inputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
7
- handler: () => Promise<any>;
8
- };
9
- eduflow_get: {
10
- description: string;
11
- inputSchema: z.ZodObject<{
12
- flowId: z.ZodString;
13
- }, "strip", z.ZodTypeAny, {
14
- flowId: string;
15
- }, {
16
- flowId: string;
17
- }>;
18
- handler: ({ flowId }: {
19
- flowId: string;
20
- }) => Promise<any>;
21
- };
22
- eduflow_get_urls: {
23
- description: string;
24
- inputSchema: z.ZodObject<{
25
- flowId: z.ZodString;
26
- }, "strip", z.ZodTypeAny, {
27
- flowId: string;
28
- }, {
29
- flowId: string;
30
- }>;
31
- handler: ({ flowId }: {
32
- flowId: string;
33
- }) => Promise<{
34
- preview: string;
35
- public: string;
36
- edit: string;
37
- presentation: string;
38
- analytics: string;
39
- }>;
40
- };
41
- eduflow_create: {
42
- description: string;
43
- inputSchema: z.ZodObject<{
44
- title: z.ZodString;
45
- description: z.ZodOptional<z.ZodString>;
46
- language: z.ZodOptional<z.ZodEnum<["fr", "en", "es", "it", "de"]>>;
47
- }, "strip", z.ZodTypeAny, {
48
- title: string;
49
- description?: string | undefined;
50
- language?: "fr" | "en" | "es" | "it" | "de" | undefined;
51
- }, {
52
- title: string;
53
- description?: string | undefined;
54
- language?: "fr" | "en" | "es" | "it" | "de" | undefined;
55
- }>;
56
- handler: (args: {
57
- title: string;
58
- description?: string;
59
- language?: string;
60
- }) => Promise<any>;
61
- };
62
- eduflow_update: {
63
- description: string;
64
- inputSchema: z.ZodObject<{
65
- flowId: z.ZodString;
66
- title: z.ZodOptional<z.ZodString>;
67
- description: z.ZodOptional<z.ZodString>;
68
- edges: z.ZodOptional<z.ZodArray<z.ZodObject<{
69
- id: z.ZodString;
70
- source: z.ZodString;
71
- target: z.ZodString;
72
- label: z.ZodOptional<z.ZodString>;
73
- animated: z.ZodOptional<z.ZodBoolean>;
74
- }, "strip", z.ZodTypeAny, {
75
- id: string;
76
- source: string;
77
- target: string;
78
- label?: string | undefined;
79
- animated?: boolean | undefined;
80
- }, {
81
- id: string;
82
- source: string;
83
- target: string;
84
- label?: string | undefined;
85
- animated?: boolean | undefined;
86
- }>, "many">>;
87
- objectives: z.ZodOptional<z.ZodAny>;
88
- gamification: z.ZodOptional<z.ZodAny>;
89
- presentationEnabled: z.ZodOptional<z.ZodBoolean>;
90
- presentationData: z.ZodOptional<z.ZodAny>;
91
- chatbotEnabled: z.ZodOptional<z.ZodBoolean>;
92
- facialVerificationEnabled: z.ZodOptional<z.ZodBoolean>;
93
- deadline: z.ZodOptional<z.ZodString>;
94
- language: z.ZodOptional<z.ZodEnum<["fr", "en", "es", "it", "de"]>>;
95
- }, "strip", z.ZodTypeAny, {
96
- flowId: string;
97
- title?: string | undefined;
98
- description?: string | undefined;
99
- language?: "fr" | "en" | "es" | "it" | "de" | undefined;
100
- edges?: {
101
- id: string;
102
- source: string;
103
- target: string;
104
- label?: string | undefined;
105
- animated?: boolean | undefined;
106
- }[] | undefined;
107
- objectives?: any;
108
- gamification?: any;
109
- presentationEnabled?: boolean | undefined;
110
- presentationData?: any;
111
- chatbotEnabled?: boolean | undefined;
112
- facialVerificationEnabled?: boolean | undefined;
113
- deadline?: string | undefined;
114
- }, {
115
- flowId: string;
116
- title?: string | undefined;
117
- description?: string | undefined;
118
- language?: "fr" | "en" | "es" | "it" | "de" | undefined;
119
- edges?: {
120
- id: string;
121
- source: string;
122
- target: string;
123
- label?: string | undefined;
124
- animated?: boolean | undefined;
125
- }[] | undefined;
126
- objectives?: any;
127
- gamification?: any;
128
- presentationEnabled?: boolean | undefined;
129
- presentationData?: any;
130
- chatbotEnabled?: boolean | undefined;
131
- facialVerificationEnabled?: boolean | undefined;
132
- deadline?: string | undefined;
133
- }>;
134
- handler: ({ flowId, ...data }: any) => Promise<any>;
135
- };
136
- eduflow_delete: {
137
- description: string;
138
- inputSchema: z.ZodObject<{
139
- flowId: z.ZodString;
140
- }, "strip", z.ZodTypeAny, {
141
- flowId: string;
142
- }, {
143
- flowId: string;
144
- }>;
145
- handler: ({ flowId }: {
146
- flowId: string;
147
- }) => Promise<any>;
148
- };
149
- eduflow_duplicate: {
150
- description: string;
151
- inputSchema: z.ZodObject<{
152
- flowId: z.ZodString;
153
- }, "strip", z.ZodTypeAny, {
154
- flowId: string;
155
- }, {
156
- flowId: string;
157
- }>;
158
- handler: ({ flowId }: {
159
- flowId: string;
160
- }) => Promise<any>;
161
- };
162
- eduflow_change_status: {
163
- description: string;
164
- inputSchema: z.ZodObject<{
165
- flowId: z.ZodString;
166
- status: z.ZodEnum<["draft", "published", "archived"]>;
167
- }, "strip", z.ZodTypeAny, {
168
- status: "draft" | "published" | "archived";
169
- flowId: string;
170
- }, {
171
- status: "draft" | "published" | "archived";
172
- flowId: string;
173
- }>;
174
- handler: ({ flowId, status }: {
175
- flowId: string;
176
- status: string;
177
- }) => Promise<any>;
178
- };
179
- eduflow_export: {
180
- description: string;
181
- inputSchema: z.ZodObject<{
182
- flowId: z.ZodString;
183
- }, "strip", z.ZodTypeAny, {
184
- flowId: string;
185
- }, {
186
- flowId: string;
187
- }>;
188
- handler: ({ flowId }: {
189
- flowId: string;
190
- }) => Promise<any>;
191
- };
192
- eduflow_get_public: {
193
- description: string;
194
- inputSchema: z.ZodObject<{
195
- flowId: z.ZodString;
196
- }, "strip", z.ZodTypeAny, {
197
- flowId: string;
198
- }, {
199
- flowId: string;
200
- }>;
201
- handler: ({ flowId }: {
202
- flowId: string;
203
- }) => Promise<any>;
204
- };
205
- };
206
- export declare const eduflowTools: {
207
- eduflow_list: {
208
- description: string;
209
- inputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
210
- handler: () => Promise<any>;
211
- };
212
- eduflow_get: {
213
- description: string;
214
- inputSchema: z.ZodObject<{
215
- flowId: z.ZodString;
216
- }, "strip", z.ZodTypeAny, {
217
- flowId: string;
218
- }, {
219
- flowId: string;
220
- }>;
221
- handler: ({ flowId }: {
222
- flowId: string;
223
- }) => Promise<any>;
224
- };
225
- eduflow_get_urls: {
226
- description: string;
227
- inputSchema: z.ZodObject<{
228
- flowId: z.ZodString;
229
- }, "strip", z.ZodTypeAny, {
230
- flowId: string;
231
- }, {
232
- flowId: string;
233
- }>;
234
- handler: ({ flowId }: {
235
- flowId: string;
236
- }) => Promise<{
237
- preview: string;
238
- public: string;
239
- edit: string;
240
- presentation: string;
241
- analytics: string;
242
- }>;
243
- };
244
- eduflow_create: {
245
- description: string;
246
- inputSchema: z.ZodObject<{
247
- title: z.ZodString;
248
- description: z.ZodOptional<z.ZodString>;
249
- language: z.ZodOptional<z.ZodEnum<["fr", "en", "es", "it", "de"]>>;
250
- }, "strip", z.ZodTypeAny, {
251
- title: string;
252
- description?: string | undefined;
253
- language?: "fr" | "en" | "es" | "it" | "de" | undefined;
254
- }, {
255
- title: string;
256
- description?: string | undefined;
257
- language?: "fr" | "en" | "es" | "it" | "de" | undefined;
258
- }>;
259
- handler: (args: {
260
- title: string;
261
- description?: string;
262
- language?: string;
263
- }) => Promise<any>;
264
- };
265
- eduflow_update: {
266
- description: string;
267
- inputSchema: z.ZodObject<{
268
- flowId: z.ZodString;
269
- title: z.ZodOptional<z.ZodString>;
270
- description: z.ZodOptional<z.ZodString>;
271
- edges: z.ZodOptional<z.ZodArray<z.ZodObject<{
272
- id: z.ZodString;
273
- source: z.ZodString;
274
- target: z.ZodString;
275
- label: z.ZodOptional<z.ZodString>;
276
- animated: z.ZodOptional<z.ZodBoolean>;
277
- }, "strip", z.ZodTypeAny, {
278
- id: string;
279
- source: string;
280
- target: string;
281
- label?: string | undefined;
282
- animated?: boolean | undefined;
283
- }, {
284
- id: string;
285
- source: string;
286
- target: string;
287
- label?: string | undefined;
288
- animated?: boolean | undefined;
289
- }>, "many">>;
290
- objectives: z.ZodOptional<z.ZodAny>;
291
- gamification: z.ZodOptional<z.ZodAny>;
292
- presentationEnabled: z.ZodOptional<z.ZodBoolean>;
293
- presentationData: z.ZodOptional<z.ZodAny>;
294
- chatbotEnabled: z.ZodOptional<z.ZodBoolean>;
295
- facialVerificationEnabled: z.ZodOptional<z.ZodBoolean>;
296
- deadline: z.ZodOptional<z.ZodString>;
297
- language: z.ZodOptional<z.ZodEnum<["fr", "en", "es", "it", "de"]>>;
298
- }, "strip", z.ZodTypeAny, {
299
- flowId: string;
300
- title?: string | undefined;
301
- description?: string | undefined;
302
- language?: "fr" | "en" | "es" | "it" | "de" | undefined;
303
- edges?: {
304
- id: string;
305
- source: string;
306
- target: string;
307
- label?: string | undefined;
308
- animated?: boolean | undefined;
309
- }[] | undefined;
310
- objectives?: any;
311
- gamification?: any;
312
- presentationEnabled?: boolean | undefined;
313
- presentationData?: any;
314
- chatbotEnabled?: boolean | undefined;
315
- facialVerificationEnabled?: boolean | undefined;
316
- deadline?: string | undefined;
317
- }, {
318
- flowId: string;
319
- title?: string | undefined;
320
- description?: string | undefined;
321
- language?: "fr" | "en" | "es" | "it" | "de" | undefined;
322
- edges?: {
323
- id: string;
324
- source: string;
325
- target: string;
326
- label?: string | undefined;
327
- animated?: boolean | undefined;
328
- }[] | undefined;
329
- objectives?: any;
330
- gamification?: any;
331
- presentationEnabled?: boolean | undefined;
332
- presentationData?: any;
333
- chatbotEnabled?: boolean | undefined;
334
- facialVerificationEnabled?: boolean | undefined;
335
- deadline?: string | undefined;
336
- }>;
337
- handler: ({ flowId, ...data }: any) => Promise<any>;
338
- };
339
- eduflow_delete: {
340
- description: string;
341
- inputSchema: z.ZodObject<{
342
- flowId: z.ZodString;
343
- }, "strip", z.ZodTypeAny, {
344
- flowId: string;
345
- }, {
346
- flowId: string;
347
- }>;
348
- handler: ({ flowId }: {
349
- flowId: string;
350
- }) => Promise<any>;
351
- };
352
- eduflow_duplicate: {
353
- description: string;
354
- inputSchema: z.ZodObject<{
355
- flowId: z.ZodString;
356
- }, "strip", z.ZodTypeAny, {
357
- flowId: string;
358
- }, {
359
- flowId: string;
360
- }>;
361
- handler: ({ flowId }: {
362
- flowId: string;
363
- }) => Promise<any>;
364
- };
365
- eduflow_change_status: {
366
- description: string;
367
- inputSchema: z.ZodObject<{
368
- flowId: z.ZodString;
369
- status: z.ZodEnum<["draft", "published", "archived"]>;
370
- }, "strip", z.ZodTypeAny, {
371
- status: "draft" | "published" | "archived";
372
- flowId: string;
373
- }, {
374
- status: "draft" | "published" | "archived";
375
- flowId: string;
376
- }>;
377
- handler: ({ flowId, status }: {
378
- flowId: string;
379
- status: string;
380
- }) => Promise<any>;
381
- };
382
- eduflow_export: {
383
- description: string;
384
- inputSchema: z.ZodObject<{
385
- flowId: z.ZodString;
386
- }, "strip", z.ZodTypeAny, {
387
- flowId: string;
388
- }, {
389
- flowId: string;
390
- }>;
391
- handler: ({ flowId }: {
392
- flowId: string;
393
- }) => Promise<any>;
394
- };
395
- eduflow_get_public: {
396
- description: string;
397
- inputSchema: z.ZodObject<{
398
- flowId: z.ZodString;
399
- }, "strip", z.ZodTypeAny, {
400
- flowId: string;
401
- }, {
402
- flowId: string;
403
- }>;
404
- handler: ({ flowId }: {
405
- flowId: string;
406
- }) => Promise<any>;
407
- };
408
- };
409
- //# sourceMappingURL=eduflow.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"eduflow.d.ts","sourceRoot":"","sources":["../../src/tools/eduflow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAI3C,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,WAAW;;;;;;;;;;;;;;;8BAejB;YAAE,MAAM,EAAE,MAAM,CAAA;SAAE;;;;;;;;;;;8BAUlB;YAAE,MAAM,EAAE,MAAM,CAAA;SAAE;;;;;;;;;;;;;;;;;;;;;;;wBAmBxB;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,WAAW,CAAC,EAAE,MAAM,CAAC;YAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;SAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uCAyC3C,GAAG;;;;;;;;;;;8BAUZ;YAAE,MAAM,EAAE,MAAM,CAAA;SAAE;;;;;;;;;;;8BAUlB;YAAE,MAAM,EAAE,MAAM,CAAA;SAAE;;;;;;;;;;;;;;sCAWV;YAAE,MAAM,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,MAAM,CAAA;SAAE;;;;;;;;;;;8BAU1C;YAAE,MAAM,EAAE,MAAM,CAAA;SAAE;;;;;;;;;;;8BAUlB;YAAE,MAAM,EAAE,MAAM,CAAA;SAAE;;EAKjD;AAGD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;8BAjIO;YAAE,MAAM,EAAE,MAAM,CAAA;SAAE;;;;;;;;;;;8BAUlB;YAAE,MAAM,EAAE,MAAM,CAAA;SAAE;;;;;;;;;;;;;;;;;;;;;;;wBAmBxB;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,WAAW,CAAC,EAAE,MAAM,CAAC;YAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;SAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uCAyC3C,GAAG;;;;;;;;;;;8BAUZ;YAAE,MAAM,EAAE,MAAM,CAAA;SAAE;;;;;;;;;;;8BAUlB;YAAE,MAAM,EAAE,MAAM,CAAA;SAAE;;;;;;;;;;;;;;sCAWV;YAAE,MAAM,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,MAAM,CAAA;SAAE;;;;;;;;;;;8BAU1C;YAAE,MAAM,EAAE,MAAM,CAAA;SAAE;;;;;;;;;;;8BAUlB;YAAE,MAAM,EAAE,MAAM,CAAA;SAAE;;CAQW,CAAC"}
@@ -1,139 +0,0 @@
1
- import { z } from 'zod';
2
- import { client as defaultClient } from '../client.js';
3
- import { config } from '../config.js';
4
- export function createEduflowTools(c) {
5
- return {
6
- eduflow_list: {
7
- description: 'Lister tous les parcours EduFlow de l\'utilisateur. Retourne id, titre, statut, nombre de blocs, dates.',
8
- inputSchema: z.object({}),
9
- handler: async () => {
10
- return c.get('/flows', 'eduflow');
11
- },
12
- },
13
- eduflow_get: {
14
- description: 'Récupérer les détails complets d\'un parcours EduFlow : blocs, connexions (edges), objectifs, paramètres de gamification, présentation, etc.',
15
- inputSchema: z.object({
16
- flowId: z.string().uuid().describe('ID du parcours EduFlow'),
17
- }),
18
- handler: async ({ flowId }) => {
19
- return c.get(`/flows/${flowId}`, 'eduflow');
20
- },
21
- },
22
- eduflow_get_urls: {
23
- description: 'Obtenir tous les liens utiles d\'un parcours EduFlow : prévisualisation, édition, page publique, analytics, lien participant. À utiliser quand l\'utilisateur demande un lien ou une URL.',
24
- inputSchema: z.object({
25
- flowId: z.string().uuid().describe('ID du parcours EduFlow'),
26
- }),
27
- handler: async ({ flowId }) => {
28
- const base = config.frontendUrl;
29
- return {
30
- preview: `${base}/eduflow/flows/${flowId}/play`,
31
- public: `${base}/eduflow/flows/${flowId}/public`,
32
- edit: `${base}/eduflow/edit/${flowId}`,
33
- presentation: `${base}/eduflow/edit/${flowId}/presentation`,
34
- analytics: `${base}/eduflow/flows/${flowId}/analytics`,
35
- };
36
- },
37
- },
38
- eduflow_create: {
39
- description: 'Créer un nouveau parcours EduFlow. Les blocs "start" et "end" sont automatiquement créés et connectés.',
40
- inputSchema: z.object({
41
- title: z.string().describe('Titre du parcours'),
42
- description: z.string().optional().describe('Description du parcours'),
43
- language: z.enum(['fr', 'en', 'es', 'it', 'de']).optional().describe('Langue du parcours (défaut: fr)'),
44
- }),
45
- handler: async (args) => {
46
- const result = await c.post('/flows', args, 'eduflow');
47
- const flowId = result?.flow?.id;
48
- if (flowId) {
49
- const startId = `start-1`;
50
- const endId = `end-1`;
51
- const blocks = [
52
- { id: startId, type: 'start', title: 'Début', content: {}, order: 0, positionX: 250, positionY: 50 },
53
- { id: endId, type: 'end', title: 'Fin', content: {}, order: 1, positionX: 250, positionY: 300 },
54
- ];
55
- const edges = [
56
- { id: `edge-${startId}-${endId}`, source: startId, target: endId },
57
- ];
58
- await c.put(`/flows/${flowId}/blocks`, { blocks, edges }, 'eduflow');
59
- }
60
- return result;
61
- },
62
- },
63
- eduflow_update: {
64
- description: 'Mettre à jour les propriétés d\'un parcours EduFlow (titre, description, edges, gamification, objectifs, présentation, etc.).',
65
- inputSchema: z.object({
66
- flowId: z.string().uuid().describe('ID du parcours'),
67
- title: z.string().optional().describe('Nouveau titre'),
68
- description: z.string().optional().describe('Nouvelle description'),
69
- edges: z.array(z.object({
70
- id: z.string(),
71
- source: z.string().describe('ID du bloc source'),
72
- target: z.string().describe('ID du bloc cible'),
73
- label: z.string().optional().describe('Label de la connexion'),
74
- animated: z.boolean().optional(),
75
- })).optional().describe('Connexions entre blocs (remplace toutes les connexions existantes)'),
76
- objectives: z.any().optional().describe('Objectifs pédagogiques {globalObjective, steps[]}'),
77
- gamification: z.any().optional().describe('Configuration gamification {badges, missions, leaderboard, certifications}'),
78
- presentationEnabled: z.boolean().optional().describe('Activer/désactiver la page de présentation'),
79
- presentationData: z.any().optional().describe('Données de la page de présentation'),
80
- chatbotEnabled: z.boolean().optional().describe('Activer/désactiver le chatbot IA'),
81
- facialVerificationEnabled: z.boolean().optional().describe('Activer/désactiver la vérification faciale'),
82
- deadline: z.string().optional().describe('Date limite ISO 8601'),
83
- language: z.enum(['fr', 'en', 'es', 'it', 'de']).optional().describe('Langue du parcours'),
84
- }),
85
- handler: async ({ flowId, ...data }) => {
86
- return c.put(`/flows/${flowId}`, data, 'eduflow');
87
- },
88
- },
89
- eduflow_delete: {
90
- description: 'Supprimer définitivement un parcours EduFlow et tous ses blocs, connexions, participants.',
91
- inputSchema: z.object({
92
- flowId: z.string().uuid().describe('ID du parcours à supprimer'),
93
- }),
94
- handler: async ({ flowId }) => {
95
- return c.delete(`/flows/${flowId}`, 'eduflow');
96
- },
97
- },
98
- eduflow_duplicate: {
99
- description: 'Dupliquer un parcours EduFlow existant avec tous ses blocs et connexions.',
100
- inputSchema: z.object({
101
- flowId: z.string().uuid().describe('ID du parcours à dupliquer'),
102
- }),
103
- handler: async ({ flowId }) => {
104
- return c.post(`/flows/${flowId}/duplicate`, {}, 'eduflow');
105
- },
106
- },
107
- eduflow_change_status: {
108
- description: 'Changer le statut d\'un parcours : draft (brouillon), published (publié, accessible aux étudiants), archived (archivé).',
109
- inputSchema: z.object({
110
- flowId: z.string().uuid().describe('ID du parcours'),
111
- status: z.enum(['draft', 'published', 'archived']).describe('Nouveau statut'),
112
- }),
113
- handler: async ({ flowId, status }) => {
114
- return c.patch(`/flows/${flowId}/status`, { status }, 'eduflow');
115
- },
116
- },
117
- eduflow_export: {
118
- description: 'Exporter un parcours EduFlow au format JSON (contient blocs, connexions, paramètres).',
119
- inputSchema: z.object({
120
- flowId: z.string().uuid().describe('ID du parcours à exporter'),
121
- }),
122
- handler: async ({ flowId }) => {
123
- return c.get(`/flows/${flowId}/export`, 'eduflow');
124
- },
125
- },
126
- eduflow_get_public: {
127
- description: 'Récupérer les informations publiques d\'un parcours (page de présentation, objectifs). Ne nécessite pas d\'authentification.',
128
- inputSchema: z.object({
129
- flowId: z.string().uuid().describe('ID du parcours'),
130
- }),
131
- handler: async ({ flowId }) => {
132
- return c.get(`/flows/${flowId}/public`, 'eduflow');
133
- },
134
- },
135
- };
136
- }
137
- // Backward compatibility for stdio mode
138
- export const eduflowTools = createEduflowTools(defaultClient);
139
- //# sourceMappingURL=eduflow.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"eduflow.js","sourceRoot":"","sources":["../../src/tools/eduflow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,MAAM,IAAI,aAAa,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,MAAM,UAAU,kBAAkB,CAAC,CAAc;IAC/C,OAAO;QACP,YAAY,EAAE;YACZ,WAAW,EAAE,yGAAyG;YACtH,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;YACzB,OAAO,EAAE,KAAK,IAAI,EAAE;gBAClB,OAAO,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;YACpC,CAAC;SACF;QAED,WAAW,EAAE;YACX,WAAW,EAAE,8IAA8I;YAC3J,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;gBACpB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,wBAAwB,CAAC;aAC7D,CAAC;YACF,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,EAAsB,EAAE,EAAE;gBAChD,OAAO,CAAC,CAAC,GAAG,CAAC,UAAU,MAAM,EAAE,EAAE,SAAS,CAAC,CAAC;YAC9C,CAAC;SACF;QAED,gBAAgB,EAAE;YAChB,WAAW,EAAE,2LAA2L;YACx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