@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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { resolveTriggerConfig, triggerConfigValues } from './trigger-config.js';
|
|
2
2
|
import type { ConnectorProxy } from './connector-proxy.js';
|
|
3
|
-
import type { JsonValue, TriggerKeySnapshot, TriggerSchedule } from '
|
|
3
|
+
import type { JsonValue, TriggerKeySnapshot, TriggerSchedule } from './flow-change.js';
|
|
4
4
|
import type { TriggerConfigOption, TriggerConfigOptionsContext } from './trigger-config-options.js';
|
|
5
5
|
export declare const maximumPollCheckpointBytes: number;
|
|
6
6
|
export declare const maximumPollDedupeKeyBytes = 1024;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { JsonValue } from '
|
|
1
|
+
import type { JsonValue } from './flow-change.js';
|
|
2
2
|
export type ResultCall = {
|
|
3
3
|
readonly id: string;
|
|
4
4
|
readonly kind: 'connector';
|
|
@@ -7,6 +7,10 @@ export type ResultCall = {
|
|
|
7
7
|
} | {
|
|
8
8
|
readonly id: string;
|
|
9
9
|
readonly kind: 'code';
|
|
10
|
+
} | {
|
|
11
|
+
readonly id: string;
|
|
12
|
+
readonly kind: 'workflow';
|
|
13
|
+
readonly flowId: string;
|
|
10
14
|
};
|
|
11
15
|
export interface ResultInfo {
|
|
12
16
|
readonly resultId: string;
|
|
@@ -17,6 +21,9 @@ export interface ResultInfo {
|
|
|
17
21
|
readonly action: string;
|
|
18
22
|
} | {
|
|
19
23
|
readonly kind: 'code';
|
|
24
|
+
} | {
|
|
25
|
+
readonly kind: 'workflow';
|
|
26
|
+
readonly flowId: string;
|
|
20
27
|
};
|
|
21
28
|
readonly bytes: number;
|
|
22
29
|
readonly digest: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CodeModule, ConnectorCapability, JsonValue } from '
|
|
1
|
+
import type { CodeModule, ConnectorCapability, TaskCapability, JsonValue } from './flow-change.js';
|
|
2
2
|
export { currentEngineContract, nodejsEngineContract, findEngineContract, type EngineContract } from './engine-contract.js';
|
|
3
3
|
export type RuntimeModule = Pick<CodeModule, 'imports' | 'source'>;
|
|
4
4
|
/** Snapshot a Task result before JSON transport can discard or coerce invalid values. */
|
|
@@ -11,6 +11,8 @@ export interface RuntimeProgram {
|
|
|
11
11
|
readonly modules: Readonly<Record<string, RuntimeModule>>;
|
|
12
12
|
}
|
|
13
13
|
export interface RuntimeCapabilityCall {
|
|
14
|
+
readonly nodeId?: string;
|
|
15
|
+
readonly jobId?: string;
|
|
14
16
|
readonly callId: string;
|
|
15
17
|
readonly invocationId: string;
|
|
16
18
|
readonly kind: string;
|
|
@@ -65,7 +67,7 @@ export interface AgentInvocation {
|
|
|
65
67
|
};
|
|
66
68
|
}
|
|
67
69
|
export interface RuntimeInvocation {
|
|
68
|
-
readonly capabilities?: readonly
|
|
70
|
+
readonly capabilities?: readonly TaskCapability[];
|
|
69
71
|
readonly capability: (call: RuntimeCapabilityCall) => Promise<RuntimeCapabilityResponse>;
|
|
70
72
|
readonly input: JsonValue;
|
|
71
73
|
readonly invocationId: string;
|
|
@@ -95,3 +97,7 @@ export interface DecisionTaskInvocation {
|
|
|
95
97
|
readonly version: 1;
|
|
96
98
|
}
|
|
97
99
|
export type InvokeDecisionTask = (invocation: DecisionTaskInvocation) => Promise<LlmTaskResult>;
|
|
100
|
+
/** Serialized into the sandbox alongside the strict JSON snapshot helper. */
|
|
101
|
+
export declare function createWorkflows(invoke: (payload: JsonValue) => Promise<RuntimeCapabilityResponse>): Readonly<{
|
|
102
|
+
call(name: string, input?: Readonly<Record<string, JsonValue>>): Promise<JsonValue>;
|
|
103
|
+
}>;
|
|
@@ -23,9 +23,10 @@ function dequal(foo, bar) {
|
|
|
23
23
|
}
|
|
24
24
|
//#endregion
|
|
25
25
|
//#region src/execution/common/engineContract.ts
|
|
26
|
-
var currentEngineContract = "open-flow-engine/
|
|
27
|
-
var nodejsEngineContract = "open-flow-engine/
|
|
26
|
+
var currentEngineContract = "open-flow-engine/v8";
|
|
27
|
+
var nodejsEngineContract = "open-flow-engine/v8/nodejs-compat-v1";
|
|
28
28
|
var currentContract = {
|
|
29
|
+
workflowTools: true,
|
|
29
30
|
waitAutoContinue: true,
|
|
30
31
|
webhookResponses: true,
|
|
31
32
|
platformExports: /* @__PURE__ */ new Set(["engineContract", "identity"]),
|
|
@@ -67,10 +68,16 @@ export function identity(value) { return value }
|
|
|
67
68
|
`
|
|
68
69
|
};
|
|
69
70
|
function findEngineContract(contract) {
|
|
70
|
-
if (contract == "open-flow-engine/
|
|
71
|
-
if (contract == "open-flow-engine/
|
|
71
|
+
if (contract == "open-flow-engine/v8") return currentContract;
|
|
72
|
+
if (contract == "open-flow-engine/v8/nodejs-compat-v1") return nodejsContract;
|
|
73
|
+
if (contract == "open-flow-engine/v7" || contract == "open-flow-engine/v7/nodejs-compat-v1") return {
|
|
74
|
+
...contract.endsWith("/nodejs-compat-v1") ? nodejsContract : currentContract,
|
|
75
|
+
workflowTools: false,
|
|
76
|
+
platformSource: `export const engineContract = ${JSON.stringify(contract)}\nexport function identity(value) { return value }\n`
|
|
77
|
+
};
|
|
72
78
|
if (contract == "open-flow-engine/v6" || contract == "open-flow-engine/v6/nodejs-compat-v1") return {
|
|
73
79
|
...contract == "open-flow-engine/v6" ? currentContract : nodejsContract,
|
|
80
|
+
workflowTools: false,
|
|
74
81
|
waitAutoContinue: false,
|
|
75
82
|
webhookResponses: false,
|
|
76
83
|
platformSource: `export const engineContract = ${JSON.stringify(contract)}
|
|
@@ -545,5 +552,15 @@ function resolveAction(declarations, payload) {
|
|
|
545
552
|
...connectionId == null ? {} : { connectionId }
|
|
546
553
|
};
|
|
547
554
|
}
|
|
555
|
+
/** Serialized into the sandbox alongside the strict JSON snapshot helper. */
|
|
556
|
+
function createWorkflows(invoke) {
|
|
557
|
+
return Object.freeze({ async call(name, input = {}) {
|
|
558
|
+
if (typeof name != "string" || input == null || typeof input != "object" || Array.isArray(input)) throw Object.assign(/* @__PURE__ */ new Error("Workflow name and input object are required."), { code: "capability.invalid" });
|
|
559
|
+
return (await invoke({
|
|
560
|
+
name,
|
|
561
|
+
input: snapshotRuntimeResult(input)
|
|
562
|
+
})).body;
|
|
563
|
+
} });
|
|
564
|
+
}
|
|
548
565
|
//#endregion
|
|
549
|
-
export { createActions, currentEngineContract, findEngineContract, nodejsEngineContract, nodejsRuntimeConformanceCases, resolveAction, runtimeConformanceCases, snapshotRuntimeResult };
|
|
566
|
+
export { createActions, createWorkflows, currentEngineContract, findEngineContract, nodejsEngineContract, nodejsRuntimeConformanceCases, resolveAction, runtimeConformanceCases, snapshotRuntimeResult };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Graph, JsonValue } from '
|
|
1
|
+
import type { Graph, JsonValue } from './flow-change.js';
|
|
2
2
|
import type { DependenciesCheckpoint } from './scheduler-dependencies.js';
|
|
3
3
|
import type { ExecutableNode } from './scheduler-node-execution.js';
|
|
4
4
|
import type { AgentCheckpoint } from './runtime-contract.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AgentConfig } from './flow-agent.js';
|
|
2
|
-
import type { Graph, GraphNode, JsonValue, TriggerNode } from '
|
|
2
|
+
import type { Graph, GraphNode, JsonValue, TriggerNode } from './flow-change.js';
|
|
3
3
|
import type { WebhookResponseSnapshot } from './webhook-response.js';
|
|
4
4
|
import type { FlowRunCheckpoint } from './scheduler-checkpoint.js';
|
|
5
5
|
import type { Dependencies } from './scheduler-dependencies.js';
|
|
@@ -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';
|
|
@@ -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
|
@@ -9672,7 +9672,7 @@ var ports = {
|
|
|
9672
9672
|
inputs: array(union([input, group])),
|
|
9673
9673
|
outputs: array(union([port, group]))
|
|
9674
9674
|
};
|
|
9675
|
-
var
|
|
9675
|
+
var connectorCapabilitySchema = union([
|
|
9676
9676
|
strictObject({
|
|
9677
9677
|
kind: literal("connector"),
|
|
9678
9678
|
action: text,
|
|
@@ -9704,6 +9704,15 @@ var capability = union([
|
|
|
9704
9704
|
})).optional()
|
|
9705
9705
|
})
|
|
9706
9706
|
]);
|
|
9707
|
+
var workflowCapabilitySchema = strictObject({
|
|
9708
|
+
kind: literal("workflow"),
|
|
9709
|
+
name: text,
|
|
9710
|
+
flowId: text,
|
|
9711
|
+
revisionId: text,
|
|
9712
|
+
inputs: array(port),
|
|
9713
|
+
outputs: array(port).nullable()
|
|
9714
|
+
});
|
|
9715
|
+
var capability = union([connectorCapabilitySchema, workflowCapabilitySchema]);
|
|
9707
9716
|
var inline = object({
|
|
9708
9717
|
...ports,
|
|
9709
9718
|
name: text,
|
|
@@ -9718,6 +9727,20 @@ var agentValue = union([object({
|
|
|
9718
9727
|
input: text
|
|
9719
9728
|
})]);
|
|
9720
9729
|
var agentInput$1 = union([agentValue, object({ kind: literal("model") })]);
|
|
9730
|
+
var agentToolFields = {
|
|
9731
|
+
id: text,
|
|
9732
|
+
name: text,
|
|
9733
|
+
description: text,
|
|
9734
|
+
approval: boolean(),
|
|
9735
|
+
inputs: array(input.extend({ source: agentInput$1 }))
|
|
9736
|
+
};
|
|
9737
|
+
var connectorAgentToolSchema = object({
|
|
9738
|
+
...agentToolFields,
|
|
9739
|
+
kind: literal("connector").optional(),
|
|
9740
|
+
action: text,
|
|
9741
|
+
connectionId: actionConnection.optional()
|
|
9742
|
+
});
|
|
9743
|
+
var workflowAgentToolSchema = workflowCapabilitySchema.extend(agentToolFields);
|
|
9721
9744
|
var decisionQuestion = discriminatedUnion("type", [
|
|
9722
9745
|
strictObject({
|
|
9723
9746
|
name: text,
|
|
@@ -9786,15 +9809,7 @@ var managedFields = object({
|
|
|
9786
9809
|
model: text,
|
|
9787
9810
|
prompt: text,
|
|
9788
9811
|
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
|
-
})),
|
|
9812
|
+
tools: array(union([workflowAgentToolSchema, connectorAgentToolSchema])),
|
|
9798
9813
|
notification: object({
|
|
9799
9814
|
action: text,
|
|
9800
9815
|
connectionId: actionConnection.optional(),
|
|
@@ -10059,7 +10074,8 @@ object({
|
|
|
10059
10074
|
literal(7),
|
|
10060
10075
|
literal(8),
|
|
10061
10076
|
literal(9),
|
|
10062
|
-
literal(10)
|
|
10077
|
+
literal(10),
|
|
10078
|
+
literal(11)
|
|
10063
10079
|
]),
|
|
10064
10080
|
document,
|
|
10065
10081
|
modules: record$1(text, module)
|
|
@@ -11379,7 +11395,10 @@ function agentApproval(config, checkpoint, inputs) {
|
|
|
11379
11395
|
return {
|
|
11380
11396
|
callId: checkpoint.callId,
|
|
11381
11397
|
toolId: tool.id,
|
|
11382
|
-
|
|
11398
|
+
...tool.kind == "workflow" ? {
|
|
11399
|
+
kind: "workflow",
|
|
11400
|
+
flowId: tool.flowId
|
|
11401
|
+
} : { action: tool.action },
|
|
11383
11402
|
...tool.connectionId == null ? {} : { connectionId: tool.connectionId },
|
|
11384
11403
|
input: checkpoint.input
|
|
11385
11404
|
};
|
|
@@ -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;
|
|
@@ -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';
|
|
@@ -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.74",
|
|
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",
|
|
@@ -82,12 +82,12 @@
|
|
|
82
82
|
"import": "./dist/common/provider-triggers.js"
|
|
83
83
|
},
|
|
84
84
|
"./flow-authoring": {
|
|
85
|
-
"types": "./dist/
|
|
86
|
-
"import": "./dist/
|
|
85
|
+
"types": "./dist/common/flow-authoring.d.ts",
|
|
86
|
+
"import": "./dist/common/flow-authoring.js"
|
|
87
87
|
},
|
|
88
88
|
"./flow-change": {
|
|
89
|
-
"types": "./dist/
|
|
90
|
-
"import": "./dist/
|
|
89
|
+
"types": "./dist/common/flow-change.d.ts",
|
|
90
|
+
"import": "./dist/common/flow-change.js"
|
|
91
91
|
},
|
|
92
92
|
"./flow-encoding": {
|
|
93
93
|
"types": "./dist/common/flow-encoding.d.ts",
|
|
@@ -152,6 +152,7 @@
|
|
|
152
152
|
},
|
|
153
153
|
"files": [
|
|
154
154
|
"dist",
|
|
155
|
+
"src",
|
|
155
156
|
"skills",
|
|
156
157
|
"README.md",
|
|
157
158
|
"NOTICE",
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
export type JsonValue = null | boolean | number | string | readonly JsonValue[] | JsonObject
|
|
2
|
+
|
|
3
|
+
export type JsonObject = { readonly [key: string]: JsonValue }
|
|
4
|
+
|
|
5
|
+
type Frame = {
|
|
6
|
+
readonly value: object
|
|
7
|
+
readonly keys: readonly (string | symbol)[]
|
|
8
|
+
readonly arrayLength: number | undefined
|
|
9
|
+
index: number
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function hasJsonShape(root: unknown): boolean {
|
|
13
|
+
if (root === null || typeof root == 'boolean' || typeof root == 'string') return true
|
|
14
|
+
if (typeof root == 'number') return Number.isFinite(root)
|
|
15
|
+
if (typeof root != 'object') return false
|
|
16
|
+
|
|
17
|
+
const ancestors = new Set<object>()
|
|
18
|
+
const pending: Frame[] = []
|
|
19
|
+
let value = root
|
|
20
|
+
|
|
21
|
+
traversal: while (true) {
|
|
22
|
+
let keys: readonly (string | symbol)[]
|
|
23
|
+
let arrayLength: number | undefined
|
|
24
|
+
if (Array.isArray(value)) {
|
|
25
|
+
arrayLength = value.length
|
|
26
|
+
keys = Reflect.ownKeys(value)
|
|
27
|
+
if (keys.length != arrayLength + 1) return false
|
|
28
|
+
} else {
|
|
29
|
+
const prototype = Reflect.getPrototypeOf(value)
|
|
30
|
+
if (prototype != Object.prototype && prototype != null) return false
|
|
31
|
+
keys = Reflect.ownKeys(value)
|
|
32
|
+
arrayLength = undefined
|
|
33
|
+
}
|
|
34
|
+
ancestors.add(value)
|
|
35
|
+
|
|
36
|
+
let index = 0
|
|
37
|
+
while (true) {
|
|
38
|
+
if (index >= keys.length) {
|
|
39
|
+
ancestors.delete(value)
|
|
40
|
+
const parent = pending.pop()
|
|
41
|
+
if (parent === undefined) return true
|
|
42
|
+
value = parent.value
|
|
43
|
+
keys = parent.keys
|
|
44
|
+
arrayLength = parent.arrayLength
|
|
45
|
+
index = parent.index
|
|
46
|
+
continue
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const key = keys[index++]!
|
|
50
|
+
if (arrayLength !== undefined) {
|
|
51
|
+
if (key == 'length') continue
|
|
52
|
+
if (typeof key != 'string') return false
|
|
53
|
+
const arrayIndex = Number(key)
|
|
54
|
+
if (!Number.isSafeInteger(arrayIndex) || arrayIndex < 0 || arrayIndex >= arrayLength || String(arrayIndex) != key) return false
|
|
55
|
+
} else if (typeof key != 'string') {
|
|
56
|
+
return false
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(value, key)
|
|
60
|
+
if (descriptor?.enumerable != true || !Object.hasOwn(descriptor, 'value')) return false
|
|
61
|
+
const child: unknown = descriptor.value
|
|
62
|
+
if (child === null || typeof child == 'boolean' || typeof child == 'string') continue
|
|
63
|
+
if (typeof child == 'number') {
|
|
64
|
+
if (!Number.isFinite(child)) return false
|
|
65
|
+
continue
|
|
66
|
+
}
|
|
67
|
+
if (typeof child != 'object' || ancestors.has(child)) return false
|
|
68
|
+
|
|
69
|
+
pending.push({ value, keys, arrayLength, index })
|
|
70
|
+
value = child
|
|
71
|
+
continue traversal
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function isJsonValue(value: unknown): value is JsonValue {
|
|
77
|
+
try {
|
|
78
|
+
return hasJsonShape(value)
|
|
79
|
+
} catch {
|
|
80
|
+
return false
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function isJsonObject(value: unknown): value is JsonObject {
|
|
85
|
+
try {
|
|
86
|
+
return value != null && typeof value == 'object' && !Array.isArray(value) && hasJsonShape(value)
|
|
87
|
+
} catch {
|
|
88
|
+
return false
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from 'zod'
|
|
2
|
+
|
|
3
|
+
export const canvasMinZoom = 0.1
|
|
4
|
+
export const canvasMaxZoom = 3
|
|
5
|
+
|
|
6
|
+
/** Transient operations on each connected canvas's own viewport. */
|
|
7
|
+
export const canvasCommandSchema = z.discriminatedUnion('type', [
|
|
8
|
+
z.strictObject({ type: z.literal('focus'), nodeId: z.string().min(1) }),
|
|
9
|
+
z.strictObject({ type: z.literal('zoom'), zoom: z.number().min(canvasMinZoom).max(canvasMaxZoom) }),
|
|
10
|
+
z.strictObject({ type: z.literal('pan'), dx: z.number(), dy: z.number() }),
|
|
11
|
+
z.strictObject({ type: z.literal('fit') }),
|
|
12
|
+
])
|
|
13
|
+
|
|
14
|
+
export type CanvasCommand = z.infer<typeof canvasCommandSchema>
|
|
15
|
+
export type CanvasCommandSubscriber = (execute: (command: CanvasCommand) => void) => () => void
|