@elementumai/edk 0.0.0-oidc-bootstrap → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +462 -3
- package/dist-sdk/elementum-entity-client/clients/agents/models/agent-tool.d.ts +188 -0
- package/dist-sdk/elementum-entity-client/clients/agents/models/agent-tool.js +20 -0
- package/dist-sdk/elementum-entity-client/clients/agents/models/agent.d.ts +245 -0
- package/dist-sdk/elementum-entity-client/clients/agents/models/agent.js +30 -0
- package/dist-sdk/elementum-entity-client/clients/ai-provider-connectors/models/ai-provider-connector.d.ts +18 -0
- package/dist-sdk/elementum-entity-client/clients/ai-provider-connectors/models/ai-provider-connector.js +8 -0
- package/dist-sdk/elementum-entity-client/clients/aspects/models/aspect.d.ts +718 -0
- package/dist-sdk/elementum-entity-client/clients/aspects/models/aspect.js +52 -0
- package/dist-sdk/elementum-entity-client/clients/aspects/models/field-base.d.ts +23 -0
- package/dist-sdk/elementum-entity-client/clients/aspects/models/field-base.js +1 -0
- package/dist-sdk/elementum-entity-client/clients/aspects/models/field-types.d.ts +148 -0
- package/dist-sdk/elementum-entity-client/clients/aspects/models/field-types.js +12 -0
- package/dist-sdk/elementum-entity-client/clients/aspects/models/format.d.ts +63 -0
- package/dist-sdk/elementum-entity-client/clients/aspects/models/format.js +17 -0
- package/dist-sdk/elementum-entity-client/clients/aspects/models/index.d.ts +39 -0
- package/dist-sdk/elementum-entity-client/clients/aspects/models/index.js +35 -0
- package/dist-sdk/elementum-entity-client/clients/aspects/models/picklist-config.d.ts +116 -0
- package/dist-sdk/elementum-entity-client/clients/aspects/models/picklist-config.js +11 -0
- package/dist-sdk/elementum-entity-client/clients/automation/models/automation.d.ts +178 -0
- package/dist-sdk/elementum-entity-client/clients/automation/models/automation.js +18 -0
- package/dist-sdk/elementum-entity-client/clients/document-models/models/document-model.d.ts +200 -0
- package/dist-sdk/elementum-entity-client/clients/document-models/models/document-model.js +1 -0
- package/dist-sdk/elementum-entity-client/clients/search-tables/models/index.d.ts +1 -0
- package/dist-sdk/elementum-entity-client/clients/search-tables/models/index.js +1 -0
- package/dist-sdk/elementum-entity-client/clients/search-tables/models/search-table-wire.d.ts +141 -0
- package/dist-sdk/elementum-entity-client/clients/search-tables/models/search-table-wire.js +22 -0
- package/dist-sdk/elementum-entity-client/clients/skills/models/skill-tool.d.ts +123 -0
- package/dist-sdk/elementum-entity-client/clients/skills/models/skill-tool.js +14 -0
- package/dist-sdk/elementum-entity-client/clients/skills/models/skill.d.ts +78 -0
- package/dist-sdk/elementum-entity-client/clients/skills/models/skill.js +23 -0
- package/dist-sdk/elementum-entity-client/clients/tables/models/index.d.ts +1 -0
- package/dist-sdk/elementum-entity-client/clients/tables/models/index.js +1 -0
- package/dist-sdk/elementum-entity-client/clients/tables/models/table-wire.d.ts +265 -0
- package/dist-sdk/elementum-entity-client/clients/tables/models/table-wire.js +15 -0
- package/dist-sdk/elementum-entity-client/errors.d.ts +90 -0
- package/dist-sdk/elementum-entity-client/errors.js +111 -0
- package/dist-sdk/elementum-entity-client/models/connection.d.ts +30 -0
- package/dist-sdk/elementum-entity-client/models/connection.js +16 -0
- package/dist-sdk/elementum-entity-client/types.d.ts +71 -0
- package/dist-sdk/elementum-entity-client/types.js +1 -0
- package/dist-sdk/fs/entity.d.ts +104 -0
- package/dist-sdk/fs/entity.js +52 -0
- package/dist-sdk/pull/util.d.ts +130 -0
- package/dist-sdk/pull/util.js +204 -0
- package/dist-sdk/src/catalog/ai-provider-models.d.ts +30 -0
- package/dist-sdk/src/catalog/ai-provider-models.js +63 -0
- package/dist-sdk/src/catalog/factories.d.ts +242 -0
- package/dist-sdk/src/catalog/factories.js +265 -0
- package/dist-sdk/src/catalog/from-authoring.d.ts +103 -0
- package/dist-sdk/src/catalog/from-authoring.js +467 -0
- package/dist-sdk/src/catalog/index.d.ts +12 -0
- package/dist-sdk/src/catalog/index.js +12 -0
- package/dist-sdk/src/catalog/org.d.ts +11 -0
- package/dist-sdk/src/catalog/org.js +288 -0
- package/dist-sdk/src/catalog/render-helpers.d.ts +35 -0
- package/dist-sdk/src/catalog/render-helpers.js +82 -0
- package/dist-sdk/src/catalog/render.d.ts +48 -0
- package/dist-sdk/src/catalog/render.js +193 -0
- package/dist-sdk/src/catalog/token.d.ts +10 -0
- package/dist-sdk/src/catalog/token.js +76 -0
- package/dist-sdk/src/catalog/types.d.ts +215 -0
- package/dist-sdk/src/catalog/types.js +86 -0
- package/dist-sdk/src/catalog/write.d.ts +43 -0
- package/dist-sdk/src/catalog/write.js +109 -0
- package/dist-sdk/src/core/app-to-ui.d.ts +22 -0
- package/dist-sdk/src/core/app-to-ui.js +75 -0
- package/dist-sdk/src/core/index.d.ts +10 -0
- package/dist-sdk/src/core/index.js +9 -0
- package/dist-sdk/src/core/system-fields.d.ts +95 -0
- package/dist-sdk/src/core/system-fields.js +153 -0
- package/dist-sdk/src/core/triggers/on-demand.d.ts +144 -0
- package/dist-sdk/src/core/triggers/on-demand.js +112 -0
- package/dist-sdk/src/core/types/ai-provider.d.ts +23 -0
- package/dist-sdk/src/core/types/ai-provider.js +8 -0
- package/dist-sdk/src/core/types/app.d.ts +857 -0
- package/dist-sdk/src/core/types/app.js +210 -0
- package/dist-sdk/src/core/types/aspect-category.d.ts +35 -0
- package/dist-sdk/src/core/types/aspect-category.js +33 -0
- package/dist-sdk/src/core/types/cloud-link.d.ts +34 -0
- package/dist-sdk/src/core/types/cloud-link.js +32 -0
- package/dist-sdk/src/core/types/display-block.d.ts +149 -0
- package/dist-sdk/src/core/types/display-block.js +61 -0
- package/dist-sdk/src/core/types/group.d.ts +13 -0
- package/dist-sdk/src/core/types/group.js +6 -0
- package/dist-sdk/src/core/types/platform.d.ts +2 -0
- package/dist-sdk/src/core/types/platform.js +1 -0
- package/dist-sdk/src/core/types/user.d.ts +20 -0
- package/dist-sdk/src/core/types/user.js +8 -0
- package/dist-sdk/src/core/wire/ref-serializer.d.ts +45 -0
- package/dist-sdk/src/core/wire/ref-serializer.js +89 -0
- package/dist-sdk/src/engine/build/context.d.ts +67 -0
- package/dist-sdk/src/engine/build/context.js +6 -0
- package/dist-sdk/src/engine/build/source-context.d.ts +45 -0
- package/dist-sdk/src/engine/build/source-context.js +23 -0
- package/dist-sdk/src/engine/entity.d.ts +44 -0
- package/dist-sdk/src/engine/entity.js +15 -0
- package/dist-sdk/src/engine/pull/context.d.ts +38 -0
- package/dist-sdk/src/engine/pull/context.js +44 -0
- package/dist-sdk/src/engine/pull/org.d.ts +54 -0
- package/dist-sdk/src/engine/pull/org.js +134 -0
- package/dist-sdk/src/engine/tf/escape.d.ts +22 -0
- package/dist-sdk/src/engine/tf/escape.js +28 -0
- package/dist-sdk/src/engine/tf/expr.d.ts +25 -0
- package/dist-sdk/src/engine/tf/expr.js +405 -0
- package/dist-sdk/src/engine/tf/index.d.ts +12 -0
- package/dist-sdk/src/engine/tf/index.js +11 -0
- package/dist-sdk/src/engine/tf/labels.d.ts +76 -0
- package/dist-sdk/src/engine/tf/labels.js +196 -0
- package/dist-sdk/src/engine/tf/model.d.ts +84 -0
- package/dist-sdk/src/engine/tf/model.js +49 -0
- package/dist-sdk/src/engine/tf/parse.d.ts +41 -0
- package/dist-sdk/src/engine/tf/parse.js +189 -0
- package/dist-sdk/src/engine/tf/render.d.ts +13 -0
- package/dist-sdk/src/engine/tf/render.js +102 -0
- package/dist-sdk/src/engine/workspace/authoring-layout.d.ts +43 -0
- package/dist-sdk/src/engine/workspace/authoring-layout.js +201 -0
- package/dist-sdk/src/entities/access-policy/build.d.ts +26 -0
- package/dist-sdk/src/entities/access-policy/build.js +7 -0
- package/dist-sdk/src/entities/access-policy/filter.d.ts +61 -0
- package/dist-sdk/src/entities/access-policy/filter.js +83 -0
- package/dist-sdk/src/entities/access-policy/from-tf.d.ts +48 -0
- package/dist-sdk/src/entities/access-policy/from-tf.js +189 -0
- package/dist-sdk/src/entities/access-policy/module.d.ts +3 -0
- package/dist-sdk/src/entities/access-policy/module.js +17 -0
- package/dist-sdk/src/entities/access-policy/to-tf.d.ts +36 -0
- package/dist-sdk/src/entities/access-policy/to-tf.js +149 -0
- package/dist-sdk/src/entities/access-policy/types.d.ts +4 -0
- package/dist-sdk/src/entities/access-policy/types.js +10 -0
- package/dist-sdk/src/entities/agent/build.d.ts +108 -0
- package/dist-sdk/src/entities/agent/build.js +148 -0
- package/dist-sdk/src/entities/agent/deserializer/print-agent-v2.d.ts +53 -0
- package/dist-sdk/src/entities/agent/deserializer/print-agent-v2.js +344 -0
- package/dist-sdk/src/entities/agent/from-tf.d.ts +65 -0
- package/dist-sdk/src/entities/agent/from-tf.js +289 -0
- package/dist-sdk/src/entities/agent/index.d.ts +7 -0
- package/dist-sdk/src/entities/agent/index.js +7 -0
- package/dist-sdk/src/entities/agent/module.d.ts +4 -0
- package/dist-sdk/src/entities/agent/module.js +122 -0
- package/dist-sdk/src/entities/agent/to-tf.d.ts +33 -0
- package/dist-sdk/src/entities/agent/to-tf.js +188 -0
- package/dist-sdk/src/entities/agent/tools.d.ts +284 -0
- package/dist-sdk/src/entities/agent/tools.js +238 -0
- package/dist-sdk/src/entities/agent-tool/from-tf.d.ts +110 -0
- package/dist-sdk/src/entities/agent-tool/from-tf.js +265 -0
- package/dist-sdk/src/entities/agent-tool/module.d.ts +3 -0
- package/dist-sdk/src/entities/agent-tool/module.js +32 -0
- package/dist-sdk/src/entities/agent-tool/to-tf.d.ts +40 -0
- package/dist-sdk/src/entities/agent-tool/to-tf.js +250 -0
- package/dist-sdk/src/entities/agent-tool/types.d.ts +43 -0
- package/dist-sdk/src/entities/agent-tool/types.js +102 -0
- package/dist-sdk/src/entities/app/build.d.ts +368 -0
- package/dist-sdk/src/entities/app/build.js +372 -0
- package/dist-sdk/src/entities/app/deserializer/normalize.d.ts +168 -0
- package/dist-sdk/src/entities/app/deserializer/normalize.js +12 -0
- package/dist-sdk/src/entities/app/display-blocks.d.ts +26 -0
- package/dist-sdk/src/entities/app/display-blocks.js +34 -0
- package/dist-sdk/src/entities/app/from-tf.d.ts +23 -0
- package/dist-sdk/src/entities/app/from-tf.js +197 -0
- package/dist-sdk/src/entities/app/index.d.ts +14 -0
- package/dist-sdk/src/entities/app/index.js +11 -0
- package/dist-sdk/src/entities/app/locals.d.ts +11 -0
- package/dist-sdk/src/entities/app/locals.js +31 -0
- package/dist-sdk/src/entities/app/module.d.ts +4 -0
- package/dist-sdk/src/entities/app/module.js +66 -0
- package/dist-sdk/src/entities/app/to-tf.d.ts +33 -0
- package/dist-sdk/src/entities/app/to-tf.js +212 -0
- package/dist-sdk/src/entities/approval-chain/build.d.ts +24 -0
- package/dist-sdk/src/entities/approval-chain/build.js +56 -0
- package/dist-sdk/src/entities/approval-chain/index.d.ts +6 -0
- package/dist-sdk/src/entities/approval-chain/index.js +6 -0
- package/dist-sdk/src/entities/approval-chain/steps.d.ts +24 -0
- package/dist-sdk/src/entities/approval-chain/steps.js +20 -0
- package/dist-sdk/src/entities/automation/build.d.ts +259 -0
- package/dist-sdk/src/entities/automation/build.js +436 -0
- package/dist-sdk/src/entities/automation/catalog-render.d.ts +5 -0
- package/dist-sdk/src/entities/automation/catalog-render.js +35 -0
- package/dist-sdk/src/entities/automation/deserializer/ast.d.ts +152 -0
- package/dist-sdk/src/entities/automation/deserializer/ast.js +13 -0
- package/dist-sdk/src/entities/automation/deserializer/print-automation.d.ts +55 -0
- package/dist-sdk/src/entities/automation/deserializer/print-automation.js +1176 -0
- package/dist-sdk/src/entities/automation/filter.d.ts +93 -0
- package/dist-sdk/src/entities/automation/filter.js +156 -0
- package/dist-sdk/src/entities/automation/from-tf.d.ts +35 -0
- package/dist-sdk/src/entities/automation/from-tf.js +1258 -0
- package/dist-sdk/src/entities/automation/index.d.ts +22 -0
- package/dist-sdk/src/entities/automation/index.js +25 -0
- package/dist-sdk/src/entities/automation/module.d.ts +3 -0
- package/dist-sdk/src/entities/automation/module.js +150 -0
- package/dist-sdk/src/entities/automation/operators.d.ts +93 -0
- package/dist-sdk/src/entities/automation/operators.js +69 -0
- package/dist-sdk/src/entities/automation/output-key-wire-name.d.ts +19 -0
- package/dist-sdk/src/entities/automation/output-key-wire-name.js +24 -0
- package/dist-sdk/src/entities/automation/script-code.d.ts +51 -0
- package/dist-sdk/src/entities/automation/script-code.js +633 -0
- package/dist-sdk/src/entities/automation/serialize.d.ts +6 -0
- package/dist-sdk/src/entities/automation/serialize.js +41 -0
- package/dist-sdk/src/entities/automation/tasks.d.ts +641 -0
- package/dist-sdk/src/entities/automation/tasks.js +765 -0
- package/dist-sdk/src/entities/automation/to-tf.d.ts +19 -0
- package/dist-sdk/src/entities/automation/to-tf.js +1169 -0
- package/dist-sdk/src/entities/automation/triggers.d.ts +205 -0
- package/dist-sdk/src/entities/automation/triggers.js +202 -0
- package/dist-sdk/src/entities/automation/types.d.ts +78 -0
- package/dist-sdk/src/entities/automation/types.js +131 -0
- package/dist-sdk/src/entities/element/build.d.ts +121 -0
- package/dist-sdk/src/entities/element/build.js +110 -0
- package/dist-sdk/src/entities/element/from-tf.d.ts +19 -0
- package/dist-sdk/src/entities/element/from-tf.js +170 -0
- package/dist-sdk/src/entities/element/index.d.ts +12 -0
- package/dist-sdk/src/entities/element/index.js +10 -0
- package/dist-sdk/src/entities/element/locals.d.ts +7 -0
- package/dist-sdk/src/entities/element/locals.js +12 -0
- package/dist-sdk/src/entities/element/module.d.ts +8 -0
- package/dist-sdk/src/entities/element/module.js +65 -0
- package/dist-sdk/src/entities/element/to-tf.d.ts +14 -0
- package/dist-sdk/src/entities/element/to-tf.js +169 -0
- package/dist-sdk/src/entities/field/build.d.ts +112 -0
- package/dist-sdk/src/entities/field/build.js +84 -0
- package/dist-sdk/src/entities/field/calc/aggregate.d.ts +60 -0
- package/dist-sdk/src/entities/field/calc/aggregate.js +71 -0
- package/dist-sdk/src/entities/field/calc/date.d.ts +73 -0
- package/dist-sdk/src/entities/field/calc/date.js +109 -0
- package/dist-sdk/src/entities/field/calc/index.d.ts +229 -0
- package/dist-sdk/src/entities/field/calc/index.js +433 -0
- package/dist-sdk/src/entities/field/calc/numeric.d.ts +22 -0
- package/dist-sdk/src/entities/field/calc/numeric.js +67 -0
- package/dist-sdk/src/entities/field/calc/runtime.d.ts +61 -0
- package/dist-sdk/src/entities/field/calc/runtime.js +174 -0
- package/dist-sdk/src/entities/field/calc/text.d.ts +100 -0
- package/dist-sdk/src/entities/field/calc/text.js +208 -0
- package/dist-sdk/src/entities/field/calc/types.d.ts +86 -0
- package/dist-sdk/src/entities/field/calc/types.js +23 -0
- package/dist-sdk/src/entities/field/calc.d.ts +108 -0
- package/dist-sdk/src/entities/field/calc.js +54 -0
- package/dist-sdk/src/entities/field/from-tf.d.ts +31 -0
- package/dist-sdk/src/entities/field/from-tf.js +184 -0
- package/dist-sdk/src/entities/field/locals.d.ts +8 -0
- package/dist-sdk/src/entities/field/locals.js +24 -0
- package/dist-sdk/src/entities/field/module.d.ts +3 -0
- package/dist-sdk/src/entities/field/module.js +50 -0
- package/dist-sdk/src/entities/field/options.d.ts +27 -0
- package/dist-sdk/src/entities/field/options.js +76 -0
- package/dist-sdk/src/entities/field/record-shape.d.ts +57 -0
- package/dist-sdk/src/entities/field/record-shape.js +1 -0
- package/dist-sdk/src/entities/field/to-tf.d.ts +73 -0
- package/dist-sdk/src/entities/field/to-tf.js +142 -0
- package/dist-sdk/src/entities/field/types.d.ts +53 -0
- package/dist-sdk/src/entities/field/types.js +68 -0
- package/dist-sdk/src/entities/file-reader/build.d.ts +182 -0
- package/dist-sdk/src/entities/file-reader/build.js +105 -0
- package/dist-sdk/src/entities/file-reader/deserializer/print-file-reader.d.ts +6 -0
- package/dist-sdk/src/entities/file-reader/deserializer/print-file-reader.js +109 -0
- package/dist-sdk/src/entities/file-reader/from-tf.d.ts +13 -0
- package/dist-sdk/src/entities/file-reader/from-tf.js +172 -0
- package/dist-sdk/src/entities/file-reader/index.d.ts +10 -0
- package/dist-sdk/src/entities/file-reader/index.js +10 -0
- package/dist-sdk/src/entities/file-reader/module.d.ts +3 -0
- package/dist-sdk/src/entities/file-reader/module.js +115 -0
- package/dist-sdk/src/entities/file-reader/to-tf.d.ts +14 -0
- package/dist-sdk/src/entities/file-reader/to-tf.js +84 -0
- package/dist-sdk/src/entities/file-reader/types.d.ts +32 -0
- package/dist-sdk/src/entities/file-reader/types.js +30 -0
- package/dist-sdk/src/entities/flow/activities/agent.d.ts +15 -0
- package/dist-sdk/src/entities/flow/activities/agent.js +29 -0
- package/dist-sdk/src/entities/flow/activities/approval.d.ts +9 -0
- package/dist-sdk/src/entities/flow/activities/approval.js +18 -0
- package/dist-sdk/src/entities/flow/activities/automation.d.ts +12 -0
- package/dist-sdk/src/entities/flow/activities/automation.js +22 -0
- package/dist-sdk/src/entities/flow/activities/ctx.d.ts +34 -0
- package/dist-sdk/src/entities/flow/activities/ctx.js +38 -0
- package/dist-sdk/src/entities/flow/activities/form.d.ts +22 -0
- package/dist-sdk/src/entities/flow/activities/form.js +36 -0
- package/dist-sdk/src/entities/flow/activities/index.d.ts +14 -0
- package/dist-sdk/src/entities/flow/activities/index.js +13 -0
- package/dist-sdk/src/entities/flow/activities/input-refs.d.ts +39 -0
- package/dist-sdk/src/entities/flow/activities/input-refs.js +19 -0
- package/dist-sdk/src/entities/flow/activities/prompt-template.d.ts +13 -0
- package/dist-sdk/src/entities/flow/activities/prompt-template.js +34 -0
- package/dist-sdk/src/entities/flow/activities/render-catalog.d.ts +140 -0
- package/dist-sdk/src/entities/flow/activities/render-catalog.js +174 -0
- package/dist-sdk/src/entities/flow/activities/types.d.ts +33 -0
- package/dist-sdk/src/entities/flow/activities/types.js +1 -0
- package/dist-sdk/src/entities/flow/build.d.ts +38 -0
- package/dist-sdk/src/entities/flow/build.js +115 -0
- package/dist-sdk/src/entities/flow/index.d.ts +8 -0
- package/dist-sdk/src/entities/flow/index.js +7 -0
- package/dist-sdk/src/entities/flow/serialize.d.ts +51 -0
- package/dist-sdk/src/entities/flow/serialize.js +94 -0
- package/dist-sdk/src/entities/flow/util.d.ts +27 -0
- package/dist-sdk/src/entities/flow/util.js +38 -0
- package/dist-sdk/src/entities/org/ai-provider.d.ts +13 -0
- package/dist-sdk/src/entities/org/ai-provider.js +46 -0
- package/dist-sdk/src/entities/org/category.d.ts +5 -0
- package/dist-sdk/src/entities/org/category.js +33 -0
- package/dist-sdk/src/entities/org/cloud-link.d.ts +5 -0
- package/dist-sdk/src/entities/org/cloud-link.js +33 -0
- package/dist-sdk/src/entities/org/connector.d.ts +12 -0
- package/dist-sdk/src/entities/org/connector.js +35 -0
- package/dist-sdk/src/entities/org/group.d.ts +5 -0
- package/dist-sdk/src/entities/org/group.js +40 -0
- package/dist-sdk/src/entities/org/index.d.ts +11 -0
- package/dist-sdk/src/entities/org/index.js +11 -0
- package/dist-sdk/src/entities/org/role.d.ts +7 -0
- package/dist-sdk/src/entities/org/role.js +21 -0
- package/dist-sdk/src/entities/org/user.d.ts +7 -0
- package/dist-sdk/src/entities/org/user.js +30 -0
- package/dist-sdk/src/entities/search-table/build.d.ts +41 -0
- package/dist-sdk/src/entities/search-table/build.js +79 -0
- package/dist-sdk/src/entities/search-table/index.d.ts +5 -0
- package/dist-sdk/src/entities/search-table/index.js +5 -0
- package/dist-sdk/src/entities/search-table/module.d.ts +6 -0
- package/dist-sdk/src/entities/search-table/module.js +64 -0
- package/dist-sdk/src/entities/shared/context.d.ts +93 -0
- package/dist-sdk/src/entities/shared/context.js +156 -0
- package/dist-sdk/src/entities/shared/filters/ast.d.ts +277 -0
- package/dist-sdk/src/entities/shared/filters/ast.js +65 -0
- package/dist-sdk/src/entities/shared/filters/index.d.ts +211 -0
- package/dist-sdk/src/entities/shared/filters/index.js +372 -0
- package/dist-sdk/src/entities/shared/filters/types.d.ts +170 -0
- package/dist-sdk/src/entities/shared/filters/types.js +7 -0
- package/dist-sdk/src/entities/shared/ref.d.ts +160 -0
- package/dist-sdk/src/entities/shared/ref.js +119 -0
- package/dist-sdk/src/entities/shared/tool-field-ref.d.ts +17 -0
- package/dist-sdk/src/entities/shared/tool-field-ref.js +31 -0
- package/dist-sdk/src/entities/shared/types/common.d.ts +106 -0
- package/dist-sdk/src/entities/shared/types/common.js +64 -0
- package/dist-sdk/src/entities/shared/types/field-types.d.ts +58 -0
- package/dist-sdk/src/entities/shared/types/field-types.js +57 -0
- package/dist-sdk/src/entities/shared/types/platform.d.ts +46 -0
- package/dist-sdk/src/entities/shared/types/platform.js +10 -0
- package/dist-sdk/src/entities/skill/build.d.ts +25 -0
- package/dist-sdk/src/entities/skill/build.js +50 -0
- package/dist-sdk/src/entities/skill/deserializer/print-skill-v2.d.ts +39 -0
- package/dist-sdk/src/entities/skill/deserializer/print-skill-v2.js +124 -0
- package/dist-sdk/src/entities/skill/from-tf.d.ts +33 -0
- package/dist-sdk/src/entities/skill/from-tf.js +96 -0
- package/dist-sdk/src/entities/skill/index.d.ts +7 -0
- package/dist-sdk/src/entities/skill/index.js +7 -0
- package/dist-sdk/src/entities/skill/module.d.ts +4 -0
- package/dist-sdk/src/entities/skill/module.js +111 -0
- package/dist-sdk/src/entities/skill/to-tf.d.ts +33 -0
- package/dist-sdk/src/entities/skill/to-tf.js +59 -0
- package/dist-sdk/src/entities/skill/tools.d.ts +93 -0
- package/dist-sdk/src/entities/skill/tools.js +105 -0
- package/dist-sdk/src/entities/skill-tool/from-tf.d.ts +60 -0
- package/dist-sdk/src/entities/skill-tool/from-tf.js +142 -0
- package/dist-sdk/src/entities/skill-tool/module.d.ts +3 -0
- package/dist-sdk/src/entities/skill-tool/module.js +21 -0
- package/dist-sdk/src/entities/skill-tool/to-tf.d.ts +34 -0
- package/dist-sdk/src/entities/skill-tool/to-tf.js +130 -0
- package/dist-sdk/src/entities/skill-tool/types.d.ts +40 -0
- package/dist-sdk/src/entities/skill-tool/types.js +67 -0
- package/dist-sdk/src/entities/table/build.d.ts +74 -0
- package/dist-sdk/src/entities/table/build.js +339 -0
- package/dist-sdk/src/entities/table/catalog-render.d.ts +5 -0
- package/dist-sdk/src/entities/table/catalog-render.js +39 -0
- package/dist-sdk/src/entities/table/fields.d.ts +81 -0
- package/dist-sdk/src/entities/table/fields.js +70 -0
- package/dist-sdk/src/entities/table/filter.d.ts +41 -0
- package/dist-sdk/src/entities/table/filter.js +89 -0
- package/dist-sdk/src/entities/table/index.d.ts +8 -0
- package/dist-sdk/src/entities/table/index.js +12 -0
- package/dist-sdk/src/entities/table/joins.d.ts +26 -0
- package/dist-sdk/src/entities/table/joins.js +31 -0
- package/dist-sdk/src/entities/table/keys.d.ts +11 -0
- package/dist-sdk/src/entities/table/keys.js +25 -0
- package/dist-sdk/src/entities/table/module.d.ts +5 -0
- package/dist-sdk/src/entities/table/module.js +25 -0
- package/dist-sdk/src/entities/table/state.d.ts +39 -0
- package/dist-sdk/src/entities/table/state.js +43 -0
- package/dist-sdk/src/entities/view/from-tf.d.ts +29 -0
- package/dist-sdk/src/entities/view/from-tf.js +235 -0
- package/dist-sdk/src/entities/view/module.d.ts +24 -0
- package/dist-sdk/src/entities/view/module.js +61 -0
- package/dist-sdk/src/entities/view/to-tf.d.ts +65 -0
- package/dist-sdk/src/entities/view/to-tf.js +171 -0
- package/dist-sdk/src/entities/view/types.d.ts +58 -0
- package/dist-sdk/src/entities/view/types.js +89 -0
- package/dist-sdk/src/graph/deferred-catalog-render.d.ts +9 -0
- package/dist-sdk/src/graph/deferred-catalog-render.js +18 -0
- package/dist-sdk/src/graph/index.d.ts +91 -0
- package/dist-sdk/src/graph/index.js +211 -0
- package/dist-sdk/src/graph/modules.d.ts +7 -0
- package/dist-sdk/src/graph/modules.js +42 -0
- package/dist-sdk/src/graph/types.d.ts +375 -0
- package/dist-sdk/src/graph/types.js +102 -0
- package/dist-sdk/src/internal/sdk-package.d.ts +7 -0
- package/dist-sdk/src/internal/sdk-package.js +23 -0
- package/package.json +201 -8
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent extraction (M3, plan §4.3): `agentFromTf` turns an
|
|
3
|
+
* `elementum_agent` block + its tool blocks (delegated to
|
|
4
|
+
* `entities/agent-tool/from-tf.ts`) into the normalized shape
|
|
5
|
+
* `printAgentV2` consumes. Platform ids come only from the stream's import
|
|
6
|
+
* blocks and stay data-side — they never reach printed source.
|
|
7
|
+
*/
|
|
8
|
+
import { EntityTfError } from "../../engine/entity.js";
|
|
9
|
+
import { optionalBoolean, optionalString, plainObject, resourceRefLabel } from "../../engine/pull/context.js";
|
|
10
|
+
import { isTfExpr, isUuid, sanitizeName, scopedLabelToBagKey, tfLabelToTsLabel, } from "../../engine/tf/index.js";
|
|
11
|
+
import { toolFromTf } from "../agent-tool/from-tf.js";
|
|
12
|
+
import { APP_RESOURCE_TYPE } from "../app/module.js";
|
|
13
|
+
import { SKILL_RESOURCE_TYPE } from "../skill/module.js";
|
|
14
|
+
import { AGENT_RESOURCE_TYPE } from "./module.js";
|
|
15
|
+
/** Attributes `agentFromTf` understands — anything else is dialect growth, reported loudly. */
|
|
16
|
+
const KNOWN_AGENT_ATTRS = new Set([
|
|
17
|
+
"app_id",
|
|
18
|
+
"name",
|
|
19
|
+
"description",
|
|
20
|
+
"instructions",
|
|
21
|
+
"first_message",
|
|
22
|
+
"ai_provider_connector_id",
|
|
23
|
+
"skill_access_config",
|
|
24
|
+
"max_tokens",
|
|
25
|
+
"depends_on",
|
|
26
|
+
"run_as",
|
|
27
|
+
"jwt_authentication",
|
|
28
|
+
"conversation_idle_timeout",
|
|
29
|
+
"a2a_streaming",
|
|
30
|
+
]);
|
|
31
|
+
/**
|
|
32
|
+
* Dialect attrs with no authoring slot yet — reported by name, agent still
|
|
33
|
+
* pulled. `a2a_create_record_enabled` has no `defineAgent` option at all
|
|
34
|
+
* (issue #170) — decoding it needs a new authoring field, split from the
|
|
35
|
+
* other four run_as/jwt_authentication/conversation_idle_timeout/
|
|
36
|
+
* a2a_streaming attrs that issue fixed.
|
|
37
|
+
*/
|
|
38
|
+
const UNAUTHORABLE_AGENT_ATTRS = new Set(["starting_actions", "model", "a2a_create_record_enabled"]);
|
|
39
|
+
/** Non-elementum agent variants (type + their config attrs) — the whole agent is skipped. */
|
|
40
|
+
const VARIANT_ATTRS = new Set([
|
|
41
|
+
"type",
|
|
42
|
+
"snowflake_database",
|
|
43
|
+
"snowflake_schema",
|
|
44
|
+
"snowflake_name",
|
|
45
|
+
"bedrock_agent_arn",
|
|
46
|
+
"browser_agent_instructions",
|
|
47
|
+
]);
|
|
48
|
+
/**
|
|
49
|
+
* One `skill_ids`/`preloaded_skill_ids` entry → its resolved ref. A
|
|
50
|
+
* resource-attr to `elementum_agentic_skill` is always self (the export
|
|
51
|
+
* stream only carries resource blocks for skills THIS app owns); a
|
|
52
|
+
* data-attr is a foreign app's skill, resolved to its name via the
|
|
53
|
+
* stream's data block.
|
|
54
|
+
*/
|
|
55
|
+
function parseSkillRef(item, where, ownerTfLabel, ctx) {
|
|
56
|
+
if (isTfExpr(item) && item.$expr === "resource-attr" && item.type === SKILL_RESOURCE_TYPE) {
|
|
57
|
+
return { kind: "self", key: scopedLabelToBagKey(ownerTfLabel, item.label) };
|
|
58
|
+
}
|
|
59
|
+
if (isTfExpr(item) && item.$expr === "data-attr" && item.type === SKILL_RESOURCE_TYPE) {
|
|
60
|
+
const name = ctx.dataName(SKILL_RESOURCE_TYPE, item.label);
|
|
61
|
+
if (name === undefined) {
|
|
62
|
+
ctx.diagnostics.push(`${where}: references data.${SKILL_RESOURCE_TYPE}.${item.label} but the stream has no such data block; dropped`);
|
|
63
|
+
return undefined;
|
|
64
|
+
}
|
|
65
|
+
return { kind: "foreign", name };
|
|
66
|
+
}
|
|
67
|
+
// A bare UUID literal with no data block backing it at all - the platform
|
|
68
|
+
// lets skill_ids reference a skill this export can't otherwise name (e.g.
|
|
69
|
+
// an app outside this workspace's export scope). Round-trip the raw id
|
|
70
|
+
// rather than dropping it; a typo'd/genuinely-malformed non-UUID string
|
|
71
|
+
// still falls through to the diagnostic below.
|
|
72
|
+
if (typeof item === "string" && isUuid(item)) {
|
|
73
|
+
return { kind: "unresolved", id: item };
|
|
74
|
+
}
|
|
75
|
+
ctx.diagnostics.push(`${where}: skill_access_config entry has an unrecognized shape (${JSON.stringify(item)}); dropped`);
|
|
76
|
+
return undefined;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* `run_as` is a bare string on the wire (`elementum_agent`'s schema: only
|
|
80
|
+
* `"current_user"` is documented; unset means "run as admin/publisher").
|
|
81
|
+
* `defineAgent`'s `runAs` option takes the opaque object shape shared with
|
|
82
|
+
* agent-tool's `runAs` (`{ currentUser: true }` / `{ publisher: true }` /
|
|
83
|
+
* `{ serviceAccount: { serviceAccount } }`) — board item B28(d) — so the
|
|
84
|
+
* string is translated into that shape for authoring; unrecognized values
|
|
85
|
+
* (not `"current_user"`) are reported and dropped rather than guessed at.
|
|
86
|
+
*/
|
|
87
|
+
function parseRunAs(value, where, ctx) {
|
|
88
|
+
if (value === "current_user")
|
|
89
|
+
return { currentUser: true };
|
|
90
|
+
ctx.diagnostics.push(`${where}: run_as ${JSON.stringify(value)} is not a recognized value; dropped`);
|
|
91
|
+
return undefined;
|
|
92
|
+
}
|
|
93
|
+
/** `jwt_authentication`'s nested `key_source` — exactly one of `jwks_url`/`plain_text_key` is set. */
|
|
94
|
+
function parseJwtKeySource(rec, where, ctx) {
|
|
95
|
+
const jwksUrl = rec["jwks_url"];
|
|
96
|
+
if (typeof jwksUrl === "string" && jwksUrl !== "")
|
|
97
|
+
return { jwks: { jwksUrl } };
|
|
98
|
+
const plainTextKey = rec["plain_text_key"];
|
|
99
|
+
if (typeof plainTextKey === "string" && plainTextKey !== "")
|
|
100
|
+
return { plainText: { plainTextKeyValuePem: plainTextKey } };
|
|
101
|
+
ctx.diagnostics.push(`${where}: jwt_authentication has neither jwks_url nor plain_text_key; dropped`);
|
|
102
|
+
return undefined;
|
|
103
|
+
}
|
|
104
|
+
function parseJwtAuthentication(value, where, ctx) {
|
|
105
|
+
const rec = plainObject(value);
|
|
106
|
+
if (rec === undefined) {
|
|
107
|
+
ctx.diagnostics.push(`${where}: jwt_authentication has an unrecognized shape; dropped`);
|
|
108
|
+
return undefined;
|
|
109
|
+
}
|
|
110
|
+
const enabled = rec["enabled"];
|
|
111
|
+
const headerName = rec["header_name"];
|
|
112
|
+
const emailAddressClaimName = rec["email_address_claim_name"];
|
|
113
|
+
if (typeof enabled !== "boolean" || typeof headerName !== "string" || typeof emailAddressClaimName !== "string") {
|
|
114
|
+
ctx.diagnostics.push(`${where}: jwt_authentication is missing required fields (enabled/header_name/email_address_claim_name); dropped`);
|
|
115
|
+
return undefined;
|
|
116
|
+
}
|
|
117
|
+
const keySource = parseJwtKeySource(rec, where, ctx);
|
|
118
|
+
if (keySource === undefined)
|
|
119
|
+
return undefined;
|
|
120
|
+
let requiredClaims;
|
|
121
|
+
const rawClaims = rec["required_claims"];
|
|
122
|
+
if (Array.isArray(rawClaims)) {
|
|
123
|
+
requiredClaims = [];
|
|
124
|
+
for (const item of rawClaims) {
|
|
125
|
+
const claimRec = plainObject(item);
|
|
126
|
+
const claimName = claimRec?.["claim_name"];
|
|
127
|
+
const acceptableValues = claimRec?.["acceptable_values"];
|
|
128
|
+
if (typeof claimName !== "string" || !Array.isArray(acceptableValues) || !acceptableValues.every((v) => typeof v === "string")) {
|
|
129
|
+
ctx.diagnostics.push(`${where}: jwt_authentication.required_claims entry has an unrecognized shape; dropped`);
|
|
130
|
+
continue;
|
|
131
|
+
}
|
|
132
|
+
requiredClaims.push({ claimName, acceptableValues: acceptableValues });
|
|
133
|
+
}
|
|
134
|
+
if (requiredClaims.length === 0)
|
|
135
|
+
requiredClaims = undefined;
|
|
136
|
+
}
|
|
137
|
+
else if (rawClaims !== undefined) {
|
|
138
|
+
ctx.diagnostics.push(`${where}: jwt_authentication.required_claims is not a list; dropped`);
|
|
139
|
+
}
|
|
140
|
+
return {
|
|
141
|
+
jwt: {
|
|
142
|
+
enabled,
|
|
143
|
+
headerName,
|
|
144
|
+
emailAddressClaimName,
|
|
145
|
+
keySource,
|
|
146
|
+
...(requiredClaims !== undefined && { requiredClaims }),
|
|
147
|
+
},
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
function parseSkillAccessConfig(value, where, ownerTfLabel, ctx) {
|
|
151
|
+
if (typeof value !== "object" || value === null || Array.isArray(value) || isTfExpr(value)) {
|
|
152
|
+
ctx.diagnostics.push(`${where}: skill_access_config has an unrecognized shape; dropped`);
|
|
153
|
+
return undefined;
|
|
154
|
+
}
|
|
155
|
+
const rec = value;
|
|
156
|
+
const mode = rec["mode"];
|
|
157
|
+
if (mode !== "NONE" && mode !== "ALL" && mode !== "ALL_APP" && mode !== "CUSTOM") {
|
|
158
|
+
ctx.diagnostics.push(`${where}: skill_access_config.mode ${JSON.stringify(mode)} is not recognized; dropped`);
|
|
159
|
+
return undefined;
|
|
160
|
+
}
|
|
161
|
+
const parseList = (attr) => {
|
|
162
|
+
const raw = rec[attr];
|
|
163
|
+
if (!Array.isArray(raw))
|
|
164
|
+
return undefined;
|
|
165
|
+
const refs = [];
|
|
166
|
+
for (const item of raw) {
|
|
167
|
+
const ref = parseSkillRef(item, `${where}: ${attr}`, ownerTfLabel, ctx);
|
|
168
|
+
if (ref !== undefined)
|
|
169
|
+
refs.push(ref);
|
|
170
|
+
}
|
|
171
|
+
return refs;
|
|
172
|
+
};
|
|
173
|
+
// `preloaded_skill_ids` is independent of mode (the provider reads it
|
|
174
|
+
// unconditionally — see entities/agent/build.ts's SkillAccess doc comment),
|
|
175
|
+
// so it must be captured for every mode, not just CUSTOM — dropping it
|
|
176
|
+
// silently here would lose live-set data on every pull.
|
|
177
|
+
const preloadedSkills = parseList("preloaded_skill_ids");
|
|
178
|
+
const preloadedProp = preloadedSkills !== undefined && preloadedSkills.length > 0 ? { preloadedSkills } : {};
|
|
179
|
+
if (mode !== "CUSTOM")
|
|
180
|
+
return { mode, ...preloadedProp };
|
|
181
|
+
const skills = parseList("skill_ids") ?? [];
|
|
182
|
+
return { mode: "CUSTOM", skills, ...preloadedProp };
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* The `elementum_agent` block + its tool blocks → the normalized agent.
|
|
186
|
+
* Tool blocks belonging to OTHER agents are skipped with a diagnostic (the
|
|
187
|
+
* caller partitions per-agent by agent_id, but stays defensive).
|
|
188
|
+
*/
|
|
189
|
+
export function agentFromTf(agentBlock, toolBlocks, appLabel, _appRefName, ctx) {
|
|
190
|
+
const label = agentBlock.label;
|
|
191
|
+
if (label === undefined || label === "") {
|
|
192
|
+
throw new EntityTfError("elementum_agent block is missing its label");
|
|
193
|
+
}
|
|
194
|
+
const attrs = agentBlock.attrs;
|
|
195
|
+
const name = optionalString(attrs, "name", `agent "${label}"`, ctx) ?? "";
|
|
196
|
+
const where = `agent "${name}" (${AGENT_RESOURCE_TYPE}.${label})`;
|
|
197
|
+
if (attrs["type"] !== undefined) {
|
|
198
|
+
return {
|
|
199
|
+
skippedReason: `${where}: agent type ${JSON.stringify(attrs["type"])} has no terraform-path authoring yet; skipped`,
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
for (const key of Object.keys(attrs)) {
|
|
203
|
+
if (KNOWN_AGENT_ATTRS.has(key))
|
|
204
|
+
continue;
|
|
205
|
+
if (UNAUTHORABLE_AGENT_ATTRS.has(key) || VARIANT_ATTRS.has(key)) {
|
|
206
|
+
ctx.diagnostics.push(`${where}: ${key} has no authoring slot on the terraform path yet; a rebuilt stream will omit it`);
|
|
207
|
+
}
|
|
208
|
+
else {
|
|
209
|
+
ctx.diagnostics.push(`${where}: unhandled attribute "${key}" — the export dialect grew; extend agentFromTf deliberately`);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
if (resourceRefLabel(attrs["app_id"], APP_RESOURCE_TYPE) !== appLabel) {
|
|
213
|
+
return { skippedReason: `${where}: app_id does not reference ${APP_RESOURCE_TYPE}.${appLabel}; skipped` };
|
|
214
|
+
}
|
|
215
|
+
let connectorKey;
|
|
216
|
+
const connectorAttr = attrs["ai_provider_connector_id"];
|
|
217
|
+
if (connectorAttr !== undefined) {
|
|
218
|
+
if (isTfExpr(connectorAttr) && connectorAttr.$expr === "data-attr" && connectorAttr.type === "elementum_ai_provider_connector") {
|
|
219
|
+
// The connector's own block only carries model_name + a reference to
|
|
220
|
+
// its provider — the provider's own data block carries the name.
|
|
221
|
+
// Deriving providerKey/modelKey this way (not by splitting the
|
|
222
|
+
// connector's combined tfLabel) is the same derivation
|
|
223
|
+
// renderAiProvidersBag uses, so the printed token matches the catalog.
|
|
224
|
+
const modelName = ctx.dataName(connectorAttr.type, connectorAttr.label);
|
|
225
|
+
const providerRef = ctx.dataRef(connectorAttr.type, connectorAttr.label);
|
|
226
|
+
const providerName = providerRef !== undefined ? ctx.dataName(providerRef.resourceType, providerRef.tfLabel) : undefined;
|
|
227
|
+
if (modelName === undefined || providerName === undefined) {
|
|
228
|
+
ctx.diagnostics.push(`${where}: references data.${connectorAttr.type}.${connectorAttr.label} but the stream has no model_name/provider for it; dropped`);
|
|
229
|
+
}
|
|
230
|
+
else {
|
|
231
|
+
const providerKey = tfLabelToTsLabel(sanitizeName(providerName));
|
|
232
|
+
const modelKey = tfLabelToTsLabel(sanitizeName(modelName));
|
|
233
|
+
connectorKey = `${providerKey}.${modelKey}`;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
else {
|
|
237
|
+
ctx.diagnostics.push(`${where}: ai_provider_connector_id is not a connector data reference; dropped`);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
const owner = { appType: APP_RESOURCE_TYPE, appLabel, ownerTfLabel: appLabel, agentType: AGENT_RESOURCE_TYPE, agentLabel: label };
|
|
241
|
+
const tools = [];
|
|
242
|
+
for (const block of toolBlocks) {
|
|
243
|
+
const tool = toolFromTf(block, owner, ctx);
|
|
244
|
+
if (tool !== undefined)
|
|
245
|
+
tools.push(tool);
|
|
246
|
+
}
|
|
247
|
+
let skillAccess;
|
|
248
|
+
const skillAccessAttr = attrs["skill_access_config"];
|
|
249
|
+
if (skillAccessAttr !== undefined) {
|
|
250
|
+
skillAccess = parseSkillAccessConfig(skillAccessAttr, where, appLabel, ctx);
|
|
251
|
+
}
|
|
252
|
+
let runAs;
|
|
253
|
+
const runAsAttr = attrs["run_as"];
|
|
254
|
+
if (runAsAttr !== undefined) {
|
|
255
|
+
runAs = parseRunAs(runAsAttr, where, ctx);
|
|
256
|
+
}
|
|
257
|
+
let agentAuthentication;
|
|
258
|
+
const jwtAttr = attrs["jwt_authentication"];
|
|
259
|
+
if (jwtAttr !== undefined) {
|
|
260
|
+
agentAuthentication = parseJwtAuthentication(jwtAttr, where, ctx);
|
|
261
|
+
}
|
|
262
|
+
const conversationIdleTimeout = optionalString(attrs, "conversation_idle_timeout", where, ctx);
|
|
263
|
+
const a2aStreaming = optionalBoolean(attrs, "a2a_streaming", where, ctx);
|
|
264
|
+
const firstMessage = optionalString(attrs, "first_message", where, ctx);
|
|
265
|
+
const maxTokens = attrs["max_tokens"];
|
|
266
|
+
const maxLength = typeof maxTokens === "number" && Number.isSafeInteger(maxTokens) && maxTokens > 0
|
|
267
|
+
? maxTokens
|
|
268
|
+
: undefined;
|
|
269
|
+
if (maxTokens !== undefined && maxLength === undefined) {
|
|
270
|
+
ctx.diagnostics.push(`${where}: expected positive integer "max_tokens", got ${JSON.stringify(maxTokens)}; dropped`);
|
|
271
|
+
}
|
|
272
|
+
return {
|
|
273
|
+
agent: {
|
|
274
|
+
refName: scopedLabelToBagKey(appLabel, label),
|
|
275
|
+
name,
|
|
276
|
+
description: optionalString(attrs, "description", where, ctx) ?? "",
|
|
277
|
+
instructions: optionalString(attrs, "instructions", where, ctx) ?? "",
|
|
278
|
+
...(firstMessage !== undefined && { firstMessage }),
|
|
279
|
+
...(maxLength !== undefined && { maxLength }),
|
|
280
|
+
...(connectorKey !== undefined && { connectorKey }),
|
|
281
|
+
...(skillAccess !== undefined && { skillAccess }),
|
|
282
|
+
...(runAs !== undefined && { runAs }),
|
|
283
|
+
...(agentAuthentication !== undefined && { agentAuthentication }),
|
|
284
|
+
...(conversationIdleTimeout !== undefined && { conversationIdleTimeout }),
|
|
285
|
+
...(a2aStreaming !== undefined && { a2aStreaming }),
|
|
286
|
+
tools,
|
|
287
|
+
},
|
|
288
|
+
};
|
|
289
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* v2 agent authoring — emits Hydra's agent wire shape (minus the owner, which
|
|
3
|
+
* the deploy wire client injects) with `CatalogRef` tokens at every reference
|
|
4
|
+
* position. Standalone from v1.
|
|
5
|
+
*/
|
|
6
|
+
export { defineAgent, type A2ASkill, type AgentAuthentication, type AgentV2Options, type SkillAccess, } from "./build.js";
|
|
7
|
+
export { agentCreateRecord, agentExecuteWorkflow, agentMcp, agentRelateRecord, agentRunAgent, agentRunAutomation, agentSearchAspect, agentSearchTable, agentSelectBotRoute, agentUpdateRecord, type AgentExecuteWorkflowInput, type AgentExecuteWorkflowOutput, type RunAutomationInputs, type RunAutomationOptionalInput, type RunAutomationOutput, type RunAutomationOutputs, type RunAutomationRequiredInput, type RunAutomationToolV2, type AgentMcpHeader, type AgentRecordField, type AgentRecordFieldInput, type AgentRecordRawIdField, type AgentSearchField, type AgentSearchFieldInput, type AgentSearchRawIdField, type AgentToolRunAs, type AgentTool, } from "./tools.js";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* v2 agent authoring — emits Hydra's agent wire shape (minus the owner, which
|
|
3
|
+
* the deploy wire client injects) with `CatalogRef` tokens at every reference
|
|
4
|
+
* position. Standalone from v1.
|
|
5
|
+
*/
|
|
6
|
+
export { defineAgent, } from "./build.js";
|
|
7
|
+
export { agentCreateRecord, agentExecuteWorkflow, agentMcp, agentRelateRecord, agentRunAgent, agentRunAutomation, agentSearchAspect, agentSearchTable, agentSelectBotRoute, agentUpdateRecord, } from "./tools.js";
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/** The agent entity's registry entry + resource-type constant (see src/graph/). */
|
|
2
|
+
import { bareFactoryEntry } from "../../catalog/render-helpers.js";
|
|
3
|
+
import { isTfExpr } from "../../engine/tf/index.js";
|
|
4
|
+
import { NO_DATA, } from "../../graph/types.js";
|
|
5
|
+
import { printAgentV2 } from "./deserializer/print-agent-v2.js";
|
|
6
|
+
import { agentFromTf } from "./from-tf.js";
|
|
7
|
+
import { agentToTf } from "./to-tf.js";
|
|
8
|
+
export const AGENT_RESOURCE_TYPE = "elementum_agent";
|
|
9
|
+
function isConfigured(value) {
|
|
10
|
+
return (typeof value === "object" &&
|
|
11
|
+
value !== null &&
|
|
12
|
+
typeof value.ref === "function" &&
|
|
13
|
+
typeof value.def === "function");
|
|
14
|
+
}
|
|
15
|
+
function agentStubRef(refName, parent) {
|
|
16
|
+
return { __kind: "agent", refName, name: refName, parent };
|
|
17
|
+
}
|
|
18
|
+
function agentRefFromAuthoring(args) {
|
|
19
|
+
const { refName, parent, defaultExport } = args;
|
|
20
|
+
if (isConfigured(defaultExport)) {
|
|
21
|
+
const catalogRef = defaultExport.ref(refName);
|
|
22
|
+
if (catalogRef.__kind !== "agent")
|
|
23
|
+
return undefined;
|
|
24
|
+
return catalogRef;
|
|
25
|
+
}
|
|
26
|
+
if (typeof defaultExport !== "object" ||
|
|
27
|
+
defaultExport === null ||
|
|
28
|
+
defaultExport.kind !== "agent") {
|
|
29
|
+
return undefined;
|
|
30
|
+
}
|
|
31
|
+
const entity = defaultExport;
|
|
32
|
+
const entityRefName = entity.refName === "" ? refName : entity.refName;
|
|
33
|
+
const entityParent = entity.parent === "" ? parent : entity.parent;
|
|
34
|
+
const maybeRefName = entity.ref?.name;
|
|
35
|
+
const payloadName = entity.payload?.name;
|
|
36
|
+
const name = typeof maybeRefName === "string"
|
|
37
|
+
? maybeRefName
|
|
38
|
+
: typeof payloadName === "string"
|
|
39
|
+
? payloadName
|
|
40
|
+
: entityRefName;
|
|
41
|
+
return { __kind: "agent", refName: entityRefName, name, parent: entityParent };
|
|
42
|
+
}
|
|
43
|
+
function extractAgents(ownBlocks, stream, ctx) {
|
|
44
|
+
const toolBlocks = stream.byKind.get("agent-tool") ?? [];
|
|
45
|
+
const items = [];
|
|
46
|
+
const skipped = [];
|
|
47
|
+
const diagnostics = [];
|
|
48
|
+
for (const agentBlock of ownBlocks) {
|
|
49
|
+
const agentLabel = agentBlock.label ?? "";
|
|
50
|
+
const ownTools = toolBlocks.filter((b) => {
|
|
51
|
+
const ref = b.attrs["agent_id"];
|
|
52
|
+
return isTfExpr(ref) && ref.$expr === "resource-attr" && ref.type === AGENT_RESOURCE_TYPE && ref.label === agentLabel;
|
|
53
|
+
});
|
|
54
|
+
const { agent, skippedReason } = agentFromTf(agentBlock, ownTools, ctx.appTfLabel, ctx.appRefName, ctx);
|
|
55
|
+
if (agent !== undefined)
|
|
56
|
+
items.push(agent);
|
|
57
|
+
else if (skippedReason !== undefined) {
|
|
58
|
+
skipped.push(`${AGENT_RESOURCE_TYPE}.${agentLabel}`);
|
|
59
|
+
diagnostics.push(skippedReason);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return { items, skipped, diagnostics };
|
|
63
|
+
}
|
|
64
|
+
export const agentModule = {
|
|
65
|
+
kind: "agent",
|
|
66
|
+
stream: { role: "streamMember" },
|
|
67
|
+
authoring: { unit: "ownFile", bag: "agents" },
|
|
68
|
+
parents: [{ parent: "app", child: "agent" }],
|
|
69
|
+
resource: { shape: "single", resourceType: AGENT_RESOURCE_TYPE, adoptable: true },
|
|
70
|
+
data: NO_DATA,
|
|
71
|
+
canvas: {
|
|
72
|
+
participates: true,
|
|
73
|
+
label: "Agents",
|
|
74
|
+
glyph: "◇",
|
|
75
|
+
component: "agentCard",
|
|
76
|
+
toView: (instance) => {
|
|
77
|
+
const a = instance;
|
|
78
|
+
return {
|
|
79
|
+
refName: a.refName,
|
|
80
|
+
name: a.name,
|
|
81
|
+
description: a.description,
|
|
82
|
+
toolCount: a.tools.length,
|
|
83
|
+
};
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
lifecycle: {
|
|
87
|
+
participates: true,
|
|
88
|
+
extractOwnFile: extractAgents,
|
|
89
|
+
printOwnFile: (item, opts) => {
|
|
90
|
+
const agent = item;
|
|
91
|
+
return {
|
|
92
|
+
refName: agent.refName,
|
|
93
|
+
source: printAgentV2(agent, {
|
|
94
|
+
appRefName: opts.appRefName,
|
|
95
|
+
...(opts.crossOrg !== undefined && { crossOrg: opts.crossOrg }),
|
|
96
|
+
...(opts.destinationConnectorKeys !== undefined && {
|
|
97
|
+
destinationConnectorKeys: opts.destinationConnectorKeys,
|
|
98
|
+
}),
|
|
99
|
+
...(opts.connectorKeyOverride !== undefined && { connectorKeyOverride: opts.connectorKeyOverride }),
|
|
100
|
+
...(opts.foreignAppRefNames !== undefined && { foreignAppRefNames: opts.foreignAppRefNames }),
|
|
101
|
+
...(opts.foreignElementRefNames !== undefined && { foreignElementRefNames: opts.foreignElementRefNames }),
|
|
102
|
+
}),
|
|
103
|
+
};
|
|
104
|
+
},
|
|
105
|
+
toTf: (entity, ctx) => agentToTf(entity, {
|
|
106
|
+
appRefName: ctx.appRefName,
|
|
107
|
+
appTfLabel: ctx.appTfLabel,
|
|
108
|
+
orgRefs: ctx.orgRefs,
|
|
109
|
+
diagnostics: ctx.diagnostics,
|
|
110
|
+
}),
|
|
111
|
+
},
|
|
112
|
+
catalog: {
|
|
113
|
+
participates: true,
|
|
114
|
+
refKind: "agent",
|
|
115
|
+
catalogBag: "agents",
|
|
116
|
+
renderOrder: 20,
|
|
117
|
+
catalogRoot: "app",
|
|
118
|
+
renderEntry: ({ keyName, baseIndent }) => bareFactoryEntry("agentRef", keyName, baseIndent),
|
|
119
|
+
stubRef: agentStubRef,
|
|
120
|
+
refFromAuthoring: agentRefFromAuthoring,
|
|
121
|
+
},
|
|
122
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent emission (M3, plan §4.3): `agentToTf` consumes the discovered
|
|
3
|
+
* `DeployableEntity` (the `defineAgent` def() payload) and emits
|
|
4
|
+
* `elementum_agent` + one tool resource per implemented tool (the tool pass
|
|
5
|
+
* delegates to `entities/agent-tool/to-tf.ts`).
|
|
6
|
+
*
|
|
7
|
+
* The dialect is ei's ACTUAL export (docs/design/m3-agent-dialect.md):
|
|
8
|
+
* app_id as the owning app's resource ref, the connector as a
|
|
9
|
+
* `data.elementum_ai_provider_connector` ref, agent-prefixed tool labels.
|
|
10
|
+
* `skillAccess` emits `skill_access_config` (confirmed live against the
|
|
11
|
+
* provider's `elementum_agent` schema). Authoring knobs the terraform
|
|
12
|
+
* dialect still doesn't carry (temperature, reasoningEffort,
|
|
13
|
+
* startingActions, …) degrade through `diagnostics` — reported, never
|
|
14
|
+
* silent (plan §4.3).
|
|
15
|
+
*/
|
|
16
|
+
import type { OrgRefLookup } from "../../engine/build/context.js";
|
|
17
|
+
import { type DeployableEntity } from "../../engine/entity.js";
|
|
18
|
+
import { type TfBlock } from "../../engine/tf/index.js";
|
|
19
|
+
export interface AgentToTfContext {
|
|
20
|
+
/** The owning app's refName (self-target detection) and tfLabel (namespace). */
|
|
21
|
+
readonly appRefName: string;
|
|
22
|
+
readonly appTfLabel: string;
|
|
23
|
+
readonly orgRefs: OrgRefLookup;
|
|
24
|
+
/** Degradations land here — reported by the caller, never silent. */
|
|
25
|
+
readonly diagnostics: string[];
|
|
26
|
+
}
|
|
27
|
+
export interface AgentToTfResult {
|
|
28
|
+
readonly blocks: readonly TfBlock[];
|
|
29
|
+
/** The agent's terraform address. */
|
|
30
|
+
readonly address: string;
|
|
31
|
+
}
|
|
32
|
+
/** `elementum_agent` + one tool resource per implemented tool, in ei's dialect. */
|
|
33
|
+
export declare function agentToTf(entity: DeployableEntity, ctx: AgentToTfContext): AgentToTfResult;
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent emission (M3, plan §4.3): `agentToTf` consumes the discovered
|
|
3
|
+
* `DeployableEntity` (the `defineAgent` def() payload) and emits
|
|
4
|
+
* `elementum_agent` + one tool resource per implemented tool (the tool pass
|
|
5
|
+
* delegates to `entities/agent-tool/to-tf.ts`).
|
|
6
|
+
*
|
|
7
|
+
* The dialect is ei's ACTUAL export (docs/design/m3-agent-dialect.md):
|
|
8
|
+
* app_id as the owning app's resource ref, the connector as a
|
|
9
|
+
* `data.elementum_ai_provider_connector` ref, agent-prefixed tool labels.
|
|
10
|
+
* `skillAccess` emits `skill_access_config` (confirmed live against the
|
|
11
|
+
* provider's `elementum_agent` schema). Authoring knobs the terraform
|
|
12
|
+
* dialect still doesn't carry (temperature, reasoningEffort,
|
|
13
|
+
* startingActions, …) degrade through `diagnostics` — reported, never
|
|
14
|
+
* silent (plan §4.3).
|
|
15
|
+
*/
|
|
16
|
+
import { EntityTfError } from "../../engine/entity.js";
|
|
17
|
+
import { appScopedResourceLabel, expr, sanitizeName, tsLabelToTfLabel } from "../../engine/tf/index.js";
|
|
18
|
+
import { toolToTf } from "../agent-tool/to-tf.js";
|
|
19
|
+
import { APP_RESOURCE_TYPE } from "../app/module.js";
|
|
20
|
+
import { CONNECTOR_ORG_BAG } from "../org/connector.js";
|
|
21
|
+
import { SKILL_RESOURCE_TYPE } from "../skill/module.js";
|
|
22
|
+
import { AGENT_RESOURCE_TYPE } from "./module.js";
|
|
23
|
+
/**
|
|
24
|
+
* Config knobs `defineAgent` accepts that the terraform dialect does not
|
|
25
|
+
* carry (yet). `runAs`/`agentAuthentication`/`a2aStreaming`/
|
|
26
|
+
* `conversationIdleTimeout` moved out of this list in issue #170 — they're
|
|
27
|
+
* now emitted (see the attrs assembly below); the encoders below still drop
|
|
28
|
+
* a value that doesn't fit the terraform-path shape, diagnosed individually
|
|
29
|
+
* rather than through this blanket list.
|
|
30
|
+
*/
|
|
31
|
+
const UNSUPPORTED_AGENT_KNOBS = [
|
|
32
|
+
"temperature",
|
|
33
|
+
"reasoningEffort",
|
|
34
|
+
"startingActions",
|
|
35
|
+
"avatarAttachmentId",
|
|
36
|
+
"managedById",
|
|
37
|
+
"serviceAccountId",
|
|
38
|
+
];
|
|
39
|
+
/**
|
|
40
|
+
* `runAs` authoring is the opaque object shape shared with agent-tool's
|
|
41
|
+
* `runAs` (board item B28(d)); `elementum_agent.run_as` on the wire is a
|
|
42
|
+
* bare string and only `"current_user"` is documented for agents (unlike
|
|
43
|
+
* tools, which also accept `"publisher"`/`"service_account"`) — mirrors
|
|
44
|
+
* `parseRunAs` in `from-tf.ts`.
|
|
45
|
+
*/
|
|
46
|
+
function runAsValue(runAs, where, diagnostics) {
|
|
47
|
+
if (runAs["currentUser"] === true)
|
|
48
|
+
return "current_user";
|
|
49
|
+
diagnostics.push(`${where}: runAs ${JSON.stringify(runAs)} has no terraform-path encoding yet (only { currentUser: true } is supported); dropped`);
|
|
50
|
+
return undefined;
|
|
51
|
+
}
|
|
52
|
+
/** `agentAuthentication` → `jwt_authentication` — mirrors `parseJwtAuthentication` in `from-tf.ts`. */
|
|
53
|
+
function jwtAuthenticationValue(auth) {
|
|
54
|
+
const { jwt } = auth;
|
|
55
|
+
const keySourceAttrs = "jwks" in jwt.keySource
|
|
56
|
+
? { jwks_url: jwt.keySource.jwks.jwksUrl }
|
|
57
|
+
: { plain_text_key: jwt.keySource.plainText.plainTextKeyValuePem };
|
|
58
|
+
const value = {
|
|
59
|
+
enabled: jwt.enabled,
|
|
60
|
+
header_name: jwt.headerName,
|
|
61
|
+
email_address_claim_name: jwt.emailAddressClaimName,
|
|
62
|
+
...keySourceAttrs,
|
|
63
|
+
};
|
|
64
|
+
if (jwt.requiredClaims !== undefined && jwt.requiredClaims.length > 0) {
|
|
65
|
+
value["required_claims"] = jwt.requiredClaims.map((c) => ({
|
|
66
|
+
claim_name: c.claimName,
|
|
67
|
+
acceptable_values: [...c.acceptableValues],
|
|
68
|
+
}));
|
|
69
|
+
}
|
|
70
|
+
return value;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* authoring SkillRef token → the skill's id value. Self-app skills resolve
|
|
74
|
+
* purely from the token (same discipline as agent-tool's field refs); a
|
|
75
|
+
* foreign-app skill needs a name-keyed `data.elementum_agentic_skill`
|
|
76
|
+
* lookup (the platform derives the label from the skill's `name`, which is
|
|
77
|
+
* already slug-shaped — see `entities/skill/build.ts`'s name validation).
|
|
78
|
+
*/
|
|
79
|
+
function skillIdValue(token, ctx) {
|
|
80
|
+
if (token === undefined || token.refName === undefined) {
|
|
81
|
+
// Always an authoring mistake, never a degraded-but-known dialect gap —
|
|
82
|
+
// e.g. a stale generated/catalog.ts missing the `skills` bag (edk build
|
|
83
|
+
// doesn't regenerate the catalog itself; re-run the step that does, or
|
|
84
|
+
// `edk pull app`) or a typo'd catalog path. Fail loud immediately rather
|
|
85
|
+
// than silently emit `skill_ids = [null]` or crash three layers down.
|
|
86
|
+
throw new EntityTfError(`agent skillAccess: a skill token is undefined — check that every entry in \`skills\`/` +
|
|
87
|
+
`\`preloadedSkills\` resolves to a real \`catalog.<app>.skills.<key>\` token. If you just added or ` +
|
|
88
|
+
`renamed a skill file, the app's generated/catalog.ts may be stale; regenerate it (re-run \`edk pull ` +
|
|
89
|
+
`app\`, or the catalog-refresh step your workflow uses) before building again.`);
|
|
90
|
+
}
|
|
91
|
+
if (token.unresolvedId !== undefined)
|
|
92
|
+
return token.unresolvedId;
|
|
93
|
+
const refName = token.refName;
|
|
94
|
+
if (token.parent === ctx.appRefName) {
|
|
95
|
+
return expr.resourceAttr(SKILL_RESOURCE_TYPE, appScopedResourceLabel(ctx.appTfLabel, tsLabelToTfLabel(refName)), ["id"]);
|
|
96
|
+
}
|
|
97
|
+
const name = token.name ?? refName;
|
|
98
|
+
const tfLabel = sanitizeName(name);
|
|
99
|
+
ctx.orgRefs.foreignSkill(tfLabel, name);
|
|
100
|
+
return expr.dataAttr(SKILL_RESOURCE_TYPE, tfLabel, ["id"]);
|
|
101
|
+
}
|
|
102
|
+
/** `elementum_agent` + one tool resource per implemented tool, in ei's dialect. */
|
|
103
|
+
export function agentToTf(entity, ctx) {
|
|
104
|
+
if (entity.kind !== "agent") {
|
|
105
|
+
throw new EntityTfError(`agentToTf expects kind "agent"; got "${entity.kind}" (refName "${entity.refName}")`);
|
|
106
|
+
}
|
|
107
|
+
const payload = entity.payload;
|
|
108
|
+
const elementum = payload?.agent?.elementum;
|
|
109
|
+
if (payload === null || typeof payload !== "object" || elementum === undefined) {
|
|
110
|
+
throw new EntityTfError(`agent "${entity.refName}" has no agent.elementum payload — was it built with defineAgent?`);
|
|
111
|
+
}
|
|
112
|
+
// The bag key IS the label (the stable naming contract) — the agent's
|
|
113
|
+
// refName comes from its file name, exactly like an app's.
|
|
114
|
+
const agentBareTfLabel = tsLabelToTfLabel(entity.refName);
|
|
115
|
+
const tfLabel = appScopedResourceLabel(ctx.appTfLabel, agentBareTfLabel);
|
|
116
|
+
const name = elementum.name ?? "";
|
|
117
|
+
const where = `agent "${name}"`;
|
|
118
|
+
const attrs = {
|
|
119
|
+
app_id: expr.resourceAttr(APP_RESOURCE_TYPE, ctx.appTfLabel, ["id"]),
|
|
120
|
+
name,
|
|
121
|
+
description: elementum.description ?? "",
|
|
122
|
+
instructions: elementum.instructions ?? "",
|
|
123
|
+
};
|
|
124
|
+
if (elementum.firstMessage !== undefined)
|
|
125
|
+
attrs["first_message"] = elementum.firstMessage;
|
|
126
|
+
if (elementum.maxLength !== undefined)
|
|
127
|
+
attrs["max_tokens"] = elementum.maxLength;
|
|
128
|
+
if (elementum.runAs !== undefined) {
|
|
129
|
+
const value = runAsValue(elementum.runAs, where, ctx.diagnostics);
|
|
130
|
+
if (value !== undefined)
|
|
131
|
+
attrs["run_as"] = value;
|
|
132
|
+
}
|
|
133
|
+
if (elementum.agentAuthentication !== undefined) {
|
|
134
|
+
attrs["jwt_authentication"] = jwtAuthenticationValue(elementum.agentAuthentication);
|
|
135
|
+
}
|
|
136
|
+
if (elementum.conversationIdleTimeout !== undefined)
|
|
137
|
+
attrs["conversation_idle_timeout"] = elementum.conversationIdleTimeout;
|
|
138
|
+
if (elementum.a2aStreaming !== undefined)
|
|
139
|
+
attrs["a2a_streaming"] = elementum.a2aStreaming;
|
|
140
|
+
const connector = elementum.aiProviderConnectorId;
|
|
141
|
+
if (connector === undefined) {
|
|
142
|
+
ctx.diagnostics.push(`${where}: no connector token — the platform will pick a default model`);
|
|
143
|
+
}
|
|
144
|
+
else {
|
|
145
|
+
const tsLabel = connector.parent !== undefined ? `${connector.parent}.${connector.refName ?? ""}` : (connector.refName ?? "");
|
|
146
|
+
const resolved = ctx.orgRefs.byTsLabel(CONNECTOR_ORG_BAG, tsLabel);
|
|
147
|
+
if (resolved === undefined) {
|
|
148
|
+
ctx.diagnostics.push(`${where}: connector token "${tsLabel}" is not in the org catalog — re-run \`elementum pull org --data-only\``);
|
|
149
|
+
}
|
|
150
|
+
else {
|
|
151
|
+
attrs["ai_provider_connector_id"] = expr.dataAttr("elementum_ai_provider_connector", resolved.tfLabel, ["id"]);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
for (const knob of UNSUPPORTED_AGENT_KNOBS) {
|
|
155
|
+
if (elementum[knob] !== undefined) {
|
|
156
|
+
ctx.diagnostics.push(`${where}: ${knob} is not carried by the terraform path yet; dropped`);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
const skillAccess = elementum.skillAccessConfig;
|
|
160
|
+
if (skillAccess !== undefined) {
|
|
161
|
+
const mode = skillAccess.mode ?? "NONE";
|
|
162
|
+
const skillAccessValue = { mode };
|
|
163
|
+
if (skillAccess.skillIds !== undefined) {
|
|
164
|
+
skillAccessValue["skill_ids"] = skillAccess.skillIds.map((t) => skillIdValue(t, ctx));
|
|
165
|
+
}
|
|
166
|
+
if (skillAccess.preloadedSkillIds !== undefined) {
|
|
167
|
+
skillAccessValue["preloaded_skill_ids"] = skillAccess.preloadedSkillIds.map((t) => skillIdValue(t, ctx));
|
|
168
|
+
}
|
|
169
|
+
attrs["skill_access_config"] = skillAccessValue;
|
|
170
|
+
}
|
|
171
|
+
if (payload.a2aSkills !== undefined) {
|
|
172
|
+
ctx.diagnostics.push(`${where}: a2aSkills are not carried by the terraform path yet; dropped`);
|
|
173
|
+
}
|
|
174
|
+
const blocks = [{ kind: "resource", type: AGENT_RESOURCE_TYPE, label: tfLabel, attrs }];
|
|
175
|
+
for (const entry of payload.tools ?? []) {
|
|
176
|
+
const tool = toolToTf(entry, {
|
|
177
|
+
appRefName: ctx.appRefName,
|
|
178
|
+
appTfLabel: ctx.appTfLabel,
|
|
179
|
+
agentBareTfLabel,
|
|
180
|
+
foreignAppRef: (l, n) => ctx.orgRefs.foreignApp(l, n),
|
|
181
|
+
foreignElementRef: (l, n) => ctx.orgRefs.foreignElement(l, n),
|
|
182
|
+
diagnostics: ctx.diagnostics,
|
|
183
|
+
});
|
|
184
|
+
if (tool !== undefined)
|
|
185
|
+
blocks.push(tool.block);
|
|
186
|
+
}
|
|
187
|
+
return { blocks, address: `${AGENT_RESOURCE_TYPE}.${tfLabel}` };
|
|
188
|
+
}
|