@elementumai/edk 0.13.3 → 0.14.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 (140) hide show
  1. package/dist-sdk/src/catalog/factories.d.ts +4 -2
  2. package/dist-sdk/src/catalog/factories.js +3 -1
  3. package/dist-sdk/src/catalog/from-authoring.d.ts +8 -3
  4. package/dist-sdk/src/catalog/from-authoring.js +21 -8
  5. package/dist-sdk/src/engine/build/context.d.ts +17 -0
  6. package/dist-sdk/src/engine/coverage-gaps.d.ts +13 -0
  7. package/dist-sdk/src/engine/coverage-gaps.js +21 -0
  8. package/dist-sdk/src/engine/pull/context.d.ts +57 -1
  9. package/dist-sdk/src/engine/pull/context.js +9 -1
  10. package/dist-sdk/src/engine/pull/pulled-roots.d.ts +14 -1
  11. package/dist-sdk/src/engine/pull/pulled-roots.js +23 -3
  12. package/dist-sdk/src/engine/pull/ref-only.d.ts +6 -1
  13. package/dist-sdk/src/engine/pull/ref-only.js +4 -1
  14. package/dist-sdk/src/engine/pull/stream-root.d.ts +17 -1
  15. package/dist-sdk/src/engine/pull/stream-root.js +57 -4
  16. package/dist-sdk/src/engine/tf/index.d.ts +1 -0
  17. package/dist-sdk/src/engine/tf/index.js +1 -0
  18. package/dist-sdk/src/engine/tf/jsonencode.d.ts +19 -0
  19. package/dist-sdk/src/engine/tf/jsonencode.js +49 -0
  20. package/dist-sdk/src/engine/validation.d.ts +36 -1
  21. package/dist-sdk/src/engine/validation.js +56 -2
  22. package/dist-sdk/src/engine/workspace/loader.d.ts +6 -0
  23. package/dist-sdk/src/engine/workspace/loader.js +87 -2
  24. package/dist-sdk/src/entities/access-policy/from-tf.d.ts +7 -0
  25. package/dist-sdk/src/entities/access-policy/from-tf.js +58 -17
  26. package/dist-sdk/src/entities/access-policy/to-tf.d.ts +3 -1
  27. package/dist-sdk/src/entities/access-policy/to-tf.js +1 -1
  28. package/dist-sdk/src/entities/agent/build.d.ts +15 -0
  29. package/dist-sdk/src/entities/agent/build.js +139 -16
  30. package/dist-sdk/src/entities/agent/deserializer/print-agent-v2.d.ts +3 -3
  31. package/dist-sdk/src/entities/agent/deserializer/print-agent-v2.js +39 -25
  32. package/dist-sdk/src/entities/agent/module.js +95 -3
  33. package/dist-sdk/src/entities/agent/to-tf.js +6 -4
  34. package/dist-sdk/src/entities/agent-evaluation/from-tf.d.ts +7 -0
  35. package/dist-sdk/src/entities/agent-evaluation/from-tf.js +14 -5
  36. package/dist-sdk/src/entities/agent-evaluation/module.js +4 -2
  37. package/dist-sdk/src/entities/agent-tool/from-tf.d.ts +11 -2
  38. package/dist-sdk/src/entities/agent-tool/from-tf.js +38 -40
  39. package/dist-sdk/src/entities/agent-tool/to-tf.js +12 -5
  40. package/dist-sdk/src/entities/app/build.d.ts +1 -1
  41. package/dist-sdk/src/entities/app/index.d.ts +1 -1
  42. package/dist-sdk/src/entities/automation/approval-trigger-refs.d.ts +20 -0
  43. package/dist-sdk/src/entities/automation/approval-trigger-refs.js +83 -0
  44. package/dist-sdk/src/entities/automation/build.d.ts +75 -42
  45. package/dist-sdk/src/entities/automation/build.js +18 -8
  46. package/dist-sdk/src/entities/automation/deserializer/ast.d.ts +14 -2
  47. package/dist-sdk/src/entities/automation/deserializer/print-automation.d.ts +9 -0
  48. package/dist-sdk/src/entities/automation/deserializer/print-automation.js +64 -12
  49. package/dist-sdk/src/entities/automation/from-tf.d.ts +53 -0
  50. package/dist-sdk/src/entities/automation/from-tf.js +579 -106
  51. package/dist-sdk/src/entities/automation/index.d.ts +2 -2
  52. package/dist-sdk/src/entities/automation/index.js +1 -1
  53. package/dist-sdk/src/entities/automation/lookup-owner.d.ts +23 -0
  54. package/dist-sdk/src/entities/automation/lookup-owner.js +27 -0
  55. package/dist-sdk/src/entities/automation/module.js +265 -26
  56. package/dist-sdk/src/entities/automation/operators.d.ts +6 -2
  57. package/dist-sdk/src/entities/automation/operators.js +0 -2
  58. package/dist-sdk/src/entities/automation/task-output-labels.d.ts +8 -0
  59. package/dist-sdk/src/entities/automation/task-output-labels.js +11 -0
  60. package/dist-sdk/src/entities/automation/tasks.d.ts +37 -2
  61. package/dist-sdk/src/entities/automation/tasks.js +38 -1
  62. package/dist-sdk/src/entities/automation/to-tf.d.ts +8 -0
  63. package/dist-sdk/src/entities/automation/to-tf.js +576 -52
  64. package/dist-sdk/src/entities/automation/triggers.d.ts +47 -1
  65. package/dist-sdk/src/entities/automation/unsafe-script-output.d.ts +10 -5
  66. package/dist-sdk/src/entities/automation/unsafe-script-output.js +10 -5
  67. package/dist-sdk/src/entities/chart/to-tf.js +18 -5
  68. package/dist-sdk/src/entities/dashboard/from-tf.js +45 -11
  69. package/dist-sdk/src/entities/dashboard-widget-order/order.d.ts +5 -3
  70. package/dist-sdk/src/entities/dashboard-widget-order/order.js +6 -4
  71. package/dist-sdk/src/entities/datamine/from-tf.js +10 -3
  72. package/dist-sdk/src/entities/dynamic-layout/build.d.ts +38 -11
  73. package/dist-sdk/src/entities/dynamic-layout/from-tf.js +35 -7
  74. package/dist-sdk/src/entities/dynamic-layout/to-tf.js +101 -9
  75. package/dist-sdk/src/entities/element/build.d.ts +4 -1
  76. package/dist-sdk/src/entities/element/build.js +3 -4
  77. package/dist-sdk/src/entities/element/index.d.ts +1 -1
  78. package/dist-sdk/src/entities/field/from-tf.js +8 -1
  79. package/dist-sdk/src/entities/field/to-tf.d.ts +29 -2
  80. package/dist-sdk/src/entities/field/to-tf.js +106 -7
  81. package/dist-sdk/src/entities/phone-service/from-tf.d.ts +7 -0
  82. package/dist-sdk/src/entities/phone-service/from-tf.js +15 -7
  83. package/dist-sdk/src/entities/phone-service/module.js +4 -2
  84. package/dist-sdk/src/entities/portal/to-tf.d.ts +1 -1
  85. package/dist-sdk/src/entities/portal/to-tf.js +61 -2
  86. package/dist-sdk/src/entities/record-create-form/from-tf.js +3 -1
  87. package/dist-sdk/src/entities/relationship/from-tf.js +34 -4
  88. package/dist-sdk/src/entities/relationship/to-tf.js +24 -6
  89. package/dist-sdk/src/entities/role/from-tf.js +3 -1
  90. package/dist-sdk/src/entities/search-table/from-tf.d.ts +3 -1
  91. package/dist-sdk/src/entities/search-table/from-tf.js +6 -3
  92. package/dist-sdk/src/entities/search-table/module.js +18 -2
  93. package/dist-sdk/src/entities/search-table/to-tf.js +10 -16
  94. package/dist-sdk/src/entities/shared/aspect-target-from-tf.js +6 -1
  95. package/dist-sdk/src/entities/shared/filters/ast.d.ts +6 -0
  96. package/dist-sdk/src/entities/shared/filters/index.d.ts +21 -4
  97. package/dist-sdk/src/entities/shared/filters/index.js +27 -3
  98. package/dist-sdk/src/entities/shared/filters/print.js +23 -7
  99. package/dist-sdk/src/entities/shared/filters/tf-codec.d.ts +24 -0
  100. package/dist-sdk/src/entities/shared/filters/tf-codec.js +98 -3
  101. package/dist-sdk/src/entities/shared/filters/types.d.ts +8 -1
  102. package/dist-sdk/src/entities/shared/run-automation-requirement.d.ts +15 -0
  103. package/dist-sdk/src/entities/shared/run-automation-requirement.js +28 -0
  104. package/dist-sdk/src/entities/shared/search-table-address.d.ts +17 -0
  105. package/dist-sdk/src/entities/shared/search-table-address.js +24 -0
  106. package/dist-sdk/src/entities/shared/skip-release.d.ts +49 -0
  107. package/dist-sdk/src/entities/shared/skip-release.js +74 -0
  108. package/dist-sdk/src/entities/skill/deserializer/print-skill-v2.d.ts +3 -3
  109. package/dist-sdk/src/entities/skill/deserializer/print-skill-v2.js +11 -5
  110. package/dist-sdk/src/entities/skill/module.js +3 -25
  111. package/dist-sdk/src/entities/skill-tool/from-tf.d.ts +4 -2
  112. package/dist-sdk/src/entities/skill-tool/from-tf.js +28 -27
  113. package/dist-sdk/src/entities/skill-tool/to-tf.js +12 -5
  114. package/dist-sdk/src/entities/skill-tool/types.d.ts +1 -0
  115. package/dist-sdk/src/entities/skill-tool/types.js +2 -1
  116. package/dist-sdk/src/entities/table/catalog.d.ts +16 -0
  117. package/dist-sdk/src/entities/table/catalog.js +44 -2
  118. package/dist-sdk/src/entities/table/from-tf.js +30 -4
  119. package/dist-sdk/src/entities/table/keys.d.ts +27 -0
  120. package/dist-sdk/src/entities/table/keys.js +46 -0
  121. package/dist-sdk/src/entities/table/to-tf.js +2 -2
  122. package/dist-sdk/src/entities/view/agent-view-layout-from-tf.d.ts +12 -1
  123. package/dist-sdk/src/entities/view/agent-view-layout-from-tf.js +9 -4
  124. package/dist-sdk/src/entities/view/agent-view-layout-to-tf.js +215 -10
  125. package/dist-sdk/src/entities/view/agent-view-layout.d.ts +10 -4
  126. package/dist-sdk/src/entities/view/custom-view-runtime-rules.d.ts +43 -0
  127. package/dist-sdk/src/entities/view/custom-view-runtime-rules.js +285 -0
  128. package/dist-sdk/src/entities/view/custom-view-validate.d.ts +3 -1
  129. package/dist-sdk/src/entities/view/custom-view-validate.js +24 -5
  130. package/dist-sdk/src/entities/view/from-tf.js +14 -1
  131. package/dist-sdk/src/entities/widget/from-tf.js +14 -7
  132. package/dist-sdk/src/entities/widget/to-tf.js +9 -6
  133. package/dist-sdk/src/generated/ragnarok/ragnarok-spec.d.ts +4 -2
  134. package/dist-sdk/src/generated/ragnarok/ragnarok-spec.js +2 -2
  135. package/dist-sdk/src/graph/index.d.ts +14 -1
  136. package/dist-sdk/src/graph/index.js +2 -0
  137. package/dist-sdk/src/graph/resource-types.d.ts +2 -0
  138. package/dist-sdk/src/graph/resource-types.js +3 -0
  139. package/dist-sdk/src/graph/types.d.ts +105 -0
  140. package/package.json +1 -1
