@de-otio/epimethian-mcp 6.1.1 → 6.2.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/cli/index.js +15 -15
- package/dist/cli/index.js.map +2 -2
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -35442,7 +35442,7 @@ async function getPage(pageId, includeBody) {
|
|
|
35442
35442
|
async function _rawCreatePage(spaceId, title, body, parentId, clientLabel) {
|
|
35443
35443
|
const cfg = await getConfig();
|
|
35444
35444
|
const pageBody = normalizeBodyForSubmit(body);
|
|
35445
|
-
const epimethianTag = `Epimethian v${"6.
|
|
35445
|
+
const epimethianTag = `Epimethian v${"6.2.0"}`;
|
|
35446
35446
|
const versionMsg = cfg.attribution && clientLabel ? `Created by ${clientLabel} (via ${epimethianTag})` : `Created by ${epimethianTag}`;
|
|
35447
35447
|
const payload = {
|
|
35448
35448
|
title,
|
|
@@ -35463,7 +35463,7 @@ async function _rawCreatePage(spaceId, title, body, parentId, clientLabel) {
|
|
|
35463
35463
|
async function _rawUpdatePage(pageId, opts) {
|
|
35464
35464
|
const cfg = await getConfig();
|
|
35465
35465
|
const newVersion = opts.version + 1;
|
|
35466
|
-
const epimethianTag = `Epimethian v${"6.
|
|
35466
|
+
const epimethianTag = `Epimethian v${"6.2.0"}`;
|
|
35467
35467
|
const effectiveClient = cfg.attribution ? opts.clientLabel : void 0;
|
|
35468
35468
|
let versionMessage;
|
|
35469
35469
|
if (opts.versionMessage && effectiveClient)
|
|
@@ -47082,11 +47082,11 @@ function parseBudget(envValue, fallback) {
|
|
|
47082
47082
|
}
|
|
47083
47083
|
return n;
|
|
47084
47084
|
}
|
|
47085
|
-
var
|
|
47085
|
+
var WINDOW_MS, DEFAULT_SESSION_BUDGET, DEFAULT_HOURLY_BUDGET, WriteBudget, WRITE_BUDGET_EXCEEDED, WriteBudgetExceededError, writeBudget;
|
|
47086
47086
|
var init_write_budget = __esm({
|
|
47087
47087
|
"src/server/write-budget.ts"() {
|
|
47088
47088
|
"use strict";
|
|
47089
|
-
|
|
47089
|
+
WINDOW_MS = 15 * 60 * 1e3;
|
|
47090
47090
|
DEFAULT_SESSION_BUDGET = 100;
|
|
47091
47091
|
DEFAULT_HOURLY_BUDGET = 25;
|
|
47092
47092
|
WriteBudget = class {
|
|
@@ -47113,7 +47113,7 @@ var init_write_budget = __esm({
|
|
|
47113
47113
|
*/
|
|
47114
47114
|
consume() {
|
|
47115
47115
|
const now = Date.now();
|
|
47116
|
-
const cutoff = now -
|
|
47116
|
+
const cutoff = now - WINDOW_MS;
|
|
47117
47117
|
this.hourlyTimestamps = this.hourlyTimestamps.filter((ts) => ts >= cutoff);
|
|
47118
47118
|
const sessionLimit = this.sessionLimit;
|
|
47119
47119
|
if (sessionLimit > 0 && this.sessionCount >= sessionLimit) {
|
|
@@ -47127,10 +47127,10 @@ var init_write_budget = __esm({
|
|
|
47127
47127
|
const hourlyLimit = this.hourlyLimit;
|
|
47128
47128
|
if (hourlyLimit > 0 && this.hourlyTimestamps.length >= hourlyLimit) {
|
|
47129
47129
|
const oldest = this.hourlyTimestamps[0];
|
|
47130
|
-
const waitMs = Math.max(0, oldest +
|
|
47130
|
+
const waitMs = Math.max(0, oldest + WINDOW_MS - now);
|
|
47131
47131
|
const waitMin = Math.ceil(waitMs / 6e4);
|
|
47132
47132
|
throw new WriteBudgetExceededError(
|
|
47133
|
-
`
|
|
47133
|
+
`Rolling write budget exhausted: ${this.hourlyTimestamps.length} writes in the last 15 min, limit ${hourlyLimit}. Window opens again in ~${waitMin} min. Raise the cap with EPIMETHIAN_WRITE_BUDGET_HOURLY=<n> (or 0 to disable).`,
|
|
47134
47134
|
"hourly",
|
|
47135
47135
|
this.hourlyTimestamps.length,
|
|
47136
47136
|
hourlyLimit
|
|
@@ -47146,7 +47146,7 @@ var init_write_budget = __esm({
|
|
|
47146
47146
|
/** Current hourly counter (for observability). */
|
|
47147
47147
|
get hourly() {
|
|
47148
47148
|
const now = Date.now();
|
|
47149
|
-
const cutoff = now -
|
|
47149
|
+
const cutoff = now - WINDOW_MS;
|
|
47150
47150
|
this.hourlyTimestamps = this.hourlyTimestamps.filter((ts) => ts >= cutoff);
|
|
47151
47151
|
return this.hourlyTimestamps.length;
|
|
47152
47152
|
}
|
|
@@ -48704,7 +48704,7 @@ __export(upgrade_exports, {
|
|
|
48704
48704
|
runUpgrade: () => runUpgrade
|
|
48705
48705
|
});
|
|
48706
48706
|
async function runUpgrade() {
|
|
48707
|
-
const currentVersion = "6.
|
|
48707
|
+
const currentVersion = "6.2.0";
|
|
48708
48708
|
console.log(`epimethian-mcp upgrade: current version v${currentVersion}`);
|
|
48709
48709
|
let pending = await getPendingUpdate();
|
|
48710
48710
|
if (!pending) {
|
|
@@ -61787,7 +61787,7 @@ ${titleFenced}${echo2}`
|
|
|
61787
61787
|
inputSchema: {}
|
|
61788
61788
|
},
|
|
61789
61789
|
async () => {
|
|
61790
|
-
let text2 = `epimethian-mcp v${"6.
|
|
61790
|
+
let text2 = `epimethian-mcp v${"6.2.0"}`;
|
|
61791
61791
|
try {
|
|
61792
61792
|
const pending = await getPendingUpdate();
|
|
61793
61793
|
if (pending) {
|
|
@@ -61818,7 +61818,7 @@ ${label} update available: v${pending.current} \u2192 v${pending.latest}. Run \`
|
|
|
61818
61818
|
const pending = await getPendingUpdate();
|
|
61819
61819
|
if (!pending) {
|
|
61820
61820
|
return toolResult(
|
|
61821
|
-
`epimethian-mcp v${"6.
|
|
61821
|
+
`epimethian-mcp v${"6.2.0"} is already up to date.`
|
|
61822
61822
|
);
|
|
61823
61823
|
}
|
|
61824
61824
|
const output = await performUpgrade(pending.latest);
|
|
@@ -61840,7 +61840,7 @@ async function startRecoveryServer(profile) {
|
|
|
61840
61840
|
const server = new McpServer(
|
|
61841
61841
|
{
|
|
61842
61842
|
name: `confluence-${profile}-setup-needed`,
|
|
61843
|
-
version: "6.
|
|
61843
|
+
version: "6.2.0"
|
|
61844
61844
|
},
|
|
61845
61845
|
{
|
|
61846
61846
|
instructions: `The Confluence profile "${profile}" referenced by CONFLUENCE_PROFILE has no keychain entry, so no Confluence tools are available. Call the setup_profile tool for instructions to create it.`
|
|
@@ -61891,21 +61891,21 @@ async function main() {
|
|
|
61891
61891
|
const serverName = config3.profile ? `confluence-${config3.profile}` : "confluence";
|
|
61892
61892
|
const server = new McpServer({
|
|
61893
61893
|
name: serverName,
|
|
61894
|
-
version: "6.
|
|
61894
|
+
version: "6.2.0"
|
|
61895
61895
|
});
|
|
61896
61896
|
await registerTools(server, config3);
|
|
61897
61897
|
const transport = new StdioServerTransport();
|
|
61898
61898
|
await server.connect(transport);
|
|
61899
61899
|
try {
|
|
61900
61900
|
const pending = await getPendingUpdate();
|
|
61901
|
-
if (pending && pending.current === "6.
|
|
61901
|
+
if (pending && pending.current === "6.2.0") {
|
|
61902
61902
|
console.error(
|
|
61903
61903
|
`epimethian-mcp: update available: v${pending.current} \u2192 v${pending.latest} (${pending.type}). Run \`epimethian-mcp upgrade\` to install.`
|
|
61904
61904
|
);
|
|
61905
61905
|
}
|
|
61906
61906
|
} catch {
|
|
61907
61907
|
}
|
|
61908
|
-
checkForUpdates("6.
|
|
61908
|
+
checkForUpdates("6.2.0").catch(() => {
|
|
61909
61909
|
});
|
|
61910
61910
|
}
|
|
61911
61911
|
|