@elementumai/edk 0.10.4 → 0.12.0

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 (171) hide show
  1. package/README.md +49 -13
  2. package/dist-sdk/src/catalog/token.js +2 -1
  3. package/dist-sdk/src/core/triggers/on-demand.d.ts +2 -0
  4. package/dist-sdk/src/core/triggers/on-demand.js +3 -0
  5. package/dist-sdk/src/core/wire/ref-serializer.js +26 -1
  6. package/dist-sdk/src/engine/build/context.d.ts +4 -0
  7. package/dist-sdk/src/engine/coverage-gaps.d.ts +7 -0
  8. package/dist-sdk/src/engine/coverage-gaps.js +12 -0
  9. package/dist-sdk/src/engine/ei/json-stream-reader.d.ts +43 -0
  10. package/dist-sdk/src/engine/ei/json-stream-reader.js +234 -0
  11. package/dist-sdk/src/engine/ei/run.d.ts +42 -1
  12. package/dist-sdk/src/engine/ei/run.js +201 -32
  13. package/dist-sdk/src/engine/ei/saved-plan.d.ts +16 -0
  14. package/dist-sdk/src/engine/ei/saved-plan.js +19 -0
  15. package/dist-sdk/src/engine/ei/state.d.ts +1 -1
  16. package/dist-sdk/src/engine/ei/state.js +17 -4
  17. package/dist-sdk/src/engine/progress.d.ts +3 -1
  18. package/dist-sdk/src/engine/progress.js +7 -3
  19. package/dist-sdk/src/engine/pull/authored-address.d.ts +15 -1
  20. package/dist-sdk/src/engine/pull/authored-address.js +180 -29
  21. package/dist-sdk/src/engine/pull/context.d.ts +37 -2
  22. package/dist-sdk/src/engine/pull/context.js +7 -4
  23. package/dist-sdk/src/engine/pull/ref-only.d.ts +18 -0
  24. package/dist-sdk/src/engine/pull/ref-only.js +52 -0
  25. package/dist-sdk/src/engine/tf/index.d.ts +2 -2
  26. package/dist-sdk/src/engine/tf/index.js +2 -2
  27. package/dist-sdk/src/engine/tf/labels.d.ts +22 -0
  28. package/dist-sdk/src/engine/tf/labels.js +50 -0
  29. package/dist-sdk/src/engine/tf/model.d.ts +2 -0
  30. package/dist-sdk/src/engine/tf/model.js +26 -0
  31. package/dist-sdk/src/engine/validation.d.ts +2 -0
  32. package/dist-sdk/src/entities/access-policy/from-tf.d.ts +18 -0
  33. package/dist-sdk/src/entities/access-policy/from-tf.js +58 -24
  34. package/dist-sdk/src/entities/access-policy/member-list.d.ts +32 -0
  35. package/dist-sdk/src/entities/access-policy/member-list.js +57 -0
  36. package/dist-sdk/src/entities/access-policy/module.js +10 -0
  37. package/dist-sdk/src/entities/access-policy/to-tf.d.ts +4 -3
  38. package/dist-sdk/src/entities/access-policy/to-tf.js +21 -12
  39. package/dist-sdk/src/entities/agent/build.js +7 -5
  40. package/dist-sdk/src/entities/agent/deserializer/print-agent-v2.js +2 -0
  41. package/dist-sdk/src/entities/agent/from-tf.js +13 -3
  42. package/dist-sdk/src/entities/agent/to-tf.js +11 -5
  43. package/dist-sdk/src/entities/agent/tools.d.ts +8 -0
  44. package/dist-sdk/src/entities/agent/tools.js +6 -2
  45. package/dist-sdk/src/entities/agent-tool/from-tf.d.ts +2 -0
  46. package/dist-sdk/src/entities/agent-tool/to-tf.d.ts +29 -0
  47. package/dist-sdk/src/entities/agent-tool/to-tf.js +56 -3
  48. package/dist-sdk/src/entities/agent-tool/types.d.ts +12 -8
  49. package/dist-sdk/src/entities/agent-tool/types.js +13 -9
  50. package/dist-sdk/src/entities/app/build.d.ts +12 -1
  51. package/dist-sdk/src/entities/app/build.js +80 -4
  52. package/dist-sdk/src/entities/app/deserializer/normalize.d.ts +5 -7
  53. package/dist-sdk/src/entities/app/from-tf.js +17 -12
  54. package/dist-sdk/src/entities/app/stage-keys.d.ts +18 -3
  55. package/dist-sdk/src/entities/app/stage-keys.js +40 -6
  56. package/dist-sdk/src/entities/app/to-tf.js +7 -4
  57. package/dist-sdk/src/entities/automation/build.d.ts +52 -31
  58. package/dist-sdk/src/entities/automation/build.js +59 -20
  59. package/dist-sdk/src/entities/automation/deserializer/ast.d.ts +7 -4
  60. package/dist-sdk/src/entities/automation/deserializer/print-automation.js +39 -14
  61. package/dist-sdk/src/entities/automation/from-tf.d.ts +35 -2
  62. package/dist-sdk/src/entities/automation/from-tf.js +721 -93
  63. package/dist-sdk/src/entities/automation/index.d.ts +1 -1
  64. package/dist-sdk/src/entities/automation/module.d.ts +22 -2
  65. package/dist-sdk/src/entities/automation/module.js +244 -57
  66. package/dist-sdk/src/entities/automation/output-key-wire-name.d.ts +22 -2
  67. package/dist-sdk/src/entities/automation/output-key-wire-name.js +54 -3
  68. package/dist-sdk/src/entities/automation/run-target.d.ts +61 -0
  69. package/dist-sdk/src/entities/automation/run-target.js +104 -0
  70. package/dist-sdk/src/entities/automation/script-code.d.ts +11 -1
  71. package/dist-sdk/src/entities/automation/script-code.js +106 -4
  72. package/dist-sdk/src/entities/automation/script-lint.d.ts +13 -0
  73. package/dist-sdk/src/entities/automation/script-lint.js +418 -0
  74. package/dist-sdk/src/entities/automation/task-output-labels.d.ts +17 -1
  75. package/dist-sdk/src/entities/automation/task-output-labels.js +58 -1
  76. package/dist-sdk/src/entities/automation/tasks.d.ts +67 -22
  77. package/dist-sdk/src/entities/automation/tasks.js +18 -4
  78. package/dist-sdk/src/entities/automation/to-tf.d.ts +1 -3
  79. package/dist-sdk/src/entities/automation/to-tf.js +354 -64
  80. package/dist-sdk/src/entities/automation/triggers.d.ts +63 -11
  81. package/dist-sdk/src/entities/automation/triggers.js +45 -5
  82. package/dist-sdk/src/entities/automation/types.d.ts +21 -0
  83. package/dist-sdk/src/entities/automation/types.js +26 -0
  84. package/dist-sdk/src/entities/chart/build.d.ts +9 -1
  85. package/dist-sdk/src/entities/chart/from-tf.d.ts +2 -2
  86. package/dist-sdk/src/entities/chart/from-tf.js +25 -1
  87. package/dist-sdk/src/entities/chart/index.d.ts +1 -1
  88. package/dist-sdk/src/entities/chart/printer.js +5 -2
  89. package/dist-sdk/src/entities/chart/to-tf.js +19 -1
  90. package/dist-sdk/src/entities/dashboard/from-tf.d.ts +11 -1
  91. package/dist-sdk/src/entities/dashboard/from-tf.js +57 -7
  92. package/dist-sdk/src/entities/dashboard/to-tf.js +13 -0
  93. package/dist-sdk/src/entities/dynamic-layout/build.d.ts +8 -2
  94. package/dist-sdk/src/entities/dynamic-layout/condition-keys.d.ts +48 -0
  95. package/dist-sdk/src/entities/dynamic-layout/condition-keys.js +261 -0
  96. package/dist-sdk/src/entities/dynamic-layout/from-tf.d.ts +3 -0
  97. package/dist-sdk/src/entities/dynamic-layout/from-tf.js +66 -20
  98. package/dist-sdk/src/entities/dynamic-layout/module.js +2 -1
  99. package/dist-sdk/src/entities/dynamic-layout/to-tf.d.ts +4 -2
  100. package/dist-sdk/src/entities/dynamic-layout/to-tf.js +341 -32
  101. package/dist-sdk/src/entities/element/build.d.ts +10 -0
  102. package/dist-sdk/src/entities/element/build.js +1 -0
  103. package/dist-sdk/src/entities/element/from-tf.js +14 -9
  104. package/dist-sdk/src/entities/element/to-tf.js +7 -4
  105. package/dist-sdk/src/entities/field/from-tf.d.ts +24 -0
  106. package/dist-sdk/src/entities/field/from-tf.js +79 -1
  107. package/dist-sdk/src/entities/field/module.js +14 -1
  108. package/dist-sdk/src/entities/field/to-tf.d.ts +38 -3
  109. package/dist-sdk/src/entities/field/to-tf.js +108 -34
  110. package/dist-sdk/src/entities/file-reader/module.js +3 -3
  111. package/dist-sdk/src/entities/file-reader/to-tf.js +3 -3
  112. package/dist-sdk/src/entities/file-reader/types.d.ts +4 -16
  113. package/dist-sdk/src/entities/file-reader/types.js +7 -0
  114. package/dist-sdk/src/entities/org/group.d.ts +1 -0
  115. package/dist-sdk/src/entities/org/group.js +2 -1
  116. package/dist-sdk/src/entities/org/role.js +5 -0
  117. package/dist-sdk/src/entities/record-create-form/from-tf.d.ts +8 -0
  118. package/dist-sdk/src/entities/record-create-form/from-tf.js +10 -2
  119. package/dist-sdk/src/entities/record-create-form/to-tf.d.ts +2 -1
  120. package/dist-sdk/src/entities/record-create-form/to-tf.js +14 -2
  121. package/dist-sdk/src/entities/relationship/from-tf.d.ts +8 -0
  122. package/dist-sdk/src/entities/relationship/from-tf.js +88 -10
  123. package/dist-sdk/src/entities/relationship/to-tf.d.ts +3 -2
  124. package/dist-sdk/src/entities/relationship/to-tf.js +79 -8
  125. package/dist-sdk/src/entities/role/from-tf.js +24 -7
  126. package/dist-sdk/src/entities/role/to-tf.js +25 -7
  127. package/dist-sdk/src/entities/service-account/from-tf.js +2 -1
  128. package/dist-sdk/src/entities/service-account/module.js +20 -0
  129. package/dist-sdk/src/entities/service-account/role-fidelity.d.ts +5 -5
  130. package/dist-sdk/src/entities/service-account/role-fidelity.js +21 -13
  131. package/dist-sdk/src/entities/service-account/to-tf.js +12 -4
  132. package/dist-sdk/src/entities/shared/filters/ast.d.ts +2 -0
  133. package/dist-sdk/src/entities/shared/filters/tf-codec.d.ts +1 -1
  134. package/dist-sdk/src/entities/shared/filters/tf-codec.js +12 -7
  135. package/dist-sdk/src/entities/shared/types/field-types.d.ts +6 -3
  136. package/dist-sdk/src/entities/shared/types/field-types.js +3 -1
  137. package/dist-sdk/src/entities/skill/deserializer/print-skill-v2.d.ts +5 -2
  138. package/dist-sdk/src/entities/skill/deserializer/print-skill-v2.js +8 -1
  139. package/dist-sdk/src/entities/skill/from-tf.js +10 -3
  140. package/dist-sdk/src/entities/skill/module.js +18 -0
  141. package/dist-sdk/src/entities/skill/to-tf.d.ts +8 -1
  142. package/dist-sdk/src/entities/skill/to-tf.js +23 -14
  143. package/dist-sdk/src/entities/skill/tools.d.ts +8 -0
  144. package/dist-sdk/src/entities/skill/tools.js +6 -2
  145. package/dist-sdk/src/entities/skill-tool/from-tf.d.ts +2 -0
  146. package/dist-sdk/src/entities/skill-tool/to-tf.d.ts +8 -0
  147. package/dist-sdk/src/entities/skill-tool/to-tf.js +6 -2
  148. package/dist-sdk/src/entities/task/to-tf.js +1 -0
  149. package/dist-sdk/src/entities/view/agent-view-layout-from-tf.d.ts +8 -2
  150. package/dist-sdk/src/entities/view/agent-view-layout-from-tf.js +20 -10
  151. package/dist-sdk/src/entities/view/from-tf.d.ts +68 -4
  152. package/dist-sdk/src/entities/view/from-tf.js +394 -22
  153. package/dist-sdk/src/entities/view/module.js +20 -0
  154. package/dist-sdk/src/entities/view/portable.d.ts +11 -0
  155. package/dist-sdk/src/entities/view/portable.js +47 -0
  156. package/dist-sdk/src/entities/view/to-tf.d.ts +4 -1
  157. package/dist-sdk/src/entities/view/to-tf.js +25 -7
  158. package/dist-sdk/src/entities/view/types.js +1 -1
  159. package/dist-sdk/src/entities/widget/build.d.ts +4 -3
  160. package/dist-sdk/src/entities/widget/from-tf.d.ts +3 -0
  161. package/dist-sdk/src/entities/widget/from-tf.js +100 -3
  162. package/dist-sdk/src/entities/widget/to-tf.d.ts +16 -1
  163. package/dist-sdk/src/entities/widget/to-tf.js +77 -14
  164. package/dist-sdk/src/generated/ragnarok/ragnarok-spec.d.ts +30 -9
  165. package/dist-sdk/src/generated/ragnarok/ragnarok-spec.js +2 -2
  166. package/dist-sdk/src/graph/field-resource-types.d.ts +2 -0
  167. package/dist-sdk/src/graph/field-resource-types.js +11 -0
  168. package/dist-sdk/src/graph/index.d.ts +41 -3
  169. package/dist-sdk/src/graph/index.js +24 -2
  170. package/dist-sdk/src/graph/types.d.ts +195 -5
  171. package/package.json +1 -1
