@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,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Agent emission (M3, plan §4.3): `agentToTf` consumes the discovered
|
|
3
|
-
* `DeployableEntity` (the `
|
|
3
|
+
* `DeployableEntity` (the `agent` def() payload) and emits
|
|
4
4
|
* `elementum_agent` + one tool resource per implemented tool (the tool pass
|
|
5
5
|
* delegates to `entities/agent-tool/to-tf.ts`) + one `elementum_agent_a2a_skill`
|
|
6
6
|
* per a2aSkills entry (delegates to `entities/agent-a2a-skill/to-tf.ts`,
|
|
@@ -15,16 +15,19 @@
|
|
|
15
15
|
* startingActions, …) degrade through `diagnostics` — reported, never
|
|
16
16
|
* silent (plan §4.3).
|
|
17
17
|
*/
|
|
18
|
+
import { workspaceAspectKey } from "../../engine/build/context.js";
|
|
18
19
|
import { EntityTfError } from "../../engine/entity.js";
|
|
19
20
|
import { appScopedResourceLabel, expr, sanitizeName, tsLabelToTfLabel } from "../../engine/tf/index.js";
|
|
20
21
|
import { a2aSkillToTf } from "../agent-a2a-skill/to-tf.js";
|
|
21
22
|
import { toolToTf } from "../agent-tool/to-tf.js";
|
|
22
23
|
import { APP_RESOURCE_TYPE } from "../app/module.js";
|
|
23
24
|
import { CONNECTOR_ORG_BAG } from "../org/connector.js";
|
|
25
|
+
import { resolveForeignRef } from "../shared/foreign-ref.js";
|
|
26
|
+
import { SERVICE_ACCOUNT_RESOURCE_TYPE } from "../service-account/module.js";
|
|
24
27
|
import { SKILL_RESOURCE_TYPE } from "../skill/module.js";
|
|
25
28
|
import { AGENT_RESOURCE_TYPE } from "./module.js";
|
|
26
29
|
/**
|
|
27
|
-
* Config knobs `
|
|
30
|
+
* Config knobs `agent` accepts that the terraform dialect does not
|
|
28
31
|
* carry (yet). `runAs`/`agentAuthentication`/`a2aStreaming`/
|
|
29
32
|
* `conversationIdleTimeout` moved out of this list in issue #170,
|
|
30
33
|
* `a2aCreateRecordEnabled` in issue #215 — they're now emitted (see the
|
|
@@ -42,13 +45,14 @@ const UNSUPPORTED_AGENT_KNOBS = [
|
|
|
42
45
|
];
|
|
43
46
|
/**
|
|
44
47
|
* `runAs` authoring is the opaque object shape shared with agent-tool's
|
|
45
|
-
* `runAs` (board item B28(d));
|
|
48
|
+
* `runAs` (the remaining agent-level portion of board item B28(d));
|
|
49
|
+
* `elementum_agent.run_as` on the wire is a
|
|
46
50
|
* bare string and only `"current_user"` is documented for agents (unlike
|
|
47
51
|
* tools, which also accept `"publisher"`/`"service_account"`) — mirrors
|
|
48
52
|
* `parseRunAs` in `from-tf.ts`.
|
|
49
53
|
*/
|
|
50
54
|
function runAsValue(runAs, where, diagnostics) {
|
|
51
|
-
if (
|
|
55
|
+
if ("currentUser" in runAs)
|
|
52
56
|
return "current_user";
|
|
53
57
|
diagnostics.push(`${where}: runAs ${JSON.stringify(runAs)} has no terraform-path encoding yet (only { currentUser: true } is supported); dropped`);
|
|
54
58
|
return undefined;
|
|
@@ -73,6 +77,21 @@ function jwtAuthenticationValue(auth) {
|
|
|
73
77
|
}
|
|
74
78
|
return value;
|
|
75
79
|
}
|
|
80
|
+
function serviceAccountValue(name, ctx) {
|
|
81
|
+
const matches = Object.entries(ctx.serviceAccounts ?? {}).filter(([, account]) => `${account.firstName} ${account.lastName}`.trim() === name);
|
|
82
|
+
if (matches.length > 1) {
|
|
83
|
+
throw new EntityTfError(`service account name ${JSON.stringify(name)} is ambiguous in app ${JSON.stringify(ctx.appRefName)}`);
|
|
84
|
+
}
|
|
85
|
+
const local = matches[0];
|
|
86
|
+
if (local !== undefined) {
|
|
87
|
+
return expr.resourceAttr(SERVICE_ACCOUNT_RESOURCE_TYPE, appScopedResourceLabel(ctx.appTfLabel, tsLabelToTfLabel(local[0])), ["id"]);
|
|
88
|
+
}
|
|
89
|
+
const label = appScopedResourceLabel(ctx.appTfLabel, sanitizeName(name));
|
|
90
|
+
ctx.orgRefs.rawLookup(SERVICE_ACCOUNT_RESOURCE_TYPE, label, name, {
|
|
91
|
+
app_id: expr.resourceAttr(APP_RESOURCE_TYPE, ctx.appTfLabel, ["id"]),
|
|
92
|
+
});
|
|
93
|
+
return expr.dataAttr(SERVICE_ACCOUNT_RESOURCE_TYPE, label, ["id"]);
|
|
94
|
+
}
|
|
76
95
|
function toSortableAgents(entities) {
|
|
77
96
|
const out = [];
|
|
78
97
|
for (const entity of entities) {
|
|
@@ -164,8 +183,29 @@ function skillIdValue(token, ctx) {
|
|
|
164
183
|
return expr.resourceAttr(SKILL_RESOURCE_TYPE, appScopedResourceLabel(ctx.appTfLabel, tsLabelToTfLabel(refName)), ["id"]);
|
|
165
184
|
}
|
|
166
185
|
const name = token.name ?? refName;
|
|
167
|
-
|
|
168
|
-
|
|
186
|
+
if (name === "") {
|
|
187
|
+
throw new EntityTfError(`agent skillAccess: foreign skill token "${refName}" has no platform name; regenerate the owning app catalog so skillRef({ name }) is retained`);
|
|
188
|
+
}
|
|
189
|
+
if (token.parent === undefined || token.parentName === undefined || token.parentName === "") {
|
|
190
|
+
throw new EntityTfError(`agent skillAccess: foreign skill "${name}" has no owning app identity; use the skill token from its generated app catalog`);
|
|
191
|
+
}
|
|
192
|
+
const sibling = ctx.workspaceAspects?.get(workspaceAspectKey("app", token.parent));
|
|
193
|
+
let appId;
|
|
194
|
+
let ownerTfLabel;
|
|
195
|
+
if (sibling !== undefined) {
|
|
196
|
+
ownerTfLabel = sibling.tfLabel;
|
|
197
|
+
appId = expr.resourceAttr(APP_RESOURCE_TYPE, sibling.tfLabel, ["id"]);
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
200
|
+
ownerTfLabel = sanitizeName(token.parentName);
|
|
201
|
+
ctx.orgRefs.foreignApp(ownerTfLabel, token.parentName);
|
|
202
|
+
appId = expr.dataAttr(APP_RESOURCE_TYPE, ownerTfLabel, ["id"]);
|
|
203
|
+
}
|
|
204
|
+
// A skill name is only unique within its owning app. Scope the Terraform
|
|
205
|
+
// label too, or same-named skills from two foreign apps would collapse to
|
|
206
|
+
// one data block and both references would silently resolve to its last owner.
|
|
207
|
+
const tfLabel = appScopedResourceLabel(ownerTfLabel, sanitizeName(name));
|
|
208
|
+
ctx.orgRefs.foreignSkill(tfLabel, name, appId);
|
|
169
209
|
return expr.dataAttr(SKILL_RESOURCE_TYPE, tfLabel, ["id"]);
|
|
170
210
|
}
|
|
171
211
|
/** `elementum_agent` + one tool resource per implemented tool, in ei's dialect. */
|
|
@@ -176,7 +216,7 @@ export function agentToTf(entity, ctx) {
|
|
|
176
216
|
const payload = entity.payload;
|
|
177
217
|
const elementum = payload?.agent?.elementum;
|
|
178
218
|
if (payload === null || typeof payload !== "object" || elementum === undefined) {
|
|
179
|
-
throw new EntityTfError(`agent "${entity.refName}" has no agent.elementum payload — was it built with
|
|
219
|
+
throw new EntityTfError(`agent "${entity.refName}" has no agent.elementum payload — was it built with agent?`);
|
|
180
220
|
}
|
|
181
221
|
// The bag key IS the label (the stable naming contract) — the agent's
|
|
182
222
|
// refName comes from its file name, exactly like an app's.
|
|
@@ -245,9 +285,18 @@ export function agentToTf(entity, ctx) {
|
|
|
245
285
|
appRefName: ctx.appRefName,
|
|
246
286
|
appTfLabel: ctx.appTfLabel,
|
|
247
287
|
agentBareTfLabel,
|
|
248
|
-
foreignAppRef: (l, n) => ctx.orgRefs.foreignApp(l, n),
|
|
249
|
-
foreignElementRef: (l, n) => ctx.orgRefs.foreignElement(l, n),
|
|
288
|
+
foreignAppRef: (l, n, ns) => ctx.orgRefs.foreignApp(l, n, ns),
|
|
289
|
+
foreignElementRef: (l, n, ns) => ctx.orgRefs.foreignElement(l, n, ns),
|
|
290
|
+
foreignAutomationRef: (l, n, owner) => {
|
|
291
|
+
const ownerKind = owner.kind === "element" ? "element" : "app";
|
|
292
|
+
const ownerRef = resolveForeignRef(ownerKind, { name: owner.name, namespace: owner.namespace }, ctx.orgRefs, ctx.diagnostics, `agent run-automation owner`);
|
|
293
|
+
ctx.orgRefs.rawLookup("elementum_automation", l, n, {
|
|
294
|
+
app_id: ownerRef.value,
|
|
295
|
+
});
|
|
296
|
+
},
|
|
250
297
|
foreignFieldRef: (t, l, o, n) => ctx.orgRefs.foreignField(t, l, o, n),
|
|
298
|
+
workspaceAspects: ctx.workspaceAspects,
|
|
299
|
+
serviceAccountRef: (_label, serviceAccountName) => serviceAccountValue(serviceAccountName, ctx),
|
|
251
300
|
diagnostics: ctx.diagnostics,
|
|
252
301
|
});
|
|
253
302
|
if (tool !== undefined)
|
|
@@ -10,14 +10,29 @@
|
|
|
10
10
|
* object. Optional `startMessage` / `runAs` are emitted only when supplied,
|
|
11
11
|
* matching the v1 serializer's field-by-field discipline.
|
|
12
12
|
*/
|
|
13
|
-
import type { AutomationCatalogRef, AgentRef,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
export type AgentToolRunAs
|
|
13
|
+
import type { AutomationCatalogRef, AgentRef, AppCatalogRef, AutomationRef, ElementCatalogRef, FieldRef, OutputPropertyRef, SearchTableRef, TriggerParameterRef } from "../../catalog/index.js";
|
|
14
|
+
import type { UnsafePlatformId } from "../../core/platform-id.js";
|
|
15
|
+
import type { AgentToolRunAs } from "./run-as.js";
|
|
16
|
+
import type { Filter } from "../automation/filter.js";
|
|
17
|
+
export type { AgentToolRunAs, ServiceAccountRef } from "./run-as.js";
|
|
18
|
+
declare const agentToolBrand: unique symbol;
|
|
19
|
+
/** A closed factory result; arbitrary records cannot be added to an agent's tool list. */
|
|
20
|
+
export type AgentTool = Record<string, unknown> & {
|
|
21
|
+
readonly [agentToolBrand]: "AgentTool";
|
|
22
|
+
};
|
|
18
23
|
/** A field exposed to a search tool. */
|
|
19
|
-
|
|
20
|
-
|
|
24
|
+
type ToolTarget = AppCatalogRef | ElementCatalogRef;
|
|
25
|
+
type TargetOption<Target extends ToolTarget> = Target extends {
|
|
26
|
+
readonly __kind: "app";
|
|
27
|
+
} ? {
|
|
28
|
+
readonly app: Target;
|
|
29
|
+
readonly element?: never;
|
|
30
|
+
} : {
|
|
31
|
+
readonly app?: never;
|
|
32
|
+
readonly element: Target;
|
|
33
|
+
};
|
|
34
|
+
export interface AgentSearchField<Target extends ToolTarget = ToolTarget> {
|
|
35
|
+
readonly field: FieldRef<Target["refName"]>;
|
|
21
36
|
readonly name?: string;
|
|
22
37
|
/** Required by the provider on every tool field. */
|
|
23
38
|
readonly description: string;
|
|
@@ -32,41 +47,52 @@ export interface AgentSearchField {
|
|
|
32
47
|
* `edk pull app` round-tripping an existing tool.
|
|
33
48
|
*/
|
|
34
49
|
export interface AgentSearchRawIdField {
|
|
35
|
-
readonly fieldId:
|
|
50
|
+
readonly fieldId: UnsafePlatformId;
|
|
36
51
|
readonly name?: string;
|
|
37
52
|
readonly description: string;
|
|
38
53
|
}
|
|
39
|
-
export type AgentSearchFieldInput = AgentSearchField | AgentSearchRawIdField;
|
|
54
|
+
export type AgentSearchFieldInput<Target extends ToolTarget = ToolTarget> = AgentSearchField<Target> | AgentSearchRawIdField;
|
|
55
|
+
/** A typed target field exposed through a search-table tool's newer fields dialect. */
|
|
56
|
+
export interface AgentSearchTableField<Target extends ElementCatalogRef = ElementCatalogRef> {
|
|
57
|
+
readonly field: FieldRef<Target["refName"]>;
|
|
58
|
+
readonly name?: string;
|
|
59
|
+
readonly description?: string;
|
|
60
|
+
}
|
|
40
61
|
/**
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
* live, searchTable's fields describe columns of the search table's own
|
|
45
|
-
* schema, not app/element fields, so there's no `elementum_*_field`
|
|
46
|
-
* resource to reference (same raw-id convention as
|
|
47
|
-
* `TableRecordsSearchOptions.table`).
|
|
62
|
+
* Pull-fidelity fallback when a non-recursive export cannot map a search-table
|
|
63
|
+
* field id to the target element's catalog. Recursive pull upgrades known ids
|
|
64
|
+
* to {@link AgentSearchTableField}.
|
|
48
65
|
*/
|
|
49
|
-
export interface
|
|
50
|
-
readonly fieldId:
|
|
66
|
+
export interface AgentSearchTableRawIdField {
|
|
67
|
+
readonly fieldId: UnsafePlatformId;
|
|
51
68
|
readonly name?: string;
|
|
52
69
|
readonly description?: string;
|
|
53
70
|
}
|
|
71
|
+
export type AgentSearchTableFieldInput<Target extends ElementCatalogRef = ElementCatalogRef> = AgentSearchTableField<Target> | AgentSearchTableRawIdField;
|
|
54
72
|
/**
|
|
55
73
|
* A field exposed to a searchTable tool's legacy `return_fields` wire shape
|
|
56
74
|
* (field_id/name/display_name, no description) — the dialect most existing
|
|
57
75
|
* elementum_agent_ai_search_tool resources still use; the provider is
|
|
58
76
|
* deprecating it in favor of the same shape as {@link AgentSearchTableField},
|
|
59
77
|
* but both are live on the platform today (see `agentSearchTable`'s doc
|
|
60
|
-
* comment).
|
|
78
|
+
* comment). Recursive pull resolves the same target-owned field identity as
|
|
79
|
+
* the newer dialect.
|
|
61
80
|
*/
|
|
62
|
-
export interface AgentSearchReturnField {
|
|
63
|
-
readonly
|
|
81
|
+
export interface AgentSearchReturnField<Target extends ElementCatalogRef = ElementCatalogRef> {
|
|
82
|
+
readonly field: FieldRef<Target["refName"]>;
|
|
64
83
|
readonly name?: string;
|
|
65
84
|
readonly displayName?: string;
|
|
66
85
|
}
|
|
86
|
+
/** Raw-id fallback for an unresolved legacy return_fields entry. */
|
|
87
|
+
export interface AgentSearchRawIdReturnField {
|
|
88
|
+
readonly fieldId: UnsafePlatformId;
|
|
89
|
+
readonly name?: string;
|
|
90
|
+
readonly displayName?: string;
|
|
91
|
+
}
|
|
92
|
+
export type AgentSearchReturnFieldInput<Target extends ElementCatalogRef = ElementCatalogRef> = AgentSearchReturnField<Target> | AgentSearchRawIdReturnField;
|
|
67
93
|
/** A field the agent can populate/modify via a create/update record tool. */
|
|
68
|
-
export interface AgentRecordField {
|
|
69
|
-
readonly field: FieldRef
|
|
94
|
+
export interface AgentRecordField<Target extends ToolTarget = ToolTarget> {
|
|
95
|
+
readonly field: FieldRef<Target["refName"]>;
|
|
70
96
|
readonly name?: string;
|
|
71
97
|
/** Required by the provider on every tool field. */
|
|
72
98
|
readonly description: string;
|
|
@@ -79,13 +105,14 @@ export interface AgentRecordField {
|
|
|
79
105
|
* (board issue #169), for createRecord/updateRecord tools instead of search.
|
|
80
106
|
*/
|
|
81
107
|
export interface AgentRecordRawIdField {
|
|
82
|
-
readonly fieldId:
|
|
108
|
+
readonly fieldId: UnsafePlatformId;
|
|
83
109
|
readonly name?: string;
|
|
84
110
|
/** Required by the provider on every tool field. */
|
|
85
111
|
readonly description: string;
|
|
86
112
|
readonly required?: boolean;
|
|
113
|
+
readonly defaultValue?: string;
|
|
87
114
|
}
|
|
88
|
-
export type AgentRecordFieldInput = AgentRecordField | AgentRecordRawIdField;
|
|
115
|
+
export type AgentRecordFieldInput<Target extends ToolTarget = ToolTarget> = AgentRecordField<Target> | AgentRecordRawIdField;
|
|
89
116
|
/** Input-parameter mapping for an execute-workflow tool. */
|
|
90
117
|
export interface AgentExecuteWorkflowInput {
|
|
91
118
|
readonly name: string;
|
|
@@ -111,50 +138,50 @@ interface CommonToolOptions {
|
|
|
111
138
|
readonly startMessage?: string;
|
|
112
139
|
readonly runAs?: AgentToolRunAs;
|
|
113
140
|
}
|
|
114
|
-
export
|
|
115
|
-
readonly aspect: AspectRef;
|
|
141
|
+
export type SearchRecordsToolOptions<Target extends ToolTarget = ToolTarget> = CommonToolOptions & TargetOption<Target> & {
|
|
116
142
|
readonly queryDescription: string;
|
|
117
|
-
readonly fields?: readonly AgentSearchFieldInput[];
|
|
143
|
+
readonly fields?: readonly AgentSearchFieldInput<Target>[];
|
|
118
144
|
/** Pre-built wire `Filter` (may embed `FieldRef` tokens — resolved at deploy). */
|
|
119
|
-
readonly filter?:
|
|
145
|
+
readonly filter?: Filter;
|
|
120
146
|
/** Pre-built wire `Sort` (`{ orders: [{ field, direction }] }`). */
|
|
121
147
|
readonly sort?: Record<string, unknown>;
|
|
122
148
|
readonly limit?: number;
|
|
123
|
-
}
|
|
124
|
-
export declare function
|
|
149
|
+
};
|
|
150
|
+
export declare function agentSearchRecords<Target extends ToolTarget>(opts: SearchRecordsToolOptions<Target>): AgentTool;
|
|
125
151
|
/**
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
* (unlike searchAspect) — a search table tool doesn't always need a live
|
|
132
|
-
* record target. `fields`/`returnFields` are mutually exclusive: most
|
|
152
|
+
* A search-table tool takes the owning element, its typed SearchTableRef, and
|
|
153
|
+
* typed fields from that same element. The provider exports the field ids as
|
|
154
|
+
* strings, but recursive pull maps known ids back to those catalog fields;
|
|
155
|
+
* unresolved non-recursive exports retain an explicit raw-id fallback.
|
|
156
|
+
* `fields`/`returnFields` are mutually exclusive: most
|
|
133
157
|
* existing tools use the legacy `return_fields` wire shape (`returnFields`,
|
|
134
158
|
* field_id/name/displayName), which the provider is deprecating in favor of
|
|
135
159
|
* the same shape searchAspect already uses (`fields`, field_id/name/
|
|
136
160
|
* description) — both are live on the platform today, so both round-trip.
|
|
137
161
|
*/
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
162
|
+
/** A search-table tool targets the ELEMENT that owns the search table — never an app. */
|
|
163
|
+
type SearchTableFieldDialect<Target extends ElementCatalogRef> = {
|
|
164
|
+
/** Newer field shape — mutually exclusive with `returnFields`. */
|
|
165
|
+
readonly fields?: readonly AgentSearchTableFieldInput<Target>[];
|
|
166
|
+
readonly returnFields?: never;
|
|
167
|
+
} | {
|
|
168
|
+
readonly fields?: never;
|
|
169
|
+
/** Legacy field shape — mutually exclusive with `fields`. */
|
|
170
|
+
readonly returnFields?: readonly AgentSearchReturnFieldInput<Target>[];
|
|
171
|
+
};
|
|
172
|
+
export type SearchTableToolV2<Target extends ElementCatalogRef = ElementCatalogRef> = CommonToolOptions & TargetOption<Target> & {
|
|
173
|
+
readonly table: SearchTableRef;
|
|
141
174
|
readonly queryDescription: string;
|
|
142
|
-
|
|
143
|
-
readonly fields?: readonly AgentSearchTableField[];
|
|
144
|
-
/** searchTable's legacy field shape — mutually exclusive with `fields`. */
|
|
145
|
-
readonly returnFields?: readonly AgentSearchReturnField[];
|
|
146
|
-
readonly filter?: Record<string, unknown>;
|
|
175
|
+
readonly filter?: Filter;
|
|
147
176
|
readonly limit?: number;
|
|
148
|
-
}
|
|
149
|
-
export declare function agentSearchTable(opts: SearchTableToolV2): AgentTool;
|
|
150
|
-
export
|
|
151
|
-
readonly
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
export
|
|
155
|
-
|
|
156
|
-
readonly aspect: AspectRef;
|
|
157
|
-
readonly fields?: readonly AgentRecordFieldInput[];
|
|
177
|
+
} & SearchTableFieldDialect<Target>;
|
|
178
|
+
export declare function agentSearchTable<Target extends ElementCatalogRef = ElementCatalogRef>(opts: SearchTableToolV2<Target>): AgentTool;
|
|
179
|
+
export type CreateRecordToolV2<Target extends ToolTarget = ToolTarget> = CommonToolOptions & TargetOption<Target> & {
|
|
180
|
+
readonly fields?: readonly AgentRecordFieldInput<Target>[];
|
|
181
|
+
};
|
|
182
|
+
export declare function agentCreateRecord<Target extends ToolTarget>(opts: CreateRecordToolV2<Target>): AgentTool;
|
|
183
|
+
export type UpdateRecordToolV2<Target extends ToolTarget = ToolTarget> = CommonToolOptions & TargetOption<Target> & {
|
|
184
|
+
readonly fields?: readonly AgentRecordFieldInput<Target>[];
|
|
158
185
|
/**
|
|
159
186
|
* How the agent should identify which record to update — the provider
|
|
160
187
|
* requires this (there's no way to infer it) and rejects an empty value
|
|
@@ -162,13 +189,19 @@ export interface UpdateRecordToolV2 extends CommonToolOptions {
|
|
|
162
189
|
* here instead. Example: "Identify the ticket by its ID or subject line."
|
|
163
190
|
*/
|
|
164
191
|
readonly handleDescription: string;
|
|
165
|
-
}
|
|
166
|
-
export declare function agentUpdateRecord(opts: UpdateRecordToolV2): AgentTool;
|
|
167
|
-
|
|
168
|
-
readonly
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
192
|
+
};
|
|
193
|
+
export declare function agentUpdateRecord<Target extends ToolTarget>(opts: UpdateRecordToolV2<Target>): AgentTool;
|
|
194
|
+
type RelatedTargetOption<Target extends ToolTarget> = Target extends {
|
|
195
|
+
readonly __kind: "app";
|
|
196
|
+
} ? {
|
|
197
|
+
readonly relatedApp: Target;
|
|
198
|
+
readonly relatedElement?: never;
|
|
199
|
+
} : {
|
|
200
|
+
readonly relatedApp?: never;
|
|
201
|
+
readonly relatedElement: Target;
|
|
202
|
+
};
|
|
203
|
+
export type RelateRecordToolV2<Target extends ToolTarget = ToolTarget, RelatedTarget extends ToolTarget = ToolTarget> = CommonToolOptions & TargetOption<Target> & RelatedTargetOption<RelatedTarget>;
|
|
204
|
+
export declare function agentRelateRecord<Target extends ToolTarget, RelatedTarget extends ToolTarget>(opts: RelateRecordToolV2<Target, RelatedTarget>): AgentTool;
|
|
172
205
|
export interface ExecuteWorkflowToolV2 extends CommonToolOptions {
|
|
173
206
|
readonly automation: AutomationRef;
|
|
174
207
|
readonly inputs?: readonly AgentExecuteWorkflowInput[];
|
|
@@ -254,7 +287,7 @@ export type RunAutomationToolV2<A extends AutomationCatalogRef> = CommonToolOpti
|
|
|
254
287
|
* parameter / output property names, every REQUIRED parameter must be
|
|
255
288
|
* mapped (a non-optional key), and a required parameter's input must set
|
|
256
289
|
* `required: true`. The agent-facing name defaults to the record key;
|
|
257
|
-
* override with `name:`. `
|
|
290
|
+
* override with `name:`. `agent().def()` re-validates at runtime.
|
|
258
291
|
*
|
|
259
292
|
* Reference tokens are synthesized from the record keys alone — the factory
|
|
260
293
|
* never dereferences `automation.trigger`/`outputs`, so agent files load
|
|
@@ -276,9 +309,3 @@ export interface McpToolV2 extends CommonToolOptions {
|
|
|
276
309
|
readonly headers?: readonly AgentMcpHeader[];
|
|
277
310
|
}
|
|
278
311
|
export declare function agentMcp(opts: McpToolV2): AgentTool;
|
|
279
|
-
export interface SelectBotRouteToolV2 extends CommonToolOptions {
|
|
280
|
-
/** Bot route target id. Bots aren't modeled in the catalog yet — raw id. */
|
|
281
|
-
readonly botId: string;
|
|
282
|
-
}
|
|
283
|
-
export declare function agentSelectBotRoute(opts: SelectBotRouteToolV2): AgentTool;
|
|
284
|
-
export {};
|
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
import { isValidToolName } from "../agent-tool/types.js";
|
|
2
|
+
function targetOf(opts) {
|
|
3
|
+
return ("app" in opts && opts.app !== undefined ? opts.app : opts.element);
|
|
4
|
+
}
|
|
5
|
+
function serializeRunAs(runAs) {
|
|
6
|
+
if ("currentUser" in runAs)
|
|
7
|
+
return { currentUser: true };
|
|
8
|
+
if ("publisher" in runAs)
|
|
9
|
+
return { publisher: true };
|
|
10
|
+
return { serviceAccount: runAs.serviceAccount };
|
|
11
|
+
}
|
|
2
12
|
/**
|
|
3
13
|
* Hydra hard-codes the execute-workflow timeout to PT10M and ignores any other
|
|
4
14
|
* value; mirror v1 so pull→edit→redeploy round-trips stay stable.
|
|
5
15
|
*/
|
|
6
16
|
const EXECUTE_WORKFLOW_TIMEOUT = "PT10M";
|
|
7
17
|
function common(opts) {
|
|
8
|
-
// Authoring-layer name check (mirrors
|
|
18
|
+
// Authoring-layer name check (mirrors app's handle/namespace guards).
|
|
9
19
|
// Every tool factory routes through here, so this is the single enforcement
|
|
10
20
|
// point — the tf passes never re-check.
|
|
11
21
|
if (!isValidToolName(opts.name)) {
|
|
@@ -16,14 +26,17 @@ function common(opts) {
|
|
|
16
26
|
name: opts.name,
|
|
17
27
|
description: opts.description,
|
|
18
28
|
...(opts.startMessage !== undefined ? { startMessage: opts.startMessage } : {}),
|
|
19
|
-
...(opts.runAs !== undefined ? { runAs: opts.runAs } : {}),
|
|
29
|
+
...(opts.runAs !== undefined ? { runAs: serializeRunAs(opts.runAs) } : {}),
|
|
20
30
|
};
|
|
21
31
|
}
|
|
32
|
+
function tool(value) {
|
|
33
|
+
return value;
|
|
34
|
+
}
|
|
22
35
|
function searchFieldToken(f) {
|
|
23
36
|
if ("fieldId" in f) {
|
|
24
37
|
// Raw platform id fallback — see AgentSearchRawIdField's comment.
|
|
25
38
|
return {
|
|
26
|
-
fieldId: f.fieldId,
|
|
39
|
+
fieldId: f.fieldId.value,
|
|
27
40
|
...(f.name !== undefined ? { name: f.name } : {}),
|
|
28
41
|
description: f.description,
|
|
29
42
|
};
|
|
@@ -39,15 +52,29 @@ function searchFieldToken(f) {
|
|
|
39
52
|
};
|
|
40
53
|
}
|
|
41
54
|
function searchTableFieldToken(f) {
|
|
55
|
+
if ("fieldId" in f) {
|
|
56
|
+
return {
|
|
57
|
+
fieldId: f.fieldId.value,
|
|
58
|
+
...(f.name !== undefined ? { name: f.name } : {}),
|
|
59
|
+
...(f.description !== undefined ? { description: f.description } : {}),
|
|
60
|
+
};
|
|
61
|
+
}
|
|
42
62
|
return {
|
|
43
|
-
fieldId: f.
|
|
63
|
+
fieldId: f.field,
|
|
44
64
|
...(f.name !== undefined ? { name: f.name } : {}),
|
|
45
65
|
...(f.description !== undefined ? { description: f.description } : {}),
|
|
46
66
|
};
|
|
47
67
|
}
|
|
48
68
|
function returnFieldToken(f) {
|
|
69
|
+
if ("fieldId" in f) {
|
|
70
|
+
return {
|
|
71
|
+
fieldId: f.fieldId.value,
|
|
72
|
+
...(f.name !== undefined ? { name: f.name } : {}),
|
|
73
|
+
...(f.displayName !== undefined ? { displayName: f.displayName } : {}),
|
|
74
|
+
};
|
|
75
|
+
}
|
|
49
76
|
return {
|
|
50
|
-
fieldId: f.
|
|
77
|
+
fieldId: f.field,
|
|
51
78
|
...(f.name !== undefined ? { name: f.name } : {}),
|
|
52
79
|
...(f.displayName !== undefined ? { displayName: f.displayName } : {}),
|
|
53
80
|
};
|
|
@@ -56,10 +83,11 @@ function recordFieldToken(f) {
|
|
|
56
83
|
if ("fieldId" in f) {
|
|
57
84
|
// Raw platform id fallback — see AgentRecordRawIdField's comment.
|
|
58
85
|
return {
|
|
59
|
-
fieldId: f.fieldId,
|
|
86
|
+
fieldId: f.fieldId.value,
|
|
60
87
|
...(f.name !== undefined ? { name: f.name } : {}),
|
|
61
88
|
description: f.description,
|
|
62
89
|
...(f.required !== undefined ? { required: f.required } : {}),
|
|
90
|
+
...(f.defaultValue !== undefined ? { defaultValue: f.defaultValue } : {}),
|
|
63
91
|
};
|
|
64
92
|
}
|
|
65
93
|
// Provider requires `name` on every tool field — default to the field's
|
|
@@ -74,66 +102,66 @@ function recordFieldToken(f) {
|
|
|
74
102
|
...(f.defaultValue !== undefined ? { defaultValue: f.defaultValue } : {}),
|
|
75
103
|
};
|
|
76
104
|
}
|
|
77
|
-
export function
|
|
78
|
-
return {
|
|
105
|
+
export function agentSearchRecords(opts) {
|
|
106
|
+
return tool({
|
|
79
107
|
searchAspect: {
|
|
80
108
|
...common(opts),
|
|
81
|
-
aspectId: opts
|
|
109
|
+
aspectId: targetOf(opts),
|
|
82
110
|
queryDescription: opts.queryDescription,
|
|
83
111
|
...(opts.fields !== undefined ? { fields: opts.fields.map(searchFieldToken) } : {}),
|
|
84
112
|
...(opts.filter !== undefined ? { filter: opts.filter } : {}),
|
|
85
113
|
...(opts.sort !== undefined ? { sort: opts.sort } : {}),
|
|
86
114
|
...(opts.limit !== undefined ? { limit: opts.limit } : {}),
|
|
87
115
|
},
|
|
88
|
-
};
|
|
116
|
+
});
|
|
89
117
|
}
|
|
90
118
|
export function agentSearchTable(opts) {
|
|
91
|
-
return {
|
|
119
|
+
return tool({
|
|
92
120
|
searchTable: {
|
|
93
121
|
...common(opts),
|
|
94
|
-
|
|
122
|
+
aspectId: targetOf(opts),
|
|
95
123
|
searchTableId: opts.table,
|
|
96
124
|
queryDescription: opts.queryDescription,
|
|
97
|
-
// Distinct
|
|
98
|
-
//
|
|
99
|
-
// raw platform ids instead, see AgentSearchTableField's comment.
|
|
125
|
+
// Distinct internal keys preserve the provider's newer `fields` and
|
|
126
|
+
// legacy `return_fields` dialects while both carry typed FieldRefs.
|
|
100
127
|
...(opts.fields !== undefined ? { searchTableFields: opts.fields.map(searchTableFieldToken) } : {}),
|
|
101
128
|
...(opts.returnFields !== undefined ? { returnFields: opts.returnFields.map(returnFieldToken) } : {}),
|
|
102
129
|
...(opts.filter !== undefined ? { filter: opts.filter } : {}),
|
|
103
130
|
...(opts.limit !== undefined ? { limit: opts.limit } : {}),
|
|
104
131
|
},
|
|
105
|
-
};
|
|
132
|
+
});
|
|
106
133
|
}
|
|
107
134
|
export function agentCreateRecord(opts) {
|
|
108
|
-
return {
|
|
135
|
+
return tool({
|
|
109
136
|
createRecord: {
|
|
110
137
|
...common(opts),
|
|
111
|
-
aspectId: opts
|
|
138
|
+
aspectId: targetOf(opts),
|
|
112
139
|
...(opts.fields !== undefined ? { fields: opts.fields.map(recordFieldToken) } : {}),
|
|
113
140
|
},
|
|
114
|
-
};
|
|
141
|
+
});
|
|
115
142
|
}
|
|
116
143
|
export function agentUpdateRecord(opts) {
|
|
117
|
-
return {
|
|
144
|
+
return tool({
|
|
118
145
|
updateRecord: {
|
|
119
146
|
...common(opts),
|
|
120
|
-
aspectId: opts
|
|
147
|
+
aspectId: targetOf(opts),
|
|
121
148
|
...(opts.fields !== undefined ? { fields: opts.fields.map(recordFieldToken) } : {}),
|
|
122
149
|
handleDescription: opts.handleDescription,
|
|
123
150
|
},
|
|
124
|
-
};
|
|
151
|
+
});
|
|
125
152
|
}
|
|
126
153
|
export function agentRelateRecord(opts) {
|
|
127
|
-
|
|
154
|
+
const relatedTarget = "relatedApp" in opts && opts.relatedApp !== undefined ? opts.relatedApp : opts.relatedElement;
|
|
155
|
+
return tool({
|
|
128
156
|
relateRecord: {
|
|
129
157
|
...common(opts),
|
|
130
|
-
aspectId: opts
|
|
131
|
-
relatedAspectId:
|
|
158
|
+
aspectId: targetOf(opts),
|
|
159
|
+
relatedAspectId: relatedTarget,
|
|
132
160
|
},
|
|
133
|
-
};
|
|
161
|
+
});
|
|
134
162
|
}
|
|
135
163
|
export function agentExecuteWorkflow(opts) {
|
|
136
|
-
return {
|
|
164
|
+
return tool({
|
|
137
165
|
executeWorkflow: {
|
|
138
166
|
...common(opts),
|
|
139
167
|
automationId: opts.automation,
|
|
@@ -162,7 +190,7 @@ export function agentExecuteWorkflow(opts) {
|
|
|
162
190
|
}
|
|
163
191
|
: {}),
|
|
164
192
|
},
|
|
165
|
-
};
|
|
193
|
+
});
|
|
166
194
|
}
|
|
167
195
|
/**
|
|
168
196
|
* Run Automation tool (the product-language name; the wire kind is
|
|
@@ -171,7 +199,7 @@ export function agentExecuteWorkflow(opts) {
|
|
|
171
199
|
* parameter / output property names, every REQUIRED parameter must be
|
|
172
200
|
* mapped (a non-optional key), and a required parameter's input must set
|
|
173
201
|
* `required: true`. The agent-facing name defaults to the record key;
|
|
174
|
-
* override with `name:`. `
|
|
202
|
+
* override with `name:`. `agent().def()` re-validates at runtime.
|
|
175
203
|
*
|
|
176
204
|
* Reference tokens are synthesized from the record keys alone — the factory
|
|
177
205
|
* never dereferences `automation.trigger`/`outputs`, so agent files load
|
|
@@ -197,7 +225,7 @@ export function agentRunAutomation(opts) {
|
|
|
197
225
|
workflowPropertyName: prop,
|
|
198
226
|
workflowOutputPropertyId: { __kind: "outputProperty", refName: prop, name: prop, parent: opts.automation.refName },
|
|
199
227
|
}));
|
|
200
|
-
return {
|
|
228
|
+
return tool({
|
|
201
229
|
executeWorkflow: {
|
|
202
230
|
...common(opts),
|
|
203
231
|
automationId: opts.automation,
|
|
@@ -205,19 +233,19 @@ export function agentRunAutomation(opts) {
|
|
|
205
233
|
...(inputs.length > 0 ? { inputs } : {}),
|
|
206
234
|
...(outputs.length > 0 ? { outputs } : {}),
|
|
207
235
|
},
|
|
208
|
-
};
|
|
236
|
+
});
|
|
209
237
|
}
|
|
210
238
|
export function agentRunAgent(opts) {
|
|
211
|
-
return {
|
|
239
|
+
return tool({
|
|
212
240
|
runAgent: {
|
|
213
241
|
...common(opts),
|
|
214
242
|
targetAgentId: opts.agent,
|
|
215
243
|
workerTaskPrompt: opts.workerTaskPrompt,
|
|
216
244
|
},
|
|
217
|
-
};
|
|
245
|
+
});
|
|
218
246
|
}
|
|
219
247
|
export function agentMcp(opts) {
|
|
220
|
-
return {
|
|
248
|
+
return tool({
|
|
221
249
|
mcp: {
|
|
222
250
|
...common(opts),
|
|
223
251
|
serverUrl: opts.serverUrl,
|
|
@@ -226,13 +254,5 @@ export function agentMcp(opts) {
|
|
|
226
254
|
? { headers: opts.headers.map((h) => ({ key: h.key, value: h.value })) }
|
|
227
255
|
: {}),
|
|
228
256
|
},
|
|
229
|
-
};
|
|
230
|
-
}
|
|
231
|
-
export function agentSelectBotRoute(opts) {
|
|
232
|
-
return {
|
|
233
|
-
selectBotRoute: {
|
|
234
|
-
...common(opts),
|
|
235
|
-
botId: opts.botId,
|
|
236
|
-
},
|
|
237
|
-
};
|
|
257
|
+
});
|
|
238
258
|
}
|
|
@@ -16,7 +16,7 @@ function optionalStringArray(attrs, key, where, ctx) {
|
|
|
16
16
|
ctx.diagnostics.push(`${where}: expected a list of strings "${key}", got ${JSON.stringify(v)}; dropped`);
|
|
17
17
|
return undefined;
|
|
18
18
|
}
|
|
19
|
-
return v;
|
|
19
|
+
return [...v].sort();
|
|
20
20
|
}
|
|
21
21
|
/** One a2a-skill block → its normalized shape; undefined = skipped with a diagnostic (wrong owner, missing required attr). */
|
|
22
22
|
export function a2aSkillFromTf(block, owner, ctx) {
|
|
@@ -35,13 +35,13 @@ export function a2aSkillToTf(entry, ctx) {
|
|
|
35
35
|
description: entry.description,
|
|
36
36
|
};
|
|
37
37
|
if (entry.tags !== undefined && entry.tags.length > 0)
|
|
38
|
-
attrs["tags"] = entry.tags;
|
|
38
|
+
attrs["tags"] = [...entry.tags].sort();
|
|
39
39
|
if (entry.examples !== undefined && entry.examples.length > 0)
|
|
40
|
-
attrs["examples"] = entry.examples;
|
|
40
|
+
attrs["examples"] = [...entry.examples].sort();
|
|
41
41
|
if (entry.inputModes !== undefined && entry.inputModes.length > 0)
|
|
42
|
-
attrs["input_modes"] = entry.inputModes;
|
|
42
|
+
attrs["input_modes"] = [...entry.inputModes].sort();
|
|
43
43
|
if (entry.outputModes !== undefined && entry.outputModes.length > 0)
|
|
44
|
-
attrs["output_modes"] = entry.outputModes;
|
|
44
|
+
attrs["output_modes"] = [...entry.outputModes].sort();
|
|
45
45
|
const block = { kind: "resource", type: AGENT_A2A_SKILL_RESOURCE_TYPE, label: tfLabel, attrs };
|
|
46
46
|
return { block, address: `${AGENT_A2A_SKILL_RESOURCE_TYPE}.${tfLabel}` };
|
|
47
47
|
}
|