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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (360) hide show
  1. package/README.md +408 -3
  2. package/dist-sdk/elementum-entity-client/clients/agents/models/agent-tool.d.ts +188 -0
  3. package/dist-sdk/elementum-entity-client/clients/agents/models/agent-tool.js +20 -0
  4. package/dist-sdk/elementum-entity-client/clients/agents/models/agent.d.ts +245 -0
  5. package/dist-sdk/elementum-entity-client/clients/agents/models/agent.js +30 -0
  6. package/dist-sdk/elementum-entity-client/clients/ai-provider-connectors/models/ai-provider-connector.d.ts +18 -0
  7. package/dist-sdk/elementum-entity-client/clients/ai-provider-connectors/models/ai-provider-connector.js +8 -0
  8. package/dist-sdk/elementum-entity-client/clients/aspects/models/aspect.d.ts +718 -0
  9. package/dist-sdk/elementum-entity-client/clients/aspects/models/aspect.js +52 -0
  10. package/dist-sdk/elementum-entity-client/clients/aspects/models/field-base.d.ts +23 -0
  11. package/dist-sdk/elementum-entity-client/clients/aspects/models/field-base.js +1 -0
  12. package/dist-sdk/elementum-entity-client/clients/aspects/models/field-types.d.ts +148 -0
  13. package/dist-sdk/elementum-entity-client/clients/aspects/models/field-types.js +12 -0
  14. package/dist-sdk/elementum-entity-client/clients/aspects/models/format.d.ts +63 -0
  15. package/dist-sdk/elementum-entity-client/clients/aspects/models/format.js +17 -0
  16. package/dist-sdk/elementum-entity-client/clients/aspects/models/index.d.ts +39 -0
  17. package/dist-sdk/elementum-entity-client/clients/aspects/models/index.js +35 -0
  18. package/dist-sdk/elementum-entity-client/clients/aspects/models/picklist-config.d.ts +116 -0
  19. package/dist-sdk/elementum-entity-client/clients/aspects/models/picklist-config.js +11 -0
  20. package/dist-sdk/elementum-entity-client/clients/automation/models/automation.d.ts +178 -0
  21. package/dist-sdk/elementum-entity-client/clients/automation/models/automation.js +18 -0
  22. package/dist-sdk/elementum-entity-client/clients/document-models/models/document-model.d.ts +200 -0
  23. package/dist-sdk/elementum-entity-client/clients/document-models/models/document-model.js +1 -0
  24. package/dist-sdk/elementum-entity-client/clients/search-tables/models/index.d.ts +1 -0
  25. package/dist-sdk/elementum-entity-client/clients/search-tables/models/index.js +1 -0
  26. package/dist-sdk/elementum-entity-client/clients/search-tables/models/search-table-wire.d.ts +141 -0
  27. package/dist-sdk/elementum-entity-client/clients/search-tables/models/search-table-wire.js +22 -0
  28. package/dist-sdk/elementum-entity-client/clients/skills/models/skill-tool.d.ts +123 -0
  29. package/dist-sdk/elementum-entity-client/clients/skills/models/skill-tool.js +14 -0
  30. package/dist-sdk/elementum-entity-client/clients/skills/models/skill.d.ts +78 -0
  31. package/dist-sdk/elementum-entity-client/clients/skills/models/skill.js +23 -0
  32. package/dist-sdk/elementum-entity-client/clients/tables/models/index.d.ts +1 -0
  33. package/dist-sdk/elementum-entity-client/clients/tables/models/index.js +1 -0
  34. package/dist-sdk/elementum-entity-client/clients/tables/models/table-wire.d.ts +265 -0
  35. package/dist-sdk/elementum-entity-client/clients/tables/models/table-wire.js +15 -0
  36. package/dist-sdk/elementum-entity-client/errors.d.ts +90 -0
  37. package/dist-sdk/elementum-entity-client/errors.js +111 -0
  38. package/dist-sdk/elementum-entity-client/models/connection.d.ts +30 -0
  39. package/dist-sdk/elementum-entity-client/models/connection.js +16 -0
  40. package/dist-sdk/elementum-entity-client/types.d.ts +71 -0
  41. package/dist-sdk/elementum-entity-client/types.js +1 -0
  42. package/dist-sdk/fs/entity.d.ts +104 -0
  43. package/dist-sdk/fs/entity.js +52 -0
  44. package/dist-sdk/pull/util.d.ts +130 -0
  45. package/dist-sdk/pull/util.js +204 -0
  46. package/dist-sdk/src/catalog/factories.d.ts +189 -0
  47. package/dist-sdk/src/catalog/factories.js +202 -0
  48. package/dist-sdk/src/catalog/from-authoring.d.ts +103 -0
  49. package/dist-sdk/src/catalog/from-authoring.js +462 -0
  50. package/dist-sdk/src/catalog/index.d.ts +11 -0
  51. package/dist-sdk/src/catalog/index.js +11 -0
  52. package/dist-sdk/src/catalog/org.d.ts +11 -0
  53. package/dist-sdk/src/catalog/org.js +211 -0
  54. package/dist-sdk/src/catalog/render-helpers.d.ts +35 -0
  55. package/dist-sdk/src/catalog/render-helpers.js +82 -0
  56. package/dist-sdk/src/catalog/render.d.ts +36 -0
  57. package/dist-sdk/src/catalog/render.js +176 -0
  58. package/dist-sdk/src/catalog/token.d.ts +10 -0
  59. package/dist-sdk/src/catalog/token.js +62 -0
  60. package/dist-sdk/src/catalog/types.d.ts +158 -0
  61. package/dist-sdk/src/catalog/types.js +83 -0
  62. package/dist-sdk/src/catalog/write.d.ts +43 -0
  63. package/dist-sdk/src/catalog/write.js +109 -0
  64. package/dist-sdk/src/core/app-to-ui.d.ts +22 -0
  65. package/dist-sdk/src/core/app-to-ui.js +75 -0
  66. package/dist-sdk/src/core/index.d.ts +10 -0
  67. package/dist-sdk/src/core/index.js +9 -0
  68. package/dist-sdk/src/core/system-fields.d.ts +93 -0
  69. package/dist-sdk/src/core/system-fields.js +151 -0
  70. package/dist-sdk/src/core/triggers/on-demand.d.ts +144 -0
  71. package/dist-sdk/src/core/triggers/on-demand.js +112 -0
  72. package/dist-sdk/src/core/types/ai-provider.d.ts +36 -0
  73. package/dist-sdk/src/core/types/ai-provider.js +32 -0
  74. package/dist-sdk/src/core/types/app.d.ts +838 -0
  75. package/dist-sdk/src/core/types/app.js +210 -0
  76. package/dist-sdk/src/core/types/aspect-category.d.ts +35 -0
  77. package/dist-sdk/src/core/types/aspect-category.js +33 -0
  78. package/dist-sdk/src/core/types/cloud-link.d.ts +34 -0
  79. package/dist-sdk/src/core/types/cloud-link.js +32 -0
  80. package/dist-sdk/src/core/types/display-block.d.ts +149 -0
  81. package/dist-sdk/src/core/types/display-block.js +61 -0
  82. package/dist-sdk/src/core/types/group.d.ts +13 -0
  83. package/dist-sdk/src/core/types/group.js +6 -0
  84. package/dist-sdk/src/core/types/platform.d.ts +2 -0
  85. package/dist-sdk/src/core/types/platform.js +1 -0
  86. package/dist-sdk/src/core/types/user.d.ts +20 -0
  87. package/dist-sdk/src/core/types/user.js +8 -0
  88. package/dist-sdk/src/core/wire/ref-serializer.d.ts +45 -0
  89. package/dist-sdk/src/core/wire/ref-serializer.js +89 -0
  90. package/dist-sdk/src/engine/build/context.d.ts +49 -0
  91. package/dist-sdk/src/engine/build/context.js +6 -0
  92. package/dist-sdk/src/engine/entity.d.ts +44 -0
  93. package/dist-sdk/src/engine/entity.js +15 -0
  94. package/dist-sdk/src/engine/pull/context.d.ts +23 -0
  95. package/dist-sdk/src/engine/pull/context.js +44 -0
  96. package/dist-sdk/src/engine/pull/org.d.ts +44 -0
  97. package/dist-sdk/src/engine/pull/org.js +104 -0
  98. package/dist-sdk/src/engine/tf/escape.d.ts +22 -0
  99. package/dist-sdk/src/engine/tf/escape.js +28 -0
  100. package/dist-sdk/src/engine/tf/expr.d.ts +25 -0
  101. package/dist-sdk/src/engine/tf/expr.js +405 -0
  102. package/dist-sdk/src/engine/tf/index.d.ts +12 -0
  103. package/dist-sdk/src/engine/tf/index.js +11 -0
  104. package/dist-sdk/src/engine/tf/labels.d.ts +31 -0
  105. package/dist-sdk/src/engine/tf/labels.js +125 -0
  106. package/dist-sdk/src/engine/tf/model.d.ts +84 -0
  107. package/dist-sdk/src/engine/tf/model.js +49 -0
  108. package/dist-sdk/src/engine/tf/parse.d.ts +41 -0
  109. package/dist-sdk/src/engine/tf/parse.js +189 -0
  110. package/dist-sdk/src/engine/tf/render.d.ts +13 -0
  111. package/dist-sdk/src/engine/tf/render.js +102 -0
  112. package/dist-sdk/src/engine/workspace/authoring-layout.d.ts +43 -0
  113. package/dist-sdk/src/engine/workspace/authoring-layout.js +201 -0
  114. package/dist-sdk/src/entities/agent/build.d.ts +108 -0
  115. package/dist-sdk/src/entities/agent/build.js +148 -0
  116. package/dist-sdk/src/entities/agent/deserializer/print-agent-v2.d.ts +18 -0
  117. package/dist-sdk/src/entities/agent/deserializer/print-agent-v2.js +177 -0
  118. package/dist-sdk/src/entities/agent/from-tf.d.ts +50 -0
  119. package/dist-sdk/src/entities/agent/from-tf.js +169 -0
  120. package/dist-sdk/src/entities/agent/index.d.ts +7 -0
  121. package/dist-sdk/src/entities/agent/index.js +7 -0
  122. package/dist-sdk/src/entities/agent/module.d.ts +4 -0
  123. package/dist-sdk/src/entities/agent/module.js +116 -0
  124. package/dist-sdk/src/entities/agent/to-tf.d.ts +33 -0
  125. package/dist-sdk/src/entities/agent/to-tf.js +136 -0
  126. package/dist-sdk/src/entities/agent/tools.d.ts +205 -0
  127. package/dist-sdk/src/entities/agent/tools.js +199 -0
  128. package/dist-sdk/src/entities/agent-tool/from-tf.d.ts +63 -0
  129. package/dist-sdk/src/entities/agent-tool/from-tf.js +169 -0
  130. package/dist-sdk/src/entities/agent-tool/module.d.ts +3 -0
  131. package/dist-sdk/src/entities/agent-tool/module.js +32 -0
  132. package/dist-sdk/src/entities/agent-tool/to-tf.d.ts +38 -0
  133. package/dist-sdk/src/entities/agent-tool/to-tf.js +164 -0
  134. package/dist-sdk/src/entities/agent-tool/types.d.ts +42 -0
  135. package/dist-sdk/src/entities/agent-tool/types.js +70 -0
  136. package/dist-sdk/src/entities/app/build.d.ts +318 -0
  137. package/dist-sdk/src/entities/app/build.js +325 -0
  138. package/dist-sdk/src/entities/app/deserializer/normalize.d.ts +165 -0
  139. package/dist-sdk/src/entities/app/deserializer/normalize.js +12 -0
  140. package/dist-sdk/src/entities/app/display-blocks.d.ts +26 -0
  141. package/dist-sdk/src/entities/app/display-blocks.js +34 -0
  142. package/dist-sdk/src/entities/app/from-tf.d.ts +23 -0
  143. package/dist-sdk/src/entities/app/from-tf.js +180 -0
  144. package/dist-sdk/src/entities/app/index.d.ts +11 -0
  145. package/dist-sdk/src/entities/app/index.js +10 -0
  146. package/dist-sdk/src/entities/app/locals.d.ts +11 -0
  147. package/dist-sdk/src/entities/app/locals.js +31 -0
  148. package/dist-sdk/src/entities/app/module.d.ts +4 -0
  149. package/dist-sdk/src/entities/app/module.js +59 -0
  150. package/dist-sdk/src/entities/app/to-tf.d.ts +28 -0
  151. package/dist-sdk/src/entities/app/to-tf.js +183 -0
  152. package/dist-sdk/src/entities/approval-chain/build.d.ts +24 -0
  153. package/dist-sdk/src/entities/approval-chain/build.js +56 -0
  154. package/dist-sdk/src/entities/approval-chain/index.d.ts +6 -0
  155. package/dist-sdk/src/entities/approval-chain/index.js +6 -0
  156. package/dist-sdk/src/entities/approval-chain/steps.d.ts +24 -0
  157. package/dist-sdk/src/entities/approval-chain/steps.js +20 -0
  158. package/dist-sdk/src/entities/automation/build.d.ts +215 -0
  159. package/dist-sdk/src/entities/automation/build.js +424 -0
  160. package/dist-sdk/src/entities/automation/catalog-render.d.ts +5 -0
  161. package/dist-sdk/src/entities/automation/catalog-render.js +35 -0
  162. package/dist-sdk/src/entities/automation/deserializer/ast.d.ts +135 -0
  163. package/dist-sdk/src/entities/automation/deserializer/ast.js +13 -0
  164. package/dist-sdk/src/entities/automation/deserializer/print-automation.d.ts +40 -0
  165. package/dist-sdk/src/entities/automation/deserializer/print-automation.js +1040 -0
  166. package/dist-sdk/src/entities/automation/filter.d.ts +81 -0
  167. package/dist-sdk/src/entities/automation/filter.js +146 -0
  168. package/dist-sdk/src/entities/automation/from-tf.d.ts +36 -0
  169. package/dist-sdk/src/entities/automation/from-tf.js +252 -0
  170. package/dist-sdk/src/entities/automation/index.d.ts +18 -0
  171. package/dist-sdk/src/entities/automation/index.js +21 -0
  172. package/dist-sdk/src/entities/automation/module.d.ts +3 -0
  173. package/dist-sdk/src/entities/automation/module.js +153 -0
  174. package/dist-sdk/src/entities/automation/operators.d.ts +66 -0
  175. package/dist-sdk/src/entities/automation/operators.js +43 -0
  176. package/dist-sdk/src/entities/automation/script-code.d.ts +62 -0
  177. package/dist-sdk/src/entities/automation/script-code.js +366 -0
  178. package/dist-sdk/src/entities/automation/serialize.d.ts +6 -0
  179. package/dist-sdk/src/entities/automation/serialize.js +41 -0
  180. package/dist-sdk/src/entities/automation/tasks.d.ts +535 -0
  181. package/dist-sdk/src/entities/automation/tasks.js +697 -0
  182. package/dist-sdk/src/entities/automation/to-tf.d.ts +38 -0
  183. package/dist-sdk/src/entities/automation/to-tf.js +266 -0
  184. package/dist-sdk/src/entities/automation/triggers.d.ts +197 -0
  185. package/dist-sdk/src/entities/automation/triggers.js +202 -0
  186. package/dist-sdk/src/entities/automation/types.d.ts +53 -0
  187. package/dist-sdk/src/entities/automation/types.js +101 -0
  188. package/dist-sdk/src/entities/automation/value-ref-tf.d.ts +76 -0
  189. package/dist-sdk/src/entities/automation/value-ref-tf.js +190 -0
  190. package/dist-sdk/src/entities/element/build.d.ts +108 -0
  191. package/dist-sdk/src/entities/element/build.js +109 -0
  192. package/dist-sdk/src/entities/element/from-tf.d.ts +19 -0
  193. package/dist-sdk/src/entities/element/from-tf.js +155 -0
  194. package/dist-sdk/src/entities/element/index.d.ts +9 -0
  195. package/dist-sdk/src/entities/element/index.js +9 -0
  196. package/dist-sdk/src/entities/element/locals.d.ts +7 -0
  197. package/dist-sdk/src/entities/element/locals.js +12 -0
  198. package/dist-sdk/src/entities/element/module.d.ts +8 -0
  199. package/dist-sdk/src/entities/element/module.js +63 -0
  200. package/dist-sdk/src/entities/element/to-tf.d.ts +14 -0
  201. package/dist-sdk/src/entities/element/to-tf.js +151 -0
  202. package/dist-sdk/src/entities/field/build.d.ts +69 -0
  203. package/dist-sdk/src/entities/field/build.js +74 -0
  204. package/dist-sdk/src/entities/field/calc/aggregate.d.ts +60 -0
  205. package/dist-sdk/src/entities/field/calc/aggregate.js +71 -0
  206. package/dist-sdk/src/entities/field/calc/date.d.ts +73 -0
  207. package/dist-sdk/src/entities/field/calc/date.js +109 -0
  208. package/dist-sdk/src/entities/field/calc/index.d.ts +229 -0
  209. package/dist-sdk/src/entities/field/calc/index.js +433 -0
  210. package/dist-sdk/src/entities/field/calc/numeric.d.ts +22 -0
  211. package/dist-sdk/src/entities/field/calc/numeric.js +67 -0
  212. package/dist-sdk/src/entities/field/calc/runtime.d.ts +61 -0
  213. package/dist-sdk/src/entities/field/calc/runtime.js +170 -0
  214. package/dist-sdk/src/entities/field/calc/text.d.ts +100 -0
  215. package/dist-sdk/src/entities/field/calc/text.js +208 -0
  216. package/dist-sdk/src/entities/field/calc/types.d.ts +86 -0
  217. package/dist-sdk/src/entities/field/calc/types.js +23 -0
  218. package/dist-sdk/src/entities/field/calc.d.ts +108 -0
  219. package/dist-sdk/src/entities/field/calc.js +54 -0
  220. package/dist-sdk/src/entities/field/from-tf.d.ts +29 -0
  221. package/dist-sdk/src/entities/field/from-tf.js +73 -0
  222. package/dist-sdk/src/entities/field/locals.d.ts +8 -0
  223. package/dist-sdk/src/entities/field/locals.js +24 -0
  224. package/dist-sdk/src/entities/field/module.d.ts +3 -0
  225. package/dist-sdk/src/entities/field/module.js +49 -0
  226. package/dist-sdk/src/entities/field/options.d.ts +27 -0
  227. package/dist-sdk/src/entities/field/options.js +76 -0
  228. package/dist-sdk/src/entities/field/record-shape.d.ts +57 -0
  229. package/dist-sdk/src/entities/field/record-shape.js +1 -0
  230. package/dist-sdk/src/entities/field/to-tf.d.ts +55 -0
  231. package/dist-sdk/src/entities/field/to-tf.js +97 -0
  232. package/dist-sdk/src/entities/field/types.d.ts +27 -0
  233. package/dist-sdk/src/entities/field/types.js +46 -0
  234. package/dist-sdk/src/entities/file-reader/build.d.ts +124 -0
  235. package/dist-sdk/src/entities/file-reader/build.js +105 -0
  236. package/dist-sdk/src/entities/file-reader/index.d.ts +5 -0
  237. package/dist-sdk/src/entities/file-reader/index.js +5 -0
  238. package/dist-sdk/src/entities/flow/activities/agent.d.ts +15 -0
  239. package/dist-sdk/src/entities/flow/activities/agent.js +29 -0
  240. package/dist-sdk/src/entities/flow/activities/approval.d.ts +9 -0
  241. package/dist-sdk/src/entities/flow/activities/approval.js +18 -0
  242. package/dist-sdk/src/entities/flow/activities/automation.d.ts +12 -0
  243. package/dist-sdk/src/entities/flow/activities/automation.js +22 -0
  244. package/dist-sdk/src/entities/flow/activities/ctx.d.ts +34 -0
  245. package/dist-sdk/src/entities/flow/activities/ctx.js +38 -0
  246. package/dist-sdk/src/entities/flow/activities/form.d.ts +22 -0
  247. package/dist-sdk/src/entities/flow/activities/form.js +36 -0
  248. package/dist-sdk/src/entities/flow/activities/index.d.ts +14 -0
  249. package/dist-sdk/src/entities/flow/activities/index.js +13 -0
  250. package/dist-sdk/src/entities/flow/activities/input-refs.d.ts +39 -0
  251. package/dist-sdk/src/entities/flow/activities/input-refs.js +19 -0
  252. package/dist-sdk/src/entities/flow/activities/prompt-template.d.ts +13 -0
  253. package/dist-sdk/src/entities/flow/activities/prompt-template.js +34 -0
  254. package/dist-sdk/src/entities/flow/activities/render-catalog.d.ts +140 -0
  255. package/dist-sdk/src/entities/flow/activities/render-catalog.js +174 -0
  256. package/dist-sdk/src/entities/flow/activities/types.d.ts +33 -0
  257. package/dist-sdk/src/entities/flow/activities/types.js +1 -0
  258. package/dist-sdk/src/entities/flow/build.d.ts +38 -0
  259. package/dist-sdk/src/entities/flow/build.js +115 -0
  260. package/dist-sdk/src/entities/flow/index.d.ts +8 -0
  261. package/dist-sdk/src/entities/flow/index.js +7 -0
  262. package/dist-sdk/src/entities/flow/serialize.d.ts +51 -0
  263. package/dist-sdk/src/entities/flow/serialize.js +94 -0
  264. package/dist-sdk/src/entities/flow/util.d.ts +27 -0
  265. package/dist-sdk/src/entities/flow/util.js +38 -0
  266. package/dist-sdk/src/entities/org/category.d.ts +5 -0
  267. package/dist-sdk/src/entities/org/category.js +33 -0
  268. package/dist-sdk/src/entities/org/cloud-link.d.ts +5 -0
  269. package/dist-sdk/src/entities/org/cloud-link.js +33 -0
  270. package/dist-sdk/src/entities/org/connector.d.ts +5 -0
  271. package/dist-sdk/src/entities/org/connector.js +37 -0
  272. package/dist-sdk/src/entities/org/group.d.ts +5 -0
  273. package/dist-sdk/src/entities/org/group.js +31 -0
  274. package/dist-sdk/src/entities/org/index.d.ts +10 -0
  275. package/dist-sdk/src/entities/org/index.js +10 -0
  276. package/dist-sdk/src/entities/org/role.d.ts +7 -0
  277. package/dist-sdk/src/entities/org/role.js +21 -0
  278. package/dist-sdk/src/entities/org/user.d.ts +7 -0
  279. package/dist-sdk/src/entities/org/user.js +21 -0
  280. package/dist-sdk/src/entities/search-table/build.d.ts +41 -0
  281. package/dist-sdk/src/entities/search-table/build.js +79 -0
  282. package/dist-sdk/src/entities/search-table/index.d.ts +5 -0
  283. package/dist-sdk/src/entities/search-table/index.js +5 -0
  284. package/dist-sdk/src/entities/search-table/module.d.ts +6 -0
  285. package/dist-sdk/src/entities/search-table/module.js +64 -0
  286. package/dist-sdk/src/entities/shared/context.d.ts +93 -0
  287. package/dist-sdk/src/entities/shared/context.js +156 -0
  288. package/dist-sdk/src/entities/shared/filters/ast.d.ts +242 -0
  289. package/dist-sdk/src/entities/shared/filters/ast.js +65 -0
  290. package/dist-sdk/src/entities/shared/filters/index.d.ts +211 -0
  291. package/dist-sdk/src/entities/shared/filters/index.js +372 -0
  292. package/dist-sdk/src/entities/shared/filters/types.d.ts +170 -0
  293. package/dist-sdk/src/entities/shared/filters/types.js +7 -0
  294. package/dist-sdk/src/entities/shared/ref.d.ts +160 -0
  295. package/dist-sdk/src/entities/shared/ref.js +119 -0
  296. package/dist-sdk/src/entities/shared/types/common.d.ts +106 -0
  297. package/dist-sdk/src/entities/shared/types/common.js +64 -0
  298. package/dist-sdk/src/entities/shared/types/field-types.d.ts +49 -0
  299. package/dist-sdk/src/entities/shared/types/field-types.js +48 -0
  300. package/dist-sdk/src/entities/shared/types/platform.d.ts +46 -0
  301. package/dist-sdk/src/entities/shared/types/platform.js +10 -0
  302. package/dist-sdk/src/entities/skill/build.d.ts +25 -0
  303. package/dist-sdk/src/entities/skill/build.js +50 -0
  304. package/dist-sdk/src/entities/skill/deserializer/print-skill-v2.d.ts +20 -0
  305. package/dist-sdk/src/entities/skill/deserializer/print-skill-v2.js +96 -0
  306. package/dist-sdk/src/entities/skill/from-tf.d.ts +33 -0
  307. package/dist-sdk/src/entities/skill/from-tf.js +95 -0
  308. package/dist-sdk/src/entities/skill/index.d.ts +7 -0
  309. package/dist-sdk/src/entities/skill/index.js +7 -0
  310. package/dist-sdk/src/entities/skill/module.d.ts +4 -0
  311. package/dist-sdk/src/entities/skill/module.js +106 -0
  312. package/dist-sdk/src/entities/skill/to-tf.d.ts +33 -0
  313. package/dist-sdk/src/entities/skill/to-tf.js +58 -0
  314. package/dist-sdk/src/entities/skill/tools.d.ts +71 -0
  315. package/dist-sdk/src/entities/skill/tools.js +88 -0
  316. package/dist-sdk/src/entities/skill-tool/from-tf.d.ts +47 -0
  317. package/dist-sdk/src/entities/skill-tool/from-tf.js +121 -0
  318. package/dist-sdk/src/entities/skill-tool/module.d.ts +3 -0
  319. package/dist-sdk/src/entities/skill-tool/module.js +21 -0
  320. package/dist-sdk/src/entities/skill-tool/to-tf.d.ts +32 -0
  321. package/dist-sdk/src/entities/skill-tool/to-tf.js +107 -0
  322. package/dist-sdk/src/entities/skill-tool/types.d.ts +40 -0
  323. package/dist-sdk/src/entities/skill-tool/types.js +67 -0
  324. package/dist-sdk/src/entities/table/build.d.ts +74 -0
  325. package/dist-sdk/src/entities/table/build.js +339 -0
  326. package/dist-sdk/src/entities/table/catalog-render.d.ts +5 -0
  327. package/dist-sdk/src/entities/table/catalog-render.js +39 -0
  328. package/dist-sdk/src/entities/table/fields.d.ts +81 -0
  329. package/dist-sdk/src/entities/table/fields.js +70 -0
  330. package/dist-sdk/src/entities/table/filter.d.ts +41 -0
  331. package/dist-sdk/src/entities/table/filter.js +89 -0
  332. package/dist-sdk/src/entities/table/index.d.ts +8 -0
  333. package/dist-sdk/src/entities/table/index.js +12 -0
  334. package/dist-sdk/src/entities/table/joins.d.ts +26 -0
  335. package/dist-sdk/src/entities/table/joins.js +31 -0
  336. package/dist-sdk/src/entities/table/keys.d.ts +11 -0
  337. package/dist-sdk/src/entities/table/keys.js +25 -0
  338. package/dist-sdk/src/entities/table/module.d.ts +5 -0
  339. package/dist-sdk/src/entities/table/module.js +25 -0
  340. package/dist-sdk/src/entities/table/state.d.ts +39 -0
  341. package/dist-sdk/src/entities/table/state.js +43 -0
  342. package/dist-sdk/src/entities/view/from-tf.d.ts +25 -0
  343. package/dist-sdk/src/entities/view/from-tf.js +233 -0
  344. package/dist-sdk/src/entities/view/module.d.ts +24 -0
  345. package/dist-sdk/src/entities/view/module.js +61 -0
  346. package/dist-sdk/src/entities/view/to-tf.d.ts +63 -0
  347. package/dist-sdk/src/entities/view/to-tf.js +156 -0
  348. package/dist-sdk/src/entities/view/types.d.ts +58 -0
  349. package/dist-sdk/src/entities/view/types.js +89 -0
  350. package/dist-sdk/src/graph/deferred-catalog-render.d.ts +14 -0
  351. package/dist-sdk/src/graph/deferred-catalog-render.js +37 -0
  352. package/dist-sdk/src/graph/index.d.ts +83 -0
  353. package/dist-sdk/src/graph/index.js +207 -0
  354. package/dist-sdk/src/graph/modules.d.ts +7 -0
  355. package/dist-sdk/src/graph/modules.js +37 -0
  356. package/dist-sdk/src/graph/types.d.ts +301 -0
  357. package/dist-sdk/src/graph/types.js +102 -0
  358. package/dist-sdk/src/internal/sdk-package.d.ts +7 -0
  359. package/dist-sdk/src/internal/sdk-package.js +23 -0
  360. package/package.json +173 -8
