formlab-mcp 0.6.28 → 0.6.29

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "formlab-mcp",
3
- "version": "0.6.28",
3
+ "version": "0.6.29",
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.28",
5
+ "version": "0.6.29",
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.28",
16
+ "version": "0.6.29",
17
17
  "runtimeHint": "npx",
18
18
  "transport": {
19
19
  "type": "stdio"
@@ -1086,7 +1086,11 @@ const get_stability = {
1086
1086
  // (0/1/3/6/12 mo) read true.
1087
1087
  const t0 = pts[0].date.getTime();
1088
1088
  const days = (pts[n - 1].date - pts[0].date) / 86400000;
1089
- const fit = days > 0 ? _ols(pts.map(p => (p.date.getTime() - t0) / 86400000 / 30.4375), ys) : null;
1089
+ // 3+ distinct test dates, like the shelf-life rule: same-day repeats span
1090
+ // hours, and a slope over hours reads as an absurd monthly drift.
1091
+ const nDays = new Set(pts.map(p => p.date.toISOString().slice(0, 10))).size;
1092
+ const fit = (days > 0 && nDays >= 3) ? _ols(pts.map(p => (p.date.getTime() - t0) / 86400000 / 30.4375), ys) : null;
1093
+ if (!fit && nDays < 3) out.driftNote = `Only ${nDays} distinct test date${nDays === 1 ? '' : 's'}: no drift estimate (needs 3+).`;
1090
1094
  if (fit) {
1091
1095
  const perMonth = fit.slope;
1092
1096
  out.drift = { perMonth: _round(perMonth, 4), r2: _round(fit.r2, 3), direction: perMonth > 0 ? 'increasing' : perMonth < 0 ? 'decreasing' : 'flat' };