@elementumai/edk 0.9.19 → 0.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (240) hide show
  1. package/README.md +159 -7
  2. package/dist-sdk/src/catalog/factories.d.ts +33 -2
  3. package/dist-sdk/src/catalog/factories.js +40 -1
  4. package/dist-sdk/src/catalog/from-authoring.d.ts +13 -8
  5. package/dist-sdk/src/catalog/from-authoring.js +34 -9
  6. package/dist-sdk/src/catalog/index.d.ts +2 -2
  7. package/dist-sdk/src/catalog/index.js +2 -2
  8. package/dist-sdk/src/catalog/render.js +6 -6
  9. package/dist-sdk/src/catalog/token.js +11 -0
  10. package/dist-sdk/src/catalog/types.d.ts +40 -1
  11. package/dist-sdk/src/catalog/types.js +12 -0
  12. package/dist-sdk/src/core/triggers/on-demand.d.ts +40 -4
  13. package/dist-sdk/src/core/triggers/on-demand.js +17 -2
  14. package/dist-sdk/src/core/types/app.d.ts +2 -2
  15. package/dist-sdk/src/engine/build/context.d.ts +1 -1
  16. package/dist-sdk/src/engine/coverage-gaps.d.ts +86 -0
  17. package/dist-sdk/src/engine/coverage-gaps.js +156 -0
  18. package/dist-sdk/src/engine/ei/run.d.ts +169 -0
  19. package/dist-sdk/src/engine/ei/run.js +1219 -0
  20. package/dist-sdk/src/engine/logging.d.ts +17 -0
  21. package/dist-sdk/src/engine/logging.js +18 -0
  22. package/dist-sdk/src/engine/pull/catalog-ref.d.ts +16 -0
  23. package/dist-sdk/src/engine/pull/catalog-ref.js +24 -0
  24. package/dist-sdk/src/engine/pull/context.d.ts +68 -6
  25. package/dist-sdk/src/engine/pull/context.js +40 -1
  26. package/dist-sdk/src/engine/pull/procedure-refs.d.ts +8 -0
  27. package/dist-sdk/src/engine/pull/procedure-refs.js +28 -0
  28. package/dist-sdk/src/engine/pull/ref-only.d.ts +5 -0
  29. package/dist-sdk/src/engine/pull/ref-only.js +10 -7
  30. package/dist-sdk/src/engine/pull/result-output.d.ts +6 -0
  31. package/dist-sdk/src/engine/pull/result-output.js +113 -3
  32. package/dist-sdk/src/engine/tf/expr.js +1 -1
  33. package/dist-sdk/src/engine/tf/index.d.ts +2 -2
  34. package/dist-sdk/src/engine/tf/index.js +1 -1
  35. package/dist-sdk/src/engine/tf/labels.d.ts +28 -5
  36. package/dist-sdk/src/engine/tf/labels.js +54 -3
  37. package/dist-sdk/src/engine/tf/model.d.ts +22 -1
  38. package/dist-sdk/src/engine/tf/parse.js +93 -4
  39. package/dist-sdk/src/engine/tf/render.d.ts +4 -2
  40. package/dist-sdk/src/engine/tf/render.js +41 -7
  41. package/dist-sdk/src/engine/validation.d.ts +44 -0
  42. package/dist-sdk/src/engine/validation.js +95 -0
  43. package/dist-sdk/src/entities/access-policy/from-tf.js +38 -1
  44. package/dist-sdk/src/entities/access-policy/principal.d.ts +2 -0
  45. package/dist-sdk/src/entities/access-policy/to-tf.js +5 -2
  46. package/dist-sdk/src/entities/agent/build.d.ts +4 -16
  47. package/dist-sdk/src/entities/agent/build.js +40 -5
  48. package/dist-sdk/src/entities/agent/deserializer/print-agent-v2.d.ts +3 -0
  49. package/dist-sdk/src/entities/agent/deserializer/print-agent-v2.js +46 -21
  50. package/dist-sdk/src/entities/agent/from-tf.js +11 -3
  51. package/dist-sdk/src/entities/agent/module.js +2 -0
  52. package/dist-sdk/src/entities/agent/to-tf.js +20 -6
  53. package/dist-sdk/src/entities/agent-tool/from-tf.d.ts +10 -1
  54. package/dist-sdk/src/entities/agent-tool/from-tf.js +18 -6
  55. package/dist-sdk/src/entities/agent-tool/module.js +3 -0
  56. package/dist-sdk/src/entities/agent-tool/to-tf.d.ts +2 -2
  57. package/dist-sdk/src/entities/agent-tool/to-tf.js +27 -5
  58. package/dist-sdk/src/entities/app/auto-share.d.ts +38 -0
  59. package/dist-sdk/src/entities/app/auto-share.js +49 -0
  60. package/dist-sdk/src/entities/app/build.d.ts +105 -22
  61. package/dist-sdk/src/entities/app/build.js +107 -10
  62. package/dist-sdk/src/entities/app/deserializer/normalize.d.ts +22 -1
  63. package/dist-sdk/src/entities/app/from-tf.d.ts +1 -0
  64. package/dist-sdk/src/entities/app/from-tf.js +11 -2
  65. package/dist-sdk/src/entities/app/index.d.ts +7 -6
  66. package/dist-sdk/src/entities/app/index.js +2 -8
  67. package/dist-sdk/src/entities/app/module.js +5 -2
  68. package/dist-sdk/src/entities/app/to-tf.d.ts +6 -0
  69. package/dist-sdk/src/entities/app/to-tf.js +40 -13
  70. package/dist-sdk/src/entities/automation/build.d.ts +56 -6
  71. package/dist-sdk/src/entities/automation/build.js +230 -26
  72. package/dist-sdk/src/entities/automation/calculation-expression.d.ts +7 -7
  73. package/dist-sdk/src/entities/automation/deserializer/print-automation.d.ts +41 -5
  74. package/dist-sdk/src/entities/automation/deserializer/print-automation.js +470 -58
  75. package/dist-sdk/src/entities/automation/from-tf.d.ts +37 -8
  76. package/dist-sdk/src/entities/automation/from-tf.js +791 -131
  77. package/dist-sdk/src/entities/automation/generated/task-output-contracts.d.ts +33 -0
  78. package/dist-sdk/src/entities/automation/generated/task-output-contracts.js +183 -0
  79. package/dist-sdk/src/entities/automation/index.d.ts +2 -2
  80. package/dist-sdk/src/entities/automation/index.js +1 -1
  81. package/dist-sdk/src/entities/automation/module.d.ts +3 -0
  82. package/dist-sdk/src/entities/automation/module.js +107 -15
  83. package/dist-sdk/src/entities/automation/output-field-types.d.ts +7 -0
  84. package/dist-sdk/src/entities/automation/output-field-types.js +36 -0
  85. package/dist-sdk/src/entities/automation/output-key-wire-name.d.ts +9 -0
  86. package/dist-sdk/src/entities/automation/output-key-wire-name.js +13 -0
  87. package/dist-sdk/src/entities/automation/script-code.d.ts +20 -0
  88. package/dist-sdk/src/entities/automation/script-code.js +109 -5
  89. package/dist-sdk/src/entities/automation/system-ref-name.js +4 -0
  90. package/dist-sdk/src/entities/automation/task-output-labels.d.ts +39 -0
  91. package/dist-sdk/src/entities/automation/task-output-labels.js +85 -0
  92. package/dist-sdk/src/entities/automation/tasks.d.ts +116 -22
  93. package/dist-sdk/src/entities/automation/tasks.js +86 -24
  94. package/dist-sdk/src/entities/automation/to-tf.d.ts +24 -3
  95. package/dist-sdk/src/entities/automation/to-tf.js +1082 -132
  96. package/dist-sdk/src/entities/automation/triggers.d.ts +12 -6
  97. package/dist-sdk/src/entities/automation/triggers.js +4 -0
  98. package/dist-sdk/src/entities/automation/types.d.ts +9 -0
  99. package/dist-sdk/src/entities/automation/types.js +19 -0
  100. package/dist-sdk/src/entities/automation/value-ref-tf.d.ts +1 -1
  101. package/dist-sdk/src/entities/automation/value-ref-tf.js +1 -1
  102. package/dist-sdk/src/entities/chart/from-tf.js +9 -1
  103. package/dist-sdk/src/entities/chart/to-tf.js +10 -3
  104. package/dist-sdk/src/entities/data-lookup/module.js +2 -0
  105. package/dist-sdk/src/entities/dynamic-layout/build.d.ts +24 -31
  106. package/dist-sdk/src/entities/dynamic-layout/to-tf.d.ts +1 -0
  107. package/dist-sdk/src/entities/dynamic-layout/to-tf.js +7 -5
  108. package/dist-sdk/src/entities/element/build.d.ts +28 -13
  109. package/dist-sdk/src/entities/element/build.js +5 -1
  110. package/dist-sdk/src/entities/element/from-tf.d.ts +11 -0
  111. package/dist-sdk/src/entities/element/from-tf.js +62 -1
  112. package/dist-sdk/src/entities/element/index.d.ts +5 -3
  113. package/dist-sdk/src/entities/element/index.js +1 -0
  114. package/dist-sdk/src/entities/element/module.js +9 -3
  115. package/dist-sdk/src/entities/element/to-tf.d.ts +1 -1
  116. package/dist-sdk/src/entities/element/to-tf.js +16 -16
  117. package/dist-sdk/src/entities/field/build.d.ts +17 -3
  118. package/dist-sdk/src/entities/field/build.js +3 -0
  119. package/dist-sdk/src/entities/field/calc.d.ts +7 -7
  120. package/dist-sdk/src/entities/field/from-tf.d.ts +5 -4
  121. package/dist-sdk/src/entities/field/from-tf.js +244 -49
  122. package/dist-sdk/src/entities/field/media-types.d.ts +6 -0
  123. package/dist-sdk/src/entities/field/media-types.js +30 -0
  124. package/dist-sdk/src/entities/field/module.js +2 -0
  125. package/dist-sdk/src/entities/field/options.js +6 -1
  126. package/dist-sdk/src/entities/field/to-tf.d.ts +26 -5
  127. package/dist-sdk/src/entities/field/to-tf.js +137 -15
  128. package/dist-sdk/src/entities/field/types.d.ts +2 -0
  129. package/dist-sdk/src/entities/field/types.js +27 -0
  130. package/dist-sdk/src/entities/file-reader/from-tf.js +14 -5
  131. package/dist-sdk/src/entities/file-reader/module.js +1 -0
  132. package/dist-sdk/src/entities/file-reader/types.d.ts +2 -0
  133. package/dist-sdk/src/entities/file-reader/types.js +1 -1
  134. package/dist-sdk/src/entities/portal/build.d.ts +26 -0
  135. package/dist-sdk/src/entities/portal/build.js +37 -0
  136. package/dist-sdk/src/entities/portal/from-tf.d.ts +27 -0
  137. package/dist-sdk/src/entities/portal/from-tf.js +75 -0
  138. package/dist-sdk/src/entities/portal/index.d.ts +1 -0
  139. package/dist-sdk/src/entities/portal/index.js +1 -0
  140. package/dist-sdk/src/entities/portal/module.d.ts +3 -0
  141. package/dist-sdk/src/entities/portal/module.js +28 -0
  142. package/dist-sdk/src/entities/portal/to-tf.d.ts +12 -0
  143. package/dist-sdk/src/entities/portal/to-tf.js +73 -0
  144. package/dist-sdk/src/entities/portal/types.d.ts +1 -0
  145. package/dist-sdk/src/entities/portal/types.js +1 -0
  146. package/dist-sdk/src/entities/relationship/module.js +2 -0
  147. package/dist-sdk/src/entities/relationship/pair-check.d.ts +7 -0
  148. package/dist-sdk/src/entities/relationship/pair-check.js +68 -0
  149. package/dist-sdk/src/entities/relationship/to-tf.d.ts +2 -0
  150. package/dist-sdk/src/entities/relationship/to-tf.js +12 -3
  151. package/dist-sdk/src/entities/role/from-tf.js +3 -3
  152. package/dist-sdk/src/entities/role/to-tf.d.ts +2 -0
  153. package/dist-sdk/src/entities/role/to-tf.js +12 -4
  154. package/dist-sdk/src/entities/search-table/module.js +1 -0
  155. package/dist-sdk/src/entities/search-table/to-tf.d.ts +1 -0
  156. package/dist-sdk/src/entities/search-table/to-tf.js +1 -1
  157. package/dist-sdk/src/entities/service-account/build.d.ts +15 -2
  158. package/dist-sdk/src/entities/service-account/from-tf.d.ts +2 -4
  159. package/dist-sdk/src/entities/service-account/from-tf.js +20 -8
  160. package/dist-sdk/src/entities/service-account/role-fidelity.d.ts +56 -0
  161. package/dist-sdk/src/entities/service-account/role-fidelity.js +243 -0
  162. package/dist-sdk/src/entities/service-account/to-tf.d.ts +14 -0
  163. package/dist-sdk/src/entities/service-account/to-tf.js +17 -0
  164. package/dist-sdk/src/entities/service-account/workspace-owner.d.ts +16 -0
  165. package/dist-sdk/src/entities/service-account/workspace-owner.js +22 -0
  166. package/dist-sdk/src/entities/shared/aspect-target-from-tf.d.ts +1 -1
  167. package/dist-sdk/src/entities/shared/aspect-target-from-tf.js +5 -2
  168. package/dist-sdk/src/entities/shared/filters/ast.d.ts +23 -1
  169. package/dist-sdk/src/entities/shared/filters/ast.js +2 -0
  170. package/dist-sdk/src/entities/shared/filters/index.d.ts +7 -0
  171. package/dist-sdk/src/entities/shared/filters/index.js +19 -4
  172. package/dist-sdk/src/entities/shared/filters/print.js +24 -3
  173. package/dist-sdk/src/entities/shared/filters/tf-codec.d.ts +7 -0
  174. package/dist-sdk/src/entities/shared/filters/tf-codec.js +46 -7
  175. package/dist-sdk/src/entities/shared/filters/types.d.ts +15 -2
  176. package/dist-sdk/src/entities/shared/ref.d.ts +5 -7
  177. package/dist-sdk/src/entities/shared/ref.js +5 -7
  178. package/dist-sdk/src/entities/shared/tool-field-ref.d.ts +9 -0
  179. package/dist-sdk/src/entities/shared/tool-field-ref.js +35 -2
  180. package/dist-sdk/src/entities/shared/types/field-types.d.ts +20 -5
  181. package/dist-sdk/src/entities/shared/types/field-types.js +8 -0
  182. package/dist-sdk/src/entities/skill/access-policy.js +3 -3
  183. package/dist-sdk/src/entities/skill/deserializer/print-skill-v2.d.ts +3 -0
  184. package/dist-sdk/src/entities/skill/deserializer/print-skill-v2.js +14 -6
  185. package/dist-sdk/src/entities/skill/from-tf.js +70 -15
  186. package/dist-sdk/src/entities/skill/input-coverage.d.ts +7 -0
  187. package/dist-sdk/src/entities/skill/input-coverage.js +11 -0
  188. package/dist-sdk/src/entities/skill/module.js +2 -0
  189. package/dist-sdk/src/entities/skill/to-tf.js +14 -4
  190. package/dist-sdk/src/entities/skill-tool/from-tf.d.ts +2 -0
  191. package/dist-sdk/src/entities/skill-tool/from-tf.js +49 -10
  192. package/dist-sdk/src/entities/skill-tool/module.js +3 -0
  193. package/dist-sdk/src/entities/skill-tool/to-tf.d.ts +2 -8
  194. package/dist-sdk/src/entities/skill-tool/to-tf.js +49 -14
  195. package/dist-sdk/src/entities/table/catalog.d.ts +14 -0
  196. package/dist-sdk/src/entities/table/catalog.js +66 -0
  197. package/dist-sdk/src/entities/table/module.js +2 -1
  198. package/dist-sdk/src/entities/table/to-tf.js +2 -2
  199. package/dist-sdk/src/entities/task/build.d.ts +8 -0
  200. package/dist-sdk/src/entities/task/build.js +10 -1
  201. package/dist-sdk/src/entities/task/from-tf.d.ts +4 -2
  202. package/dist-sdk/src/entities/task/from-tf.js +7 -2
  203. package/dist-sdk/src/entities/task/module.js +2 -2
  204. package/dist-sdk/src/entities/task/to-tf.d.ts +8 -4
  205. package/dist-sdk/src/entities/task/to-tf.js +28 -1
  206. package/dist-sdk/src/entities/view/agent-view-layout-from-tf.d.ts +49 -9
  207. package/dist-sdk/src/entities/view/agent-view-layout-from-tf.js +71 -18
  208. package/dist-sdk/src/entities/view/agent-view-layout-to-tf.d.ts +19 -4
  209. package/dist-sdk/src/entities/view/agent-view-layout-to-tf.js +82 -10
  210. package/dist-sdk/src/entities/view/agent-view-layout.d.ts +53 -23
  211. package/dist-sdk/src/entities/view/agent-view-layout.js +1 -1
  212. package/dist-sdk/src/entities/view/from-tf.d.ts +3 -2
  213. package/dist-sdk/src/entities/view/from-tf.js +133 -13
  214. package/dist-sdk/src/entities/view/module.js +30 -3
  215. package/dist-sdk/src/entities/view/to-tf.d.ts +20 -8
  216. package/dist-sdk/src/entities/view/to-tf.js +86 -18
  217. package/dist-sdk/src/entities/view/types.d.ts +4 -15
  218. package/dist-sdk/src/entities/view/types.js +15 -15
  219. package/dist-sdk/src/entities/visual-flow/build.d.ts +16 -1
  220. package/dist-sdk/src/entities/visual-flow/build.js +9 -0
  221. package/dist-sdk/src/entities/visual-flow/from-tf.d.ts +14 -0
  222. package/dist-sdk/src/entities/visual-flow/from-tf.js +51 -3
  223. package/dist-sdk/src/entities/visual-flow/index.d.ts +1 -1
  224. package/dist-sdk/src/entities/visual-flow/index.js +1 -1
  225. package/dist-sdk/src/entities/visual-flow/printer.js +19 -0
  226. package/dist-sdk/src/entities/visual-flow/to-tf.js +87 -3
  227. package/dist-sdk/src/entities/widget/build.d.ts +16 -1
  228. package/dist-sdk/src/entities/widget/build.js +11 -1
  229. package/dist-sdk/src/entities/widget/from-tf.js +3 -3
  230. package/dist-sdk/src/entities/widget/to-tf.d.ts +2 -0
  231. package/dist-sdk/src/entities/widget/to-tf.js +41 -14
  232. package/dist-sdk/src/generated/ragnarok/ragnarok-spec.d.ts +148 -13
  233. package/dist-sdk/src/generated/ragnarok/ragnarok-spec.js +2 -2
  234. package/dist-sdk/src/graph/index.d.ts +12 -0
  235. package/dist-sdk/src/graph/index.js +21 -0
  236. package/dist-sdk/src/graph/modules.js +2 -0
  237. package/dist-sdk/src/graph/types.d.ts +83 -4
  238. package/dist-sdk/src/internal/sdk-package.d.ts +1 -1
  239. package/dist-sdk/src/internal/sdk-package.js +1 -0
  240. package/package.json +16 -3
