@elementumai/edk 0.9.18 → 0.9.20

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 (219) hide show
  1. package/README.md +154 -9
  2. package/dist-sdk/src/catalog/factories.d.ts +35 -1
  3. package/dist-sdk/src/catalog/factories.js +36 -0
  4. package/dist-sdk/src/catalog/from-authoring.d.ts +13 -8
  5. package/dist-sdk/src/catalog/from-authoring.js +34 -9
  6. package/dist-sdk/src/catalog/index.d.ts +2 -2
  7. package/dist-sdk/src/catalog/index.js +2 -2
  8. package/dist-sdk/src/catalog/org.d.ts +39 -1
  9. package/dist-sdk/src/catalog/org.js +460 -50
  10. package/dist-sdk/src/catalog/render.js +6 -6
  11. package/dist-sdk/src/catalog/token.js +7 -0
  12. package/dist-sdk/src/catalog/types.d.ts +44 -1
  13. package/dist-sdk/src/catalog/types.js +13 -0
  14. package/dist-sdk/src/core/triggers/on-demand.d.ts +39 -3
  15. package/dist-sdk/src/core/triggers/on-demand.js +10 -2
  16. package/dist-sdk/src/engine/build/context.d.ts +1 -1
  17. package/dist-sdk/src/engine/ei/run.d.ts +149 -0
  18. package/dist-sdk/src/engine/ei/run.js +1132 -0
  19. package/dist-sdk/src/engine/logging.d.ts +17 -0
  20. package/dist-sdk/src/engine/logging.js +18 -0
  21. package/dist-sdk/src/engine/pull/ref-only.d.ts +5 -0
  22. package/dist-sdk/src/engine/pull/ref-only.js +64 -27
  23. package/dist-sdk/src/engine/pull/result-output.d.ts +8 -0
  24. package/dist-sdk/src/engine/pull/result-output.js +88 -4
  25. package/dist-sdk/src/engine/tf/expr.js +39 -14
  26. package/dist-sdk/src/engine/tf/index.d.ts +3 -3
  27. package/dist-sdk/src/engine/tf/index.js +2 -2
  28. package/dist-sdk/src/engine/tf/labels.d.ts +8 -0
  29. package/dist-sdk/src/engine/tf/labels.js +13 -0
  30. package/dist-sdk/src/engine/tf/model.d.ts +22 -1
  31. package/dist-sdk/src/engine/tf/parse.d.ts +19 -0
  32. package/dist-sdk/src/engine/tf/parse.js +197 -10
  33. package/dist-sdk/src/engine/tf/render.d.ts +4 -2
  34. package/dist-sdk/src/engine/tf/render.js +41 -7
  35. package/dist-sdk/src/engine/validation.d.ts +39 -0
  36. package/dist-sdk/src/engine/validation.js +85 -0
  37. package/dist-sdk/src/engine/workspace/loader.js +49 -12
  38. package/dist-sdk/src/entities/access-policy/from-tf.d.ts +11 -1
  39. package/dist-sdk/src/entities/access-policy/from-tf.js +6 -1
  40. package/dist-sdk/src/entities/access-policy/to-tf.d.ts +11 -0
  41. package/dist-sdk/src/entities/access-policy/to-tf.js +16 -6
  42. package/dist-sdk/src/entities/agent/build.d.ts +4 -16
  43. package/dist-sdk/src/entities/agent/build.js +40 -5
  44. package/dist-sdk/src/entities/agent/deserializer/print-agent-v2.js +4 -2
  45. package/dist-sdk/src/entities/agent/to-tf.js +6 -3
  46. package/dist-sdk/src/entities/agent-tool/from-tf.d.ts +2 -0
  47. package/dist-sdk/src/entities/agent-tool/from-tf.js +7 -1
  48. package/dist-sdk/src/entities/agent-tool/to-tf.d.ts +2 -2
  49. package/dist-sdk/src/entities/agent-tool/to-tf.js +29 -6
  50. package/dist-sdk/src/entities/app/build.d.ts +98 -19
  51. package/dist-sdk/src/entities/app/build.js +51 -19
  52. package/dist-sdk/src/entities/app/deserializer/normalize.d.ts +22 -1
  53. package/dist-sdk/src/entities/app/from-tf.d.ts +1 -0
  54. package/dist-sdk/src/entities/app/from-tf.js +11 -5
  55. package/dist-sdk/src/entities/app/index.d.ts +6 -5
  56. package/dist-sdk/src/entities/app/index.js +2 -0
  57. package/dist-sdk/src/entities/app/module.js +18 -2
  58. package/dist-sdk/src/entities/app/to-tf.js +21 -11
  59. package/dist-sdk/src/entities/automation/build.d.ts +49 -6
  60. package/dist-sdk/src/entities/automation/build.js +163 -19
  61. package/dist-sdk/src/entities/automation/deserializer/print-automation.d.ts +24 -1
  62. package/dist-sdk/src/entities/automation/deserializer/print-automation.js +320 -39
  63. package/dist-sdk/src/entities/automation/from-tf.d.ts +28 -6
  64. package/dist-sdk/src/entities/automation/from-tf.js +563 -74
  65. package/dist-sdk/src/entities/automation/generated/task-output-contracts.d.ts +33 -0
  66. package/dist-sdk/src/entities/automation/generated/task-output-contracts.js +183 -0
  67. package/dist-sdk/src/entities/automation/index.d.ts +2 -2
  68. package/dist-sdk/src/entities/automation/index.js +1 -1
  69. package/dist-sdk/src/entities/automation/module.d.ts +2 -0
  70. package/dist-sdk/src/entities/automation/module.js +93 -8
  71. package/dist-sdk/src/entities/automation/output-field-types.d.ts +7 -0
  72. package/dist-sdk/src/entities/automation/output-field-types.js +36 -0
  73. package/dist-sdk/src/entities/automation/output-key-wire-name.d.ts +9 -0
  74. package/dist-sdk/src/entities/automation/output-key-wire-name.js +13 -0
  75. package/dist-sdk/src/entities/automation/script-code.d.ts +17 -0
  76. package/dist-sdk/src/entities/automation/script-code.js +91 -5
  77. package/dist-sdk/src/entities/automation/system-ref-name.d.ts +16 -0
  78. package/dist-sdk/src/entities/automation/system-ref-name.js +48 -0
  79. package/dist-sdk/src/entities/automation/task-output-labels.d.ts +17 -0
  80. package/dist-sdk/src/entities/automation/task-output-labels.js +47 -0
  81. package/dist-sdk/src/entities/automation/tasks.d.ts +53 -4
  82. package/dist-sdk/src/entities/automation/tasks.js +38 -9
  83. package/dist-sdk/src/entities/automation/to-tf.d.ts +4 -0
  84. package/dist-sdk/src/entities/automation/to-tf.js +647 -167
  85. package/dist-sdk/src/entities/automation/triggers.d.ts +4 -2
  86. package/dist-sdk/src/entities/automation/triggers.js +4 -0
  87. package/dist-sdk/src/entities/automation/types.js +1 -0
  88. package/dist-sdk/src/entities/chart/from-tf.js +33 -17
  89. package/dist-sdk/src/entities/chart/module.js +3 -1
  90. package/dist-sdk/src/entities/chart/printer.d.ts +1 -0
  91. package/dist-sdk/src/entities/chart/printer.js +26 -16
  92. package/dist-sdk/src/entities/chart/rebind-owner.d.ts +3 -0
  93. package/dist-sdk/src/entities/chart/rebind-owner.js +42 -0
  94. package/dist-sdk/src/entities/chart/to-tf.js +21 -12
  95. package/dist-sdk/src/entities/dashboard/build.d.ts +4 -0
  96. package/dist-sdk/src/entities/dashboard/from-tf.js +15 -4
  97. package/dist-sdk/src/entities/dashboard/to-tf.d.ts +2 -0
  98. package/dist-sdk/src/entities/dashboard/to-tf.js +13 -0
  99. package/dist-sdk/src/entities/dashboard-widget/module.js +4 -0
  100. package/dist-sdk/src/entities/dynamic-layout/build.d.ts +72 -30
  101. package/dist-sdk/src/entities/dynamic-layout/dialect.d.ts +3 -0
  102. package/dist-sdk/src/entities/dynamic-layout/dialect.js +5 -0
  103. package/dist-sdk/src/entities/dynamic-layout/from-tf.d.ts +9 -6
  104. package/dist-sdk/src/entities/dynamic-layout/from-tf.js +188 -26
  105. package/dist-sdk/src/entities/dynamic-layout/module.js +4 -1
  106. package/dist-sdk/src/entities/dynamic-layout/to-tf.d.ts +5 -1
  107. package/dist-sdk/src/entities/dynamic-layout/to-tf.js +254 -23
  108. package/dist-sdk/src/entities/element/build.d.ts +33 -13
  109. package/dist-sdk/src/entities/element/build.js +5 -1
  110. package/dist-sdk/src/entities/element/from-tf.d.ts +12 -0
  111. package/dist-sdk/src/entities/element/from-tf.js +64 -3
  112. package/dist-sdk/src/entities/element/index.d.ts +5 -2
  113. package/dist-sdk/src/entities/element/index.js +2 -0
  114. package/dist-sdk/src/entities/element/module.js +11 -3
  115. package/dist-sdk/src/entities/element/to-tf.js +20 -2
  116. package/dist-sdk/src/entities/field/build.d.ts +14 -1
  117. package/dist-sdk/src/entities/field/build.js +3 -0
  118. package/dist-sdk/src/entities/field/from-tf.d.ts +3 -0
  119. package/dist-sdk/src/entities/field/from-tf.js +50 -1
  120. package/dist-sdk/src/entities/field/media-types.d.ts +6 -0
  121. package/dist-sdk/src/entities/field/media-types.js +30 -0
  122. package/dist-sdk/src/entities/field/module.js +1 -0
  123. package/dist-sdk/src/entities/field/to-tf.d.ts +23 -2
  124. package/dist-sdk/src/entities/field/to-tf.js +142 -22
  125. package/dist-sdk/src/entities/file-reader/from-tf.js +14 -5
  126. package/dist-sdk/src/entities/file-reader/module.js +1 -0
  127. package/dist-sdk/src/entities/file-reader/types.d.ts +2 -0
  128. package/dist-sdk/src/entities/file-reader/types.js +1 -1
  129. package/dist-sdk/src/entities/portal/build.d.ts +26 -0
  130. package/dist-sdk/src/entities/portal/build.js +37 -0
  131. package/dist-sdk/src/entities/portal/from-tf.d.ts +27 -0
  132. package/dist-sdk/src/entities/portal/from-tf.js +75 -0
  133. package/dist-sdk/src/entities/portal/index.d.ts +1 -0
  134. package/dist-sdk/src/entities/portal/index.js +1 -0
  135. package/dist-sdk/src/entities/portal/module.d.ts +3 -0
  136. package/dist-sdk/src/entities/portal/module.js +28 -0
  137. package/dist-sdk/src/entities/portal/to-tf.d.ts +12 -0
  138. package/dist-sdk/src/entities/portal/to-tf.js +73 -0
  139. package/dist-sdk/src/entities/portal/types.d.ts +1 -0
  140. package/dist-sdk/src/entities/portal/types.js +1 -0
  141. package/dist-sdk/src/entities/relationship/from-tf.d.ts +8 -1
  142. package/dist-sdk/src/entities/relationship/from-tf.js +53 -10
  143. package/dist-sdk/src/entities/relationship/module.js +2 -0
  144. package/dist-sdk/src/entities/relationship/pair-check.d.ts +7 -0
  145. package/dist-sdk/src/entities/relationship/pair-check.js +68 -0
  146. package/dist-sdk/src/entities/relationship/to-tf.d.ts +10 -0
  147. package/dist-sdk/src/entities/relationship/to-tf.js +31 -13
  148. package/dist-sdk/src/entities/search-table/module.js +1 -0
  149. package/dist-sdk/src/entities/search-table/to-tf.d.ts +1 -0
  150. package/dist-sdk/src/entities/search-table/to-tf.js +1 -1
  151. package/dist-sdk/src/entities/service-account/build.d.ts +15 -2
  152. package/dist-sdk/src/entities/service-account/from-tf.d.ts +2 -4
  153. package/dist-sdk/src/entities/service-account/from-tf.js +17 -5
  154. package/dist-sdk/src/entities/service-account/role-fidelity.d.ts +56 -0
  155. package/dist-sdk/src/entities/service-account/role-fidelity.js +243 -0
  156. package/dist-sdk/src/entities/service-account/to-tf.d.ts +14 -0
  157. package/dist-sdk/src/entities/service-account/to-tf.js +17 -0
  158. package/dist-sdk/src/entities/shared/aspect-target-from-tf.d.ts +1 -1
  159. package/dist-sdk/src/entities/shared/aspect-target-from-tf.js +5 -2
  160. package/dist-sdk/src/entities/shared/filters/ast.d.ts +15 -2
  161. package/dist-sdk/src/entities/shared/filters/index.d.ts +25 -2
  162. package/dist-sdk/src/entities/shared/filters/index.js +38 -5
  163. package/dist-sdk/src/entities/shared/filters/print.js +31 -3
  164. package/dist-sdk/src/entities/shared/filters/tf-codec.d.ts +25 -3
  165. package/dist-sdk/src/entities/shared/filters/tf-codec.js +51 -15
  166. package/dist-sdk/src/entities/shared/filters/types.d.ts +22 -5
  167. package/dist-sdk/src/entities/shared/foreign-ref.d.ts +16 -0
  168. package/dist-sdk/src/entities/shared/foreign-ref.js +17 -1
  169. package/dist-sdk/src/entities/shared/tool-field-ref.js +6 -9
  170. package/dist-sdk/src/entities/shared/types/field-types.d.ts +10 -5
  171. package/dist-sdk/src/entities/shared/types/field-types.js +4 -0
  172. package/dist-sdk/src/entities/skill/access-policy.d.ts +17 -0
  173. package/dist-sdk/src/entities/skill/access-policy.js +101 -0
  174. package/dist-sdk/src/entities/skill/build.d.ts +3 -0
  175. package/dist-sdk/src/entities/skill/build.js +3 -0
  176. package/dist-sdk/src/entities/skill/deserializer/print-skill-v2.d.ts +4 -1
  177. package/dist-sdk/src/entities/skill/deserializer/print-skill-v2.js +23 -1
  178. package/dist-sdk/src/entities/skill/from-tf.d.ts +2 -0
  179. package/dist-sdk/src/entities/skill/from-tf.js +70 -22
  180. package/dist-sdk/src/entities/skill/index.d.ts +2 -0
  181. package/dist-sdk/src/entities/skill/index.js +1 -0
  182. package/dist-sdk/src/entities/skill/input-coverage.d.ts +7 -0
  183. package/dist-sdk/src/entities/skill/input-coverage.js +11 -0
  184. package/dist-sdk/src/entities/skill/module.js +1 -0
  185. package/dist-sdk/src/entities/skill/to-tf.d.ts +2 -2
  186. package/dist-sdk/src/entities/skill/to-tf.js +19 -6
  187. package/dist-sdk/src/entities/skill-tool/from-tf.d.ts +2 -0
  188. package/dist-sdk/src/entities/skill-tool/from-tf.js +8 -2
  189. package/dist-sdk/src/entities/skill-tool/to-tf.d.ts +2 -2
  190. package/dist-sdk/src/entities/skill-tool/to-tf.js +29 -6
  191. package/dist-sdk/src/entities/table/catalog.d.ts +14 -0
  192. package/dist-sdk/src/entities/table/catalog.js +66 -0
  193. package/dist-sdk/src/entities/table/module.js +2 -1
  194. package/dist-sdk/src/entities/table/to-tf.js +5 -5
  195. package/dist-sdk/src/entities/view/agent-view-layout-from-tf.d.ts +89 -0
  196. package/dist-sdk/src/entities/view/agent-view-layout-from-tf.js +277 -0
  197. package/dist-sdk/src/entities/view/agent-view-layout-to-tf.d.ts +51 -0
  198. package/dist-sdk/src/entities/view/agent-view-layout-to-tf.js +360 -0
  199. package/dist-sdk/src/entities/view/agent-view-layout.d.ts +151 -0
  200. package/dist-sdk/src/entities/view/agent-view-layout.js +21 -0
  201. package/dist-sdk/src/entities/view/from-tf.d.ts +6 -3
  202. package/dist-sdk/src/entities/view/from-tf.js +161 -14
  203. package/dist-sdk/src/entities/view/module.js +30 -3
  204. package/dist-sdk/src/entities/view/to-tf.d.ts +24 -2
  205. package/dist-sdk/src/entities/view/to-tf.js +95 -9
  206. package/dist-sdk/src/entities/view/types.d.ts +4 -15
  207. package/dist-sdk/src/entities/view/types.js +17 -15
  208. package/dist-sdk/src/entities/widget/build.d.ts +16 -1
  209. package/dist-sdk/src/entities/widget/build.js +11 -1
  210. package/dist-sdk/src/entities/widget/to-tf.js +36 -10
  211. package/dist-sdk/src/generated/ragnarok/ragnarok-spec.d.ts +38 -10
  212. package/dist-sdk/src/generated/ragnarok/ragnarok-spec.js +2 -2
  213. package/dist-sdk/src/graph/index.d.ts +54 -0
  214. package/dist-sdk/src/graph/index.js +30 -0
  215. package/dist-sdk/src/graph/modules.js +2 -0
  216. package/dist-sdk/src/graph/types.d.ts +133 -2
  217. package/dist-sdk/src/internal/sdk-package.d.ts +1 -1
  218. package/dist-sdk/src/internal/sdk-package.js +1 -0
  219. package/package.json +11 -1