@@ -1,12 +1,12 @@
1
1
  import { EntityTfError } from "../../engine/entity.js";
2
2
  import { checkCustomViewReferences } from "./custom-view-references.js";
3
+ import { calcProblems, ELEMENT_KEYS_NOT_IN_PROPS, pageFillsStatePath, pageReplacesStatePath, replacedStateValues, VISIBLE_FORMS, visibilityProblem } from "./custom-view-runtime-rules.js";
3
4
  const CONTAINERS = new Set(["PanesBlock", "StackBlock", "RowBlock", "CardBlock"]);
4
5
  const LIST_BLOCKS = new Set(["ListCollectionBlock", "DataTableBlock"]);
5
6
  const FILTER_GROUPS = new Set(["AND", "OR"]);
6
7
  /** The record query ignores "not" on these, so the filter silently means the opposite. */
7
8
  const NOT_IGNORED = new Set(["AND", "OR", "CONSECUTIVE_RANGE", "CURRENT_RANGE"]);
8
9
  const DATE = /^\d{4}-\d{2}-\d{2}$/;
9
- const AVG_CALL = /\bAVG\(/;
10
10
  const EMPTY_COUNT = /COUNT\(\s*\)/;
11
11
  const SELECTION_KEYS = ["selectedId", "selectedAspectId", "selectedHandle"];
12
12
  function isObj(v) {
@@ -93,6 +93,10 @@ export function validateCustomViewLayout(spec, where, opts = {}) {
93
93
  opts.diagnostics?.push(`${where}.root: "${root}" is ${rootType === "" ? "untyped" : `a ${rootType}`}; the root is usually a PanesBlock (needed for record lists to open the details pane)`);
94
94
  }
95
95
  const state = isObj(spec["state"]) ? spec["state"] : {};
96
+ // The page replaces these roots when it opens the view (#3205).
97
+ for (const [path, why] of replacedStateValues(spec["state"])) {
98
+ warn(`${where}.state${path.replaceAll("/", ".")}`, `${why} when it opens the view, so this initial value never takes effect. Keep the view's own state under another root, e.g. /page/...`);
99
+ }
96
100
  const parents = {};
97
101
  for (const [id, raw] of Object.entries(elements)) {
98
102
  const elWhere = `${where}.elements.${id}`;
@@ -217,13 +221,27 @@ export function validateCustomViewLayout(spec, where, opts = {}) {
217
221
  const elWhere = `${where}.elements.${id}`;
218
222
  const props = raw["props"];
219
223
  const type = raw["type"];
224
+ // The page refuses the whole view on a bad `visible` (#3205).
225
+ if (raw["visible"] !== undefined) {
226
+ const problem = visibilityProblem(raw["visible"]);
227
+ if (problem !== undefined) {
228
+ note(`${elWhere}.visible`, `${problem}. The page refuses the whole custom view on this. Use ${VISIBLE_FORMS}`);
229
+ }
230
+ }
231
+ for (const key of ELEMENT_KEYS_NOT_IN_PROPS) {
232
+ if (props[key] !== undefined) {
233
+ note(`${elWhere}.props.${key}`, `"${key}" belongs on the element, next to "props", not inside it; the page refuses the whole custom view otherwise`);
234
+ }
235
+ }
220
236
  const scan = (value, path) => {
221
237
  if (isBinding(value)) {
222
238
  const target = bindingTarget(value);
223
- if (typeof target === "string" && !target.startsWith("/host/") && !readState(target).found) {
239
+ if (typeof target === "string" && !pageFillsStatePath(target) && !readState(target).found) {
224
240
  // Warn, not fail (edk#2923): the page reads a missing path as undefined,
225
241
  // and pulled live layouts rely on that, so failing would block the build.
226
- warn(`${elWhere}.${path}`, `binds to "${target}", which is not in spec.state, so it starts undefined. Add an initial value there to set its default.`);
242
+ warn(`${elWhere}.${path}`, pageReplacesStatePath(target)
243
+ ? `binds to "${target}", which starts undefined: the page replaces /${target.split("/").filter(Boolean)[0]} when it opens the view, so an initial value there is dropped. Keep the view's own state under another root, e.g. /page/... (#3205)`
244
+ : `binds to "${target}", which is not in spec.state, so it starts undefined. Add an initial value there to set its default.`);
227
245
  }
228
246
  return;
229
247
  }
@@ -239,10 +257,11 @@ export function validateCustomViewLayout(spec, where, opts = {}) {
239
257
  walkFilter(props["filterJson"], `${elWhere}.filterJson`);
240
258
  if (typeof props["calc"] === "string") {
241
259
  const calc = props["calc"];
242
- if (AVG_CALL.test(calc))
243
- note(`${elWhere}.calc`, "use AVERAGE, not AVG");
244
260
  if (EMPTY_COUNT.test(calc))
245
261
  note(`${elWhere}.calc`, "COUNT needs a field, e.g. COUNT(\"Title\")");
262
+ // The calculation fails and the metric shows nothing (#3205).
263
+ for (const problem of calcProblems(calc))
264
+ note(`${elWhere}.calc`, problem);
246
265
  }
247
266
  if (type === "ChartBlock" && (typeof props["dateFieldId"] === "string" || isObj(props["dateFieldId"]))) {
248
267
  const range = props["range"];
@@ -16,8 +16,10 @@ import { lostStageMessage, pulledStageHandle } from "../app/stage-keys.js";
16
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
+ import { skipAndRelease, unresolvedReferenceName } from "../shared/skip-release.js";
19
20
  import { DASHBOARD_WIDGET_RESOURCE_TYPE } from "../dashboard-widget/module.js";
20
21
  import { WIDGET_RESOURCE_TYPE } from "../widget/module.js";
22
+ import { AUTOMATION_RESOURCE_TYPE } from "../automation/types.js";
21
23
  import { filterFromTf, principalList } from "../access-policy/from-tf.js";
22
24
  import { listViewDensity, } from "./build.js";
23
25
  import { AGENT_VIEW_RESOURCE_TYPE, CALENDAR_VIEW_RESOURCE_TYPE, CUSTOM_VIEW_RESOURCE_TYPE, LAYOUT_RESOURCE_TYPE, DASHBOARD_VIEW_RESOURCE_TYPE, GROUP_SECTION_WIRE_TYPE, KNOWN_AGENT_VIEW_ATTRS, KNOWN_CALENDAR_VIEW_ATTRS, KNOWN_CUSTOM_VIEW_ATTRS, KNOWN_DASHBOARD_VIEW_ATTRS, KNOWN_KANBAN_VIEW_ATTRS, KNOWN_LAYOUT_ATTRS, KNOWN_LAYOUT_SECTION_ATTRS, KNOWN_LIST_VIEW_ATTRS, KNOWN_MANAGED_VIEW_ORDER_ATTRS, LIST_VIEW_RESOURCE_TYPE, KANBAN_VIEW_RESOURCE_TYPE, SECTION_TYPE_FROM_WIRE, SYSTEM_FIELD_KEY_BY_ID_ATTR, UPDATE_SECTION_WIRE_TYPE, } from "./types.js";
@@ -186,7 +188,8 @@ function dashboardViewFromTf(block, owner, ctx) {
186
188
  }
187
189
  const dashboardLabel = resourceRefLabel(attrs["dashboard_id"], DASHBOARD_RESOURCE_TYPE);
188
190
  if (dashboardLabel === undefined) {
189
- ctx.diagnostics.push(`${where}: dashboard_id is not a ${DASHBOARD_RESOURCE_TYPE} resource reference; skipped`);
191
+ // Written to no source, so also left out of adoption (edk#3172).
192
+ skipAndRelease(ctx, `${DASHBOARD_VIEW_RESOURCE_TYPE}.${label}`, { reference: unresolvedReferenceName(attrs["dashboard_id"], "dashboard_id") }, `${where}: dashboard_id is not a ${DASHBOARD_RESOURCE_TYPE} resource reference; skipped`);
190
193
  return undefined;
191
194
  }
192
195
  const scope = owner.scope ?? "app";
@@ -283,7 +286,17 @@ function layoutRefOptions(owner, ctx, where) {
283
286
  }
284
287
  return undefined;
285
288
  };
289
+ // The owner's automations, as run-automation widgets pull them (#3207).
290
+ const automation = (value) => {
291
+ const label = resourceRefLabel(value, AUTOMATION_RESOURCE_TYPE);
292
+ if (label === undefined)
293
+ return undefined;
294
+ const key = scopedLabelToBagKey(owner.ownerTfLabel, label, "app");
295
+ const exportedName = ctx.resourceByAddress?.(`${AUTOMATION_RESOURCE_TYPE}.${label}`)?.attrs["name"];
296
+ return { __specRef: "automation", key, name: typeof exportedName === "string" && exportedName !== "" ? exportedName : key };
297
+ };
286
298
  return {
299
+ automation,
287
300
  isOwnApp: (value) => resourceRefLabel(value, owner.type) === owner.label,
288
301
  fieldKey: (value) => fieldRefFromTf(value, owner, ctx, `${where} layout`),
289
302
  ownFieldKey: (id, systemKeys) => ownExtractedFieldKey(id, owner, ctx, systemKeys),
@@ -8,6 +8,7 @@ import { SUB_TYPE_BY_RESOURCE } from "../field/types.js";
8
8
  import { WIDGET_RESOURCE_TYPE } from "./module.js";
9
9
  import { filterFromTf } from "../access-policy/from-tf.js";
10
10
  import { resolveDataAspectTarget } from "../shared/aspect-target-from-tf.js";
11
+ import { skipAndRelease, unresolvedReferenceName } from "../shared/skip-release.js";
11
12
  import { bareForeignFieldIdRef, isBarePlatformId, isUnextractedFieldKey, resolveOwnDataFieldRef, unextractedFieldRefId } from "../view/from-tf.js";
12
13
  const KNOWN_ROOT_ATTRS = new Set(["object_id", "related_object", "related_link_action", "related_create_action", "run_automation_action"]);
13
14
  export function widgetsFromTf(blocks, owner, ctx, dynamicLayoutCompanionLabels = new Set()) {
@@ -29,10 +30,17 @@ function widgetFromTf(block, owner, ctx, dynamicLayoutCompanionLabels) {
29
30
  if (resourceRefLabel(block.attrs["object_id"], owner.type) !== owner.label)
30
31
  return undefined;
31
32
  const key = scopedLabelToBagKey(owner.ownerTfLabel, label, owner.scope);
33
+ // A widget written to no source is also left out of adoption, or released
34
+ // if state has it, so the next plan doesn't destroy it (edk#3172).
35
+ const address = `${WIDGET_RESOURCE_TYPE}.${label}`;
36
+ const skipReference = (attribute, value, fallback) => {
37
+ skipAndRelease(ctx, address, { reference: unresolvedReferenceName(value, attribute) }, fallback ?? `${where}: ${attribute} is not resolvable; skipped`);
38
+ return undefined;
39
+ };
32
40
  const variants = ["related_object", "related_link_action", "related_create_action", "run_automation_action"]
33
41
  .filter((attr) => block.attrs[attr] !== undefined);
34
42
  if (variants.length !== 1) {
35
- ctx.diagnostics.push(`${where}: expected exactly one widget variant, found ${variants.length}; skipped`);
43
+ skipAndRelease(ctx, address, { problem: `the export gives it ${variants.length} widget variants, not one` }, `${where}: expected exactly one widget variant, found ${variants.length}; skipped`);
36
44
  return undefined;
37
45
  }
38
46
  const variant = variants[0];
@@ -40,7 +48,7 @@ function widgetFromTf(block, owner, ctx, dynamicLayoutCompanionLabels) {
40
48
  return undefined;
41
49
  const body = plainObject(block.attrs[variant]);
42
50
  if (body === undefined) {
43
- ctx.diagnostics.push(`${where}.${variant}: expected an object; skipped`);
51
+ skipAndRelease(ctx, address, { problem: `its ${variant} is not an object` }, `${where}.${variant}: expected an object; skipped`);
44
52
  return undefined;
45
53
  }
46
54
  // name is required and build always sends it, so a value pull cannot read
@@ -58,7 +66,7 @@ function widgetFromTf(block, owner, ctx, dynamicLayoutCompanionLabels) {
58
66
  if (variant === "related_object") {
59
67
  const target = aspectRef(body["object_id"], owner, ctx);
60
68
  if (target === undefined)
61
- return undefined;
69
+ return skipReference(`${variant}.object_id`, body["object_id"]);
62
70
  return {
63
71
  key,
64
72
  type: "relatedRecords",
@@ -70,7 +78,7 @@ function widgetFromTf(block, owner, ctx, dynamicLayoutCompanionLabels) {
70
78
  if (variant === "related_link_action") {
71
79
  const target = aspectRef(body["object_id"], owner, ctx);
72
80
  if (target === undefined)
73
- return undefined;
81
+ return skipReference(`${variant}.object_id`, body["object_id"]);
74
82
  const targetTfLabel = typeof target !== "string" && (target.kind === "app" || target.kind === "element")
75
83
  ? (target.key === owner.ownerRefName ? owner.ownerTfLabel : target.namespace ?? tsLabelToTfLabel(target.key))
76
84
  : undefined;
@@ -107,13 +115,12 @@ function widgetFromTf(block, owner, ctx, dynamicLayoutCompanionLabels) {
107
115
  if (variant === "related_create_action") {
108
116
  const target = aspectRef(body["object_id"], owner, ctx);
109
117
  if (target === undefined)
110
- return undefined;
118
+ return skipReference(`${variant}.object_id`, body["object_id"]);
111
119
  return { key, type: "createRecord", name, target, ...buttonStyle(body, where, ctx) };
112
120
  }
113
121
  const automation = automationRef(body["automation_id"], owner, ctx);
114
122
  if (automation === undefined) {
115
- ctx.diagnostics.push(`${where}.run_automation_action: automation_id is not resolvable; skipped`);
116
- return undefined;
123
+ return skipReference("run_automation_action.automation_id", body["automation_id"], `${where}.run_automation_action: automation_id is not resolvable; skipped`);
117
124
  }
118
125
  const droppedGap = typeof automation === "string" ? droppedAutomationGap(key, automation, owner, ctx) : undefined;
119
126
  if (droppedGap !== undefined)
@@ -3,8 +3,9 @@ import { workspaceAspectKey } from "../../engine/build/context.js";
3
3
  import { foreignFieldDataLabel, resolveForeignRef } from "../shared/foreign-ref.js";
4
4
  import { expr, isCanonicalTsLabel, sanitizeName, scopedResourceLabel, tfLabelToTsLabel, tsLabelToTfLabel, } from "../../engine/tf/index.js";
5
5
  import { AUTOMATION_RESOURCE_TYPE, automationResourceLabel } from "../automation/types.js";
6
+ import { automationLookupOwnerId } from "../automation/lookup-owner.js";
6
7
  import { fieldMetadataFromEntries } from "../field/metadata.js";
7
- import { authoredFieldKeysFromPayload, droppedEntryGap, fieldLookupName, fieldRefToTfValue, unauthoredSiblingFieldRef, UNRESOLVED_FIELD_REF, } from "../field/to-tf.js";
8
+ import { droppedEntryGap, fieldLookupName, fieldRefToTfValue, siblingFieldOwnership, unauthoredSiblingFieldRef, UNRESOLVED_FIELD_REF, } from "../field/to-tf.js";
8
9
  import { runAutomationParameterValue } from "./build.js";
9
10
  import { WIDGET_RESOURCE_TYPE } from "./module.js";
10
11
  import { filterToTf } from "../access-policy/to-tf.js";
@@ -172,7 +173,9 @@ function resolveAspect(value, where, opts) {
172
173
  tfLabel: sibling.tfLabel,
173
174
  name: value?.name ?? payloadName,
174
175
  managed: true,
175
- fieldOwnership: authoredFieldKeysFromPayload(sibling.streamRootEntity?.payload),
176
+ // The address each field's own build gives it, whatever type the
177
+ // reference carries (#3088).
178
+ fieldOwnership: siblingFieldOwnership(sibling.streamRootEntity?.payload, sibling.tfLabel, kind),
176
179
  };
177
180
  }
178
181
  const name = value?.name ?? refName;
@@ -219,7 +222,7 @@ function columnAspect(value, target, where, opts) {
219
222
  const refName = value.refName ?? "";
220
223
  const owning = kinds.find((kind) => {
221
224
  const aspect = opts.workspaceAspects?.get(workspaceAspectKey(kind, parent));
222
- return authoredFieldKeysFromPayload(aspect?.streamRootEntity?.payload)?.has(refName) === true;
225
+ return aspect !== undefined && siblingFieldOwnership(aspect.streamRootEntity?.payload, aspect.tfLabel, kind)?.has(refName) === true;
223
226
  });
224
227
  const kind = owning ?? kinds[0];
225
228
  return resolveAspect({ __kind: kind, refName: parent, name: parent }, where, opts) ?? target;
@@ -283,14 +286,14 @@ function resolveColumns(columns, target, where, opts) {
283
286
  const ownTarget = columnTarget.kind === opts.scope && columnTarget.refName === opts.ownerRefName;
284
287
  const unauthored = ownTarget
285
288
  ? undefined
286
- : unauthoredSiblingFieldRef(column.refName, { kind: columnTarget.kind, refName: columnTarget.refName ?? refName, fieldOwnership: columnTarget.fieldOwnership });
289
+ : unauthoredSiblingFieldRef(column.refName, { kind: columnTarget.kind, refName: columnTarget.refName ?? refName, fieldOwnership: columnTarget.fieldOwnership }, fieldLookupName(value));
287
290
  if (unauthored !== undefined && fieldLookupName(value) === undefined) {
288
291
  opts.diagnostics.push(droppedEntryGap(`${where}[${index}]`, `${unauthored}; dropped`, "widget"));
289
292
  continue;
290
293
  }
291
294
  const direct = unauthored !== undefined
292
295
  ? undefined
293
- : fieldRefToTfValue(column.fieldType, column.refName, columnTarget.tfLabel, columnTarget.kind, columnTarget.fieldOwnership);
296
+ : fieldRefToTfValue(column.fieldType, column.refName, columnTarget.tfLabel, columnTarget.kind, columnTarget.fieldOwnership, undefined, fieldLookupName(value));
294
297
  if (direct !== undefined) {
295
298
  out.push(direct);
296
299
  continue;
@@ -391,7 +394,7 @@ function resolveAutomation(value, widgetKey, where, opts) {
391
394
  return undefined;
392
395
  }
393
396
  const label = `${opts.ownerTfLabel}_${tsLabelToTfLabel(refName)}`;
394
- opts.orgRefs.rawLookup(AUTOMATION_RESOURCE_TYPE, label, displayName, { app_id: opts.objectId });
397
+ opts.orgRefs.rawLookup(AUTOMATION_RESOURCE_TYPE, label, displayName, { app_id: automationLookupOwnerId(opts.scope, opts.ownerTfLabel, opts.orgRefs) });
395
398
  return expr.dataAttr(AUTOMATION_RESOURCE_TYPE, label, ["id"]);
396
399
  }
397
400
  return expr.resourceAttr(AUTOMATION_RESOURCE_TYPE, automationResourceLabel(opts.ownerTfLabel, refName, opts.scope, opts.scope === "element" ? opts.ownerHandle : undefined), ["id"]);
@@ -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. 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.
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. Set booleanDisplay to "badge" (default) or "icon" to choose how read-only checkbox/boolean fields render among configured attributes; the field name stays visible. 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";
@@ -226,6 +226,7 @@ export type ListCollectionBlockSelfFetchingProps = {
226
226
  readonly loadingMessage?: (string) | (PropExpression);
227
227
  readonly errorMessage?: (string) | (PropExpression);
228
228
  readonly emptyMessage?: (string) | (PropExpression);
229
+ readonly booleanDisplay?: ("badge" | "icon") | (PropExpression);
229
230
  readonly aspectId?: (string) | (PropExpression);
230
231
  readonly searchValue?: (string) | (PropExpression);
231
232
  readonly filterJson?: (((JsonSafeState) & ((string) | (number) | (boolean) | (null) | (ReadonlyArray<OpaqueJson>) | ({
@@ -420,7 +421,7 @@ export type CardBlockProps = {
420
421
  /**
421
422
  * Customer-facing name: Data table
422
423
  * Customer-facing description: A spreadsheet-style table with typed columns for structured rows.
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.
424
+ * 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. Set booleanDisplay to "badge" (default) or "icon" to choose how read-only checkbox/boolean aspect fields render in live records. 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.
424
425
  */
425
426
  export type DataTableBlockElement = {
426
427
  readonly type: "DataTableBlock";
@@ -484,6 +485,7 @@ export type DataTableBlockSelfFetchingProps = {
484
485
  readonly loadingMessage?: (string) | (PropExpression);
485
486
  readonly errorMessage?: (string) | (PropExpression);
486
487
  readonly emptyMessage?: (string) | (PropExpression);
488
+ readonly booleanDisplay?: ("badge" | "icon") | (PropExpression);
487
489
  readonly aspectId?: (string) | (PropExpression);
488
490
  readonly columns?: (ReadonlyArray<DataTableSelfFetchingColumn>) | (PropExpression);
489
491
  readonly columnHeaders?: ({
@@ -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.45.0
3
- // Schema sha256: 91b420eaae8a05c4f85c273d2651067786d3e3de650b71cc1520b3ca1a1818e0
2
+ // Source: urn:elementum:elementum-blocks:spec:v1 version 1.46.0
3
+ // Schema sha256: d8dfa173c9efe7aa2eedf7a5f44abeb9eb9d6a3c34e920216c39971f3e6f5a63
4
4
  // Generator revision: 2
5
5
  export {};
@@ -2,7 +2,7 @@
2
2
  * Public graph barrel: KIND_MODULES + derived views for pull/build/canvas.
3
3
  */
4
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, UnmanagedLookup, } 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, UnmanagedLookup, TrimmedList, SkippedOwnFileReport, TriggerReferenceRepair, } 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";
@@ -88,6 +88,19 @@ export declare const BUILD_VS_EXPORT_RECORD_FIELD_OUTPUT_KEYS: {
88
88
  readonly nameAttribute: string;
89
89
  readonly ownerAttribute: string;
90
90
  }[];
91
+ /** Task outputs named `<prefix><entry id>` whose refs key is that list entry's key attribute (#3085). */
92
+ export declare const BUILD_VS_EXPORT_LIST_ENTRY_OUTPUT_KEYS: {
93
+ readonly resourceType: string;
94
+ readonly prefix: string;
95
+ readonly listAttribute: string;
96
+ readonly idAttribute: string;
97
+ readonly keyAttribute: string;
98
+ readonly types: {
99
+ readonly localPrefix: string;
100
+ readonly typeAttribute: string;
101
+ readonly multipleAttribute: string;
102
+ };
103
+ }[];
91
104
  export declare const BUILD_VS_EXPORT_MAP_KEY_ALIASES: {
92
105
  readonly attribute: string;
93
106
  readonly canonicalKey: (key: string) => string | undefined;
@@ -63,6 +63,8 @@ export const BUILD_VS_EXPORT_COMPUTED_MAP_ATTRIBUTES = KIND_MODULES.flatMap((mod
63
63
  export const BUILD_VS_EXPORT_NESTED_OMITTED_DEFAULTS = KIND_MODULES.flatMap((module) => (module.roundtrip?.nestedOmittedDefaults ?? []).flatMap((declared) => implementedResourceTypes(module.resource).map((blockType) => ({ blockType, ...declared }))));
64
64
  export const BUILD_VS_EXPORT_COMPUTED_REFERENCE_MAPS = KIND_MODULES.flatMap((module) => module.roundtrip?.computedReferenceMaps ?? []);
65
65
  export const BUILD_VS_EXPORT_RECORD_FIELD_OUTPUT_KEYS = KIND_MODULES.flatMap((module) => module.roundtrip?.recordFieldOutputKeys ?? []);
66
+ /** Task outputs named `<prefix><entry id>` whose refs key is that list entry's key attribute (#3085). */
67
+ export const BUILD_VS_EXPORT_LIST_ENTRY_OUTPUT_KEYS = KIND_MODULES.flatMap((module) => module.roundtrip?.listEntryOutputKeys ?? []);
66
68
  export const BUILD_VS_EXPORT_MAP_KEY_ALIASES = KIND_MODULES.flatMap((module) => module.roundtrip?.mapKeyAliases ?? []);
67
69
  export const BUILD_VS_EXPORT_ATTRIBUTE_LOCALS = KIND_MODULES.flatMap((module) => module.roundtrip?.exportedAttributeLocals ?? []);
68
70
  export const BUILD_VS_EXPORT_PICKLIST_LABEL_ASSIGNMENTS = KIND_MODULES.flatMap((module) => module.roundtrip?.picklistLabelAssignments ?? []);
@@ -8,6 +8,8 @@ export declare const SCOPE_OWNER_RESOURCE_TYPES: {
8
8
  readonly app: "elementum_app";
9
9
  readonly element: "elementum_element";
10
10
  };
11
+ /** A portal: an org-level scope owner with no children (`--scope portal:<x>`, #3209). */
12
+ export declare const SCOPE_PORTAL_RESOURCE_TYPE = "elementum_portal";
11
13
  /**
12
14
  * App, element and field resources: a scoped plan reads other owners'
13
15
  * definitions through these, so they are not reported as dependencies
@@ -12,8 +12,11 @@ import { ACCESS_POLICY_RESOURCE_TYPE } from "../entities/access-policy/types.js"
12
12
  import { RELATIONSHIP_RESOURCE_TYPE } from "../entities/relationship/module.js";
13
13
  import { MANAGED_FIELD_ORDER_RESOURCE_TYPE } from "../entities/field/types.js";
14
14
  import { MANAGED_VIEW_ORDER_RESOURCE_TYPE } from "../entities/view/types.js";
15
+ import { PORTAL_RESOURCE_TYPE } from "../entities/portal/types.js";
15
16
  /** Definition resource of each scope-owner kind. */
16
17
  export const SCOPE_OWNER_RESOURCE_TYPES = { app: APP_RESOURCE_TYPE, element: ELEMENT_RESOURCE_TYPE };
18
+ /** A portal: an org-level scope owner with no children (`--scope portal:<x>`, #3209). */
19
+ export const SCOPE_PORTAL_RESOURCE_TYPE = PORTAL_RESOURCE_TYPE;
17
20
  /**
18
21
  * App, element and field resources: a scoped plan reads other owners'
19
22
  * definitions through these, so they are not reported as dependencies
@@ -348,6 +348,21 @@ export interface OwnFileExtractResult {
348
348
  readonly adoptionAddressAliases?: readonly AdoptionAddressAlias[];
349
349
  /** Lookups for skipped resources that other resources in the stream reference (see {@link UnmanagedLookup}). */
350
350
  readonly unmanagedLookups?: readonly UnmanagedLookup[];
351
+ /** One entry per own-file child this pull skipped, for the pull summary (see {@link SkippedOwnFileReport}). */
352
+ readonly skippedReports?: readonly SkippedOwnFileReport[];
353
+ /** References the first plan after this pull rewrites, for the pull summary (see {@link TriggerReferenceRepair}). */
354
+ readonly triggerReferenceRepairs?: readonly TriggerReferenceRepair[];
355
+ /**
356
+ * Export addresses whose state must hold their live settings after this
357
+ * pull. Adoption imports only what state lacks, so one already in state
358
+ * keeps the settings it was imported or applied with; adoption re-imports
359
+ * these (state only, a provider Read) when they are already bound. For a
360
+ * check that compares source with state, e.g. a stale run-automation tool
361
+ * and, for an unmapped required parameter, its automation's on-demand
362
+ * trigger (edk#3230, #3231). Never a resource whose import rewrites
363
+ * authored bookkeeping (a publish's revision).
364
+ */
365
+ readonly reimportForLive?: readonly string[];
351
366
  /**
352
367
  * Own-file ref names released from state on this pull. Their authored files
353
368
  * are archived so the next plan does not recreate the live resource (#1858).
@@ -387,6 +402,39 @@ export interface AdoptionAddressAlias {
387
402
  readonly from: string;
388
403
  readonly to: string;
389
404
  }
405
+ /**
406
+ * An own-file child pull skipped, as the pull summary lists it (#3053).
407
+ * `address` is its root resource; `causedBy`, when set, is the root resource
408
+ * of the skipped child whose skip this one follows from (transitively, the
409
+ * first one skipped for a reason of its own).
410
+ */
411
+ export interface SkippedOwnFileReport {
412
+ readonly address: string;
413
+ readonly name: string;
414
+ readonly reason: string;
415
+ readonly causedBy?: string;
416
+ }
417
+ /**
418
+ * A live reference to an on-demand input saved with the input's declared
419
+ * spelling ("ticket_number") instead of the normalized name the platform
420
+ * expects ("ticketNumber"). The platform marks such a reference invalid;
421
+ * source builds the normalized name, so the first plan after the pull
422
+ * rewrites it. Both spellings resolve to the same value at run time (#3109).
423
+ */
424
+ export interface TriggerReferenceRepair {
425
+ /** The automation's display name. */
426
+ readonly automation: string;
427
+ /** The automation's resource address in the export. */
428
+ readonly automationAddress: string;
429
+ /** The task's display name; absent for a workflow output. */
430
+ readonly task?: string;
431
+ /** The resource the plan updates (the task, switch case or publish). */
432
+ readonly address: string;
433
+ /** Where in that resource the reference is, e.g. `input "answers"`. */
434
+ readonly input: string;
435
+ readonly declared: string;
436
+ readonly normalized: string;
437
+ }
390
438
  /**
391
439
  * A data lookup that stands in for skipped resources in the export adoption
392
440
  * plans (#3023). Adoption replaces each `.id` reference to a skipped resource
@@ -396,7 +444,31 @@ export interface AdoptionAddressAlias {
396
444
  */
397
445
  export interface UnmanagedLookup {
398
446
  readonly lookup: TfBlock;
447
+ /** Skipped resources whose attributes other than `id` the lookup carries. */
399
448
  readonly addresses: readonly string[];
449
+ /**
450
+ * Skipped resources the lookup stands for entirely, `id` included: every
451
+ * reference to one reads the lookup, never a platform id, so it pairs with
452
+ * the lookup build emits for the same reference (#3047).
453
+ */
454
+ readonly idAddresses?: readonly string[];
455
+ /** Data blocks `lookup` reads (its owner's lookup), declared with it when not already declared. */
456
+ readonly supporting?: readonly TfBlock[];
457
+ }
458
+ /**
459
+ * A resource pull keeps although some entries of one of its lists were left
460
+ * out of source (a dashboard's widget order without a skipped widget).
461
+ * Adoption drops the references to `leftOut` from the export's block and
462
+ * imports it with `importId`, which tracks only the entries left in.
463
+ */
464
+ export interface TrimmedList {
465
+ readonly address: string;
466
+ /** Addresses whose `.id` references the export's block lists, left out of source. */
467
+ readonly leftOut: readonly string[];
468
+ readonly importId: string;
469
+ /** The list attribute, and the ids it holds once imported with `importId`. */
470
+ readonly attribute: string;
471
+ readonly keptIds: readonly string[];
400
472
  }
401
473
  export interface PrintedOwnFile {
402
474
  readonly refName: string;
@@ -604,6 +676,16 @@ export interface BuildChildContext {
604
676
  readonly name: string;
605
677
  readonly namespace?: string;
606
678
  }>;
679
+ /** See `ToTfContext.outOfScopeElements`. */
680
+ readonly outOfScopeElements?: ReadonlyMap<string, {
681
+ readonly name: string;
682
+ readonly namespace?: string;
683
+ }>;
684
+ /** See `ToTfContext.catalogElementIdentities`. */
685
+ readonly catalogElementIdentities?: ReadonlyMap<string, {
686
+ readonly name: string;
687
+ readonly namespace?: string;
688
+ }>;
607
689
  /** The current app/element/table entity, forwarded for owner-local reference resolution. */
608
690
  readonly streamRootEntity?: DeployableEntity;
609
691
  /**
@@ -964,6 +1046,29 @@ export interface EntityKindModule {
964
1046
  readonly nameAttribute: string;
965
1047
  readonly ownerAttribute: string;
966
1048
  }[];
1049
+ /**
1050
+ * A task output whose reference name is `<prefix><entry id>` (or the
1051
+ * legacy `<prefix><entry key>`): the task's refs list it under that
1052
+ * entry's `<keyAttribute>` in its own `<listAttribute>` (a Calculation's
1053
+ * `calculationOutputMap.<id>` is its variable name, #3085).
1054
+ */
1055
+ readonly listEntryOutputKeys?: readonly {
1056
+ readonly resourceType: string;
1057
+ readonly prefix: string;
1058
+ readonly listAttribute: string;
1059
+ readonly idAttribute: string;
1060
+ readonly keyAttribute: string;
1061
+ /**
1062
+ * Where the export carries each entry's output type: a list local
1063
+ * `<localPrefix><task label>` of objects keyed by `<keyAttribute>`. An
1064
+ * envelope whose `fieldType`/`multiple` differ isn't that key's read.
1065
+ */
1066
+ readonly types: {
1067
+ readonly localPrefix: string;
1068
+ readonly typeAttribute: string;
1069
+ readonly multipleAttribute: string;
1070
+ };
1071
+ }[];
967
1072
  /**
968
1073
  * Computed map attributes (`refs`, also read as `inner.refs`) whose
969
1074
  * provider publishes one value under several keys: `canonicalKey` names
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elementumai/edk",
3
- "version": "0.13.3",
3
+ "version": "0.14.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",