@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,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* v2 skill tool factories — emit the platform's `AgenticSkillToolCreateInput`
|
|
3
|
+
* wire shape with `CatalogRef` tokens at every id position (automation, aspect,
|
|
4
|
+
* field, search table, target agent). Tokens resolve to ids at deploy via
|
|
5
|
+
* `resolvePayload`; nothing here reads an `.id`.
|
|
6
|
+
*
|
|
7
|
+
* Parallel to v1 `src/agents/skills/tools/*` + `serializer`, fully standalone.
|
|
8
|
+
* Each tool carries a `status` (`"ACTIVE"`/`"INACTIVE"`, default `"ACTIVE"`).
|
|
9
|
+
* Search/record fields require `name` + `description` (matching the v1 skill
|
|
10
|
+
* serializer, which always emits them).
|
|
11
|
+
*/
|
|
12
|
+
import type { AgentRef, AspectRef, AutomationRef, FieldRef, SearchTableRef } from "../../catalog/index.js";
|
|
13
|
+
/** A handle-form skill tool: an `AgenticSkillToolCreateInput` with ref tokens. */
|
|
14
|
+
export type SkillTool = Record<string, unknown>;
|
|
15
|
+
export type SkillToolStatus = "ACTIVE" | "INACTIVE";
|
|
16
|
+
export interface SkillSearchField {
|
|
17
|
+
readonly field: FieldRef;
|
|
18
|
+
readonly name: string;
|
|
19
|
+
readonly description: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* A search-tool field identified by a raw platform id rather than a
|
|
23
|
+
* FieldRef token — the field belongs to a foreign/out-of-scope aspect ei
|
|
24
|
+
* can't resolve to a resource reference (board issue #169; mirrors
|
|
25
|
+
* `entities/agent/tools.ts`'s `AgentSearchRawIdField`). There's no way to
|
|
26
|
+
* author one directly; it only arises from `edk pull app` round-tripping an
|
|
27
|
+
* existing tool.
|
|
28
|
+
*/
|
|
29
|
+
export interface SkillSearchRawIdField {
|
|
30
|
+
readonly fieldId: string;
|
|
31
|
+
readonly name: string;
|
|
32
|
+
readonly description: string;
|
|
33
|
+
}
|
|
34
|
+
export type SkillSearchFieldInput = SkillSearchField | SkillSearchRawIdField;
|
|
35
|
+
export interface SkillRecordField {
|
|
36
|
+
readonly field: FieldRef;
|
|
37
|
+
readonly name: string;
|
|
38
|
+
readonly description: string;
|
|
39
|
+
readonly required: boolean;
|
|
40
|
+
readonly defaultValue?: string;
|
|
41
|
+
}
|
|
42
|
+
/** A create/update-record field identified by a raw platform id — see {@link SkillSearchRawIdField}. */
|
|
43
|
+
export interface SkillRecordRawIdField {
|
|
44
|
+
readonly fieldId: string;
|
|
45
|
+
readonly name: string;
|
|
46
|
+
readonly description: string;
|
|
47
|
+
readonly required: boolean;
|
|
48
|
+
}
|
|
49
|
+
export type SkillRecordFieldInput = SkillRecordField | SkillRecordRawIdField;
|
|
50
|
+
interface CommonToolOptions {
|
|
51
|
+
readonly name: string;
|
|
52
|
+
readonly description: string;
|
|
53
|
+
readonly status?: SkillToolStatus;
|
|
54
|
+
readonly startMessage?: string;
|
|
55
|
+
}
|
|
56
|
+
export interface AutomationToolV2 extends CommonToolOptions {
|
|
57
|
+
readonly automation: AutomationRef;
|
|
58
|
+
}
|
|
59
|
+
export declare function skillAutomation(opts: AutomationToolV2): SkillTool;
|
|
60
|
+
export interface SkillSearchAspectToolV2 extends CommonToolOptions {
|
|
61
|
+
readonly aspect: AspectRef;
|
|
62
|
+
readonly queryDescription: string;
|
|
63
|
+
readonly fields: readonly SkillSearchFieldInput[];
|
|
64
|
+
/** Maximum number of records the search returns. */
|
|
65
|
+
readonly limit?: number;
|
|
66
|
+
}
|
|
67
|
+
export declare function skillSearchAspect(opts: SkillSearchAspectToolV2): SkillTool;
|
|
68
|
+
export interface SkillSearchTableToolV2 extends CommonToolOptions {
|
|
69
|
+
readonly aspect: AspectRef;
|
|
70
|
+
readonly table: SearchTableRef;
|
|
71
|
+
readonly queryDescription: string;
|
|
72
|
+
readonly fields: readonly SkillSearchField[];
|
|
73
|
+
/** Maximum number of records the search returns. */
|
|
74
|
+
readonly limit?: number;
|
|
75
|
+
}
|
|
76
|
+
export declare function skillSearchTable(opts: SkillSearchTableToolV2): SkillTool;
|
|
77
|
+
export interface SkillCreateRecordToolV2 extends CommonToolOptions {
|
|
78
|
+
readonly aspect: AspectRef;
|
|
79
|
+
readonly fields: readonly SkillRecordFieldInput[];
|
|
80
|
+
}
|
|
81
|
+
export declare function skillCreateRecord(opts: SkillCreateRecordToolV2): SkillTool;
|
|
82
|
+
export interface SkillUpdateRecordToolV2 extends CommonToolOptions {
|
|
83
|
+
readonly aspect: AspectRef;
|
|
84
|
+
readonly fields: readonly SkillRecordFieldInput[];
|
|
85
|
+
readonly handleDescription: string;
|
|
86
|
+
}
|
|
87
|
+
export declare function skillUpdateRecord(opts: SkillUpdateRecordToolV2): SkillTool;
|
|
88
|
+
export interface SkillRunAgentToolV2 extends CommonToolOptions {
|
|
89
|
+
readonly agent: AgentRef;
|
|
90
|
+
readonly workerTaskPrompt: string;
|
|
91
|
+
}
|
|
92
|
+
export declare function skillRunAgent(opts: SkillRunAgentToolV2): SkillTool;
|
|
93
|
+
export {};
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { isValidToolName } from "../agent-tool/types.js";
|
|
2
|
+
function common(opts) {
|
|
3
|
+
// Authoring-layer name check (mirrors entities/agent/tools.ts's common()) —
|
|
4
|
+
// every tool factory routes through here, so this is the single
|
|
5
|
+
// enforcement point; the tf passes never re-check.
|
|
6
|
+
if (!isValidToolName(opts.name)) {
|
|
7
|
+
throw new Error(`skill tool name "${opts.name}" must be 1–64 characters of letters, digits, and ` +
|
|
8
|
+
`underscores (A–Z, a–z, 0–9, _) with no consecutive underscores — no hyphens or spaces.`);
|
|
9
|
+
}
|
|
10
|
+
return {
|
|
11
|
+
name: opts.name,
|
|
12
|
+
description: opts.description,
|
|
13
|
+
status: opts.status ?? "ACTIVE",
|
|
14
|
+
...(opts.startMessage !== undefined ? { startMessage: opts.startMessage } : {}),
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
function searchFieldToken(f) {
|
|
18
|
+
if ("fieldId" in f) {
|
|
19
|
+
// Raw platform id fallback — see SkillSearchRawIdField's comment.
|
|
20
|
+
return {
|
|
21
|
+
fieldId: f.fieldId,
|
|
22
|
+
name: f.name,
|
|
23
|
+
description: f.description,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
return {
|
|
27
|
+
fieldId: f.field,
|
|
28
|
+
clientHandle: f.field,
|
|
29
|
+
name: f.name,
|
|
30
|
+
description: f.description,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
function recordFieldToken(f) {
|
|
34
|
+
if ("fieldId" in f) {
|
|
35
|
+
// Raw platform id fallback — see SkillRecordRawIdField's comment.
|
|
36
|
+
return {
|
|
37
|
+
fieldId: f.fieldId,
|
|
38
|
+
name: f.name,
|
|
39
|
+
description: f.description,
|
|
40
|
+
required: f.required,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
fieldId: f.field,
|
|
45
|
+
clientHandle: f.field,
|
|
46
|
+
name: f.name,
|
|
47
|
+
description: f.description,
|
|
48
|
+
required: f.required,
|
|
49
|
+
...(f.defaultValue !== undefined ? { defaultValue: f.defaultValue } : {}),
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
export function skillAutomation(opts) {
|
|
53
|
+
return { automation: { ...common(opts), automationId: opts.automation } };
|
|
54
|
+
}
|
|
55
|
+
export function skillSearchAspect(opts) {
|
|
56
|
+
return {
|
|
57
|
+
searchAspect: {
|
|
58
|
+
...common(opts),
|
|
59
|
+
aspectId: opts.aspect,
|
|
60
|
+
queryDescription: opts.queryDescription,
|
|
61
|
+
fields: opts.fields.map(searchFieldToken),
|
|
62
|
+
...(opts.limit !== undefined ? { limit: opts.limit } : {}),
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
export function skillSearchTable(opts) {
|
|
67
|
+
return {
|
|
68
|
+
searchTable: {
|
|
69
|
+
...common(opts),
|
|
70
|
+
aspectId: opts.aspect,
|
|
71
|
+
searchTableId: opts.table,
|
|
72
|
+
queryDescription: opts.queryDescription,
|
|
73
|
+
fields: opts.fields.map(searchFieldToken),
|
|
74
|
+
...(opts.limit !== undefined ? { limit: opts.limit } : {}),
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
export function skillCreateRecord(opts) {
|
|
79
|
+
return {
|
|
80
|
+
createRecord: {
|
|
81
|
+
...common(opts),
|
|
82
|
+
aspectId: opts.aspect,
|
|
83
|
+
fields: opts.fields.map(recordFieldToken),
|
|
84
|
+
},
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
export function skillUpdateRecord(opts) {
|
|
88
|
+
return {
|
|
89
|
+
updateRecord: {
|
|
90
|
+
...common(opts),
|
|
91
|
+
aspectId: opts.aspect,
|
|
92
|
+
fields: opts.fields.map(recordFieldToken),
|
|
93
|
+
handleDescription: opts.handleDescription,
|
|
94
|
+
},
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
export function skillRunAgent(opts) {
|
|
98
|
+
return {
|
|
99
|
+
runAgent: {
|
|
100
|
+
...common(opts),
|
|
101
|
+
targetAgentId: opts.agent,
|
|
102
|
+
workerTaskPrompt: opts.workerTaskPrompt,
|
|
103
|
+
},
|
|
104
|
+
};
|
|
105
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skill-tool extraction: one `elementum_agentic_skill_*_tool` block → the
|
|
3
|
+
* normalized shape the skill printer consumes. The owning skill's from-tf
|
|
4
|
+
* drives the pass and says who the owner is — this module never names the
|
|
5
|
+
* skill or app resource types. Mirrors `entities/agent-tool/from-tf.ts`.
|
|
6
|
+
*/
|
|
7
|
+
import { type FromTfContext } from "../../engine/pull/context.js";
|
|
8
|
+
import { type TfBlock } from "../../engine/tf/index.js";
|
|
9
|
+
export interface NormalizedSkillToolField {
|
|
10
|
+
/** The field's bag key in the TARGET aspect's `fields: {}` (bijective image of its label). Mutually exclusive with `rawFieldId`. */
|
|
11
|
+
readonly key?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Raw platform field id — board issue #169. When the tool's target is a
|
|
14
|
+
* foreign/out-of-scope aspect (not recursively exported), ei has no field
|
|
15
|
+
* resource to reference and falls back to a bare id. Mutually exclusive
|
|
16
|
+
* with `key`; exactly one is always set.
|
|
17
|
+
*/
|
|
18
|
+
readonly rawFieldId?: string;
|
|
19
|
+
readonly name?: string;
|
|
20
|
+
readonly description?: string;
|
|
21
|
+
readonly required?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export type NormalizedSkillToolTarget = {
|
|
24
|
+
readonly kind: "self";
|
|
25
|
+
} | {
|
|
26
|
+
/** A foreign app via `data.elementum_app.<label>` — `name` from the stream's data block. */
|
|
27
|
+
readonly kind: "foreignApp";
|
|
28
|
+
readonly name: string;
|
|
29
|
+
} | {
|
|
30
|
+
/** A foreign ELEMENT via `data.elementum_element.<label>` — `name` from the stream's data block (board issue #42). */
|
|
31
|
+
readonly kind: "foreignElement";
|
|
32
|
+
readonly name: string;
|
|
33
|
+
};
|
|
34
|
+
export interface NormalizedSkillTool {
|
|
35
|
+
readonly typeKey: "createRecord" | "searchAspect";
|
|
36
|
+
readonly name: string;
|
|
37
|
+
readonly description: string;
|
|
38
|
+
/** Present only when it differs from the default ("ACTIVE"). */
|
|
39
|
+
readonly status?: "INACTIVE";
|
|
40
|
+
readonly startMessage?: string;
|
|
41
|
+
readonly target: NormalizedSkillToolTarget;
|
|
42
|
+
readonly fields?: readonly NormalizedSkillToolField[];
|
|
43
|
+
readonly queryDescription?: string;
|
|
44
|
+
readonly limit?: number;
|
|
45
|
+
}
|
|
46
|
+
export interface SkillToolOwner {
|
|
47
|
+
/** The owning app's resource type + tfLabel. */
|
|
48
|
+
readonly appType: string;
|
|
49
|
+
readonly appLabel: string;
|
|
50
|
+
/** Namespace tf label for stripping `apps_<ns>_` child labels. */
|
|
51
|
+
readonly ownerTfLabel: string;
|
|
52
|
+
/** The owning skill's resource type + tfLabel. */
|
|
53
|
+
readonly skillType: string;
|
|
54
|
+
readonly skillLabel: string;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* One tool block → its normalized shape; undefined = skipped with a
|
|
58
|
+
* diagnostic (unimplemented sub-type, wrong owner, unresolvable target).
|
|
59
|
+
*/
|
|
60
|
+
export declare function skillToolFromTf(block: TfBlock, owner: SkillToolOwner, ctx: FromTfContext): NormalizedSkillTool | undefined;
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skill-tool extraction: one `elementum_agentic_skill_*_tool` block → the
|
|
3
|
+
* normalized shape the skill printer consumes. The owning skill's from-tf
|
|
4
|
+
* drives the pass and says who the owner is — this module never names the
|
|
5
|
+
* skill or app resource types. Mirrors `entities/agent-tool/from-tf.ts`.
|
|
6
|
+
*/
|
|
7
|
+
import { EntityTfError } from "../../engine/entity.js";
|
|
8
|
+
import { optionalString, resourceRefLabel } from "../../engine/pull/context.js";
|
|
9
|
+
import { isTfExpr } from "../../engine/tf/index.js";
|
|
10
|
+
import { resolveToolFieldKey } from "../shared/tool-field-ref.js";
|
|
11
|
+
import { KNOWN_SKILL_TOOL_ATTRS, SKILL_TOOL_SUB_TYPE_BY_RESOURCE, UNAUTHORABLE_SKILL_TOOL_ATTRS, } from "./types.js";
|
|
12
|
+
/**
|
|
13
|
+
* One tool block → its normalized shape; undefined = skipped with a
|
|
14
|
+
* diagnostic (unimplemented sub-type, wrong owner, unresolvable target).
|
|
15
|
+
*/
|
|
16
|
+
export function skillToolFromTf(block, owner, ctx) {
|
|
17
|
+
const subType = SKILL_TOOL_SUB_TYPE_BY_RESOURCE.get(block.type ?? "");
|
|
18
|
+
if (subType === undefined) {
|
|
19
|
+
ctx.diagnostics.push(`resource "${block.type}" is not a known skill tool resource; skipped`);
|
|
20
|
+
return undefined;
|
|
21
|
+
}
|
|
22
|
+
const label = block.label;
|
|
23
|
+
if (label === undefined || label === "") {
|
|
24
|
+
throw new EntityTfError(`${block.type} block is missing its label`);
|
|
25
|
+
}
|
|
26
|
+
const attrs = block.attrs;
|
|
27
|
+
const name = optionalString(attrs, "name", `tool "${label}"`, ctx) ?? "";
|
|
28
|
+
const where = `skill tool "${name}" (${block.type}.${label})`;
|
|
29
|
+
if (subType.implemented !== true) {
|
|
30
|
+
ctx.diagnostics.push(`${where}: tool kind is not supported on the terraform path yet; skipped`);
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|
|
33
|
+
const known = KNOWN_SKILL_TOOL_ATTRS[subType.typeKey];
|
|
34
|
+
for (const key of Object.keys(attrs)) {
|
|
35
|
+
if (UNAUTHORABLE_SKILL_TOOL_ATTRS.has(key)) {
|
|
36
|
+
ctx.diagnostics.push(`${where}: ${key} has no authoring slot on the terraform path yet; a rebuilt stream will omit it`);
|
|
37
|
+
}
|
|
38
|
+
else if (!known.has(key)) {
|
|
39
|
+
ctx.diagnostics.push(`${where}: unhandled attribute "${key}" — the export dialect grew; extend skillToolFromTf deliberately`);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
if (resourceRefLabel(attrs["skill_id"], owner.skillType) !== owner.skillLabel) {
|
|
43
|
+
ctx.diagnostics.push(`${where}: skill_id does not reference ${owner.skillType}.${owner.skillLabel}; skipped`);
|
|
44
|
+
return undefined;
|
|
45
|
+
}
|
|
46
|
+
// Target: the owning app's resource ref = self; a data.elementum_app ref =
|
|
47
|
+
// a foreign app, resolved to its display name via the stream's data block.
|
|
48
|
+
const targetAttr = attrs["target_id"];
|
|
49
|
+
let target;
|
|
50
|
+
// The tool's fields are scoped under the RESOLVED target aspect, not
|
|
51
|
+
// always the owning app (board issue #169) — a field on a foreign
|
|
52
|
+
// app/element carries that aspect's own label, mirroring the
|
|
53
|
+
// foreignApp/foreignElement resolution below.
|
|
54
|
+
let fieldScopeLabel = owner.ownerTfLabel;
|
|
55
|
+
let fieldScope = "app";
|
|
56
|
+
const selfLabel = resourceRefLabel(targetAttr, owner.appType);
|
|
57
|
+
if (selfLabel === owner.appLabel) {
|
|
58
|
+
target = { kind: "self" };
|
|
59
|
+
}
|
|
60
|
+
else if (isTfExpr(targetAttr) && targetAttr.$expr === "data-attr" && targetAttr.type === "elementum_app") {
|
|
61
|
+
const appName = ctx.dataName("elementum_app", targetAttr.label);
|
|
62
|
+
if (appName === undefined) {
|
|
63
|
+
ctx.diagnostics.push(`${where}: target_id references data.elementum_app.${targetAttr.label} but the stream has no such data block; skipped`);
|
|
64
|
+
return undefined;
|
|
65
|
+
}
|
|
66
|
+
target = { kind: "foreignApp", name: appName };
|
|
67
|
+
fieldScopeLabel = targetAttr.label;
|
|
68
|
+
}
|
|
69
|
+
else if (isTfExpr(targetAttr) && targetAttr.$expr === "data-attr" && targetAttr.type === "elementum_element") {
|
|
70
|
+
// Board issue #42: an aspect target can be an element, not just an app.
|
|
71
|
+
const elementName = ctx.dataName("elementum_element", targetAttr.label);
|
|
72
|
+
if (elementName === undefined) {
|
|
73
|
+
ctx.diagnostics.push(`${where}: target_id references data.elementum_element.${targetAttr.label} but the stream has no such data block; skipped`);
|
|
74
|
+
return undefined;
|
|
75
|
+
}
|
|
76
|
+
target = { kind: "foreignElement", name: elementName };
|
|
77
|
+
fieldScopeLabel = targetAttr.label;
|
|
78
|
+
fieldScope = "element";
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
ctx.diagnostics.push(`${where}: target_id has an unrecognized shape (${JSON.stringify(targetAttr)}); skipped`);
|
|
82
|
+
return undefined;
|
|
83
|
+
}
|
|
84
|
+
let fields;
|
|
85
|
+
const rawFields = attrs["fields"];
|
|
86
|
+
if (Array.isArray(rawFields)) {
|
|
87
|
+
fields = [];
|
|
88
|
+
for (const item of rawFields) {
|
|
89
|
+
if (typeof item !== "object" || item === null || Array.isArray(item) || isTfExpr(item)) {
|
|
90
|
+
ctx.diagnostics.push(`${where}: fields item has an unrecognized shape; dropped`);
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
93
|
+
const rec = item;
|
|
94
|
+
const fieldKey = resolveToolFieldKey(rec["field_id"], fieldScopeLabel, fieldScope);
|
|
95
|
+
// A field on a foreign/out-of-scope aspect has no field resource ei
|
|
96
|
+
// can reference — it falls back to a bare platform id, confirmed live
|
|
97
|
+
// (board issue #169). Preserve it (raw-id TODO placeholder) rather
|
|
98
|
+
// than silently dropping the field.
|
|
99
|
+
const rawFieldId = fieldKey === undefined && typeof rec["field_id"] === "string" && rec["field_id"] !== "" ? rec["field_id"] : undefined;
|
|
100
|
+
if (fieldKey === undefined && rawFieldId === undefined) {
|
|
101
|
+
ctx.diagnostics.push(`${where}: fields item's field_id is not a field resource reference; dropped`);
|
|
102
|
+
continue;
|
|
103
|
+
}
|
|
104
|
+
fields.push({
|
|
105
|
+
...(fieldKey !== undefined ? { key: fieldKey } : { rawFieldId: rawFieldId }),
|
|
106
|
+
...(typeof rec["name"] === "string" && { name: rec["name"] }),
|
|
107
|
+
...(typeof rec["description"] === "string" && { description: rec["description"] }),
|
|
108
|
+
// The provider's own schema docs `required` on search-tool fields as
|
|
109
|
+
// "Not used by search tools" — it's platform-generated noise (see
|
|
110
|
+
// to-tf.ts), so it's excluded here too rather than echoed into
|
|
111
|
+
// authored source.
|
|
112
|
+
...(subType.typeKey === "createRecord" && typeof rec["required"] === "boolean" && { required: rec["required"] }),
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
if (fields.length === 0)
|
|
116
|
+
fields = undefined;
|
|
117
|
+
}
|
|
118
|
+
else if (rawFields !== undefined) {
|
|
119
|
+
ctx.diagnostics.push(`${where}: fields is not a list; dropped`);
|
|
120
|
+
}
|
|
121
|
+
if (subType.typeKey === "searchAspect" && attrs["filter"] !== undefined) {
|
|
122
|
+
ctx.diagnostics.push(`${where}: filter is not supported on the terraform path yet; a rebuilt stream will omit it`);
|
|
123
|
+
}
|
|
124
|
+
if (subType.typeKey === "searchAspect" && attrs["filter_variables"] !== undefined) {
|
|
125
|
+
ctx.diagnostics.push(`${where}: filter_variables are not supported on the terraform path yet; a rebuilt stream will omit them`);
|
|
126
|
+
}
|
|
127
|
+
const startMessage = optionalString(attrs, "start_message", where, ctx);
|
|
128
|
+
const status = optionalString(attrs, "status", where, ctx);
|
|
129
|
+
return {
|
|
130
|
+
typeKey: subType.typeKey,
|
|
131
|
+
name,
|
|
132
|
+
description: optionalString(attrs, "description", where, ctx) ?? "",
|
|
133
|
+
...(status === "INACTIVE" && { status }),
|
|
134
|
+
...(startMessage !== undefined && { startMessage }),
|
|
135
|
+
target,
|
|
136
|
+
...(fields !== undefined && { fields }),
|
|
137
|
+
...(subType.typeKey === "searchAspect" && {
|
|
138
|
+
queryDescription: optionalString(attrs, "query_description", where, ctx) ?? "",
|
|
139
|
+
}),
|
|
140
|
+
...(typeof attrs["result_limit"] === "number" && { limit: attrs["result_limit"] }),
|
|
141
|
+
};
|
|
142
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/** The skill-tool entity's registry entry (see src/graph/). */
|
|
2
|
+
import { NO_CANVAS, NO_CATALOG, NO_DATA, NO_LIFECYCLE } from "../../graph/types.js";
|
|
3
|
+
import { SKILL_TOOL_SUB_TYPES } from "./types.js";
|
|
4
|
+
export const skillToolModule = {
|
|
5
|
+
kind: "skill-tool",
|
|
6
|
+
stream: { role: "streamMember" },
|
|
7
|
+
authoring: { unit: "inline", bag: "tools" },
|
|
8
|
+
parents: [{ parent: "skill", child: "skill-tool" }],
|
|
9
|
+
resource: {
|
|
10
|
+
shape: "subTypes",
|
|
11
|
+
rows: SKILL_TOOL_SUB_TYPES.map((t) => ({
|
|
12
|
+
key: t.typeKey,
|
|
13
|
+
resourceType: t.resourceType,
|
|
14
|
+
implemented: t.implemented === true,
|
|
15
|
+
})),
|
|
16
|
+
},
|
|
17
|
+
data: NO_DATA,
|
|
18
|
+
lifecycle: NO_LIFECYCLE,
|
|
19
|
+
canvas: NO_CANVAS,
|
|
20
|
+
catalog: NO_CATALOG,
|
|
21
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skill-tool emission: one authored tool → one
|
|
3
|
+
* `elementum_agentic_skill_*_tool` resource block, in the platform's
|
|
4
|
+
* dialect (confirmed live against the deployed provider schema). The owning
|
|
5
|
+
* SKILL's to-tf drives the pass and supplies the back-reference
|
|
6
|
+
* (`skill_id`) — this module never names the skill or app resource types.
|
|
7
|
+
* Mirrors `entities/agent-tool/to-tf.ts`.
|
|
8
|
+
*/
|
|
9
|
+
import { type TfBlock } from "../../engine/tf/index.js";
|
|
10
|
+
export interface SkillToolToTfContext {
|
|
11
|
+
/** The owning app's refName + tfLabel (namespace) — self-target detection + app_id. */
|
|
12
|
+
readonly appRefName: string;
|
|
13
|
+
readonly appTfLabel: string;
|
|
14
|
+
/** The owning skill's tfLabel. */
|
|
15
|
+
readonly skillTfLabel: string;
|
|
16
|
+
/** Records a foreign-app data lookup for data.tf; returns its tfLabel. */
|
|
17
|
+
foreignAppRef(tfLabel: string, name: string): void;
|
|
18
|
+
/** Records a foreign-ELEMENT data lookup for data.tf (board issue #42). */
|
|
19
|
+
foreignElementRef(tfLabel: string, name: string): void;
|
|
20
|
+
/** Degradations land here — reported by the caller, never silent. */
|
|
21
|
+
readonly diagnostics: string[];
|
|
22
|
+
}
|
|
23
|
+
export interface SkillToolToTfResult {
|
|
24
|
+
readonly block: TfBlock;
|
|
25
|
+
/** `<resourceType>.<tfLabel>` — bookkeeping for the skill catalog. */
|
|
26
|
+
readonly address: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* One authored tool entry (`{ createRecord: {...} }`) → its resource block;
|
|
30
|
+
* undefined = degraded with a diagnostic (unimplemented sub-type, missing
|
|
31
|
+
* target). Tool-name validity is enforced in the authoring builders
|
|
32
|
+
* (entities/skill/tools.ts), not here.
|
|
33
|
+
*/
|
|
34
|
+
export declare function skillToolToTf(entry: Record<string, unknown>, ctx: SkillToolToTfContext): SkillToolToTfResult | undefined;
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skill-tool emission: one authored tool → one
|
|
3
|
+
* `elementum_agentic_skill_*_tool` resource block, in the platform's
|
|
4
|
+
* dialect (confirmed live against the deployed provider schema). The owning
|
|
5
|
+
* SKILL's to-tf drives the pass and supplies the back-reference
|
|
6
|
+
* (`skill_id`) — this module never names the skill or app resource types.
|
|
7
|
+
* Mirrors `entities/agent-tool/to-tf.ts`.
|
|
8
|
+
*/
|
|
9
|
+
import { appScopedResourceLabel, expr, sanitizeName } from "../../engine/tf/index.js";
|
|
10
|
+
import { fieldRefToTfValue } from "../field/to-tf.js";
|
|
11
|
+
import { SKILL_TOOL_SUB_TYPE_BY_TYPE_KEY } from "./types.js";
|
|
12
|
+
/** authoring FieldRef token → the field resource address, via the shared field-ref helper. */
|
|
13
|
+
function fieldRefValue(token, where, ctx) {
|
|
14
|
+
const refName = token.refName ?? "";
|
|
15
|
+
const authoringType = token.fieldType ?? "";
|
|
16
|
+
// appTfLabel, not appRefName: fieldRefToTfValue builds a terraform address
|
|
17
|
+
// (resource label prefix / local name), and the two differ whenever an
|
|
18
|
+
// app's authoring ref doesn't match its platform namespace (e.g. a clone).
|
|
19
|
+
// agent-tool/to-tf.ts's equivalent already passes appTfLabel.
|
|
20
|
+
const ref = refName === "" ? undefined : fieldRefToTfValue(authoringType, refName, ctx.appTfLabel);
|
|
21
|
+
if (ref === undefined) {
|
|
22
|
+
ctx.diagnostics.push(`${where}: field token "${refName}" has no terraform field resource mapping (fieldType ${JSON.stringify(authoringType)}); dropped`);
|
|
23
|
+
return undefined;
|
|
24
|
+
}
|
|
25
|
+
if (token.parent !== undefined && token.parent !== ctx.appRefName) {
|
|
26
|
+
ctx.diagnostics.push(`${where}: field token "${refName}" belongs to app "${token.parent}", not this workspace's config — cross-app field refs are not supported on the terraform path yet; dropped`);
|
|
27
|
+
return undefined;
|
|
28
|
+
}
|
|
29
|
+
return ref;
|
|
30
|
+
}
|
|
31
|
+
/** authoring AspectRef token → target_id value (self resource ref or foreign data ref). */
|
|
32
|
+
function targetIdValue(token, ctx) {
|
|
33
|
+
if (token.__kind !== "element" && (token.refName ?? "") === ctx.appRefName) {
|
|
34
|
+
return expr.resourceAttr("elementum_app", ctx.appTfLabel, ["id"]);
|
|
35
|
+
}
|
|
36
|
+
// ei derives foreign-app/foreign-element data labels from the display NAME.
|
|
37
|
+
const name = token.name ?? token.refName ?? "";
|
|
38
|
+
const tfLabel = sanitizeName(name);
|
|
39
|
+
// Board issue #42: an aspect token can be an element, not just an app.
|
|
40
|
+
if (token.__kind === "element") {
|
|
41
|
+
ctx.foreignElementRef(tfLabel, name);
|
|
42
|
+
return expr.dataAttr("elementum_element", tfLabel, ["id"]);
|
|
43
|
+
}
|
|
44
|
+
ctx.foreignAppRef(tfLabel, name);
|
|
45
|
+
return expr.dataAttr("elementum_app", tfLabel, ["id"]);
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* One authored tool entry (`{ createRecord: {...} }`) → its resource block;
|
|
49
|
+
* undefined = degraded with a diagnostic (unimplemented sub-type, missing
|
|
50
|
+
* target). Tool-name validity is enforced in the authoring builders
|
|
51
|
+
* (entities/skill/tools.ts), not here.
|
|
52
|
+
*/
|
|
53
|
+
export function skillToolToTf(entry, ctx) {
|
|
54
|
+
const typeKey = Object.keys(entry)[0];
|
|
55
|
+
if (typeKey === undefined)
|
|
56
|
+
return undefined;
|
|
57
|
+
const subType = SKILL_TOOL_SUB_TYPE_BY_TYPE_KEY.get(typeKey);
|
|
58
|
+
const inner = entry[typeKey];
|
|
59
|
+
const name = inner?.name ?? "";
|
|
60
|
+
if (subType === undefined) {
|
|
61
|
+
ctx.diagnostics.push(`skill tool "${name}": unknown tool kind "${typeKey}"; dropped`);
|
|
62
|
+
return undefined;
|
|
63
|
+
}
|
|
64
|
+
if (subType.implemented !== true) {
|
|
65
|
+
ctx.diagnostics.push(`skill tool "${name}": tool kind "${typeKey}" is not supported on the terraform path yet; dropped`);
|
|
66
|
+
return undefined;
|
|
67
|
+
}
|
|
68
|
+
if (inner === undefined || typeof inner !== "object") {
|
|
69
|
+
ctx.diagnostics.push(`skill tool entry "${typeKey}" has a non-object body; dropped`);
|
|
70
|
+
return undefined;
|
|
71
|
+
}
|
|
72
|
+
const where = `skill tool "${name}"`;
|
|
73
|
+
const tfLabel = appScopedResourceLabel(ctx.appTfLabel, sanitizeName(name));
|
|
74
|
+
const attrs = {
|
|
75
|
+
skill_id: expr.resourceAttr("elementum_agentic_skill", ctx.skillTfLabel, ["id"]),
|
|
76
|
+
app_id: expr.resourceAttr("elementum_app", ctx.appTfLabel, ["id"]),
|
|
77
|
+
name,
|
|
78
|
+
description: inner.description ?? "",
|
|
79
|
+
status: inner.status ?? "ACTIVE",
|
|
80
|
+
};
|
|
81
|
+
if (inner.startMessage !== undefined)
|
|
82
|
+
attrs["start_message"] = inner.startMessage;
|
|
83
|
+
if (inner.aspectId === undefined) {
|
|
84
|
+
ctx.diagnostics.push(`${where}: no target aspect token; dropped`);
|
|
85
|
+
return undefined;
|
|
86
|
+
}
|
|
87
|
+
attrs["target_id"] = targetIdValue(inner.aspectId, ctx);
|
|
88
|
+
if (typeKey === "searchAspect") {
|
|
89
|
+
attrs["query_description"] = inner.queryDescription ?? "";
|
|
90
|
+
if (inner.limit !== undefined)
|
|
91
|
+
attrs["result_limit"] = inner.limit;
|
|
92
|
+
}
|
|
93
|
+
if (inner.fields !== undefined && inner.fields.length > 0) {
|
|
94
|
+
const fieldValues = [];
|
|
95
|
+
for (const f of inner.fields) {
|
|
96
|
+
// A raw-id fallback field (board issue #169) is echoed straight
|
|
97
|
+
// through — ei never resolves it to a reference either, so there's
|
|
98
|
+
// nothing to re-derive.
|
|
99
|
+
const ref = typeof f.fieldId === "string"
|
|
100
|
+
? f.fieldId
|
|
101
|
+
: f.fieldId === undefined
|
|
102
|
+
? undefined
|
|
103
|
+
: fieldRefValue(f.fieldId, where, ctx);
|
|
104
|
+
if (ref === undefined)
|
|
105
|
+
continue;
|
|
106
|
+
fieldValues.push({
|
|
107
|
+
field_id: ref,
|
|
108
|
+
name: f.name ?? "",
|
|
109
|
+
description: f.description ?? "",
|
|
110
|
+
// `required` on a searchAspect field is documented by the provider's
|
|
111
|
+
// own schema as "Not used by search tools" — the platform never
|
|
112
|
+
// queries or stores a meaningful value for it there, unlike
|
|
113
|
+
// createRecord's fields, where it's real and must always be emitted
|
|
114
|
+
// (defaulting false) per the agent-tool/to-tf.ts fix of 2026-08-05.
|
|
115
|
+
// (A `required: false` that used to show up in `ei apps export` for
|
|
116
|
+
// search tools was a bug in the exporter itself — cmd/elementum's
|
|
117
|
+
// hcl_skill.go was fabricating it from Go's zero-value default
|
|
118
|
+
// rather than an actually-discovered value; fixed 2026-08-11.)
|
|
119
|
+
...(typeKey !== "searchAspect" && { required: f.required ?? false }),
|
|
120
|
+
});
|
|
121
|
+
if (f.defaultValue !== undefined) {
|
|
122
|
+
ctx.diagnostics.push(`${where}: field default values are not supported on the terraform path yet; dropped`);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
if (fieldValues.length > 0)
|
|
126
|
+
attrs["fields"] = fieldValues;
|
|
127
|
+
}
|
|
128
|
+
const block = { kind: "resource", type: subType.resourceType, label: tfLabel, attrs };
|
|
129
|
+
return { block, address: `${subType.resourceType}.${tfLabel}` };
|
|
130
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The skill-tool entity's sub-type table. Skill tools are a real sub-entity —
|
|
3
|
+
* six terraform resource types sharing one ownership shape (skill_id +
|
|
4
|
+
* name/description/status) — so per-sub-type knowledge is one ROW here,
|
|
5
|
+
* exactly like `entities/agent-tool/types.ts` (which this mirrors).
|
|
6
|
+
*
|
|
7
|
+
* This tranche implements createRecord + searchAspect end to end; the other
|
|
8
|
+
* rows are declared so streams REPORT them by name instead of "unknown
|
|
9
|
+
* resource", and adoption scopes ONLY the implemented ones — an adopted type
|
|
10
|
+
* the printer can't reconstruct would plan as a destroy on rebuild.
|
|
11
|
+
*
|
|
12
|
+
* Note the wire key for the automation tool is `automation`, not agent-tool's
|
|
13
|
+
* `executeWorkflow` — confirmed against the live provider schema
|
|
14
|
+
* (`entities/skill/tools.ts`'s `skillAutomation` factory).
|
|
15
|
+
*/
|
|
16
|
+
/** One skill-tool sub-type: authoring variant key ↔ resource type. */
|
|
17
|
+
export interface SkillToolSubType {
|
|
18
|
+
/** The `AgenticSkillToolCreateInput` variant key — the tool factory's discriminant ("createRecord"). */
|
|
19
|
+
readonly typeKey: string;
|
|
20
|
+
/** Terraform resource type ("elementum_agentic_skill_create_record_tool"). */
|
|
21
|
+
readonly resourceType: string;
|
|
22
|
+
/** Implemented on the terraform path (to-tf + from-tf + printer). */
|
|
23
|
+
readonly implemented?: true;
|
|
24
|
+
}
|
|
25
|
+
export declare const SKILL_TOOL_SUB_TYPES: readonly SkillToolSubType[];
|
|
26
|
+
export declare const SKILL_TOOL_SUB_TYPE_BY_TYPE_KEY: ReadonlyMap<string, SkillToolSubType>;
|
|
27
|
+
export declare const SKILL_TOOL_SUB_TYPE_BY_RESOURCE: ReadonlyMap<string, SkillToolSubType>;
|
|
28
|
+
/** The resource types the terraform path round-trips today (adoption scope). */
|
|
29
|
+
export declare const IMPLEMENTED_SKILL_TOOL_RESOURCE_TYPES: readonly string[];
|
|
30
|
+
/** Every declared skill-tool resource type — stream partition recognizes these by name. */
|
|
31
|
+
export declare const ALL_SKILL_TOOL_RESOURCE_TYPES: readonly string[];
|
|
32
|
+
/**
|
|
33
|
+
* Attributes `skillToolFromTf` understands per implemented sub-type — growth
|
|
34
|
+
* is reported loudly. `run_as`/`service_account_id`/`status` are real
|
|
35
|
+
* provider attributes (confirmed live) but out of authoring scope this
|
|
36
|
+
* tranche — treated as known-but-unauthored (see `KNOWN_BUT_UNAUTHORED_SKILL_TOOL_ATTRS`).
|
|
37
|
+
*/
|
|
38
|
+
export declare const KNOWN_SKILL_TOOL_ATTRS: Readonly<Record<string, ReadonlySet<string>>>;
|
|
39
|
+
/** Known provider attrs with no authoring slot yet — reported by name, tool still pulled. */
|
|
40
|
+
export declare const UNAUTHORABLE_SKILL_TOOL_ATTRS: ReadonlySet<string>;
|