@@ -9,12 +9,13 @@
9
9
  import type { DeployableEntity } from "../engine/entity.js";
10
10
  import type { FromTfContext } from "../engine/pull/context.js";
11
11
  import type { ChildResourceScope, TfBlock, TfValue } from "../engine/tf/index.js";
12
- export type KindId = "org" | "app" | "element" | "field" | "access-policy" | "agent" | "agent-evaluation" | "chart" | "agent-tool" | "agent-a2a-skill" | "automation" | "approval-chain" | "file-reader" | "visual-flow" | "skill" | "skill-tool" | "view" | "managed-view-order" | "record-create-form" | "dynamic-layout" | "dashboard" | "dashboard-widget" | "datamine" | "automation-value-references" | "organization" | "permission-template" | "service-account" | "stored-function" | "task" | "widget" | "relationship" | "search-table" | "table" | "cloud-link" | "email-alias" | "category" | "connector" | "ai-provider-anthropic" | "ai-provider-bedrock" | "ai-provider-custom" | "ai-provider-deepgram" | "ai-provider-elevenlab" | "ai-provider-gemini" | "ai-provider-openai" | "ai-provider-snowflake" | "ai-provider-xai" | "ai-provider-managed" | "group" | "phone-provider" | "phone-service" | "role" | "user";
12
+ import type { ValidationFailure } from "../engine/validation.js";
13
+ export type KindId = "org" | "app" | "element" | "field" | "access-policy" | "agent" | "agent-evaluation" | "chart" | "agent-tool" | "agent-a2a-skill" | "automation" | "approval-chain" | "file-reader" | "visual-flow" | "skill" | "skill-tool" | "view" | "managed-view-order" | "record-create-form" | "dynamic-layout" | "dashboard" | "dashboard-widget" | "datamine" | "automation-value-references" | "organization" | "permission-template" | "service-account" | "stored-function" | "task" | "portal" | "widget" | "relationship" | "search-table" | "table" | "cloud-link" | "email-alias" | "category" | "connector" | "ai-provider-anthropic" | "ai-provider-bedrock" | "ai-provider-custom" | "ai-provider-deepgram" | "ai-provider-elevenlab" | "ai-provider-gemini" | "ai-provider-openai" | "ai-provider-snowflake" | "ai-provider-xai" | "ai-provider-managed" | "group" | "phone-provider" | "phone-service" | "role" | "user";
13
14
  /** @deprecated Use {@link KindId}. */
