@elementumai/edk 0.8.2-alpha.6 → 0.9.2

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 (372) hide show
  1. package/README.md +18 -14
  2. package/dist-sdk/elementum-entity-client/clients/agents/models/agent-tool.d.ts +3 -3
  3. package/dist-sdk/elementum-entity-client/clients/aspects/models/index.d.ts +1 -1
  4. package/dist-sdk/elementum-entity-client/clients/aspects/models/picklist-config.d.ts +3 -11
  5. package/dist-sdk/elementum-entity-client/clients/automation/models/automation.d.ts +2 -10
  6. package/dist-sdk/elementum-entity-client/clients/skills/models/skill-tool.d.ts +1 -1
  7. package/dist-sdk/fs/entity.d.ts +2 -2
  8. package/dist-sdk/fs/entity.js +1 -1
  9. package/dist-sdk/pull/missing-report.d.ts +81 -0
  10. package/dist-sdk/pull/missing-report.js +52 -0
  11. package/dist-sdk/src/catalog/factories.d.ts +53 -19
  12. package/dist-sdk/src/catalog/factories.js +51 -12
  13. package/dist-sdk/src/catalog/from-authoring.js +13 -3
  14. package/dist-sdk/src/catalog/index.d.ts +2 -2
  15. package/dist-sdk/src/catalog/index.js +1 -1
  16. package/dist-sdk/src/catalog/org.js +1 -0
  17. package/dist-sdk/src/catalog/render.js +6 -0
  18. package/dist-sdk/src/catalog/token.js +7 -0
  19. package/dist-sdk/src/catalog/types.d.ts +34 -23
  20. package/dist-sdk/src/catalog/types.js +7 -4
  21. package/dist-sdk/src/core/app-to-ui.d.ts +6 -6
  22. package/dist-sdk/src/core/app-to-ui.js +7 -9
  23. package/dist-sdk/src/core/index.d.ts +1 -0
  24. package/dist-sdk/src/core/index.js +1 -0
  25. package/dist-sdk/src/core/platform-id.d.ts +11 -0
  26. package/dist-sdk/src/core/platform-id.js +8 -0
  27. package/dist-sdk/src/{entities/flow/activities/render-catalog.d.ts → core/render-tree.d.ts} +2 -2
  28. package/dist-sdk/src/{entities/flow/activities/render-catalog.js → core/render-tree.js} +6 -8
  29. package/dist-sdk/src/core/types/app.d.ts +13 -23
  30. package/dist-sdk/src/core/types/app.js +0 -1
  31. package/dist-sdk/src/engine/build/context.d.ts +3 -3
  32. package/dist-sdk/src/engine/pull/attrs.d.ts +4 -0
  33. package/dist-sdk/src/engine/pull/attrs.js +17 -0
  34. package/dist-sdk/src/engine/pull/context.d.ts +39 -0
  35. package/dist-sdk/src/engine/pull/org.d.ts +1 -0
  36. package/dist-sdk/src/engine/pull/org.js +2 -0
  37. package/dist-sdk/src/engine/tf/expr.d.ts +1 -1
  38. package/dist-sdk/src/engine/tf/expr.js +10 -3
  39. package/dist-sdk/src/engine/workspace/authoring-layout.js +4 -2
  40. package/dist-sdk/src/entities/access-policy/build.d.ts +4 -13
  41. package/dist-sdk/src/entities/access-policy/build.js +1 -1
  42. package/dist-sdk/src/entities/access-policy/from-tf.d.ts +12 -38
  43. package/dist-sdk/src/entities/access-policy/from-tf.js +16 -74
  44. package/dist-sdk/src/entities/access-policy/principal.d.ts +29 -0
  45. package/dist-sdk/src/entities/access-policy/principal.js +13 -0
  46. package/dist-sdk/src/entities/access-policy/to-tf.d.ts +20 -5
  47. package/dist-sdk/src/entities/access-policy/to-tf.js +26 -54
  48. package/dist-sdk/src/entities/agent/build.d.ts +39 -8
  49. package/dist-sdk/src/entities/agent/build.js +36 -15
  50. package/dist-sdk/src/entities/agent/deserializer/print-agent-v2.d.ts +5 -0
  51. package/dist-sdk/src/entities/agent/deserializer/print-agent-v2.js +121 -36
  52. package/dist-sdk/src/entities/agent/from-tf.js +5 -8
  53. package/dist-sdk/src/entities/agent/index.d.ts +5 -2
  54. package/dist-sdk/src/entities/agent/index.js +4 -2
  55. package/dist-sdk/src/entities/agent/module.js +5 -2
  56. package/dist-sdk/src/entities/agent/run-as.d.ts +16 -0
  57. package/dist-sdk/src/entities/agent/run-as.js +1 -0
  58. package/dist-sdk/src/entities/agent/to-tf.d.ts +2 -1
  59. package/dist-sdk/src/entities/agent/to-tf.js +2 -1
  60. package/dist-sdk/src/entities/agent/tools.d.ts +60 -48
  61. package/dist-sdk/src/entities/agent/tools.js +44 -38
  62. package/dist-sdk/src/entities/agent-a2a-skill/from-tf.js +1 -1
  63. package/dist-sdk/src/entities/agent-a2a-skill/to-tf.js +4 -4
  64. package/dist-sdk/src/entities/agent-tool/from-tf.d.ts +17 -8
  65. package/dist-sdk/src/entities/agent-tool/from-tf.js +127 -37
  66. package/dist-sdk/src/entities/agent-tool/module.js +6 -0
  67. package/dist-sdk/src/entities/agent-tool/to-tf.d.ts +5 -5
  68. package/dist-sdk/src/entities/agent-tool/to-tf.js +93 -20
  69. package/dist-sdk/src/entities/agent-tool/types.d.ts +4 -5
  70. package/dist-sdk/src/entities/agent-tool/types.js +36 -8
  71. package/dist-sdk/src/entities/app/build.d.ts +137 -25
  72. package/dist-sdk/src/entities/app/build.js +104 -53
  73. package/dist-sdk/src/entities/app/deserializer/normalize.d.ts +173 -1
  74. package/dist-sdk/src/entities/app/deserializer/pulled-expression.d.ts +59 -0
  75. package/dist-sdk/src/entities/app/deserializer/pulled-expression.js +68 -0
  76. package/dist-sdk/src/entities/app/display-blocks.d.ts +2 -1
  77. package/dist-sdk/src/entities/app/display-blocks.js +1 -1
  78. package/dist-sdk/src/entities/app/from-tf.d.ts +11 -1
  79. package/dist-sdk/src/entities/app/from-tf.js +30 -2
  80. package/dist-sdk/src/entities/app/index.d.ts +13 -4
  81. package/dist-sdk/src/entities/app/index.js +8 -1
  82. package/dist-sdk/src/entities/app/module.js +27 -2
  83. package/dist-sdk/src/entities/app/to-tf.js +75 -1
  84. package/dist-sdk/src/entities/approval-chain/build.d.ts +31 -16
  85. package/dist-sdk/src/entities/approval-chain/build.js +49 -49
  86. package/dist-sdk/src/entities/approval-chain/from-tf.d.ts +17 -0
  87. package/dist-sdk/src/entities/approval-chain/from-tf.js +57 -0
  88. package/dist-sdk/src/entities/approval-chain/index.d.ts +2 -3
  89. package/dist-sdk/src/entities/approval-chain/index.js +2 -3
  90. package/dist-sdk/src/entities/approval-chain/module.d.ts +3 -0
  91. package/dist-sdk/src/entities/approval-chain/module.js +51 -0
  92. package/dist-sdk/src/entities/approval-chain/printer.d.ts +2 -0
  93. package/dist-sdk/src/entities/approval-chain/printer.js +21 -0
  94. package/dist-sdk/src/entities/approval-chain/to-tf.d.ts +9 -0
  95. package/dist-sdk/src/entities/approval-chain/to-tf.js +43 -0
  96. package/dist-sdk/src/entities/automation/build.d.ts +10 -6
  97. package/dist-sdk/src/entities/automation/build.js +5 -4
  98. package/dist-sdk/src/entities/automation/deserializer/ast.d.ts +10 -8
  99. package/dist-sdk/src/entities/automation/deserializer/print-automation.js +51 -114
  100. package/dist-sdk/src/entities/automation/filter.d.ts +1 -115
  101. package/dist-sdk/src/entities/automation/filter.js +1 -197
  102. package/dist-sdk/src/entities/automation/from-tf.d.ts +4 -0
  103. package/dist-sdk/src/entities/automation/from-tf.js +202 -119
  104. package/dist-sdk/src/entities/automation/index.d.ts +4 -2
  105. package/dist-sdk/src/entities/automation/index.js +3 -1
  106. package/dist-sdk/src/entities/automation/module.js +10 -4
  107. package/dist-sdk/src/entities/automation/script-code.js +94 -6
  108. package/dist-sdk/src/entities/automation/tasks.d.ts +20 -19
  109. package/dist-sdk/src/entities/automation/tasks.js +2 -2
  110. package/dist-sdk/src/entities/automation/to-tf.d.ts +34 -2
  111. package/dist-sdk/src/entities/automation/to-tf.js +273 -98
  112. package/dist-sdk/src/entities/automation/triggers.d.ts +18 -17
  113. package/dist-sdk/src/entities/automation/triggers.js +1 -1
  114. package/dist-sdk/src/entities/dashboard/build.d.ts +17 -0
  115. package/dist-sdk/src/entities/dashboard/from-tf.d.ts +12 -0
  116. package/dist-sdk/src/entities/dashboard/from-tf.js +95 -0
  117. package/dist-sdk/src/entities/dashboard/module.d.ts +3 -0
  118. package/dist-sdk/src/entities/dashboard/module.js +16 -0
  119. package/dist-sdk/src/entities/dashboard/to-tf.d.ts +30 -0
  120. package/dist-sdk/src/entities/dashboard/to-tf.js +94 -0
  121. package/dist-sdk/src/entities/dashboard-widget/module.d.ts +3 -0
  122. package/dist-sdk/src/entities/dashboard-widget/module.js +10 -0
  123. package/dist-sdk/src/entities/data-lookup/module.d.ts +3 -0
  124. package/dist-sdk/src/entities/data-lookup/module.js +22 -0
  125. package/dist-sdk/src/entities/datamine/build.d.ts +22 -0
  126. package/dist-sdk/src/entities/datamine/build.js +1 -0
  127. package/dist-sdk/src/entities/datamine/from-tf.d.ts +17 -0
  128. package/dist-sdk/src/entities/datamine/from-tf.js +98 -0
  129. package/dist-sdk/src/entities/datamine/module.d.ts +3 -0
  130. package/dist-sdk/src/entities/datamine/module.js +23 -0
  131. package/dist-sdk/src/entities/datamine/to-tf.d.ts +11 -0
  132. package/dist-sdk/src/entities/datamine/to-tf.js +53 -0
  133. package/dist-sdk/src/entities/dynamic-layout/build.d.ts +303 -0
  134. package/dist-sdk/src/entities/dynamic-layout/build.js +4 -0
  135. package/dist-sdk/src/entities/dynamic-layout/dialect.d.ts +2 -0
  136. package/dist-sdk/src/entities/dynamic-layout/dialect.js +9 -0
  137. package/dist-sdk/src/entities/dynamic-layout/from-tf.d.ts +10 -0
  138. package/dist-sdk/src/entities/dynamic-layout/from-tf.js +233 -0
  139. package/dist-sdk/src/entities/dynamic-layout/module.d.ts +3 -0
  140. package/dist-sdk/src/entities/dynamic-layout/module.js +13 -0
  141. package/dist-sdk/src/entities/dynamic-layout/to-tf.d.ts +26 -0
  142. package/dist-sdk/src/entities/dynamic-layout/to-tf.js +267 -0
  143. package/dist-sdk/src/entities/element/build.d.ts +31 -14
  144. package/dist-sdk/src/entities/element/build.js +12 -4
  145. package/dist-sdk/src/entities/element/from-tf.d.ts +9 -1
  146. package/dist-sdk/src/entities/element/from-tf.js +31 -2
  147. package/dist-sdk/src/entities/element/index.d.ts +8 -3
  148. package/dist-sdk/src/entities/element/index.js +4 -1
  149. package/dist-sdk/src/entities/element/module.js +19 -2
  150. package/dist-sdk/src/entities/element/to-tf.js +57 -1
  151. package/dist-sdk/src/entities/field/build.d.ts +4 -3
  152. package/dist-sdk/src/entities/field/calculation-types.d.ts +6 -0
  153. package/dist-sdk/src/entities/field/calculation-types.js +42 -0
  154. package/dist-sdk/src/entities/field/from-tf.js +90 -11
  155. package/dist-sdk/src/entities/field/module.d.ts +1 -0
  156. package/dist-sdk/src/entities/field/module.js +5 -2
  157. package/dist-sdk/src/entities/field/record-shape.d.ts +1 -1
  158. package/dist-sdk/src/entities/field/to-tf.d.ts +1 -1
  159. package/dist-sdk/src/entities/field/to-tf.js +22 -6
  160. package/dist-sdk/src/entities/field/types.js +3 -0
  161. package/dist-sdk/src/entities/file-reader/build.d.ts +66 -19
  162. package/dist-sdk/src/entities/file-reader/build.js +49 -4
  163. package/dist-sdk/src/entities/file-reader/deserializer/print-file-reader.d.ts +1 -0
  164. package/dist-sdk/src/entities/file-reader/deserializer/print-file-reader.js +11 -9
  165. package/dist-sdk/src/entities/file-reader/from-tf.d.ts +1 -1
  166. package/dist-sdk/src/entities/file-reader/from-tf.js +31 -2
  167. package/dist-sdk/src/entities/file-reader/index.d.ts +3 -3
  168. package/dist-sdk/src/entities/file-reader/index.js +3 -3
  169. package/dist-sdk/src/entities/file-reader/module.js +6 -5
  170. package/dist-sdk/src/entities/file-reader/to-tf.d.ts +1 -1
  171. package/dist-sdk/src/entities/file-reader/to-tf.js +5 -2
  172. package/dist-sdk/src/entities/file-reader/types.d.ts +3 -4
  173. package/dist-sdk/src/entities/file-reader/types.js +4 -5
  174. package/dist-sdk/src/entities/org/category.js +4 -5
  175. package/dist-sdk/src/entities/org/group.js +4 -5
  176. package/dist-sdk/src/entities/org/index.d.ts +1 -0
  177. package/dist-sdk/src/entities/org/index.js +1 -0
  178. package/dist-sdk/src/entities/org/phone-provider.d.ts +4 -0
  179. package/dist-sdk/src/entities/org/phone-provider.js +33 -0
  180. package/dist-sdk/src/entities/org/role.d.ts +3 -3
  181. package/dist-sdk/src/entities/org/role.js +9 -6
  182. package/dist-sdk/src/entities/organization/build.d.ts +29 -0
  183. package/dist-sdk/src/entities/organization/build.js +24 -0
  184. package/dist-sdk/src/entities/organization/index.d.ts +2 -0
  185. package/dist-sdk/src/entities/organization/index.js +2 -0
  186. package/dist-sdk/src/entities/organization/module.d.ts +2 -0
  187. package/dist-sdk/src/entities/organization/module.js +18 -0
  188. package/dist-sdk/src/entities/organization/to-tf.d.ts +6 -0
  189. package/dist-sdk/src/entities/organization/to-tf.js +37 -0
  190. package/dist-sdk/src/entities/phone-service/build.d.ts +17 -0
  191. package/dist-sdk/src/entities/phone-service/build.js +31 -0
  192. package/dist-sdk/src/entities/phone-service/deserializer/print-phone-service.d.ts +4 -0
  193. package/dist-sdk/src/entities/phone-service/deserializer/print-phone-service.js +54 -0
  194. package/dist-sdk/src/entities/phone-service/from-tf.d.ts +25 -0
  195. package/dist-sdk/src/entities/phone-service/from-tf.js +75 -0
  196. package/dist-sdk/src/entities/phone-service/index.d.ts +2 -0
  197. package/dist-sdk/src/entities/phone-service/index.js +2 -0
  198. package/dist-sdk/src/entities/phone-service/module.d.ts +3 -0
  199. package/dist-sdk/src/entities/phone-service/module.js +55 -0
  200. package/dist-sdk/src/entities/phone-service/to-tf.d.ts +12 -0
  201. package/dist-sdk/src/entities/phone-service/to-tf.js +54 -0
  202. package/dist-sdk/src/entities/phone-service/types.d.ts +35 -0
  203. package/dist-sdk/src/entities/phone-service/types.js +22 -0
  204. package/dist-sdk/src/entities/record-create-form/from-tf.d.ts +11 -0
  205. package/dist-sdk/src/entities/record-create-form/from-tf.js +74 -0
  206. package/dist-sdk/src/entities/record-create-form/module.d.ts +11 -0
  207. package/dist-sdk/src/entities/record-create-form/module.js +24 -0
  208. package/dist-sdk/src/entities/record-create-form/to-tf.d.ts +33 -0
  209. package/dist-sdk/src/entities/record-create-form/to-tf.js +80 -0
  210. package/dist-sdk/src/entities/relationship/build.d.ts +16 -0
  211. package/dist-sdk/src/entities/relationship/build.js +1 -0
  212. package/dist-sdk/src/entities/relationship/from-tf.d.ts +12 -0
  213. package/dist-sdk/src/entities/relationship/from-tf.js +109 -0
  214. package/dist-sdk/src/entities/relationship/module.d.ts +3 -0
  215. package/dist-sdk/src/entities/relationship/module.js +16 -0
  216. package/dist-sdk/src/entities/relationship/to-tf.d.ts +31 -0
  217. package/dist-sdk/src/entities/relationship/to-tf.js +153 -0
  218. package/dist-sdk/src/entities/role/build.d.ts +65 -0
  219. package/dist-sdk/src/entities/role/build.js +33 -0
  220. package/dist-sdk/src/entities/role/from-tf.d.ts +13 -0
  221. package/dist-sdk/src/entities/role/from-tf.js +138 -0
  222. package/dist-sdk/src/entities/role/to-tf.d.ts +13 -0
  223. package/dist-sdk/src/entities/role/to-tf.js +69 -0
  224. package/dist-sdk/src/entities/search-table/build.d.ts +67 -28
  225. package/dist-sdk/src/entities/search-table/build.js +110 -56
  226. package/dist-sdk/src/entities/search-table/from-tf.d.ts +37 -0
  227. package/dist-sdk/src/entities/search-table/from-tf.js +113 -0
  228. package/dist-sdk/src/entities/search-table/index.d.ts +2 -2
  229. package/dist-sdk/src/entities/search-table/index.js +2 -2
  230. package/dist-sdk/src/entities/search-table/module.js +88 -10
  231. package/dist-sdk/src/entities/search-table/printer.d.ts +2 -0
  232. package/dist-sdk/src/entities/search-table/printer.js +52 -0
  233. package/dist-sdk/src/entities/search-table/to-tf.d.ts +14 -0
  234. package/dist-sdk/src/entities/search-table/to-tf.js +104 -0
  235. package/dist-sdk/src/entities/search-table/types.d.ts +8 -0
  236. package/dist-sdk/src/entities/search-table/types.js +21 -0
  237. package/dist-sdk/src/entities/service-account/build.d.ts +32 -0
  238. package/dist-sdk/src/entities/service-account/build.js +9 -0
  239. package/dist-sdk/src/entities/service-account/from-tf.d.ts +10 -0
  240. package/dist-sdk/src/entities/service-account/from-tf.js +109 -0
  241. package/dist-sdk/src/entities/service-account/module.d.ts +4 -0
  242. package/dist-sdk/src/entities/service-account/module.js +21 -0
  243. package/dist-sdk/src/entities/service-account/ref.d.ts +11 -0
  244. package/dist-sdk/src/entities/service-account/ref.js +5 -0
  245. package/dist-sdk/src/entities/service-account/to-tf.d.ts +11 -0
  246. package/dist-sdk/src/entities/service-account/to-tf.js +72 -0
  247. package/dist-sdk/src/entities/shared/connector-from-tf.d.ts +14 -0
  248. package/dist-sdk/src/entities/shared/connector-from-tf.js +14 -0
  249. package/dist-sdk/src/entities/shared/filters/ast.d.ts +21 -79
  250. package/dist-sdk/src/entities/shared/filters/ast.js +5 -2
  251. package/dist-sdk/src/entities/shared/filters/index.d.ts +94 -206
  252. package/dist-sdk/src/entities/shared/filters/index.js +189 -341
  253. package/dist-sdk/src/entities/shared/filters/print.d.ts +11 -0
  254. package/dist-sdk/src/entities/shared/filters/print.js +122 -0
  255. package/dist-sdk/src/entities/shared/filters/tf-codec.d.ts +170 -0
  256. package/dist-sdk/src/entities/shared/filters/tf-codec.js +527 -0
  257. package/dist-sdk/src/entities/shared/filters/types.d.ts +66 -69
  258. package/dist-sdk/src/entities/shared/filters/types.js +2 -3
  259. package/dist-sdk/src/entities/skill/build.d.ts +2 -2
  260. package/dist-sdk/src/entities/skill/build.js +4 -3
  261. package/dist-sdk/src/entities/skill/deserializer/print-skill-v2.d.ts +10 -0
  262. package/dist-sdk/src/entities/skill/deserializer/print-skill-v2.js +74 -32
  263. package/dist-sdk/src/entities/skill/index.d.ts +2 -1
  264. package/dist-sdk/src/entities/skill/index.js +2 -1
  265. package/dist-sdk/src/entities/skill/module.js +6 -0
  266. package/dist-sdk/src/entities/skill/to-tf.d.ts +5 -1
  267. package/dist-sdk/src/entities/skill/to-tf.js +18 -0
  268. package/dist-sdk/src/entities/skill/tools.d.ts +46 -31
  269. package/dist-sdk/src/entities/skill/tools.js +33 -20
  270. package/dist-sdk/src/entities/skill-tool/from-tf.d.ts +4 -1
  271. package/dist-sdk/src/entities/skill-tool/from-tf.js +76 -8
  272. package/dist-sdk/src/entities/skill-tool/module.js +9 -0
  273. package/dist-sdk/src/entities/skill-tool/to-tf.d.ts +6 -1
  274. package/dist-sdk/src/entities/skill-tool/to-tf.js +94 -42
  275. package/dist-sdk/src/entities/skill-tool/types.js +18 -1
  276. package/dist-sdk/src/entities/table/build.d.ts +64 -23
  277. package/dist-sdk/src/entities/table/build.js +33 -18
  278. package/dist-sdk/src/entities/table/catalog-render.js +6 -0
  279. package/dist-sdk/src/entities/table/deserializer/normalize.d.ts +99 -0
  280. package/dist-sdk/src/entities/table/deserializer/normalize.js +192 -0
  281. package/dist-sdk/src/entities/table/fields/types.d.ts +86 -0
  282. package/dist-sdk/src/entities/table/fields/types.js +12 -0
  283. package/dist-sdk/src/entities/table/fields.d.ts +107 -47
  284. package/dist-sdk/src/entities/table/fields.js +76 -55
  285. package/dist-sdk/src/entities/table/from-tf.d.ts +4 -0
  286. package/dist-sdk/src/entities/table/from-tf.js +261 -0
  287. package/dist-sdk/src/entities/table/index.d.ts +7 -5
  288. package/dist-sdk/src/entities/table/index.js +7 -7
  289. package/dist-sdk/src/entities/table/joins.d.ts +22 -9
  290. package/dist-sdk/src/entities/table/joins.js +8 -16
  291. package/dist-sdk/src/entities/table/module.d.ts +2 -1
  292. package/dist-sdk/src/entities/table/module.js +13 -6
  293. package/dist-sdk/src/entities/table/to-tf.d.ts +10 -0
  294. package/dist-sdk/src/entities/table/to-tf.js +230 -0
  295. package/dist-sdk/src/entities/task/build.d.ts +43 -0
  296. package/dist-sdk/src/entities/task/build.js +17 -0
  297. package/dist-sdk/src/entities/task/from-tf.d.ts +28 -0
  298. package/dist-sdk/src/entities/task/from-tf.js +38 -0
  299. package/dist-sdk/src/entities/task/index.d.ts +1 -0
  300. package/dist-sdk/src/entities/task/index.js +1 -0
  301. package/dist-sdk/src/entities/task/module.d.ts +3 -0
  302. package/dist-sdk/src/entities/task/module.js +12 -0
  303. package/dist-sdk/src/entities/task/to-tf.d.ts +9 -0
  304. package/dist-sdk/src/entities/task/to-tf.js +49 -0
  305. package/dist-sdk/src/entities/view/from-tf.d.ts +7 -2
  306. package/dist-sdk/src/entities/view/from-tf.js +209 -25
  307. package/dist-sdk/src/entities/view/module.js +5 -1
  308. package/dist-sdk/src/entities/view/to-tf.d.ts +49 -7
  309. package/dist-sdk/src/entities/view/to-tf.js +155 -18
  310. package/dist-sdk/src/entities/view/types.d.ts +8 -0
  311. package/dist-sdk/src/entities/view/types.js +43 -0
  312. package/dist-sdk/src/entities/visual-flow/build.d.ts +87 -0
  313. package/dist-sdk/src/entities/visual-flow/build.js +72 -0
  314. package/dist-sdk/src/entities/visual-flow/from-tf.d.ts +49 -0
  315. package/dist-sdk/src/entities/visual-flow/from-tf.js +124 -0
  316. package/dist-sdk/src/entities/visual-flow/index.d.ts +1 -0
  317. package/dist-sdk/src/entities/visual-flow/index.js +1 -0
  318. package/dist-sdk/src/entities/visual-flow/module.d.ts +3 -0
  319. package/dist-sdk/src/entities/visual-flow/module.js +41 -0
  320. package/dist-sdk/src/entities/visual-flow/printer.d.ts +8 -0
  321. package/dist-sdk/src/entities/visual-flow/printer.js +92 -0
  322. package/dist-sdk/src/entities/visual-flow/to-tf.d.ts +14 -0
  323. package/dist-sdk/src/entities/visual-flow/to-tf.js +101 -0
  324. package/dist-sdk/src/entities/widget/build.d.ts +55 -0
  325. package/dist-sdk/src/entities/widget/build.js +1 -0
  326. package/dist-sdk/src/entities/widget/from-tf.d.ts +11 -0
  327. package/dist-sdk/src/entities/widget/from-tf.js +209 -0
  328. package/dist-sdk/src/entities/widget/module.d.ts +3 -0
  329. package/dist-sdk/src/entities/widget/module.js +16 -0
  330. package/dist-sdk/src/entities/widget/to-tf.d.ts +44 -0
  331. package/dist-sdk/src/entities/widget/to-tf.js +204 -0
  332. package/dist-sdk/src/graph/deferred-catalog-render.d.ts +1 -1
  333. package/dist-sdk/src/graph/deferred-catalog-render.js +1 -1
  334. package/dist-sdk/src/graph/index.d.ts +7 -0
  335. package/dist-sdk/src/graph/index.js +4 -18
  336. package/dist-sdk/src/graph/modules.js +30 -1
  337. package/dist-sdk/src/graph/types.d.ts +55 -7
  338. package/dist-sdk/src/internal/sdk-package.d.ts +1 -1
  339. package/dist-sdk/src/internal/sdk-package.js +4 -2
  340. package/package.json +30 -15
  341. package/dist-sdk/src/entities/access-policy/filter.d.ts +0 -61
  342. package/dist-sdk/src/entities/access-policy/filter.js +0 -83
  343. package/dist-sdk/src/entities/approval-chain/steps.d.ts +0 -24
  344. package/dist-sdk/src/entities/approval-chain/steps.js +0 -20
  345. package/dist-sdk/src/entities/flow/activities/agent.d.ts +0 -15
  346. package/dist-sdk/src/entities/flow/activities/agent.js +0 -29
  347. package/dist-sdk/src/entities/flow/activities/approval.d.ts +0 -9
  348. package/dist-sdk/src/entities/flow/activities/approval.js +0 -18
  349. package/dist-sdk/src/entities/flow/activities/automation.d.ts +0 -12
  350. package/dist-sdk/src/entities/flow/activities/automation.js +0 -22
  351. package/dist-sdk/src/entities/flow/activities/ctx.d.ts +0 -34
  352. package/dist-sdk/src/entities/flow/activities/ctx.js +0 -38
  353. package/dist-sdk/src/entities/flow/activities/form.d.ts +0 -22
  354. package/dist-sdk/src/entities/flow/activities/form.js +0 -36
  355. package/dist-sdk/src/entities/flow/activities/index.d.ts +0 -14
  356. package/dist-sdk/src/entities/flow/activities/index.js +0 -13
  357. package/dist-sdk/src/entities/flow/activities/input-refs.d.ts +0 -39
  358. package/dist-sdk/src/entities/flow/activities/input-refs.js +0 -19
  359. package/dist-sdk/src/entities/flow/activities/prompt-template.d.ts +0 -13
  360. package/dist-sdk/src/entities/flow/activities/prompt-template.js +0 -34
  361. package/dist-sdk/src/entities/flow/activities/types.d.ts +0 -33
  362. package/dist-sdk/src/entities/flow/build.d.ts +0 -38
  363. package/dist-sdk/src/entities/flow/build.js +0 -115
  364. package/dist-sdk/src/entities/flow/index.d.ts +0 -8
  365. package/dist-sdk/src/entities/flow/index.js +0 -7
  366. package/dist-sdk/src/entities/flow/serialize.d.ts +0 -51
  367. package/dist-sdk/src/entities/flow/serialize.js +0 -94
  368. package/dist-sdk/src/entities/flow/util.d.ts +0 -27
  369. package/dist-sdk/src/entities/flow/util.js +0 -38
  370. package/dist-sdk/src/entities/table/filter.d.ts +0 -41
  371. package/dist-sdk/src/entities/table/filter.js +0 -89
  372. /package/dist-sdk/src/entities/{flow/activities/types.js → dashboard/build.js} +0 -0
