@ferscloud/fers-mcp 2.83.1 → 2.85.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/fers-mcp.cjs +82 -21
- package/package.json +2 -2
package/dist/fers-mcp.cjs
CHANGED
|
@@ -21940,7 +21940,7 @@ var openapi_default = {
|
|
|
21940
21940
|
name: "PolyForm-Strict-1.0.0",
|
|
21941
21941
|
url: "https://polyformproject.org/licenses/strict/1.0.0"
|
|
21942
21942
|
},
|
|
21943
|
-
version: "0.2.
|
|
21943
|
+
version: "0.2.85"
|
|
21944
21944
|
},
|
|
21945
21945
|
paths: {},
|
|
21946
21946
|
components: {
|
|
@@ -45306,6 +45306,23 @@ function nodalSupport(id, x, y, rz) {
|
|
|
45306
45306
|
warping_condition: null
|
|
45307
45307
|
};
|
|
45308
45308
|
}
|
|
45309
|
+
function ec3MemberCheck(ltb = true) {
|
|
45310
|
+
return {
|
|
45311
|
+
id: "ec3",
|
|
45312
|
+
name: "EN 1993-1-1 member check",
|
|
45313
|
+
applies_to: { type: "AllMembers" },
|
|
45314
|
+
spec: {
|
|
45315
|
+
Ec3Steel: {
|
|
45316
|
+
gamma_m0: 1,
|
|
45317
|
+
gamma_m1: 1,
|
|
45318
|
+
include_buckling: true,
|
|
45319
|
+
include_ltb: ltb,
|
|
45320
|
+
interaction_method: "AnnexB"
|
|
45321
|
+
}
|
|
45322
|
+
},
|
|
45323
|
+
limit_state: "ULS"
|
|
45324
|
+
};
|
|
45325
|
+
}
|
|
45309
45326
|
function memberRecord(id, startNode, endNode, sectionId) {
|
|
45310
45327
|
return {
|
|
45311
45328
|
id,
|
|
@@ -45758,23 +45775,7 @@ function buildCheckBeam(p, resolve = getSteelSection) {
|
|
|
45758
45775
|
}
|
|
45759
45776
|
],
|
|
45760
45777
|
imperfection_cases: [],
|
|
45761
|
-
unity_checks: [
|
|
45762
|
-
{
|
|
45763
|
-
id: "ec3",
|
|
45764
|
-
name: "EN 1993-1-1 member check",
|
|
45765
|
-
applies_to: { type: "AllMembers" },
|
|
45766
|
-
spec: {
|
|
45767
|
-
Ec3Steel: {
|
|
45768
|
-
gamma_m0: 1,
|
|
45769
|
-
gamma_m1: 1,
|
|
45770
|
-
include_buckling: true,
|
|
45771
|
-
include_ltb: !(p.restrained ?? false),
|
|
45772
|
-
interaction_method: "AnnexB"
|
|
45773
|
-
}
|
|
45774
|
-
},
|
|
45775
|
-
limit_state: "ULS"
|
|
45776
|
-
}
|
|
45777
|
-
]
|
|
45778
|
+
unity_checks: [ec3MemberCheck(!(p.restrained ?? false))]
|
|
45778
45779
|
}
|
|
45779
45780
|
};
|
|
45780
45781
|
}
|
|
@@ -79105,6 +79106,32 @@ function memberIdsOf(model) {
|
|
|
79105
79106
|
for (const s of model.model.member_sets) push(s?.members);
|
|
79106
79107
|
return out;
|
|
79107
79108
|
}
|
|
79109
|
+
var CABLE_SPAN_LOAD = "A cable takes no load along its span: its own weight is in the catenary, and any other load there would reach neither its force nor its sag. Apply the load to nodes instead";
|
|
79110
|
+
function isCable(model, memberId) {
|
|
79111
|
+
const sets = Array.isArray(model.model?.member_sets) ? model.model.member_sets : [];
|
|
79112
|
+
const members = [
|
|
79113
|
+
...Array.isArray(model.model?.members) ? model.model.members : [],
|
|
79114
|
+
...sets.flatMap((s) => Array.isArray(s?.members) ? s.members : [])
|
|
79115
|
+
];
|
|
79116
|
+
return members.some((m) => m?.id === memberId && m?.member_type === "Cable");
|
|
79117
|
+
}
|
|
79118
|
+
function spanLoadsOn(model, memberIds) {
|
|
79119
|
+
const ids = new Set(memberIds);
|
|
79120
|
+
const cases = Array.isArray(model.analysis?.load_cases) ? model.analysis.load_cases : [];
|
|
79121
|
+
const interior = (l) => l?.position > 0 && l?.position < 1;
|
|
79122
|
+
const found = [];
|
|
79123
|
+
for (const lc of cases) {
|
|
79124
|
+
const scan = (key, label, keep) => {
|
|
79125
|
+
for (const l of Array.isArray(lc?.[key]) ? lc[key] : [])
|
|
79126
|
+
if (ids.has(l?.member) && keep(l))
|
|
79127
|
+
found.push(`${label} ${l.id} (case ${lc.id})`);
|
|
79128
|
+
};
|
|
79129
|
+
scan("distributed_loads", "distributed load", () => true);
|
|
79130
|
+
scan("member_point_loads", "member point load", interior);
|
|
79131
|
+
scan("member_point_moments", "member point moment", interior);
|
|
79132
|
+
}
|
|
79133
|
+
return found;
|
|
79134
|
+
}
|
|
79108
79135
|
function nodeIdsOf(model) {
|
|
79109
79136
|
const out = /* @__PURE__ */ new Set();
|
|
79110
79137
|
if (Array.isArray(model.model?.nodes)) {
|
|
@@ -79416,6 +79443,11 @@ function addLoad(args) {
|
|
|
79416
79443
|
if (members.size && !members.has(member)) {
|
|
79417
79444
|
return fail(`member ${member} does not exist in this model.`);
|
|
79418
79445
|
}
|
|
79446
|
+
if (isCable(model, member)) {
|
|
79447
|
+
return fail(
|
|
79448
|
+
`member ${member} is a Cable, and the solve rejects a distributed load on one. ${CABLE_SPAN_LOAD}.`
|
|
79449
|
+
);
|
|
79450
|
+
}
|
|
79419
79451
|
const startFrac = coerceNumber(args.start_frac) ?? 0;
|
|
79420
79452
|
const endFrac = coerceNumber(args.end_frac) ?? 1;
|
|
79421
79453
|
if (!(startFrac >= 0 && endFrac <= 1 && startFrac < endFrac)) {
|
|
@@ -79445,8 +79477,14 @@ function addLoad(args) {
|
|
|
79445
79477
|
`kind "${kind}" requires \`position\` (0 = start node, 1 = end node).`
|
|
79446
79478
|
);
|
|
79447
79479
|
}
|
|
79480
|
+
const position = Math.min(Math.max(rawPos, 0), 1);
|
|
79481
|
+
if (isCable(model, member) && position > 0 && position < 1) {
|
|
79482
|
+
return fail(
|
|
79483
|
+
`member ${member} is a Cable, and the solve rejects a point load or moment inside its span (position ${position}). ${CABLE_SPAN_LOAD}.`
|
|
79484
|
+
);
|
|
79485
|
+
}
|
|
79448
79486
|
record2.member = member;
|
|
79449
|
-
record2.position =
|
|
79487
|
+
record2.position = position;
|
|
79450
79488
|
record2.direction = unit2;
|
|
79451
79489
|
const axes = args.axes == null ? "global" : String(args.axes).toLowerCase();
|
|
79452
79490
|
if (axes !== "global" && axes !== "local") {
|
|
@@ -79829,9 +79867,23 @@ function classifySolverError(err) {
|
|
|
79829
79867
|
};
|
|
79830
79868
|
}
|
|
79831
79869
|
if (code === "LimitExceeded" || /exceeds allowed maximum/i.test(message)) {
|
|
79870
|
+
const allowed = /exceeds allowed maximum of (\d+)/i.exec(message);
|
|
79871
|
+
const limit = allowed ? Number(allowed[1]) : FREE_MEMBER_LIMIT;
|
|
79872
|
+
if (limit > FREE_MEMBER_LIMIT) {
|
|
79873
|
+
const shown = limit.toLocaleString("en-US");
|
|
79874
|
+
return {
|
|
79875
|
+
kind: "limit",
|
|
79876
|
+
fatalTrap: false,
|
|
79877
|
+
upgradeHelps: false,
|
|
79878
|
+
messageKey: "solverError.limitPlan",
|
|
79879
|
+
messageParams: { limit: shown },
|
|
79880
|
+
message: `This model exceeds your plan's limit of ${shown} members. Contact us about a larger plan.`
|
|
79881
|
+
};
|
|
79882
|
+
}
|
|
79832
79883
|
return {
|
|
79833
79884
|
kind: "limit",
|
|
79834
79885
|
fatalTrap: false,
|
|
79886
|
+
upgradeHelps: true,
|
|
79835
79887
|
messageKey: "solverError.limit",
|
|
79836
79888
|
messageParams: { limit: FREE_MEMBER_LIMIT },
|
|
79837
79889
|
message: `This model exceeds the free-tier limit of ${FREE_MEMBER_LIMIT} members.`
|
|
@@ -82773,6 +82825,15 @@ function setMember(args) {
|
|
|
82773
82825
|
notes.push(
|
|
82774
82826
|
"Cables force the whole solve onto the nonlinear Newton path even when order is LINEAR, and are excluded from the generated self-weight load case (their weight is intrinsic to the catenary)."
|
|
82775
82827
|
);
|
|
82828
|
+
const onSpan = spanLoadsOn(
|
|
82829
|
+
doc,
|
|
82830
|
+
targets.filter((m) => String(m.member_type) === "Cable").map((m) => Number(m.id))
|
|
82831
|
+
);
|
|
82832
|
+
if (onSpan.length) {
|
|
82833
|
+
notes.push(
|
|
82834
|
+
`This model will NOT solve as it stands: ${onSpan.join(", ")} sit${onSpan.length === 1 ? "s" : ""} on a Cable's span. ${CABLE_SPAN_LOAD}.`
|
|
82835
|
+
);
|
|
82836
|
+
}
|
|
82776
82837
|
}
|
|
82777
82838
|
if (targets.some((m) => String(m.member_type) === "Rigid")) {
|
|
82778
82839
|
notes.push(
|
|
@@ -84500,7 +84561,7 @@ function solveInBrowserPayload(a) {
|
|
|
84500
84561
|
}
|
|
84501
84562
|
|
|
84502
84563
|
// src/lib/mcp-core/server.ts
|
|
84503
|
-
var SERVER_VERSION = "2.
|
|
84564
|
+
var SERVER_VERSION = "2.85.0";
|
|
84504
84565
|
function tooLarge(model) {
|
|
84505
84566
|
return typeof model !== "string" || model.length > MODEL_JSON_MAX_BYTES;
|
|
84506
84567
|
}
|
|
@@ -85323,7 +85384,7 @@ function createFersMcpServer(ctx, deps) {
|
|
|
85323
85384
|
);
|
|
85324
85385
|
defineTool(
|
|
85325
85386
|
"add_load",
|
|
85326
|
-
'Add ONE load of any kind to an existing load case. Choose `kind`: "nodal_force" (force at a node), "nodal_moment" (moment at a node \u2014 `direction` is the moment AXIS, right-hand rule), "distributed" (line load along a member; covers uniform, TRAPEZOIDAL/TRIANGULAR via end_magnitude, and PARTIAL via start_frac/end_frac), "member_point_force" / "member_point_moment" (at a fractional position along a member, in global or local axes), "surface" (pressure over a convex planar polygon, distributed onto the coplanar members inside it), "plate_pressure" (pressure on a meshed plate surface). SIGN: direction_x/y/z is a GLOBAL vector \u2014 gravity is direction_y = -1. The direction is normalised for you and the whole load stays in `magnitude` (the raw engine multiplies component-wise, so an unnormalised [0,-2,0] would silently double the load). Distributed intensity is per unit of MEMBER length, not of horizontal projection. Units are the model\'s own (default N, m) EXCEPT plate_pressure, which must always be in SI pascals. Free.',
|
|
85387
|
+
'Add ONE load of any kind to an existing load case. Choose `kind`: "nodal_force" (force at a node), "nodal_moment" (moment at a node \u2014 `direction` is the moment AXIS, right-hand rule), "distributed" (line load along a member; covers uniform, TRAPEZOIDAL/TRIANGULAR via end_magnitude, and PARTIAL via start_frac/end_frac), "member_point_force" / "member_point_moment" (at a fractional position along a member, in global or local axes), "surface" (pressure over a convex planar polygon, distributed onto the coplanar members inside it), "plate_pressure" (pressure on a meshed plate surface). SIGN: direction_x/y/z is a GLOBAL vector \u2014 gravity is direction_y = -1. The direction is normalised for you and the whole load stays in `magnitude` (the raw engine multiplies component-wise, so an unnormalised [0,-2,0] would silently double the load). Distributed intensity is per unit of MEMBER length, not of horizontal projection. A Cable member takes no load along its span (no distributed load, no point load or moment inside it): load its end nodes. Units are the model\'s own (default N, m) EXCEPT plate_pressure, which must always be in SI pascals. Free.',
|
|
85327
85388
|
{
|
|
85328
85389
|
model: jsonString().optional().describe("Stringified FERS model JSON"),
|
|
85329
85390
|
model_ref: modelRefField(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ferscloud/fers-mcp",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.85.0",
|
|
4
4
|
"description": "FERS structural finite-element tools for MCP clients (Claude Desktop, Claude Code, Cursor, VS Code, Codex, ChatGPT desktop), solving on your own machine.",
|
|
5
5
|
"mcpName": "com.ferscloud/fers",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -30,6 +30,6 @@
|
|
|
30
30
|
"node": ">=18"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@ferscloud/fers-calculation": "0.2.
|
|
33
|
+
"@ferscloud/fers-calculation": "0.2.85"
|
|
34
34
|
}
|
|
35
35
|
}
|