@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,42 @@
1
+ /**
2
+ * The agent-tool entity's sub-type table (M3). Agent tools are a real
3
+ * sub-entity — nine terraform resource types sharing one ownership shape
4
+ * (agent_id + app_id + name/description) — so per-sub-type knowledge is one
5
+ * ROW here, exactly like `entities/field/types.ts`.
6
+ *
7
+ * M3 implements createRecord + searchRecords end to end; the other rows are
8
+ * declared so streams REPORT them by name (plan §6) instead of "unknown
9
+ * resource", and adoption scopes ONLY the implemented ones — an adopted
10
+ * type the printer can't reconstruct would plan as a destroy on rebuild.
11
+ */
12
+ /** One agent-tool sub-type: authoring variant key ↔ resource type. */
13
+ export interface AgentToolSubType {
14
+ /** The `AgentToolCreateInput` variant key — the tool factory's discriminant ("createRecord"). */
15
+ readonly typeKey: string;
16
+ /** Terraform resource type ("elementum_agent_create_record_tool"). */
17
+ readonly resourceType: string;
18
+ /** Implemented on the terraform path (to-tf + from-tf + printer). */
19
+ readonly implemented?: true;
20
+ }
21
+ export declare const RUN_AUTOMATION_TOOL_RESOURCE_TYPE = "elementum_agent_run_automation_tool";
22
+ export declare const AGENT_TOOL_SUB_TYPES: readonly AgentToolSubType[];
23
+ export declare const TOOL_SUB_TYPE_BY_TYPE_KEY: ReadonlyMap<string, AgentToolSubType>;
24
+ export declare const TOOL_SUB_TYPE_BY_RESOURCE: ReadonlyMap<string, AgentToolSubType>;
25
+ /** The resource types the terraform path round-trips today (adoption scope). */
26
+ export declare const IMPLEMENTED_TOOL_RESOURCE_TYPES: readonly string[];
27
+ /** Every declared tool resource type — stream partition recognizes these by name. */
28
+ export declare const ALL_TOOL_RESOURCE_TYPES: readonly string[];
29
+ /**
30
+ * EDK's tool-name rule — enforced in the authoring builders (see
31
+ * `entities/agent/tools.ts`), never in the tf passes. It is deliberately
32
+ * STRICTER than the platform's own (`[A-Za-z0-9_-]`, which also tolerates
33
+ * hyphens): EDK requires underscores so an authored name maps 1:1 to its
34
+ * terraform label — a hyphenated name sanitizes to a different label and breaks
35
+ * the name↔label correspondence. 1–64 chars of letters, digits, and
36
+ * underscores; no consecutive underscores (the platform rejects those, opaquely).
37
+ * `from-tf` does NOT apply this — a hyphenated tool deployed outside EDK must
38
+ * still be pullable.
39
+ */
40
+ export declare function isValidToolName(name: string): boolean;
41
+ /** Attributes `toolFromTf` understands per implemented sub-type — growth is reported loudly. */
42
+ export declare const KNOWN_TOOL_ATTRS: Readonly<Record<string, ReadonlySet<string>>>;
@@ -0,0 +1,70 @@
1
+ /**
2
+ * The agent-tool entity's sub-type table (M3). Agent tools are a real
3
+ * sub-entity — nine terraform resource types sharing one ownership shape
4
+ * (agent_id + app_id + name/description) — so per-sub-type knowledge is one
5
+ * ROW here, exactly like `entities/field/types.ts`.
6
+ *
7
+ * M3 implements createRecord + searchRecords end to end; the other rows are
8
+ * declared so streams REPORT them by name (plan §6) instead of "unknown
9
+ * resource", and adoption scopes ONLY the implemented ones — an adopted
10
+ * type the printer can't reconstruct would plan as a destroy on rebuild.
11
+ */
12
+ export const RUN_AUTOMATION_TOOL_RESOURCE_TYPE = "elementum_agent_run_automation_tool";
13
+ export const AGENT_TOOL_SUB_TYPES = [
14
+ { typeKey: "createRecord", resourceType: "elementum_agent_create_record_tool", implemented: true },
15
+ { typeKey: "searchAspect", resourceType: "elementum_agent_search_records_tool", implemented: true },
16
+ { typeKey: "updateRecord", resourceType: "elementum_agent_update_record_tool" },
17
+ { typeKey: "searchTable", resourceType: "elementum_agent_ai_search_tool" },
18
+ { typeKey: "relateRecord", resourceType: "elementum_agent_relate_record_tool" },
19
+ { typeKey: "executeWorkflow", resourceType: RUN_AUTOMATION_TOOL_RESOURCE_TYPE, implemented: true },
20
+ { typeKey: "runAgent", resourceType: "elementum_agent_run_agent_tool" },
21
+ { typeKey: "selectBotRoute", resourceType: "elementum_agent_select_bot_route_tool" },
22
+ { typeKey: "mcp", resourceType: "elementum_agent_mcp_tool" },
23
+ ];
24
+ export const TOOL_SUB_TYPE_BY_TYPE_KEY = new Map(AGENT_TOOL_SUB_TYPES.map((t) => [t.typeKey, t]));
25
+ export const TOOL_SUB_TYPE_BY_RESOURCE = new Map(AGENT_TOOL_SUB_TYPES.map((t) => [t.resourceType, t]));
26
+ /** The resource types the terraform path round-trips today (adoption scope). */
27
+ export const IMPLEMENTED_TOOL_RESOURCE_TYPES = AGENT_TOOL_SUB_TYPES.filter((t) => t.implemented === true).map((t) => t.resourceType);
28
+ /** Every declared tool resource type — stream partition recognizes these by name. */
29
+ export const ALL_TOOL_RESOURCE_TYPES = AGENT_TOOL_SUB_TYPES.map((t) => t.resourceType);
30
+ /**
31
+ * EDK's tool-name rule — enforced in the authoring builders (see
32
+ * `entities/agent/tools.ts`), never in the tf passes. It is deliberately
33
+ * STRICTER than the platform's own (`[A-Za-z0-9_-]`, which also tolerates
34
+ * hyphens): EDK requires underscores so an authored name maps 1:1 to its
35
+ * terraform label — a hyphenated name sanitizes to a different label and breaks
36
+ * the name↔label correspondence. 1–64 chars of letters, digits, and
37
+ * underscores; no consecutive underscores (the platform rejects those, opaquely).
38
+ * `from-tf` does NOT apply this — a hyphenated tool deployed outside EDK must
39
+ * still be pullable.
40
+ */
41
+ export function isValidToolName(name) {
42
+ return /^[A-Za-z0-9_]{1,64}$/.test(name) && !name.includes("__");
43
+ }
44
+ /** Attributes `toolFromTf` understands per implemented sub-type — growth is reported loudly. */
45
+ export const KNOWN_TOOL_ATTRS = {
46
+ createRecord: new Set(["agent_id", "app_id", "name", "description", "start_message", "target_id", "fields"]),
47
+ executeWorkflow: new Set([
48
+ "agent_id",
49
+ "app_id",
50
+ "name",
51
+ "description",
52
+ "start_message",
53
+ "automation_id",
54
+ "inputs",
55
+ "outputs",
56
+ "timeout",
57
+ ]),
58
+ searchAspect: new Set([
59
+ "agent_id",
60
+ "app_id",
61
+ "name",
62
+ "description",
63
+ "start_message",
64
+ "target_id",
65
+ "query_description",
66
+ "result_limit",
67
+ "fields",
68
+ "filter_variables",
69
+ ]),
70
+ };
@@ -0,0 +1,318 @@
1
+ /**
2
+ * v2 app/element authoring — `defineApp`. Parallel to v1 `src/aspects`,
3
+ * standalone from it.
4
+ *
5
+ * Produces a `DeployableEntity` of kind `app`/`element` with `parent: "org"` (apps are
6
+ * org-owned), whose payload is the platform's `AgentAspectInput` compose body.
7
+ * The cloud link is a `CatalogRef` token resolved at deploy; fields are authored
8
+ * inline (a new app's fields get server-assigned ids on compose). Deployed via
9
+ * the wire client's compose path (`composeAspect`).
10
+ *
11
+ * Slice scope: identity + the common scalar/picklist field types. Calc fields,
12
+ * dependent picklists, display blocks, and field-id reconciliation for updates
13
+ * follow the same pattern and land as expansion.
14
+ */
15
+ import { type AspectRef, type CloudLinkRef, type FieldRef } from "../../catalog/index.js";
16
+ import type { WorkflowFieldType } from "../shared/types/field-types.js";
17
+ import { type SystemFieldKey } from "../../core/system-fields.js";
18
+ import type { DeployableEntity, EntityDeployOptions } from "../../engine/entity.js";
19
+ import type { AspectFieldInput } from "../../../elementum-entity-client/clients/aspects/models/field-types.js";
20
+ import { type DisplayBlock } from "./display-blocks.js";
21
+ import type { Expr, ExprType } from "../field/calc.js";
22
+ /**
23
+ * Authoring-time picklist config. Wire `PicklistConfigInput` uses bare id
24
+ * strings; here `relatedAspectId` / `relatedLabelFieldId` / `parentFieldId`
25
+ * may be catalog tokens that `resolvePayload` swaps for ids at plan/apply.
26
+ *
27
+ * Cross-aspect dynamic picklists: prefer an aspect token for
28
+ * `relatedAspectId`. `relatedLabelFieldId` may still need a raw field id
29
+ * when the related aspect isn't the entity being deployed (field tokens
30
+ * resolve against the current app's state only).
31
+ */
32
+ export interface AppPicklistDynamicConfig {
33
+ readonly relatedAspectId: AspectRef | string;
34
+ readonly relatedLabelFieldId: FieldRef | string;
35
+ readonly parentFieldId?: FieldRef | string;
36
+ readonly autoRelate?: boolean;
37
+ readonly valuesRenderType?: string;
38
+ readonly filter?: Readonly<Record<string, unknown>>;
39
+ readonly sort?: Readonly<Record<string, unknown>>;
40
+ }
41
+ export interface AppPicklistConfig {
42
+ readonly static?: {
43
+ readonly parentFieldId?: FieldRef | string;
44
+ readonly filter?: Readonly<Record<string, unknown>>;
45
+ readonly sort?: Readonly<Record<string, unknown>>;
46
+ };
47
+ readonly dynamic?: AppPicklistDynamicConfig;
48
+ }
49
+ /**
50
+ * A field authored on a v2 app or element — shared with `defineElement`
51
+ * (`src/elements/build.ts`), which imports this type and {@link serializeField}
52
+ * directly from here rather than duplicating them: fields are the one
53
+ * authoring concept genuinely identical between an app and an element (both
54
+ * compose onto the same `AspectFieldInput` wire shape).
55
+ */
56
+ export interface AppField {
57
+ readonly name: string;
58
+ /** Platform field type, e.g. `"TEXT"`, `"NUMBER"`, `"PICKLIST"`. */
59
+ readonly type: WorkflowFieldType;
60
+ readonly required?: boolean;
61
+ readonly requiredOnClose?: boolean;
62
+ readonly showOnCreate?: boolean;
63
+ readonly lockOnCreate?: boolean;
64
+ readonly description?: string;
65
+ readonly columnName?: string;
66
+ readonly defaultValue?: unknown;
67
+ /**
68
+ * Platform semantic role for system fields. A field with one of the
69
+ * known tags is reconciled by the platform as that system
70
+ * field even when its display name is changed.
71
+ */
72
+ readonly tags?: readonly string[];
73
+ /**
74
+ * Picklist options (`PICKLIST` / `MULTI_PICKLIST`). A bare string is the
75
+ * label; the object form adds `parentValues` (parent-picklist **option ids**)
76
+ * for a dependent dropdown. (Option ids aren't catalog-modeled yet — raw ids
77
+ * for now.) Omit for dynamic picklists (`config.dynamic`).
78
+ */
79
+ readonly options?: readonly (string | PicklistOption)[];
80
+ /** Parent picklist for a dependent dropdown (token → `config.static.parentFieldId`). */
81
+ readonly parentField?: FieldRef;
82
+ /**
83
+ * Static or dynamic picklist config. Dynamic picklists source options from
84
+ * another aspect's records (`config.dynamic.relatedAspectId` +
85
+ * `relatedLabelFieldId`). When set, takes precedence over `parentField`.
86
+ */
87
+ readonly config?: AppPicklistConfig;
88
+ /** Numeric format (`NUMBER` / `DECIMAL`) — pure config, no refs. */
89
+ readonly numericFormat?: Record<string, unknown>;
90
+ /** QR format (`TEXT` / `HANDLE`) — pure config, no refs. */
91
+ readonly qrFormat?: Record<string, unknown>;
92
+ /**
93
+ * A calculated-field expression (from the `calc.*` builder). When set, the
94
+ * field serializes as a calculated field; `type` is the declared output type.
95
+ */
96
+ readonly expression?: Expr<ExprType>;
97
+ }
98
+ /** A picklist option with optional dependent-dropdown parent links. */
99
+ export interface PicklistOption {
100
+ readonly label: string;
101
+ /** Parent-picklist option ids that activate this option (dependent picklists). */
102
+ readonly parentValues?: readonly string[];
103
+ /** Option tags (e.g. "CLOSED" marks the closing status option). */
104
+ readonly tags?: readonly PicklistOptionTag[];
105
+ /** Display color (hex, e.g. "#3B82F6") — surfaced on status options; cosmetic only. */
106
+ readonly color?: string;
107
+ }
108
+ /** The platform's option-tag vocabulary (drives status semantics/urgency). */
109
+ export type PicklistOptionTag = "CLOSED" | "CRITICAL" | "HIGH" | "MEDIUM" | "LOW";
110
+ /** The aspect category (created upsert-by-name if missing) — shared with `defineElement`. */
111
+ export interface AppCategory {
112
+ readonly name: string;
113
+ readonly icon?: string;
114
+ readonly color?: string;
115
+ readonly description?: string;
116
+ }
117
+ /** Cloud-backing options for an aspect's data store (Snowflake-only today). */
118
+ export interface AppCloudOptions {
119
+ readonly snowflake?: {
120
+ /**
121
+ * `false` creates a standard Snowflake table; the platform default (when
122
+ * omitted) is a hybrid table. Mirrors HCL `snowflake_hybrid_table`.
123
+ */
124
+ readonly hybridTable?: boolean;
125
+ };
126
+ }
127
+ /**
128
+ * An override for a platform-managed (system) field. Only what the platform
129
+ * genuinely allows overriding is authorable: the display name (and, for the
130
+ * status/stage picklists, the option set). `type` and the required/
131
+ * showOnCreate booleans are fixed by the platform's per-tag config and
132
+ * deliberately have no authoring slot.
133
+ */
134
+ export interface AppSystemFieldOverride {
135
+ readonly name: string;
136
+ }
137
+ /** A system-picklist override (status/stage): display name + option set. */
138
+ export interface AppSystemPicklistOverride {
139
+ readonly name: string;
140
+ readonly options: readonly (string | PicklistOption)[];
141
+ }
142
+ /**
143
+ * Overrides for the platform's auto-provisioned system fields, keyed by their
144
+ * canonical ref names. Every entry (and the whole bag) is optional — author
145
+ * one only when the app deviates from the deploy defaults. An entry is a
146
+ * complete override: `name` is always required (and `options` on
147
+ * status/stage). Only authored keys are serialized into the compose payload;
148
+ * omitted keys are platform-owned.
149
+ */
150
+ export interface AppSystemFields {
151
+ readonly id?: AppSystemFieldOverride;
152
+ readonly title?: AppSystemFieldOverride;
153
+ readonly status?: AppSystemPicklistOverride;
154
+ readonly stage?: AppSystemPicklistOverride;
155
+ readonly createdAt?: AppSystemFieldOverride;
156
+ readonly createdBy?: AppSystemFieldOverride;
157
+ readonly updatedAt?: AppSystemFieldOverride;
158
+ readonly updatedBy?: AppSystemFieldOverride;
159
+ readonly closedAt?: AppSystemFieldOverride;
160
+ readonly closedBy?: AppSystemFieldOverride;
161
+ }
162
+ /**
163
+ * A field reference inside a layout section or list view: either a custom
164
+ * field's typed token (`catalog.<app>.fields.<key>`) or a bare system-field
165
+ * key (`"title"`, `"status"`, …) — system fields have no catalog token on a
166
+ * pulled app (`readonlyFields` is an explicit author opt-in `defineApp`
167
+ * doesn't emit), so the canonical key string is the only stable way to name
168
+ * one here, same as `systemFields: {}` is already keyed.
169
+ */
170
+ export type AppViewFieldRef = FieldRef | SystemFieldKey;
171
+ /**
172
+ * One section of a per-stage record layout (`elementum_layout`). The
173
+ * provider's own 9-value `type` enum (default `"group"`): only `"group"`
174
+ * carries `name`/`icon`/`color`/`fields`; the rest are bare component
175
+ * sections keyed by `displayLocation`/`displayOrder`/`sideNavItem`. `"update"`
176
+ * additionally takes an optional `name` (its `modules` attribute has no
177
+ * captured dialect evidence yet and is not authorable).
178
+ */
179
+ export interface AppLayoutSection {
180
+ readonly type?: "group" | "activityLog" | "approvals" | "attachments" | "status" | "surveys" | "relatedTasks" | "relationships" | "update";
181
+ readonly displayLocation?: "CENTER";
182
+ readonly displayOrder?: number;
183
+ readonly sideNavItem?: boolean;
184
+ /** `"group"` only (required by the provider). */
185
+ readonly name?: string;
186
+ /** `"group"` only. */
187
+ readonly icon?: string;
188
+ /** `"group"` only. */
189
+ readonly color?: string;
190
+ /** `"group"` only — the fields shown in this group, in order. */
191
+ readonly fields?: readonly AppViewFieldRef[];
192
+ }
193
+ /** A stage's record-detail layout (`elementum_layout`) — immutable after creation; any change replaces it. */
194
+ export interface AppLayout {
195
+ readonly sections: readonly AppLayoutSection[];
196
+ }
197
+ /** A saved list view (`elementum_list_view`). */
198
+ export interface AppListView {
199
+ readonly name: string;
200
+ readonly columns: readonly AppViewFieldRef[];
201
+ readonly allowRecordCreation?: boolean;
202
+ readonly density?: string;
203
+ readonly rows?: number;
204
+ /**
205
+ * Opaque JSON pass-through — not a typed DSL. `elementum build` is stateless, so
206
+ * a list view with a live filter/sort MUST re-author it verbatim (as
207
+ * pulled) or every rebuild plans to null it out, which trips a real
208
+ * provider bug ("inconsistent result after apply"). Round-trip only;
209
+ * hand-author at your own risk (the shape isn't validated).
210
+ */
211
+ readonly filter?: unknown;
212
+ /** Opaque JSON pass-through — see `filter`. */
213
+ readonly sort?: unknown;
214
+ }
215
+ export interface AppV2Options extends EntityDeployOptions {
216
+ readonly name: string;
217
+ readonly category: AppCategory;
218
+ readonly namespace?: string;
219
+ /** The platform's aspect handle (business acronym, e.g. "PRD") — distinct from the refName. Omit to let the platform assign one. */
220
+ readonly handle?: string;
221
+ readonly description?: string;
222
+ readonly icon?: string;
223
+ readonly color?: string;
224
+ /**
225
+ * Cloud link whose data store this aspect's records persist in (token → id at
226
+ * deploy). Optional and valid for **both apps and elements** — omit it to use
227
+ * the org's default cloud link, or set it to target a specific one. Applied on
228
+ * create only: an aspect's cloud link is immutable once created, so the update
229
+ * path drops it. Distinct from element-only Snowflake `cloudMapping`.
230
+ *
231
+ * Some tenant configurations require `cloudLink` for APP creation even when no
232
+ * specific data store is targeted — if `elementum apply` fails with "Unable to
233
+ * validate" on an APP create, set this to the org's default cloud link (run
234
+ * `elementum import cloud-links` and `elementum list cloud-links` to find the handle).
235
+ */
236
+ readonly cloudLink?: CloudLinkRef;
237
+ /** Cloud-backing options (Snowflake-only); applied on create only. */
238
+ readonly cloudOptions?: AppCloudOptions;
239
+ /** Fields keyed by ref name. At least one required by the compose API. */
240
+ readonly fields: Record<string, AppField>;
241
+ /**
242
+ * Overrides for the platform's auto-provisioned system fields (ID, Title,
243
+ * Status, Stage, and the audit fields). Omit entirely when the app keeps
244
+ * every deploy default. The canonical keys are reserved — a custom field
245
+ * under `fields:` may not reuse them.
246
+ */
247
+ readonly systemFields?: AppSystemFields;
248
+ /**
249
+ * Platform-managed (system) fields that exist on every app but are not authored here — e.g.
250
+ * Title, Status, Created on, Closed by. These flow into `ref().fields` so other entities can
251
+ * reference them by typed handle (e.g. `app.fields.title`), but are **never included in the
252
+ * deploy payload** (the platform owns them; sending them on compose would be rejected).
253
+ */
254
+ readonly readonlyFields?: Record<string, FieldRef>;
255
+ /** Record-view (LAYOUT surface) display blocks. */
256
+ readonly displayBlocks?: readonly DisplayBlock[];
257
+ /** New-record form (CREATE surface) display blocks. */
258
+ readonly recordCreateDisplayBlocks?: readonly DisplayBlock[];
259
+ /**
260
+ * Per-stage record layouts, keyed by stage key (the same `snakeSlug(name)`
261
+ * key `systemFields.stage.options`/`stages` derive). Terraform-path only —
262
+ * distinct from `displayBlocks` (the GraphQL-compose layout concept, which
263
+ * `ei export` doesn't surface at all).
264
+ */
265
+ readonly layouts?: Readonly<Record<string, AppLayout>>;
266
+ /** Saved list views, keyed by view ref name. */
267
+ readonly listViews?: Readonly<Record<string, AppListView>>;
268
+ /** Display order of `listViews` (by key). Defaults to declaration order. */
269
+ readonly viewOrder?: readonly string[];
270
+ }
271
+ /**
272
+ * Serialize an authored field to its `AspectFieldInput` wire shape — shared
273
+ * with `defineElement`. `refName` is the field's bag key in `defineApp`'s
274
+ * `fields: {}` (e.g. `severity`) — carried as the internal `__refName` marker,
275
+ * a client-side-only bookkeeping value `applyV2`'s field reconciliation
276
+ * (`src/deploy/apply/apply.ts`, `reconcileFields`) reads to match this field
277
+ * against its previously-recorded state binding, then strips before the
278
+ * payload reaches the wire — it's never sent as `clientHandle` or anything
279
+ * else. Matching on the bag key instead of `name` is what lets a field's
280
+ * identity survive a display-`name` rename instead of being keyed by the
281
+ * mutable `name` (#230); the bag key itself is never rewritten by a rename,
282
+ * since it's just the field's fixed key in `fields: {}`.
283
+ */
284
+ export declare function serializeField(field: AppField, refName?: string): AspectFieldInput;
285
+ /**
286
+ * Reject a custom `fields:` bag key that is ALSO authored under
287
+ * `systemFields` — the same slot provisioned twice. Keys not present in
288
+ * systemFields stay legal as ordinary fields (existing workspaces key
289
+ * plain fields `title` etc.); full reservation of the canonical keys is
290
+ * deferred until system-field ref tokens land on `ref().fields`.
291
+ */
292
+ export declare function assertNoSystemKeyCollision(builder: string, name: string, fields: Record<string, AppField>, systemFields: AppSystemFields | undefined): void;
293
+ /**
294
+ * Serialize the AUTHORED system-field overrides into tagged compose entries
295
+ * (the same wire shape a system field carries on pull). Only authored keys
296
+ * are emitted — omitted keys stay platform-owned. status/stage overrides
297
+ * always carry their option set; the other keys are name-only.
298
+ */
299
+ export declare function serializeSystemFields(overrides: AppSystemFields | undefined): AspectFieldInput[];
300
+ /** An app's reference surface: identity plus its fields (the only bag other entities may point at). */
301
+ export type AppRef = AspectRef & {
302
+ readonly fields: Record<string, FieldRef>;
303
+ };
304
+ /**
305
+ * The configured result of `defineApp` — its reference surface (`ref()`) and
306
+ * its deployable entity (`def()`). Both take `refName` as a **call-time
307
+ * argument**, not a constructor option: the ref name is never stored data
308
+ * (see `src/catalog/from-authoring.ts`) — it's recoverable from the file's
309
+ * name alone, which is exactly what every caller (catalog generation,
310
+ * plan/apply discovery) already knows when it calls these. Stating it again
311
+ * inside `defineApp({...})` would be the same redundant property the rest of
312
+ * the system avoids, just one level up.
313
+ */
314
+ export interface AppConfigured {
315
+ ref(refName: string): AppRef;
316
+ def(refName: string): DeployableEntity;
317
+ }
318
+ export declare function defineApp(opts: AppV2Options): AppConfigured;