@elementumai/edk 0.0.0-oidc-bootstrap → 0.8.0-preview.11

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 (360) hide show
  1. package/README.md +408 -3
  2. package/dist-sdk/elementum-entity-client/clients/agents/models/agent-tool.d.ts +188 -0
  3. package/dist-sdk/elementum-entity-client/clients/agents/models/agent-tool.js +20 -0
  4. package/dist-sdk/elementum-entity-client/clients/agents/models/agent.d.ts +245 -0
  5. package/dist-sdk/elementum-entity-client/clients/agents/models/agent.js +30 -0
  6. package/dist-sdk/elementum-entity-client/clients/ai-provider-connectors/models/ai-provider-connector.d.ts +18 -0
  7. package/dist-sdk/elementum-entity-client/clients/ai-provider-connectors/models/ai-provider-connector.js +8 -0
  8. package/dist-sdk/elementum-entity-client/clients/aspects/models/aspect.d.ts +718 -0
  9. package/dist-sdk/elementum-entity-client/clients/aspects/models/aspect.js +52 -0
  10. package/dist-sdk/elementum-entity-client/clients/aspects/models/field-base.d.ts +23 -0
  11. package/dist-sdk/elementum-entity-client/clients/aspects/models/field-base.js +1 -0
  12. package/dist-sdk/elementum-entity-client/clients/aspects/models/field-types.d.ts +148 -0
  13. package/dist-sdk/elementum-entity-client/clients/aspects/models/field-types.js +12 -0
  14. package/dist-sdk/elementum-entity-client/clients/aspects/models/format.d.ts +63 -0
  15. package/dist-sdk/elementum-entity-client/clients/aspects/models/format.js +17 -0
  16. package/dist-sdk/elementum-entity-client/clients/aspects/models/index.d.ts +39 -0
  17. package/dist-sdk/elementum-entity-client/clients/aspects/models/index.js +35 -0
  18. package/dist-sdk/elementum-entity-client/clients/aspects/models/picklist-config.d.ts +116 -0
  19. package/dist-sdk/elementum-entity-client/clients/aspects/models/picklist-config.js +11 -0
  20. package/dist-sdk/elementum-entity-client/clients/automation/models/automation.d.ts +178 -0
  21. package/dist-sdk/elementum-entity-client/clients/automation/models/automation.js +18 -0
  22. package/dist-sdk/elementum-entity-client/clients/document-models/models/document-model.d.ts +200 -0
  23. package/dist-sdk/elementum-entity-client/clients/document-models/models/document-model.js +1 -0
  24. package/dist-sdk/elementum-entity-client/clients/search-tables/models/index.d.ts +1 -0
  25. package/dist-sdk/elementum-entity-client/clients/search-tables/models/index.js +1 -0
  26. package/dist-sdk/elementum-entity-client/clients/search-tables/models/search-table-wire.d.ts +141 -0
  27. package/dist-sdk/elementum-entity-client/clients/search-tables/models/search-table-wire.js +22 -0
  28. package/dist-sdk/elementum-entity-client/clients/skills/models/skill-tool.d.ts +123 -0
  29. package/dist-sdk/elementum-entity-client/clients/skills/models/skill-tool.js +14 -0
  30. package/dist-sdk/elementum-entity-client/clients/skills/models/skill.d.ts +78 -0
  31. package/dist-sdk/elementum-entity-client/clients/skills/models/skill.js +23 -0
  32. package/dist-sdk/elementum-entity-client/clients/tables/models/index.d.ts +1 -0
  33. package/dist-sdk/elementum-entity-client/clients/tables/models/index.js +1 -0
  34. package/dist-sdk/elementum-entity-client/clients/tables/models/table-wire.d.ts +265 -0
  35. package/dist-sdk/elementum-entity-client/clients/tables/models/table-wire.js +15 -0
  36. package/dist-sdk/elementum-entity-client/errors.d.ts +90 -0
  37. package/dist-sdk/elementum-entity-client/errors.js +111 -0
  38. package/dist-sdk/elementum-entity-client/models/connection.d.ts +30 -0
  39. package/dist-sdk/elementum-entity-client/models/connection.js +16 -0
  40. package/dist-sdk/elementum-entity-client/types.d.ts +71 -0
  41. package/dist-sdk/elementum-entity-client/types.js +1 -0
  42. package/dist-sdk/fs/entity.d.ts +104 -0
  43. package/dist-sdk/fs/entity.js +52 -0
  44. package/dist-sdk/pull/util.d.ts +130 -0
  45. package/dist-sdk/pull/util.js +204 -0
  46. package/dist-sdk/src/catalog/factories.d.ts +189 -0
  47. package/dist-sdk/src/catalog/factories.js +202 -0
  48. package/dist-sdk/src/catalog/from-authoring.d.ts +103 -0
  49. package/dist-sdk/src/catalog/from-authoring.js +462 -0
  50. package/dist-sdk/src/catalog/index.d.ts +11 -0
  51. package/dist-sdk/src/catalog/index.js +11 -0
  52. package/dist-sdk/src/catalog/org.d.ts +11 -0
  53. package/dist-sdk/src/catalog/org.js +211 -0
  54. package/dist-sdk/src/catalog/render-helpers.d.ts +35 -0
  55. package/dist-sdk/src/catalog/render-helpers.js +82 -0
  56. package/dist-sdk/src/catalog/render.d.ts +36 -0
  57. package/dist-sdk/src/catalog/render.js +176 -0
  58. package/dist-sdk/src/catalog/token.d.ts +10 -0
  59. package/dist-sdk/src/catalog/token.js +62 -0
  60. package/dist-sdk/src/catalog/types.d.ts +158 -0
  61. package/dist-sdk/src/catalog/types.js +83 -0
  62. package/dist-sdk/src/catalog/write.d.ts +43 -0
  63. package/dist-sdk/src/catalog/write.js +109 -0
  64. package/dist-sdk/src/core/app-to-ui.d.ts +22 -0
  65. package/dist-sdk/src/core/app-to-ui.js +75 -0
  66. package/dist-sdk/src/core/index.d.ts +10 -0
  67. package/dist-sdk/src/core/index.js +9 -0
  68. package/dist-sdk/src/core/system-fields.d.ts +93 -0
  69. package/dist-sdk/src/core/system-fields.js +151 -0
  70. package/dist-sdk/src/core/triggers/on-demand.d.ts +144 -0
  71. package/dist-sdk/src/core/triggers/on-demand.js +112 -0
  72. package/dist-sdk/src/core/types/ai-provider.d.ts +36 -0
  73. package/dist-sdk/src/core/types/ai-provider.js +32 -0
  74. package/dist-sdk/src/core/types/app.d.ts +838 -0
  75. package/dist-sdk/src/core/types/app.js +210 -0
  76. package/dist-sdk/src/core/types/aspect-category.d.ts +35 -0
  77. package/dist-sdk/src/core/types/aspect-category.js +33 -0
  78. package/dist-sdk/src/core/types/cloud-link.d.ts +34 -0
  79. package/dist-sdk/src/core/types/cloud-link.js +32 -0
  80. package/dist-sdk/src/core/types/display-block.d.ts +149 -0
  81. package/dist-sdk/src/core/types/display-block.js +61 -0
  82. package/dist-sdk/src/core/types/group.d.ts +13 -0
  83. package/dist-sdk/src/core/types/group.js +6 -0
  84. package/dist-sdk/src/core/types/platform.d.ts +2 -0
  85. package/dist-sdk/src/core/types/platform.js +1 -0
  86. package/dist-sdk/src/core/types/user.d.ts +20 -0
  87. package/dist-sdk/src/core/types/user.js +8 -0
  88. package/dist-sdk/src/core/wire/ref-serializer.d.ts +45 -0
  89. package/dist-sdk/src/core/wire/ref-serializer.js +89 -0
  90. package/dist-sdk/src/engine/build/context.d.ts +49 -0
  91. package/dist-sdk/src/engine/build/context.js +6 -0
  92. package/dist-sdk/src/engine/entity.d.ts +44 -0
  93. package/dist-sdk/src/engine/entity.js +15 -0
  94. package/dist-sdk/src/engine/pull/context.d.ts +23 -0
  95. package/dist-sdk/src/engine/pull/context.js +44 -0
  96. package/dist-sdk/src/engine/pull/org.d.ts +44 -0
  97. package/dist-sdk/src/engine/pull/org.js +104 -0
  98. package/dist-sdk/src/engine/tf/escape.d.ts +22 -0
  99. package/dist-sdk/src/engine/tf/escape.js +28 -0
  100. package/dist-sdk/src/engine/tf/expr.d.ts +25 -0
  101. package/dist-sdk/src/engine/tf/expr.js +405 -0
  102. package/dist-sdk/src/engine/tf/index.d.ts +12 -0
  103. package/dist-sdk/src/engine/tf/index.js +11 -0
  104. package/dist-sdk/src/engine/tf/labels.d.ts +31 -0
  105. package/dist-sdk/src/engine/tf/labels.js +125 -0
  106. package/dist-sdk/src/engine/tf/model.d.ts +84 -0
  107. package/dist-sdk/src/engine/tf/model.js +49 -0
  108. package/dist-sdk/src/engine/tf/parse.d.ts +41 -0
  109. package/dist-sdk/src/engine/tf/parse.js +189 -0
  110. package/dist-sdk/src/engine/tf/render.d.ts +13 -0
  111. package/dist-sdk/src/engine/tf/render.js +102 -0
  112. package/dist-sdk/src/engine/workspace/authoring-layout.d.ts +43 -0
  113. package/dist-sdk/src/engine/workspace/authoring-layout.js +201 -0
  114. package/dist-sdk/src/entities/agent/build.d.ts +108 -0
  115. package/dist-sdk/src/entities/agent/build.js +148 -0
  116. package/dist-sdk/src/entities/agent/deserializer/print-agent-v2.d.ts +18 -0
  117. package/dist-sdk/src/entities/agent/deserializer/print-agent-v2.js +177 -0
  118. package/dist-sdk/src/entities/agent/from-tf.d.ts +50 -0
  119. package/dist-sdk/src/entities/agent/from-tf.js +169 -0
  120. package/dist-sdk/src/entities/agent/index.d.ts +7 -0
  121. package/dist-sdk/src/entities/agent/index.js +7 -0
  122. package/dist-sdk/src/entities/agent/module.d.ts +4 -0
  123. package/dist-sdk/src/entities/agent/module.js +116 -0
  124. package/dist-sdk/src/entities/agent/to-tf.d.ts +33 -0
  125. package/dist-sdk/src/entities/agent/to-tf.js +136 -0
  126. package/dist-sdk/src/entities/agent/tools.d.ts +205 -0
  127. package/dist-sdk/src/entities/agent/tools.js +199 -0
  128. package/dist-sdk/src/entities/agent-tool/from-tf.d.ts +63 -0
  129. package/dist-sdk/src/entities/agent-tool/from-tf.js +169 -0
  130. package/dist-sdk/src/entities/agent-tool/module.d.ts +3 -0
  131. package/dist-sdk/src/entities/agent-tool/module.js +32 -0
  132. package/dist-sdk/src/entities/agent-tool/to-tf.d.ts +38 -0
  133. package/dist-sdk/src/entities/agent-tool/to-tf.js +164 -0
  134. package/dist-sdk/src/entities/agent-tool/types.d.ts +42 -0
  135. package/dist-sdk/src/entities/agent-tool/types.js +70 -0
  136. package/dist-sdk/src/entities/app/build.d.ts +318 -0
  137. package/dist-sdk/src/entities/app/build.js +325 -0
  138. package/dist-sdk/src/entities/app/deserializer/normalize.d.ts +165 -0
  139. package/dist-sdk/src/entities/app/deserializer/normalize.js +12 -0
  140. package/dist-sdk/src/entities/app/display-blocks.d.ts +26 -0
  141. package/dist-sdk/src/entities/app/display-blocks.js +34 -0
  142. package/dist-sdk/src/entities/app/from-tf.d.ts +23 -0
  143. package/dist-sdk/src/entities/app/from-tf.js +180 -0
  144. package/dist-sdk/src/entities/app/index.d.ts +11 -0
  145. package/dist-sdk/src/entities/app/index.js +10 -0
  146. package/dist-sdk/src/entities/app/locals.d.ts +11 -0
  147. package/dist-sdk/src/entities/app/locals.js +31 -0
  148. package/dist-sdk/src/entities/app/module.d.ts +4 -0
  149. package/dist-sdk/src/entities/app/module.js +59 -0
  150. package/dist-sdk/src/entities/app/to-tf.d.ts +28 -0
  151. package/dist-sdk/src/entities/app/to-tf.js +183 -0
  152. package/dist-sdk/src/entities/approval-chain/build.d.ts +24 -0
  153. package/dist-sdk/src/entities/approval-chain/build.js +56 -0
  154. package/dist-sdk/src/entities/approval-chain/index.d.ts +6 -0
  155. package/dist-sdk/src/entities/approval-chain/index.js +6 -0
  156. package/dist-sdk/src/entities/approval-chain/steps.d.ts +24 -0
  157. package/dist-sdk/src/entities/approval-chain/steps.js +20 -0
  158. package/dist-sdk/src/entities/automation/build.d.ts +215 -0
  159. package/dist-sdk/src/entities/automation/build.js +424 -0
  160. package/dist-sdk/src/entities/automation/catalog-render.d.ts +5 -0
  161. package/dist-sdk/src/entities/automation/catalog-render.js +35 -0
  162. package/dist-sdk/src/entities/automation/deserializer/ast.d.ts +135 -0
  163. package/dist-sdk/src/entities/automation/deserializer/ast.js +13 -0
  164. package/dist-sdk/src/entities/automation/deserializer/print-automation.d.ts +40 -0
  165. package/dist-sdk/src/entities/automation/deserializer/print-automation.js +1040 -0
  166. package/dist-sdk/src/entities/automation/filter.d.ts +81 -0
  167. package/dist-sdk/src/entities/automation/filter.js +146 -0
  168. package/dist-sdk/src/entities/automation/from-tf.d.ts +36 -0
  169. package/dist-sdk/src/entities/automation/from-tf.js +252 -0
  170. package/dist-sdk/src/entities/automation/index.d.ts +18 -0
  171. package/dist-sdk/src/entities/automation/index.js +21 -0
  172. package/dist-sdk/src/entities/automation/module.d.ts +3 -0
  173. package/dist-sdk/src/entities/automation/module.js +153 -0
  174. package/dist-sdk/src/entities/automation/operators.d.ts +66 -0
  175. package/dist-sdk/src/entities/automation/operators.js +43 -0
  176. package/dist-sdk/src/entities/automation/script-code.d.ts +62 -0
  177. package/dist-sdk/src/entities/automation/script-code.js +366 -0
  178. package/dist-sdk/src/entities/automation/serialize.d.ts +6 -0
  179. package/dist-sdk/src/entities/automation/serialize.js +41 -0
  180. package/dist-sdk/src/entities/automation/tasks.d.ts +535 -0
  181. package/dist-sdk/src/entities/automation/tasks.js +697 -0
  182. package/dist-sdk/src/entities/automation/to-tf.d.ts +38 -0
  183. package/dist-sdk/src/entities/automation/to-tf.js +266 -0
  184. package/dist-sdk/src/entities/automation/triggers.d.ts +197 -0
  185. package/dist-sdk/src/entities/automation/triggers.js +202 -0
  186. package/dist-sdk/src/entities/automation/types.d.ts +53 -0
  187. package/dist-sdk/src/entities/automation/types.js +101 -0
  188. package/dist-sdk/src/entities/automation/value-ref-tf.d.ts +76 -0
  189. package/dist-sdk/src/entities/automation/value-ref-tf.js +190 -0
  190. package/dist-sdk/src/entities/element/build.d.ts +108 -0
  191. package/dist-sdk/src/entities/element/build.js +109 -0
  192. package/dist-sdk/src/entities/element/from-tf.d.ts +19 -0
  193. package/dist-sdk/src/entities/element/from-tf.js +155 -0
  194. package/dist-sdk/src/entities/element/index.d.ts +9 -0
  195. package/dist-sdk/src/entities/element/index.js +9 -0
  196. package/dist-sdk/src/entities/element/locals.d.ts +7 -0
  197. package/dist-sdk/src/entities/element/locals.js +12 -0
  198. package/dist-sdk/src/entities/element/module.d.ts +8 -0
  199. package/dist-sdk/src/entities/element/module.js +63 -0
  200. package/dist-sdk/src/entities/element/to-tf.d.ts +14 -0
  201. package/dist-sdk/src/entities/element/to-tf.js +151 -0
  202. package/dist-sdk/src/entities/field/build.d.ts +69 -0
  203. package/dist-sdk/src/entities/field/build.js +74 -0
  204. package/dist-sdk/src/entities/field/calc/aggregate.d.ts +60 -0
  205. package/dist-sdk/src/entities/field/calc/aggregate.js +71 -0
  206. package/dist-sdk/src/entities/field/calc/date.d.ts +73 -0
  207. package/dist-sdk/src/entities/field/calc/date.js +109 -0
  208. package/dist-sdk/src/entities/field/calc/index.d.ts +229 -0
  209. package/dist-sdk/src/entities/field/calc/index.js +433 -0
  210. package/dist-sdk/src/entities/field/calc/numeric.d.ts +22 -0
  211. package/dist-sdk/src/entities/field/calc/numeric.js +67 -0
  212. package/dist-sdk/src/entities/field/calc/runtime.d.ts +61 -0
  213. package/dist-sdk/src/entities/field/calc/runtime.js +170 -0
  214. package/dist-sdk/src/entities/field/calc/text.d.ts +100 -0
  215. package/dist-sdk/src/entities/field/calc/text.js +208 -0
  216. package/dist-sdk/src/entities/field/calc/types.d.ts +86 -0
  217. package/dist-sdk/src/entities/field/calc/types.js +23 -0
  218. package/dist-sdk/src/entities/field/calc.d.ts +108 -0
  219. package/dist-sdk/src/entities/field/calc.js +54 -0
  220. package/dist-sdk/src/entities/field/from-tf.d.ts +29 -0
  221. package/dist-sdk/src/entities/field/from-tf.js +73 -0
  222. package/dist-sdk/src/entities/field/locals.d.ts +8 -0
  223. package/dist-sdk/src/entities/field/locals.js +24 -0
  224. package/dist-sdk/src/entities/field/module.d.ts +3 -0
  225. package/dist-sdk/src/entities/field/module.js +49 -0
  226. package/dist-sdk/src/entities/field/options.d.ts +27 -0
  227. package/dist-sdk/src/entities/field/options.js +76 -0
  228. package/dist-sdk/src/entities/field/record-shape.d.ts +57 -0
  229. package/dist-sdk/src/entities/field/record-shape.js +1 -0
  230. package/dist-sdk/src/entities/field/to-tf.d.ts +55 -0
  231. package/dist-sdk/src/entities/field/to-tf.js +97 -0
  232. package/dist-sdk/src/entities/field/types.d.ts +27 -0
  233. package/dist-sdk/src/entities/field/types.js +46 -0
  234. package/dist-sdk/src/entities/file-reader/build.d.ts +124 -0
  235. package/dist-sdk/src/entities/file-reader/build.js +105 -0
  236. package/dist-sdk/src/entities/file-reader/index.d.ts +5 -0
  237. package/dist-sdk/src/entities/file-reader/index.js +5 -0
  238. package/dist-sdk/src/entities/flow/activities/agent.d.ts +15 -0
  239. package/dist-sdk/src/entities/flow/activities/agent.js +29 -0
  240. package/dist-sdk/src/entities/flow/activities/approval.d.ts +9 -0
  241. package/dist-sdk/src/entities/flow/activities/approval.js +18 -0
  242. package/dist-sdk/src/entities/flow/activities/automation.d.ts +12 -0
  243. package/dist-sdk/src/entities/flow/activities/automation.js +22 -0
  244. package/dist-sdk/src/entities/flow/activities/ctx.d.ts +34 -0
  245. package/dist-sdk/src/entities/flow/activities/ctx.js +38 -0
  246. package/dist-sdk/src/entities/flow/activities/form.d.ts +22 -0
  247. package/dist-sdk/src/entities/flow/activities/form.js +36 -0
  248. package/dist-sdk/src/entities/flow/activities/index.d.ts +14 -0
  249. package/dist-sdk/src/entities/flow/activities/index.js +13 -0
  250. package/dist-sdk/src/entities/flow/activities/input-refs.d.ts +39 -0
  251. package/dist-sdk/src/entities/flow/activities/input-refs.js +19 -0
  252. package/dist-sdk/src/entities/flow/activities/prompt-template.d.ts +13 -0
  253. package/dist-sdk/src/entities/flow/activities/prompt-template.js +34 -0
  254. package/dist-sdk/src/entities/flow/activities/render-catalog.d.ts +140 -0
  255. package/dist-sdk/src/entities/flow/activities/render-catalog.js +174 -0
  256. package/dist-sdk/src/entities/flow/activities/types.d.ts +33 -0
  257. package/dist-sdk/src/entities/flow/activities/types.js +1 -0
  258. package/dist-sdk/src/entities/flow/build.d.ts +38 -0
  259. package/dist-sdk/src/entities/flow/build.js +115 -0
  260. package/dist-sdk/src/entities/flow/index.d.ts +8 -0
  261. package/dist-sdk/src/entities/flow/index.js +7 -0
  262. package/dist-sdk/src/entities/flow/serialize.d.ts +51 -0
  263. package/dist-sdk/src/entities/flow/serialize.js +94 -0
  264. package/dist-sdk/src/entities/flow/util.d.ts +27 -0
  265. package/dist-sdk/src/entities/flow/util.js +38 -0
  266. package/dist-sdk/src/entities/org/category.d.ts +5 -0
  267. package/dist-sdk/src/entities/org/category.js +33 -0
  268. package/dist-sdk/src/entities/org/cloud-link.d.ts +5 -0
  269. package/dist-sdk/src/entities/org/cloud-link.js +33 -0
  270. package/dist-sdk/src/entities/org/connector.d.ts +5 -0
  271. package/dist-sdk/src/entities/org/connector.js +37 -0
  272. package/dist-sdk/src/entities/org/group.d.ts +5 -0
  273. package/dist-sdk/src/entities/org/group.js +31 -0
  274. package/dist-sdk/src/entities/org/index.d.ts +10 -0
  275. package/dist-sdk/src/entities/org/index.js +10 -0
  276. package/dist-sdk/src/entities/org/role.d.ts +7 -0
  277. package/dist-sdk/src/entities/org/role.js +21 -0
  278. package/dist-sdk/src/entities/org/user.d.ts +7 -0
  279. package/dist-sdk/src/entities/org/user.js +21 -0
  280. package/dist-sdk/src/entities/search-table/build.d.ts +41 -0
  281. package/dist-sdk/src/entities/search-table/build.js +79 -0
  282. package/dist-sdk/src/entities/search-table/index.d.ts +5 -0
  283. package/dist-sdk/src/entities/search-table/index.js +5 -0
  284. package/dist-sdk/src/entities/search-table/module.d.ts +6 -0
  285. package/dist-sdk/src/entities/search-table/module.js +64 -0
  286. package/dist-sdk/src/entities/shared/context.d.ts +93 -0
  287. package/dist-sdk/src/entities/shared/context.js +156 -0
  288. package/dist-sdk/src/entities/shared/filters/ast.d.ts +242 -0
  289. package/dist-sdk/src/entities/shared/filters/ast.js +65 -0
  290. package/dist-sdk/src/entities/shared/filters/index.d.ts +211 -0
  291. package/dist-sdk/src/entities/shared/filters/index.js +372 -0
  292. package/dist-sdk/src/entities/shared/filters/types.d.ts +170 -0
  293. package/dist-sdk/src/entities/shared/filters/types.js +7 -0
  294. package/dist-sdk/src/entities/shared/ref.d.ts +160 -0
  295. package/dist-sdk/src/entities/shared/ref.js +119 -0
  296. package/dist-sdk/src/entities/shared/types/common.d.ts +106 -0
  297. package/dist-sdk/src/entities/shared/types/common.js +64 -0
  298. package/dist-sdk/src/entities/shared/types/field-types.d.ts +49 -0
  299. package/dist-sdk/src/entities/shared/types/field-types.js +48 -0
  300. package/dist-sdk/src/entities/shared/types/platform.d.ts +46 -0
  301. package/dist-sdk/src/entities/shared/types/platform.js +10 -0
  302. package/dist-sdk/src/entities/skill/build.d.ts +25 -0
  303. package/dist-sdk/src/entities/skill/build.js +50 -0
  304. package/dist-sdk/src/entities/skill/deserializer/print-skill-v2.d.ts +20 -0
  305. package/dist-sdk/src/entities/skill/deserializer/print-skill-v2.js +96 -0
  306. package/dist-sdk/src/entities/skill/from-tf.d.ts +33 -0
  307. package/dist-sdk/src/entities/skill/from-tf.js +95 -0
  308. package/dist-sdk/src/entities/skill/index.d.ts +7 -0
  309. package/dist-sdk/src/entities/skill/index.js +7 -0
  310. package/dist-sdk/src/entities/skill/module.d.ts +4 -0
  311. package/dist-sdk/src/entities/skill/module.js +106 -0
  312. package/dist-sdk/src/entities/skill/to-tf.d.ts +33 -0
  313. package/dist-sdk/src/entities/skill/to-tf.js +58 -0
  314. package/dist-sdk/src/entities/skill/tools.d.ts +71 -0
  315. package/dist-sdk/src/entities/skill/tools.js +88 -0
  316. package/dist-sdk/src/entities/skill-tool/from-tf.d.ts +47 -0
  317. package/dist-sdk/src/entities/skill-tool/from-tf.js +121 -0
  318. package/dist-sdk/src/entities/skill-tool/module.d.ts +3 -0
  319. package/dist-sdk/src/entities/skill-tool/module.js +21 -0
  320. package/dist-sdk/src/entities/skill-tool/to-tf.d.ts +32 -0
  321. package/dist-sdk/src/entities/skill-tool/to-tf.js +107 -0
  322. package/dist-sdk/src/entities/skill-tool/types.d.ts +40 -0
  323. package/dist-sdk/src/entities/skill-tool/types.js +67 -0
  324. package/dist-sdk/src/entities/table/build.d.ts +74 -0
  325. package/dist-sdk/src/entities/table/build.js +339 -0
  326. package/dist-sdk/src/entities/table/catalog-render.d.ts +5 -0
  327. package/dist-sdk/src/entities/table/catalog-render.js +39 -0
  328. package/dist-sdk/src/entities/table/fields.d.ts +81 -0
  329. package/dist-sdk/src/entities/table/fields.js +70 -0
  330. package/dist-sdk/src/entities/table/filter.d.ts +41 -0
  331. package/dist-sdk/src/entities/table/filter.js +89 -0
  332. package/dist-sdk/src/entities/table/index.d.ts +8 -0
  333. package/dist-sdk/src/entities/table/index.js +12 -0
  334. package/dist-sdk/src/entities/table/joins.d.ts +26 -0
  335. package/dist-sdk/src/entities/table/joins.js +31 -0
  336. package/dist-sdk/src/entities/table/keys.d.ts +11 -0
  337. package/dist-sdk/src/entities/table/keys.js +25 -0
  338. package/dist-sdk/src/entities/table/module.d.ts +5 -0
  339. package/dist-sdk/src/entities/table/module.js +25 -0
  340. package/dist-sdk/src/entities/table/state.d.ts +39 -0
  341. package/dist-sdk/src/entities/table/state.js +43 -0
  342. package/dist-sdk/src/entities/view/from-tf.d.ts +25 -0
  343. package/dist-sdk/src/entities/view/from-tf.js +233 -0
  344. package/dist-sdk/src/entities/view/module.d.ts +24 -0
  345. package/dist-sdk/src/entities/view/module.js +61 -0
  346. package/dist-sdk/src/entities/view/to-tf.d.ts +63 -0
  347. package/dist-sdk/src/entities/view/to-tf.js +156 -0
  348. package/dist-sdk/src/entities/view/types.d.ts +58 -0
  349. package/dist-sdk/src/entities/view/types.js +89 -0
  350. package/dist-sdk/src/graph/deferred-catalog-render.d.ts +14 -0
  351. package/dist-sdk/src/graph/deferred-catalog-render.js +37 -0
  352. package/dist-sdk/src/graph/index.d.ts +83 -0
  353. package/dist-sdk/src/graph/index.js +207 -0
  354. package/dist-sdk/src/graph/modules.d.ts +7 -0
  355. package/dist-sdk/src/graph/modules.js +37 -0
  356. package/dist-sdk/src/graph/types.d.ts +301 -0
  357. package/dist-sdk/src/graph/types.js +102 -0
  358. package/dist-sdk/src/internal/sdk-package.d.ts +7 -0
  359. package/dist-sdk/src/internal/sdk-package.js +23 -0
  360. package/package.json +173 -8