@@ -102,7 +102,7 @@ export type PanesBlockProps = {
102
102
  /**
103
103
  * Customer-facing name: List controls
104
104
  * Customer-facing description: Search, filters, grouping, and sort controls that sit above a list.
105
- * Internal authoring guidance: Toolbar of search, Open/Closed quick filters, filter popover, group-by, and sort. For a shared view filter, put filterPreset here as the optional seed and bind filterJson to $bindState: "/query/filter"; this block owns FormFilters, writes the composed/applied JSON back to that path, and self-fetching siblings bound to it refetch automatically. Keep quickFilterValue separate as the Open/Closed status control. Looks like list chrome above a collection, not the results themselves.
105
+ * Internal authoring guidance: Toolbar of search, quick filters, filter popover, group-by, and sort. Prefer a `kind: "filters"` list. `kind: "statusGroups"` is legacyStatusGroups: Open/Closed only, with no All chip. If a spec already has legacyStatusGroups or filterPreset and the user is changing filters, rewrite them into one `kind: "filters"` list. Put a preset filter on the chips that should include it. Do not leave filterPreset beside that list. Bind quickFilterValue to $bindState: "/query/statusGroup". Bind filterJson to $bindState: "/query/filter". When a view has more than one App, bind every App to /query/filter/<aspectId> and /query/statusGroup/<aspectId>. A view with one App keeps the shared paths. filterJson is the menu filter the list uses, besides the managed filter. A kind: "filters" chip writes its filter there. legacyStatusGroups writes the preset and Open/Closed there together. A preset alone fills the menu when there is no chip list. The All chip and a cleared filter menu do not return to this preset. The block applies the managed filter at query time and does not store it in filterJson. This block writes that JSON; self-fetching siblings on the same App bound to the same path refetch from it. Looks like list chrome above a collection, not the results themselves. `field` is the aspect field id, not the display name. A picklist value is { "type": "TEXT", "value": "<id>" }. Do not use `UUID` for that id. A dynamic id is the related record id `aspectId:handle`, still `TEXT`. `AspectPicklistField` uses `EQUALS`. `AspectMultiPicklistField` uses `CONTAINS` with one `TEXT` value. Open/Closed chips are statusGroup with filter omitted: { id, label, statusGroup: "open" | "closed" }. The toolbar builds that clause from the STATUS field and every CLOSED picklist tag and writes it into filterJson. Open is status not in those values. Closed is status in those values. Do not author that tree, do not use the STAGE field, and do not use the words "open" or "closed" as values. A specific status such as Pending is a normal chip filter: STATUS field id, value id from findPicklistValue, EQUALS, TEXT value. All is filter null and no statusGroup, only when the admin asks. Mix All, statusGroup chips, and named chips in one `kind: "filters"` list. A chip that already has `filter` uses that tree. Put the admin default on sortPreset as a Sort document with aspect field ids in orders[].field. Bind sortJson to $bindState: "/query/sort". ListControls writes the live sort and /query/sortAspectId from filterAspectId. Keep sort out of filterJson. The menu offers system fields by semantic tag. Restore copies sortPreset back into sortJson during the visit.
106
106
  */
107
107
  export type ListControlsBlockElement = {
108
108
  readonly type: "ListControlsBlock";
@@ -129,13 +129,36 @@ export type ListControlsBlockProps = {
129
129
  readonly sortByValue?: ((string) | (PropExpression)) | (null);
130
130
  readonly sortByDirection?: ("ASC" | "DESC") | (PropExpression);
131
131
  readonly sortByOptions?: (ReadonlyArray<ListControlsOption>) | (PropExpression);
132
+ readonly sortJson?: (((JsonSafeState) & ((string) | (number) | (boolean) | (null) | (ReadonlyArray<OpaqueJson>) | ({
133
+ readonly [key: string]: OpaqueJson;
134
+ }))) | (PropExpression)) | (null);
135
+ readonly sortPreset?: ({
136
+ readonly orders: (ReadonlyArray<{
137
+ readonly field: string;
138
+ readonly direction: "ASC" | "DESC";
139
+ }>) | (PropExpression);
140
+ }) | (PropExpression);
132
141
  };
133
142
  export type JsonSafeState = OpaqueJson;
134
- export type ListControlsQuickFilters = {
143
+ export type ListControlsQuickFilters = ({
144
+ readonly kind: ("filters") | (PropExpression);
145
+ readonly chips: (ReadonlyArray<{
146
+ readonly id: string;
147
+ readonly label: string;
148
+ readonly filter?: ((JsonSafeState) & ((string) | (number) | (boolean) | (null) | (ReadonlyArray<OpaqueJson>) | ({
149
+ readonly [key: string]: OpaqueJson;
150
+ }))) | (null);
151
+ /**
152
+ * Set "open" or "closed" and omit filter. Runtime uses the STATUS field and every CLOSED picklist tag. Open is status not in those values. Closed is status in those values. Ignored when filter is set.
153
+ */
154
+ readonly statusGroup?: "open" | "closed";
155
+ }>) | (PropExpression);
156
+ readonly defaultValue?: (string) | (PropExpression);
157
+ }) | ({
135
158
  readonly kind?: ("statusGroups") | (PropExpression);
136
159
  readonly groups?: (ReadonlyArray<"open" | "closed">) | (PropExpression);
137
160
  readonly defaultValue?: ("open" | "closed") | (PropExpression);
138
- };
161
+ });
139
162
  export type ListControlsOption = {
140
163
  readonly value: string;
141
164
  readonly label: string;
@@ -144,7 +167,7 @@ export type ListControlsOption = {
144
167
  /**
145
168
  * Customer-facing name: Record list
146
169
  * Customer-facing description: A compact stacked list of records with titles and status pills. Use it for queues and pickers.
147
- * Internal authoring guidance: Dual presentational/self-fetching selectable stacked list with title, identifier, pills, and optional collapsible groups. Place every ListCollectionBlock under a root PanesBlock so clicks can support secondary/detail panes. Use items for authored content, or aspectId/search/filter props for live records; self-fetching falls back to the runtime default aspect. To share a ListControls filter, bind filterJson and use the same filterPreset on this list; state changes refetch it. Use filterPreset without that binding only for an independent list seed. Looks like a ticket queue, not a spreadsheet. Prefer DataTableBlock for dense columns.
170
+ * Internal authoring guidance: Dual presentational/self-fetching selectable stacked list with title, identifier, pills, and optional collapsible groups. Place every ListCollectionBlock under a root PanesBlock so clicks can support secondary/detail panes. Use items for authored content, or aspectId/search/filter props for live records; self-fetching falls back to the runtime default aspect. To share a ListControls filter, bind filterJson and use the same filterPreset on this list; state changes refetch it. When a view has more than one App, bind every App to /query/filter/<aspectId> and /query/statusGroup/<aspectId>. A view with one App keeps the shared paths. Use filterPreset without that binding only for an independent list seed. Looks like a ticket queue, not a spreadsheet. Prefer DataTableBlock for dense columns.
148
171
  */
149
172
  export type ListCollectionBlockElement = {
150
173
  readonly type: "ListCollectionBlock";
@@ -207,6 +230,15 @@ export type ListCollectionBlockSelfFetchingProps = {
207
230
  readonly [key: string]: OpaqueJson;
208
231
  }))) | (PropExpression)) | (null);
209
232
  readonly filterPreset?: ((("createdByCurrentUser" | "createdInLast24Hours" | "createdInLast7Days" | "createdInLast30Days" | "createdInLast90Days" | "createdInLastYear" | "closedInLast24Hours" | "closedInLast7Days" | "closedInLast30Days" | "closedInLast90Days" | "closedInLastYear" | "assignedToCurrentUser" | "unassigned") | (PropExpression)) | ((ReadonlyArray<"createdByCurrentUser" | "createdInLast24Hours" | "createdInLast7Days" | "createdInLast30Days" | "createdInLast90Days" | "createdInLastYear" | "closedInLast24Hours" | "closedInLast7Days" | "closedInLast30Days" | "closedInLast90Days" | "closedInLastYear" | "assignedToCurrentUser" | "unassigned">) | (PropExpression))) | (PropExpression);
233
+ readonly sortJson?: (((JsonSafeState) & ((string) | (number) | (boolean) | (null) | (ReadonlyArray<OpaqueJson>) | ({
234
+ readonly [key: string]: OpaqueJson;
235
+ }))) | (PropExpression)) | (null);
236
+ readonly sortPreset?: ({
237
+ readonly orders: (ReadonlyArray<{
238
+ readonly field: string;
239
+ readonly direction: "ASC" | "DESC";
240
+ }>) | (PropExpression);
241
+ }) | (PropExpression);
210
242
  readonly quickFilterValue?: ((string) | (PropExpression)) | (null);
211
243
  };
