@meshxdata/fops 0.1.32 → 0.1.35

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.
Files changed (29) hide show
  1. package/CHANGELOG.md +372 -0
  2. package/package.json +1 -2
  3. package/src/agent/llm.js +3 -3
  4. package/src/commands/lifecycle.js +16 -0
  5. package/src/plugins/bundled/fops-plugin-dai-ttyd/fops.plugin.json +6 -0
  6. package/src/plugins/bundled/fops-plugin-dai-ttyd/index.js +182 -0
  7. package/src/plugins/bundled/fops-plugin-dai-ttyd/lib/client.js +164 -0
  8. package/src/plugins/bundled/fops-plugin-dai-ttyd/package.json +1 -0
  9. package/src/plugins/bundled/fops-plugin-embeddings/index.js +3 -1
  10. package/src/plugins/bundled/fops-plugin-embeddings/lib/indexer.js +1 -1
  11. package/src/plugins/bundled/fops-plugin-file/demo/landscape.yaml +67 -0
  12. package/src/plugins/bundled/fops-plugin-file/demo/orders_bad.csv +6 -0
  13. package/src/plugins/bundled/fops-plugin-file/demo/orders_good.csv +7 -0
  14. package/src/plugins/bundled/fops-plugin-file/demo/orders_reference.csv +6 -0
  15. package/src/plugins/bundled/fops-plugin-file/demo/orders_renamed.aligned.csv +6 -0
  16. package/src/plugins/bundled/fops-plugin-file/demo/orders_renamed.csv +6 -0
  17. package/src/plugins/bundled/fops-plugin-file/demo/rules.json +8 -0
  18. package/src/plugins/bundled/fops-plugin-file/demo/run.sh +110 -0
  19. package/src/plugins/bundled/fops-plugin-file/index.js +140 -24
  20. package/src/plugins/bundled/fops-plugin-file/lib/embed-index.js +7 -0
  21. package/src/plugins/bundled/fops-plugin-file/lib/match.js +11 -4
  22. package/src/plugins/bundled/fops-plugin-foundation/index.js +1574 -101
  23. package/src/plugins/bundled/fops-plugin-foundation/lib/align.js +42 -4
  24. package/src/plugins/bundled/fops-plugin-foundation/lib/apply.js +83 -41
  25. package/src/plugins/bundled/fops-plugin-foundation/lib/stack-apply.js +4 -1
  26. package/src/plugins/bundled/fops-plugin-foundation-graphql/index.js +39 -1
  27. package/src/plugins/bundled/fops-plugin-foundation-graphql/lib/graphql/resolvers/data-object.js +9 -6
  28. package/src/plugins/bundled/fops-plugin-foundation-graphql/lib/graphql/resolvers/data-product.js +9 -6
  29. package/src/ui/tui/App.js +1 -1
@@ -387,7 +387,14 @@ export async function runEmbedIndex(api, opts) {
387
387
  store.setMeta("embedding_dim", "384");
388
388
  } catch {
389
389
  // Embeddings failed — index still usable without them
390
+ spinner.stop();
391
+ console.log(WARN(" ⚠ Column embeddings skipped — MiniLM model not ready."));
392
+ console.log(DIM(" Run `fops embed index` first to download the model, then re-run `fops embed file index`."));
393
+ console.log(DIM(" Without embeddings, matching falls back to Jaccard (exact column name overlap only)."));
390
394
  }
395
+ } else {
396
+ console.log(WARN(" ⚠ Column embeddings skipped — embeddings plugin not available."));
397
+ console.log(DIM(" Run `fops embed index` first to download the MiniLM model, then re-run `fops embed file index`."));
391
398
  }
392
399
 
393
400
  store.setMeta("version", "3");
@@ -155,13 +155,20 @@ export async function embedSchemaEntries(entries, embeddingClient, opts = {}) {
155
155
 
156
156
  /**
157
157
  * Normalize a column name for embedding: split on separators, lowercase.
158
+ * For compound names (e.g. order_status), the suffix is repeated to boost its
159
+ * weight in the embedding so "order_status" stays close to "status" and doesn't
160
+ * drift toward "order_id" due to a shared prefix.
158
161
  */
159
162
  function normalizeColumnName(name) {
160
- return (name || "")
161
- .replace(/[_\-./]/g, " ")
163
+ const parts = (name || "")
162
164
  .replace(/([a-z])([A-Z])/g, "$1 $2") // camelCase split
163
- .toLowerCase()
164
- .trim() || name;
165
+ .split(/[_\-./\s]+/)
166
+ .filter(Boolean)
167
+ .map((p) => p.toLowerCase());
168
+ if (parts.length === 0) return name || "";
169
+ if (parts.length === 1) return parts[0];
170
+ // Repeat the last token to emphasise the semantic role over the entity prefix
171
+ return parts.join(" ") + " " + parts[parts.length - 1];
165
172
  }
166
173
 
167
174
  /**