@elementumai/edk 0.11.0 → 0.13.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 (222) hide show
  1. package/README.md +40 -6
  2. package/dist-sdk/src/catalog/factories.d.ts +7 -1
  3. package/dist-sdk/src/catalog/factories.js +2 -0
  4. package/dist-sdk/src/catalog/index.d.ts +2 -2
  5. package/dist-sdk/src/catalog/index.js +1 -1
  6. package/dist-sdk/src/catalog/org.js +79 -34
  7. package/dist-sdk/src/catalog/token.js +5 -0
  8. package/dist-sdk/src/catalog/types.d.ts +7 -1
  9. package/dist-sdk/src/catalog/types.js +3 -0
  10. package/dist-sdk/src/core/system-fields.d.ts +1 -1
  11. package/dist-sdk/src/core/system-fields.js +1 -1
  12. package/dist-sdk/src/core/triggers/on-demand.d.ts +2 -0
  13. package/dist-sdk/src/core/triggers/on-demand.js +3 -0
  14. package/dist-sdk/src/core/types/app.d.ts +6 -0
  15. package/dist-sdk/src/engine/build/context.d.ts +3 -0
  16. package/dist-sdk/src/engine/coverage-gaps.d.ts +5 -0
  17. package/dist-sdk/src/engine/coverage-gaps.js +9 -0
  18. package/dist-sdk/src/engine/ei/run.d.ts +20 -1
  19. package/dist-sdk/src/engine/ei/run.js +102 -14
  20. package/dist-sdk/src/engine/pull/authored-address.js +42 -6
  21. package/dist-sdk/src/engine/pull/authored-root.d.ts +88 -0
  22. package/dist-sdk/src/engine/pull/authored-root.js +306 -0
  23. package/dist-sdk/src/engine/pull/context.d.ts +10 -0
  24. package/dist-sdk/src/engine/pull/field-refs-registry.d.ts +114 -0
  25. package/dist-sdk/src/engine/pull/field-refs-registry.js +501 -0
  26. package/dist-sdk/src/engine/pull/org.d.ts +1 -0
  27. package/dist-sdk/src/engine/pull/org.js +2 -0
  28. package/dist-sdk/src/engine/pull/partition.d.ts +8 -0
  29. package/dist-sdk/src/engine/pull/partition.js +43 -0
  30. package/dist-sdk/src/engine/pull/pulled-roots.d.ts +89 -0
  31. package/dist-sdk/src/engine/pull/pulled-roots.js +203 -0
  32. package/dist-sdk/src/engine/pull/ref-only.d.ts +22 -0
  33. package/dist-sdk/src/engine/pull/ref-only.js +59 -1
  34. package/dist-sdk/src/engine/pull/source-resources.d.ts +39 -0
  35. package/dist-sdk/src/engine/pull/source-resources.js +110 -0
  36. package/dist-sdk/src/engine/pull/stream-root.d.ts +148 -0
  37. package/dist-sdk/src/engine/pull/stream-root.js +563 -0
  38. package/dist-sdk/src/engine/workspace/reserved-catalog-keys.d.ts +47 -0
  39. package/dist-sdk/src/engine/workspace/reserved-catalog-keys.js +115 -0
  40. package/dist-sdk/src/entities/access-policy/build.d.ts +2 -1
  41. package/dist-sdk/src/entities/access-policy/from-tf.d.ts +9 -1
  42. package/dist-sdk/src/entities/access-policy/from-tf.js +25 -4
  43. package/dist-sdk/src/entities/access-policy/module.js +5 -0
  44. package/dist-sdk/src/entities/access-policy/to-tf.d.ts +19 -0
  45. package/dist-sdk/src/entities/access-policy/to-tf.js +65 -8
  46. package/dist-sdk/src/entities/agent/build.d.ts +52 -1
  47. package/dist-sdk/src/entities/agent/build.js +34 -0
  48. package/dist-sdk/src/entities/agent/deserializer/print-agent-v2.js +68 -0
  49. package/dist-sdk/src/entities/agent/from-tf.d.ts +34 -1
  50. package/dist-sdk/src/entities/agent/from-tf.js +262 -2
  51. package/dist-sdk/src/entities/agent/index.d.ts +1 -1
  52. package/dist-sdk/src/entities/agent/to-tf.d.ts +8 -10
  53. package/dist-sdk/src/entities/agent/to-tf.js +158 -14
  54. package/dist-sdk/src/entities/agent-tool/from-tf.js +6 -0
  55. package/dist-sdk/src/entities/agent-tool/to-tf.d.ts +2 -2
  56. package/dist-sdk/src/entities/agent-tool/to-tf.js +2 -2
  57. package/dist-sdk/src/entities/app/build.d.ts +34 -14
  58. package/dist-sdk/src/entities/app/build.js +93 -16
  59. package/dist-sdk/src/entities/app/from-tf.js +25 -11
  60. package/dist-sdk/src/entities/app/index.d.ts +1 -0
  61. package/dist-sdk/src/entities/app/index.js +1 -0
  62. package/dist-sdk/src/entities/app/module.js +1 -0
  63. package/dist-sdk/src/entities/app/stage-keys.d.ts +20 -5
  64. package/dist-sdk/src/entities/app/stage-keys.js +43 -9
  65. package/dist-sdk/src/entities/app/to-tf.js +2 -0
  66. package/dist-sdk/src/entities/approval-chain/build.d.ts +46 -11
  67. package/dist-sdk/src/entities/approval-chain/build.js +120 -8
  68. package/dist-sdk/src/entities/approval-chain/from-tf.d.ts +24 -2
  69. package/dist-sdk/src/entities/approval-chain/from-tf.js +148 -6
  70. package/dist-sdk/src/entities/approval-chain/index.d.ts +4 -1
  71. package/dist-sdk/src/entities/approval-chain/index.js +4 -1
  72. package/dist-sdk/src/entities/approval-chain/module.js +23 -5
  73. package/dist-sdk/src/entities/approval-chain/printer.d.ts +1 -1
  74. package/dist-sdk/src/entities/approval-chain/printer.js +91 -5
  75. package/dist-sdk/src/entities/approval-chain/steps-tf.d.ts +77 -0
  76. package/dist-sdk/src/entities/approval-chain/steps-tf.js +255 -0
  77. package/dist-sdk/src/entities/approval-chain/steps.d.ts +71 -0
  78. package/dist-sdk/src/entities/approval-chain/steps.js +83 -0
  79. package/dist-sdk/src/entities/approval-chain/to-tf.d.ts +16 -6
  80. package/dist-sdk/src/entities/approval-chain/to-tf.js +37 -4
  81. package/dist-sdk/src/entities/automation/build.d.ts +50 -24
  82. package/dist-sdk/src/entities/automation/build.js +86 -33
  83. package/dist-sdk/src/entities/automation/deserializer/print-automation.js +52 -8
  84. package/dist-sdk/src/entities/automation/from-tf.d.ts +38 -6
  85. package/dist-sdk/src/entities/automation/from-tf.js +855 -157
  86. package/dist-sdk/src/entities/automation/index.d.ts +2 -1
  87. package/dist-sdk/src/entities/automation/index.js +1 -0
  88. package/dist-sdk/src/entities/automation/module.d.ts +4 -3
  89. package/dist-sdk/src/entities/automation/module.js +33 -12
  90. package/dist-sdk/src/entities/automation/refs-read.d.ts +19 -0
  91. package/dist-sdk/src/entities/automation/refs-read.js +48 -0
  92. package/dist-sdk/src/entities/automation/run-target.d.ts +2 -0
  93. package/dist-sdk/src/entities/automation/run-target.js +5 -0
  94. package/dist-sdk/src/entities/automation/script-code.d.ts +2 -1
  95. package/dist-sdk/src/entities/automation/script-code.js +82 -1
  96. package/dist-sdk/src/entities/automation/script-lint.d.ts +13 -0
  97. package/dist-sdk/src/entities/automation/script-lint.js +418 -0
  98. package/dist-sdk/src/entities/automation/slack-message-refs.d.ts +9 -0
  99. package/dist-sdk/src/entities/automation/slack-message-refs.js +75 -0
  100. package/dist-sdk/src/entities/automation/task-output-labels.d.ts +12 -1
  101. package/dist-sdk/src/entities/automation/task-output-labels.js +32 -1
  102. package/dist-sdk/src/entities/automation/tasks.d.ts +76 -18
  103. package/dist-sdk/src/entities/automation/tasks.js +52 -15
  104. package/dist-sdk/src/entities/automation/to-tf.d.ts +3 -0
  105. package/dist-sdk/src/entities/automation/to-tf.js +585 -97
  106. package/dist-sdk/src/entities/automation/triggers.d.ts +48 -23
  107. package/dist-sdk/src/entities/automation/triggers.js +27 -12
  108. package/dist-sdk/src/entities/automation/unsafe-script-output.d.ts +50 -0
  109. package/dist-sdk/src/entities/automation/unsafe-script-output.js +92 -0
  110. package/dist-sdk/src/entities/chart/build.d.ts +18 -2
  111. package/dist-sdk/src/entities/chart/from-tf.d.ts +2 -2
  112. package/dist-sdk/src/entities/chart/from-tf.js +28 -1
  113. package/dist-sdk/src/entities/chart/index.d.ts +1 -1
  114. package/dist-sdk/src/entities/chart/printer.js +5 -2
  115. package/dist-sdk/src/entities/chart/to-tf.js +38 -3
  116. package/dist-sdk/src/entities/dynamic-layout/build.d.ts +3 -0
  117. package/dist-sdk/src/entities/dynamic-layout/condition-keys.d.ts +48 -0
  118. package/dist-sdk/src/entities/dynamic-layout/condition-keys.js +261 -0
  119. package/dist-sdk/src/entities/dynamic-layout/from-tf.js +45 -6
  120. package/dist-sdk/src/entities/dynamic-layout/module.js +2 -1
  121. package/dist-sdk/src/entities/dynamic-layout/to-tf.js +46 -12
  122. package/dist-sdk/src/entities/element/audit-field-guard.d.ts +9 -0
  123. package/dist-sdk/src/entities/element/audit-field-guard.js +88 -0
  124. package/dist-sdk/src/entities/element/build.js +2 -1
  125. package/dist-sdk/src/entities/element/from-tf.js +15 -2
  126. package/dist-sdk/src/entities/element/module.js +3 -0
  127. package/dist-sdk/src/entities/element/system-fields.d.ts +13 -0
  128. package/dist-sdk/src/entities/element/system-fields.js +23 -0
  129. package/dist-sdk/src/entities/element/to-tf.js +2 -0
  130. package/dist-sdk/src/entities/field/build.d.ts +9 -0
  131. package/dist-sdk/src/entities/field/from-tf.d.ts +29 -1
  132. package/dist-sdk/src/entities/field/from-tf.js +99 -6
  133. package/dist-sdk/src/entities/field/module.js +12 -2
  134. package/dist-sdk/src/entities/field/to-tf.d.ts +13 -3
  135. package/dist-sdk/src/entities/field/to-tf.js +90 -46
  136. package/dist-sdk/src/entities/org/category.js +1 -0
  137. package/dist-sdk/src/entities/org/index.d.ts +1 -0
  138. package/dist-sdk/src/entities/org/index.js +1 -0
  139. package/dist-sdk/src/entities/org/role.js +5 -0
  140. package/dist-sdk/src/entities/org/voice-auth.d.ts +5 -0
  141. package/dist-sdk/src/entities/org/voice-auth.js +33 -0
  142. package/dist-sdk/src/entities/organization/build.d.ts +3 -0
  143. package/dist-sdk/src/entities/organization/build.js +2 -0
  144. package/dist-sdk/src/entities/organization/index.d.ts +1 -0
  145. package/dist-sdk/src/entities/organization/index.js +1 -0
  146. package/dist-sdk/src/entities/organization/to-tf.d.ts +2 -0
  147. package/dist-sdk/src/entities/organization/to-tf.js +59 -1
  148. package/dist-sdk/src/entities/organization/voice-auth.d.ts +60 -0
  149. package/dist-sdk/src/entities/organization/voice-auth.js +60 -0
  150. package/dist-sdk/src/entities/phone-service/build.d.ts +9 -1
  151. package/dist-sdk/src/entities/phone-service/build.js +1 -0
  152. package/dist-sdk/src/entities/phone-service/deserializer/print-phone-service.js +3 -0
  153. package/dist-sdk/src/entities/phone-service/from-tf.d.ts +1 -0
  154. package/dist-sdk/src/entities/phone-service/from-tf.js +8 -1
  155. package/dist-sdk/src/entities/phone-service/to-tf.js +16 -0
  156. package/dist-sdk/src/entities/record-create-form/from-tf.js +2 -2
  157. package/dist-sdk/src/entities/relationship/from-tf.js +7 -2
  158. package/dist-sdk/src/entities/relationship/module.js +2 -2
  159. package/dist-sdk/src/entities/relationship/pair-check.d.ts +6 -2
  160. package/dist-sdk/src/entities/relationship/pair-check.js +105 -18
  161. package/dist-sdk/src/entities/relationship/to-tf.js +5 -2
  162. package/dist-sdk/src/entities/role/permission-levels.d.ts +7 -0
  163. package/dist-sdk/src/entities/role/permission-levels.js +78 -0
  164. package/dist-sdk/src/entities/role/to-tf.js +32 -2
  165. package/dist-sdk/src/entities/service-account/module.d.ts +2 -1
  166. package/dist-sdk/src/entities/service-account/module.js +9 -1
  167. package/dist-sdk/src/entities/service-account/resource-type.d.ts +2 -0
  168. package/dist-sdk/src/entities/service-account/resource-type.js +2 -0
  169. package/dist-sdk/src/entities/service-account/role-fidelity.d.ts +5 -5
  170. package/dist-sdk/src/entities/service-account/role-fidelity.js +21 -13
  171. package/dist-sdk/src/entities/service-account/role-membership-check.d.ts +20 -0
  172. package/dist-sdk/src/entities/service-account/role-membership-check.js +80 -0
  173. package/dist-sdk/src/entities/shared/aspect-target-from-tf.d.ts +15 -0
  174. package/dist-sdk/src/entities/shared/aspect-target-from-tf.js +36 -0
  175. package/dist-sdk/src/entities/shared/filters/ast.d.ts +4 -0
  176. package/dist-sdk/src/entities/shared/filters/index.d.ts +85 -14
  177. package/dist-sdk/src/entities/shared/filters/index.js +18 -6
  178. package/dist-sdk/src/entities/shared/filters/option-lookups.d.ts +57 -0
  179. package/dist-sdk/src/entities/shared/filters/option-lookups.js +108 -0
  180. package/dist-sdk/src/entities/shared/filters/print.js +9 -5
  181. package/dist-sdk/src/entities/shared/filters/tf-codec.d.ts +12 -7
  182. package/dist-sdk/src/entities/shared/filters/tf-codec.js +9 -5
  183. package/dist-sdk/src/entities/shared/raw-option-id.d.ts +30 -0
  184. package/dist-sdk/src/entities/shared/raw-option-id.js +41 -0
  185. package/dist-sdk/src/entities/shared/tool-field-ref.js +6 -2
  186. package/dist-sdk/src/entities/shared/types/field-types.d.ts +6 -3
  187. package/dist-sdk/src/entities/shared/types/field-types.js +3 -1
  188. package/dist-sdk/src/entities/skill/input-coverage.js +5 -2
  189. package/dist-sdk/src/entities/skill/module.js +2 -0
  190. package/dist-sdk/src/entities/sla/build.d.ts +96 -0
  191. package/dist-sdk/src/entities/sla/build.js +124 -0
  192. package/dist-sdk/src/entities/sla/from-tf.d.ts +40 -0
  193. package/dist-sdk/src/entities/sla/from-tf.js +164 -0
  194. package/dist-sdk/src/entities/sla/index.d.ts +1 -0
  195. package/dist-sdk/src/entities/sla/index.js +1 -0
  196. package/dist-sdk/src/entities/sla/module.d.ts +4 -0
  197. package/dist-sdk/src/entities/sla/module.js +73 -0
  198. package/dist-sdk/src/entities/sla/printer.d.ts +2 -0
  199. package/dist-sdk/src/entities/sla/printer.js +84 -0
  200. package/dist-sdk/src/entities/sla/to-tf.d.ts +12 -0
  201. package/dist-sdk/src/entities/sla/to-tf.js +81 -0
  202. package/dist-sdk/src/entities/table/build.d.ts +7 -2
  203. package/dist-sdk/src/entities/table/build.js +22 -1
  204. package/dist-sdk/src/entities/table/deserializer/normalize.d.ts +4 -1
  205. package/dist-sdk/src/entities/table/from-tf.js +89 -14
  206. package/dist-sdk/src/entities/table/index.d.ts +1 -1
  207. package/dist-sdk/src/entities/table/to-tf.js +41 -2
  208. package/dist-sdk/src/entities/task/from-tf.js +2 -1
  209. package/dist-sdk/src/entities/task/to-tf.js +1 -0
  210. package/dist-sdk/src/entities/view/from-tf.d.ts +8 -4
  211. package/dist-sdk/src/entities/view/from-tf.js +10 -9
  212. package/dist-sdk/src/entities/view/module.js +5 -0
  213. package/dist-sdk/src/entities/widget/from-tf.js +15 -4
  214. package/dist-sdk/src/generated/ragnarok/ragnarok-spec.d.ts +51 -4
  215. package/dist-sdk/src/generated/ragnarok/ragnarok-spec.js +2 -2
  216. package/dist-sdk/src/graph/index.d.ts +20 -2
  217. package/dist-sdk/src/graph/index.js +19 -0
  218. package/dist-sdk/src/graph/modules.js +11 -1
  219. package/dist-sdk/src/graph/resource-types.d.ts +47 -0
  220. package/dist-sdk/src/graph/resource-types.js +62 -0
  221. package/dist-sdk/src/graph/types.d.ts +116 -6
  222. package/package.json +6 -3
