@ai-matrx/records 0.77.2 → 0.77.3
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 +6 -0
- package/dist/app-table/index.cjs +4 -4
- package/dist/app-table/index.cjs.map +1 -1
- package/dist/app-table/index.js +4 -4
- package/dist/app-table/index.js.map +1 -1
- package/dist/core/index.cjs +8 -6
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.js +8 -6
- package/dist/core/index.js.map +1 -1
- package/dist/index.cjs +4 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/memory/index.cjs +4 -1
- package/dist/memory/index.cjs.map +1 -1
- package/dist/memory/index.js +4 -1
- package/dist/memory/index.js.map +1 -1
- package/dist/react/index.cjs +8 -6
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +8 -6
- package/dist/react/index.js.map +1 -1
- package/dist/templates/index.cjs +4 -2
- package/dist/templates/index.cjs.map +1 -1
- package/dist/templates/index.js +4 -2
- package/dist/templates/index.js.map +1 -1
- package/package.json +4 -4
package/dist/core/index.cjs
CHANGED
|
@@ -4708,6 +4708,9 @@ function scopeChip(scope) {
|
|
|
4708
4708
|
return scope.title ? `About: ${scope.title}` : "About: this record";
|
|
4709
4709
|
}
|
|
4710
4710
|
|
|
4711
|
+
// src/table-kind.ts
|
|
4712
|
+
var import_uuid5 = require("@ai-matrx/kit/uuid");
|
|
4713
|
+
|
|
4711
4714
|
// src/table-kind-mapping.json
|
|
4712
4715
|
var table_kind_mapping_default = {
|
|
4713
4716
|
about: "THE ONE MAPPING from a store Field to a kind's three schemas (KINDS-GLUE wave 3 \xA72). Hand-written here; aidream copies it verbatim to packages/matrx-graph/matrx_graph/table_kind_mapping.json (scripts/generate_table_kind_mapping.py --check). Both languages derive from this file only: @ai-matrx/records src/table-kind.ts and matrx_graph.table_kinds. Keys of `kinds` are the store's field kinds (custom.field_kinds() plus the formula `system` kinds custom.field_kind_of answers). Stored mode only: `column_source_default` is custom.table_column_source's answer when the facts carry none (silence means the doctrine: Field rows are the columns); `platform_keys` mirrors custom.record_platform_keys() with each key's shape (parent_id: custom.containment_parent's uuid cast; icon: the record's own @ai-matrx/icons name, a string or null); `stored_patterns` mirror custom.validate_values' relation id regex and, for dates, refuse a string the timestamptz cast can never read (no digits, not a special word) while never refusing one it can.",
|
|
@@ -4786,14 +4789,13 @@ var table_kind_mapping_default = {
|
|
|
4786
4789
|
|
|
4787
4790
|
// src/table-kind.ts
|
|
4788
4791
|
var TABLE_KIND_PREFIX = "table:";
|
|
4789
|
-
var UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;
|
|
4790
4792
|
var KIND_KEY = "__kind";
|
|
4791
4793
|
var M = table_kind_mapping_default;
|
|
4792
4794
|
function tableKindMapping() {
|
|
4793
4795
|
return M;
|
|
4794
4796
|
}
|
|
4795
4797
|
function isTableKind(slug) {
|
|
4796
|
-
return typeof slug === "string" && slug.startsWith(TABLE_KIND_PREFIX) &&
|
|
4798
|
+
return typeof slug === "string" && slug.startsWith(TABLE_KIND_PREFIX) && (0, import_uuid5.isLowercaseUuidShape)(slug.slice(TABLE_KIND_PREFIX.length));
|
|
4797
4799
|
}
|
|
4798
4800
|
function tableKindSlug(tableId) {
|
|
4799
4801
|
const slug = `${TABLE_KIND_PREFIX}${String(tableId).trim().toLowerCase()}`;
|
|
@@ -9436,13 +9438,13 @@ async function tableKindFacts(dataSource, table) {
|
|
|
9436
9438
|
}
|
|
9437
9439
|
|
|
9438
9440
|
// src/core/landingOutcomes.ts
|
|
9441
|
+
var import_uuid6 = require("@ai-matrx/kit/uuid");
|
|
9439
9442
|
var PRODUCED_BY_LABEL = "produced_by";
|
|
9440
9443
|
var LANDING_SOURCE_TYPE = "message";
|
|
9441
9444
|
var LANDING_TARGET_TYPES = {
|
|
9442
9445
|
record: "record"
|
|
9443
9446
|
};
|
|
9444
9447
|
var OUTPUT_KEPT_KEY = "output_kept";
|
|
9445
|
-
var UUID2 = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
9446
9448
|
function text(value) {
|
|
9447
9449
|
return typeof value === "string" && value.trim() ? value : null;
|
|
9448
9450
|
}
|
|
@@ -9465,7 +9467,7 @@ function documentTitle(document, metadata) {
|
|
|
9465
9467
|
return text(metadata.title) ?? text(doc.title) ?? text(doc.name) ?? null;
|
|
9466
9468
|
}
|
|
9467
9469
|
async function landingOutcomesFor(dataSource, messageId, options = {}) {
|
|
9468
|
-
if (!
|
|
9470
|
+
if (!(0, import_uuid6.isUuidShape)(messageId)) return ok({ messageId, landings: [] });
|
|
9469
9471
|
const source = asRecordsDataSource(dataSource);
|
|
9470
9472
|
const edges = await rows(
|
|
9471
9473
|
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),
|
|
@@ -9555,7 +9557,7 @@ function blockLandedInStore(outcomes, block) {
|
|
|
9555
9557
|
}
|
|
9556
9558
|
|
|
9557
9559
|
// src/core/validation.ts
|
|
9558
|
-
var
|
|
9560
|
+
var import_uuid7 = require("@ai-matrx/kit/uuid");
|
|
9559
9561
|
var DEFAULT_VALUE_MAX_BYTES = 1e5;
|
|
9560
9562
|
var DEFAULT_DOCUMENT_MAX_BYTES = 1048576;
|
|
9561
9563
|
var jsonType = (value) => {
|
|
@@ -9717,7 +9719,7 @@ function predictValueRefusals(fields, values, recordType) {
|
|
|
9717
9719
|
} else if (field.type === "relation") {
|
|
9718
9720
|
if (typeof item2 !== "string") {
|
|
9719
9721
|
found.push({ ...base, message: `${label} points at a record, and it was given a ${jsonType(item2)}`, hint: "FLD-1: relation." });
|
|
9720
|
-
} else if (!(0,
|
|
9722
|
+
} else if (!(0, import_uuid7.isUuidShape)(item2)) {
|
|
9721
9723
|
found.push({
|
|
9722
9724
|
...base,
|
|
9723
9725
|
message: `${label} points at something that is not there`,
|