@ai-matrx/records 0.86.2 → 0.87.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,35 @@
1
1
  # Changelog — @ai-matrx/records
2
2
 
3
+ ## 0.87.1
4
+
5
+ **One instance of shared state across every section.** Each built entry (root, core, react, realtime,
6
+ data, typed-table) and each module graph (ESM, CJS) carried its own copy of the op ledger and the
7
+ page-local change buses: `records/core` minted a write's op id in one copy while `records/realtime`
8
+ checked another, so a company's own write came back as somebody else's change, and a write announced by
9
+ the core client never reached `records/react` screens. The ledger, the record/table change listeners and
10
+ the removed-records set now live in `@ai-matrx/kit/global-slot` slots. Guard: `scripts/check-shared-state.mjs`,
11
+ run by `verify:tarball` in a consumer that installed the packed tarball (red on 0.87.0, green here).
12
+
13
+ **The headless package no longer installs the UI kit.** `ArchivedFilter` is spelled here
14
+ (`"active" | "archived" | "all"`) instead of imported from `@ai-matrx/design-system`, which moves to
15
+ devDependencies; `entity-list.types.test.ts` fails typecheck if the two vocabularies drift.
16
+
17
+ **Consumer action:** none for most hosts. A host that relied on records to install
18
+ `@ai-matrx/design-system` transitively must list it in its own dependencies.
19
+
20
+ ## 0.87.0 — a Column says one value or many, which column names a row, and which source a link reads
21
+
22
+ From the Applets social planner live test (2026-10-08): a choice column is `list` whether it holds one word or
23
+ many, so a form could not tell Status (one word) from Platforms (several) and sent `status: ["Planned"]`, which
24
+ `record_write` refused.
25
+ - **`Column.multi`** — the store's own `custom.field.multi`, set by `readTableShape` on every column.
26
+ - **`Column.title`** — true on the table's `title_field` column (`readTableShape` reads the table beside its
27
+ fields; a table it cannot read still answers its columns, with no title marked).
28
+ - **`Column.linksToSource`** — `createTableDataPort.columns()` names the alias, in the same port, that serves a
29
+ relation's target table, so a form can list the linked rows to pick from.
30
+ - **Consumer action:** none required (all three are optional additions). A form choosing an input by
31
+ `column.type === "list"` must read `column.multi` instead.
32
+
3
33
  ## 0.86.2
4
34
 
5
35
  Fix the incomplete 0.86.0 release: Confidential-table header stubs are now
@@ -2470,9 +2470,10 @@ function sourceArchivedOf(value) {
2470
2470
  }
2471
2471
 
2472
2472
  // src/ops.ts
2473
+ var import_global_slot = require("@ai-matrx/kit/global-slot");
2473
2474
  var REMEMBER_MS = 3e4;
2474
2475
  var REMEMBER_MAX = 500;
2475
- var ours = /* @__PURE__ */ new Map();
2476
+ var ours = (0, import_global_slot.globalSlot)("ai-matrx.records.op-ledger", () => /* @__PURE__ */ new Map());
2476
2477
  function trim(now) {
2477
2478
  for (const [id, at] of ours) {
2478
2479
  if (now - at <= REMEMBER_MS) break;
@@ -5265,7 +5266,8 @@ function isWritingDoor(door) {
5265
5266
  }
5266
5267
 
5267
5268
  // src/core/recordChanges.ts
5268
- var listeners = /* @__PURE__ */ new Set();
5269
+ var import_global_slot2 = require("@ai-matrx/kit/global-slot");
5270
+ var listeners = (0, import_global_slot2.globalSlot)("ai-matrx.records.record-change-listeners", () => /* @__PURE__ */ new Set());
5269
5271
  function announceRecordChanged(recordId) {
5270
5272
  for (const listener of [...listeners]) {
5271
5273
  try {
@@ -5275,7 +5277,7 @@ function announceRecordChanged(recordId) {
5275
5277
  }
5276
5278
  }
5277
5279
  }
5278
- var removed = /* @__PURE__ */ new Set();
5280
+ var removed = (0, import_global_slot2.globalSlot)("ai-matrx.records.removed-records", () => /* @__PURE__ */ new Set());
5279
5281
  function markRecordRemoved(recordId) {
5280
5282
  removed.add(recordId);
5281
5283
  }
@@ -5289,7 +5291,7 @@ function onRecordChanged(listener) {
5289
5291
  listeners.add(listener);
5290
5292
  return () => listeners.delete(listener);
5291
5293
  }
5292
- var tableListeners = /* @__PURE__ */ new Set();
5294
+ var tableListeners = (0, import_global_slot2.globalSlot)("ai-matrx.records.table-structure-listeners", () => /* @__PURE__ */ new Set());
5293
5295
  function announceTableStructureChanged(tableId) {
5294
5296
  for (const listener of [...tableListeners]) {
5295
5297
  try {