@elementumai/edk 0.8.2-alpha.6 → 0.9.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +49 -37
- package/dist-sdk/elementum-entity-client/clients/agents/models/agent-tool.d.ts +3 -3
- package/dist-sdk/elementum-entity-client/clients/aspects/models/index.d.ts +1 -1
- package/dist-sdk/elementum-entity-client/clients/aspects/models/picklist-config.d.ts +3 -11
- package/dist-sdk/elementum-entity-client/clients/automation/models/automation.d.ts +3 -11
- package/dist-sdk/elementum-entity-client/clients/skills/models/skill-tool.d.ts +1 -1
- package/dist-sdk/elementum-entity-client/clients/skills/models/skill.d.ts +1 -1
- package/dist-sdk/elementum-entity-client/clients/skills/models/skill.js +1 -1
- package/dist-sdk/fs/entity.d.ts +2 -2
- package/dist-sdk/fs/entity.js +1 -1
- package/dist-sdk/pull/missing-report.d.ts +81 -0
- package/dist-sdk/pull/missing-report.js +52 -0
- package/dist-sdk/pull/util.d.ts +1 -1
- package/dist-sdk/pull/util.js +3 -3
- package/dist-sdk/src/catalog/factories.d.ts +96 -23
- package/dist-sdk/src/catalog/factories.js +141 -21
- package/dist-sdk/src/catalog/from-authoring.d.ts +5 -5
- package/dist-sdk/src/catalog/from-authoring.js +20 -10
- package/dist-sdk/src/catalog/index.d.ts +2 -2
- package/dist-sdk/src/catalog/index.js +1 -1
- package/dist-sdk/src/catalog/org.js +63 -4
- package/dist-sdk/src/catalog/render-helpers.d.ts +1 -1
- package/dist-sdk/src/catalog/render-helpers.js +1 -1
- package/dist-sdk/src/catalog/render.d.ts +1 -0
- package/dist-sdk/src/catalog/render.js +8 -2
- package/dist-sdk/src/catalog/token.js +18 -4
- package/dist-sdk/src/catalog/types.d.ts +64 -24
- package/dist-sdk/src/catalog/types.js +12 -4
- package/dist-sdk/src/core/app-to-ui.d.ts +6 -6
- package/dist-sdk/src/core/app-to-ui.js +7 -9
- package/dist-sdk/src/core/index.d.ts +11 -10
- package/dist-sdk/src/core/index.js +10 -9
- package/dist-sdk/src/core/platform-id.d.ts +11 -0
- package/dist-sdk/src/core/platform-id.js +8 -0
- package/dist-sdk/src/{entities/flow/activities/render-catalog.d.ts → core/render-tree.d.ts} +3 -3
- package/dist-sdk/src/{entities/flow/activities/render-catalog.js → core/render-tree.js} +7 -10
- package/dist-sdk/src/core/types/ai-provider.d.ts +1 -1
- package/dist-sdk/src/core/types/ai-provider.js +1 -1
- package/dist-sdk/src/core/types/app.d.ts +78 -52
- package/dist-sdk/src/core/types/app.js +2 -3
- package/dist-sdk/src/core/types/aspect-category.d.ts +4 -4
- package/dist-sdk/src/core/types/aspect-category.js +4 -4
- package/dist-sdk/src/core/types/cloud-link.d.ts +3 -3
- package/dist-sdk/src/core/types/cloud-link.js +3 -3
- package/dist-sdk/src/core/types/display-block.d.ts +2 -2
- package/dist-sdk/src/core/types/display-block.js +2 -2
- package/dist-sdk/src/core/types/group.d.ts +1 -1
- package/dist-sdk/src/core/types/group.js +1 -1
- package/dist-sdk/src/core/types/user.d.ts +1 -1
- package/dist-sdk/src/core/types/user.js +1 -1
- package/dist-sdk/src/core/wire/ref-serializer.js +3 -3
- package/dist-sdk/src/engine/build/context.d.ts +23 -16
- package/dist-sdk/src/engine/entity.d.ts +1 -1
- package/dist-sdk/src/engine/pull/attrs.d.ts +4 -0
- package/dist-sdk/src/engine/pull/attrs.js +17 -0
- package/dist-sdk/src/engine/pull/context.d.ts +73 -0
- package/dist-sdk/src/engine/pull/context.js +14 -0
- package/dist-sdk/src/engine/pull/org.d.ts +10 -0
- package/dist-sdk/src/engine/pull/org.js +35 -0
- package/dist-sdk/src/engine/pull/ref-only.d.ts +37 -0
- package/dist-sdk/src/engine/pull/ref-only.js +204 -0
- package/dist-sdk/src/engine/tf/expr.d.ts +7 -3
- package/dist-sdk/src/engine/tf/expr.js +27 -15
- package/dist-sdk/src/engine/tf/index.d.ts +1 -1
- package/dist-sdk/src/engine/tf/index.js +1 -1
- package/dist-sdk/src/engine/tf/model.d.ts +8 -1
- package/dist-sdk/src/engine/tf/model.js +4 -0
- package/dist-sdk/src/engine/tf/parse.js +13 -2
- package/dist-sdk/src/engine/tf/render.js +4 -0
- package/dist-sdk/src/engine/workspace/authoring-layout.js +4 -2
- package/dist-sdk/src/entities/access-policy/build.d.ts +6 -16
- package/dist-sdk/src/entities/access-policy/build.js +2 -2
- package/dist-sdk/src/entities/access-policy/from-tf.d.ts +14 -40
- package/dist-sdk/src/entities/access-policy/from-tf.js +26 -85
- package/dist-sdk/src/entities/access-policy/principal.d.ts +39 -0
- package/dist-sdk/src/entities/access-policy/principal.js +13 -0
- package/dist-sdk/src/entities/access-policy/to-tf.d.ts +33 -6
- package/dist-sdk/src/entities/access-policy/to-tf.js +62 -60
- package/dist-sdk/src/entities/agent/build.d.ts +42 -11
- package/dist-sdk/src/entities/agent/build.js +40 -19
- package/dist-sdk/src/entities/agent/deserializer/print-agent-v2.d.ts +11 -1
- package/dist-sdk/src/entities/agent/deserializer/print-agent-v2.js +180 -45
- package/dist-sdk/src/entities/agent/from-tf.d.ts +3 -1
- package/dist-sdk/src/entities/agent/from-tf.js +17 -12
- package/dist-sdk/src/entities/agent/index.d.ts +5 -2
- package/dist-sdk/src/entities/agent/index.js +4 -2
- package/dist-sdk/src/entities/agent/module.js +7 -2
- package/dist-sdk/src/entities/agent/run-as.d.ts +16 -0
- package/dist-sdk/src/entities/agent/run-as.js +1 -0
- package/dist-sdk/src/entities/agent/to-tf.d.ts +6 -2
- package/dist-sdk/src/entities/agent/to-tf.js +58 -9
- package/dist-sdk/src/entities/agent/tools.d.ts +97 -70
- package/dist-sdk/src/entities/agent/tools.js +63 -43
- package/dist-sdk/src/entities/agent-a2a-skill/from-tf.js +1 -1
- package/dist-sdk/src/entities/agent-a2a-skill/to-tf.js +4 -4
- package/dist-sdk/src/entities/agent-evaluation/build.d.ts +19 -0
- package/dist-sdk/src/entities/agent-evaluation/build.js +41 -0
- package/dist-sdk/src/entities/agent-evaluation/deserializer/print-agent-evaluation.d.ts +4 -0
- package/dist-sdk/src/entities/agent-evaluation/deserializer/print-agent-evaluation.js +30 -0
- package/dist-sdk/src/entities/agent-evaluation/from-tf.d.ts +12 -0
- package/dist-sdk/src/entities/agent-evaluation/from-tf.js +46 -0
- package/dist-sdk/src/entities/agent-evaluation/index.d.ts +1 -0
- package/dist-sdk/src/entities/agent-evaluation/index.js +1 -0
- package/dist-sdk/src/entities/agent-evaluation/module.d.ts +3 -0
- package/dist-sdk/src/entities/agent-evaluation/module.js +58 -0
- package/dist-sdk/src/entities/agent-evaluation/to-tf.d.ts +12 -0
- package/dist-sdk/src/entities/agent-evaluation/to-tf.js +35 -0
- package/dist-sdk/src/entities/agent-tool/from-tf.d.ts +25 -15
- package/dist-sdk/src/entities/agent-tool/from-tf.js +175 -43
- package/dist-sdk/src/entities/agent-tool/module.js +6 -0
- package/dist-sdk/src/entities/agent-tool/to-tf.d.ts +15 -7
- package/dist-sdk/src/entities/agent-tool/to-tf.js +169 -48
- package/dist-sdk/src/entities/agent-tool/types.d.ts +4 -6
- package/dist-sdk/src/entities/agent-tool/types.js +30 -29
- package/dist-sdk/src/entities/app/build.d.ts +214 -47
- package/dist-sdk/src/entities/app/build.js +128 -66
- package/dist-sdk/src/entities/app/deserializer/normalize.d.ts +188 -8
- package/dist-sdk/src/entities/app/deserializer/pulled-expression.d.ts +59 -0
- package/dist-sdk/src/entities/app/deserializer/pulled-expression.js +70 -0
- package/dist-sdk/src/entities/app/display-blocks.d.ts +2 -1
- package/dist-sdk/src/entities/app/display-blocks.js +1 -1
- package/dist-sdk/src/entities/app/from-tf.d.ts +11 -1
- package/dist-sdk/src/entities/app/from-tf.js +30 -2
- package/dist-sdk/src/entities/app/index.d.ts +20 -8
- package/dist-sdk/src/entities/app/index.js +16 -6
- package/dist-sdk/src/entities/app/module.js +29 -4
- package/dist-sdk/src/entities/app/to-tf.d.ts +1 -1
- package/dist-sdk/src/entities/app/to-tf.js +97 -7
- package/dist-sdk/src/entities/approval-chain/build.d.ts +31 -16
- package/dist-sdk/src/entities/approval-chain/build.js +49 -49
- package/dist-sdk/src/entities/approval-chain/from-tf.d.ts +17 -0
- package/dist-sdk/src/entities/approval-chain/from-tf.js +57 -0
- package/dist-sdk/src/entities/approval-chain/index.d.ts +2 -3
- package/dist-sdk/src/entities/approval-chain/index.js +2 -3
- package/dist-sdk/src/entities/approval-chain/module.d.ts +3 -0
- package/dist-sdk/src/entities/approval-chain/module.js +51 -0
- package/dist-sdk/src/entities/approval-chain/printer.d.ts +2 -0
- package/dist-sdk/src/entities/approval-chain/printer.js +21 -0
- package/dist-sdk/src/entities/approval-chain/to-tf.d.ts +9 -0
- package/dist-sdk/src/entities/approval-chain/to-tf.js +43 -0
- package/dist-sdk/src/entities/automation/build.d.ts +177 -95
- package/dist-sdk/src/entities/automation/build.js +164 -72
- package/dist-sdk/src/entities/automation/calculation-expression.d.ts +191 -0
- package/dist-sdk/src/entities/automation/calculation-expression.js +57 -0
- package/dist-sdk/src/entities/automation/deserializer/ast.d.ts +18 -9
- package/dist-sdk/src/entities/automation/deserializer/print-automation.d.ts +18 -14
- package/dist-sdk/src/entities/automation/deserializer/print-automation.js +214 -311
- package/dist-sdk/src/entities/automation/filter.d.ts +1 -115
- package/dist-sdk/src/entities/automation/filter.js +1 -197
- package/dist-sdk/src/entities/automation/from-tf.d.ts +28 -0
- package/dist-sdk/src/entities/automation/from-tf.js +695 -182
- package/dist-sdk/src/entities/automation/index.d.ts +9 -10
- package/dist-sdk/src/entities/automation/index.js +11 -11
- package/dist-sdk/src/entities/automation/module.js +82 -8
- package/dist-sdk/src/entities/automation/operators.d.ts +32 -48
- package/dist-sdk/src/entities/automation/operators.js +10 -37
- package/dist-sdk/src/entities/automation/output-key-wire-name.d.ts +1 -1
- package/dist-sdk/src/entities/automation/output-key-wire-name.js +1 -1
- package/dist-sdk/src/entities/automation/script-code.js +107 -28
- package/dist-sdk/src/entities/automation/serialize.js +1 -1
- package/dist-sdk/src/entities/automation/tasks.d.ts +167 -102
- package/dist-sdk/src/entities/automation/tasks.js +66 -13
- package/dist-sdk/src/entities/automation/to-tf.d.ts +44 -3
- package/dist-sdk/src/entities/automation/to-tf.js +607 -161
- package/dist-sdk/src/entities/automation/triggers.d.ts +33 -25
- package/dist-sdk/src/entities/automation/triggers.js +8 -2
- package/dist-sdk/src/entities/automation/types.d.ts +3 -2
- package/dist-sdk/src/entities/automation/types.js +3 -2
- package/dist-sdk/src/entities/chart/build.d.ts +95 -0
- package/dist-sdk/src/entities/chart/build.js +42 -0
- package/dist-sdk/src/entities/chart/from-tf.d.ts +55 -0
- package/dist-sdk/src/entities/chart/from-tf.js +269 -0
- package/dist-sdk/src/entities/chart/index.d.ts +4 -0
- package/dist-sdk/src/entities/chart/index.js +3 -0
- package/dist-sdk/src/entities/chart/module.d.ts +3 -0
- package/dist-sdk/src/entities/chart/module.js +61 -0
- package/dist-sdk/src/entities/chart/printer.d.ts +5 -0
- package/dist-sdk/src/entities/chart/printer.js +104 -0
- package/dist-sdk/src/entities/chart/to-tf.d.ts +15 -0
- package/dist-sdk/src/entities/chart/to-tf.js +150 -0
- package/dist-sdk/src/entities/chart/types.d.ts +53 -0
- package/dist-sdk/src/entities/chart/types.js +22 -0
- package/dist-sdk/src/entities/dashboard/build.d.ts +44 -0
- package/dist-sdk/src/entities/dashboard/build.js +16 -0
- package/dist-sdk/src/entities/dashboard/from-tf.d.ts +12 -0
- package/dist-sdk/src/entities/dashboard/from-tf.js +113 -0
- package/dist-sdk/src/entities/dashboard/module.d.ts +3 -0
- package/dist-sdk/src/entities/dashboard/module.js +16 -0
- package/dist-sdk/src/entities/dashboard/to-tf.d.ts +43 -0
- package/dist-sdk/src/entities/dashboard/to-tf.js +121 -0
- package/dist-sdk/src/entities/dashboard-widget/module.d.ts +3 -0
- package/dist-sdk/src/entities/dashboard-widget/module.js +10 -0
- package/dist-sdk/src/entities/data-lookup/module.d.ts +3 -0
- package/dist-sdk/src/entities/data-lookup/module.js +22 -0
- package/dist-sdk/src/entities/datamine/build.d.ts +22 -0
- package/dist-sdk/src/entities/datamine/from-tf.d.ts +17 -0
- package/dist-sdk/src/entities/datamine/from-tf.js +98 -0
- package/dist-sdk/src/entities/datamine/module.d.ts +3 -0
- package/dist-sdk/src/entities/datamine/module.js +23 -0
- package/dist-sdk/src/entities/datamine/to-tf.d.ts +11 -0
- package/dist-sdk/src/entities/datamine/to-tf.js +53 -0
- package/dist-sdk/src/entities/dynamic-layout/build.d.ts +304 -0
- package/dist-sdk/src/entities/dynamic-layout/build.js +4 -0
- package/dist-sdk/src/entities/dynamic-layout/dialect.d.ts +4 -0
- package/dist-sdk/src/entities/dynamic-layout/dialect.js +47 -0
- package/dist-sdk/src/entities/dynamic-layout/from-tf.d.ts +10 -0
- package/dist-sdk/src/entities/dynamic-layout/from-tf.js +239 -0
- package/dist-sdk/src/entities/dynamic-layout/module.d.ts +3 -0
- package/dist-sdk/src/entities/dynamic-layout/module.js +13 -0
- package/dist-sdk/src/entities/dynamic-layout/to-tf.d.ts +26 -0
- package/dist-sdk/src/entities/dynamic-layout/to-tf.js +267 -0
- package/dist-sdk/src/entities/element/build.d.ts +48 -38
- package/dist-sdk/src/entities/element/build.js +24 -33
- package/dist-sdk/src/entities/element/from-tf.d.ts +9 -1
- package/dist-sdk/src/entities/element/from-tf.js +31 -2
- package/dist-sdk/src/entities/element/index.d.ts +14 -7
- package/dist-sdk/src/entities/element/index.js +11 -5
- package/dist-sdk/src/entities/element/module.js +26 -5
- package/dist-sdk/src/entities/element/to-tf.d.ts +2 -1
- package/dist-sdk/src/entities/element/to-tf.js +64 -4
- package/dist-sdk/src/entities/field/build.d.ts +55 -27
- package/dist-sdk/src/entities/field/build.js +31 -6
- package/dist-sdk/src/entities/field/calc/aggregate.d.ts +52 -21
- package/dist-sdk/src/entities/field/calc/aggregate.js +59 -29
- package/dist-sdk/src/entities/field/calc/date.d.ts +78 -29
- package/dist-sdk/src/entities/field/calc/date.js +120 -29
- package/dist-sdk/src/entities/field/calc/index.d.ts +80 -85
- package/dist-sdk/src/entities/field/calc/index.js +82 -139
- package/dist-sdk/src/entities/field/calc/numeric.d.ts +8 -12
- package/dist-sdk/src/entities/field/calc/numeric.js +10 -27
- package/dist-sdk/src/entities/field/calc/runtime.d.ts +19 -2
- package/dist-sdk/src/entities/field/calc/runtime.js +79 -8
- package/dist-sdk/src/entities/field/calc/text.d.ts +32 -23
- package/dist-sdk/src/entities/field/calc/text.js +43 -31
- package/dist-sdk/src/entities/field/calc/types.d.ts +36 -81
- package/dist-sdk/src/entities/field/calc/types.js +1 -22
- package/dist-sdk/src/entities/field/calc.d.ts +71 -48
- package/dist-sdk/src/entities/field/calc.js +5 -15
- package/dist-sdk/src/entities/field/calculation-types.d.ts +6 -0
- package/dist-sdk/src/entities/field/calculation-types.js +49 -0
- package/dist-sdk/src/entities/field/from-tf.js +238 -13
- package/dist-sdk/src/entities/field/locals.d.ts +11 -3
- package/dist-sdk/src/entities/field/locals.js +15 -2
- package/dist-sdk/src/entities/field/module.d.ts +1 -0
- package/dist-sdk/src/entities/field/module.js +27 -7
- package/dist-sdk/src/entities/field/record-shape.d.ts +25 -11
- package/dist-sdk/src/entities/field/to-tf.d.ts +41 -2
- package/dist-sdk/src/entities/field/to-tf.js +314 -40
- package/dist-sdk/src/entities/field/types.d.ts +1 -1
- package/dist-sdk/src/entities/field/types.js +10 -1
- package/dist-sdk/src/entities/file-reader/build.d.ts +71 -19
- package/dist-sdk/src/entities/file-reader/build.js +49 -4
- package/dist-sdk/src/entities/file-reader/deserializer/print-file-reader.d.ts +1 -0
- package/dist-sdk/src/entities/file-reader/deserializer/print-file-reader.js +12 -10
- package/dist-sdk/src/entities/file-reader/from-tf.d.ts +1 -1
- package/dist-sdk/src/entities/file-reader/from-tf.js +31 -2
- package/dist-sdk/src/entities/file-reader/index.d.ts +3 -3
- package/dist-sdk/src/entities/file-reader/index.js +3 -3
- package/dist-sdk/src/entities/file-reader/module.js +6 -5
- package/dist-sdk/src/entities/file-reader/to-tf.d.ts +1 -1
- package/dist-sdk/src/entities/file-reader/to-tf.js +5 -2
- package/dist-sdk/src/entities/file-reader/types.d.ts +3 -4
- package/dist-sdk/src/entities/file-reader/types.js +4 -5
- package/dist-sdk/src/entities/org/category.js +4 -5
- package/dist-sdk/src/entities/org/cloud-link.js +4 -5
- package/dist-sdk/src/entities/org/email-alias.d.ts +2 -0
- package/dist-sdk/src/entities/org/email-alias.js +12 -0
- package/dist-sdk/src/entities/org/group.js +4 -5
- package/dist-sdk/src/entities/org/index.d.ts +2 -0
- package/dist-sdk/src/entities/org/index.js +2 -0
- package/dist-sdk/src/entities/org/phone-provider.d.ts +4 -0
- package/dist-sdk/src/entities/org/phone-provider.js +30 -0
- package/dist-sdk/src/entities/org/role.d.ts +3 -3
- package/dist-sdk/src/entities/org/role.js +9 -6
- package/dist-sdk/src/entities/organization/build.d.ts +241 -0
- package/dist-sdk/src/entities/organization/build.js +165 -0
- package/dist-sdk/src/entities/organization/index.d.ts +2 -0
- package/dist-sdk/src/entities/organization/index.js +2 -0
- package/dist-sdk/src/entities/organization/module.d.ts +2 -0
- package/dist-sdk/src/entities/organization/module.js +21 -0
- package/dist-sdk/src/entities/organization/to-tf.d.ts +7 -0
- package/dist-sdk/src/entities/organization/to-tf.js +154 -0
- package/dist-sdk/src/entities/phone-service/build.d.ts +17 -0
- package/dist-sdk/src/entities/phone-service/build.js +31 -0
- package/dist-sdk/src/entities/phone-service/deserializer/print-phone-service.d.ts +4 -0
- package/dist-sdk/src/entities/phone-service/deserializer/print-phone-service.js +56 -0
- package/dist-sdk/src/entities/phone-service/from-tf.d.ts +25 -0
- package/dist-sdk/src/entities/phone-service/from-tf.js +75 -0
- package/dist-sdk/src/entities/phone-service/index.d.ts +2 -0
- package/dist-sdk/src/entities/phone-service/index.js +2 -0
- package/dist-sdk/src/entities/phone-service/module.d.ts +3 -0
- package/dist-sdk/src/entities/phone-service/module.js +55 -0
- package/dist-sdk/src/entities/phone-service/to-tf.d.ts +12 -0
- package/dist-sdk/src/entities/phone-service/to-tf.js +54 -0
- package/dist-sdk/src/entities/phone-service/types.d.ts +35 -0
- package/dist-sdk/src/entities/phone-service/types.js +22 -0
- package/dist-sdk/src/entities/record-create-form/from-tf.d.ts +11 -0
- package/dist-sdk/src/entities/record-create-form/from-tf.js +74 -0
- package/dist-sdk/src/entities/record-create-form/module.d.ts +11 -0
- package/dist-sdk/src/entities/record-create-form/module.js +24 -0
- package/dist-sdk/src/entities/record-create-form/to-tf.d.ts +33 -0
- package/dist-sdk/src/entities/record-create-form/to-tf.js +88 -0
- package/dist-sdk/src/entities/relationship/build.d.ts +16 -0
- package/dist-sdk/src/entities/relationship/build.js +1 -0
- package/dist-sdk/src/entities/relationship/from-tf.d.ts +12 -0
- package/dist-sdk/src/entities/relationship/from-tf.js +109 -0
- package/dist-sdk/src/entities/relationship/module.d.ts +3 -0
- package/dist-sdk/src/entities/relationship/module.js +16 -0
- package/dist-sdk/src/entities/relationship/to-tf.d.ts +32 -0
- package/dist-sdk/src/entities/relationship/to-tf.js +145 -0
- package/dist-sdk/src/entities/role/build.d.ts +65 -0
- package/dist-sdk/src/entities/role/build.js +33 -0
- package/dist-sdk/src/entities/role/from-tf.d.ts +13 -0
- package/dist-sdk/src/entities/role/from-tf.js +138 -0
- package/dist-sdk/src/entities/role/to-tf.d.ts +13 -0
- package/dist-sdk/src/entities/role/to-tf.js +69 -0
- package/dist-sdk/src/entities/search-table/build.d.ts +67 -28
- package/dist-sdk/src/entities/search-table/build.js +110 -56
- package/dist-sdk/src/entities/search-table/from-tf.d.ts +37 -0
- package/dist-sdk/src/entities/search-table/from-tf.js +113 -0
- package/dist-sdk/src/entities/search-table/index.d.ts +2 -2
- package/dist-sdk/src/entities/search-table/index.js +2 -2
- package/dist-sdk/src/entities/search-table/module.js +88 -10
- package/dist-sdk/src/entities/search-table/printer.d.ts +2 -0
- package/dist-sdk/src/entities/search-table/printer.js +52 -0
- package/dist-sdk/src/entities/search-table/to-tf.d.ts +14 -0
- package/dist-sdk/src/entities/search-table/to-tf.js +104 -0
- package/dist-sdk/src/entities/search-table/types.d.ts +8 -0
- package/dist-sdk/src/entities/search-table/types.js +21 -0
- package/dist-sdk/src/entities/service-account/build.d.ts +32 -0
- package/dist-sdk/src/entities/service-account/build.js +9 -0
- package/dist-sdk/src/entities/service-account/from-tf.d.ts +10 -0
- package/dist-sdk/src/entities/service-account/from-tf.js +109 -0
- package/dist-sdk/src/entities/service-account/module.d.ts +4 -0
- package/dist-sdk/src/entities/service-account/module.js +21 -0
- package/dist-sdk/src/entities/service-account/ref.d.ts +11 -0
- package/dist-sdk/src/entities/service-account/ref.js +5 -0
- package/dist-sdk/src/entities/service-account/to-tf.d.ts +32 -0
- package/dist-sdk/src/entities/service-account/to-tf.js +103 -0
- package/dist-sdk/src/entities/shared/connector-from-tf.d.ts +14 -0
- package/dist-sdk/src/entities/shared/connector-from-tf.js +14 -0
- package/dist-sdk/src/entities/shared/context.d.ts +25 -24
- package/dist-sdk/src/entities/shared/context.js +36 -35
- package/dist-sdk/src/entities/shared/filters/ast.d.ts +30 -81
- package/dist-sdk/src/entities/shared/filters/ast.js +6 -2
- package/dist-sdk/src/entities/shared/filters/index.d.ts +95 -206
- package/dist-sdk/src/entities/shared/filters/index.js +196 -341
- package/dist-sdk/src/entities/shared/filters/print.d.ts +11 -0
- package/dist-sdk/src/entities/shared/filters/print.js +122 -0
- package/dist-sdk/src/entities/shared/filters/tf-codec.d.ts +170 -0
- package/dist-sdk/src/entities/shared/filters/tf-codec.js +527 -0
- package/dist-sdk/src/entities/shared/filters/types.d.ts +66 -69
- package/dist-sdk/src/entities/shared/filters/types.js +2 -3
- package/dist-sdk/src/entities/shared/foreign-ref.d.ts +14 -0
- package/dist-sdk/src/entities/shared/foreign-ref.js +12 -0
- package/dist-sdk/src/entities/shared/ref.d.ts +26 -11
- package/dist-sdk/src/entities/shared/ref.js +8 -3
- package/dist-sdk/src/entities/shared/types/common.d.ts +2 -2
- package/dist-sdk/src/entities/shared/types/field-types.d.ts +1 -1
- package/dist-sdk/src/entities/shared/types/field-types.js +1 -1
- package/dist-sdk/src/entities/skill/build.d.ts +4 -4
- package/dist-sdk/src/entities/skill/build.js +6 -5
- package/dist-sdk/src/entities/skill/deserializer/print-skill-v2.d.ts +11 -1
- package/dist-sdk/src/entities/skill/deserializer/print-skill-v2.js +100 -39
- package/dist-sdk/src/entities/skill/index.d.ts +3 -2
- package/dist-sdk/src/entities/skill/index.js +3 -2
- package/dist-sdk/src/entities/skill/module.js +8 -2
- package/dist-sdk/src/entities/skill/to-tf.d.ts +6 -2
- package/dist-sdk/src/entities/skill/to-tf.js +20 -2
- package/dist-sdk/src/entities/skill/tools.d.ts +47 -31
- package/dist-sdk/src/entities/skill/tools.js +37 -23
- package/dist-sdk/src/entities/skill-tool/from-tf.d.ts +17 -1
- package/dist-sdk/src/entities/skill-tool/from-tf.js +118 -8
- package/dist-sdk/src/entities/skill-tool/module.js +9 -0
- package/dist-sdk/src/entities/skill-tool/to-tf.d.ts +6 -1
- package/dist-sdk/src/entities/skill-tool/to-tf.js +100 -48
- package/dist-sdk/src/entities/skill-tool/types.js +18 -1
- package/dist-sdk/src/entities/table/build.d.ts +64 -23
- package/dist-sdk/src/entities/table/build.js +41 -26
- package/dist-sdk/src/entities/table/catalog-render.js +15 -1
- package/dist-sdk/src/entities/table/deserializer/normalize.d.ts +99 -0
- package/dist-sdk/src/entities/table/deserializer/normalize.js +192 -0
- package/dist-sdk/src/entities/table/fields/types.d.ts +86 -0
- package/dist-sdk/src/entities/table/fields/types.js +12 -0
- package/dist-sdk/src/entities/table/fields.d.ts +107 -47
- package/dist-sdk/src/entities/table/fields.js +76 -55
- package/dist-sdk/src/entities/table/from-tf.d.ts +4 -0
- package/dist-sdk/src/entities/table/from-tf.js +261 -0
- package/dist-sdk/src/entities/table/index.d.ts +7 -5
- package/dist-sdk/src/entities/table/index.js +7 -7
- package/dist-sdk/src/entities/table/joins.d.ts +22 -9
- package/dist-sdk/src/entities/table/joins.js +8 -16
- package/dist-sdk/src/entities/table/module.d.ts +2 -1
- package/dist-sdk/src/entities/table/module.js +13 -6
- package/dist-sdk/src/entities/table/to-tf.d.ts +10 -0
- package/dist-sdk/src/entities/table/to-tf.js +222 -0
- package/dist-sdk/src/entities/task/build.d.ts +43 -0
- package/dist-sdk/src/entities/task/build.js +17 -0
- package/dist-sdk/src/entities/task/from-tf.d.ts +28 -0
- package/dist-sdk/src/entities/task/from-tf.js +38 -0
- package/dist-sdk/src/entities/task/index.d.ts +1 -0
- package/dist-sdk/src/entities/task/index.js +1 -0
- package/dist-sdk/src/entities/task/module.d.ts +3 -0
- package/dist-sdk/src/entities/task/module.js +12 -0
- package/dist-sdk/src/entities/task/to-tf.d.ts +9 -0
- package/dist-sdk/src/entities/task/to-tf.js +49 -0
- package/dist-sdk/src/entities/view/build.d.ts +46 -0
- package/dist-sdk/src/entities/view/build.js +19 -0
- package/dist-sdk/src/entities/view/from-tf.d.ts +7 -2
- package/dist-sdk/src/entities/view/from-tf.js +264 -30
- package/dist-sdk/src/entities/view/module.d.ts +6 -13
- package/dist-sdk/src/entities/view/module.js +12 -15
- package/dist-sdk/src/entities/view/sharing.d.ts +10 -0
- package/dist-sdk/src/entities/view/sharing.js +6 -0
- package/dist-sdk/src/entities/view/to-tf.d.ts +56 -12
- package/dist-sdk/src/entities/view/to-tf.js +192 -20
- package/dist-sdk/src/entities/view/types.d.ts +8 -0
- package/dist-sdk/src/entities/view/types.js +46 -0
- package/dist-sdk/src/entities/visual-flow/build.d.ts +87 -0
- package/dist-sdk/src/entities/visual-flow/build.js +72 -0
- package/dist-sdk/src/entities/visual-flow/from-tf.d.ts +49 -0
- package/dist-sdk/src/entities/visual-flow/from-tf.js +124 -0
- package/dist-sdk/src/entities/visual-flow/index.d.ts +1 -0
- package/dist-sdk/src/entities/visual-flow/index.js +1 -0
- package/dist-sdk/src/entities/visual-flow/module.d.ts +3 -0
- package/dist-sdk/src/entities/visual-flow/module.js +41 -0
- package/dist-sdk/src/entities/visual-flow/printer.d.ts +8 -0
- package/dist-sdk/src/entities/visual-flow/printer.js +92 -0
- package/dist-sdk/src/entities/visual-flow/to-tf.d.ts +15 -0
- package/dist-sdk/src/entities/visual-flow/to-tf.js +97 -0
- package/dist-sdk/src/entities/widget/build.d.ts +55 -0
- package/dist-sdk/src/entities/widget/build.js +1 -0
- package/dist-sdk/src/entities/widget/from-tf.d.ts +11 -0
- package/dist-sdk/src/entities/widget/from-tf.js +209 -0
- package/dist-sdk/src/entities/widget/module.d.ts +3 -0
- package/dist-sdk/src/entities/widget/module.js +16 -0
- package/dist-sdk/src/entities/widget/to-tf.d.ts +45 -0
- package/dist-sdk/src/entities/widget/to-tf.js +206 -0
- package/dist-sdk/src/graph/deferred-catalog-render.d.ts +1 -1
- package/dist-sdk/src/graph/deferred-catalog-render.js +1 -1
- package/dist-sdk/src/graph/index.d.ts +12 -1
- package/dist-sdk/src/graph/index.js +8 -19
- package/dist-sdk/src/graph/modules.js +35 -1
- package/dist-sdk/src/graph/types.d.ts +106 -7
- package/dist-sdk/src/internal/safe-identifier.d.ts +4 -0
- package/dist-sdk/src/internal/safe-identifier.js +13 -0
- package/dist-sdk/src/internal/sdk-package.d.ts +1 -1
- package/dist-sdk/src/internal/sdk-package.js +5 -2
- package/package.json +39 -15
- package/dist-sdk/src/entities/access-policy/filter.d.ts +0 -61
- package/dist-sdk/src/entities/access-policy/filter.js +0 -83
- package/dist-sdk/src/entities/approval-chain/steps.d.ts +0 -24
- package/dist-sdk/src/entities/approval-chain/steps.js +0 -20
- package/dist-sdk/src/entities/flow/activities/agent.d.ts +0 -15
- package/dist-sdk/src/entities/flow/activities/agent.js +0 -29
- package/dist-sdk/src/entities/flow/activities/approval.d.ts +0 -9
- package/dist-sdk/src/entities/flow/activities/approval.js +0 -18
- package/dist-sdk/src/entities/flow/activities/automation.d.ts +0 -12
- package/dist-sdk/src/entities/flow/activities/automation.js +0 -22
- package/dist-sdk/src/entities/flow/activities/ctx.d.ts +0 -34
- package/dist-sdk/src/entities/flow/activities/ctx.js +0 -38
- package/dist-sdk/src/entities/flow/activities/form.d.ts +0 -22
- package/dist-sdk/src/entities/flow/activities/form.js +0 -36
- package/dist-sdk/src/entities/flow/activities/index.d.ts +0 -14
- package/dist-sdk/src/entities/flow/activities/index.js +0 -13
- package/dist-sdk/src/entities/flow/activities/input-refs.d.ts +0 -39
- package/dist-sdk/src/entities/flow/activities/input-refs.js +0 -19
- package/dist-sdk/src/entities/flow/activities/prompt-template.d.ts +0 -13
- package/dist-sdk/src/entities/flow/activities/prompt-template.js +0 -34
- package/dist-sdk/src/entities/flow/activities/types.d.ts +0 -33
- package/dist-sdk/src/entities/flow/build.d.ts +0 -38
- package/dist-sdk/src/entities/flow/build.js +0 -115
- package/dist-sdk/src/entities/flow/index.d.ts +0 -8
- package/dist-sdk/src/entities/flow/index.js +0 -7
- package/dist-sdk/src/entities/flow/serialize.d.ts +0 -51
- package/dist-sdk/src/entities/flow/serialize.js +0 -94
- package/dist-sdk/src/entities/flow/util.d.ts +0 -27
- package/dist-sdk/src/entities/flow/util.js +0 -38
- package/dist-sdk/src/entities/table/filter.d.ts +0 -41
- package/dist-sdk/src/entities/table/filter.js +0 -89
- /package/dist-sdk/src/entities/{flow/activities/types.js → datamine/build.js} +0 -0
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* nothing reads those interim values.
|
|
20
20
|
*/
|
|
21
21
|
import type { AiProviderLlmModel, AiProviderType } from "./ai-provider-models.js";
|
|
22
|
-
import type { AgentRef, AiProviderRef, ApprovalChainRef, AutomationCatalogRef, CatalogRef, CategoryRef, CloudLinkRef, ConnectorRef, GroupRef, FileReaderCatalogRef, DocumentModelFieldRef,
|
|
22
|
+
import type { AgentEvaluationRef, AgentRef, AppCatalogRef, AiProviderRef, ApprovalChainRef, AutomationCatalogRef, CatalogRef, CategoryRef, ChartRef, DashboardRef, CloudLinkRef, ConnectorRef, DatamineRef, GroupRef, PhoneProviderRef, PhoneServiceRef, FileReaderCatalogRef, DocumentModelFieldRef, ElementCatalogRef, FieldRef, OutputPropertyRef, SearchTableRef, StoredFunctionRef, StoredFunctionScalarType, SkillRef, TableColumnRef, TableRef, TriggerParameterRef } from "./types.js";
|
|
23
23
|
/** Fixed platform user-directory schema used by userSearch filters. */
|
|
24
24
|
export declare const usersCatalog: {
|
|
25
25
|
readonly fields: {
|
|
@@ -49,6 +49,14 @@ export declare const usersCatalog: {
|
|
|
49
49
|
};
|
|
50
50
|
};
|
|
51
51
|
};
|
|
52
|
+
/** Lightweight typed owner token for tests and generated bootstrap code. Prefer the generated catalog in app source. */
|
|
53
|
+
export declare function appRef<const RefName extends string>(refName: RefName, name?: string, namespace?: string): CatalogRef<"app", RefName> & {
|
|
54
|
+
readonly namespace?: string;
|
|
55
|
+
};
|
|
56
|
+
/** Lightweight typed element-owner token. Prefer the generated catalog in authored workspace source. */
|
|
57
|
+
export declare function elementRef<const RefName extends string>(refName: RefName, name?: string, namespace?: string): CatalogRef<"element", RefName> & {
|
|
58
|
+
readonly namespace?: string;
|
|
59
|
+
};
|
|
52
60
|
/** An app/element catalog's bags: reference-only kinds plus behavioral kinds sourced from authoring files. */
|
|
53
61
|
interface AppCatalogBags {
|
|
54
62
|
readonly fields?: Record<string, FieldRef>;
|
|
@@ -56,8 +64,29 @@ interface AppCatalogBags {
|
|
|
56
64
|
readonly fileReaders?: Record<string, FileReaderCatalogRef>;
|
|
57
65
|
readonly automations?: Record<string, AutomationCatalogRef>;
|
|
58
66
|
readonly agents?: Record<string, AgentRef>;
|
|
67
|
+
readonly evaluations?: Record<string, AgentEvaluationRef>;
|
|
68
|
+
readonly charts?: Record<string, ChartRef>;
|
|
59
69
|
readonly skills?: Record<string, SkillRef>;
|
|
70
|
+
readonly approvalChains?: Record<string, ApprovalChainRef>;
|
|
71
|
+
readonly phoneServices?: Record<string, PhoneServiceRef>;
|
|
60
72
|
}
|
|
73
|
+
type ElementCatalogBags = Omit<AppCatalogBags, "charts">;
|
|
74
|
+
/** Preserve an app catalog's literal owner and agent keys after parent stamping. */
|
|
75
|
+
type WithOwnedAgents<B extends AppCatalogBags, Parent extends string> = B extends {
|
|
76
|
+
readonly agents: infer A extends Record<string, AgentRef>;
|
|
77
|
+
} ? Omit<B, "agents"> & {
|
|
78
|
+
readonly agents: {
|
|
79
|
+
readonly [K in keyof A]: A[K] & AgentRef<Parent, Extract<K, string>>;
|
|
80
|
+
};
|
|
81
|
+
} : B;
|
|
82
|
+
type WithOwnedCharts<B extends AppCatalogBags, Parent extends string> = B extends {
|
|
83
|
+
readonly charts: infer C extends Record<string, ChartRef>;
|
|
84
|
+
} ? Omit<B, "charts"> & {
|
|
85
|
+
readonly charts: {
|
|
86
|
+
readonly [K in keyof C]: C[K] & ChartRef<Parent, Extract<K, string>>;
|
|
87
|
+
};
|
|
88
|
+
} : B;
|
|
89
|
+
type WithOwnedCatalogChildren<B extends AppCatalogBags, Parent extends string> = WithOwnedCharts<WithOwnedAgents<B, Parent>, Parent>;
|
|
61
90
|
/**
|
|
62
91
|
* Automation ref. Accepts optional `trigger` and `outputs` bags of typed parameter/property refs —
|
|
63
92
|
* e.g. `automationRef({ trigger: { topic: triggerParameterRef({ name: "topic", parent: "auto" }) } })`
|
|
@@ -121,6 +150,20 @@ export declare function agentRef(opts?: {
|
|
|
121
150
|
readonly name?: string;
|
|
122
151
|
readonly parent?: string;
|
|
123
152
|
}): AgentRef;
|
|
153
|
+
export declare function agentEvaluationRef(opts?: {
|
|
154
|
+
readonly name?: string;
|
|
155
|
+
readonly parent?: string;
|
|
156
|
+
}): AgentEvaluationRef;
|
|
157
|
+
export declare function chartRef<const Parent extends string = string, const RefName extends string = string>(opts?: {
|
|
158
|
+
readonly refName?: RefName;
|
|
159
|
+
readonly name?: string;
|
|
160
|
+
readonly parent?: Parent;
|
|
161
|
+
}): ChartRef<Parent, RefName>;
|
|
162
|
+
export declare function dashboardRef<const Parent extends string = string, const RefName extends string = string>(opts?: {
|
|
163
|
+
readonly refName?: RefName;
|
|
164
|
+
readonly name?: string;
|
|
165
|
+
readonly parent?: Parent;
|
|
166
|
+
}): DashboardRef<Parent, RefName>;
|
|
124
167
|
/**
|
|
125
168
|
* Skill ref — no required arguments, same shape as {@link agentRef}. `handle` and `parent`
|
|
126
169
|
* are injected by the enclosing `appCatalog`/`elementCatalog`; `name` defaults to `""`.
|
|
@@ -128,20 +171,27 @@ export declare function agentRef(opts?: {
|
|
|
128
171
|
export declare function skillRef(opts?: {
|
|
129
172
|
readonly name?: string;
|
|
130
173
|
readonly parent?: string;
|
|
174
|
+
readonly parentName?: string;
|
|
131
175
|
}): SkillRef;
|
|
132
|
-
export declare
|
|
133
|
-
readonly
|
|
134
|
-
readonly
|
|
135
|
-
};
|
|
136
|
-
export declare
|
|
176
|
+
export declare function phoneServiceRef(opts?: {
|
|
177
|
+
readonly name?: string;
|
|
178
|
+
readonly parent?: string;
|
|
179
|
+
}): PhoneServiceRef;
|
|
180
|
+
export declare function datamineRef(opts?: {
|
|
181
|
+
readonly name?: string;
|
|
182
|
+
readonly parent?: string;
|
|
183
|
+
}): DatamineRef;
|
|
184
|
+
export declare const approvalChainRef: (opts: Omit<ApprovalChainRef<string, string>, "parent" | "refName" | "__kind">) => Omit<ApprovalChainRef<string, string>, "parent" | "refName" | "__kind"> & {
|
|
137
185
|
readonly __kind: "approvalChain";
|
|
138
186
|
readonly refName: string;
|
|
139
187
|
};
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
188
|
+
/** Reference to a managed element search table. Resource selection stays private. */
|
|
189
|
+
export declare function searchTableRef(opts: Omit<SearchTableRef, "__kind" | "refName" | "parent">): SearchTableRef;
|
|
190
|
+
/** Reference to an existing linked Cortex Search Service. */
|
|
191
|
+
export declare function linkedSearchTableRef(opts: Omit<SearchTableRef, "__kind" | "refName" | "parent">): SearchTableRef;
|
|
192
|
+
/** Reference to a managed search table owned by an Elementum Table. */
|
|
193
|
+
export declare function tableSearchTableRef(opts: Omit<SearchTableRef, "__kind" | "refName" | "parent">): SearchTableRef;
|
|
194
|
+
export declare const connectorRef: (opts: Omit<import("./types.js").AiServiceRef, "refName" | "__kind">) => Omit<import("./types.js").AiServiceRef, "refName" | "__kind"> & {
|
|
145
195
|
readonly __kind: "connector";
|
|
146
196
|
readonly refName: string;
|
|
147
197
|
};
|
|
@@ -160,17 +210,24 @@ export declare const connectorRef: (opts: Omit<ConnectorRef, "refName" | "__kind
|
|
|
160
210
|
* its literal) — same `const T extends ...` trick as {@link fieldRef} so
|
|
161
211
|
* `type: "anthropic"` narrows which models are valid at each call site.
|
|
162
212
|
*/
|
|
163
|
-
export declare function
|
|
213
|
+
export declare function aiProvider<T extends AiProviderType, M extends Readonly<Record<string, ConnectorRef | AiProviderLlmModel<T>>> | undefined = undefined>(opts: {
|
|
164
214
|
readonly name: string;
|
|
165
215
|
readonly type: T;
|
|
166
216
|
readonly models?: M;
|
|
167
217
|
}): AiProviderRef<T> & {
|
|
168
218
|
readonly models: M;
|
|
169
219
|
};
|
|
170
|
-
export declare
|
|
171
|
-
readonly
|
|
172
|
-
readonly
|
|
220
|
+
export declare function cloudLinkRef<const Functions extends Readonly<Record<string, StoredFunctionRef>> | undefined = undefined>(opts: {
|
|
221
|
+
readonly name: string;
|
|
222
|
+
readonly storedFunctions?: Functions;
|
|
223
|
+
}): CloudLinkRef & {
|
|
224
|
+
readonly storedFunctions: Functions;
|
|
173
225
|
};
|
|
226
|
+
export declare function storedFunctionRef<const Parameters extends readonly StoredFunctionScalarType[], const Result extends StoredFunctionScalarType>(opts: {
|
|
227
|
+
readonly name: string;
|
|
228
|
+
readonly parameters: Parameters;
|
|
229
|
+
readonly result: Result;
|
|
230
|
+
}): StoredFunctionRef<Parameters, Result>;
|
|
174
231
|
export declare const categoryRef: (opts: Omit<CategoryRef, "refName" | "__kind">) => Omit<CategoryRef, "refName" | "__kind"> & {
|
|
175
232
|
readonly __kind: "category";
|
|
176
233
|
readonly refName: string;
|
|
@@ -179,10 +236,20 @@ export declare const groupRef: (opts: Omit<GroupRef, "refName" | "__kind">) => O
|
|
|
179
236
|
readonly __kind: "group";
|
|
180
237
|
readonly refName: string;
|
|
181
238
|
};
|
|
239
|
+
export declare const phoneProviderRef: (opts: Omit<PhoneProviderRef, "refName" | "__kind">) => Omit<PhoneProviderRef, "refName" | "__kind"> & {
|
|
240
|
+
readonly __kind: "phoneProvider";
|
|
241
|
+
readonly refName: string;
|
|
242
|
+
};
|
|
182
243
|
export declare function tableColumnRef(opts: Omit<TableColumnRef, "__kind" | "refName" | "parent"> & {
|
|
183
244
|
readonly parent?: string;
|
|
184
245
|
}): TableColumnRef;
|
|
185
|
-
export declare function tableRef(opts: Omit<TableRef, "__kind" | "refName">
|
|
246
|
+
export declare function tableRef<const Columns extends Readonly<Record<string, TableColumnRef>> | undefined = undefined, const RefName extends string = string>(opts: Omit<TableRef, "__kind" | "refName" | "columns"> & {
|
|
247
|
+
readonly refName?: RefName;
|
|
248
|
+
readonly columns?: Columns;
|
|
249
|
+
}): TableRef & {
|
|
250
|
+
readonly refName: RefName;
|
|
251
|
+
readonly columns: Columns;
|
|
252
|
+
};
|
|
186
253
|
/**
|
|
187
254
|
* `refName` is optional and defaults to `name` — for a caller with no bag-key
|
|
188
255
|
* context (e.g. a cross-aspect field ref where the field belongs to an aspect
|
|
@@ -212,15 +279,17 @@ export declare const fieldRef: <const T extends Omit<FieldRef, "__kind" | "refNa
|
|
|
212
279
|
* `identity.refName` — their factory calls (`automationRef()`, `agentRef()`,
|
|
213
280
|
* `searchTableRef({ name })`, …) need no `parent` argument.
|
|
214
281
|
*/
|
|
215
|
-
export declare function appCatalog<B extends AppCatalogBags>(identity: {
|
|
216
|
-
readonly refName:
|
|
282
|
+
export declare function appCatalog<const RefName extends string, B extends AppCatalogBags>(identity: {
|
|
283
|
+
readonly refName: RefName;
|
|
217
284
|
readonly name: string;
|
|
218
|
-
|
|
285
|
+
readonly namespace?: string;
|
|
286
|
+
}, bags: B): AppCatalogRef<RefName> & WithOwnedCatalogChildren<B, RefName>;
|
|
219
287
|
/** Same as {@link appCatalog}, but for an element catalog root. */
|
|
220
|
-
export declare function elementCatalog<B extends
|
|
221
|
-
readonly refName:
|
|
288
|
+
export declare function elementCatalog<const RefName extends string, B extends ElementCatalogBags>(identity: {
|
|
289
|
+
readonly refName: RefName;
|
|
222
290
|
readonly name: string;
|
|
223
|
-
|
|
291
|
+
readonly namespace?: string;
|
|
292
|
+
}, bags: B): ElementCatalogRef<RefName> & B;
|
|
224
293
|
/**
|
|
225
294
|
* Assemble the org catalog object. Produces `{ handle: "org", name: "Org", ...bags }`.
|
|
226
295
|
* No `__kind` — the org is not a `CatalogRef` kind and is referenced only as
|
|
@@ -229,14 +298,18 @@ export declare function elementCatalog<B extends AppCatalogBags>(identity: {
|
|
|
229
298
|
* unlike every other identity in this file, it's not a ref name. Bag entries'
|
|
230
299
|
* `.handle` are stamped from their own key, same as `appCatalog`.
|
|
231
300
|
*/
|
|
301
|
+
type PhoneProviderOrgCatalogBag = {
|
|
302
|
+
readonly phoneProviders: Readonly<Record<string, PhoneProviderRef>>;
|
|
303
|
+
};
|
|
232
304
|
export declare function orgCatalog<B extends {
|
|
233
305
|
aiProviders?: Record<string, AiProviderRef>;
|
|
234
306
|
cloudLinks?: Record<string, CloudLinkRef>;
|
|
235
307
|
categories?: Record<string, CategoryRef>;
|
|
236
308
|
groups?: Record<string, GroupRef>;
|
|
309
|
+
phoneProviders?: Record<string, PhoneProviderRef>;
|
|
237
310
|
tables?: Record<string, TableRef>;
|
|
238
311
|
}>(bags: B): {
|
|
239
312
|
readonly handle: "org";
|
|
240
313
|
readonly name: "Org";
|
|
241
|
-
} & B;
|
|
314
|
+
} & B & PhoneProviderOrgCatalogBag;
|
|
242
315
|
export {};
|
|
@@ -7,6 +7,14 @@ export const usersCatalog = {
|
|
|
7
7
|
lastName: { __kind: "userField", refName: "lastName", name: "lastName", fieldType: "TEXT" },
|
|
8
8
|
},
|
|
9
9
|
};
|
|
10
|
+
/** Lightweight typed owner token for tests and generated bootstrap code. Prefer the generated catalog in app source. */
|
|
11
|
+
export function appRef(refName, name = refName, namespace) {
|
|
12
|
+
return { __kind: "app", refName, name, ...(namespace !== undefined ? { namespace } : {}) };
|
|
13
|
+
}
|
|
14
|
+
/** Lightweight typed element-owner token. Prefer the generated catalog in authored workspace source. */
|
|
15
|
+
export function elementRef(refName, name = refName, namespace) {
|
|
16
|
+
return { __kind: "element", refName, name, ...(namespace !== undefined ? { namespace } : {}) };
|
|
17
|
+
}
|
|
10
18
|
/** Build a ref-kind factory: no identity parameter, `.refName` defaults to `name` (stamped over by the enclosing bag). */
|
|
11
19
|
function refFactory(kind) {
|
|
12
20
|
return (opts) => ({ __kind: kind, refName: opts.name, ...opts });
|
|
@@ -68,16 +76,55 @@ export function outputPropertyRef(opts) {
|
|
|
68
76
|
export function agentRef(opts) {
|
|
69
77
|
return { __kind: "agent", refName: "", name: opts?.name ?? "", ...(opts?.parent !== undefined ? { parent: opts.parent } : {}) };
|
|
70
78
|
}
|
|
79
|
+
export function agentEvaluationRef(opts) {
|
|
80
|
+
return { __kind: "agent-evaluation", refName: "", name: opts?.name ?? "", ...(opts?.parent !== undefined ? { parent: opts.parent } : {}) };
|
|
81
|
+
}
|
|
82
|
+
export function chartRef(opts) {
|
|
83
|
+
return { __kind: "chart", refName: opts?.refName ?? "", name: opts?.name ?? "", ...(opts?.parent !== undefined ? { parent: opts.parent } : {}) };
|
|
84
|
+
}
|
|
85
|
+
export function dashboardRef(opts) {
|
|
86
|
+
return { __kind: "dashboard", refName: opts?.refName ?? "", name: opts?.name ?? "", ...(opts?.parent !== undefined ? { parent: opts.parent } : {}) };
|
|
87
|
+
}
|
|
71
88
|
/**
|
|
72
89
|
* Skill ref — no required arguments, same shape as {@link agentRef}. `handle` and `parent`
|
|
73
90
|
* are injected by the enclosing `appCatalog`/`elementCatalog`; `name` defaults to `""`.
|
|
74
91
|
*/
|
|
75
92
|
export function skillRef(opts) {
|
|
76
|
-
return {
|
|
93
|
+
return {
|
|
94
|
+
__kind: "skill",
|
|
95
|
+
refName: "",
|
|
96
|
+
name: opts?.name ?? "",
|
|
97
|
+
...(opts?.parent !== undefined ? { parent: opts.parent } : {}),
|
|
98
|
+
...(opts?.parentName !== undefined ? { parentName: opts.parentName } : {}),
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
export function phoneServiceRef(opts) {
|
|
102
|
+
return { __kind: "phone-service", refName: "", name: opts?.name ?? "", ...(opts?.parent !== undefined ? { parent: opts.parent } : {}) };
|
|
103
|
+
}
|
|
104
|
+
export function datamineRef(opts) {
|
|
105
|
+
return { __kind: "datamine", refName: "", name: opts?.name ?? "", ...(opts?.parent !== undefined ? { parent: opts.parent } : {}) };
|
|
77
106
|
}
|
|
78
|
-
export const flowRef = refFactory("flow");
|
|
79
107
|
export const approvalChainRef = refFactory("approvalChain");
|
|
80
|
-
|
|
108
|
+
function searchTableRefFor(opts, variant) {
|
|
109
|
+
return {
|
|
110
|
+
__kind: "searchTable",
|
|
111
|
+
refName: opts.name,
|
|
112
|
+
...opts,
|
|
113
|
+
__variant: variant,
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
/** Reference to a managed element search table. Resource selection stays private. */
|
|
117
|
+
export function searchTableRef(opts) {
|
|
118
|
+
return searchTableRefFor(opts, "snowflake");
|
|
119
|
+
}
|
|
120
|
+
/** Reference to an existing linked Cortex Search Service. */
|
|
121
|
+
export function linkedSearchTableRef(opts) {
|
|
122
|
+
return searchTableRefFor(opts, "linked");
|
|
123
|
+
}
|
|
124
|
+
/** Reference to a managed search table owned by an Elementum Table. */
|
|
125
|
+
export function tableSearchTableRef(opts) {
|
|
126
|
+
return searchTableRefFor(opts, "table");
|
|
127
|
+
}
|
|
81
128
|
export const connectorRef = refFactory("connector");
|
|
82
129
|
/**
|
|
83
130
|
* AI provider ref — reference only, the provider must already exist on the
|
|
@@ -94,7 +141,7 @@ export const connectorRef = refFactory("connector");
|
|
|
94
141
|
* its literal) — same `const T extends ...` trick as {@link fieldRef} so
|
|
95
142
|
* `type: "anthropic"` narrows which models are valid at each call site.
|
|
96
143
|
*/
|
|
97
|
-
export function
|
|
144
|
+
export function aiProvider(opts) {
|
|
98
145
|
return {
|
|
99
146
|
__kind: "aiProvider",
|
|
100
147
|
refName: opts.name,
|
|
@@ -103,9 +150,30 @@ export function defineAiProvider(opts) {
|
|
|
103
150
|
...(opts.models !== undefined ? { models: opts.models } : {}),
|
|
104
151
|
};
|
|
105
152
|
}
|
|
106
|
-
export
|
|
153
|
+
export function cloudLinkRef(opts) {
|
|
154
|
+
const functions = opts.storedFunctions === undefined
|
|
155
|
+
? undefined
|
|
156
|
+
: Object.fromEntries(Object.entries(opts.storedFunctions).map(([refName, fn]) => [refName, { ...fn, refName, parent: "" }]));
|
|
157
|
+
return {
|
|
158
|
+
__kind: "cloudLink",
|
|
159
|
+
refName: opts.name,
|
|
160
|
+
name: opts.name,
|
|
161
|
+
...(functions !== undefined ? { storedFunctions: functions } : {}),
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
export function storedFunctionRef(opts) {
|
|
165
|
+
return {
|
|
166
|
+
__kind: "storedFunction",
|
|
167
|
+
refName: opts.name,
|
|
168
|
+
name: opts.name,
|
|
169
|
+
parent: "",
|
|
170
|
+
parameterTypes: opts.parameters,
|
|
171
|
+
resultType: opts.result,
|
|
172
|
+
};
|
|
173
|
+
}
|
|
107
174
|
export const categoryRef = refFactory("category");
|
|
108
175
|
export const groupRef = refFactory("group");
|
|
176
|
+
export const phoneProviderRef = refFactory("phoneProvider");
|
|
109
177
|
export function tableColumnRef(opts) {
|
|
110
178
|
return {
|
|
111
179
|
__kind: "tableColumn",
|
|
@@ -117,11 +185,18 @@ export function tableColumnRef(opts) {
|
|
|
117
185
|
};
|
|
118
186
|
}
|
|
119
187
|
export function tableRef(opts) {
|
|
188
|
+
const refName = opts.refName ?? opts.name;
|
|
189
|
+
const columns = opts.columns === undefined
|
|
190
|
+
? undefined
|
|
191
|
+
: Object.fromEntries(Object.entries(opts.columns).map(([refName, column]) => [
|
|
192
|
+
refName,
|
|
193
|
+
{ ...column, refName, parent: opts.refName ?? opts.name },
|
|
194
|
+
]));
|
|
120
195
|
return {
|
|
121
196
|
__kind: "table",
|
|
122
|
-
refName
|
|
197
|
+
refName,
|
|
123
198
|
name: opts.name,
|
|
124
|
-
...(
|
|
199
|
+
...(columns !== undefined ? { columns } : {}),
|
|
125
200
|
...(opts.categoryId !== undefined ? { categoryId: opts.categoryId } : {}),
|
|
126
201
|
};
|
|
127
202
|
}
|
|
@@ -168,7 +243,36 @@ function stampFieldRefs(bag, identity, parentKind) {
|
|
|
168
243
|
return undefined;
|
|
169
244
|
const out = {};
|
|
170
245
|
for (const [refName, ref] of Object.entries(bag)) {
|
|
171
|
-
out[refName] = {
|
|
246
|
+
out[refName] = {
|
|
247
|
+
...ref,
|
|
248
|
+
refName,
|
|
249
|
+
parent: identity.refName,
|
|
250
|
+
parentKind,
|
|
251
|
+
parentName: identity.name,
|
|
252
|
+
...(identity.namespace !== undefined ? { parentNamespace: identity.namespace } : {}),
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
return out;
|
|
256
|
+
}
|
|
257
|
+
function stampOwnedRefs(bag, identity, parentKind) {
|
|
258
|
+
if (bag === undefined)
|
|
259
|
+
return undefined;
|
|
260
|
+
return Object.fromEntries(Object.entries(bag).map(([refName, ref]) => [refName, {
|
|
261
|
+
...ref,
|
|
262
|
+
refName,
|
|
263
|
+
parent: identity.refName,
|
|
264
|
+
parentKind,
|
|
265
|
+
parentName: identity.name,
|
|
266
|
+
...(identity.namespace !== undefined ? { parentNamespace: identity.namespace } : {}),
|
|
267
|
+
}]));
|
|
268
|
+
}
|
|
269
|
+
/** Stamp the owning app's stable key and display name onto each skill token. */
|
|
270
|
+
function stampSkillRefs(bag, identity) {
|
|
271
|
+
if (bag === undefined)
|
|
272
|
+
return undefined;
|
|
273
|
+
const out = {};
|
|
274
|
+
for (const [refName, ref] of Object.entries(bag)) {
|
|
275
|
+
out[refName] = { ...ref, refName, parent: identity.refName, parentName: identity.name };
|
|
172
276
|
}
|
|
173
277
|
return out;
|
|
174
278
|
}
|
|
@@ -183,10 +287,12 @@ function stampTableRefs(bag) {
|
|
|
183
287
|
columnRefName,
|
|
184
288
|
{ ...column, refName: columnRefName, parent: tableRefName },
|
|
185
289
|
]));
|
|
290
|
+
const datamines = withOwnKeyAsHandle(ref.datamines, tableRefName);
|
|
186
291
|
out[tableRefName] = {
|
|
187
292
|
...ref,
|
|
188
293
|
refName: tableRefName,
|
|
189
294
|
...(columns !== undefined ? { columns } : {}),
|
|
295
|
+
...(datamines !== undefined ? { datamines } : {}),
|
|
190
296
|
};
|
|
191
297
|
}
|
|
192
298
|
return out;
|
|
@@ -206,13 +312,18 @@ export function appCatalog(identity, bags) {
|
|
|
206
312
|
__kind: "app",
|
|
207
313
|
refName: identity.refName,
|
|
208
314
|
name: identity.name,
|
|
315
|
+
...(identity.namespace !== undefined ? { namespace: identity.namespace } : {}),
|
|
209
316
|
...bags,
|
|
210
317
|
fields: stampFieldRefs(bags.fields, identity, "app") ?? {},
|
|
211
318
|
searchTables: withOwnKeyAsHandle(bags.searchTables, identity.refName) ?? {},
|
|
212
319
|
fileReaders: withOwnKeyAsHandle(bags.fileReaders, identity.refName) ?? {},
|
|
213
|
-
automations:
|
|
320
|
+
automations: stampOwnedRefs(bags.automations, identity, "app") ?? {},
|
|
214
321
|
agents: withOwnKeyAsHandle(bags.agents, identity.refName) ?? {},
|
|
215
|
-
|
|
322
|
+
evaluations: withOwnKeyAsHandle(bags.evaluations, identity.refName) ?? {},
|
|
323
|
+
charts: withOwnKeyAsHandle(bags.charts, identity.refName) ?? {},
|
|
324
|
+
skills: stampSkillRefs(bags.skills, identity) ?? {},
|
|
325
|
+
approvalChains: withOwnKeyAsHandle(bags.approvalChains, identity.refName) ?? {},
|
|
326
|
+
phoneServices: withOwnKeyAsHandle(bags.phoneServices, identity.refName) ?? {},
|
|
216
327
|
};
|
|
217
328
|
}
|
|
218
329
|
/** Same as {@link appCatalog}, but for an element catalog root. */
|
|
@@ -221,35 +332,44 @@ export function elementCatalog(identity, bags) {
|
|
|
221
332
|
__kind: "element",
|
|
222
333
|
refName: identity.refName,
|
|
223
334
|
name: identity.name,
|
|
335
|
+
...(identity.namespace !== undefined ? { namespace: identity.namespace } : {}),
|
|
224
336
|
...bags,
|
|
225
337
|
fields: stampFieldRefs(bags.fields, identity, "element") ?? {},
|
|
226
338
|
searchTables: withOwnKeyAsHandle(bags.searchTables, identity.refName) ?? {},
|
|
227
339
|
fileReaders: withOwnKeyAsHandle(bags.fileReaders, identity.refName) ?? {},
|
|
228
|
-
automations:
|
|
340
|
+
automations: stampOwnedRefs(bags.automations, identity, "element") ?? {},
|
|
229
341
|
agents: withOwnKeyAsHandle(bags.agents, identity.refName) ?? {},
|
|
230
|
-
|
|
342
|
+
evaluations: withOwnKeyAsHandle(bags.evaluations, identity.refName) ?? {},
|
|
343
|
+
skills: stampSkillRefs(bags.skills, identity) ?? {},
|
|
344
|
+
approvalChains: withOwnKeyAsHandle(bags.approvalChains, identity.refName) ?? {},
|
|
345
|
+
phoneServices: withOwnKeyAsHandle(bags.phoneServices, identity.refName) ?? {},
|
|
231
346
|
};
|
|
232
347
|
}
|
|
233
|
-
/**
|
|
234
|
-
* Assemble the org catalog object. Produces `{ handle: "org", name: "Org", ...bags }`.
|
|
235
|
-
* No `__kind` — the org is not a `CatalogRef` kind and is referenced only as
|
|
236
|
-
* a namespace (`org.aiProviders.X.models.Y`, `org.cloudLinks.Y`), never passed as a ref.
|
|
237
|
-
* `"org"` is a fixed singleton namespace, not derived from any entity's name —
|
|
238
|
-
* unlike every other identity in this file, it's not a ref name. Bag entries'
|
|
239
|
-
* `.handle` are stamped from their own key, same as `appCatalog`.
|
|
240
|
-
*/
|
|
241
348
|
export function orgCatalog(bags) {
|
|
242
349
|
return {
|
|
243
350
|
handle: "org",
|
|
244
351
|
name: "Org",
|
|
245
352
|
...bags,
|
|
246
353
|
aiProviders: stampAiProviders(bags.aiProviders),
|
|
247
|
-
cloudLinks:
|
|
354
|
+
cloudLinks: stampCloudLinks(bags.cloudLinks) ?? {},
|
|
248
355
|
categories: withOwnKeyAsHandle(bags.categories) ?? {},
|
|
249
356
|
groups: withOwnKeyAsHandle(bags.groups) ?? {},
|
|
357
|
+
phoneProviders: withOwnKeyAsHandle(bags.phoneProviders) ?? {},
|
|
250
358
|
tables: stampTableRefs(bags.tables) ?? {},
|
|
251
359
|
};
|
|
252
360
|
}
|
|
361
|
+
function stampCloudLinks(bag) {
|
|
362
|
+
const stamped = withOwnKeyAsHandle(bag);
|
|
363
|
+
if (stamped === undefined)
|
|
364
|
+
return undefined;
|
|
365
|
+
return Object.fromEntries(Object.entries(stamped).map(([cloudLinkKey, cloudLink]) => [
|
|
366
|
+
cloudLinkKey,
|
|
367
|
+
{
|
|
368
|
+
...cloudLink,
|
|
369
|
+
storedFunctions: withOwnKeyAsHandle(cloudLink.storedFunctions, cloudLinkKey) ?? {},
|
|
370
|
+
},
|
|
371
|
+
]));
|
|
372
|
+
}
|
|
253
373
|
/**
|
|
254
374
|
* Stamp each provider's own `.refName`/`.handle` from its bag key (same as
|
|
255
375
|
* `withOwnKeyAsHandle`), and — since a provider's `models` bag is nested
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { CatalogRef } from "./types.js";
|
|
2
2
|
import { type AuthoringTenantContext } from "../engine/workspace/authoring-layout.js";
|
|
3
3
|
/**
|
|
4
|
-
* An authoring file's default export — what `
|
|
5
|
-
* `
|
|
4
|
+
* An authoring file's default export — what `app`/`agent`/
|
|
5
|
+
* `automation` produce. `ref()`/`def()` both take the ref name as a
|
|
6
6
|
* call-time argument (never a stored property the authoring file declares).
|
|
7
7
|
*/
|
|
8
8
|
export interface ConfiguredEntity<TRef extends CatalogRef = CatalogRef> {
|
|
@@ -36,7 +36,7 @@ export interface AppAuthoringCatalog {
|
|
|
36
36
|
}
|
|
37
37
|
/**
|
|
38
38
|
* Assemble an app's catalog from authoring files on disk — no server
|
|
39
|
-
* round-trip. `appFile` is the app's own authoring file (a `
|
|
39
|
+
* round-trip. `appFile` is the app's own authoring file (a `app(...)`
|
|
40
40
|
* result); `appDir` is its containing folder.
|
|
41
41
|
*
|
|
42
42
|
* Writes a throwaway stub version of `<appDir>/generated/catalog.ts` before
|
|
@@ -65,13 +65,13 @@ export declare function writeAppCatalogFromAuthoring(appDir: string, appRefName:
|
|
|
65
65
|
/**
|
|
66
66
|
* Write/refresh `<appDir>/generated/catalog.ts` regardless of whether the app has been
|
|
67
67
|
* fully pulled yet. If `appFile` already default-exports a configured app (a
|
|
68
|
-
* `
|
|
68
|
+
* `app(...)` pull), this is exactly {@link writeAppCatalogFromAuthoring}.
|
|
69
69
|
* Otherwise — `edk import app` ran but `edk pull app` hasn't, so `appFile` is
|
|
70
70
|
* just the old reference-only stub with no default export — falls back to
|
|
71
71
|
* `importRefs` (the import-time fields/searchTables) merged with whatever
|
|
72
72
|
* own-file children already have authoring files in this folder.
|
|
73
73
|
*/
|
|
74
|
-
export declare function writeAppCatalog(appDir: string, appRefName: string, appName: string, appFile: string, importRefs?: readonly CatalogRef[], kind?: "app" | "element"): Promise<{
|
|
74
|
+
export declare function writeAppCatalog(appDir: string, appRefName: string, appName: string, appFile: string, importRefs?: readonly CatalogRef[], kind?: "app" | "element", namespace?: string): Promise<{
|
|
75
75
|
catalogPath: string;
|
|
76
76
|
}>;
|
|
77
77
|
/** One app's catalog regenerated by {@link regenerateAppCatalogsUnder}. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Build an app's catalog by scanning its **authoring files** rather than
|
|
3
|
-
* round-tripping the server. Stream-root builders (`
|
|
3
|
+
* round-tripping the server. Stream-root builders (`app`, …) and
|
|
4
4
|
* own-file children default-export either a `{ ref(refName), def(refName) }`
|
|
5
5
|
* configured entity or a plain `DeployableEntity`. Per-kind catalog shape
|
|
6
6
|
* (stub refs, trigger/outputs bags, `searchTable` vs bag dir) lives on each
|
|
@@ -36,7 +36,7 @@ function isConfiguredEntity(value) {
|
|
|
36
36
|
// whatever's *currently* on disk. Within a single `edk pull` an app's own
|
|
37
37
|
// file gets imported here once while it's still the import-time
|
|
38
38
|
// reference-only stub (no default export), then overwritten with the real
|
|
39
|
-
// `
|
|
39
|
+
// `app(...)` call via plain `writeFile` (not through jiti), then
|
|
40
40
|
// imported here again. A cached jiti would return the stale pre-overwrite
|
|
41
41
|
// result for that second import — exactly the "does not default-export a
|
|
42
42
|
// configured app" failure this avoids. Re-transpiling on every call is the
|
|
@@ -61,6 +61,8 @@ const CATALOG_FILENAME = "catalog.ts";
|
|
|
61
61
|
function isEntityFile(name) {
|
|
62
62
|
if (name === CATALOG_FILENAME)
|
|
63
63
|
return false;
|
|
64
|
+
if (name === "org.ts" || name === "org.js" || name === "org.mjs")
|
|
65
|
+
return false;
|
|
64
66
|
if (name.endsWith(".d.ts") || name.endsWith(".test.ts"))
|
|
65
67
|
return false;
|
|
66
68
|
if (name.startsWith("_"))
|
|
@@ -206,19 +208,27 @@ async function loadCatalogChildBag(appDir, child, parent, catalogPath, defsOut)
|
|
|
206
208
|
const refs = {};
|
|
207
209
|
const defs = {};
|
|
208
210
|
for (const file of await listEntityFiles(catalogChildDir(appDir, child))) {
|
|
211
|
+
const refName = refNameOf(file);
|
|
209
212
|
let mod;
|
|
210
213
|
try {
|
|
211
214
|
mod = (await jiti.import(file));
|
|
212
215
|
}
|
|
213
216
|
catch (err) {
|
|
217
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
218
|
+
console.error(`[edk] warning: could not load catalog child ${file}; ` +
|
|
219
|
+
`using typed stub ${parent}.${refName}: ${message}`);
|
|
214
220
|
if (process.env.EDK_DEBUG) {
|
|
215
221
|
console.error(`[EDK_DEBUG] Failed to import ${file}:`, err);
|
|
216
222
|
}
|
|
217
|
-
//
|
|
218
|
-
//
|
|
223
|
+
// Keep the on-disk child visible to sibling authoring even when its full
|
|
224
|
+
// module cannot load yet (for example, a skill that references an
|
|
225
|
+
// element whose catalog is generated later in the same fresh bootstrap).
|
|
226
|
+
// The normal entity-discovery pass still imports the file and reports
|
|
227
|
+
// the real authoring error; this fallback only prevents one unresolved
|
|
228
|
+
// child from erasing its typed catalog ref and cascading into siblings.
|
|
229
|
+
refs[refName] = facet.stubRef(refName, parent);
|
|
219
230
|
continue;
|
|
220
231
|
}
|
|
221
|
-
const refName = refNameOf(file);
|
|
222
232
|
const defaultExport = mod.default;
|
|
223
233
|
const namedExports = { ...mod };
|
|
224
234
|
delete namedExports.default;
|
|
@@ -270,7 +280,7 @@ async function writeStubCatalog(appDir, appRefName, appName, kind, fields, child
|
|
|
270
280
|
}
|
|
271
281
|
/**
|
|
272
282
|
* Assemble an app's catalog from authoring files on disk — no server
|
|
273
|
-
* round-trip. `appFile` is the app's own authoring file (a `
|
|
283
|
+
* round-trip. `appFile` is the app's own authoring file (a `app(...)`
|
|
274
284
|
* result); `appDir` is its containing folder.
|
|
275
285
|
*
|
|
276
286
|
* Writes a throwaway stub version of `<appDir>/generated/catalog.ts` before
|
|
@@ -285,7 +295,7 @@ export async function buildAppCatalogFromAuthoring(appDir, appFile, orgCatalogPa
|
|
|
285
295
|
const jiti = authoringJiti(resolvedOrgCatalogPath);
|
|
286
296
|
const appMod = (await jiti.import(appFile));
|
|
287
297
|
if (!isConfiguredEntity(appMod.default)) {
|
|
288
|
-
throw new Error(`${appFile} does not default-export a configured app (a
|
|
298
|
+
throw new Error(`${appFile} does not default-export a configured app (a app(...) result)`);
|
|
289
299
|
}
|
|
290
300
|
const app = appMod.default;
|
|
291
301
|
const appRefName = refNameOf(appFile);
|
|
@@ -378,13 +388,13 @@ export async function writeAppCatalogFromAuthoring(appDir, appRefName, appName,
|
|
|
378
388
|
/**
|
|
379
389
|
* Write/refresh `<appDir>/generated/catalog.ts` regardless of whether the app has been
|
|
380
390
|
* fully pulled yet. If `appFile` already default-exports a configured app (a
|
|
381
|
-
* `
|
|
391
|
+
* `app(...)` pull), this is exactly {@link writeAppCatalogFromAuthoring}.
|
|
382
392
|
* Otherwise — `edk import app` ran but `edk pull app` hasn't, so `appFile` is
|
|
383
393
|
* just the old reference-only stub with no default export — falls back to
|
|
384
394
|
* `importRefs` (the import-time fields/searchTables) merged with whatever
|
|
385
395
|
* own-file children already have authoring files in this folder.
|
|
386
396
|
*/
|
|
387
|
-
export async function writeAppCatalog(appDir, appRefName, appName, appFile, importRefs = [], kind = "app") {
|
|
397
|
+
export async function writeAppCatalog(appDir, appRefName, appName, appFile, importRefs = [], kind = "app", namespace) {
|
|
388
398
|
// Derive the workspace catalog path for the `@catalog` alias so entity files
|
|
389
399
|
// that `import catalog from "@catalog"` can be loaded. `appDir` is
|
|
390
400
|
// `<wsRoot>/apps/<handle>`; the org catalog lives at `<wsRoot>/generated/catalog.ts`.
|
|
@@ -414,7 +424,7 @@ export async function writeAppCatalog(appDir, appRefName, appName, appFile, impo
|
|
|
414
424
|
fromBags.push(...Object.values(bag));
|
|
415
425
|
}
|
|
416
426
|
const flatRefs = dedupeCatalogRefs([...importRefs, ...fromBags]);
|
|
417
|
-
const source = renderCatalog({ kind, refName: appRefName, name: appName }, flatRefs);
|
|
427
|
+
const source = renderCatalog({ kind, refName: appRefName, name: appName, ...(namespace !== undefined ? { namespace } : {}) }, flatRefs);
|
|
418
428
|
const generatedDir = join(appDir, "generated");
|
|
419
429
|
const catalogPath = join(generatedDir, CATALOG_FILENAME);
|
|
420
430
|
await mkdir(generatedDir, { recursive: true });
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* ids appear here (identity lives in `src/deploy/state`).
|
|
5
5
|
*/
|
|
6
6
|
export { AI_PROVIDER_LLM_MODELS, type AiProviderLlmModel, type AiProviderType } from "./ai-provider-models.js";
|
|
7
|
-
export { REF_SCOPE, REF_UPDATABLE, type AgentRef, type AiProviderRef, type ApprovalChainRef, type
|
|
7
|
+
export { REF_SCOPE, REF_UPDATABLE, type AgentRef, type AgentEvaluationRef, type AiProviderRef, type ApprovalChainRef, type ApprovalProcessRef, type AppCatalogRef, type AppOrElementRef, type AutomationCatalogRef, type AutomationRef, type CatalogRef, type CatalogRefKind, type CategoryRef, type ChartRef, type DashboardRef, type CloudLinkRef, type AiServiceRef, type ConnectorRef, type GroupRef, type PhoneProviderRef, type PhoneServiceRef, type FileReaderCatalogRef, type DocumentModelFieldRef, type ElementCatalogRef, type FieldRef, type OutputPropertyRef, type SearchTableRef, type StoredFunctionRef, type StoredFunctionScalarType, type DatamineRef, type SkillRef, type TableColumnRef, type TableRef, type TriggerParameterRef, USER_FIELD_KEYS, type UserFieldKey, type UserFieldRef, } from "./types.js";
|
|
8
8
|
export { renderBarrel, renderCatalog, renderFragment, type BarrelEntry, type BarrelRoot, } from "./render.js";
|
|
9
9
|
export { appCatalogTarget, barrelPathFor, orgCatalogTarget, regenerateBarrel, writeCatalog, writeFlatCatalog, writeFragment, type CatalogTarget, } from "./write.js";
|
|
10
10
|
export { isCatalogToken, slimToken, slimTokens } from "./token.js";
|
|
11
11
|
export { buildAppCatalogFromAuthoring, listEntityFilesFromPaths, refNameOf, regenerateAppCatalogsUnder, writeAppCatalog, writeAppCatalogFromAuthoring, type AppAuthoringCatalog, type AppCatalogRegenResult, type ConfiguredEntity, } from "./from-authoring.js";
|
|
12
|
-
export { agentRef, appCatalog, approvalChainRef, automationRef, categoryRef, cloudLinkRef, connectorRef,
|
|
12
|
+
export { agentRef, agentEvaluationRef, appRef, appCatalog, approvalChainRef, automationRef, categoryRef, chartRef, dashboardRef, cloudLinkRef, connectorRef, aiProvider, groupRef, linkedSearchTableRef, phoneProviderRef, phoneServiceRef, documentModelFieldRef, documentModelRef, elementCatalog, elementRef, fieldRef, orgCatalog, outputPropertyRef, searchTableRef, datamineRef, skillRef, storedFunctionRef, tableColumnRef, tableRef, tableSearchTableRef, triggerParameterRef, usersCatalog, } from "./factories.js";
|
|
@@ -9,4 +9,4 @@ export { renderBarrel, renderCatalog, renderFragment, } from "./render.js";
|
|
|
9
9
|
export { appCatalogTarget, barrelPathFor, orgCatalogTarget, regenerateBarrel, writeCatalog, writeFlatCatalog, writeFragment, } from "./write.js";
|
|
10
10
|
export { isCatalogToken, slimToken, slimTokens } from "./token.js";
|
|
11
11
|
export { buildAppCatalogFromAuthoring, listEntityFilesFromPaths, refNameOf, regenerateAppCatalogsUnder, writeAppCatalog, writeAppCatalogFromAuthoring, } from "./from-authoring.js";
|
|
12
|
-
export { agentRef, appCatalog, approvalChainRef, automationRef, categoryRef, cloudLinkRef, connectorRef,
|
|
12
|
+
export { agentRef, agentEvaluationRef, appRef, appCatalog, approvalChainRef, automationRef, categoryRef, chartRef, dashboardRef, cloudLinkRef, connectorRef, aiProvider, groupRef, linkedSearchTableRef, phoneProviderRef, phoneServiceRef, documentModelFieldRef, documentModelRef, elementCatalog, elementRef, fieldRef, orgCatalog, outputPropertyRef, searchTableRef, datamineRef, skillRef, storedFunctionRef, tableColumnRef, tableRef, tableSearchTableRef, triggerParameterRef, usersCatalog, } from "./factories.js";
|