@elementumai/edk 0.0.0-oidc-bootstrap → 0.8.1

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 (390) hide show
  1. package/README.md +462 -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/ai-provider-models.d.ts +30 -0
  47. package/dist-sdk/src/catalog/ai-provider-models.js +63 -0
  48. package/dist-sdk/src/catalog/factories.d.ts +242 -0
  49. package/dist-sdk/src/catalog/factories.js +265 -0
  50. package/dist-sdk/src/catalog/from-authoring.d.ts +103 -0
  51. package/dist-sdk/src/catalog/from-authoring.js +467 -0
  52. package/dist-sdk/src/catalog/index.d.ts +12 -0
  53. package/dist-sdk/src/catalog/index.js +12 -0
  54. package/dist-sdk/src/catalog/org.d.ts +11 -0
  55. package/dist-sdk/src/catalog/org.js +288 -0
  56. package/dist-sdk/src/catalog/render-helpers.d.ts +35 -0
  57. package/dist-sdk/src/catalog/render-helpers.js +82 -0
  58. package/dist-sdk/src/catalog/render.d.ts +48 -0
  59. package/dist-sdk/src/catalog/render.js +193 -0
  60. package/dist-sdk/src/catalog/token.d.ts +10 -0
  61. package/dist-sdk/src/catalog/token.js +76 -0
  62. package/dist-sdk/src/catalog/types.d.ts +215 -0
  63. package/dist-sdk/src/catalog/types.js +86 -0
  64. package/dist-sdk/src/catalog/write.d.ts +43 -0
  65. package/dist-sdk/src/catalog/write.js +109 -0
  66. package/dist-sdk/src/core/app-to-ui.d.ts +22 -0
  67. package/dist-sdk/src/core/app-to-ui.js +75 -0
  68. package/dist-sdk/src/core/index.d.ts +10 -0
  69. package/dist-sdk/src/core/index.js +9 -0
  70. package/dist-sdk/src/core/system-fields.d.ts +95 -0
  71. package/dist-sdk/src/core/system-fields.js +153 -0
  72. package/dist-sdk/src/core/triggers/on-demand.d.ts +144 -0
  73. package/dist-sdk/src/core/triggers/on-demand.js +112 -0
  74. package/dist-sdk/src/core/types/ai-provider.d.ts +23 -0
  75. package/dist-sdk/src/core/types/ai-provider.js +8 -0
  76. package/dist-sdk/src/core/types/app.d.ts +857 -0
  77. package/dist-sdk/src/core/types/app.js +210 -0
  78. package/dist-sdk/src/core/types/aspect-category.d.ts +35 -0
  79. package/dist-sdk/src/core/types/aspect-category.js +33 -0
  80. package/dist-sdk/src/core/types/cloud-link.d.ts +34 -0
  81. package/dist-sdk/src/core/types/cloud-link.js +32 -0
  82. package/dist-sdk/src/core/types/display-block.d.ts +149 -0
  83. package/dist-sdk/src/core/types/display-block.js +61 -0
  84. package/dist-sdk/src/core/types/group.d.ts +13 -0
  85. package/dist-sdk/src/core/types/group.js +6 -0
  86. package/dist-sdk/src/core/types/platform.d.ts +2 -0
  87. package/dist-sdk/src/core/types/platform.js +1 -0
  88. package/dist-sdk/src/core/types/user.d.ts +20 -0
  89. package/dist-sdk/src/core/types/user.js +8 -0
  90. package/dist-sdk/src/core/wire/ref-serializer.d.ts +45 -0
  91. package/dist-sdk/src/core/wire/ref-serializer.js +89 -0
  92. package/dist-sdk/src/engine/build/context.d.ts +67 -0
  93. package/dist-sdk/src/engine/build/context.js +6 -0
  94. package/dist-sdk/src/engine/build/source-context.d.ts +45 -0
  95. package/dist-sdk/src/engine/build/source-context.js +23 -0
  96. package/dist-sdk/src/engine/entity.d.ts +44 -0
  97. package/dist-sdk/src/engine/entity.js +15 -0
  98. package/dist-sdk/src/engine/pull/context.d.ts +38 -0
  99. package/dist-sdk/src/engine/pull/context.js +44 -0
  100. package/dist-sdk/src/engine/pull/org.d.ts +54 -0
  101. package/dist-sdk/src/engine/pull/org.js +134 -0
  102. package/dist-sdk/src/engine/tf/escape.d.ts +22 -0
  103. package/dist-sdk/src/engine/tf/escape.js +28 -0
  104. package/dist-sdk/src/engine/tf/expr.d.ts +25 -0
  105. package/dist-sdk/src/engine/tf/expr.js +405 -0
  106. package/dist-sdk/src/engine/tf/index.d.ts +12 -0
  107. package/dist-sdk/src/engine/tf/index.js +11 -0
  108. package/dist-sdk/src/engine/tf/labels.d.ts +76 -0
  109. package/dist-sdk/src/engine/tf/labels.js +196 -0
  110. package/dist-sdk/src/engine/tf/model.d.ts +84 -0
  111. package/dist-sdk/src/engine/tf/model.js +49 -0
  112. package/dist-sdk/src/engine/tf/parse.d.ts +41 -0
  113. package/dist-sdk/src/engine/tf/parse.js +189 -0
  114. package/dist-sdk/src/engine/tf/render.d.ts +13 -0
  115. package/dist-sdk/src/engine/tf/render.js +102 -0
  116. package/dist-sdk/src/engine/workspace/authoring-layout.d.ts +43 -0
  117. package/dist-sdk/src/engine/workspace/authoring-layout.js +201 -0
  118. package/dist-sdk/src/entities/access-policy/build.d.ts +26 -0
  119. package/dist-sdk/src/entities/access-policy/build.js +7 -0
  120. package/dist-sdk/src/entities/access-policy/filter.d.ts +61 -0
  121. package/dist-sdk/src/entities/access-policy/filter.js +83 -0
  122. package/dist-sdk/src/entities/access-policy/from-tf.d.ts +48 -0
  123. package/dist-sdk/src/entities/access-policy/from-tf.js +189 -0
  124. package/dist-sdk/src/entities/access-policy/module.d.ts +3 -0
  125. package/dist-sdk/src/entities/access-policy/module.js +17 -0
  126. package/dist-sdk/src/entities/access-policy/to-tf.d.ts +36 -0
  127. package/dist-sdk/src/entities/access-policy/to-tf.js +149 -0
  128. package/dist-sdk/src/entities/access-policy/types.d.ts +4 -0
  129. package/dist-sdk/src/entities/access-policy/types.js +10 -0
  130. package/dist-sdk/src/entities/agent/build.d.ts +108 -0
  131. package/dist-sdk/src/entities/agent/build.js +148 -0
  132. package/dist-sdk/src/entities/agent/deserializer/print-agent-v2.d.ts +53 -0
  133. package/dist-sdk/src/entities/agent/deserializer/print-agent-v2.js +344 -0
  134. package/dist-sdk/src/entities/agent/from-tf.d.ts +65 -0
  135. package/dist-sdk/src/entities/agent/from-tf.js +289 -0
  136. package/dist-sdk/src/entities/agent/index.d.ts +7 -0
  137. package/dist-sdk/src/entities/agent/index.js +7 -0
  138. package/dist-sdk/src/entities/agent/module.d.ts +4 -0
  139. package/dist-sdk/src/entities/agent/module.js +122 -0
  140. package/dist-sdk/src/entities/agent/to-tf.d.ts +33 -0
  141. package/dist-sdk/src/entities/agent/to-tf.js +188 -0
  142. package/dist-sdk/src/entities/agent/tools.d.ts +284 -0
  143. package/dist-sdk/src/entities/agent/tools.js +238 -0
  144. package/dist-sdk/src/entities/agent-tool/from-tf.d.ts +110 -0
  145. package/dist-sdk/src/entities/agent-tool/from-tf.js +265 -0
  146. package/dist-sdk/src/entities/agent-tool/module.d.ts +3 -0
  147. package/dist-sdk/src/entities/agent-tool/module.js +32 -0
  148. package/dist-sdk/src/entities/agent-tool/to-tf.d.ts +40 -0
  149. package/dist-sdk/src/entities/agent-tool/to-tf.js +250 -0
  150. package/dist-sdk/src/entities/agent-tool/types.d.ts +43 -0
  151. package/dist-sdk/src/entities/agent-tool/types.js +102 -0
  152. package/dist-sdk/src/entities/app/build.d.ts +368 -0
  153. package/dist-sdk/src/entities/app/build.js +372 -0
  154. package/dist-sdk/src/entities/app/deserializer/normalize.d.ts +168 -0
  155. package/dist-sdk/src/entities/app/deserializer/normalize.js +12 -0
  156. package/dist-sdk/src/entities/app/display-blocks.d.ts +26 -0
  157. package/dist-sdk/src/entities/app/display-blocks.js +34 -0
  158. package/dist-sdk/src/entities/app/from-tf.d.ts +23 -0
  159. package/dist-sdk/src/entities/app/from-tf.js +197 -0
  160. package/dist-sdk/src/entities/app/index.d.ts +14 -0
  161. package/dist-sdk/src/entities/app/index.js +11 -0
  162. package/dist-sdk/src/entities/app/locals.d.ts +11 -0
  163. package/dist-sdk/src/entities/app/locals.js +31 -0
  164. package/dist-sdk/src/entities/app/module.d.ts +4 -0
  165. package/dist-sdk/src/entities/app/module.js +66 -0
  166. package/dist-sdk/src/entities/app/to-tf.d.ts +33 -0
  167. package/dist-sdk/src/entities/app/to-tf.js +212 -0
  168. package/dist-sdk/src/entities/approval-chain/build.d.ts +24 -0
  169. package/dist-sdk/src/entities/approval-chain/build.js +56 -0
  170. package/dist-sdk/src/entities/approval-chain/index.d.ts +6 -0
  171. package/dist-sdk/src/entities/approval-chain/index.js +6 -0
  172. package/dist-sdk/src/entities/approval-chain/steps.d.ts +24 -0
  173. package/dist-sdk/src/entities/approval-chain/steps.js +20 -0
  174. package/dist-sdk/src/entities/automation/build.d.ts +259 -0
  175. package/dist-sdk/src/entities/automation/build.js +436 -0
  176. package/dist-sdk/src/entities/automation/catalog-render.d.ts +5 -0
  177. package/dist-sdk/src/entities/automation/catalog-render.js +35 -0
  178. package/dist-sdk/src/entities/automation/deserializer/ast.d.ts +152 -0
  179. package/dist-sdk/src/entities/automation/deserializer/ast.js +13 -0
  180. package/dist-sdk/src/entities/automation/deserializer/print-automation.d.ts +55 -0
  181. package/dist-sdk/src/entities/automation/deserializer/print-automation.js +1176 -0
  182. package/dist-sdk/src/entities/automation/filter.d.ts +93 -0
  183. package/dist-sdk/src/entities/automation/filter.js +156 -0
  184. package/dist-sdk/src/entities/automation/from-tf.d.ts +35 -0
  185. package/dist-sdk/src/entities/automation/from-tf.js +1258 -0
  186. package/dist-sdk/src/entities/automation/index.d.ts +22 -0
  187. package/dist-sdk/src/entities/automation/index.js +25 -0
  188. package/dist-sdk/src/entities/automation/module.d.ts +3 -0
  189. package/dist-sdk/src/entities/automation/module.js +150 -0
  190. package/dist-sdk/src/entities/automation/operators.d.ts +93 -0
  191. package/dist-sdk/src/entities/automation/operators.js +69 -0
  192. package/dist-sdk/src/entities/automation/output-key-wire-name.d.ts +19 -0
  193. package/dist-sdk/src/entities/automation/output-key-wire-name.js +24 -0
  194. package/dist-sdk/src/entities/automation/script-code.d.ts +51 -0
  195. package/dist-sdk/src/entities/automation/script-code.js +633 -0
  196. package/dist-sdk/src/entities/automation/serialize.d.ts +6 -0
  197. package/dist-sdk/src/entities/automation/serialize.js +41 -0
  198. package/dist-sdk/src/entities/automation/tasks.d.ts +641 -0
  199. package/dist-sdk/src/entities/automation/tasks.js +765 -0
  200. package/dist-sdk/src/entities/automation/to-tf.d.ts +19 -0
  201. package/dist-sdk/src/entities/automation/to-tf.js +1169 -0
  202. package/dist-sdk/src/entities/automation/triggers.d.ts +205 -0
  203. package/dist-sdk/src/entities/automation/triggers.js +202 -0
  204. package/dist-sdk/src/entities/automation/types.d.ts +78 -0
  205. package/dist-sdk/src/entities/automation/types.js +131 -0
  206. package/dist-sdk/src/entities/element/build.d.ts +121 -0
  207. package/dist-sdk/src/entities/element/build.js +110 -0
  208. package/dist-sdk/src/entities/element/from-tf.d.ts +19 -0
  209. package/dist-sdk/src/entities/element/from-tf.js +170 -0
  210. package/dist-sdk/src/entities/element/index.d.ts +12 -0
  211. package/dist-sdk/src/entities/element/index.js +10 -0
  212. package/dist-sdk/src/entities/element/locals.d.ts +7 -0
  213. package/dist-sdk/src/entities/element/locals.js +12 -0
  214. package/dist-sdk/src/entities/element/module.d.ts +8 -0
  215. package/dist-sdk/src/entities/element/module.js +65 -0
  216. package/dist-sdk/src/entities/element/to-tf.d.ts +14 -0
  217. package/dist-sdk/src/entities/element/to-tf.js +169 -0
  218. package/dist-sdk/src/entities/field/build.d.ts +112 -0
  219. package/dist-sdk/src/entities/field/build.js +84 -0
  220. package/dist-sdk/src/entities/field/calc/aggregate.d.ts +60 -0
  221. package/dist-sdk/src/entities/field/calc/aggregate.js +71 -0
  222. package/dist-sdk/src/entities/field/calc/date.d.ts +73 -0
  223. package/dist-sdk/src/entities/field/calc/date.js +109 -0
  224. package/dist-sdk/src/entities/field/calc/index.d.ts +229 -0
  225. package/dist-sdk/src/entities/field/calc/index.js +433 -0
  226. package/dist-sdk/src/entities/field/calc/numeric.d.ts +22 -0
  227. package/dist-sdk/src/entities/field/calc/numeric.js +67 -0
  228. package/dist-sdk/src/entities/field/calc/runtime.d.ts +61 -0
  229. package/dist-sdk/src/entities/field/calc/runtime.js +174 -0
  230. package/dist-sdk/src/entities/field/calc/text.d.ts +100 -0
  231. package/dist-sdk/src/entities/field/calc/text.js +208 -0
  232. package/dist-sdk/src/entities/field/calc/types.d.ts +86 -0
  233. package/dist-sdk/src/entities/field/calc/types.js +23 -0
  234. package/dist-sdk/src/entities/field/calc.d.ts +108 -0
  235. package/dist-sdk/src/entities/field/calc.js +54 -0
  236. package/dist-sdk/src/entities/field/from-tf.d.ts +31 -0
  237. package/dist-sdk/src/entities/field/from-tf.js +184 -0
  238. package/dist-sdk/src/entities/field/locals.d.ts +8 -0
  239. package/dist-sdk/src/entities/field/locals.js +24 -0
  240. package/dist-sdk/src/entities/field/module.d.ts +3 -0
  241. package/dist-sdk/src/entities/field/module.js +50 -0
  242. package/dist-sdk/src/entities/field/options.d.ts +27 -0
  243. package/dist-sdk/src/entities/field/options.js +76 -0
  244. package/dist-sdk/src/entities/field/record-shape.d.ts +57 -0
  245. package/dist-sdk/src/entities/field/record-shape.js +1 -0
  246. package/dist-sdk/src/entities/field/to-tf.d.ts +73 -0
  247. package/dist-sdk/src/entities/field/to-tf.js +142 -0
  248. package/dist-sdk/src/entities/field/types.d.ts +53 -0
  249. package/dist-sdk/src/entities/field/types.js +68 -0
  250. package/dist-sdk/src/entities/file-reader/build.d.ts +182 -0
  251. package/dist-sdk/src/entities/file-reader/build.js +105 -0
  252. package/dist-sdk/src/entities/file-reader/deserializer/print-file-reader.d.ts +6 -0
  253. package/dist-sdk/src/entities/file-reader/deserializer/print-file-reader.js +109 -0
  254. package/dist-sdk/src/entities/file-reader/from-tf.d.ts +13 -0
  255. package/dist-sdk/src/entities/file-reader/from-tf.js +172 -0
  256. package/dist-sdk/src/entities/file-reader/index.d.ts +10 -0
  257. package/dist-sdk/src/entities/file-reader/index.js +10 -0
  258. package/dist-sdk/src/entities/file-reader/module.d.ts +3 -0
  259. package/dist-sdk/src/entities/file-reader/module.js +115 -0
  260. package/dist-sdk/src/entities/file-reader/to-tf.d.ts +14 -0
  261. package/dist-sdk/src/entities/file-reader/to-tf.js +84 -0
  262. package/dist-sdk/src/entities/file-reader/types.d.ts +32 -0
  263. package/dist-sdk/src/entities/file-reader/types.js +30 -0
  264. package/dist-sdk/src/entities/flow/activities/agent.d.ts +15 -0
  265. package/dist-sdk/src/entities/flow/activities/agent.js +29 -0
  266. package/dist-sdk/src/entities/flow/activities/approval.d.ts +9 -0
  267. package/dist-sdk/src/entities/flow/activities/approval.js +18 -0
  268. package/dist-sdk/src/entities/flow/activities/automation.d.ts +12 -0
  269. package/dist-sdk/src/entities/flow/activities/automation.js +22 -0
  270. package/dist-sdk/src/entities/flow/activities/ctx.d.ts +34 -0
  271. package/dist-sdk/src/entities/flow/activities/ctx.js +38 -0
  272. package/dist-sdk/src/entities/flow/activities/form.d.ts +22 -0
  273. package/dist-sdk/src/entities/flow/activities/form.js +36 -0
  274. package/dist-sdk/src/entities/flow/activities/index.d.ts +14 -0
  275. package/dist-sdk/src/entities/flow/activities/index.js +13 -0
  276. package/dist-sdk/src/entities/flow/activities/input-refs.d.ts +39 -0
  277. package/dist-sdk/src/entities/flow/activities/input-refs.js +19 -0
  278. package/dist-sdk/src/entities/flow/activities/prompt-template.d.ts +13 -0
  279. package/dist-sdk/src/entities/flow/activities/prompt-template.js +34 -0
  280. package/dist-sdk/src/entities/flow/activities/render-catalog.d.ts +140 -0
  281. package/dist-sdk/src/entities/flow/activities/render-catalog.js +174 -0
  282. package/dist-sdk/src/entities/flow/activities/types.d.ts +33 -0
  283. package/dist-sdk/src/entities/flow/activities/types.js +1 -0
  284. package/dist-sdk/src/entities/flow/build.d.ts +38 -0
  285. package/dist-sdk/src/entities/flow/build.js +115 -0
  286. package/dist-sdk/src/entities/flow/index.d.ts +8 -0
  287. package/dist-sdk/src/entities/flow/index.js +7 -0
  288. package/dist-sdk/src/entities/flow/serialize.d.ts +51 -0
  289. package/dist-sdk/src/entities/flow/serialize.js +94 -0
  290. package/dist-sdk/src/entities/flow/util.d.ts +27 -0
  291. package/dist-sdk/src/entities/flow/util.js +38 -0
  292. package/dist-sdk/src/entities/org/ai-provider.d.ts +13 -0
  293. package/dist-sdk/src/entities/org/ai-provider.js +46 -0
  294. package/dist-sdk/src/entities/org/category.d.ts +5 -0
  295. package/dist-sdk/src/entities/org/category.js +33 -0
  296. package/dist-sdk/src/entities/org/cloud-link.d.ts +5 -0
  297. package/dist-sdk/src/entities/org/cloud-link.js +33 -0
  298. package/dist-sdk/src/entities/org/connector.d.ts +12 -0
  299. package/dist-sdk/src/entities/org/connector.js +35 -0
  300. package/dist-sdk/src/entities/org/group.d.ts +5 -0
  301. package/dist-sdk/src/entities/org/group.js +40 -0
  302. package/dist-sdk/src/entities/org/index.d.ts +11 -0
  303. package/dist-sdk/src/entities/org/index.js +11 -0
  304. package/dist-sdk/src/entities/org/role.d.ts +7 -0
  305. package/dist-sdk/src/entities/org/role.js +21 -0
  306. package/dist-sdk/src/entities/org/user.d.ts +7 -0
  307. package/dist-sdk/src/entities/org/user.js +30 -0
  308. package/dist-sdk/src/entities/search-table/build.d.ts +41 -0
  309. package/dist-sdk/src/entities/search-table/build.js +79 -0
  310. package/dist-sdk/src/entities/search-table/index.d.ts +5 -0
  311. package/dist-sdk/src/entities/search-table/index.js +5 -0
  312. package/dist-sdk/src/entities/search-table/module.d.ts +6 -0
  313. package/dist-sdk/src/entities/search-table/module.js +64 -0
  314. package/dist-sdk/src/entities/shared/context.d.ts +93 -0
  315. package/dist-sdk/src/entities/shared/context.js +156 -0
  316. package/dist-sdk/src/entities/shared/filters/ast.d.ts +277 -0
  317. package/dist-sdk/src/entities/shared/filters/ast.js +65 -0
  318. package/dist-sdk/src/entities/shared/filters/index.d.ts +211 -0
  319. package/dist-sdk/src/entities/shared/filters/index.js +372 -0
  320. package/dist-sdk/src/entities/shared/filters/types.d.ts +170 -0
  321. package/dist-sdk/src/entities/shared/filters/types.js +7 -0
  322. package/dist-sdk/src/entities/shared/ref.d.ts +160 -0
  323. package/dist-sdk/src/entities/shared/ref.js +119 -0
  324. package/dist-sdk/src/entities/shared/tool-field-ref.d.ts +17 -0
  325. package/dist-sdk/src/entities/shared/tool-field-ref.js +31 -0
  326. package/dist-sdk/src/entities/shared/types/common.d.ts +106 -0
  327. package/dist-sdk/src/entities/shared/types/common.js +64 -0
  328. package/dist-sdk/src/entities/shared/types/field-types.d.ts +58 -0
  329. package/dist-sdk/src/entities/shared/types/field-types.js +57 -0
  330. package/dist-sdk/src/entities/shared/types/platform.d.ts +46 -0
  331. package/dist-sdk/src/entities/shared/types/platform.js +10 -0
  332. package/dist-sdk/src/entities/skill/build.d.ts +25 -0
  333. package/dist-sdk/src/entities/skill/build.js +50 -0
  334. package/dist-sdk/src/entities/skill/deserializer/print-skill-v2.d.ts +39 -0
  335. package/dist-sdk/src/entities/skill/deserializer/print-skill-v2.js +124 -0
  336. package/dist-sdk/src/entities/skill/from-tf.d.ts +33 -0
  337. package/dist-sdk/src/entities/skill/from-tf.js +96 -0
  338. package/dist-sdk/src/entities/skill/index.d.ts +7 -0
  339. package/dist-sdk/src/entities/skill/index.js +7 -0
  340. package/dist-sdk/src/entities/skill/module.d.ts +4 -0
  341. package/dist-sdk/src/entities/skill/module.js +111 -0
  342. package/dist-sdk/src/entities/skill/to-tf.d.ts +33 -0
  343. package/dist-sdk/src/entities/skill/to-tf.js +59 -0
  344. package/dist-sdk/src/entities/skill/tools.d.ts +93 -0
  345. package/dist-sdk/src/entities/skill/tools.js +105 -0
  346. package/dist-sdk/src/entities/skill-tool/from-tf.d.ts +60 -0
  347. package/dist-sdk/src/entities/skill-tool/from-tf.js +142 -0
  348. package/dist-sdk/src/entities/skill-tool/module.d.ts +3 -0
  349. package/dist-sdk/src/entities/skill-tool/module.js +21 -0
  350. package/dist-sdk/src/entities/skill-tool/to-tf.d.ts +34 -0
  351. package/dist-sdk/src/entities/skill-tool/to-tf.js +130 -0
  352. package/dist-sdk/src/entities/skill-tool/types.d.ts +40 -0
  353. package/dist-sdk/src/entities/skill-tool/types.js +67 -0
  354. package/dist-sdk/src/entities/table/build.d.ts +74 -0
  355. package/dist-sdk/src/entities/table/build.js +339 -0
  356. package/dist-sdk/src/entities/table/catalog-render.d.ts +5 -0
  357. package/dist-sdk/src/entities/table/catalog-render.js +39 -0
  358. package/dist-sdk/src/entities/table/fields.d.ts +81 -0
  359. package/dist-sdk/src/entities/table/fields.js +70 -0
  360. package/dist-sdk/src/entities/table/filter.d.ts +41 -0
  361. package/dist-sdk/src/entities/table/filter.js +89 -0
  362. package/dist-sdk/src/entities/table/index.d.ts +8 -0
  363. package/dist-sdk/src/entities/table/index.js +12 -0
  364. package/dist-sdk/src/entities/table/joins.d.ts +26 -0
  365. package/dist-sdk/src/entities/table/joins.js +31 -0
  366. package/dist-sdk/src/entities/table/keys.d.ts +11 -0
  367. package/dist-sdk/src/entities/table/keys.js +25 -0
  368. package/dist-sdk/src/entities/table/module.d.ts +5 -0
  369. package/dist-sdk/src/entities/table/module.js +25 -0
  370. package/dist-sdk/src/entities/table/state.d.ts +39 -0
  371. package/dist-sdk/src/entities/table/state.js +43 -0
  372. package/dist-sdk/src/entities/view/from-tf.d.ts +29 -0
  373. package/dist-sdk/src/entities/view/from-tf.js +235 -0
  374. package/dist-sdk/src/entities/view/module.d.ts +24 -0
  375. package/dist-sdk/src/entities/view/module.js +61 -0
  376. package/dist-sdk/src/entities/view/to-tf.d.ts +65 -0
  377. package/dist-sdk/src/entities/view/to-tf.js +171 -0
  378. package/dist-sdk/src/entities/view/types.d.ts +58 -0
  379. package/dist-sdk/src/entities/view/types.js +89 -0
  380. package/dist-sdk/src/graph/deferred-catalog-render.d.ts +9 -0
  381. package/dist-sdk/src/graph/deferred-catalog-render.js +18 -0
  382. package/dist-sdk/src/graph/index.d.ts +91 -0
  383. package/dist-sdk/src/graph/index.js +211 -0
  384. package/dist-sdk/src/graph/modules.d.ts +7 -0
  385. package/dist-sdk/src/graph/modules.js +42 -0
  386. package/dist-sdk/src/graph/types.d.ts +375 -0
  387. package/dist-sdk/src/graph/types.js +102 -0
  388. package/dist-sdk/src/internal/sdk-package.d.ts +7 -0
  389. package/dist-sdk/src/internal/sdk-package.js +23 -0
  390. package/package.json +201 -8
