@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
package/README.md CHANGED
@@ -1,4 +1,409 @@
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
+ Strongly typed TypeScript SDK and CLI for building Elementum apps, automations, agents, skills, flows, and search tables as code.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install @elementumai/edk
9
+ ```
10
+
11
+ The SDK is a public npm package. Use Node 24.
12
+
13
+ ## Configure Auth
14
+
15
+ Auth lives entirely in `ei` — edk holds no credentials and never talks to the
16
+ platform itself. Sign in once with `ei`, and edk reads the active tenant from it:
17
+
18
+ ```bash
19
+ ei auth login
20
+ ```
21
+
22
+ Non-interactive / CI — pick one **CLI mode** per command:
23
+
24
+ ```bash
25
+ # Ambient: current profile (auth config) + .env + shell
26
+ edk plan
27
+
28
+ # Explicit flags
29
+ edk plan --organization <organization> --environment <environment> --instance <instance> \
30
+ --client-id "$ELEMENTUM_CLIENT_ID" --client-secret "$ELEMENTUM_CLIENT_SECRET"
31
+
32
+ # Named profile
33
+ edk plan --profile <profile>
34
+
35
+ # Allowlisted env file for this command
36
+ edk plan --profile-env-file=.env.staging
37
+ ```
38
+
39
+ Auth is owned by `ei` (not edk env vars):
40
+
41
+ ```bash
42
+ ei auth login
43
+ ei auth status
44
+ ```
45
+
46
+ edk never reads `ELEMENTUM_INSTANCE` / `ELEMENTUM_ORGANIZATION`. Workspace paths
47
+ come from the folder you run in, an explicit `--root`, or
48
+ `<cwd>/<instance>/<org>` from the active `ei` profile.
49
+
50
+ **Before apply:** run `edk plan`. This validates that the workspace folder's
51
+ instance/org matches `ei auth status`.
52
+
53
+ ## Set Up An Agent Workspace
54
+
55
+ ```bash
56
+ edk import org
57
+ npx edk skills install
58
+ ```
59
+
60
+ `edk import org` initializes the workspace when needed, then imports org-level
61
+ cloud links and AI provider connectors into the generated catalog/state. It
62
+ creates:
63
+
64
+ ```text
65
+ <workspace>/
66
+ package.json
67
+ .npmrc
68
+ <instance>/
69
+ <org>/
70
+ apps/
71
+ elements/
72
+ tables/
73
+ generated/
74
+ catalog.ts
75
+ state.<env>.json
76
+ ```
77
+
78
+ The org folder is always `<instance>/<org>` from active `ei auth`. It also gets
79
+ a `tsconfig.json` path alias so authored files can import the generated catalog
80
+ with `import catalog from "@catalog";`.
81
+
82
+ `edk init` is deprecated and no longer needed. Workspace initialization happens
83
+ automatically as part of `edk pull org --data-only`.
84
+
85
+ Run import/pull commands from the parent workspace folder. By default they write
86
+ to `<cwd>/<instance>/<org>` from `ei auth`: for example, from `edk-project`,
87
+ the `edk` org on instance `dev` writes `dev/edk/generated/...` and
88
+ `dev/edk/apps/...`. Plan/apply refuse a folder that doesn't match the active
89
+ ei profile.
90
+
91
+ `edk skills install` prints the Skills CLI install command for the bundled `elementum-edk-authoring` agent skill. Pass `--yes` to run it.
92
+
93
+ ## Recommended Flow
94
+
95
+ For editing what already exists in Elementum, use the pull-first flow:
96
+
97
+ ```bash
98
+ cd <workspace>
99
+ ei auth login
100
+ edk pull org --data-only
101
+ edk pull app <namespace>
102
+ # edit the generated/authoring TypeScript
103
+ edk plan
104
+ edk apply
105
+ ```
106
+
107
+ Run `edk pull org --data-only` before app pull workflows so org-level cloud
108
+ links and AI provider connectors exist in the workspace catalog. `edk pull app`
109
+ writes editable TypeScript under `<instance>/<org>/apps/<appRef>/...`;
110
+ `edk plan` / `edk apply` preview and push from `.tf/out/`.
111
+
112
+ ## CLI
113
+
114
+ All CLI commands share one auth path: the active `ei auth` profile (`ei auth login`).
115
+
116
+ ```bash
117
+ edk list apps
118
+ edk list users
119
+ edk list groups
120
+ edk list categories
121
+ edk list cloud-links
122
+ edk list ai-provider-connectors
123
+ edk fetch app --aspect-id <uuid> --fields --agents --automations --search-tables
124
+ edk import org
125
+ edk import app --id <uuid>
126
+ edk import element --id <uuid>
127
+ edk import cloud-links
128
+ edk import connectors
129
+ edk import automation --id <uuid> --app-id <uuid>
130
+ edk import agent --id <uuid> --app-id <uuid>
131
+ edk import skill --id <uuid> --app-id <uuid>
132
+ edk new agent --app <appRef> --name "Triage Bot"
133
+ edk new skill --app <appRef> --name "Lookup Ticket"
134
+ edk plan <instance>/<org>
135
+ edk plan <instance>/<org>/apps/<appRef>
136
+ edk apply <instance>/<org>
137
+ edk apply <instance>/<org>/apps/<appRef>
138
+ edk pull app --id <uuid> --all
139
+ edk pull app --aspect-id <uuid>
140
+ edk pull app --aspect-id <uuid> --all
141
+ edk pull element --id <uuid>
142
+ edk pull element --id <uuid> --all
143
+ edk pull automation --workflow <uuid>
144
+ edk pull agent --agent <uuid>
145
+ edk pull skill --skill <uuid>
146
+ edk pull search-table --aspect <uuid> --search-table <uuid>
147
+ edk pull -i
148
+ edk canvas <instance>/<org>/apps/myApp/automations/someAutomation.ts
149
+ edk skills path
150
+ edk skills print
151
+ ```
152
+
153
+ `edk import org` writes the org-level **reference-only catalog** and identity
154
+ bindings for cloud links and AI provider connectors. Other `edk import ...`
155
+ commands remain available as optional bootstrap/adoption tools for app or
156
+ entity references; they do not write editable entity source and never put ids in
157
+ source. `edk pull` writes editable EDK TypeScript under
158
+ `<instance>/<org>/apps/<appRef>/...` when run from the parent workspace (plus
159
+ supporting app catalog files). `--root <dir>` overrides the org workspace root
160
+ for `import`.
161
+ `edk pull -i` opens an interactive terminal interface for selecting entities to
162
+ pull within selected application(s).
163
+ `edk pull app --aspect-id <uuid> --all` pulls all entities linked to an app.
164
+
165
+ `edk new agent`/`edk new skill` scaffold a new, empty agent/skill authoring
166
+ file under an already-imported app's `agents/`/`skills/` folder (agents and
167
+ skills are app-owned only — elements never own them). The refName is minted
168
+ from `--name` and regenerates the owning app's catalog so the new entity is
169
+ immediately referenceable; re-running with the same `--name` mints a
170
+ disambiguated refName rather than overwriting the existing file. Run these
171
+ from the parent workspace, same as `edk import`/`edk pull` — `--app` must
172
+ match a refName already imported/pulled there (e.g.
173
+ `<instance>/<organization>/apps/<appRef>`),
174
+ so a "not imported" error usually means either the wrong `--app` value or that
175
+ you ran the command from inside the org folder instead of its parent. A
176
+ scaffolded agent's `connector` is left as an unresolved
177
+ `catalog.connectors` placeholder — open the file and let IDE autocomplete on
178
+ `catalog.connectors.` pick a real handle; it won't typecheck until you do. A
179
+ scaffolded skill starts with `tools: []`, immediately compilable, plus a
180
+ commented-out example call for each of the six skill tool factories
181
+ (`skillSearchAspect`, `skillSearchTable`, `skillCreateRecord`,
182
+ `skillUpdateRecord`, `skillAutomation`, `skillRunAgent`) with the app's own
183
+ handle already filled in — uncomment whichever kinds you need, add the
184
+ matching import, and autocomplete the remaining `catalog.` refs.
185
+
186
+ Ignore legacy top-level files such as `generated/apps/aspects-catalog.ts`
187
+ (sometimes remembered as `aspect-catalog.ts`) if you find them in an older
188
+ workspace. Current catalogs live under each instance/org folder, for example
189
+ `<instance>/<organization>/generated/catalog.ts` and
190
+ `<instance>/<organization>/apps/<appRef>/generated/catalog.ts`.
191
+
192
+ ## Canvas — explore your workspace
193
+
194
+ `edk canvas` opens a local, fully offline explorer for an org workspace:
195
+
196
+ ```bash
197
+ edk canvas <instance>/<org> # explore a workspace directory
198
+ edk canvas # same, resolved from ei auth / org workspace cwd
199
+ ```
200
+
201
+ The explorer opens `http://localhost:3456` and lets you navigate everything
202
+ EDK manages in the workspace: apps (fields with types/flags/options, status
203
+ options, the stage pipeline) and the org reference identities (cloud links,
204
+ categories, connectors, groups, shown with their `org.<bag>.<key>` authoring
205
+ tokens). It watches the workspace and hot-reloads on every save; `/` focuses
206
+ search, which filters apps, fields, and identities live. Broken authoring
207
+ files degrade to an inline error card — the rest of the workspace stays
208
+ navigable.
209
+
210
+ Pointing it at a **file** instead keeps the original render-tree preview:
211
+ the first export with `toUI()` (or `.build().toUI()`) renders and reloads on
212
+ save. Pass `--port <port>` to avoid conflicts or `--no-open` to skip opening
213
+ a browser.
214
+
215
+ ## Package Imports
216
+
217
+ Use package subpaths instead of repo-relative imports. Each entity's builder,
218
+ trigger/task/tool factories, and types all live under one subpath:
219
+
220
+ ```ts
221
+ import { defineApp, calc } from "@elementumai/edk/app";
222
+ import { defineAutomation, defineWorkflow, onDemand, recordSearch } from "@elementumai/edk/automations";
223
+ import { defineAgent, agentSearchAspect } from "@elementumai/edk/agents";
224
+ import { defineSkill } from "@elementumai/edk/agents/skills";
225
+ import { defineFlow } from "@elementumai/edk/flows";
226
+ import { defineSearchTable } from "@elementumai/edk/searchTables";
227
+ import { defineApprovalChain } from "@elementumai/edk/approvalChains";
228
+ import { defineTable } from "@elementumai/edk/tables";
229
+ import { eq } from "@elementumai/edk/core/filters";
230
+ ```
231
+
232
+ ## The Authoring Model
233
+
234
+ EDK is Terraform-like. You don't paste UUIDs into source — instead:
235
+
236
+ 1. `edk auth login` establishes the CLI auth profile. It can prompt
237
+ interactively or accept explicit tenant/credential flags.
238
+ 2. `edk import org` initializes the workspace if needed, then writes org-level
239
+ reference-only catalogs/state for cloud links and AI provider connectors.
240
+ Run it before pull workflows.
241
+ 3. `edk pull <entity> <args>` writes editable TypeScript for live Elementum
242
+ objects under `<instance>/<org>/apps/<appRef>/...` when run from the parent workspace,
243
+ plus supporting catalog/state files.
244
+ 4. You author against **handle-tokens** imported with
245
+ `import catalog from "@catalog";` (`catalog.myApp.fields.status`,
246
+ `catalog.myApp.automations.someAutomation`, `catalog.connectors.claude`). Some
247
+ builders return configured `{ ref(refName), def(refName) }` objects whose
248
+ refName comes from the file name; others still return `DeployableEntity` directly.
249
+ There is no `.deploy()` method.
250
+ 5. `edk plan <dir>` / `edk apply <dir>` regenerate app catalogs from authoring files, resolve
251
+ tokens against state, diff each entity structurally against its recorded
252
+ baseline, and create or update.
253
+
254
+ `edk import app --id <uuid>` is still useful as an optional reference-only
255
+ bootstrap/adoption path when you need app refs without pulling editable source.
256
+
257
+ ## Author An Automation
258
+
259
+ Start from the live app source, then author against its handle-tokens:
260
+
261
+ ```bash
262
+ cd <workspace>
263
+ edk import org
264
+ edk pull app --id <uuid> --all
265
+ ```
266
+
267
+ ```ts
268
+ import { defineAutomation, defineWorkflow, filter, onDemand, recordSearch } from "@elementumai/edk/automations";
269
+ import catalog from "@catalog";
270
+
271
+ export default defineAutomation({
272
+ name: "Some Automation",
273
+ parent: "myApp",
274
+ workflow: defineWorkflow()
275
+ .trigger(onDemand({}))
276
+ .task("findTickets", () => recordSearch({
277
+ app: catalog.myApp,
278
+ filter: filter.eq(catalog.myApp.fields.status, "Escalated"),
279
+ limit: 10,
280
+ })),
281
+ });
282
+ ```
283
+
284
+ ## Author An Agent
285
+
286
+ The AI provider connector is a `catalog.connectors.<key>` handle-token from the
287
+ org catalog (`edk import org`). The builder takes options (including a
288
+ `tools:` array) and returns a configured entity:
289
+
290
+ ```ts
291
+ import { defineAgent, agentSearchAspect } from "@elementumai/edk/agents";
292
+ import catalog from "@catalog";
293
+
294
+ export default defineAgent({
295
+ name: "Support Agent",
296
+ parent: "myApp",
297
+ connector: catalog.connectors.claude,
298
+ description: "Helps with records in myApp.",
299
+ instructions: "Search records and summarize next actions.",
300
+ temperature: 0.2,
301
+ maxLength: 2000,
302
+ tools: [
303
+ agentSearchAspect({
304
+ name: "searchRecords",
305
+ description: "Search myApp records.",
306
+ aspect: catalog.myApp,
307
+ queryDescription: "Describe the record or user request.",
308
+ }),
309
+ ],
310
+ });
311
+ ```
312
+
313
+ ## Plan And Apply
314
+
315
+ Run the Terraform-style commands against one or more directories and/or entity
316
+ files. Directory targets discover every file below that directory whose
317
+ default export is a built `DeployableEntity`; file targets plan/apply only that
318
+ entity. Multiple targets aggregate into one plan. Only `apply` writes:
319
+
320
+ ```bash
321
+ # From the parent folder that contains instance/org workspaces:
322
+ edk plan <instance>/<org>
323
+ edk apply <instance>/<org>
324
+ edk plan <instance>/<org>/apps/myApp
325
+ edk apply <instance>/<org>/apps/myApp
326
+
327
+ # From inside the instance/org workspace:
328
+ edk plan .
329
+ edk apply .
330
+ edk plan apps/myApp
331
+ edk apply apps/myApp
332
+
333
+ # Apply one entity in place, or several paths at once:
334
+ edk plan apps/myApp/automations/someAutomation.ts
335
+ edk apply elements/tag/tag.ts elements/address/address.ts
336
+ ```
337
+
338
+ `apply` prints the same plan first, then asks for confirmation. Only typing
339
+ `yes` applies creates and updates. If no target is supplied, the command
340
+ uses the current working directory. Files starting with `_` and
341
+ test/declaration files are ignored, so private helper scripts are not
342
+ imported.
343
+
344
+ Every target must live under an org workspace whose folder matches the active
345
+ auth org — either a bare `<org>/...` or the nested `<instance>/<org>/...`
346
+ (for example `eu/sanofi/elements/foo.ts`). When the org folder sits directly
347
+ under a recognized instance name (`us`, `eu`, `stage`, `dev`, `local`), that
348
+ instance segment must also match the active auth config. Authoring files
349
+ inside must additionally sit under `apps/<ref>/` or `elements/<ref>/` in one of
350
+ the accepted shapes (the aspect file itself, or a child bag like
351
+ `automations/<name>.ts`) — a flat `apps/<name>.ts` is rejected.
352
+
353
+ Plan output uses the recorded `generated/state.<env>.json` bindings and reports
354
+ create, update, skip, blocked, disabled, and update-unsupported verdicts.
355
+
356
+ Builds are local. `plan`/`apply` require an active `ei auth` profile matching the workspace folder.
357
+
358
+ ## Create Vs Update
359
+
360
+ `plan`/`apply` resolve each entity's handle-tokens against `generated/state.<env>.json`, then
361
+ decide per entity:
362
+
363
+ - **create** — no binding recorded for this `kind::refName` → POST.
364
+ - **skip** — bound, and a structural diff against the recorded baseline is
365
+ empty → no wire call.
366
+ - **update** — bound, and the payload differs → PUT against the bound id,
367
+ carrying the changed fields. (A bound-but-baseline-less entity — e.g. one
368
+ imported reference-only and now being managed — diffs as all-changed and
369
+ reconciles the platform to local source.)
370
+ - **update-unsupported** — bound and changed, but the kind has no platform
371
+ PUT. Apply reports `DeployUpdateUnsupportedError`; delete the entity on the
372
+ platform and re-create.
373
+ - **blocked** — a referenced handle isn't bound yet (import the app/entity it
374
+ points at). Apply surfaces the miss rather than POSTing a dangling reference.
375
+
376
+ Support today:
377
+
378
+ - **Automations, agents, skills** support create, update, and skip.
379
+ - **Flows, search tables, tables** are create-only — a change to a deployed one
380
+ is `update-unsupported` until the platform ships PUT.
381
+
382
+ There are no source-level ids and no `.deploy()` seed refs anymore: identity
383
+ lives entirely in state. On disk, state is consolidated into
384
+ `generated/state.<env>.json` in the org workspace; it contains org bindings,
385
+ the app registry, per-app bindings, and baselines. Override the generated-state
386
+ directory with `EDK_STATE_DIR`. Commit the state file to share identity across
387
+ machines; gitignore it for per-developer state.
388
+
389
+ If a state file is corrupt or schema-incompatible, the loader throws
390
+ `DeployStateCorruptError` rather than silently rebuilding it — re-import the
391
+ owning app to rebuild bindings.
392
+
393
+ ### Recovering identity
394
+
395
+ Lost `generated/state.<env>.json` (fresh clone, deleted by accident) means EDK no longer knows
396
+ which platform entities your handle-tokens map to. Re-run `edk import org` for
397
+ org references, then pull the app/entity again or use `edk import app --id
398
+ <uuid>` as a reference-only bootstrap when you only need bindings. Author files
399
+ keep working unchanged because they only reference handles, never ids.
400
+
401
+ ## Development
402
+
403
+ ```bash
404
+ npm install
405
+ npm run build
406
+ npm run typecheck
407
+ npm test
408
+ npm run pack:dry-run
409
+ ```
@@ -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 {};