@elementumai/edk 0.8.2-alpha.6 → 0.9.2
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 +18 -14
- 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 +2 -10
- package/dist-sdk/elementum-entity-client/clients/skills/models/skill-tool.d.ts +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/src/catalog/factories.d.ts +53 -19
- package/dist-sdk/src/catalog/factories.js +51 -12
- package/dist-sdk/src/catalog/from-authoring.js +13 -3
- 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 +1 -0
- package/dist-sdk/src/catalog/render.js +6 -0
- package/dist-sdk/src/catalog/token.js +7 -0
- package/dist-sdk/src/catalog/types.d.ts +34 -23
- package/dist-sdk/src/catalog/types.js +7 -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 +1 -0
- package/dist-sdk/src/core/index.js +1 -0
- 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} +2 -2
- package/dist-sdk/src/{entities/flow/activities/render-catalog.js → core/render-tree.js} +6 -8
- package/dist-sdk/src/core/types/app.d.ts +13 -23
- package/dist-sdk/src/core/types/app.js +0 -1
- package/dist-sdk/src/engine/build/context.d.ts +3 -3
- 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 +39 -0
- package/dist-sdk/src/engine/pull/org.d.ts +1 -0
- package/dist-sdk/src/engine/pull/org.js +2 -0
- package/dist-sdk/src/engine/tf/expr.d.ts +1 -1
- package/dist-sdk/src/engine/tf/expr.js +10 -3
- package/dist-sdk/src/engine/workspace/authoring-layout.js +4 -2
- package/dist-sdk/src/entities/access-policy/build.d.ts +4 -13
- package/dist-sdk/src/entities/access-policy/build.js +1 -1
- package/dist-sdk/src/entities/access-policy/from-tf.d.ts +12 -38
- package/dist-sdk/src/entities/access-policy/from-tf.js +16 -74
- package/dist-sdk/src/entities/access-policy/principal.d.ts +29 -0
- package/dist-sdk/src/entities/access-policy/principal.js +13 -0
- package/dist-sdk/src/entities/access-policy/to-tf.d.ts +20 -5
- package/dist-sdk/src/entities/access-policy/to-tf.js +26 -54
- package/dist-sdk/src/entities/agent/build.d.ts +39 -8
- package/dist-sdk/src/entities/agent/build.js +36 -15
- package/dist-sdk/src/entities/agent/deserializer/print-agent-v2.d.ts +5 -0
- package/dist-sdk/src/entities/agent/deserializer/print-agent-v2.js +121 -36
- package/dist-sdk/src/entities/agent/from-tf.js +5 -8
- 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 +5 -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 +2 -1
- package/dist-sdk/src/entities/agent/to-tf.js +2 -1
- package/dist-sdk/src/entities/agent/tools.d.ts +60 -48
- package/dist-sdk/src/entities/agent/tools.js +44 -38
- 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-tool/from-tf.d.ts +17 -8
- package/dist-sdk/src/entities/agent-tool/from-tf.js +127 -37
- package/dist-sdk/src/entities/agent-tool/module.js +6 -0
- package/dist-sdk/src/entities/agent-tool/to-tf.d.ts +5 -5
- package/dist-sdk/src/entities/agent-tool/to-tf.js +93 -20
- package/dist-sdk/src/entities/agent-tool/types.d.ts +4 -5
- package/dist-sdk/src/entities/agent-tool/types.js +36 -8
- package/dist-sdk/src/entities/app/build.d.ts +137 -25
- package/dist-sdk/src/entities/app/build.js +104 -53
- package/dist-sdk/src/entities/app/deserializer/normalize.d.ts +173 -1
- package/dist-sdk/src/entities/app/deserializer/pulled-expression.d.ts +59 -0
- package/dist-sdk/src/entities/app/deserializer/pulled-expression.js +68 -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 +13 -4
- package/dist-sdk/src/entities/app/index.js +8 -1
- package/dist-sdk/src/entities/app/module.js +27 -2
- package/dist-sdk/src/entities/app/to-tf.js +75 -1
- 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 +10 -6
- package/dist-sdk/src/entities/automation/build.js +5 -4
- package/dist-sdk/src/entities/automation/deserializer/ast.d.ts +10 -8
- package/dist-sdk/src/entities/automation/deserializer/print-automation.js +51 -114
- 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 +4 -0
- package/dist-sdk/src/entities/automation/from-tf.js +202 -119
- package/dist-sdk/src/entities/automation/index.d.ts +4 -2
- package/dist-sdk/src/entities/automation/index.js +3 -1
- package/dist-sdk/src/entities/automation/module.js +10 -4
- package/dist-sdk/src/entities/automation/script-code.js +94 -6
- package/dist-sdk/src/entities/automation/tasks.d.ts +20 -19
- package/dist-sdk/src/entities/automation/tasks.js +2 -2
- package/dist-sdk/src/entities/automation/to-tf.d.ts +34 -2
- package/dist-sdk/src/entities/automation/to-tf.js +273 -98
- package/dist-sdk/src/entities/automation/triggers.d.ts +18 -17
- package/dist-sdk/src/entities/automation/triggers.js +1 -1
- package/dist-sdk/src/entities/dashboard/build.d.ts +17 -0
- package/dist-sdk/src/entities/dashboard/from-tf.d.ts +12 -0
- package/dist-sdk/src/entities/dashboard/from-tf.js +95 -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 +30 -0
- package/dist-sdk/src/entities/dashboard/to-tf.js +94 -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/build.js +1 -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 +303 -0
- package/dist-sdk/src/entities/dynamic-layout/build.js +4 -0
- package/dist-sdk/src/entities/dynamic-layout/dialect.d.ts +2 -0
- package/dist-sdk/src/entities/dynamic-layout/dialect.js +9 -0
- package/dist-sdk/src/entities/dynamic-layout/from-tf.d.ts +10 -0
- package/dist-sdk/src/entities/dynamic-layout/from-tf.js +233 -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 +31 -14
- package/dist-sdk/src/entities/element/build.js +12 -4
- 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 +8 -3
- package/dist-sdk/src/entities/element/index.js +4 -1
- package/dist-sdk/src/entities/element/module.js +19 -2
- package/dist-sdk/src/entities/element/to-tf.js +57 -1
- package/dist-sdk/src/entities/field/build.d.ts +4 -3
- package/dist-sdk/src/entities/field/calculation-types.d.ts +6 -0
- package/dist-sdk/src/entities/field/calculation-types.js +42 -0
- package/dist-sdk/src/entities/field/from-tf.js +90 -11
- package/dist-sdk/src/entities/field/module.d.ts +1 -0
- package/dist-sdk/src/entities/field/module.js +5 -2
- package/dist-sdk/src/entities/field/record-shape.d.ts +1 -1
- package/dist-sdk/src/entities/field/to-tf.d.ts +1 -1
- package/dist-sdk/src/entities/field/to-tf.js +22 -6
- package/dist-sdk/src/entities/field/types.js +3 -0
- package/dist-sdk/src/entities/file-reader/build.d.ts +66 -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 +11 -9
- 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/group.js +4 -5
- package/dist-sdk/src/entities/org/index.d.ts +1 -0
- package/dist-sdk/src/entities/org/index.js +1 -0
- package/dist-sdk/src/entities/org/phone-provider.d.ts +4 -0
- package/dist-sdk/src/entities/org/phone-provider.js +33 -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 +29 -0
- package/dist-sdk/src/entities/organization/build.js +24 -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 +18 -0
- package/dist-sdk/src/entities/organization/to-tf.d.ts +6 -0
- package/dist-sdk/src/entities/organization/to-tf.js +37 -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 +54 -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 +80 -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 +31 -0
- package/dist-sdk/src/entities/relationship/to-tf.js +153 -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 +11 -0
- package/dist-sdk/src/entities/service-account/to-tf.js +72 -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/filters/ast.d.ts +21 -79
- package/dist-sdk/src/entities/shared/filters/ast.js +5 -2
- package/dist-sdk/src/entities/shared/filters/index.d.ts +94 -206
- package/dist-sdk/src/entities/shared/filters/index.js +189 -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/skill/build.d.ts +2 -2
- package/dist-sdk/src/entities/skill/build.js +4 -3
- package/dist-sdk/src/entities/skill/deserializer/print-skill-v2.d.ts +10 -0
- package/dist-sdk/src/entities/skill/deserializer/print-skill-v2.js +74 -32
- package/dist-sdk/src/entities/skill/index.d.ts +2 -1
- package/dist-sdk/src/entities/skill/index.js +2 -1
- package/dist-sdk/src/entities/skill/module.js +6 -0
- package/dist-sdk/src/entities/skill/to-tf.d.ts +5 -1
- package/dist-sdk/src/entities/skill/to-tf.js +18 -0
- package/dist-sdk/src/entities/skill/tools.d.ts +46 -31
- package/dist-sdk/src/entities/skill/tools.js +33 -20
- package/dist-sdk/src/entities/skill-tool/from-tf.d.ts +4 -1
- package/dist-sdk/src/entities/skill-tool/from-tf.js +76 -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 +94 -42
- 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 +33 -18
- package/dist-sdk/src/entities/table/catalog-render.js +6 -0
- 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 +230 -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/from-tf.d.ts +7 -2
- package/dist-sdk/src/entities/view/from-tf.js +209 -25
- package/dist-sdk/src/entities/view/module.js +5 -1
- package/dist-sdk/src/entities/view/to-tf.d.ts +49 -7
- package/dist-sdk/src/entities/view/to-tf.js +155 -18
- package/dist-sdk/src/entities/view/types.d.ts +8 -0
- package/dist-sdk/src/entities/view/types.js +43 -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 +14 -0
- package/dist-sdk/src/entities/visual-flow/to-tf.js +101 -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 +44 -0
- package/dist-sdk/src/entities/widget/to-tf.js +204 -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 +7 -0
- package/dist-sdk/src/graph/index.js +4 -18
- package/dist-sdk/src/graph/modules.js +30 -1
- package/dist-sdk/src/graph/types.d.ts +55 -7
- package/dist-sdk/src/internal/sdk-package.d.ts +1 -1
- package/dist-sdk/src/internal/sdk-package.js +4 -2
- package/package.json +30 -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 → dashboard/build.js} +0 -0
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Filter types
|
|
3
|
-
* jarvis/util/.../filter/*.java
|
|
2
|
+
* Filter types matching the platform filter contract.
|
|
4
3
|
*
|
|
5
|
-
* Discriminated on `type` with values matching
|
|
4
|
+
* Discriminated on `type` with values matching platform filter type names.
|
|
6
5
|
*/
|
|
7
6
|
export type ValueType = "BOOLEAN" | "CURRENT_USER" | "DATE" | "DATETIME" | "FIELD" | "NULL" | "NUMBER" | "RECORD_FIELD" | "REFERENCE" | "TEXT" | "UUID";
|
|
8
7
|
export type FilterReference = {
|
|
@@ -29,10 +28,10 @@ export type FilterReference = {
|
|
|
29
28
|
value: unknown;
|
|
30
29
|
} | {
|
|
31
30
|
type: "VARIABLE";
|
|
32
|
-
variableId: string;
|
|
33
31
|
name: string;
|
|
32
|
+
variableId?: string;
|
|
34
33
|
};
|
|
35
|
-
export type FilterValue = {
|
|
34
|
+
export type FilterValue<FieldValue = string, ReferenceValue = FilterReference> = {
|
|
36
35
|
type: "TEXT";
|
|
37
36
|
value: string;
|
|
38
37
|
} | {
|
|
@@ -52,114 +51,112 @@ export type FilterValue = {
|
|
|
52
51
|
value: string;
|
|
53
52
|
} | {
|
|
54
53
|
type: "FIELD";
|
|
55
|
-
value:
|
|
54
|
+
value: FieldValue;
|
|
55
|
+
aspect?: string;
|
|
56
56
|
treatNullAsEquals?: boolean;
|
|
57
57
|
} | {
|
|
58
58
|
type: "NULL";
|
|
59
59
|
} | {
|
|
60
60
|
type: "CURRENT_USER";
|
|
61
|
+
valueType?: "ID" | "EMAIL" | "DOMAIN";
|
|
62
|
+
} | {
|
|
63
|
+
type: "RECORD_FIELD";
|
|
64
|
+
field: string;
|
|
65
|
+
aspect: string;
|
|
66
|
+
sourceFieldType: string;
|
|
67
|
+
dynamicField?: string;
|
|
68
|
+
dynamicFieldAspect?: string;
|
|
69
|
+
required?: boolean;
|
|
61
70
|
} | {
|
|
62
71
|
type: "REFERENCE";
|
|
63
72
|
realType: ValueType;
|
|
64
|
-
value:
|
|
73
|
+
value: ReferenceValue;
|
|
74
|
+
label?: string;
|
|
75
|
+
multiple?: boolean;
|
|
65
76
|
};
|
|
66
|
-
export type LikeMode = "
|
|
67
|
-
export
|
|
77
|
+
export type LikeMode = "STARTS_WITH" | "ENDS_WITH" | "CONTAINS" | "LEGACY";
|
|
78
|
+
export type DateTimeUnit = "SECOND" | "MINUTE" | "HOUR" | "DAY" | "WEEK" | "MONTH" | "QUARTER" | "YEAR";
|
|
79
|
+
/** Properties shared by every platform field filter. */
|
|
80
|
+
export interface FieldFilterOptions<Field = string, ReferenceValue = FilterReference> {
|
|
81
|
+
field?: Field;
|
|
82
|
+
leftValue?: FilterValue<Field, ReferenceValue>;
|
|
83
|
+
aspect?: Field;
|
|
84
|
+
semantic?: boolean;
|
|
85
|
+
}
|
|
86
|
+
export interface EqualsFilter<Field = string, ReferenceValue = FilterReference> extends FieldFilterOptions<Field, ReferenceValue> {
|
|
68
87
|
type: "EQUALS";
|
|
69
|
-
|
|
70
|
-
leftValue?: FilterValue;
|
|
71
|
-
value: FilterValue;
|
|
88
|
+
value: FilterValue<Field, ReferenceValue>;
|
|
72
89
|
not?: boolean;
|
|
73
90
|
}
|
|
74
|
-
export interface GreaterThanFilter {
|
|
91
|
+
export interface GreaterThanFilter<Field = string, ReferenceValue = FilterReference> extends FieldFilterOptions<Field, ReferenceValue> {
|
|
75
92
|
type: "GREATER_THAN";
|
|
76
|
-
|
|
77
|
-
leftValue?: FilterValue;
|
|
78
|
-
value: FilterValue;
|
|
93
|
+
value: FilterValue<Field, ReferenceValue>;
|
|
79
94
|
}
|
|
80
|
-
export interface GreaterThanEqualsFilter {
|
|
95
|
+
export interface GreaterThanEqualsFilter<Field = string, ReferenceValue = FilterReference> extends FieldFilterOptions<Field, ReferenceValue> {
|
|
81
96
|
type: "GREATER_THAN_EQUALS";
|
|
82
|
-
|
|
83
|
-
leftValue?: FilterValue;
|
|
84
|
-
value: FilterValue;
|
|
97
|
+
value: FilterValue<Field, ReferenceValue>;
|
|
85
98
|
}
|
|
86
|
-
export interface LessThanFilter {
|
|
99
|
+
export interface LessThanFilter<Field = string, ReferenceValue = FilterReference> extends FieldFilterOptions<Field, ReferenceValue> {
|
|
87
100
|
type: "LESS_THAN";
|
|
88
|
-
|
|
89
|
-
leftValue?: FilterValue;
|
|
90
|
-
value: FilterValue;
|
|
101
|
+
value: FilterValue<Field, ReferenceValue>;
|
|
91
102
|
}
|
|
92
|
-
export interface LessThanEqualsFilter {
|
|
103
|
+
export interface LessThanEqualsFilter<Field = string, ReferenceValue = FilterReference> extends FieldFilterOptions<Field, ReferenceValue> {
|
|
93
104
|
type: "LESS_THAN_EQUALS";
|
|
94
|
-
|
|
95
|
-
leftValue?: FilterValue;
|
|
96
|
-
value: FilterValue;
|
|
105
|
+
value: FilterValue<Field, ReferenceValue>;
|
|
97
106
|
}
|
|
98
|
-
export interface LikeFilter {
|
|
107
|
+
export interface LikeFilter<Field = string, ReferenceValue = FilterReference> extends FieldFilterOptions<Field, ReferenceValue> {
|
|
99
108
|
type: "LIKE";
|
|
100
|
-
|
|
101
|
-
leftValue?: FilterValue;
|
|
102
|
-
value: FilterValue;
|
|
109
|
+
value: FilterValue<Field, ReferenceValue>;
|
|
103
110
|
not?: boolean;
|
|
104
111
|
caseInsensitive?: boolean;
|
|
105
112
|
mode?: LikeMode;
|
|
106
113
|
}
|
|
107
|
-
export interface InFilter {
|
|
114
|
+
export interface InFilter<Field = string, ReferenceValue = FilterReference> extends FieldFilterOptions<Field, ReferenceValue> {
|
|
108
115
|
type: "IN";
|
|
109
|
-
|
|
110
|
-
leftValue?: FilterValue;
|
|
111
|
-
values: FilterValue[];
|
|
116
|
+
values: FilterValue<Field, ReferenceValue>[];
|
|
112
117
|
not?: boolean;
|
|
113
118
|
}
|
|
114
|
-
export interface BetweenFilter {
|
|
119
|
+
export interface BetweenFilter<Field = string, ReferenceValue = FilterReference> extends FieldFilterOptions<Field, ReferenceValue> {
|
|
115
120
|
type: "BETWEEN";
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
values: [FilterValue, FilterValue];
|
|
121
|
+
min: FilterValue<Field, ReferenceValue>;
|
|
122
|
+
max: FilterValue<Field, ReferenceValue>;
|
|
119
123
|
not?: boolean;
|
|
120
124
|
}
|
|
121
|
-
/**
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
export interface ConsecutiveRangeFilter {
|
|
125
|
+
/** Field falls within a relative range described by the provider HCL schema. */
|
|
126
|
+
export interface CurrentRangeFilter<Field = string, ReferenceValue = FilterReference> extends FieldFilterOptions<Field, ReferenceValue> {
|
|
127
|
+
type: "CURRENT_RANGE";
|
|
128
|
+
unit: DateTimeUnit;
|
|
129
|
+
isoWeek?: boolean;
|
|
130
|
+
}
|
|
131
|
+
/** Field falls within consecutive relative ranges described by the provider HCL schema. */
|
|
132
|
+
export interface ConsecutiveRangeFilter<Field = string, ReferenceValue = FilterReference> extends FieldFilterOptions<Field, ReferenceValue> {
|
|
130
133
|
type: "CONSECUTIVE_RANGE";
|
|
131
|
-
|
|
132
|
-
leftValue?: FilterValue;
|
|
133
|
-
unit: string;
|
|
134
|
+
unit: DateTimeUnit;
|
|
134
135
|
count: number;
|
|
135
136
|
offset: number;
|
|
136
|
-
|
|
137
|
+
isoWeek?: boolean;
|
|
137
138
|
}
|
|
138
|
-
export interface ContainsFilter {
|
|
139
|
+
export interface ContainsFilter<Field = string, ReferenceValue = FilterReference> extends FieldFilterOptions<Field, ReferenceValue> {
|
|
139
140
|
type: "CONTAINS";
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
values: FilterValue[];
|
|
141
|
+
values: FilterValue<Field, ReferenceValue>[];
|
|
142
|
+
not?: boolean;
|
|
143
143
|
}
|
|
144
|
-
export interface OverlapsFilter {
|
|
144
|
+
export interface OverlapsFilter<Field = string, ReferenceValue = FilterReference> extends FieldFilterOptions<Field, ReferenceValue> {
|
|
145
145
|
type: "OVERLAPS";
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
values: FilterValue[];
|
|
146
|
+
values: FilterValue<Field, ReferenceValue>[];
|
|
147
|
+
not?: boolean;
|
|
149
148
|
}
|
|
150
|
-
export interface IsNullFilter {
|
|
149
|
+
export interface IsNullFilter<Field = string, ReferenceValue = FilterReference> extends FieldFilterOptions<Field, ReferenceValue> {
|
|
151
150
|
type: "IS_NULL";
|
|
152
|
-
field?: string;
|
|
153
|
-
leftValue?: FilterValue;
|
|
154
151
|
not?: boolean;
|
|
155
152
|
}
|
|
156
|
-
export interface AndFilter {
|
|
153
|
+
export interface AndFilter<Field = string, ReferenceValue = FilterReference> {
|
|
157
154
|
type: "AND";
|
|
158
|
-
children:
|
|
155
|
+
children: readonly Filter<Field, ReferenceValue>[];
|
|
159
156
|
}
|
|
160
|
-
export interface OrFilter {
|
|
157
|
+
export interface OrFilter<Field = string, ReferenceValue = FilterReference> {
|
|
161
158
|
type: "OR";
|
|
162
|
-
children:
|
|
159
|
+
children: readonly Filter<Field, ReferenceValue>[];
|
|
163
160
|
}
|
|
164
161
|
export interface TrueFilter {
|
|
165
162
|
type: "TRUE";
|
|
@@ -167,4 +164,4 @@ export interface TrueFilter {
|
|
|
167
164
|
export interface FalseFilter {
|
|
168
165
|
type: "FALSE";
|
|
169
166
|
}
|
|
170
|
-
export type
|
|
167
|
+
export type Filter<Field = unknown, ReferenceValue = unknown> = EqualsFilter<Field, ReferenceValue> | GreaterThanFilter<Field, ReferenceValue> | GreaterThanEqualsFilter<Field, ReferenceValue> | LessThanFilter<Field, ReferenceValue> | LessThanEqualsFilter<Field, ReferenceValue> | LikeFilter<Field, ReferenceValue> | InFilter<Field, ReferenceValue> | BetweenFilter<Field, ReferenceValue> | CurrentRangeFilter<Field, ReferenceValue> | ConsecutiveRangeFilter<Field, ReferenceValue> | ContainsFilter<Field, ReferenceValue> | OverlapsFilter<Field, ReferenceValue> | IsNullFilter<Field, ReferenceValue> | AndFilter<Field, ReferenceValue> | OrFilter<Field, ReferenceValue> | TrueFilter | FalseFilter;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Filter types
|
|
3
|
-
* jarvis/util/.../filter/*.java
|
|
2
|
+
* Filter types matching the platform filter contract.
|
|
4
3
|
*
|
|
5
|
-
* Discriminated on `type` with values matching
|
|
4
|
+
* Discriminated on `type` with values matching platform filter type names.
|
|
6
5
|
*/
|
|
7
6
|
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { SkillRef } from "../../catalog/index.js";
|
|
1
|
+
import type { CatalogRef, SkillRef } from "../../catalog/index.js";
|
|
2
2
|
import type { DeployableEntity, EntityDeployOptions } from "../../engine/entity.js";
|
|
3
3
|
import type { SkillTool } from "./tools.js";
|
|
4
4
|
export interface SkillV2Options extends EntityDeployOptions {
|
|
5
5
|
readonly name: string;
|
|
6
|
-
readonly
|
|
6
|
+
readonly app: CatalogRef<"app">;
|
|
7
7
|
readonly description: string;
|
|
8
8
|
readonly instructions: string;
|
|
9
9
|
/** Skill status. Defaults to `DRAFT`. */
|
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
* omits them) with `CatalogRef` tokens at each tool's reference positions.
|
|
8
8
|
*
|
|
9
9
|
* Identity comes from the authoring file's `refName`, exactly like
|
|
10
|
-
* `defineAutomation` / `defineAgent`; the owning app
|
|
10
|
+
* `defineAutomation` / `defineAgent`; the owning app comes from the typed
|
|
11
|
+
* `app` reference.
|
|
11
12
|
*/
|
|
12
13
|
import { slimTokens } from "../../catalog/index.js";
|
|
13
14
|
/**
|
|
@@ -24,12 +25,12 @@ export function defineSkill(opts) {
|
|
|
24
25
|
}
|
|
25
26
|
return {
|
|
26
27
|
ref(refName) {
|
|
27
|
-
return { __kind: "skill", refName, name: opts.name, parent: opts.
|
|
28
|
+
return { __kind: "skill", refName, name: opts.name, parent: opts.app.refName };
|
|
28
29
|
},
|
|
29
30
|
def(refName) {
|
|
30
31
|
return {
|
|
31
32
|
kind: "skill",
|
|
32
|
-
parent: opts.
|
|
33
|
+
parent: opts.app.refName,
|
|
33
34
|
refName,
|
|
34
35
|
// Slim every embedded catalog token to its canonical form (drop barrel bags).
|
|
35
36
|
payload: slimTokens({
|
|
@@ -35,5 +35,15 @@ export interface PrintSkillV2Options {
|
|
|
35
35
|
* `catalog.<refName>` instead of the literal stub.
|
|
36
36
|
*/
|
|
37
37
|
readonly foreignElementRefNames?: ReadonlyMap<string, string>;
|
|
38
|
+
/** Raw foreign field id → typed catalog field identity, supplied by recursive pull. */
|
|
39
|
+
readonly foreignFieldRefsById?: ReadonlyMap<string, {
|
|
40
|
+
readonly ownerRefName: string;
|
|
41
|
+
readonly fieldKey: string;
|
|
42
|
+
}>;
|
|
43
|
+
/** Aspect/table display-name pair → typed search-table identity. */
|
|
44
|
+
readonly foreignSearchTableRefsByName?: ReadonlyMap<string, {
|
|
45
|
+
readonly ownerRefName: string;
|
|
46
|
+
readonly tableKey: string;
|
|
47
|
+
}>;
|
|
38
48
|
}
|
|
39
49
|
export declare function printSkillV2(skill: NormalizedSkill, opts: PrintSkillV2Options): string;
|
|
@@ -16,7 +16,8 @@ import { quote } from "../../../../pull/util.js";
|
|
|
16
16
|
import { sdkPackageSpecifier } from "../../../internal/sdk-package.js";
|
|
17
17
|
const TOOL_FACTORY_BY_TYPE_KEY = {
|
|
18
18
|
createRecord: "skillCreateRecord",
|
|
19
|
-
searchAspect: "
|
|
19
|
+
searchAspect: "skillSearchRecords",
|
|
20
|
+
searchTable: "skillSearchTable",
|
|
20
21
|
updateRecord: "skillUpdateRecord",
|
|
21
22
|
runAgent: "skillRunAgent",
|
|
22
23
|
automation: "skillAutomation",
|
|
@@ -27,24 +28,28 @@ function safeMember(name) {
|
|
|
27
28
|
function safeKey(name) {
|
|
28
29
|
return /^[A-Za-z_$][A-Za-z0-9_$]*$/.test(name) ? name : quote(name);
|
|
29
30
|
}
|
|
30
|
-
function
|
|
31
|
-
|
|
31
|
+
function searchTableLookupKey(aspectName, tableName) {
|
|
32
|
+
return JSON.stringify([aspectName, tableName]);
|
|
33
|
+
}
|
|
34
|
+
function printRunAs(runAs, appRefName) {
|
|
35
|
+
if ("currentUser" in runAs)
|
|
32
36
|
return "{ currentUser: true }";
|
|
33
|
-
if (
|
|
37
|
+
if ("publisher" in runAs)
|
|
34
38
|
return "{ publisher: true }";
|
|
35
|
-
|
|
36
|
-
return `{ serviceAccount: { serviceAccount: ${quote(String(serviceAccount?.serviceAccount ?? ""))} } }`;
|
|
39
|
+
return `{ serviceAccount: serviceAccountRef({ app: catalog.${appRefName}, name: ${quote(runAs.serviceAccount.name)} }) }`;
|
|
37
40
|
}
|
|
38
41
|
export function printSkillV2(skill, opts) {
|
|
39
42
|
const { appRefName } = opts;
|
|
40
43
|
const crossOrg = opts.crossOrg === true;
|
|
41
|
-
const factories = [
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
const factories = [
|
|
45
|
+
...new Set([
|
|
46
|
+
...skill.tools.map((t) => TOOL_FACTORY_BY_TYPE_KEY[t.typeKey]).filter(Boolean),
|
|
47
|
+
...(skill.tools.some((t) => t.runAs !== undefined && "serviceAccount" in t.runAs)
|
|
48
|
+
? ["serviceAccountRef"]
|
|
49
|
+
: []),
|
|
50
|
+
]),
|
|
51
|
+
].sort();
|
|
52
|
+
const usesUnsafePlatformId = skill.tools.some((tool) => tool.fields?.some((field) => field.rawFieldId !== undefined && !opts.foreignFieldRefsById?.has(field.rawFieldId)) === true);
|
|
48
53
|
const lines = [];
|
|
49
54
|
lines.push("/**");
|
|
50
55
|
lines.push(` * ${skill.name}`);
|
|
@@ -54,12 +59,13 @@ export function printSkillV2(skill, opts) {
|
|
|
54
59
|
lines.push(" */");
|
|
55
60
|
lines.push("");
|
|
56
61
|
lines.push(`import { ${[...factories, "defineSkill"].sort().join(", ")} } from ${JSON.stringify(sdkPackageSpecifier("agents/skills"))};`);
|
|
57
|
-
if (
|
|
58
|
-
lines.push(`import
|
|
62
|
+
if (usesUnsafePlatformId)
|
|
63
|
+
lines.push(`import { unsafePlatformId } from ${JSON.stringify(sdkPackageSpecifier("core"))};`);
|
|
64
|
+
lines.push(`import catalog from "@catalog";`);
|
|
59
65
|
lines.push("");
|
|
60
66
|
lines.push(`const ${skill.refName} = defineSkill({`);
|
|
61
67
|
lines.push(` name: ${quote(skill.name)},`);
|
|
62
|
-
lines.push(`
|
|
68
|
+
lines.push(` app: catalog.${appRefName},`);
|
|
63
69
|
lines.push(` description: ${quote(skill.description)},`);
|
|
64
70
|
lines.push(` instructions: ${quote(skill.instructions)},`);
|
|
65
71
|
if (skill.status !== undefined)
|
|
@@ -70,7 +76,7 @@ export function printSkillV2(skill, opts) {
|
|
|
70
76
|
if (skill.tools.length > 0) {
|
|
71
77
|
lines.push(" tools: [");
|
|
72
78
|
for (const tool of skill.tools) {
|
|
73
|
-
lines.push(...printTool(tool, appRefName, crossOrg, opts.foreignAppRefNames, opts.foreignElementRefNames).map((l) => ` ${l}`));
|
|
79
|
+
lines.push(...printTool(tool, appRefName, crossOrg, opts.foreignAppRefNames, opts.foreignElementRefNames, opts.foreignFieldRefsById, opts.foreignSearchTableRefsByName).map((l) => ` ${l}`));
|
|
74
80
|
}
|
|
75
81
|
lines.push(" ],");
|
|
76
82
|
}
|
|
@@ -94,9 +100,16 @@ function fieldOwnerRef(tool, appRefName, foreignAppRefNames, foreignElementRefNa
|
|
|
94
100
|
? { kind: "catalog", expr: `catalog.${foreignRefName}` }
|
|
95
101
|
: { kind: "raw", entityType: entityKind, name: tool.target.name };
|
|
96
102
|
}
|
|
97
|
-
function printTool(tool, appRefName, crossOrg, foreignAppRefNames, foreignElementRefNames) {
|
|
98
|
-
const factory = TOOL_FACTORY_BY_TYPE_KEY[tool.typeKey] ?? "
|
|
103
|
+
function printTool(tool, appRefName, crossOrg, foreignAppRefNames, foreignElementRefNames, foreignFieldRefsById, foreignSearchTableRefsByName) {
|
|
104
|
+
const factory = TOOL_FACTORY_BY_TYPE_KEY[tool.typeKey] ?? "skillSearchRecords";
|
|
99
105
|
const lines = [`${factory}({`];
|
|
106
|
+
const targetRefName = tool.target?.kind === "self"
|
|
107
|
+
? appRefName
|
|
108
|
+
: tool.target?.kind === "foreignElement"
|
|
109
|
+
? foreignElementRefNames?.get(tool.target.name)
|
|
110
|
+
: tool.target?.kind === "foreignApp"
|
|
111
|
+
? foreignAppRefNames?.get(tool.target.name)
|
|
112
|
+
: undefined;
|
|
100
113
|
lines.push(` name: ${quote(tool.name)},`);
|
|
101
114
|
lines.push(` description: ${quote(tool.description)},`);
|
|
102
115
|
if (tool.status !== undefined)
|
|
@@ -104,7 +117,7 @@ function printTool(tool, appRefName, crossOrg, foreignAppRefNames, foreignElemen
|
|
|
104
117
|
if (tool.startMessage !== undefined)
|
|
105
118
|
lines.push(` startMessage: ${quote(tool.startMessage)},`);
|
|
106
119
|
if (tool.runAs !== undefined)
|
|
107
|
-
lines.push(` runAs: ${printRunAs(tool.runAs)},`);
|
|
120
|
+
lines.push(` runAs: ${printRunAs(tool.runAs, appRefName)},`);
|
|
108
121
|
if (tool.typeKey === "runAgent") {
|
|
109
122
|
lines.push(` agent: catalog.${appRefName}.agents${safeMember(tool.targetAgentKey ?? "")},`);
|
|
110
123
|
lines.push(` workerTaskPrompt: ${quote(tool.workerTaskPrompt ?? "")},`);
|
|
@@ -141,7 +154,13 @@ function printTool(tool, appRefName, crossOrg, foreignAppRefNames, foreignElemen
|
|
|
141
154
|
return lines;
|
|
142
155
|
}
|
|
143
156
|
if (tool.target?.kind === "self") {
|
|
144
|
-
|
|
157
|
+
// A search-table tool targets the ELEMENT that owns the table, so a "self"
|
|
158
|
+
// target means the owning aspect IS that element — emit `element:`, not
|
|
159
|
+
// `app:`. (A foreignApp target on a searchTable tool is malformed input:
|
|
160
|
+
// apps never own search tables. It keeps printing `app:` below so tsc
|
|
161
|
+
// rejects the emitted source loudly instead of mislabelling an app as an
|
|
162
|
+
// element.)
|
|
163
|
+
lines.push(` ${tool.typeKey === "searchTable" ? "element" : "app"}: catalog.${appRefName},`);
|
|
145
164
|
}
|
|
146
165
|
else if (tool.target !== undefined) {
|
|
147
166
|
// Board issue #42: the target can be a foreign APP or a foreign
|
|
@@ -153,7 +172,7 @@ function printTool(tool, appRefName, crossOrg, foreignAppRefNames, foreignElemen
|
|
|
153
172
|
if (foreignRefName !== undefined) {
|
|
154
173
|
// The dependency is already pulled into this workspace (board issue
|
|
155
174
|
// #40) — a typed token, not a stub.
|
|
156
|
-
lines.push(`
|
|
175
|
+
lines.push(` ${entityKind}: catalog.${foreignRefName},`);
|
|
157
176
|
}
|
|
158
177
|
else {
|
|
159
178
|
// The foreign app/element's catalog may not exist in this workspace —
|
|
@@ -163,7 +182,7 @@ function printTool(tool, appRefName, crossOrg, foreignAppRefNames, foreignElemen
|
|
|
163
182
|
const todo = crossOrg
|
|
164
183
|
? ` // TODO: cross-org clone — "${tool.target.name}" was resolved in the SOURCE org; verify it exists (with this name) in the destination org`
|
|
165
184
|
: "";
|
|
166
|
-
lines.push(`
|
|
185
|
+
lines.push(` ${entityKind}: { __kind: ${quote(entityKind)}, refName: ${quote(tool.target.name)}, name: ${quote(tool.target.name)} },${todo}`);
|
|
167
186
|
}
|
|
168
187
|
}
|
|
169
188
|
if (tool.typeKey === "searchAspect") {
|
|
@@ -171,6 +190,26 @@ function printTool(tool, appRefName, crossOrg, foreignAppRefNames, foreignElemen
|
|
|
171
190
|
if (tool.limit !== undefined)
|
|
172
191
|
lines.push(` limit: ${tool.limit},`);
|
|
173
192
|
}
|
|
193
|
+
if (tool.typeKey === "searchTable") {
|
|
194
|
+
if (tool.searchTableKey !== undefined) {
|
|
195
|
+
lines.push(` table: catalog.${targetRefName ?? appRefName}.searchTables${safeMember(tool.searchTableKey)},`);
|
|
196
|
+
}
|
|
197
|
+
else {
|
|
198
|
+
const parent = tool.target?.kind === "self" ? appRefName : tool.target?.name ?? "";
|
|
199
|
+
const typedTable = tool.searchTableName === undefined
|
|
200
|
+
? undefined
|
|
201
|
+
: foreignSearchTableRefsByName?.get(searchTableLookupKey(parent, tool.searchTableName));
|
|
202
|
+
if (typedTable !== undefined) {
|
|
203
|
+
lines.push(` table: catalog.${typedTable.ownerRefName}.searchTables${safeMember(typedTable.tableKey)},`);
|
|
204
|
+
}
|
|
205
|
+
else {
|
|
206
|
+
lines.push(` table: { __kind: "searchTable", refName: ${quote(tool.searchTableName ?? "")}, name: ${quote(tool.searchTableName ?? "")}, parent: ${quote(parent)} },`);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
lines.push(` queryDescription: ${quote(tool.queryDescription ?? "")},`);
|
|
210
|
+
if (tool.limit !== undefined)
|
|
211
|
+
lines.push(` limit: ${tool.limit},`);
|
|
212
|
+
}
|
|
174
213
|
if (tool.typeKey === "updateRecord") {
|
|
175
214
|
lines.push(` handleDescription: ${quote(tool.handleDescription ?? "")},`);
|
|
176
215
|
}
|
|
@@ -182,18 +221,21 @@ function printTool(tool, appRefName, crossOrg, foreignAppRefNames, foreignElemen
|
|
|
182
221
|
// reference — it falls back to a bare platform id (board issue #169);
|
|
183
222
|
// print the raw-id shape (SkillSearchRawIdField/SkillRecordRawIdField)
|
|
184
223
|
// instead of a catalog token.
|
|
185
|
-
const
|
|
224
|
+
const resolvedRaw = f.rawFieldId === undefined ? undefined : foreignFieldRefsById?.get(f.rawFieldId);
|
|
225
|
+
const isRaw = f.key === undefined && resolvedRaw === undefined;
|
|
186
226
|
// A field always belongs to the tool's TARGET, not necessarily the
|
|
187
227
|
// owning app — `owner` (self/foreign-resolved/foreign-unresolved)
|
|
188
228
|
// mirrors the `aspect:` resolution above.
|
|
189
229
|
const parts = isRaw
|
|
190
|
-
? [`fieldId: ${quote(f.rawFieldId ?? "")}`]
|
|
191
|
-
:
|
|
192
|
-
? [`field:
|
|
193
|
-
:
|
|
194
|
-
`field:
|
|
195
|
-
|
|
196
|
-
|
|
230
|
+
? [`fieldId: unsafePlatformId(${quote(f.rawFieldId ?? "")})`]
|
|
231
|
+
: resolvedRaw !== undefined
|
|
232
|
+
? [`field: catalog.${resolvedRaw.ownerRefName}.fields.${resolvedRaw.fieldKey}`]
|
|
233
|
+
: owner.kind === "catalog"
|
|
234
|
+
? [`field: ${owner.expr}.fields.${f.key}`]
|
|
235
|
+
: [
|
|
236
|
+
`field: { __kind: "field", refName: ${quote(f.key)}, name: ${quote(f.name ?? f.key)}, fieldType: "TEXT", ` +
|
|
237
|
+
`parent: ${quote(owner.name)}, parentKind: ${quote(owner.entityType)}, parentName: ${quote(owner.name)} }`,
|
|
238
|
+
];
|
|
197
239
|
parts.push(`name: ${quote(f.name ?? "")}`);
|
|
198
240
|
parts.push(`description: ${quote(f.description ?? "")}`);
|
|
199
241
|
if ((tool.typeKey === "createRecord" || tool.typeKey === "updateRecord") && f.required !== undefined) {
|
|
@@ -201,7 +243,7 @@ function printTool(tool, appRefName, crossOrg, foreignAppRefNames, foreignElemen
|
|
|
201
243
|
}
|
|
202
244
|
const todo = isRaw
|
|
203
245
|
? " // TODO: raw platform field id - the field belongs to a foreign/out-of-scope aspect ei can't resolve to a reference"
|
|
204
|
-
: owner.kind === "raw"
|
|
246
|
+
: owner.kind === "raw" && resolvedRaw === undefined
|
|
205
247
|
? ` // TODO: foreign field — type unconfirmed (ei's elementum_field data source doesn't expose it) and refName is a best-effort guess; verify against "${owner.name}"`
|
|
206
248
|
: "";
|
|
207
249
|
lines.push(` { ${parts.join(", ")} },${todo}`);
|
|
@@ -4,4 +4,5 @@
|
|
|
4
4
|
* reference position. Standalone from v1.
|
|
5
5
|
*/
|
|
6
6
|
export { defineSkill, type SkillConfigured, type SkillV2Options } from "./build.js";
|
|
7
|
-
export {
|
|
7
|
+
export { serviceAccountRef, type AgentToolRunAs, type ServiceAccountRef, } from "../agent/run-as.js";
|
|
8
|
+
export { skillAutomation, skillCreateRecord, skillRunAgent, skillSearchRecords, skillSearchTable, skillUpdateRecord, type SkillRecordField, type SkillRecordFieldInput, type SkillRecordRawIdField, type SkillSearchField, type SkillSearchFieldInput, type SkillSearchRawIdField, type SkillToolStatus, type SkillTool, } from "./tools.js";
|
|
@@ -4,4 +4,5 @@
|
|
|
4
4
|
* reference position. Standalone from v1.
|
|
5
5
|
*/
|
|
6
6
|
export { defineSkill } from "./build.js";
|
|
7
|
-
export {
|
|
7
|
+
export { serviceAccountRef, } from "../agent/run-as.js";
|
|
8
|
+
export { skillAutomation, skillCreateRecord, skillRunAgent, skillSearchRecords, skillSearchTable, skillUpdateRecord, } from "./tools.js";
|
|
@@ -88,6 +88,10 @@ export const skillModule = {
|
|
|
88
88
|
...(opts.crossOrg !== undefined && { crossOrg: opts.crossOrg }),
|
|
89
89
|
...(opts.foreignAppRefNames !== undefined && { foreignAppRefNames: opts.foreignAppRefNames }),
|
|
90
90
|
...(opts.foreignElementRefNames !== undefined && { foreignElementRefNames: opts.foreignElementRefNames }),
|
|
91
|
+
...(opts.foreignFieldRefsById !== undefined && { foreignFieldRefsById: opts.foreignFieldRefsById }),
|
|
92
|
+
...(opts.foreignSearchTableRefsByName !== undefined && {
|
|
93
|
+
foreignSearchTableRefsByName: opts.foreignSearchTableRefsByName,
|
|
94
|
+
}),
|
|
91
95
|
}),
|
|
92
96
|
};
|
|
93
97
|
},
|
|
@@ -95,6 +99,8 @@ export const skillModule = {
|
|
|
95
99
|
appRefName: ctx.appRefName,
|
|
96
100
|
appTfLabel: ctx.appTfLabel,
|
|
97
101
|
orgRefs: ctx.orgRefs,
|
|
102
|
+
workspaceAspects: ctx.workspaceAspects,
|
|
103
|
+
serviceAccounts: ctx.streamRootEntity?.payload?.serviceAccounts,
|
|
98
104
|
diagnostics: ctx.diagnostics,
|
|
99
105
|
...(ctx.siblingEntities !== undefined && { siblingEntities: ctx.siblingEntities }),
|
|
100
106
|
}),
|
|
@@ -13,14 +13,18 @@
|
|
|
13
13
|
* *_keywords, routing_priority) and access policy (user_ids/group_ids)
|
|
14
14
|
* aren't authored yet, so there's nothing to emit for them.
|
|
15
15
|
*/
|
|
16
|
-
import type { OrgRefLookup } from "../../engine/build/context.js";
|
|
16
|
+
import type { OrgRefLookup, WorkspaceAspect } from "../../engine/build/context.js";
|
|
17
17
|
import { type DeployableEntity } from "../../engine/entity.js";
|
|
18
18
|
import { type TfBlock } from "../../engine/tf/index.js";
|
|
19
|
+
import type { AppServiceAccount } from "../service-account/build.js";
|
|
19
20
|
export interface SkillToTfContext {
|
|
20
21
|
/** The owning app's refName (self-target detection) and tfLabel (namespace). */
|
|
21
22
|
readonly appRefName: string;
|
|
22
23
|
readonly appTfLabel: string;
|
|
23
24
|
readonly orgRefs: OrgRefLookup;
|
|
25
|
+
readonly workspaceAspects?: ReadonlyMap<string, WorkspaceAspect>;
|
|
26
|
+
/** Inline service accounts authored on the owning app, keyed by their stable bag key. */
|
|
27
|
+
readonly serviceAccounts?: Readonly<Record<string, AppServiceAccount>>;
|
|
24
28
|
/** Degradations land here — reported by the caller, never silent. */
|
|
25
29
|
readonly diagnostics: string[];
|
|
26
30
|
/**
|
|
@@ -17,7 +17,23 @@ import { EntityTfError } from "../../engine/entity.js";
|
|
|
17
17
|
import { appScopedResourceLabel, expr, sanitizeName, tsLabelToTfLabel } from "../../engine/tf/index.js";
|
|
18
18
|
import { skillToolToTf } from "../skill-tool/to-tf.js";
|
|
19
19
|
import { APP_RESOURCE_TYPE } from "../app/module.js";
|
|
20
|
+
import { SERVICE_ACCOUNT_RESOURCE_TYPE } from "../service-account/module.js";
|
|
20
21
|
import { SKILL_RESOURCE_TYPE } from "./module.js";
|
|
22
|
+
function serviceAccountValue(name, ctx) {
|
|
23
|
+
const matches = Object.entries(ctx.serviceAccounts ?? {}).filter(([, account]) => `${account.firstName} ${account.lastName}`.trim() === name);
|
|
24
|
+
if (matches.length > 1) {
|
|
25
|
+
throw new EntityTfError(`service account name ${JSON.stringify(name)} is ambiguous in app ${JSON.stringify(ctx.appRefName)}`);
|
|
26
|
+
}
|
|
27
|
+
const local = matches[0];
|
|
28
|
+
if (local !== undefined) {
|
|
29
|
+
return expr.resourceAttr(SERVICE_ACCOUNT_RESOURCE_TYPE, appScopedResourceLabel(ctx.appTfLabel, tsLabelToTfLabel(local[0])), ["id"]);
|
|
30
|
+
}
|
|
31
|
+
const label = appScopedResourceLabel(ctx.appTfLabel, sanitizeName(name));
|
|
32
|
+
ctx.orgRefs.rawLookup(SERVICE_ACCOUNT_RESOURCE_TYPE, label, name, {
|
|
33
|
+
app_id: expr.resourceAttr(APP_RESOURCE_TYPE, ctx.appTfLabel, ["id"]),
|
|
34
|
+
});
|
|
35
|
+
return expr.dataAttr(SERVICE_ACCOUNT_RESOURCE_TYPE, label, ["id"]);
|
|
36
|
+
}
|
|
21
37
|
function toSortableSkills(entities) {
|
|
22
38
|
const out = [];
|
|
23
39
|
for (const entity of entities) {
|
|
@@ -110,6 +126,8 @@ export function skillToTf(entity, ctx) {
|
|
|
110
126
|
foreignAppRef: (l, n) => ctx.orgRefs.foreignApp(l, n),
|
|
111
127
|
foreignElementRef: (l, n) => ctx.orgRefs.foreignElement(l, n),
|
|
112
128
|
foreignFieldRef: (t, l, o, n) => ctx.orgRefs.foreignField(t, l, o, n),
|
|
129
|
+
workspaceAspects: ctx.workspaceAspects,
|
|
130
|
+
serviceAccountRef: (_label, serviceAccountName) => serviceAccountValue(serviceAccountName, ctx),
|
|
113
131
|
diagnostics: ctx.diagnostics,
|
|
114
132
|
});
|
|
115
133
|
if (tool !== undefined)
|