@@ -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, 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.
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. orders may contain more than one key: the first key orders records, each later key orders ties, and direction is set per key. Put the same sortPreset on ListControlsBlock and on the ListCollectionBlock or DataTableBlock that owns the default. Bind sortJson to $bindState: "/query/sort" on both. When a view has more than one App, bind each App’s ListControlsBlock and ListCollectionBlock or DataTableBlock to /query/sort/<aspectId>, matching the filter and quick-filter paths. ListControls writes the live sort and /query/sortAspectId from filterAspectId. Keep sort out of filterJson. The menu offers system fields by semantic tag, then custom text, number, decimal, date, datetime, checkbox, single picklist, user, and group fields; it omits multi-picklist, attachment, and JSON fields. Restore copies sortPreset back into sortJson during the visit.
106
106
  */
107
107
  export type ListControlsBlockElement = {
108
108
  readonly type: "ListControlsBlock";
@@ -167,7 +167,7 @@ export type ListControlsOption = {
167
167
  /**
168
168
  * Customer-facing name: Record list
169
169
  * Customer-facing description: A compact stacked list of records with titles and status pills. Use it for queues and pickers.
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.
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. Optional density: "compact" | "standard" | "comfortable" (List View names); omit to keep today’s spacing. Live lists show a matching record count in the collection footer. Set showExport: true to show Export in the top-right of the collection; omit or false keeps Export hidden. Optional fields is an ordered string[] of real aspect field ids shown as labeled attribute chips beside each title (user/group avatars, picklist color, locale dates, number/currency). Omit fields to keep today’s fixed system pills; when fields is set, do not also expect those pills. Never invent field UUIDs; resolve ids from Owning App fields when the admin asks in plain language (for example "show Team and Priority on each row"). 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.
171
171
  */
172
172
  export type ListCollectionBlockElement = {
173
173
  readonly type: "ListCollectionBlock";
@@ -187,6 +187,7 @@ export type ListCollectionBlockPresentationalProps = {
187
187
  readonly groupBy?: ((string) | (PropExpression)) | (null);
188
188
  readonly sortBy?: ((string) | (PropExpression)) | (null);
189
189
  readonly sortDirection?: ("ASC" | "DESC") | (PropExpression);
190
+ readonly density?: ("compact" | "standard" | "comfortable") | (PropExpression);
190
191
  readonly status?: ("idle" | "loading" | "error") | (PropExpression);
191
192
  readonly loadingMessage?: (string) | (PropExpression);
192
193
  readonly errorMessage?: (string) | (PropExpression);
@@ -220,6 +221,7 @@ export type ListCollectionBlockSelfFetchingProps = {
220
221
  readonly groupBy?: ((string) | (PropExpression)) | (null);
221
222
  readonly sortBy?: ((string) | (PropExpression)) | (null);
222
223
  readonly sortDirection?: ("ASC" | "DESC") | (PropExpression);
224
+ readonly density?: ("compact" | "standard" | "comfortable") | (PropExpression);
223
225
  readonly status?: ("idle" | "loading" | "error") | (PropExpression);
224
226
  readonly loadingMessage?: (string) | (PropExpression);
225
227
  readonly errorMessage?: (string) | (PropExpression);
@@ -241,6 +243,8 @@ export type ListCollectionBlockSelfFetchingProps = {
241
243
  }) | (PropExpression);
242
244
  readonly pageSize?: (((25) | (PropExpression)) | ((50) | (PropExpression)) | ((100) | (PropExpression))) | (PropExpression);
243
245
  readonly quickFilterValue?: ((string) | (PropExpression)) | (null);
246
+ readonly showExport?: (boolean) | (PropExpression);
247
+ readonly fields?: (ReadonlyArray<string>) | (PropExpression);
244
248
  };
245
249
  /**
246
250
  * Customer-facing name: Header
@@ -416,7 +420,7 @@ export type CardBlockProps = {
416
420
  /**
417
421
  * Customer-facing name: Data table
418
422
  * Customer-facing description: A spreadsheet-style table with typed columns for structured rows.
419
- * 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.
423
+ * 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 with record columns for live records; self-fetching falls back to the runtime default aspect. Optional density: "compact" | "standard" | "comfortable" (List View names); omit to keep today’s spacing. Self-fetching columns are registered system keys (handle, title, status, priority, assignee, assignmentGroup, createdBy, createdTime, updatedAt, stage) and/or real aspect field ids - never invent field UUIDs - as strings, or { key, width?, minWidth?, maxWidth? } for admin default widths (key is the same system key or field id). Prefer semantic system keys when they exist. Optional columnHeaders maps the same column string to a display label; omit to use i18n/system headers or the field name from aspect metadata. Object columns with header/type/align select the presentational branch. Live tables show a matching record count in the collection footer; CMV users may resize columns (browser-local, not written back to Spec). Set showExport: true to show Export in the top-right of the collection; omit or false keeps Export hidden. 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.
420
424
  */
421
425
  export type DataTableBlockElement = {
422
426
  readonly type: "DataTableBlock";
@@ -432,6 +436,7 @@ export type DataTableBlockProps = (DataTableBlockPresentationalProps) | (DataTab
432
436
  export type DataTableBlockPresentationalProps = {
433
437
  readonly selectedId?: ((string) | (PropExpression)) | (null);
434
438
  readonly showHeader?: (boolean) | (PropExpression);
439
+ readonly density?: ("compact" | "standard" | "comfortable") | (PropExpression);
435
440
  readonly loadingMessage?: (string) | (PropExpression);
436
441
  readonly errorMessage?: (string) | (PropExpression);
437
442
  readonly emptyMessage?: (string) | (PropExpression);
@@ -475,11 +480,15 @@ export type DataTableMessages = {
475
480
  export type DataTableBlockSelfFetchingProps = {
476
481
  readonly selectedId?: ((string) | (PropExpression)) | (null);
477
482
  readonly showHeader?: (boolean) | (PropExpression);
483
+ readonly density?: ("compact" | "standard" | "comfortable") | (PropExpression);
478
484
  readonly loadingMessage?: (string) | (PropExpression);
479
485
  readonly errorMessage?: (string) | (PropExpression);
480
486
  readonly emptyMessage?: (string) | (PropExpression);
481
487
  readonly aspectId?: (string) | (PropExpression);
482
- readonly columns?: (ReadonlyArray<"handle" | "title" | "status" | "priority" | "assignee" | "assignmentGroup" | "createdBy" | "createdTime" | "updatedAt" | "stage">) | (PropExpression);
488
+ readonly columns?: (ReadonlyArray<DataTableSelfFetchingColumn>) | (PropExpression);
489
+ readonly columnHeaders?: ({
490
+ readonly [key: string]: string;
491
+ }) | (PropExpression);
483
492
  readonly searchValue?: (string) | (PropExpression);
484
493
  readonly filterJson?: (((JsonSafeState) & ((string) | (number) | (boolean) | (null) | (ReadonlyArray<OpaqueJson>) | ({
485
494
  readonly [key: string]: OpaqueJson;
@@ -498,7 +507,17 @@ export type DataTableBlockSelfFetchingProps = {
498
507
  readonly quickFilterValue?: ((string) | (PropExpression)) | (null);
499
508
  readonly selectedAspectId?: ((string) | (PropExpression)) | (null);
500
509
  readonly selectedHandle?: ((string) | (PropExpression)) | (null);
510
+ readonly showExport?: (boolean) | (PropExpression);
501
511
  };
512
+ export type DataTableSelfFetchingColumn = (string) | ({
513
+ /**
514
+ * Registered system key or real aspect field id (same as a string column).
515
+ */
516
+ readonly key: string;
517
+ readonly width?: (string) | (number);
518
+ readonly minWidth?: (string) | (number);
519
+ readonly maxWidth?: (string) | (number);
520
+ });
502
521
  /**
503
522
  * Customer-facing name: Action cards
504
523
  * Customer-facing description: Clickable tiles with an icon, title, and short description. Use them to choose a topic or action.
@@ -622,7 +641,7 @@ export type ChartBlockRelativeRange = {
622
641
  /**
623
642
  * Customer-facing name: Metrics
624
643
  * Customer-facing description: A single KPI tile with a caption and prominent value.
625
- * Internal authoring guidance: Single read-only KPI tile with a caption, prominent value, and optional static subtext below successful results. Use formattedValue for a complete display-ready metric, or calc for live Aspect.calculation data with optional explicit aspectId (otherwise the managed-view default), filterJson/filterPreset, quickFilterValue, number format, empty copy, and color/colorRules limited to default, primary organization theme, muted, error, success, or warning. Set showBackingList true on the self-fetch branch to show a fullscreen control that opens the records matching this metric. Bind filterJson and use the same filterPreset as ListControls when the KPI should share its view filter; give the metric its own filterPreset/filterJson without that binding when it should measure a different slice. Each MetricsRowBlock renders exactly one KPI; compose several independent tiles in RowBlock. Prefer ChartBlock when the result needs a bar, line, donut, category comparison, or trend.
644
+ * Internal authoring guidance: Single read-only KPI tile with a caption, prominent value, and optional static subtext below successful results. Use formattedValue for a complete display-ready metric, or calc for live Aspect.calculation data with optional explicit aspectId (otherwise the managed-view default), filterJson/filterPreset, quickFilterValue, number format, empty copy, and color (none, info, success, warning, critical) with colorStyle (border or full; border when omitted) or ordered colorRules against the value to tint the tile; never use the legacy color values default, muted, primary, or error. Set showBackingList true on the self-fetch branch to show a fullscreen control that opens the records matching this metric. Bind filterJson and use the same filterPreset as ListControls when the KPI should share its view filter; give the metric its own filterPreset/filterJson without that binding when it should measure a different slice. Each MetricsRowBlock renders exactly one KPI; compose several independent tiles in RowBlock. Prefer ChartBlock when the result needs a bar, line, donut, category comparison, or trend.
626
645
  */
627
646
  export type MetricsRowBlockElement = {
628
647
  readonly type: "MetricsRowBlock";
@@ -638,13 +657,14 @@ export type MetricsRowBlockProps = (MetricsRowPresentationalProps) | (MetricsRow
638
657
  export type MetricsRowPresentationalProps = {
639
658
  readonly title?: (string) | (PropExpression);
640
659
  readonly subtext?: (string) | (PropExpression);
641
- readonly color?: ("default" | "primary" | "muted" | "error" | "success" | "warning") | (PropExpression);
660
+ readonly color?: ("none" | "info" | "success" | "warning" | "critical" | "default" | "primary" | "muted" | "error") | (PropExpression);
661
+ readonly colorStyle?: ("none" | "border" | "full") | (PropExpression);
642
662
  readonly colorRules?: (ReadonlyArray<{
643
663
  readonly when: ("negative" | "positive" | "zero") | ({
644
664
  readonly op: "lt" | "lte" | "gt" | "gte" | "eq";
645
665
  readonly value: number;
646
666
  });
647
- readonly color: "default" | "primary" | "muted" | "error" | "success" | "warning";
667
+ readonly color: "none" | "info" | "success" | "warning" | "critical" | "default" | "primary" | "muted" | "error";
648
668
  }>) | (PropExpression);
649
669
  readonly format?: ({
650
670
  readonly style?: ("decimal" | "currency" | "percent") | (PropExpression);
@@ -657,13 +677,14 @@ export type MetricsRowPresentationalProps = {
657
677
  export type MetricsRowSelfFetchProps = {
658
678
  readonly title?: (string) | (PropExpression);
659
679
  readonly subtext?: (string) | (PropExpression);
660
- readonly color?: ("default" | "primary" | "muted" | "error" | "success" | "warning") | (PropExpression);
680
+ readonly color?: ("none" | "info" | "success" | "warning" | "critical" | "default" | "primary" | "muted" | "error") | (PropExpression);
681
+ readonly colorStyle?: ("none" | "border" | "full") | (PropExpression);
661
682
  readonly colorRules?: (ReadonlyArray<{
662
683
  readonly when: ("negative" | "positive" | "zero") | ({
663
684
  readonly op: "lt" | "lte" | "gt" | "gte" | "eq";
664
685
  readonly value: number;
665
686
  });
666
- readonly color: "default" | "primary" | "muted" | "error" | "success" | "warning";
687
+ readonly color: "none" | "info" | "success" | "warning" | "critical" | "default" | "primary" | "muted" | "error";
667
688
  }>) | (PropExpression);
668
689
  readonly format?: ({
669
690
  readonly style?: ("decimal" | "currency" | "percent") | (PropExpression);
@@ -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.39.0
3
- // Schema sha256: 073dd4066f43c677f79f3e55af3f33786d4c33dc4d587527aa8d7f1d875d57b6
2
+ // Source: urn:elementum:elementum-blocks:spec:v1 version 1.42.1
3
+ // Schema sha256: f00541d39820c1807cd2b7342863bb79cdad2f734a4785b54380109656a47e01
4
4
  // Generator revision: 2
5
5
  export {};
@@ -0,0 +1,2 @@
1
+ /** Every field resource type. An owner's fields share one bag key space. */
2
+ export declare const FIELD_RESOURCE_TYPE_SET: ReadonlySet<string>;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Field resource types, in a leaf module (#1859). The kind registry
3
+ * (`./index.js`, `./modules.ts`) and `./resource-types.ts` both import entity
4
+ * modules that reach `src/engine/pull/`, so pull code that reads these through
5
+ * either one closes an import cycle: whichever module loads first sees the
6
+ * other half-initialized (the CLI binary's workspace loader then lists
7
+ * `undefined` kinds). This module imports only the field sub-type table.
8
+ */
9
+ import { FIELD_RESOURCE_TYPES } from "../entities/field/types.js";
10
+ /** Every field resource type. An owner's fields share one bag key space. */
11
+ export const FIELD_RESOURCE_TYPE_SET = new Set(FIELD_RESOURCE_TYPES);
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * Public graph barrel: KIND_MODULES + derived views for pull/build/canvas.
3
3
  */
4
- import { type CatalogRenderArgs, type CatalogRenderResult, type EntityKindModule, type KindId, type ParentEdge, type StateScopedPlatformEntry, matchType } from "./types.js";
5
- export type { AdoptionAddressAlias, AuthoringFacet, CanvasComponentId, CanvasFacet, CanvasView, CatalogAuthoringArgs, CatalogFacet, CatalogRenderArgs, CatalogRenderResult, CatalogRoot, DataFacet, DataFacetCatalogKind, EntityKindId, EntityKindModule, KindId, LifecycleFacet, OrgIdentityBag, ParentEdge, ParentageFacet, ResourceFacet, StateScopedPlatformEntry, StreamFacet, StreamMatch, StreamPartition, StreamRootExtractResult, ToTfResult, } from "./types.js";
4
+ import { type CatalogRenderArgs, type CatalogRenderResult, type EntityKindModule, type KindId, type ParentEdge, type PortableEmptiedList, type PortableLeaveOut, type PortablePrincipals, type StateAlignment, type StateScopedPlatformEntry, type TaskOutputReference, matchType } from "./types.js";
5
+ export type { AdoptionAddressAlias, AuthoringFacet, CanvasComponentId, CanvasFacet, CanvasView, CatalogAuthoringArgs, CatalogFacet, CatalogRenderArgs, CatalogRenderResult, CatalogRoot, DataFacet, DataFacetCatalogKind, EntityKindId, EntityKindModule, KindId, LifecycleFacet, OrgIdentityBag, ParentEdge, ParentageFacet, ResourceFacet, StateAlignment, StateReferenceResolver, StateScopedPlatformEntry, StreamFacet, StreamMatch, StreamPartition, StreamRootExtractResult, TaskOutputReference, ToTfResult, } from "./types.js";
6
6
  export type { ReferenceLookupStrategy } from "./types.js";
7
7
  export { NO_CANVAS, NO_CATALOG, NO_DATA, NO_LIFECYCLE, defaultMatchResourceType, implementedResourceTypes, isResourceAdoptable, isTfLive, knownResourceTypes, matchType, singleResourceType, } from "./types.js";
8
8
  export { KIND_MODULES } from "./modules.js";
@@ -100,7 +100,33 @@ export declare const BUILD_VS_EXPORT_PICKLIST_LABEL_ASSIGNMENTS: {
100
100
  readonly fieldAttribute: string;
101
101
  readonly valueAttribute: string;
102
102
  }[];
103
- export declare const BUILD_VS_EXPORT_TASK_OUTPUT_REFERENCE_NAMES: ReadonlyMap<string, ReadonlyMap<string, string>>;
103
+ export declare const BUILD_VS_EXPORT_STATE_EVALUATED_MAPS: {
104
+ readonly resourceType: string;
105
+ readonly attribute: string;
106
+ readonly computedFrom: readonly string[];
107
+ readonly keyedBy: {
108
+ readonly listAttribute: string;
109
+ readonly nameAttribute: string;
110
+ };
111
+ }[];
112
+ export declare const BUILD_VS_EXPORT_RENDERED_JSONENCODE_ATTRIBUTES: {
113
+ readonly resourceType: string;
114
+ readonly attribute: string;
115
+ }[];
116
+ export declare const BUILD_VS_EXPORT_STATE_BOUND_REFERENCES: {
117
+ readonly resourceType: string;
118
+ readonly attribute: string;
119
+ readonly referenceTypes: readonly string[];
120
+ }[];
121
+ export declare const BUILD_VS_EXPORT_STATE_RESOLVED_DATA_LOOKUPS: ReadonlySet<string>;
122
+ export interface StateResolvedDataLookupFallback {
123
+ readonly resourceTypes: ReadonlySet<string>;
124
+ readonly matchAttributes: readonly string[];
125
+ readonly ownerAttribute: string;
126
+ }
127
+ /** Data type → how its lookup's id is read off a managed resource when state holds no `data:` row for it. */
128
+ export declare const BUILD_VS_EXPORT_STATE_RESOLVED_DATA_LOOKUP_FALLBACKS: ReadonlyMap<string, StateResolvedDataLookupFallback>;
129
+ export declare const BUILD_VS_EXPORT_TASK_OUTPUT_REFERENCES: ReadonlyMap<string, ReadonlyMap<string, TaskOutputReference>>;
104
130
  /** Kind id → module. */
105
131
  export declare const KIND_BY_ID: ReadonlyMap<KindId, EntityKindModule>;
106
132
  /** @deprecated Use {@link KIND_BY_ID}. */
@@ -141,6 +167,14 @@ export declare const UNREADABLE_ATTRIBUTES_BY_RESOURCE_TYPE: ReadonlyMap<string,
141
167
  */
142
168
  export declare const STATE_SCOPED_MAP_ATTRIBUTES_BY_RESOURCE_TYPE: ReadonlyMap<string, readonly string[]>;
143
169
  export declare const STATE_SCOPED_PLATFORM_ENTRIES_BY_RESOURCE_TYPE: ReadonlyMap<string, readonly StateScopedPlatformEntry[]>;
170
+ /** Resource type → the kind's own re-pull alignment, as each single-resource kind declares it. */
171
+ export declare const STATE_ALIGNMENTS_BY_RESOURCE_TYPE: ReadonlyMap<string, StateAlignment>;
172
+ /** Every kind's `--portable` leave-out rules (edk#1894). */
173
+ export declare const PORTABLE_LEAVE_OUT: readonly PortableLeaveOut[];
174
+ /** Every kind's `--portable` emptied-list rules (edk#1894). */
175
+ export declare const PORTABLE_EMPTIED_LISTS: readonly PortableEmptiedList[];
176
+ /** Every kind's `--portable` principal rules (edk#1894). */
177
+ export declare const PORTABLE_PRINCIPALS: readonly PortablePrincipals[];
144
178
  /** Entity-declared value equivalences used to compare builder and exporter HCL. */
145
179
  export declare const BUILD_VS_EXPORT_NORMALIZATIONS: {
146
180
  readonly omittedAttributeDefaults: {
@@ -153,6 +187,10 @@ export declare const BUILD_VS_EXPORT_NORMALIZATIONS: {
153
187
  suffix: string;
154
188
  blockType: string;
155
189
  }[];
190
+ readonly unorderedListAttributes: {
191
+ blockType: string;
192
+ attribute: string;
193
+ }[];
156
194
  };
157
195
  /** Own-file children of a parent kind (build discovery + pull print paths). */
158
196
  export declare function ownFileChildrenOf(parent: KindId): readonly EntityKindModule[];
@@ -65,8 +65,19 @@ export const BUILD_VS_EXPORT_COMPUTED_REFERENCE_MAPS = KIND_MODULES.flatMap((mod
65
65
  export const BUILD_VS_EXPORT_RECORD_FIELD_OUTPUT_KEYS = KIND_MODULES.flatMap((module) => module.roundtrip?.recordFieldOutputKeys ?? []);
66
66
  export const BUILD_VS_EXPORT_ATTRIBUTE_LOCALS = KIND_MODULES.flatMap((module) => module.roundtrip?.exportedAttributeLocals ?? []);
67
67
  export const BUILD_VS_EXPORT_PICKLIST_LABEL_ASSIGNMENTS = KIND_MODULES.flatMap((module) => module.roundtrip?.picklistLabelAssignments ?? []);
68
- export const BUILD_VS_EXPORT_TASK_OUTPUT_REFERENCE_NAMES = new Map(KIND_MODULES.flatMap((module) => Object.entries(module.roundtrip?.taskOutputReferenceNames ?? {}))
69
- .map(([taskType, names]) => [taskType, new Map(Object.entries(names))]));
68
+ export const BUILD_VS_EXPORT_STATE_EVALUATED_MAPS = KIND_MODULES.flatMap((module) => module.roundtrip?.stateEvaluatedMaps ?? []);
69
+ export const BUILD_VS_EXPORT_RENDERED_JSONENCODE_ATTRIBUTES = KIND_MODULES.flatMap((module) => module.roundtrip?.renderedJsonencodeAttributes ?? []);
70
+ export const BUILD_VS_EXPORT_STATE_BOUND_REFERENCES = KIND_MODULES.flatMap((module) => module.roundtrip?.stateBoundReferences ?? []);
71
+ export const BUILD_VS_EXPORT_STATE_RESOLVED_DATA_LOOKUPS = new Set(KIND_MODULES.flatMap((module) => (module.roundtrip?.stateResolvedDataLookups ?? []).map((lookup) => lookup.dataType)));
72
+ /** Data type → how its lookup's id is read off a managed resource when state holds no `data:` row for it. */
73
+ export const BUILD_VS_EXPORT_STATE_RESOLVED_DATA_LOOKUP_FALLBACKS = new Map(KIND_MODULES.flatMap((module) => module.roundtrip?.stateResolvedDataLookups ?? [])
74
+ .flatMap(({ dataType, managedFallback }) => managedFallback === undefined ? [] : [[dataType, {
75
+ resourceTypes: new Set(managedFallback.resourceTypes),
76
+ matchAttributes: managedFallback.matchAttributes,
77
+ ownerAttribute: managedFallback.ownerAttribute,
78
+ }]]));
79
+ export const BUILD_VS_EXPORT_TASK_OUTPUT_REFERENCES = new Map(KIND_MODULES.flatMap((module) => Object.entries(module.roundtrip?.taskOutputReferences ?? {}))
80
+ .map(([taskType, references]) => [taskType, new Map(Object.entries(references))]));
70
81
  /** Kind id → module. */
71
82
  export const KIND_BY_ID = new Map(KIND_MODULES.map((m) => [m.kind, m]));
72
83
  /** @deprecated Use {@link KIND_BY_ID}. */
@@ -131,10 +142,21 @@ export const STATE_SCOPED_MAP_ATTRIBUTES_BY_RESOURCE_TYPE = new Map(KIND_MODULES
131
142
  export const STATE_SCOPED_PLATFORM_ENTRIES_BY_RESOURCE_TYPE = new Map(KIND_MODULES.flatMap((m) => m.resource.shape === "single" && m.resource.stateScopedPlatformEntries !== undefined
132
143
  ? [[m.resource.resourceType, m.resource.stateScopedPlatformEntries]]
133
144
  : []));
145
+ /** Resource type → the kind's own re-pull alignment, as each single-resource kind declares it. */
146
+ export const STATE_ALIGNMENTS_BY_RESOURCE_TYPE = new Map(KIND_MODULES.flatMap((m) => m.resource.shape === "single" && m.resource.alignWithState !== undefined
147
+ ? [[m.resource.resourceType, m.resource.alignWithState]]
148
+ : []));
149
+ /** Every kind's `--portable` leave-out rules (edk#1894). */
150
+ export const PORTABLE_LEAVE_OUT = KIND_MODULES.flatMap((m) => m.portable?.leaveOut ?? []);
151
+ /** Every kind's `--portable` emptied-list rules (edk#1894). */
152
+ export const PORTABLE_EMPTIED_LISTS = KIND_MODULES.flatMap((m) => m.portable?.leaveOutWhenEmptied ?? []);
153
+ /** Every kind's `--portable` principal rules (edk#1894). */
154
+ export const PORTABLE_PRINCIPALS = KIND_MODULES.flatMap((m) => m.portable?.principals ?? []);
134
155
  /** Entity-declared value equivalences used to compare builder and exporter HCL. */
135
156
  export const BUILD_VS_EXPORT_NORMALIZATIONS = {
136
157
  omittedAttributeDefaults: KIND_MODULES.flatMap((module) => (module.roundtrip?.omittedAttributeDefaults ?? []).flatMap((equivalence) => implementedResourceTypes(module.resource).map((blockType) => ({ blockType, ...equivalence })))),
137
158
  stringSuffixAliases: KIND_MODULES.flatMap((module) => (module.roundtrip?.stringSuffixAliases ?? []).flatMap((equivalence) => implementedResourceTypes(module.resource).map((blockType) => ({ blockType, ...equivalence })))),
159
+ unorderedListAttributes: KIND_MODULES.flatMap((module) => (module.roundtrip?.unorderedListAttributes ?? []).flatMap((attribute) => implementedResourceTypes(module.resource).map((blockType) => ({ blockType, attribute })))),
138
160
  };
139
161
  /** Own-file children of a parent kind (build discovery + pull print paths). */
140
162
  export function ownFileChildrenOf(parent) {
@@ -72,6 +72,20 @@ export interface SubTypeRow {
72
72
  */
73
73
  readonly unreadableAttributes?: readonly string[];
74
74
  }
75
+ /**
76
+ * The value state holds for an export reference, or undefined when it cannot
77
+ * be resolved (see `engine/pull/state-reference-resolver.ts`).
78
+ */
79
+ export type StateReferenceResolver = (value: TfValue) => unknown;
80
+ /**
81
+ * A kind's re-pull alignment: the exported resource's attributes, rewritten
82
+ * from that resource's state attributes. Returns `exported` itself when
83
+ * nothing changes.
84
+ */
85
+ export type StateAlignment = (exported: Record<string, TfValue>, state: Readonly<Record<string, unknown>>, context: {
86
+ readonly address: string;
87
+ readonly resolve: StateReferenceResolver;
88
+ }) => Record<string, TfValue>;
75
89
  export interface CompositeMember {
76
90
  readonly role: string;
77
91
  readonly resourceType: string;
@@ -100,6 +114,12 @@ export type ResourceFacet = {
100
114
  * it unless state holds its id (see `alignExportWithState`).
101
115
  */
102
116
  readonly stateScopedPlatformEntries?: readonly StateScopedPlatformEntry[];
117
+ /**
118
+ * Anything else a re-pull has to restore from state that the export
119
+ * cannot carry (a dynamic layout's condition keys). Runs before the
120
+ * declarative alignments above (see `alignExportWithState`).
121
+ */
122
+ readonly alignWithState?: StateAlignment;
103
123
  } | {
104
124
  readonly shape: "subTypes";
105
125
  readonly rows: readonly SubTypeRow[];
@@ -313,11 +333,37 @@ export interface OwnFileExtractResult {
313
333
  /**
314
334
  * Own-file ref names released from state on this pull. Their authored files
315
335
  * are archived so the next plan does not recreate the live resource (#1858).
336
+ * `afterRelease` entries (#2054) list the export addresses adoption is
337
+ * asked to release; `archiveReleasedOwnFiles` archives the file only once
338
+ * none of them is bound in state any more, since a file archived while
339
+ * state still manages the automation makes the next plan destroy it.
340
+ */
341
+ readonly quarantineOwnFiles?: readonly QuarantinedOwnFile[];
342
+ /**
343
+ * Skipped entities of this kind and the addresses each one owns (#1877), so
344
+ * pull knows which authored file those resources would build from. A
345
+ * skipped entity this omits is matched to its file by its label.
316
346
  */
317
- readonly quarantineOwnFiles?: readonly {
318
- readonly kind: string;
347
+ readonly skippedOwnFiles?: readonly {
319
348
  readonly refName: string;
349
+ readonly addresses: readonly string[];
320
350
  }[];
351
+ /**
352
+ * Decisions that depend on what the whole stream keeps in source (#1877).
353
+ * Stream root calls it once, after every own-file child is extracted and
354
+ * #1731's unbuildable dependents are dropped, with whether each stream
355
+ * resource stays in source this pull (`resourcesInSource`).
356
+ */
357
+ readonly settleAfterExtract?: (inSource: (address: string) => boolean) => {
358
+ readonly quarantineOwnFiles: readonly QuarantinedOwnFile[];
359
+ readonly diagnostics: readonly string[];
360
+ };
361
+ }
362
+ /** An own-file whose authored file pull archives because its state is released (see `quarantineOwnFiles`). */
363
+ export interface QuarantinedOwnFile {
364
+ readonly kind: string;
365
+ readonly refName: string;
366
+ readonly afterRelease?: readonly string[];
321
367
  }
322
368
  export interface AdoptionAddressAlias {
323
369
  readonly from: string;
@@ -384,6 +430,13 @@ export interface PrintOwnFileOptions {
384
430
  * instead of degrading to a TODO.
385
431
  */
386
432
  readonly destinationConnectorKeys?: ReadonlySet<string>;
433
+ /**
434
+ * The destination org's group name → `org.groups` key (cross-org only). A
435
+ * group whose name is here is a real destination group (kept through
436
+ * `--map`, edk#1894) and prints as `org.groups.<key>`; any other degrades to
437
+ * a TODO.
438
+ */
439
+ readonly destinationGroups?: ReadonlyMap<string, string>;
387
440
  /**
388
441
  * A destination-org connector compound key (`"<provider>.<model>"`) the
389
442
  * caller already confirmed — `edk clone app --target-root` prompts the
@@ -641,6 +694,72 @@ export interface StateAdoptionFacet {
641
694
  /** The user-facing warning for this kind's imports (printed once per distinct set). */
642
695
  readonly warning: (imports: readonly StateAdoptionImport[]) => string;
643
696
  }
697
+ /**
698
+ * Blocks `--portable` always leaves out: the platform makes them together with
699
+ * their owner, so a source that creates the owner again must not ask for them
700
+ * (edk#1894).
701
+ */
702
+ export interface PortableLeaveOut {
703
+ readonly resourceType: string;
704
+ /**
705
+ * Which blocks of the type go. Omitted: all of them. Otherwise it reads what
706
+ * it needs from the export directory (`blocks` are the export's blocks of
707
+ * this type) and answers by each block's import id.
708
+ */
709
+ readonly select?: (exportDir: string, blocks: readonly TfBlock[]) => Promise<PortableSelection>;
710
+ /** Report text, e.g. "the platform creates it with the app". */
711
+ readonly reason: string;
712
+ }
713
+ /** A leave-out rule's answer for one export. */
714
+ export interface PortableSelection {
715
+ readonly matches: (importId: string | undefined) => boolean;
716
+ /** What it could not settle, reported to the user. */
717
+ readonly unresolved: readonly string[];
718
+ }
719
+ /**
720
+ * Principals on a block that belong to one org. Groups are map-or-drop: kept
721
+ * only when every group is mapped; users are always dropped. Whatever uses an
722
+ * unmapped principal is dropped with it (edk#1894).
723
+ */
724
+ export interface PortablePrincipals {
725
+ readonly resourceType: string;
726
+ /** List attribute holding group references. */
727
+ readonly groupAttribute: string;
728
+ /** The data source type those group references point at; its `name` is the group's name. */
729
+ readonly groupDataType: string;
730
+ /** List attributes holding users (any entry makes the principals unportable). */
731
+ readonly userAttributes: readonly string[];
732
+ /**
733
+ * `block`: the principals are the whole block (an access policy resource), so drop the block.
734
+ * `attributes`: the principals are part of a kept block, so drop only these attributes.
735
+ */
736
+ readonly whenDropped: "block" | "attributes";
737
+ /** Report noun, e.g. "service account access policy". */
738
+ readonly noun: string;
739
+ /** What dropping the principals means, added to the report, e.g. that a skill becomes open. */
740
+ readonly whenDroppedNote?: string;
741
+ }
742
+ /**
743
+ * A block that only lists other blocks: when leaving blocks out empties the
744
+ * list, the block goes too (a view order over no views).
745
+ */
746
+ export interface PortableEmptiedList {
747
+ readonly resourceType: string;
748
+ readonly attribute: string;
749
+ readonly reason: string;
750
+ }
751
+ /** How a kind takes part in `--portable` pulls and `clone app` (edk#1894). */
752
+ export interface PortableFacet {
753
+ readonly leaveOut?: readonly PortableLeaveOut[];
754
+ readonly principals?: readonly PortablePrincipals[];
755
+ readonly leaveOutWhenEmptied?: readonly PortableEmptiedList[];
756
+ }
757
+ /** A task output's reference: its name and the type of the envelope that carries it. */
758
+ export interface TaskOutputReference {
759
+ readonly name: string;
760
+ readonly fieldType: string;
761
+ readonly multiple: boolean;
762
+ }
644
763
  export interface EntityKindModule {
645
764
  readonly kind: KindId;
646
765
  /** Export participation. */
@@ -669,6 +788,8 @@ export interface EntityKindModule {
669
788
  * import is written to `.tf/out` so the plan imports instead of creating.
670
789
  */
671
790
  readonly stateAdoption?: StateAdoptionFacet;
791
+ /** `--portable` pulls and `clone app`: what is left out, mapped or dropped. */
792
+ readonly portable?: PortableFacet;
672
793
  /** Entity-specific equivalences used only by live build-vs-export comparison. */
673
794
  readonly roundtrip?: {
674
795
  readonly referenceAliases: readonly {
@@ -692,6 +813,11 @@ export interface EntityKindModule {
692
813
  readonly attribute: string;
693
814
  readonly suffix: string;
694
815
  }[];
816
+ /**
817
+ * List attributes the provider schema declares as sets, so their order
818
+ * carries no meaning and build vs export compares them unordered (edk#2437).
819
+ */
820
+ readonly unorderedListAttributes?: readonly string[];
695
821
  /**
696
822
  * Two `<label><suffix>` locals that read the same list on this kind's
697
823
  * resource, one indexed by each entry's name and one by its key.
@@ -716,10 +842,12 @@ export interface EntityKindModule {
716
842
  }[];
717
843
  /**
718
844
  * Per task resource type, refs-map keys whose task reference name (what
719
- * an exported value envelope carries) differs from the key. Every other
720
- * task output's reference name is its refs-map key.
845
+ * an exported value envelope carries) differs from the key, with the
846
+ * `fieldType` and `multiple` of the envelope the key holds. An envelope
847
+ * is that key's read only when all three match. Every other task output's
848
+ * reference name is its refs-map key.
721
849
  */
722
- readonly taskOutputReferenceNames?: Readonly<Record<string, Readonly<Record<string, string>>>>;
850
+ readonly taskOutputReferences?: Readonly<Record<string, Readonly<Record<string, TaskOutputReference>>>>;
723
851
  /**
724
852
  * A found record's `record.<field id>` output is listed in the task's
725
853
  * refs under the field's `<nameAttribute>`, unique per `<ownerAttribute>`.
@@ -781,6 +909,68 @@ export interface EntityKindModule {
781
909
  readonly fieldAttribute: string;
782
910
  readonly valueAttribute: string;
783
911
  }[];
912
+ /**
913
+ * Computed string maps state holds on `<resourceType>`: a read of
914
+ * `<resource>.<attribute>["key"]` is the string state holds under that key,
915
+ * but only while state's row is current for the export (each attribute in
916
+ * `computedFrom` must hold the export block's value), and only for a key
917
+ * that names an entry of `keyedBy.listAttribute` (by its
918
+ * `keyedBy.nameAttribute`): the entries that attribute declares, whose
919
+ * values the platform computes from them. `keyedBy.listAttribute` must be
920
+ * one of `computedFrom`, so state's list is the export's. Any other key
921
+ * the platform adds to the map is never read.
922
+ */
923
+ readonly stateEvaluatedMaps?: readonly {
924
+ readonly resourceType: string;
925
+ readonly attribute: string;
926
+ readonly computedFrom: readonly string[];
927
+ readonly keyedBy: {
928
+ readonly listAttribute: string;
929
+ readonly nameAttribute: string;
930
+ };
931
+ }[];
932
+ /**
933
+ * Attributes of `<resourceType>` where one side may write
934
+ * `jsonencode(<literal>)` and the other the string it renders to, either
935
+ * literally or as a read of a {@link stateEvaluatedMaps} entry. They
936
+ * match only when the string is exactly OpenTofu's rendering.
937
+ */
938
+ readonly renderedJsonencodeAttributes?: readonly {
939
+ readonly resourceType: string;
940
+ readonly attribute: string;
941
+ }[];
942
+ /**
943
+ * Data lookups of this kind whose id state holds. Inside a template, the
944
+ * build's `data.<dataType>.<x>.id` is the id state holds for the export's
945
+ * lookup with the same meaning.
946
+ */
947
+ readonly stateResolvedDataLookups?: readonly {
948
+ readonly dataType: string;
949
+ /**
950
+ * When state holds no `data:` row for the export's lookup (the export
951
+ * declares it but only uses its id raw inside a template), its id is the
952
+ * one managed `<resourceTypes>` resource in state whose `<matchAttributes>`
953
+ * equal the lookup's string literals and whose `<ownerAttribute>` equals
954
+ * the state-confirmed id of the lookup's `<ownerAttribute> =
955
+ * data.<owner>.id`. The lookup must set exactly those attributes.
956
+ */
957
+ readonly managedFallback?: {
958
+ readonly resourceTypes: readonly string[];
959
+ readonly matchAttributes: readonly string[];
960
+ readonly ownerAttribute: string;
961
+ };
962
+ }[];
963
+ /**
964
+ * Top-level `<attribute>` of `<resourceType>` where the export writes the
965
+ * bare platform id of a resource in another stream and the build its
966
+ * `<referenceType>.<label>.id`. They match only when state binds that id
967
+ * to exactly that address.
968
+ */
969
+ readonly stateBoundReferences?: readonly {
970
+ readonly resourceType: string;
971
+ readonly attribute: string;
972
+ readonly referenceTypes: readonly string[];
973
+ }[];
784
974
  };
785
975
  }
786
976
  export declare function implementedResourceTypes(resource: ResourceFacet): readonly string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elementumai/edk",
3
- "version": "0.10.4",
3
+ "version": "0.12.0",
4
4
  "description": "Elementum Development Kit — statically typed SDK for building Elementum apps, automations, and agents",
5
5
  "type": "module",
6
6
  "license": "SEE LICENSE IN LICENSE",