212
244
  /**
@@ -383,7 +415,7 @@ export type CardBlockProps = {
383
415
  /**
384
416
  * Customer-facing name: Data table
385
417
  * Customer-facing description: A spreadsheet-style table with typed columns for structured rows.
386
- * Internal authoring guidance: Dual presentational/self-fetching data table with typed columns, row selection, optional nested children, and loading/empty/error states. Use rows or object columns for authored data, or aspectId/record columns for live records; self-fetching falls back to the runtime default aspect. Presentational rows may set href (absolute https:// opens a new tab, "/path" navigates inside Elementum) so the primary title cell renders as a link; same rules as ActionCardBlock. Per-cell links use a cell-hint object with href. To share a ListControls filter, bind filterJson and use the same filterPreset on this table; state changes refetch it. Use filterPreset without that binding only for an independent table seed. Looks like a spreadsheet-style grid; wrap in CardBlock with padding "none". Prefer ListCollectionBlock for compact record queues.
418
+ * Internal authoring guidance: Dual presentational/self-fetching data table with typed columns, row selection, optional nested children, and loading/empty/error states. Use rows or object columns for authored data, or aspectId/record columns for live records; self-fetching falls back to the runtime default aspect. Presentational rows may set href (absolute https:// opens a new tab, "/path" navigates inside Elementum) so the primary title cell renders as a link; same rules as ActionCardBlock. Per-cell links use a cell-hint object with href. To share a ListControls filter, bind filterJson and use the same filterPreset on this table; state changes refetch it. When a view has more than one App, bind every App to /query/filter/<aspectId> and /query/statusGroup/<aspectId>. A view with one App keeps the shared paths. Use filterPreset without that binding only for an independent table seed. Looks like a spreadsheet-style grid; wrap in CardBlock with padding "none". Prefer ListCollectionBlock for compact record queues.
387
419
  */
