@claudeink/mcp-server 0.3.0 → 0.4.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/dist/index.js +38 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1389,7 +1389,42 @@ async function syncPush(input) {
|
|
|
1389
1389
|
} catch {
|
|
1390
1390
|
}
|
|
1391
1391
|
}
|
|
1392
|
-
const
|
|
1392
|
+
const configs = [];
|
|
1393
|
+
try {
|
|
1394
|
+
const baseRules = await readFile6(join8(workDir, "base-rules.md"), "utf-8");
|
|
1395
|
+
configs.push({ type: "base_rules", name: "base", displayName: "\u901A\u7528\u5E95\u5EA7", content: baseRules });
|
|
1396
|
+
} catch {
|
|
1397
|
+
}
|
|
1398
|
+
try {
|
|
1399
|
+
const platformFiles = await glob4("platforms/*.md", { cwd: workDir });
|
|
1400
|
+
for (const file of platformFiles) {
|
|
1401
|
+
const content = await readFile6(join8(workDir, file), "utf-8");
|
|
1402
|
+
const name = basename2(file, ".md");
|
|
1403
|
+
const displayNames = {
|
|
1404
|
+
wechat: "\u5FAE\u4FE1\u516C\u4F17\u53F7",
|
|
1405
|
+
xiaohongshu: "\u5C0F\u7EA2\u4E66",
|
|
1406
|
+
"x-twitter": "X (Twitter)",
|
|
1407
|
+
toutiao: "\u5934\u6761\u53F7",
|
|
1408
|
+
blog: "\u4E2A\u4EBA\u535A\u5BA2"
|
|
1409
|
+
};
|
|
1410
|
+
configs.push({ type: "platform", name, displayName: displayNames[name] || name, content });
|
|
1411
|
+
}
|
|
1412
|
+
} catch {
|
|
1413
|
+
}
|
|
1414
|
+
for (const [accId, acc] of Object.entries(accounts)) {
|
|
1415
|
+
try {
|
|
1416
|
+
const content = await readFile6(join8(workDir, `accounts/${accId}.yaml`), "utf-8");
|
|
1417
|
+
configs.push({
|
|
1418
|
+
type: "account",
|
|
1419
|
+
name: accId,
|
|
1420
|
+
displayName: acc.name,
|
|
1421
|
+
content,
|
|
1422
|
+
metadata: { platform: acc.platform }
|
|
1423
|
+
});
|
|
1424
|
+
} catch {
|
|
1425
|
+
}
|
|
1426
|
+
}
|
|
1427
|
+
const payload = { sources, drafts, published, analytics: [], configs };
|
|
1393
1428
|
try {
|
|
1394
1429
|
const res = await fetch(`${config.apiBaseUrl}/api/sync/batch`, {
|
|
1395
1430
|
method: "POST",
|
|
@@ -1408,12 +1443,14 @@ async function syncPush(input) {
|
|
|
1408
1443
|
` \u7D20\u6750: ${sources.length} \u7BC7`,
|
|
1409
1444
|
` \u8349\u7A3F: ${drafts.length} \u7BC7`,
|
|
1410
1445
|
` \u5DF2\u53D1\u5E03: ${published.length} \u7BC7`,
|
|
1446
|
+
` \u914D\u7F6E: ${configs.length} \u4E2A\uFF08\u901A\u7528\u5E95\u5EA7 + \u5E73\u53F0\u89C4\u5219 + \u8D26\u53F7\u914D\u7F6E\uFF09`,
|
|
1411
1447
|
` \u4E91\u7AEF\u63A5\u53D7: ${result.accepted || 0} \u6761`
|
|
1412
1448
|
].join("\n"),
|
|
1413
1449
|
data: {
|
|
1414
1450
|
sources: sources.length,
|
|
1415
1451
|
drafts: drafts.length,
|
|
1416
1452
|
published: published.length,
|
|
1453
|
+
configs: configs.length,
|
|
1417
1454
|
accepted: result.accepted || 0
|
|
1418
1455
|
}
|
|
1419
1456
|
};
|