@ai-matrx/records 0.72.14 → 0.72.24

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.
Files changed (34) hide show
  1. package/CHANGELOG.md +60 -0
  2. package/dist/app-table/index.d.cts +3 -3
  3. package/dist/app-table/index.d.ts +3 -3
  4. package/dist/core/index.d.cts +5 -5
  5. package/dist/core/index.d.ts +5 -5
  6. package/dist/{declareTable-Br8pE4fr.d.cts → declareTable-CLvpMdgJ.d.cts} +2 -2
  7. package/dist/{declareTable-DM6z1tc-.d.ts → declareTable-DY3oN4rq.d.ts} +2 -2
  8. package/dist/index.d.cts +3 -3
  9. package/dist/index.d.ts +3 -3
  10. package/dist/memory/index.cjs +2912 -0
  11. package/dist/memory/index.cjs.map +1 -0
  12. package/dist/memory/index.d.cts +126 -0
  13. package/dist/memory/index.d.ts +126 -0
  14. package/dist/memory/index.js +2889 -0
  15. package/dist/memory/index.js.map +1 -0
  16. package/dist/{ports-DKBvsoya.d.cts → ports-DKOk7AT2.d.cts} +1 -1
  17. package/dist/{ports-Bhu2Q3V0.d.ts → ports-Df3VghxK.d.ts} +1 -1
  18. package/dist/{table-kind-D6Lz7ebE.d.ts → table-kind-CD9B1vtx.d.ts} +1 -1
  19. package/dist/{table-kind-D6VOew74.d.cts → table-kind-e-g5kGXV.d.cts} +1 -1
  20. package/dist/templates/index.cjs +44 -17
  21. package/dist/templates/index.cjs.map +1 -1
  22. package/dist/templates/index.d.cts +18 -1176
  23. package/dist/templates/index.d.ts +18 -1176
  24. package/dist/templates/index.js +44 -17
  25. package/dist/templates/index.js.map +1 -1
  26. package/dist/{validate-QtFxMmJc.d.ts → types-Ba11aOEO.d.ts} +1 -42
  27. package/dist/{validate-DUSrx-9E.d.cts → types-BtEKp3ot.d.cts} +1 -42
  28. package/dist/types-DxVoKKpL.d.ts +1186 -0
  29. package/dist/types-dlj1-2t2.d.cts +1186 -0
  30. package/dist/use-cases/index.d.cts +3 -2
  31. package/dist/use-cases/index.d.ts +3 -2
  32. package/dist/validate-CMb7R_ke.d.cts +44 -0
  33. package/dist/validate-E-g4LAZ6.d.ts +44 -0
  34. package/package.json +13 -1
@@ -1,5 +1,6 @@
1
- import { U as UseCase, a as UseCaseSummary } from '../validate-DUSrx-9E.cjs';
2
- export { B as BusinessIdentity, F as FormAudience, M as MIN_ROWS_IN_PRIMARY_TABLE, N as NotificationChannel, P as PostalAddress, R as RESOLVABLE_FIELD_TYPE_WORDS, b as UseCaseDashboardQuestion, c as UseCaseDocumentTemplate, d as UseCaseField, e as UseCaseForm, f as UseCaseFormField, g as UseCaseMergeField, h as UseCaseNotificationRule, i as UseCaseNotificationTrigger, j as UseCasePipeline, k as UseCasePipelineStage, l as UseCaseProblem, m as UseCaseProvenance, n as UseCaseRelationship, o as UseCaseRow, p as UseCaseTable, q as UseCaseVerdict, r as assertUseCase, v as validateUseCase } from '../validate-DUSrx-9E.cjs';
1
+ import { U as UseCase, h as UseCaseSummary } from '../types-BtEKp3ot.cjs';
2
+ export { B as BusinessIdentity, F as FormAudience, N as NotificationChannel, P as PostalAddress, i as UseCaseDashboardQuestion, j as UseCaseDocumentTemplate, b as UseCaseField, d as UseCaseForm, e as UseCaseFormField, k as UseCaseMergeField, l as UseCaseNotificationRule, f as UseCaseNotificationTrigger, m as UseCasePipeline, n as UseCasePipelineStage, g as UseCaseProvenance, o as UseCaseRelationship, c as UseCaseRow, a as UseCaseTable } from '../types-BtEKp3ot.cjs';
3
+ export { M as MIN_ROWS_IN_PRIMARY_TABLE, R as RESOLVABLE_FIELD_TYPE_WORDS, U as UseCaseProblem, a as UseCaseVerdict, b as assertUseCase, v as validateUseCase } from '../validate-CMb7R_ke.cjs';
3
4
  import '../field-CekLWOPw.cjs';
