@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,131 +0,0 @@
1
- import { z } from 'zod';
2
- import { LyrraClient } from '../client.js';
3
- export declare function createProjectsTools(c: LyrraClient): {
4
- project_list: {
5
- description: string;
6
- inputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
7
- handler: () => Promise<any>;
8
- };
9
- project_get: {
10
- description: string;
11
- inputSchema: z.ZodObject<{
12
- projectId: z.ZodString;
13
- }, "strip", z.ZodTypeAny, {
14
- projectId: string;
15
- }, {
16
- projectId: string;
17
- }>;
18
- handler: ({ projectId }: {
19
- projectId: string;
20
- }) => Promise<any>;
21
- };
22
- project_create: {
23
- description: string;
24
- inputSchema: z.ZodObject<{
25
- title: z.ZodString;
26
- description: z.ZodOptional<z.ZodString>;
27
- }, "strip", z.ZodTypeAny, {
28
- title: string;
29
- description?: string | undefined;
30
- }, {
31
- title: string;
32
- description?: string | undefined;
33
- }>;
34
- handler: (data: any) => Promise<any>;
35
- };
36
- project_update: {
37
- description: string;
38
- inputSchema: z.ZodObject<{
39
- projectId: z.ZodString;
40
- title: z.ZodOptional<z.ZodString>;
41
- description: z.ZodOptional<z.ZodString>;
42
- }, "strip", z.ZodTypeAny, {
43
- projectId: string;
44
- title?: string | undefined;
45
- description?: string | undefined;
46
- }, {
47
- projectId: string;
48
- title?: string | undefined;
49
- description?: string | undefined;
50
- }>;
51
- handler: ({ projectId, ...data }: any) => Promise<any>;
52
- };
53
- project_delete: {
54
- description: string;
55
- inputSchema: z.ZodObject<{
56
- projectId: z.ZodString;
57
- }, "strip", z.ZodTypeAny, {
58
- projectId: string;
59
- }, {
60
- projectId: string;
61
- }>;
62
- handler: ({ projectId }: {
63
- projectId: string;
64
- }) => Promise<any>;
65
- };
66
- };
67
- export declare const projectsTools: {
68
- project_list: {
69
- description: string;
70
- inputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
71
- handler: () => Promise<any>;
72
- };
73
- project_get: {
74
- description: string;
75
- inputSchema: z.ZodObject<{
76
- projectId: z.ZodString;
77
- }, "strip", z.ZodTypeAny, {
78
- projectId: string;
79
- }, {
80
- projectId: string;
81
- }>;
82
- handler: ({ projectId }: {
83
- projectId: string;
84
- }) => Promise<any>;
85
- };
86
- project_create: {
87
- description: string;
88
- inputSchema: z.ZodObject<{
89
- title: z.ZodString;
90
- description: z.ZodOptional<z.ZodString>;
91
- }, "strip", z.ZodTypeAny, {
92
- title: string;
93
- description?: string | undefined;
94
- }, {
95
- title: string;
96
- description?: string | undefined;
97
- }>;
98
- handler: (data: any) => Promise<any>;
99
- };
100
- project_update: {
101
- description: string;
102
- inputSchema: z.ZodObject<{
103
- projectId: z.ZodString;
104
- title: z.ZodOptional<z.ZodString>;
105
- description: z.ZodOptional<z.ZodString>;
106
- }, "strip", z.ZodTypeAny, {
107
- projectId: string;
108
- title?: string | undefined;
109
- description?: string | undefined;
110
- }, {
111
- projectId: string;
112
- title?: string | undefined;
113
- description?: string | undefined;
114
- }>;
115
- handler: ({ projectId, ...data }: any) => Promise<any>;
116
- };
117
- project_delete: {
118
- description: string;
119
- inputSchema: z.ZodObject<{
120
- projectId: z.ZodString;
121
- }, "strip", z.ZodTypeAny, {
122
- projectId: string;
123
- }, {
124
- projectId: string;
125
- }>;
126
- handler: ({ projectId }: {
127
- projectId: string;
128
- }) => Promise<any>;
129
- };
130
- };
131
- //# sourceMappingURL=projects.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../../src/tools/projects.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAG3C,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,WAAW;;;;;;;;;;;;;;;iCAef;YAAE,SAAS,EAAE,MAAM,CAAA;SAAE;;;;;;;;;;;;;;wBAW9B,GAAG;;;;;;;;;;;;;;;;;0CAYe,GAAG;;;;;;;;;;;iCAUZ;YAAE,SAAS,EAAE,MAAM,CAAA;SAAE;;EAKvD;AAGD,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;iCAzCS;YAAE,SAAS,EAAE,MAAM,CAAA;SAAE;;;;;;;;;;;;;;wBAW9B,GAAG;;;;;;;;;;;;;;;;;0CAYe,GAAG;;;;;;;;;;;iCAUZ;YAAE,SAAS,EAAE,MAAM,CAAA;SAAE;;CAQO,CAAC"}
@@ -1,55 +0,0 @@
1
- import { z } from 'zod';
2
- import { client as defaultClient } from '../client.js';
3
- export function createProjectsTools(c) {
4
- return {
5
- project_list: {
6
- description: 'Lister tous les projets audio de l\'utilisateur (PDF convertis en audio).',
7
- inputSchema: z.object({}),
8
- handler: async () => {
9
- return c.get('/projects');
10
- },
11
- },
12
- project_get: {
13
- description: 'Détails d\'un projet audio : titre, chapitres, voix, durée, statut, fichiers générés.',
14
- inputSchema: z.object({
15
- projectId: z.string().uuid().describe('ID du projet'),
16
- }),
17
- handler: async ({ projectId }) => {
18
- return c.get(`/projects/${projectId}`);
19
- },
20
- },
21
- project_create: {
22
- description: 'Créer un nouveau projet audio.',
23
- inputSchema: z.object({
24
- title: z.string().describe('Titre du projet'),
25
- description: z.string().optional().describe('Description'),
26
- }),
27
- handler: async (data) => {
28
- return c.post('/projects', data);
29
- },
30
- },
31
- project_update: {
32
- description: 'Mettre à jour un projet audio (titre, description, paramètres de voix).',
33
- inputSchema: z.object({
34
- projectId: z.string().uuid().describe('ID du projet'),
35
- title: z.string().optional().describe('Nouveau titre'),
36
- description: z.string().optional().describe('Nouvelle description'),
37
- }),
38
- handler: async ({ projectId, ...data }) => {
39
- return c.put(`/projects/${projectId}`, data);
40
- },
41
- },
42
- project_delete: {
43
- description: 'Supprimer un projet audio et tous ses fichiers associés.',
44
- inputSchema: z.object({
45
- projectId: z.string().uuid().describe('ID du projet à supprimer'),
46
- }),
47
- handler: async ({ projectId }) => {
48
- return c.delete(`/projects/${projectId}`);
49
- },
50
- },
51
- };
52
- }
53
- // Backward compatibility for stdio mode
54
- export const projectsTools = createProjectsTools(defaultClient);
55
- //# sourceMappingURL=projects.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"projects.js","sourceRoot":"","sources":["../../src/tools/projects.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,MAAM,IAAI,aAAa,EAAE,MAAM,cAAc,CAAC;AAEvD,MAAM,UAAU,mBAAmB,CAAC,CAAc;IAChD,OAAO;QACP,YAAY,EAAE;YACZ,WAAW,EAAE,2EAA2E;YACxF,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;YACzB,OAAO,EAAE,KAAK,IAAI,EAAE;gBAClB,OAAO,CAAC,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;YAC5B,CAAC;SACF;QAED,WAAW,EAAE;YACX,WAAW,EAAE,uFAAuF;YACpG,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;gBACpB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,cAAc,CAAC;aACtD,CAAC;YACF,OAAO,EAAE,KAAK,EAAE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,CAAC,0BAA0B,CAAC;aAClE,CAAC;YACF,OAAO,EAAE,KAAK,EAAE,EAAE,SAAS,EAAyB,EAAE,EAAE;gBACtD,OAAO,CAAC,CAAC,MAAM,CAAC,aAAa,SAAS,EAAE,CAAC,CAAC;YAC5C,CAAC;SACF;KACA,CAAC;AACJ,CAAC;AAED,wCAAwC;AACxC,MAAM,CAAC,MAAM,aAAa,GAAG,mBAAmB,CAAC,aAAa,CAAC,CAAC"}
@@ -1,93 +0,0 @@
1
- import { z } from 'zod';
2
- import { LyrraClient } from '../client.js';
3
- export declare function createResourcesTools(c: LyrraClient): {
4
- resource_list: {
5
- description: string;
6
- inputSchema: z.ZodObject<{
7
- type: z.ZodEnum<["images", "documents", "sounds", "videos"]>;
8
- }, "strip", z.ZodTypeAny, {
9
- type: "images" | "documents" | "sounds" | "videos";
10
- }, {
11
- type: "images" | "documents" | "sounds" | "videos";
12
- }>;
13
- handler: ({ type }: {
14
- type: string;
15
- }) => Promise<any>;
16
- };
17
- resource_delete: {
18
- description: string;
19
- inputSchema: z.ZodObject<{
20
- type: z.ZodEnum<["images", "documents", "sounds", "videos"]>;
21
- resourceId: z.ZodString;
22
- }, "strip", z.ZodTypeAny, {
23
- type: "images" | "documents" | "sounds" | "videos";
24
- resourceId: string;
25
- }, {
26
- type: "images" | "documents" | "sounds" | "videos";
27
- resourceId: string;
28
- }>;
29
- handler: ({ type, resourceId }: {
30
- type: string;
31
- resourceId: string;
32
- }) => Promise<any>;
33
- };
34
- resource_list_categories: {
35
- description: string;
36
- inputSchema: z.ZodObject<{
37
- type: z.ZodEnum<["images", "documents", "sounds", "videos"]>;
38
- }, "strip", z.ZodTypeAny, {
39
- type: "images" | "documents" | "sounds" | "videos";
40
- }, {
41
- type: "images" | "documents" | "sounds" | "videos";
42
- }>;
43
- handler: ({ type }: {
44
- type: string;
45
- }) => Promise<any>;
46
- };
47
- };
48
- export declare const resourcesTools: {
49
- resource_list: {
50
- description: string;
51
- inputSchema: z.ZodObject<{
52
- type: z.ZodEnum<["images", "documents", "sounds", "videos"]>;
53
- }, "strip", z.ZodTypeAny, {
54
- type: "images" | "documents" | "sounds" | "videos";
55
- }, {
56
- type: "images" | "documents" | "sounds" | "videos";
57
- }>;
58
- handler: ({ type }: {
59
- type: string;
60
- }) => Promise<any>;
61
- };
62
- resource_delete: {
63
- description: string;
64
- inputSchema: z.ZodObject<{
65
- type: z.ZodEnum<["images", "documents", "sounds", "videos"]>;
66
- resourceId: z.ZodString;
67
- }, "strip", z.ZodTypeAny, {
68
- type: "images" | "documents" | "sounds" | "videos";
69
- resourceId: string;
70
- }, {
71
- type: "images" | "documents" | "sounds" | "videos";
72
- resourceId: string;
73
- }>;
74
- handler: ({ type, resourceId }: {
75
- type: string;
76
- resourceId: string;
77
- }) => Promise<any>;
78
- };
79
- resource_list_categories: {
80
- description: string;
81
- inputSchema: z.ZodObject<{
82
- type: z.ZodEnum<["images", "documents", "sounds", "videos"]>;
83
- }, "strip", z.ZodTypeAny, {
84
- type: "images" | "documents" | "sounds" | "videos";
85
- }, {
86
- type: "images" | "documents" | "sounds" | "videos";
87
- }>;
88
- handler: ({ type }: {
89
- type: string;
90
- }) => Promise<any>;
91
- };
92
- };
93
- //# sourceMappingURL=resources.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["../../src/tools/resources.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAG3C,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,WAAW;;;;;;;;;;4BAOrB;YAAE,IAAI,EAAE,MAAM,CAAA;SAAE;;;;;;;;;;;;;;wCAWJ;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,UAAU,EAAE,MAAM,CAAA;SAAE;;;;;;;;;;;4BAUhD;YAAE,IAAI,EAAE,MAAM,CAAA;SAAE;;EAK7C;AAGD,eAAO,MAAM,cAAc;;;;;;;;;;4BA7BG;YAAE,IAAI,EAAE,MAAM,CAAA;SAAE;;;;;;;;;;;;;;wCAWJ;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,UAAU,EAAE,MAAM,CAAA;SAAE;;;;;;;;;;;4BAUhD;YAAE,IAAI,EAAE,MAAM,CAAA;SAAE;;CAQmB,CAAC"}
@@ -1,37 +0,0 @@
1
- import { z } from 'zod';
2
- import { client as defaultClient } from '../client.js';
3
- export function createResourcesTools(c) {
4
- return {
5
- resource_list: {
6
- description: 'Lister les ressources de l\'utilisateur (images, documents, sons, vidéos) avec pagination.',
7
- inputSchema: z.object({
8
- type: z.enum(['images', 'documents', 'sounds', 'videos']).describe('Type de ressource'),
9
- }),
10
- handler: async ({ type }) => {
11
- return c.get(`/user-resources/${type}`);
12
- },
13
- },
14
- resource_delete: {
15
- description: 'Supprimer une ressource uploadée.',
16
- inputSchema: z.object({
17
- type: z.enum(['images', 'documents', 'sounds', 'videos']).describe('Type de ressource'),
18
- resourceId: z.string().uuid().describe('ID de la ressource'),
19
- }),
20
- handler: async ({ type, resourceId }) => {
21
- return c.delete(`/user-resources/${type}/${resourceId}`);
22
- },
23
- },
24
- resource_list_categories: {
25
- description: 'Lister les catégories disponibles pour un type de ressource.',
26
- inputSchema: z.object({
27
- type: z.enum(['images', 'documents', 'sounds', 'videos']).describe('Type de ressource'),
28
- }),
29
- handler: async ({ type }) => {
30
- return c.get(`/categories/${type}`);
31
- },
32
- },
33
- };
34
- }
35
- // Backward compatibility for stdio mode
36
- export const resourcesTools = createResourcesTools(defaultClient);
37
- //# sourceMappingURL=resources.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resources.js","sourceRoot":"","sources":["../../src/tools/resources.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,MAAM,IAAI,aAAa,EAAE,MAAM,cAAc,CAAC;AAEvD,MAAM,UAAU,oBAAoB,CAA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AC,CAAC,GAAG,CAAC,eAAe,IAAI,EAAE,CAAC,CAAC;YACtC,CAAC;SACF;KACA,CAAC;AACJ,CAAC;AAED,wCAAwC;AACxC,MAAM,CAAC,MAAM,cAAc,GAAG,oBAAoB,CAAC,aAAa,CAAC,CAAC"}
@@ -1,125 +0,0 @@
1
- import { z } from 'zod';
2
- import { LyrraClient } from '../client.js';
3
- export declare function createStoreTools(c: LyrraClient): {
4
- store_list_audiobooks: {
5
- description: string;
6
- inputSchema: z.ZodObject<{
7
- page: z.ZodOptional<z.ZodNumber>;
8
- limit: z.ZodOptional<z.ZodNumber>;
9
- search: z.ZodOptional<z.ZodString>;
10
- category: z.ZodOptional<z.ZodString>;
11
- featured: z.ZodOptional<z.ZodBoolean>;
12
- }, "strip", z.ZodTypeAny, {
13
- page?: number | undefined;
14
- limit?: number | undefined;
15
- search?: string | undefined;
16
- category?: string | undefined;
17
- featured?: boolean | undefined;
18
- }, {
19
- page?: number | undefined;
20
- limit?: number | undefined;
21
- search?: string | undefined;
22
- category?: string | undefined;
23
- featured?: boolean | undefined;
24
- }>;
25
- handler: ({ page, limit, search, category, featured }: any) => Promise<any>;
26
- };
27
- store_get_audiobook: {
28
- description: string;
29
- inputSchema: z.ZodObject<{
30
- audiobookId: z.ZodString;
31
- }, "strip", z.ZodTypeAny, {
32
- audiobookId: string;
33
- }, {
34
- audiobookId: string;
35
- }>;
36
- handler: ({ audiobookId }: {
37
- audiobookId: string;
38
- }) => Promise<any>;
39
- };
40
- store_list_authors: {
41
- description: string;
42
- inputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
43
- handler: () => Promise<any>;
44
- };
45
- store_my_library: {
46
- description: string;
47
- inputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
48
- handler: () => Promise<any>;
49
- };
50
- store_search: {
51
- description: string;
52
- inputSchema: z.ZodObject<{
53
- query: z.ZodString;
54
- }, "strip", z.ZodTypeAny, {
55
- query: string;
56
- }, {
57
- query: string;
58
- }>;
59
- handler: ({ query }: {
60
- query: string;
61
- }) => Promise<any>;
62
- };
63
- };
64
- export declare const storeTools: {
65
- store_list_audiobooks: {
66
- description: string;
67
- inputSchema: z.ZodObject<{
68
- page: z.ZodOptional<z.ZodNumber>;
69
- limit: z.ZodOptional<z.ZodNumber>;
70
- search: z.ZodOptional<z.ZodString>;
71
- category: z.ZodOptional<z.ZodString>;
72
- featured: z.ZodOptional<z.ZodBoolean>;
73
- }, "strip", z.ZodTypeAny, {
74
- page?: number | undefined;
75
- limit?: number | undefined;
76
- search?: string | undefined;
77
- category?: string | undefined;
78
- featured?: boolean | undefined;
79
- }, {
80
- page?: number | undefined;
81
- limit?: number | undefined;
82
- search?: string | undefined;
83
- category?: string | undefined;
84
- featured?: boolean | undefined;
85
- }>;
86
- handler: ({ page, limit, search, category, featured }: any) => Promise<any>;
87
- };
88
- store_get_audiobook: {
89
- description: string;
90
- inputSchema: z.ZodObject<{
91
- audiobookId: z.ZodString;
92
- }, "strip", z.ZodTypeAny, {
93
- audiobookId: string;
94
- }, {
95
- audiobookId: string;
96
- }>;
97
- handler: ({ audiobookId }: {
98
- audiobookId: string;
99
- }) => Promise<any>;
100
- };
101
- store_list_authors: {
102
- description: string;
103
- inputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
104
- handler: () => Promise<any>;
105
- };
106
- store_my_library: {
107
- description: string;
108
- inputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
109
- handler: () => Promise<any>;
110
- };
111
- store_search: {
112
- description: string;
113
- inputSchema: z.ZodObject<{
114
- query: z.ZodString;
115
- }, "strip", z.ZodTypeAny, {
116
- query: string;
117
- }, {
118
- query: string;
119
- }>;
120
- handler: ({ query }: {
121
- query: string;
122
- }) => Promise<any>;
123
- };
124
- };
125
- //# sourceMappingURL=store.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/tools/store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAG3C,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,WAAW;;;;;;;;;;;;;;;;;;;;;;+DAWkB,GAAG;;;;;;;;;;;mCAiB/B;YAAE,WAAW,EAAE,MAAM,CAAA;SAAE;;;;;;;;;;;;;;;;;;;;;6BA0B7B;YAAE,KAAK,EAAE,MAAM,CAAA;SAAE;;EAK/C;AAGD,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;+DAnD0C,GAAG;;;;;;;;;;;mCAiB/B;YAAE,WAAW,EAAE,MAAM,CAAA;SAAE;;;;;;;;;;;;;;;;;;;;;6BA0B7B;YAAE,KAAK,EAAE,MAAM,CAAA;SAAE;;CAQS,CAAC"}
@@ -1,66 +0,0 @@
1
- import { z } from 'zod';
2
- import { client as defaultClient } from '../client.js';
3
- export function createStoreTools(c) {
4
- return {
5
- store_list_audiobooks: {
6
- description: 'Lister les audiobooks disponibles dans le store LYRRA. Supporte la pagination, recherche et filtres.',
7
- inputSchema: z.object({
8
- page: z.number().optional().describe('Page (défaut: 1)'),
9
- limit: z.number().optional().describe('Nombre par page (défaut: 20)'),
10
- search: z.string().optional().describe('Recherche par titre/auteur'),
11
- category: z.string().optional().describe('Filtrer par catégorie'),
12
- featured: z.boolean().optional().describe('Uniquement les audiobooks mis en avant'),
13
- }),
14
- handler: async ({ page, limit, search, category, featured }) => {
15
- const params = new URLSearchParams();
16
- if (page)
17
- params.set('page', String(page));
18
- if (limit)
19
- params.set('limit', String(limit));
20
- if (search)
21
- params.set('search', search);
22
- if (category)
23
- params.set('category', category);
24
- if (featured)
25
- params.set('featured', 'true');
26
- const query = params.toString() ? `?${params}` : '';
27
- return c.post(`/store/public/audiobooks${query}`, {});
28
- },
29
- },
30
- store_get_audiobook: {
31
- description: 'Détails complets d\'un audiobook : chapitres, auteur, avis, prix en crédits, statistiques.',
32
- inputSchema: z.object({
33
- audiobookId: z.string().describe('ID de l\'audiobook'),
34
- }),
35
- handler: async ({ audiobookId }) => {
36
- return c.get(`/store/public/audiobooks/${audiobookId}`);
37
- },
38
- },
39
- store_list_authors: {
40
- description: 'Lister les auteurs mis en avant sur le store.',
41
- inputSchema: z.object({}),
42
- handler: async () => {
43
- return c.get('/store/public/authors/featured');
44
- },
45
- },
46
- store_my_library: {
47
- description: 'Récupérer ma bibliothèque d\'audiobooks achetés.',
48
- inputSchema: z.object({}),
49
- handler: async () => {
50
- return c.get('/store/my-library');
51
- },
52
- },
53
- store_search: {
54
- description: 'Rechercher des audiobooks dans le store par mot-clé.',
55
- inputSchema: z.object({
56
- query: z.string().describe('Terme de recherche'),
57
- }),
58
- handler: async ({ query }) => {
59
- return c.post('/store/public/audiobooks', { search: query });
60
- },
61
- },
62
- };
63
- }
64
- // Backward compatibility for stdio mode
65
- export const storeTools = createStoreTools(defaultClient);
66
- //# sourceMappingURL=store.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"store.js","sourceRoot":"","sources":["../../src/tools/store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,MAAM,IAAI,aAAa,EAAE,MAAM,cAAc,CAAC;AAEvD,MAAM,UAAU,gBAAgB,CAAC,CAAc;IAC7C,OAAO;QACP,qBAAqB,EAAE;YACrB,WAAW,EAAE,sGAAsG;YACnH,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;gBACpB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,kBAAkB,CAAC;gBACxD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,8BAA8B,CAAC;gBACrE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,4BAA4B,CAAC;g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rastudio.com/api",
10
- "LYRRA_EDUFLOW_API_URL": "https://lyrrastudio.com/api/eduflow"
11
- }
12
- }
13
- }
14
- }
package/src/client.ts DELETED
@@ -1,106 +0,0 @@
1
- import { config } from './config.js';
2
-
3
- export interface LyrraClientOptions {
4
- apiUrl?: string;
5
- eduflowUrl?: string;
6
- clientId?: string;
7
- clientSecret?: string;
8
- }
9
-
10
- export class LyrraClient {
11
- private apiUrl: string;
12
- private eduflowUrl: string;
13
- private clientId: string;
14
- private clientSecret: string;
15
- private jwtToken: string | null = null;
16
-
17
- constructor(options?: LyrraClientOptions) {
18
- this.apiUrl = options?.apiUrl || config.apiUrl;
19
- this.eduflowUrl = options?.eduflowUrl || config.eduflowApiUrl;
20
- this.clientId = options?.clientId || config.clientId;
21
- this.clientSecret = options?.clientSecret || config.clientSecret;
22
- }
23
-
24
- private get headers(): Record<string, string> {
25
- const h: Record<string, string> = { 'Content-Type': 'application/json' };
26
- // Client Secret is the API key used for X-API-Key header authentication
27
- if (this.clientSecret) h['X-API-Key'] = this.clientSecret;
28
- if (this.jwtToken) h['Authorization'] = `Bearer ${this.jwtToken}`;
29
- return h;
30
- }
31
-
32
- setToken(token: string) {
33
- this.jwtToken = token;
34
- }
35
-
36
- async get(path: string, base: 'api' | 'eduflow' = 'api'): Promise<any> {
37
- const url = `${base === 'eduflow' ? this.eduflowUrl : this.apiUrl}${path}`;
38
- const res = await fetch(url, { headers: this.headers });
39
- if (!res.ok) {
40
- const body = await res.text();
41
- throw new Error(`GET ${path} failed (${res.status}): ${body}`);
42
- }
43
- return res.json();
44
- }
45
-
46
- async post(path: string, data?: any, base: 'api' | 'eduflow' = 'api'): Promise<any> {
47
- const url = `${base === 'eduflow' ? this.eduflowUrl : this.apiUrl}${path}`;
48
- const res = await fetch(url, {
49
- method: 'POST',
50
- headers: this.headers,
51
- body: data ? JSON.stringify(data) : undefined,
52
- });
53
- if (!res.ok) {
54
- const body = await res.text();
55
- throw new Error(`POST ${path} failed (${res.status}): ${body}`);
56
- }
57
- const text = await res.text();
58
- return text ? JSON.parse(text) : {};
59
- }
60
-
61
- async put(path: string, data?: any, base: 'api' | 'eduflow' = 'api'): Promise<any> {
62
- const url = `${base === 'eduflow' ? this.eduflowUrl : this.apiUrl}${path}`;
63
- const res = await fetch(url, {
64
- method: 'PUT',
65
- headers: this.headers,
66
- body: data ? JSON.stringify(data) : undefined,
67
- });
68
- if (!res.ok) {
69
- const body = await res.text();
70
- throw new Error(`PUT ${path} failed (${res.status}): ${body}`);
71
- }
72
- const text = await res.text();
73
- return text ? JSON.parse(text) : {};
74
- }
75
-
76
- async patch(path: string, data?: any, base: 'api' | 'eduflow' = 'api'): Promise<any> {
77
- const url = `${base === 'eduflow' ? this.eduflowUrl : this.apiUrl}${path}`;
78
- const res = await fetch(url, {
79
- method: 'PATCH',
80
- headers: this.headers,
81
- body: data ? JSON.stringify(data) : undefined,
82
- });
83
- if (!res.ok) {
84
- const body = await res.text();
85
- throw new Error(`PATCH ${path} failed (${res.status}): ${body}`);
86
- }
87
- const text = await res.text();
88
- return text ? JSON.parse(text) : {};
89
- }
90
-
91
- async delete(path: string, base: 'api' | 'eduflow' = 'api'): Promise<any> {
92
- const url = `${base === 'eduflow' ? this.eduflowUrl : this.apiUrl}${path}`;
93
- const res = await fetch(url, {
94
- method: 'DELETE',
95
- headers: this.headers,
96
- });
97
- if (!res.ok) {
98
- const body = await res.text();
99
- throw new Error(`DELETE ${path} failed (${res.status}): ${body}`);
100
- }
101
- const text = await res.text();
102
- return text ? JSON.parse(text) : {};
103
- }
104
- }
105
-
106
- export const client = new LyrraClient();
package/src/config.ts DELETED
@@ -1,7 +0,0 @@
1
- export const config = {
2
- apiUrl: process.env.LYRRA_API_URL || 'http://localhost:3001/api',
3
- clientId: process.env.LYRRA_CLIENT_ID || '',
4
- clientSecret: process.env.LYRRA_CLIENT_SECRET || '',
5
- eduflowApiUrl: process.env.LYRRA_EDUFLOW_API_URL || 'http://localhost:3001/eduflow',
6
- frontendUrl: process.env.LYRRA_FRONTEND_URL || (process.env.LYRRA_API_URL ? process.env.LYRRA_API_URL.replace(/\/api$/, '') : 'http://localhost:5173'),
7
- };