@@ -13,7 +13,7 @@ import { SYSTEM_FIELD_KEY_SET } from "../../core/system-fields.js";
13
13
  import { ELEMENT_SYSTEM_FIELD_KEYS } from "../element/system-fields.js";
14
14
  import { expr, isTfExpr, scopedLabelToBagKey, tfLabelToTsLabel, tsLabelToTfLabel } from "../../engine/tf/index.js";
15
15
  import { lostStageMessage, pulledStageHandle } from "../app/stage-keys.js";
16
- import { decodeForeignDataField, fieldBlockOwner, fieldKeyFromForeignDataLabel, fieldKeyFromTfValue, ownerMayHaveCustomField } from "../field/from-tf.js";
16
+ import { decodeForeignDataField, elementAuditFieldReference, fieldBlockOwner, fieldKeyFromForeignDataLabel, fieldKeyFromTfValue, ownerMayHaveCustomField } from "../field/from-tf.js";
17
17
  import { resolveDataAspectTarget } from "../shared/aspect-target-from-tf.js";
18
18
  import { DASHBOARD_RESOURCE_TYPE } from "../dashboard/module.js";
19
19
  import { DASHBOARD_WIDGET_RESOURCE_TYPE } from "../dashboard-widget/module.js";
@@ -327,7 +327,10 @@ function agentViewFromTf(block, owner, ctx) {
327
327
  }
