@pitcher/cli-scripts 2.10.0 → 2.12.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 +32 -2
- package/dist/index.js +2 -0
- package/dist/src/commands/ld/assessment.d.ts +61 -0
- package/dist/src/commands/ld/assessment.js +235 -0
- package/dist/src/commands/ld/canvasCourse.d.ts +20 -0
- package/dist/src/commands/ld/canvasCourse.js +69 -0
- package/dist/src/commands/ld/cert.d.ts +93 -0
- package/dist/src/commands/ld/cert.js +355 -0
- package/dist/src/commands/ld/course.d.ts +62 -0
- package/dist/src/commands/ld/course.js +308 -0
- package/dist/src/commands/ld/module.d.ts +43 -0
- package/dist/src/commands/ld/module.js +199 -0
- package/dist/src/commands/ld.d.ts +2 -0
- package/dist/src/commands/ld.js +15 -0
- package/dist/src/core/ld.d.ts +38 -0
- package/dist/src/core/ld.js +102 -0
- package/dist/src/core/readInput.d.ts +1 -0
- package/dist/src/core/readInput.js +14 -0
- package/dist/src/mcp/bundled.js +1 -1
- package/dist/src/mcp/prompts/announcements.d.ts +2 -0
- package/dist/src/mcp/prompts/announcements.js +35 -0
- package/dist/src/mcp/prompts/dsr.d.ts +2 -0
- package/dist/src/mcp/prompts/dsr.js +50 -0
- package/dist/src/mcp/prompts/ldCanvasCourse.d.ts +2 -0
- package/dist/src/mcp/prompts/ldCanvasCourse.js +50 -0
- package/dist/src/mcp/prompts/registry.js +10 -1
- package/dist/src/mcp/prompts/shared.d.ts +1 -0
- package/dist/src/mcp/prompts/shared.js +12 -7
- package/dist/src/mcp/registry.js +2 -0
- package/dist/src/mcp/resources/ldCanvasDesign.d.ts +3 -0
- package/dist/src/mcp/resources/ldCanvasDesign.js +51 -0
- package/dist/src/mcp/resources/registry.js +2 -1
- package/dist/src/mcp/tools/ld.d.ts +2 -0
- package/dist/src/mcp/tools/ld.js +680 -0
- package/package.json +1 -1
|
@@ -0,0 +1,680 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { runLdCourseList, runLdCourseGet, runLdCourseTags, runLdCourseCreate, runLdCourseUpdate, runLdCourseDelete, runLdCoursePublish, runLdCourseUnpublish, runLdCourseGetCanvas, runLdCourseSetCanvas, runLdCourseListModules, runLdCourseAddToModules, runLdCourseRemoveFromModule, runLdCourseListAssessments, runLdCourseLinkAssessments, runLdCourseUnlinkAssessment, } from '../../commands/ld/course.js';
|
|
3
|
+
import { runLdCourseCreateCanvas } from '../../commands/ld/canvasCourse.js';
|
|
4
|
+
import { runLdModuleTags, runLdModuleList, runLdModuleGet, runLdModuleCreate, runLdModuleUpdate, runLdModuleDelete, runLdModuleListCourses, runLdModuleAddCourses, runLdModuleReorderCourses, runLdModuleUpdateCourse, runLdModuleRemoveCourse, } from '../../commands/ld/module.js';
|
|
5
|
+
import { runLdCertTags, runLdCertList, runLdCertGet, runLdCertCreate, runLdCertUpdate, runLdCertDelete, runLdCertTrainingMaterials, runLdCertListModules, runLdCertAddModules, runLdCertReorderModules, runLdCertUpdateModule, runLdCertRemoveModule, runLdCertListCourses, runLdCertAddCourses, runLdCertReorderCourses, runLdCertUpdateCourse, runLdCertRemoveCourse, runLdCertListAssessments, runLdCertAddAssessments, runLdCertUpdateAssessment, runLdCertRemoveAssessment, } from '../../commands/ld/cert.js';
|
|
6
|
+
import { runLdAssessmentTags, runLdAssessmentList, runLdAssessmentGet, runLdAssessmentCreate, runLdAssessmentUpdate, runLdAssessmentDelete, runLdAssessmentListQuestions, runLdAssessmentAddQuestion, runLdAssessmentUpdateQuestion, runLdAssessmentReorderQuestions, runLdAssessmentDeleteQuestion, runLdAssessmentPreviewStart, runLdAssessmentPreviewGrade, runLdAssessmentListCourses, } from '../../commands/ld/assessment.js';
|
|
7
|
+
const instance = z.string().trim().min(1, 'Instance ID is required').describe('Instance ID (required)');
|
|
8
|
+
// NOTE: no `ldUrl`/`apiKey`/`org`/`url` in any inputShape — the L&D destination + auth are
|
|
9
|
+
// pinned at server boot (NG_LD_API_URL / ld-app config), never a per-call tool input.
|
|
10
|
+
export const ldTools = [
|
|
11
|
+
{
|
|
12
|
+
name: 'pitcher_ld_course_create_canvas',
|
|
13
|
+
title: 'Create a canvas L&D course',
|
|
14
|
+
description: 'Create a canvas-based L&D course in one step: create a draft, set its canvas content, and optionally publish. ' +
|
|
15
|
+
'Pass the canvas JSON INLINE via `canvas`. Use the create_ld_canvas_course prompt to author the JSON well. Additive.',
|
|
16
|
+
inputShape: {
|
|
17
|
+
instanceId: instance,
|
|
18
|
+
title: z.string().describe('Course title (required)'),
|
|
19
|
+
description: z.string().optional(),
|
|
20
|
+
canvas: z
|
|
21
|
+
.string()
|
|
22
|
+
.optional()
|
|
23
|
+
.describe('Inline canvas JSON: a canvas object { content: { data: [...] }, theme? } whose content.data is the flat component array (a bare content.data array is auto-wrapped). Inline only — a file path cannot cross a host sandbox.'),
|
|
24
|
+
publish: z.boolean().optional().describe('Publish after authoring'),
|
|
25
|
+
},
|
|
26
|
+
run: runLdCourseCreateCanvas,
|
|
27
|
+
readOnly: false,
|
|
28
|
+
write: true,
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
name: 'pitcher_ld_course_list',
|
|
32
|
+
title: 'List L&D courses',
|
|
33
|
+
description: 'List L&D courses in an instance. Filter by status/title/tags.',
|
|
34
|
+
inputShape: {
|
|
35
|
+
instanceId: instance,
|
|
36
|
+
status: z.string().optional(),
|
|
37
|
+
title: z.string().optional(),
|
|
38
|
+
tags: z.array(z.string()).optional(),
|
|
39
|
+
limit: z.number().int().optional(),
|
|
40
|
+
offset: z.number().int().optional(),
|
|
41
|
+
},
|
|
42
|
+
run: runLdCourseList,
|
|
43
|
+
readOnly: true,
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
name: 'pitcher_ld_course_get',
|
|
47
|
+
title: 'Get an L&D course',
|
|
48
|
+
description: 'Retrieve one L&D course by id.',
|
|
49
|
+
inputShape: { instanceId: instance, id: z.string() },
|
|
50
|
+
run: runLdCourseGet,
|
|
51
|
+
readOnly: true,
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
name: 'pitcher_ld_course_tags',
|
|
55
|
+
title: 'List L&D course tags',
|
|
56
|
+
description: 'List distinct course tags in an instance.',
|
|
57
|
+
inputShape: { instanceId: instance },
|
|
58
|
+
run: runLdCourseTags,
|
|
59
|
+
readOnly: true,
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: 'pitcher_ld_course_create',
|
|
63
|
+
title: 'Create an L&D course',
|
|
64
|
+
description: 'Create an L&D course (draft). For a canvas course, prefer pitcher_ld_course_create_canvas. Additive.',
|
|
65
|
+
inputShape: {
|
|
66
|
+
instanceId: instance,
|
|
67
|
+
title: z.string(),
|
|
68
|
+
description: z.string().min(10, 'min 10 chars').describe('min 10 chars'),
|
|
69
|
+
level: z.enum(['Beginner', 'Intermediate', 'Advanced']),
|
|
70
|
+
duration: z.number().int().describe('minutes'),
|
|
71
|
+
sectionsCount: z.number().int(),
|
|
72
|
+
contentSource: z
|
|
73
|
+
.enum(['html', 'scorm', 'canvas'])
|
|
74
|
+
.optional()
|
|
75
|
+
.describe('default html; an html course requires contentHtml'),
|
|
76
|
+
contentHtml: z.string().optional().describe('Inline HTML body — required when contentSource is html'),
|
|
77
|
+
completionCriteria: z.string().optional(),
|
|
78
|
+
thumbnailUrl: z.string().optional(),
|
|
79
|
+
scormPassRequired: z.boolean().optional(),
|
|
80
|
+
tags: z.array(z.string()).optional(),
|
|
81
|
+
},
|
|
82
|
+
run: runLdCourseCreate,
|
|
83
|
+
readOnly: false,
|
|
84
|
+
write: true,
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
name: 'pitcher_ld_course_update',
|
|
88
|
+
title: 'Update an L&D course',
|
|
89
|
+
description: 'Update fields on an L&D course.',
|
|
90
|
+
inputShape: {
|
|
91
|
+
instanceId: instance,
|
|
92
|
+
id: z.string(),
|
|
93
|
+
title: z.string().optional(),
|
|
94
|
+
description: z.string().optional(),
|
|
95
|
+
level: z.enum(['Beginner', 'Intermediate', 'Advanced']).optional(),
|
|
96
|
+
duration: z.number().int().optional(),
|
|
97
|
+
sectionsCount: z.number().int().optional(),
|
|
98
|
+
contentSource: z.enum(['html', 'scorm', 'canvas']).optional(),
|
|
99
|
+
contentHtml: z.string().optional(),
|
|
100
|
+
status: z.string().optional(),
|
|
101
|
+
completionCriteria: z.string().optional(),
|
|
102
|
+
thumbnailUrl: z.string().optional(),
|
|
103
|
+
scormPassRequired: z.boolean().optional(),
|
|
104
|
+
tags: z.array(z.string()).optional(),
|
|
105
|
+
},
|
|
106
|
+
run: runLdCourseUpdate,
|
|
107
|
+
readOnly: false,
|
|
108
|
+
write: true,
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
name: 'pitcher_ld_course_delete',
|
|
112
|
+
title: 'Delete an L&D course',
|
|
113
|
+
description: 'Delete an L&D course and its canvas.',
|
|
114
|
+
inputShape: { instanceId: instance, id: z.string() },
|
|
115
|
+
run: runLdCourseDelete,
|
|
116
|
+
readOnly: false,
|
|
117
|
+
write: true,
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
name: 'pitcher_ld_course_publish',
|
|
121
|
+
title: 'Publish an L&D course',
|
|
122
|
+
description: 'Publish an L&D course.',
|
|
123
|
+
inputShape: { instanceId: instance, id: z.string() },
|
|
124
|
+
run: runLdCoursePublish,
|
|
125
|
+
readOnly: false,
|
|
126
|
+
write: true,
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
name: 'pitcher_ld_course_unpublish',
|
|
130
|
+
title: 'Unpublish an L&D course',
|
|
131
|
+
description: 'Unpublish an L&D course.',
|
|
132
|
+
inputShape: { instanceId: instance, id: z.string() },
|
|
133
|
+
run: runLdCourseUnpublish,
|
|
134
|
+
readOnly: false,
|
|
135
|
+
write: true,
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
name: 'pitcher_ld_course_get_canvas',
|
|
139
|
+
title: 'Get an L&D course canvas',
|
|
140
|
+
description: 'Retrieve the stored canvas content of a canvas course.',
|
|
141
|
+
inputShape: { instanceId: instance, id: z.string() },
|
|
142
|
+
run: runLdCourseGetCanvas,
|
|
143
|
+
readOnly: true,
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
name: 'pitcher_ld_course_set_canvas',
|
|
147
|
+
title: 'Set an L&D course canvas',
|
|
148
|
+
description: 'Save canvas content to a course. Pass `canvas` inline JSON.',
|
|
149
|
+
inputShape: { instanceId: instance, id: z.string(), canvas: z.string().optional() },
|
|
150
|
+
run: runLdCourseSetCanvas,
|
|
151
|
+
readOnly: false,
|
|
152
|
+
write: true,
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
name: 'pitcher_ld_course_list_modules',
|
|
156
|
+
title: "List a course's modules",
|
|
157
|
+
description: 'List modules a course belongs to.',
|
|
158
|
+
inputShape: { instanceId: instance, id: z.string() },
|
|
159
|
+
run: runLdCourseListModules,
|
|
160
|
+
readOnly: true,
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
name: 'pitcher_ld_course_add_to_modules',
|
|
164
|
+
title: 'Add a course to modules',
|
|
165
|
+
description: 'Link a course into one or more modules.',
|
|
166
|
+
inputShape: { instanceId: instance, id: z.string(), moduleIds: z.array(z.string()) },
|
|
167
|
+
run: runLdCourseAddToModules,
|
|
168
|
+
readOnly: false,
|
|
169
|
+
write: true,
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
name: 'pitcher_ld_course_remove_from_module',
|
|
173
|
+
title: 'Remove a course from a module',
|
|
174
|
+
description: 'Unlink a course from a module.',
|
|
175
|
+
inputShape: { instanceId: instance, id: z.string(), moduleId: z.string() },
|
|
176
|
+
run: runLdCourseRemoveFromModule,
|
|
177
|
+
readOnly: false,
|
|
178
|
+
write: true,
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
name: 'pitcher_ld_course_list_assessments',
|
|
182
|
+
title: "List a course's assessments",
|
|
183
|
+
description: 'List assessments linked to a course.',
|
|
184
|
+
inputShape: { instanceId: instance, id: z.string() },
|
|
185
|
+
run: runLdCourseListAssessments,
|
|
186
|
+
readOnly: true,
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
name: 'pitcher_ld_course_link_assessments',
|
|
190
|
+
title: 'Link assessments to a course',
|
|
191
|
+
description: 'Link one or more assessments to a course.',
|
|
192
|
+
inputShape: { instanceId: instance, id: z.string(), assessmentIds: z.array(z.string()) },
|
|
193
|
+
run: runLdCourseLinkAssessments,
|
|
194
|
+
readOnly: false,
|
|
195
|
+
write: true,
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
name: 'pitcher_ld_course_unlink_assessment',
|
|
199
|
+
title: 'Unlink an assessment from a course',
|
|
200
|
+
description: 'Remove an assessment link from a course.',
|
|
201
|
+
inputShape: { instanceId: instance, id: z.string(), assessmentId: z.string() },
|
|
202
|
+
run: runLdCourseUnlinkAssessment,
|
|
203
|
+
readOnly: false,
|
|
204
|
+
write: true,
|
|
205
|
+
},
|
|
206
|
+
// ---- modules ----
|
|
207
|
+
{
|
|
208
|
+
name: 'pitcher_ld_module_tags',
|
|
209
|
+
title: 'List L&D module tags',
|
|
210
|
+
description: 'List distinct module tags in an instance.',
|
|
211
|
+
inputShape: { instanceId: instance },
|
|
212
|
+
run: runLdModuleTags,
|
|
213
|
+
readOnly: true,
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
name: 'pitcher_ld_module_list',
|
|
217
|
+
title: 'List L&D modules',
|
|
218
|
+
description: 'List L&D modules in an instance. Filter by status/title/tags.',
|
|
219
|
+
inputShape: {
|
|
220
|
+
instanceId: instance,
|
|
221
|
+
status: z.string().optional(),
|
|
222
|
+
title: z.string().optional(),
|
|
223
|
+
tags: z.array(z.string()).optional(),
|
|
224
|
+
limit: z.number().int().optional(),
|
|
225
|
+
offset: z.number().int().optional(),
|
|
226
|
+
},
|
|
227
|
+
run: runLdModuleList,
|
|
228
|
+
readOnly: true,
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
name: 'pitcher_ld_module_get',
|
|
232
|
+
title: 'Get an L&D module',
|
|
233
|
+
description: 'Retrieve one L&D module by id.',
|
|
234
|
+
inputShape: { instanceId: instance, id: z.string() },
|
|
235
|
+
run: runLdModuleGet,
|
|
236
|
+
readOnly: true,
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
name: 'pitcher_ld_module_create',
|
|
240
|
+
title: 'Create an L&D module',
|
|
241
|
+
description: 'Create an L&D module (draft). Additive.',
|
|
242
|
+
inputShape: {
|
|
243
|
+
instanceId: instance,
|
|
244
|
+
title: z.string(),
|
|
245
|
+
subtitle: z.string(),
|
|
246
|
+
description: z.string(),
|
|
247
|
+
tags: z.array(z.string()).optional(),
|
|
248
|
+
},
|
|
249
|
+
run: runLdModuleCreate,
|
|
250
|
+
readOnly: false,
|
|
251
|
+
write: true,
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
name: 'pitcher_ld_module_update',
|
|
255
|
+
title: 'Update an L&D module',
|
|
256
|
+
description: 'Update fields on an L&D module.',
|
|
257
|
+
inputShape: {
|
|
258
|
+
instanceId: instance,
|
|
259
|
+
id: z.string(),
|
|
260
|
+
title: z.string().optional(),
|
|
261
|
+
subtitle: z.string().optional(),
|
|
262
|
+
description: z.string().optional(),
|
|
263
|
+
tags: z.array(z.string()).optional(),
|
|
264
|
+
},
|
|
265
|
+
run: runLdModuleUpdate,
|
|
266
|
+
readOnly: false,
|
|
267
|
+
write: true,
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
name: 'pitcher_ld_module_delete',
|
|
271
|
+
title: 'Delete an L&D module',
|
|
272
|
+
description: 'Delete an L&D module.',
|
|
273
|
+
inputShape: { instanceId: instance, id: z.string() },
|
|
274
|
+
run: runLdModuleDelete,
|
|
275
|
+
readOnly: false,
|
|
276
|
+
write: true,
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
name: 'pitcher_ld_module_list_courses',
|
|
280
|
+
title: "List a module's courses",
|
|
281
|
+
description: 'List courses in a module.',
|
|
282
|
+
inputShape: { instanceId: instance, id: z.string() },
|
|
283
|
+
run: runLdModuleListCourses,
|
|
284
|
+
readOnly: true,
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
name: 'pitcher_ld_module_add_courses',
|
|
288
|
+
title: 'Add courses to a module',
|
|
289
|
+
description: 'Link one or more courses into a module. Additive.',
|
|
290
|
+
inputShape: { instanceId: instance, id: z.string(), courseIds: z.array(z.string()) },
|
|
291
|
+
run: runLdModuleAddCourses,
|
|
292
|
+
readOnly: false,
|
|
293
|
+
write: true,
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
name: 'pitcher_ld_module_reorder_courses',
|
|
297
|
+
title: 'Reorder a module course',
|
|
298
|
+
description: 'Move a course to a new position within a module.',
|
|
299
|
+
inputShape: { instanceId: instance, id: z.string(), courseId: z.string(), newOrder: z.number().int() },
|
|
300
|
+
run: runLdModuleReorderCourses,
|
|
301
|
+
readOnly: false,
|
|
302
|
+
write: true,
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
name: 'pitcher_ld_module_update_course',
|
|
306
|
+
title: 'Update a module course',
|
|
307
|
+
description: 'Update a course link within a module (e.g. isRequired).',
|
|
308
|
+
inputShape: { instanceId: instance, id: z.string(), courseId: z.string(), isRequired: z.boolean().optional() },
|
|
309
|
+
run: runLdModuleUpdateCourse,
|
|
310
|
+
readOnly: false,
|
|
311
|
+
write: true,
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
name: 'pitcher_ld_module_remove_course',
|
|
315
|
+
title: 'Remove a course from a module',
|
|
316
|
+
description: 'Unlink a course from a module.',
|
|
317
|
+
inputShape: { instanceId: instance, id: z.string(), courseId: z.string() },
|
|
318
|
+
run: runLdModuleRemoveCourse,
|
|
319
|
+
readOnly: false,
|
|
320
|
+
write: true,
|
|
321
|
+
},
|
|
322
|
+
// ---- certificates ----
|
|
323
|
+
{
|
|
324
|
+
name: 'pitcher_ld_cert_tags',
|
|
325
|
+
title: 'List L&D certificate tags',
|
|
326
|
+
description: 'List distinct certificate tags in an instance.',
|
|
327
|
+
inputShape: { instanceId: instance },
|
|
328
|
+
run: runLdCertTags,
|
|
329
|
+
readOnly: true,
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
name: 'pitcher_ld_cert_list',
|
|
333
|
+
title: 'List L&D certificates',
|
|
334
|
+
description: 'List L&D certificates in an instance. Filter by status/title/tags.',
|
|
335
|
+
inputShape: {
|
|
336
|
+
instanceId: instance,
|
|
337
|
+
status: z.string().optional(),
|
|
338
|
+
title: z.string().optional(),
|
|
339
|
+
tags: z.array(z.string()).optional(),
|
|
340
|
+
limit: z.number().int().optional(),
|
|
341
|
+
offset: z.number().int().optional(),
|
|
342
|
+
},
|
|
343
|
+
run: runLdCertList,
|
|
344
|
+
readOnly: true,
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
name: 'pitcher_ld_cert_get',
|
|
348
|
+
title: 'Get an L&D certificate',
|
|
349
|
+
description: 'Retrieve one L&D certificate by id.',
|
|
350
|
+
inputShape: { instanceId: instance, id: z.string() },
|
|
351
|
+
run: runLdCertGet,
|
|
352
|
+
readOnly: true,
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
name: 'pitcher_ld_cert_create',
|
|
356
|
+
title: 'Create an L&D certificate',
|
|
357
|
+
description: 'Create an L&D certificate. Additive.',
|
|
358
|
+
inputShape: {
|
|
359
|
+
instanceId: instance,
|
|
360
|
+
title: z.string(),
|
|
361
|
+
description: z.string().optional(),
|
|
362
|
+
tags: z.array(z.string()).optional(),
|
|
363
|
+
validityPeriod: z.number().int().optional().describe('days'),
|
|
364
|
+
},
|
|
365
|
+
run: runLdCertCreate,
|
|
366
|
+
readOnly: false,
|
|
367
|
+
write: true,
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
name: 'pitcher_ld_cert_update',
|
|
371
|
+
title: 'Update an L&D certificate',
|
|
372
|
+
description: 'Update fields on an L&D certificate.',
|
|
373
|
+
inputShape: {
|
|
374
|
+
instanceId: instance,
|
|
375
|
+
id: z.string(),
|
|
376
|
+
title: z.string().optional(),
|
|
377
|
+
description: z.string().optional(),
|
|
378
|
+
tags: z.array(z.string()).optional(),
|
|
379
|
+
validityPeriod: z.number().int().optional(),
|
|
380
|
+
},
|
|
381
|
+
run: runLdCertUpdate,
|
|
382
|
+
readOnly: false,
|
|
383
|
+
write: true,
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
name: 'pitcher_ld_cert_delete',
|
|
387
|
+
title: 'Delete an L&D certificate',
|
|
388
|
+
description: 'Delete an L&D certificate.',
|
|
389
|
+
inputShape: { instanceId: instance, id: z.string() },
|
|
390
|
+
run: runLdCertDelete,
|
|
391
|
+
readOnly: false,
|
|
392
|
+
write: true,
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
name: 'pitcher_ld_cert_training_materials',
|
|
396
|
+
title: "List a certificate's training materials",
|
|
397
|
+
description: 'List the training materials (modules/courses/assessments) attached to a certificate.',
|
|
398
|
+
inputShape: { instanceId: instance, id: z.string() },
|
|
399
|
+
run: runLdCertTrainingMaterials,
|
|
400
|
+
readOnly: true,
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
name: 'pitcher_ld_cert_list_modules',
|
|
404
|
+
title: "List a certificate's modules",
|
|
405
|
+
description: 'List modules attached to a certificate.',
|
|
406
|
+
inputShape: { instanceId: instance, id: z.string() },
|
|
407
|
+
run: runLdCertListModules,
|
|
408
|
+
readOnly: true,
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
name: 'pitcher_ld_cert_add_modules',
|
|
412
|
+
title: 'Add modules to a certificate',
|
|
413
|
+
description: 'Attach one or more modules to a certificate. Additive.',
|
|
414
|
+
inputShape: { instanceId: instance, id: z.string(), moduleIds: z.array(z.string()) },
|
|
415
|
+
run: runLdCertAddModules,
|
|
416
|
+
readOnly: false,
|
|
417
|
+
write: true,
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
name: 'pitcher_ld_cert_reorder_modules',
|
|
421
|
+
title: 'Reorder a certificate module',
|
|
422
|
+
description: 'Move a module to a new position within a certificate.',
|
|
423
|
+
inputShape: { instanceId: instance, id: z.string(), itemId: z.string(), newOrder: z.number().int() },
|
|
424
|
+
run: runLdCertReorderModules,
|
|
425
|
+
readOnly: false,
|
|
426
|
+
write: true,
|
|
427
|
+
},
|
|
428
|
+
{
|
|
429
|
+
name: 'pitcher_ld_cert_update_module',
|
|
430
|
+
title: 'Update a certificate module',
|
|
431
|
+
description: 'Update a module link within a certificate (e.g. isRequired).',
|
|
432
|
+
inputShape: { instanceId: instance, id: z.string(), moduleId: z.string(), isRequired: z.boolean().optional() },
|
|
433
|
+
run: runLdCertUpdateModule,
|
|
434
|
+
readOnly: false,
|
|
435
|
+
write: true,
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
name: 'pitcher_ld_cert_remove_module',
|
|
439
|
+
title: 'Remove a module from a certificate',
|
|
440
|
+
description: 'Detach a module from a certificate.',
|
|
441
|
+
inputShape: { instanceId: instance, id: z.string(), moduleId: z.string() },
|
|
442
|
+
run: runLdCertRemoveModule,
|
|
443
|
+
readOnly: false,
|
|
444
|
+
write: true,
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
name: 'pitcher_ld_cert_list_courses',
|
|
448
|
+
title: "List a certificate's courses",
|
|
449
|
+
description: 'List courses attached to a certificate.',
|
|
450
|
+
inputShape: { instanceId: instance, id: z.string() },
|
|
451
|
+
run: runLdCertListCourses,
|
|
452
|
+
readOnly: true,
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
name: 'pitcher_ld_cert_add_courses',
|
|
456
|
+
title: 'Add courses to a certificate',
|
|
457
|
+
description: 'Attach one or more courses to a certificate. Additive.',
|
|
458
|
+
inputShape: { instanceId: instance, id: z.string(), courseIds: z.array(z.string()) },
|
|
459
|
+
run: runLdCertAddCourses,
|
|
460
|
+
readOnly: false,
|
|
461
|
+
write: true,
|
|
462
|
+
},
|
|
463
|
+
{
|
|
464
|
+
name: 'pitcher_ld_cert_reorder_courses',
|
|
465
|
+
title: 'Reorder a certificate course',
|
|
466
|
+
description: 'Move a course to a new position within a certificate.',
|
|
467
|
+
inputShape: { instanceId: instance, id: z.string(), itemId: z.string(), newOrder: z.number().int() },
|
|
468
|
+
run: runLdCertReorderCourses,
|
|
469
|
+
readOnly: false,
|
|
470
|
+
write: true,
|
|
471
|
+
},
|
|
472
|
+
{
|
|
473
|
+
name: 'pitcher_ld_cert_update_course',
|
|
474
|
+
title: 'Update a certificate course',
|
|
475
|
+
description: 'Update a course link within a certificate (e.g. isRequired).',
|
|
476
|
+
inputShape: { instanceId: instance, id: z.string(), courseId: z.string(), isRequired: z.boolean().optional() },
|
|
477
|
+
run: runLdCertUpdateCourse,
|
|
478
|
+
readOnly: false,
|
|
479
|
+
write: true,
|
|
480
|
+
},
|
|
481
|
+
{
|
|
482
|
+
name: 'pitcher_ld_cert_remove_course',
|
|
483
|
+
title: 'Remove a course from a certificate',
|
|
484
|
+
description: 'Detach a course from a certificate.',
|
|
485
|
+
inputShape: { instanceId: instance, id: z.string(), courseId: z.string() },
|
|
486
|
+
run: runLdCertRemoveCourse,
|
|
487
|
+
readOnly: false,
|
|
488
|
+
write: true,
|
|
489
|
+
},
|
|
490
|
+
{
|
|
491
|
+
name: 'pitcher_ld_cert_list_assessments',
|
|
492
|
+
title: "List a certificate's assessments",
|
|
493
|
+
description: 'List assessments attached to a certificate.',
|
|
494
|
+
inputShape: { instanceId: instance, id: z.string() },
|
|
495
|
+
run: runLdCertListAssessments,
|
|
496
|
+
readOnly: true,
|
|
497
|
+
},
|
|
498
|
+
{
|
|
499
|
+
name: 'pitcher_ld_cert_add_assessments',
|
|
500
|
+
title: 'Add assessments to a certificate',
|
|
501
|
+
description: 'Attach assessments to a certificate. Pass `assessments` as an inline JSON array [{ id, isRequired? }]. Additive.',
|
|
502
|
+
inputShape: {
|
|
503
|
+
instanceId: instance,
|
|
504
|
+
id: z.string(),
|
|
505
|
+
assessments: z.string().describe('Inline JSON array of assessment links'),
|
|
506
|
+
},
|
|
507
|
+
run: runLdCertAddAssessments,
|
|
508
|
+
readOnly: false,
|
|
509
|
+
write: true,
|
|
510
|
+
},
|
|
511
|
+
{
|
|
512
|
+
name: 'pitcher_ld_cert_update_assessment',
|
|
513
|
+
title: 'Update a certificate assessment',
|
|
514
|
+
description: 'Update an assessment link within a certificate. isRequired is required by the backend.',
|
|
515
|
+
inputShape: { instanceId: instance, id: z.string(), assessmentId: z.string(), isRequired: z.boolean() },
|
|
516
|
+
run: runLdCertUpdateAssessment,
|
|
517
|
+
readOnly: false,
|
|
518
|
+
write: true,
|
|
519
|
+
},
|
|
520
|
+
{
|
|
521
|
+
name: 'pitcher_ld_cert_remove_assessment',
|
|
522
|
+
title: 'Remove an assessment from a certificate',
|
|
523
|
+
description: 'Detach an assessment from a certificate.',
|
|
524
|
+
inputShape: { instanceId: instance, id: z.string(), assessmentId: z.string() },
|
|
525
|
+
run: runLdCertRemoveAssessment,
|
|
526
|
+
readOnly: false,
|
|
527
|
+
write: true,
|
|
528
|
+
},
|
|
529
|
+
// ---- assessments ----
|
|
530
|
+
{
|
|
531
|
+
name: 'pitcher_ld_assessment_tags',
|
|
532
|
+
title: 'List L&D assessment tags',
|
|
533
|
+
description: 'List distinct assessment tags in an instance.',
|
|
534
|
+
inputShape: { instanceId: instance },
|
|
535
|
+
run: runLdAssessmentTags,
|
|
536
|
+
readOnly: true,
|
|
537
|
+
},
|
|
538
|
+
{
|
|
539
|
+
name: 'pitcher_ld_assessment_list',
|
|
540
|
+
title: 'List L&D assessments',
|
|
541
|
+
description: 'List L&D assessments in an instance. Filter by status/title.',
|
|
542
|
+
inputShape: {
|
|
543
|
+
instanceId: instance,
|
|
544
|
+
status: z.string().optional(),
|
|
545
|
+
title: z.string().optional(),
|
|
546
|
+
limit: z.number().int().optional(),
|
|
547
|
+
offset: z.number().int().optional(),
|
|
548
|
+
},
|
|
549
|
+
run: runLdAssessmentList,
|
|
550
|
+
readOnly: true,
|
|
551
|
+
},
|
|
552
|
+
{
|
|
553
|
+
name: 'pitcher_ld_assessment_get',
|
|
554
|
+
title: 'Get an L&D assessment',
|
|
555
|
+
description: 'Retrieve one L&D assessment by id.',
|
|
556
|
+
inputShape: { instanceId: instance, id: z.string() },
|
|
557
|
+
run: runLdAssessmentGet,
|
|
558
|
+
readOnly: true,
|
|
559
|
+
},
|
|
560
|
+
{
|
|
561
|
+
name: 'pitcher_ld_assessment_create',
|
|
562
|
+
title: 'Create an L&D assessment',
|
|
563
|
+
description: 'Create an L&D assessment (draft). Additive.',
|
|
564
|
+
inputShape: {
|
|
565
|
+
instanceId: instance,
|
|
566
|
+
title: z.string(),
|
|
567
|
+
description: z.string().optional(),
|
|
568
|
+
passingScore: z.number().int().optional(),
|
|
569
|
+
timeLimit: z.number().int().optional().describe('minutes'),
|
|
570
|
+
maxAttempts: z.number().int().optional(),
|
|
571
|
+
tags: z.array(z.string()).optional(),
|
|
572
|
+
},
|
|
573
|
+
run: runLdAssessmentCreate,
|
|
574
|
+
readOnly: false,
|
|
575
|
+
write: true,
|
|
576
|
+
},
|
|
577
|
+
{
|
|
578
|
+
name: 'pitcher_ld_assessment_update',
|
|
579
|
+
title: 'Update an L&D assessment',
|
|
580
|
+
description: 'Update fields on an L&D assessment. Set status to published to publish.',
|
|
581
|
+
inputShape: {
|
|
582
|
+
instanceId: instance,
|
|
583
|
+
id: z.string(),
|
|
584
|
+
title: z.string().optional(),
|
|
585
|
+
description: z.string().optional(),
|
|
586
|
+
passingScore: z.number().int().optional(),
|
|
587
|
+
timeLimit: z.number().int().optional(),
|
|
588
|
+
maxAttempts: z.number().int().optional(),
|
|
589
|
+
status: z.string().optional(),
|
|
590
|
+
tags: z.array(z.string()).optional(),
|
|
591
|
+
},
|
|
592
|
+
run: runLdAssessmentUpdate,
|
|
593
|
+
readOnly: false,
|
|
594
|
+
write: true,
|
|
595
|
+
},
|
|
596
|
+
{
|
|
597
|
+
name: 'pitcher_ld_assessment_delete',
|
|
598
|
+
title: 'Delete an L&D assessment',
|
|
599
|
+
description: 'Delete an L&D assessment.',
|
|
600
|
+
inputShape: { instanceId: instance, id: z.string() },
|
|
601
|
+
run: runLdAssessmentDelete,
|
|
602
|
+
readOnly: false,
|
|
603
|
+
write: true,
|
|
604
|
+
},
|
|
605
|
+
{
|
|
606
|
+
name: 'pitcher_ld_assessment_list_questions',
|
|
607
|
+
title: "List an assessment's questions",
|
|
608
|
+
description: 'List questions in an assessment.',
|
|
609
|
+
inputShape: { instanceId: instance, id: z.string() },
|
|
610
|
+
run: runLdAssessmentListQuestions,
|
|
611
|
+
readOnly: true,
|
|
612
|
+
},
|
|
613
|
+
{
|
|
614
|
+
name: 'pitcher_ld_assessment_add_question',
|
|
615
|
+
title: 'Add a question to an assessment',
|
|
616
|
+
description: 'Add a question to an assessment. Pass `question` as inline JSON. Additive.',
|
|
617
|
+
inputShape: { instanceId: instance, id: z.string(), question: z.string().describe('Inline question JSON') },
|
|
618
|
+
run: runLdAssessmentAddQuestion,
|
|
619
|
+
readOnly: false,
|
|
620
|
+
write: true,
|
|
621
|
+
},
|
|
622
|
+
{
|
|
623
|
+
name: 'pitcher_ld_assessment_update_question',
|
|
624
|
+
title: 'Update an assessment question',
|
|
625
|
+
description: 'Update a question in an assessment. Pass `question` as inline JSON.',
|
|
626
|
+
inputShape: {
|
|
627
|
+
instanceId: instance,
|
|
628
|
+
id: z.string(),
|
|
629
|
+
questionId: z.string(),
|
|
630
|
+
question: z.string().describe('Inline question JSON'),
|
|
631
|
+
},
|
|
632
|
+
run: runLdAssessmentUpdateQuestion,
|
|
633
|
+
readOnly: false,
|
|
634
|
+
write: true,
|
|
635
|
+
},
|
|
636
|
+
{
|
|
637
|
+
name: 'pitcher_ld_assessment_reorder_questions',
|
|
638
|
+
title: 'Reorder assessment questions',
|
|
639
|
+
description: 'Reorder the questions in an assessment by passing the full ordered id list.',
|
|
640
|
+
inputShape: { instanceId: instance, id: z.string(), questionIds: z.array(z.string()) },
|
|
641
|
+
run: runLdAssessmentReorderQuestions,
|
|
642
|
+
readOnly: false,
|
|
643
|
+
write: true,
|
|
644
|
+
},
|
|
645
|
+
{
|
|
646
|
+
name: 'pitcher_ld_assessment_delete_question',
|
|
647
|
+
title: 'Delete an assessment question',
|
|
648
|
+
description: 'Delete a question from an assessment.',
|
|
649
|
+
inputShape: { instanceId: instance, id: z.string(), questionId: z.string() },
|
|
650
|
+
run: runLdAssessmentDeleteQuestion,
|
|
651
|
+
readOnly: false,
|
|
652
|
+
write: true,
|
|
653
|
+
},
|
|
654
|
+
{
|
|
655
|
+
name: 'pitcher_ld_assessment_preview_start',
|
|
656
|
+
title: 'Start an assessment preview',
|
|
657
|
+
description: 'Start a preview attempt for an assessment (returns preview questions/session).',
|
|
658
|
+
inputShape: { instanceId: instance, id: z.string() },
|
|
659
|
+
run: runLdAssessmentPreviewStart,
|
|
660
|
+
readOnly: false,
|
|
661
|
+
write: true,
|
|
662
|
+
},
|
|
663
|
+
{
|
|
664
|
+
name: 'pitcher_ld_assessment_preview_grade',
|
|
665
|
+
title: 'Grade an assessment preview',
|
|
666
|
+
description: 'Grade a preview attempt. Pass `answers` as inline JSON.',
|
|
667
|
+
inputShape: { instanceId: instance, id: z.string(), answers: z.string().describe('Inline answers JSON') },
|
|
668
|
+
run: runLdAssessmentPreviewGrade,
|
|
669
|
+
readOnly: false,
|
|
670
|
+
write: true,
|
|
671
|
+
},
|
|
672
|
+
{
|
|
673
|
+
name: 'pitcher_ld_assessment_list_courses',
|
|
674
|
+
title: "List an assessment's courses",
|
|
675
|
+
description: 'List courses that link to an assessment.',
|
|
676
|
+
inputShape: { instanceId: instance, id: z.string() },
|
|
677
|
+
run: runLdAssessmentListCourses,
|
|
678
|
+
readOnly: true,
|
|
679
|
+
},
|
|
680
|
+
];
|