@headless-lms/server 0.3.0 → 0.5.0
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 +14 -0
- package/dist/app/community-mail.d.ts +10 -10
- package/dist/app/community-mail.js +72 -28
- package/dist/app/community-mail.js.map +1 -1
- package/dist/app/container.d.ts +48 -10
- package/dist/app/container.js +268 -48
- package/dist/app/container.js.map +1 -1
- package/dist/app/notification-channels.d.ts +47 -0
- package/dist/app/notification-channels.js +175 -0
- package/dist/app/notification-channels.js.map +1 -0
- package/dist/app/notification-reads.d.ts +23 -0
- package/dist/app/notification-reads.js +74 -0
- package/dist/app/notification-reads.js.map +1 -0
- package/dist/app/platform.d.ts +14 -0
- package/dist/app/platform.js +14 -0
- package/dist/app/platform.js.map +1 -0
- package/dist/http/config.d.ts +4 -0
- package/dist/http/errors.d.ts +1 -0
- package/dist/http/errors.js +24 -4
- package/dist/http/errors.js.map +1 -1
- package/dist/http/fastify.d.ts +8 -0
- package/dist/http/mcp/catalogue.d.ts +11 -9
- package/dist/http/mcp/catalogue.js +15 -21
- package/dist/http/mcp/catalogue.js.map +1 -1
- package/dist/http/mcp/challenge.js +3 -3
- package/dist/http/mcp/challenge.js.map +1 -1
- package/dist/http/mcp/route.js +7 -7
- package/dist/http/mcp/route.js.map +1 -1
- package/dist/http/mcp/test-support.d.ts +6 -5
- package/dist/http/mcp/test-support.js +32 -11
- package/dist/http/mcp/test-support.js.map +1 -1
- package/dist/http/mcp/tool.d.ts +3 -9
- package/dist/http/mcp/tool.js +14 -6
- package/dist/http/mcp/tool.js.map +1 -1
- package/dist/http/mcp/tools/automations.js +10 -20
- package/dist/http/mcp/tools/automations.js.map +1 -1
- package/dist/http/mcp/tools/catalog.js +25 -42
- package/dist/http/mcp/tools/catalog.js.map +1 -1
- package/dist/http/mcp/tools/comments.js +9 -19
- package/dist/http/mcp/tools/comments.js.map +1 -1
- package/dist/http/mcp/tools/communities.js +16 -31
- package/dist/http/mcp/tools/communities.js.map +1 -1
- package/dist/http/mcp/tools/community-members.js +9 -16
- package/dist/http/mcp/tools/community-members.js.map +1 -1
- package/dist/http/mcp/tools/community-moderation.js +13 -25
- package/dist/http/mcp/tools/community-moderation.js.map +1 -1
- package/dist/http/mcp/tools/courses.js +11 -21
- package/dist/http/mcp/tools/courses.js.map +1 -1
- package/dist/http/mcp/tools/events.d.ts +6 -0
- package/dist/http/mcp/tools/events.js +170 -0
- package/dist/http/mcp/tools/events.js.map +1 -0
- package/dist/http/mcp/tools/index.d.ts +5 -1
- package/dist/http/mcp/tools/index.js +45 -10
- package/dist/http/mcp/tools/index.js.map +1 -1
- package/dist/http/mcp/tools/organization.d.ts +6 -0
- package/dist/http/mcp/tools/organization.js +214 -0
- package/dist/http/mcp/tools/organization.js.map +1 -0
- package/dist/http/mcp/tools/people.js +30 -49
- package/dist/http/mcp/tools/people.js.map +1 -1
- package/dist/http/plugins/auth.js +37 -8
- package/dist/http/plugins/auth.js.map +1 -1
- package/dist/http/plugins/error-handler.d.ts +5 -1
- package/dist/http/plugins/error-handler.js +13 -3
- package/dist/http/plugins/error-handler.js.map +1 -1
- package/dist/http/plugins/openapi.js +18 -2
- package/dist/http/plugins/openapi.js.map +1 -1
- package/dist/http/plugins/platform.d.ts +7 -0
- package/dist/http/plugins/platform.js +13 -0
- package/dist/http/plugins/platform.js.map +1 -0
- package/dist/http/routes/access.js +54 -36
- package/dist/http/routes/access.js.map +1 -1
- package/dist/http/routes/activities.js +45 -45
- package/dist/http/routes/activities.js.map +1 -1
- package/dist/http/routes/assets.js +30 -65
- package/dist/http/routes/assets.js.map +1 -1
- package/dist/http/routes/automations.js +37 -42
- package/dist/http/routes/automations.js.map +1 -1
- package/dist/http/routes/bundles.js +33 -36
- package/dist/http/routes/bundles.js.map +1 -1
- package/dist/http/routes/communities.js +144 -136
- package/dist/http/routes/communities.js.map +1 -1
- package/dist/http/routes/community-moderation.js +83 -137
- package/dist/http/routes/community-moderation.js.map +1 -1
- package/dist/http/routes/course-analytics.js +32 -15
- package/dist/http/routes/course-analytics.js.map +1 -1
- package/dist/http/routes/courses.js +25 -32
- package/dist/http/routes/courses.js.map +1 -1
- package/dist/http/routes/dashboard.js +9 -9
- package/dist/http/routes/dashboard.js.map +1 -1
- package/dist/http/routes/discussion.js +21 -39
- package/dist/http/routes/discussion.js.map +1 -1
- package/dist/http/routes/downloads.js +41 -47
- package/dist/http/routes/downloads.js.map +1 -1
- package/dist/http/routes/entitlements.js +19 -23
- package/dist/http/routes/entitlements.js.map +1 -1
- package/dist/http/routes/events.d.ts +7 -0
- package/dist/http/routes/events.js +333 -0
- package/dist/http/routes/events.js.map +1 -0
- package/dist/http/routes/integrations.js +40 -73
- package/dist/http/routes/integrations.js.map +1 -1
- package/dist/http/routes/member/assets.js +10 -13
- package/dist/http/routes/member/assets.js.map +1 -1
- package/dist/http/routes/member/chats.js +177 -75
- package/dist/http/routes/member/chats.js.map +1 -1
- package/dist/http/routes/member/comments.js +65 -26
- package/dist/http/routes/member/comments.js.map +1 -1
- package/dist/http/routes/member/community.js +68 -51
- package/dist/http/routes/member/community.js.map +1 -1
- package/dist/http/routes/member/courses.js +12 -19
- package/dist/http/routes/member/courses.js.map +1 -1
- package/dist/http/routes/member/devices.d.ts +7 -0
- package/dist/http/routes/member/devices.js +97 -0
- package/dist/http/routes/member/devices.js.map +1 -0
- package/dist/http/routes/member/downloads.js +6 -9
- package/dist/http/routes/member/downloads.js.map +1 -1
- package/dist/http/routes/member/events.d.ts +7 -0
- package/dist/http/routes/member/events.js +386 -0
- package/dist/http/routes/member/events.js.map +1 -0
- package/dist/http/routes/member/files.js +71 -46
- package/dist/http/routes/member/files.js.map +1 -1
- package/dist/http/routes/member/index.js +6 -0
- package/dist/http/routes/member/index.js.map +1 -1
- package/dist/http/routes/member/notification-settings.d.ts +7 -0
- package/dist/http/routes/member/notification-settings.js +100 -0
- package/dist/http/routes/member/notification-settings.js.map +1 -0
- package/dist/http/routes/member/notifications.js +69 -45
- package/dist/http/routes/member/notifications.js.map +1 -1
- package/dist/http/routes/member/org.js +5 -15
- package/dist/http/routes/member/org.js.map +1 -1
- package/dist/http/routes/member/posts.js +94 -95
- package/dist/http/routes/member/posts.js.map +1 -1
- package/dist/http/routes/member/profile.js +15 -6
- package/dist/http/routes/member/profile.js.map +1 -1
- package/dist/http/routes/member/progress.js +7 -11
- package/dist/http/routes/member/progress.js.map +1 -1
- package/dist/http/routes/organizations.js +415 -110
- package/dist/http/routes/organizations.js.map +1 -1
- package/dist/http/routes/platform.d.ts +7 -0
- package/dist/http/routes/platform.js +61 -0
- package/dist/http/routes/platform.js.map +1 -0
- package/dist/http/routes/students.js +12 -75
- package/dist/http/routes/students.js.map +1 -1
- package/dist/http/routes/webhooks.js +30 -39
- package/dist/http/routes/webhooks.js.map +1 -1
- package/dist/http/routes.js +9 -0
- package/dist/http/routes.js.map +1 -1
- package/dist/http/schemas/access.d.ts +346 -64
- package/dist/http/schemas/access.js +39 -12
- package/dist/http/schemas/access.js.map +1 -1
- package/dist/http/schemas/assets.d.ts +13 -8
- package/dist/http/schemas/assets.js +6 -5
- package/dist/http/schemas/assets.js.map +1 -1
- package/dist/http/schemas/automations.d.ts +4 -8
- package/dist/http/schemas/chats.d.ts +238 -36
- package/dist/http/schemas/chats.js +14 -7
- package/dist/http/schemas/chats.js.map +1 -1
- package/dist/http/schemas/community.d.ts +140 -33
- package/dist/http/schemas/community.js +25 -9
- package/dist/http/schemas/community.js.map +1 -1
- package/dist/http/schemas/course-analytics.d.ts +51 -1
- package/dist/http/schemas/course-analytics.js +19 -1
- package/dist/http/schemas/course-analytics.js.map +1 -1
- package/dist/http/schemas/dashboard.d.ts +1 -0
- package/dist/http/schemas/dashboard.js +2 -1
- package/dist/http/schemas/dashboard.js.map +1 -1
- package/dist/http/schemas/discussion.d.ts +45 -73
- package/dist/http/schemas/discussion.js +16 -4
- package/dist/http/schemas/discussion.js.map +1 -1
- package/dist/http/schemas/entitlements.d.ts +9 -12
- package/dist/http/schemas/entitlements.js +11 -5
- package/dist/http/schemas/entitlements.js.map +1 -1
- package/dist/http/schemas/events.d.ts +527 -0
- package/dist/http/schemas/events.js +64 -0
- package/dist/http/schemas/events.js.map +1 -0
- package/dist/http/schemas/files.d.ts +15 -5
- package/dist/http/schemas/files.js +10 -2
- package/dist/http/schemas/files.js.map +1 -1
- package/dist/http/schemas/index.d.ts +14 -12
- package/dist/http/schemas/index.js +14 -12
- package/dist/http/schemas/invites.d.ts +3 -47
- package/dist/http/schemas/invites.js +4 -25
- package/dist/http/schemas/invites.js.map +1 -1
- package/dist/http/schemas/member.d.ts +94 -7
- package/dist/http/schemas/member.js +7 -3
- package/dist/http/schemas/member.js.map +1 -1
- package/dist/http/schemas/members.d.ts +329 -65
- package/dist/http/schemas/members.js +67 -25
- package/dist/http/schemas/members.js.map +1 -1
- package/dist/http/schemas/notifications.d.ts +502 -175
- package/dist/http/schemas/notifications.js +148 -28
- package/dist/http/schemas/notifications.js.map +1 -1
- package/dist/http/schemas/platform.d.ts +37 -0
- package/dist/http/schemas/platform.js +19 -0
- package/dist/http/schemas/platform.js.map +1 -0
- package/dist/http/schemas/posts.d.ts +92 -38
- package/dist/http/schemas/posts.js +4 -4
- package/dist/http/schemas/posts.js.map +1 -1
- package/dist/http/schemas/profile.d.ts +1 -1
- package/dist/http/schemas/shared.d.ts +10 -13
- package/dist/http/schemas/shared.js +3 -11
- package/dist/http/schemas/shared.js.map +1 -1
- package/dist/http/schemas/students.d.ts +22 -0
- package/dist/http/schemas/students.js +3 -1
- package/dist/http/schemas/students.js.map +1 -1
- package/dist/http/scope.d.ts +9 -12
- package/dist/http/scope.js +30 -35
- package/dist/http/scope.js.map +1 -1
- package/dist/http/server.js +9 -0
- package/dist/http/server.js.map +1 -1
- package/dist/http/shutdown.d.ts +11 -0
- package/dist/http/shutdown.js +40 -0
- package/dist/http/shutdown.js.map +1 -0
- package/dist/http/sse.d.ts +19 -0
- package/dist/http/sse.js +104 -0
- package/dist/http/sse.js.map +1 -0
- package/dist/http/test-caller.d.ts +13 -0
- package/dist/http/test-caller.js +14 -0
- package/dist/http/test-caller.js.map +1 -0
- package/dist/http/well-known.js +2 -2
- package/dist/http/well-known.js.map +1 -1
- package/dist/index.d.ts +5 -2
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/packages/server/package.js +1 -1
- package/package.json +7 -6
- package/dist/http/routes/member/actor.d.ts +0 -14
- package/dist/http/routes/member/actor.js +0 -11
- package/dist/http/routes/member/actor.js.map +0 -1
|
@@ -1,118 +1,108 @@
|
|
|
1
1
|
import { CoursesQuery, CreateCourse, PatchCourseSettings, UpdateCourse } from "../../schemas/content.js";
|
|
2
2
|
import { CourseIdPathParam, CreateModule, ModulePathParam, ReorderInput, UpdateModule } from "../../schemas/activities.js";
|
|
3
3
|
import "../../schemas/index.js";
|
|
4
|
-
import {
|
|
4
|
+
import { defineTool } from "../tool.js";
|
|
5
5
|
//#region src/http/mcp/tools/courses.ts
|
|
6
6
|
const courseTools = [
|
|
7
7
|
defineTool({
|
|
8
8
|
name: "list_courses",
|
|
9
9
|
title: "List courses",
|
|
10
10
|
description: "Search and page through the courses, each with its status and settings. Filter by status or category.",
|
|
11
|
-
scope: "courses:read",
|
|
12
11
|
kind: "read",
|
|
13
12
|
idempotent: true,
|
|
14
13
|
openWorld: false,
|
|
15
14
|
input: CoursesQuery,
|
|
16
|
-
call: (input, { container,
|
|
15
|
+
call: (input, { container, caller }) => container.content.listCourses(input, caller.actor)
|
|
17
16
|
}),
|
|
18
17
|
defineTool({
|
|
19
18
|
name: "list_modules",
|
|
20
19
|
title: "List modules",
|
|
21
20
|
description: "The modules of a course, in order.",
|
|
22
|
-
scope: "courses:read",
|
|
23
21
|
kind: "read",
|
|
24
22
|
idempotent: true,
|
|
25
23
|
openWorld: false,
|
|
26
24
|
input: CourseIdPathParam,
|
|
27
|
-
call: ({ courseId }, { container,
|
|
25
|
+
call: ({ courseId }, { container, caller }) => container.content.listCourseModules(courseId, caller.actor)
|
|
28
26
|
}),
|
|
29
27
|
defineTool({
|
|
30
28
|
name: "create_course",
|
|
31
29
|
title: "Create course",
|
|
32
30
|
description: "Create a draft course. Publish it with update_course.",
|
|
33
|
-
scope: "courses:write",
|
|
34
31
|
kind: "write",
|
|
35
32
|
idempotent: false,
|
|
36
33
|
openWorld: false,
|
|
37
34
|
input: CreateCourse,
|
|
38
|
-
call: (input, { container,
|
|
35
|
+
call: (input, { container, caller }) => container.content.createCourse(input, caller.actor)
|
|
39
36
|
}),
|
|
40
37
|
defineTool({
|
|
41
38
|
name: "update_course",
|
|
42
39
|
title: "Update course",
|
|
43
40
|
description: "Change a course title, description, category or cover image, or publish and unpublish it with status. Fields left out stay as they are.",
|
|
44
|
-
scope: "courses:write",
|
|
45
41
|
kind: "write",
|
|
46
42
|
idempotent: true,
|
|
47
43
|
openWorld: false,
|
|
48
44
|
input: UpdateCourse.extend(CourseIdPathParam.shape),
|
|
49
|
-
call: ({ courseId, ...patch }, { container,
|
|
45
|
+
call: ({ courseId, ...patch }, { container, caller }) => container.content.updateCourse(courseId, patch, caller.actor)
|
|
50
46
|
}),
|
|
51
47
|
defineTool({
|
|
52
48
|
name: "update_course_settings",
|
|
53
49
|
title: "Update course settings",
|
|
54
50
|
description: "Change course settings such as transcript downloads and comments. Settings left out stay as they are.",
|
|
55
|
-
scope: "courses:write",
|
|
56
51
|
kind: "write",
|
|
57
52
|
idempotent: true,
|
|
58
53
|
openWorld: false,
|
|
59
54
|
input: PatchCourseSettings.extend(CourseIdPathParam.shape),
|
|
60
|
-
call: ({ courseId, ...settings }, { container,
|
|
55
|
+
call: ({ courseId, ...settings }, { container, caller }) => container.content.patchCourseSettings(courseId, settings, caller.actor)
|
|
61
56
|
}),
|
|
62
57
|
defineTool({
|
|
63
58
|
name: "create_module",
|
|
64
59
|
title: "Create module",
|
|
65
60
|
description: "Add a module at the end of a course. Returns the course modules in order.",
|
|
66
|
-
scope: "courses:write",
|
|
67
61
|
kind: "write",
|
|
68
62
|
idempotent: false,
|
|
69
63
|
openWorld: false,
|
|
70
64
|
input: CreateModule.extend(CourseIdPathParam.shape),
|
|
71
|
-
call: ({ courseId, title }, { container,
|
|
65
|
+
call: ({ courseId, title }, { container, caller }) => container.content.createModule(courseId, title, caller.actor)
|
|
72
66
|
}),
|
|
73
67
|
defineTool({
|
|
74
68
|
name: "rename_module",
|
|
75
69
|
title: "Rename module",
|
|
76
70
|
description: "Rename a module. Returns the course modules in order.",
|
|
77
|
-
scope: "courses:write",
|
|
78
71
|
kind: "write",
|
|
79
72
|
idempotent: true,
|
|
80
73
|
openWorld: false,
|
|
81
74
|
input: UpdateModule.extend(ModulePathParam.shape),
|
|
82
|
-
call: ({ courseId, moduleId, title }, { container,
|
|
75
|
+
call: ({ courseId, moduleId, title }, { container, caller }) => container.content.updateModule(courseId, moduleId, title, caller.actor)
|
|
83
76
|
}),
|
|
84
77
|
defineTool({
|
|
85
78
|
name: "reorder_modules",
|
|
86
79
|
title: "Reorder modules",
|
|
87
80
|
description: "Set the module order of a course. Pass every module id of the course in the new order.",
|
|
88
|
-
scope: "courses:write",
|
|
89
81
|
kind: "write",
|
|
90
82
|
idempotent: true,
|
|
91
83
|
openWorld: false,
|
|
92
84
|
input: ReorderInput.extend(CourseIdPathParam.shape),
|
|
93
|
-
call: ({ courseId, orderedIds }, { container,
|
|
85
|
+
call: ({ courseId, orderedIds }, { container, caller }) => container.content.reorderModules(courseId, orderedIds, caller.actor)
|
|
94
86
|
}),
|
|
95
87
|
defineTool({
|
|
96
88
|
name: "delete_course",
|
|
97
89
|
title: "Delete course",
|
|
98
90
|
description: "Permanently delete a course with its modules and activities.",
|
|
99
|
-
scope: "courses:delete",
|
|
100
91
|
kind: "destructive",
|
|
101
92
|
idempotent: true,
|
|
102
93
|
openWorld: false,
|
|
103
94
|
input: CourseIdPathParam,
|
|
104
|
-
call: ({ courseId }, { container,
|
|
95
|
+
call: ({ courseId }, { container, caller }) => container.content.deleteCourse(courseId, caller.actor)
|
|
105
96
|
}),
|
|
106
97
|
defineTool({
|
|
107
98
|
name: "delete_module",
|
|
108
99
|
title: "Delete module",
|
|
109
100
|
description: "Permanently delete a module with its activities. Returns the remaining modules in order.",
|
|
110
|
-
scope: "courses:delete",
|
|
111
101
|
kind: "destructive",
|
|
112
102
|
idempotent: true,
|
|
113
103
|
openWorld: false,
|
|
114
104
|
input: ModulePathParam,
|
|
115
|
-
call: ({ courseId, moduleId }, { container,
|
|
105
|
+
call: ({ courseId, moduleId }, { container, caller }) => container.content.deleteModule(courseId, moduleId, caller.actor)
|
|
116
106
|
})
|
|
117
107
|
];
|
|
118
108
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"courses.js","names":[],"sources":["../../../../src/http/mcp/tools/courses.ts"],"sourcesContent":["import {\n CourseIdPathParam,\n CoursesQuery,\n CreateCourse,\n CreateModule,\n ModulePathParam,\n PatchCourseSettings,\n ReorderInput,\n UpdateCourse,\n UpdateModule,\n} from '../../schemas/index.js';\nimport {
|
|
1
|
+
{"version":3,"file":"courses.js","names":[],"sources":["../../../../src/http/mcp/tools/courses.ts"],"sourcesContent":["import {\n CourseIdPathParam,\n CoursesQuery,\n CreateCourse,\n CreateModule,\n ModulePathParam,\n PatchCourseSettings,\n ReorderInput,\n UpdateCourse,\n UpdateModule,\n} from '../../schemas/index.js';\nimport { defineTool, type Tool } from '../tool.js';\n\nexport const courseTools: Tool[] = [\n defineTool({\n name: 'list_courses',\n title: 'List courses',\n description:\n 'Search and page through the courses, each with its status and settings. Filter by status or category.',\n kind: 'read',\n idempotent: true,\n openWorld: false,\n input: CoursesQuery,\n call: (input, { container, caller }) => container.content.listCourses(input, caller.actor),\n }),\n defineTool({\n name: 'list_modules',\n title: 'List modules',\n description: 'The modules of a course, in order.',\n kind: 'read',\n idempotent: true,\n openWorld: false,\n input: CourseIdPathParam,\n call: ({ courseId }, { container, caller }) =>\n container.content.listCourseModules(courseId, caller.actor),\n }),\n defineTool({\n name: 'create_course',\n title: 'Create course',\n description: 'Create a draft course. Publish it with update_course.',\n kind: 'write',\n idempotent: false,\n openWorld: false,\n input: CreateCourse,\n call: (input, { container, caller }) => container.content.createCourse(input, caller.actor),\n }),\n defineTool({\n name: 'update_course',\n title: 'Update course',\n description:\n 'Change a course title, description, category or cover image, or publish and unpublish it with status. Fields left out stay as they are.',\n kind: 'write',\n idempotent: true,\n openWorld: false,\n input: UpdateCourse.extend(CourseIdPathParam.shape),\n call: ({ courseId, ...patch }, { container, caller }) =>\n container.content.updateCourse(courseId, patch, caller.actor),\n }),\n defineTool({\n name: 'update_course_settings',\n title: 'Update course settings',\n description:\n 'Change course settings such as transcript downloads and comments. Settings left out stay as they are.',\n kind: 'write',\n idempotent: true,\n openWorld: false,\n input: PatchCourseSettings.extend(CourseIdPathParam.shape),\n call: ({ courseId, ...settings }, { container, caller }) =>\n container.content.patchCourseSettings(courseId, settings, caller.actor),\n }),\n defineTool({\n name: 'create_module',\n title: 'Create module',\n description: 'Add a module at the end of a course. Returns the course modules in order.',\n kind: 'write',\n idempotent: false,\n openWorld: false,\n input: CreateModule.extend(CourseIdPathParam.shape),\n call: ({ courseId, title }, { container, caller }) =>\n container.content.createModule(courseId, title, caller.actor),\n }),\n defineTool({\n name: 'rename_module',\n title: 'Rename module',\n description: 'Rename a module. Returns the course modules in order.',\n kind: 'write',\n idempotent: true,\n openWorld: false,\n input: UpdateModule.extend(ModulePathParam.shape),\n call: ({ courseId, moduleId, title }, { container, caller }) =>\n container.content.updateModule(courseId, moduleId, title, caller.actor),\n }),\n defineTool({\n name: 'reorder_modules',\n title: 'Reorder modules',\n description:\n 'Set the module order of a course. Pass every module id of the course in the new order.',\n kind: 'write',\n idempotent: true,\n openWorld: false,\n input: ReorderInput.extend(CourseIdPathParam.shape),\n call: ({ courseId, orderedIds }, { container, caller }) =>\n container.content.reorderModules(courseId, orderedIds, caller.actor),\n }),\n defineTool({\n name: 'delete_course',\n title: 'Delete course',\n description: 'Permanently delete a course with its modules and activities.',\n kind: 'destructive',\n idempotent: true,\n openWorld: false,\n input: CourseIdPathParam,\n call: ({ courseId }, { container, caller }) =>\n container.content.deleteCourse(courseId, caller.actor),\n }),\n defineTool({\n name: 'delete_module',\n title: 'Delete module',\n description:\n 'Permanently delete a module with its activities. Returns the remaining modules in order.',\n kind: 'destructive',\n idempotent: true,\n openWorld: false,\n input: ModulePathParam,\n call: ({ courseId, moduleId }, { container, caller }) =>\n container.content.deleteModule(courseId, moduleId, caller.actor),\n }),\n];\n"],"mappings":";;;;;AAaA,MAAa,cAAsB;CACjC,WAAW;EACT,MAAM;EACN,OAAO;EACP,aACE;EACF,MAAM;EACN,YAAY;EACZ,WAAW;EACX,OAAO;EACP,OAAO,OAAO,EAAE,WAAW,aAAa,UAAU,QAAQ,YAAY,OAAO,OAAO,KAAK;CAC3F,CAAC;CACD,WAAW;EACT,MAAM;EACN,OAAO;EACP,aAAa;EACb,MAAM;EACN,YAAY;EACZ,WAAW;EACX,OAAO;EACP,OAAO,EAAE,YAAY,EAAE,WAAW,aAChC,UAAU,QAAQ,kBAAkB,UAAU,OAAO,KAAK;CAC9D,CAAC;CACD,WAAW;EACT,MAAM;EACN,OAAO;EACP,aAAa;EACb,MAAM;EACN,YAAY;EACZ,WAAW;EACX,OAAO;EACP,OAAO,OAAO,EAAE,WAAW,aAAa,UAAU,QAAQ,aAAa,OAAO,OAAO,KAAK;CAC5F,CAAC;CACD,WAAW;EACT,MAAM;EACN,OAAO;EACP,aACE;EACF,MAAM;EACN,YAAY;EACZ,WAAW;EACX,OAAO,aAAa,OAAO,kBAAkB,KAAK;EAClD,OAAO,EAAE,UAAU,GAAG,SAAS,EAAE,WAAW,aAC1C,UAAU,QAAQ,aAAa,UAAU,OAAO,OAAO,KAAK;CAChE,CAAC;CACD,WAAW;EACT,MAAM;EACN,OAAO;EACP,aACE;EACF,MAAM;EACN,YAAY;EACZ,WAAW;EACX,OAAO,oBAAoB,OAAO,kBAAkB,KAAK;EACzD,OAAO,EAAE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ventAttendee, CreateEvent, EventAssetParams, EventAttendeeParams, EventIdParam, EventsQuery, RenameEventAsset, ReorderEventAssets, UpdateEvent } from "../../schemas/events.js";
|
|
3
|
+
import "../../schemas/index.js";
|
|
4
|
+
import { defineTool } from "../tool.js";
|
|
5
|
+
//#region src/http/mcp/tools/events.ts
|
|
6
|
+
const eventTools = [
|
|
7
|
+
defineTool({
|
|
8
|
+
name: "list_events",
|
|
9
|
+
title: "List events",
|
|
10
|
+
description: "Search and page through events: live sessions at a set time, drafts and canceled ones included. Filter by status, or by a from and to date-time range the event overlaps.",
|
|
11
|
+
kind: "read",
|
|
12
|
+
idempotent: true,
|
|
13
|
+
openWorld: false,
|
|
14
|
+
input: EventsQuery,
|
|
15
|
+
call: (input, { container, caller }) => container.content.listEvents(input, caller.actor)
|
|
16
|
+
}),
|
|
17
|
+
defineTool({
|
|
18
|
+
name: "get_event",
|
|
19
|
+
title: "Get event",
|
|
20
|
+
description: "One event with its times, time zone, location, recording and settings: event type, capacity, notifications and replay.",
|
|
21
|
+
kind: "read",
|
|
22
|
+
idempotent: true,
|
|
23
|
+
openWorld: false,
|
|
24
|
+
input: EventIdParam,
|
|
25
|
+
call: ({ eventId }, { container, caller }) => container.content.getEvent(eventId, caller.actor)
|
|
26
|
+
}),
|
|
27
|
+
defineTool({
|
|
28
|
+
name: "create_event",
|
|
29
|
+
title: "Create event",
|
|
30
|
+
description: "Create a draft event. startsAt and endsAt are date-times, timeZone an IANA name. Publish it with update_event.",
|
|
31
|
+
kind: "write",
|
|
32
|
+
idempotent: false,
|
|
33
|
+
openWorld: false,
|
|
34
|
+
input: CreateEvent,
|
|
35
|
+
call: (input, { container, caller }) => container.content.createEvent(input, caller.actor)
|
|
36
|
+
}),
|
|
37
|
+
defineTool({
|
|
38
|
+
name: "update_event",
|
|
39
|
+
title: "Update event",
|
|
40
|
+
description: "Change an event title, description, times, location, cover image, recording or settings, or publish and unpublish it with status. Fields left out stay as they are. A canceled event cannot change.",
|
|
41
|
+
kind: "write",
|
|
42
|
+
idempotent: true,
|
|
43
|
+
openWorld: false,
|
|
44
|
+
input: UpdateEvent.extend(EventIdParam.shape),
|
|
45
|
+
call: ({ eventId, ...patch }, { container, caller }) => container.content.updateEvent(eventId, patch, caller.actor)
|
|
46
|
+
}),
|
|
47
|
+
defineTool({
|
|
48
|
+
name: "cancel_event",
|
|
49
|
+
title: "Cancel event",
|
|
50
|
+
description: "Cancel an event and tell its attendees. Canceling is final.",
|
|
51
|
+
kind: "destructive",
|
|
52
|
+
idempotent: false,
|
|
53
|
+
openWorld: false,
|
|
54
|
+
input: EventIdParam,
|
|
55
|
+
call: ({ eventId }, { container, caller }) => container.content.cancelEvent(eventId, caller.actor)
|
|
56
|
+
}),
|
|
57
|
+
defineTool({
|
|
58
|
+
name: "delete_event",
|
|
59
|
+
title: "Delete event",
|
|
60
|
+
description: "Permanently delete an event. The uploaded files are kept.",
|
|
61
|
+
kind: "destructive",
|
|
62
|
+
idempotent: true,
|
|
63
|
+
openWorld: false,
|
|
64
|
+
input: EventIdParam,
|
|
65
|
+
call: ({ eventId }, { container, caller }) => container.content.deleteEvent(eventId, caller.actor)
|
|
66
|
+
}),
|
|
67
|
+
defineTool({
|
|
68
|
+
name: "list_event_attendees",
|
|
69
|
+
title: "List event attendees",
|
|
70
|
+
description: "The people attending an event, directly or through a bundle, by grant date, each with how they got their place: self, manual, automation or bundle.",
|
|
71
|
+
kind: "read",
|
|
72
|
+
idempotent: true,
|
|
73
|
+
openWorld: false,
|
|
74
|
+
input: PageQuery.extend(EventIdParam.shape),
|
|
75
|
+
call: ({ eventId, ...page }, { container, caller }) => container.reporting.admin.eventAttendees(eventId, page, caller.actor)
|
|
76
|
+
}),
|
|
77
|
+
defineTool({
|
|
78
|
+
name: "get_event_analytics",
|
|
79
|
+
title: "Get event analytics",
|
|
80
|
+
description: "Attendance figures for one event: attendees now and by source, capacity, revoked grants, and grants over time before the start.",
|
|
81
|
+
kind: "read",
|
|
82
|
+
idempotent: true,
|
|
83
|
+
openWorld: false,
|
|
84
|
+
input: EventIdParam,
|
|
85
|
+
call: ({ eventId }, { container, caller }) => container.reporting.admin.eventAnalytics(eventId, caller.actor)
|
|
86
|
+
}),
|
|
87
|
+
defineTool({
|
|
88
|
+
name: "add_event_attendee",
|
|
89
|
+
title: "Add event attendee",
|
|
90
|
+
description: "Grant an event to a person (orgUserId) so they attend it. The event must be published, not ended and not full. Adding someone who already attends changes nothing.",
|
|
91
|
+
kind: "write",
|
|
92
|
+
idempotent: true,
|
|
93
|
+
openWorld: false,
|
|
94
|
+
input: AddEventAttendee.extend(EventIdParam.shape),
|
|
95
|
+
call: ({ eventId, orgUserId }, { container, caller }) => container.entitlements.grant({
|
|
96
|
+
orgUserId,
|
|
97
|
+
contentId: eventId,
|
|
98
|
+
contentType: "event",
|
|
99
|
+
expiresAt: null
|
|
100
|
+
}, caller.actor)
|
|
101
|
+
}),
|
|
102
|
+
defineTool({
|
|
103
|
+
name: "remove_event_attendee",
|
|
104
|
+
title: "Remove event attendee",
|
|
105
|
+
description: "Revoke a person's direct grant to an event. Someone who attends only through a bundle keeps attending.",
|
|
106
|
+
kind: "destructive",
|
|
107
|
+
idempotent: false,
|
|
108
|
+
openWorld: false,
|
|
109
|
+
input: EventAttendeeParams,
|
|
110
|
+
call: ({ eventId, orgUserId }, { container, caller }) => container.entitlements.revoke({
|
|
111
|
+
orgUserId,
|
|
112
|
+
contentId: eventId,
|
|
113
|
+
contentType: "event"
|
|
114
|
+
}, caller.actor)
|
|
115
|
+
}),
|
|
116
|
+
defineTool({
|
|
117
|
+
name: "list_event_files",
|
|
118
|
+
title: "List event files",
|
|
119
|
+
description: "The files attached to an event, in order, with their display names.",
|
|
120
|
+
kind: "read",
|
|
121
|
+
idempotent: true,
|
|
122
|
+
openWorld: false,
|
|
123
|
+
input: EventIdParam,
|
|
124
|
+
call: ({ eventId }, { container, caller }) => container.content.listEventAssets(eventId, caller.actor)
|
|
125
|
+
}),
|
|
126
|
+
defineTool({
|
|
127
|
+
name: "add_event_file",
|
|
128
|
+
title: "Add file to event",
|
|
129
|
+
description: "Attach an uploaded file to the end of an event. Find file ids with list_media.",
|
|
130
|
+
kind: "write",
|
|
131
|
+
idempotent: false,
|
|
132
|
+
openWorld: false,
|
|
133
|
+
input: AddEventAsset.extend(EventIdParam.shape),
|
|
134
|
+
call: ({ eventId, ...file }, { container, caller }) => container.content.addEventAsset(eventId, file, caller.actor)
|
|
135
|
+
}),
|
|
136
|
+
defineTool({
|
|
137
|
+
name: "rename_event_file",
|
|
138
|
+
title: "Rename event file",
|
|
139
|
+
description: "Set the name a file shows under in an event. null shows the file name.",
|
|
140
|
+
kind: "write",
|
|
141
|
+
idempotent: true,
|
|
142
|
+
openWorld: false,
|
|
143
|
+
input: RenameEventAsset.extend(EventAssetParams.shape),
|
|
144
|
+
call: ({ eventId, assetId, displayName }, { container, caller }) => container.content.renameEventAsset(eventId, assetId, displayName, caller.actor)
|
|
145
|
+
}),
|
|
146
|
+
defineTool({
|
|
147
|
+
name: "reorder_event_files",
|
|
148
|
+
title: "Reorder event files",
|
|
149
|
+
description: "Set the file order of an event. Pass every file id attached to the event in the new order.",
|
|
150
|
+
kind: "write",
|
|
151
|
+
idempotent: true,
|
|
152
|
+
openWorld: false,
|
|
153
|
+
input: ReorderEventAssets.extend(EventIdParam.shape),
|
|
154
|
+
call: ({ eventId, assetIds }, { container, caller }) => container.content.reorderEventAssets(eventId, assetIds, caller.actor)
|
|
155
|
+
}),
|
|
156
|
+
defineTool({
|
|
157
|
+
name: "remove_event_file",
|
|
158
|
+
title: "Remove file from event",
|
|
159
|
+
description: "Take a file off an event. The uploaded file itself is kept.",
|
|
160
|
+
kind: "destructive",
|
|
161
|
+
idempotent: true,
|
|
162
|
+
openWorld: false,
|
|
163
|
+
input: EventAssetParams,
|
|
164
|
+
call: ({ eventId, assetId }, { container, caller }) => container.content.removeEventAsset(eventId, assetId, caller.actor)
|
|
165
|
+
})
|
|
166
|
+
];
|
|
167
|
+
//#endregion
|
|
168
|
+
export { eventTools };
|
|
169
|
+
|
|
170
|
+
//# sourceMappingURL=events.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.js","names":[],"sources":["../../../../src/http/mcp/tools/events.ts"],"sourcesContent":["import {\n AddEventAsset,\n AddEventAttendee,\n CreateEvent,\n EventAssetParams,\n EventAttendeeParams,\n EventIdParam,\n EventsQuery,\n PageQuery,\n RenameEventAsset,\n ReorderEventAssets,\n UpdateEvent,\n} from '../../schemas/index.js';\nimport { defineTool, type Tool } from '../tool.js';\n\nexport const eventTools: Tool[] = [\n defineTool({\n name: 'list_events',\n title: 'List events',\n description:\n 'Search and page through events: live sessions at a set time, drafts and canceled ones included. Filter by status, or by a from and to date-time range the event overlaps.',\n kind: 'read',\n idempotent: true,\n openWorld: false,\n input: EventsQuery,\n call: (input, { container, caller }) => container.content.listEvents(input, caller.actor),\n }),\n defineTool({\n name: 'get_event',\n title: 'Get event',\n description:\n 'One event with its times, time zone, location, recording and settings: event type, capacity, notifications and replay.',\n kind: 'read',\n idempotent: true,\n openWorld: false,\n input: EventIdParam,\n call: ({ eventId }, { container, caller }) => container.content.getEvent(eventId, caller.actor),\n }),\n defineTool({\n name: 'create_event',\n title: 'Create event',\n description:\n 'Create a draft event. startsAt and endsAt are date-times, timeZone an IANA name. Publish it with update_event.',\n kind: 'write',\n idempotent: false,\n openWorld: false,\n input: CreateEvent,\n call: (input, { container, caller }) => container.content.createEvent(input, caller.actor),\n }),\n defineTool({\n name: 'update_event',\n title: 'Update event',\n description:\n 'Change an event title, description, times, location, cover image, recording or settings, or publish and unpublish it with status. Fields left out stay as they are. A canceled event cannot change.',\n kind: 'write',\n idempotent: true,\n openWorld: false,\n input: UpdateEvent.extend(EventIdParam.shape),\n call: ({ eventId, ...patch }, { container, caller }) =>\n container.content.updateEvent(eventId, patch, caller.actor),\n }),\n defineTool({\n name: 'cancel_event',\n title: 'Cancel event',\n description: 'Cancel an event and tell its attendees. Canceling is final.',\n kind: 'destructive',\n idempotent: false,\n openWorld: false,\n input: EventIdParam,\n call: ({ eventId }, { container, caller }) =>\n container.content.cancelEvent(eventId, caller.actor),\n }),\n defineTool({\n name: 'delete_event',\n title: 'Delete event',\n description: 'Permanently delete an event. The uploaded files are kept.',\n kind: 'destructive',\n idempotent: true,\n openWorld: false,\n input: EventIdParam,\n call: ({ eventId }, { container, caller }) =>\n container.content.deleteEvent(eventId, caller.actor),\n }),\n defineTool({\n name: 'list_event_attendees',\n title: 'List event attendees',\n description:\n 'The people attending an event, directly or through a bundle, by grant date, each with how they got their place: self, manual, automation or bundle.',\n kind: 'read',\n idempotent: true,\n openWorld: false,\n input: PageQuery.extend(EventIdParam.shape),\n call: ({ eventId, ...page }, { container, caller }) =>\n container.reporting.admin.eventAttendees(eventId, page, caller.actor),\n }),\n defineTool({\n name: 'get_event_analytics',\n title: 'Get event analytics',\n description:\n 'Attendance figures for one event: attendees now and by source, capacity, revoked grants, and grants over time before the start.',\n kind: 'read',\n idempotent: true,\n openWorld: false,\n input: EventIdParam,\n call: ({ eventId }, { container, caller }) =>\n container.reporting.admin.eventAnalytics(eventId, caller.actor),\n }),\n defineTool({\n name: 'add_event_attendee',\n title: 'Add event attendee',\n description:\n 'Grant an event to a person (orgUserId) so they attend it. The event must be published, not ended and not full. Adding someone who already attends changes nothing.',\n kind: 'write',\n idempotent: true,\n openWorld: false,\n input: AddEventAttendee.extend(EventIdParam.shape),\n call: ({ eventId, orgUserId }, { container, caller }) =>\n container.entitlements.grant(\n { orgUserId, contentId: eventId, contentType: 'event', expiresAt: null },\n caller.actor,\n ),\n }),\n defineTool({\n name: 'remove_event_attendee',\n title: 'Remove event attendee',\n description:\n \"Revoke a person's direct grant to an event. Someone who attends only through a bundle keeps attending.\",\n kind: 'destructive',\n idempotent: false,\n openWorld: false,\n input: EventAttendeeParams,\n call: ({ eventId, orgUserId }, { container, caller }) =>\n container.entitlements.revoke(\n { orgUserId, contentId: eventId, contentType: 'event' },\n caller.actor,\n ),\n }),\n defineTool({\n name: 'list_event_files',\n title: 'List event files',\n description: 'The files attached to an event, in order, with their display names.',\n kind: 'read',\n idempotent: true,\n openWorld: false,\n input: EventIdParam,\n call: ({ eventId }, { container, caller }) =>\n container.content.listEventAssets(eventId, caller.actor),\n }),\n defineTool({\n name: 'add_event_file',\n title: 'Add file to event',\n description: 'Attach an uploaded file to the end of an event. Find file ids with list_media.',\n kind: 'write',\n idempotent: false,\n openWorld: false,\n input: AddEventAsset.extend(EventIdParam.shape),\n call: ({ eventId, ...file }, { container, caller }) =>\n container.content.addEventAsset(eventId, file, caller.actor),\n }),\n defineTool({\n name: 'rename_event_file',\n title: 'Rename event file',\n description: 'Set the name a file shows under in an event. null shows the file name.',\n kind: 'write',\n idempotent: true,\n openWorld: false,\n input: RenameEventAsset.extend(EventAssetParams.shape),\n call: ({ eventId, assetId, displayName }, { container, caller }) =>\n container.content.renameEventAsset(eventId, assetId, displayName, caller.actor),\n }),\n defineTool({\n name: 'reorder_event_files',\n title: 'Reorder event files',\n description:\n 'Set the file order of an event. Pass every file id attached to the event in the new order.',\n kind: 'write',\n idempotent: true,\n openWorld: false,\n input: ReorderEventAssets.extend(EventIdParam.shape),\n call: ({ eventId, assetIds }, { container, caller }) =>\n container.content.reorderEventAssets(eventId, assetIds, caller.actor),\n }),\n defineTool({\n name: 'remove_event_file',\n title: 'Remove file from event',\n description: 'Take a file off an event. The uploaded file itself is kept.',\n kind: 'destructive',\n idempotent: true,\n openWorld: false,\n input: EventAssetParams,\n call: ({ eventId, assetId }, { container, caller }) =>\n container.content.removeEventAsset(eventId, assetId, caller.actor),\n }),\n];\n"],"mappings":";;;;;AAeA,MAAa,aAAqB;CAChC,WAAW;EACT,MAAM;EACN,OAAO;EACP,aACE;EACF,MAAM;EACN,YAAY;EACZ,WAAW;EACX,OAAO;EACP,OAAO,OAAO,EAAE,WAAW,aAAa,UAAU,QAAQ,WAAW,OAAO,OAAO,KAAK;CAC1F,CAAC;CACD,WAAW;EACT,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;EACN,OAAO;EACP,aACE;EACF,MAAM;EACN,YAAY;EACZ,WAAW;EACX,OAAO,mBAAmB,OAAO,aAAa,KAAK;EACnD,OAAO,EAAE,SAAS,YAAY,EAAE,WAAW,aACzC,UAAU,QAAQ,mBAAmB,SAAS,UAAU,OAAO,KAAK;CACxE,CAAC;CACD,WAAW;EACT,MAAM;EACN,OAAO;EACP,aAAa;EACb,MAAM;EACN,YAAY;EACZ,WAAW;EACX,OAAO;EACP,OAAO,EAAE,SAAS,WAAW,EAAE,WAAW,aACxC,UAAU,QAAQ,iBAAiB,SAAS,SAAS,OAAO,KAAK;CACrE,CAAC;AACH"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { Tool } from "../tool.js";
|
|
2
2
|
//#region src/http/mcp/tools/index.d.ts
|
|
3
|
+
declare const TOOL_GROUPS: {
|
|
4
|
+
title: string;
|
|
5
|
+
tools: Tool[];
|
|
6
|
+
}[];
|
|
3
7
|
declare const TOOLS: Tool[];
|
|
4
8
|
//#endregion
|
|
5
|
-
export { TOOLS };
|
|
9
|
+
export { TOOLS, TOOL_GROUPS };
|
|
6
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -5,19 +5,54 @@ import { communityMemberTools } from "./community-members.js";
|
|
|
5
5
|
import { communityModerationTools } from "./community-moderation.js";
|
|
6
6
|
import { communityTools } from "./communities.js";
|
|
7
7
|
import { courseTools } from "./courses.js";
|
|
8
|
+
import { eventTools } from "./events.js";
|
|
8
9
|
import { peopleTools } from "./people.js";
|
|
10
|
+
import { organizationTools } from "./organization.js";
|
|
9
11
|
//#region src/http/mcp/tools/index.ts
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
const TOOL_GROUPS = [
|
|
13
|
+
{
|
|
14
|
+
title: "Courses",
|
|
15
|
+
tools: courseTools
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
title: "Downloads, bundles and media",
|
|
19
|
+
tools: catalogTools
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
title: "Events",
|
|
23
|
+
tools: eventTools
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
title: "Students, access and analytics",
|
|
27
|
+
tools: peopleTools
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
title: "Organization, roles and team",
|
|
31
|
+
tools: organizationTools
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
title: "Workflows and webhooks",
|
|
35
|
+
tools: automationTools
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
title: "Comments",
|
|
39
|
+
tools: commentTools
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
title: "Communities",
|
|
43
|
+
tools: communityTools
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
title: "Community members",
|
|
47
|
+
tools: communityMemberTools
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
title: "Community moderation",
|
|
51
|
+
tools: communityModerationTools
|
|
52
|
+
}
|
|
19
53
|
];
|
|
54
|
+
const TOOLS = TOOL_GROUPS.flatMap((group) => group.tools);
|
|
20
55
|
//#endregion
|
|
21
|
-
export { TOOLS };
|
|
56
|
+
export { TOOLS, TOOL_GROUPS };
|
|
22
57
|
|
|
23
58
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/http/mcp/tools/index.ts"],"sourcesContent":["import type { Tool } from '../tool.js';\nimport { automationTools } from './automations.js';\nimport { catalogTools } from './catalog.js';\nimport { commentTools } from './comments.js';\nimport { communityMemberTools } from './community-members.js';\nimport { communityModerationTools } from './community-moderation.js';\nimport { communityTools } from './communities.js';\nimport { courseTools } from './courses.js';\nimport { peopleTools } from './people.js';\n\nexport const
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/http/mcp/tools/index.ts"],"sourcesContent":["import type { Tool } from '../tool.js';\nimport { automationTools } from './automations.js';\nimport { catalogTools } from './catalog.js';\nimport { commentTools } from './comments.js';\nimport { communityMemberTools } from './community-members.js';\nimport { communityModerationTools } from './community-moderation.js';\nimport { communityTools } from './communities.js';\nimport { courseTools } from './courses.js';\nimport { eventTools } from './events.js';\nimport { peopleTools } from './people.js';\nimport { organizationTools } from './organization.js';\n\nexport const TOOL_GROUPS: { title: string; tools: Tool[] }[] = [\n { title: 'Courses', tools: courseTools },\n { title: 'Downloads, bundles and media', tools: catalogTools },\n { title: 'Events', tools: eventTools },\n { title: 'Students, access and analytics', tools: peopleTools },\n { title: 'Organization, roles and team', tools: organizationTools },\n { title: 'Workflows and webhooks', tools: automationTools },\n { title: 'Comments', tools: commentTools },\n { title: 'Communities', tools: communityTools },\n { title: 'Community members', tools: communityMemberTools },\n { title: 'Community moderation', tools: communityModerationTools },\n];\n\nexport const TOOLS: Tool[] = TOOL_GROUPS.flatMap((group) => group.tools);\n"],"mappings":";;;;;;;;;;;AAYA,MAAa,cAAkD;CAC7D;EAAE,OAAO;EAAW,OAAO;CAAY;CACvC;EAAE,OAAO;EAAgC,OAAO;CAAa;CAC7D;EAAE,OAAO;EAAU,OAAO;CAAW;CACrC;EAAE,OAAO;EAAkC,OAAO;CAAY;CAC9D;EAAE,OAAO;EAAgC,OAAO;CAAkB;CAClE;EAAE,OAAO;EAA0B,OAAO;CAAgB;CAC1D;EAAE,OAAO;EAAY,OAAO;CAAa;CACzC;EAAE,OAAO;EAAe,OAAO;CAAe;CAC9C;EAAE,OAAO;EAAqB,OAAO;CAAqB;CAC1D;EAAE,OAAO;EAAwB,OAAO;CAAyB;AACnE;AAEA,MAAa,QAAgB,YAAY,SAAS,UAAU,MAAM,KAAK"}
|