@ai-matrx/records 0.83.0 → 0.83.1
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog — @ai-matrx/records
|
|
2
2
|
|
|
3
|
+
## 0.83.1
|
|
4
|
+
|
|
5
|
+
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
6
|
+
`git diff npm/records/v0.83.0..npm/records/v0.83.1 -- apps/shared/records`).
|
|
7
|
+
No source changes intended and no consumer action required.
|
|
3
8
|
|
|
4
9
|
## 0.83.0 — the gate parses with the one formula language
|
|
5
10
|
|
|
@@ -15,7 +20,7 @@ Consumer action: `parseFormula` / `FORMULA_FUNCTIONS` from `@ai-matrx/records`
|
|
|
15
20
|
## 0.82.1
|
|
16
21
|
### lane DESCRIBE-BENCH2 (sweep): the mechanical wrong shapes are read, not refused
|
|
17
22
|
|
|
18
|
-
- `autofixDescribeSpec` also rewrites, each with an auto-fix note and only when unambiguous: view `filters` written as a list of `{field, op, value}` (→ the store's map; several values → `anyOf`; a condition the store cannot express is dropped and SAID), `sort`/`orderBy` → `sorts`, `group_by`/`date_field`/… → `groupBy`/`dateField`/…, an exact duplicate view dropped; a field typed with `kind`/`type` (or by a plain label) → `parityType`; a formula over bare field names → `{Label}`; a relationship `inverseKey` that is already a field of the target (the store then read the rollup's link as a plain formula) renamed; a rollup named for a status with no filter → the filter when exactly one far-side choice/tick box is that word; a real-looking phone → a fictional one; a copy of the shared team_member block → an ordinary table (name, role, notes).
|
|
23
|
+
- `autofixDescribeSpec` also rewrites, each with an auto-fix note and only when unambiguous: view `filters` written as a list of `{field, op, value}` (→ the store's map; several values → `anyOf`; a condition the store cannot express is dropped and SAID), `sort`/`orderBy` → `sorts`, `group_by`/`date_field`/… → `groupBy`/`dateField`/…, an exact duplicate view dropped; a field typed with `kind`/`type` (or by a plain label) → `parityType`; a formula over bare field names → `{Label}`; a relationship `inverseKey` that is already a field of the target (the store then read the rollup's link as a plain formula) renamed; a rollup named for a status with no filter → the filter when exactly one far-side choice/tick box is that word; a real-looking phone → a fictional one; a copy of the shared team_member block → an ordinary table (name, role, notes) — never a table whose fields are exactly one the person already has (a link-only reuse is not changed).
|
|
19
24
|
- `describeVocabulary()` gains `view_filters_shape`, `field_shape`, `formula_shape`, `relationship_shape`, `phone_rule`, `team_rule`.
|
|
20
25
|
|
|
21
26
|
## Earlier in this release — a rollup or lookup in the wrong shape is read, not refused
|
package/dist/templates/index.cjs
CHANGED
|
@@ -7178,13 +7178,15 @@ function fixFictionalPhones(spec, fixes) {
|
|
|
7178
7178
|
Object.assign(spec, next);
|
|
7179
7179
|
fixes.push(`phones: ${n} number(s) that could reach a real phone replaced with fictional ones (555-0100\u20260199, UK Ofcom drama range)`);
|
|
7180
7180
|
}
|
|
7181
|
-
function fixTeamBlockCopy(spec, fixes) {
|
|
7181
|
+
function fixTeamBlockCopy(spec, fixes, existing = []) {
|
|
7182
7182
|
const block = SHARED_BLOCKS.team_member;
|
|
7183
7183
|
const used = /* @__PURE__ */ new Set();
|
|
7184
7184
|
for (const v of spec.views ?? []) for (const k of ["groupBy", "dateField", "startField", "endField", "coverField", "swimlaneBy", "measure"]) if (v.table && v[k]) used.add(`${v.table}.${v[k]}`);
|
|
7185
7185
|
for (const fm of spec.forms ?? []) for (const q2 of fm.fields ?? []) used.add(`${fm.table}.${q2.fieldKey}`);
|
|
7186
7186
|
for (const e of spec.extras ?? []) for (const q2 of e.questions ?? []) used.add(`${e.table}.${q2.fieldKey}`);
|
|
7187
7187
|
for (const t of spec.tables) {
|
|
7188
|
+
const keys = t.fields.map((f) => f.key).sort().join("|");
|
|
7189
|
+
if (existing.some((e) => e.fields.map((f) => f.key).sort().join("|") === keys)) continue;
|
|
7188
7190
|
const meaning = (f) => block.fields.find((bf) => bf.parityType === f.parityType && bf.sameAs.some((w) => same3(w, f.label) || same3(w, f.key)));
|
|
7189
7191
|
const hits = t.fields.map((f) => ({ f, bf: meaning(f) })).filter((x) => x.bf);
|
|
7190
7192
|
if (hits.length < block.copyThreshold) continue;
|
|
@@ -7538,7 +7540,7 @@ function autofixDescribeSpec(input, ctx = {}) {
|
|
|
7538
7540
|
dropDuplicateViews(spec, autoFixes);
|
|
7539
7541
|
fixInverseKeys(spec, autoFixes);
|
|
7540
7542
|
fixRollupFilters(spec, autoFixes);
|
|
7541
|
-
fixTeamBlockCopy(spec, autoFixes);
|
|
7543
|
+
fixTeamBlockCopy(spec, autoFixes, ctx.existingTables ?? []);
|
|
7542
7544
|
fixFictionalPhones(spec, autoFixes);
|
|
7543
7545
|
fixMissingQuestionFields(spec, autoFixes);
|
|
7544
7546
|
raiseSensitivity(spec, autoFixes);
|