@elementumai/edk 0.9.14 → 0.9.16
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/dist-sdk/pull/util.d.ts +0 -15
- package/dist-sdk/pull/util.js +44 -5
- package/dist-sdk/src/catalog/factories.d.ts +4 -2
- package/dist-sdk/src/catalog/factories.js +4 -0
- package/dist-sdk/src/catalog/from-authoring.js +5 -1
- package/dist-sdk/src/catalog/index.d.ts +2 -2
- package/dist-sdk/src/catalog/index.js +1 -1
- package/dist-sdk/src/catalog/token.js +2 -2
- package/dist-sdk/src/catalog/types.d.ts +7 -2
- package/dist-sdk/src/core/types/app.d.ts +4 -4
- package/dist-sdk/src/engine/build/context.d.ts +5 -4
- package/dist-sdk/src/engine/build/source-context.d.ts +2 -0
- package/dist-sdk/src/engine/build/source-context.js +16 -0
- package/dist-sdk/src/engine/progress.d.ts +19 -1
- package/dist-sdk/src/engine/progress.js +33 -5
- package/dist-sdk/src/engine/pull/context.d.ts +9 -1
- package/dist-sdk/src/engine/pull/ref-only.d.ts +6 -2
- package/dist-sdk/src/engine/pull/ref-only.js +14 -3
- package/dist-sdk/src/engine/workspace/loader.js +23 -2
- package/dist-sdk/src/entities/access-policy/from-tf.d.ts +1 -1
- package/dist-sdk/src/entities/access-policy/from-tf.js +47 -12
- package/dist-sdk/src/entities/access-policy/to-tf.d.ts +5 -3
- package/dist-sdk/src/entities/access-policy/to-tf.js +23 -1
- package/dist-sdk/src/entities/agent/deserializer/print-agent-v2.d.ts +6 -0
- package/dist-sdk/src/entities/agent/deserializer/print-agent-v2.js +50 -4
- package/dist-sdk/src/entities/agent/from-tf.d.ts +1 -0
- package/dist-sdk/src/entities/agent/from-tf.js +18 -3
- package/dist-sdk/src/entities/agent/module.js +1 -0
- package/dist-sdk/src/entities/agent/to-tf.js +15 -0
- package/dist-sdk/src/entities/agent/tools.d.ts +98 -5
- package/dist-sdk/src/entities/agent/tools.js +12 -3
- package/dist-sdk/src/entities/agent-tool/from-tf.d.ts +15 -0
- package/dist-sdk/src/entities/agent-tool/from-tf.js +47 -4
- package/dist-sdk/src/entities/agent-tool/to-tf.d.ts +9 -0
- package/dist-sdk/src/entities/agent-tool/to-tf.js +82 -25
- package/dist-sdk/src/entities/app/build.d.ts +2 -2
- package/dist-sdk/src/entities/app/deserializer/normalize.d.ts +4 -4
- package/dist-sdk/src/entities/app/module.js +8 -0
- package/dist-sdk/src/entities/app/to-tf.js +1 -0
- package/dist-sdk/src/entities/approval-chain/build.d.ts +8 -1
- package/dist-sdk/src/entities/approval-chain/build.js +3 -0
- package/dist-sdk/src/entities/approval-chain/from-tf.d.ts +2 -1
- package/dist-sdk/src/entities/approval-chain/from-tf.js +20 -7
- package/dist-sdk/src/entities/approval-chain/printer.js +13 -2
- package/dist-sdk/src/entities/approval-chain/to-tf.js +3 -0
- package/dist-sdk/src/entities/automation/build.d.ts +19 -12
- package/dist-sdk/src/entities/automation/build.js +36 -13
- package/dist-sdk/src/entities/automation/deserializer/ast.d.ts +4 -0
- package/dist-sdk/src/entities/automation/deserializer/print-automation.d.ts +19 -0
- package/dist-sdk/src/entities/automation/deserializer/print-automation.js +222 -65
- package/dist-sdk/src/entities/automation/from-tf.d.ts +86 -6
- package/dist-sdk/src/entities/automation/from-tf.js +360 -63
- package/dist-sdk/src/entities/automation/index.d.ts +3 -2
- package/dist-sdk/src/entities/automation/index.js +3 -2
- package/dist-sdk/src/entities/automation/module.js +21 -16
- package/dist-sdk/src/entities/automation/output-field-types.d.ts +5 -0
- package/dist-sdk/src/entities/automation/output-field-types.js +12 -0
- package/dist-sdk/src/entities/automation/output-key-wire-name.d.ts +20 -0
- package/dist-sdk/src/entities/automation/output-key-wire-name.js +22 -0
- package/dist-sdk/src/entities/automation/script-code.d.ts +32 -0
- package/dist-sdk/src/entities/automation/script-code.js +72 -5
- package/dist-sdk/src/entities/automation/tasks.d.ts +60 -24
- package/dist-sdk/src/entities/automation/tasks.js +33 -14
- package/dist-sdk/src/entities/automation/to-tf.d.ts +0 -2
- package/dist-sdk/src/entities/automation/to-tf.js +123 -46
- package/dist-sdk/src/entities/automation/triggers.d.ts +5 -2
- package/dist-sdk/src/entities/automation/types.d.ts +2 -0
- package/dist-sdk/src/entities/automation/types.js +5 -0
- package/dist-sdk/src/entities/automation/workflow-output.d.ts +35 -0
- package/dist-sdk/src/entities/automation/workflow-output.js +53 -0
- package/dist-sdk/src/entities/chart/build.d.ts +3 -3
- package/dist-sdk/src/entities/chart/from-tf.d.ts +2 -2
- package/dist-sdk/src/entities/chart/from-tf.js +20 -13
- package/dist-sdk/src/entities/chart/to-tf.js +7 -5
- package/dist-sdk/src/entities/dashboard/from-tf.js +1 -1
- package/dist-sdk/src/entities/dashboard/to-tf.js +1 -0
- package/dist-sdk/src/entities/dynamic-layout/from-tf.js +3 -2
- package/dist-sdk/src/entities/element/build.d.ts +11 -8
- package/dist-sdk/src/entities/element/build.js +14 -5
- package/dist-sdk/src/entities/element/locals.d.ts +2 -2
- package/dist-sdk/src/entities/element/locals.js +6 -2
- package/dist-sdk/src/entities/element/system-fields.d.ts +4 -0
- package/dist-sdk/src/entities/element/system-fields.js +12 -0
- package/dist-sdk/src/entities/element/to-tf.js +1 -0
- package/dist-sdk/src/entities/field/build.d.ts +2 -2
- package/dist-sdk/src/entities/field/from-tf.js +82 -4
- package/dist-sdk/src/entities/field/to-tf.d.ts +1 -1
- package/dist-sdk/src/entities/field/to-tf.js +11 -4
- package/dist-sdk/src/entities/record-create-form/from-tf.js +3 -2
- package/dist-sdk/src/entities/relationship/from-tf.js +8 -5
- package/dist-sdk/src/entities/relationship/to-tf.js +13 -3
- package/dist-sdk/src/entities/search-table/from-tf.js +6 -6
- package/dist-sdk/src/entities/search-table/module.js +2 -2
- package/dist-sdk/src/entities/search-table/types.d.ts +1 -0
- package/dist-sdk/src/entities/search-table/types.js +1 -0
- package/dist-sdk/src/entities/shared/aspect-target-from-tf.d.ts +3 -3
- package/dist-sdk/src/entities/shared/aspect-target-from-tf.js +10 -6
- package/dist-sdk/src/entities/shared/filters/ast.d.ts +4 -2
- package/dist-sdk/src/entities/shared/filters/index.d.ts +12 -2
- package/dist-sdk/src/entities/shared/filters/index.js +17 -1
- package/dist-sdk/src/entities/shared/filters/print.js +25 -11
- package/dist-sdk/src/entities/shared/filters/tf-codec.d.ts +1 -1
- package/dist-sdk/src/entities/shared/filters/tf-codec.js +39 -7
- package/dist-sdk/src/entities/shared/tool-field-ref.d.ts +1 -1
- package/dist-sdk/src/entities/shared/tool-field-ref.js +6 -2
- package/dist-sdk/src/entities/skill/deserializer/print-skill-v2.d.ts +6 -0
- package/dist-sdk/src/entities/skill/deserializer/print-skill-v2.js +47 -18
- package/dist-sdk/src/entities/skill/module.js +10 -0
- package/dist-sdk/src/entities/skill/to-tf.js +19 -0
- package/dist-sdk/src/entities/skill/tools.d.ts +29 -7
- package/dist-sdk/src/entities/skill/tools.js +6 -2
- package/dist-sdk/src/entities/skill-tool/from-tf.d.ts +18 -0
- package/dist-sdk/src/entities/skill-tool/from-tf.js +77 -4
- package/dist-sdk/src/entities/skill-tool/to-tf.d.ts +8 -0
- package/dist-sdk/src/entities/skill-tool/to-tf.js +90 -46
- package/dist-sdk/src/entities/task/module.js +1 -1
- package/dist-sdk/src/entities/view/from-tf.js +30 -9
- package/dist-sdk/src/entities/view/to-tf.js +18 -10
- package/dist-sdk/src/entities/widget/from-tf.js +3 -3
- package/dist-sdk/src/entities/widget/to-tf.js +1 -0
- package/dist-sdk/src/graph/index.d.ts +15 -0
- package/dist-sdk/src/graph/index.js +19 -0
- package/dist-sdk/src/graph/types.d.ts +37 -1
- package/package.json +2 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EntityTfError } from "../../engine/entity.js";
|
|
2
|
+
import { type TfBlock, type TfDocument, type TfValue } from "../../engine/tf/index.js";
|
|
2
3
|
import type { AutomationAst } from "./deserializer/ast.js";
|
|
3
4
|
export interface AutomationFromTfResult {
|
|
4
5
|
readonly refName: string;
|
|
@@ -13,6 +14,59 @@ export interface AutomationFromTfResult {
|
|
|
13
14
|
/** Non-fatal issues found while extracting (edk#785: a task anchored to the trigger because its real parent is unsupported). */
|
|
14
15
|
readonly diagnostics?: readonly string[];
|
|
15
16
|
}
|
|
17
|
+
interface DecodeContext {
|
|
18
|
+
readonly appRefName: string;
|
|
19
|
+
readonly appTfLabel: string;
|
|
20
|
+
readonly trigger: TfBlock;
|
|
21
|
+
readonly taskByAddress: ReadonlyMap<string, {
|
|
22
|
+
block: TfBlock;
|
|
23
|
+
refKey: string;
|
|
24
|
+
}>;
|
|
25
|
+
readonly resourceBlocks: ReadonlyMap<string, TfBlock>;
|
|
26
|
+
readonly dataBlocks: ReadonlyMap<string, TfBlock>;
|
|
27
|
+
readonly resourceImportIds: ReadonlyMap<string, string>;
|
|
28
|
+
readonly fieldById: ReadonlyMap<string, {
|
|
29
|
+
readonly key: string;
|
|
30
|
+
readonly name: string;
|
|
31
|
+
readonly resourceType: string;
|
|
32
|
+
}>;
|
|
33
|
+
/** Stage key -> name, from the app block's `stages` list; see `stageFilterName`. */
|
|
34
|
+
readonly stagesByKey: ReadonlyMap<string, string>;
|
|
35
|
+
readonly foreignFieldRefsById?: ReadonlyMap<string, {
|
|
36
|
+
readonly ownerRefName: string;
|
|
37
|
+
readonly fieldKey: string;
|
|
38
|
+
readonly fieldName?: string;
|
|
39
|
+
readonly fieldType?: string;
|
|
40
|
+
}>;
|
|
41
|
+
readonly foreignFieldRefsByDataAddress?: ReadonlyMap<string, {
|
|
42
|
+
readonly ownerRefName: string;
|
|
43
|
+
readonly fieldKey: string;
|
|
44
|
+
readonly ownerKind?: "app" | "element" | "task";
|
|
45
|
+
readonly ownerName?: string;
|
|
46
|
+
readonly ownerNamespace?: string;
|
|
47
|
+
readonly fieldName?: string;
|
|
48
|
+
readonly fieldType?: string;
|
|
49
|
+
}>;
|
|
50
|
+
readonly foreignTableRefsById?: ReadonlyMap<string, {
|
|
51
|
+
readonly tableRefName: string;
|
|
52
|
+
readonly name: string;
|
|
53
|
+
}>;
|
|
54
|
+
readonly picklistOptionLabelById?: ReadonlyMap<string, string>;
|
|
55
|
+
readonly fieldNamesByOwnerRefName?: ReadonlyMap<string, ReadonlyMap<string, string>>;
|
|
56
|
+
/** Task resource address → target aspect refName (from `object_id`). */
|
|
57
|
+
readonly taskTargetOwnerRefNameByAddress?: ReadonlyMap<string, string>;
|
|
58
|
+
/** Task resource address → whether `object_id` names an app or element. */
|
|
59
|
+
readonly taskTargetOwnerKindByAddress?: ReadonlyMap<string, "app" | "element" | "task">;
|
|
60
|
+
readonly foreignAppRefNames?: ReadonlyMap<string, string>;
|
|
61
|
+
readonly foreignElementRefNames?: ReadonlyMap<string, string>;
|
|
62
|
+
readonly foreignTaskRefNames?: ReadonlyMap<string, string>;
|
|
63
|
+
/** Procedure discriminator (`procedureDiscriminator`) → org.ts's disambiguated catalog key, for overloaded same-name procedures. See `procedure-refs.ts`. */
|
|
64
|
+
readonly procedureKeysByDiscriminator?: ReadonlyMap<string, string>;
|
|
65
|
+
}
|
|
66
|
+
export declare function inferredPublishOutputType(value: TfValue, ctx: DecodeContext): {
|
|
67
|
+
readonly fieldType: string;
|
|
68
|
+
readonly multiple: boolean;
|
|
69
|
+
};
|
|
16
70
|
/**
|
|
17
71
|
* Best-effort resource footprint of one automation, used ONLY when whole-
|
|
18
72
|
* automation extraction throws (module.ts's `extractAutomations` catch
|
|
@@ -24,12 +78,25 @@ export interface AutomationFromTfResult {
|
|
|
24
78
|
* shows those addresses as destroy-on-apply (confirmed live: several
|
|
25
79
|
* automations that failed extraction were imported into state anyway,
|
|
26
80
|
* driving spurious destroys). Deliberately lenient - tolerant of the exact
|
|
27
|
-
* conditions that make real extraction fail (zero
|
|
28
|
-
* unrecognized task kind)
|
|
29
|
-
*
|
|
30
|
-
*
|
|
81
|
+
* conditions that make real extraction fail (zero triggers, an
|
|
82
|
+
* unrecognized task kind) so it over-collects rather than under-collects.
|
|
83
|
+
* More than one trigger is not one of those cases: it throws
|
|
84
|
+
* {@link UnsupportedMultiTriggerError} and stops the pull. A false positive
|
|
85
|
+
* here just leaves one more resource unmanaged; a false negative would
|
|
86
|
+
* silently destroy a live automation on apply.
|
|
31
87
|
*/
|
|
32
88
|
export declare function automationOwnedAddresses(doc: TfDocument, automationLabel: string): readonly string[];
|
|
89
|
+
/**
|
|
90
|
+
* Pull stops on this. EDK does not author multi-trigger automations; apps
|
|
91
|
+
* should keep one trigger and call the shared logic with a run-automation
|
|
92
|
+
* action. Callers that otherwise turn extract failures into skips must
|
|
93
|
+
* rethrow it.
|
|
94
|
+
*/
|
|
95
|
+
export declare class UnsupportedMultiTriggerError extends EntityTfError {
|
|
96
|
+
readonly automationName: string;
|
|
97
|
+
readonly triggerCount: number;
|
|
98
|
+
constructor(automationName: string, triggerCount: number);
|
|
99
|
+
}
|
|
33
100
|
export interface AutomationFromTfContext {
|
|
34
101
|
readonly ownerHandle: string;
|
|
35
102
|
readonly diagnostics: string[];
|
|
@@ -42,6 +109,11 @@ export interface AutomationFromTfContext {
|
|
|
42
109
|
readonly foreignFieldRefsByDataAddress?: ReadonlyMap<string, {
|
|
43
110
|
readonly ownerRefName: string;
|
|
44
111
|
readonly fieldKey: string;
|
|
112
|
+
readonly ownerKind?: "app" | "element" | "task";
|
|
113
|
+
readonly ownerName?: string;
|
|
114
|
+
readonly ownerNamespace?: string;
|
|
115
|
+
readonly fieldName?: string;
|
|
116
|
+
readonly fieldType?: string;
|
|
45
117
|
}>;
|
|
46
118
|
readonly foreignTableRefsById?: ReadonlyMap<string, {
|
|
47
119
|
readonly tableRefName: string;
|
|
@@ -51,6 +123,7 @@ export interface AutomationFromTfContext {
|
|
|
51
123
|
readonly fieldNamesByOwnerRefName?: ReadonlyMap<string, ReadonlyMap<string, string>>;
|
|
52
124
|
readonly foreignAppRefNames?: ReadonlyMap<string, string>;
|
|
53
125
|
readonly foreignElementRefNames?: ReadonlyMap<string, string>;
|
|
126
|
+
readonly foreignTaskRefNames?: ReadonlyMap<string, string>;
|
|
54
127
|
readonly procedureKeysByDiscriminator?: ReadonlyMap<string, string>;
|
|
55
128
|
}
|
|
56
129
|
export interface AutomationGraphFromTfResult {
|
|
@@ -63,10 +136,17 @@ export declare function automationFromTf(doc: TfDocument, automationLabel: strin
|
|
|
63
136
|
readonly ownerRefName: string;
|
|
64
137
|
readonly fieldKey: string;
|
|
65
138
|
readonly fieldName?: string;
|
|
139
|
+
readonly fieldType?: string;
|
|
66
140
|
}>, foreignFieldRefsByDataAddress?: ReadonlyMap<string, {
|
|
67
141
|
readonly ownerRefName: string;
|
|
68
142
|
readonly fieldKey: string;
|
|
143
|
+
readonly ownerKind?: "app" | "element" | "task";
|
|
144
|
+
readonly ownerName?: string;
|
|
145
|
+
readonly ownerNamespace?: string;
|
|
146
|
+
readonly fieldName?: string;
|
|
147
|
+
readonly fieldType?: string;
|
|
69
148
|
}>, foreignTableRefsById?: ReadonlyMap<string, {
|
|
70
149
|
readonly tableRefName: string;
|
|
71
150
|
readonly name: string;
|
|
72
|
-
}>, picklistOptionLabelById?: ReadonlyMap<string, string>, fieldNamesByOwnerRefName?: ReadonlyMap<string, ReadonlyMap<string, string>>, foreignAppRefNames?: ReadonlyMap<string, string>, foreignElementRefNames?: ReadonlyMap<string, string>, procedureKeysByDiscriminator?: ReadonlyMap<string, string>): AutomationFromTfResult;
|
|
151
|
+
}>, picklistOptionLabelById?: ReadonlyMap<string, string>, fieldNamesByOwnerRefName?: ReadonlyMap<string, ReadonlyMap<string, string>>, foreignAppRefNames?: ReadonlyMap<string, string>, foreignElementRefNames?: ReadonlyMap<string, string>, procedureKeysByDiscriminator?: ReadonlyMap<string, string>, foreignTaskRefNames?: ReadonlyMap<string, string>): AutomationFromTfResult;
|
|
152
|
+
export {};
|