@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,6 +1,7 @@
|
|
|
1
1
|
/** The agent-tool entity's registry entry (see src/graph/). */
|
|
2
2
|
import { NO_CATALOG, NO_DATA, NO_LIFECYCLE, } from "../../graph/types.js";
|
|
3
3
|
import { AUTOMATION_RESOURCE_TYPE, WORKFLOW_PUBLISH_RESOURCE_TYPE, } from "../automation/types.js";
|
|
4
|
+
import { FIELD_DATA_RESOURCE_TYPE } from "../field/module.js";
|
|
4
5
|
import { AGENT_TOOL_SUB_TYPES, RUN_AUTOMATION_TOOL_RESOURCE_TYPE, } from "./types.js";
|
|
5
6
|
export const agentToolModule = {
|
|
6
7
|
kind: "agent-tool",
|
|
@@ -28,5 +29,10 @@ export const agentToolModule = {
|
|
|
28
29
|
toType: AUTOMATION_RESOURCE_TYPE,
|
|
29
30
|
},
|
|
30
31
|
],
|
|
32
|
+
resolvedDataReferences: [{
|
|
33
|
+
attribute: "fields",
|
|
34
|
+
nestedAttribute: "field_id",
|
|
35
|
+
dataType: FIELD_DATA_RESOURCE_TYPE,
|
|
36
|
+
}],
|
|
31
37
|
},
|
|
32
38
|
};
|
|
@@ -9,12 +9,10 @@
|
|
|
9
9
|
* - self-app target → the app's own resource ref;
|
|
10
10
|
* - cross-app target → a name-keyed `data.elementum_app` lookup whose
|
|
11
11
|
* label derives from the app NAME (ei's sanitize rule);
|
|
12
|
-
* - tool fields →
|
|
13
|
-
*
|
|
14
|
-
* owned by a DIFFERENT app/element resolves via a `data.elementum_field`
|
|
15
|
-
* lookup instead (`parentKind`/`parentName` on the token — see
|
|
16
|
-
* `FieldRef`'s doc comment in `src/catalog/types.ts`).
|
|
12
|
+
* - tool fields → a local field resource ref, or an object-scoped
|
|
13
|
+
* `data.elementum_field` lookup when the typed target is foreign.
|
|
17
14
|
*/
|
|
15
|
+
import { type WorkspaceAspect } from "../../engine/build/context.js";
|
|
18
16
|
import { type TfBlock, type TfValue } from "../../engine/tf/index.js";
|
|
19
17
|
export interface ToolToTfContext {
|
|
20
18
|
/** The owning app's refName + tfLabel (namespace) — self-target detection + app_id. */
|
|
@@ -23,11 +21,21 @@ export interface ToolToTfContext {
|
|
|
23
21
|
/** The owning agent's bare tfLabel (before apps_ prefix). */
|
|
24
22
|
readonly agentBareTfLabel: string;
|
|
25
23
|
/** Records a foreign-app data lookup for data.tf; returns its tfLabel. */
|
|
26
|
-
foreignAppRef(tfLabel: string, name: string): void;
|
|
24
|
+
foreignAppRef(tfLabel: string, name: string, namespace?: string): void;
|
|
27
25
|
/** Records a foreign-ELEMENT data lookup for data.tf (board issue #42). */
|
|
28
|
-
foreignElementRef(tfLabel: string, name: string): void;
|
|
26
|
+
foreignElementRef(tfLabel: string, name: string, namespace?: string): void;
|
|
27
|
+
foreignAutomationRef?(tfLabel: string, name: string, owner: {
|
|
28
|
+
readonly kind: "app" | "element";
|
|
29
|
+
readonly refName: string;
|
|
30
|
+
readonly name: string;
|
|
31
|
+
readonly namespace?: string;
|
|
32
|
+
}): void;
|
|
29
33
|
/** Records a `data.elementum_field` lookup for a field owned by a foreign app/element. */
|
|
30
34
|
foreignFieldRef(type: string, tfLabel: string, objectId: TfValue, name: string): void;
|
|
35
|
+
/** App/element roots authored in this same workspace. */
|
|
36
|
+
readonly workspaceAspects?: ReadonlyMap<string, WorkspaceAspect>;
|
|
37
|
+
/** Records an app-scoped service-account lookup by name. */
|
|
38
|
+
serviceAccountRef?(tfLabel: string, name: string): TfValue | void;
|
|
31
39
|
/** Degradations land here — reported by the caller, never silent. */
|
|
32
40
|
readonly diagnostics: string[];
|
|
33
41
|
}
|
|
@@ -9,35 +9,65 @@
|
|
|
9
9
|
* - self-app target → the app's own resource ref;
|
|
10
10
|
* - cross-app target → a name-keyed `data.elementum_app` lookup whose
|
|
11
11
|
* label derives from the app NAME (ei's sanitize rule);
|
|
12
|
-
* - tool fields →
|
|
13
|
-
*
|
|
14
|
-
* owned by a DIFFERENT app/element resolves via a `data.elementum_field`
|
|
15
|
-
* lookup instead (`parentKind`/`parentName` on the token — see
|
|
16
|
-
* `FieldRef`'s doc comment in `src/catalog/types.ts`).
|
|
12
|
+
* - tool fields → a local field resource ref, or an object-scoped
|
|
13
|
+
* `data.elementum_field` lookup when the typed target is foreign.
|
|
17
14
|
*/
|
|
18
|
-
import {
|
|
15
|
+
import { workspaceAspectKey } from "../../engine/build/context.js";
|
|
16
|
+
import { appScopedResourceLabel, expr, sanitizeName, scopedResourceLabel, tsLabelToTfLabel } from "../../engine/tf/index.js";
|
|
19
17
|
import { EntityTfError } from "../../engine/entity.js";
|
|
20
18
|
import { fieldRefToTfValue } from "../field/to-tf.js";
|
|
21
19
|
import { TOOL_SUB_TYPE_BY_TYPE_KEY } from "./types.js";
|
|
22
|
-
|
|
20
|
+
function serviceAccountIdValue(token, where, ctx) {
|
|
21
|
+
if (token.__kind !== "serviceAccount" || token.name === undefined || token.name === "") {
|
|
22
|
+
ctx.diagnostics.push(`${where}: serviceAccount must be a serviceAccountRef({ app, name }); dropped`);
|
|
23
|
+
return undefined;
|
|
24
|
+
}
|
|
25
|
+
if (token.appRefName !== ctx.appRefName) {
|
|
26
|
+
ctx.diagnostics.push(`${where}: service account "${token.name}" belongs to app "${token.appRefName ?? ""}", not owning app "${ctx.appRefName}"; dropped`);
|
|
27
|
+
return undefined;
|
|
28
|
+
}
|
|
29
|
+
const tfLabel = appScopedResourceLabel(ctx.appTfLabel, sanitizeName(token.name));
|
|
30
|
+
if (ctx.serviceAccountRef === undefined) {
|
|
31
|
+
ctx.diagnostics.push(`${where}: build context cannot materialize a service-account lookup; dropped`);
|
|
32
|
+
return undefined;
|
|
33
|
+
}
|
|
34
|
+
return ctx.serviceAccountRef(tfLabel, token.name) ??
|
|
35
|
+
expr.dataAttr("elementum_service_account", tfLabel, ["id"]);
|
|
36
|
+
}
|
|
37
|
+
/** authoring app/element token → its resolved target (workspace resource or foreign data ref). */
|
|
23
38
|
function resolveTarget(token, ctx) {
|
|
24
39
|
const refName = token.refName ?? "";
|
|
25
40
|
const kind = token.__kind === "element" ? "element" : "app";
|
|
26
41
|
if (kind === "app" && refName === ctx.appRefName) {
|
|
27
|
-
return {
|
|
42
|
+
return {
|
|
43
|
+
value: expr.resourceAttr("elementum_app", ctx.appTfLabel, ["id"]),
|
|
44
|
+
refName,
|
|
45
|
+
kind,
|
|
46
|
+
localTfLabel: ctx.appTfLabel,
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
const sibling = ctx.workspaceAspects?.get(workspaceAspectKey(kind, refName));
|
|
50
|
+
if (sibling !== undefined) {
|
|
51
|
+
const resourceType = kind === "element" ? "elementum_element" : "elementum_app";
|
|
52
|
+
return {
|
|
53
|
+
value: expr.resourceAttr(resourceType, sibling.tfLabel, ["id"]),
|
|
54
|
+
refName,
|
|
55
|
+
kind,
|
|
56
|
+
localTfLabel: sibling.tfLabel,
|
|
57
|
+
};
|
|
28
58
|
}
|
|
29
59
|
// ei derives foreign-app/foreign-element data labels from the display NAME.
|
|
30
60
|
const name = token.name ?? refName;
|
|
31
|
-
const tfLabel = sanitizeName(name);
|
|
61
|
+
const tfLabel = sanitizeName(token.namespace ?? name);
|
|
32
62
|
// Board issue #42: an aspect token can be an element, not just an app —
|
|
33
63
|
// must emit `data.elementum_element`, never `data.elementum_app`, or the
|
|
34
64
|
// provider looks up the wrong resource type entirely.
|
|
35
65
|
if (kind === "element") {
|
|
36
|
-
ctx.foreignElementRef(tfLabel, name);
|
|
37
|
-
return { value: expr.dataAttr("elementum_element", tfLabel, ["id"]), refName, kind,
|
|
66
|
+
ctx.foreignElementRef(tfLabel, name, token.namespace);
|
|
67
|
+
return { value: expr.dataAttr("elementum_element", tfLabel, ["id"]), refName, kind, foreignTfLabel: tfLabel };
|
|
38
68
|
}
|
|
39
|
-
ctx.foreignAppRef(tfLabel, name);
|
|
40
|
-
return { value: expr.dataAttr("elementum_app", tfLabel, ["id"]), refName, kind,
|
|
69
|
+
ctx.foreignAppRef(tfLabel, name, token.namespace);
|
|
70
|
+
return { value: expr.dataAttr("elementum_app", tfLabel, ["id"]), refName, kind, foreignTfLabel: tfLabel };
|
|
41
71
|
}
|
|
42
72
|
/**
|
|
43
73
|
* A field belonging to the tool's target aspect, when that target is
|
|
@@ -47,7 +77,7 @@ function resolveTarget(token, ctx) {
|
|
|
47
77
|
* from some unrelated third aspect silently pair with this target's id;
|
|
48
78
|
* see `resolveFieldForTarget`) + the field's display name. Same pattern as
|
|
49
79
|
* `automation/to-tf.ts`'s `crossAppFieldToTf` and `field/to-tf.ts`'s
|
|
50
|
-
* `
|
|
80
|
+
* `resolveFieldOnObject`.
|
|
51
81
|
*/
|
|
52
82
|
function foreignTargetFieldRefValue(token, refName, target, ctx) {
|
|
53
83
|
const fieldName = token.name ?? refName;
|
|
@@ -95,10 +125,9 @@ function fieldRefValue(token, where, ctx, target) {
|
|
|
95
125
|
ctx.diagnostics.push(`${where}: field "${refName}" belongs to ${parentKind} "${parent}", not the tool's target ${target.kind} "${target.refName}" — a tool's fields must belong to its own target aspect; dropped`);
|
|
96
126
|
return undefined;
|
|
97
127
|
}
|
|
98
|
-
if (
|
|
128
|
+
if (target.localTfLabel === undefined)
|
|
99
129
|
return foreignTargetFieldRefValue(token, refName, target, ctx);
|
|
100
|
-
// Falls through to the
|
|
101
|
-
// `target.isSelf` already proved this target IS ctx.appTfLabel.
|
|
130
|
+
// Falls through to the local resource-address resolution below.
|
|
102
131
|
}
|
|
103
132
|
else if (token.parent !== undefined && (token.parent !== ctx.appRefName || token.parentKind === "element")) {
|
|
104
133
|
ctx.diagnostics.push(`${where}: field "${refName}" belongs to "${token.parent}", not this tool's app; dropped`);
|
|
@@ -108,7 +137,7 @@ function fieldRefValue(token, where, ctx, target) {
|
|
|
108
137
|
// vs. real field resource, by authoring type) rather than reimplementing
|
|
109
138
|
// it here — see fieldRefToTfValue's doc comment for the system-field
|
|
110
139
|
// ordering rationale.
|
|
111
|
-
const value = fieldRefToTfValue(token.fieldType ?? "", refName, ctx.appTfLabel);
|
|
140
|
+
const value = fieldRefToTfValue(token.fieldType ?? "", refName, target?.localTfLabel ?? ctx.appTfLabel, target?.kind ?? "app");
|
|
112
141
|
if (value === undefined) {
|
|
113
142
|
ctx.diagnostics.push(`${where}: field token "${refName}" has no terraform field resource mapping (fieldType ${JSON.stringify(token.fieldType ?? "")}); dropped`);
|
|
114
143
|
}
|
|
@@ -139,12 +168,6 @@ export function toolToTf(entry, ctx) {
|
|
|
139
168
|
ctx.diagnostics.push(`agent tool entry "${typeKey}" has a non-object body; dropped`);
|
|
140
169
|
return undefined;
|
|
141
170
|
}
|
|
142
|
-
// Tool-name validity is enforced in the authoring builders (entities/agent/
|
|
143
|
-
// tools.ts), not here — from-tf/to-tf must round-trip whatever the platform
|
|
144
|
-
// holds, including a hyphenated name deployed outside EDK.
|
|
145
|
-
if (inner.runAs !== undefined) {
|
|
146
|
-
ctx.diagnostics.push(`agent tool "${name}": runAs is not supported on the terraform path yet; dropped`);
|
|
147
|
-
}
|
|
148
171
|
const where = `agent tool "${name}"`;
|
|
149
172
|
const agentTfLabel = appScopedResourceLabel(ctx.appTfLabel, ctx.agentBareTfLabel);
|
|
150
173
|
const tfLabel = appScopedResourceLabel(ctx.appTfLabel, sanitizeName(`${ctx.agentBareTfLabel}_${name}`));
|
|
@@ -156,6 +179,23 @@ export function toolToTf(entry, ctx) {
|
|
|
156
179
|
};
|
|
157
180
|
if (inner.startMessage !== undefined)
|
|
158
181
|
attrs["start_message"] = inner.startMessage;
|
|
182
|
+
const runAs = inner.runAs;
|
|
183
|
+
if (runAs?.["currentUser"] === true) {
|
|
184
|
+
attrs["run_as"] = "current_user";
|
|
185
|
+
}
|
|
186
|
+
else if (runAs?.["publisher"] === true) {
|
|
187
|
+
attrs["run_as"] = "publisher";
|
|
188
|
+
}
|
|
189
|
+
else if (runAs?.["serviceAccount"] !== undefined) {
|
|
190
|
+
const serviceAccountId = serviceAccountIdValue(runAs["serviceAccount"], where, ctx);
|
|
191
|
+
if (serviceAccountId !== undefined) {
|
|
192
|
+
attrs["run_as"] = "service_account";
|
|
193
|
+
attrs["service_account_id"] = serviceAccountId;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
else if (runAs !== undefined) {
|
|
197
|
+
ctx.diagnostics.push(`${where}: runAs ${JSON.stringify(runAs)} is not supported; dropped`);
|
|
198
|
+
}
|
|
159
199
|
if (typeKey === "executeWorkflow") {
|
|
160
200
|
const auto = inner.automationId;
|
|
161
201
|
// Identity is the token's refName (the bag key — its tfLabel image IS the
|
|
@@ -171,15 +211,28 @@ export function toolToTf(entry, ctx) {
|
|
|
171
211
|
return undefined;
|
|
172
212
|
}
|
|
173
213
|
if (auto.parent !== undefined && auto.parent !== ctx.appRefName) {
|
|
174
|
-
|
|
175
|
-
|
|
214
|
+
if (auto.parentKind === undefined || auto.parentName === undefined) {
|
|
215
|
+
ctx.diagnostics.push(`${where}: foreign automation has incomplete owner identity; dropped`);
|
|
216
|
+
return undefined;
|
|
217
|
+
}
|
|
218
|
+
const dataLabel = `${auto.parentKind}_${tsLabelToTfLabel(auto.parent)}_${autoTfLabel}`;
|
|
219
|
+
if (ctx.foreignAutomationRef === undefined) {
|
|
220
|
+
ctx.diagnostics.push(`${where}: foreign automation lookup registry is unavailable; dropped`);
|
|
221
|
+
return undefined;
|
|
222
|
+
}
|
|
223
|
+
ctx.foreignAutomationRef(dataLabel, auto.name ?? auto.refName ?? "", {
|
|
224
|
+
kind: auto.parentKind,
|
|
225
|
+
refName: auto.parent,
|
|
226
|
+
name: auto.parentName,
|
|
227
|
+
...(auto.parentNamespace !== undefined ? { namespace: auto.parentNamespace } : {}),
|
|
228
|
+
});
|
|
229
|
+
attrs["automation_id"] = expr.dataAttr("elementum_automation", dataLabel, ["id"]);
|
|
230
|
+
}
|
|
231
|
+
else {
|
|
232
|
+
// The automation and workflow-publish resources carry the same platform
|
|
233
|
+
// id. Reference the publish block so Terraform sequences publication.
|
|
234
|
+
attrs["automation_id"] = expr.resourceAttr("elementum_workflow_publish", appScopedResourceLabel(ctx.appTfLabel, autoTfLabel), ["id"]);
|
|
176
235
|
}
|
|
177
|
-
// The automation and workflow-publish resources carry the same platform
|
|
178
|
-
// id. Reference the publish block so Terraform cannot create the tool
|
|
179
|
-
// until the provider has published the workflow whose bindings it reads.
|
|
180
|
-
// ei export normalizes this back to elementum_automation.<label>.id; the
|
|
181
|
-
// live round-trip comparator treats only those two references as equal.
|
|
182
|
-
attrs["automation_id"] = expr.resourceAttr("elementum_workflow_publish", appScopedResourceLabel(ctx.appTfLabel, autoTfLabel), ["id"]);
|
|
183
236
|
if (inner.inputs !== undefined && inner.inputs.length > 0) {
|
|
184
237
|
attrs["inputs"] = inner.inputs.map((i) => ({
|
|
185
238
|
parameter_name: i.triggerParameterId?.name ?? "",
|
|
@@ -200,6 +253,42 @@ export function toolToTf(entry, ctx) {
|
|
|
200
253
|
const block = { kind: "resource", type: subType.resourceType, label: tfLabel, attrs };
|
|
201
254
|
return { block, address: `${subType.resourceType}.${tfLabel}` };
|
|
202
255
|
}
|
|
256
|
+
if (typeKey === "runAgent") {
|
|
257
|
+
const target = inner.targetAgentId;
|
|
258
|
+
const targetRefName = target?.refName ?? "";
|
|
259
|
+
if (target === undefined || targetRefName === "") {
|
|
260
|
+
ctx.diagnostics.push(`${where}: no target agent token; dropped`);
|
|
261
|
+
return undefined;
|
|
262
|
+
}
|
|
263
|
+
if (target.parent !== undefined && target.parent !== ctx.appRefName) {
|
|
264
|
+
ctx.diagnostics.push(`${where}: target agent "${targetRefName}" belongs to app "${target.parent}" — cross-app run-agent tools are not supported on the terraform path yet; dropped`);
|
|
265
|
+
return undefined;
|
|
266
|
+
}
|
|
267
|
+
attrs["target_agent_id"] = expr.resourceAttr("elementum_agent", appScopedResourceLabel(ctx.appTfLabel, tsLabelToTfLabel(targetRefName)), ["id"]);
|
|
268
|
+
attrs["worker_task_prompt"] = inner.workerTaskPrompt ?? "";
|
|
269
|
+
const block = { kind: "resource", type: subType.resourceType, label: tfLabel, attrs };
|
|
270
|
+
return { block, address: `${subType.resourceType}.${tfLabel}` };
|
|
271
|
+
}
|
|
272
|
+
if (typeKey === "mcp") {
|
|
273
|
+
if (inner.serverUrl === undefined || inner.serverUrl === "") {
|
|
274
|
+
ctx.diagnostics.push(`${where}: no serverUrl; dropped`);
|
|
275
|
+
return undefined;
|
|
276
|
+
}
|
|
277
|
+
if (inner.mcpToolName === undefined || inner.mcpToolName === "") {
|
|
278
|
+
ctx.diagnostics.push(`${where}: no mcpToolName; dropped`);
|
|
279
|
+
return undefined;
|
|
280
|
+
}
|
|
281
|
+
attrs["server_url"] = inner.serverUrl;
|
|
282
|
+
attrs["mcp_tool_name"] = inner.mcpToolName;
|
|
283
|
+
if (inner.headers !== undefined && inner.headers.length > 0) {
|
|
284
|
+
attrs["headers"] = inner.headers.map((header) => ({
|
|
285
|
+
key: header.key ?? "",
|
|
286
|
+
value: header.value ?? "",
|
|
287
|
+
}));
|
|
288
|
+
}
|
|
289
|
+
const block = { kind: "resource", type: subType.resourceType, label: tfLabel, attrs };
|
|
290
|
+
return { block, address: `${subType.resourceType}.${tfLabel}` };
|
|
291
|
+
}
|
|
203
292
|
// searchTable is the one sub-type where a target aspect is optional
|
|
204
293
|
// (confirmed live — see toolFromTf's matching comment).
|
|
205
294
|
if (inner.aspectId === undefined && typeKey !== "searchTable") {
|
|
@@ -209,6 +298,13 @@ export function toolToTf(entry, ctx) {
|
|
|
209
298
|
const target = inner.aspectId !== undefined ? resolveTarget(inner.aspectId, ctx) : undefined;
|
|
210
299
|
if (target !== undefined)
|
|
211
300
|
attrs["target_id"] = target.value;
|
|
301
|
+
if (typeKey === "relateRecord") {
|
|
302
|
+
if (inner.relatedAspectId === undefined) {
|
|
303
|
+
ctx.diagnostics.push(`${where}: no related aspect token; dropped`);
|
|
304
|
+
return undefined;
|
|
305
|
+
}
|
|
306
|
+
attrs["related_target_id"] = resolveTarget(inner.relatedAspectId, ctx).value;
|
|
307
|
+
}
|
|
212
308
|
if (typeKey === "updateRecord") {
|
|
213
309
|
if (inner.handleDescription === undefined || inner.handleDescription === "") {
|
|
214
310
|
// The provider requires a non-empty handle_description and rejects an
|
|
@@ -228,14 +324,32 @@ export function toolToTf(entry, ctx) {
|
|
|
228
324
|
}
|
|
229
325
|
}
|
|
230
326
|
if (typeKey === "searchTable") {
|
|
231
|
-
|
|
232
|
-
|
|
327
|
+
const table = inner.searchTableId;
|
|
328
|
+
if (table?.refName === undefined || table.refName === "") {
|
|
329
|
+
ctx.diagnostics.push(`${where}: no search table token; dropped`);
|
|
330
|
+
return undefined;
|
|
331
|
+
}
|
|
332
|
+
if (target !== undefined && table.parent !== undefined && table.parent !== "" && table.parent !== target.refName) {
|
|
333
|
+
ctx.diagnostics.push(`${where}: search table belongs to "${table.parent}", not target "${target.refName}"; dropped`);
|
|
334
|
+
return undefined;
|
|
335
|
+
}
|
|
336
|
+
if (target?.localTfLabel !== undefined) {
|
|
337
|
+
const resourceType = table.__variant === "linked"
|
|
338
|
+
? "elementum_linked_ai_search_table"
|
|
339
|
+
: table.__variant === "table"
|
|
340
|
+
? "elementum_table_search_table"
|
|
341
|
+
: "elementum_ai_search_table";
|
|
342
|
+
attrs["search_table_id"] = expr.resourceAttr(resourceType, scopedResourceLabel(target.localTfLabel, tsLabelToTfLabel(table.refName), target.kind), ["id"]);
|
|
343
|
+
}
|
|
344
|
+
else if (target !== undefined) {
|
|
345
|
+
const lookupLabel = sanitizeName(`${target.foreignTfLabel}_${table.name ?? table.refName}`);
|
|
346
|
+
ctx.foreignFieldRef("elementum_search_table", lookupLabel, target.value, table.name ?? table.refName);
|
|
347
|
+
attrs["search_table_id"] = expr.dataAttr("elementum_search_table", lookupLabel, ["id"]);
|
|
348
|
+
}
|
|
349
|
+
else {
|
|
350
|
+
ctx.diagnostics.push(`${where}: search table has no target aspect; dropped`);
|
|
233
351
|
return undefined;
|
|
234
352
|
}
|
|
235
|
-
// Always a raw platform id — see ReturnFieldWire's sibling comment on
|
|
236
|
-
// searchTableId. There is no data-source/reference form to resolve
|
|
237
|
-
// against; ei itself never exports one for this attribute.
|
|
238
|
-
attrs["search_table_id"] = inner.searchTableId;
|
|
239
353
|
}
|
|
240
354
|
if (inner.fields !== undefined && inner.fields.length > 0) {
|
|
241
355
|
const fieldValues = [];
|
|
@@ -262,26 +376,28 @@ export function toolToTf(entry, ctx) {
|
|
|
262
376
|
// after the first (confirmed live 2026-08-05). Pin it, like
|
|
263
377
|
// executeWorkflow's `timeout`, so config and state agree.
|
|
264
378
|
required: f.required ?? false,
|
|
379
|
+
...(f.defaultValue !== undefined && { default_value: f.defaultValue }),
|
|
265
380
|
});
|
|
266
|
-
if (f.defaultValue !== undefined) {
|
|
267
|
-
ctx.diagnostics.push(`${where}: field default values are not supported on the terraform path yet; dropped`);
|
|
268
|
-
}
|
|
269
381
|
}
|
|
270
382
|
if (fieldValues.length > 0)
|
|
271
383
|
attrs["fields"] = fieldValues;
|
|
272
384
|
}
|
|
273
|
-
//
|
|
274
|
-
//
|
|
275
|
-
// fieldRefValue resolution, unlike the shared `fields` block above.
|
|
385
|
+
// Search-table fields use the same target-owned FieldRef resolution as
|
|
386
|
+
// other agent tools while preserving their distinct provider dialect.
|
|
276
387
|
if (inner.searchTableFields !== undefined && inner.searchTableFields.length > 0) {
|
|
277
388
|
const values = [];
|
|
278
389
|
for (const f of inner.searchTableFields) {
|
|
279
|
-
|
|
390
|
+
const ref = typeof f.fieldId === "string"
|
|
391
|
+
? f.fieldId
|
|
392
|
+
: f.fieldId === undefined
|
|
393
|
+
? undefined
|
|
394
|
+
: fieldRefValue(f.fieldId, where, ctx, target);
|
|
395
|
+
if (ref === undefined || ref === "") {
|
|
280
396
|
ctx.diagnostics.push(`${where}: fields item has no fieldId; dropped`);
|
|
281
397
|
continue;
|
|
282
398
|
}
|
|
283
399
|
values.push({
|
|
284
|
-
field_id:
|
|
400
|
+
field_id: ref,
|
|
285
401
|
...(f.name !== undefined && { name: f.name }),
|
|
286
402
|
...(f.description !== undefined && { description: f.description }),
|
|
287
403
|
});
|
|
@@ -292,12 +408,17 @@ export function toolToTf(entry, ctx) {
|
|
|
292
408
|
if (inner.returnFields !== undefined && inner.returnFields.length > 0) {
|
|
293
409
|
const returnFieldValues = [];
|
|
294
410
|
for (const f of inner.returnFields) {
|
|
295
|
-
|
|
411
|
+
const ref = typeof f.fieldId === "string"
|
|
412
|
+
? f.fieldId
|
|
413
|
+
: f.fieldId === undefined
|
|
414
|
+
? undefined
|
|
415
|
+
: fieldRefValue(f.fieldId, where, ctx, target);
|
|
416
|
+
if (ref === undefined || ref === "") {
|
|
296
417
|
ctx.diagnostics.push(`${where}: return_fields item has no fieldId; dropped`);
|
|
297
418
|
continue;
|
|
298
419
|
}
|
|
299
420
|
returnFieldValues.push({
|
|
300
|
-
field_id:
|
|
421
|
+
field_id: ref,
|
|
301
422
|
...(f.name !== undefined && { name: f.name }),
|
|
302
423
|
...(f.displayName !== undefined && { display_name: f.displayName }),
|
|
303
424
|
});
|
|
@@ -4,11 +4,10 @@
|
|
|
4
4
|
* (agent_id + app_id + name/description) — so per-sub-type knowledge is one
|
|
5
5
|
* ROW here, exactly like `entities/field/types.ts`.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
* end
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* plan as a destroy on rebuild.
|
|
7
|
+
* Every product-facing provider agent-tool resource is implemented end to
|
|
8
|
+
* end. Hydra also exposes its internal select-bot-route transport type in the
|
|
9
|
+
* generic GraphQL tool union; that row remains recognized so pull can report
|
|
10
|
+
* it explicitly, but it is intentionally not authorable or adoptable.
|
|
12
11
|
*/
|
|
13
12
|
/** One agent-tool sub-type: authoring variant key ↔ resource type. */
|
|
14
13
|
export interface AgentToolSubType {
|
|
@@ -39,5 +38,4 @@ export declare const ALL_TOOL_RESOURCE_TYPES: readonly string[];
|
|
|
39
38
|
* still be pullable.
|
|
40
39
|
*/
|
|
41
40
|
export declare function isValidToolName(name: string): boolean;
|
|
42
|
-
/** Attributes `toolFromTf` understands per implemented sub-type — growth is reported loudly. */
|
|
43
41
|
export declare const KNOWN_TOOL_ATTRS: Readonly<Record<string, ReadonlySet<string>>>;
|
|
@@ -4,11 +4,10 @@
|
|
|
4
4
|
* (agent_id + app_id + name/description) — so per-sub-type knowledge is one
|
|
5
5
|
* ROW here, exactly like `entities/field/types.ts`.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
* end
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* plan as a destroy on rebuild.
|
|
7
|
+
* Every product-facing provider agent-tool resource is implemented end to
|
|
8
|
+
* end. Hydra also exposes its internal select-bot-route transport type in the
|
|
9
|
+
* generic GraphQL tool union; that row remains recognized so pull can report
|
|
10
|
+
* it explicitly, but it is intentionally not authorable or adoptable.
|
|
12
11
|
*/
|
|
13
12
|
export const RUN_AUTOMATION_TOOL_RESOURCE_TYPE = "elementum_agent_run_automation_tool";
|
|
14
13
|
export const AGENT_TOOL_SUB_TYPES = [
|
|
@@ -16,11 +15,11 @@ export const AGENT_TOOL_SUB_TYPES = [
|
|
|
16
15
|
{ typeKey: "searchAspect", resourceType: "elementum_agent_search_records_tool", implemented: true },
|
|
17
16
|
{ typeKey: "updateRecord", resourceType: "elementum_agent_update_record_tool", implemented: true },
|
|
18
17
|
{ typeKey: "searchTable", resourceType: "elementum_agent_ai_search_tool", implemented: true },
|
|
19
|
-
{ typeKey: "relateRecord", resourceType: "elementum_agent_relate_record_tool" },
|
|
18
|
+
{ typeKey: "relateRecord", resourceType: "elementum_agent_relate_record_tool", implemented: true },
|
|
20
19
|
{ typeKey: "executeWorkflow", resourceType: RUN_AUTOMATION_TOOL_RESOURCE_TYPE, implemented: true },
|
|
21
|
-
{ typeKey: "runAgent", resourceType: "elementum_agent_run_agent_tool" },
|
|
20
|
+
{ typeKey: "runAgent", resourceType: "elementum_agent_run_agent_tool", implemented: true },
|
|
22
21
|
{ typeKey: "selectBotRoute", resourceType: "elementum_agent_select_bot_route_tool" },
|
|
23
|
-
{ typeKey: "mcp", resourceType: "elementum_agent_mcp_tool" },
|
|
22
|
+
{ typeKey: "mcp", resourceType: "elementum_agent_mcp_tool", implemented: true },
|
|
24
23
|
];
|
|
25
24
|
export const TOOL_SUB_TYPE_BY_TYPE_KEY = new Map(AGENT_TOOL_SUB_TYPES.map((t) => [t.typeKey, t]));
|
|
26
25
|
export const TOOL_SUB_TYPE_BY_RESOURCE = new Map(AGENT_TOOL_SUB_TYPES.map((t) => [t.resourceType, t]));
|
|
@@ -43,25 +42,18 @@ export function isValidToolName(name) {
|
|
|
43
42
|
return /^[A-Za-z0-9_]{1,64}$/.test(name) && !name.includes("__");
|
|
44
43
|
}
|
|
45
44
|
/** Attributes `toolFromTf` understands per implemented sub-type — growth is reported loudly. */
|
|
45
|
+
const COMMON_TOOL_ATTRS = ["agent_id", "app_id", "name", "description", "start_message", "run_as", "service_account_id"];
|
|
46
46
|
export const KNOWN_TOOL_ATTRS = {
|
|
47
|
-
createRecord: new Set([
|
|
47
|
+
createRecord: new Set([...COMMON_TOOL_ATTRS, "target_id", "fields"]),
|
|
48
48
|
executeWorkflow: new Set([
|
|
49
|
-
|
|
50
|
-
"app_id",
|
|
51
|
-
"name",
|
|
52
|
-
"description",
|
|
53
|
-
"start_message",
|
|
49
|
+
...COMMON_TOOL_ATTRS,
|
|
54
50
|
"automation_id",
|
|
55
51
|
"inputs",
|
|
56
52
|
"outputs",
|
|
57
53
|
"timeout",
|
|
58
54
|
]),
|
|
59
55
|
searchAspect: new Set([
|
|
60
|
-
|
|
61
|
-
"app_id",
|
|
62
|
-
"name",
|
|
63
|
-
"description",
|
|
64
|
-
"start_message",
|
|
56
|
+
...COMMON_TOOL_ATTRS,
|
|
65
57
|
"target_id",
|
|
66
58
|
"query_description",
|
|
67
59
|
"result_limit",
|
|
@@ -69,11 +61,7 @@ export const KNOWN_TOOL_ATTRS = {
|
|
|
69
61
|
"filter_variables",
|
|
70
62
|
]),
|
|
71
63
|
updateRecord: new Set([
|
|
72
|
-
|
|
73
|
-
"app_id",
|
|
74
|
-
"name",
|
|
75
|
-
"description",
|
|
76
|
-
"start_message",
|
|
64
|
+
...COMMON_TOOL_ATTRS,
|
|
77
65
|
"target_id",
|
|
78
66
|
"handle_description",
|
|
79
67
|
"fields",
|
|
@@ -87,11 +75,7 @@ export const KNOWN_TOOL_ATTRS = {
|
|
|
87
75
|
// since re-emitting the wrong one on an already-migrated tool would plan
|
|
88
76
|
// a spurious diff on every apply.
|
|
89
77
|
searchTable: new Set([
|
|
90
|
-
|
|
91
|
-
"app_id",
|
|
92
|
-
"name",
|
|
93
|
-
"description",
|
|
94
|
-
"start_message",
|
|
78
|
+
...COMMON_TOOL_ATTRS,
|
|
95
79
|
"target_id",
|
|
96
80
|
"search_table_id",
|
|
97
81
|
"query_description",
|
|
@@ -99,4 +83,21 @@ export const KNOWN_TOOL_ATTRS = {
|
|
|
99
83
|
"fields",
|
|
100
84
|
"return_fields",
|
|
101
85
|
]),
|
|
86
|
+
relateRecord: new Set([
|
|
87
|
+
...COMMON_TOOL_ATTRS,
|
|
88
|
+
"target_id",
|
|
89
|
+
"related_target_id",
|
|
90
|
+
]),
|
|
91
|
+
runAgent: new Set([
|
|
92
|
+
...COMMON_TOOL_ATTRS,
|
|
93
|
+
"target_agent_id",
|
|
94
|
+
"worker_task_prompt",
|
|
95
|
+
]),
|
|
96
|
+
selectBotRoute: new Set([...COMMON_TOOL_ATTRS, "bot_id"]),
|
|
97
|
+
mcp: new Set([
|
|
98
|
+
...COMMON_TOOL_ATTRS,
|
|
99
|
+
"server_url",
|
|
100
|
+
"mcp_tool_name",
|
|
101
|
+
"headers",
|
|
102
|
+
]),
|
|
102
103
|
};
|