package/README.md CHANGED
@@ -1,4 +1,463 @@
1
- # @elementumai/edk OIDC bootstrap
1
+ # @elementumai/edk
2
2
 
3
- This inert version exists only to let npm configure GitHub trusted publishing.
4
- Do not install it. Use a released preview or stable SDK version instead.
3
+ Statically typed TypeScript SDK for authoring Elementum apps, elements,
4
+ automations, agents, skills, flows, search tables, and related configuration as
5
+ code. `@elementumai/edk` is SDK-only; the standalone `elementum` CLI is
6
+ distributed separately as part of the signed toolchain.
7
+
8
+ This repository is the canonical source for the public SDK, the standalone
9
+ `elementum` CLI, the OpenTofu provider under `provider/`, and the temporary
10
+ private bridge under `cmd/elementum/`. The installed toolchain manages
11
+ the bridge and OpenTofu; neither is a separate public executable or checkout.
12
+
13
+ ## Installation
14
+
15
+ Install the signed macOS toolchain:
16
+
17
+ ```sh
18
+ curl -fsSL https://elementum-toolchain-distribution.vercel.app | sh
19
+ elementum init
20
+ ```
21
+
22
+ The installer places `elementum` in `~/.elementum/bin` and adds that directory
23
+ to PATH via your shell profile (`~/.zprofile` for zsh). The current shell won't
24
+ see it until the profile reloads, so `elementum: command not found` right after
25
+ install just means you need a fresh shell — open a new terminal or run
26
+ `source ~/.zprofile`.
27
+
28
+ Install the SDK in the package workspace that contains your Elementum org
29
+ folders:
30
+
31
+ ```sh
32
+ npm install @elementumai/edk
33
+ ```
34
+
35
+ Use Node 24 or newer. The npm package is the authoring SDK; the only public
36
+ executable is `elementum`.
37
+
38
+ ### Platform support
39
+
40
+ The signed `elementum` toolchain currently targets **macOS only** — Apple
41
+ Silicon (`darwin-arm64`) and Intel (`darwin-x64`). Linux builds are on the
42
+ roadmap but not yet available. The authoring SDK (`@elementumai/edk`) is pure
43
+ TypeScript and runs anywhere Node 24+ runs, so Linux CI can install the SDK and
44
+ typecheck or build authored source; the platform commands (`auth`, `pull`,
45
+ `plan`, `apply`) require running `elementum` on macOS for now.
46
+
47
+ ## Authentication and profiles
48
+
49
+ The SDK is credential-free and never calls the platform. Authentication and all
50
+ platform I/O are owned by the managed private bridge:
51
+
52
+ ```sh
53
+ elementum auth login --profile <profile>
54
+ elementum --profile=<profile> auth status
55
+ ```
56
+
57
+ A profile selects the organization, instance, optional organization
58
+ environment, credentials, and custom endpoints. Pass it explicitly before any
59
+ command when reproducibility matters:
60
+
61
+ ```sh
62
+ elementum --profile=<profile> pull org --data-only
63
+ elementum --profile=<profile> plan
64
+ ```
65
+
66
+ For `plan` and `apply`, `--profile` is optional. The CLI resolves the marked org
67
+ root from the explicit target or current directory, including targets nested
68
+ under `apps/`, `elements/`, or an individual authored file. It reads
69
+ `<instance>/<organization>` from that org root's path and selects the one saved
70
+ profile with the same identity. It does not infer tenant identity from shell
71
+ variables.
72
+
73
+ An explicit `--profile` overrides filesystem selection. The existing safety
74
+ check still rejects that profile if its instance or organization differs from
75
+ the workspace path. If no saved profile matches, or multiple profiles have the
76
+ same filesystem identity, the command fails before planning with the workspace
77
+ identity and tells you to pass `--profile` explicitly. Commands that bootstrap a
78
+ workspace should use an explicit profile because no org root exists yet.
79
+
80
+ ## Workspace setup
81
+
82
+ Start from the parent directory that will contain one or more
83
+ `<instance>/<organization>` workspaces:
84
+
85
+ ```sh
86
+ mkdir elementum-workspace
87
+ cd elementum-workspace
88
+ npm init -y
89
+ npm install @elementumai/edk
90
+ elementum auth login --profile <profile>
91
+ elementum --profile=<profile> pull org --data-only
92
+ cd <instance>/<organization>
93
+ elementum --profile=<profile> init
94
+ ```
95
+
96
+ `pull org --data-only` bootstraps and refreshes org reference identities. It
97
+ creates the package/workspace scaffolding, `org.ts`, the `@catalog` path alias,
98
+ and the Terraform input/output skeleton:
99
+
100
+ ```text
101
+ <workspace>/
102
+ package.json
103
+ <instance>/
104
+ <organization>/
105
+ org.ts
106
+ tsconfig.json
107
+ terraform.tfstate # created by OpenTofu; commit this
108
+ apps/
109
+ elements/
110
+ generated/
111
+ catalog.ts
112
+ .tf/ # generated and ignored
113
+ in/ # bridge export input
114
+ out/ # SDK build output
115
+ ```
116
+
117
+ `elementum init` is an idempotent installation/workspace convergence command.
118
+ It verifies the managed compatibility train, auth, SDK namespace/version,
119
+ workspace layout, and provider identity. It never logs in or silently migrates
120
+ Terraform state.
121
+
122
+ Do not hand-edit `org.ts`, `generated/`, or `.tf/`. Refresh those through their
123
+ owning commands.
124
+
125
+ ## Recommended flow
126
+
127
+ Pull first when editing an object that already exists:
128
+
129
+ ```sh
130
+ cd <workspace>/<instance>/<organization>
131
+ elementum --profile=<profile> pull org --data-only
132
+ elementum --profile=<profile> pull app <namespace>
133
+ # or: elementum --profile=<profile> pull element <namespace>
134
+
135
+ # edit apps/<ref>/... or elements/<ref>/...
136
+ npx tsc --noEmit
137
+ elementum build
138
+ elementum --profile=<profile> plan
139
+ elementum --profile=<profile> apply
140
+ ```
141
+
142
+ `pull app` and `pull element` reconstruct editable TypeScript, regenerate the
143
+ catalog, then automatically adopt the exported resources into committed
144
+ Terraform state. Adoption is gated to exactly the expected imports, zero
145
+ create/update/destroy operations, and a clean follow-up plan. Use `--no-adopt`
146
+ only when you deliberately want source without state adoption.
147
+
148
+ Pull commands reserve stdout for one JSON summary. Diagnostics and stream kinds
149
+ that do not yet have an extractor are reported rather than silently discarded.
150
+
151
+ ## CLI commands
152
+
153
+ The TypeScript-owned command surface is:
154
+
155
+ ```sh
156
+ elementum init [--check] [--json]
157
+ elementum update [--check | --dry-run] [--channel stable|preview] [--version <semver>]
158
+ elementum migrate provider-source [orgRoot] [--check | --dry-run | --auto-approve]
159
+
160
+ elementum pull org --data-only [--root <orgRoot>]
161
+ elementum pull app <namespace> [--root <orgRoot>] [--no-adopt]
162
+ elementum pull element <namespace> [--root <orgRoot>] [--no-adopt]
163
+ elementum clone app <namespace> --as <newName> [--namespace <newns>] [--root <orgRoot>]
164
+ elementum build [orgRoot]
165
+ elementum plan [orgRoot-or-nested-target] [bridge args...]
166
+ elementum apply [orgRoot-or-nested-target] [bridge args...]
167
+
168
+ elementum list apps|elements|users|groups|categories|cloud-links
169
+ elementum list ai-provider-connectors|automations|tables
170
+ elementum new agent --app <appRef> --name "Triage Bot"
171
+ elementum new skill --app <appRef> --name "Lookup Ticket"
172
+ elementum canvas <orgRoot-or-file> [--port <port>] [--no-open]
173
+ elementum playbooks list|install|status|path|print
174
+ ```
175
+
176
+ `auth` and other bridge-owned commands route through the managed bridge. Run
177
+ `elementum --help` for the combined local and bridge command surface.
178
+
179
+ `build` loads app, element, and supported child authoring files and replaces its
180
+ marker-owned files under `.tf/out/`; it never calls the platform. `plan` and
181
+ `apply` run from `.tf/out/`, initialize OpenTofu there when necessary, and
182
+ forward extra arguments:
183
+
184
+ ```sh
185
+ elementum plan <instance>/<organization>/apps/myApp/myApp.ts
186
+ elementum --profile=<profile> apply <instance>/<organization> -auto-approve
187
+ ```
188
+
189
+ The optional path may be the org root or anything nested beneath it. Run from
190
+ any directory inside the marked org workspace to omit it. The CLI always runs
191
+ the bridge/OpenTofu pass-through from that root's `.tf/out/`; it does not scan
192
+ or deploy an individual target file.
193
+
194
+ `new agent` and `new skill` create offline app-owned scaffolds without
195
+ overwriting an existing ref. Here, `skill` means an Elementum **agentic
196
+ skill** attached to an agent. Coding-agent guidance is packaged separately as
197
+ **playbooks** (Agent Skills-standard `SKILL.md` directories):
198
+
199
+ ```sh
200
+ elementum playbooks list
201
+ elementum playbooks install --yes
202
+ ```
203
+
204
+ The installed slash commands are `/elementum`, `/elementum-uat`,
205
+ `/elementum-debug`, `/elementum-deployments`, and `/elementum-design`.
206
+ `elementum skills ...` remains the platform command family for agentic-skill
207
+ operations.
208
+
209
+ ## Canvas
210
+
211
+ Canvas is an offline, live-reloading view of authored source:
212
+
213
+ ```sh
214
+ elementum canvas <instance>/<organization>
215
+ elementum canvas apps/myApp/flows/someFlow.ts
216
+ ```
217
+
218
+ A directory target opens the workspace explorer at `http://localhost:3456`,
219
+ covering pulled org identities, apps, fields, status/stages, agents and their
220
+ tools, and supported automations. A file target renders the first export with
221
+ `toUI()` (or `.build().toUI()`). Use `--port <port>` to choose another port or
222
+ `--no-open` to suppress browser launch.
223
+
224
+ ## Package imports
225
+
226
+ Import public package subpaths, not repository-relative modules:
227
+
228
+ ```ts
229
+ import { calc, defineApp } from "@elementumai/edk/app";
230
+ import { defineElement } from "@elementumai/edk/elements";
231
+ import {
232
+ defineAutomation,
233
+ defineWorkflow,
234
+ executeScript,
235
+ onDemand,
236
+ } from "@elementumai/edk/automations";
237
+ import {
238
+ agentCreateRecord,
239
+ agentRunAutomation,
240
+ agentSearchAspect,
241
+ defineAgent,
242
+ } from "@elementumai/edk/agents";
243
+ import { defineSkill } from "@elementumai/edk/agents/skills";
244
+ import { defineFlow } from "@elementumai/edk/flows";
245
+ import { defineSearchTable } from "@elementumai/edk/searchTables";
246
+ import { defineApprovalChain } from "@elementumai/edk/approvalChains";
247
+ import { defineTable } from "@elementumai/edk/tables";
248
+ import { eq } from "@elementumai/edk/core/filters";
249
+ import catalog from "@catalog";
250
+ ```
251
+
252
+ The package exports and `typesVersions` map are kept in lockstep. Generated
253
+ source uses the same public subpaths.
254
+
255
+ ## Authoring model
256
+
257
+ EDK uses names and typed tokens in source, with Terraform state providing
258
+ platform identity:
259
+
260
+ 1. `pull org --data-only` writes org reference bags to `org.ts`, including
261
+ cloud links, categories, connectors, and groups.
262
+ 2. `pull app` or `pull element` writes editable source and adopts existing
263
+ resources into `terraform.tfstate`.
264
+ 3. `generated/catalog.ts` is a pure barrel derived from the authored file tree.
265
+ Import app/entity tokens from `@catalog`; import org tokens from `org.ts`.
266
+ 4. `build` converts TypeScript to the one supported HCL dialect in `.tf/out/`.
267
+ 5. OpenTofu resolves references and computes create/update/replace/destroy
268
+ behavior during `plan` and `apply`.
269
+
270
+ There are no UUIDs or minted handles in authored source. The TypeScript bag key
271
+ is the Terraform label in camelCase through a lossless label conversion. For
272
+ example, a field's key in `fields: {}` is its identity; its display `name` can
273
+ change.
274
+
275
+ Configured builders such as `defineAgent` and `defineAutomation` return
276
+ `{ ref(refName), def(refName) }`. Workspace discovery supplies the ref name from
277
+ the file path. There is no `.deploy()` method.
278
+
279
+ ## Automation example
280
+
281
+ The Terraform path currently round-trips on-demand triggers plus execute-script
282
+ and create-variable tasks. Other typed trigger/task factories remain available
283
+ to the authoring API but are reported as unsupported by `build` until their
284
+ Terraform mappings land.
285
+
286
+ ```ts
287
+ import { defineAutomation, onDemand } from "@elementumai/edk/automations";
288
+ import { template } from "@elementumai/edk/core";
289
+
290
+ export default defineAutomation({
291
+ name: "Greet New Student",
292
+ parent: "students",
293
+ workflowRevision: "1.0.0",
294
+ workflow: onDemand({ STUDENT_NAME: "text" })
295
+ .setVariable("GREETING", {
296
+ value: (ctx) => template("Welcome, ", ctx.trigger.STUDENT_NAME),
297
+ })
298
+ .executeScript("FORMAT_GREETING", {
299
+ inputs: (ctx) => ({ greeting: ctx.variables.GREETING }),
300
+ code: (input) => ({
301
+ message: `${input.parameters.greeting}!`,
302
+ }),
303
+ })
304
+ .outputs((ctx) => ({
305
+ message: ctx.tasks.FORMAT_GREETING.result.message,
306
+ })),
307
+ });
308
+ ```
309
+
310
+ The file path supplies the automation ref; `parent` is the owning app ref.
311
+ `workflowRevision` is required SemVer and is the explicit publish gate. Editing
312
+ tasks or triggers updates the draft; bump the revision only when that draft
313
+ should be published.
314
+
315
+ ## Agent example
316
+
317
+ Agents live under `apps/<appRef>/agents/<agentRef>.ts`. Their connector comes
318
+ from the org catalog, while app and field targets come from `@catalog`:
319
+
320
+ ```ts
321
+ import { agentSearchAspect, defineAgent } from "@elementumai/edk/agents";
322
+ import catalog from "@catalog";
323
+ import { org } from "../../../org.js";
324
+
325
+ export default defineAgent({
326
+ name: "Support Agent",
327
+ parent: "support",
328
+ connector: org.connectors.claudeSonnet,
329
+ description: "Finds support records.",
330
+ instructions: "Search records and summarize the next action.",
331
+ tools: [
332
+ agentSearchAspect({
333
+ name: "find_records",
334
+ description: "Searches support records.",
335
+ aspect: catalog.support,
336
+ queryDescription: "Describe the record to find.",
337
+ fields: [
338
+ {
339
+ field: catalog.support.fields.status,
340
+ description: "Current status",
341
+ },
342
+ ],
343
+ }),
344
+ ],
345
+ });
346
+ ```
347
+
348
+ The Terraform path currently round-trips create-record, search-aspect, and
349
+ run-automation agent tools. Unsupported tools and runtime-only knobs are
350
+ reported as build diagnostics instead of being emitted as partial resources.
351
+ Authored tool names use 1–64 letters, digits, or underscores, with no doubled
352
+ underscores.
353
+
354
+ ## Plan and apply
355
+
356
+ Always build before planning:
357
+
358
+ ```sh
359
+ cd <workspace>/<instance>/<organization>
360
+ elementum build
361
+ elementum plan
362
+ elementum apply
363
+ ```
364
+
365
+ `plan` and `apply` are pass-throughs to the managed bridge with inherited
366
+ stdio. With no explicit profile, the CLI selects the unique saved profile
367
+ matching the org root's `<instance>/<organization>` path. Review destroy and
368
+ replacement actions just as you would in any Terraform plan.
369
+
370
+ ## Identity and state recovery
371
+
372
+ `terraform.tfstate` at the org root is the durable binding between authored
373
+ labels and live platform objects. Commit it to the workspace repository.
374
+ `.tf/` remains generated and ignored.
375
+
376
+ The generated `providers.tf` pins a **local** OpenTofu backend at
377
+ `<orgRoot>/terraform.tfstate` and is regenerated on every `build`, so a remote
378
+ backend cannot be substituted in this release. The committed `terraform.tfstate`
379
+ is the source of truth; coordinate concurrent changes through your normal git
380
+ workflow (single writer, review on change) rather than distributed state
381
+ locking. Remote backends and state locking are candidates for a later release.
382
+
383
+ If state is lost, do not apply the built configuration: OpenTofu would see the
384
+ live objects as new. Restore the state file from version control or re-adopt
385
+ each stream with:
386
+
387
+ ```sh
388
+ elementum --profile=<profile> pull org --data-only
389
+ elementum --profile=<profile> pull app <namespace>
390
+ elementum --profile=<profile> pull element <namespace>
391
+ ```
392
+
393
+ After an update reports an old provider identity, inspect and explicitly
394
+ migrate the committed state:
395
+
396
+ ```sh
397
+ elementum migrate provider-source <orgRoot> --check
398
+ elementum migrate provider-source <orgRoot> --auto-approve
399
+ elementum --profile=<profile> plan <orgRoot>
400
+ ```
401
+
402
+ The migration creates an ignored recovery snapshot, runs OpenTofu
403
+ `state replace-provider`, refreshes generated provider configuration, and never
404
+ applies infrastructure.
405
+
406
+ ## Create and update semantics
407
+
408
+ Terraform owns lifecycle decisions; EDK has no second deployment state machine:
409
+
410
+ - Configured resource absent from state: create.
411
+ - Resource present in config and state with changed attributes: update in place
412
+ or replace, according to provider schema.
413
+ - Resource present in state but absent from built config: destroy.
414
+ - Existing platform resource mapped into state by pull: adopt.
415
+
416
+ Pull adoption's zero-write gates prevent an existing resource from being
417
+ mistaken for a create. Build diagnostics are part of the safety contract:
418
+ unsupported stream kinds are never silently adopted or emitted. Renames that
419
+ change an exported Terraform label are guarded during adoption and rebound with
420
+ state moves when the existing platform identity can be proven.
421
+
422
+ ## Development
423
+
424
+ The repository builds three distinct output trees:
425
+
426
+ - `dist-sdk/` — `tsc -p tsconfig.sdk.json` output, the sole source tree packed
427
+ into the `@elementumai/edk` SDK package;
428
+ - `dist-cli/` — Node-compatible `tsc -p tsconfig.cli.json` output used by local
429
+ development, tests, integration tooling, and the binary build script; it is
430
+ not part of the SDK package or the final release payload;
431
+ - `dist-bin/` — standalone `elementum` executables produced from `dist-cli` by
432
+ the locked local Bun dependency; these are the CLI release inputs distributed
433
+ separately from npm.
434
+
435
+ The repository's principal source roots are siblings:
436
+
437
+ ```text
438
+ src/ # TypeScript SDK and public CLI
439
+ cmd/elementum/ # temporary private Go bridge module
440
+ provider/ # OpenTofu provider module
441
+ distribution/ # registry and installer package
442
+ ```
443
+
444
+ Contributor setup, change-specific tests, Go/provider checks, and pull-request
445
+ verification are documented in [CONTRIBUTING.md](CONTRIBUTING.md). The shortest
446
+ local CLI path is:
447
+
448
+ ```sh
449
+ npm run local:setup
450
+ npm run elementum -- --help
451
+ npm run test:cli
452
+ ```
453
+
454
+ See [binary validation](docs/edk-binary.md) for release and
455
+ compatibility-train checks.
456
+
457
+ ## Contributor integration harness
458
+
459
+ The Preston High harness creates, mutates, renames, and deletes live resources.
460
+ Use only a dedicated test organization and profile. The complete setup,
461
+ required org identities, golden-workspace flow, command flags, and failure
462
+ semantics live in the
463
+ [Golden integration test](CONTRIBUTING.md#golden-integration-test).
@@ -0,0 +1,188 @@
1
+ /**
2
+ * Wire model for hydra's polymorphic `AgentTool` GraphQL interface,
3
+ * surfaced through antman's `getAgent` endpoint
4
+ * (`antman/.../agent/AgentClient.java`'s GraphQL fragment).
5
+ *
6
+ * Mirrors antman's flat-union `AgentTool` Java record: every
7
+ * variant-specific field is optional on the wire, populated based on
8
+ * `type`. Same convention as the EDK's `Agent` wire model — the
9
+ * discriminator is a closed string-literal union; consumers narrow on
10
+ * `type` to safely access variant-specific fields. Antman aliases
11
+ * hydra's GraphQL `__typename` to `type` so the GraphQL-y field name
12
+ * doesn't leak into the REST surface.
13
+ *
14
+ * Variant coverage matches antman's MR (ECP-14495). One known gap:
15
+ * `AgentSelectBotRouteTool` carries only the base-interface fields
16
+ * because hydra's read-side GraphQL doesn't expose the bot reference
17
+ * — round-trip support for that variant requires a separate hydra
18
+ * change.
19
+ */
20
+ import type { AgentConversationRunAs } from "./agent.js";
21
+ /**
22
+ * Closed set of `AgentTool` variants — mirrors hydra's
23
+ * `@JsonSubTypes` discriminators on the agent-tool union. Round-trip
24
+ * support exists for every variant except `AgentSelectBotRouteTool`
25
+ * (see module-level note).
26
+ */
27
+ export type AgentToolType = "AgentSearchAspectTool" | "AgentSearchTableTool" | "AgentCreateRecordTool" | "AgentUpdateRecordTool" | "AgentRelateRecordTool" | "AgentSelectBotRouteTool" | "AgentExecuteWorkflowTool" | "AgentRunAgentTool" | "AgentMcpTool";
28
+ /**
29
+ * One field entry on an agent tool's `fields[]` array — covers
30
+ * `AgentSearchFieldTool`, `AgentRecordCreateFieldTool`, and
31
+ * `AgentRecordUpdateFieldTool` from hydra. The wire shape is
32
+ * structurally identical across the three variants once
33
+ * `field: AspectField` is normalized; `required` and `defaultValue`
34
+ * are populated only on the create/update variants.
35
+ *
36
+ * Distinct from skill-side `AgentFieldTool` which uses a flat
37
+ * `fieldId: UUID` — that's the skill GraphQL convention. Agent-side
38
+ * nests the field reference instead.
39
+ */
40
+ export interface AgentToolField {
41
+ readonly field?: {
42
+ readonly id: string;
43
+ };
44
+ readonly name: string;
45
+ readonly description: string;
46
+ readonly required?: boolean;
47
+ readonly defaultValue?: string;
48
+ }
49
+ /**
50
+ * Reference to a workflow trigger parameter — id and name. Returned
51
+ * as part of {@link AgentExecuteWorkflowInputParameter} on
52
+ * `AgentExecuteWorkflowTool.inputs[].triggerParameter`.
53
+ */
54
+ export interface WorkflowTriggerParameterRef {
55
+ readonly id: string;
56
+ readonly name?: string;
57
+ }
58
+ /**
59
+ * Reference to a workflow output property — id only. Returned as
60
+ * part of {@link AgentExecuteWorkflowOutputParameter} on
61
+ * `AgentExecuteWorkflowTool.outputs[].workflowOutputProperty`.
62
+ */
63
+ export interface WorkflowOutputPropertyRef {
64
+ readonly id: string;
65
+ }
66
+ /**
67
+ * One input parameter on `AgentExecuteWorkflowTool`. The
68
+ * `triggerParameter` reference resolves to a parameter the target
69
+ * automation declares on its on-demand trigger; `triggerParameter.name`
70
+ * matches the parameter's declared name and is what the EDK builder
71
+ * accepts at deploy time (the runtime resolver also accepts UUIDs).
72
+ */
73
+ export interface AgentExecuteWorkflowInputParameter {
74
+ readonly name: string;
75
+ readonly description: string;
76
+ readonly triggerParameter: WorkflowTriggerParameterRef;
77
+ readonly required?: boolean;
78
+ readonly multiple?: boolean;
79
+ }
80
+ /**
81
+ * One output parameter on `AgentExecuteWorkflowTool`. The
82
+ * `workflowOutputProperty` reference resolves to a workflow output
83
+ * declared on the target automation.
84
+ */
85
+ export interface AgentExecuteWorkflowOutputParameter {
86
+ readonly name: string;
87
+ readonly workflowPropertyName: string;
88
+ readonly workflowOutputProperty?: WorkflowOutputPropertyRef;
89
+ }
90
+ /**
91
+ * One HTTP header attached to an `AgentMcpTool`'s outbound request.
92
+ */
93
+ export interface AgentToolHeader {
94
+ readonly key: string;
95
+ readonly value: string;
96
+ }
97
+ /**
98
+ * Polymorphic agent-tool wire shape. `type` is the discriminator;
99
+ * only the fields a given variant supplies are populated. Every
100
+ * variant carries the shared identity bookkeeping (`id`, `name`,
101
+ * `description`, `startMessage`, `runAs`).
102
+ *
103
+ * Variant-to-fields map (every field optional, populated per `type`):
104
+ *
105
+ * | type | extra fields |
106
+ * |-----------------------------|-----------------------------------------------------------------|
107
+ * | AgentSearchAspectTool | aspect, fields, filter, sort, limit, queryDescription |
108
+ * | AgentSearchTableTool | aspect, table, fields, filter, limit, queryDescription |
109
+ * | AgentCreateRecordTool | aspect, fields |
110
+ * | AgentUpdateRecordTool | aspect, fields, handleDescription |
111
+ * | AgentRelateRecordTool | aspect, relatedAspect |
112
+ * | AgentSelectBotRouteTool | (none — bot reference not exposed by hydra read-side GraphQL) |
113
+ * | AgentExecuteWorkflowTool | automation, inputs, outputs, timeout |
114
+ * | AgentRunAgentTool | targetAgent, workerTaskPrompt |
115
+ * | AgentMcpTool | serverUrl, mcpToolName, headers |
116
+ *
117
+ * `filter` / `sort` / `limit` round-trip on agent search tools through
118
+ * the same shared infrastructure automation `recordSearch` uses (see
119
+ * `pull/normalize-filter.ts`, `pull/print-filter.ts`,
120
+ * `core/filters/serialize.ts`, `core/types/common.ts:serializeSortToWire`).
121
+ * Wire types are typed against the platform's `Filter` / `Sort`
122
+ * shapes; B2.5 wires them through normalize → AST → printer so a
123
+ * pulled file emits a `filter: (row) => ...` callback that the EDK
124
+ * builder accepts on re-deploy.
125
+ *
126
+ * Note: `aspect.__typename` and `relatedAspect.__typename` retain
127
+ * the GraphQL-y name because the apps/aspect wire surface still uses
128
+ * `__typename` (apps-side rename is out of scope for B2).
129
+ */
130
+ export interface AgentTool {
131
+ readonly type?: AgentToolType;
132
+ readonly id: string;
133
+ readonly name: string;
134
+ readonly description: string;
135
+ readonly startMessage?: string;
136
+ readonly runAs?: AgentConversationRunAs;
137
+ readonly aspect?: {
138
+ readonly id: string;
139
+ readonly __typename?: string;
140
+ };
141
+ readonly relatedAspect?: {
142
+ readonly id: string;
143
+ readonly __typename?: string;
144
+ };
145
+ readonly table?: {
146
+ readonly id: string;
147
+ };
148
+ readonly fields?: readonly AgentToolField[];
149
+ /**
150
+ * Wire `Filter` — the platform's polymorphic filter JSON, typed
151
+ * against the same `FilterExpr` source authors use. The serializer's
152
+ * `structuredClone` pass-through means wire and source shapes are
153
+ * structurally identical; the deserializer walks this through
154
+ * `pull/normalize-filter.ts:normalizeFilter` to produce a `FilterAst`
155
+ * the printer can render as a typed `(row) => ...` callback.
156
+ */
157
+ readonly filter?: import("../../../../src/entities/shared/filters/types.js").FilterExpr;
158
+ /**
159
+ * Wire `Sort` shape — `{ orders: [{ field: <fieldId>, direction }] }`.
160
+ * Authored as `SortOrder | readonly SortOrder[]` on the EDK side and
161
+ * serialized via `core/types/common.ts:serializeSortToWire`.
162
+ */
163
+ readonly sort?: {
164
+ readonly orders: ReadonlyArray<{
165
+ readonly field: string;
166
+ readonly direction: "ASC" | "DESC";
167
+ }>;
168
+ };
169
+ readonly limit?: number;
170
+ readonly queryDescription?: string;
171
+ readonly handleDescription?: string;
172
+ readonly automation?: {
173
+ readonly id: string;
174
+ readonly name?: string;
175
+ };
176
+ readonly inputs?: readonly AgentExecuteWorkflowInputParameter[];
177
+ readonly outputs?: readonly AgentExecuteWorkflowOutputParameter[];
178
+ readonly timeout?: string;
179
+ readonly targetAgent?: {
180
+ readonly id: string;
181
+ readonly name?: string;
182
+ readonly type?: string;
183
+ };
184
+ readonly workerTaskPrompt?: string;
185
+ readonly serverUrl?: string;
186
+ readonly mcpToolName?: string;
187
+ readonly headers?: readonly AgentToolHeader[];
188
+ }
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Wire model for hydra's polymorphic `AgentTool` GraphQL interface,
3
+ * surfaced through antman's `getAgent` endpoint
4
+ * (`antman/.../agent/AgentClient.java`'s GraphQL fragment).
5
+ *
6
+ * Mirrors antman's flat-union `AgentTool` Java record: every
7
+ * variant-specific field is optional on the wire, populated based on
8
+ * `type`. Same convention as the EDK's `Agent` wire model — the
9
+ * discriminator is a closed string-literal union; consumers narrow on
10
+ * `type` to safely access variant-specific fields. Antman aliases
11
+ * hydra's GraphQL `__typename` to `type` so the GraphQL-y field name
12
+ * doesn't leak into the REST surface.
13
+ *
14
+ * Variant coverage matches antman's MR (ECP-14495). One known gap:
15
+ * `AgentSelectBotRouteTool` carries only the base-interface fields
16
+ * because hydra's read-side GraphQL doesn't expose the bot reference
17
+ * — round-trip support for that variant requires a separate hydra
18
+ * change.
19
+ */
20
+ export {};