@@ -0,0 +1,7 @@
1
+ /**
2
+ * v2 agent authoring — emits Hydra's agent wire shape (minus the owner, which
3
+ * the deploy wire client injects) with `CatalogRef` tokens at every reference
4
+ * position. Standalone from v1.
5
+ */
6
+ export { defineAgent, type A2ASkill, type AgentAuthentication, type AgentV2Options, type SkillAccess, } from "./build.js";
7
+ export { agentCreateRecord, agentExecuteWorkflow, agentMcp, agentRelateRecord, agentRunAgent, agentRunAutomation, agentSearchAspect, agentSearchTable, agentSelectBotRoute, agentUpdateRecord, type AgentExecuteWorkflowInput, type AgentExecuteWorkflowOutput, type RunAutomationInputs, type RunAutomationOptionalInput, type RunAutomationOutput, type RunAutomationOutputs, type RunAutomationRequiredInput, type RunAutomationToolV2, type AgentMcpHeader, type AgentRecordField, type AgentSearchField, type AgentToolRunAs, type AgentTool, } from "./tools.js";
@@ -0,0 +1,7 @@
1
+ /**
2
+ * v2 agent authoring — emits Hydra's agent wire shape (minus the owner, which
3
+ * the deploy wire client injects) with `CatalogRef` tokens at every reference
4
+ * position. Standalone from v1.
5
+ */
6
+ export { defineAgent, } from "./build.js";
7
+ export { agentCreateRecord, agentExecuteWorkflow, agentMcp, agentRelateRecord, agentRunAgent, agentRunAutomation, agentSearchAspect, agentSearchTable, agentSelectBotRoute, agentUpdateRecord, } from "./tools.js";
@@ -0,0 +1,4 @@
1
+ /** The agent entity's registry entry + resource-type constant (see src/graph/). */
2
+ import { type EntityKindModule } from "../../graph/types.js";
3
+ export declare const AGENT_RESOURCE_TYPE = "elementum_agent";
4
+ export declare const agentModule: EntityKindModule;
@@ -0,0 +1,116 @@
1
+ /** The agent entity's registry entry + resource-type constant (see src/graph/). */
2
+ import { bareFactoryEntry } from "../../catalog/render-helpers.js";
3
+ import { isTfExpr } from "../../engine/tf/index.js";
4
+ import { NO_DATA, } from "../../graph/types.js";
5
+ import { printAgentV2 } from "./deserializer/print-agent-v2.js";
6
+ import { agentFromTf } from "./from-tf.js";
7
+ import { agentToTf } from "./to-tf.js";
8
+ export const AGENT_RESOURCE_TYPE = "elementum_agent";
9
+ function isConfigured(value) {
10
+ return (typeof value === "object" &&
11
+ value !== null &&
12
+ typeof value.ref === "function" &&
13
+ typeof value.def === "function");
14
+ }
15
+ function agentStubRef(refName, parent) {
16
+ return { __kind: "agent", refName, name: refName, parent };
17
+ }
18
+ function agentRefFromAuthoring(args) {
19
+ const { refName, parent, defaultExport } = args;
20
+ if (isConfigured(defaultExport)) {
21
+ const catalogRef = defaultExport.ref(refName);
22
+ if (catalogRef.__kind !== "agent")
23
+ return undefined;
24
+ return catalogRef;
25
+ }
26
+ if (typeof defaultExport !== "object" ||
27
+ defaultExport === null ||
28
+ defaultExport.kind !== "agent") {
29
+ return undefined;
30
+ }
31
+ const entity = defaultExport;
32
+ const entityRefName = entity.refName === "" ? refName : entity.refName;
33
+ const entityParent = entity.parent === "" ? parent : entity.parent;
34
+ const maybeRefName = entity.ref?.name;
35
+ const payloadName = entity.payload?.name;
36
+ const name = typeof maybeRefName === "string"
37
+ ? maybeRefName
38
+ : typeof payloadName === "string"
39
+ ? payloadName
40
+ : entityRefName;
41
+ return { __kind: "agent", refName: entityRefName, name, parent: entityParent };
42
+ }
43
+ function extractAgents(ownBlocks, stream, ctx) {
44
+ const toolBlocks = stream.byKind.get("agent-tool") ?? [];
45
+ const items = [];
46
+ const skipped = [];
47
+ const diagnostics = [];
48
+ for (const agentBlock of ownBlocks) {
49
+ const agentLabel = agentBlock.label ?? "";
50
+ const ownTools = toolBlocks.filter((b) => {
51
+ const ref = b.attrs["agent_id"];
52
+ return isTfExpr(ref) && ref.$expr === "resource-attr" && ref.type === AGENT_RESOURCE_TYPE && ref.label === agentLabel;
53
+ });
54
+ const { agent, skippedReason } = agentFromTf(agentBlock, ownTools, ctx.appTfLabel, ctx);
55
+ if (agent !== undefined)
56
+ items.push(agent);
57
+ else if (skippedReason !== undefined) {
58
+ skipped.push(`${AGENT_RESOURCE_TYPE}.${agentLabel}`);
59
+ diagnostics.push(skippedReason);
60
+ }
61
+ }
62
+ return { items, skipped, diagnostics };
63
+ }
64
+ export const agentModule = {
65
+ kind: "agent",
66
+ stream: { role: "streamMember" },
67
+ authoring: { unit: "ownFile", bag: "agents" },
68
+ parents: [{ parent: "app", child: "agent" }],
69
+ resource: { shape: "single", resourceType: AGENT_RESOURCE_TYPE, adoptable: true },
70
+ data: NO_DATA,
71
+ canvas: {
72
+ participates: true,
73
+ label: "Agents",
74
+ glyph: "◇",
75
+ component: "agentCard",
76
+ toView: (instance) => {
77
+ const a = instance;
78
+ return {
79
+ refName: a.refName,
80
+ name: a.name,
81
+ description: a.description,
82
+ toolCount: a.tools.length,
83
+ };
84
+ },
85
+ },
86
+ lifecycle: {
87
+ participates: true,
88
+ extractOwnFile: extractAgents,
89
+ printOwnFile: (item, opts) => {
90
+ const agent = item;
91
+ return {
92
+ refName: agent.refName,
93
+ source: printAgentV2(agent, {
94
+ appRefName: opts.appRefName,
95
+ orgImportPath: opts.orgImportPath,
96
+ }),
97
+ };
98
+ },
99
+ toTf: (entity, ctx) => agentToTf(entity, {
100
+ appRefName: ctx.appRefName,
101
+ appTfLabel: ctx.appTfLabel,
102
+ orgRefs: ctx.orgRefs,
103
+ diagnostics: ctx.diagnostics,
104
+ }),
105
+ },
106
+ catalog: {
107
+ participates: true,
108
+ refKind: "agent",
109
+ catalogBag: "agents",
110
+ renderOrder: 20,
111
+ catalogRoot: "app",
112
+ renderEntry: ({ keyName, baseIndent }) => bareFactoryEntry("agentRef", keyName, baseIndent),
113
+ stubRef: agentStubRef,
114
+ refFromAuthoring: agentRefFromAuthoring,
115
+ },
116
+ };
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Agent emission (M3, plan §4.3): `agentToTf` consumes the discovered
3
+ * `DeployableEntity` (the `defineAgent` def() payload) and emits
4
+ * `elementum_agent` + one tool resource per implemented tool (the tool pass
5
+ * delegates to `entities/agent-tool/to-tf.ts`).
6
+ *
7
+ * The dialect is ei's ACTUAL export (docs/design/m3-agent-dialect.md):
8
+ * app_id as the owning app's resource ref, the connector as a
9
+ * `data.elementum_ai_provider_connector` ref, agent-prefixed tool labels.
10
+ * `skillAccess` emits `skill_access_config` (confirmed live against the
11
+ * provider's `elementum_agent` schema). Authoring knobs the terraform
12
+ * dialect still doesn't carry (temperature, reasoningEffort,
13
+ * startingActions, …) degrade through `diagnostics` — reported, never
14
+ * silent (plan §4.3).
15
+ */
16
+ import type { OrgRefLookup } from "../../engine/build/context.js";
17
+ import { type DeployableEntity } from "../../engine/entity.js";
18
+ import { type TfBlock } from "../../engine/tf/index.js";
19
+ export interface AgentToTfContext {
20
+ /** The owning app's refName (self-target detection) and tfLabel (namespace). */
21
+ readonly appRefName: string;
22
+ readonly appTfLabel: string;
23
+ readonly orgRefs: OrgRefLookup;
24
+ /** Degradations land here — reported by the caller, never silent. */
25
+ readonly diagnostics: string[];
26
+ }
27
+ export interface AgentToTfResult {
28
+ readonly blocks: readonly TfBlock[];
29
+ /** The agent's terraform address. */
30
+ readonly address: string;
31
+ }
32
+ /** `elementum_agent` + one tool resource per implemented tool, in ei's dialect. */
33
+ export declare function agentToTf(entity: DeployableEntity, ctx: AgentToTfContext): AgentToTfResult;
@@ -0,0 +1,136 @@
1
+ /**
2
+ * Agent emission (M3, plan §4.3): `agentToTf` consumes the discovered
3
+ * `DeployableEntity` (the `defineAgent` def() payload) and emits
4
+ * `elementum_agent` + one tool resource per implemented tool (the tool pass
5
+ * delegates to `entities/agent-tool/to-tf.ts`).
6
+ *
7
+ * The dialect is ei's ACTUAL export (docs/design/m3-agent-dialect.md):
8
+ * app_id as the owning app's resource ref, the connector as a
9
+ * `data.elementum_ai_provider_connector` ref, agent-prefixed tool labels.
10
+ * `skillAccess` emits `skill_access_config` (confirmed live against the
11
+ * provider's `elementum_agent` schema). Authoring knobs the terraform
12
+ * dialect still doesn't carry (temperature, reasoningEffort,
13
+ * startingActions, …) degrade through `diagnostics` — reported, never
14
+ * silent (plan §4.3).
15
+ */
16
+ import { EntityTfError } from "../../engine/entity.js";
17
+ import { expr, sanitizeName, tsLabelToTfLabel } from "../../engine/tf/index.js";
18
+ import { toolToTf } from "../agent-tool/to-tf.js";
19
+ import { APP_RESOURCE_TYPE } from "../app/module.js";
20
+ import { CONNECTOR_ORG_BAG } from "../org/connector.js";
21
+ import { SKILL_RESOURCE_TYPE } from "../skill/module.js";
22
+ import { AGENT_RESOURCE_TYPE } from "./module.js";
23
+ /** Config knobs `defineAgent` accepts that the terraform dialect does not carry (yet). */
24
+ const UNSUPPORTED_AGENT_KNOBS = [
25
+ "temperature",
26
+ "reasoningEffort",
27
+ "runAs",
28
+ "startingActions",
29
+ "agentAuthentication",
30
+ "a2aStreaming",
31
+ "conversationIdleTimeout",
32
+ "avatarAttachmentId",
33
+ "managedById",
34
+ "serviceAccountId",
35
+ ];
36
+ /**
37
+ * authoring SkillRef token → the skill's id value. Self-app skills resolve
38
+ * purely from the token (same discipline as agent-tool's field refs); a
39
+ * foreign-app skill needs a name-keyed `data.elementum_agentic_skill`
40
+ * lookup (the platform derives the label from the skill's `name`, which is
41
+ * already slug-shaped — see `entities/skill/build.ts`'s name validation).
42
+ */
43
+ function skillIdValue(token, ctx) {
44
+ if (token === undefined || token.refName === undefined) {
45
+ // Always an authoring mistake, never a degraded-but-known dialect gap —
46
+ // e.g. a stale generated/catalog.ts missing the `skills` bag (edk build
47
+ // doesn't regenerate the catalog itself; re-run the step that does, or
48
+ // `edk pull app`) or a typo'd catalog path. Fail loud immediately rather
49
+ // than silently emit `skill_ids = [null]` or crash three layers down.
50
+ throw new EntityTfError(`agent skillAccess: a skill token is undefined — check that every entry in \`skills\`/` +
51
+ `\`preloadedSkills\` resolves to a real \`catalog.<app>.skills.<key>\` token. If you just added or ` +
52
+ `renamed a skill file, the app's generated/catalog.ts may be stale; regenerate it (re-run \`edk pull ` +
53
+ `app\`, or the catalog-refresh step your workflow uses) before building again.`);
54
+ }
55
+ const refName = token.refName;
56
+ if (token.parent === ctx.appRefName) {
57
+ return expr.resourceAttr(SKILL_RESOURCE_TYPE, tsLabelToTfLabel(refName), ["id"]);
58
+ }
59
+ const name = token.name ?? refName;
60
+ const tfLabel = sanitizeName(name);
61
+ ctx.orgRefs.foreignSkill(tfLabel, name);
62
+ return expr.dataAttr(SKILL_RESOURCE_TYPE, tfLabel, ["id"]);
63
+ }
64
+ /** `elementum_agent` + one tool resource per implemented tool, in ei's dialect. */
65
+ export function agentToTf(entity, ctx) {
66
+ if (entity.kind !== "agent") {
67
+ throw new EntityTfError(`agentToTf expects kind "agent"; got "${entity.kind}" (refName "${entity.refName}")`);
68
+ }
69
+ const payload = entity.payload;
70
+ const elementum = payload?.agent?.elementum;
71
+ if (payload === null || typeof payload !== "object" || elementum === undefined) {
72
+ throw new EntityTfError(`agent "${entity.refName}" has no agent.elementum payload — was it built with defineAgent?`);
73
+ }
74
+ // The bag key IS the label (the stable naming contract) — the agent's
75
+ // refName comes from its file name, exactly like an app's.
76
+ const tfLabel = tsLabelToTfLabel(entity.refName);
77
+ const name = elementum.name ?? "";
78
+ const where = `agent "${name}"`;
79
+ const attrs = {
80
+ app_id: expr.resourceAttr(APP_RESOURCE_TYPE, ctx.appTfLabel, ["id"]),
81
+ name,
82
+ description: elementum.description ?? "",
83
+ instructions: elementum.instructions ?? "",
84
+ };
85
+ if (elementum.firstMessage !== undefined)
86
+ attrs["first_message"] = elementum.firstMessage;
87
+ if (elementum.maxLength !== undefined)
88
+ attrs["max_tokens"] = elementum.maxLength;
89
+ const connector = elementum.aiProviderConnectorId;
90
+ if (connector === undefined) {
91
+ ctx.diagnostics.push(`${where}: no connector token — the platform will pick a default model`);
92
+ }
93
+ else {
94
+ const tsLabel = connector.refName ?? "";
95
+ const resolved = ctx.orgRefs.byTsLabel(CONNECTOR_ORG_BAG, tsLabel);
96
+ if (resolved === undefined) {
97
+ ctx.diagnostics.push(`${where}: connector token "${tsLabel}" is not in the org catalog — re-run \`elementum pull org --data-only\``);
98
+ }
99
+ else {
100
+ attrs["ai_provider_connector_id"] = expr.dataAttr("elementum_ai_provider_connector", resolved.tfLabel, ["id"]);
101
+ }
102
+ }
103
+ for (const knob of UNSUPPORTED_AGENT_KNOBS) {
104
+ if (elementum[knob] !== undefined) {
105
+ ctx.diagnostics.push(`${where}: ${knob} is not carried by the terraform path yet; dropped`);
106
+ }
107
+ }
108
+ const skillAccess = elementum.skillAccessConfig;
109
+ if (skillAccess !== undefined) {
110
+ const mode = skillAccess.mode ?? "NONE";
111
+ const skillAccessValue = { mode };
112
+ if (skillAccess.skillIds !== undefined) {
113
+ skillAccessValue["skill_ids"] = skillAccess.skillIds.map((t) => skillIdValue(t, ctx));
114
+ }
115
+ if (skillAccess.preloadedSkillIds !== undefined) {
116
+ skillAccessValue["preloaded_skill_ids"] = skillAccess.preloadedSkillIds.map((t) => skillIdValue(t, ctx));
117
+ }
118
+ attrs["skill_access_config"] = skillAccessValue;
119
+ }
120
+ if (payload.a2aSkills !== undefined) {
121
+ ctx.diagnostics.push(`${where}: a2aSkills are not carried by the terraform path yet; dropped`);
122
+ }
123
+ const blocks = [{ kind: "resource", type: AGENT_RESOURCE_TYPE, label: tfLabel, attrs }];
124
+ for (const entry of payload.tools ?? []) {
125
+ const tool = toolToTf(entry, {
126
+ appRefName: ctx.appRefName,
127
+ appTfLabel: ctx.appTfLabel,
128
+ agentTfLabel: tfLabel,
129
+ foreignAppRef: (l, n) => ctx.orgRefs.foreignApp(l, n),
130
+ diagnostics: ctx.diagnostics,
131
+ });
132
+ if (tool !== undefined)
133
+ blocks.push(tool.block);
134
+ }
135
+ return { blocks, address: `${AGENT_RESOURCE_TYPE}.${tfLabel}` };
136
+ }
@@ -0,0 +1,205 @@
1
+ /**
2
+ * v2 agent tool factories — emit Hydra's `AgentToolCreateInput` wire shape with
3
+ * `CatalogRef` tokens at every id position (aspect, field, search table, target
4
+ * agent, automation, connector). The tokens are resolved to ids at deploy by
5
+ * `resolvePayload`; nothing here reads an `.id`.
6
+ *
7
+ * Parallel to v1 `src/agents/tools/*` + `serializer`, fully standalone so v1 can
8
+ * be deleted. Each factory takes the tool's `name`/`description` inline (v1 kept
9
+ * the name on the `.tool(name, def)` call) and returns the discriminated wire
10
+ * object. Optional `startMessage` / `runAs` are emitted only when supplied,
11
+ * matching the v1 serializer's field-by-field discipline.
12
+ */
13
+ import type { AutomationCatalogRef, AgentRef, AspectRef, AutomationRef, FieldRef, OutputPropertyRef, SearchTableRef, 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>;
18
+ /** A field exposed to a search tool. */
19
+ export interface AgentSearchField {
20
+ readonly field: FieldRef;
21
+ readonly name?: string;
22
+ readonly description?: string;
23
+ }
24
+ /** A field the agent can populate/modify via a create/update record tool. */
25
+ export interface AgentRecordField {
26
+ readonly field: FieldRef;
27
+ readonly name?: string;
28
+ readonly description?: string;
29
+ readonly required?: boolean;
30
+ readonly defaultValue?: string;
31
+ }
32
+ /** Input-parameter mapping for an execute-workflow tool. */
33
+ export interface AgentExecuteWorkflowInput {
34
+ readonly name: string;
35
+ readonly description: string;
36
+ /** The target automation's trigger parameter, e.g. `app.automations.foo.trigger.bar`. */
37
+ readonly triggerParameter: TriggerParameterRef;
38
+ readonly required?: boolean;
39
+ }
40
+ /** Output-parameter mapping for an execute-workflow tool. */
41
+ export interface AgentExecuteWorkflowOutput {
42
+ readonly name: string;
43
+ /** The target automation's output property, e.g. `app.automations.foo.outputs.bar`. */
44
+ readonly workflowOutputProperty: OutputPropertyRef;
45
+ }
46
+ export interface AgentMcpHeader {
47
+ readonly key: string;
48
+ readonly value: string;
49
+ }
50
+ /** Common options shared by every tool. */
51
+ interface CommonToolOptions {
52
+ readonly name: string;
53
+ readonly description: string;
54
+ readonly startMessage?: string;
55
+ readonly runAs?: AgentToolRunAs;
56
+ }
57
+ export interface SearchAspectToolV2 extends CommonToolOptions {
58
+ readonly aspect: AspectRef;
59
+ readonly queryDescription: string;
60
+ readonly fields?: readonly AgentSearchField[];
61
+ /** Pre-built wire `Filter` (may embed `FieldRef` tokens — resolved at deploy). */
62
+ readonly filter?: Record<string, unknown>;
63
+ /** Pre-built wire `Sort` (`{ orders: [{ field, direction }] }`). */
64
+ readonly sort?: Record<string, unknown>;
65
+ readonly limit?: number;
66
+ }
67
+ export declare function agentSearchAspect(opts: SearchAspectToolV2): AgentTool;
68
+ export interface SearchTableToolV2 extends CommonToolOptions {
69
+ readonly aspect: AspectRef;
70
+ readonly table: SearchTableRef;
71
+ readonly queryDescription: string;
72
+ readonly fields?: readonly AgentSearchField[];
73
+ readonly filter?: Record<string, unknown>;
74
+ readonly limit?: number;
75
+ }
76
+ export declare function agentSearchTable(opts: SearchTableToolV2): AgentTool;
77
+ export interface CreateRecordToolV2 extends CommonToolOptions {
78
+ readonly aspect: AspectRef;
79
+ readonly fields?: readonly AgentRecordField[];
80
+ }
81
+ export declare function agentCreateRecord(opts: CreateRecordToolV2): AgentTool;
82
+ export interface UpdateRecordToolV2 extends CommonToolOptions {
83
+ readonly aspect: AspectRef;
84
+ readonly fields?: readonly AgentRecordField[];
85
+ readonly handleDescription?: string;
86
+ }
87
+ export declare function agentUpdateRecord(opts: UpdateRecordToolV2): AgentTool;
88
+ export interface RelateRecordToolV2 extends CommonToolOptions {
89
+ readonly aspect: AspectRef;
90
+ readonly relatedAspect: AspectRef;
91
+ }
92
+ export declare function agentRelateRecord(opts: RelateRecordToolV2): AgentTool;
93
+ export interface ExecuteWorkflowToolV2 extends CommonToolOptions {
94
+ readonly automation: AutomationRef;
95
+ readonly inputs?: readonly AgentExecuteWorkflowInput[];
96
+ readonly outputs?: readonly AgentExecuteWorkflowOutput[];
97
+ }
98
+ export declare function agentExecuteWorkflow(opts: ExecuteWorkflowToolV2): AgentTool;
99
+ type EmptyBag = {
100
+ readonly [K in never]: never;
101
+ };
102
+ /**
103
+ * Strip index signatures, keeping only literal keys. Indexing an
104
+ * `AutomationCatalogRef & { trigger: <literal bag> }` intersection yields
105
+ * `Readonly<Record<string, TriggerParameterRef>> & <literal bag>` — the
106
+ * Record component's index signature would poison `keyof` into `string`
107
+ * and silently disable every constraint below.
108
+ */
109
+ type KnownKeys<T> = {
110
+ [K in keyof T as string extends K ? never : number extends K ? never : K]: T[K];
111
+ };
112
+ /**
113
+ * The automation's trigger bag, resolved for constraint purposes:
114
+ * - `trigger: undefined` (paramless automation) → EmptyBag (any key errors);
115
+ * - literal bag from a generated/typed catalog → its literal keys;
116
+ * - wide token (plain AutomationCatalogRef — foreign app or hand-written)
117
+ * → permissive Record (graceful degradation; def() still validates).
118
+ */
119
+ type TriggerBagOf<A extends AutomationCatalogRef> = [NonNullable<A["trigger"]>] extends [never] ? EmptyBag : KnownKeys<NonNullable<A["trigger"]>> extends infer KK ? [keyof KK] extends [never] ? Readonly<Record<string, TriggerParameterRef>> : KK : never;
120
+ type OutputBagOf<A extends AutomationCatalogRef> = [NonNullable<A["outputs"]>] extends [never] ? EmptyBag : KnownKeys<NonNullable<A["outputs"]>> extends infer KK ? [keyof KK] extends [never] ? Readonly<Record<string, OutputPropertyRef>> : KK : never;
121
+ /** Keys whose catalog entry carries `required: true` (rendered by the generated catalog). */
122
+ type RequiredParamKeys<T> = {
123
+ [K in keyof T]: T[K] extends {
124
+ readonly required: true;
125
+ } ? K : never;
126
+ }[keyof T];
127
+ /** Input spec for a trigger parameter the automation declares REQUIRED — the tool input must be required too. */
128
+ export interface RunAutomationRequiredInput {
129
+ /** Agent-facing input name; defaults to the trigger parameter name (the record key). */
130
+ readonly name?: string;
131
+ readonly description: string;
132
+ readonly required: true;
133
+ }
134
+ /** Input spec for an optional trigger parameter — the tool input may still be required. */
135
+ export interface RunAutomationOptionalInput {
136
+ /** Agent-facing input name; defaults to the trigger parameter name (the record key). */
137
+ readonly name?: string;
138
+ readonly description: string;
139
+ readonly required?: boolean;
140
+ }
141
+ /**
142
+ * The inputs record, keyed by the automation's DECLARED trigger parameter
143
+ * names: required params are non-optional keys whose spec demands
144
+ * `required: true`; optional params are optional keys.
145
+ */
146
+ export type RunAutomationInputs<T> = [keyof T] extends [never] ? {
147
+ readonly [key: string]: never;
148
+ } : {
149
+ readonly [K in RequiredParamKeys<T>]: RunAutomationRequiredInput;
150
+ } & {
151
+ readonly [K in Exclude<keyof T, RequiredParamKeys<T>>]?: RunAutomationOptionalInput;
152
+ };
153
+ export interface RunAutomationOutput {
154
+ /** Agent-facing output name; defaults to the workflow output property name (the record key). */
155
+ readonly name?: string;
156
+ }
157
+ /** The outputs record, keyed by the automation's workflow output property names. */
158
+ export type RunAutomationOutputs<O> = [keyof O] extends [never] ? {
159
+ readonly [key: string]: never;
160
+ } : {
161
+ readonly [K in keyof O]?: RunAutomationOutput;
162
+ };
163
+ export type RunAutomationToolV2<A extends AutomationCatalogRef> = CommonToolOptions & {
164
+ readonly automation: A;
165
+ readonly outputs?: RunAutomationOutputs<OutputBagOf<A>>;
166
+ } & ([RequiredParamKeys<TriggerBagOf<A>>] extends [never] ? {
167
+ readonly inputs?: RunAutomationInputs<TriggerBagOf<A>>;
168
+ } : {
169
+ readonly inputs: RunAutomationInputs<TriggerBagOf<A>>;
170
+ });
171
+ /**
172
+ * Run Automation tool (the product-language name; the wire kind is
173
+ * `executeWorkflow`). Inputs/outputs are TYPE-CONSTRAINED by the selected
174
+ * automation's catalog ref: record keys must be its declared trigger
175
+ * parameter / output property names, every REQUIRED parameter must be
176
+ * mapped (a non-optional key), and a required parameter's input must set
177
+ * `required: true`. The agent-facing name defaults to the record key;
178
+ * override with `name:`. `defineAgent().def()` re-validates at runtime.
179
+ *
180
+ * Reference tokens are synthesized from the record keys alone — the factory
181
+ * never dereferences `automation.trigger`/`outputs`, so agent files load
182
+ * safely against the catalog regen's STUB pass (empty bags). A foreign or
183
+ * hand-written automation token without bags degrades to permissive typing;
184
+ * def() validation skips bag-dependent checks for those.
185
+ *
186
+ * The legacy array surface lives on as {@link agentExecuteWorkflow}.
187
+ */
188
+ export declare function agentRunAutomation<A extends AutomationCatalogRef>(opts: RunAutomationToolV2<A>): AgentTool;
189
+ export interface RunAgentToolV2 extends CommonToolOptions {
190
+ readonly agent: AgentRef;
191
+ readonly workerTaskPrompt: string;
192
+ }
193
+ export declare function agentRunAgent(opts: RunAgentToolV2): AgentTool;
194
+ export interface McpToolV2 extends CommonToolOptions {
195
+ readonly serverUrl: string;
196
+ readonly mcpToolName: string;
197
+ readonly headers?: readonly AgentMcpHeader[];
198
+ }
199
+ export declare function agentMcp(opts: McpToolV2): AgentTool;
200
+ export interface SelectBotRouteToolV2 extends CommonToolOptions {
201
+ /** Bot route target id. Bots aren't modeled in the catalog yet — raw id. */
202
+ readonly botId: string;
203
+ }
204
+ export declare function agentSelectBotRoute(opts: SelectBotRouteToolV2): AgentTool;
205
+ export {};