14
15
  export type EntityKindId = KindId;
15
16
  export type StreamFacet = {
16
17
  readonly role: "streamRoot";
17
- readonly exportVerb: "apps" | "org" | "elements" | "tasks" | "tables";
18
+ readonly exportVerb: "apps" | "org" | "elements" | "tasks" | "tables" | "portals";
18
19
  } | {
19
20
  readonly role: "streamMember";
20
21
  } | {
@@ -59,6 +60,12 @@ export interface SubTypeRow {
59
60
  * `bootstrapFromState`).
60
61
  */
61
62
  readonly authoringType?: string;
63
+ /**
64
+ * Attributes the platform accepts but never returns on read, so an export
65
+ * can't carry them. A re-pull fills them from the workspace's state (see
66
+ * `alignExportWithState`); a first pull has nothing to fill.
67
+ */
68
+ readonly unreadableAttributes?: readonly string[];
62
69
  }
63
70
  export interface CompositeMember {
64
71
  readonly role: string;
@@ -69,6 +76,18 @@ export type ResourceFacet = {
69
76
  readonly shape: "single";
70
77
  readonly resourceType: string;
71
78
  readonly adoptable: boolean;
79
+ /**
80
+ * Attributes the platform accepts but never returns on read, so an export
81
+ * can't carry them. A re-pull fills them from the workspace's state (see
82
+ * `alignExportWithState`); a first pull has nothing to fill.
83
+ */
84
+ readonly unreadableAttributes?: readonly string[];
85
+ /**
86
+ * Map attributes the provider manages per key, keeping only the keys a
87
+ * workspace sets. The export prints every key; a re-pull keeps only the
88
+ * keys state holds (see `alignExportWithState`).
89
+ */
90
+ readonly stateScopedMapAttributes?: readonly string[];
72
91
  } | {
73
92
  readonly shape: "subTypes";
74
93
  readonly rows: readonly SubTypeRow[];
@@ -219,6 +238,12 @@ export type CatalogFacet = {
219
238
  * `catalog/render.ts`.
220
239
  */
221
240
  readonly renderEntry: (args: CatalogRenderArgs) => CatalogRenderResult;
241
+ /**
242
+ * The bag is read live from the owner's own `.ref()` (it is authored
243
+ * inline in the owner's file), so generated catalogs emit
244
+ * `<bag>: __own.<bag>` instead of baked entries.
245
+ */
246
+ readonly fromOwnRef?: true;
222
247
  /** Placeholder ref before the authoring file is imported (cross-ref stubs). */
223
248
  readonly stubRef: (refName: string, parent: string) => unknown;
224
249
  /**
@@ -251,7 +276,20 @@ export interface StreamExtractContext extends FromTfContext {
251
276
  export interface OwnFileExtractResult {
252
277
  readonly items: readonly unknown[];
253
278
  readonly skipped: readonly string[];
279
+ /**
280
+ * The subset of `skipped` that no authored source can ever manage. If an
281
+ * earlier pull already adopted them, adoption releases them from state so
282
+ * the next apply doesn't destroy the live resources.
283
+ */
284
+ readonly releaseIfManaged?: readonly string[];
254
285
  readonly diagnostics: readonly string[];
286
+ /**
287
+ * Fatal or warning findings that must not be folded into `diagnostics`.
288
+ * Soft extract gaps stay in `diagnostics` + `skipped`. A fatal validation
289
+ * still lists its addresses in `skipped` so adoption does not import a
290
+ * graph that was not written.
291
+ */
292
+ readonly validations?: readonly ValidationFailure[];
255
293
  /** Export address → canonical address rebuilt by the printed current API. */
256
294
  readonly adoptionAddressAliases?: readonly AdoptionAddressAlias[];
257
295
  }
@@ -280,6 +318,8 @@ export interface UnresolvedReferenceDiagnostic {
280
318
  readonly portability: "source-org-only";
281
319
  }
282
320
  export interface PrintOwnFileOptions {
321
+ /** Directory refName → actual flat barrel key, including app/element collisions. */
322
+ readonly elementCatalogKeys?: ReadonlyMap<string, string>;
283
323
  readonly appRefName: string;
284
324
  /** The owning stream root; required for typed app/element authoring output. */
285
325
  readonly parentScope: ChildResourceScope | "table";
@@ -381,6 +421,8 @@ export interface BuildChildContext {
381
421
  * catalog (#490).
382
422
  */
383
423
  readonly fieldNamesByAppRefName?: ReadonlyMap<string, ReadonlyMap<string, string>>;
424
+ /** RefNames of this build's elements without `systemFields.audit`. */
425
+ readonly elementsWithoutAuditFields?: ReadonlySet<string>;
384
426
  /**
385
427
  * Field resource addresses for every app/element in this build, keyed the
386
428
  * same way as {@link fieldNamesByAppRefName}. A calculation addresses a
@@ -483,10 +525,24 @@ export type LifecycleFacet = {
483
525
  * the source (relative to its folder). Required for the pruning above.
484
526
  */
485
527
  readonly companionRefs?: (source: string) => readonly string[];
528
+ /**
529
+ * Rebind an extracted child's self references to an existing authored owner.
530
+ * Kinds with typed foreign identities can override the generic deep rebind.
531
+ */
532
+ readonly rebindOwnFileOwner?: (item: unknown, extractedOwnerRefName: string, authoredOwnerRefName: string) => unknown;
486
533
  /** Print one extracted own-file instance to TypeScript source. */
487
534
  readonly printOwnFile?: (item: unknown, opts: PrintOwnFileOptions) => PrintedOwnFile;
488
535
  /** Re-pull: preserve author-owned values that the live export cannot represent. */
489
536
  readonly mergePulledSource?: (freshSource: string, existingSource: string) => string;
537
+ /**
538
+ * Re-pull: true when an existing source file is earlier printer output
539
+ * that can never build (it carries a placeholder the printer emits for a
540
+ * value with no authored form). When this kind's export is incomplete
541
+ * because a child was skipped, such leftovers are archived to
542
+ * `.edk-state/pull-backups` instead of preserved, so the skipped child's
543
+ * stale source doesn't fail the post-pull build.
544
+ */
545
+ readonly isUnbuildablePulledSource?: (source: string) => boolean;
490
546
  /** Build: emit HCL for one discovered DeployableEntity. */
491
547
  readonly toTf?: (entity: DeployableEntity, ctx: BuildChildContext) => ToTfResult;
492
548
  /** Optional locals contribution after a root/own-file emit. */
@@ -525,6 +581,10 @@ export interface EntityKindModule {
525
581
  readonly canvas: CanvasFacet;
526
582
  /** Generated catalog participation — or {@link NO_CATALOG}. */
527
583
  readonly catalog: CatalogFacet;
584
+ /** Build: checks across every built root block; each returned string fails the build. */
585
+ readonly buildChecks?: {
586
+ readonly validateBuiltBlocks: (blocks: readonly TfBlock[]) => readonly string[];
587
+ };
528
588
  /** Entity-specific equivalences used only by live build-vs-export comparison. */
529
589
  readonly roundtrip?: {
530
590
  readonly referenceAliases: readonly {
@@ -548,6 +608,77 @@ export interface EntityKindModule {
548
608
  readonly attribute: string;
549
609
  readonly suffix: string;
550
610
  }[];
611
+ /**
612
+ * Two `<label><suffix>` locals that read the same list on this kind's
613
+ * resource, one indexed by each entry's name and one by its key.
614
+ */
615
+ readonly keyedLocalAliases?: readonly {
616
+ readonly listAttribute: string;
617
+ readonly keyAttribute: string;
618
+ readonly nameAttribute: string;
619
+ readonly byNameSuffix: string;
620
+ readonly byKeySuffix: string;
621
+ }[];
622
+ /**
623
+ * Attributes a data lookup of one of this kind's managed resources (by
624
+ * that resource's own id) reads from the sibling resource referencing it,
625
+ * e.g. a published automation's `parameter_ids` from its trigger.
626
+ */
627
+ readonly managedLookupAttributes?: readonly {
628
+ readonly lookupType: string;
629
+ readonly attribute: string;
630
+ readonly ownerType: string;
631
+ readonly ownerReference: string;
632
+ }[];
633
+ /**
634
+ * Per task resource type, refs-map keys whose task reference name (what
635
+ * an exported value envelope carries) differs from the key. Every other
636
+ * task output's reference name is its refs-map key.
637
+ */
638
+ readonly taskOutputReferenceNames?: Readonly<Record<string, Readonly<Record<string, string>>>>;
639
+ /**
640
+ * A found record's `record.<field id>` output is listed in the task's
641
+ * refs under the field's `<nameAttribute>`, unique per `<ownerAttribute>`.
642
+ */
643
+ readonly recordFieldOutputKeys?: readonly {
644
+ readonly nameAttribute: string;
645
+ readonly ownerAttribute: string;
646
+ }[];
647
+ /**
648
+ * Map attributes the provider computes at plan time from the resource's
649
+ * own list: `<attribute>[entry.<nameAttribute>]` is `value(name)`.
650
+ */
651
+ readonly computedReferenceMaps?: readonly {
652
+ readonly resourceType: string;
653
+ readonly attribute: string;
654
+ readonly listAttribute: string;
655
+ readonly nameAttribute: string;
656
+ readonly value: (name: string) => string;
657
+ }[];
658
+ /**
659
+ * Map attributes the provider computes on this kind's resource as
660
+ * `{ for e in <listAttribute> : e.<keyAttribute> => e.<valueAttribute> }`.
661
+ */
662
+ readonly computedMapAttributes?: readonly {
663
+ readonly attribute: string;
664
+ readonly listAttribute: string;
665
+ readonly keyAttribute: string;
666
+ readonly valueAttribute: string;
667
+ }[];
668
+ /**
669
+ * Keys the export writes at their default on every object nested in
670
+ * `<attribute>` (including jsonencoded payloads) and the build omits.
671
+ */
672
+ readonly nestedOmittedDefaults?: readonly {
673
+ readonly attribute: string;
674
+ readonly defaults: Readonly<Record<string, TfValue>>;
675
+ }[];
676
+ /** Server-assigned attributes the export records as a `<localPrefix><label>` local. */
677
+ readonly exportedAttributeLocals?: readonly {
678
+ readonly resourceType: string;
679
+ readonly attribute: string;
680
+ readonly localPrefix: string;
681
+ }[];
551
682
  };
552
683
  }
553
684
  export declare function implementedResourceTypes(resource: ResourceFacet): readonly string[];
@@ -2,6 +2,6 @@ export declare const SDK_PACKAGE_NAME: "@elementumai/edk";
2
2
  export declare const TRANSITIONAL_SDK_PACKAGE_NAME: "@elementum/edk";
3
3
  export declare const LEGACY_SDK_PACKAGE_NAME: "@elementumltd/edk";
4
4
  export declare const LEGACY_SDK_REGISTRY_SCOPE: "@elementumltd:registry";
5
- export declare const SDK_PUBLIC_SUBPATHS: readonly ["app", "elements", "core", "core/filters", "automations", "agents", "agents/skills", "charts", "visualFlows", "searchTables", "fileReaders", "approvalChains", "approvalProcesses", "tables", "tasks", "organization", "catalog"];
5
+ export declare const SDK_PUBLIC_SUBPATHS: readonly ["app", "elements", "core", "core/filters", "automations", "agents", "agents/skills", "charts", "visualFlows", "searchTables", "fileReaders", "approvalChains", "approvalProcesses", "tables", "tasks", "portals", "organization", "catalog"];
6
6
  export type SdkPackageSubpath = (typeof SDK_PUBLIC_SUBPATHS)[number];
7
7
  export declare function sdkPackageSpecifier<T extends SdkPackageSubpath>(subpath: T): `${typeof SDK_PACKAGE_NAME}/${T}`;
@@ -18,6 +18,7 @@ export const SDK_PUBLIC_SUBPATHS = [
18
18
  "approvalProcesses",
19
19
  "tables",
20
20
  "tasks",
21
+ "portals",
21
22
  "organization",
22
23
  "catalog",
23
24
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elementumai/edk",
3
- "version": "0.9.18",
3
+ "version": "0.9.20",
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",
@@ -77,6 +77,10 @@
77
77
  "types": "./dist-sdk/src/entities/task/index.d.ts",
78
78
  "import": "./dist-sdk/src/entities/task/index.js"
79
79
  },
80
+ "./portals": {
81
+ "types": "./dist-sdk/src/entities/portal/index.d.ts",
82
+ "import": "./dist-sdk/src/entities/portal/index.js"
83
+ },
80
84
  "./organization": {
81
85
  "types": "./dist-sdk/src/entities/organization/index.d.ts",
82
86
  "import": "./dist-sdk/src/entities/organization/index.js"
@@ -133,6 +137,9 @@
133
137
  "tasks": [
134
138
  "dist-sdk/src/entities/task/index.d.ts"
135
139
  ],
140
+ "portals": [
141
+ "dist-sdk/src/entities/portal/index.d.ts"
142
+ ],
136
143
  "organization": [
137
144
  "dist-sdk/src/entities/organization/index.d.ts"
138
145
  ],
@@ -161,6 +168,7 @@
161
168
  "build": "npm run build:sdk",
162
169
  "prebuild:sdk": "npm run generate:ragnarok",
163
170
  "build:sdk": "rm -rf dist-sdk && tsc -p tsconfig.sdk.json",
171
+ "prebuild:cli": "npm run generate:ragnarok",
164
172
  "build:cli": "npm run sync:version && npm run sync:skills && npm run sync:compatibility && rm -rf dist-cli && tsc -p tsconfig.cli.json",
165
173
  "prebuild:provider": "npm run generate:graphql",
166
174
  "build:provider": "go -C provider build .",
@@ -182,6 +190,7 @@
182
190
  "pack:dry-run": "npm pack --dry-run",
183
191
  "pack:consumer": "npm run build:sdk && tsx src/scripts/test-package-consumer.ts",
184
192
  "release:local-sdk": "bash release/verify-local-sdk-prepare.sh",
193
+ "release:notes": "tsx src/scripts/release-notes.ts",
185
194
  "test": "tsx src/scripts/test.ts",
186
195
  "test:unit": "npm run typecheck:ci && vitest run",
187
196
  "test:runtime": "vitest run",
@@ -220,6 +229,7 @@
220
229
  "edk:canvas": "tsx --tsconfig tsconfig.examples-check.json src/scripts/edk-canvas.ts"
221
230
  },
222
231
  "dependencies": {
232
+ "acorn": "^8.16.0",
223
233
  "jiti": "^2.7.0",
224
234
  "semver": "^7.8.5"
225
235
  },