formlab-mcp 0.6.75 → 0.6.76

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.75",
3
+ "version": "0.6.76",
4
4
  "mcpName": "io.github.juliu1980/formlab-mcp",
5
5
  "description": "Read-only Model Context Protocol server for FormLab. Lets Claude and other MCP clients read and analyze your FormLab data, from a local export file or your live cloud workspace.",
6
6
  "homepage": "https://formvix.com/mcp",
package/server.json CHANGED
@@ -2,13 +2,13 @@
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 server for FormLab formulation data: a local export file or your live cloud workspace.",
5
- "version": "0.6.75",
5
+ "version": "0.6.76",
6
6
  "websiteUrl": "https://formvix.com/mcp",
7
7
  "packages": [
8
8
  {
9
9
  "registryType": "npm",
10
10
  "identifier": "formlab-mcp",
11
- "version": "0.6.75",
11
+ "version": "0.6.76",
12
12
  "runtimeHint": "npx",
13
13
  "transport": {
14
14
  "type": "stdio"
package/vendor/cost.js CHANGED
@@ -1697,7 +1697,7 @@ function deviationTier(pct) {
1697
1697
  }
1698
1698
 
1699
1699
  // Plain-text tooltip + inline color legend for the deviation tiers.
1700
- const DEVIATION_TIP = 'Δ vs plan = worst-case wt-% drift of the as-prepared composition from the proposal. Colors: under 2% on-target (green), 2–10% drift (amber), 10%+ off-target (red).';
1700
+ const DEVIATION_TIP = 'Worst drift from the plan: green under 2%, amber 2–10%, red 10%+';
1701
1701
  function deviationLegendHtml() {
1702
1702
  const dot = c => `<span style="display:inline-block;width:8px;height:8px;border-radius:50%;background:${c};vertical-align:middle;margin-right:3px"></span>`;
1703
1703
  return `<span title="${DEVIATION_TIP}" style="font-size:10.5px;color:var(--dk-muted, #64748b);white-space:nowrap">Δ vs plan: ${dot('#15803d')}&lt;2% ${dot('#b45309')}2–10% ${dot('#b91c1c')}≥10%</span>`;
@@ -435,12 +435,18 @@ function _tpTrace(formula, rows) {
435
435
 
436
436
  // Scan a raw formula for parameter references. Returns
437
437
  // [{ name, start, end }] where start/end index the `[` and `]`.
438
- // Skips `ing[...]` / `ing.[...]` ingredient-field accesses.
438
+ // Skips `ing[...]` / `ing.[...]` ingredient-field accesses, and brackets inside
439
+ // quoted text ('Grade [A]' is text, not a reference, 51k). A quote inside a
440
+ // reference ([Supplier's grade]) doesn't open text: the reference is read whole.
439
441
  function _tpScanParamRefs(formula) {
440
442
  const s = String(formula || '');
441
443
  const refs = [];
444
+ let q = '';
442
445
  for (let i = 0; i < s.length; i++) {
443
- if (s[i] !== '[') continue;
446
+ const c = s[i];
447
+ if (q) { if (c === '\\') i++; else if (c === q) q = ''; continue; }
448
+ if (c === '"' || c === "'") { q = c; continue; }
449
+ if (c !== '[') continue;
444
450
  // An ingredient access has `ing` (optionally `ing.`) immediately before
445
451
  // the bracket — skip those; everything else is a parameter reference.
446
452
  if (/(^|[^A-Za-z0-9_])ing\s*\.?\s*$/.test(s.slice(0, i))) continue;