brightspace-mcp-server 3.11.1 → 3.11.3

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.
@@ -7,7 +7,7 @@ import { ApiError, NetworkError, RateLimitError } from "./errors.js";
7
7
  const JITTER_FRACTION = 0.3;
8
8
  const defaultSleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
9
9
  export async function withRetry(fn, options) {
10
- const { maxAttempts = 3, initialMs = 250, maxMs = 5000, sleep = defaultSleep, jitter = Math.random, shouldRetry, retryAfterMs, } = options;
10
+ const { maxAttempts = 3, initialMs = 250, maxMs = 5000, maxRetryAfterMs = 30_000, sleep = defaultSleep, jitter = Math.random, shouldRetry, retryAfterMs, } = options;
11
11
  for (let attempt = 1;; attempt++) {
12
12
  try {
13
13
  return await fn();
@@ -18,6 +18,8 @@ export async function withRetry(fn, options) {
18
18
  const requested = retryAfterMs?.(error);
19
19
  let delay;
20
20
  if (requested !== undefined) {
21
+ if (requested > maxRetryAfterMs)
22
+ throw error;
21
23
  delay = requested;
22
24
  }
23
25
  else {
@@ -114,7 +114,9 @@ export async function buildContentTree(apiClient, courseId, modules, progressMap
114
114
  type: 'module',
115
115
  id: item.Id,
116
116
  title: item.Title,
117
- description: item.Description?.Text ?? null,
117
+ description: item.Description?.Html?.trim()
118
+ ? convertHtmlToMarkdown(item.Description.Html).markdown
119
+ : item.Description?.Text ?? null,
118
120
  ...(item.ModuleDueDate ? { dueDate: item.ModuleDueDate } : {}),
119
121
  ...(item.IsHidden ? { isHidden: item.IsHidden } : {}),
120
122
  ...(item.IsLocked ? { isLocked: item.IsLocked } : {}),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "brightspace-mcp-server",
3
- "version": "3.11.1",
3
+ "version": "3.11.3",
4
4
  "mcpName": "io.github.RohanMuppa/brightspace",
5
5
  "description": "MCP server for Brightspace (D2L). Check grades, due dates, assignments, announcements, syllabus, rosters and more via Claude, ChatGPT, Cursor, Windsurf, or any MCP client.",
6
6
  "type": "module",
@@ -42,7 +42,7 @@
42
42
  "@types/node": "^22.0.0",
43
43
  "@types/turndown": "^5.0.6",
44
44
  "typescript": "^5.9.0",
45
- "vitest": "^4.0.0"
45
+ "vitest": "^5.0.3"
46
46
  },
47
47
  "engines": {
48
48
  "node": ">=20.0.0"