@oomol-lab/open-flow 0.1.0-beta.73 → 0.1.0-beta.75
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 +41 -0
- package/dist/browser/{ContentIcon-CUQHjQIw.js → ContentIcon-FCpKiwjp.js} +2 -1
- package/dist/browser/{FlowCanvas-Dtf8_cQp.js → FlowCanvas-dzRBnlUT.js} +1 -1
- package/dist/browser/{createResourceDialog-BWJkjiOO.js → createResourceDialog-BeYDdUl-.js} +2 -2
- package/dist/browser/{dialog-CUy_fwx9.js → dialog-ZtpsFbl4.js} +337 -31
- package/dist/browser/{exportSvg-BOoy7-Db.js → exportSvg-DqXw1yf-.js} +2 -2
- package/dist/browser/{flowChanges-CgSnSqqP.js → flowChanges-b_5UobFj.js} +586 -87
- package/dist/browser/{flowWorkspace-Bf7H-r0t.js → flowWorkspace-ItojZbO4.js} +21162 -20242
- package/dist/browser/preview.css +254 -179
- package/dist/browser/preview.js +22201 -20625
- package/dist/browser/{typeScriptSession-B0hC-C8y.js → typeScriptSession-CSRwWmZm.js} +1 -1
- package/dist/browser/ui.css +72 -2
- package/dist/browser/workbench.css +254 -179
- package/dist/browser/workbench.js +22 -78
- package/dist/browser/{workbenchSelect-C3e4J93X.js → workbenchSelect-M441Lz0d.js} +1 -1
- package/dist/command/index.js +42 -42
- package/dist/common/authoring.d.ts +5 -5
- package/dist/common/authoringExamples.d.ts +3 -2
- package/dist/common/authoringFields.d.ts +1 -1
- package/dist/common/authoringSchema.d.ts +95 -8
- 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 +119 -31
- package/dist/common/control-api.d.ts +4 -3
- package/dist/common/control-api.js +117 -29
- package/dist/common/control-requests.d.ts +5 -4
- package/dist/common/control-requests.js +437 -103
- 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 +4 -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 +131 -30
- 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 +133 -32
- package/dist/common/flow-connectionUsage.d.ts +1 -1
- package/dist/common/flow-encoding.d.ts +1 -1
- package/dist/common/flow-encoding.js +89 -23
- package/dist/common/flow-errorHandling.d.ts +1 -1
- package/dist/common/flow-graph.d.ts +3 -2
- 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 +2 -2
- package/dist/common/flow-semantics.d.ts +1 -1
- package/dist/common/flow-semantics.js +966 -614
- package/dist/common/flow-workflowFile.d.ts +1 -1
- package/dist/common/flowInspection.d.ts +3 -3
- package/dist/common/http-request.d.ts +156 -0
- package/dist/common/http-request.js +5254 -0
- 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 +5 -4
- package/dist/common/mcp.js +117 -29
- package/dist/common/openapi.d.ts +1 -1
- package/dist/common/poll-trigger.d.ts +1 -1
- package/dist/common/run-events.js +11 -9
- package/dist/common/run-results.d.ts +8 -1
- package/dist/common/runtime-contract.d.ts +8 -2
- package/dist/common/runtime-contract.js +25 -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 +3 -3
- package/dist/common/scheduler.js +101 -33
- 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 -3
- package/dist/common/webhook-trigger.d.ts +1 -1
- package/dist/common/webhook-trigger.js +12 -11
- 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 +11 -6
- package/skills/open-flow/references/flow-authoring.md +1 -0
- package/skills/open-flow/references/flow-n8n-conversion.md +19 -15
- 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 +1506 -0
- package/src/control/common/authoring.ts +923 -0
- package/src/control/common/authoringCondition.ts +110 -0
- package/src/control/common/authoringDiagnosticFields.ts +136 -0
- package/src/control/common/authoringExamples.ts +200 -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 +410 -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 +84 -0
- package/src/execution/common/events.ts +331 -0
- package/src/execution/common/node-execution.ts +469 -0
- package/src/execution/common/runLifecycle.ts +250 -0
- package/src/execution/common/runtime.ts +563 -0
- package/src/execution/common/scheduler.ts +697 -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 +1037 -0
- package/src/flow/common/changeSchema.ts +792 -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 +898 -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 +531 -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 +71 -0
- package/src/flow/common/workflowFile.ts +97 -0
- package/src/http/common/authBindings.ts +12 -0
- package/src/http/common/headers.ts +5 -0
- package/src/http/common/httpRequest.ts +251 -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/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 +413 -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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { TaskCapability, JsonValue, WaitAction, WaitAutoContinue } from './flow-change.js';
|
|
2
2
|
import type { PreparedFlow } from './flow-semantics.js';
|
|
3
3
|
import type { WebhookResponseSnapshot } from './webhook-response.js';
|
|
4
4
|
import type { PreviousNode } from '../index.js';
|
|
@@ -33,7 +33,7 @@ export type SchedulerEvent = {
|
|
|
33
33
|
readonly inputs: Readonly<Record<string, JsonValue>>;
|
|
34
34
|
readonly jobId: string;
|
|
35
35
|
readonly nodeId: string;
|
|
36
|
-
readonly nodeKind: 'agent' | 'approval' | 'condition' | 'connector' | 'decision' | 'javascript' | 'openapi' | 'llm' | 'value' | 'wait' | 'outputs' | 'workflow' | 'webhook-response';
|
|
36
|
+
readonly nodeKind: 'agent' | 'approval' | 'condition' | 'connector' | 'decision' | 'javascript' | 'openapi' | 'http-request' | 'llm' | 'value' | 'wait' | 'outputs' | 'workflow' | 'webhook-response';
|
|
37
37
|
readonly nodeTitle?: string;
|
|
38
38
|
readonly runId: string;
|
|
39
39
|
readonly type: 'node.started';
|
|
@@ -132,7 +132,7 @@ interface TaskInvocationBase {
|
|
|
132
132
|
readonly runId: string;
|
|
133
133
|
}
|
|
134
134
|
export type TaskInvocation = TaskInvocationBase & ({
|
|
135
|
-
readonly capabilities: readonly
|
|
135
|
+
readonly capabilities: readonly TaskCapability[];
|
|
136
136
|
readonly moduleId: string;
|
|
137
137
|
readonly getPrevious: () => readonly PreviousNode[];
|
|
138
138
|
} | {
|
package/dist/common/scheduler.js
CHANGED
|
@@ -9472,11 +9472,65 @@ function answerSchema(question) {
|
|
|
9472
9472
|
};
|
|
9473
9473
|
}
|
|
9474
9474
|
//#endregion
|
|
9475
|
+
//#region src/http/common/headers.ts
|
|
9476
|
+
/** Header names are case-insensitive; never silently combine duplicate business fields. */
|
|
9477
|
+
function httpHeaderNameIssue(name, names) {
|
|
9478
|
+
if (!/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/.test(name)) return "invalid";
|
|
9479
|
+
if (names.some((candidate) => candidate.toLowerCase() === name.toLowerCase())) return "duplicate";
|
|
9480
|
+
}
|
|
9481
|
+
//#endregion
|
|
9482
|
+
//#region src/http/common/httpRequest.ts
|
|
9483
|
+
var parameterSchema = strictObject({
|
|
9484
|
+
mode: _enum(["fields", "object"]).default("fields"),
|
|
9485
|
+
names: array(string$1()).default([])
|
|
9486
|
+
});
|
|
9487
|
+
var httpRequestExecutorSchema = strictObject({
|
|
9488
|
+
method: _enum([
|
|
9489
|
+
"GET",
|
|
9490
|
+
"POST",
|
|
9491
|
+
"PUT",
|
|
9492
|
+
"PATCH",
|
|
9493
|
+
"DELETE",
|
|
9494
|
+
"HEAD",
|
|
9495
|
+
"OPTIONS"
|
|
9496
|
+
]).default("GET"),
|
|
9497
|
+
query: parameterSchema.default({
|
|
9498
|
+
mode: "fields",
|
|
9499
|
+
names: []
|
|
9500
|
+
}),
|
|
9501
|
+
headers: parameterSchema.default({
|
|
9502
|
+
mode: "fields",
|
|
9503
|
+
names: []
|
|
9504
|
+
}),
|
|
9505
|
+
bodyFormat: _enum([
|
|
9506
|
+
"none",
|
|
9507
|
+
"json",
|
|
9508
|
+
"text",
|
|
9509
|
+
"form"
|
|
9510
|
+
]).default("none"),
|
|
9511
|
+
authentication: union([
|
|
9512
|
+
strictObject({ type: literal("none") }),
|
|
9513
|
+
strictObject({ type: _enum(["bearer", "basic"]) }),
|
|
9514
|
+
strictObject({
|
|
9515
|
+
type: literal("apiKey"),
|
|
9516
|
+
name: string$1(),
|
|
9517
|
+
in: _enum(["header", "query"])
|
|
9518
|
+
})
|
|
9519
|
+
]).default({ type: "none" }),
|
|
9520
|
+
responseFormat: _enum([
|
|
9521
|
+
"auto",
|
|
9522
|
+
"json",
|
|
9523
|
+
"text"
|
|
9524
|
+
]).default("auto"),
|
|
9525
|
+
statusPolicy: _enum(["success", "all"]).default("success")
|
|
9526
|
+
}).extend({ kind: literal("http-request") });
|
|
9527
|
+
//#endregion
|
|
9475
9528
|
//#region src/flow/common/retry.ts
|
|
9476
9529
|
var retryNodeTypes = [
|
|
9477
9530
|
"code",
|
|
9478
9531
|
"connector",
|
|
9479
9532
|
"openapi",
|
|
9533
|
+
"http-request",
|
|
9480
9534
|
"llm",
|
|
9481
9535
|
"decision"
|
|
9482
9536
|
];
|
|
@@ -9565,22 +9619,6 @@ var webhookResponseTimeout = {
|
|
|
9565
9619
|
function webhookResponseAllowsBody(status) {
|
|
9566
9620
|
return status !== 204 && status !== 205 && status !== 304;
|
|
9567
9621
|
}
|
|
9568
|
-
var webhookHeadersPort = {
|
|
9569
|
-
jsonSchema: {
|
|
9570
|
-
type: "object",
|
|
9571
|
-
additionalProperties: { type: [
|
|
9572
|
-
"string",
|
|
9573
|
-
"number",
|
|
9574
|
-
"boolean"
|
|
9575
|
-
] }
|
|
9576
|
-
},
|
|
9577
|
-
nullable: true
|
|
9578
|
-
};
|
|
9579
|
-
/** Header names are case-insensitive; never silently combine duplicate business fields. */
|
|
9580
|
-
function webhookHeaderNameIssue(name, names) {
|
|
9581
|
-
if (!/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/.test(name)) return "invalid";
|
|
9582
|
-
if (names.some((candidate) => candidate.toLowerCase() === name.toLowerCase())) return "duplicate";
|
|
9583
|
-
}
|
|
9584
9622
|
/** Fixed inputs belong to the node, not author-supplied definitions. */
|
|
9585
9623
|
var webhookResponseInputs = [
|
|
9586
9624
|
{
|
|
@@ -9597,7 +9635,17 @@ var webhookResponseInputs = [
|
|
|
9597
9635
|
},
|
|
9598
9636
|
{
|
|
9599
9637
|
handle: "headers",
|
|
9600
|
-
jsonSchema:
|
|
9638
|
+
jsonSchema: {
|
|
9639
|
+
jsonSchema: {
|
|
9640
|
+
type: "object",
|
|
9641
|
+
additionalProperties: { type: [
|
|
9642
|
+
"string",
|
|
9643
|
+
"number",
|
|
9644
|
+
"boolean"
|
|
9645
|
+
] }
|
|
9646
|
+
},
|
|
9647
|
+
nullable: true
|
|
9648
|
+
}.jsonSchema,
|
|
9601
9649
|
nullable: false,
|
|
9602
9650
|
value: {}
|
|
9603
9651
|
}
|
|
@@ -9611,7 +9659,7 @@ function webhookHeaderValues(source) {
|
|
|
9611
9659
|
const headers = {};
|
|
9612
9660
|
const names = [];
|
|
9613
9661
|
for (const [name, value] of Object.entries(source)) {
|
|
9614
|
-
if (
|
|
9662
|
+
if (httpHeaderNameIssue(name, names) != null) return;
|
|
9615
9663
|
if (typeof value !== "string" && typeof value !== "boolean" && !(typeof value === "number" && Number.isFinite(value))) return;
|
|
9616
9664
|
const text = String(value);
|
|
9617
9665
|
if ([...text].some((character) => character.charCodeAt(0) > 255 || /[\0\r\n]/.test(character))) return;
|
|
@@ -9672,7 +9720,7 @@ var ports = {
|
|
|
9672
9720
|
inputs: array(union([input, group])),
|
|
9673
9721
|
outputs: array(union([port, group]))
|
|
9674
9722
|
};
|
|
9675
|
-
var
|
|
9723
|
+
var connectorCapabilitySchema = union([
|
|
9676
9724
|
strictObject({
|
|
9677
9725
|
kind: literal("connector"),
|
|
9678
9726
|
action: text,
|
|
@@ -9704,6 +9752,15 @@ var capability = union([
|
|
|
9704
9752
|
})).optional()
|
|
9705
9753
|
})
|
|
9706
9754
|
]);
|
|
9755
|
+
var workflowCapabilitySchema = strictObject({
|
|
9756
|
+
kind: literal("workflow"),
|
|
9757
|
+
name: text,
|
|
9758
|
+
flowId: text,
|
|
9759
|
+
revisionId: text,
|
|
9760
|
+
inputs: array(port),
|
|
9761
|
+
outputs: array(port).nullable()
|
|
9762
|
+
});
|
|
9763
|
+
var capability = union([connectorCapabilitySchema, workflowCapabilitySchema]);
|
|
9707
9764
|
var inline = object({
|
|
9708
9765
|
...ports,
|
|
9709
9766
|
name: text,
|
|
@@ -9718,6 +9775,20 @@ var agentValue = union([object({
|
|
|
9718
9775
|
input: text
|
|
9719
9776
|
})]);
|
|
9720
9777
|
var agentInput$1 = union([agentValue, object({ kind: literal("model") })]);
|
|
9778
|
+
var agentToolFields = {
|
|
9779
|
+
id: text,
|
|
9780
|
+
name: text,
|
|
9781
|
+
description: text,
|
|
9782
|
+
approval: boolean(),
|
|
9783
|
+
inputs: array(input.extend({ source: agentInput$1 }))
|
|
9784
|
+
};
|
|
9785
|
+
var connectorAgentToolSchema = object({
|
|
9786
|
+
...agentToolFields,
|
|
9787
|
+
kind: literal("connector").optional(),
|
|
9788
|
+
action: text,
|
|
9789
|
+
connectionId: actionConnection.optional()
|
|
9790
|
+
});
|
|
9791
|
+
var workflowAgentToolSchema = workflowCapabilitySchema.extend(agentToolFields);
|
|
9721
9792
|
var decisionQuestion = discriminatedUnion("type", [
|
|
9722
9793
|
strictObject({
|
|
9723
9794
|
name: text,
|
|
@@ -9786,15 +9857,7 @@ var managedFields = object({
|
|
|
9786
9857
|
model: text,
|
|
9787
9858
|
prompt: text,
|
|
9788
9859
|
maxRounds: number(),
|
|
9789
|
-
tools: array(
|
|
9790
|
-
id: text,
|
|
9791
|
-
name: text,
|
|
9792
|
-
description: text,
|
|
9793
|
-
action: text,
|
|
9794
|
-
connectionId: actionConnection.optional(),
|
|
9795
|
-
approval: boolean(),
|
|
9796
|
-
inputs: array(input.extend({ source: agentInput$1 }))
|
|
9797
|
-
})),
|
|
9860
|
+
tools: array(union([workflowAgentToolSchema, connectorAgentToolSchema])),
|
|
9798
9861
|
notification: object({
|
|
9799
9862
|
action: text,
|
|
9800
9863
|
connectionId: actionConnection.optional(),
|
|
@@ -9807,7 +9870,8 @@ var managedFields = object({
|
|
|
9807
9870
|
kind: literal("workflow"),
|
|
9808
9871
|
flowId: text,
|
|
9809
9872
|
revisionId: text
|
|
9810
|
-
})
|
|
9873
|
+
}),
|
|
9874
|
+
httpRequestExecutorSchema
|
|
9811
9875
|
])
|
|
9812
9876
|
});
|
|
9813
9877
|
var managed = managedFields.transform(limitDecisionTask);
|
|
@@ -10059,7 +10123,8 @@ object({
|
|
|
10059
10123
|
literal(7),
|
|
10060
10124
|
literal(8),
|
|
10061
10125
|
literal(9),
|
|
10062
|
-
literal(10)
|
|
10126
|
+
literal(10),
|
|
10127
|
+
literal(11)
|
|
10063
10128
|
]),
|
|
10064
10129
|
document,
|
|
10065
10130
|
modules: record$1(text, module)
|
|
@@ -11379,7 +11444,10 @@ function agentApproval(config, checkpoint, inputs) {
|
|
|
11379
11444
|
return {
|
|
11380
11445
|
callId: checkpoint.callId,
|
|
11381
11446
|
toolId: tool.id,
|
|
11382
|
-
|
|
11447
|
+
...tool.kind == "workflow" ? {
|
|
11448
|
+
kind: "workflow",
|
|
11449
|
+
flowId: tool.flowId
|
|
11450
|
+
} : { action: tool.action },
|
|
11383
11451
|
...tool.connectionId == null ? {} : { connectionId: tool.connectionId },
|
|
11384
11452
|
input: checkpoint.input
|
|
11385
11453
|
};
|
|
@@ -11439,7 +11507,7 @@ function executeNode(context, input) {
|
|
|
11439
11507
|
const kind = nodeKind(node);
|
|
11440
11508
|
const title = nodeTitle(node);
|
|
11441
11509
|
const projectedInputs = Object.fromEntries(Object.entries(nodeInputs).filter(([handle]) => {
|
|
11442
|
-
if (node.kind == "task" && "executor" in node.task && node.task
|
|
11510
|
+
if (node.kind == "task" && "executor" in node.task && ["openapi", "http-request"].includes(node.task.executor.kind) && handle.startsWith("auth.")) return false;
|
|
11443
11511
|
const mapping = nodeInputMappings(node)[handle];
|
|
11444
11512
|
return mapping?.kind != "sources" || mapping.sources.every((source) => source.kind != "binding");
|
|
11445
11513
|
}));
|
|
@@ -11490,7 +11558,7 @@ function executeNode(context, input) {
|
|
|
11490
11558
|
input: Object.fromEntries(Object.entries(nodeInputs).filter(([handle]) => {
|
|
11491
11559
|
if (additional.has(handle)) return false;
|
|
11492
11560
|
const task = "executor" in node.task ? node.task : void 0;
|
|
11493
|
-
if (task
|
|
11561
|
+
if (task == null || !["openapi", "http-request"].includes(task.executor.kind)) return true;
|
|
11494
11562
|
const mapping = node.inputs[handle];
|
|
11495
11563
|
return mapping?.kind != "unset" && (mapping != null || task.inputs.some((port) => "handle" in port && port.handle == handle && port.value !== void 0));
|
|
11496
11564
|
})),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TriggerKeySnapshot } from '
|
|
1
|
+
import type { TriggerKeySnapshot } from './flow-change.js';
|
|
2
2
|
import type { UiLanguage } from './localization.js';
|
|
3
3
|
import type { TriggerKeySummary } from './control-api.js';
|
|
4
4
|
export interface TriggerDisplay {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Group, InputPort, InputValues, JsonValue } from '
|
|
1
|
+
import type { Group, InputPort, InputValues, JsonValue } from './flow-change.js';
|
|
2
2
|
/** Deployment-bound selections owned by the Trigger configuration contract. */
|
|
3
3
|
export declare function clearTriggerExternalConfig(key: string, config: InputValues): InputValues;
|
|
4
4
|
export declare function triggerConfigValue(input: InputPort, config: InputValues): JsonValue | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { JsonValue, Port, PortDefinition, TriggerNode } from '
|
|
2
|
-
import { webhookMethods, webhookSupportsBody } from '
|
|
1
|
+
import type { JsonValue, Port, PortDefinition, TriggerNode } from './flow-change.js';
|
|
2
|
+
import { webhookMethods, webhookSupportsBody } from './webhook-method.js';
|
|
3
3
|
export { webhookMethods, webhookSupportsBody };
|
|
4
4
|
export declare const errorOutputs: readonly Port[];
|
|
5
5
|
export declare const sampleErrorOutputs: Readonly<Record<string, JsonValue>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TriggerDisplay } from './trigger-catalog.js';
|
|
2
|
-
import type { TriggerKeySnapshot } from '
|
|
2
|
+
import type { TriggerKeySnapshot } from './flow-change.js';
|
|
3
3
|
import type { UiLanguage } from './localization.js';
|
|
4
4
|
type Translations = Readonly<Record<string, Partial<TriggerDisplay>>>;
|
|
5
5
|
export declare function loadTriggerTranslations(locale: UiLanguage): Promise<Translations>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { InputPort, JsonValue, Port, PortDefinition } from '
|
|
1
|
+
import type { InputPort, JsonValue, Port, PortDefinition } from './flow-change.js';
|
|
2
2
|
export declare const webhookResponseTimeout: {
|
|
3
3
|
readonly defaultMs: 30000;
|
|
4
4
|
readonly minMs: 1000;
|
|
@@ -27,8 +27,6 @@ export declare const webhookHeadersPort: {
|
|
|
27
27
|
readonly nullable: true;
|
|
28
28
|
};
|
|
29
29
|
export declare function workflowOutputsPort(outputs: readonly Port[]): PortDefinition;
|
|
30
|
-
/** Header names are case-insensitive; never silently combine duplicate business fields. */
|
|
31
|
-
export declare function webhookHeaderNameIssue(name: string, names: readonly string[]): 'invalid' | 'duplicate' | undefined;
|
|
32
30
|
/** Fixed inputs belong to the node, not author-supplied definitions. */
|
|
33
31
|
export declare const webhookResponseInputs: readonly InputPort[];
|
|
34
32
|
export interface WebhookResponseSnapshot {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { JsonValue, WebhookBodyField, WebhookMethod, WebhookOptions } from '
|
|
1
|
+
import type { JsonValue, WebhookBodyField, WebhookMethod, WebhookOptions } from './flow-change.js';
|
|
2
2
|
export { webhookSupportsBody } from './trigger-contract.js';
|
|
3
3
|
export { webhookResponseAllowsBody, webhookResponseTimeout } from './webhook-response.js';
|
|
4
4
|
export type { WebhookResponseSnapshot } from './webhook-response.js';
|
|
@@ -91,6 +91,13 @@ function isJsonObject(value) {
|
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
//#endregion
|
|
94
|
+
//#region src/http/common/headers.ts
|
|
95
|
+
/** Header names are case-insensitive; never silently combine duplicate business fields. */
|
|
96
|
+
function httpHeaderNameIssue(name, names) {
|
|
97
|
+
if (!/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/.test(name)) return "invalid";
|
|
98
|
+
if (names.some((candidate) => candidate.toLowerCase() === name.toLowerCase())) return "duplicate";
|
|
99
|
+
}
|
|
100
|
+
//#endregion
|
|
94
101
|
//#region src/flow/common/webhookResponse.ts
|
|
95
102
|
var webhookResponseTimeout = {
|
|
96
103
|
defaultMs: 3e4,
|
|
@@ -100,7 +107,7 @@ var webhookResponseTimeout = {
|
|
|
100
107
|
function webhookResponseAllowsBody(status) {
|
|
101
108
|
return status !== 204 && status !== 205 && status !== 304;
|
|
102
109
|
}
|
|
103
|
-
|
|
110
|
+
({
|
|
104
111
|
jsonSchema: {
|
|
105
112
|
type: "object",
|
|
106
113
|
additionalProperties: { type: [
|
|
@@ -110,13 +117,7 @@ var webhookHeadersPort = {
|
|
|
110
117
|
] }
|
|
111
118
|
},
|
|
112
119
|
nullable: true
|
|
113
|
-
};
|
|
114
|
-
/** Header names are case-insensitive; never silently combine duplicate business fields. */
|
|
115
|
-
function webhookHeaderNameIssue(name, names) {
|
|
116
|
-
if (!/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/.test(name)) return "invalid";
|
|
117
|
-
if (names.some((candidate) => candidate.toLowerCase() === name.toLowerCase())) return "duplicate";
|
|
118
|
-
}
|
|
119
|
-
webhookHeadersPort.jsonSchema;
|
|
120
|
+
}).jsonSchema;
|
|
120
121
|
function validWebhookStatus(value) {
|
|
121
122
|
return typeof value === "number" && Number.isInteger(value) && value >= 200 && value <= 599 && webhookResponseAllowsBody(value);
|
|
122
123
|
}
|
|
@@ -126,7 +127,7 @@ function webhookHeaderValues(source) {
|
|
|
126
127
|
const headers = {};
|
|
127
128
|
const names = [];
|
|
128
129
|
for (const [name, value] of Object.entries(source)) {
|
|
129
|
-
if (
|
|
130
|
+
if (httpHeaderNameIssue(name, names) != null) return;
|
|
130
131
|
if (typeof value !== "string" && typeof value !== "boolean" && !(typeof value === "number" && Number.isFinite(value))) return;
|
|
131
132
|
const text = String(value);
|
|
132
133
|
if ([...text].some((character) => character.charCodeAt(0) > 255 || /[\0\r\n]/.test(character))) return;
|
|
@@ -2929,7 +2930,7 @@ function webhookResponseHeaders(result, options) {
|
|
|
2929
2930
|
if (!isJsonObject(source)) return;
|
|
2930
2931
|
const values = /* @__PURE__ */ new Map();
|
|
2931
2932
|
for (const [name, value] of Object.entries(source)) {
|
|
2932
|
-
if (
|
|
2933
|
+
if (httpHeaderNameIssue(name, [...values.values()].map((entry) => entry.name)) != null) return;
|
|
2933
2934
|
values.set(name.toLowerCase(), {
|
|
2934
2935
|
name,
|
|
2935
2936
|
value
|
|
@@ -2938,7 +2939,7 @@ function webhookResponseHeaders(result, options) {
|
|
|
2938
2939
|
if (whole == null) {
|
|
2939
2940
|
const names = [];
|
|
2940
2941
|
for (const [name, output] of Object.entries(options.responseHeaderOutputs ?? {})) {
|
|
2941
|
-
if (
|
|
2942
|
+
if (httpHeaderNameIssue(name, names) != null) return;
|
|
2942
2943
|
names.push(name);
|
|
2943
2944
|
values.set(name.toLowerCase(), {
|
|
2944
2945
|
name,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TaskNode, ManagedTaskDefinition, Port, JsonValue, RevisionContent } from '
|
|
1
|
+
import type { TaskNode, ManagedTaskDefinition, Port, JsonValue, RevisionContent, GraphNode, WorkflowCapability, AgentWorkflowTool } from './flow-change.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
export interface WorkflowExecutor {
|
|
4
4
|
readonly kind: 'workflow';
|
|
@@ -91,3 +91,19 @@ export declare const workflowReferencesSchema: z.ZodObject<{
|
|
|
91
91
|
}, z.core.$strip>>;
|
|
92
92
|
}, z.core.$strip>;
|
|
93
93
|
export type WorkflowReferences = z.infer<typeof workflowReferencesSchema>;
|
|
94
|
+
/** Workflow declarations share discovery across authoring, admission and resource indexing. */
|
|
95
|
+
export declare function nodeWorkflowReferences(node: GraphNode): readonly {
|
|
96
|
+
readonly target: Omit<WorkflowCapability, 'kind' | 'name'>;
|
|
97
|
+
readonly path: string;
|
|
98
|
+
readonly tool?: string;
|
|
99
|
+
}[];
|
|
100
|
+
export declare function workflowCapability(name: string, target: WorkflowContract | WorkflowCandidate): WorkflowCapability;
|
|
101
|
+
export declare function workflowAgentTool(id: string, name: string, target: WorkflowContract | WorkflowCandidate, previous?: AgentWorkflowTool): AgentWorkflowTool;
|
|
102
|
+
export declare function workflowInterfaceIssues(target: {
|
|
103
|
+
readonly revisionId: string;
|
|
104
|
+
}, contract: WorkflowContract, previous?: PublishedWorkflowInterface): readonly {
|
|
105
|
+
side: 'revision';
|
|
106
|
+
field: string;
|
|
107
|
+
message: string;
|
|
108
|
+
reason: 'snapshot-missing' | 'interface-required' | 'revision-stale';
|
|
109
|
+
}[];
|
package/dist/common/workflow.js
CHANGED
|
@@ -9621,27 +9621,8 @@ function workflowPorts(ports) {
|
|
|
9621
9621
|
function workflowCompatibility(node, contract, previous) {
|
|
9622
9622
|
const issues = [];
|
|
9623
9623
|
if ("executor" in node.task && node.task.executor.kind == "workflow") {
|
|
9624
|
-
const
|
|
9625
|
-
if (
|
|
9626
|
-
side: "revision",
|
|
9627
|
-
field: "revisionId",
|
|
9628
|
-
reason: "interface-required",
|
|
9629
|
-
message: "The called workflow interface has not been loaded. Refresh the interface definition."
|
|
9630
|
-
}];
|
|
9631
|
-
if (saved != contract.revisionId) {
|
|
9632
|
-
if (previous == null) return [{
|
|
9633
|
-
side: "revision",
|
|
9634
|
-
field: "revisionId",
|
|
9635
|
-
reason: "snapshot-missing",
|
|
9636
|
-
message: "The saved workflow interface snapshot is unavailable. Refresh the interface definition."
|
|
9637
|
-
}];
|
|
9638
|
-
if (!sameWorkflowInterface(previous, contract)) return [{
|
|
9639
|
-
side: "revision",
|
|
9640
|
-
field: "revisionId",
|
|
9641
|
-
reason: "revision-stale",
|
|
9642
|
-
message: "The called workflow interface has changed. Update the interface definition."
|
|
9643
|
-
}];
|
|
9644
|
-
}
|
|
9624
|
+
const interfaceIssues = workflowInterfaceIssues(node.task.executor, contract, previous);
|
|
9625
|
+
if (interfaceIssues.length) return interfaceIssues;
|
|
9645
9626
|
}
|
|
9646
9627
|
for (const port of contract.inputs) {
|
|
9647
9628
|
const source = node.inputs[port.handle];
|
|
@@ -9705,5 +9686,70 @@ var workflowReferencesSchema = object({
|
|
|
9705
9686
|
}).nullable()
|
|
9706
9687
|
}))
|
|
9707
9688
|
});
|
|
9689
|
+
/** Workflow declarations share discovery across authoring, admission and resource indexing. */
|
|
9690
|
+
function nodeWorkflowReferences(node) {
|
|
9691
|
+
if (node.kind != "task") return [];
|
|
9692
|
+
if ("moduleId" in node.task) return (node.task.capabilities ?? []).flatMap((item, index) => item.kind == "workflow" ? [{
|
|
9693
|
+
target: item,
|
|
9694
|
+
path: `task/capabilities/${index}`,
|
|
9695
|
+
tool: item.name
|
|
9696
|
+
}] : []);
|
|
9697
|
+
if (node.task.executor.kind == "workflow") return [{
|
|
9698
|
+
target: {
|
|
9699
|
+
...node.task.executor,
|
|
9700
|
+
inputs: node.task.inputs.filter((port) => "handle" in port),
|
|
9701
|
+
outputs: node.task.outputs.filter((port) => "handle" in port)
|
|
9702
|
+
},
|
|
9703
|
+
path: "task/executor"
|
|
9704
|
+
}];
|
|
9705
|
+
if (node.task.executor.kind == "agent") return node.task.executor.tools.flatMap((item, index) => item.kind == "workflow" ? [{
|
|
9706
|
+
target: item,
|
|
9707
|
+
path: `task/executor/tools/${index}`,
|
|
9708
|
+
tool: item.name
|
|
9709
|
+
}] : []);
|
|
9710
|
+
return [];
|
|
9711
|
+
}
|
|
9712
|
+
function workflowCapability(name, target) {
|
|
9713
|
+
return {
|
|
9714
|
+
kind: "workflow",
|
|
9715
|
+
name,
|
|
9716
|
+
flowId: target.flowId,
|
|
9717
|
+
revisionId: "inputs" in target ? target.revisionId : "",
|
|
9718
|
+
inputs: "inputs" in target ? target.inputs : [],
|
|
9719
|
+
outputs: "inputs" in target ? target.outputs : null
|
|
9720
|
+
};
|
|
9721
|
+
}
|
|
9722
|
+
function workflowAgentTool(id, name, target, previous) {
|
|
9723
|
+
const capability = workflowCapability(name, target);
|
|
9724
|
+
return {
|
|
9725
|
+
...capability,
|
|
9726
|
+
id,
|
|
9727
|
+
description: previous?.description ?? target.name,
|
|
9728
|
+
approval: previous?.approval ?? false,
|
|
9729
|
+
inputs: capability.inputs.map((port) => Object.assign({}, port, { source: previous?.inputs.find((old) => old.handle == port.handle)?.source ?? { kind: "model" } }))
|
|
9730
|
+
};
|
|
9731
|
+
}
|
|
9732
|
+
function workflowInterfaceIssues(target, contract, previous) {
|
|
9733
|
+
if (!target.revisionId) return [{
|
|
9734
|
+
side: "revision",
|
|
9735
|
+
field: "revisionId",
|
|
9736
|
+
reason: "interface-required",
|
|
9737
|
+
message: "The called workflow interface has not been loaded. Refresh the interface definition."
|
|
9738
|
+
}];
|
|
9739
|
+
if (target.revisionId == contract.revisionId) return [];
|
|
9740
|
+
if (previous == null) return [{
|
|
9741
|
+
side: "revision",
|
|
9742
|
+
field: "revisionId",
|
|
9743
|
+
reason: "snapshot-missing",
|
|
9744
|
+
message: "The saved workflow interface snapshot is unavailable. Refresh the interface definition."
|
|
9745
|
+
}];
|
|
9746
|
+
if (!sameWorkflowInterface(previous, contract)) return [{
|
|
9747
|
+
side: "revision",
|
|
9748
|
+
field: "revisionId",
|
|
9749
|
+
reason: "revision-stale",
|
|
9750
|
+
message: "The called workflow interface has changed. Update the interface definition."
|
|
9751
|
+
}];
|
|
9752
|
+
return [];
|
|
9753
|
+
}
|
|
9708
9754
|
//#endregion
|
|
9709
|
-
export { publishedWorkflowInterface, publishedWorkflowInterfaceSchema, sameWorkflowInterface, withWorkflowTask, workflowCandidate, workflowCandidateGroup, workflowCompatibility, workflowContractSchema, workflowPorts, workflowReferencesSchema, workflowSelectionTask, workflowTask };
|
|
9755
|
+
export { nodeWorkflowReferences, publishedWorkflowInterface, publishedWorkflowInterfaceSchema, sameWorkflowInterface, withWorkflowTask, workflowAgentTool, workflowCandidate, workflowCandidateGroup, workflowCapability, workflowCompatibility, workflowContractSchema, workflowInterfaceIssues, workflowPorts, workflowReferencesSchema, workflowSelectionTask, workflowTask };
|
package/dist/index.d.ts
CHANGED
|
@@ -66,7 +66,10 @@ export interface TaskLogger {
|
|
|
66
66
|
warn(message: string, data?: unknown): void;
|
|
67
67
|
error(message: string, data?: unknown): void;
|
|
68
68
|
}
|
|
69
|
-
export interface TaskContext<Actions extends object = Record<string, never
|
|
69
|
+
export interface TaskContext<Actions extends object = Record<string, never>, Workflows extends object = {
|
|
70
|
+
call: (name: never, input?: never) => Promise<never>;
|
|
71
|
+
}> {
|
|
72
|
+
readonly workflows: Workflows;
|
|
70
73
|
readonly actions: Actions;
|
|
71
74
|
readonly signal: AbortSignal;
|
|
72
75
|
readonly flowId: string;
|
|
@@ -82,6 +85,6 @@ export interface TaskContext<Actions extends object = Record<string, never>> {
|
|
|
82
85
|
reportProgress(progress: number): Promise<void>;
|
|
83
86
|
}
|
|
84
87
|
export type TaskResult<Outputs extends object> = keyof Outputs extends never ? Outputs | void : Outputs;
|
|
85
|
-
export interface Task<Inputs extends object = Record<string, unknown>, Outputs extends object = Record<string, unknown>, Actions extends object = Record<string, never
|
|
86
|
-
(inputs: Inputs, context: TaskContext<Actions>): TaskResult<Outputs> | Promise<TaskResult<Outputs>>;
|
|
88
|
+
export interface Task<Inputs extends object = Record<string, unknown>, Outputs extends object = Record<string, unknown>, Actions extends object = Record<string, never>, Workflows extends object = TaskContext['workflows']> {
|
|
89
|
+
(inputs: Inputs, context: TaskContext<Actions, Workflows>): TaskResult<Outputs> | Promise<TaskResult<Outputs>>;
|
|
87
90
|
}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oomol-lab/open-flow",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.75",
|
|
4
4
|
"description": "TypeScript contracts and Browser runtime for Open Flow.",
|
|
5
|
-
"license": "
|
|
5
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "git+https://github.com/oomol-lab/open-flow.git",
|
|
@@ -25,6 +25,10 @@
|
|
|
25
25
|
"types": "./dist/common/decision.d.ts",
|
|
26
26
|
"import": "./dist/common/decision.js"
|
|
27
27
|
},
|
|
28
|
+
"./http-request": {
|
|
29
|
+
"types": "./dist/common/http-request.d.ts",
|
|
30
|
+
"import": "./dist/common/http-request.js"
|
|
31
|
+
},
|
|
28
32
|
"./openapi": {
|
|
29
33
|
"types": "./dist/common/openapi.d.ts",
|
|
30
34
|
"import": "./dist/common/openapi.js"
|
|
@@ -82,12 +86,12 @@
|
|
|
82
86
|
"import": "./dist/common/provider-triggers.js"
|
|
83
87
|
},
|
|
84
88
|
"./flow-authoring": {
|
|
85
|
-
"types": "./dist/
|
|
86
|
-
"import": "./dist/
|
|
89
|
+
"types": "./dist/common/flow-authoring.d.ts",
|
|
90
|
+
"import": "./dist/common/flow-authoring.js"
|
|
87
91
|
},
|
|
88
92
|
"./flow-change": {
|
|
89
|
-
"types": "./dist/
|
|
90
|
-
"import": "./dist/
|
|
93
|
+
"types": "./dist/common/flow-change.d.ts",
|
|
94
|
+
"import": "./dist/common/flow-change.js"
|
|
91
95
|
},
|
|
92
96
|
"./flow-encoding": {
|
|
93
97
|
"types": "./dist/common/flow-encoding.d.ts",
|
|
@@ -152,6 +156,7 @@
|
|
|
152
156
|
},
|
|
153
157
|
"files": [
|
|
154
158
|
"dist",
|
|
159
|
+
"src",
|
|
155
160
|
"skills",
|
|
156
161
|
"README.md",
|
|
157
162
|
"NOTICE",
|
|
@@ -298,6 +298,7 @@ For Connector Tasks, independent Code Actions, Agent tools and notifications, an
|
|
|
298
298
|
| Manual, HTTP or scheduled entry | `start`, `webhook`, `cron`: workflow `inputDefs`, HTTP body fields, or schedule. |
|
|
299
299
|
| Workflow failure handler | `error`: published upstream Flows' automatic Run failures; not a node-level catch or a handler for manual Run failures. |
|
|
300
300
|
| Call another workflow | `workflow`: select an owned published Flow ID; inputs and outputs derive from its saved contract. Use `node.refresh` to update it. |
|
|
301
|
+
| Single HTTP request | `http-request`: method, parameter modes, authentication, body and response configuration; URL and request values use public inputs. |
|
|
301
302
|
| Fixed HTTP operation | `openapi`: an OpenAPI source, path and method; resolved authentication choices and ports appear in node details. |
|
|
302
303
|
| Reusable constants | `value`: named JSON values and optional output constraints. |
|
|
303
304
|
| Durable interaction | `wait`, `approval`: prompt and named inputs; resume through the Run's Wait ID. Wait additionally supports optional `config.autoContinue` with `{kind:"after",durationMs:86400000}` or `{kind:"at",at:"2026-10-25T10:00:00+08:00"}`. |
|
|
@@ -13,17 +13,17 @@ publishing and enabling remain separate actions within the user's authorization.
|
|
|
13
13
|
|
|
14
14
|
## Choose a representation
|
|
15
15
|
|
|
16
|
-
| Source behavior | Open Flow building blocks
|
|
17
|
-
| --------------------------------------------- |
|
|
18
|
-
| Scheduled, webhook or provider event | Cron, Webhook, Poll or Integration Trigger
|
|
19
|
-
| Provider read or write | Connector
|
|
20
|
-
| Field shaping, filtering, aggregation or join | Code with named input/output fields
|
|
21
|
-
| IF or Switch | Condition and named execution branches
|
|
22
|
-
| Prompt plus model and output parser | LLM with template, inputs and `resultSchema`
|
|
23
|
-
| Agent with tools or memory | Agent where its current contract fits
|
|
24
|
-
| HTTP request |
|
|
25
|
-
| Human response or durable pause | Wait or Approval
|
|
26
|
-
| Workflow failure handling | Error Trigger where its scope fits
|
|
16
|
+
| Source behavior | Open Flow building blocks | What determines a good fit |
|
|
17
|
+
| --------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------------------------------ |
|
|
18
|
+
| Scheduled, webhook or provider event | Cron, Webhook, Poll or Integration Trigger | Schedule/timezone, event payload, delivery and response behavior. |
|
|
19
|
+
| Provider read or write | Connector | Exact operation, input/output shape, account and number of calls. |
|
|
20
|
+
| Field shaping, filtering, aggregation or join | Code with named input/output fields | Explicit collection representation, ordering, keys and empty-input behavior. |
|
|
21
|
+
| IF or Switch | Condition and named execution branches | Predicate, first/all matches, fallback route and data sent onward. |
|
|
22
|
+
| Prompt plus model and output parser | LLM with template, inputs and `resultSchema` | Supported model, result shape and any parser repair behavior. |
|
|
23
|
+
| Agent with tools or memory | Agent where its current contract fits | Tool permissions, state lifetime and how context is supplied. |
|
|
24
|
+
| HTTP request | `http-request`, or `openapi` for a documented operation | Method, parameters, auth, response format and error behavior. |
|
|
25
|
+
| Human response or durable pause | Wait or Approval | Who resumes it, payload, timing, notification and external response lifecycle. |
|
|
26
|
+
| Workflow failure handling | Error Trigger where its scope fits | Which failures trigger it and what failure data it receives. |
|
|
27
27
|
|
|
28
28
|
Use `schema TYPE` and provider discovery for the actual deployment. A node's
|
|
29
29
|
name alone does not establish equivalence. Provider operations can differ even
|
|
@@ -120,10 +120,14 @@ inside URLs, headers, expressions or Code; keep those out of Drafts and reports.
|
|
|
120
120
|
Use supported credential bindings for the selected operation. A missing account
|
|
121
121
|
can leave a Draft incomplete without implying that the action itself is absent.
|
|
122
122
|
|
|
123
|
-
For HTTP Request conversion, `schema
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
123
|
+
For HTTP Request conversion, `schema http-request` describes a single request's
|
|
124
|
+
method, parameter modes, body, authentication and response handling. Bind `url`,
|
|
125
|
+
request parameters and body through public inputs. Authentication inputs require
|
|
126
|
+
variables or upstream outputs. Query arrays become repeated parameters; response
|
|
127
|
+
arrays remain one value. The first version does not follow redirects or support
|
|
128
|
+
pagination, files, OAuth or direct Agent tools. Check these requirements before
|
|
129
|
+
calling the conversion equivalent. Use `schema openapi` when an actual operation
|
|
130
|
+
contract is available; do not invent an API specification to make a request.
|
|
127
131
|
|
|
128
132
|
A provider event may expose an ID where the source expected a full record. A
|
|
129
133
|
Connector read can supply the missing data if it preserves the desired behavior.
|