@@ -0,0 +1,61 @@
1
+ /** The view entity's registry entries (see src/graph/). */
2
+ import { NO_CANVAS, NO_CATALOG, NO_DATA, NO_LIFECYCLE, } from "../../graph/types.js";
3
+ import { LAYOUT_RESOURCE_TYPE, LIST_VIEW_RESOURCE_TYPE, MANAGED_VIEW_ORDER_RESOURCE_TYPE, } from "./types.js";
4
+ /**
5
+ * Layouts + list views are stream members folded into the app authoring file
6
+ * (inline), extracted by `appFromTf` — not own-file kinds.
7
+ */
8
+ export const viewModule = {
9
+ kind: "view",
10
+ stream: { role: "streamMember" },
11
+ authoring: { unit: "inline", bag: "views" },
12
+ parents: [
13
+ { parent: "app", child: "view" },
14
+ { parent: "element", child: "view" },
15
+ ],
16
+ resource: {
17
+ shape: "subTypes",
18
+ rows: [
19
+ { key: "layout", resourceType: LAYOUT_RESOURCE_TYPE, implemented: true },
20
+ { key: "listView", resourceType: LIST_VIEW_RESOURCE_TYPE, implemented: true },
21
+ ],
22
+ },
23
+ data: NO_DATA,
24
+ lifecycle: NO_LIFECYCLE,
25
+ canvas: NO_CANVAS,
26
+ catalog: NO_CATALOG,
27
+ };
28
+ /**
29
+ * `elementum_managed_view_order` is a singleton per aspect with no identity
30
+ * of its own — ei's export carries the OWNING APP's id as its import id
31
+ * (confirmed live against `prestonhigh`: both `elementum_app.prestonhigh`
32
+ * and `elementum_managed_view_order.preston_high_students_view_order` import
33
+ * the same platform id). Adopting it through the generic targeted-import
34
+ * gate would collide with the app's own state binding (same id, two
35
+ * addresses) — the gate correctly refuses to guess rather than silently
36
+ * mis-binding it. So: scoped for the build-vs-export (build does emit it, so a
37
+ * stream mismatch still gets caught) but NOT adoptable. Left unresolved:
38
+ * whether a plan/apply against an app whose view order already exists on
39
+ * the platform treats this as a safe no-op create or errors "already
40
+ * exists" — not yet verified live. Until confirmed, treat a fresh
41
+ * `elementum apply` on an adopted app with pre-existing list views as a real open
42
+ * risk, not a settled case.
43
+ */
44
+ export const managedViewOrderModule = {
45
+ kind: "managed-view-order",
46
+ stream: { role: "streamMember" },
47
+ authoring: { unit: "inline", bag: "views" },
48
+ parents: [
49
+ { parent: "app", child: "managed-view-order" },
50
+ { parent: "element", child: "managed-view-order" },
51
+ ],
52
+ resource: {
53
+ shape: "single",
54
+ resourceType: MANAGED_VIEW_ORDER_RESOURCE_TYPE,
55
+ adoptable: false,
56
+ },
57
+ data: NO_DATA,
58
+ lifecycle: NO_LIFECYCLE,
59
+ canvas: NO_CANVAS,
60
+ catalog: NO_CATALOG,
61
+ };
@@ -0,0 +1,63 @@
1
+ /**
2
+ * View emission: an app's authored `layouts`/`listViews`/`viewOrder` bags →
3
+ * `elementum_layout` / `elementum_list_view` / `elementum_managed_view_order`
4
+ * resource blocks, in ei's dialect. The owning app's to-tf drives this pass
5
+ * and supplies the `objectId` back-reference — this module never names the
6
+ * app's own resource type.
7
+ *
8
+ * Unsupported authoring shapes degrade through `diagnostics` — reported,
9
+ * never silent. `children`-shaped structural breakage isn't possible here
10
+ * (views have no nested sub-entities of their own), so this module never
11
+ * throws `EntityTfError`.
12
+ */
13
+ import { type TfBlock, type TfValue } from "../../engine/tf/index.js";
14
+ /** The authored field-ref shape post-`slimTokens`: a system key string, or a slimmed `FieldRef` token. */
15
+ export type ViewFieldRefWire = string | {
16
+ readonly __kind?: string;
17
+ readonly refName?: string;
18
+ readonly fieldType?: string;
19
+ };
20
+ export interface AppLayoutSectionWire {
21
+ readonly type?: string;
22
+ readonly displayLocation?: string;
23
+ readonly displayOrder?: number;
24
+ readonly sideNavItem?: boolean;
25
+ readonly name?: string;
26
+ readonly icon?: string;
27
+ readonly color?: string;
28
+ readonly fields?: readonly ViewFieldRefWire[];
29
+ }
30
+ export interface AppLayoutWire {
31
+ readonly sections: readonly AppLayoutSectionWire[];
32
+ }
33
+ export interface AppListViewWire {
34
+ readonly name?: string;
35
+ readonly columns?: readonly ViewFieldRefWire[];
36
+ readonly allowRecordCreation?: boolean;
37
+ readonly density?: string;
38
+ readonly rows?: number;
39
+ /** Opaque JSON pass-through (see `entities/app/build.ts`'s `AppListView.filter` for why). */
40
+ readonly filter?: unknown;
41
+ /** Opaque JSON pass-through — see `filter`. */
42
+ readonly sort?: unknown;
43
+ }
44
+ export interface ViewToTfOptions {
45
+ /** The owning app's tfLabel (its namespace). */
46
+ readonly appTfLabel: string;
47
+ /**
48
+ * The owning app's display name — `elementum_managed_view_order`'s label
49
+ * has no authored bag key (it's a derived aspect-wide singleton), so ei
50
+ * derives it from the app's NAME (its `SanitizeName`, not the namespace);
51
+ * matching that here keeps the build-vs-export address-stable across a real pull.
52
+ */
53
+ readonly appName: string;
54
+ /** The owning app's id reference, e.g. `elementum_app.<ns>.id` — computed by the caller. */
55
+ readonly objectId: TfValue;
56
+ /** Degradations land here — reported by the caller, never silent. */
57
+ readonly diagnostics: string[];
58
+ }
59
+ export interface ViewToTfResult {
60
+ readonly blocks: readonly TfBlock[];
61
+ }
62
+ /** `layouts`/`listViews`/`viewOrder` → their resource blocks, in ei's dialect. */
63
+ export declare function viewToTf(layouts: Readonly<Record<string, AppLayoutWire>> | undefined, listViews: Readonly<Record<string, AppListViewWire>> | undefined, viewOrder: readonly string[] | undefined, opts: ViewToTfOptions): ViewToTfResult;
@@ -0,0 +1,156 @@
1
+ /**
2
+ * View emission: an app's authored `layouts`/`listViews`/`viewOrder` bags →
3
+ * `elementum_layout` / `elementum_list_view` / `elementum_managed_view_order`
4
+ * resource blocks, in ei's dialect. The owning app's to-tf drives this pass
5
+ * and supplies the `objectId` back-reference — this module never names the
6
+ * app's own resource type.
7
+ *
8
+ * Unsupported authoring shapes degrade through `diagnostics` — reported,
9
+ * never silent. `children`-shaped structural breakage isn't possible here
10
+ * (views have no nested sub-entities of their own), so this module never
11
+ * throws `EntityTfError`.
12
+ */
13
+ import { expr, isCanonicalTsLabel, sanitizeName, tsLabelToTfLabel, } from "../../engine/tf/index.js";
14
+ import { fieldRefToTfValue as customFieldRefToTfValue } from "../field/to-tf.js";
15
+ import { SUB_TYPE_BY_AUTHORING_TYPE } from "../field/types.js";
16
+ import { GROUP_SECTION_WIRE_TYPE, LAYOUT_RESOURCE_TYPE, LAYOUT_RESTRICTED_SYSTEM_FIELD_KEYS, LIST_VIEW_RESOURCE_TYPE, MANAGED_VIEW_ORDER_RESOURCE_TYPE, SECTION_TYPE_TO_WIRE, SYSTEM_FIELD_ID_ATTR_BY_KEY, UPDATE_SECTION_WIRE_TYPE, } from "./types.js";
17
+ /** `layouts`/`listViews`/`viewOrder` → their resource blocks, in ei's dialect. */
18
+ export function viewToTf(layouts, listViews, viewOrder, opts) {
19
+ const { appTfLabel, appName, objectId, diagnostics } = opts;
20
+ const blocks = [];
21
+ for (const [stageKey, layout] of Object.entries(layouts ?? {})) {
22
+ blocks.push(layoutToTf(stageKey, layout, appTfLabel, objectId, diagnostics));
23
+ }
24
+ const viewAddressByKey = new Map();
25
+ for (const [viewKey, view] of Object.entries(listViews ?? {})) {
26
+ if (!isCanonicalTsLabel(viewKey)) {
27
+ diagnostics.push(`listViews key "${viewKey}" is not a canonical tsLabel (see src/engine/tf/labels.ts) — rename the key`);
28
+ continue;
29
+ }
30
+ const tfLabel = tsLabelToTfLabel(viewKey);
31
+ const attrs = {
32
+ aspect_id: objectId,
33
+ name: view.name ?? "",
34
+ allow_record_creation: view.allowRecordCreation ?? true,
35
+ columns: resolveFieldRefs(view.columns ?? [], appTfLabel, `listViews.${viewKey}.columns`, diagnostics),
36
+ density: view.density ?? "STANDARD",
37
+ rows: view.rows ?? 25,
38
+ };
39
+ if (view.filter !== undefined)
40
+ attrs.filter = expr.jsonencode(view.filter);
41
+ if (view.sort !== undefined)
42
+ attrs.sort = expr.jsonencode(view.sort);
43
+ blocks.push({ kind: "resource", type: LIST_VIEW_RESOURCE_TYPE, label: tfLabel, attrs });
44
+ viewAddressByKey.set(viewKey, tfLabel);
45
+ }
46
+ if (viewAddressByKey.size > 0) {
47
+ const orderKeys = viewOrder ?? Object.keys(listViews ?? {});
48
+ const placed = new Set();
49
+ const viewIds = [];
50
+ for (const key of orderKeys) {
51
+ const tfLabel = viewAddressByKey.get(key);
52
+ if (tfLabel === undefined) {
53
+ diagnostics.push(`viewOrder: "${key}" is not a declared listViews key; dropped`);
54
+ continue;
55
+ }
56
+ placed.add(key);
57
+ viewIds.push(expr.resourceAttr(LIST_VIEW_RESOURCE_TYPE, tfLabel, ["id"]));
58
+ }
59
+ // Every declared list view must appear even if viewOrder omitted it —
60
+ // otherwise the omitted view has no ordering entry and the platform
61
+ // may reject or silently exclude it from the managed order.
62
+ for (const [key, tfLabel] of viewAddressByKey) {
63
+ if (placed.has(key))
64
+ continue;
65
+ diagnostics.push(`listViews.${key} is not listed in viewOrder; appended`);
66
+ viewIds.push(expr.resourceAttr(LIST_VIEW_RESOURCE_TYPE, tfLabel, ["id"]));
67
+ }
68
+ if (viewIds.length > 0) {
69
+ blocks.push({
70
+ kind: "resource",
71
+ type: MANAGED_VIEW_ORDER_RESOURCE_TYPE,
72
+ label: `${sanitizeName(appName)}_view_order`,
73
+ attrs: { object_id: objectId, view_ids: viewIds },
74
+ });
75
+ }
76
+ }
77
+ return { blocks };
78
+ }
79
+ function layoutToTf(stageKey, layout, appTfLabel, objectId, diagnostics) {
80
+ const sections = [];
81
+ for (const section of layout.sections) {
82
+ const authoringType = section.type ?? "group";
83
+ const wireType = SECTION_TYPE_TO_WIRE[authoringType];
84
+ if (wireType === undefined) {
85
+ diagnostics.push(`layouts.${stageKey}: section type "${authoringType}" is not a known layout section type; dropped`);
86
+ continue;
87
+ }
88
+ const sec = {
89
+ type: wireType,
90
+ display_location: section.displayLocation ?? "CENTER",
91
+ display_order: section.displayOrder ?? 0,
92
+ side_nav_item: section.sideNavItem ?? false,
93
+ };
94
+ if (wireType === GROUP_SECTION_WIRE_TYPE) {
95
+ sec.name = section.name ?? "";
96
+ if (section.icon !== undefined)
97
+ sec.icon = section.icon;
98
+ if (section.color !== undefined)
99
+ sec.color = section.color;
100
+ const where = `layouts.${stageKey} section "${section.name ?? ""}"`;
101
+ const fields = (section.fields ?? []).filter((f) => {
102
+ if (typeof f === "string" && LAYOUT_RESTRICTED_SYSTEM_FIELD_KEYS.has(f)) {
103
+ diagnostics.push(`${where}: system field "${f}" is platform-managed and cannot be placed in a layout section; dropped`);
104
+ return false;
105
+ }
106
+ return true;
107
+ });
108
+ sec.field_ids = resolveFieldRefs(fields, appTfLabel, where, diagnostics);
109
+ }
110
+ else if (wireType === UPDATE_SECTION_WIRE_TYPE && section.name !== undefined) {
111
+ sec.name = section.name;
112
+ }
113
+ sections.push(sec);
114
+ }
115
+ return {
116
+ kind: "resource",
117
+ type: LAYOUT_RESOURCE_TYPE,
118
+ label: stageKey,
119
+ attrs: {
120
+ object_id: objectId,
121
+ stage_id: expr.local(`${appTfLabel}_stage_ids_by_key`, [{ index: stageKey }]),
122
+ sections,
123
+ },
124
+ };
125
+ }
126
+ function resolveFieldRefs(refs, appTfLabel, where, diagnostics) {
127
+ const out = [];
128
+ for (const ref of refs) {
129
+ const resolved = fieldRefToTfValue(ref, appTfLabel, where, diagnostics);
130
+ if (resolved !== undefined)
131
+ out.push(resolved);
132
+ }
133
+ return out;
134
+ }
135
+ function fieldRefToTfValue(ref, appTfLabel, where, diagnostics) {
136
+ if (typeof ref === "string") {
137
+ const attr = SYSTEM_FIELD_ID_ATTR_BY_KEY.get(ref);
138
+ if (attr === undefined) {
139
+ diagnostics.push(`${where}: "${ref}" is not a known system field key; dropped`);
140
+ return undefined;
141
+ }
142
+ return expr.local(`${appTfLabel}_${attr}`);
143
+ }
144
+ const refName = ref.refName ?? "";
145
+ if (!SUB_TYPE_BY_AUTHORING_TYPE.has(ref.fieldType ?? "")) {
146
+ diagnostics.push(`${where}: field "${refName}" (type ${ref.fieldType ?? "?"}) has no terraform field resource mapping; dropped`);
147
+ return undefined;
148
+ }
149
+ if (!isCanonicalTsLabel(refName)) {
150
+ diagnostics.push(`${where}: field bag key "${refName}" is not a canonical tsLabel; dropped`);
151
+ return undefined;
152
+ }
153
+ // Actual resourceAttr construction is shared with agent-tool's field refs
154
+ // (src/entities/agent-tool/to-tf.ts) via entities/field/to-tf.ts.
155
+ return customFieldRefToTfValue(ref.fieldType, refName);
156
+ }
@@ -0,0 +1,58 @@
1
+ /**
2
+ * The view entity's dialect tables. "Views" are three terraform resource
3
+ * types owned inline by an app (like fields, not an independent lifecycle
4
+ * like agents/automations): `elementum_layout` (one per stage),
5
+ * `elementum_list_view` (a saved list), and `elementum_managed_view_order`
6
+ * (the ordering of an aspect's list views — a singleton once any exist).
7
+ *
8
+ * Unlike field/agent-tool, these three are structurally distinct resources
9
+ * rather than variants of one shape, so there is no typeKey/resourceType
10
+ * dispatch row per kind — just the three resource-type constants plus the
11
+ * layout section-type enum (a nested attribute, not a separate resource).
12
+ */
13
+ export declare const LAYOUT_RESOURCE_TYPE = "elementum_layout";
14
+ export declare const LIST_VIEW_RESOURCE_TYPE = "elementum_list_view";
15
+ export declare const MANAGED_VIEW_ORDER_RESOURCE_TYPE = "elementum_managed_view_order";
16
+ /**
17
+ * Layout section `type` discriminator: authoring camelCase ↔ the provider's
18
+ * wire value, verified against `fde-tf-cli-old`'s `layout_resource.go`
19
+ * (the schema's own embedded doc table). Only `group` carries
20
+ * `name`/`icon`/`color`/`field_ids`; `update` additionally takes an optional
21
+ * `name`; the rest are bare component sections.
22
+ */
23
+ export declare const SECTION_TYPE_TO_WIRE: Readonly<Record<string, string>>;
24
+ export declare const SECTION_TYPE_FROM_WIRE: ReadonlyMap<string, string>;
25
+ /** Section types whose `field_ids`/`name`/`icon`/`color` this pass authors (only `group`). */
26
+ export declare const GROUP_SECTION_WIRE_TYPE = "group";
27
+ /** The one other section type carrying an (optional) `name`. */
28
+ export declare const UPDATE_SECTION_WIRE_TYPE = "update";
29
+ /**
30
+ * System-field keys the platform refuses to accept in a layout `group`
31
+ * section's `field_ids` on create — confirmed live against `prestonhigh`:
32
+ * `elementum_layout` create errors "cannot place system fields in layout
33
+ * sections: ID (has HANDLE, TITLE, or STATUS tag), Title (...), Status
34
+ * (...)". The platform's OWN auto-provisioned default "System" section
35
+ * legitimately contains them (so `ei export`/`layoutFromTf` still capture
36
+ * them faithfully — this is a real, current fact about the app), but
37
+ * terraform can never re-create a section containing them: `to-tf` must
38
+ * drop these three specifically wherever a group section names them, or
39
+ * every layout recreate (any `sections` edit forces a full replace) fails.
40
+ * Audit fields (createdAt/createdBy/updatedAt/updatedBy/closedAt/closedBy)
41
+ * are NOT restricted — only HANDLE/TITLE/STATUS.
42
+ */
43
+ export declare const LAYOUT_RESTRICTED_SYSTEM_FIELD_KEYS: ReadonlySet<string>;
44
+ /**
45
+ * System-field key → the `local.<ns>_<attr>` name `entities/app/locals.ts`
46
+ * emits for it (`SYSTEM_FIELD_ID_ATTRS`'s `<tfLabel>_field_id` shape there).
47
+ * Derived, not hand-copied, so a change to `SYSTEM_FIELD_KEYS` can't drift
48
+ * silently out of sync with this table.
49
+ */
50
+ export declare const SYSTEM_FIELD_ID_ATTR_BY_KEY: ReadonlyMap<string, string>;
51
+ export declare const SYSTEM_FIELD_KEY_BY_ID_ATTR: ReadonlyMap<string, string>;
52
+ /** Attributes `layoutFromTf` understands — anything else is dialect growth, reported loudly. */
53
+ export declare const KNOWN_LAYOUT_ATTRS: ReadonlySet<string>;
54
+ export declare const KNOWN_LAYOUT_SECTION_ATTRS: ReadonlySet<string>;
55
+ /** Attributes `listViewFromTf` understands. */
56
+ export declare const KNOWN_LIST_VIEW_ATTRS: ReadonlySet<string>;
57
+ /** Attributes `managedViewOrderFromTf` understands. */
58
+ export declare const KNOWN_MANAGED_VIEW_ORDER_ATTRS: ReadonlySet<string>;
@@ -0,0 +1,89 @@
1
+ /**
2
+ * The view entity's dialect tables. "Views" are three terraform resource
3
+ * types owned inline by an app (like fields, not an independent lifecycle
4
+ * like agents/automations): `elementum_layout` (one per stage),
5
+ * `elementum_list_view` (a saved list), and `elementum_managed_view_order`
6
+ * (the ordering of an aspect's list views — a singleton once any exist).
7
+ *
8
+ * Unlike field/agent-tool, these three are structurally distinct resources
9
+ * rather than variants of one shape, so there is no typeKey/resourceType
10
+ * dispatch row per kind — just the three resource-type constants plus the
11
+ * layout section-type enum (a nested attribute, not a separate resource).
12
+ */
13
+ import { SYSTEM_FIELD_KEYS } from "../../core/system-fields.js";
14
+ import { tsLabelToTfLabel } from "../../engine/tf/index.js";
15
+ export const LAYOUT_RESOURCE_TYPE = "elementum_layout";
16
+ export const LIST_VIEW_RESOURCE_TYPE = "elementum_list_view";
17
+ export const MANAGED_VIEW_ORDER_RESOURCE_TYPE = "elementum_managed_view_order";
18
+ /**
19
+ * Layout section `type` discriminator: authoring camelCase ↔ the provider's
20
+ * wire value, verified against `fde-tf-cli-old`'s `layout_resource.go`
21
+ * (the schema's own embedded doc table). Only `group` carries
22
+ * `name`/`icon`/`color`/`field_ids`; `update` additionally takes an optional
23
+ * `name`; the rest are bare component sections.
24
+ */
25
+ export const SECTION_TYPE_TO_WIRE = {
26
+ group: "group",
27
+ activityLog: "activity_log",
28
+ approvals: "approvals",
29
+ attachments: "attachments",
30
+ status: "status",
31
+ surveys: "surveys",
32
+ relatedTasks: "related_tasks",
33
+ relationships: "relationships",
34
+ update: "update",
35
+ };
36
+ export const SECTION_TYPE_FROM_WIRE = new Map(Object.entries(SECTION_TYPE_TO_WIRE).map(([authoring, wire]) => [wire, authoring]));
37
+ /** Section types whose `field_ids`/`name`/`icon`/`color` this pass authors (only `group`). */
38
+ export const GROUP_SECTION_WIRE_TYPE = "group";
39
+ /** The one other section type carrying an (optional) `name`. */
40
+ export const UPDATE_SECTION_WIRE_TYPE = "update";
41
+ /**
42
+ * System-field keys the platform refuses to accept in a layout `group`
43
+ * section's `field_ids` on create — confirmed live against `prestonhigh`:
44
+ * `elementum_layout` create errors "cannot place system fields in layout
45
+ * sections: ID (has HANDLE, TITLE, or STATUS tag), Title (...), Status
46
+ * (...)". The platform's OWN auto-provisioned default "System" section
47
+ * legitimately contains them (so `ei export`/`layoutFromTf` still capture
48
+ * them faithfully — this is a real, current fact about the app), but
49
+ * terraform can never re-create a section containing them: `to-tf` must
50
+ * drop these three specifically wherever a group section names them, or
51
+ * every layout recreate (any `sections` edit forces a full replace) fails.
52
+ * Audit fields (createdAt/createdBy/updatedAt/updatedBy/closedAt/closedBy)
53
+ * are NOT restricted — only HANDLE/TITLE/STATUS.
54
+ */
55
+ export const LAYOUT_RESTRICTED_SYSTEM_FIELD_KEYS = new Set(["id", "title", "status"]);
56
+ /**
57
+ * System-field key → the `local.<ns>_<attr>` name `entities/app/locals.ts`
58
+ * emits for it (`SYSTEM_FIELD_ID_ATTRS`'s `<tfLabel>_field_id` shape there).
59
+ * Derived, not hand-copied, so a change to `SYSTEM_FIELD_KEYS` can't drift
60
+ * silently out of sync with this table.
61
+ */
62
+ export const SYSTEM_FIELD_ID_ATTR_BY_KEY = new Map(SYSTEM_FIELD_KEYS.map((key) => [key, `${tsLabelToTfLabel(key)}_field_id`]));
63
+ export const SYSTEM_FIELD_KEY_BY_ID_ATTR = new Map([...SYSTEM_FIELD_ID_ATTR_BY_KEY].map(([key, attr]) => [attr, key]));
64
+ /** Attributes `layoutFromTf` understands — anything else is dialect growth, reported loudly. */
65
+ export const KNOWN_LAYOUT_ATTRS = new Set(["object_id", "stage_id", "sections"]);
66
+ export const KNOWN_LAYOUT_SECTION_ATTRS = new Set([
67
+ "type",
68
+ "display_location",
69
+ "display_order",
70
+ "side_nav_item",
71
+ "name",
72
+ "icon",
73
+ "color",
74
+ "field_ids",
75
+ "modules",
76
+ ]);
77
+ /** Attributes `listViewFromTf` understands. */
78
+ export const KNOWN_LIST_VIEW_ATTRS = new Set([
79
+ "aspect_id",
80
+ "name",
81
+ "allow_record_creation",
82
+ "columns",
83
+ "density",
84
+ "rows",
85
+ "filter",
86
+ "sort",
87
+ ]);
88
+ /** Attributes `managedViewOrderFromTf` understands. */
89
+ export const KNOWN_MANAGED_VIEW_ORDER_ATTRS = new Set(["object_id", "view_ids"]);
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Catalog renderEntry for kinds not yet registered as EntityKindModules.
3
+ * Moves onto each kind's CatalogFacet when its module lands.
4
+ */
5
+ import type { CatalogRenderArgs, CatalogRenderResult } from "./types.js";
6
+ /** Simple `{ name }` / optional parent — flow, approvalChain, nested stubs. */
7
+ export declare function renderDeferredNamedEntry(factoryName: string, opts?: {
8
+ readonly omitParent?: boolean;
9
+ }): (args: CatalogRenderArgs) => CatalogRenderResult;
10
+ /**
11
+ * Document model with optional inline `fields` bag — mirrors the former
12
+ * catalog/render.ts dialect.
13
+ */
14
+ export declare function renderDocumentModelEntry(args: CatalogRenderArgs): CatalogRenderResult;
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Catalog renderEntry for kinds not yet registered as EntityKindModules.
3
+ * Moves onto each kind's CatalogFacet when its module lands.
4
+ */
5
+ import { asNamedRef, namedFactoryEntry, safeCatalogKey, } from "../catalog/render-helpers.js";
6
+ /** Simple `{ name }` / optional parent — flow, approvalChain, nested stubs. */
7
+ export function renderDeferredNamedEntry(factoryName, opts) {
8
+ return (args) => {
9
+ const named = asNamedRef(args.ref);
10
+ return namedFactoryEntry({
11
+ factoryName,
12
+ keyName: args.keyName,
13
+ baseIndent: args.baseIndent,
14
+ name: named.name,
15
+ parent: opts?.omitParent === true ? undefined : named.parent,
16
+ });
17
+ };
18
+ }
19
+ /**
20
+ * Document model with optional inline `fields` bag — mirrors the former
21
+ * catalog/render.ts dialect.
22
+ */
23
+ export function renderDocumentModelEntry(args) {
24
+ const ref = args.ref;
25
+ const fieldKeys = Object.keys(ref.fields ?? {}).sort();
26
+ const head = `${args.baseIndent}${safeCatalogKey(args.keyName)}: documentModelRef({ name: ${JSON.stringify(ref.name)}`;
27
+ if (fieldKeys.length === 0) {
28
+ return { lines: [`${head} }),`] };
29
+ }
30
+ const lines = [`${head},`, `${args.baseIndent} fields: {`];
31
+ for (const key of fieldKeys) {
32
+ const field = ref.fields[key];
33
+ lines.push(`${args.baseIndent} ${safeCatalogKey(key)}: documentModelFieldRef({ name: ${JSON.stringify(field.name)}, parent: ${JSON.stringify(field.parent ?? "")} }),`);
34
+ }
35
+ lines.push(`${args.baseIndent} },`, `${args.baseIndent}}),`);
36
+ return { lines, extraFactories: ["documentModelFieldRef"] };
37
+ }
@@ -0,0 +1,83 @@
1
+ /**
2
+ * Public graph barrel: KIND_MODULES + derived views for pull/build/canvas.
3
+ */
4
+ import { type CatalogRenderArgs, type CatalogRenderResult, type EntityKindModule, type KindId, type ParentEdge, matchType } from "./types.js";
5
+ export type { AuthoringFacet, CanvasComponentId, CanvasFacet, CanvasView, CatalogAuthoringArgs, CatalogFacet, CatalogRenderArgs, CatalogRenderResult, CatalogRoot, DataFacet, DataFacetCatalogKind, EntityKindId, EntityKindModule, KindId, LifecycleFacet, OrgIdentityBag, ParentEdge, ParentageFacet, ResourceFacet, StreamFacet, StreamMatch, StreamPartition, StreamRootExtractResult, ToTfResult, } from "./types.js";
6
+ export { NO_CANVAS, NO_CATALOG, NO_DATA, NO_LIFECYCLE, defaultMatchResourceType, implementedResourceTypes, isResourceAdoptable, isTfLive, knownResourceTypes, matchType, singleResourceType, } from "./types.js";
7
+ export { KIND_MODULES } from "./modules.js";
8
+ /** @deprecated Use {@link KIND_MODULES}. */
9
+ export declare const ENTITY_KIND_MODULES: readonly EntityKindModule[];
10
+ /** @deprecated Use structural views from DataFacet — kept for older call-site shapes. */
11
+ export interface ResourceKindModule {
12
+ readonly kind: string;
13
+ readonly resourceTypes: readonly string[];
14
+ readonly adoptable: boolean;
15
+ }
16
+ /** Modules whose data facet participates (not {@link NO_DATA}). */
17
+ export declare const DATA_FACET_MODULES: readonly EntityKindModule[];
18
+ /** Data source type → module (replaces ORG_KIND_BY_TYPE). */
19
+ export declare const DATA_FACET_BY_TYPE: ReadonlyMap<string, EntityKindModule>;
20
+ /** Org identity bags written by `edk pull org` (data.orgBag set). */
21
+ export declare const ORG_IDENTITY_BAGS: readonly EntityKindModule[];
22
+ /** Backward-compatible metadata view derived from the graph. */
23
+ export declare const RESOURCE_KIND_MODULES: readonly ResourceKindModule[];
24
+ /** Resource types the §6 adoption gates import. */
25
+ export declare const ADOPTABLE_RESOURCE_TYPES: ReadonlySet<string>;
26
+ /** Resource types included in the build-vs-export compare (TF-live ∪ data facets referenced by build). */
27
+ export declare const BUILD_VS_EXPORT_SCOPE_TYPES: ReadonlySet<string>;
28
+ /** Entity-declared reference aliases normalized by the live round-trip gate. */
29
+ export declare const BUILD_VS_EXPORT_REFERENCE_ALIASES: {
30
+ readonly blockType: string;
31
+ readonly attribute: string;
32
+ readonly fromType: string;
33
+ readonly toType: string;
34
+ }[];
35
+ /** Kind id → module. */
36
+ export declare const KIND_BY_ID: ReadonlyMap<KindId, EntityKindModule>;
37
+ /** @deprecated Use {@link KIND_BY_ID}. */
38
+ export declare const ENTITY_KIND_BY_ID: ReadonlyMap<KindId, EntityKindModule>;
39
+ /**
40
+ * Terraform resource type → owning kind module. Excludes data-facet-only /
41
+ * orgExport kinds so partition does not treat org data types as resources.
42
+ */
43
+ export declare const TYPE_TO_KIND: ReadonlyMap<string, EntityKindModule>;
44
+ /** Stream-root kinds (app, element, …). */
45
+ export declare const STREAM_ROOT_MODULES: readonly EntityKindModule[];
46
+ /** Own-file children of a parent kind (build discovery + pull print paths). */
47
+ export declare function ownFileChildrenOf(parent: KindId): readonly EntityKindModule[];
48
+ /**
49
+ * Own-file children that contribute to generated catalogs (may lack `toTf`,
50
+ * e.g. skill / search-table before their TF tranche).
51
+ */
52
+ export declare function ownFileCatalogChildrenOf(parent: KindId): readonly EntityKindModule[];
53
+ /** All own-file bags declared under a parent (including stubs without lifecycle). */
54
+ export declare function ownFileBagsUnder(parent: KindId): readonly string[];
55
+ /** Org-root own-file bags (apps, tables, …) — authoring path roots. */
56
+ export declare function orgRootOwnFileBags(): readonly string[];
57
+ /** Parent edges for tests / docs. */
58
+ export declare function allParentEdges(): readonly ParentEdge[];
59
+ /** Match a resource type against the graph (false if unknown). */
60
+ export declare function matchResourceType(type: string): {
61
+ module: EntityKindModule;
62
+ match: ReturnType<typeof matchType>;
63
+ } | undefined;
64
+ export type ParticipatingCatalog = Extract<import("./types.js").CatalogFacet, {
65
+ participates: true;
66
+ }>;
67
+ /** Modules whose catalog facet participates. */
68
+ export declare const CATALOG_MODULES: readonly EntityKindModule[];
69
+ /** Catalog metadata derived from a participating facet (for render/write). */
70
+ export interface CatalogKindMeta {
71
+ readonly refKind: string;
72
+ readonly catalogBag: string;
73
+ readonly renderOrder: number;
74
+ readonly catalogRoot: import("./types.js").CatalogRoot;
75
+ readonly factoryName: string;
76
+ readonly renderEntry: (args: CatalogRenderArgs) => CatalogRenderResult;
77
+ }
78
+ /** refKind → catalog bag / order / root / factory — graph facets win over deferred. */
79
+ export declare const CATALOG_META_BY_REF_KIND: ReadonlyMap<string, CatalogKindMeta>;
80
+ /** Catalog kinds for a barrel root, ordered by renderOrder. */
81
+ export declare function catalogKindsForRoot(root: "app" | "element" | "org"): readonly CatalogKindMeta[];
82
+ /** Bag property name for a CatalogRef.__kind, or undefined if unknown. */
83
+ export declare function catalogBagForRefKind(refKind: string): string | undefined;