4
5
 
5
6
  /** One banned pattern, with the reason and what to do instead. */
@@ -1,5 +1,6 @@
1
- import { U as UseCase, a as UseCaseSummary } from '../validate-QtFxMmJc.js';
2
- export { B as BusinessIdentity, F as FormAudience, M as MIN_ROWS_IN_PRIMARY_TABLE, N as NotificationChannel, P as PostalAddress, R as RESOLVABLE_FIELD_TYPE_WORDS, b as UseCaseDashboardQuestion, c as UseCaseDocumentTemplate, d as UseCaseField, e as UseCaseForm, f as UseCaseFormField, g as UseCaseMergeField, h as UseCaseNotificationRule, i as UseCaseNotificationTrigger, j as UseCasePipeline, k as UseCasePipelineStage, l as UseCaseProblem, m as UseCaseProvenance, n as UseCaseRelationship, o as UseCaseRow, p as UseCaseTable, q as UseCaseVerdict, r as assertUseCase, v as validateUseCase } from '../validate-QtFxMmJc.js';
1
+ import { U as UseCase, h as UseCaseSummary } from '../types-Ba11aOEO.js';
2
+ export { B as BusinessIdentity, F as FormAudience, N as NotificationChannel, P as PostalAddress, i as UseCaseDashboardQuestion, j as UseCaseDocumentTemplate, b as UseCaseField, d as UseCaseForm, e as UseCaseFormField, k as UseCaseMergeField, l as UseCaseNotificationRule, f as UseCaseNotificationTrigger, m as UseCasePipeline, n as UseCasePipelineStage, g as UseCaseProvenance, o as UseCaseRelationship, c as UseCaseRow, a as UseCaseTable } from '../types-Ba11aOEO.js';
3
+ export { M as MIN_ROWS_IN_PRIMARY_TABLE, R as RESOLVABLE_FIELD_TYPE_WORDS, U as UseCaseProblem, a as UseCaseVerdict, b as assertUseCase, v as validateUseCase } from '../validate-E-g4LAZ6.js';
3
4
  import '../field-CekLWOPw.js';
4
5
 
5
6
  /** One banned pattern, with the reason and what to do instead. */