328
328
  const agentLabel = resourceRefLabel(attrs["agent_id"], "elementum_agent");
329
329
  if (agentLabel === undefined) {
330
- ctx.diagnostics.push(`${where}: agent_id is not an elementum_agent resource reference; skipped`);
330
+ // An agent_id that isn't a resource reference can't be built; leave the
331
+ // view unmanaged so adoption does not import it.
332
+ ctx.diagnostics.push(`${where}: agent_id is not an elementum_agent resource reference; the view is left unmanaged so it is not destroyed`);
333
+ ctx.skipped.push(`${AGENT_VIEW_RESOURCE_TYPE}.${label}`);
331
334
  return undefined;
332
335
  }
333
336
  const scope = owner.scope ?? "app";
@@ -409,11 +412,9 @@ function layoutFromTf(block, owner, ctx) {
409
412
  // it as the bag key so build re-emits the same address; build still maps
410
413
  // the handle back to the real key for stage_id.
411
414
  const labelHandle = tsLabelToTfLabel(labelStageKey);
412
- const labelStageOwner = owner.stageKeyByHandle?.get(labelHandle);
415
+ const stageHandles = owner.stageHandles;
416
+ const labelStageOwner = stageHandles?.byHandle.get(labelHandle);
413
417
  const labelIsStageHandle = stageIndex !== undefined && labelStageOwner === stageIndex;
414
- const stageHandles = owner.stageKeyByHandle !== undefined && owner.stageKeys !== undefined
415
- ? { byHandle: owner.stageKeyByHandle, keys: owner.stageKeys }
416
- : undefined;
417
418
  // Never write a handle that build maps to another stage: a stage whose only
418
419
  // handle is another stage's own key (`pre-approval` next to `pre_approval`)
419
420
  // keeps its live layout unmanaged, with a warning (#1136).
@@ -436,7 +437,7 @@ function layoutFromTf(block, owner, ctx) {
436
437
  if (stageIndex !== undefined && stageHandle !== undefined && labelStageOwner !== undefined && labelStageOwner !== stageIndex) {
437
438
  ctx.diagnostics.push(`${where}: the layout's label "${labelHandle}" is a handle of stage "${labelStageOwner}", but it belongs to stage "${stageIndex}"; it is re-addressed under "${stageHandle}", so the next plan destroys and recreates it (#1136)`);
438
439
  }
439
- const canInferStageKey = typeof attrs["stage_id"] === "string" && owner.stageKeys?.has(labelStageKey) === true;
440
+ const canInferStageKey = typeof attrs["stage_id"] === "string" && owner.stageHandles?.keys.has(labelStageKey) === true;
440
441
  if (stageIndex !== undefined && stageKey === undefined) {
441
442
  ctx.diagnostics.push(`${where}: stage key ${JSON.stringify(stageIndex)} has no terraform label handle; using the layout's own label "${label}" as the stage key`);
442
443
  }
@@ -545,7 +546,7 @@ function fieldRefFromTf(v, owner, ctx, site) {
545
546
  const ownerLabel = owner.label;
546
547
  const fieldKey = fieldKeyFromTfValue(v, tfLabelToTsLabel(ownerLabel), owner.ownerTfLabel, owner.scope ?? "app", ctx);
547
548
  if (fieldKey !== undefined)
548
- return keptIdOrKey(unextractedFieldId(v, fieldKey, owner, ctx, site), fieldKey);
549
+ return keptIdOrKey(unextractedFieldId(v, fieldKey, owner, ctx, site), elementAuditFieldReference(v, fieldKey, owner, ctx));
549
550
  const ownData = ownDataFieldRef(v, owner, ctx, site, false);
550
551
  if (ownData !== undefined)
551
552
  return authoredRef(ownData);
@@ -575,7 +576,7 @@ function fieldRefFromTf(v, owner, ctx, site) {
575
576
  const attr = v.name.startsWith(`${ownerLabel}_`) ? v.name.slice(ownerLabel.length + 1) : undefined;
576
577
  const systemKey = attr !== undefined ? SYSTEM_FIELD_KEY_BY_ID_ATTR.get(attr) : undefined;
577
578
  if (systemKey !== undefined)
578
- return systemKey;
579
+ return elementAuditFieldReference(v, systemKey, owner, ctx);
579
580
  }
580
581
  // Custom field ref resolution is shared with agent-tool's field refs
581
582
  // (src/entities/agent-tool/from-tf.ts) via entities/field/from-tf.ts.
@@ -56,6 +56,11 @@ export const viewModule = {
56
56
  stubRef: (refName, parent) => ({ __kind: "view", refName, name: refName, parent }),
57
57
  refFromAuthoring: () => undefined,
58
58
  },
59
+ roundtrip: {
60
+ referenceAliases: [],
61
+ // Provider set attributes (edk#2437): view sharing order carries no meaning.
62
+ unorderedListAttributes: ["user_ids", "group_ids"],
63
+ },
59
64
  portable: {
60
65
  leaveOut: [
61
66
  { resourceType: LIST_VIEW_RESOURCE_TYPE, select: selectPlatformDefaultViews, reason: "the platform creates it with its app or element" },
@@ -1,5 +1,5 @@
1
1
  import { typedCoverageGap } from "../../engine/coverage-gaps.js";
2
- import { dataRefLabel, optionalBoolean, optionalString, plainObject, resourceRefLabel } from "../../engine/pull/context.js";
2
+ import { dataRefLabel, optionalBoolean, optionalString, plainObject, reportAuthoringBlocker, resourceRefLabel } from "../../engine/pull/context.js";
3
3
  import { bareChildResourceLabel, isTfExpr, scopedLabelToBagKey, tfLabelToTsLabel, tsLabelToTfLabel } from "../../engine/tf/index.js";
4
4
  import { AUTOMATION_RESOURCE_TYPE } from "../automation/types.js";
5
5
  import { decodeForeignDataField, fieldKeyFromTfRef } from "../field/from-tf.js";
@@ -42,7 +42,18 @@ function widgetFromTf(block, owner, ctx, dynamicLayoutCompanionLabels) {
42
42
  ctx.diagnostics.push(`${where}.${variant}: expected an object; skipped`);
43
43
  return undefined;
44
44
  }
45
- const name = optionalString(body, "name", `${where}.${variant}`, ctx) ?? "";
45
+ // name is required and build always sends it, so a value pull cannot read
46
+ // must not become "" (that would blank the live button on the next apply,
47
+ // edk#2509). Refuse to author it instead.
48
+ const nameRaw = body["name"];
49
+ if (typeof nameRaw !== "string") {
50
+ reportAuthoringBlocker(ctx, {
51
+ address: where,
52
+ description: `${where}.${variant}.name is ${nameRaw === undefined ? "missing" : `not a string (${JSON.stringify(nameRaw)})`}, so pull cannot write the widget's name and build would send "".`,
53
+ remedy: "Export did not write the widget's name as text. Pull again with the current EDK; if it persists, report it to the EDK maintainers.",
54
+ });
55
+ }
56
+ const name = typeof nameRaw === "string" ? nameRaw : "";
46
57
  if (variant === "related_object") {
47
58
  const target = aspectRef(body["object_id"], owner, ctx);
48
59
  if (target === undefined)
@@ -275,8 +286,8 @@ function recordIdentityTarget(resourceType, target) {
275
286
  * A run-automation widget keeps a raw automation id as is. Pull warns, naming
276
287
  * the widget and the automation, and continues (#1877) only when the
277
288
  * automation is known to be dropped: the export listed it in
278
- * omitted-automations.json (deleted, DISABLED or unrepresentable), or wrote
279
- * no id at all. Any other raw id is a valid reference to an automation this
289
+ * omitted-automations.json (deleted, DISABLED, no draft, or unrepresentable),
290
+ * or wrote no id at all. Any other raw id is a valid reference to an automation this
280
291
  * pull does not export, such as another app's, which build emits as is, so
281
292
  * it stays silent. Unlike an unextracted field reference (#1978), a dropped
282
293
  * automation does not fail the pull.
@@ -6,7 +6,7 @@ export type ElementumBlocksSpec = {
6
6
  export type ElementumBlocks = {
7
7
  readonly [key: string]: ElementumBlocksElement;
8
8
  };
9
- export type ElementumBlocksElement = (StackBlockElement) | (RowBlockElement) | (PanesBlockElement) | (ListControlsBlockElement) | (ListCollectionBlockElement) | (HeaderBlockElement) | (BodyBlockElement) | (BulletsBlockElement) | (DetailsListBlockElement) | (DetailsFieldsBlockElement) | (DividerBlockElement) | (SpacerBlockElement) | (CardBlockElement) | (DataTableBlockElement) | (ActionCardBlockElement) | (ChartBlockElement) | (MetricsRowBlockElement) | (PageHeaderBlockElement) | (ButtonBlockElement);
9
+ export type ElementumBlocksElement = (StackBlockElement) | (RowBlockElement) | (PanesBlockElement) | (ListControlsBlockElement) | (ListCollectionBlockElement) | (HeaderBlockElement) | (BodyBlockElement) | (BulletsBlockElement) | (DetailsListBlockElement) | (DetailsFieldsBlockElement) | (DividerBlockElement) | (SpacerBlockElement) | (CardBlockElement) | (DataTableBlockElement) | (ActionCardBlockElement) | (ChartBlockElement) | (MetricsRowBlockElement) | (PageHeaderBlockElement) | (ButtonBlockElement) | (ImageBlockElement) | (TabsBlockElement);
10
10
  /**
11
11
  * Customer-facing name: Stack
12
12
  * Customer-facing description: Stacks blocks from top to bottom with even spacing. Valid as the page root for simple portal or report layouts, and as a vertical section under Panes for process and list-to-record views.
@@ -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. Exception: independent ListControls/list pairs on the same App, including in a multi-App view, use /query/filter/{blockKey} and /query/statusGroup/{blockKey}. For independent same-aspect ListControls/list pairs, give each control a stable element key and bind the control and its paired list to /query/filter/{blockKey} and /query/statusGroup/{blockKey}; each pair may define different quickFilters chips. Shared and aspect-scoped paths remain first-class for one shared pair or different Apps. 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. 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. Optional fields is an ordered string[] of real aspect field ids shown as Ken-style labeled attributes under 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.
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 this list’s filterJson and quickFilterValue to the exact same paths as the control: use /query/filter and /query/statusGroup for one shared pair, or /query/filter/{blockKey} and /query/statusGroup/{blockKey} for an independent same-aspect pair. Each block-keyed pair can define its own quickFilters chips. For a view with more than one App, use /query/filter/<aspectId> and /query/statusGroup/<aspectId> for every block serving that App. Exception: independent ListControls/list pairs on the same App, including in a multi-App view, use /query/filter/{blockKey} and /query/statusGroup/{blockKey}. Shared and aspect-scoped paths remain first-class. Use filterPreset only for a no-chip seed or an independent list filter. 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";
@@ -243,6 +243,7 @@ export type ListCollectionBlockSelfFetchingProps = {
243
243
  }) | (PropExpression);
244
244
  readonly pageSize?: (((25) | (PropExpression)) | ((50) | (PropExpression)) | ((100) | (PropExpression))) | (PropExpression);
245
245
  readonly quickFilterValue?: ((string) | (PropExpression)) | (null);
246
+ readonly showExport?: (boolean) | (PropExpression);
246
247
  readonly fields?: (ReadonlyArray<string>) | (PropExpression);
247
248
  };
248
249
  /**
@@ -419,7 +420,7 @@ export type CardBlockProps = {
419
420
  /**
420
421
  * Customer-facing name: Data table
421
422
  * Customer-facing description: A spreadsheet-style table with typed columns for structured rows.
422
- * 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). 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 this table’s filterJson and quickFilterValue to the exact same paths as the control: use /query/filter and /query/statusGroup for one shared pair, or /query/filter/{blockKey} and /query/statusGroup/{blockKey} for an independent same-aspect pair. Each block-keyed pair can define its own quickFilters chips. For a view with more than one App, use /query/filter/<aspectId> and /query/statusGroup/<aspectId> for every block serving that App. Shared and aspect-scoped paths remain first-class. Use filterPreset only for a no-chip seed or an independent table filter. Looks like a spreadsheet-style grid; wrap in CardBlock with padding "none". Prefer ListCollectionBlock for compact record queues.
423
424
  */
424
425
  export type DataTableBlockElement = {
425
426
  readonly type: "DataTableBlock";
@@ -506,6 +507,7 @@ export type DataTableBlockSelfFetchingProps = {
506
507
  readonly quickFilterValue?: ((string) | (PropExpression)) | (null);
507
508
  readonly selectedAspectId?: ((string) | (PropExpression)) | (null);
508
509
  readonly selectedHandle?: ((string) | (PropExpression)) | (null);
510
+ readonly showExport?: (boolean) | (PropExpression);
509
511
  };
510
512
  export type DataTableSelfFetchingColumn = (string) | ({
511
513
  /**
@@ -973,3 +975,48 @@ export type ButtonBlockStaticItem = {
973
975
  */
974
976
  readonly viewId?: string;
975
977
  };
978
+ /**
979
+ * Customer-facing name: Image
980
+ * Customer-facing description: Displays an image from a URL.
981
+ * Internal authoring guidance: Use ImageBlock for a static image URL. Provide alt for meaningful images; omit alt for decorative images. Named organization asset keys such as organizationBanner are not resolved yet.
982
+ */
983
+ export type ImageBlockElement = {
984
+ readonly type: "ImageBlock";
985
+ readonly props: ImageBlockProps;
986
+ readonly children?: ReadonlyArray<string>;
987
+ readonly visible?: VisibilityCondition;
988
+ readonly repeat?: RepeatConfig;
989
+ readonly on?: ElementOn;
990
+ readonly watch?: ElementWatch;
991
+ readonly validation?: ElementValidation;
992
+ };
993
+ export type ImageBlockProps = {
994
+ readonly image: (string) | (PropExpression);
995
+ readonly alt?: (string) | (PropExpression);
996
+ };
997
+ /**
998
+ * Customer-facing name: Tabs
999
+ * Customer-facing description: Switches between sections, showing one at a time.
1000
+ * Internal authoring guidance: Use TabsBlock when the admin asks to split the view into tabs or sections. Use one child per tab, in the same order as tabs. Use a StackBlock child when a tab holds more than one block. Omit defaultIndex to open on the first tab. Do not nest TabsBlock.
1001
+ */
1002
+ export type TabsBlockElement = {
1003
+ readonly type: "TabsBlock";
1004
+ readonly props: TabsBlockProps;
1005
+ readonly children?: ReadonlyArray<string>;
1006
+ readonly visible?: VisibilityCondition;
1007
+ readonly repeat?: RepeatConfig;
1008
+ readonly on?: ElementOn;
1009
+ readonly watch?: ElementWatch;
1010
+ readonly validation?: ElementValidation;
1011
+ };
1012
+ export type TabsBlockProps = {
1013
+ readonly tabs: (ReadonlyArray<TabsBlockTab>) | (PropExpression);
1014
+ readonly defaultIndex?: (number) | (PropExpression);
1015
+ };
1016
+ export type TabsBlockTab = {
1017
+ readonly label: string;
1018
+ /**
1019
+ * Lucide icon name, e.g. inbox.
1020
+ */
1021
+ readonly icon?: string;
1022
+ };
@@ -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.41.0
3
- // Schema sha256: 5af10bfafbb6818214da147ed26630a9f4eddaa6dbd6cbc289a2d9fbe30ee589
2
+ // Source: urn:elementum:elementum-blocks:spec:v1 version 1.45.0
3
+ // Schema sha256: 91b420eaae8a05c4f85c273d2651067786d3e3de650b71cc1520b3ca1a1818e0
4
4
  // Generator revision: 2
5
5
  export {};
@@ -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 PortableEmptiedList, type PortableLeaveOut, type PortablePrincipals, 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, StateScopedPlatformEntry, StreamFacet, StreamMatch, StreamPartition, StreamRootExtractResult, TaskOutputReference, 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";
@@ -119,6 +119,13 @@ export declare const BUILD_VS_EXPORT_STATE_BOUND_REFERENCES: {
119
119
  readonly referenceTypes: readonly string[];
120
120
  }[];
121
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>;
122
129
  export declare const BUILD_VS_EXPORT_TASK_OUTPUT_REFERENCES: ReadonlyMap<string, ReadonlyMap<string, TaskOutputReference>>;
123
130
  /** Kind id → module. */
124
131
  export declare const KIND_BY_ID: ReadonlyMap<KindId, EntityKindModule>;
@@ -160,6 +167,13 @@ export declare const UNREADABLE_ATTRIBUTES_BY_RESOURCE_TYPE: ReadonlyMap<string,
160
167
  */
161
168
  export declare const STATE_SCOPED_MAP_ATTRIBUTES_BY_RESOURCE_TYPE: ReadonlyMap<string, readonly string[]>;
162
169
  export declare const STATE_SCOPED_PLATFORM_ENTRIES_BY_RESOURCE_TYPE: ReadonlyMap<string, readonly StateScopedPlatformEntry[]>;
170
+ /**
171
+ * Resource type → option-list attributes where the provider keeps an inactive
172
+ * option only when state holds it, as each sub-type row declares them.
173
+ */
174
+ export declare const STATE_SCOPED_INACTIVE_OPTIONS_BY_RESOURCE_TYPE: ReadonlyMap<string, readonly string[]>;
175
+ /** Resource type → the kind's own re-pull alignment, as each single-resource kind declares it. */
176
+ export declare const STATE_ALIGNMENTS_BY_RESOURCE_TYPE: ReadonlyMap<string, StateAlignment>;
163
177
  /** Every kind's `--portable` leave-out rules (edk#1894). */
164
178
  export declare const PORTABLE_LEAVE_OUT: readonly PortableLeaveOut[];
165
179
  /** Every kind's `--portable` emptied-list rules (edk#1894). */
@@ -178,6 +192,10 @@ export declare const BUILD_VS_EXPORT_NORMALIZATIONS: {
178
192
  suffix: string;
179
193
  blockType: string;
180
194
  }[];
195
+ readonly unorderedListAttributes: {
196
+ blockType: string;
197
+ attribute: string;
198
+ }[];
181
199
  };
182
200
  /** Own-file children of a parent kind (build discovery + pull print paths). */
183
201
  export declare function ownFileChildrenOf(parent: KindId): readonly EntityKindModule[];
@@ -69,6 +69,13 @@ export const BUILD_VS_EXPORT_STATE_EVALUATED_MAPS = KIND_MODULES.flatMap((module
69
69
  export const BUILD_VS_EXPORT_RENDERED_JSONENCODE_ATTRIBUTES = KIND_MODULES.flatMap((module) => module.roundtrip?.renderedJsonencodeAttributes ?? []);
70
70
  export const BUILD_VS_EXPORT_STATE_BOUND_REFERENCES = KIND_MODULES.flatMap((module) => module.roundtrip?.stateBoundReferences ?? []);
71
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
+ }]]));
72
79
  export const BUILD_VS_EXPORT_TASK_OUTPUT_REFERENCES = new Map(KIND_MODULES.flatMap((module) => Object.entries(module.roundtrip?.taskOutputReferences ?? {}))
73
80
  .map(([taskType, references]) => [taskType, new Map(Object.entries(references))]));
74
81
  /** Kind id → module. */
@@ -135,6 +142,17 @@ export const STATE_SCOPED_MAP_ATTRIBUTES_BY_RESOURCE_TYPE = new Map(KIND_MODULES
135
142
  export const STATE_SCOPED_PLATFORM_ENTRIES_BY_RESOURCE_TYPE = new Map(KIND_MODULES.flatMap((m) => m.resource.shape === "single" && m.resource.stateScopedPlatformEntries !== undefined
136
143
  ? [[m.resource.resourceType, m.resource.stateScopedPlatformEntries]]
137
144
  : []));
145
+ /**
146
+ * Resource type → option-list attributes where the provider keeps an inactive
147
+ * option only when state holds it, as each sub-type row declares them.
148
+ */
149
+ export const STATE_SCOPED_INACTIVE_OPTIONS_BY_RESOURCE_TYPE = new Map(KIND_MODULES.flatMap((m) => m.resource.shape === "subTypes"
150
+ ? m.resource.rows.flatMap((row) => (row.stateScopedInactiveOptions === undefined ? [] : [[row.resourceType, row.stateScopedInactiveOptions]]))
151
+ : []));
152
+ /** Resource type → the kind's own re-pull alignment, as each single-resource kind declares it. */
153
+ export const STATE_ALIGNMENTS_BY_RESOURCE_TYPE = new Map(KIND_MODULES.flatMap((m) => m.resource.shape === "single" && m.resource.alignWithState !== undefined
154
+ ? [[m.resource.resourceType, m.resource.alignWithState]]
155
+ : []));
138
156
  /** Every kind's `--portable` leave-out rules (edk#1894). */
139
157
  export const PORTABLE_LEAVE_OUT = KIND_MODULES.flatMap((m) => m.portable?.leaveOut ?? []);
140
158
  /** Every kind's `--portable` emptied-list rules (edk#1894). */
@@ -145,6 +163,7 @@ export const PORTABLE_PRINCIPALS = KIND_MODULES.flatMap((m) => m.portable?.princ
145
163
  export const BUILD_VS_EXPORT_NORMALIZATIONS = {
146
164
  omittedAttributeDefaults: KIND_MODULES.flatMap((module) => (module.roundtrip?.omittedAttributeDefaults ?? []).flatMap((equivalence) => implementedResourceTypes(module.resource).map((blockType) => ({ blockType, ...equivalence })))),
147
165
  stringSuffixAliases: KIND_MODULES.flatMap((module) => (module.roundtrip?.stringSuffixAliases ?? []).flatMap((equivalence) => implementedResourceTypes(module.resource).map((blockType) => ({ blockType, ...equivalence })))),
166
+ unorderedListAttributes: KIND_MODULES.flatMap((module) => (module.roundtrip?.unorderedListAttributes ?? []).flatMap((attribute) => implementedResourceTypes(module.resource).map((blockType) => ({ blockType, attribute })))),
148
167
  };
149
168
  /** Own-file children of a parent kind (build discovery + pull print paths). */
150
169
  export function ownFileChildrenOf(parent) {
@@ -2,9 +2,11 @@
2
2
  * KIND_MODULES assembly — the only place that imports concrete entity
3
3
  * modules. Engine code imports derived views from {@link ./index.js}.
4
4
  */
5
+ import { renderVoiceAuthAdoptionResource } from "../entities/organization/to-tf.js";
5
6
  import { accessPolicyModule } from "../entities/access-policy/module.js";
6
7
  import { agentModule } from "../entities/agent/module.js";
7
8
  import { agentEvaluationModule } from "../entities/agent-evaluation/module.js";
9
+ import { slaModule } from "../entities/sla/module.js";
8
10
  import { agentA2ASkillModule } from "../entities/agent-a2a-skill/module.js";
9
11
  import { agentToolModule } from "../entities/agent-tool/module.js";
10
12
  import { appModule } from "../entities/app/module.js";
@@ -20,7 +22,7 @@ import { dataLookupModules } from "../entities/data-lookup/module.js";
20
22
  import { fieldModule, managedFieldOrderModule } from "../entities/field/module.js";
21
23
  import { fileReaderModule } from "../entities/file-reader/module.js";
22
24
  import { visualFlowModule } from "../entities/visual-flow/module.js";
23
- import { aiProviderModules, categoryModule, cloudLinkModule, connectorModule, emailAliasModule, groupModule, phoneProviderModule, roleModule, userModule, } from "../entities/org/index.js";
25
+ import { aiProviderModules, categoryModule, cloudLinkModule, connectorModule, emailAliasModule, groupModule, phoneProviderModule, voiceAuthModule, roleModule, userModule, } from "../entities/org/index.js";
24
26
  import { searchTableModule } from "../entities/search-table/module.js";
25
27
  import { recordCreateFormModule } from "../entities/record-create-form/module.js";
26
28
  import { relationshipModule } from "../entities/relationship/module.js";
@@ -43,6 +45,7 @@ export const KIND_MODULES = [
43
45
  accessPolicyModule,
44
46
  agentModule,
45
47
  agentEvaluationModule,
48
+ slaModule,
46
49
  agentToolModule,
47
50
  agentA2ASkillModule,
48
51
  automationModule,
@@ -75,6 +78,13 @@ export const KIND_MODULES = [
75
78
  ...aiProviderModules,
76
79
  groupModule,
77
80
  phoneProviderModule,
81
+ {
82
+ ...voiceAuthModule,
83
+ managedOrganization: {
84
+ listArgs: ["voice-auth", "list", "--all"],
85
+ renderResource: renderVoiceAuthAdoptionResource,
86
+ },
87
+ },
78
88
  phoneServiceModule,
79
89
  roleModule,
80
90
  userModule,
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Concrete resource types the engine's entity-agnostic passes need by name
3
+ * (scoped plans, the automation revision guard). Engine must not import
4
+ * entities/ or spell `elementum_*` itself, so they are wired here.
5
+ */
6
+ /** Definition resource of each scope-owner kind. */
7
+ export declare const SCOPE_OWNER_RESOURCE_TYPES: {
8
+ readonly app: "elementum_app";
9
+ readonly element: "elementum_element";
10
+ };
11
+ /**
12
+ * App, element and field resources: a scoped plan reads other owners'
13
+ * definitions through these, so they are not reported as dependencies
14
+ * outside the scope.
15
+ */
16
+ export declare const SCOPE_DEFINITION_RESOURCE_TYPES: ReadonlySet<string>;
17
+ /** Resource types an element labels `<ns>_<name>` instead of its doubled child prefix. */
18
+ export declare const SCOPE_ELEMENT_SHORT_LABEL_TYPES: ReadonlySet<string>;
19
+ /**
20
+ * Canonical suffixes for short element labels whose child name is fixed by
21
+ * the resource type. Matching the suffix keeps an owner's namespace from
22
+ * being mistaken for a longer element namespace.
23
+ */
24
+ export declare const SCOPE_ELEMENT_CANONICAL_CHILD_SUFFIXES: ReadonlyMap<string, RegExp>;
25
+ /** State addresses of element owners never targeted as removed-from-source orphans. */
26
+ export declare const SCOPE_ORPHANS_LEFT_IN_PLACE: ReadonlySet<string>;
27
+ /** Resource types whose existing state is never reconciled by a scoped plan. */
28
+ export declare const SCOPE_NOT_RECONCILED: ReadonlySet<string>;
29
+ /**
30
+ * Resource types whose destroy deletes the platform object by id (the
31
+ * provider's `deleteManagedField`), so two state addresses must never share
32
+ * one of their ids (#1851).
33
+ */
34
+ export declare const EXCLUSIVE_PLATFORM_ID_RESOURCE_TYPES: ReadonlySet<string>;
35
+ /** Data source an automation file uses to look up a sibling automation. */
36
+ export declare const AUTOMATION_LOOKUP_DATA_TYPE = "elementum_automation";
37
+ /**
38
+ * Trigger types whose `refs` are null by design, not by the platform's
39
+ * eventual-consistency gap: the schedule row of `TRIGGER_SUB_TYPES`. A
40
+ * schedule trigger publishes no trigger references (`ScheduleTriggerOutput`
41
+ * is `Record<string, never>` in `entities/automation/triggers.ts`), so the
42
+ * provider's `populateTriggerRefs` gets an empty list back and stores
43
+ * `refs = null` (`trigger_common.go`). Nothing in generated HCL can index
44
+ * those refs, so the null-refs trigger check skips them (edk#1864). Every other
45
+ * trigger kind has outputs that tasks index, so its null refs are still reported.
46
+ */
47
+ export declare const TRIGGER_TYPES_WITHOUT_REFS: ReadonlySet<string>;
@@ -0,0 +1,62 @@
1
+ /**
2
+ * Concrete resource types the engine's entity-agnostic passes need by name
3
+ * (scoped plans, the automation revision guard). Engine must not import
4
+ * entities/ or spell `elementum_*` itself, so they are wired here.
5
+ */
6
+ import { APP_RESOURCE_TYPE } from "../entities/app/module.js";
7
+ import { AUTOMATION_RESOURCE_TYPE, TRIGGER_SUB_TYPES } from "../entities/automation/types.js";
8
+ import { DYNAMIC_LAYOUT_RESOURCE_TYPE } from "../entities/dynamic-layout/module.js";
9
+ import { ELEMENT_RESOURCE_TYPE } from "../entities/element/module.js";
10
+ import { FIELD_RESOURCE_TYPES } from "../entities/field/types.js";
11
+ import { ACCESS_POLICY_RESOURCE_TYPE } from "../entities/access-policy/types.js";
12
+ import { RELATIONSHIP_RESOURCE_TYPE } from "../entities/relationship/module.js";
13
+ import { MANAGED_FIELD_ORDER_RESOURCE_TYPE } from "../entities/field/types.js";
14
+ import { MANAGED_VIEW_ORDER_RESOURCE_TYPE } from "../entities/view/types.js";
15
+ /** Definition resource of each scope-owner kind. */
16
+ export const SCOPE_OWNER_RESOURCE_TYPES = { app: APP_RESOURCE_TYPE, element: ELEMENT_RESOURCE_TYPE };
17
+ /**
18
+ * App, element and field resources: a scoped plan reads other owners'
19
+ * definitions through these, so they are not reported as dependencies
20
+ * outside the scope.
21
+ */
22
+ export const SCOPE_DEFINITION_RESOURCE_TYPES = new Set([
23
+ APP_RESOURCE_TYPE,
24
+ ELEMENT_RESOURCE_TYPE,
25
+ ...FIELD_RESOURCE_TYPES,
26
+ ]);
27
+ /** Resource types an element labels `<ns>_<name>` instead of its doubled child prefix. */
28
+ export const SCOPE_ELEMENT_SHORT_LABEL_TYPES = new Set([
29
+ ACCESS_POLICY_RESOURCE_TYPE,
30
+ RELATIONSHIP_RESOURCE_TYPE,
31
+ ]);
32
+ /**
33
+ * Canonical suffixes for short element labels whose child name is fixed by
34
+ * the resource type. Matching the suffix keeps an owner's namespace from
35
+ * being mistaken for a longer element namespace.
36
+ */
37
+ export const SCOPE_ELEMENT_CANONICAL_CHILD_SUFFIXES = new Map([
38
+ [ACCESS_POLICY_RESOURCE_TYPE, /^access_policy(?:_\d+)?$/],
39
+ ]);
40
+ /** State addresses of element owners never targeted as removed-from-source orphans. */
41
+ export const SCOPE_ORPHANS_LEFT_IN_PLACE = new Set([DYNAMIC_LAYOUT_RESOURCE_TYPE]);
42
+ /** Resource types whose existing state is never reconciled by a scoped plan. */
43
+ export const SCOPE_NOT_RECONCILED = new Set([MANAGED_VIEW_ORDER_RESOURCE_TYPE, MANAGED_FIELD_ORDER_RESOURCE_TYPE]);
44
+ /**
45
+ * Resource types whose destroy deletes the platform object by id (the
46
+ * provider's `deleteManagedField`), so two state addresses must never share
47
+ * one of their ids (#1851).
48
+ */
49
+ export const EXCLUSIVE_PLATFORM_ID_RESOURCE_TYPES = new Set(FIELD_RESOURCE_TYPES);
50
+ /** Data source an automation file uses to look up a sibling automation. */
51
+ export const AUTOMATION_LOOKUP_DATA_TYPE = AUTOMATION_RESOURCE_TYPE;
52
+ /**
53
+ * Trigger types whose `refs` are null by design, not by the platform's
54
+ * eventual-consistency gap: the schedule row of `TRIGGER_SUB_TYPES`. A
55
+ * schedule trigger publishes no trigger references (`ScheduleTriggerOutput`
56
+ * is `Record<string, never>` in `entities/automation/triggers.ts`), so the
57
+ * provider's `populateTriggerRefs` gets an empty list back and stores
58
+ * `refs = null` (`trigger_common.go`). Nothing in generated HCL can index
59
+ * those refs, so the null-refs trigger check skips them (edk#1864). Every other
60
+ * trigger kind has outputs that tasks index, so its null refs are still reported.
61
+ */
62
+ export const TRIGGER_TYPES_WITHOUT_REFS = new Set(TRIGGER_SUB_TYPES.filter((t) => t.typeKey === "schedule").map((t) => t.resourceType));