formlab-mcp 0.6.28 → 0.6.30
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/package.json +1 -1
- package/server.json +2 -2
- package/tools/analytics.js +8 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "formlab-mcp",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.30",
|
|
4
4
|
"mcpName": "io.github.juliu1980/formlab-mcp",
|
|
5
5
|
"description": "Read-only Model Context Protocol server for FormLab \u2014 lets Claude (and other MCP clients) read and analyze your FormLab data, from a local export file OR your live cloud workspace.",
|
|
6
6
|
"type": "module",
|
package/server.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
|
|
3
3
|
"name": "io.github.juliu1980/formlab-mcp",
|
|
4
4
|
"description": "Read-only MCP for FormLab — let Claude query your formulation lab. Free reads a local export; Pro connects to your live cloud workspace with a dedicated read-only token.",
|
|
5
|
-
"version": "0.6.
|
|
5
|
+
"version": "0.6.30",
|
|
6
6
|
"websiteUrl": "https://formvix.com/mcp",
|
|
7
7
|
"repository": {
|
|
8
8
|
"url": "https://github.com/juliu1980/FormLab",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
{
|
|
14
14
|
"registryType": "npm",
|
|
15
15
|
"identifier": "formlab-mcp",
|
|
16
|
-
"version": "0.6.
|
|
16
|
+
"version": "0.6.30",
|
|
17
17
|
"runtimeHint": "npx",
|
|
18
18
|
"transport": {
|
|
19
19
|
"type": "stdio"
|
package/tools/analytics.js
CHANGED
|
@@ -1002,11 +1002,12 @@ function _shelfLifeAssess(sl, targetMonths, now) {
|
|
|
1002
1002
|
if (targetMonths) {
|
|
1003
1003
|
const verdict = pointTotal < targetMonths ? 'short' : (ciTotal != null && ciTotal < targetMonths) ? 'marginal' : 'meets';
|
|
1004
1004
|
if (verdict === 'meets' && sl.remainingMonths > 60) return null;
|
|
1005
|
-
|
|
1005
|
+
// Mirrors the app: a projection never reaches 'high' (reserved for a measured out-of-spec value).
|
|
1006
|
+
const level = (overdue && verdict !== 'meets') || verdict === 'short' ? 'medium' : 'info';
|
|
1006
1007
|
return { verdict, level, pointTotal, ciTotal, overdue, crossDate };
|
|
1007
1008
|
}
|
|
1008
1009
|
if (sl.remainingMonths > 60) return null;
|
|
1009
|
-
return { verdict: null, level: (overdue || sl.remainingMonths < 3) ? '
|
|
1010
|
+
return { verdict: null, level: (overdue || sl.remainingMonths < 3) ? 'medium' : 'info', pointTotal, ciTotal, overdue, crossDate };
|
|
1010
1011
|
}
|
|
1011
1012
|
|
|
1012
1013
|
const get_stability = {
|
|
@@ -1086,7 +1087,11 @@ const get_stability = {
|
|
|
1086
1087
|
// (0/1/3/6/12 mo) read true.
|
|
1087
1088
|
const t0 = pts[0].date.getTime();
|
|
1088
1089
|
const days = (pts[n - 1].date - pts[0].date) / 86400000;
|
|
1089
|
-
|
|
1090
|
+
// 3+ distinct test dates, like the shelf-life rule: same-day repeats span
|
|
1091
|
+
// hours, and a slope over hours reads as an absurd monthly drift.
|
|
1092
|
+
const nDays = new Set(pts.map(p => p.date.toISOString().slice(0, 10))).size;
|
|
1093
|
+
const fit = (days > 0 && nDays >= 3) ? _ols(pts.map(p => (p.date.getTime() - t0) / 86400000 / 30.4375), ys) : null;
|
|
1094
|
+
if (!fit && nDays < 3) out.driftNote = `Only ${nDays} distinct test date${nDays === 1 ? '' : 's'}: no drift estimate (needs 3+).`;
|
|
1090
1095
|
if (fit) {
|
|
1091
1096
|
const perMonth = fit.slope;
|
|
1092
1097
|
out.drift = { perMonth: _round(perMonth, 4), r2: _round(fit.r2, 3), direction: perMonth > 0 ? 'increasing' : perMonth < 0 ? 'decreasing' : 'flat' };
|