@@ -10,14 +10,29 @@
10
10
  * object. Optional `startMessage` / `runAs` are emitted only when supplied,
11
11
  * matching the v1 serializer's field-by-field discipline.
12
12
  */
13
- import type { AutomationCatalogRef, AgentRef, AspectRef, AutomationRef, FieldRef, OutputPropertyRef, TriggerParameterRef } from "../../catalog/index.js";
14
- /** A handle-form agent tool: a Hydra `AgentToolCreateInput` with ref tokens. */
15
- export type AgentTool = Record<string, unknown>;
16
- /** Opaque run-as config (Hydra's `AgentConversationRunAsInput`). */
17
- export type AgentToolRunAs = Record<string, unknown>;
13
+ import type { AutomationCatalogRef, AgentRef, AppCatalogRef, AutomationRef, ElementCatalogRef, FieldRef, OutputPropertyRef, SearchTableRef, TriggerParameterRef } from "../../catalog/index.js";
14
+ import type { UnsafePlatformId } from "../../core/platform-id.js";
15
+ import type { AgentToolRunAs } from "./run-as.js";
16
+ import type { Filter } from "../automation/filter.js";
17
+ export type { AgentToolRunAs, ServiceAccountRef } from "./run-as.js";
18
+ declare const agentToolBrand: unique symbol;
19
+ /** A closed factory result; arbitrary records cannot be added to an agent's tool list. */
20
+ export type AgentTool = Record<string, unknown> & {
21
+ readonly [agentToolBrand]: "AgentTool";
22
+ };
18
23
  /** A field exposed to a search tool. */
