@elementumai/edk 0.8.2-alpha.6 → 0.9.5
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 +49 -37
- package/dist-sdk/elementum-entity-client/clients/agents/models/agent-tool.d.ts +3 -3
- package/dist-sdk/elementum-entity-client/clients/aspects/models/index.d.ts +1 -1
- package/dist-sdk/elementum-entity-client/clients/aspects/models/picklist-config.d.ts +3 -11
- package/dist-sdk/elementum-entity-client/clients/automation/models/automation.d.ts +3 -11
- package/dist-sdk/elementum-entity-client/clients/skills/models/skill-tool.d.ts +1 -1
- package/dist-sdk/elementum-entity-client/clients/skills/models/skill.d.ts +1 -1
- package/dist-sdk/elementum-entity-client/clients/skills/models/skill.js +1 -1
- package/dist-sdk/fs/entity.d.ts +2 -2
- package/dist-sdk/fs/entity.js +1 -1
- package/dist-sdk/pull/missing-report.d.ts +81 -0
- package/dist-sdk/pull/missing-report.js +52 -0
- package/dist-sdk/pull/util.d.ts +1 -1
- package/dist-sdk/pull/util.js +3 -3
- package/dist-sdk/src/catalog/factories.d.ts +96 -23
- package/dist-sdk/src/catalog/factories.js +141 -21
- package/dist-sdk/src/catalog/from-authoring.d.ts +5 -5
- package/dist-sdk/src/catalog/from-authoring.js +20 -10
- 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 +63 -4
- package/dist-sdk/src/catalog/render-helpers.d.ts +1 -1
- package/dist-sdk/src/catalog/render-helpers.js +1 -1
- package/dist-sdk/src/catalog/render.d.ts +1 -0
- package/dist-sdk/src/catalog/render.js +8 -2
- package/dist-sdk/src/catalog/token.js +18 -4
- package/dist-sdk/src/catalog/types.d.ts +64 -24
- package/dist-sdk/src/catalog/types.js +12 -4
- package/dist-sdk/src/core/app-to-ui.d.ts +6 -6
- package/dist-sdk/src/core/app-to-ui.js +7 -9
- package/dist-sdk/src/core/index.d.ts +11 -10
- package/dist-sdk/src/core/index.js +10 -9
- package/dist-sdk/src/core/platform-id.d.ts +11 -0
- package/dist-sdk/src/core/platform-id.js +8 -0
- package/dist-sdk/src/{entities/flow/activities/render-catalog.d.ts → core/render-tree.d.ts} +3 -3
- package/dist-sdk/src/{entities/flow/activities/render-catalog.js → core/render-tree.js} +7 -10
- package/dist-sdk/src/core/types/ai-provider.d.ts +1 -1
- package/dist-sdk/src/core/types/ai-provider.js +1 -1
- package/dist-sdk/src/core/types/app.d.ts +78 -52
- package/dist-sdk/src/core/types/app.js +2 -3
- package/dist-sdk/src/core/types/aspect-category.d.ts +4 -4
- package/dist-sdk/src/core/types/aspect-category.js +4 -4
- package/dist-sdk/src/core/types/cloud-link.d.ts +3 -3
- package/dist-sdk/src/core/types/cloud-link.js +3 -3
- package/dist-sdk/src/core/types/display-block.d.ts +2 -2
- package/dist-sdk/src/core/types/display-block.js +2 -2
- package/dist-sdk/src/core/types/group.d.ts +1 -1
- package/dist-sdk/src/core/types/group.js +1 -1
- package/dist-sdk/src/core/types/user.d.ts +1 -1
- package/dist-sdk/src/core/types/user.js +1 -1
- package/dist-sdk/src/core/wire/ref-serializer.js +3 -3
- package/dist-sdk/src/engine/build/context.d.ts +23 -16
- package/dist-sdk/src/engine/entity.d.ts +1 -1
- package/dist-sdk/src/engine/pull/attrs.d.ts +4 -0
- package/dist-sdk/src/engine/pull/attrs.js +17 -0
- package/dist-sdk/src/engine/pull/context.d.ts +73 -0
- package/dist-sdk/src/engine/pull/context.js +14 -0
- package/dist-sdk/src/engine/pull/org.d.ts +10 -0
- package/dist-sdk/src/engine/pull/org.js +35 -0
- package/dist-sdk/src/engine/pull/ref-only.d.ts +37 -0
- package/dist-sdk/src/engine/pull/ref-only.js +204 -0
- package/dist-sdk/src/engine/tf/expr.d.ts +7 -3
- package/dist-sdk/src/engine/tf/expr.js +27 -15
- package/dist-sdk/src/engine/tf/index.d.ts +1 -1
- package/dist-sdk/src/engine/tf/index.js +1 -1
- package/dist-sdk/src/engine/tf/model.d.ts +8 -1
- package/dist-sdk/src/engine/tf/model.js +4 -0
- package/dist-sdk/src/engine/tf/parse.js +13 -2
- package/dist-sdk/src/engine/tf/render.js +4 -0
- package/dist-sdk/src/engine/workspace/authoring-layout.js +4 -2
- package/dist-sdk/src/entities/access-policy/build.d.ts +6 -16
- package/dist-sdk/src/entities/access-policy/build.js +2 -2
- package/dist-sdk/src/entities/access-policy/from-tf.d.ts +14 -40
- package/dist-sdk/src/entities/access-policy/from-tf.js +26 -85
- package/dist-sdk/src/entities/access-policy/principal.d.ts +39 -0
- package/dist-sdk/src/entities/access-policy/principal.js +13 -0
- package/dist-sdk/src/entities/access-policy/to-tf.d.ts +33 -6
- package/dist-sdk/src/entities/access-policy/to-tf.js +62 -60
- package/dist-sdk/src/entities/agent/build.d.ts +42 -11
- package/dist-sdk/src/entities/agent/build.js +40 -19
- package/dist-sdk/src/entities/agent/deserializer/print-agent-v2.d.ts +11 -1
- package/dist-sdk/src/entities/agent/deserializer/print-agent-v2.js +180 -45
- package/dist-sdk/src/entities/agent/from-tf.d.ts +3 -1
- package/dist-sdk/src/entities/agent/from-tf.js +17 -12
- package/dist-sdk/src/entities/agent/index.d.ts +5 -2
- package/dist-sdk/src/entities/agent/index.js +4 -2
- package/dist-sdk/src/entities/agent/module.js +7 -2
- package/dist-sdk/src/entities/agent/run-as.d.ts +16 -0
- package/dist-sdk/src/entities/agent/run-as.js +1 -0
- package/dist-sdk/src/entities/agent/to-tf.d.ts +6 -2
- package/dist-sdk/src/entities/agent/to-tf.js +58 -9
- package/dist-sdk/src/entities/agent/tools.d.ts +97 -70
- package/dist-sdk/src/entities/agent/tools.js +63 -43
- package/dist-sdk/src/entities/agent-a2a-skill/from-tf.js +1 -1
- package/dist-sdk/src/entities/agent-a2a-skill/to-tf.js +4 -4
- package/dist-sdk/src/entities/agent-evaluation/build.d.ts +19 -0
- package/dist-sdk/src/entities/agent-evaluation/build.js +41 -0
- package/dist-sdk/src/entities/agent-evaluation/deserializer/print-agent-evaluation.d.ts +4 -0
- package/dist-sdk/src/entities/agent-evaluation/deserializer/print-agent-evaluation.js +30 -0
- package/dist-sdk/src/entities/agent-evaluation/from-tf.d.ts +12 -0
- package/dist-sdk/src/entities/agent-evaluation/from-tf.js +46 -0
- package/dist-sdk/src/entities/agent-evaluation/index.d.ts +1 -0
- package/dist-sdk/src/entities/agent-evaluation/index.js +1 -0
- package/dist-sdk/src/entities/agent-evaluation/module.d.ts +3 -0
- package/dist-sdk/src/entities/agent-evaluation/module.js +58 -0
- package/dist-sdk/src/entities/agent-evaluation/to-tf.d.ts +12 -0
- package/dist-sdk/src/entities/agent-evaluation/to-tf.js +35 -0
- package/dist-sdk/src/entities/agent-tool/from-tf.d.ts +25 -15
- package/dist-sdk/src/entities/agent-tool/from-tf.js +175 -43
- package/dist-sdk/src/entities/agent-tool/module.js +6 -0
- package/dist-sdk/src/entities/agent-tool/to-tf.d.ts +15 -7
- package/dist-sdk/src/entities/agent-tool/to-tf.js +169 -48
- package/dist-sdk/src/entities/agent-tool/types.d.ts +4 -6
- package/dist-sdk/src/entities/agent-tool/types.js +30 -29
- package/dist-sdk/src/entities/app/build.d.ts +214 -47
- package/dist-sdk/src/entities/app/build.js +128 -66
- package/dist-sdk/src/entities/app/deserializer/normalize.d.ts +188 -8
- package/dist-sdk/src/entities/app/deserializer/pulled-expression.d.ts +59 -0
- package/dist-sdk/src/entities/app/deserializer/pulled-expression.js +70 -0
- package/dist-sdk/src/entities/app/display-blocks.d.ts +2 -1
- package/dist-sdk/src/entities/app/display-blocks.js +1 -1
- package/dist-sdk/src/entities/app/from-tf.d.ts +11 -1
- package/dist-sdk/src/entities/app/from-tf.js +30 -2
- package/dist-sdk/src/entities/app/index.d.ts +20 -8
- package/dist-sdk/src/entities/app/index.js +16 -6
- package/dist-sdk/src/entities/app/module.js +29 -4
- package/dist-sdk/src/entities/app/to-tf.d.ts +1 -1
- package/dist-sdk/src/entities/app/to-tf.js +97 -7
- package/dist-sdk/src/entities/approval-chain/build.d.ts +31 -16
- package/dist-sdk/src/entities/approval-chain/build.js +49 -49
- package/dist-sdk/src/entities/approval-chain/from-tf.d.ts +17 -0
- package/dist-sdk/src/entities/approval-chain/from-tf.js +57 -0
- package/dist-sdk/src/entities/approval-chain/index.d.ts +2 -3
- package/dist-sdk/src/entities/approval-chain/index.js +2 -3
- package/dist-sdk/src/entities/approval-chain/module.d.ts +3 -0
- package/dist-sdk/src/entities/approval-chain/module.js +51 -0
- package/dist-sdk/src/entities/approval-chain/printer.d.ts +2 -0
- package/dist-sdk/src/entities/approval-chain/printer.js +21 -0
- package/dist-sdk/src/entities/approval-chain/to-tf.d.ts +9 -0
- package/dist-sdk/src/entities/approval-chain/to-tf.js +43 -0
- package/dist-sdk/src/entities/automation/build.d.ts +177 -95
- package/dist-sdk/src/entities/automation/build.js +164 -72
- package/dist-sdk/src/entities/automation/calculation-expression.d.ts +191 -0
- package/dist-sdk/src/entities/automation/calculation-expression.js +57 -0
- package/dist-sdk/src/entities/automation/deserializer/ast.d.ts +18 -9
- package/dist-sdk/src/entities/automation/deserializer/print-automation.d.ts +18 -14
- package/dist-sdk/src/entities/automation/deserializer/print-automation.js +214 -311
- package/dist-sdk/src/entities/automation/filter.d.ts +1 -115
- package/dist-sdk/src/entities/automation/filter.js +1 -197
- package/dist-sdk/src/entities/automation/from-tf.d.ts +28 -0
- package/dist-sdk/src/entities/automation/from-tf.js +695 -182
- package/dist-sdk/src/entities/automation/index.d.ts +9 -10
- package/dist-sdk/src/entities/automation/index.js +11 -11
- package/dist-sdk/src/entities/automation/module.js +82 -8
- package/dist-sdk/src/entities/automation/operators.d.ts +32 -48
- package/dist-sdk/src/entities/automation/operators.js +10 -37
- package/dist-sdk/src/entities/automation/output-key-wire-name.d.ts +1 -1
- package/dist-sdk/src/entities/automation/output-key-wire-name.js +1 -1
- package/dist-sdk/src/entities/automation/script-code.js +107 -28
- package/dist-sdk/src/entities/automation/serialize.js +1 -1
- package/dist-sdk/src/entities/automation/tasks.d.ts +167 -102
- package/dist-sdk/src/entities/automation/tasks.js +66 -13
- package/dist-sdk/src/entities/automation/to-tf.d.ts +44 -3
- package/dist-sdk/src/entities/automation/to-tf.js +607 -161
- package/dist-sdk/src/entities/automation/triggers.d.ts +33 -25
- package/dist-sdk/src/entities/automation/triggers.js +8 -2
- package/dist-sdk/src/entities/automation/types.d.ts +3 -2
- package/dist-sdk/src/entities/automation/types.js +3 -2
- package/dist-sdk/src/entities/chart/build.d.ts +95 -0
- package/dist-sdk/src/entities/chart/build.js +42 -0
- package/dist-sdk/src/entities/chart/from-tf.d.ts +55 -0
- package/dist-sdk/src/entities/chart/from-tf.js +269 -0
- package/dist-sdk/src/entities/chart/index.d.ts +4 -0
- package/dist-sdk/src/entities/chart/index.js +3 -0
- package/dist-sdk/src/entities/chart/module.d.ts +3 -0
- package/dist-sdk/src/entities/chart/module.js +61 -0
- package/dist-sdk/src/entities/chart/printer.d.ts +5 -0
- package/dist-sdk/src/entities/chart/printer.js +104 -0
- package/dist-sdk/src/entities/chart/to-tf.d.ts +15 -0
- package/dist-sdk/src/entities/chart/to-tf.js +150 -0
- package/dist-sdk/src/entities/chart/types.d.ts +53 -0
- package/dist-sdk/src/entities/chart/types.js +22 -0
- package/dist-sdk/src/entities/dashboard/build.d.ts +44 -0
- package/dist-sdk/src/entities/dashboard/build.js +16 -0
- package/dist-sdk/src/entities/dashboard/from-tf.d.ts +12 -0
- package/dist-sdk/src/entities/dashboard/from-tf.js +113 -0
- package/dist-sdk/src/entities/dashboard/module.d.ts +3 -0
- package/dist-sdk/src/entities/dashboard/module.js +16 -0
- package/dist-sdk/src/entities/dashboard/to-tf.d.ts +43 -0
- package/dist-sdk/src/entities/dashboard/to-tf.js +121 -0
- package/dist-sdk/src/entities/dashboard-widget/module.d.ts +3 -0
- package/dist-sdk/src/entities/dashboard-widget/module.js +10 -0
- package/dist-sdk/src/entities/data-lookup/module.d.ts +3 -0
- package/dist-sdk/src/entities/data-lookup/module.js +22 -0
- package/dist-sdk/src/entities/datamine/build.d.ts +22 -0
- package/dist-sdk/src/entities/datamine/from-tf.d.ts +17 -0
- package/dist-sdk/src/entities/datamine/from-tf.js +98 -0
- package/dist-sdk/src/entities/datamine/module.d.ts +3 -0
- package/dist-sdk/src/entities/datamine/module.js +23 -0
- package/dist-sdk/src/entities/datamine/to-tf.d.ts +11 -0
- package/dist-sdk/src/entities/datamine/to-tf.js +53 -0
- package/dist-sdk/src/entities/dynamic-layout/build.d.ts +304 -0
- package/dist-sdk/src/entities/dynamic-layout/build.js +4 -0
- package/dist-sdk/src/entities/dynamic-layout/dialect.d.ts +4 -0
- package/dist-sdk/src/entities/dynamic-layout/dialect.js +47 -0
- package/dist-sdk/src/entities/dynamic-layout/from-tf.d.ts +10 -0
- package/dist-sdk/src/entities/dynamic-layout/from-tf.js +239 -0
- package/dist-sdk/src/entities/dynamic-layout/module.d.ts +3 -0
- package/dist-sdk/src/entities/dynamic-layout/module.js +13 -0
- package/dist-sdk/src/entities/dynamic-layout/to-tf.d.ts +26 -0
- package/dist-sdk/src/entities/dynamic-layout/to-tf.js +267 -0
- package/dist-sdk/src/entities/element/build.d.ts +48 -38
- package/dist-sdk/src/entities/element/build.js +24 -33
- package/dist-sdk/src/entities/element/from-tf.d.ts +9 -1
- package/dist-sdk/src/entities/element/from-tf.js +31 -2
- package/dist-sdk/src/entities/element/index.d.ts +14 -7
- package/dist-sdk/src/entities/element/index.js +11 -5
- package/dist-sdk/src/entities/element/module.js +26 -5
- package/dist-sdk/src/entities/element/to-tf.d.ts +2 -1
- package/dist-sdk/src/entities/element/to-tf.js +64 -4
- package/dist-sdk/src/entities/field/build.d.ts +55 -27
- package/dist-sdk/src/entities/field/build.js +31 -6
- package/dist-sdk/src/entities/field/calc/aggregate.d.ts +52 -21
- package/dist-sdk/src/entities/field/calc/aggregate.js +59 -29
- package/dist-sdk/src/entities/field/calc/date.d.ts +78 -29
- package/dist-sdk/src/entities/field/calc/date.js +120 -29
- package/dist-sdk/src/entities/field/calc/index.d.ts +80 -85
- package/dist-sdk/src/entities/field/calc/index.js +82 -139
- package/dist-sdk/src/entities/field/calc/numeric.d.ts +8 -12
- package/dist-sdk/src/entities/field/calc/numeric.js +10 -27
- package/dist-sdk/src/entities/field/calc/runtime.d.ts +19 -2
- package/dist-sdk/src/entities/field/calc/runtime.js +79 -8
- package/dist-sdk/src/entities/field/calc/text.d.ts +32 -23
- package/dist-sdk/src/entities/field/calc/text.js +43 -31
- package/dist-sdk/src/entities/field/calc/types.d.ts +36 -81
- package/dist-sdk/src/entities/field/calc/types.js +1 -22
- package/dist-sdk/src/entities/field/calc.d.ts +71 -48
- package/dist-sdk/src/entities/field/calc.js +5 -15
- package/dist-sdk/src/entities/field/calculation-types.d.ts +6 -0
- package/dist-sdk/src/entities/field/calculation-types.js +49 -0
- package/dist-sdk/src/entities/field/from-tf.js +238 -13
- package/dist-sdk/src/entities/field/locals.d.ts +11 -3
- package/dist-sdk/src/entities/field/locals.js +15 -2
- package/dist-sdk/src/entities/field/module.d.ts +1 -0
- package/dist-sdk/src/entities/field/module.js +27 -7
- package/dist-sdk/src/entities/field/record-shape.d.ts +25 -11
- package/dist-sdk/src/entities/field/to-tf.d.ts +41 -2
- package/dist-sdk/src/entities/field/to-tf.js +314 -40
- package/dist-sdk/src/entities/field/types.d.ts +1 -1
- package/dist-sdk/src/entities/field/types.js +10 -1
- package/dist-sdk/src/entities/file-reader/build.d.ts +71 -19
- package/dist-sdk/src/entities/file-reader/build.js +49 -4
- package/dist-sdk/src/entities/file-reader/deserializer/print-file-reader.d.ts +1 -0
- package/dist-sdk/src/entities/file-reader/deserializer/print-file-reader.js +12 -10
- package/dist-sdk/src/entities/file-reader/from-tf.d.ts +1 -1
- package/dist-sdk/src/entities/file-reader/from-tf.js +31 -2
- package/dist-sdk/src/entities/file-reader/index.d.ts +3 -3
- package/dist-sdk/src/entities/file-reader/index.js +3 -3
- package/dist-sdk/src/entities/file-reader/module.js +6 -5
- package/dist-sdk/src/entities/file-reader/to-tf.d.ts +1 -1
- package/dist-sdk/src/entities/file-reader/to-tf.js +5 -2
- package/dist-sdk/src/entities/file-reader/types.d.ts +3 -4
- package/dist-sdk/src/entities/file-reader/types.js +4 -5
- package/dist-sdk/src/entities/org/category.js +4 -5
- package/dist-sdk/src/entities/org/cloud-link.js +4 -5
- package/dist-sdk/src/entities/org/email-alias.d.ts +2 -0
- package/dist-sdk/src/entities/org/email-alias.js +12 -0
- package/dist-sdk/src/entities/org/group.js +4 -5
- package/dist-sdk/src/entities/org/index.d.ts +2 -0
- package/dist-sdk/src/entities/org/index.js +2 -0
- package/dist-sdk/src/entities/org/phone-provider.d.ts +4 -0
- package/dist-sdk/src/entities/org/phone-provider.js +30 -0
- package/dist-sdk/src/entities/org/role.d.ts +3 -3
- package/dist-sdk/src/entities/org/role.js +9 -6
- package/dist-sdk/src/entities/organization/build.d.ts +241 -0
- package/dist-sdk/src/entities/organization/build.js +165 -0
- package/dist-sdk/src/entities/organization/index.d.ts +2 -0
- package/dist-sdk/src/entities/organization/index.js +2 -0
- package/dist-sdk/src/entities/organization/module.d.ts +2 -0
- package/dist-sdk/src/entities/organization/module.js +21 -0
- package/dist-sdk/src/entities/organization/to-tf.d.ts +7 -0
- package/dist-sdk/src/entities/organization/to-tf.js +154 -0
- package/dist-sdk/src/entities/phone-service/build.d.ts +17 -0
- package/dist-sdk/src/entities/phone-service/build.js +31 -0
- package/dist-sdk/src/entities/phone-service/deserializer/print-phone-service.d.ts +4 -0
- package/dist-sdk/src/entities/phone-service/deserializer/print-phone-service.js +56 -0
- package/dist-sdk/src/entities/phone-service/from-tf.d.ts +25 -0
- package/dist-sdk/src/entities/phone-service/from-tf.js +75 -0
- package/dist-sdk/src/entities/phone-service/index.d.ts +2 -0
- package/dist-sdk/src/entities/phone-service/index.js +2 -0
- package/dist-sdk/src/entities/phone-service/module.d.ts +3 -0
- package/dist-sdk/src/entities/phone-service/module.js +55 -0
- package/dist-sdk/src/entities/phone-service/to-tf.d.ts +12 -0
- package/dist-sdk/src/entities/phone-service/to-tf.js +54 -0
- package/dist-sdk/src/entities/phone-service/types.d.ts +35 -0
- package/dist-sdk/src/entities/phone-service/types.js +22 -0
- package/dist-sdk/src/entities/record-create-form/from-tf.d.ts +11 -0
- package/dist-sdk/src/entities/record-create-form/from-tf.js +74 -0
- package/dist-sdk/src/entities/record-create-form/module.d.ts +11 -0
- package/dist-sdk/src/entities/record-create-form/module.js +24 -0
- package/dist-sdk/src/entities/record-create-form/to-tf.d.ts +33 -0
- package/dist-sdk/src/entities/record-create-form/to-tf.js +88 -0
- package/dist-sdk/src/entities/relationship/build.d.ts +16 -0
- package/dist-sdk/src/entities/relationship/build.js +1 -0
- package/dist-sdk/src/entities/relationship/from-tf.d.ts +12 -0
- package/dist-sdk/src/entities/relationship/from-tf.js +109 -0
- package/dist-sdk/src/entities/relationship/module.d.ts +3 -0
- package/dist-sdk/src/entities/relationship/module.js +16 -0
- package/dist-sdk/src/entities/relationship/to-tf.d.ts +32 -0
- package/dist-sdk/src/entities/relationship/to-tf.js +145 -0
- package/dist-sdk/src/entities/role/build.d.ts +65 -0
- package/dist-sdk/src/entities/role/build.js +33 -0
- package/dist-sdk/src/entities/role/from-tf.d.ts +13 -0
- package/dist-sdk/src/entities/role/from-tf.js +138 -0
- package/dist-sdk/src/entities/role/to-tf.d.ts +13 -0
- package/dist-sdk/src/entities/role/to-tf.js +69 -0
- package/dist-sdk/src/entities/search-table/build.d.ts +67 -28
- package/dist-sdk/src/entities/search-table/build.js +110 -56
- package/dist-sdk/src/entities/search-table/from-tf.d.ts +37 -0
- package/dist-sdk/src/entities/search-table/from-tf.js +113 -0
- package/dist-sdk/src/entities/search-table/index.d.ts +2 -2
- package/dist-sdk/src/entities/search-table/index.js +2 -2
- package/dist-sdk/src/entities/search-table/module.js +88 -10
- package/dist-sdk/src/entities/search-table/printer.d.ts +2 -0
- package/dist-sdk/src/entities/search-table/printer.js +52 -0
- package/dist-sdk/src/entities/search-table/to-tf.d.ts +14 -0
- package/dist-sdk/src/entities/search-table/to-tf.js +104 -0
- package/dist-sdk/src/entities/search-table/types.d.ts +8 -0
- package/dist-sdk/src/entities/search-table/types.js +21 -0
- package/dist-sdk/src/entities/service-account/build.d.ts +32 -0
- package/dist-sdk/src/entities/service-account/build.js +9 -0
- package/dist-sdk/src/entities/service-account/from-tf.d.ts +10 -0
- package/dist-sdk/src/entities/service-account/from-tf.js +109 -0
- package/dist-sdk/src/entities/service-account/module.d.ts +4 -0
- package/dist-sdk/src/entities/service-account/module.js +21 -0
- package/dist-sdk/src/entities/service-account/ref.d.ts +11 -0
- package/dist-sdk/src/entities/service-account/ref.js +5 -0
- package/dist-sdk/src/entities/service-account/to-tf.d.ts +32 -0
- package/dist-sdk/src/entities/service-account/to-tf.js +103 -0
- package/dist-sdk/src/entities/shared/connector-from-tf.d.ts +14 -0
- package/dist-sdk/src/entities/shared/connector-from-tf.js +14 -0
- package/dist-sdk/src/entities/shared/context.d.ts +25 -24
- package/dist-sdk/src/entities/shared/context.js +36 -35
- package/dist-sdk/src/entities/shared/filters/ast.d.ts +30 -81
- package/dist-sdk/src/entities/shared/filters/ast.js +6 -2
- package/dist-sdk/src/entities/shared/filters/index.d.ts +95 -206
- package/dist-sdk/src/entities/shared/filters/index.js +196 -341
- package/dist-sdk/src/entities/shared/filters/print.d.ts +11 -0
- package/dist-sdk/src/entities/shared/filters/print.js +122 -0
- package/dist-sdk/src/entities/shared/filters/tf-codec.d.ts +170 -0
- package/dist-sdk/src/entities/shared/filters/tf-codec.js +527 -0
- package/dist-sdk/src/entities/shared/filters/types.d.ts +66 -69
- package/dist-sdk/src/entities/shared/filters/types.js +2 -3
- package/dist-sdk/src/entities/shared/foreign-ref.d.ts +14 -0
- package/dist-sdk/src/entities/shared/foreign-ref.js +12 -0
- package/dist-sdk/src/entities/shared/ref.d.ts +26 -11
- package/dist-sdk/src/entities/shared/ref.js +8 -3
- package/dist-sdk/src/entities/shared/types/common.d.ts +2 -2
- package/dist-sdk/src/entities/shared/types/field-types.d.ts +1 -1
- package/dist-sdk/src/entities/shared/types/field-types.js +1 -1
- package/dist-sdk/src/entities/skill/build.d.ts +4 -4
- package/dist-sdk/src/entities/skill/build.js +6 -5
- package/dist-sdk/src/entities/skill/deserializer/print-skill-v2.d.ts +11 -1
- package/dist-sdk/src/entities/skill/deserializer/print-skill-v2.js +100 -39
- package/dist-sdk/src/entities/skill/index.d.ts +3 -2
- package/dist-sdk/src/entities/skill/index.js +3 -2
- package/dist-sdk/src/entities/skill/module.js +8 -2
- package/dist-sdk/src/entities/skill/to-tf.d.ts +6 -2
- package/dist-sdk/src/entities/skill/to-tf.js +20 -2
- package/dist-sdk/src/entities/skill/tools.d.ts +47 -31
- package/dist-sdk/src/entities/skill/tools.js +37 -23
- package/dist-sdk/src/entities/skill-tool/from-tf.d.ts +17 -1
- package/dist-sdk/src/entities/skill-tool/from-tf.js +118 -8
- package/dist-sdk/src/entities/skill-tool/module.js +9 -0
- package/dist-sdk/src/entities/skill-tool/to-tf.d.ts +6 -1
- package/dist-sdk/src/entities/skill-tool/to-tf.js +100 -48
- package/dist-sdk/src/entities/skill-tool/types.js +18 -1
- package/dist-sdk/src/entities/table/build.d.ts +64 -23
- package/dist-sdk/src/entities/table/build.js +41 -26
- package/dist-sdk/src/entities/table/catalog-render.js +15 -1
- package/dist-sdk/src/entities/table/deserializer/normalize.d.ts +99 -0
- package/dist-sdk/src/entities/table/deserializer/normalize.js +192 -0
- package/dist-sdk/src/entities/table/fields/types.d.ts +86 -0
- package/dist-sdk/src/entities/table/fields/types.js +12 -0
- package/dist-sdk/src/entities/table/fields.d.ts +107 -47
- package/dist-sdk/src/entities/table/fields.js +76 -55
- package/dist-sdk/src/entities/table/from-tf.d.ts +4 -0
- package/dist-sdk/src/entities/table/from-tf.js +261 -0
- package/dist-sdk/src/entities/table/index.d.ts +7 -5
- package/dist-sdk/src/entities/table/index.js +7 -7
- package/dist-sdk/src/entities/table/joins.d.ts +22 -9
- package/dist-sdk/src/entities/table/joins.js +8 -16
- package/dist-sdk/src/entities/table/module.d.ts +2 -1
- package/dist-sdk/src/entities/table/module.js +13 -6
- package/dist-sdk/src/entities/table/to-tf.d.ts +10 -0
- package/dist-sdk/src/entities/table/to-tf.js +222 -0
- package/dist-sdk/src/entities/task/build.d.ts +43 -0
- package/dist-sdk/src/entities/task/build.js +17 -0
- package/dist-sdk/src/entities/task/from-tf.d.ts +28 -0
- package/dist-sdk/src/entities/task/from-tf.js +38 -0
- package/dist-sdk/src/entities/task/index.d.ts +1 -0
- package/dist-sdk/src/entities/task/index.js +1 -0
- package/dist-sdk/src/entities/task/module.d.ts +3 -0
- package/dist-sdk/src/entities/task/module.js +12 -0
- package/dist-sdk/src/entities/task/to-tf.d.ts +9 -0
- package/dist-sdk/src/entities/task/to-tf.js +49 -0
- package/dist-sdk/src/entities/view/build.d.ts +46 -0
- package/dist-sdk/src/entities/view/build.js +19 -0
- package/dist-sdk/src/entities/view/from-tf.d.ts +7 -2
- package/dist-sdk/src/entities/view/from-tf.js +264 -30
- package/dist-sdk/src/entities/view/module.d.ts +6 -13
- package/dist-sdk/src/entities/view/module.js +12 -15
- package/dist-sdk/src/entities/view/sharing.d.ts +10 -0
- package/dist-sdk/src/entities/view/sharing.js +6 -0
- package/dist-sdk/src/entities/view/to-tf.d.ts +56 -12
- package/dist-sdk/src/entities/view/to-tf.js +192 -20
- package/dist-sdk/src/entities/view/types.d.ts +8 -0
- package/dist-sdk/src/entities/view/types.js +46 -0
- package/dist-sdk/src/entities/visual-flow/build.d.ts +87 -0
- package/dist-sdk/src/entities/visual-flow/build.js +72 -0
- package/dist-sdk/src/entities/visual-flow/from-tf.d.ts +49 -0
- package/dist-sdk/src/entities/visual-flow/from-tf.js +124 -0
- package/dist-sdk/src/entities/visual-flow/index.d.ts +1 -0
- package/dist-sdk/src/entities/visual-flow/index.js +1 -0
- package/dist-sdk/src/entities/visual-flow/module.d.ts +3 -0
- package/dist-sdk/src/entities/visual-flow/module.js +41 -0
- package/dist-sdk/src/entities/visual-flow/printer.d.ts +8 -0
- package/dist-sdk/src/entities/visual-flow/printer.js +92 -0
- package/dist-sdk/src/entities/visual-flow/to-tf.d.ts +15 -0
- package/dist-sdk/src/entities/visual-flow/to-tf.js +97 -0
- package/dist-sdk/src/entities/widget/build.d.ts +55 -0
- package/dist-sdk/src/entities/widget/build.js +1 -0
- package/dist-sdk/src/entities/widget/from-tf.d.ts +11 -0
- package/dist-sdk/src/entities/widget/from-tf.js +209 -0
- package/dist-sdk/src/entities/widget/module.d.ts +3 -0
- package/dist-sdk/src/entities/widget/module.js +16 -0
- package/dist-sdk/src/entities/widget/to-tf.d.ts +45 -0
- package/dist-sdk/src/entities/widget/to-tf.js +206 -0
- package/dist-sdk/src/graph/deferred-catalog-render.d.ts +1 -1
- package/dist-sdk/src/graph/deferred-catalog-render.js +1 -1
- package/dist-sdk/src/graph/index.d.ts +12 -1
- package/dist-sdk/src/graph/index.js +8 -19
- package/dist-sdk/src/graph/modules.js +35 -1
- package/dist-sdk/src/graph/types.d.ts +106 -7
- package/dist-sdk/src/internal/safe-identifier.d.ts +4 -0
- package/dist-sdk/src/internal/safe-identifier.js +13 -0
- package/dist-sdk/src/internal/sdk-package.d.ts +1 -1
- package/dist-sdk/src/internal/sdk-package.js +5 -2
- package/package.json +39 -15
- package/dist-sdk/src/entities/access-policy/filter.d.ts +0 -61
- package/dist-sdk/src/entities/access-policy/filter.js +0 -83
- package/dist-sdk/src/entities/approval-chain/steps.d.ts +0 -24
- package/dist-sdk/src/entities/approval-chain/steps.js +0 -20
- package/dist-sdk/src/entities/flow/activities/agent.d.ts +0 -15
- package/dist-sdk/src/entities/flow/activities/agent.js +0 -29
- package/dist-sdk/src/entities/flow/activities/approval.d.ts +0 -9
- package/dist-sdk/src/entities/flow/activities/approval.js +0 -18
- package/dist-sdk/src/entities/flow/activities/automation.d.ts +0 -12
- package/dist-sdk/src/entities/flow/activities/automation.js +0 -22
- package/dist-sdk/src/entities/flow/activities/ctx.d.ts +0 -34
- package/dist-sdk/src/entities/flow/activities/ctx.js +0 -38
- package/dist-sdk/src/entities/flow/activities/form.d.ts +0 -22
- package/dist-sdk/src/entities/flow/activities/form.js +0 -36
- package/dist-sdk/src/entities/flow/activities/index.d.ts +0 -14
- package/dist-sdk/src/entities/flow/activities/index.js +0 -13
- package/dist-sdk/src/entities/flow/activities/input-refs.d.ts +0 -39
- package/dist-sdk/src/entities/flow/activities/input-refs.js +0 -19
- package/dist-sdk/src/entities/flow/activities/prompt-template.d.ts +0 -13
- package/dist-sdk/src/entities/flow/activities/prompt-template.js +0 -34
- package/dist-sdk/src/entities/flow/activities/types.d.ts +0 -33
- package/dist-sdk/src/entities/flow/build.d.ts +0 -38
- package/dist-sdk/src/entities/flow/build.js +0 -115
- package/dist-sdk/src/entities/flow/index.d.ts +0 -8
- package/dist-sdk/src/entities/flow/index.js +0 -7
- package/dist-sdk/src/entities/flow/serialize.d.ts +0 -51
- package/dist-sdk/src/entities/flow/serialize.js +0 -94
- package/dist-sdk/src/entities/flow/util.d.ts +0 -27
- package/dist-sdk/src/entities/flow/util.js +0 -38
- package/dist-sdk/src/entities/table/filter.d.ts +0 -41
- package/dist-sdk/src/entities/table/filter.js +0 -89
- /package/dist-sdk/src/entities/{flow/activities/types.js → datamine/build.js} +0 -0
|
@@ -1,22 +1,21 @@
|
|
|
1
|
+
export { userRef, type RoleUserRef as AutomationUserRef } from "../role/build.js";
|
|
2
|
+
export { serviceAccountRef, type ServiceAccountRef } from "../service-account/ref.js";
|
|
3
|
+
export { calc, param as calculationParam, calculationParameterType, dateDifUnit, dateDiffUnit, dateTimeTruncPrecision, orderByDirection, predicateOp, weekdayMode, type CalculationBuilder, type CalculationParameterExprType, type CalculationParameterOptions, type CalculationValue, type ConcatExprType, type DateDifUnit, type DateDiffUnit, type DateTimePrecision, type DateTimeTruncPrecision, type ErgonomicOrderByDirection, type ErgonomicPredicate, type JsonValue, type OrderByDirection, type ParameterExprType, type Predicate, type PredicateInput, type PredicateOp, type StringAggOptions, type StringAggOrderBy, type WeekdayConvention, type WeekdayMode } from "./calculation-expression.js";
|
|
1
4
|
export { automationFromTf, type AutomationFromTfResult } from "./from-tf.js";
|
|
2
5
|
export { automationModule } from "./module.js";
|
|
3
|
-
export { AUTOMATION_RESOURCE_TYPES, AUTOMATION_TRIGGER_TYPES, AUTOMATION_TASK_TYPES } from "./types.js";
|
|
4
6
|
export { automationToTf, type AutomationToTfContext, type AutomationToTfResult } from "./to-tf.js";
|
|
7
|
+
export { AUTOMATION_RESOURCE_TYPES, AUTOMATION_TASK_TYPES, AUTOMATION_TRIGGER_TYPES } from "./types.js";
|
|
5
8
|
/**
|
|
6
9
|
* v2 automation authoring — the typed, chainable builder (validation slice).
|
|
7
10
|
*
|
|
8
11
|
* The typed `ctx` engine is reused from `src/core` (`context` + `ref`); only the
|
|
9
|
-
* builder shell, trigger/
|
|
12
|
+
* builder shell, trigger/action factories, and the token-aware serializer are v2.
|
|
10
13
|
* References inside one automation flow through `ctx` (compile-time-safe);
|
|
11
14
|
* cross-entity references are `CatalogRef` tokens resolved at deploy. Standalone
|
|
12
15
|
* from v1's deploy-wired builder.
|
|
13
16
|
*/
|
|
14
|
-
export
|
|
17
|
+
export * as filter from "../shared/filters/index.js";
|
|
18
|
+
export { automationStatus, chainableTrigger, actions, automation, type ActionBuilder, type ActionChain, type ActionDef, type ActionOptions, type ActionSequenceDef, type ActionsStarted, type AutomationConfigured, type AutomationOptions, type AutomationStatus, type ForkJoinBranch, type ForkJoinBranchBuilder, type ForkJoinConfig, type ForEachBuilder, type ForEachConfig, type NestedActionBuilder, type NestedActionChain, type NestedActionContext, type OperatorChild, type SwitchCase, type SwitchCaseBuilder, type SwitchConfig, type TriggerChain, type TriggerDef, type TriggerParamMeta } from "./build.js";
|
|
15
19
|
export { ScriptCodeError, type ScriptCodeFn, type ScriptInput } from "./script-code.js";
|
|
16
|
-
export {
|
|
17
|
-
export { approvalProcessStatusUpdated, attachment, commentAdded, conversationEnd, dataMine, emailReceived, onDemand, recordCreated, recordUpdated, schedule, slackMessage, surveyResponseCreate, temporal, webHook, webhook, type AttachmentTriggerOptions, type AttachmentTriggerOutput, type
|
|
18
|
-
export { aiAgent, aiClassify, aiEmailAnalysis, aiFileAnalysis, aiSearchTable, aiSummarize, aiTransform, apiRequest, createRecord, executeScript, findRelatedRecords, postComment, recordSearch, relateRecords, sendEmail, setVariable, tableRecordsSearch, updateField, type AiAgentOptions, type AiAgentOutput, type AiAgentOutputField, type AiAgentOutputFieldType, type AiClassifyCategorySource, type AiClassifyOptions, type AiClassifyStaticCategory, type AiEmailAnalysisOptions, type AiFileAnalysisOptions, type AiSearchTableOptions, type AiSummarizeOptions, type AiTransformOptions, type ApiRequestHeader, type ApiRequestOptions, type CreateRecordOptions, type CreateRecordOutput, type EmailAttachment, type ExecuteScriptOptions, type FieldAssignment, type FindRelatedRecordsOptions, type PostCommentOptions, type RecordSearchOptions, type RecordSearchOutput, type RelateRecordsOptions, type SendEmailOptions, type SetVariableOptions, type TableRecordsSearchOptions, type TableRecordsSearchOutput, type UpdateFieldOptions, type VariableAssign, type VariableDecl, } from "./tasks.js";
|
|
19
|
-
export { addWatcher, approvalStatusUpdate, assignGroup, assignUser, assignmentEngine, calculation, filterTask, generateReport, initiateCall, notification, postTeamsMessage, procedure, recordFieldLocking, saveAttachment, unzip, userGroupSearch, userSearch, type AddWatcherOptions, type ApprovalStatusUpdateOptions, type AssignGroupOptions, type AssignUserOptions, type AssignmentEngineOptions, type CalculationEntry, type CalculationOptions, type FilterTaskOptions, type GenerateReportOptions, type InitiateCallOptions, type NotificationOptions, type PostTeamsMessageOptions, type ProcedureOptions, type RecordFieldLockingOptions, type SaveAttachmentOptions, type UnzipOptions, type UserSearchOptions, } from "./tasks.js";
|
|
20
|
-
export { approvalChainTemplate, approvalChain, bulkExcel, readFile, initiateEmailConversation, runAutomation, sendSurvey, type ApprovalChainOptions, type ApprovalChainTemplateOptions, type BulkExcelFieldMapping, type BulkExcelFieldSource, type BulkExcelOptions, type ReadFileDataSource, type ReadFileOptions, type InitiateEmailConversationOptions, type InitiateEmailFirstEmail, type RunAutomationInput, type RunAutomationOptions, type SendSurveyOptions, } from "./tasks.js";
|
|
21
|
-
export * as filter from "./filter.js";
|
|
22
|
-
export { type Filter } from "./filter.js";
|
|
20
|
+
export { addWatcher, aiAgent, aiClassify, aiEmailAnalysis, aiFileAnalysis, aiSearchTable, aiSummarize, aiTransform, apiRequest, approvalChain, approvalChainTemplate, approvalStatusUpdate, assignGroup, assignUser, assignmentEngine, bulkExcel, calculation, createRecord, executeScript, filterAction, findRelatedRecords, generateReport, initiateCall, initiateEmailConversation, notification, postComment, postTeamsMessage, procedure, readFile, recordFieldLocking, recordSearch, relateRecords, runAutomation, saveAttachment, sendEmail, sendSurvey, setVariable, tableRecordsSearch, unzip, updateField, userGroupSearch, userSearch, type AddWatcherOptions, type AiAgentOptions, type AiAgentOutput, type AiAgentOutputField, type AiAgentOutputFieldType, type AiClassifyCategorySource, type AiClassifyOptions, type AiClassifyStaticCategory, type AiEmailAnalysisOptions, type AiFileAnalysisOptions, type AiSearchTableOptions, type AiSearchTableOutput, type AiSummarizeOptions, type AiTransformOptions, type ApiRequestHeader, type ApiRequestOptions, type ApprovalChainOptions, type ApprovalChainTemplateOptions, type ApprovalStatusUpdateOptions, type AssignGroupOptions, type AssignUserOptions, type AssignmentEngineOptions, type BulkExcelFieldMapping, type BulkExcelFieldSource, type BulkExcelOptions, type CalculationEntry, type CalculationExpression, type CalculationInclude, type CalculationOptions, type CalculationOutputs, type CalculationValueInput, type CalculationValueOptions, type CalculationValueOutputs, type CalculationValues, type CreateRecordOptions, type CreateRecordOutput, type EmailAttachment, type ExecuteScriptOptions, type FieldAssignment, type FilterActionOptions, type FindRelatedRecordsOptions, type GenerateReportOptions, type InitiateCallOptions, type InitiateEmailConversationOptions, type InitiateEmailFirstEmail, type LegacyCalculationOptions, type NotificationOptions, type PostCommentOptions, type PostTeamsMessageOptions, type ProcedureOptions, type ReadFileDataSource, type ReadFileOptions, type RecordFieldLockingOptions, type RecordId, type RecordReference, type RecordSearchOptions, type RecordSearchOutput, type RelateRecordsOptions, type RunAutomationInput, type RunAutomationOptions, type SaveAttachmentOptions, type SendEmailOptions, type SendSurveyOptions, type SetVariableOptions, type TableRecordsSearchOptions, type TableRecordsSearchOutput, type UnzipOptions, type UpdateFieldOptions, type UserSearchOptions, type VariableAssign, type VariableDecl } from "./tasks.js";
|
|
21
|
+
export { approvalProcessStatusUpdated, attachment, commentAdded, conversationEnd, dataMine, emailReceived, onDemand, recordCreated, recordUpdated, schedule, slackMessage, surveyResponseCreate, temporal, webHook, webhook, type AttachmentTriggerOptions, type AttachmentTriggerOutput, type CommentAddedTriggerOptions, type CommentAddedTriggerOutput, type ConversationEndConversationType, type ConversationEndTriggerOptions, type ConversationEndTriggerOutput, type DataMineTriggerOptions, type EmailReceivedTriggerOptions, type EmailReceivedTriggerOutput, type RecordTriggerOptions, type RecordTriggerOutput, type ScheduleFrequency, type ScheduleTriggerOptions, type ScheduleTriggerOutput, type SlackMessageTriggerOutput, type SurveyResponseCreateTriggerOptions, type SurveyResponseCreateTriggerOutput, type TemporalTriggerOptions, type TemporalUnit, type WebhookTriggerOptions, type WebhookTriggerOutput, type Weekday, type approvalProcessStatusUpdatedStatus, type approvalProcessStatusUpdatedTriggerOptions } from "./triggers.js";
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
+
export { userRef } from "../role/build.js";
|
|
2
|
+
export { serviceAccountRef } from "../service-account/ref.js";
|
|
3
|
+
export { calc, param as calculationParam, calculationParameterType, dateDifUnit, dateDiffUnit, dateTimeTruncPrecision, orderByDirection, predicateOp, weekdayMode } from "./calculation-expression.js";
|
|
1
4
|
export { automationFromTf } from "./from-tf.js";
|
|
2
5
|
export { automationModule } from "./module.js";
|
|
3
|
-
export { AUTOMATION_RESOURCE_TYPES, AUTOMATION_TRIGGER_TYPES, AUTOMATION_TASK_TYPES } from "./types.js";
|
|
4
6
|
export { automationToTf } from "./to-tf.js";
|
|
7
|
+
export { AUTOMATION_RESOURCE_TYPES, AUTOMATION_TASK_TYPES, AUTOMATION_TRIGGER_TYPES } from "./types.js";
|
|
5
8
|
/**
|
|
6
9
|
* v2 automation authoring — the typed, chainable builder (validation slice).
|
|
7
10
|
*
|
|
8
11
|
* The typed `ctx` engine is reused from `src/core` (`context` + `ref`); only the
|
|
9
|
-
* builder shell, trigger/
|
|
12
|
+
* builder shell, trigger/action factories, and the token-aware serializer are v2.
|
|
10
13
|
* References inside one automation flow through `ctx` (compile-time-safe);
|
|
11
14
|
* cross-entity references are `CatalogRef` tokens resolved at deploy. Standalone
|
|
12
15
|
* from v1's deploy-wired builder.
|
|
13
16
|
*/
|
|
14
|
-
export
|
|
17
|
+
export * as filter from "../shared/filters/index.js";
|
|
18
|
+
export { automationStatus, chainableTrigger, actions, automation } from "./build.js";
|
|
15
19
|
export { ScriptCodeError } from "./script-code.js";
|
|
16
|
-
export {
|
|
17
|
-
export { approvalProcessStatusUpdated, attachment, commentAdded, conversationEnd, dataMine, emailReceived, onDemand, recordCreated, recordUpdated, schedule, slackMessage, surveyResponseCreate, temporal, webHook, webhook
|
|
18
|
-
|
|
19
|
-
export { addWatcher, approvalStatusUpdate, assignGroup, assignUser, assignmentEngine, calculation, filterTask, generateReport, initiateCall, notification, postTeamsMessage, procedure, recordFieldLocking, saveAttachment, unzip, userGroupSearch, userSearch, } from "./tasks.js";
|
|
20
|
-
export { approvalChainTemplate, approvalChain, bulkExcel, readFile, initiateEmailConversation, runAutomation, sendSurvey, } from "./tasks.js";
|
|
21
|
-
export * as filter from "./filter.js";
|
|
22
|
-
// Pull a deployed automation back as editable v2 source. `defineAutomation`
|
|
20
|
+
export { addWatcher, aiAgent, aiClassify, aiEmailAnalysis, aiFileAnalysis, aiSearchTable, aiSummarize, aiTransform, apiRequest, approvalChain, approvalChainTemplate, approvalStatusUpdate, assignGroup, assignUser, assignmentEngine, bulkExcel, calculation, createRecord, executeScript, filterAction, findRelatedRecords, generateReport, initiateCall, initiateEmailConversation, notification, postComment, postTeamsMessage, procedure, readFile, recordFieldLocking, recordSearch, relateRecords, runAutomation, saveAttachment, sendEmail, sendSurvey, setVariable, tableRecordsSearch, unzip, updateField, userGroupSearch, userSearch } from "./tasks.js";
|
|
21
|
+
export { approvalProcessStatusUpdated, attachment, commentAdded, conversationEnd, dataMine, emailReceived, onDemand, recordCreated, recordUpdated, schedule, slackMessage, surveyResponseCreate, temporal, webHook, webhook } from "./triggers.js";
|
|
22
|
+
// Pull a deployed automation back as editable v2 source. `automation`
|
|
23
23
|
// is a plain factory returning a builder-chain object (not an Object.assign-able
|
|
24
24
|
// callable), so `fromJSON` ships as a standalone named export rather than a
|
|
25
|
-
// `
|
|
25
|
+
// `automation.fromJSON` attachment.
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/** The automation entity's registry entry (see src/graph/). */
|
|
2
|
-
import { sanitizeName, tfLabelToTsLabel } from "../../engine/tf/index.js";
|
|
3
|
-
import { NO_DATA, } from "../../graph/types.js";
|
|
2
|
+
import { sanitizeName, tfLabelToTsLabel, isTfExpr } from "../../engine/tf/index.js";
|
|
4
3
|
import { renderAutomationCatalogEntry } from "./catalog-render.js";
|
|
5
4
|
import { printAutomationV2 } from "./deserializer/print-automation.js";
|
|
6
5
|
import { automationFromTf, automationOwnedAddresses } from "./from-tf.js";
|
|
@@ -59,15 +58,65 @@ function automationRefFromAuthoring(args) {
|
|
|
59
58
|
...(outputs !== undefined ? { outputs } : {}),
|
|
60
59
|
};
|
|
61
60
|
}
|
|
61
|
+
/**
|
|
62
|
+
* Scan an automation's owned task blocks for foreign `object_id =
|
|
63
|
+
* data.elementum_app|element.<label>.id` targets and register their display
|
|
64
|
+
* names on `ctx.unresolvedForeignRefs` when they aren't already in this
|
|
65
|
+
* workspace's name maps.
|
|
66
|
+
*
|
|
67
|
+
* Must run *before* `automationFromTf`: a createRecord/updateField whose
|
|
68
|
+
* fields are bare UUIDs of a foreign aspect (ei apps export
|
|
69
|
+
* `--recursive=false` never includes that aspect's field resources) throws
|
|
70
|
+
* and never lands in `ownFileByKind`, so `collectForeignReferences` can't
|
|
71
|
+
* see the dependency. Without this pre-scan, `pull app --with-dependencies`
|
|
72
|
+
* never chases the foreign aspect and the automation stays permanently
|
|
73
|
+
* unextractable. Same feed as relation-field `resolveRelatedObject`.
|
|
74
|
+
*/
|
|
75
|
+
function registerForeignObjectIdDeps(doc, automationLabel, ctx) {
|
|
76
|
+
const unresolved = ctx.unresolvedForeignRefs;
|
|
77
|
+
if (unresolved === undefined)
|
|
78
|
+
return;
|
|
79
|
+
const owned = new Set(automationOwnedAddresses(doc, automationLabel));
|
|
80
|
+
for (const block of doc.blocks) {
|
|
81
|
+
if (block.kind !== "resource" || block.type === undefined || block.label === undefined)
|
|
82
|
+
continue;
|
|
83
|
+
if (!owned.has(`${block.type}.${block.label}`))
|
|
84
|
+
continue;
|
|
85
|
+
const objectId = block.attrs["object_id"];
|
|
86
|
+
if (!isTfExpr(objectId) || objectId.$expr !== "data-attr")
|
|
87
|
+
continue;
|
|
88
|
+
if (objectId.type === "elementum_app") {
|
|
89
|
+
const name = ctx.dataName("elementum_app", objectId.label);
|
|
90
|
+
if (name === undefined || ctx.foreignAppRefNames?.has(name))
|
|
91
|
+
continue;
|
|
92
|
+
unresolved.apps.add(name);
|
|
93
|
+
}
|
|
94
|
+
else if (objectId.type === "elementum_element") {
|
|
95
|
+
const name = ctx.dataName("elementum_element", objectId.label);
|
|
96
|
+
if (name === undefined || ctx.foreignElementRefNames?.has(name))
|
|
97
|
+
continue;
|
|
98
|
+
unresolved.elements.add(name);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
62
102
|
function extractAutomations(ownBlocks, stream, ctx) {
|
|
63
103
|
const items = [];
|
|
64
104
|
const skipped = [];
|
|
65
105
|
const diagnostics = [];
|
|
66
106
|
for (const autoBlock of ownBlocks) {
|
|
67
107
|
const autoLabel = autoBlock.label ?? "";
|
|
108
|
+
const doc = { blocks: [...stream.allBlocks] };
|
|
109
|
+
// Always — including when extract succeeds — so a partial decode that
|
|
110
|
+
// somehow omits the app RefExpr still feeds --with-dependencies. Cheap
|
|
111
|
+
// (one owned-address walk) relative to from-tf.
|
|
112
|
+
registerForeignObjectIdDeps(doc, autoLabel, ctx);
|
|
68
113
|
try {
|
|
69
|
-
const extracted = automationFromTf(
|
|
70
|
-
|
|
114
|
+
const extracted = automationFromTf(doc, autoLabel, ctx.appRefName, ctx.foreignFieldRefsById, ctx.foreignFieldRefsByDataAddress, ctx.foreignTableRefsById, ctx.picklistOptionLabelById, ctx.fieldNamesByOwnerRefName, ctx.foreignAppRefNames, ctx.foreignElementRefNames);
|
|
115
|
+
// Keep automationFromTf's label-derived refName — agent/skill tools store
|
|
116
|
+
// the same scopedLabelToBagKey as automationKey. Pushing bare AST (name
|
|
117
|
+
// only) made missing-automation diagnostics false-positive on every real
|
|
118
|
+
// extract (issue #395 / PR #417 review).
|
|
119
|
+
items.push({ ...extracted.ast, refName: extracted.refName });
|
|
71
120
|
}
|
|
72
121
|
catch (err) {
|
|
73
122
|
// Report the automation's FULL graph (trigger/tasks/branches/publish),
|
|
@@ -75,8 +124,8 @@ function extractAutomations(ownBlocks, stream, ctx) {
|
|
|
75
124
|
// resource TYPES get imported into state anyway, and build (which
|
|
76
125
|
// never wrote this automation to source) can't reproduce them, so
|
|
77
126
|
// `plan` shows them as destroy-on-apply. See automationOwnedAddresses.
|
|
78
|
-
skipped.push(...automationOwnedAddresses(
|
|
79
|
-
diagnostics.push(err instanceof Error ? err.message : String(err));
|
|
127
|
+
skipped.push(...automationOwnedAddresses(doc, autoLabel));
|
|
128
|
+
diagnostics.push(`${autoLabel}: ${err instanceof Error ? err.message : String(err)}`);
|
|
80
129
|
}
|
|
81
130
|
}
|
|
82
131
|
return { items, skipped, diagnostics };
|
|
@@ -102,7 +151,16 @@ export const automationModule = {
|
|
|
102
151
|
})),
|
|
103
152
|
],
|
|
104
153
|
},
|
|
105
|
-
data:
|
|
154
|
+
data: {
|
|
155
|
+
participates: true,
|
|
156
|
+
resourceType: AUTOMATION_RESOURCE_TYPE,
|
|
157
|
+
lookupAttr: "name",
|
|
158
|
+
referencedByBuild: false,
|
|
159
|
+
referenceLookups: [
|
|
160
|
+
{ strategy: "owned", ownerKinds: ["app", "element"], memberAttr: "name" },
|
|
161
|
+
{ strategy: "nameOnlyMetadata", ownerKind: "automation" },
|
|
162
|
+
],
|
|
163
|
+
},
|
|
106
164
|
canvas: {
|
|
107
165
|
participates: true,
|
|
108
166
|
label: "Automations",
|
|
@@ -118,23 +176,39 @@ export const automationModule = {
|
|
|
118
176
|
extractOwnFile: extractAutomations,
|
|
119
177
|
printOwnFile: (item, opts) => {
|
|
120
178
|
const automation = item;
|
|
121
|
-
|
|
179
|
+
// Prefer the extract-time bag key (matches tool automationKey). Fall
|
|
180
|
+
// back to the printer formula for any path that still has bare AST.
|
|
181
|
+
const refName = typeof automation.refName === "string" && automation.refName !== ""
|
|
182
|
+
? automation.refName
|
|
183
|
+
: tfLabelToTsLabel(sanitizeName(automation.name));
|
|
122
184
|
return {
|
|
123
185
|
refName,
|
|
124
186
|
source: printAutomationV2(automation, {
|
|
125
187
|
refName,
|
|
126
188
|
appRefName: opts.appRefName,
|
|
127
189
|
...(opts.foreignAppRefNames !== undefined && { foreignAppRefNames: opts.foreignAppRefNames }),
|
|
190
|
+
...(opts.foreignElementRefNames !== undefined && { foreignElementRefNames: opts.foreignElementRefNames }),
|
|
191
|
+
...(opts.unresolvedReferences !== undefined && { unresolvedReferences: opts.unresolvedReferences }),
|
|
128
192
|
}),
|
|
129
193
|
};
|
|
130
194
|
},
|
|
131
195
|
toTf: (entity, ctx) => automationToTf(entity, {
|
|
132
196
|
appRefName: ctx.appRefName,
|
|
133
197
|
appTfLabel: ctx.appTfLabel,
|
|
198
|
+
parentScope: ctx.parentScope === "element" ? "element" : "app",
|
|
199
|
+
diagnostics: ctx.diagnostics,
|
|
134
200
|
fieldAddresses: ctx.fieldAddresses ?? new Map(),
|
|
135
201
|
fieldNames: ctx.fieldNames ?? new Map(),
|
|
136
202
|
fieldMetadata: ctx.fieldMetadata ?? new Map(),
|
|
203
|
+
...(ctx.fieldNamesByAppRefName !== undefined ? { fieldNamesByAppRefName: ctx.fieldNamesByAppRefName } : {}),
|
|
137
204
|
orgRefs: ctx.orgRefs,
|
|
205
|
+
workspaceAspects: ctx.workspaceAspects,
|
|
206
|
+
localsAttrs: ctx.localsAttrs,
|
|
207
|
+
serviceAccounts: ctx.streamRootEntity?.payload?.serviceAccounts,
|
|
208
|
+
activeAutomationRefNames: new Set((ctx.siblingEntities ?? [])
|
|
209
|
+
.filter((sibling) => sibling.kind === "automation" &&
|
|
210
|
+
sibling.payload?.status === "ACTIVE")
|
|
211
|
+
.map((sibling) => sibling.refName)),
|
|
138
212
|
}),
|
|
139
213
|
},
|
|
140
214
|
catalog: {
|
|
@@ -1,47 +1,31 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* carry
|
|
4
|
-
*
|
|
5
|
-
* inner context) is reused from `core/context` — same as v1.
|
|
2
|
+
* Automation operators — `forEach` / `switch` / `forkJoin`. Unlike leaf actions,
|
|
3
|
+
* these carry nested child-action lists (`operatorChildren`), which serialize to
|
|
4
|
+
* the platform wire task's `children` property.
|
|
6
5
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
6
|
+
* This module is the internal wire adapter. Public authoring uses fluent
|
|
7
|
+
* operator-body builders from `build.ts`; those builders materialize the
|
|
8
|
+
* `{ name, def }` entries consumed here.
|
|
10
9
|
*/
|
|
11
10
|
import type { Context, ForEachItem } from "../shared/context.js";
|
|
12
11
|
import type { Ref } from "../shared/ref.js";
|
|
13
|
-
import { type
|
|
12
|
+
import { type ActionDef, type NestedActionEntry } from "./build.js";
|
|
14
13
|
import type { Filter } from "./filter.js";
|
|
15
14
|
type Empty = Record<string, never>;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
* whose slugged refKey is "For_Each"); omit it otherwise.
|
|
22
|
-
*
|
|
23
|
-
* For a nested `executeScript` (`childTask(name, executeScript({...}))`),
|
|
24
|
-
* `def.config.code` was already resolved by the time this runs — the
|
|
25
|
-
* low-level `executeScript()` factory has no way to know its own task name
|
|
26
|
-
* (only the enclosing `childTask()` call does), so it can't consult
|
|
27
|
-
* `tryExtractFromCurrentSource` itself. Here — where `name` finally IS known
|
|
28
|
-
* — swap in the byte-exact body from the tracked automation source when one
|
|
29
|
-
* is found, overriding whatever `extractScriptBody`'s `toString()` fallback
|
|
30
|
-
* already computed. See `script-code.ts` for why that fallback can reformat
|
|
31
|
-
* a pulled script's exact text.
|
|
32
|
-
*/
|
|
33
|
-
export declare function childTask(name: string, def: TaskDef<unknown>, displayName?: string): ChildTask;
|
|
34
|
-
export interface ForEachConfig<TTrigger, TTasks extends Record<string, unknown>, TItem> {
|
|
35
|
-
/** The collection to iterate (e.g. `ctx.tasks.find.records`). */
|
|
15
|
+
type NoVariables = {
|
|
16
|
+
[K in never]: never;
|
|
17
|
+
};
|
|
18
|
+
export interface ForEachConfig<TTrigger, TActions extends Record<string, unknown>, TItem, TVars extends Record<string, unknown> = NoVariables> {
|
|
19
|
+
/** The collection to iterate (e.g. `ctx.actions.find.records`). */
|
|
36
20
|
readonly collection: Ref<readonly TItem[]>;
|
|
37
21
|
/**
|
|
38
|
-
*
|
|
39
|
-
* field drilling
|
|
22
|
+
* Internal nested wire entries executed per item. `item` is a ref to the whole
|
|
23
|
+
* item with typed field drilling; `innerCtx` exposes trigger + outer actions.
|
|
40
24
|
*/
|
|
41
|
-
readonly
|
|
25
|
+
readonly actions: (item: ForEachItem<NoInfer<TItem>>, innerCtx: Context<TTrigger, TActions, TVars>) => readonly NestedActionEntry[];
|
|
42
26
|
}
|
|
43
|
-
export declare function forEach<TTrigger,
|
|
44
|
-
export interface SwitchCase<TTrigger,
|
|
27
|
+
export declare function forEach<TTrigger, TActions extends Record<string, unknown>, TItem, TVars extends Record<string, unknown> = NoVariables>(_ctx: Context<TTrigger, TActions, TVars>, config: ForEachConfig<TTrigger, TActions, TItem, TVars>): ActionDef<Empty>;
|
|
28
|
+
export interface SwitchCase<TTrigger, TActions extends Record<string, unknown>, TVars extends Record<string, unknown> = NoVariables> {
|
|
45
29
|
readonly label: string;
|
|
46
30
|
/**
|
|
47
31
|
* Condition for this case, built with the `filter.*` DSL
|
|
@@ -50,25 +34,25 @@ export interface SwitchCase<TTrigger, TTasks extends Record<string, unknown>> {
|
|
|
50
34
|
* no earlier case matches.
|
|
51
35
|
*
|
|
52
36
|
* Switch conditions have no row in scope, so every `filter.*` comparison
|
|
53
|
-
* (`eq`/`gt`/`like`/`isNull`/`between`/…) accepts
|
|
54
|
-
* place of a field — e.g. `filter.lt(ctx.
|
|
37
|
+
* (`eq`/`gt`/`like`/`isNull`/`between`/…) accepts an action/trigger `Ref` in
|
|
38
|
+
* place of a field — e.g. `filter.lt(ctx.actions.search.totalCount, 1)` —
|
|
55
39
|
* in addition to the usual `FieldRef` token.
|
|
56
40
|
*/
|
|
57
41
|
readonly condition?: Filter;
|
|
58
|
-
readonly
|
|
42
|
+
readonly actions: (innerCtx: Context<TTrigger, TActions, TVars>) => readonly NestedActionEntry[];
|
|
59
43
|
}
|
|
60
|
-
export interface SwitchConfig<TTrigger,
|
|
44
|
+
export interface SwitchConfig<TTrigger, TActions extends Record<string, unknown>, TVars extends Record<string, unknown> = NoVariables> {
|
|
61
45
|
/** Ordered cases — first match wins. */
|
|
62
|
-
readonly cases: readonly SwitchCase<TTrigger,
|
|
46
|
+
readonly cases: readonly SwitchCase<TTrigger, TActions, TVars>[];
|
|
63
47
|
/**
|
|
64
|
-
*
|
|
48
|
+
* Actions when no case matches (the default/else branch). Plain function form
|
|
65
49
|
* matches the platform's usual "Default" display label; pass `{ label,
|
|
66
|
-
*
|
|
50
|
+
* actions }` to preserve a manually renamed default branch (e.g. "Default
|
|
67
51
|
* Path") through a pull/build round trip.
|
|
68
52
|
*/
|
|
69
|
-
readonly
|
|
53
|
+
readonly defaultActions?: ((innerCtx: Context<TTrigger, TActions, TVars>) => readonly NestedActionEntry[]) | {
|
|
70
54
|
readonly label?: string;
|
|
71
|
-
readonly
|
|
55
|
+
readonly actions: (innerCtx: Context<TTrigger, TActions, TVars>) => readonly NestedActionEntry[];
|
|
72
56
|
/**
|
|
73
57
|
* Internal round-trip detail, set only by `edk pull`: which wire
|
|
74
58
|
* shape the platform is currently using to mark this branch as the
|
|
@@ -80,14 +64,14 @@ export interface SwitchConfig<TTrigger, TTasks extends Record<string, unknown>>
|
|
|
80
64
|
readonly defaultFilterMode?: "isDefault" | "explicitTrueFilter";
|
|
81
65
|
};
|
|
82
66
|
}
|
|
83
|
-
export declare function
|
|
84
|
-
export interface ForkJoinBranch<TTrigger,
|
|
67
|
+
export declare function switchAction<TTrigger, TActions extends Record<string, unknown>, TVars extends Record<string, unknown> = NoVariables>(_ctx: Context<TTrigger, TActions, TVars>, config: SwitchConfig<TTrigger, TActions, TVars>): ActionDef<Empty>;
|
|
68
|
+
export interface ForkJoinBranch<TTrigger, TActions extends Record<string, unknown>, TVars extends Record<string, unknown> = NoVariables> {
|
|
85
69
|
readonly label: string;
|
|
86
|
-
readonly
|
|
70
|
+
readonly actions: (innerCtx: Context<TTrigger, TActions, TVars>) => readonly NestedActionEntry[];
|
|
87
71
|
}
|
|
88
|
-
export interface ForkJoinConfig<TTrigger,
|
|
72
|
+
export interface ForkJoinConfig<TTrigger, TActions extends Record<string, unknown>, TVars extends Record<string, unknown> = NoVariables> {
|
|
89
73
|
/** Parallel branches, each executed concurrently. */
|
|
90
|
-
readonly branches: readonly ForkJoinBranch<TTrigger,
|
|
74
|
+
readonly branches: readonly ForkJoinBranch<TTrigger, TActions, TVars>[];
|
|
91
75
|
}
|
|
92
|
-
export declare function forkJoin<TTrigger,
|
|
76
|
+
export declare function forkJoin<TTrigger, TActions extends Record<string, unknown>, TVars extends Record<string, unknown> = NoVariables>(_ctx: Context<TTrigger, TActions, TVars>, config: ForkJoinConfig<TTrigger, TActions, TVars>): ActionDef<Empty>;
|
|
93
77
|
export {};
|
|
@@ -1,60 +1,33 @@
|
|
|
1
1
|
import { buildContext, createForEachItemProxy } from "../shared/context.js";
|
|
2
2
|
import { FOR_EACH_PLACEHOLDER } from "./build.js";
|
|
3
|
-
import { tryExtractFromCurrentSource } from "./script-code.js";
|
|
4
|
-
/**
|
|
5
|
-
* Convenience: name a child task. Equivalent to `{ name, def }`.
|
|
6
|
-
*
|
|
7
|
-
* `displayName` is only needed when adopting a platform-authored task whose
|
|
8
|
-
* wire `name` differs from its `refKey` (e.g. a UI-built "For Each" task,
|
|
9
|
-
* whose slugged refKey is "For_Each"); omit it otherwise.
|
|
10
|
-
*
|
|
11
|
-
* For a nested `executeScript` (`childTask(name, executeScript({...}))`),
|
|
12
|
-
* `def.config.code` was already resolved by the time this runs — the
|
|
13
|
-
* low-level `executeScript()` factory has no way to know its own task name
|
|
14
|
-
* (only the enclosing `childTask()` call does), so it can't consult
|
|
15
|
-
* `tryExtractFromCurrentSource` itself. Here — where `name` finally IS known
|
|
16
|
-
* — swap in the byte-exact body from the tracked automation source when one
|
|
17
|
-
* is found, overriding whatever `extractScriptBody`'s `toString()` fallback
|
|
18
|
-
* already computed. See `script-code.ts` for why that fallback can reformat
|
|
19
|
-
* a pulled script's exact text.
|
|
20
|
-
*/
|
|
21
|
-
export function childTask(name, def, displayName) {
|
|
22
|
-
if (def.key === "executeScript") {
|
|
23
|
-
const body = tryExtractFromCurrentSource(name);
|
|
24
|
-
if (body !== undefined && body !== def.config["code"]) {
|
|
25
|
-
return { name, def: { ...def, config: { ...def.config, code: body } }, displayName };
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
return { name, def, displayName };
|
|
29
|
-
}
|
|
30
3
|
export function forEach(_ctx, config) {
|
|
31
4
|
const item = createForEachItemProxy(FOR_EACH_PLACEHOLDER);
|
|
32
5
|
const innerCtx = buildContext([]);
|
|
33
6
|
return {
|
|
34
7
|
key: "forEach",
|
|
35
8
|
config: { forEach: config.collection },
|
|
36
|
-
operatorChildren: [{ label: null, tasks: config.
|
|
9
|
+
operatorChildren: [{ label: null, tasks: config.actions(item, innerCtx) }],
|
|
37
10
|
};
|
|
38
11
|
}
|
|
39
|
-
export function
|
|
12
|
+
export function switchAction(_ctx, config) {
|
|
40
13
|
if (config.cases.length === 0)
|
|
41
14
|
throw new Error("switch requires at least one case");
|
|
42
15
|
const innerCtx = buildContext([]);
|
|
43
16
|
const operatorChildren = config.cases.map((c) => ({
|
|
44
17
|
label: c.label,
|
|
45
18
|
...(c.condition !== undefined ? { filter: c.condition } : {}),
|
|
46
|
-
tasks: c.
|
|
19
|
+
tasks: c.actions(innerCtx),
|
|
47
20
|
}));
|
|
48
|
-
if (config.
|
|
49
|
-
const isPlainFn = typeof config.
|
|
50
|
-
const
|
|
51
|
-
const defaultLabel = isPlainFn ? undefined : config.
|
|
52
|
-
const defaultFilterMode = isPlainFn ? undefined : config.
|
|
21
|
+
if (config.defaultActions) {
|
|
22
|
+
const isPlainFn = typeof config.defaultActions === "function";
|
|
23
|
+
const actionsFn = isPlainFn ? config.defaultActions : config.defaultActions.actions;
|
|
24
|
+
const defaultLabel = isPlainFn ? undefined : config.defaultActions.label;
|
|
25
|
+
const defaultFilterMode = isPlainFn ? undefined : config.defaultActions.defaultFilterMode;
|
|
53
26
|
operatorChildren.push({
|
|
54
27
|
label: null,
|
|
55
28
|
...(defaultLabel !== undefined ? { defaultLabel } : {}),
|
|
56
29
|
...(defaultFilterMode !== undefined ? { defaultFilterMode } : {}),
|
|
57
|
-
tasks:
|
|
30
|
+
tasks: actionsFn(innerCtx),
|
|
58
31
|
});
|
|
59
32
|
}
|
|
60
33
|
return { key: "switch", config: {}, operatorChildren };
|
|
@@ -64,6 +37,6 @@ export function forkJoin(_ctx, config) {
|
|
|
64
37
|
return {
|
|
65
38
|
key: "forkJoin",
|
|
66
39
|
config: {},
|
|
67
|
-
operatorChildren: config.branches.map((b) => ({ label: b.label, tasks: b.
|
|
40
|
+
operatorChildren: config.branches.map((b) => ({ label: b.label, tasks: b.actions(innerCtx) })),
|
|
68
41
|
};
|
|
69
42
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Single-scalar-output task kinds whose EDK factory exposes the result as
|
|
3
|
-
* `output` (`
|
|
3
|
+
* `output` (`ActionDef<{ output: unknown }>`), but whose platform wire name
|
|
4
4
|
* differs. aiSummarize/aiTransform were "confirmed against real pulled wire
|
|
5
5
|
* data" per the original note, naming their output `response`; documentModel
|
|
6
6
|
* (rawText data source) names it `text`. aiClassify's `Response` is confirmed
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Single-scalar-output task kinds whose EDK factory exposes the result as
|
|
3
|
-
* `output` (`
|
|
3
|
+
* `output` (`ActionDef<{ output: unknown }>`), but whose platform wire name
|
|
4
4
|
* differs. aiSummarize/aiTransform were "confirmed against real pulled wire
|
|
5
5
|
* data" per the original note, naming their output `response`; documentModel
|
|
6
6
|
* (rawText data source) names it `text`. aiClassify's `Response` is confirmed
|
|
@@ -31,12 +31,12 @@
|
|
|
31
31
|
* file's jiti import with that file's own untranspiled text (engine-side,
|
|
32
32
|
* entity-agnostic — `source-context.ts`), and `tryExtractFromCurrentSource`
|
|
33
33
|
* here locates the matching `.executeScript("name", { code: (input) => {...}
|
|
34
|
-
* })`
|
|
34
|
+
* })` call at any fluent-chain depth by a
|
|
35
35
|
* lightweight source scan — the same string/comment-aware tokenizing already
|
|
36
36
|
* used by {@link inferOutputSchema} — and slices the body's ORIGINAL text directly out
|
|
37
37
|
* of the file, never touching the transpiled function. `extractScriptBody`
|
|
38
38
|
* (the `toString()` path) remains the fallback for contexts with no tracked
|
|
39
|
-
* source (tests constructing automations directly
|
|
39
|
+
* source (tests constructing automations directly).
|
|
40
40
|
*/
|
|
41
41
|
import { currentSourceText } from "../../engine/build/source-context.js";
|
|
42
42
|
/** Globals a script body may legitimately reference on the platform runtime. */
|
|
@@ -344,12 +344,7 @@ function dedent(body) {
|
|
|
344
344
|
* params, keywords, or known script globals.
|
|
345
345
|
*/
|
|
346
346
|
export function freeIdentifiers(body, params) {
|
|
347
|
-
const stripped = body
|
|
348
|
-
.replace(/\/\*[\s\S]*?\*\//g, " ")
|
|
349
|
-
.replace(/\/\/[^\n]*/g, " ")
|
|
350
|
-
.replace(/`(?:\\.|\$\{[^}]*\}|[^`\\])*`/g, '""') // templates: keep ${} contents out (best effort)
|
|
351
|
-
.replace(/'(?:\\.|[^'\\])*'/g, '""')
|
|
352
|
-
.replace(/"(?:\\.|[^"\\])*"/g, '""');
|
|
347
|
+
const stripped = maskNonCodeForIdentifierScan(body);
|
|
353
348
|
const declared = new Set(params);
|
|
354
349
|
// const/let/var declarations, incl. destructuring lists; function/class names.
|
|
355
350
|
for (const m of stripped.matchAll(/\b(?:const|let|var)\s+([^=;]+)/g)) {
|
|
@@ -384,6 +379,99 @@ export function freeIdentifiers(body, params) {
|
|
|
384
379
|
}
|
|
385
380
|
return [...unknown].sort();
|
|
386
381
|
}
|
|
382
|
+
/**
|
|
383
|
+
* Replace comments, strings, template literals, and regex literals with
|
|
384
|
+
* spaces while preserving line breaks and character offsets. A regex-only
|
|
385
|
+
* implementation cannot distinguish `//` in `"https://..."` from a line
|
|
386
|
+
* comment, or `/foo/g` from division; both caused valid pulled scripts to be
|
|
387
|
+
* rejected as closure captures. This small lexer is intentionally scoped to
|
|
388
|
+
* the free-identifier scan rather than trying to parse JavaScript.
|
|
389
|
+
*/
|
|
390
|
+
function maskNonCodeForIdentifierScan(source) {
|
|
391
|
+
// The scanner uses UTF-16 code-unit offsets (`source[i]`, `source.length`).
|
|
392
|
+
// `split("")` preserves that same indexing; spreading would collapse an
|
|
393
|
+
// astral surrogate pair into one array entry and shift every later mask.
|
|
394
|
+
const chars = source.split("");
|
|
395
|
+
const mask = (start, end) => {
|
|
396
|
+
for (let i = start; i < end; i += 1)
|
|
397
|
+
if (chars[i] !== "\n" && chars[i] !== "\r")
|
|
398
|
+
chars[i] = " ";
|
|
399
|
+
};
|
|
400
|
+
const canStartRegexAfter = /[({[=,:;!?&|+\-*%^~<>]/;
|
|
401
|
+
let i = 0;
|
|
402
|
+
let previousSignificant = "";
|
|
403
|
+
while (i < source.length) {
|
|
404
|
+
const c = source[i];
|
|
405
|
+
const next = source[i + 1];
|
|
406
|
+
if (/\s/.test(c)) {
|
|
407
|
+
i += 1;
|
|
408
|
+
continue;
|
|
409
|
+
}
|
|
410
|
+
if (c === "/" && next === "/") {
|
|
411
|
+
const start = i;
|
|
412
|
+
i += 2;
|
|
413
|
+
while (i < source.length && source[i] !== "\n")
|
|
414
|
+
i += 1;
|
|
415
|
+
mask(start, i);
|
|
416
|
+
continue;
|
|
417
|
+
}
|
|
418
|
+
if (c === "/" && next === "*") {
|
|
419
|
+
const start = i;
|
|
420
|
+
i += 2;
|
|
421
|
+
while (i < source.length && !(source[i] === "*" && source[i + 1] === "/"))
|
|
422
|
+
i += 1;
|
|
423
|
+
i = Math.min(source.length, i + 2);
|
|
424
|
+
mask(start, i);
|
|
425
|
+
continue;
|
|
426
|
+
}
|
|
427
|
+
if (c === "'" || c === '"' || c === "`") {
|
|
428
|
+
const quote = c;
|
|
429
|
+
const start = i++;
|
|
430
|
+
while (i < source.length) {
|
|
431
|
+
if (source[i] === "\\") {
|
|
432
|
+
i += 2;
|
|
433
|
+
continue;
|
|
434
|
+
}
|
|
435
|
+
if (source[i] === quote) {
|
|
436
|
+
i += 1;
|
|
437
|
+
break;
|
|
438
|
+
}
|
|
439
|
+
i += 1;
|
|
440
|
+
}
|
|
441
|
+
mask(start, i);
|
|
442
|
+
previousSignificant = '"';
|
|
443
|
+
continue;
|
|
444
|
+
}
|
|
445
|
+
const regexContext = previousSignificant === "" || canStartRegexAfter.test(previousSignificant);
|
|
446
|
+
if (c === "/" && next !== "/" && next !== "*" && regexContext) {
|
|
447
|
+
const start = i++;
|
|
448
|
+
let inClass = false;
|
|
449
|
+
while (i < source.length) {
|
|
450
|
+
if (source[i] === "\\") {
|
|
451
|
+
i += 2;
|
|
452
|
+
continue;
|
|
453
|
+
}
|
|
454
|
+
if (source[i] === "[")
|
|
455
|
+
inClass = true;
|
|
456
|
+
else if (source[i] === "]")
|
|
457
|
+
inClass = false;
|
|
458
|
+
else if (source[i] === "/" && !inClass) {
|
|
459
|
+
i += 1;
|
|
460
|
+
while (/[A-Za-z]/.test(source[i] ?? ""))
|
|
461
|
+
i += 1;
|
|
462
|
+
break;
|
|
463
|
+
}
|
|
464
|
+
i += 1;
|
|
465
|
+
}
|
|
466
|
+
mask(start, i);
|
|
467
|
+
previousSignificant = "/";
|
|
468
|
+
continue;
|
|
469
|
+
}
|
|
470
|
+
previousSignificant = c;
|
|
471
|
+
i += 1;
|
|
472
|
+
}
|
|
473
|
+
return chars.join("");
|
|
474
|
+
}
|
|
387
475
|
// ---------------------------------------------------------------------------
|
|
388
476
|
// Byte-exact body extraction from untranspiled source (elementum build only)
|
|
389
477
|
// ---------------------------------------------------------------------------
|
|
@@ -410,9 +498,8 @@ export function tryExtractFromCurrentSource(name) {
|
|
|
410
498
|
return bodies.get(name);
|
|
411
499
|
}
|
|
412
500
|
/**
|
|
413
|
-
* Scan raw (untranspiled) `.ts` source text for every
|
|
414
|
-
* `.executeScript("name", {...})` call
|
|
415
|
-
* `childTask("name", executeScript({...}))` call, extracting each one's
|
|
501
|
+
* Scan raw (untranspiled) `.ts` source text for every fluent
|
|
502
|
+
* `.executeScript("name", {...})` call, extracting each one's
|
|
416
503
|
* `code:` function body VERBATIM. Reuses this file's own comment/string-aware
|
|
417
504
|
* tokenizing ({@link skipNonCode}/{@link skipString}) rather than a full
|
|
418
505
|
* parser — the input is EDK's own printer output (a predictable shape) plus
|
|
@@ -447,22 +534,6 @@ function scanExecuteScriptBodies(src) {
|
|
|
447
534
|
}
|
|
448
535
|
}
|
|
449
536
|
}
|
|
450
|
-
if (isIdentifierBoundaryMatch(src, i, "childTask")) {
|
|
451
|
-
const openParen = skipWs(src, i + "childTask".length);
|
|
452
|
-
if (src[openParen] === "(") {
|
|
453
|
-
const call = scanCallArgs(src, openParen);
|
|
454
|
-
if (call !== undefined && call.args.length >= 2) {
|
|
455
|
-
const name = unquoteIfStringLiteral(call.args[0]);
|
|
456
|
-
const inner = call.args[1].trim();
|
|
457
|
-
const innerOpen = "executeScript".length;
|
|
458
|
-
if (name !== undefined && inner.startsWith("executeScript") && inner[innerOpen] === "(" && inner.endsWith(")")) {
|
|
459
|
-
const body = extractCodeBody(inner.slice(innerOpen + 1, -1));
|
|
460
|
-
if (body !== undefined)
|
|
461
|
-
result.set(name, dedent(body.replace(/^\n+/, "").replace(/\s+$/, "")));
|
|
462
|
-
}
|
|
463
|
-
}
|
|
464
|
-
}
|
|
465
|
-
}
|
|
466
537
|
i += 1;
|
|
467
538
|
}
|
|
468
539
|
return result;
|
|
@@ -589,7 +660,15 @@ function extractFunctionBlockBodyAt(text, start) {
|
|
|
589
660
|
}
|
|
590
661
|
if (text.startsWith("=>", i)) {
|
|
591
662
|
sawArrow = true;
|
|
592
|
-
i
|
|
663
|
+
const bodyStart = skipWs(text, i + 2);
|
|
664
|
+
// The byte-exact scanner intentionally handles block-bodied functions
|
|
665
|
+
// only. An expression body such as `() => ({ value: 1 })` must fall
|
|
666
|
+
// back to Function#toString extraction; continuing this scan would walk
|
|
667
|
+
// into later options and could mistake `outputs: { ... }` for the code
|
|
668
|
+
// body (live-confirmed on a nested executeScript in #152).
|
|
669
|
+
if (text[bodyStart] !== "{")
|
|
670
|
+
return undefined;
|
|
671
|
+
i = bodyStart;
|
|
593
672
|
continue;
|
|
594
673
|
}
|
|
595
674
|
if (c === "(" || c === "[") {
|