@de-otio/epimethian-mcp 5.4.0 → 5.4.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/cli/index.js +17 -8
- package/dist/cli/index.js.map +2 -2
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -49324,7 +49324,7 @@ async function getPage(pageId, includeBody) {
|
|
|
49324
49324
|
async function createPage(spaceId, title, body, parentId, clientLabel) {
|
|
49325
49325
|
const cfg = await getConfig();
|
|
49326
49326
|
const pageBody = stripAttributionFooter(toStorageFormat(body));
|
|
49327
|
-
const epimethianTag = `Epimethian v${"5.4.
|
|
49327
|
+
const epimethianTag = `Epimethian v${"5.4.2"}`;
|
|
49328
49328
|
const versionMsg = cfg.attribution && clientLabel ? `Created by ${clientLabel} (via ${epimethianTag})` : `Created by ${epimethianTag}`;
|
|
49329
49329
|
const payload = {
|
|
49330
49330
|
title,
|
|
@@ -49349,7 +49349,7 @@ async function createPage(spaceId, title, body, parentId, clientLabel) {
|
|
|
49349
49349
|
async function updatePage(pageId, opts) {
|
|
49350
49350
|
const cfg = await getConfig();
|
|
49351
49351
|
const newVersion = opts.version + 1;
|
|
49352
|
-
const epimethianTag = `Epimethian v${"5.4.
|
|
49352
|
+
const epimethianTag = `Epimethian v${"5.4.2"}`;
|
|
49353
49353
|
const effectiveClient = cfg.attribution ? opts.clientLabel : void 0;
|
|
49354
49354
|
let versionMessage;
|
|
49355
49355
|
if (opts.versionMessage && effectiveClient)
|
|
@@ -57300,6 +57300,14 @@ function registerTools(server, config3) {
|
|
|
57300
57300
|
});
|
|
57301
57301
|
}
|
|
57302
57302
|
const spaceId = await resolveSpaceId(space_key);
|
|
57303
|
+
const existing = await getPageByTitle(spaceId, title, false);
|
|
57304
|
+
if (existing) {
|
|
57305
|
+
return toolError(
|
|
57306
|
+
new Error(
|
|
57307
|
+
`A page titled "${title}" already exists in this space (page ID: ${existing.id}). Creating another page with the same title would produce a confusing duplicate. If you intend to modify the existing page, call get_page with ID ${existing.id} first to review its current content before deciding whether to update it.`
|
|
57308
|
+
)
|
|
57309
|
+
);
|
|
57310
|
+
}
|
|
57303
57311
|
const page = await createPage(spaceId, title, finalBody, parent_id, getClientLabel(server));
|
|
57304
57312
|
logMutation({
|
|
57305
57313
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -57548,7 +57556,7 @@ ${truncated}`);
|
|
|
57548
57556
|
inputSchema: {
|
|
57549
57557
|
page_id: external_exports.string().describe("The Confluence page ID"),
|
|
57550
57558
|
section: external_exports.string().describe("Heading text identifying the section to replace (case-insensitive)"),
|
|
57551
|
-
body: external_exports.string().describe("New content for this section
|
|
57559
|
+
body: external_exports.string().describe("New content for this section \u2014 GFM markdown or Confluence storage format. Markdown is auto-detected and converted. The heading itself is preserved; only content under it is replaced."),
|
|
57552
57560
|
version: external_exports.number().int().positive().describe("The page version number from your most recent get_page call"),
|
|
57553
57561
|
version_message: external_exports.string().optional().describe("Optional version comment")
|
|
57554
57562
|
},
|
|
@@ -57566,7 +57574,8 @@ ${truncated}`);
|
|
|
57566
57574
|
}
|
|
57567
57575
|
const page = await getPage(page_id, true);
|
|
57568
57576
|
const fullBody = page.body?.storage?.value ?? page.body?.value ?? "";
|
|
57569
|
-
const
|
|
57577
|
+
const sectionStorage = looksLikeMarkdown(body) ? markdownToStorage(body) : body;
|
|
57578
|
+
const newFullBody = replaceSection(fullBody, section, sectionStorage);
|
|
57570
57579
|
if (newFullBody === null) {
|
|
57571
57580
|
return toolResult(
|
|
57572
57581
|
`Section "${section}" not found. Use headings_only to see available sections.`
|
|
@@ -58624,7 +58633,7 @@ ${lines.join("\n")}${echo2}`
|
|
|
58624
58633
|
inputSchema: {}
|
|
58625
58634
|
},
|
|
58626
58635
|
async () => {
|
|
58627
|
-
let text2 = `epimethian-mcp v${"5.4.
|
|
58636
|
+
let text2 = `epimethian-mcp v${"5.4.2"}`;
|
|
58628
58637
|
try {
|
|
58629
58638
|
const pending = await getPendingUpdate();
|
|
58630
58639
|
if (pending) {
|
|
@@ -58654,7 +58663,7 @@ ${pending.type === "major" ? "Major" : "Minor"} update available: v${pending.cur
|
|
|
58654
58663
|
const pending = await getPendingUpdate();
|
|
58655
58664
|
if (!pending) {
|
|
58656
58665
|
return toolResult(
|
|
58657
|
-
`epimethian-mcp v${"5.4.
|
|
58666
|
+
`epimethian-mcp v${"5.4.2"} is already up to date.`
|
|
58658
58667
|
);
|
|
58659
58668
|
}
|
|
58660
58669
|
const output = await performUpgrade(pending.latest);
|
|
@@ -58682,12 +58691,12 @@ async function main() {
|
|
|
58682
58691
|
const serverName = config3.profile ? `confluence-${config3.profile}` : "confluence";
|
|
58683
58692
|
const server = new McpServer({
|
|
58684
58693
|
name: serverName,
|
|
58685
|
-
version: "5.4.
|
|
58694
|
+
version: "5.4.2"
|
|
58686
58695
|
});
|
|
58687
58696
|
registerTools(server, config3);
|
|
58688
58697
|
const transport = new StdioServerTransport();
|
|
58689
58698
|
await server.connect(transport);
|
|
58690
|
-
checkForUpdates("5.4.
|
|
58699
|
+
checkForUpdates("5.4.2").catch(() => {
|
|
58691
58700
|
});
|
|
58692
58701
|
}
|
|
58693
58702
|
|