@elementumai/edk 0.12.0 → 0.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -2
- package/dist-sdk/src/catalog/factories.d.ts +7 -1
- package/dist-sdk/src/catalog/factories.js +10 -2
- package/dist-sdk/src/catalog/index.d.ts +2 -2
- package/dist-sdk/src/catalog/index.js +1 -1
- package/dist-sdk/src/catalog/org.js +79 -34
- package/dist-sdk/src/catalog/token.js +5 -0
- package/dist-sdk/src/catalog/types.d.ts +12 -1
- package/dist-sdk/src/catalog/types.js +3 -0
- package/dist-sdk/src/core/system-fields.d.ts +1 -1
- package/dist-sdk/src/core/system-fields.js +1 -1
- package/dist-sdk/src/core/types/app.d.ts +6 -0
- package/dist-sdk/src/engine/build/context.d.ts +3 -0
- package/dist-sdk/src/engine/coverage-gaps.d.ts +2 -0
- package/dist-sdk/src/engine/coverage-gaps.js +4 -0
- package/dist-sdk/src/engine/ei/run.d.ts +8 -0
- package/dist-sdk/src/engine/ei/run.js +46 -7
- package/dist-sdk/src/engine/pull/authored-address.js +42 -6
- package/dist-sdk/src/engine/pull/authored-root.d.ts +88 -0
- package/dist-sdk/src/engine/pull/authored-root.js +306 -0
- package/dist-sdk/src/engine/pull/context.d.ts +34 -0
- package/dist-sdk/src/engine/pull/field-refs-registry.d.ts +114 -0
- package/dist-sdk/src/engine/pull/field-refs-registry.js +501 -0
- package/dist-sdk/src/engine/pull/org.d.ts +1 -0
- package/dist-sdk/src/engine/pull/org.js +2 -0
- package/dist-sdk/src/engine/pull/partition.d.ts +8 -0
- package/dist-sdk/src/engine/pull/partition.js +43 -0
- package/dist-sdk/src/engine/pull/pulled-roots.d.ts +89 -0
- package/dist-sdk/src/engine/pull/pulled-roots.js +203 -0
- package/dist-sdk/src/engine/pull/ref-only.d.ts +4 -0
- package/dist-sdk/src/engine/pull/ref-only.js +7 -1
- package/dist-sdk/src/engine/pull/source-resources.d.ts +39 -0
- package/dist-sdk/src/engine/pull/source-resources.js +110 -0
- package/dist-sdk/src/engine/pull/stream-root.d.ts +159 -0
- package/dist-sdk/src/engine/pull/stream-root.js +579 -0
- package/dist-sdk/src/engine/workspace/authoring-layout.js +16 -2
- package/dist-sdk/src/engine/workspace/reserved-catalog-keys.d.ts +47 -0
- package/dist-sdk/src/engine/workspace/reserved-catalog-keys.js +115 -0
- package/dist-sdk/src/entities/access-policy/build.d.ts +2 -1
- package/dist-sdk/src/entities/access-policy/from-tf.d.ts +7 -0
- package/dist-sdk/src/entities/access-policy/from-tf.js +17 -5
- package/dist-sdk/src/entities/access-policy/to-tf.d.ts +19 -0
- package/dist-sdk/src/entities/access-policy/to-tf.js +65 -8
- package/dist-sdk/src/entities/agent/build.d.ts +52 -1
- package/dist-sdk/src/entities/agent/build.js +34 -0
- package/dist-sdk/src/entities/agent/deserializer/print-agent-v2.js +70 -1
- package/dist-sdk/src/entities/agent/from-tf.d.ts +36 -1
- package/dist-sdk/src/entities/agent/from-tf.js +289 -2
- package/dist-sdk/src/entities/agent/index.d.ts +1 -1
- package/dist-sdk/src/entities/agent/module.js +1 -0
- package/dist-sdk/src/entities/agent/to-tf.d.ts +11 -11
- package/dist-sdk/src/entities/agent/to-tf.js +179 -17
- package/dist-sdk/src/entities/agent-tool/from-tf.js +6 -0
- package/dist-sdk/src/entities/agent-tool/to-tf.d.ts +2 -2
- package/dist-sdk/src/entities/agent-tool/to-tf.js +2 -2
- package/dist-sdk/src/entities/app/build.d.ts +33 -13
- package/dist-sdk/src/entities/app/build.js +14 -12
- package/dist-sdk/src/entities/app/from-tf.d.ts +1 -0
- package/dist-sdk/src/entities/app/from-tf.js +7 -9
- package/dist-sdk/src/entities/app/index.d.ts +1 -0
- package/dist-sdk/src/entities/app/index.js +1 -0
- package/dist-sdk/src/entities/app/module.js +3 -0
- package/dist-sdk/src/entities/app/stage-keys.d.ts +2 -2
- package/dist-sdk/src/entities/app/stage-keys.js +3 -3
- package/dist-sdk/src/entities/app/to-tf.js +1 -0
- package/dist-sdk/src/entities/approval-chain/build.d.ts +46 -11
- package/dist-sdk/src/entities/approval-chain/build.js +120 -8
- package/dist-sdk/src/entities/approval-chain/from-tf.d.ts +24 -2
- package/dist-sdk/src/entities/approval-chain/from-tf.js +148 -6
- package/dist-sdk/src/entities/approval-chain/index.d.ts +4 -1
- package/dist-sdk/src/entities/approval-chain/index.js +4 -1
- package/dist-sdk/src/entities/approval-chain/module.js +23 -5
- package/dist-sdk/src/entities/approval-chain/printer.d.ts +1 -1
- package/dist-sdk/src/entities/approval-chain/printer.js +91 -5
- package/dist-sdk/src/entities/approval-chain/steps-tf.d.ts +77 -0
- package/dist-sdk/src/entities/approval-chain/steps-tf.js +255 -0
- package/dist-sdk/src/entities/approval-chain/steps.d.ts +71 -0
- package/dist-sdk/src/entities/approval-chain/steps.js +83 -0
- package/dist-sdk/src/entities/approval-chain/to-tf.d.ts +16 -6
- package/dist-sdk/src/entities/approval-chain/to-tf.js +37 -4
- package/dist-sdk/src/entities/automation/build.d.ts +10 -1
- package/dist-sdk/src/entities/automation/build.js +70 -27
- package/dist-sdk/src/entities/automation/deserializer/print-automation.js +21 -5
- package/dist-sdk/src/entities/automation/from-tf.d.ts +26 -5
- package/dist-sdk/src/entities/automation/from-tf.js +665 -112
- package/dist-sdk/src/entities/automation/index.d.ts +2 -1
- package/dist-sdk/src/entities/automation/index.js +1 -0
- package/dist-sdk/src/entities/automation/module.d.ts +4 -3
- package/dist-sdk/src/entities/automation/module.js +45 -12
- package/dist-sdk/src/entities/automation/refs-read.d.ts +19 -0
- package/dist-sdk/src/entities/automation/refs-read.js +48 -0
- package/dist-sdk/src/entities/automation/slack-message-refs.d.ts +9 -0
- package/dist-sdk/src/entities/automation/slack-message-refs.js +75 -0
- package/dist-sdk/src/entities/automation/system-ref-name.d.ts +23 -3
- package/dist-sdk/src/entities/automation/system-ref-name.js +86 -4
- package/dist-sdk/src/entities/automation/task-output-labels.d.ts +11 -0
- package/dist-sdk/src/entities/automation/task-output-labels.js +23 -0
- package/dist-sdk/src/entities/automation/tasks.d.ts +29 -4
- package/dist-sdk/src/entities/automation/tasks.js +34 -11
- package/dist-sdk/src/entities/automation/to-tf.d.ts +8 -1
- package/dist-sdk/src/entities/automation/to-tf.js +563 -103
- package/dist-sdk/src/entities/automation/triggers.d.ts +0 -8
- package/dist-sdk/src/entities/automation/triggers.js +26 -11
- package/dist-sdk/src/entities/automation/unsafe-script-output.d.ts +50 -0
- package/dist-sdk/src/entities/automation/unsafe-script-output.js +92 -0
- package/dist-sdk/src/entities/chart/build.d.ts +9 -1
- package/dist-sdk/src/entities/chart/from-tf.js +3 -0
- package/dist-sdk/src/entities/chart/to-tf.js +19 -2
- package/dist-sdk/src/entities/dashboard/from-tf.d.ts +3 -1
- package/dist-sdk/src/entities/dashboard/from-tf.js +42 -2
- package/dist-sdk/src/entities/dashboard/to-tf.js +9 -1
- package/dist-sdk/src/entities/dashboard-widget-order/module.d.ts +10 -0
- package/dist-sdk/src/entities/dashboard-widget-order/module.js +25 -0
- package/dist-sdk/src/entities/dashboard-widget-order/order.d.ts +31 -0
- package/dist-sdk/src/entities/dashboard-widget-order/order.js +102 -0
- package/dist-sdk/src/entities/dynamic-layout/build.d.ts +2 -0
- package/dist-sdk/src/entities/dynamic-layout/from-tf.js +44 -5
- package/dist-sdk/src/entities/dynamic-layout/to-tf.js +46 -12
- package/dist-sdk/src/entities/element/audit-field-guard.d.ts +9 -0
- package/dist-sdk/src/entities/element/audit-field-guard.js +88 -0
- package/dist-sdk/src/entities/element/build.js +2 -1
- package/dist-sdk/src/entities/element/from-tf.d.ts +1 -0
- package/dist-sdk/src/entities/element/from-tf.js +4 -7
- package/dist-sdk/src/entities/element/module.js +5 -0
- package/dist-sdk/src/entities/element/system-fields.d.ts +13 -0
- package/dist-sdk/src/entities/element/system-fields.js +23 -0
- package/dist-sdk/src/entities/element/to-tf.js +1 -0
- package/dist-sdk/src/entities/field/build.d.ts +9 -0
- package/dist-sdk/src/entities/field/from-tf.d.ts +52 -1
- package/dist-sdk/src/entities/field/from-tf.js +212 -14
- package/dist-sdk/src/entities/field/module.js +4 -0
- package/dist-sdk/src/entities/field/to-tf.d.ts +5 -1
- package/dist-sdk/src/entities/field/to-tf.js +33 -12
- package/dist-sdk/src/entities/org/category.js +1 -0
- package/dist-sdk/src/entities/org/index.d.ts +1 -0
- package/dist-sdk/src/entities/org/index.js +1 -0
- package/dist-sdk/src/entities/org/voice-auth.d.ts +5 -0
- package/dist-sdk/src/entities/org/voice-auth.js +33 -0
- package/dist-sdk/src/entities/organization/build.d.ts +3 -0
- package/dist-sdk/src/entities/organization/build.js +2 -0
- package/dist-sdk/src/entities/organization/index.d.ts +1 -0
- package/dist-sdk/src/entities/organization/index.js +1 -0
- package/dist-sdk/src/entities/organization/to-tf.d.ts +2 -0
- package/dist-sdk/src/entities/organization/to-tf.js +59 -1
- package/dist-sdk/src/entities/organization/voice-auth.d.ts +60 -0
- package/dist-sdk/src/entities/organization/voice-auth.js +60 -0
- package/dist-sdk/src/entities/phone-service/build.d.ts +9 -1
- package/dist-sdk/src/entities/phone-service/build.js +1 -0
- package/dist-sdk/src/entities/phone-service/deserializer/print-phone-service.js +3 -0
- package/dist-sdk/src/entities/phone-service/from-tf.d.ts +1 -0
- package/dist-sdk/src/entities/phone-service/from-tf.js +8 -1
- package/dist-sdk/src/entities/phone-service/to-tf.js +16 -0
- package/dist-sdk/src/entities/record-create-form/from-tf.js +2 -2
- package/dist-sdk/src/entities/relationship/from-tf.js +9 -4
- package/dist-sdk/src/entities/relationship/module.js +2 -2
- package/dist-sdk/src/entities/relationship/pair-check.d.ts +6 -2
- package/dist-sdk/src/entities/relationship/pair-check.js +105 -18
- package/dist-sdk/src/entities/relationship/to-tf.js +5 -2
- package/dist-sdk/src/entities/role/build.d.ts +3 -4
- package/dist-sdk/src/entities/role/permission-levels.d.ts +7 -0
- package/dist-sdk/src/entities/role/permission-levels.js +78 -0
- package/dist-sdk/src/entities/role/to-tf.js +32 -2
- package/dist-sdk/src/entities/search-table/build.d.ts +9 -3
- package/dist-sdk/src/entities/search-table/build.js +4 -4
- package/dist-sdk/src/entities/search-table/printer.js +3 -1
- package/dist-sdk/src/entities/search-table/to-tf.js +20 -2
- package/dist-sdk/src/entities/service-account/module.d.ts +2 -1
- package/dist-sdk/src/entities/service-account/module.js +4 -1
- package/dist-sdk/src/entities/service-account/resource-type.d.ts +2 -0
- package/dist-sdk/src/entities/service-account/resource-type.js +2 -0
- package/dist-sdk/src/entities/service-account/role-membership-check.d.ts +20 -0
- package/dist-sdk/src/entities/service-account/role-membership-check.js +80 -0
- package/dist-sdk/src/entities/shared/aspect-target-from-tf.d.ts +15 -0
- package/dist-sdk/src/entities/shared/aspect-target-from-tf.js +36 -0
- package/dist-sdk/src/entities/shared/context.d.ts +14 -1
- package/dist-sdk/src/entities/shared/filters/ast.d.ts +2 -0
- package/dist-sdk/src/entities/shared/filters/index.d.ts +97 -15
- package/dist-sdk/src/entities/shared/filters/index.js +30 -7
- package/dist-sdk/src/entities/shared/filters/option-lookups.d.ts +57 -0
- package/dist-sdk/src/entities/shared/filters/option-lookups.js +108 -0
- package/dist-sdk/src/entities/shared/filters/print.d.ts +2 -0
- package/dist-sdk/src/entities/shared/filters/print.js +19 -6
- package/dist-sdk/src/entities/shared/filters/tf-codec.d.ts +16 -7
- package/dist-sdk/src/entities/shared/filters/tf-codec.js +25 -5
- package/dist-sdk/src/entities/shared/filters/types.d.ts +4 -0
- package/dist-sdk/src/entities/shared/raw-option-id.d.ts +30 -0
- package/dist-sdk/src/entities/shared/raw-option-id.js +41 -0
- package/dist-sdk/src/entities/shared/tool-field-ref.d.ts +1 -1
- package/dist-sdk/src/entities/shared/tool-field-ref.js +3 -2
- package/dist-sdk/src/entities/skill/input-coverage.js +5 -2
- package/dist-sdk/src/entities/sla/build.d.ts +96 -0
- package/dist-sdk/src/entities/sla/build.js +124 -0
- package/dist-sdk/src/entities/sla/from-tf.d.ts +40 -0
- package/dist-sdk/src/entities/sla/from-tf.js +164 -0
- package/dist-sdk/src/entities/sla/index.d.ts +1 -0
- package/dist-sdk/src/entities/sla/index.js +1 -0
- package/dist-sdk/src/entities/sla/module.d.ts +4 -0
- package/dist-sdk/src/entities/sla/module.js +73 -0
- package/dist-sdk/src/entities/sla/printer.d.ts +2 -0
- package/dist-sdk/src/entities/sla/printer.js +84 -0
- package/dist-sdk/src/entities/sla/to-tf.d.ts +12 -0
- package/dist-sdk/src/entities/sla/to-tf.js +81 -0
- package/dist-sdk/src/entities/table/build.d.ts +7 -2
- package/dist-sdk/src/entities/table/build.js +22 -1
- package/dist-sdk/src/entities/table/deserializer/normalize.d.ts +4 -1
- package/dist-sdk/src/entities/table/from-tf.js +89 -14
- package/dist-sdk/src/entities/table/index.d.ts +1 -1
- package/dist-sdk/src/entities/table/to-tf.js +41 -2
- package/dist-sdk/src/entities/task/from-tf.js +3 -2
- package/dist-sdk/src/entities/view/custom-view-validate.d.ts +6 -4
- package/dist-sdk/src/entities/view/custom-view-validate.js +36 -18
- package/dist-sdk/src/entities/view/from-tf.js +16 -4
- package/dist-sdk/src/entities/view/to-tf.js +66 -47
- package/dist-sdk/src/entities/visual-flow/module.js +52 -1
- package/dist-sdk/src/entities/widget/from-tf.js +19 -8
- package/dist-sdk/src/generated/ragnarok/ragnarok-spec.d.ts +49 -4
- package/dist-sdk/src/generated/ragnarok/ragnarok-spec.js +2 -2
- package/dist-sdk/src/graph/index.d.ts +9 -0
- package/dist-sdk/src/graph/index.js +8 -0
- package/dist-sdk/src/graph/modules.js +13 -1
- package/dist-sdk/src/graph/resource-types.d.ts +47 -0
- package/dist-sdk/src/graph/resource-types.js +62 -0
- package/dist-sdk/src/graph/types.d.ts +113 -6
- package/package.json +7 -4
|
@@ -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));
|
|
@@ -8,9 +8,11 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import type { DeployableEntity } from "../engine/entity.js";
|
|
10
10
|
import type { FromTfContext } from "../engine/pull/context.js";
|
|
11
|
+
import type { OptionIdIndex } from "../engine/pull/field-refs-registry.js";
|
|
12
|
+
import type { PulledRootStatus } from "../engine/pull/pulled-roots.js";
|
|
11
13
|
import type { ChildResourceScope, TfBlock, TfValue } from "../engine/tf/index.js";
|
|
12
14
|
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" | "managed-field-order" | "record-create-form" | "dynamic-layout" | "dashboard" | "dashboard-widget" | "datamine" | "automation-value-references" | "organization" | "permission-template" | "service-account" | "stored-function" | "vault-entry" | "task" | "portal" | "widget" | "relationship" | "search-table" | "table" | "cloud-link" | "email-alias" | "category" | "connector" | "ai-provider-anthropic" | "ai-provider-bedrock" | "ai-provider-custom" | "ai-provider-deepgram" | "ai-provider-elevenlab" | "ai-provider-gemini" | "ai-provider-openai" | "ai-provider-snowflake" | "ai-provider-xai" | "ai-provider-managed" | "group" | "phone-provider" | "phone-service" | "role" | "user";
|
|
15
|
+
export type KindId = "org" | "app" | "element" | "field" | "access-policy" | "agent" | "agent-evaluation" | "sla" | "chart" | "agent-tool" | "agent-a2a-skill" | "automation" | "approval-chain" | "file-reader" | "visual-flow" | "skill" | "skill-tool" | "view" | "managed-view-order" | "managed-field-order" | "record-create-form" | "dynamic-layout" | "dashboard" | "dashboard-widget" | "dashboard-widget-order" | "datamine" | "automation-value-references" | "organization" | "permission-template" | "service-account" | "stored-function" | "vault-entry" | "task" | "portal" | "widget" | "relationship" | "search-table" | "table" | "cloud-link" | "email-alias" | "category" | "connector" | "ai-provider-anthropic" | "ai-provider-bedrock" | "ai-provider-custom" | "ai-provider-deepgram" | "ai-provider-elevenlab" | "ai-provider-gemini" | "ai-provider-openai" | "ai-provider-snowflake" | "ai-provider-xai" | "ai-provider-managed" | "group" | "phone-provider" | "phone-service" | "voice-auth" | "role" | "user";
|
|
14
16
|
/** @deprecated Use {@link KindId}. */
|
|
15
17
|
export type EntityKindId = KindId;
|
|
16
18
|
export type StreamFacet = {
|
|
@@ -71,6 +73,13 @@ export interface SubTypeRow {
|
|
|
71
73
|
* `alignExportWithState`); a first pull has nothing to fill.
|
|
72
74
|
*/
|
|
73
75
|
readonly unreadableAttributes?: readonly string[];
|
|
76
|
+
/**
|
|
77
|
+
* Option-list attributes (objects keyed by `label`) where the provider keeps
|
|
78
|
+
* an inactive (`active = false`) option only when state already holds it.
|
|
79
|
+
* The export prints every inactive option, and adoption re-imports the field
|
|
80
|
+
* so state holds them too (see `inactiveOptionsStateLacks`, #2186).
|
|
81
|
+
*/
|
|
82
|
+
readonly stateScopedInactiveOptions?: readonly string[];
|
|
74
83
|
}
|
|
75
84
|
/**
|
|
76
85
|
* The value state holds for an export reference, or undefined when it cannot
|
|
@@ -142,8 +151,8 @@ export type ResourceFacet = {
|
|
|
142
151
|
/** How a resource type belonging to this kind participates in stream partition. */
|
|
143
152
|
export type StreamMatch = "extract" | "family" | "reported";
|
|
144
153
|
/** Catalog kinds used by org identity data facets. */
|
|
145
|
-
export type DataFacetCatalogKind = "cloudLink" | "category" | "connector" | "group" | "phoneProvider" | "aiProvider";
|
|
146
|
-
export type OrgIdentityBag = "cloudLinks" | "categories" | "connectors" | "groups" | "phoneProviders" | "aiProviders";
|
|
154
|
+
export type DataFacetCatalogKind = "cloudLink" | "category" | "connector" | "group" | "phoneProvider" | "aiProvider" | "voiceAuth";
|
|
155
|
+
export type OrgIdentityBag = "cloudLinks" | "categories" | "connectors" | "groups" | "phoneProviders" | "aiProviders" | "voiceAuths";
|
|
147
156
|
/** Portable identity strategy for a direct reference. The build/pull engines
|
|
148
157
|
* consume these facets generically; entity modules own the product-specific
|
|
149
158
|
* declaration of how their identities are found. */
|
|
@@ -192,6 +201,12 @@ export type DataFacet = {
|
|
|
192
201
|
* "aiProviders"`), so the referenced type isn't known until read.
|
|
193
202
|
*/
|
|
194
203
|
readonly providerRefAttr?: string;
|
|
204
|
+
/**
|
|
205
|
+
* Authored in `organization.ts` as a managed resource that dependents
|
|
206
|
+
* can reference in the same apply. Build resolves that bag through the
|
|
207
|
+
* managed overlay instead of an org.ts data source.
|
|
208
|
+
*/
|
|
209
|
+
readonly managedInOrganization?: boolean;
|
|
195
210
|
};
|
|
196
211
|
/** Null-object data facet — kind is not a data lookup. */
|
|
197
212
|
export declare const NO_DATA: DataFacet;
|
|
@@ -308,7 +323,8 @@ export interface StreamExtractContext extends FromTfContext {
|
|
|
308
323
|
readonly columnRefNamesByName?: ReadonlyMap<string, string>;
|
|
309
324
|
readonly columnRefNamesById?: ReadonlyMap<string, string>;
|
|
310
325
|
}>;
|
|
311
|
-
|
|
326
|
+
/** See `PicklistOptionsByField` (#2568). */
|
|
327
|
+
readonly picklistOptionsByField?: ReadonlyMap<string, ReadonlyMap<string, string>>;
|
|
312
328
|
readonly fieldNamesByOwnerRefName?: ReadonlyMap<string, ReadonlyMap<string, string>>;
|
|
313
329
|
}
|
|
314
330
|
export interface OwnFileExtractResult {
|
|
@@ -388,6 +404,10 @@ export interface UnresolvedReferenceDiagnostic {
|
|
|
388
404
|
readonly uuid: string;
|
|
389
405
|
readonly reason: string;
|
|
390
406
|
readonly portability: "source-org-only";
|
|
407
|
+
/** A datamine in an app's connection with no owning app (bridge `Ownerless`). */
|
|
408
|
+
readonly ownerless?: boolean;
|
|
409
|
+
/** The table holding an ownerless datamine. */
|
|
410
|
+
readonly table?: string;
|
|
391
411
|
}
|
|
392
412
|
/** Workspace facts a re-pull merge may consult (#1590). */
|
|
393
413
|
export interface MergePulledSourceContext {
|
|
@@ -499,6 +519,15 @@ export interface BuildFieldMetadata {
|
|
|
499
519
|
readonly options?: readonly string[];
|
|
500
520
|
readonly tags?: readonly string[];
|
|
501
521
|
}
|
|
522
|
+
/** See {@link BuildChildContext.advisoriesWhileRecorded}. */
|
|
523
|
+
export interface AdvisoryWhileRecorded {
|
|
524
|
+
/** Stable identity the revision record keeps for this finding (#2283). */
|
|
525
|
+
readonly finding: string;
|
|
526
|
+
/** The diagnostic line while the record lists the finding. */
|
|
527
|
+
readonly advisory: string;
|
|
528
|
+
/** The fatal finding's message when it doesn't. */
|
|
529
|
+
readonly error: string;
|
|
530
|
+
}
|
|
502
531
|
export interface BuildChildContext {
|
|
503
532
|
readonly appRefName: string;
|
|
504
533
|
readonly appTfLabel: string;
|
|
@@ -507,6 +536,13 @@ export interface BuildChildContext {
|
|
|
507
536
|
readonly orgRefs: unknown;
|
|
508
537
|
readonly diagnostics: string[];
|
|
509
538
|
readonly reports?: string[];
|
|
539
|
+
/**
|
|
540
|
+
* Findings the platform may already run. Build writes each one's `finding`
|
|
541
|
+
* into the compiled file, where a pull or apply records it in the
|
|
542
|
+
* child's revision record. Build reports a finding the record lists as a
|
|
543
|
+
* diagnostic and fails any other (#2283).
|
|
544
|
+
*/
|
|
545
|
+
readonly advisoriesWhileRecorded?: AdvisoryWhileRecorded[];
|
|
510
546
|
readonly fieldAddresses?: ReadonlyMap<string, string>;
|
|
511
547
|
readonly fieldNames?: ReadonlyMap<string, string>;
|
|
512
548
|
readonly fieldMetadata?: ReadonlyMap<string, BuildFieldMetadata>;
|
|
@@ -526,6 +562,13 @@ export interface BuildChildContext {
|
|
|
526
562
|
* used in a formula needs the searched aspect's field resources.
|
|
527
563
|
*/
|
|
528
564
|
readonly fieldAddressesByAppRefName?: ReadonlyMap<string, ReadonlyMap<string, string>>;
|
|
565
|
+
/**
|
|
566
|
+
* Field types (`GROUP_ID`, `PICKLIST`, ...) from the org catalog for every
|
|
567
|
+
* app/element it lists, keyed by refName and then field key. Covers an
|
|
568
|
+
* app or element known only from its generated catalog, which has no
|
|
569
|
+
* field resources in {@link fieldAddressesByAppRefName}.
|
|
570
|
+
*/
|
|
571
|
+
readonly catalogFieldTypesByAppRefName?: ReadonlyMap<string, ReadonlyMap<string, string>>;
|
|
529
572
|
/**
|
|
530
573
|
* Every app/element authored in the workspace, keyed like
|
|
531
574
|
* `workspaceAspects` (`<kind>:<refName>`), including those a partial build
|
|
@@ -535,6 +578,8 @@ export interface BuildChildContext {
|
|
|
535
578
|
readonly authoredAspectKeys?: ReadonlySet<string>;
|
|
536
579
|
/** Pulled roots may retain picklist labels removed from the live field. */
|
|
537
580
|
readonly allowUnknownPicklistOptions?: boolean;
|
|
581
|
+
/** Option ids known offline, for the raw-option-id warnings (#1733). */
|
|
582
|
+
readonly optionIds?: OptionIdIndex;
|
|
538
583
|
/** Every app/element/table stream root in this build, by refName (see `ToTfContext.workspaceAspects`). */
|
|
539
584
|
readonly workspaceAspects?: ReadonlyMap<string, {
|
|
540
585
|
readonly kind: ChildResourceScope | "table" | "task";
|
|
@@ -760,6 +805,37 @@ export interface TaskOutputReference {
|
|
|
760
805
|
readonly fieldType: string;
|
|
761
806
|
readonly multiple: boolean;
|
|
762
807
|
}
|
|
808
|
+
/** A stream root as build rendered it, for {@link EntityKindModule.buildChecks}. */
|
|
809
|
+
export interface BuiltRoot {
|
|
810
|
+
readonly kind: string;
|
|
811
|
+
readonly refName: string;
|
|
812
|
+
/** The root's TF label (namespace). */
|
|
813
|
+
readonly tfLabel: string;
|
|
814
|
+
readonly payload: unknown;
|
|
815
|
+
/** Keys of the fields the root authors (system fields excluded). */
|
|
816
|
+
readonly fieldKeys: ReadonlySet<string>;
|
|
817
|
+
}
|
|
818
|
+
/** A stream root's blocks and source file, for {@link EntityKindModule.buildChecks}' cross-root checks. */
|
|
819
|
+
export interface BuiltRootSource {
|
|
820
|
+
readonly kind: string;
|
|
821
|
+
readonly refName: string;
|
|
822
|
+
/** The root's TF label (namespace). */
|
|
823
|
+
readonly tfLabel: string;
|
|
824
|
+
/** Source file, relative to the org root. */
|
|
825
|
+
readonly file: string;
|
|
826
|
+
readonly blocks: readonly TfBlock[];
|
|
827
|
+
/** The root's compared groups (see `buildChecks.comparedGroup`) against its last pull on this machine. */
|
|
828
|
+
readonly pull: PulledRootStatus;
|
|
829
|
+
}
|
|
830
|
+
/** A failing cross-root check. Build records it as a fatal validation and keeps building (edk#2430). */
|
|
831
|
+
export interface BuildCheckFailure {
|
|
832
|
+
/** Terraform resource address, `type.label`. */
|
|
833
|
+
readonly address: string;
|
|
834
|
+
readonly name: string;
|
|
835
|
+
readonly message: string;
|
|
836
|
+
/** The kind named in the log prefix, when the failure belongs to another kind than the module that checks it. */
|
|
837
|
+
readonly ownerKind?: KindId;
|
|
838
|
+
}
|
|
763
839
|
export interface EntityKindModule {
|
|
764
840
|
readonly kind: KindId;
|
|
765
841
|
/** Export participation. */
|
|
@@ -778,9 +854,18 @@ export interface EntityKindModule {
|
|
|
778
854
|
readonly canvas: CanvasFacet;
|
|
779
855
|
/** Generated catalog participation — or {@link NO_CATALOG}. */
|
|
780
856
|
readonly catalog: CatalogFacet;
|
|
781
|
-
/** Build
|
|
857
|
+
/** Build checks; each returned failure or string fails the build. */
|
|
782
858
|
readonly buildChecks?: {
|
|
783
|
-
|
|
859
|
+
/** Across every built root, with each root's blocks and source file. */
|
|
860
|
+
readonly validateBuiltRoots?: (roots: readonly BuiltRootSource[]) => readonly BuildCheckFailure[];
|
|
861
|
+
/**
|
|
862
|
+
* The group (e.g. a relationship pair) of a block `validateBuiltRoots` compares, or `undefined`. Build
|
|
863
|
+
* hashes each root's groups against its last pull, so `BuiltRootSource.pull` says whether one group
|
|
864
|
+
* changed, not just whether the file did (edk#2430).
|
|
865
|
+
*/
|
|
866
|
+
readonly comparedGroup?: (block: TfBlock) => string | undefined;
|
|
867
|
+
/** Across every rendered `.tf` file (name → text), with the stream roots built into them. */
|
|
868
|
+
readonly validateRenderedFiles?: (files: ReadonlyMap<string, string>, roots: readonly BuiltRoot[]) => readonly string[];
|
|
784
869
|
};
|
|
785
870
|
/**
|
|
786
871
|
* Plan/apply: resources build emits that may already exist live without
|
|
@@ -788,6 +873,16 @@ export interface EntityKindModule {
|
|
|
788
873
|
* import is written to `.tf/out` so the plan imports instead of creating.
|
|
789
874
|
*/
|
|
790
875
|
readonly stateAdoption?: StateAdoptionFacet;
|
|
876
|
+
/**
|
|
877
|
+
* organization.ts owns a managed body of this kind. App adoption imports a
|
|
878
|
+
* referenced one (the export only has a name lookup) using a read-only ei
|
|
879
|
+
* list for the live id and {@link renderResource} for the config the import
|
|
880
|
+
* gate plans.
|
|
881
|
+
*/
|
|
882
|
+
readonly managedOrganization?: {
|
|
883
|
+
readonly listArgs: readonly string[];
|
|
884
|
+
readonly renderResource: (label: string, value: unknown) => string | undefined;
|
|
885
|
+
};
|
|
791
886
|
/** `--portable` pulls and `clone app`: what is left out, mapped or dropped. */
|
|
792
887
|
readonly portable?: PortableFacet;
|
|
793
888
|
/** Entity-specific equivalences used only by live build-vs-export comparison. */
|
|
@@ -856,6 +951,18 @@ export interface EntityKindModule {
|
|
|
856
951
|
readonly nameAttribute: string;
|
|
857
952
|
readonly ownerAttribute: string;
|
|
858
953
|
}[];
|
|
954
|
+
/**
|
|
955
|
+
* Computed map attributes (`refs`, also read as `inner.refs`) whose
|
|
956
|
+
* provider publishes one value under several keys: `canonicalKey` names
|
|
957
|
+
* the spelling a build emits for `key`, or undefined when it has no other
|
|
958
|
+
* spelling. Reads of two spellings of one key compare equal, so the
|
|
959
|
+
* declaring kind's pull must decode an alias only where the provider
|
|
960
|
+
* publishes it; this check can't tell.
|
|
961
|
+
*/
|
|
962
|
+
readonly mapKeyAliases?: readonly {
|
|
963
|
+
readonly attribute: string;
|
|
964
|
+
readonly canonicalKey: (key: string) => string | undefined;
|
|
965
|
+
}[];
|
|
859
966
|
/**
|
|
860
967
|
* Map attributes the provider computes at plan time from the resource's
|
|
861
968
|
* own list: `<attribute>[entry.<nameAttribute>]` is `value(name)`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elementumai/edk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.1",
|
|
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",
|
|
@@ -159,6 +159,7 @@
|
|
|
159
159
|
"clean:skills": "tsx src/scripts/sync-skill-assets.ts --clean",
|
|
160
160
|
"sync:compatibility": "tsx src/scripts/sync-compatibility.ts",
|
|
161
161
|
"check:release-context": "tsx src/scripts/release-context.ts v0.0.0 HEAD >/dev/null",
|
|
162
|
+
"check:config-writes": "go -C cmd/elementum run ./tools/check-config-writes -root ../..",
|
|
162
163
|
"fetch:schema": "make -C provider fetch-schema",
|
|
163
164
|
"generate:schema": "make -C provider generate-schema",
|
|
164
165
|
"generate:graphql": "make -C provider generate-graphql",
|
|
@@ -191,6 +192,8 @@
|
|
|
191
192
|
"pack:consumer": "npm run build:sdk && tsx src/scripts/test-package-consumer.ts",
|
|
192
193
|
"release:local-sdk": "bash release/verify-local-sdk-prepare.sh",
|
|
193
194
|
"release:notes": "tsx src/scripts/release-notes.ts",
|
|
195
|
+
"changelog:combine": "tsx src/scripts/changelog-fragments.ts",
|
|
196
|
+
"check:changelog": "tsx src/scripts/changelog-fragments.ts --check",
|
|
194
197
|
"check:parity": "tsx src/scripts/check-provider-parity.ts",
|
|
195
198
|
"test:distribution": "npm --prefix distribution test",
|
|
196
199
|
"test:binary": "npm run build:sdk && npm run build:binary:bun && npm run smoke:binary:bun",
|
|
@@ -210,15 +213,16 @@
|
|
|
210
213
|
"typecheck:examples": "tsc --noEmit -p tsconfig.examples-check.json",
|
|
211
214
|
"pretypecheck:consumer": "npm run generate:ragnarok",
|
|
212
215
|
"typecheck:consumer": "tsc --noEmit -p tsconfig.package-consumer-check.json",
|
|
213
|
-
"lint": "eslint src/cli src/internal/sdk-package.ts src/scripts/prepare-release-promotion.ts src/scripts/test-package-consumer.ts examples/package-consumer",
|
|
216
|
+
"lint": "eslint src/cli src/internal/sdk-package.ts src/scripts/prepare-release-promotion.ts src/scripts/changelog-fragments.ts src/scripts/test-package-consumer.ts examples/package-consumer",
|
|
214
217
|
"lint:all": "eslint .",
|
|
215
218
|
"lint:generated": "eslint generated/",
|
|
216
|
-
"check": "npm run typecheck && npm run lint && npm run check:release-context",
|
|
219
|
+
"check": "npm run typecheck && npm run lint && npm run check:release-context && npm run check:changelog",
|
|
217
220
|
"check:distribution": "npm --prefix distribution run check",
|
|
218
221
|
"verify:distribution": "npm run check:distribution && npm run test:distribution && npm run build:distribution && git diff --exit-code -- distribution/generated distribution/public/schemas",
|
|
219
222
|
"edk:canvas": "tsx --tsconfig tsconfig.examples-check.json src/scripts/edk-canvas.ts"
|
|
220
223
|
},
|
|
221
224
|
"dependencies": {
|
|
225
|
+
"@types/node": "^25.5.2",
|
|
222
226
|
"acorn": "^8.16.0",
|
|
223
227
|
"jiti": "^2.7.0",
|
|
224
228
|
"semver": "^7.8.5"
|
|
@@ -226,7 +230,6 @@
|
|
|
226
230
|
"devDependencies": {
|
|
227
231
|
"@cdktf/hcl2json": "^0.21.0",
|
|
228
232
|
"@eslint/js": "^9.39.4",
|
|
229
|
-
"@types/node": "^25.5.2",
|
|
230
233
|
"@types/semver": "^7.8.0",
|
|
231
234
|
"@vercel/blob": "^2.6.1",
|
|
232
235
|
"ajv": "^8.20.0",
|