19
- export interface AgentSearchField {
20
- readonly field: FieldRef;
24
+ type ToolTarget = AppCatalogRef | ElementCatalogRef;
25
+ type TargetOption<Target extends ToolTarget> = Target extends {
26
+ readonly __kind: "app";
27
+ } ? {
28
+ readonly app: Target;
29
+ readonly element?: never;
30
+ } : {
31
+ readonly app?: never;
32
+ readonly element: Target;
33
+ };
34
+ export interface AgentSearchField<Target extends ToolTarget = ToolTarget> {
35
+ readonly field: FieldRef<Target["refName"]>;
21
36
  readonly name?: string;
22
37
  /** Required by the provider on every tool field. */
23
38
  readonly description: string;
@@ -32,11 +47,11 @@ export interface AgentSearchField {
32
47
  * `edk pull app` round-tripping an existing tool.
33
48
  */
34
49
  export interface AgentSearchRawIdField {
35
- readonly fieldId: string;
50
+ readonly fieldId: UnsafePlatformId;
36
51
  readonly name?: string;
37
52
  readonly description: string;
38
53
  }
39
- export type AgentSearchFieldInput = AgentSearchField | AgentSearchRawIdField;
54
+ export type AgentSearchFieldInput<Target extends ToolTarget = ToolTarget> = AgentSearchField<Target> | AgentSearchRawIdField;
40
55
  /**
41
56
  * A field exposed to a searchTable tool's newer `fields` wire shape
42
57
  * (field_id/name/description). Unlike every other tool's `fields`,
@@ -47,7 +62,7 @@ export type AgentSearchFieldInput = AgentSearchField | AgentSearchRawIdField;
47
62
  * `TableRecordsSearchOptions.table`).
48
63
  */
49
64
  export interface AgentSearchTableField {
50
- readonly fieldId: string;
65
+ readonly fieldId: UnsafePlatformId;
51
66
  readonly name?: string;
52
67
  readonly description?: string;
53
68
  }
@@ -60,13 +75,13 @@ export interface AgentSearchTableField {
60
75
  * comment). Same raw field_id convention as `AgentSearchTableField`.
61
76
  */
62
77
  export interface AgentSearchReturnField {
63
- readonly fieldId: string;
78
+ readonly fieldId: UnsafePlatformId;
64
79
  readonly name?: string;
65
80
  readonly displayName?: string;
66
81
  }
67
82
  /** A field the agent can populate/modify via a create/update record tool. */
68
- export interface AgentRecordField {
69
- readonly field: FieldRef;
83
+ export interface AgentRecordField<Target extends ToolTarget = ToolTarget> {
84
+ readonly field: FieldRef<Target["refName"]>;
70
85
  readonly name?: string;
71
86
  /** Required by the provider on every tool field. */
72
87
  readonly description: string;
@@ -79,13 +94,13 @@ export interface AgentRecordField {
79
94
  * (board issue #169), for createRecord/updateRecord tools instead of search.
80
95
  */
81
96
  export interface AgentRecordRawIdField {
82
- readonly fieldId: string;
97
+ readonly fieldId: UnsafePlatformId;
83
98
  readonly name?: string;
84
99
  /** Required by the provider on every tool field. */
85
100
  readonly description: string;
86
101
  readonly required?: boolean;
87
102
  }
88
- export type AgentRecordFieldInput = AgentRecordField | AgentRecordRawIdField;
103
+ export type AgentRecordFieldInput<Target extends ToolTarget = ToolTarget> = AgentRecordField<Target> | AgentRecordRawIdField;
89
104
  /** Input-parameter mapping for an execute-workflow tool. */
90
105
  export interface AgentExecuteWorkflowInput {
91
106
  readonly name: string;
@@ -111,17 +126,16 @@ interface CommonToolOptions {
111
126
  readonly startMessage?: string;
112
127
  readonly runAs?: AgentToolRunAs;
113
128
  }
114
- export interface SearchAspectToolV2 extends CommonToolOptions {
115
- readonly aspect: AspectRef;
129
+ export type SearchRecordsToolOptions<Target extends ToolTarget = ToolTarget> = CommonToolOptions & TargetOption<Target> & {
116
130
  readonly queryDescription: string;
117
- readonly fields?: readonly AgentSearchFieldInput[];
131
+ readonly fields?: readonly AgentSearchFieldInput<Target>[];
118
132
  /** Pre-built wire `Filter` (may embed `FieldRef` tokens — resolved at deploy). */
119
- readonly filter?: Record<string, unknown>;
133
+ readonly filter?: Filter;
120
134
  /** Pre-built wire `Sort` (`{ orders: [{ field, direction }] }`). */
121
135
  readonly sort?: Record<string, unknown>;
122
136
  readonly limit?: number;
123
- }
124
- export declare function agentSearchAspect(opts: SearchAspectToolV2): AgentTool;
137
+ };
138
+ export declare function agentSearchRecords<Target extends ToolTarget>(opts: SearchRecordsToolOptions<Target>): AgentTool;
125
139
  /**
126
140
  * Unlike the other search tools, a search table has no import/reference
127
141
  * mechanism yet (mirrors `TableRecordsSearchOptions.table`'s same raw-id
@@ -135,26 +149,24 @@ export declare function agentSearchAspect(opts: SearchAspectToolV2): AgentTool;
135
149
  * the same shape searchAspect already uses (`fields`, field_id/name/
136
150
  * description) — both are live on the platform today, so both round-trip.
137
151
  */
138
- export interface SearchTableToolV2 extends CommonToolOptions {
139
- readonly aspect?: AspectRef;
140
- readonly table: string;
152
+ /** A search-table tool targets the ELEMENT that owns the search table — never an app. */
153
+ export type SearchTableToolV2<Target extends ElementCatalogRef = ElementCatalogRef> = CommonToolOptions & TargetOption<Target> & {
154
+ readonly table: SearchTableRef;
141
155
  readonly queryDescription: string;
142
156
  /** searchTable's newer field shape — mutually exclusive with `returnFields`. */
143
157
  readonly fields?: readonly AgentSearchTableField[];
144
158
  /** searchTable's legacy field shape — mutually exclusive with `fields`. */
145
159
  readonly returnFields?: readonly AgentSearchReturnField[];
146
- readonly filter?: Record<string, unknown>;
160
+ readonly filter?: Filter;
147
161
  readonly limit?: number;
148
- }
149
- export declare function agentSearchTable(opts: SearchTableToolV2): AgentTool;
150
- export interface CreateRecordToolV2 extends CommonToolOptions {
151
- readonly aspect: AspectRef;
152
- readonly fields?: readonly AgentRecordFieldInput[];
153
- }
154
- export declare function agentCreateRecord(opts: CreateRecordToolV2): AgentTool;
155
- export interface UpdateRecordToolV2 extends CommonToolOptions {
156
- readonly aspect: AspectRef;
157
- readonly fields?: readonly AgentRecordFieldInput[];
162
+ };
163
+ export declare function agentSearchTable<Target extends ElementCatalogRef = ElementCatalogRef>(opts: SearchTableToolV2<Target>): AgentTool;
164
+ export type CreateRecordToolV2<Target extends ToolTarget = ToolTarget> = CommonToolOptions & TargetOption<Target> & {
165
+ readonly fields?: readonly AgentRecordFieldInput<Target>[];
166
+ };
167
+ export declare function agentCreateRecord<Target extends ToolTarget>(opts: CreateRecordToolV2<Target>): AgentTool;
168
+ export type UpdateRecordToolV2<Target extends ToolTarget = ToolTarget> = CommonToolOptions & TargetOption<Target> & {
169
+ readonly fields?: readonly AgentRecordFieldInput<Target>[];
158
170
  /**
159
171
  * How the agent should identify which record to update — the provider
160
172
  * requires this (there's no way to infer it) and rejects an empty value
@@ -162,13 +174,19 @@ export interface UpdateRecordToolV2 extends CommonToolOptions {
162
174
  * here instead. Example: "Identify the ticket by its ID or subject line."
163
175
  */
164
176
  readonly handleDescription: string;
165
- }
166
- export declare function agentUpdateRecord(opts: UpdateRecordToolV2): AgentTool;
167
- export interface RelateRecordToolV2 extends CommonToolOptions {
168
- readonly aspect: AspectRef;
169
- readonly relatedAspect: AspectRef;
170
- }
171
- export declare function agentRelateRecord(opts: RelateRecordToolV2): AgentTool;
177
+ };
178
+ export declare function agentUpdateRecord<Target extends ToolTarget>(opts: UpdateRecordToolV2<Target>): AgentTool;
179
+ type RelatedTargetOption<Target extends ToolTarget> = Target extends {
180
+ readonly __kind: "app";
181
+ } ? {
182
+ readonly relatedApp: Target;
183
+ readonly relatedElement?: never;
184
+ } : {
185
+ readonly relatedApp?: never;
186
+ readonly relatedElement: Target;
187
+ };
188
+ export type RelateRecordToolV2<Target extends ToolTarget = ToolTarget, RelatedTarget extends ToolTarget = ToolTarget> = CommonToolOptions & TargetOption<Target> & RelatedTargetOption<RelatedTarget>;
189
+ export declare function agentRelateRecord<Target extends ToolTarget, RelatedTarget extends ToolTarget>(opts: RelateRecordToolV2<Target, RelatedTarget>): AgentTool;
172
190
  export interface ExecuteWorkflowToolV2 extends CommonToolOptions {
173
191
  readonly automation: AutomationRef;
174
192
  readonly inputs?: readonly AgentExecuteWorkflowInput[];
@@ -276,9 +294,3 @@ export interface McpToolV2 extends CommonToolOptions {
276
294
  readonly headers?: readonly AgentMcpHeader[];
277
295
  }
278
296
  export declare function agentMcp(opts: McpToolV2): AgentTool;
279
- export interface SelectBotRouteToolV2 extends CommonToolOptions {
280
- /** Bot route target id. Bots aren't modeled in the catalog yet — raw id. */
281
- readonly botId: string;
282
- }
283
- export declare function agentSelectBotRoute(opts: SelectBotRouteToolV2): AgentTool;
284
- export {};
@@ -1,4 +1,14 @@
1
1
  import { isValidToolName } from "../agent-tool/types.js";
2
+ function targetOf(opts) {
3
+ return ("app" in opts && opts.app !== undefined ? opts.app : opts.element);
4
+ }
5
+ function serializeRunAs(runAs) {
6
+ if ("currentUser" in runAs)
7
+ return { currentUser: true };
8
+ if ("publisher" in runAs)
9
+ return { publisher: true };
10
+ return { serviceAccount: runAs.serviceAccount };
11
+ }
2
12
  /**
3
13
  * Hydra hard-codes the execute-workflow timeout to PT10M and ignores any other
4
14
  * value; mirror v1 so pull→edit→redeploy round-trips stay stable.
@@ -16,14 +26,17 @@ function common(opts) {
16
26
  name: opts.name,
17
27
  description: opts.description,
18
28
  ...(opts.startMessage !== undefined ? { startMessage: opts.startMessage } : {}),
19
- ...(opts.runAs !== undefined ? { runAs: opts.runAs } : {}),
29
+ ...(opts.runAs !== undefined ? { runAs: serializeRunAs(opts.runAs) } : {}),
20
30
  };
21
31
  }
32
+ function tool(value) {
33
+ return value;
34
+ }
22
35
  function searchFieldToken(f) {
23
36
  if ("fieldId" in f) {
24
37
  // Raw platform id fallback — see AgentSearchRawIdField's comment.
25
38
  return {
26
- fieldId: f.fieldId,
39
+ fieldId: f.fieldId.value,
27
40
  ...(f.name !== undefined ? { name: f.name } : {}),
28
41
  description: f.description,
29
42
  };
@@ -40,14 +53,14 @@ function searchFieldToken(f) {
40
53
  }
41
54
  function searchTableFieldToken(f) {
42
55
  return {
43
- fieldId: f.fieldId, // raw platform id - not a catalog token, see AgentSearchTableField's comment
56
+ fieldId: f.fieldId.value, // explicit raw platform id - see AgentSearchTableField's comment
44
57
  ...(f.name !== undefined ? { name: f.name } : {}),
45
58
  ...(f.description !== undefined ? { description: f.description } : {}),
46
59
  };
47
60
  }
48
61
  function returnFieldToken(f) {
49
62
  return {
50
- fieldId: f.fieldId, // raw platform id - not a catalog token, see AgentSearchReturnField's comment
63
+ fieldId: f.fieldId.value, // explicit raw platform id - see AgentSearchReturnField's comment
51
64
  ...(f.name !== undefined ? { name: f.name } : {}),
52
65
  ...(f.displayName !== undefined ? { displayName: f.displayName } : {}),
53
66
  };
@@ -56,7 +69,7 @@ function recordFieldToken(f) {
56
69
  if ("fieldId" in f) {
57
70
  // Raw platform id fallback — see AgentRecordRawIdField's comment.
58
71
  return {
59
- fieldId: f.fieldId,
72
+ fieldId: f.fieldId.value,
60
73
  ...(f.name !== undefined ? { name: f.name } : {}),
61
74
  description: f.description,
62
75
  ...(f.required !== undefined ? { required: f.required } : {}),
@@ -74,24 +87,24 @@ function recordFieldToken(f) {
74
87
  ...(f.defaultValue !== undefined ? { defaultValue: f.defaultValue } : {}),
75
88
  };
76
89
  }
77
- export function agentSearchAspect(opts) {
78
- return {
90
+ export function agentSearchRecords(opts) {
91
+ return tool({
79
92
  searchAspect: {
80
93
  ...common(opts),
81
- aspectId: opts.aspect,
94
+ aspectId: targetOf(opts),
82
95
  queryDescription: opts.queryDescription,
83
96
  ...(opts.fields !== undefined ? { fields: opts.fields.map(searchFieldToken) } : {}),
84
97
  ...(opts.filter !== undefined ? { filter: opts.filter } : {}),
85
98
  ...(opts.sort !== undefined ? { sort: opts.sort } : {}),
86
99
  ...(opts.limit !== undefined ? { limit: opts.limit } : {}),
87
100
  },
88
- };
101
+ });
89
102
  }
90
103
  export function agentSearchTable(opts) {
91
- return {
104
+ return tool({
92
105
  searchTable: {
93
106
  ...common(opts),
94
- ...(opts.aspect !== undefined ? { aspectId: opts.aspect } : {}),
107
+ aspectId: targetOf(opts),
95
108
  searchTableId: opts.table,
96
109
  queryDescription: opts.queryDescription,
97
110
  // Distinct wire key from every other tool's `fields` (which carries
@@ -102,38 +115,39 @@ export function agentSearchTable(opts) {
102
115
  ...(opts.filter !== undefined ? { filter: opts.filter } : {}),
103
116
  ...(opts.limit !== undefined ? { limit: opts.limit } : {}),
104
117
  },
105
- };
118
+ });
106
119
  }
107
120
  export function agentCreateRecord(opts) {
108
- return {
121
+ return tool({
109
122
  createRecord: {
110
123
  ...common(opts),
111
- aspectId: opts.aspect,
124
+ aspectId: targetOf(opts),
112
125
  ...(opts.fields !== undefined ? { fields: opts.fields.map(recordFieldToken) } : {}),
113
126
  },
114
- };
127
+ });
115
128
  }
116
129
  export function agentUpdateRecord(opts) {
117
- return {
130
+ return tool({
118
131
  updateRecord: {
119
132
  ...common(opts),
120
- aspectId: opts.aspect,
133
+ aspectId: targetOf(opts),
121
134
  ...(opts.fields !== undefined ? { fields: opts.fields.map(recordFieldToken) } : {}),
122
135
  handleDescription: opts.handleDescription,
123
136
  },
124
- };
137
+ });
125
138
  }
126
139
  export function agentRelateRecord(opts) {
127
- return {
140
+ const relatedTarget = "relatedApp" in opts && opts.relatedApp !== undefined ? opts.relatedApp : opts.relatedElement;
141
+ return tool({
128
142
  relateRecord: {
129
143
  ...common(opts),
130
- aspectId: opts.aspect,
131
- relatedAspectId: opts.relatedAspect,
144
+ aspectId: targetOf(opts),
145
+ relatedAspectId: relatedTarget,
132
146
  },
133
- };
147
+ });
134
148
  }
135
149
  export function agentExecuteWorkflow(opts) {
136
- return {
150
+ return tool({
137
151
  executeWorkflow: {
138
152
  ...common(opts),
139
153
  automationId: opts.automation,
@@ -162,7 +176,7 @@ export function agentExecuteWorkflow(opts) {
162
176
  }
163
177
  : {}),
164
178
  },
165
- };
179
+ });
166
180
  }
167
181
  /**
168
182
  * Run Automation tool (the product-language name; the wire kind is
@@ -197,7 +211,7 @@ export function agentRunAutomation(opts) {
197
211
  workflowPropertyName: prop,
198
212
  workflowOutputPropertyId: { __kind: "outputProperty", refName: prop, name: prop, parent: opts.automation.refName },
199
213
  }));
200
- return {
214
+ return tool({
201
215
  executeWorkflow: {
202
216
  ...common(opts),
203
217
  automationId: opts.automation,
@@ -205,19 +219,19 @@ export function agentRunAutomation(opts) {
205
219
  ...(inputs.length > 0 ? { inputs } : {}),
206
220
  ...(outputs.length > 0 ? { outputs } : {}),
207
221
  },
208
- };
222
+ });
209
223
  }
210
224
  export function agentRunAgent(opts) {
211
- return {
225
+ return tool({
212
226
  runAgent: {
213
227
  ...common(opts),
214
228
  targetAgentId: opts.agent,
215
229
  workerTaskPrompt: opts.workerTaskPrompt,
216
230
  },
217
- };
231
+ });
218
232
  }
219
233
  export function agentMcp(opts) {
220
- return {
234
+ return tool({
221
235
  mcp: {
222
236
  ...common(opts),
223
237
  serverUrl: opts.serverUrl,
@@ -226,13 +240,5 @@ export function agentMcp(opts) {
226
240
  ? { headers: opts.headers.map((h) => ({ key: h.key, value: h.value })) }
227
241
  : {}),
228
242
  },
229
- };
230
- }
231
- export function agentSelectBotRoute(opts) {
232
- return {
233
- selectBotRoute: {
234
- ...common(opts),
235
- botId: opts.botId,
236
- },
237
- };
243
+ });
238
244
  }
@@ -16,7 +16,7 @@ function optionalStringArray(attrs, key, where, ctx) {
16
16
  ctx.diagnostics.push(`${where}: expected a list of strings "${key}", got ${JSON.stringify(v)}; dropped`);
17
17
  return undefined;
18
18
  }
19
- return v;
19
+ return [...v].sort();
20
20
  }
21
21
  /** One a2a-skill block → its normalized shape; undefined = skipped with a diagnostic (wrong owner, missing required attr). */
22
22
  export function a2aSkillFromTf(block, owner, ctx) {
@@ -35,13 +35,13 @@ export function a2aSkillToTf(entry, ctx) {
35
35
  description: entry.description,
36
36
  };
37
37
  if (entry.tags !== undefined && entry.tags.length > 0)
38
- attrs["tags"] = entry.tags;
38
+ attrs["tags"] = [...entry.tags].sort();
39
39
  if (entry.examples !== undefined && entry.examples.length > 0)
40
- attrs["examples"] = entry.examples;
40
+ attrs["examples"] = [...entry.examples].sort();
41
41
  if (entry.inputModes !== undefined && entry.inputModes.length > 0)
42
- attrs["input_modes"] = entry.inputModes;
42
+ attrs["input_modes"] = [...entry.inputModes].sort();
43
43
  if (entry.outputModes !== undefined && entry.outputModes.length > 0)
44
- attrs["output_modes"] = entry.outputModes;
44
+ attrs["output_modes"] = [...entry.outputModes].sort();
45
45
  const block = { kind: "resource", type: AGENT_A2A_SKILL_RESOURCE_TYPE, label: tfLabel, attrs };
46
46
  return { block, address: `${AGENT_A2A_SKILL_RESOURCE_TYPE}.${tfLabel}` };
47
47
  }
@@ -64,8 +64,12 @@ export interface NormalizedExecuteWorkflowOutput {
64
64
  readonly name?: string;
65
65
  readonly description?: string;
66
66
  }
67
+ export interface NormalizedMcpHeader {
68
+ readonly key: string;
69
+ readonly value: string;
70
+ }
67
71
  export interface NormalizedAgentTool {
68
- readonly typeKey: "createRecord" | "searchAspect" | "updateRecord" | "executeWorkflow" | "searchTable";
72
+ readonly typeKey: "createRecord" | "searchAspect" | "updateRecord" | "executeWorkflow" | "searchTable" | "relateRecord" | "runAgent" | "mcp";
69
73
  readonly name: string;
70
74
  readonly description: string;
71
75
  readonly startMessage?: string;
@@ -85,13 +89,18 @@ export interface NormalizedAgentTool {
85
89
  readonly automationKey?: string;
86
90
  readonly inputs?: readonly NormalizedExecuteWorkflowInput[];
87
91
  readonly outputs?: readonly NormalizedExecuteWorkflowOutput[];
88
- /**
89
- * searchTable's search_table_id. Always a raw platform id on the wire —
90
- * confirmed live, ei's own export never resolves it to a reference (it
91
- * writes a bare id with a "# TODO: Replace with data source or variable"
92
- * comment), so there is no data-source lookup to reconstruct here.
93
- */
94
- readonly searchTableId?: string;
92
+ /** Search-table bag key when the table is a pulled resource. */
93
+ readonly searchTableKey?: string;
94
+ /** Stable lookup name when the table is resolved through a data source. */
95
+ readonly searchTableName?: string;
96
+ /** relateRecord: the aspect whose record is related to the primary target. */
97
+ readonly relatedTarget?: NormalizedToolTarget;
98
+ /** runAgent: target agent bag key within the owning app. */
99
+ readonly targetAgentKey?: string;
100
+ readonly workerTaskPrompt?: string;
101
+ readonly serverUrl?: string;
102
+ readonly mcpToolName?: string;
103
+ readonly headers?: readonly NormalizedMcpHeader[];
95
104
  }
96
105
  export interface ToolOwner {
97
106
  /** The owning app's resource type + tfLabel. */