@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.js
CHANGED
|
@@ -4419,6 +4419,9 @@ function scopeChip(scope) {
|
|
|
4419
4419
|
return scope.title ? `About: ${scope.title}` : "About: this record";
|
|
4420
4420
|
}
|
|
4421
4421
|
|
|
4422
|
+
// src/table-kind.ts
|
|
4423
|
+
import { isLowercaseUuidShape } from "@ai-matrx/kit/uuid";
|
|
4424
|
+
|
|
4422
4425
|
// src/table-kind-mapping.json
|
|
4423
4426
|
var table_kind_mapping_default = {
|
|
4424
4427
|
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.",
|
|
@@ -4497,14 +4500,13 @@ var table_kind_mapping_default = {
|
|
|
4497
4500
|
|
|
4498
4501
|
// src/table-kind.ts
|
|
4499
4502
|
var TABLE_KIND_PREFIX = "table:";
|
|
4500
|
-
var UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;
|
|
4501
4503
|
var KIND_KEY = "__kind";
|
|
4502
4504
|
var M = table_kind_mapping_default;
|
|
4503
4505
|
function tableKindMapping() {
|
|
4504
4506
|
return M;
|
|
4505
4507
|
}
|
|
4506
4508
|
function isTableKind(slug) {
|
|
4507
|
-
return typeof slug === "string" && slug.startsWith(TABLE_KIND_PREFIX) &&
|
|
4509
|
+
return typeof slug === "string" && slug.startsWith(TABLE_KIND_PREFIX) && isLowercaseUuidShape(slug.slice(TABLE_KIND_PREFIX.length));
|
|
4508
4510
|
}
|
|
4509
4511
|
function tableKindSlug(tableId) {
|
|
4510
4512
|
const slug = `${TABLE_KIND_PREFIX}${String(tableId).trim().toLowerCase()}`;
|
|
@@ -9147,13 +9149,13 @@ async function tableKindFacts(dataSource, table) {
|
|
|
9147
9149
|
}
|
|
9148
9150
|
|
|
9149
9151
|
// src/core/landingOutcomes.ts
|
|
9152
|
+
import { isUuidShape as isUuidShape5 } from "@ai-matrx/kit/uuid";
|
|
9150
9153
|
var PRODUCED_BY_LABEL = "produced_by";
|
|
9151
9154
|
var LANDING_SOURCE_TYPE = "message";
|
|
9152
9155
|
var LANDING_TARGET_TYPES = {
|
|
9153
9156
|
record: "record"
|
|
9154
9157
|
};
|
|
9155
9158
|
var OUTPUT_KEPT_KEY = "output_kept";
|
|
9156
|
-
var UUID2 = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
9157
9159
|
function text(value) {
|
|
9158
9160
|
return typeof value === "string" && value.trim() ? value : null;
|
|
9159
9161
|
}
|
|
@@ -9176,7 +9178,7 @@ function documentTitle(document, metadata) {
|
|
|
9176
9178
|
return text(metadata.title) ?? text(doc.title) ?? text(doc.name) ?? null;
|
|
9177
9179
|
}
|
|
9178
9180
|
async function landingOutcomesFor(dataSource, messageId, options = {}) {
|
|
9179
|
-
if (!
|
|
9181
|
+
if (!isUuidShape5(messageId)) return ok({ messageId, landings: [] });
|
|
9180
9182
|
const source = asRecordsDataSource(dataSource);
|
|
9181
9183
|
const edges = await rows(
|
|
9182
9184
|
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),
|
|
@@ -9266,7 +9268,7 @@ function blockLandedInStore(outcomes, block) {
|
|
|
9266
9268
|
}
|
|
9267
9269
|
|
|
9268
9270
|
// src/core/validation.ts
|
|
9269
|
-
import { isUuidShape as
|
|
9271
|
+
import { isUuidShape as isUuidShape6 } from "@ai-matrx/kit/uuid";
|
|
9270
9272
|
var DEFAULT_VALUE_MAX_BYTES = 1e5;
|
|
9271
9273
|
var DEFAULT_DOCUMENT_MAX_BYTES = 1048576;
|
|
9272
9274
|
var jsonType = (value) => {
|
|
@@ -9428,7 +9430,7 @@ function predictValueRefusals(fields, values, recordType) {
|
|
|
9428
9430
|
} else if (field.type === "relation") {
|
|
9429
9431
|
if (typeof item2 !== "string") {
|
|
9430
9432
|
found.push({ ...base, message: `${label} points at a record, and it was given a ${jsonType(item2)}`, hint: "FLD-1: relation." });
|
|
9431
|
-
} else if (!
|
|
9433
|
+
} else if (!isUuidShape6(item2)) {
|
|
9432
9434
|
found.push({
|
|
9433
9435
|
...base,
|
|
9434
9436
|
message: `${label} points at something that is not there`,
|