@@ -0,0 +1,44 @@
1
+ import { U as UseCase } from './types-BtEKp3ot.cjs';
2
+
3
+ /**
4
+ * Every word a `parityType` may be: the parity types, every kind the declaration door
5
+ * publishes (`custom.field_kinds()` — entity_reference, signature, long_text …, which a
6
+ * lane-8 template needs for S4 and e-sign), their behaviours, the synonyms.
7
+ */
8
+ declare const RESOLVABLE_FIELD_TYPE_WORDS: readonly string[];
9
+ /**
10
+ * The minimum a seeded business needs before a screen looks like it is working
11
+ * rather than like a fixture. Below this, a screenshot shows an empty state.
12
+ *
13
+ * It was 8 until a real dataset argued with it: a whole-house renovation has SIX
14
+ * ROOMS, and demanding eight would have meant inventing two rooms that do not
15
+ * exist — which is the exact failure this whole library is against. Six rooms on
16
+ * a board is a working project, not an empty screen. So the floor is what a
17
+ * screen genuinely needs, and the suite keeps the stronger check where it
18
+ * belongs: at least 20 rows across the whole use case.
19
+ */
20
+ declare const MIN_ROWS_IN_PRIMARY_TABLE = 5;
21
+ /** A refusal: what is wrong, where, and what to do. */
22
+ interface UseCaseProblem {
23
+ /** Dotted path into the use case: "tables[1].fields[3].choices". */
24
+ at: string;
25
+ /** The sentence. Always says what to do, never only what is wrong. */
26
+ says: string;
27
+ }
28
+ interface UseCaseVerdict {
29
+ ok: boolean;
30
+ problems: UseCaseProblem[];
31
+ }
32
+ /**
33
+ * Check one use case. Returns every problem rather than the first, because a
34
+ * crew fixing a dataset wants the whole list in one pass.
35
+ */
36
+ declare function validateUseCase(useCase: UseCase): UseCaseVerdict;
37
+ /**
38
+ * Validate, and throw with every problem listed. This is what a seeder calls
39
+ * before it writes anything to a live organization — a half-valid dataset is
40
+ * worse than none, because it produces a screen that looks like it worked.
41
+ */
42
+ declare function assertUseCase(useCase: UseCase): void;
43
+
44
+ export { MIN_ROWS_IN_PRIMARY_TABLE as M, RESOLVABLE_FIELD_TYPE_WORDS as R, type UseCaseProblem as U, type UseCaseVerdict as a, assertUseCase as b, validateUseCase as v };
@@ -0,0 +1,44 @@
1
+ import { U as UseCase } from './types-Ba11aOEO.js';
2
+
3
+ /**
4
+ * Every word a `parityType` may be: the parity types, every kind the declaration door
5
+ * publishes (`custom.field_kinds()` — entity_reference, signature, long_text …, which a
6
+ * lane-8 template needs for S4 and e-sign), their behaviours, the synonyms.
7
+ */
8
+ declare const RESOLVABLE_FIELD_TYPE_WORDS: readonly string[];
9
+ /**
10
+ * The minimum a seeded business needs before a screen looks like it is working
11
+ * rather than like a fixture. Below this, a screenshot shows an empty state.
12
+ *
13
+ * It was 8 until a real dataset argued with it: a whole-house renovation has SIX
14
+ * ROOMS, and demanding eight would have meant inventing two rooms that do not
15
+ * exist — which is the exact failure this whole library is against. Six rooms on
16
+ * a board is a working project, not an empty screen. So the floor is what a
17
+ * screen genuinely needs, and the suite keeps the stronger check where it
18
+ * belongs: at least 20 rows across the whole use case.
19
+ */
20
+ declare const MIN_ROWS_IN_PRIMARY_TABLE = 5;
21
+ /** A refusal: what is wrong, where, and what to do. */
22
+ interface UseCaseProblem {
23
+ /** Dotted path into the use case: "tables[1].fields[3].choices". */
24
+ at: string;
25
+ /** The sentence. Always says what to do, never only what is wrong. */
26
+ says: string;
27
+ }
28
+ interface UseCaseVerdict {
29
+ ok: boolean;
30
+ problems: UseCaseProblem[];
31
+ }
32
+ /**
33
+ * Check one use case. Returns every problem rather than the first, because a
34
+ * crew fixing a dataset wants the whole list in one pass.
35
+ */
36
+ declare function validateUseCase(useCase: UseCase): UseCaseVerdict;
37
+ /**
38
+ * Validate, and throw with every problem listed. This is what a seeder calls
39
+ * before it writes anything to a live organization — a half-valid dataset is
40
+ * worse than none, because it produces a screen that looks like it worked.
41
+ */
42
+ declare function assertUseCase(useCase: UseCase): void;
43
+
44
+ export { MIN_ROWS_IN_PRIMARY_TABLE as M, RESOLVABLE_FIELD_TYPE_WORDS as R, type UseCaseProblem as U, type UseCaseVerdict as a, assertUseCase as b, validateUseCase as v };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-matrx/records",
3
- "version": "0.72.14",
3
+ "version": "0.72.24",
4
4
  "description": "The headless client of the AI Matrx record store: the Table / Field / Rule / Record / Relation / Home types, the closed vocabularies and refusal codes read from the store itself, the typed calls over the store's doors and nothing else, the merge-field declaration, a validation mirror that predicts only what the store's own triggers refuse, and the never-throw result envelope. Zero React, zero DOM in the root and /core.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -95,6 +95,16 @@
95
95
  "default": "./dist/app-table/index.cjs"
96
96
  }
97
97
  },
98
+ "./memory": {
99
+ "import": {
100
+ "types": "./dist/memory/index.d.ts",
101
+ "default": "./dist/memory/index.js"
102
+ },
103
+ "require": {
104
+ "types": "./dist/memory/index.d.cts",
105
+ "default": "./dist/memory/index.cjs"
106
+ }
107
+ },
98
108
  "./package.json": "./package.json"
99
109
  },
100
110
  "peerDependencies": {
@@ -138,6 +148,8 @@
138
148
  "check:package": "pnpm build && node ../scripts/check-exports-agreement.mjs && publint && pnpm verify:tarball",
139
149
  "typecheck": "tsc -p tsconfig.json --noEmit",
140
150
  "test": "vitest run",
151
+ "test:templates": "MATRX_TEMPLATE_CHECKS=catalogue vitest run src/templates/templates.test.ts src/templates/plan.test.ts src/templates/catalogue.test.ts src/templates/dns.test.ts",
152
+ "templates:guard": "tsx scripts/template-guard.ts",
141
153
  "test:watch": "vitest",
142
154
  "verify:tarball": "node ./scripts/verify-tarball.mjs",
143
155
  "records:generate": "tsx scripts/generate-store-registry.ts",