388
420
  export type DataTableBlockElement = {
389
421
  readonly type: "DataTableBlock";
@@ -452,6 +484,15 @@ export type DataTableBlockSelfFetchingProps = {
452
484
  readonly [key: string]: OpaqueJson;
453
485
  }))) | (PropExpression)) | (null);
454
486
  readonly filterPreset?: ((("createdByCurrentUser" | "createdInLast24Hours" | "createdInLast7Days" | "createdInLast30Days" | "createdInLast90Days" | "createdInLastYear" | "closedInLast24Hours" | "closedInLast7Days" | "closedInLast30Days" | "closedInLast90Days" | "closedInLastYear" | "assignedToCurrentUser" | "unassigned") | (PropExpression)) | ((ReadonlyArray<"createdByCurrentUser" | "createdInLast24Hours" | "createdInLast7Days" | "createdInLast30Days" | "createdInLast90Days" | "createdInLastYear" | "closedInLast24Hours" | "closedInLast7Days" | "closedInLast30Days" | "closedInLast90Days" | "closedInLastYear" | "assignedToCurrentUser" | "unassigned">) | (PropExpression))) | (PropExpression);
487
+ readonly sortJson?: (((JsonSafeState) & ((string) | (number) | (boolean) | (null) | (ReadonlyArray<OpaqueJson>) | ({
488
+ readonly [key: string]: OpaqueJson;
489
+ }))) | (PropExpression)) | (null);
490
+ readonly sortPreset?: ({
491
+ readonly orders: (ReadonlyArray<{
492
+ readonly field: string;
493
+ readonly direction: "ASC" | "DESC";
494
+ }>) | (PropExpression);
495
+ }) | (PropExpression);
455
496
  readonly quickFilterValue?: ((string) | (PropExpression)) | (null);
456
497
  readonly selectedAspectId?: ((string) | (PropExpression)) | (null);
457
498
  readonly selectedHandle?: ((string) | (PropExpression)) | (null);
