@oomol-lab/open-flow 0.1.0-beta.73 → 0.1.0-beta.74
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/LICENSE +36 -0
- package/NOTICE +7 -0
- package/README.md +40 -0
- package/dist/browser/{createResourceDialog-BWJkjiOO.js → createResourceDialog-DI9pL-Yr.js} +2 -2
- package/dist/browser/{dialog-CUy_fwx9.js → dialog-BYJGvItc.js} +54 -19
- package/dist/browser/{flowChanges-CgSnSqqP.js → flowChanges-RL-H4CjD.js} +306 -48
- package/dist/browser/{flowWorkspace-Bf7H-r0t.js → flowWorkspace-BkDsETj0.js} +20745 -20186
- package/dist/browser/preview.css +73 -3
- package/dist/browser/preview.js +21410 -20607
- package/dist/browser/{typeScriptSession-B0hC-C8y.js → typeScriptSession-CSRwWmZm.js} +1 -1
- package/dist/browser/ui.css +72 -2
- package/dist/browser/workbench.css +73 -3
- package/dist/browser/workbench.js +14 -76
- package/dist/browser/{workbenchSelect-C3e4J93X.js → workbenchSelect-BcWPWGzw.js} +1 -1
- package/dist/command/index.js +34 -34
- package/dist/common/authoring.d.ts +1 -1
- package/dist/common/authoringFields.d.ts +1 -1
- package/dist/common/authoringSchema.d.ts +28 -4
- package/dist/common/connector-proxy.d.ts +1 -1
- package/dist/common/control-api-conformance.d.ts +1 -1
- package/dist/common/control-api-conformance.js +61 -24
- package/dist/common/control-api.d.ts +4 -3
- package/dist/common/control-api.js +59 -22
- package/dist/common/control-requests.d.ts +2 -1
- package/dist/common/control-requests.js +204 -42
- package/dist/common/cron-trigger.d.ts +1 -1
- package/dist/common/decision.d.ts +1 -1
- package/dist/common/draftOperations.d.ts +1 -1
- package/dist/common/engine-contract.d.ts +3 -2
- package/dist/common/event-source-definition.d.ts +1 -1
- package/dist/common/flow-agent.d.ts +1 -1
- package/dist/{browser → common}/flow-authoring-node.d.ts +3 -3
- package/dist/{browser → common}/flow-authoring.js +75 -23
- package/dist/{browser → common}/flow-change-schema.d.ts +177 -6
- package/dist/{browser → common}/flow-change.d.ts +35 -15
- package/dist/{browser → common}/flow-change.js +77 -25
- package/dist/common/flow-connectionUsage.d.ts +1 -1
- package/dist/common/flow-encoding.d.ts +1 -1
- package/dist/common/flow-encoding.js +34 -16
- package/dist/common/flow-errorHandling.d.ts +1 -1
- package/dist/common/flow-graph.d.ts +1 -1
- package/dist/common/flow-modules.d.ts +1 -1
- package/dist/common/flow-promptTemplate.d.ts +1 -1
- package/dist/common/flow-retry.d.ts +1 -1
- package/dist/common/flow-semantics.d.ts +1 -1
- package/dist/common/flow-semantics.js +151 -32
- package/dist/common/flow-workflowFile.d.ts +1 -1
- package/dist/common/flowInspection.d.ts +3 -3
- package/dist/common/integration-trigger.d.ts +1 -1
- package/dist/common/licenses.md +118 -1
- package/dist/common/liveDetails.d.ts +1 -1
- package/dist/common/mcp.d.ts +2 -1
- package/dist/common/mcp.js +59 -22
- package/dist/common/openapi.d.ts +1 -1
- package/dist/common/poll-trigger.d.ts +1 -1
- package/dist/common/run-results.d.ts +8 -1
- package/dist/common/runtime-contract.d.ts +8 -2
- package/dist/common/runtime-contract.js +22 -5
- package/dist/common/scheduler-checkpoint.d.ts +1 -1
- package/dist/common/scheduler-dependencies.d.ts +1 -1
- package/dist/common/scheduler-node-execution.d.ts +1 -1
- package/dist/common/scheduler.d.ts +2 -2
- package/dist/common/scheduler.js +31 -12
- package/dist/common/trigger-catalog.d.ts +1 -1
- package/dist/common/trigger-config-options.d.ts +1 -1
- package/dist/common/trigger-config.d.ts +1 -1
- package/dist/common/trigger-contract.d.ts +2 -2
- package/dist/common/trigger-localization.d.ts +1 -1
- package/dist/common/webhook-response.d.ts +1 -1
- package/dist/common/webhook-trigger.d.ts +1 -1
- package/dist/common/workflow.d.ts +17 -1
- package/dist/common/workflow.js +68 -22
- package/dist/index.d.ts +6 -3
- package/package.json +7 -6
- package/src/base/common/json.ts +90 -0
- package/src/canvas/common/commands.ts +15 -0
- package/src/connector/common/actionSchema.ts +168 -0
- package/src/connector/common/proxy.ts +44 -0
- package/src/control/common/api.ts +1505 -0
- package/src/control/common/authoring.ts +912 -0
- package/src/control/common/authoringCondition.ts +110 -0
- package/src/control/common/authoringDiagnosticFields.ts +136 -0
- package/src/control/common/authoringExamples.ts +192 -0
- package/src/control/common/authoringFields.ts +53 -0
- package/src/control/common/authoringLlm.ts +70 -0
- package/src/control/common/authoringOpenApi.ts +129 -0
- package/src/control/common/authoringSchema.ts +404 -0
- package/src/control/common/authoringTools.ts +123 -0
- package/src/control/common/authoringTriggers.ts +26 -0
- package/src/control/common/checkDecoders.ts +65 -0
- package/src/control/common/conformance.ts +1989 -0
- package/src/control/common/connectorDecoders.ts +370 -0
- package/src/control/common/connectorQueries.ts +61 -0
- package/src/control/common/decoding.ts +60 -0
- package/src/control/common/draftOperations.ts +61 -0
- package/src/control/common/errors.ts +114 -0
- package/src/control/common/eventSourceSchemas.ts +13 -0
- package/src/control/common/eventSources.ts +186 -0
- package/src/control/common/flowDecoders.ts +153 -0
- package/src/control/common/flowInspection.ts +181 -0
- package/src/control/common/flowNotifications.ts +37 -0
- package/src/control/common/liveDetails.ts +124 -0
- package/src/control/common/mcp.ts +241 -0
- package/src/control/common/mcpConformance.ts +142 -0
- package/src/control/common/providerAccess.ts +28 -0
- package/src/control/common/providerIconSprite.ts +42 -0
- package/src/control/common/publicationDecoders.ts +98 -0
- package/src/control/common/random.ts +16 -0
- package/src/control/common/requests.ts +112 -0
- package/src/control/common/resultQuery.ts +8 -0
- package/src/control/common/results.ts +176 -0
- package/src/control/common/revisionDecoders.ts +52 -0
- package/src/control/common/runDecoders.ts +240 -0
- package/src/control/common/triggerCatalog.ts +89 -0
- package/src/control/common/triggerDecoders.ts +175 -0
- package/src/decision/common/decision.ts +168 -0
- package/src/event-source/common/catalog.generated.json +65 -0
- package/src/event-source/common/definition.ts +66 -0
- package/src/event-source/common/index.ts +99 -0
- package/src/execution/common/checkpoint.ts +311 -0
- package/src/execution/common/dependencies.ts +440 -0
- package/src/execution/common/engineContract.ts +80 -0
- package/src/execution/common/events.ts +328 -0
- package/src/execution/common/node-execution.ts +467 -0
- package/src/execution/common/runLifecycle.ts +250 -0
- package/src/execution/common/runtime.ts +563 -0
- package/src/execution/common/scheduler.ts +696 -0
- package/src/execution/common/wait.ts +36 -0
- package/src/flow/common/agent.ts +305 -0
- package/src/flow/common/authoring.ts +30 -0
- package/src/flow/common/change.ts +1036 -0
- package/src/flow/common/changeSchema.ts +783 -0
- package/src/flow/common/codePermissions.ts +2 -0
- package/src/flow/common/condition.ts +265 -0
- package/src/flow/common/connectionUsage.ts +131 -0
- package/src/flow/common/edgeChanges.ts +35 -0
- package/src/flow/common/encoding.ts +437 -0
- package/src/flow/common/errorHandling.ts +34 -0
- package/src/flow/common/graph.ts +892 -0
- package/src/flow/common/inputValue.ts +16 -0
- package/src/flow/common/json.ts +8 -0
- package/src/flow/common/moduleChanges.ts +31 -0
- package/src/flow/common/modules.ts +292 -0
- package/src/flow/common/nodeChanges.ts +762 -0
- package/src/flow/common/portChanges.ts +36 -0
- package/src/flow/common/promptTemplate.ts +15 -0
- package/src/flow/common/retry.ts +20 -0
- package/src/flow/common/schema.ts +162 -0
- package/src/flow/common/schemaCompare.ts +176 -0
- package/src/flow/common/schemaComparer.ts +178 -0
- package/src/flow/common/schemaKeywords.ts +53 -0
- package/src/flow/common/semantics.ts +474 -0
- package/src/flow/common/sourceField.ts +35 -0
- package/src/flow/common/triggerScheduleSchema.ts +8 -0
- package/src/flow/common/wait.ts +30 -0
- package/src/flow/common/webhookMethod.ts +7 -0
- package/src/flow/common/webhookResponse.ts +75 -0
- package/src/flow/common/workflowFile.ts +97 -0
- package/src/json-schema-subset/checker/array.ts +142 -0
- package/src/json-schema-subset/checker/cache.ts +57 -0
- package/src/json-schema-subset/checker/checker.ts +230 -0
- package/src/json-schema-subset/checker/enumAndConst.ts +113 -0
- package/src/json-schema-subset/checker/equals.ts +93 -0
- package/src/json-schema-subset/checker/numeric/checker.ts +50 -0
- package/src/json-schema-subset/checker/numeric/float.ts +121 -0
- package/src/json-schema-subset/checker/numeric/index.ts +1 -0
- package/src/json-schema-subset/checker/numeric/integer.ts +119 -0
- package/src/json-schema-subset/checker/numeric/integerNormalizer.ts +72 -0
- package/src/json-schema-subset/checker/object.ts +354 -0
- package/src/json-schema-subset/checker/range.ts +91 -0
- package/src/json-schema-subset/checker/string.ts +60 -0
- package/src/json-schema-subset/checker/tools/index.ts +3 -0
- package/src/json-schema-subset/checker/tools/mark.ts +82 -0
- package/src/json-schema-subset/checker/tools/quantum.ts +106 -0
- package/src/json-schema-subset/checker/tools/range.ts +210 -0
- package/src/json-schema-subset/checker/validator.ts +23 -0
- package/src/json-schema-subset/compiler/array.ts +163 -0
- package/src/json-schema-subset/compiler/combination.ts +109 -0
- package/src/json-schema-subset/compiler/common.ts +99 -0
- package/src/json-schema-subset/compiler/compiler.ts +188 -0
- package/src/json-schema-subset/compiler/enumAndConst.ts +75 -0
- package/src/json-schema-subset/compiler/index.ts +11 -0
- package/src/json-schema-subset/compiler/object.ts +411 -0
- package/src/json-schema-subset/compiler/primitive.ts +144 -0
- package/src/json-schema-subset/compiler/utils.ts +24 -0
- package/src/json-schema-subset/compiler/wrapper.ts +192 -0
- package/src/json-schema-subset/error.ts +55 -0
- package/src/json-schema-subset/expression/calculator.ts +442 -0
- package/src/json-schema-subset/expression/combination.ts +49 -0
- package/src/json-schema-subset/expression/expression.ts +191 -0
- package/src/json-schema-subset/expression/index.ts +25 -0
- package/src/json-schema-subset/expression/result.ts +88 -0
- package/src/json-schema-subset/expression/types.ts +36 -0
- package/src/json-schema-subset/extends/extendsContext.ts +89 -0
- package/src/json-schema-subset/extends/index.ts +2 -0
- package/src/json-schema-subset/extends/types.ts +12 -0
- package/src/json-schema-subset/global.ts +60 -0
- package/src/json-schema-subset/index.ts +8 -0
- package/src/json-schema-subset/preprocessing.ts +74 -0
- package/src/json-schema-subset/types.ts +8 -0
- package/src/json-schema-subset/utils.ts +95 -0
- package/src/localization/common/languages.ts +118 -0
- package/src/localization/common/timeZone.ts +25 -0
- package/src/openapi/common/authBindings.ts +12 -0
- package/src/openapi/common/openapi.ts +459 -0
- package/src/trigger/common/config.ts +56 -0
- package/src/trigger/common/configOptions.ts +15 -0
- package/src/trigger/common/configSchema.ts +8 -0
- package/src/trigger/common/contract.ts +132 -0
- package/src/trigger/common/cron.ts +151 -0
- package/src/trigger/common/integration.ts +498 -0
- package/src/trigger/common/poll.ts +187 -0
- package/src/trigger/common/webhook.ts +412 -0
- package/src/trigger/providers/airtable/locales/fr.json +18 -0
- package/src/trigger/providers/airtable/locales/ja.json +18 -0
- package/src/trigger/providers/airtable/locales/ko.json +18 -0
- package/src/trigger/providers/airtable/locales/ru.json +18 -0
- package/src/trigger/providers/airtable/locales/zh-CN.json +18 -0
- package/src/trigger/providers/airtable/locales/zh-TW.json +18 -0
- package/src/trigger/providers/asana/locales/fr.json +15 -0
- package/src/trigger/providers/asana/locales/ja.json +15 -0
- package/src/trigger/providers/asana/locales/ko.json +15 -0
- package/src/trigger/providers/asana/locales/ru.json +15 -0
- package/src/trigger/providers/asana/locales/zh-CN.json +15 -0
- package/src/trigger/providers/asana/locales/zh-TW.json +15 -0
- package/src/trigger/providers/calendly/locales/fr.json +16 -0
- package/src/trigger/providers/calendly/locales/ja.json +16 -0
- package/src/trigger/providers/calendly/locales/ko.json +16 -0
- package/src/trigger/providers/calendly/locales/ru.json +16 -0
- package/src/trigger/providers/calendly/locales/zh-CN.json +16 -0
- package/src/trigger/providers/calendly/locales/zh-TW.json +16 -0
- package/src/trigger/providers/catalog.generated.json +4996 -0
- package/src/trigger/providers/clickup/locales/fr.json +16 -0
- package/src/trigger/providers/clickup/locales/ja.json +16 -0
- package/src/trigger/providers/clickup/locales/ko.json +16 -0
- package/src/trigger/providers/clickup/locales/ru.json +16 -0
- package/src/trigger/providers/clickup/locales/zh-CN.json +16 -0
- package/src/trigger/providers/clickup/locales/zh-TW.json +16 -0
- package/src/trigger/providers/definitions.ts +19 -0
- package/src/trigger/providers/feishu/locales/fr.json +20 -0
- package/src/trigger/providers/feishu/locales/ja.json +20 -0
- package/src/trigger/providers/feishu/locales/ko.json +20 -0
- package/src/trigger/providers/feishu/locales/ru.json +20 -0
- package/src/trigger/providers/feishu/locales/zh-CN.json +20 -0
- package/src/trigger/providers/feishu/locales/zh-TW.json +20 -0
- package/src/trigger/providers/fieldDescriptions.ts +392 -0
- package/src/trigger/providers/fieldLabels.ts +256 -0
- package/src/trigger/providers/fireflies/locales/fr.json +17 -0
- package/src/trigger/providers/fireflies/locales/ja.json +17 -0
- package/src/trigger/providers/fireflies/locales/ko.json +17 -0
- package/src/trigger/providers/fireflies/locales/ru.json +17 -0
- package/src/trigger/providers/fireflies/locales/zh-CN.json +17 -0
- package/src/trigger/providers/fireflies/locales/zh-TW.json +17 -0
- package/src/trigger/providers/github/locales/fr.json +30 -0
- package/src/trigger/providers/github/locales/ja.json +30 -0
- package/src/trigger/providers/github/locales/ko.json +30 -0
- package/src/trigger/providers/github/locales/ru.json +30 -0
- package/src/trigger/providers/github/locales/zh-CN.json +30 -0
- package/src/trigger/providers/github/locales/zh-TW.json +30 -0
- package/src/trigger/providers/gitlab/locales/fr.json +18 -0
- package/src/trigger/providers/gitlab/locales/ja.json +18 -0
- package/src/trigger/providers/gitlab/locales/ko.json +18 -0
- package/src/trigger/providers/gitlab/locales/ru.json +18 -0
- package/src/trigger/providers/gitlab/locales/zh-CN.json +18 -0
- package/src/trigger/providers/gitlab/locales/zh-TW.json +18 -0
- package/src/trigger/providers/gmail/locales/fr.json +18 -0
- package/src/trigger/providers/gmail/locales/ja.json +18 -0
- package/src/trigger/providers/gmail/locales/ko.json +18 -0
- package/src/trigger/providers/gmail/locales/ru.json +18 -0
- package/src/trigger/providers/gmail/locales/zh-CN.json +18 -0
- package/src/trigger/providers/gmail/locales/zh-TW.json +18 -0
- package/src/trigger/providers/google-calendar/locales/fr.json +15 -0
- package/src/trigger/providers/google-calendar/locales/ja.json +15 -0
- package/src/trigger/providers/google-calendar/locales/ko.json +15 -0
- package/src/trigger/providers/google-calendar/locales/ru.json +15 -0
- package/src/trigger/providers/google-calendar/locales/zh-CN.json +15 -0
- package/src/trigger/providers/google-calendar/locales/zh-TW.json +15 -0
- package/src/trigger/providers/google-drive/locales/fr.json +48 -0
- package/src/trigger/providers/google-drive/locales/ja.json +48 -0
- package/src/trigger/providers/google-drive/locales/ko.json +48 -0
- package/src/trigger/providers/google-drive/locales/ru.json +48 -0
- package/src/trigger/providers/google-drive/locales/zh-CN.json +48 -0
- package/src/trigger/providers/google-drive/locales/zh-TW.json +48 -0
- package/src/trigger/providers/google-sheets/locales/fr.json +19 -0
- package/src/trigger/providers/google-sheets/locales/ja.json +19 -0
- package/src/trigger/providers/google-sheets/locales/ko.json +19 -0
- package/src/trigger/providers/google-sheets/locales/ru.json +19 -0
- package/src/trigger/providers/google-sheets/locales/zh-CN.json +19 -0
- package/src/trigger/providers/google-sheets/locales/zh-TW.json +19 -0
- package/src/trigger/providers/intercom/locales/fr.json +17 -0
- package/src/trigger/providers/intercom/locales/ja.json +17 -0
- package/src/trigger/providers/intercom/locales/ko.json +17 -0
- package/src/trigger/providers/intercom/locales/ru.json +17 -0
- package/src/trigger/providers/intercom/locales/zh-CN.json +17 -0
- package/src/trigger/providers/intercom/locales/zh-TW.json +17 -0
- package/src/trigger/providers/jira/locales/fr.json +17 -0
- package/src/trigger/providers/jira/locales/ja.json +17 -0
- package/src/trigger/providers/jira/locales/ko.json +17 -0
- package/src/trigger/providers/jira/locales/ru.json +17 -0
- package/src/trigger/providers/jira/locales/zh-CN.json +17 -0
- package/src/trigger/providers/jira/locales/zh-TW.json +17 -0
- package/src/trigger/providers/linear/locales/fr.json +13 -0
- package/src/trigger/providers/linear/locales/ja.json +13 -0
- package/src/trigger/providers/linear/locales/ko.json +13 -0
- package/src/trigger/providers/linear/locales/ru.json +13 -0
- package/src/trigger/providers/linear/locales/zh-CN.json +13 -0
- package/src/trigger/providers/linear/locales/zh-TW.json +13 -0
- package/src/trigger/providers/locales/fr.ts +71 -0
- package/src/trigger/providers/locales/ja.ts +71 -0
- package/src/trigger/providers/locales/ko.ts +71 -0
- package/src/trigger/providers/locales/ru.ts +71 -0
- package/src/trigger/providers/locales/zh-CN.ts +71 -0
- package/src/trigger/providers/locales/zh-TW.ts +71 -0
- package/src/trigger/providers/localization.ts +59 -0
- package/src/trigger/providers/notion/locales/fr.json +16 -0
- package/src/trigger/providers/notion/locales/ja.json +16 -0
- package/src/trigger/providers/notion/locales/ko.json +16 -0
- package/src/trigger/providers/notion/locales/ru.json +16 -0
- package/src/trigger/providers/notion/locales/zh-CN.json +16 -0
- package/src/trigger/providers/notion/locales/zh-TW.json +16 -0
- package/src/trigger/providers/one-drive/locales/fr.json +16 -0
- package/src/trigger/providers/one-drive/locales/ja.json +16 -0
- package/src/trigger/providers/one-drive/locales/ko.json +16 -0
- package/src/trigger/providers/one-drive/locales/ru.json +16 -0
- package/src/trigger/providers/one-drive/locales/zh-CN.json +16 -0
- package/src/trigger/providers/one-drive/locales/zh-TW.json +16 -0
- package/src/trigger/providers/outlook/locales/fr.json +18 -0
- package/src/trigger/providers/outlook/locales/ja.json +18 -0
- package/src/trigger/providers/outlook/locales/ko.json +18 -0
- package/src/trigger/providers/outlook/locales/ru.json +18 -0
- package/src/trigger/providers/outlook/locales/zh-CN.json +18 -0
- package/src/trigger/providers/outlook/locales/zh-TW.json +18 -0
- package/src/trigger/providers/pandadoc/locales/fr.json +12 -0
- package/src/trigger/providers/pandadoc/locales/ja.json +12 -0
- package/src/trigger/providers/pandadoc/locales/ko.json +12 -0
- package/src/trigger/providers/pandadoc/locales/ru.json +12 -0
- package/src/trigger/providers/pandadoc/locales/zh-CN.json +12 -0
- package/src/trigger/providers/pandadoc/locales/zh-TW.json +12 -0
- package/src/trigger/providers/pipedrive/locales/fr.json +15 -0
- package/src/trigger/providers/pipedrive/locales/ja.json +15 -0
- package/src/trigger/providers/pipedrive/locales/ko.json +15 -0
- package/src/trigger/providers/pipedrive/locales/ru.json +15 -0
- package/src/trigger/providers/pipedrive/locales/zh-CN.json +15 -0
- package/src/trigger/providers/pipedrive/locales/zh-TW.json +15 -0
- package/src/trigger/providers/remote.ts +163 -0
- package/src/trigger/providers/resend/locales/fr.json +16 -0
- package/src/trigger/providers/resend/locales/ja.json +16 -0
- package/src/trigger/providers/resend/locales/ko.json +16 -0
- package/src/trigger/providers/resend/locales/ru.json +16 -0
- package/src/trigger/providers/resend/locales/zh-CN.json +16 -0
- package/src/trigger/providers/resend/locales/zh-TW.json +16 -0
- package/src/trigger/providers/sentry/locales/fr.json +19 -0
- package/src/trigger/providers/sentry/locales/ja.json +19 -0
- package/src/trigger/providers/sentry/locales/ko.json +19 -0
- package/src/trigger/providers/sentry/locales/ru.json +19 -0
- package/src/trigger/providers/sentry/locales/zh-CN.json +19 -0
- package/src/trigger/providers/sentry/locales/zh-TW.json +19 -0
- package/src/trigger/providers/shopify/locales/fr.json +18 -0
- package/src/trigger/providers/shopify/locales/ja.json +18 -0
- package/src/trigger/providers/shopify/locales/ko.json +18 -0
- package/src/trigger/providers/shopify/locales/ru.json +18 -0
- package/src/trigger/providers/shopify/locales/zh-CN.json +18 -0
- package/src/trigger/providers/shopify/locales/zh-TW.json +18 -0
- package/src/trigger/providers/slack/locales/fr.json +18 -0
- package/src/trigger/providers/slack/locales/ja.json +18 -0
- package/src/trigger/providers/slack/locales/ko.json +18 -0
- package/src/trigger/providers/slack/locales/ru.json +18 -0
- package/src/trigger/providers/slack/locales/zh-CN.json +18 -0
- package/src/trigger/providers/slack/locales/zh-TW.json +18 -0
- package/src/trigger/providers/slackbot/locales/fr.json +23 -0
- package/src/trigger/providers/slackbot/locales/ja.json +23 -0
- package/src/trigger/providers/slackbot/locales/ko.json +23 -0
- package/src/trigger/providers/slackbot/locales/ru.json +23 -0
- package/src/trigger/providers/slackbot/locales/zh-CN.json +23 -0
- package/src/trigger/providers/slackbot/locales/zh-TW.json +23 -0
- package/src/trigger/providers/source-events.ts +25 -0
- package/src/trigger/providers/stripe/locales/fr.json +17 -0
- package/src/trigger/providers/stripe/locales/ja.json +17 -0
- package/src/trigger/providers/stripe/locales/ko.json +17 -0
- package/src/trigger/providers/stripe/locales/ru.json +17 -0
- package/src/trigger/providers/stripe/locales/zh-CN.json +17 -0
- package/src/trigger/providers/stripe/locales/zh-TW.json +17 -0
- package/src/trigger/providers/tally/locales/fr.json +12 -0
- package/src/trigger/providers/tally/locales/ja.json +12 -0
- package/src/trigger/providers/tally/locales/ko.json +12 -0
- package/src/trigger/providers/tally/locales/ru.json +12 -0
- package/src/trigger/providers/tally/locales/zh-CN.json +12 -0
- package/src/trigger/providers/tally/locales/zh-TW.json +12 -0
- package/src/trigger/providers/telegram/locales/fr.json +17 -0
- package/src/trigger/providers/telegram/locales/ja.json +17 -0
- package/src/trigger/providers/telegram/locales/ko.json +17 -0
- package/src/trigger/providers/telegram/locales/ru.json +17 -0
- package/src/trigger/providers/telegram/locales/zh-CN.json +17 -0
- package/src/trigger/providers/telegram/locales/zh-TW.json +17 -0
- package/src/trigger/providers/typeform/locales/fr.json +12 -0
- package/src/trigger/providers/typeform/locales/ja.json +12 -0
- package/src/trigger/providers/typeform/locales/ko.json +12 -0
- package/src/trigger/providers/typeform/locales/ru.json +12 -0
- package/src/trigger/providers/typeform/locales/zh-CN.json +12 -0
- package/src/trigger/providers/typeform/locales/zh-TW.json +12 -0
- package/src/trigger/providers/vercel/locales/fr.json +18 -0
- package/src/trigger/providers/vercel/locales/ja.json +18 -0
- package/src/trigger/providers/vercel/locales/ko.json +18 -0
- package/src/trigger/providers/vercel/locales/ru.json +18 -0
- package/src/trigger/providers/vercel/locales/zh-CN.json +18 -0
- package/src/trigger/providers/vercel/locales/zh-TW.json +18 -0
- package/src/trigger/providers/woocommerce/locales/fr.json +19 -0
- package/src/trigger/providers/woocommerce/locales/ja.json +19 -0
- package/src/trigger/providers/woocommerce/locales/ko.json +19 -0
- package/src/trigger/providers/woocommerce/locales/ru.json +19 -0
- package/src/trigger/providers/woocommerce/locales/zh-CN.json +19 -0
- package/src/trigger/providers/woocommerce/locales/zh-TW.json +19 -0
- package/src/trigger/providers/zendesk/locales/fr.json +15 -0
- package/src/trigger/providers/zendesk/locales/ja.json +15 -0
- package/src/trigger/providers/zendesk/locales/ko.json +15 -0
- package/src/trigger/providers/zendesk/locales/ru.json +15 -0
- package/src/trigger/providers/zendesk/locales/zh-CN.json +15 -0
- package/src/trigger/providers/zendesk/locales/zh-TW.json +15 -0
- package/src/trigger/providers/zoom/locales/fr.json +17 -0
- package/src/trigger/providers/zoom/locales/ja.json +17 -0
- package/src/trigger/providers/zoom/locales/ko.json +17 -0
- package/src/trigger/providers/zoom/locales/ru.json +17 -0
- package/src/trigger/providers/zoom/locales/zh-CN.json +17 -0
- package/src/trigger/providers/zoom/locales/zh-TW.json +17 -0
- package/src/types/index.ts +112 -0
- package/src/workflow/common/workflow.ts +273 -0
- package/dist/browser/lib-DrKav3HG.js +0 -11403
- /package/dist/{browser → common}/flow-authoring-edge.d.ts +0 -0
- /package/dist/{browser → common}/flow-authoring-module.d.ts +0 -0
- /package/dist/{browser → common}/flow-authoring.d.ts +0 -0
- /package/dist/{browser → common}/flow-input-value.d.ts +0 -0
- /package/dist/{browser → common}/webhook-method.d.ts +0 -0
|
@@ -12452,7 +12452,7 @@ var ports = {
|
|
|
12452
12452
|
inputs: array(union([input, group])),
|
|
12453
12453
|
outputs: array(union([port, group]))
|
|
12454
12454
|
};
|
|
12455
|
-
var
|
|
12455
|
+
var connectorCapabilitySchema = union([
|
|
12456
12456
|
strictObject({
|
|
12457
12457
|
kind: literal("connector"),
|
|
12458
12458
|
action: text$1,
|
|
@@ -12484,6 +12484,15 @@ var capability = union([
|
|
|
12484
12484
|
})).optional()
|
|
12485
12485
|
})
|
|
12486
12486
|
]);
|
|
12487
|
+
var workflowCapabilitySchema = strictObject({
|
|
12488
|
+
kind: literal("workflow"),
|
|
12489
|
+
name: text$1,
|
|
12490
|
+
flowId: text$1,
|
|
12491
|
+
revisionId: text$1,
|
|
12492
|
+
inputs: array(port),
|
|
12493
|
+
outputs: array(port).nullable()
|
|
12494
|
+
});
|
|
12495
|
+
var capability = union([connectorCapabilitySchema, workflowCapabilitySchema]);
|
|
12487
12496
|
var inline = object$1({
|
|
12488
12497
|
...ports,
|
|
12489
12498
|
name: text$1,
|
|
@@ -12498,6 +12507,20 @@ var agentValue = union([object$1({
|
|
|
12498
12507
|
input: text$1
|
|
12499
12508
|
})]);
|
|
12500
12509
|
var agentInput = union([agentValue, object$1({ kind: literal("model") })]);
|
|
12510
|
+
var agentToolFields = {
|
|
12511
|
+
id: text$1,
|
|
12512
|
+
name: text$1,
|
|
12513
|
+
description: text$1,
|
|
12514
|
+
approval: boolean(),
|
|
12515
|
+
inputs: array(input.extend({ source: agentInput }))
|
|
12516
|
+
};
|
|
12517
|
+
var connectorAgentToolSchema = object$1({
|
|
12518
|
+
...agentToolFields,
|
|
12519
|
+
kind: literal("connector").optional(),
|
|
12520
|
+
action: text$1,
|
|
12521
|
+
connectionId: actionConnection.optional()
|
|
12522
|
+
});
|
|
12523
|
+
var workflowAgentToolSchema = workflowCapabilitySchema.extend(agentToolFields);
|
|
12501
12524
|
var decisionQuestion = discriminatedUnion("type", [
|
|
12502
12525
|
strictObject({
|
|
12503
12526
|
name: text$1,
|
|
@@ -12566,15 +12589,7 @@ var managedFields = object$1({
|
|
|
12566
12589
|
model: text$1,
|
|
12567
12590
|
prompt: text$1,
|
|
12568
12591
|
maxRounds: number(),
|
|
12569
|
-
tools: array(
|
|
12570
|
-
id: text$1,
|
|
12571
|
-
name: text$1,
|
|
12572
|
-
description: text$1,
|
|
12573
|
-
action: text$1,
|
|
12574
|
-
connectionId: actionConnection.optional(),
|
|
12575
|
-
approval: boolean(),
|
|
12576
|
-
inputs: array(input.extend({ source: agentInput }))
|
|
12577
|
-
})),
|
|
12592
|
+
tools: array(union([workflowAgentToolSchema, connectorAgentToolSchema])),
|
|
12578
12593
|
notification: object$1({
|
|
12579
12594
|
action: text$1,
|
|
12580
12595
|
connectionId: actionConnection.optional(),
|
|
@@ -12855,7 +12870,8 @@ var revision = object$1({
|
|
|
12855
12870
|
literal(7),
|
|
12856
12871
|
literal(8),
|
|
12857
12872
|
literal(9),
|
|
12858
|
-
literal(10)
|
|
12873
|
+
literal(10),
|
|
12874
|
+
literal(11)
|
|
12859
12875
|
]),
|
|
12860
12876
|
document,
|
|
12861
12877
|
modules: record$3(text$1, module)
|
|
@@ -13080,6 +13096,7 @@ function changeOperationsSchema(kind) {
|
|
|
13080
13096
|
return toJSONSchema(schema, { io: "input" });
|
|
13081
13097
|
}
|
|
13082
13098
|
function checkModelVersion(content) {
|
|
13099
|
+
if (content.modelVersion < 11 && Object.values(content.document.graph.nodes).some((candidateNode) => candidateNode.kind == "task" && ("moduleId" in candidateNode.task ? candidateNode.task.capabilities?.some((item) => item.kind == "workflow") : candidateNode.task.executor.kind == "agent" && candidateNode.task.executor.tools.some((item) => item.kind == "workflow")))) throw new TypeError("Workflow tools require Flow model version 11.");
|
|
13083
13100
|
if (content.modelVersion < 10 && Object.values(content.document.graph.nodes).some((candidateNode) => candidateNode.kind == "webhook" && (candidateNode.options?.responseBody != null || candidateNode.options?.responseStatusCodeOutput != null || candidateNode.options?.responseHeadersSource != null || candidateNode.options?.responseHeaderOutputs != null))) throw new TypeError("Dynamic Webhook responses require Flow model version 10.");
|
|
13084
13101
|
if (content.modelVersion < 9 && Object.values(content.document.graph.nodes).some((candidateNode) => "retry" in candidateNode && candidateNode.retry != null)) throw new TypeError("Node retries require Flow model version 9.");
|
|
13085
13102
|
if (content.modelVersion < 9 && Object.values(content.document.graph.nodes).some((candidateNode) => {
|
|
@@ -13731,10 +13748,21 @@ var operand = union([
|
|
|
13731
13748
|
system,
|
|
13732
13749
|
variable
|
|
13733
13750
|
]);
|
|
13734
|
-
var
|
|
13751
|
+
var toolSources = record$3(id$1, agentToolFields.inputs.element.shape.source).optional().describe("Tool input sources by name. The platform resolves types from the selected Action or workflow. New inputs default to model-provided; omitted existing sources are preserved.");
|
|
13752
|
+
var agentTool = union([workflowAgentToolSchema.omit({
|
|
13753
|
+
id: true,
|
|
13754
|
+
inputs: true,
|
|
13755
|
+
outputs: true,
|
|
13756
|
+
revisionId: true
|
|
13757
|
+
}).extend({ inputs: toolSources }).strict(), connectorAgentToolSchema.omit({
|
|
13735
13758
|
id: true,
|
|
13736
13759
|
inputs: true
|
|
13737
|
-
}).extend({ inputs:
|
|
13760
|
+
}).extend({ inputs: toolSources }).strict()]);
|
|
13761
|
+
var authoringCapabilities = array(union([connectorCapabilitySchema, strictObject({
|
|
13762
|
+
kind: literal("workflow"),
|
|
13763
|
+
name: id$1,
|
|
13764
|
+
flowId: id$1
|
|
13765
|
+
})]));
|
|
13738
13766
|
var notification = strictObject({
|
|
13739
13767
|
...authoringDefinitionSchemas.connector.shape,
|
|
13740
13768
|
messageHandle: id$1,
|
|
@@ -13790,7 +13818,7 @@ var authoringConfigurations = {
|
|
|
13790
13818
|
"code": strictObject({
|
|
13791
13819
|
inputs: inputFields,
|
|
13792
13820
|
outputs: outputFields,
|
|
13793
|
-
capabilities:
|
|
13821
|
+
capabilities: authoringCapabilities.optional()
|
|
13794
13822
|
}),
|
|
13795
13823
|
"connector": authoringDefinitionSchemas.connector.omit({ outputMode: true }).strict(),
|
|
13796
13824
|
"openapi": authoringOpenApiSchema,
|
|
@@ -13854,7 +13882,8 @@ var authoringEditSchema = discriminatedUnion("op", [
|
|
|
13854
13882
|
}),
|
|
13855
13883
|
strictObject({
|
|
13856
13884
|
op: literal("node.refresh"),
|
|
13857
|
-
node: referenceSchema
|
|
13885
|
+
node: referenceSchema,
|
|
13886
|
+
tool: id$1.optional().describe("Name of a workflow tool on an Agent or Code node. Omit for a Call Workflow node.")
|
|
13858
13887
|
}),
|
|
13859
13888
|
strictObject({
|
|
13860
13889
|
op: literal("node.remove"),
|
|
@@ -14041,7 +14070,7 @@ function authoringSchema(kind) {
|
|
|
14041
14070
|
"wait",
|
|
14042
14071
|
"approval"
|
|
14043
14072
|
].includes(kind),
|
|
14044
|
-
guidance: kind == "webhook-response" ? "Prepare an HTTP response using fixed inputs body (any JSON, default empty text), statusCode (number, default 200) and headers (scalar-valued object, default {}). Select this node in Webhook options.responseBody as {kind: \"webhook-response\", nodeId: \"node reference\", timeoutMs: 30000}. Its first completion responds immediately while the Run continues. It has no business outputs. Multiple response nodes are allowed; each Webhook selects one reachable node." : kind == "outputs" ? "Declare output fields through config.outputDefs. Set their values through node.add.inputs or input.set. Outputs is a singleton execution sink; it waits for its predecessors and produces workflow business outputs independently of node logs. No downstream edges or data references to Outputs are allowed." : kind == "webhook" ? "Use options.responseBody: {kind: \"webhook-response\", nodeId: \"node ID or $alias\", timeoutMs: 30000} to respond on the selected node’s first completion while the Run continues. Body, statusCode and headers come exclusively from that node; clear workflow-output-only status/header references when switching. Alternatively configure options.responseBody as {kind: \"workflow-outputs\", output?: \"top-level output name\", timeoutMs?: 30000} to respond after the Run succeeds. Omit output for the complete object. Connect Webhook to Outputs. Timeout is 1000–60000 ms; HTTP timeout does not cancel the Run. Strings return text; other values return JSON. Only in this mode, options.responseStatusCodeOutput can select a numeric top-level workflow output as the HTTP status, overriding the preserved fixed responseStatusCode (default 200). Its runtime value must be an integer from 200 to 599, excluding 204, 205, 304; missing or invalid values return 500. Use responseHeaders for fixed text headers. In workflow-output mode, responseHeaderOutputs maps header names to top-level output names; values can be string, number or boolean and are converted to text. Alternatively responseHeadersSource: {kind: \"workflow-outputs\", output?: \"object field\"} replaces the entire header object (omit output for all outputs), preserving but ignoring per-header settings. Missing, null, complex or invalid header values return 500 without fallback. Header restrictions and Content-Type policy still apply. Omit responseBody for immediate responseData. Clear options.responseBody, options.responseStatusCodeOutput, options.responseHeadersSource and options.responseHeaderOutputs explicitly to switch back." : kind == "start" ? "Declare workflow inputs through config.inputDefs; read them in Start node details. REST calls and manual runs supply them as trigger.outputs. Downstream nodes bind these parameters as Start outputs. Start has no input sources or defaults; non-nullable parameters are required, and omitted nullable parameters become null." : kind == "condition" ? "Edit branch operands through config.branches. A branch can test one expression, all expressions, or any alternatives. Unmatched execution uses branch otherwise." : ["poll", "integration"].includes(kind) ? "Configure static parameters with node.add.inputs or input.set. Definitions come from the selected Trigger key; execution output and variable sources are unavailable." : kind == "llm" ? "Configure model settings, message templates and history as defaults. Input bindings with the same names override these defaults; named business inputs can be bound directly. Template strings interpolate {{name}}." : kind == "openapi" ? "Select an operation; the tool resolves its ports and authentication. Read authenticationChoices from node details. authentication is replaced as a complete choice. Bind advertised credentials through inputs." : kind == "workflow" ? "Select another workflow with config.flowId. A workflow cannot call itself, including in a disconnected node. Owned unpublished or unavailable targets may be saved as incomplete drafts. Use node.refresh to load the current published interface." : "Supply business configuration and input data. Fixed definitions are assembled by the tool. Existing constraints and defaults are preserved on partial updates.",
|
|
14073
|
+
guidance: kind == "webhook-response" ? "Prepare an HTTP response using fixed inputs body (any JSON, default empty text), statusCode (number, default 200) and headers (scalar-valued object, default {}). Select this node in Webhook options.responseBody as {kind: \"webhook-response\", nodeId: \"node reference\", timeoutMs: 30000}. Its first completion responds immediately while the Run continues. It has no business outputs. Multiple response nodes are allowed; each Webhook selects one reachable node." : kind == "outputs" ? "Declare output fields through config.outputDefs. Set their values through node.add.inputs or input.set. Outputs is a singleton execution sink; it waits for its predecessors and produces workflow business outputs independently of node logs. No downstream edges or data references to Outputs are allowed." : kind == "webhook" ? "Use options.responseBody: {kind: \"webhook-response\", nodeId: \"node ID or $alias\", timeoutMs: 30000} to respond on the selected node’s first completion while the Run continues. Body, statusCode and headers come exclusively from that node; clear workflow-output-only status/header references when switching. Alternatively configure options.responseBody as {kind: \"workflow-outputs\", output?: \"top-level output name\", timeoutMs?: 30000} to respond after the Run succeeds. Omit output for the complete object. Connect Webhook to Outputs. Timeout is 1000–60000 ms; HTTP timeout does not cancel the Run. Strings return text; other values return JSON. Only in this mode, options.responseStatusCodeOutput can select a numeric top-level workflow output as the HTTP status, overriding the preserved fixed responseStatusCode (default 200). Its runtime value must be an integer from 200 to 599, excluding 204, 205, 304; missing or invalid values return 500. Use responseHeaders for fixed text headers. In workflow-output mode, responseHeaderOutputs maps header names to top-level output names; values can be string, number or boolean and are converted to text. Alternatively responseHeadersSource: {kind: \"workflow-outputs\", output?: \"object field\"} replaces the entire header object (omit output for all outputs), preserving but ignoring per-header settings. Missing, null, complex or invalid header values return 500 without fallback. Header restrictions and Content-Type policy still apply. Omit responseBody for immediate responseData. Clear options.responseBody, options.responseStatusCodeOutput, options.responseHeadersSource and options.responseHeaderOutputs explicitly to switch back." : kind == "start" ? "Declare workflow inputs through config.inputDefs; read them in Start node details. REST calls and manual runs supply them as trigger.outputs. Downstream nodes bind these parameters as Start outputs. Start has no input sources or defaults; non-nullable parameters are required, and omitted nullable parameters become null." : kind == "condition" ? "Edit branch operands through config.branches. A branch can test one expression, all expressions, or any alternatives. Unmatched execution uses branch otherwise." : ["poll", "integration"].includes(kind) ? "Configure static parameters with node.add.inputs or input.set. Definitions come from the selected Trigger key; execution output and variable sources are unavailable." : kind == "llm" ? "Configure model settings, message templates and history as defaults. Input bindings with the same names override these defaults; named business inputs can be bound directly. Template strings interpolate {{name}}." : kind == "openapi" ? "Select an operation; the tool resolves its ports and authentication. Read authenticationChoices from node details. authentication is replaced as a complete choice. Bind advertised credentials through inputs." : kind == "workflow" ? "Select another workflow with config.flowId. A workflow cannot call itself, including in a disconnected node. Owned unpublished or unavailable targets may be saved as incomplete drafts. Use node.refresh to load the current published interface." : kind == "agent" ? "Tools accept Connector Actions or {kind: \"workflow\", flowId, name, description, approval, inputs}. Workflow parameter sources use model, input or value. The platform derives the interface. Refresh a workflow tool with node.refresh and tool: its name." : kind == "code" ? "Select workflows through config.capabilities: [{kind: \"workflow\", flowId, name}]. Call context.workflows.call(name, input) and await its business output. The platform derives input/output types. Refresh a selected workflow tool with node.refresh and tool: its name. Calls obey node and Run time limits." : "Supply business configuration and input data. Fixed definitions are assembled by the tool. Existing constraints and defaults are preserved on partial updates.",
|
|
14045
14074
|
example: {
|
|
14046
14075
|
op: "node.add",
|
|
14047
14076
|
as: "step",
|
|
@@ -14337,6 +14366,24 @@ function resourceNameIssue(value) {
|
|
|
14337
14366
|
function portsByHandle(ports) {
|
|
14338
14367
|
return Object.fromEntries(ports.flatMap((port) => "handle" in port ? [[port.handle, port]] : []));
|
|
14339
14368
|
}
|
|
14369
|
+
var workflowToolNamePattern = /^[A-Za-z][A-Za-z0-9_-]{0,63}$/;
|
|
14370
|
+
function workflowToolNameIssue(name, otherNames = []) {
|
|
14371
|
+
if (!workflowToolNamePattern.test(name)) return "invalid";
|
|
14372
|
+
for (const other of otherNames) if (other == name) return "duplicate";
|
|
14373
|
+
}
|
|
14374
|
+
function decodeTaskCapabilities(value) {
|
|
14375
|
+
if (!Array.isArray(value)) throw new TypeError("Task capabilities must be an array.");
|
|
14376
|
+
const parsed = authoringDefinitionSchemas.capabilities.parse(value);
|
|
14377
|
+
const connectors = decodeConnectorCapabilities(parsed.filter((item) => item.kind == "connector"));
|
|
14378
|
+
const names = /* @__PURE__ */ new Set();
|
|
14379
|
+
for (const item of parsed) {
|
|
14380
|
+
if (item.kind != "workflow") continue;
|
|
14381
|
+
if (workflowToolNameIssue(item.name, names)) throw new TypeError("Workflow tool names must be unique provider-compatible names.");
|
|
14382
|
+
names.add(item.name);
|
|
14383
|
+
}
|
|
14384
|
+
let connectorIndex = 0;
|
|
14385
|
+
return parsed.map((item) => item.kind == "connector" ? connectors[connectorIndex++] : item);
|
|
14386
|
+
}
|
|
14340
14387
|
function decodeConnectorCapabilities(value) {
|
|
14341
14388
|
if (!Array.isArray(value)) throw new TypeError("Connector capabilities must be an array.");
|
|
14342
14389
|
if (value.length == 0) return [];
|
|
@@ -14469,10 +14516,10 @@ function upgradeRevisionContent(content) {
|
|
|
14469
14516
|
function upgradeDecodedRevisionContent(content) {
|
|
14470
14517
|
const graph = content.document.graph;
|
|
14471
14518
|
const hasManual = Object.values(graph.nodes).some((node) => node.kind == "manual");
|
|
14472
|
-
if (!hasManual && content.modelVersion ==
|
|
14519
|
+
if (!hasManual && content.modelVersion == 11) return content;
|
|
14473
14520
|
return {
|
|
14474
14521
|
...content,
|
|
14475
|
-
modelVersion:
|
|
14522
|
+
modelVersion: 11,
|
|
14476
14523
|
document: {
|
|
14477
14524
|
...content.document,
|
|
14478
14525
|
graph: hasManual ? {
|
|
@@ -14507,7 +14554,7 @@ function invalid(message) {
|
|
|
14507
14554
|
throw new FlowChangeError(message);
|
|
14508
14555
|
}
|
|
14509
14556
|
function applyFlowChanges(content, operations) {
|
|
14510
|
-
const source = content.modelVersion !=
|
|
14557
|
+
const source = content.modelVersion != 11 || Object.values(content.document.graph.nodes).some((node) => node.kind == "manual") ? decodeRevisionContent(content) : content;
|
|
14511
14558
|
const document = { ...source.document };
|
|
14512
14559
|
const modules = { ...source.modules };
|
|
14513
14560
|
for (const operation of operations) switch (operation.kind) {
|
|
@@ -14621,7 +14668,7 @@ function applyFlowChanges(content, operations) {
|
|
|
14621
14668
|
const graph = document.graph;
|
|
14622
14669
|
if (!dequal(graph.nodes[operation.nodeId], operation.before)) invalid("The Node changed before this operation was applied.");
|
|
14623
14670
|
if (operation.node.kind != operation.before.kind) invalid("Replacing a Node cannot change its kind.");
|
|
14624
|
-
if (operation.node.kind == "task" && "moduleId" in operation.node.task && operation.node.task.capabilities !== void 0)
|
|
14671
|
+
if (operation.node.kind == "task" && "moduleId" in operation.node.task && operation.node.task.capabilities !== void 0) decodeTaskCapabilities(operation.node.task.capabilities);
|
|
14625
14672
|
const name = normalizeNodeName(operation.node.name ?? "");
|
|
14626
14673
|
const issue = nodeNameIssue(graph, operation.nodeId, name);
|
|
14627
14674
|
if (issue != null) invalid(`Node name is ${issue}.`);
|
|
@@ -14643,7 +14690,7 @@ function applyFlowChanges(content, operations) {
|
|
|
14643
14690
|
if (graph.nodes[operation.nodeId] != null) invalid("A Node with this ID already exists in the target graph.");
|
|
14644
14691
|
if (operation.node.kind == "error" && Object.values(graph.nodes).some((node) => node.kind == "error")) invalid("A graph can contain only one Flow Error node.");
|
|
14645
14692
|
if ((operation.node.kind == "manual" || operation.node.kind == "start") && Object.values(graph.nodes).some((node) => node.kind == "manual" || node.kind == "start")) invalid("A graph can contain only one Start Trigger.");
|
|
14646
|
-
if (operation.node.kind == "task" && "moduleId" in operation.node.task && operation.node.task.capabilities !== void 0)
|
|
14693
|
+
if (operation.node.kind == "task" && "moduleId" in operation.node.task && operation.node.task.capabilities !== void 0) decodeTaskCapabilities(operation.node.task.capabilities);
|
|
14647
14694
|
if (operation.node.name == null) invalid("A Node name cannot be empty.");
|
|
14648
14695
|
if (operation.node.kind == "outputs" && Object.values(graph.nodes).some((node) => node.kind == "outputs")) invalid("A graph can contain only one Outputs node.");
|
|
14649
14696
|
const name = normalizeNodeName(operation.node.name);
|
|
@@ -14742,7 +14789,7 @@ function applyFlowChanges(content, operations) {
|
|
|
14742
14789
|
if (!dequal(node.task.capabilities, operation.before)) invalid("The inline Task capabilities changed before this operation was applied.");
|
|
14743
14790
|
const task = { ...node.task };
|
|
14744
14791
|
if (operation.value === void 0) delete task.capabilities;
|
|
14745
|
-
else task.capabilities =
|
|
14792
|
+
else task.capabilities = decodeTaskCapabilities(operation.value);
|
|
14746
14793
|
Object.assign(document, { graph: {
|
|
14747
14794
|
...graph,
|
|
14748
14795
|
nodes: {
|
|
@@ -14955,7 +15002,7 @@ function applyFlowChanges(content, operations) {
|
|
|
14955
15002
|
assertOpenApiAuthBindings(document);
|
|
14956
15003
|
return upgradeDecodedRevisionContent({
|
|
14957
15004
|
document,
|
|
14958
|
-
modelVersion:
|
|
15005
|
+
modelVersion: 11,
|
|
14959
15006
|
modules
|
|
14960
15007
|
});
|
|
14961
15008
|
}
|
|
@@ -15699,6 +15746,26 @@ object$1({
|
|
|
15699
15746
|
}).nullable()
|
|
15700
15747
|
}))
|
|
15701
15748
|
});
|
|
15749
|
+
function workflowCapability(name, target) {
|
|
15750
|
+
return {
|
|
15751
|
+
kind: "workflow",
|
|
15752
|
+
name,
|
|
15753
|
+
flowId: target.flowId,
|
|
15754
|
+
revisionId: "inputs" in target ? target.revisionId : "",
|
|
15755
|
+
inputs: "inputs" in target ? target.inputs : [],
|
|
15756
|
+
outputs: "inputs" in target ? target.outputs : null
|
|
15757
|
+
};
|
|
15758
|
+
}
|
|
15759
|
+
function workflowAgentTool(id, name, target, previous) {
|
|
15760
|
+
const capability = workflowCapability(name, target);
|
|
15761
|
+
return {
|
|
15762
|
+
...capability,
|
|
15763
|
+
id,
|
|
15764
|
+
description: previous?.description ?? target.name,
|
|
15765
|
+
approval: previous?.approval ?? false,
|
|
15766
|
+
inputs: capability.inputs.map((port) => Object.assign({}, port, { source: previous?.inputs.find((old) => old.handle == port.handle)?.source ?? { kind: "model" } }))
|
|
15767
|
+
};
|
|
15768
|
+
}
|
|
15702
15769
|
//#endregion
|
|
15703
15770
|
//#region src/control/common/authoringCondition.ts
|
|
15704
15771
|
/** Preserve empty groups in invalid drafts; do not turn them into unconditional branches. */
|
|
@@ -15887,6 +15954,7 @@ function authoringDiagnosticField(node, parts) {
|
|
|
15887
15954
|
if (tool == null) return "config.tools";
|
|
15888
15955
|
const base = `config.tools.${location[2]}`;
|
|
15889
15956
|
if (location[3] == "id") return base;
|
|
15957
|
+
if (tool.kind == "workflow" && (location[3] == "revisionId" || location[3] == "outputs")) return `${base}.flowId`;
|
|
15890
15958
|
if (location[3] == "inputs") {
|
|
15891
15959
|
const input = tool.inputs[Number(location[4])];
|
|
15892
15960
|
if (input == null) return `${base}.inputs`;
|
|
@@ -15902,6 +15970,11 @@ function authoringDiagnosticField(node, parts) {
|
|
|
15902
15970
|
}
|
|
15903
15971
|
return ["config", ...location.slice(1)].join(".");
|
|
15904
15972
|
}
|
|
15973
|
+
if (head == "capabilities" && "moduleId" in task && task.capabilities?.[Number(location[1])]?.kind == "workflow" && [
|
|
15974
|
+
"revisionId",
|
|
15975
|
+
"inputs",
|
|
15976
|
+
"outputs"
|
|
15977
|
+
].includes(location[2] ?? "")) return `config.capabilities.${location[1]}.flowId`;
|
|
15905
15978
|
if (head == "capabilities") return ["config", ...location].join(".");
|
|
15906
15979
|
if (head == "name") return "name";
|
|
15907
15980
|
return "config";
|
|
@@ -15979,6 +16052,31 @@ function fieldsToPorts(fields, previous) {
|
|
|
15979
16052
|
}
|
|
15980
16053
|
//#endregion
|
|
15981
16054
|
//#region src/control/common/authoringTools.ts
|
|
16055
|
+
/** A rename retains a snapshot only when one removed name matches one added name for the same target. */
|
|
16056
|
+
function previousWorkflowTool(tool, next, previous) {
|
|
16057
|
+
const named = previous.find((item) => item.name == tool.name);
|
|
16058
|
+
if (named != null) return named;
|
|
16059
|
+
if (next.filter((item) => item.kind == "workflow" && item.flowId == tool.flowId && !previous.some((old) => old.name == item.name)).length != 1) return;
|
|
16060
|
+
const removed = previous.filter((item) => item.kind == "workflow" && item.flowId == tool.flowId && !next.some((itemNext) => itemNext.name == item.name));
|
|
16061
|
+
return removed.length == 1 ? removed[0] : void 0;
|
|
16062
|
+
}
|
|
16063
|
+
function outwardCapabilities(capabilities) {
|
|
16064
|
+
return capabilities.map((item) => item.kind == "workflow" ? {
|
|
16065
|
+
kind: item.kind,
|
|
16066
|
+
name: item.name,
|
|
16067
|
+
flowId: item.flowId
|
|
16068
|
+
} : item);
|
|
16069
|
+
}
|
|
16070
|
+
async function prepareCapabilities(capabilities, previous, workflow) {
|
|
16071
|
+
return Promise.all(capabilities.map(async (item) => {
|
|
16072
|
+
if (item.kind != "workflow") return item;
|
|
16073
|
+
const old = previousWorkflowTool(item, capabilities, previous);
|
|
16074
|
+
return old?.kind == "workflow" && old.flowId == item.flowId ? {
|
|
16075
|
+
...old,
|
|
16076
|
+
name: item.name
|
|
16077
|
+
} : workflowCapability(item.name, await workflow(item.flowId));
|
|
16078
|
+
}));
|
|
16079
|
+
}
|
|
15982
16080
|
var AuthoringToolInputError = class extends Error {
|
|
15983
16081
|
constructor(details) {
|
|
15984
16082
|
super(`Unknown input ${JSON.stringify(details.input)} for tool ${JSON.stringify(details.tool)}. Choose from: ${details.choices.join(", ") || "(none)"}.`);
|
|
@@ -15988,17 +16086,45 @@ var AuthoringToolInputError = class extends Error {
|
|
|
15988
16086
|
}
|
|
15989
16087
|
};
|
|
15990
16088
|
function outwardAgentTools(tools) {
|
|
15991
|
-
return tools.map((
|
|
15992
|
-
...tool
|
|
15993
|
-
|
|
15994
|
-
|
|
16089
|
+
return tools.map((tool) => {
|
|
16090
|
+
const { id: _id, inputs, ...settings } = tool;
|
|
16091
|
+
return {
|
|
16092
|
+
...tool.kind == "workflow" ? {
|
|
16093
|
+
kind: tool.kind,
|
|
16094
|
+
name: tool.name,
|
|
16095
|
+
description: tool.description,
|
|
16096
|
+
approval: tool.approval,
|
|
16097
|
+
flowId: tool.flowId
|
|
16098
|
+
} : settings,
|
|
16099
|
+
inputs: Object.fromEntries(inputs.map((input) => [input.handle, input.source]))
|
|
16100
|
+
};
|
|
16101
|
+
});
|
|
15995
16102
|
}
|
|
15996
|
-
/** Keep persisted
|
|
15997
|
-
async function prepareAgentTools(tools, previous, action, id) {
|
|
16103
|
+
/** Keep persisted tool contracts until the caller selects a different target or explicitly refreshes. */
|
|
16104
|
+
async function prepareAgentTools(tools, previous, action, id, workflow) {
|
|
15998
16105
|
const prepared = [];
|
|
15999
16106
|
for (const tool of tools) {
|
|
16000
|
-
const old = previous.find((item) => item.name == tool.name);
|
|
16001
|
-
|
|
16107
|
+
const old = tool.kind == "workflow" ? previousWorkflowTool(tool, tools, previous) : previous.find((item) => item.name == tool.name);
|
|
16108
|
+
if (tool.kind == "workflow") {
|
|
16109
|
+
if (workflow == null) throw new Error("Workflow tools are unavailable.");
|
|
16110
|
+
const preparedTool = (old?.kind == "workflow" && old.flowId == tool.flowId ? old : void 0) ?? workflowAgentTool(old?.id ?? id(), tool.name, await workflow(tool.flowId));
|
|
16111
|
+
const choices = preparedTool.inputs.map((port) => port.handle);
|
|
16112
|
+
for (const input of Object.keys(tool.inputs ?? {})) if (!choices.includes(input)) throw new AuthoringToolInputError({
|
|
16113
|
+
tool: tool.name,
|
|
16114
|
+
action: tool.flowId,
|
|
16115
|
+
input,
|
|
16116
|
+
choices
|
|
16117
|
+
});
|
|
16118
|
+
prepared.push({
|
|
16119
|
+
...preparedTool,
|
|
16120
|
+
name: tool.name,
|
|
16121
|
+
description: tool.description,
|
|
16122
|
+
approval: tool.approval,
|
|
16123
|
+
inputs: preparedTool.inputs.map((port) => Object.assign({}, port, { source: tool.inputs?.[port.handle] ?? port.source }))
|
|
16124
|
+
});
|
|
16125
|
+
continue;
|
|
16126
|
+
}
|
|
16127
|
+
const retained = old?.kind != "workflow" && old?.action == tool.action ? old : void 0;
|
|
16002
16128
|
const definition = retained == null ? await action(tool.action) : void 0;
|
|
16003
16129
|
const ports = retained?.inputs ?? Object.entries(definition.inputs).map(([handle, port]) => Object.assign({}, port, {
|
|
16004
16130
|
handle,
|
|
@@ -16142,7 +16268,7 @@ function authoringNode(content, ref) {
|
|
|
16142
16268
|
config = {
|
|
16143
16269
|
inputs: fieldsView([...node.task.inputs, ...node.additionalInputs ?? []]),
|
|
16144
16270
|
outputs: fieldsView(node.task.outputs),
|
|
16145
|
-
...node.task.capabilities == null ? {} : { capabilities: node.task.capabilities }
|
|
16271
|
+
...node.task.capabilities == null ? {} : { capabilities: outwardCapabilities(node.task.capabilities) }
|
|
16146
16272
|
};
|
|
16147
16273
|
texts.code = content.modules[node.task.moduleId]?.source ?? "";
|
|
16148
16274
|
} else switch (node.kind) {
|
|
@@ -16410,9 +16536,12 @@ async function compileAuthoring(base, request, host) {
|
|
|
16410
16536
|
outputs: Object.entries(action.outputs).map(([handle, port]) => Object.assign({ handle }, port))
|
|
16411
16537
|
};
|
|
16412
16538
|
}
|
|
16413
|
-
async function
|
|
16539
|
+
async function workflowTarget(flowId) {
|
|
16414
16540
|
if (host.workflow == null) fail("workflow.unavailable", "Workflow calls are unavailable.");
|
|
16415
|
-
|
|
16541
|
+
return host.workflow(flowId);
|
|
16542
|
+
}
|
|
16543
|
+
async function resolveWorkflow(flowId, name, previous) {
|
|
16544
|
+
const target = await workflowTarget(flowId);
|
|
16416
16545
|
return "inputs" in target ? workflowTask(target, name) : workflowSelectionTask({
|
|
16417
16546
|
...target,
|
|
16418
16547
|
name
|
|
@@ -16491,6 +16620,7 @@ async function compileAuthoring(base, request, host) {
|
|
|
16491
16620
|
moduleId: node.task.moduleId,
|
|
16492
16621
|
name: String(update.name),
|
|
16493
16622
|
...config,
|
|
16623
|
+
...config.capabilities == null ? {} : { capabilities: await prepareCapabilities(config.capabilities, node.task.capabilities ?? [], workflowTarget) },
|
|
16494
16624
|
inputs,
|
|
16495
16625
|
outputs: fieldsToPorts(config.outputs, node.task.outputs)
|
|
16496
16626
|
}
|
|
@@ -16539,7 +16669,7 @@ async function compileAuthoring(base, request, host) {
|
|
|
16539
16669
|
};
|
|
16540
16670
|
if (type == "agent") {
|
|
16541
16671
|
const previous = before.executor.kind == "agent" ? before.executor : void 0;
|
|
16542
|
-
Object.assign(prepared, { tools: await prepareAgentTools(tools, previous?.tools ?? [], (id) => host.action(id), () => fresh("tool")) });
|
|
16672
|
+
Object.assign(prepared, { tools: await prepareAgentTools(tools, previous?.tools ?? [], (id) => host.action(id), () => fresh("tool"), workflowTarget) });
|
|
16543
16673
|
Reflect.deleteProperty(prepared, "notification");
|
|
16544
16674
|
if (notification != null) {
|
|
16545
16675
|
if (dequal(record(view.config).notification, notification) && previous?.notification != null) Object.assign(prepared, { notification: previous.notification });
|
|
@@ -16763,13 +16893,45 @@ async function compileAuthoring(base, request, host) {
|
|
|
16763
16893
|
case "node.refresh": {
|
|
16764
16894
|
const ref = resolve(edit.node);
|
|
16765
16895
|
const node = nodeAt(content, ref);
|
|
16766
|
-
if (node.kind != "task"
|
|
16767
|
-
|
|
16768
|
-
|
|
16769
|
-
|
|
16770
|
-
|
|
16771
|
-
|
|
16772
|
-
|
|
16896
|
+
if (node.kind != "task") fail("node.invalid-type", "Only workflow nodes and tools support refresh.");
|
|
16897
|
+
if (edit.tool != null) {
|
|
16898
|
+
if ("moduleId" in node.task) {
|
|
16899
|
+
const selected = node.task.capabilities?.find((item) => item.kind == "workflow" && item.name == edit.tool);
|
|
16900
|
+
if (selected?.kind != "workflow") fail("tool.not-found", "Workflow tool was not found.");
|
|
16901
|
+
const target = await workflowTarget(selected.flowId);
|
|
16902
|
+
if (!("inputs" in target)) fail("workflow.unavailable", "The workflow interface is unavailable.");
|
|
16903
|
+
replace(ref, {
|
|
16904
|
+
...node,
|
|
16905
|
+
task: {
|
|
16906
|
+
...node.task,
|
|
16907
|
+
capabilities: node.task.capabilities.map((item) => item === selected ? workflowCapability(selected.name, target) : item)
|
|
16908
|
+
}
|
|
16909
|
+
});
|
|
16910
|
+
} else if (node.task.executor.kind == "agent") {
|
|
16911
|
+
const selected = node.task.executor.tools.find((item) => item.kind == "workflow" && item.name == edit.tool);
|
|
16912
|
+
if (selected?.kind != "workflow") fail("tool.not-found", "Workflow tool was not found.");
|
|
16913
|
+
const target = await workflowTarget(selected.flowId);
|
|
16914
|
+
if (!("inputs" in target)) fail("workflow.unavailable", "The workflow interface is unavailable.");
|
|
16915
|
+
replace(ref, {
|
|
16916
|
+
...node,
|
|
16917
|
+
task: {
|
|
16918
|
+
...node.task,
|
|
16919
|
+
executor: {
|
|
16920
|
+
...node.task.executor,
|
|
16921
|
+
tools: node.task.executor.tools.map((item) => item === selected ? workflowAgentTool(selected.id, selected.name, target, selected) : item)
|
|
16922
|
+
}
|
|
16923
|
+
}
|
|
16924
|
+
});
|
|
16925
|
+
} else fail("node.invalid-type", "Only Agent and Code nodes have workflow tools.");
|
|
16926
|
+
} else {
|
|
16927
|
+
if (!("executor" in node.task) || node.task.executor.kind != "workflow") fail("node.invalid-type", "Specify a workflow tool name.");
|
|
16928
|
+
apply([{
|
|
16929
|
+
kind: "graph.node.replace",
|
|
16930
|
+
nodeId: ref,
|
|
16931
|
+
before: node,
|
|
16932
|
+
node: withWorkflowTask(node, await resolveWorkflow(node.task.executor.flowId, node.name ?? node.task.name, node.task))
|
|
16933
|
+
}]);
|
|
16934
|
+
}
|
|
16773
16935
|
break;
|
|
16774
16936
|
}
|
|
16775
16937
|
case "node.add": {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { JsonValue, TriggerSchedule } from '
|
|
1
|
+
import type { JsonValue, TriggerSchedule } from './flow-change.js';
|
|
2
2
|
export declare function validateTriggerSchedule(rules: readonly TriggerSchedule[]): void;
|
|
3
3
|
export declare function validateCronExpression(expression: string, timezone: string): void;
|
|
4
4
|
export declare function nextTriggerScheduledAt(rules: readonly TriggerSchedule[], afterMs: number): number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ChangeOperation, JsonValue, TriggerKeySnapshot, TriggerSchedule } from '
|
|
1
|
+
import type { ChangeOperation, JsonValue, TriggerKeySnapshot, TriggerSchedule } from './flow-change.js';
|
|
2
2
|
export type DraftOperation = ChangeOperation | {
|
|
3
3
|
readonly kind: 'graph.trigger.create';
|
|
4
4
|
readonly nodeId: string;
|
|
@@ -5,7 +5,8 @@ export interface EngineContract {
|
|
|
5
5
|
readonly platformSource: string;
|
|
6
6
|
readonly waitAutoContinue?: boolean;
|
|
7
7
|
readonly webhookResponses?: boolean;
|
|
8
|
+
readonly workflowTools?: boolean;
|
|
8
9
|
}
|
|
9
|
-
export declare const currentEngineContract = "open-flow-engine/
|
|
10
|
-
export declare const nodejsEngineContract = "open-flow-engine/
|
|
10
|
+
export declare const currentEngineContract = "open-flow-engine/v8";
|
|
11
|
+
export declare const nodejsEngineContract = "open-flow-engine/v8/nodejs-compat-v1";
|
|
11
12
|
export declare function findEngineContract(contract: string): EngineContract | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AgentInput, AgentTool, JsonValue, ManagedTaskDefinition, ManagedTaskExecutor } from '
|
|
1
|
+
import type { AgentInput, AgentTool, JsonValue, ManagedTaskDefinition, ManagedTaskExecutor } from './flow-change.js';
|
|
2
2
|
export type AgentConfig = Extract<ManagedTaskExecutor, {
|
|
3
3
|
readonly kind: 'agent';
|
|
4
4
|
}>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { DecisionQuestion } from '
|
|
2
|
-
import type { ChangeOperation, CodeModule,
|
|
1
|
+
import type { DecisionQuestion } from './decision.js';
|
|
2
|
+
import type { ChangeOperation, CodeModule, TaskCapability, Group, GraphNode, InputMapping, InputValues, InputPort, JsonValue, Port, PortDefinition, RetryConfiguration, RevisionContent, TaskDefinition, TriggerKeySnapshot, TriggerNode, TriggerSchedule, WebhookOptions } from './flow-change.js';
|
|
3
3
|
export declare const defaultCodeTaskPorts: Pick<Extract<TaskDefinition, {
|
|
4
4
|
readonly moduleId: string;
|
|
5
5
|
}>, 'inputs' | 'outputs' | 'capabilities'>;
|
|
@@ -103,7 +103,7 @@ export declare function updateTrigger(content: RevisionContent, nodeId: string,
|
|
|
103
103
|
export declare function updateTriggerConfig(content: RevisionContent, nodeId: string, name: string, value: JsonValue | undefined): readonly ChangeOperation[] | undefined;
|
|
104
104
|
export declare function updateTriggerSchedule(content: RevisionContent, nodeId: string, schedule: readonly TriggerSchedule[]): readonly ChangeOperation[] | undefined;
|
|
105
105
|
export declare function setTriggerConnection(content: RevisionContent, nodeId: string, connectionId: string | undefined): readonly ChangeOperation[] | undefined;
|
|
106
|
-
export declare function setCodeActions(content: RevisionContent, nodeId: string, capabilities: readonly
|
|
106
|
+
export declare function setCodeActions(content: RevisionContent, nodeId: string, capabilities: readonly TaskCapability[]): readonly ChangeOperation[] | undefined;
|
|
107
107
|
export declare function createDecisionTask(identity: {
|
|
108
108
|
readonly nodeId: string;
|
|
109
109
|
}, name?: string, questions?: readonly DecisionQuestion[]): readonly ChangeOperation[];
|