@manta-eu/ldo 0.1.0

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 (111) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +47 -0
  3. package/dist/.ldkit/attio.d.ts +1465 -0
  4. package/dist/.ldkit/attio.d.ts.map +1 -0
  5. package/dist/.ldkit/attio.js +1466 -0
  6. package/dist/.ldkit/brand.d.ts +1866 -0
  7. package/dist/.ldkit/brand.d.ts.map +1 -0
  8. package/dist/.ldkit/brand.js +2056 -0
  9. package/dist/.ldkit/cledara.d.ts +261 -0
  10. package/dist/.ldkit/cledara.d.ts.map +1 -0
  11. package/dist/.ldkit/cledara.js +262 -0
  12. package/dist/.ldkit/coresignal.d.ts +3488 -0
  13. package/dist/.ldkit/coresignal.d.ts.map +1 -0
  14. package/dist/.ldkit/coresignal.js +3489 -0
  15. package/dist/.ldkit/cs.d.ts +20 -0
  16. package/dist/.ldkit/cs.d.ts.map +1 -0
  17. package/dist/.ldkit/cs.js +21 -0
  18. package/dist/.ldkit/dash.d.ts +8 -0
  19. package/dist/.ldkit/dash.d.ts.map +1 -0
  20. package/dist/.ldkit/dash.js +8 -0
  21. package/dist/.ldkit/figma.d.ts +712 -0
  22. package/dist/.ldkit/figma.d.ts.map +1 -0
  23. package/dist/.ldkit/figma.js +713 -0
  24. package/dist/.ldkit/ga4.d.ts +177 -0
  25. package/dist/.ldkit/ga4.d.ts.map +1 -0
  26. package/dist/.ldkit/ga4.js +178 -0
  27. package/dist/.ldkit/gmc.d.ts +471 -0
  28. package/dist/.ldkit/gmc.d.ts.map +1 -0
  29. package/dist/.ldkit/gmc.js +472 -0
  30. package/dist/.ldkit/google.d.ts +3572 -0
  31. package/dist/.ldkit/google.d.ts.map +1 -0
  32. package/dist/.ldkit/google.js +4249 -0
  33. package/dist/.ldkit/index.d.ts +27 -0
  34. package/dist/.ldkit/index.d.ts.map +1 -0
  35. package/dist/.ldkit/index.js +26 -0
  36. package/dist/.ldkit/ingest.d.ts +32 -0
  37. package/dist/.ldkit/ingest.d.ts.map +1 -0
  38. package/dist/.ldkit/ingest.js +33 -0
  39. package/dist/.ldkit/linkedin.d.ts +625 -0
  40. package/dist/.ldkit/linkedin.d.ts.map +1 -0
  41. package/dist/.ldkit/linkedin.js +665 -0
  42. package/dist/.ldkit/maction.d.ts +29 -0
  43. package/dist/.ldkit/maction.d.ts.map +1 -0
  44. package/dist/.ldkit/maction.js +29 -0
  45. package/dist/.ldkit/manta.d.ts +5562 -0
  46. package/dist/.ldkit/manta.d.ts.map +1 -0
  47. package/dist/.ldkit/manta.js +6065 -0
  48. package/dist/.ldkit/mcontent.d.ts +239 -0
  49. package/dist/.ldkit/mcontent.d.ts.map +1 -0
  50. package/dist/.ldkit/mcontent.js +240 -0
  51. package/dist/.ldkit/meta.d.ts +5293 -0
  52. package/dist/.ldkit/meta.d.ts.map +1 -0
  53. package/dist/.ldkit/meta.js +5611 -0
  54. package/dist/.ldkit/namespaces.d.ts +126 -0
  55. package/dist/.ldkit/namespaces.d.ts.map +1 -0
  56. package/dist/.ldkit/namespaces.js +3555 -0
  57. package/dist/.ldkit/nfo.d.ts +84 -0
  58. package/dist/.ldkit/nfo.d.ts.map +1 -0
  59. package/dist/.ldkit/nfo.js +85 -0
  60. package/dist/.ldkit/nmo.d.ts +118 -0
  61. package/dist/.ldkit/nmo.d.ts.map +1 -0
  62. package/dist/.ldkit/nmo.js +119 -0
  63. package/dist/.ldkit/prov.d.ts +378 -0
  64. package/dist/.ldkit/prov.d.ts.map +1 -0
  65. package/dist/.ldkit/prov.js +379 -0
  66. package/dist/.ldkit/rdf.d.ts +16 -0
  67. package/dist/.ldkit/rdf.d.ts.map +1 -0
  68. package/dist/.ldkit/rdf.js +16 -0
  69. package/dist/.ldkit/rdfox.d.ts +17 -0
  70. package/dist/.ldkit/rdfox.d.ts.map +1 -0
  71. package/dist/.ldkit/rdfox.js +18 -0
  72. package/dist/.ldkit/schema.d.ts +1293 -0
  73. package/dist/.ldkit/schema.d.ts.map +1 -0
  74. package/dist/.ldkit/schema.js +1294 -0
  75. package/dist/.ldkit/sh.d.ts +376 -0
  76. package/dist/.ldkit/sh.d.ts.map +1 -0
  77. package/dist/.ldkit/sh.js +377 -0
  78. package/dist/.ldkit/slack.d.ts +622 -0
  79. package/dist/.ldkit/slack.d.ts.map +1 -0
  80. package/dist/.ldkit/slack.js +623 -0
  81. package/dist/.ldkit/stripe.d.ts +750 -0
  82. package/dist/.ldkit/stripe.d.ts.map +1 -0
  83. package/dist/.ldkit/stripe.js +751 -0
  84. package/dist/ad-platform-links.d.ts +26 -0
  85. package/dist/ad-platform-links.d.ts.map +1 -0
  86. package/dist/ad-platform-links.js +85 -0
  87. package/dist/external-links.d.ts +12 -0
  88. package/dist/external-links.d.ts.map +1 -0
  89. package/dist/external-links.js +15 -0
  90. package/dist/figma-links.d.ts +6 -0
  91. package/dist/figma-links.d.ts.map +1 -0
  92. package/dist/figma-links.js +24 -0
  93. package/dist/index.d.ts +5 -0
  94. package/dist/index.d.ts.map +1 -0
  95. package/dist/index.js +4 -0
  96. package/dist/manual-schemas.d.ts +1139 -0
  97. package/dist/manual-schemas.d.ts.map +1 -0
  98. package/dist/manual-schemas.js +298 -0
  99. package/dist/namespaces.d.ts +368 -0
  100. package/dist/namespaces.d.ts.map +1 -0
  101. package/dist/namespaces.js +16 -0
  102. package/dist/realm.d.ts +20 -0
  103. package/dist/realm.d.ts.map +1 -0
  104. package/dist/realm.js +97 -0
  105. package/dist/redirect-queries.d.ts +22 -0
  106. package/dist/redirect-queries.d.ts.map +1 -0
  107. package/dist/redirect-queries.js +93 -0
  108. package/dist/sparql-types.d.ts +33 -0
  109. package/dist/sparql-types.d.ts.map +1 -0
  110. package/dist/sparql-types.js +49 -0
  111. package/package.json +88 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Manta AI AS
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,47 @@
1
+ # manta-ldo
2
+
3
+ This package generates TS types (via LDKit) from SHACL shapes.
4
+
5
+ ## Build process
6
+
7
+ 1. `pnpm build:shacl` — assembles `.shapes/shacl.ttl` from the kgc sources below.
8
+ 2. `pnpm build:ldkit` — regenerates the codegen-only `.shapes/shacl-ldkit.ttl` projection, then
9
+ generates `.ldkit/*.ts` from `.shapes/shacl.ttl` + that projection.
10
+
11
+ `pnpm codegen` runs both in order. Only `.ldkit/*.ts` is committed to git (see `.gitattributes`,
12
+ `linguist-generated=true`). The two `.shapes/*.ttl` files above are intermediates of that run and are
13
+ git-ignored; `.shapes/reference/shacl-shacl.ttl` is a committed input and stays.
14
+
15
+ Shapes are authored against the canonical vocabulary as a
16
+ realm-invariant superset; `@manta-eu/ldo/realm` (`realm.ts`) rebases the generated `.ldkit/namespaces.ts`
17
+ onto whichever realm the app runs as (`VITE_KEYCLOAK_REALM`), so one generation serves every realm.
18
+
19
+ Running `pnpm build:shacl` assembles `.shapes/shacl.ttl` from three kgc sources for one pinned realm
20
+ (`codegenRealm` in `scripts/build-shacl.mjs`): the realm's `all-shacl.ttl` from
21
+ `devenv build outputs.all-shacl-by-realm`, its `ontology/memory-schemas.ttl`, and its
22
+ `shacl/shapes/observed-entities.ttl`. Every realm's IRIs are rebased onto one canonical vocabulary
23
+ root, since the generated types recompose them at runtime from `realm.ts`.
24
+
25
+ ## Per-realm SHACL (a separate concern, not built here)
26
+
27
+ The per-realm bundle `<realm>/all-shacl.ttl` — the shared bundle rebased to the realm, plus the
28
+ realm's own shapes — is unrelated to the codegen above and is committed at the repo root. It carries
29
+ no `ontology/memory-schemas.ttl`. Only `.shapes/shacl.ttl` above merges that file.
30
+ `make generate-shacl-all` builds the bundle with Nix (`devenv/packages/all-shacl-by-realm.nix`) into
31
+ `shacl/<realm>/all-shacl.ttl`. `manta-shacl-upload` uploads it to RDFox for SHACL validation, and
32
+ `manta.action-handlers-codegen`'s `shacl.clj` reads the same file.
33
+
34
+ ## Rebuild Process
35
+
36
+ Whenever the realm shapes change, this needs to be rebuilt to regenerate the TS types.
37
+
38
+ > pnpm codegen
39
+
40
+ That runs `build:shacl` and `build:ldkit` in order. CI runs the same script (in the `devenv build`
41
+ workflow, where nix is set up) and fails when the committed output differs, so regenerate and commit
42
+ whenever the realm shapes change.
43
+
44
+ The memory subclass shapes inside it are authored and tested kgc-side — see
45
+ `kgc/tests/test_memory_schema_shapes.py` (structural invariants) and
46
+ `kgc/tests/test_memory_subclass_parity.py` (subclass ↔ inference-rule parity), both parametrized
47
+ over every realm.