@ai-matrx/records 0.99.14 → 0.99.15

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.
@@ -5343,6 +5343,7 @@ function onTableStructureChanged(listener) {
5343
5343
  var SYSTEM_CONTEXT_TYPE_ID = "__system__";
5344
5344
 
5345
5345
  // src/scopes/codec.ts
5346
+ import { isUuidShape as isUuidShape5 } from "@ai-matrx/kit/uuid";
5346
5347
  var str = (v, fallback = "") => typeof v === "string" ? v : fallback;
5347
5348
  var strOrNull = (v) => typeof v === "string" ? v : null;
5348
5349
  var num = (v, fallback = 0) => {
@@ -5558,7 +5559,6 @@ function systemContextFieldFromStore(row, index) {
5558
5559
  item_class: strOrNull(row.item_class)
5559
5560
  };
5560
5561
  }
5561
- var UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
5562
5562
  function referencesOf(row) {
5563
5563
  const v = row.value;
5564
5564
  const list = Array.isArray(v) ? v : v == null ? [] : [v];
@@ -5568,7 +5568,7 @@ function referencesOf(row) {
5568
5568
  const out = [];
5569
5569
  for (const el of list) {
5570
5570
  let ref = null;
5571
- if (typeof el === "string" && UUID.test(el)) ref = { id: el, type: toFile ? "file" : "scope" };
5571
+ if (typeof el === "string" && isUuidShape5(el)) ref = { id: el, type: toFile ? "file" : "scope" };
5572
5572
  else if (el && typeof el === "object" && typeof el.id === "string") {
5573
5573
  const token = String(el.token ?? "");
5574
5574
  const own = el.label;
@@ -10848,7 +10848,7 @@ async function tableKindFacts(dataSource, table) {
10848
10848
  }
10849
10849
 
10850
10850
  // src/core/landingOutcomes.ts
10851
- import { isUuidShape as isUuidShape5 } from "@ai-matrx/kit/uuid";
10851
+ import { isUuidShape as isUuidShape6 } from "@ai-matrx/kit/uuid";
10852
10852
  var PRODUCED_BY_LABEL = "produced_by";
10853
10853
  var LANDING_SOURCE_TYPE = "message";
10854
10854
  var LANDING_TARGET_TYPES = {
@@ -10877,7 +10877,7 @@ function documentTitle(document, metadata) {
10877
10877
  return text(metadata.title) ?? text(doc.title) ?? text(doc.name) ?? null;
10878
10878
  }
10879
10879
  async function landingOutcomesFor(dataSource, messageId, options = {}) {
10880
- if (!isUuidShape5(messageId)) return ok({ messageId, landings: [] });
10880
+ if (!isUuidShape6(messageId)) return ok({ messageId, landings: [] });
10881
10881
  const source = asRecordsDataSource(dataSource);
10882
10882
  const edges = await rows(
10883
10883
  source.schema("platform").from("associations").select("target_type,target_id,organization_id,metadata,created_at").eq("source_type", LANDING_SOURCE_TYPE).eq("source_id", messageId).eq("label", PRODUCED_BY_LABEL).eq("target_type", LANDING_TARGET_TYPES.record).is("deleted_at", null),
@@ -11019,7 +11019,7 @@ function storeDoors(client) {
11019
11019
  }
11020
11020
 
11021
11021
  // src/core/validation.ts
11022
- import { isUuidShape as isUuidShape6 } from "@ai-matrx/kit/uuid";
11022
+ import { isUuidShape as isUuidShape7 } from "@ai-matrx/kit/uuid";
11023
11023
  var DEFAULT_VALUE_MAX_BYTES = 1e5;
11024
11024
  var DEFAULT_DOCUMENT_MAX_BYTES = 1048576;
11025
11025
  var jsonType = (value) => {
@@ -11181,7 +11181,7 @@ function predictValueRefusals(fields, values, recordType) {
11181
11181
  } else if (field.type === "relation") {
11182
11182
  if (typeof item2 !== "string") {
11183
11183
  found.push({ ...base, message: `${label} points at a record, and it was given a ${jsonType(item2)}`, hint: "FLD-1: relation." });
11184
- } else if (!isUuidShape6(item2)) {
11184
+ } else if (!isUuidShape7(item2)) {
11185
11185
  found.push({
11186
11186
  ...base,
11187
11187
  message: `${label} points at something that is not there`,