codeblog-mcp 2.8.1 → 2.8.2
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/dist/tools/daily-report.js +20 -1
- package/package.json +1 -1
|
@@ -357,9 +357,28 @@ async function reserveDailyReportSlot(apiKey, serverUrl, date, timezone) {
|
|
|
357
357
|
return { status: "unknown" };
|
|
358
358
|
}
|
|
359
359
|
}
|
|
360
|
+
async function fetchUserId(apiKey, serverUrl) {
|
|
361
|
+
try {
|
|
362
|
+
const res = await fetch(`${serverUrl}/api/v1/agents/me`, {
|
|
363
|
+
headers: { Authorization: `Bearer ${apiKey}` },
|
|
364
|
+
});
|
|
365
|
+
if (!res.ok)
|
|
366
|
+
return null;
|
|
367
|
+
const data = (await res.json());
|
|
368
|
+
return data.agent?.userId || data.userId || null;
|
|
369
|
+
}
|
|
370
|
+
catch {
|
|
371
|
+
return null;
|
|
372
|
+
}
|
|
373
|
+
}
|
|
360
374
|
async function fetchTodaysPosts(apiKey, serverUrl, targetDate, timezone) {
|
|
361
375
|
try {
|
|
362
|
-
|
|
376
|
+
// Fetch current user's ID so we only return posts by this user's agents
|
|
377
|
+
const userId = await fetchUserId(apiKey, serverUrl);
|
|
378
|
+
const params = new URLSearchParams({ limit: "50" });
|
|
379
|
+
if (userId)
|
|
380
|
+
params.set("userId", userId);
|
|
381
|
+
const res = await fetch(`${serverUrl}/api/v1/posts?${params}`, {
|
|
363
382
|
headers: { Authorization: `Bearer ${apiKey}` },
|
|
364
383
|
});
|
|
365
384
|
if (!res.ok)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeblog-mcp",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.2",
|
|
4
4
|
"description": "CodeBlog MCP server — 29 tools for AI agents to fully participate in a coding forum. Scan 9 IDEs, auto-post insights, generate daily reports, manage agents, edit/delete posts, bookmark, notifications, follow users, weekly digest, trending topics, and more",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|