@knowsuchagency/fulcrum 2.5.2 → 2.5.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.
- package/bin/fulcrum.js +3 -3
- package/package.json +1 -1
- package/server/index.js +93 -11
package/bin/fulcrum.js
CHANGED
|
@@ -45641,7 +45641,7 @@ async function runMcpServer(urlOverride, portOverride) {
|
|
|
45641
45641
|
const client = new FulcrumClient(urlOverride, portOverride);
|
|
45642
45642
|
const server = new McpServer({
|
|
45643
45643
|
name: "fulcrum",
|
|
45644
|
-
version: "2.5.
|
|
45644
|
+
version: "2.5.3"
|
|
45645
45645
|
});
|
|
45646
45646
|
registerTools(server, client);
|
|
45647
45647
|
const transport = new StdioServerTransport;
|
|
@@ -47990,7 +47990,7 @@ var marketplace_default = `{
|
|
|
47990
47990
|
"name": "fulcrum",
|
|
47991
47991
|
"source": "./",
|
|
47992
47992
|
"description": "Task orchestration for Claude Code",
|
|
47993
|
-
"version": "2.5.
|
|
47993
|
+
"version": "2.5.3",
|
|
47994
47994
|
"skills": [
|
|
47995
47995
|
"./skills/fulcrum"
|
|
47996
47996
|
],
|
|
@@ -49178,7 +49178,7 @@ function compareVersions(v1, v2) {
|
|
|
49178
49178
|
var package_default = {
|
|
49179
49179
|
name: "@knowsuchagency/fulcrum",
|
|
49180
49180
|
private: true,
|
|
49181
|
-
version: "2.5.
|
|
49181
|
+
version: "2.5.3",
|
|
49182
49182
|
description: "Harness Attention. Orchestrate Agents. Ship.",
|
|
49183
49183
|
license: "PolyForm-Perimeter-1.0.0",
|
|
49184
49184
|
type: "module",
|
package/package.json
CHANGED
package/server/index.js
CHANGED
|
@@ -409304,7 +409304,56 @@ var init_imap_flow = __esm(() => {
|
|
|
409304
409304
|
});
|
|
409305
409305
|
|
|
409306
409306
|
// server/services/channels/email-types.ts
|
|
409307
|
-
|
|
409307
|
+
function isAutomatedEmail(headers) {
|
|
409308
|
+
if (headers.autoSubmitted && headers.autoSubmitted.toLowerCase() !== "no") {
|
|
409309
|
+
return {
|
|
409310
|
+
isAutomated: true,
|
|
409311
|
+
reason: `Auto-Submitted header: ${headers.autoSubmitted}`
|
|
409312
|
+
};
|
|
409313
|
+
}
|
|
409314
|
+
if (headers.precedence) {
|
|
409315
|
+
const precedenceLower = headers.precedence.toLowerCase();
|
|
409316
|
+
if (AUTOMATED_PRECEDENCE_VALUES.includes(precedenceLower)) {
|
|
409317
|
+
return {
|
|
409318
|
+
isAutomated: true,
|
|
409319
|
+
reason: `Precedence header: ${headers.precedence}`
|
|
409320
|
+
};
|
|
409321
|
+
}
|
|
409322
|
+
}
|
|
409323
|
+
if (headers.listUnsubscribe) {
|
|
409324
|
+
return {
|
|
409325
|
+
isAutomated: true,
|
|
409326
|
+
reason: "List-Unsubscribe header present"
|
|
409327
|
+
};
|
|
409328
|
+
}
|
|
409329
|
+
if (headers.xAutoResponseSuppress) {
|
|
409330
|
+
return {
|
|
409331
|
+
isAutomated: true,
|
|
409332
|
+
reason: `X-Auto-Response-Suppress header: ${headers.xAutoResponseSuppress}`
|
|
409333
|
+
};
|
|
409334
|
+
}
|
|
409335
|
+
if (headers.returnPath !== null) {
|
|
409336
|
+
const returnPathTrimmed = headers.returnPath.trim();
|
|
409337
|
+
if (returnPathTrimmed === "<>" || returnPathTrimmed === "") {
|
|
409338
|
+
return {
|
|
409339
|
+
isAutomated: true,
|
|
409340
|
+
reason: "Empty Return-Path (bounce/delivery notification)"
|
|
409341
|
+
};
|
|
409342
|
+
}
|
|
409343
|
+
}
|
|
409344
|
+
if (headers.from) {
|
|
409345
|
+
for (const pattern of AUTOMATED_SENDER_PATTERNS) {
|
|
409346
|
+
if (pattern.test(headers.from)) {
|
|
409347
|
+
return {
|
|
409348
|
+
isAutomated: true,
|
|
409349
|
+
reason: `Sender matches automated pattern: ${headers.from}`
|
|
409350
|
+
};
|
|
409351
|
+
}
|
|
409352
|
+
}
|
|
409353
|
+
}
|
|
409354
|
+
return { isAutomated: false };
|
|
409355
|
+
}
|
|
409356
|
+
var SIGNATURE_PATTERNS, QUOTED_REPLY_PATTERNS, AUTOMATED_SENDER_PATTERNS, AUTOMATED_PRECEDENCE_VALUES;
|
|
409308
409357
|
var init_email_types = __esm(() => {
|
|
409309
409358
|
SIGNATURE_PATTERNS = [
|
|
409310
409359
|
/^--\s*$/m,
|
|
@@ -409321,6 +409370,23 @@ var init_email_types = __esm(() => {
|
|
|
409321
409370
|
/^To: .+$/m,
|
|
409322
409371
|
/^Subject: .+$/m
|
|
409323
409372
|
];
|
|
409373
|
+
AUTOMATED_SENDER_PATTERNS = [
|
|
409374
|
+
/^noreply@/i,
|
|
409375
|
+
/^no-reply@/i,
|
|
409376
|
+
/^do-not-reply@/i,
|
|
409377
|
+
/^donotreply@/i,
|
|
409378
|
+
/^mailer-daemon@/i,
|
|
409379
|
+
/^postmaster@/i,
|
|
409380
|
+
/^bounces?@/i,
|
|
409381
|
+
/^notifications?@/i,
|
|
409382
|
+
/^alerts?@/i,
|
|
409383
|
+
/^daemon@/i,
|
|
409384
|
+
/^auto@/i,
|
|
409385
|
+
/^automated@/i,
|
|
409386
|
+
/^system@/i,
|
|
409387
|
+
/^info@.*\.noreply\./i
|
|
409388
|
+
];
|
|
409389
|
+
AUTOMATED_PRECEDENCE_VALUES = ["bulk", "junk", "list", "auto_reply"];
|
|
409324
409390
|
});
|
|
409325
409391
|
|
|
409326
409392
|
// server/services/channels/email-parser.ts
|
|
@@ -409357,7 +409423,12 @@ function parseEmailHeaders(source, envelope) {
|
|
|
409357
409423
|
to: parseAddresses(getHeader2("To")),
|
|
409358
409424
|
cc: parseAddresses(getHeader2("Cc")),
|
|
409359
409425
|
subject: envelope?.subject || getHeader2("Subject"),
|
|
409360
|
-
date: envelope?.date ? new Date(envelope.date) : null
|
|
409426
|
+
date: envelope?.date ? new Date(envelope.date) : null,
|
|
409427
|
+
autoSubmitted: getHeader2("Auto-Submitted"),
|
|
409428
|
+
precedence: getHeader2("Precedence"),
|
|
409429
|
+
listUnsubscribe: getHeader2("List-Unsubscribe"),
|
|
409430
|
+
xAutoResponseSuppress: getHeader2("X-Auto-Response-Suppress"),
|
|
409431
|
+
returnPath: getHeader2("Return-Path")
|
|
409361
409432
|
};
|
|
409362
409433
|
}
|
|
409363
409434
|
async function parseEmailContent(source, connectionId) {
|
|
@@ -409822,14 +409893,24 @@ class EmailChannel {
|
|
|
409822
409893
|
}
|
|
409823
409894
|
const authResult = await checkAuthorization(this.connectionId, headers, this.credentials?.allowedSenders || [], this.credentials?.smtp.user.toLowerCase());
|
|
409824
409895
|
if (!authResult.authorized) {
|
|
409825
|
-
|
|
409826
|
-
|
|
409827
|
-
|
|
409828
|
-
|
|
409829
|
-
|
|
409830
|
-
|
|
409831
|
-
|
|
409832
|
-
|
|
409896
|
+
const automatedCheck = isAutomatedEmail(headers);
|
|
409897
|
+
if (automatedCheck.isAutomated) {
|
|
409898
|
+
log2.messaging.info("Email skipped - automated sender", {
|
|
409899
|
+
connectionId: this.connectionId,
|
|
409900
|
+
from: headers.from,
|
|
409901
|
+
subject: headers.subject,
|
|
409902
|
+
reason: automatedCheck.reason
|
|
409903
|
+
});
|
|
409904
|
+
} else {
|
|
409905
|
+
log2.messaging.info("Email rejected - not authorized", {
|
|
409906
|
+
connectionId: this.connectionId,
|
|
409907
|
+
from: headers.from,
|
|
409908
|
+
subject: headers.subject,
|
|
409909
|
+
reason: authResult.reason
|
|
409910
|
+
});
|
|
409911
|
+
if (this.transporter) {
|
|
409912
|
+
await sendUnauthorizedResponse(this.transporter, this.connectionId, this.getFromAddress(), headers, this.credentials?.bcc);
|
|
409913
|
+
}
|
|
409833
409914
|
}
|
|
409834
409915
|
await client3.messageFlagsAdd({ uid: message.uid }, ["\\Seen"]);
|
|
409835
409916
|
continue;
|
|
@@ -410099,6 +410180,7 @@ var init_email_channel = __esm(() => {
|
|
|
410099
410180
|
init_email_auth();
|
|
410100
410181
|
init_email_storage();
|
|
410101
410182
|
init_email_sender();
|
|
410183
|
+
init_email_types();
|
|
410102
410184
|
});
|
|
410103
410185
|
|
|
410104
410186
|
// server/services/channels/channel-manager.ts
|
|
@@ -463858,7 +463940,7 @@ mcpRoutes.all("/", async (c) => {
|
|
|
463858
463940
|
});
|
|
463859
463941
|
const server = new McpServer({
|
|
463860
463942
|
name: "fulcrum",
|
|
463861
|
-
version: "2.5.
|
|
463943
|
+
version: "2.5.3"
|
|
463862
463944
|
});
|
|
463863
463945
|
const client = new FulcrumClient(`http://localhost:${port}`);
|
|
463864
463946
|
registerTools(server, client);
|