@elementumai/edk 0.0.0-oidc-bootstrap → 0.8.0-preview.11
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 +408 -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/factories.d.ts +189 -0
- package/dist-sdk/src/catalog/factories.js +202 -0
- package/dist-sdk/src/catalog/from-authoring.d.ts +103 -0
- package/dist-sdk/src/catalog/from-authoring.js +462 -0
- package/dist-sdk/src/catalog/index.d.ts +11 -0
- package/dist-sdk/src/catalog/index.js +11 -0
- package/dist-sdk/src/catalog/org.d.ts +11 -0
- package/dist-sdk/src/catalog/org.js +211 -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 +36 -0
- package/dist-sdk/src/catalog/render.js +176 -0
- package/dist-sdk/src/catalog/token.d.ts +10 -0
- package/dist-sdk/src/catalog/token.js +62 -0
- package/dist-sdk/src/catalog/types.d.ts +158 -0
- package/dist-sdk/src/catalog/types.js +83 -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 +93 -0
- package/dist-sdk/src/core/system-fields.js +151 -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 +36 -0
- package/dist-sdk/src/core/types/ai-provider.js +32 -0
- package/dist-sdk/src/core/types/app.d.ts +838 -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 +49 -0
- package/dist-sdk/src/engine/build/context.js +6 -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 +23 -0
- package/dist-sdk/src/engine/pull/context.js +44 -0
- package/dist-sdk/src/engine/pull/org.d.ts +44 -0
- package/dist-sdk/src/engine/pull/org.js +104 -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 +31 -0
- package/dist-sdk/src/engine/tf/labels.js +125 -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/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 +18 -0
- package/dist-sdk/src/entities/agent/deserializer/print-agent-v2.js +177 -0
- package/dist-sdk/src/entities/agent/from-tf.d.ts +50 -0
- package/dist-sdk/src/entities/agent/from-tf.js +169 -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 +116 -0
- package/dist-sdk/src/entities/agent/to-tf.d.ts +33 -0
- package/dist-sdk/src/entities/agent/to-tf.js +136 -0
- package/dist-sdk/src/entities/agent/tools.d.ts +205 -0
- package/dist-sdk/src/entities/agent/tools.js +199 -0
- package/dist-sdk/src/entities/agent-tool/from-tf.d.ts +63 -0
- package/dist-sdk/src/entities/agent-tool/from-tf.js +169 -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 +38 -0
- package/dist-sdk/src/entities/agent-tool/to-tf.js +164 -0
- package/dist-sdk/src/entities/agent-tool/types.d.ts +42 -0
- package/dist-sdk/src/entities/agent-tool/types.js +70 -0
- package/dist-sdk/src/entities/app/build.d.ts +318 -0
- package/dist-sdk/src/entities/app/build.js +325 -0
- package/dist-sdk/src/entities/app/deserializer/normalize.d.ts +165 -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 +180 -0
- package/dist-sdk/src/entities/app/index.d.ts +11 -0
- package/dist-sdk/src/entities/app/index.js +10 -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 +59 -0
- package/dist-sdk/src/entities/app/to-tf.d.ts +28 -0
- package/dist-sdk/src/entities/app/to-tf.js +183 -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 +215 -0
- package/dist-sdk/src/entities/automation/build.js +424 -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 +135 -0
- package/dist-sdk/src/entities/automation/deserializer/ast.js +13 -0
- package/dist-sdk/src/entities/automation/deserializer/print-automation.d.ts +40 -0
- package/dist-sdk/src/entities/automation/deserializer/print-automation.js +1040 -0
- package/dist-sdk/src/entities/automation/filter.d.ts +81 -0
- package/dist-sdk/src/entities/automation/filter.js +146 -0
- package/dist-sdk/src/entities/automation/from-tf.d.ts +36 -0
- package/dist-sdk/src/entities/automation/from-tf.js +252 -0
- package/dist-sdk/src/entities/automation/index.d.ts +18 -0
- package/dist-sdk/src/entities/automation/index.js +21 -0
- package/dist-sdk/src/entities/automation/module.d.ts +3 -0
- package/dist-sdk/src/entities/automation/module.js +153 -0
- package/dist-sdk/src/entities/automation/operators.d.ts +66 -0
- package/dist-sdk/src/entities/automation/operators.js +43 -0
- package/dist-sdk/src/entities/automation/script-code.d.ts +62 -0
- package/dist-sdk/src/entities/automation/script-code.js +366 -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 +535 -0
- package/dist-sdk/src/entities/automation/tasks.js +697 -0
- package/dist-sdk/src/entities/automation/to-tf.d.ts +38 -0
- package/dist-sdk/src/entities/automation/to-tf.js +266 -0
- package/dist-sdk/src/entities/automation/triggers.d.ts +197 -0
- package/dist-sdk/src/entities/automation/triggers.js +202 -0
- package/dist-sdk/src/entities/automation/types.d.ts +53 -0
- package/dist-sdk/src/entities/automation/types.js +101 -0
- package/dist-sdk/src/entities/automation/value-ref-tf.d.ts +76 -0
- package/dist-sdk/src/entities/automation/value-ref-tf.js +190 -0
- package/dist-sdk/src/entities/element/build.d.ts +108 -0
- package/dist-sdk/src/entities/element/build.js +109 -0
- package/dist-sdk/src/entities/element/from-tf.d.ts +19 -0
- package/dist-sdk/src/entities/element/from-tf.js +155 -0
- package/dist-sdk/src/entities/element/index.d.ts +9 -0
- package/dist-sdk/src/entities/element/index.js +9 -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 +63 -0
- package/dist-sdk/src/entities/element/to-tf.d.ts +14 -0
- package/dist-sdk/src/entities/element/to-tf.js +151 -0
- package/dist-sdk/src/entities/field/build.d.ts +69 -0
- package/dist-sdk/src/entities/field/build.js +74 -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 +170 -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 +29 -0
- package/dist-sdk/src/entities/field/from-tf.js +73 -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 +49 -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 +55 -0
- package/dist-sdk/src/entities/field/to-tf.js +97 -0
- package/dist-sdk/src/entities/field/types.d.ts +27 -0
- package/dist-sdk/src/entities/field/types.js +46 -0
- package/dist-sdk/src/entities/file-reader/build.d.ts +124 -0
- package/dist-sdk/src/entities/file-reader/build.js +105 -0
- package/dist-sdk/src/entities/file-reader/index.d.ts +5 -0
- package/dist-sdk/src/entities/file-reader/index.js +5 -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/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 +5 -0
- package/dist-sdk/src/entities/org/connector.js +37 -0
- package/dist-sdk/src/entities/org/group.d.ts +5 -0
- package/dist-sdk/src/entities/org/group.js +31 -0
- package/dist-sdk/src/entities/org/index.d.ts +10 -0
- package/dist-sdk/src/entities/org/index.js +10 -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 +21 -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 +242 -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/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 +49 -0
- package/dist-sdk/src/entities/shared/types/field-types.js +48 -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 +20 -0
- package/dist-sdk/src/entities/skill/deserializer/print-skill-v2.js +96 -0
- package/dist-sdk/src/entities/skill/from-tf.d.ts +33 -0
- package/dist-sdk/src/entities/skill/from-tf.js +95 -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 +106 -0
- package/dist-sdk/src/entities/skill/to-tf.d.ts +33 -0
- package/dist-sdk/src/entities/skill/to-tf.js +58 -0
- package/dist-sdk/src/entities/skill/tools.d.ts +71 -0
- package/dist-sdk/src/entities/skill/tools.js +88 -0
- package/dist-sdk/src/entities/skill-tool/from-tf.d.ts +47 -0
- package/dist-sdk/src/entities/skill-tool/from-tf.js +121 -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 +32 -0
- package/dist-sdk/src/entities/skill-tool/to-tf.js +107 -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 +25 -0
- package/dist-sdk/src/entities/view/from-tf.js +233 -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 +63 -0
- package/dist-sdk/src/entities/view/to-tf.js +156 -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 +14 -0
- package/dist-sdk/src/graph/deferred-catalog-render.js +37 -0
- package/dist-sdk/src/graph/index.d.ts +83 -0
- package/dist-sdk/src/graph/index.js +207 -0
- package/dist-sdk/src/graph/modules.d.ts +7 -0
- package/dist-sdk/src/graph/modules.js +37 -0
- package/dist-sdk/src/graph/types.d.ts +301 -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 +173 -8
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reference-surface types for the v2 catalog.
|
|
3
|
+
*
|
|
4
|
+
* A *catalog fragment* describes one entity's **reference surface** — exactly
|
|
5
|
+
* what a referencing entity file needs to name it safely, and nothing more.
|
|
6
|
+
* For a behavioral entity (automation / agent / skill) that is just its
|
|
7
|
+
* **handle** (the join key, resolved to an id at deploy time) plus its display
|
|
8
|
+
* name for readability. **No id appears in the catalog** — identity lives in
|
|
9
|
+
* state (`src/deploy/state`).
|
|
10
|
+
*
|
|
11
|
+
* The `__kind` discriminant lets a builder's reference parameter accept exactly
|
|
12
|
+
* the right kind of handle (`runAutomation(ref: AutomationRef)`) and makes the
|
|
13
|
+
* fragment self-describing. These are the shapes the fragment renderer emits
|
|
14
|
+
* and the (forthcoming) builders consume — the single shared contract.
|
|
15
|
+
*
|
|
16
|
+
* Two groups of kinds share this shape. **Behavioral entities**
|
|
17
|
+
* (automation/agent/skill) are author-managed: imported reference-only, then
|
|
18
|
+
* deployed. **Reference-surface entities** — an app's *fields* and *search
|
|
19
|
+
* tables*, and org-owned *cloud links* / AI provider *connectors* — are never
|
|
20
|
+
* deployed through v2; they're imported so a builder can point at them by typed
|
|
21
|
+
* handle (`app.fields.severity`, `connectors.bedrockSonnet`). Field refs carry
|
|
22
|
+
* a little extra schema (`fieldType`) for authoring-time type safety; that
|
|
23
|
+
* schema is authoring-only — at the wire boundary `resolvePayload` replaces the
|
|
24
|
+
* whole token with the resolved id, discarding it.
|
|
25
|
+
*/
|
|
26
|
+
/**
|
|
27
|
+
* Kinds a catalog fragment can describe:
|
|
28
|
+
* - behavioral, app-owned, deployable — `automation` / `agent` / `skill`;
|
|
29
|
+
* - reference-only, app-owned — `field` / `searchTable`;
|
|
30
|
+
* - reference-only, org-owned — `cloudLink` / `connector`;
|
|
31
|
+
* - the aspect itself (a tool's `aspectId`) — `app` / `element`, resolved by
|
|
32
|
+
* handle against the app registry rather than a state scope;
|
|
33
|
+
* - nested under an automation — `triggerParameter` / `outputProperty`,
|
|
34
|
+
* resolved to the current-version param/output id via the parent
|
|
35
|
+
* automation's state binding.
|
|
36
|
+
*/
|
|
37
|
+
export type CatalogRefKind = "automation" | "agent" | "skill" | "flow" | "approvalChain" | "table" | "tableColumn" | "cloudLink" | "field" | "searchTable" | "documentModel" | "documentModelField" | "connector" | "category" | "group" | "app" | "element" | "triggerParameter" | "outputProperty";
|
|
38
|
+
/**
|
|
39
|
+
* The reference surface for a catalog entity. `handle` is the stable join key
|
|
40
|
+
* (no id); `name` is for readability/diagnostics, never a match key.
|
|
41
|
+
*/
|
|
42
|
+
export interface CatalogRef<K extends CatalogRefKind = CatalogRefKind> {
|
|
43
|
+
readonly __kind: K;
|
|
44
|
+
readonly refName: string;
|
|
45
|
+
readonly name: string;
|
|
46
|
+
/**
|
|
47
|
+
* The owning **parent**'s handle — the aspect (app / element / table) that
|
|
48
|
+
* owns this entity — so a reference is self-describing ("app X's automation
|
|
49
|
+
* foo") and an entity can derive its parent from its own ref. Absent for
|
|
50
|
+
* org-owned kinds (cloud links, connectors), which resolve against the single
|
|
51
|
+
* org scope by kind.
|
|
52
|
+
*/
|
|
53
|
+
readonly parent?: string;
|
|
54
|
+
}
|
|
55
|
+
export interface AutomationRef<TTrigger = unknown, TOutput = unknown> extends CatalogRef<"automation"> {
|
|
56
|
+
/**
|
|
57
|
+
* Always `undefined` at runtime — a typed phantom that lets other entities inspect the trigger
|
|
58
|
+
* output shape at compile time (e.g. `typeof app.automations.sendSurvey.trigger`).
|
|
59
|
+
*/
|
|
60
|
+
readonly trigger?: TTrigger;
|
|
61
|
+
/**
|
|
62
|
+
* Always `undefined` at runtime — a typed phantom for the accumulated task output shape
|
|
63
|
+
* (e.g. `typeof app.automations.sendSurvey.output`).
|
|
64
|
+
*/
|
|
65
|
+
readonly output?: TOutput;
|
|
66
|
+
}
|
|
67
|
+
export type AgentRef = CatalogRef<"agent">;
|
|
68
|
+
export type SkillRef = CatalogRef<"skill">;
|
|
69
|
+
export type FlowRef = CatalogRef<"flow">;
|
|
70
|
+
export type ApprovalChainRef = CatalogRef<"approvalChain">;
|
|
71
|
+
export interface TableColumnRef extends CatalogRef<"tableColumn"> {
|
|
72
|
+
/** Owning table handle. */
|
|
73
|
+
readonly parent: string;
|
|
74
|
+
readonly fieldType?: string;
|
|
75
|
+
readonly tags?: readonly string[];
|
|
76
|
+
}
|
|
77
|
+
export interface TableRef extends CatalogRef<"table"> {
|
|
78
|
+
readonly columns?: Readonly<Record<string, TableColumnRef>>;
|
|
79
|
+
/** Raw category id, when imported. Categories are not tokenized yet. */
|
|
80
|
+
readonly categoryId?: string;
|
|
81
|
+
}
|
|
82
|
+
export type SearchTableRef = CatalogRef<"searchTable">;
|
|
83
|
+
export type ConnectorRef = CatalogRef<"connector">;
|
|
84
|
+
export type CloudLinkRef = CatalogRef<"cloudLink">;
|
|
85
|
+
/** Org-owned reference identities from `elementum pull org --data-only` (pristine-refactor). */
|
|
86
|
+
export type CategoryRef = CatalogRef<"category">;
|
|
87
|
+
export type GroupRef = CatalogRef<"group">;
|
|
88
|
+
/** A reference to an aspect (app/element) itself — its barrel root object. */
|
|
89
|
+
export type AspectRef = CatalogRef<"app"> | CatalogRef<"element">;
|
|
90
|
+
/**
|
|
91
|
+
* A field reference. Beyond the shared surface it carries `fieldType` (the
|
|
92
|
+
* platform field type — `"TEXT"`, `"PICKLIST"`, …) so builders can constrain
|
|
93
|
+
* filters/mappings at compile time. Authoring-only: the wire boundary resolves
|
|
94
|
+
* the token to the field id and drops the rest.
|
|
95
|
+
*/
|
|
96
|
+
export interface FieldRef extends CatalogRef<"field"> {
|
|
97
|
+
readonly fieldType: string;
|
|
98
|
+
readonly tags?: readonly string[];
|
|
99
|
+
}
|
|
100
|
+
export interface TriggerParameterRef extends CatalogRef<"triggerParameter"> {
|
|
101
|
+
/**
|
|
102
|
+
* True when the automation's onDemand trigger declares this parameter
|
|
103
|
+
* required. Authoring-time metadata only (drives agentRunAutomation's
|
|
104
|
+
* typed inputs + def() validation) — slimTokens drops it at the wire
|
|
105
|
+
* boundary, exactly like FieldRef.fieldType. Canonical form: present
|
|
106
|
+
* only when true.
|
|
107
|
+
*/
|
|
108
|
+
readonly required?: boolean;
|
|
109
|
+
}
|
|
110
|
+
export type OutputPropertyRef = CatalogRef<"outputProperty">;
|
|
111
|
+
export type DocumentModelFieldRef = CatalogRef<"documentModelField">;
|
|
112
|
+
/**
|
|
113
|
+
* A document model reference that also exposes its fields as a nested ref
|
|
114
|
+
* bag — the shape the catalog fragment renders for a document model and the
|
|
115
|
+
* form `app.documentModels.<model>` takes in the barrel. `parent` on each
|
|
116
|
+
* nested ref is this document model's handle.
|
|
117
|
+
*/
|
|
118
|
+
export interface FileReaderCatalogRef extends CatalogRef<"documentModel"> {
|
|
119
|
+
readonly fields?: Readonly<Record<string, DocumentModelFieldRef>>;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* An automation reference that also exposes its onDemand trigger parameters and
|
|
123
|
+
* workflow output properties as nested ref bags — the shape the catalog
|
|
124
|
+
* fragment renders for an automation and the form `app.automations.<auto>` takes
|
|
125
|
+
* in the barrel. `parent` on each nested ref is this automation's handle.
|
|
126
|
+
*/
|
|
127
|
+
export interface AutomationCatalogRef extends CatalogRef<"automation"> {
|
|
128
|
+
readonly trigger?: Readonly<Record<string, TriggerParameterRef>>;
|
|
129
|
+
readonly outputs?: Readonly<Record<string, OutputPropertyRef>>;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Which scope resolves a kind's id at deploy:
|
|
133
|
+
* - `"app"` — the app's v2 state (app-owned entities + fields/tables);
|
|
134
|
+
* - `"org"` — the org's v2 state (cloud links, connectors);
|
|
135
|
+
* - `"registry"` — the app registry (`apps.v2.json`), for aspect self-refs
|
|
136
|
+
* (`app` / `element`), keyed by handle → id rather than a state binding.
|
|
137
|
+
*/
|
|
138
|
+
export declare const REF_SCOPE: Readonly<Record<CatalogRefKind, "app" | "org" | "registry">>;
|
|
139
|
+
/**
|
|
140
|
+
* Kinds the platform can update in place (PUT). A bound entity of any other
|
|
141
|
+
* kind that has changed can't be updated — the deploy must surface that and
|
|
142
|
+
* the user re-creates it. Flows are create-only today (the flow service has no
|
|
143
|
+
* PUT); the reference-only kinds (field/cloudLink/connector) and aspect
|
|
144
|
+
* self-refs never deploy through v2, so they're simply absent.
|
|
145
|
+
*
|
|
146
|
+
* `searchTable` is here but only *partially* updatable — the platform's PUT
|
|
147
|
+
* only honors `duration`/`targetLag` on the snowflake variant (`warehouse` is
|
|
148
|
+
* part of the DTO's shape but the platform doesn't apply changes to it, and
|
|
149
|
+
* linked tables have no update surface at all). `planV2`
|
|
150
|
+
* (`src/deploy/plan/plan.ts`) additionally checks that a search table's diff
|
|
151
|
+
* only touches those fields before returning `"update"`; everything else
|
|
152
|
+
* about a changed search table still routes to `"update-unsupported"`.
|
|
153
|
+
*
|
|
154
|
+
* `documentModel` has the same shape of caveat for its `excelCell` variant —
|
|
155
|
+
* the graph's `documentModelUpdate` mutation has no update slot for its
|
|
156
|
+
* `documentId`/`fields`, only `name`. `planV2` checks this the same way.
|
|
157
|
+
*/
|
|
158
|
+
export declare const REF_UPDATABLE: ReadonlySet<CatalogRefKind>;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reference-surface types for the v2 catalog.
|
|
3
|
+
*
|
|
4
|
+
* A *catalog fragment* describes one entity's **reference surface** — exactly
|
|
5
|
+
* what a referencing entity file needs to name it safely, and nothing more.
|
|
6
|
+
* For a behavioral entity (automation / agent / skill) that is just its
|
|
7
|
+
* **handle** (the join key, resolved to an id at deploy time) plus its display
|
|
8
|
+
* name for readability. **No id appears in the catalog** — identity lives in
|
|
9
|
+
* state (`src/deploy/state`).
|
|
10
|
+
*
|
|
11
|
+
* The `__kind` discriminant lets a builder's reference parameter accept exactly
|
|
12
|
+
* the right kind of handle (`runAutomation(ref: AutomationRef)`) and makes the
|
|
13
|
+
* fragment self-describing. These are the shapes the fragment renderer emits
|
|
14
|
+
* and the (forthcoming) builders consume — the single shared contract.
|
|
15
|
+
*
|
|
16
|
+
* Two groups of kinds share this shape. **Behavioral entities**
|
|
17
|
+
* (automation/agent/skill) are author-managed: imported reference-only, then
|
|
18
|
+
* deployed. **Reference-surface entities** — an app's *fields* and *search
|
|
19
|
+
* tables*, and org-owned *cloud links* / AI provider *connectors* — are never
|
|
20
|
+
* deployed through v2; they're imported so a builder can point at them by typed
|
|
21
|
+
* handle (`app.fields.severity`, `connectors.bedrockSonnet`). Field refs carry
|
|
22
|
+
* a little extra schema (`fieldType`) for authoring-time type safety; that
|
|
23
|
+
* schema is authoring-only — at the wire boundary `resolvePayload` replaces the
|
|
24
|
+
* whole token with the resolved id, discarding it.
|
|
25
|
+
*/
|
|
26
|
+
/**
|
|
27
|
+
* Which scope resolves a kind's id at deploy:
|
|
28
|
+
* - `"app"` — the app's v2 state (app-owned entities + fields/tables);
|
|
29
|
+
* - `"org"` — the org's v2 state (cloud links, connectors);
|
|
30
|
+
* - `"registry"` — the app registry (`apps.v2.json`), for aspect self-refs
|
|
31
|
+
* (`app` / `element`), keyed by handle → id rather than a state binding.
|
|
32
|
+
*/
|
|
33
|
+
export const REF_SCOPE = {
|
|
34
|
+
automation: "app",
|
|
35
|
+
agent: "app",
|
|
36
|
+
skill: "app",
|
|
37
|
+
flow: "app",
|
|
38
|
+
approvalChain: "app",
|
|
39
|
+
table: "org",
|
|
40
|
+
tableColumn: "org",
|
|
41
|
+
cloudLink: "org",
|
|
42
|
+
field: "app",
|
|
43
|
+
searchTable: "app",
|
|
44
|
+
documentModel: "app",
|
|
45
|
+
documentModelField: "app",
|
|
46
|
+
connector: "org",
|
|
47
|
+
category: "org",
|
|
48
|
+
group: "org",
|
|
49
|
+
app: "registry",
|
|
50
|
+
element: "registry",
|
|
51
|
+
triggerParameter: "app",
|
|
52
|
+
outputProperty: "app",
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Kinds the platform can update in place (PUT). A bound entity of any other
|
|
56
|
+
* kind that has changed can't be updated — the deploy must surface that and
|
|
57
|
+
* the user re-creates it. Flows are create-only today (the flow service has no
|
|
58
|
+
* PUT); the reference-only kinds (field/cloudLink/connector) and aspect
|
|
59
|
+
* self-refs never deploy through v2, so they're simply absent.
|
|
60
|
+
*
|
|
61
|
+
* `searchTable` is here but only *partially* updatable — the platform's PUT
|
|
62
|
+
* only honors `duration`/`targetLag` on the snowflake variant (`warehouse` is
|
|
63
|
+
* part of the DTO's shape but the platform doesn't apply changes to it, and
|
|
64
|
+
* linked tables have no update surface at all). `planV2`
|
|
65
|
+
* (`src/deploy/plan/plan.ts`) additionally checks that a search table's diff
|
|
66
|
+
* only touches those fields before returning `"update"`; everything else
|
|
67
|
+
* about a changed search table still routes to `"update-unsupported"`.
|
|
68
|
+
*
|
|
69
|
+
* `documentModel` has the same shape of caveat for its `excelCell` variant —
|
|
70
|
+
* the graph's `documentModelUpdate` mutation has no update slot for its
|
|
71
|
+
* `documentId`/`fields`, only `name`. `planV2` checks this the same way.
|
|
72
|
+
*/
|
|
73
|
+
export const REF_UPDATABLE = new Set([
|
|
74
|
+
"automation",
|
|
75
|
+
"agent",
|
|
76
|
+
"skill",
|
|
77
|
+
"approvalChain",
|
|
78
|
+
"table",
|
|
79
|
+
"app",
|
|
80
|
+
"element",
|
|
81
|
+
"searchTable",
|
|
82
|
+
"documentModel",
|
|
83
|
+
]);
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { CatalogRef } from "./types.js";
|
|
2
|
+
/** Where a catalog is written, and how its file is named. */
|
|
3
|
+
export interface CatalogTarget {
|
|
4
|
+
/** Directory holding this catalog's file. */
|
|
5
|
+
readonly dir: string;
|
|
6
|
+
/** Export const name emitted in the rendered file. */
|
|
7
|
+
readonly handle: string;
|
|
8
|
+
/** File stem; defaults to `handle` when omitted. */
|
|
9
|
+
readonly filename?: string;
|
|
10
|
+
readonly name: string;
|
|
11
|
+
readonly kind: "app" | "element" | "org";
|
|
12
|
+
}
|
|
13
|
+
/** Target for an app catalog: `<root>/apps/<appHandle>/generated/catalog.ts`. */
|
|
14
|
+
export declare function appCatalogTarget(root: string, appHandle: string, appName: string): CatalogTarget;
|
|
15
|
+
/** Target for the org catalog: `<root>/generated/catalog.ts`. */
|
|
16
|
+
export declare function orgCatalogTarget(root: string): CatalogTarget;
|
|
17
|
+
/** The catalog file path for a target. */
|
|
18
|
+
export declare function barrelPathFor(target: CatalogTarget): string;
|
|
19
|
+
/**
|
|
20
|
+
* Write a single flat catalog file for the given refs. This is the canonical
|
|
21
|
+
* write path: one file, factory-based format, no sub-directories.
|
|
22
|
+
*
|
|
23
|
+
* With `preserveIfPulled: true`, skips the write when the file already
|
|
24
|
+
* contains `export default` — indicating a pulled app source lives there and
|
|
25
|
+
* should not be clobbered by a reference-only catalog write.
|
|
26
|
+
*/
|
|
27
|
+
export declare function writeFlatCatalog(target: CatalogTarget, refs: readonly CatalogRef[], opts?: {
|
|
28
|
+
preserveIfPulled?: boolean;
|
|
29
|
+
skipIfUnchanged?: boolean;
|
|
30
|
+
}): Promise<{
|
|
31
|
+
catalogPath: string;
|
|
32
|
+
}>;
|
|
33
|
+
/** @deprecated Use writeFlatCatalog instead. */
|
|
34
|
+
export declare function writeFragment(target: CatalogTarget, ref: CatalogRef): Promise<{
|
|
35
|
+
path: string;
|
|
36
|
+
importPath: string;
|
|
37
|
+
}>;
|
|
38
|
+
/** @deprecated Use writeFlatCatalog instead. */
|
|
39
|
+
export declare function regenerateBarrel(target: CatalogTarget): Promise<string>;
|
|
40
|
+
/** @deprecated Use writeFlatCatalog instead. */
|
|
41
|
+
export declare function writeCatalog(target: CatalogTarget, refs: readonly CatalogRef[]): Promise<{
|
|
42
|
+
barrelPath: string;
|
|
43
|
+
}>;
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Filesystem writers for the v2 catalog.
|
|
3
|
+
*
|
|
4
|
+
* `writeFlatCatalog` is the canonical writer: one file per catalog root, using
|
|
5
|
+
* the factory-based `renderCatalog` format. The legacy fragment + barrel
|
|
6
|
+
* functions (`writeFragment`, `regenerateBarrel`, `writeCatalog`) are kept for
|
|
7
|
+
* the `import-entity` additive path while it migrates.
|
|
8
|
+
*/
|
|
9
|
+
import { mkdir, readdir, readFile, writeFile } from "node:fs/promises";
|
|
10
|
+
import { join } from "node:path";
|
|
11
|
+
import { CATALOG_META_BY_REF_KIND, catalogBagForRefKind } from "../graph/index.js";
|
|
12
|
+
import { renderBarrel, renderCatalog, renderFragment } from "./render.js";
|
|
13
|
+
function bagName(kind) {
|
|
14
|
+
const bag = catalogBagForRefKind(kind);
|
|
15
|
+
if (bag === undefined) {
|
|
16
|
+
throw new Error(`catalog bag name unknown for ref kind "${kind}"`);
|
|
17
|
+
}
|
|
18
|
+
return bag;
|
|
19
|
+
}
|
|
20
|
+
/** Target for an app catalog: `<root>/apps/<appHandle>/generated/catalog.ts`. */
|
|
21
|
+
export function appCatalogTarget(root, appHandle, appName) {
|
|
22
|
+
return { dir: join(root, "apps", appHandle, "generated"), handle: appHandle, filename: "catalog", name: appName, kind: "app" };
|
|
23
|
+
}
|
|
24
|
+
/** Target for the org catalog: `<root>/generated/catalog.ts`. */
|
|
25
|
+
export function orgCatalogTarget(root) {
|
|
26
|
+
return { dir: join(root, "generated"), handle: "catalog", name: "Org", kind: "org" };
|
|
27
|
+
}
|
|
28
|
+
/** The catalog file path for a target. */
|
|
29
|
+
export function barrelPathFor(target) {
|
|
30
|
+
return join(target.dir, `${target.filename ?? target.handle}.ts`);
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Write a single flat catalog file for the given refs. This is the canonical
|
|
34
|
+
* write path: one file, factory-based format, no sub-directories.
|
|
35
|
+
*
|
|
36
|
+
* With `preserveIfPulled: true`, skips the write when the file already
|
|
37
|
+
* contains `export default` — indicating a pulled app source lives there and
|
|
38
|
+
* should not be clobbered by a reference-only catalog write.
|
|
39
|
+
*/
|
|
40
|
+
export async function writeFlatCatalog(target, refs, opts) {
|
|
41
|
+
await mkdir(target.dir, { recursive: true });
|
|
42
|
+
const catalogPath = barrelPathFor(target);
|
|
43
|
+
if (opts?.preserveIfPulled) {
|
|
44
|
+
try {
|
|
45
|
+
const existing = await readFile(catalogPath, "utf8");
|
|
46
|
+
if (existing.includes("export default"))
|
|
47
|
+
return { catalogPath };
|
|
48
|
+
}
|
|
49
|
+
catch { /* file doesn't exist — proceed with write */ }
|
|
50
|
+
}
|
|
51
|
+
const rendered = renderCatalog({ kind: target.kind, refName: target.handle, name: target.name }, refs);
|
|
52
|
+
if (opts?.skipIfUnchanged) {
|
|
53
|
+
try {
|
|
54
|
+
const existing = await readFile(catalogPath, "utf8");
|
|
55
|
+
if (existing === rendered)
|
|
56
|
+
return { catalogPath };
|
|
57
|
+
}
|
|
58
|
+
catch { /* file doesn't exist — proceed with write */ }
|
|
59
|
+
}
|
|
60
|
+
await writeFile(catalogPath, rendered, "utf8");
|
|
61
|
+
return { catalogPath };
|
|
62
|
+
}
|
|
63
|
+
// ---------------------------------------------------------------------------
|
|
64
|
+
// Legacy fragment + barrel writers (kept for import-entity additive path)
|
|
65
|
+
// ---------------------------------------------------------------------------
|
|
66
|
+
function fragmentImportPath(kind, handle) {
|
|
67
|
+
return `./${bagName(kind)}/${handle}.js`;
|
|
68
|
+
}
|
|
69
|
+
/** @deprecated Use writeFlatCatalog instead. */
|
|
70
|
+
export async function writeFragment(target, ref) {
|
|
71
|
+
const bagDir = join(target.dir, bagName(ref.__kind));
|
|
72
|
+
await mkdir(bagDir, { recursive: true });
|
|
73
|
+
const path = join(bagDir, `${ref.refName}.ts`);
|
|
74
|
+
await writeFile(path, renderFragment(ref), "utf8");
|
|
75
|
+
return { path, importPath: fragmentImportPath(ref.__kind, ref.refName) };
|
|
76
|
+
}
|
|
77
|
+
/** @deprecated Use writeFlatCatalog instead. */
|
|
78
|
+
export async function regenerateBarrel(target) {
|
|
79
|
+
const entries = [];
|
|
80
|
+
for (const meta of CATALOG_META_BY_REF_KIND.values()) {
|
|
81
|
+
const kind = meta.refKind;
|
|
82
|
+
let files;
|
|
83
|
+
try {
|
|
84
|
+
files = await readdir(join(target.dir, meta.catalogBag));
|
|
85
|
+
}
|
|
86
|
+
catch (err) {
|
|
87
|
+
if (err.code === "ENOENT")
|
|
88
|
+
continue;
|
|
89
|
+
throw err;
|
|
90
|
+
}
|
|
91
|
+
for (const file of files) {
|
|
92
|
+
if (!file.endsWith(".ts"))
|
|
93
|
+
continue;
|
|
94
|
+
const refName = file.slice(0, -".ts".length);
|
|
95
|
+
entries.push({ kind, refName, importPath: fragmentImportPath(kind, refName) });
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
await mkdir(target.dir, { recursive: true });
|
|
99
|
+
const barrelPath = barrelPathFor(target);
|
|
100
|
+
await writeFile(barrelPath, renderBarrel({ kind: target.kind, refName: target.handle, name: target.name }, entries), "utf8");
|
|
101
|
+
return barrelPath;
|
|
102
|
+
}
|
|
103
|
+
/** @deprecated Use writeFlatCatalog instead. */
|
|
104
|
+
export async function writeCatalog(target, refs) {
|
|
105
|
+
for (const ref of refs)
|
|
106
|
+
await writeFragment(target, ref);
|
|
107
|
+
const barrelPath = await regenerateBarrel(target);
|
|
108
|
+
return { barrelPath };
|
|
109
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* App composer for `App.toUI()`.
|
|
3
|
+
*
|
|
4
|
+
* Walks an `App`'s flows / automations / agents bags and emits a single
|
|
5
|
+
* json-render `SerializedRenderTree` containing a top-level `Card` with
|
|
6
|
+
* a vertical `Stack` of sections — one section per entity kind, each
|
|
7
|
+
* with a heading and either a nested `FlowGraph` (for flows /
|
|
8
|
+
* automations) or a `Grid` of `ActivityNode`s (for agents).
|
|
9
|
+
*
|
|
10
|
+
* Both built deployables (with a `toRenderNode()` method) and pre-loaded
|
|
11
|
+
* `App*` reference shapes are accepted. References render as a single
|
|
12
|
+
* neutral activity node since their internal structure isn't available
|
|
13
|
+
* client-side.
|
|
14
|
+
*/
|
|
15
|
+
import { type SerializedRenderTree } from "../entities/flow/activities/render-catalog.js";
|
|
16
|
+
import type { App } from "./types/app.js";
|
|
17
|
+
/**
|
|
18
|
+
* Compose an `App` into a single json-render document. The top-level
|
|
19
|
+
* `Card` carries the app name; nested sections render flows /
|
|
20
|
+
* automations as graphs and agents as a 3-column card grid.
|
|
21
|
+
*/
|
|
22
|
+
export declare function appToUi(app: App): SerializedRenderTree;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* App composer for `App.toUI()`.
|
|
3
|
+
*
|
|
4
|
+
* Walks an `App`'s flows / automations / agents bags and emits a single
|
|
5
|
+
* json-render `SerializedRenderTree` containing a top-level `Card` with
|
|
6
|
+
* a vertical `Stack` of sections — one section per entity kind, each
|
|
7
|
+
* with a heading and either a nested `FlowGraph` (for flows /
|
|
8
|
+
* automations) or a `Grid` of `ActivityNode`s (for agents).
|
|
9
|
+
*
|
|
10
|
+
* Both built deployables (with a `toRenderNode()` method) and pre-loaded
|
|
11
|
+
* `App*` reference shapes are accepted. References render as a single
|
|
12
|
+
* neutral activity node since their internal structure isn't available
|
|
13
|
+
* client-side.
|
|
14
|
+
*/
|
|
15
|
+
import { activityNode, card, grid, heading, serializeRenderTree, stack, } from "../entities/flow/activities/render-catalog.js";
|
|
16
|
+
function hasToRenderNode(value) {
|
|
17
|
+
return (typeof value === "object" &&
|
|
18
|
+
value !== null &&
|
|
19
|
+
typeof value.toRenderNode === "function");
|
|
20
|
+
}
|
|
21
|
+
function entryName(entry, fallback) {
|
|
22
|
+
if (typeof entry === "object" && entry !== null) {
|
|
23
|
+
const named = entry;
|
|
24
|
+
if (typeof named.name === "string" && named.name.length > 0)
|
|
25
|
+
return named.name;
|
|
26
|
+
}
|
|
27
|
+
return fallback;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Resolve a single bag entry into a `RenderNode`. If the entry is a
|
|
31
|
+
* built deployable (has `toRenderNode`), use its tree; otherwise treat
|
|
32
|
+
* it as a reference and render it as a single colored leaf.
|
|
33
|
+
*/
|
|
34
|
+
function entryNode(entry, fallbackKey, refKind, refTypeLabel, layout) {
|
|
35
|
+
if (hasToRenderNode(entry) && layout === "graph-stack")
|
|
36
|
+
return entry.toRenderNode();
|
|
37
|
+
return activityNode({
|
|
38
|
+
kind: refKind,
|
|
39
|
+
name: entryName(entry, fallbackKey),
|
|
40
|
+
referenceName: refTypeLabel,
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
function bagSection(title, entries, refKind, refTypeLabel, layout) {
|
|
44
|
+
if (entries.length === 0)
|
|
45
|
+
return [];
|
|
46
|
+
const childNodes = entries.map(([key, entry]) => entryNode(entry, key, refKind, refTypeLabel, layout));
|
|
47
|
+
const section = layout === "grid"
|
|
48
|
+
? grid({ columns: 3, gap: "md" }, childNodes)
|
|
49
|
+
: stack(childNodes, { direction: "vertical", gap: "md" });
|
|
50
|
+
return [heading(title, { level: 3 }), section];
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Compose an `App` into a single json-render document. The top-level
|
|
54
|
+
* `Card` carries the app name; nested sections render flows /
|
|
55
|
+
* automations as graphs and agents as a 3-column card grid.
|
|
56
|
+
*/
|
|
57
|
+
export function appToUi(app) {
|
|
58
|
+
const flowEntries = Object.entries(app.flows ?? {});
|
|
59
|
+
const approvalChainEntries = Object.entries(app.approvalChains ?? {});
|
|
60
|
+
const automationEntries = Object.entries(app.automations ?? {});
|
|
61
|
+
const agentEntries = Object.entries(app.agents ?? {});
|
|
62
|
+
const skillEntries = Object.entries(app.agenticSkills ?? {});
|
|
63
|
+
const sections = [
|
|
64
|
+
...bagSection("Flows", flowEntries, "DEFAULT", "Flow ref", "graph-stack"),
|
|
65
|
+
...bagSection("Approval Chains", approvalChainEntries, "DEFAULT", "Approval chain ref", "graph-stack"),
|
|
66
|
+
...bagSection("Automations", automationEntries, "AUTOMATION", "Automation ref", "graph-stack"),
|
|
67
|
+
...bagSection("Agents", agentEntries, "AGENT", "Agent ref", "grid"),
|
|
68
|
+
...bagSection("Skills", skillEntries, "DEFAULT", "Skill ref", "grid"),
|
|
69
|
+
];
|
|
70
|
+
if (sections.length === 0) {
|
|
71
|
+
sections.push(heading("No flows, approval chains, automations, agents, or skills defined.", { level: 4 }));
|
|
72
|
+
}
|
|
73
|
+
const root = card({ title: app.name, ...(app.description != null && { description: app.description }) }, [stack(sections, { direction: "vertical", gap: "lg" })]);
|
|
74
|
+
return serializeRenderTree(root);
|
|
75
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { type Ref, type ToRefs, type Simplify, type ValueOrRef, type RefData, type TriggerRefData, type TaskRefData, type ForEachRefData, type StaticRefData, type TemplateRefData, type SecretRefData, createRef, isRef, val, template, secret, unresolvedField, toRefData, UNRESOLVED_FIELD_MARKER, } from "../entities/shared/ref.js";
|
|
2
|
+
export { type Context, type ForEachItem, buildContext, createTriggerProxy, createTaskOutputProxy, createTasksProxy, createForEachItemProxy, } from "../entities/shared/context.js";
|
|
3
|
+
export { type App, type AppField, type FieldScope, type AppAgent, type AppSearchTable, type AppAutomation, type AppPhoneService, type AspectType, type AppCategory, type FieldValueType, type FieldValueForAppField, type PicklistOption, type AspectRecord, type SearchTableRecord, type AppFieldValues, type AppFieldOf, type AppFieldInputForTask, type PicklistOptionsResolver, type RowScopedFields, type RowProxy, defineApp, picklistOption, picklistStaticValueToApiId, resolveFieldValues, asRowProxy, } from "./types/app.js";
|
|
4
|
+
export { type SortDirection, type SortOrder, asc, desc, sortBy, } from "../entities/shared/types/common.js";
|
|
5
|
+
export { type User, type Group, type Attachment, type Employee, type Manager, type RichText, type PicklistValue, } from "../entities/shared/types/platform.js";
|
|
6
|
+
export { type AiProviderConnector, defineAiProviderConnector, } from "./types/ai-provider.js";
|
|
7
|
+
export { type UserRef, defineUser, } from "./types/user.js";
|
|
8
|
+
export { type GroupRef, defineGroup, } from "./types/group.js";
|
|
9
|
+
export { type CloudLink, defineCloudLink, } from "./types/cloud-link.js";
|
|
10
|
+
export { type AspectCategoryRef, defineCategory, } from "./types/aspect-category.js";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { createRef, isRef, val, template, secret, unresolvedField, toRefData, UNRESOLVED_FIELD_MARKER, } from "../entities/shared/ref.js";
|
|
2
|
+
export { buildContext, createTriggerProxy, createTaskOutputProxy, createTasksProxy, createForEachItemProxy, } from "../entities/shared/context.js";
|
|
3
|
+
export { defineApp, picklistOption, picklistStaticValueToApiId, resolveFieldValues, asRowProxy, } from "./types/app.js";
|
|
4
|
+
export { asc, desc, sortBy, } from "../entities/shared/types/common.js";
|
|
5
|
+
export { defineAiProviderConnector, } from "./types/ai-provider.js";
|
|
6
|
+
export { defineUser, } from "./types/user.js";
|
|
7
|
+
export { defineGroup, } from "./types/group.js";
|
|
8
|
+
export { defineCloudLink, } from "./types/cloud-link.js";
|
|
9
|
+
export { defineCategory, } from "./types/aspect-category.js";
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared system-field classification used outside any single workflow.
|
|
3
|
+
*
|
|
4
|
+
* The platform auto-provisions a fixed set of system fields on every app. They
|
|
5
|
+
* are identified by tags, not display names: a user may rename a field while
|
|
6
|
+
* the tag keeps its platform role.
|
|
7
|
+
*
|
|
8
|
+
* System fields travel in the normal app `fields` list. Only Title and Status
|
|
9
|
+
* can be assigned record values. Read-only deploy protection comes from the
|
|
10
|
+
* backend `system` flag stored in state.
|
|
11
|
+
*/
|
|
12
|
+
/** Minimal wire/state field shape system-field classification needs. */
|
|
13
|
+
export interface SystemFieldProbe {
|
|
14
|
+
readonly system?: boolean | null;
|
|
15
|
+
/** Authoring/state/outbound slot. */
|
|
16
|
+
readonly tags?: readonly string[] | null;
|
|
17
|
+
/** API response slot. Normalize to `tags` after pull. */
|
|
18
|
+
readonly semanticTags?: readonly string[] | null;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Canonical semantic-tag values the platform stamps onto its auto-provisioned
|
|
22
|
+
* system fields. Union across all aspect variants.
|
|
23
|
+
*/
|
|
24
|
+
export declare const REQUIRED_TAG_NAMES: ReadonlySet<string>;
|
|
25
|
+
/**
|
|
26
|
+
* The subset of system tags whose fields a record-write surface may set.
|
|
27
|
+
* Everything else in {@link REQUIRED_TAG_NAMES} is platform-managed and
|
|
28
|
+
* read-only for record values.
|
|
29
|
+
*/
|
|
30
|
+
export declare const WRITABLE_SYSTEM_TAG_NAMES: ReadonlySet<string>;
|
|
31
|
+
export declare const DEFAULT_SYSTEM_FIELD_NAME_BY_TAG: Readonly<Record<string, string>>;
|
|
32
|
+
export declare function systemFieldTag(f: SystemFieldProbe): string | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* True if the wire/state field is system-provisioned/reserved by legacy EDK
|
|
35
|
+
* classification. Tags still drive role reconciliation because Title/Status
|
|
36
|
+
* can come back with `system: false`.
|
|
37
|
+
*/
|
|
38
|
+
export declare function isSystemField(f: SystemFieldProbe): boolean;
|
|
39
|
+
/**
|
|
40
|
+
* True if the field is a writable system field: TITLE or STATUS.
|
|
41
|
+
*/
|
|
42
|
+
export declare function isWritableSystemField(f: SystemFieldProbe): boolean;
|
|
43
|
+
/** True for the platform-owned Stage picklist field. */
|
|
44
|
+
export declare function isStageSystemField(f: SystemFieldProbe): boolean;
|
|
45
|
+
/** True for backend-owned read-only system fields. */
|
|
46
|
+
export declare function isReadOnlySystemField(f: SystemFieldProbe): boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Canonical `systemFields` bag key → platform semantic tag. These keys are the
|
|
49
|
+
* ONLY authoring/catalog identity for system fields: pulled source keys its
|
|
50
|
+
* hoisted refs and overrides by them, `ref()` exposes `fields.<key>` tokens
|
|
51
|
+
* under them, and the custom `fields: {}` bag rejects them as collisions.
|
|
52
|
+
*/
|
|
53
|
+
export declare const SYSTEM_FIELD_TAG_BY_KEY: {
|
|
54
|
+
readonly id: "HANDLE";
|
|
55
|
+
readonly title: "TITLE";
|
|
56
|
+
readonly status: "STATUS";
|
|
57
|
+
readonly stage: "STAGE";
|
|
58
|
+
readonly createdAt: "CREATED_AT";
|
|
59
|
+
readonly createdBy: "CREATED_BY";
|
|
60
|
+
readonly updatedAt: "UPDATED_AT";
|
|
61
|
+
readonly updatedBy: "UPDATED_BY";
|
|
62
|
+
readonly closedAt: "CLOSED_AT";
|
|
63
|
+
readonly closedBy: "CLOSED_BY";
|
|
64
|
+
};
|
|
65
|
+
export type SystemFieldKey = keyof typeof SYSTEM_FIELD_TAG_BY_KEY;
|
|
66
|
+
/** All canonical keys, in platform rank order (HANDLE first … CLOSED_BY last). */
|
|
67
|
+
export declare const SYSTEM_FIELD_KEYS: readonly SystemFieldKey[];
|
|
68
|
+
export declare const SYSTEM_FIELD_KEY_BY_TAG: Readonly<Record<string, SystemFieldKey>>;
|
|
69
|
+
/**
|
|
70
|
+
* What a NO-OVERRIDE deploy produces — the terraform provider's auto-create
|
|
71
|
+
* display names. This is the baseline the pull printer compares against when
|
|
72
|
+
* deciding whether a live system field warrants a `systemFields` entry.
|
|
73
|
+
*
|
|
74
|
+
* Deliberately a separate table from {@link DEFAULT_SYSTEM_FIELD_NAME_BY_TAG}:
|
|
75
|
+
* the platform's own compose defaults use "Created on"/"Updated on"/"Closed
|
|
76
|
+
* on", but the provider creates "Created At"/"Updated At"/"Closed At" (and
|
|
77
|
+
* "Created By" etc. with a capital B). An app that came through EDK/terraform
|
|
78
|
+
* therefore round-trips clean against THIS table, while a platform-composed
|
|
79
|
+
* app surfaces its "Created on"-style names as explicit overrides.
|
|
80
|
+
*/
|
|
81
|
+
export declare const DEPLOY_DEFAULT_SYSTEM_FIELD_NAMES: Readonly<Record<SystemFieldKey, string>>;
|
|
82
|
+
/**
|
|
83
|
+
* The status options a no-override deploy produces (the provider's
|
|
84
|
+
* `getDefaultStatusOptions` labels, filled when `status_options` is empty).
|
|
85
|
+
* The pull baseline for `systemFields.status.options`; colors/option-tags are
|
|
86
|
+
* platform cosmetics EDK doesn't model (the HCL fold emits labels only).
|
|
87
|
+
*/
|
|
88
|
+
export declare const DEPLOY_DEFAULT_STATUS_OPTIONS: readonly string[];
|
|
89
|
+
/**
|
|
90
|
+
* Whether the provider marks the auto-created field `required` — synthesized
|
|
91
|
+
* into the compose payload so the wire shape matches what terraform creates.
|
|
92
|
+
*/
|
|
93
|
+
export declare const SYSTEM_FIELD_REQUIRED: Readonly<Record<SystemFieldKey, boolean>>;
|