@@ -492,7 +533,7 @@ export type ActionCardItem = {
492
533
  /**
493
534
  * Customer-facing name: Chart
494
535
  * Customer-facing description: A bar, line, or donut chart in a card. Use it to compare values or show a trend.
495
- * Internal authoring guidance: Plot-only report chart in a card with optional title, metric, and caption, branded primary default palette, and no download. Use live grouped count fetch (aspectId + stable groupByFieldId) for useful bar, line, or donut category charts; bar and line share the same grouped dataset. Grouped count supports uncalculated single-value picklist/text fields plus filterJson/filterPreset and named quickFilterValue, ANDed with the block filter. Bind filterJson and use the same filterPreset as ListControls when the chart shares the view filter; omit that binding and give the chart its own filterPreset/filterJson when it should measure a different slice. Use date series (aspectId + stable dateFieldId, saved bucket day/week/month, and YYYY-MM-DD/YYYY-MM-DD range) for a bar or line trend. The range is sent as a BETWEEN on that date field; plot the returned points in order, including zeros the API already filled. A blank range draws the empty plot. There is no runtime bucket switch. Use scalar fetch (aggregation + aspectId, optional fieldId/filterJson/filterPreset/quickFilterValue) only for one observation; prefer MetricsRowBlock for a single KPI and never present one scalar line point as a trend. Nonempty filterJson wins; a preset is only a seed. Never mix fetch and embedded data. Use embedded data for preview or when the agent already owns the complete dataset. Grouped numeric sum/avg/min/max is not supported by this count-shaped API. Pair charts with DataTableBlock/ListCollectionBlock and MetricsRowBlock to build dashboards.
536
+ * Internal authoring guidance: Plot-only report chart in a card with optional title, metric, and caption, branded primary default palette, and no download. Use live grouped count fetch (aspectId + stable groupByFieldId) for useful bar, line, or donut category charts; bar and line share the same grouped dataset. Grouped count supports uncalculated single-value picklist/text fields plus filterJson/filterPreset and named quickFilterValue, ANDed with the block filter. Bind filterJson and use the same filterPreset as ListControls when the chart shares the view filter; omit that binding and give the chart its own filterPreset/filterJson when it should measure a different slice. Use date series (aspectId + stable dateFieldId, saved bucket day/week/month, and either an exact YYYY-MM-DD/YYYY-MM-DD range or relativeRange) for a bar or line trend. Exact range is a BETWEEN on that date field. relativeRange is { count, unit, optional offset } with unit day, week, month, quarter, or year. The runtime resolves it to an inclusive local-calendar BETWEEN that moves with today. Omit offset to include the current unfinished unit; offset 1 is the previous complete unit or units. Quarter and year have no series granularity, so set bucket to month unless a day or week bucket is intended. Set only one window. Write the window in the Spec. The builder has no range control. Plot the returned points in order, including zeros the API already filled. A blank window draws the empty plot. There is no runtime bucket switch. Use scalar fetch (aggregation + aspectId, optional fieldId/filterJson/filterPreset/quickFilterValue) only for one observation; prefer MetricsRowBlock for a single KPI and never present one scalar line point as a trend. Nonempty filterJson wins; a preset is only a seed. Never mix fetch and embedded data. Use embedded data for preview or when the agent already owns the complete dataset. Grouped numeric sum/avg/min/max is not supported by this count-shaped API. Pair charts with DataTableBlock/ListCollectionBlock and MetricsRowBlock to build dashboards.
496
537
  */
497
538
  export type ChartBlockElement = {
498
539
  readonly type: "ChartBlock";
@@ -561,12 +602,18 @@ export type ChartBlockDateSeriesProps = {
561
602
  readonly dateFieldId: (string) | (PropExpression);
562
603
  readonly bucket?: ("day" | "week" | "month") | (PropExpression);
563
604
  readonly range?: (string) | (PropExpression);
605
+ readonly relativeRange?: (ChartBlockRelativeRange) | (PropExpression);
564
606
  readonly filterJson?: (((JsonSafeState) & ((string) | (number) | (boolean) | (null) | (ReadonlyArray<OpaqueJson>) | ({
565
607
  readonly [key: string]: OpaqueJson;
566
608
  }))) | (PropExpression)) | (null);
567
609
  readonly filterPreset?: ((("createdByCurrentUser" | "createdInLast24Hours" | "createdInLast7Days" | "createdInLast30Days" | "createdInLast90Days" | "createdInLastYear" | "closedInLast24Hours" | "closedInLast7Days" | "closedInLast30Days" | "closedInLast90Days" | "closedInLastYear" | "assignedToCurrentUser" | "unassigned") | (PropExpression)) | ((ReadonlyArray<"createdByCurrentUser" | "createdInLast24Hours" | "createdInLast7Days" | "createdInLast30Days" | "createdInLast90Days" | "createdInLastYear" | "closedInLast24Hours" | "closedInLast7Days" | "closedInLast30Days" | "closedInLast90Days" | "closedInLastYear" | "assignedToCurrentUser" | "unassigned">) | (PropExpression))) | (PropExpression);
568
610
  readonly quickFilterValue?: ((string) | (PropExpression)) | (null);
569
611
  };
612
+ export type ChartBlockRelativeRange = {
613
+ readonly count: (number) | (PropExpression);
614
+ readonly unit: ("day" | "week" | "month" | "quarter" | "year") | (PropExpression);
615
+ readonly offset?: (number) | (PropExpression);
616
+ };
570
617
  /**
571
618
  * Customer-facing name: Metrics
572
619
  * Customer-facing description: A single KPI tile with a caption and prominent value.
@@ -631,7 +678,7 @@ export type MetricsRowSelfFetchProps = {
631
678
  /**
632
679
  * Customer-facing name: Page header
633
680
  * Customer-facing description: A compact heading with a short description and actions at the top of a page.
634
- * Internal authoring guidance: Compact page-level heading with supporting description, icon badge, and primary or outline actions. Best used once at the top of a page or managed view as a child of a StackBlock. Give an action an href to navigate (absolute https:// opens a new tab, "/path" navigates inside Elementum); omit href to make it a press action that writes selectedActionId and emits actionPress. Handle actionPress with any host action the view supports, such as createRecord or triggerAutomation. Use DataTableBlock or ListCollectionBlock for collection content and HeaderBlock or BodyBlock for headings inside a detail section.
681
+ * Internal authoring guidance: Compact page-level heading with supporting description, icon badge, and primary or outline actions. Best used once at the top of a page or managed view as a child of a StackBlock. Each action is a link (href) or an action (onPress); never set both. Give an action an href to navigate (absolute https:// opens a new tab, "/path" navigates inside Elementum). A createRecord onPress opens the host create-record dialog for that App. A triggerAutomation onPress runs one on-demand automation from a literal automationId. Prefer recordId { "$state": "/selection/recordId" } for the selected row; a literal recordId must be {aspectUuid}:{handle}, never a handle alone or a fake prefix. Omit recordId to let the user pick. copy goes inside params, never beside action. Shape: params: { automationId, recordId?, copy?: { confirm?, pending?, success?, failure? } }. Omit copy to use the defaults Save / Saving… / Saved / Save failed. Do not invent these strings. Use DataTableBlock or ListCollectionBlock for collection content and HeaderBlock or BodyBlock for headings inside a detail section.
635
682
  */
636
683
  export type PageHeaderBlockElement = {
637
684
  readonly type: "PageHeaderBlock";
@@ -650,7 +697,8 @@ export type PageHeaderBlockProps = {
650
697
  readonly actions?: ((ReadonlyArray<PageHeaderAction>) | (PropExpression)) | (null);
651
698
  readonly selectedActionId?: ((string) | (PropExpression)) | (null);
652
699
  };
653
- export type PageHeaderAction = {
700
+ export type PageHeaderAction = (PageHeaderLinkAction) | (PageHeaderPressAction) | (PageHeaderLegacyAction);
701
+ export type PageHeaderLinkAction = {
654
702
  readonly id: string;
655
703
  readonly label: string;
656
704
  readonly variant?: "primary" | "outline";
@@ -658,12 +706,94 @@ export type PageHeaderAction = {
658
706
  /**
659
707
  * Navigation target. Use an absolute http(s) URL or a root-relative /path. Same rules as ActionCardBlock card href.
660
708
  */
661
- readonly href?: string;
709
+ readonly href: string;
710
+ };
711
+ export type PageHeaderPressAction = {
712
+ readonly id: string;
713
+ readonly label: string;
714
+ readonly variant?: "primary" | "outline";
715
+ readonly disabled?: boolean;
716
+ /**
717
+ * Non-navigation action, such as createRecord with an aspectId parameter or triggerAutomation with an automationId, optional recordId ({aspectUuid}:{handle}, or omit to pick), and optional copy inside params (never beside action): copy?: { confirm?, pending?, success?, failure? }. Omit copy for Save / Saving… / Saved / Save failed. Do not set href on the same action.
718
+ */
719
+ readonly onPress: {
720
+ readonly action: string;
721
+ readonly params?: {
722
+ readonly copy?: {
723
+ readonly confirm?: string;
724
+ readonly pending?: string;
725
+ readonly success?: string;
726
+ readonly failure?: string;
727
+ };
728
+ } & {
729
+ readonly [key: string]: (string) | (number) | (boolean) | (null) | ({
730
+ readonly $state: string;
731
+ } & {
732
+ readonly [key: string]: unknown;
733
+ });
734
+ };
735
+ readonly confirm?: {
736
+ readonly title: string;
737
+ readonly message: string;
738
+ readonly confirmLabel?: string;
739
+ readonly cancelLabel?: string;
740
+ readonly variant?: "default" | "danger";
741
+ } & {
742
+ readonly [key: string]: unknown;
743
+ };
744
+ readonly onSuccess?: ({
745
+ readonly navigate: string;
746
+ } & {
747
+ readonly [key: string]: unknown;
748
+ }) | ({
749
+ readonly set: {
750
+ readonly [key: string]: unknown;
751
+ };
752
+ } & {
753
+ readonly [key: string]: unknown;
754
+ }) | ({
755
+ readonly action: string;
756
+ readonly params?: {
757
+ readonly [key: string]: (string) | (number) | (boolean) | (null) | ({
758
+ readonly $state: string;
759
+ } & {
760
+ readonly [key: string]: unknown;
761
+ });
762
+ };
763
+ } & {
764
+ readonly [key: string]: unknown;
765
+ });
766
+ readonly onError?: ({
767
+ readonly set: {
768
+ readonly [key: string]: unknown;
769
+ };
770
+ } & {
771
+ readonly [key: string]: unknown;
772
+ }) | ({
773
+ readonly action: string;
774
+ readonly params?: {
775
+ readonly [key: string]: (string) | (number) | (boolean) | (null) | ({
776
+ readonly $state: string;
777
+ } & {
778
+ readonly [key: string]: unknown;
779
+ });
780
+ };
781
+ } & {
782
+ readonly [key: string]: unknown;
783
+ });
784
+ readonly preventDefault?: boolean;
785
+ };
786
+ };
787
+ export type PageHeaderLegacyAction = {
788
+ readonly id: string;
789
+ readonly label: string;
790
+ readonly variant?: "primary" | "outline";
791
+ readonly disabled?: boolean;
662
792
  };
663
793
  /**
664
794
  * Customer-facing name: Buttons
665
795
  * Customer-facing description: A row of buttons that link to pages or run actions.
666
- * Internal authoring guidance: A responsive row of buttons. Each item is a link (href, optional viewId), an action (onPress), or a static button (neither); never set both href and onPress. Omitted emphasis defaults to primary for onPress buttons and secondary for links. Set it explicitly for tertiary alternates or destructive actions. A createRecord onPress opens the host create-record dialog for that App. A triggerAutomation onPress runs one on-demand automation from a literal automationId. Host actions such as createRecord and triggerAutomation also work on PageHeaderBlock via actionPress. The row stacks in narrow panes. Use PageHeaderBlock actions for page-level heading buttons.
796
+ * Internal authoring guidance: A responsive row of buttons. Each item is a link (href, optional viewId), an action (onPress), or a static button (neither); never set both href and onPress. Omitted emphasis defaults to primary for onPress buttons and secondary for links. Set it explicitly for tertiary alternates or destructive actions. A createRecord onPress opens the host create-record dialog for that App. A triggerAutomation onPress runs one on-demand automation from a literal automationId. Prefer recordId { "$state": "/selection/recordId" } for the selected row; a literal recordId must be {aspectUuid}:{handle}, never a handle alone or a fake prefix. Omit recordId to let the user pick. copy goes inside params, never beside action. Shape: params: { automationId, recordId?, copy?: { confirm?, pending?, success?, failure? } }. Omit copy to use the defaults Save / Saving… / Saved / Save failed. Do not invent these strings. Host actions such as createRecord and triggerAutomation also work on PageHeaderBlock via onPress. The row stacks in narrow panes. Use PageHeaderBlock actions for page-level heading buttons.
667
797
  */
668
798
  export type ButtonBlockElement = {
669
799
  readonly type: "ButtonBlock";
@@ -725,11 +855,18 @@ export type ButtonBlockActionItem = {
725
855
  readonly icon?: string;
726
856
  readonly disabled?: boolean;
727
857
  /**
728
- * Non-navigation action, such as createRecord with an aspectId parameter or triggerAutomation with an automationId. Do not set href on the same item.
858
+ * Non-navigation action, such as createRecord with an aspectId parameter or triggerAutomation with an automationId, optional recordId ({aspectUuid}:{handle}, or omit to pick), and optional copy inside params (never beside action): copy?: { confirm?, pending?, success?, failure? }. Omit copy for Save / Saving… / Saved / Save failed. Do not set href on the same item.
729
859
  */
730
860
  readonly onPress: {
731
861
  readonly action: string;
732
862
  readonly params?: {
863
+ readonly copy?: {
864
+ readonly confirm?: string;
865
+ readonly pending?: string;
866
+ readonly success?: string;
867
+ readonly failure?: string;
868
+ };
869
+ } & {
733
870
  readonly [key: string]: (string) | (number) | (boolean) | (null) | ({
734
871
  readonly $state: string;
735
872
  } & {
@@ -786,8 +923,6 @@ export type ButtonBlockActionItem = {
786
923
  readonly [key: string]: unknown;
787
924
  });
788
925
  readonly preventDefault?: boolean;
789
- } & {
790
- readonly [key: string]: unknown;
791
926
  };
792
927
  };
793
928
  export type ButtonBlockStaticItem = {
@@ -1,5 +1,5 @@
1
1
  // Generated by `npm run generate:ragnarok` — do not edit. Refresh with `npm run refresh:ragnarok`.
2
- // Source: urn:elementum:elementum-blocks:spec:v1 version 1.32.0
3
- // Schema sha256: e7aaa8b67a6efb61e10fd927c08be354c14ec1bb09cb740df41100abb56059bc
2
+ // Source: urn:elementum:elementum-blocks:spec:v1 version 1.38.0
3
+ // Schema sha256: 6d96d9f9edee222052989a1c5eecf75d0da751ed102c8c3fb1a5e5229502990b
4
4
  // Generator revision: 2
5
5
  export {};
@@ -92,6 +92,7 @@ export declare const BUILD_VS_EXPORT_ATTRIBUTE_LOCALS: {
92
92
  readonly resourceType: string;
93
93
  readonly attribute: string;
94
94
  readonly localPrefix: string;
95
+ readonly listField?: string;
95
96
  }[];
96
97
  export declare const BUILD_VS_EXPORT_TASK_OUTPUT_REFERENCE_NAMES: ReadonlyMap<string, ReadonlyMap<string, string>>;
97
98
  /** Kind id → module. */
@@ -123,6 +124,16 @@ export declare const STREAM_ROOT_RESOURCE_TYPES: ReadonlySet<string>;
123
124
  * entities/ directly.
124
125
  */
125
126
  export declare const AUTHORING_TYPE_BY_RESOURCE_TYPE: ReadonlyMap<string, string>;
127
+ /**
128
+ * Resource type → attributes the platform never returns on read, as each kind
129
+ * declares them on its resource facet. A re-pull fills these from state.
130
+ */
131
+ export declare const UNREADABLE_ATTRIBUTES_BY_RESOURCE_TYPE: ReadonlyMap<string, readonly string[]>;
132
+ /**
133
+ * Resource type → map attributes the provider manages per key, as each
134
+ * single-resource kind declares them. A re-pull keeps only the keys in state.
135
+ */
136
+ export declare const STATE_SCOPED_MAP_ATTRIBUTES_BY_RESOURCE_TYPE: ReadonlyMap<string, readonly string[]>;
126
137
  /** Entity-declared value equivalences used to compare builder and exporter HCL. */
127
138
  export declare const BUILD_VS_EXPORT_NORMALIZATIONS: {
128
139
  readonly omittedAttributeDefaults: {
@@ -168,6 +179,7 @@ export interface CatalogKindMeta {
168
179
  readonly renderOrder: number;
169
180
  readonly catalogRoot: import("./types.js").CatalogRoot;
170
181
  readonly factoryName: string;
182
+ readonly fromOwnRef?: true;
171
183
  readonly renderEntry: (args: CatalogRenderArgs) => CatalogRenderResult;
172
184
  }
173
185
  /** refKind → catalog bag / order / root / factory — graph facets win over deferred. */
@@ -107,6 +107,26 @@ export const STREAM_ROOT_RESOURCE_TYPES = new Set(STREAM_ROOT_MODULES.flatMap((m
107
107
  export const AUTHORING_TYPE_BY_RESOURCE_TYPE = new Map(KIND_MODULES.flatMap((m) => m.resource.shape === "subTypes"
108
108
  ? m.resource.rows.flatMap((row) => (row.authoringType === undefined ? [] : [[row.resourceType, row.authoringType]]))
109
109
  : []));
110
+ /**
111
+ * Resource type → attributes the platform never returns on read, as each kind
112
+ * declares them on its resource facet. A re-pull fills these from state.
113
+ */
114
+ export const UNREADABLE_ATTRIBUTES_BY_RESOURCE_TYPE = new Map(KIND_MODULES.flatMap((m) => {
115
+ if (m.resource.shape === "single") {
116
+ return m.resource.unreadableAttributes === undefined ? [] : [[m.resource.resourceType, m.resource.unreadableAttributes]];
117
+ }
118
+ if (m.resource.shape === "subTypes") {
119
+ return m.resource.rows.flatMap((row) => (row.unreadableAttributes === undefined ? [] : [[row.resourceType, row.unreadableAttributes]]));
120
+ }
121
+ return [];
122
+ }));
123
+ /**
124
+ * Resource type → map attributes the provider manages per key, as each
125
+ * single-resource kind declares them. A re-pull keeps only the keys in state.
126
+ */
127
+ export const STATE_SCOPED_MAP_ATTRIBUTES_BY_RESOURCE_TYPE = new Map(KIND_MODULES.flatMap((m) => m.resource.shape === "single" && m.resource.stateScopedMapAttributes !== undefined
128
+ ? [[m.resource.resourceType, m.resource.stateScopedMapAttributes]]
129
+ : []));
110
130
  /** Entity-declared value equivalences used to compare builder and exporter HCL. */
111
131
  export const BUILD_VS_EXPORT_NORMALIZATIONS = {
112
132
  omittedAttributeDefaults: KIND_MODULES.flatMap((module) => (module.roundtrip?.omittedAttributeDefaults ?? []).flatMap((equivalence) => implementedResourceTypes(module.resource).map((blockType) => ({ blockType, ...equivalence })))),
@@ -181,6 +201,7 @@ function catalogMetaOf(facet) {
181
201
  renderOrder: facet.renderOrder,
182
202
  catalogRoot: facet.catalogRoot,
183
203
  factoryName: facet.factoryName ?? `${facet.refKind}Ref`,
204
+ ...(facet.fromOwnRef === true ? { fromOwnRef: true } : {}),
184
205
  renderEntry: facet.renderEntry,
185
206
  };
186
207
  }
@@ -29,6 +29,7 @@ import { skillToolModule } from "../entities/skill-tool/module.js";
29
29
  import { serviceAccountModule } from "../entities/service-account/module.js";
30
30
  import { tableModule } from "../entities/table/module.js";
31
31
  import { taskModule } from "../entities/task/module.js";
32
+ import { portalModule } from "../entities/portal/module.js";
32
33
  import { managedViewOrderModule, viewModule } from "../entities/view/module.js";
33
34
  import { phoneServiceModule } from "../entities/phone-service/module.js";
34
35
  import { organizationModule } from "../entities/organization/module.js";
@@ -65,6 +66,7 @@ export const KIND_MODULES = [
65
66
  searchTableModule,
66
67
  tableModule,
67
68
  taskModule,
69
+ portalModule,
68
70
  cloudLinkModule,
69
71
  categoryModule,
70
72
  connectorModule,
@@ -9,12 +9,13 @@
9
9
  import type { DeployableEntity } from "../engine/entity.js";
10
10
  import type { FromTfContext } from "../engine/pull/context.js";
11
11
  import type { ChildResourceScope, TfBlock, TfValue } from "../engine/tf/index.js";
12
- export type KindId = "org" | "app" | "element" | "field" | "access-policy" | "agent" | "agent-evaluation" | "chart" | "agent-tool" | "agent-a2a-skill" | "automation" | "approval-chain" | "file-reader" | "visual-flow" | "skill" | "skill-tool" | "view" | "managed-view-order" | "record-create-form" | "dynamic-layout" | "dashboard" | "dashboard-widget" | "datamine" | "automation-value-references" | "organization" | "permission-template" | "service-account" | "stored-function" | "task" | "widget" | "relationship" | "search-table" | "table" | "cloud-link" | "email-alias" | "category" | "connector" | "ai-provider-anthropic" | "ai-provider-bedrock" | "ai-provider-custom" | "ai-provider-deepgram" | "ai-provider-elevenlab" | "ai-provider-gemini" | "ai-provider-openai" | "ai-provider-snowflake" | "ai-provider-xai" | "ai-provider-managed" | "group" | "phone-provider" | "phone-service" | "role" | "user";
12
+ import type { ValidationFailure } from "../engine/validation.js";
13
+ export type KindId = "org" | "app" | "element" | "field" | "access-policy" | "agent" | "agent-evaluation" | "chart" | "agent-tool" | "agent-a2a-skill" | "automation" | "approval-chain" | "file-reader" | "visual-flow" | "skill" | "skill-tool" | "view" | "managed-view-order" | "record-create-form" | "dynamic-layout" | "dashboard" | "dashboard-widget" | "datamine" | "automation-value-references" | "organization" | "permission-template" | "service-account" | "stored-function" | "vault-entry" | "task" | "portal" | "widget" | "relationship" | "search-table" | "table" | "cloud-link" | "email-alias" | "category" | "connector" | "ai-provider-anthropic" | "ai-provider-bedrock" | "ai-provider-custom" | "ai-provider-deepgram" | "ai-provider-elevenlab" | "ai-provider-gemini" | "ai-provider-openai" | "ai-provider-snowflake" | "ai-provider-xai" | "ai-provider-managed" | "group" | "phone-provider" | "phone-service" | "role" | "user";
13
14
  /** @deprecated Use {@link KindId}. */
14
15
  export type EntityKindId = KindId;
15
16
  export type StreamFacet = {
16
17
  readonly role: "streamRoot";
17
- readonly exportVerb: "apps" | "org" | "elements" | "tasks" | "tables";
18
+ readonly exportVerb: "apps" | "org" | "elements" | "tasks" | "tables" | "portals";
18
19
  } | {
19
20
  readonly role: "streamMember";
20
21
  } | {
@@ -59,6 +60,12 @@ export interface SubTypeRow {
59
60
  * `bootstrapFromState`).
60
61
  */
61
62
  readonly authoringType?: string;
63
+ /**
64
+ * Attributes the platform accepts but never returns on read, so an export
65
+ * can't carry them. A re-pull fills them from the workspace's state (see
66
+ * `alignExportWithState`); a first pull has nothing to fill.
67
+ */
68
+ readonly unreadableAttributes?: readonly string[];
62
69
  }
63
70
  export interface CompositeMember {
64
71
  readonly role: string;
@@ -69,6 +76,18 @@ export type ResourceFacet = {
69
76
  readonly shape: "single";
70
77
  readonly resourceType: string;
71
78
  readonly adoptable: boolean;
79
+ /**
80
+ * Attributes the platform accepts but never returns on read, so an export
81
+ * can't carry them. A re-pull fills them from the workspace's state (see
82
+ * `alignExportWithState`); a first pull has nothing to fill.
83
+ */
84
+ readonly unreadableAttributes?: readonly string[];
85
+ /**
86
+ * Map attributes the provider manages per key, keeping only the keys a
87
+ * workspace sets. The export prints every key; a re-pull keeps only the
88
+ * keys state holds (see `alignExportWithState`).
89
+ */
90
+ readonly stateScopedMapAttributes?: readonly string[];
72
91
  } | {
73
92
  readonly shape: "subTypes";
74
93
  readonly rows: readonly SubTypeRow[];
@@ -78,6 +97,12 @@ export type ResourceFacet = {
78
97
  readonly shape: "composite";
79
98
  readonly members: readonly CompositeMember[];
80
99
  readonly adoptable: boolean;
100
+ /**
101
+ * Skeleton label for a child of this kind, when it differs from
102
+ * `scopedResourceLabel`. `childTfLabel` is the child's ref name in
103
+ * terraform form.
104
+ */
105
+ readonly childLabel?: (ownerTfLabel: string, childTfLabel: string, scope: ChildResourceScope) => string;
81
106
  } | {
82
107
  /** Authoring/parentage graph node with no distinct terraform resource types yet. */
83
108
  readonly shape: "none";
@@ -219,6 +244,12 @@ export type CatalogFacet = {
219
244
  * `catalog/render.ts`.
220
245
  */
221
246
  readonly renderEntry: (args: CatalogRenderArgs) => CatalogRenderResult;
247
+ /**
248
+ * The bag is read live from the owner's own `.ref()` (it is authored
249
+ * inline in the owner's file), so generated catalogs emit
250
+ * `<bag>: __own.<bag>` instead of baked entries.
251
+ */
252
+ readonly fromOwnRef?: true;
222
253
  /** Placeholder ref before the authoring file is imported (cross-ref stubs). */
223
254
  readonly stubRef: (refName: string, parent: string) => unknown;
224
255
  /**
@@ -251,7 +282,20 @@ export interface StreamExtractContext extends FromTfContext {
251
282
  export interface OwnFileExtractResult {
252
283
  readonly items: readonly unknown[];
253
284
  readonly skipped: readonly string[];
285
+ /**
286
+ * The subset of `skipped` that no authored source can ever manage. If an
287
+ * earlier pull already adopted them, adoption releases them from state so
288
+ * the next apply doesn't destroy the live resources.
289
+ */
290
+ readonly releaseIfManaged?: readonly string[];
254
291
  readonly diagnostics: readonly string[];
292
+ /**
293
+ * Fatal or warning findings that must not be folded into `diagnostics`.
294
+ * Soft extract gaps stay in `diagnostics` + `skipped`. A fatal validation
295
+ * still lists its addresses in `skipped` so adoption does not import a
296
+ * graph that was not written.
297
+ */
298
+ readonly validations?: readonly ValidationFailure[];
255
299
  /** Export address → canonical address rebuilt by the printed current API. */
256
300
  readonly adoptionAddressAliases?: readonly AdoptionAddressAlias[];
257
301
  }
@@ -279,6 +323,18 @@ export interface UnresolvedReferenceDiagnostic {
279
323
  readonly reason: string;
280
324
  readonly portability: "source-org-only";
281
325
  }
326
+ /** Workspace facts a re-pull merge may consult (#1590). */
327
+ export interface MergePulledSourceContext {
328
+ /** Platform id of the pulled child. */
329
+ readonly platformId?: string;
330
+ /** Workspace state read at write time; undefined when it could not be read. */
331
+ readonly stateResources?: readonly {
332
+ readonly type?: string;
333
+ readonly instances?: readonly {
334
+ readonly attributes?: Record<string, unknown>;
335
+ }[];
336
+ }[];
337
+ }
282
338
  export interface PrintOwnFileOptions {
283
339
  /** Directory refName → actual flat barrel key, including app/element collisions. */
284
340
  readonly elementCatalogKeys?: ReadonlyMap<string, string>;
@@ -330,6 +386,9 @@ export interface PrintOwnFileOptions {
330
386
  * prints `catalog.<refName>` instead of the literal stub.
331
387
  */
332
388
  readonly foreignElementRefNames?: ReadonlyMap<string, string>;
389
+ /** Namespace → refName for apps/elements on disk, for owners ei exports with only a `namespace`. */
390
+ readonly foreignAppRefNamespaces?: ReadonlyMap<string, string>;
391
+ readonly foreignElementRefNamespaces?: ReadonlyMap<string, string>;
333
392
  /**
334
393
  * Same as {@link foreignAppRefNames}, keyed for tasks (#1011) — a
335
394
  * task target whose name is a key here prints `catalog.<refName>` instead
@@ -383,6 +442,8 @@ export interface BuildChildContext {
383
442
  * catalog (#490).
384
443
  */
385
444
  readonly fieldNamesByAppRefName?: ReadonlyMap<string, ReadonlyMap<string, string>>;
445
+ /** RefNames of this build's elements without `systemFields.audit`. */
446
+ readonly elementsWithoutAuditFields?: ReadonlySet<string>;
386
447
  /**
387
448
  * Field resource addresses for every app/element in this build, keyed the
388
449
  * same way as {@link fieldNamesByAppRefName}. A calculation addresses a
@@ -493,7 +554,16 @@ export type LifecycleFacet = {
493
554
  /** Print one extracted own-file instance to TypeScript source. */
494
555
  readonly printOwnFile?: (item: unknown, opts: PrintOwnFileOptions) => PrintedOwnFile;
495
556
  /** Re-pull: preserve author-owned values that the live export cannot represent. */
496
- readonly mergePulledSource?: (freshSource: string, existingSource: string) => string;
557
+ readonly mergePulledSource?: (freshSource: string, existingSource: string, context?: MergePulledSourceContext) => string;
558
+ /**
559
+ * Re-pull: true when an existing source file is earlier printer output
560
+ * that can never build (it carries a placeholder the printer emits for a
561
+ * value with no authored form). When this kind's export is incomplete
562
+ * because a child was skipped, such leftovers are archived to
563
+ * `.edk-state/pull-backups` instead of preserved, so the skipped child's
564
+ * stale source doesn't fail the post-pull build.
565
+ */
566
+ readonly isUnbuildablePulledSource?: (source: string) => boolean;
497
567
  /** Build: emit HCL for one discovered DeployableEntity. */
498
568
  readonly toTf?: (entity: DeployableEntity, ctx: BuildChildContext) => ToTfResult;
499
569
  /** Optional locals contribution after a root/own-file emit. */
@@ -532,6 +602,10 @@ export interface EntityKindModule {
532
602
  readonly canvas: CanvasFacet;
533
603
  /** Generated catalog participation — or {@link NO_CATALOG}. */
534
604
  readonly catalog: CatalogFacet;
605
+ /** Build: checks across every built root block; each returned string fails the build. */
606
+ readonly buildChecks?: {
607
+ readonly validateBuiltBlocks: (blocks: readonly TfBlock[]) => readonly string[];
608
+ };
535
609
  /** Entity-specific equivalences used only by live build-vs-export comparison. */
536
610
  readonly roundtrip?: {
537
611
  readonly referenceAliases: readonly {
@@ -620,11 +694,16 @@ export interface EntityKindModule {
620
694
  readonly attribute: string;
621
695
  readonly defaults: Readonly<Record<string, TfValue>>;
622
696
  }[];
623
- /** Server-assigned attributes the export records as a `<localPrefix><label>` local. */
697
+ /**
698
+ * Server-assigned attributes the export records as a `<localPrefix><label>` local.
699
+ * With `listField`, the attribute is a list and the local lists each entry's
700
+ * `listField` in order (`<attribute>[i].<listField>` = local[i]).
701
+ */
624
702
  readonly exportedAttributeLocals?: readonly {
625
703
  readonly resourceType: string;
626
704
  readonly attribute: string;
627
705
  readonly localPrefix: string;
706
+ readonly listField?: string;
628
707
  }[];
629
708
  };
630
709
  }
@@ -2,6 +2,6 @@ export declare const SDK_PACKAGE_NAME: "@elementumai/edk";
2
2
  export declare const TRANSITIONAL_SDK_PACKAGE_NAME: "@elementum/edk";
3
3
  export declare const LEGACY_SDK_PACKAGE_NAME: "@elementumltd/edk";
4
4
  export declare const LEGACY_SDK_REGISTRY_SCOPE: "@elementumltd:registry";
5
- export declare const SDK_PUBLIC_SUBPATHS: readonly ["app", "elements", "core", "core/filters", "automations", "agents", "agents/skills", "charts", "visualFlows", "searchTables", "fileReaders", "approvalChains", "approvalProcesses", "tables", "tasks", "organization", "catalog"];
5
+ export declare const SDK_PUBLIC_SUBPATHS: readonly ["app", "elements", "core", "core/filters", "automations", "agents", "agents/skills", "charts", "visualFlows", "searchTables", "fileReaders", "approvalChains", "approvalProcesses", "tables", "tasks", "portals", "organization", "catalog"];
6
6
  export type SdkPackageSubpath = (typeof SDK_PUBLIC_SUBPATHS)[number];
7
7
  export declare function sdkPackageSpecifier<T extends SdkPackageSubpath>(subpath: T): `${typeof SDK_PACKAGE_NAME}/${T}`;
@@ -18,6 +18,7 @@ export const SDK_PUBLIC_SUBPATHS = [
18
18
  "approvalProcesses",
19
19
  "tables",
20
20
  "tasks",
21
+ "portals",
21
22
  "organization",
22
23
  "catalog",
23
24
  ];