@oomol-lab/open-flow 0.1.0-beta.75 → 0.1.0-beta.77

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.
Files changed (146) hide show
  1. package/README.md +3 -1
  2. package/dist/browser/{ContentIcon-FCpKiwjp.js → ContentIcon-VZQO8VZU.js} +9 -6
  3. package/dist/browser/{FlowCanvas-dzRBnlUT.js → FlowCanvas-BNGDMaWr.js} +75 -63
  4. package/dist/browser/{createResourceDialog-BeYDdUl-.js → createResourceDialog-BmtakfVg.js} +63 -57
  5. package/dist/browser/{dialog-ZtpsFbl4.js → dialog-BcFBfRB1.js} +126 -32
  6. package/dist/browser/{exportSvg-DqXw1yf-.js → exportSvg-CG8hEUNk.js} +2 -2
  7. package/dist/browser/{flowChanges-b_5UobFj.js → flowChanges-BGo_4Ypo.js} +6063 -11285
  8. package/dist/browser/{flowWorkspace-ItojZbO4.js → flowWorkspace-BFHGev7s.js} +1065 -2570
  9. package/dist/browser/preview.css +626 -653
  10. package/dist/browser/preview.js +1907 -9663
  11. package/dist/browser/theme.css +117 -263
  12. package/dist/browser/{tooltip-wZJRB9oP.js → tooltip-BAWSUexx.js} +2 -2
  13. package/dist/browser/{typeScriptSession-CSRwWmZm.js → typeScriptSession-CRoezJPN.js} +1 -1
  14. package/dist/browser/ui.css +464 -463
  15. package/dist/browser/ui.js +4 -3
  16. package/dist/browser/workbench.css +9891 -9897
  17. package/dist/browser/workbench.d.ts +6 -2
  18. package/dist/browser/workbench.js +838 -499
  19. package/dist/browser/{workbenchSelect-M441Lz0d.js → workbenchSelect-CjK-xdm3.js} +2 -2
  20. package/dist/command/index.js +48 -50
  21. package/dist/common/authoring.d.ts +5 -5
  22. package/dist/common/authoringExamples.d.ts +3 -2
  23. package/dist/common/authoringSchema.d.ts +26 -4
  24. package/dist/common/connector-proxy.d.ts +1 -1
  25. package/dist/common/control-api-conformance.js +352 -144
  26. package/dist/common/control-api-errors.d.ts +12 -0
  27. package/dist/common/control-api.d.ts +38 -4
  28. package/dist/common/control-api.js +373 -162
  29. package/dist/common/control-requests.d.ts +22 -3
  30. package/dist/common/control-requests.js +268 -28
  31. package/dist/common/cron-trigger.d.ts +2 -1
  32. package/dist/common/decision.d.ts +4 -4
  33. package/dist/common/decision.js +5 -2
  34. package/dist/common/engine-contract.d.ts +6 -1
  35. package/dist/common/event-source-definition.d.ts +1 -1
  36. package/dist/common/event-source-view.d.ts +22 -0
  37. package/dist/common/event-source.d.ts +1 -1
  38. package/dist/common/event-source.js +24 -65
  39. package/dist/common/event-sources.d.ts +0 -21
  40. package/dist/common/flow-authoring.js +90 -20
  41. package/dist/common/flow-change-schema.d.ts +9 -1
  42. package/dist/common/flow-change.d.ts +8 -202
  43. package/dist/common/flow-change.js +96 -24
  44. package/dist/common/flow-encoding.js +89 -21
  45. package/dist/common/flow-input-value.d.ts +1 -1
  46. package/dist/common/flow-model.d.ts +121 -0
  47. package/dist/common/flow-notifications.d.ts +1 -1
  48. package/dist/common/flow-retry.d.ts +2 -4
  49. package/dist/common/flow-semantics.js +161 -80
  50. package/dist/common/flow-state.d.ts +123 -0
  51. package/dist/common/flow-state.js +5852 -0
  52. package/dist/common/flow-workflowReferences.d.ts +8 -0
  53. package/dist/common/flowInspection.d.ts +1 -1
  54. package/dist/common/http-hosts.d.ts +6 -0
  55. package/dist/common/http-request.d.ts +13 -5
  56. package/dist/common/http-request.js +23 -5
  57. package/dist/common/integration-trigger.d.ts +2 -1
  58. package/dist/common/mcp.d.ts +96 -3
  59. package/dist/common/mcp.js +355 -142
  60. package/dist/common/openapi.d.ts +4 -4
  61. package/dist/common/openapi.js +4 -1
  62. package/dist/common/poll-trigger.d.ts +2 -1
  63. package/dist/common/run-events.js +1 -0
  64. package/dist/common/runtime-contract.d.ts +37 -1
  65. package/dist/common/runtime-contract.js +717 -72
  66. package/dist/common/runtime-nodejs-compat.d.ts +44 -0
  67. package/dist/common/runtime-nodejs-compat.js +5870 -0
  68. package/dist/common/scheduler-checkpoint.d.ts +1 -1
  69. package/dist/common/scheduler-node-execution.d.ts +2 -1
  70. package/dist/common/scheduler.d.ts +2 -2
  71. package/dist/common/scheduler.js +76 -6
  72. package/dist/common/state-conformance.d.ts +16 -0
  73. package/dist/common/tags.d.ts +4 -0
  74. package/dist/common/trigger-catalog.d.ts +1 -7
  75. package/dist/common/trigger-config-options.d.ts +1 -1
  76. package/dist/common/trigger-config.d.ts +1 -1
  77. package/dist/common/trigger-contract.d.ts +2 -1
  78. package/dist/common/trigger-localization.d.ts +8 -2
  79. package/dist/common/trigger-model.d.ts +101 -0
  80. package/dist/common/webhook-response.d.ts +1 -1
  81. package/dist/common/webhook-trigger.d.ts +3 -1
  82. package/dist/common/workflow.d.ts +3 -12
  83. package/dist/common/workflow.js +25 -23
  84. package/dist/index.d.ts +52 -14
  85. package/package.json +9 -1
  86. package/src/base/common/json.ts +1 -1
  87. package/src/connector/common/proxy.ts +1 -1
  88. package/src/control/common/api.ts +90 -16
  89. package/src/control/common/authoring.ts +6 -1
  90. package/src/control/common/authoringExamples.ts +8 -0
  91. package/src/control/common/authoringSchema.ts +26 -13
  92. package/src/control/common/authoringTools.ts +1 -1
  93. package/src/control/common/conformance.ts +1 -1
  94. package/src/control/common/connectorDecoders.ts +1 -1
  95. package/src/control/common/errors.ts +6 -0
  96. package/src/control/common/eventSources.ts +2 -29
  97. package/src/control/common/flowDecoders.ts +1 -0
  98. package/src/control/common/mcp.ts +16 -0
  99. package/src/control/common/requests.ts +10 -2
  100. package/src/control/common/tags.ts +20 -0
  101. package/src/control/common/triggerCatalog.ts +1 -8
  102. package/src/decision/common/decision.ts +15 -7
  103. package/src/event-source/common/definition.ts +1 -1
  104. package/src/event-source/common/index.ts +1 -1
  105. package/src/event-source/common/view.ts +20 -0
  106. package/src/execution/common/checkpoint.ts +1 -1
  107. package/src/execution/common/events.ts +3 -0
  108. package/src/execution/common/node-execution.ts +4 -1
  109. package/src/execution/common/scheduler.ts +3 -1
  110. package/src/flow/common/change.ts +60 -193
  111. package/src/flow/common/changeSchema.ts +39 -4
  112. package/src/flow/common/connectionUsage.ts +1 -1
  113. package/src/flow/common/errorHandling.ts +1 -1
  114. package/src/flow/common/inputValue.ts +1 -1
  115. package/src/flow/common/model.ts +130 -0
  116. package/src/flow/common/modules.ts +1 -1
  117. package/src/flow/common/portChanges.ts +1 -1
  118. package/src/flow/common/retry.ts +2 -4
  119. package/src/flow/common/semantics.ts +31 -4
  120. package/src/flow/common/webhookResponse.ts +1 -1
  121. package/src/flow/common/workflowReferences.ts +31 -0
  122. package/src/http/common/authBindings.ts +6 -9
  123. package/src/http/common/hosts.ts +13 -0
  124. package/src/http/common/httpRequest.ts +30 -15
  125. package/src/openapi/common/openapi.ts +9 -5
  126. package/src/{execution → runtime}/common/engineContract.ts +23 -15
  127. package/src/runtime/common/nodejsCompat.ts +275 -0
  128. package/src/runtime/common/nodejsGuest.generated.json +47 -0
  129. package/src/runtime/common/runtime.ts +1254 -0
  130. package/src/state/common/conformance.ts +86 -0
  131. package/src/state/common/state.ts +169 -0
  132. package/src/trigger/common/config.ts +1 -1
  133. package/src/trigger/common/configOptions.ts +1 -1
  134. package/src/trigger/common/contract.ts +2 -1
  135. package/src/trigger/common/cron.ts +2 -1
  136. package/src/trigger/common/integration.ts +2 -1
  137. package/src/trigger/common/model.ts +87 -0
  138. package/src/trigger/common/poll.ts +2 -1
  139. package/src/trigger/common/webhook.ts +3 -1
  140. package/src/trigger/providers/fieldDescriptions.ts +1 -1
  141. package/src/trigger/providers/localization.ts +9 -2
  142. package/src/trigger/providers/remote.ts +1 -1
  143. package/src/types/index.ts +55 -15
  144. package/src/workflow/common/workflow.ts +3 -44
  145. package/src/execution/common/runtime.ts +0 -563
  146. /package/src/{control → connector}/common/providerIconSprite.ts +0 -0
@@ -1,5 +1,5 @@
1
1
  import { a as toPlainObject, i as isString } from "./dist-BFmpkX4P.js";
2
- import { $ as useAnchoredPopupScrollLock, A as string, An as ownerDocument, At as useTriggerDataForwarding, Bn as useValueChanged, Br as isElement, C as literal, Cn as activeElement, Cr as useRenderElement, Ct as useSyncedFloatingRootContext, D as preprocess, Dt as PopupTriggerMap, E as object, Er as NOOP, Et as popupStoreSelectors, F as IndexGuessBehavior, Ft as FloatingFocusManager, Gn as closePress, Ht as FloatingPortal, I as useCompositeListItem, Ir as useStableCallback, Jn as imperativeAction, Jt as ReactStore, Ln as transitionStatusMapping, Lr as useRefWithInit, M as unknown, Mn as createLucideIcon, Mr as formatErrorMessage, Mt as platform, N as _isoDateTime, Nn as useTransitionStatus, Nr as mergeProps, Nt as useDismiss, O as record$1, Or as useMergedRefs, Ot as useImplicitActiveTrigger, P as Separator, Pn as useOpenChangeComplete, Pr as useIsoLayoutEffect, Pt as useClick, Q as useToolbarRootContext, Qn as itemPress, Rn as useAnimationFrame, T as number, Tn as getTarget, Tr as EMPTY_OBJECT, Tt as createInitialPopupStoreState, U as COMPOSITE_KEYS, Un as cancelOpen, Ut as CLICK_TRIGGER_IDENTIFIER, Vn as createChangeEventDetails, Wt as DROPDOWN_COLLISION_AVOIDANCE, Xt as useStore, Yt as Store, _ as array, _r as useControlled, _t as useRole, an as useTimeout, br as cn, cr as useFormContext, ct as inertValue, dr as useBaseUiId, dt as popupStateMapping, er as none, et as useScrollLock, f as isTimeZone, ft as pressableTriggerOpenStateMapping, g as _enum, gr as visuallyHiddenInput, gt as useTypeahead, h as ZodType, hr as visuallyHidden, i as TooltipTrigger, it as useAnchorPositioning, j as union, jn as Check, k as strictObject, kn as isWebKit, kr as useButton, kt as useOpenStateTransitions, lr as useRegisterFieldControl, lt as getPseudoElementBounds, m as ZodISODateTime, mr as fieldValidityMapping, mt as useOpenInteractionType, n as TooltipContent, nn as useValueAsRef, nt as getDisabledMountTransitionStyles, or as windowResize, ot as useDirection, pt as triggerOpenStateMapping, qt as addEventListener, rn as useOnFirstRender, rt as InternalBackdrop, sr as useLabelableContext, st as CompositeList, t as Tooltip, tn as createSelector, tt as usePositioner, ur as useFieldRootContext, ut as CommonPopupDataAttributes, v as boolean, vr as Button, vt as useListNavigation, w as never, wn as contains, wr as EMPTY_ARRAY, wt as useFloatingRootContext, x as json$1, xn as getFloatingFocusElement, xr as cva, y as discriminatedUnion, yn as rectToClientRect, yr as buttonVariants, yt as useInteractions, zr as getWindow } from "./tooltip-wZJRB9oP.js";
2
+ import { $ as useToolbarRootContext, $n as itemPress, A as strictObject, An as isWebKit, Ar as useButton, At as useOpenStateTransitions, Br as getWindow, D as object, Dr as NOOP, Dt as popupStoreSelectors, E as number, En as getTarget, Er as EMPTY_OBJECT, Et as createInitialPopupStoreState, F as Separator, Fn as useOpenChangeComplete, Fr as useIsoLayoutEffect, Ft as useClick, Gt as DROPDOWN_COLLISION_AVOIDANCE, Hn as createChangeEventDetails, I as IndexGuessBehavior, It as FloatingFocusManager, Jt as addEventListener, Kn as closePress, L as useCompositeListItem, Lr as useStableCallback, M as union, Mn as Check, N as unknown, Nn as createLucideIcon, Nr as formatErrorMessage, Nt as platform, O as preprocess, Ot as PopupTriggerMap, P as _isoDateTime, Pn as useTransitionStatus, Pr as mergeProps, Pt as useDismiss, Rn as transitionStatusMapping, Rr as useRefWithInit, S as json$1, Sn as getFloatingFocusElement, Sr as cva, T as never, Tn as contains, Tr as EMPTY_ARRAY, Tt as useFloatingRootContext, Ut as FloatingPortal, Vn as useValueChanged, Vr as isElement, W as COMPOSITE_KEYS, Wn as cancelOpen, Wt as CLICK_TRIGGER_IDENTIFIER, Xt as Store, Yn as imperativeAction, Yt as ReactStore, Zt as useStore, _ as _null, _r as visuallyHiddenInput, _t as useTypeahead, at as useAnchorPositioning, b as discriminatedUnion, bn as rectToClientRect, br as buttonVariants, bt as useInteractions, cr as useLabelableContext, ct as CompositeList, dr as useFieldRootContext, dt as CommonPopupDataAttributes, et as useAnchoredPopupScrollLock, f as isTimeZone, fr as useBaseUiId, ft as popupStateMapping, g as _enum, gr as visuallyHidden, h as ZodType, hr as fieldValidityMapping, ht as useOpenInteractionType, i as TooltipTrigger, in as useOnFirstRender, it as InternalBackdrop, j as string, jn as ownerDocument, jt as useTriggerDataForwarding, k as record$1, kr as useMergedRefs, kt as useImplicitActiveTrigger, lr as useFormContext, lt as inertValue, m as ZodISODateTime, mt as triggerOpenStateMapping, n as TooltipContent, nn as createSelector, nt as usePositioner, on as useTimeout, pt as pressableTriggerOpenStateMapping, rn as useValueAsRef, rt as getDisabledMountTransitionStyles, sr as windowResize, st as useDirection, t as Tooltip, tr as none, tt as useScrollLock, ur as useRegisterFieldControl, ut as getPseudoElementBounds, v as array, vr as useControlled, vt as useRole, w as literal, wn as activeElement, wr as useRenderElement, wt as useSyncedFloatingRootContext, xr as cn, y as boolean, yr as Button, yt as useListNavigation, zn as useAnimationFrame } from "./tooltip-BAWSUexx.js";
3
3
  import * as React from "react";
4
4
  import { useMemo } from "react";
5
5
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
@@ -2310,6 +2310,11 @@ function SelectScrollDownButton({ className, ...props }) {
2310
2310
  });
2311
2311
  }
2312
2312
  //#endregion
2313
+ //#region ../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/classic/iso.js
2314
+ function datetime(params) {
2315
+ return _isoDateTime(ZodISODateTime, params);
2316
+ }
2317
+ //#endregion
2313
2318
  //#region ../../node_modules/.bun/dequal@2.0.3/node_modules/dequal/lite/index.mjs
2314
2319
  var has = Object.prototype.hasOwnProperty;
2315
2320
  function dequal(foo, bar) {
@@ -2333,11 +2338,71 @@ function dequal(foo, bar) {
2333
2338
  }
2334
2339
  return foo !== foo && bar !== bar;
2335
2340
  }
2336
- //#endregion
2337
- //#region ../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/classic/iso.js
2338
- function datetime(params) {
2339
- return _isoDateTime(ZodISODateTime, params);
2341
+ strictObject({
2342
+ scope: _enum(["draft", "live"]),
2343
+ values: boolean().optional()
2344
+ });
2345
+ strictObject({
2346
+ scope: _enum(["draft", "live"]),
2347
+ key: string().min(1).refine((key) => new TextEncoder().encode(key).length <= 256).optional()
2348
+ });
2349
+ strictObject({
2350
+ scope: _enum(["draft", "live"]),
2351
+ space: string().regex(/^(flow|node:.+)$/)
2352
+ });
2353
+ var dedupeConfigSchema = strictObject({
2354
+ field: string().default(""),
2355
+ mode: _enum(["new", "increasing"]).default("new"),
2356
+ space: _enum(["node", "flow"]).default("node")
2357
+ });
2358
+ var dedupeExecutorSchema = dedupeConfigSchema.extend({ kind: literal("dedupe") });
2359
+ function dedupeTask(config = dedupeConfigSchema.parse({}), name = "Remove Duplicates") {
2360
+ return {
2361
+ name,
2362
+ executor: {
2363
+ ...config,
2364
+ kind: "dedupe"
2365
+ },
2366
+ inputs: [{
2367
+ handle: "items",
2368
+ jsonSchema: { type: "array" },
2369
+ nullable: false
2370
+ }],
2371
+ outputs: ["items", "duplicates"].map((handle) => ({
2372
+ handle,
2373
+ jsonSchema: { type: "array" },
2374
+ nullable: false
2375
+ }))
2376
+ };
2340
2377
  }
2378
+ var flowStateViewSchema = object({
2379
+ version: literal(1),
2380
+ scope: _enum(["draft", "live"]),
2381
+ limits: object({
2382
+ maxValueBytes: number().positive(),
2383
+ maxValues: number().int().positive(),
2384
+ maxSpaces: number().int().positive(),
2385
+ maxIdentities: number().positive(),
2386
+ maxRunWrites: number().positive()
2387
+ }),
2388
+ values: array(object({
2389
+ key: string(),
2390
+ size: number().nonnegative(),
2391
+ updatedAt: number(),
2392
+ value: json$1().optional()
2393
+ })),
2394
+ spaces: array(object({
2395
+ space: string(),
2396
+ mode: _enum(["new", "increasing"]),
2397
+ count: number().nonnegative(),
2398
+ watermark: union([
2399
+ string(),
2400
+ number(),
2401
+ _null()
2402
+ ]),
2403
+ updatedAt: number()
2404
+ }))
2405
+ });
2341
2406
  //#endregion
2342
2407
  //#region ../../node_modules/.bun/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/deep-compare-strict.js
2343
2408
  function deepCompareStrict(a, b) {
@@ -6290,6 +6355,9 @@ function webhookSupportsBody(method) {
6290
6355
  }
6291
6356
  //#endregion
6292
6357
  //#region src/decision/common/decision.ts
6358
+ function isDecisionExecutor(executor) {
6359
+ return executor.kind === "decision";
6360
+ }
6293
6361
  var decisionModel = "typesafe/jev";
6294
6362
  var decisionLimits = {
6295
6363
  choice: 255,
@@ -6313,7 +6381,7 @@ function limitDecisionQuestions(questions) {
6313
6381
  }
6314
6382
  /** Loading an oversized task also updates its previously generated output schemas. */
6315
6383
  function limitDecisionTask(task) {
6316
- if (task.executor.kind !== "decision") return task;
6384
+ if (!isDecisionExecutor(task.executor)) return task;
6317
6385
  const original = task.executor.questions;
6318
6386
  const questions = limitDecisionQuestions(original);
6319
6387
  if (questions === original) return task;
@@ -6438,12 +6506,17 @@ function decisionTask(questions = [defaultDecisionQuestion()], name = "AI Decisi
6438
6506
  }
6439
6507
  //#endregion
6440
6508
  //#region src/http/common/authBindings.ts
6441
- /** Never allow credentials to enter a Revision as literal node inputs. */
6442
- function assertHttpAuthBindings(document) {
6443
- for (const node of Object.values(document.graph.nodes)) {
6444
- if (node.kind != "task" || !("executor" in node.task) || !["openapi", "http-request"].includes(node.task.executor.kind)) continue;
6445
- for (const [handle, mapping] of Object.entries(node.inputs)) if (handle.startsWith("auth.") && mapping.kind == "value") throw new TypeError("HTTP authentication accepts deployment variables and upstream outputs only.");
6446
- }
6509
+ /** Never allow credentials to enter a Revision as literal inputs of an OpenAPI or HTTP request node. */
6510
+ function assertHttpAuthBindings(inputs) {
6511
+ for (const [handle, mapping] of Object.entries(inputs)) if (handle.startsWith("auth.") && mapping.kind == "value") throw new TypeError("HTTP authentication accepts deployment variables and upstream outputs only.");
6512
+ }
6513
+ //#endregion
6514
+ //#region src/http/common/hosts.ts
6515
+ /** Hosts of a Code `http` Capability: lowercase DNS names or IPv4 addresses; `*.example.com` matches subdomains only. */
6516
+ var httpHostPattern = /^(?:\*\.)?(?=.{1,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)*[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/;
6517
+ /** Wildcards must name a registrable suffix, so `*.com` is rejected. */
6518
+ function isHttpHost(value) {
6519
+ return httpHostPattern.test(value) && (!value.startsWith("*.") || value.slice(2).includes("."));
6447
6520
  }
6448
6521
  //#endregion
6449
6522
  //#region src/flow/common/portChanges.ts
@@ -6673,10 +6746,14 @@ function httpRequestInputs(mappings, previous, next) {
6673
6746
  const rename = candidate != null && ["query.", "header."].some((prefix) => candidate.every((name) => name.startsWith(prefix))) ? candidate : void 0;
6674
6747
  return remapInputMappings(mappings, next.inputs, rename);
6675
6748
  }
6749
+ function httpRequestExecutor(node) {
6750
+ const executor = node.task.executor;
6751
+ return executor?.kind === "http-request" ? executor : void 0;
6752
+ }
6676
6753
  /** The object editor assembles named inputs without changing unrelated request settings. */
6677
6754
  function withHttpParameterFields(node, group, values) {
6678
- if (!("executor" in node.task) || node.task.executor.kind !== "http-request") return node;
6679
- const config = node.task.executor;
6755
+ const config = httpRequestExecutor(node);
6756
+ if (config == null) return node;
6680
6757
  const task = httpRequestTask({
6681
6758
  ...config,
6682
6759
  [group]: {
@@ -6701,9 +6778,10 @@ function withHttpParameterFields(node, group, values) {
6701
6778
  };
6702
6779
  }
6703
6780
  function withHttpParameterSource(node, group, mapping) {
6704
- if (!("executor" in node.task) || node.task.executor.kind !== "http-request") return node;
6781
+ const config = httpRequestExecutor(node);
6782
+ if (config == null) return node;
6705
6783
  const task = httpRequestTask({
6706
- ...node.task.executor,
6784
+ ...config,
6707
6785
  [group]: {
6708
6786
  mode: "object",
6709
6787
  names: []
@@ -6928,7 +7006,15 @@ var workflowCapabilitySchema = strictObject({
6928
7006
  inputs: array(port),
6929
7007
  outputs: array(port).nullable()
6930
7008
  });
6931
- var capability = union([connectorCapabilitySchema, workflowCapabilitySchema]);
7009
+ var httpCapabilitySchema = strictObject({
7010
+ kind: literal("http"),
7011
+ hosts: array(text.refine(isHttpHost, "Use a lowercase host name or IPv4 address, optionally prefixed by \"*.\" for subdomains.")).min(1).max(20).describe("Hosts Code may call with context.fetch. \"*.example.com\" matches subdomains only.")
7012
+ });
7013
+ var capability = union([
7014
+ connectorCapabilitySchema,
7015
+ workflowCapabilitySchema,
7016
+ httpCapabilitySchema
7017
+ ]);
6932
7018
  var inline = object({
6933
7019
  ...ports,
6934
7020
  name: text,
@@ -7039,7 +7125,8 @@ var managedFields = object({
7039
7125
  flowId: text,
7040
7126
  revisionId: text
7041
7127
  }),
7042
- httpRequestExecutorSchema
7128
+ httpRequestExecutorSchema,
7129
+ dedupeExecutorSchema
7043
7130
  ])
7044
7131
  });
7045
7132
  var managed = managedFields.transform(limitDecisionTask);
@@ -7308,7 +7395,9 @@ var revision = object({
7308
7395
  literal(8),
7309
7396
  literal(9),
7310
7397
  literal(10),
7311
- literal(11)
7398
+ literal(11),
7399
+ literal(12),
7400
+ literal(13)
7312
7401
  ]),
7313
7402
  document,
7314
7403
  modules: record$1(text, module)
@@ -7339,7 +7428,7 @@ function decodeRevisionContent(value) {
7339
7428
  checkJsonDepth(value);
7340
7429
  const content = revision.parse(value);
7341
7430
  checkModelVersion(content);
7342
- assertHttpAuthBindings(content.document);
7431
+ assertDocumentHttpAuthBindings(content.document);
7343
7432
  return content;
7344
7433
  }
7345
7434
  var shapes = {
@@ -7510,6 +7599,8 @@ var variants = new Map(Object.entries(shapes).map(([kind, shape]) => [kind, shap
7510
7599
  })]));
7511
7600
  array(union([...variants.values()])).min(1);
7512
7601
  function checkModelVersion(content) {
7602
+ if (content.modelVersion < 13 && Object.values(content.document.graph.nodes).some((candidateNode) => candidateNode.kind === "task" && "executor" in candidateNode.task && candidateNode.task.executor.kind === "dedupe")) throw new Error("Deduplication requires Flow model v13.");
7603
+ if (content.modelVersion < 12 && Object.values(content.document.graph.nodes).some((candidateNode) => candidateNode.kind == "task" && "moduleId" in candidateNode.task && candidateNode.task.capabilities?.some((item) => item.kind == "http"))) throw new TypeError("Code HTTP access requires Flow model version 12.");
7513
7604
  if (content.modelVersion < 11 && Object.values(content.document.graph.nodes).some((candidateNode) => candidateNode.kind == "task" && "executor" in candidateNode.task && candidateNode.task.executor.kind == "http-request")) throw new TypeError("HTTP Request requires Flow model version 11.");
7514
7605
  if (content.modelVersion < 11 && Object.values(content.document.graph.nodes).some((candidateNode) => candidateNode.kind == "task" && ("moduleId" in candidateNode.task ? candidateNode.task.capabilities?.some((item) => item.kind == "workflow") : candidateNode.task.executor.kind == "agent" && candidateNode.task.executor.tools.some((item) => item.kind == "workflow")))) throw new TypeError("Workflow tools require Flow model version 11.");
7515
7606
  if (content.modelVersion < 10 && Object.values(content.document.graph.nodes).some((candidateNode) => candidateNode.kind == "webhook" && (candidateNode.options?.responseBody != null || candidateNode.options?.responseStatusCodeOutput != null || candidateNode.options?.responseHeadersSource != null || candidateNode.options?.responseHeaderOutputs != null))) throw new TypeError("Dynamic Webhook responses require Flow model version 10.");
@@ -7525,6 +7616,9 @@ function checkModelVersion(content) {
7525
7616
  if (content.modelVersion < 6 && Object.values(content.document.graph.nodes).some((candidateNode) => candidateNode.kind == "task" && "executor" in candidateNode.task)) throw new TypeError("Node-owned managed Tasks require Flow model version 6.");
7526
7617
  if (content.modelVersion < 5 && Object.values(content.document.graph.nodes).some((itemNode) => itemNode.kind == "error")) throw new TypeError("Error workflows require Flow model version 5.");
7527
7618
  }
7619
+ function assertDocumentHttpAuthBindings(content) {
7620
+ for (const graphNode of Object.values(content.graph.nodes)) if (graphNode.kind == "task" && "executor" in graphNode.task && ["openapi", "http-request"].includes(graphNode.task.executor.kind)) assertHttpAuthBindings(graphNode.inputs);
7621
+ }
7528
7622
  //#endregion
7529
7623
  //#region src/flow/common/condition.ts
7530
7624
  var otherwiseOutput = "otherwise";
@@ -7745,7 +7839,7 @@ var nodeErrorSchema = {
7745
7839
  }
7746
7840
  };
7747
7841
  function supportsNodeErrorHandling(node) {
7748
- return supportsNodeRetry(node);
7842
+ return supportsNodeRetry(node) || node.kind === "task" && "executor" in node.task && node.task.executor.kind === "dedupe";
7749
7843
  }
7750
7844
  function nodeSystemOutputPorts(node) {
7751
7845
  return supportsNodeErrorHandling(node) && node.onError == "error" ? { error: {
@@ -7763,9 +7857,6 @@ function resourceNameIssue(value) {
7763
7857
  }
7764
7858
  if (!/^[\p{L}\p{N}](?:[\p{L}\p{N} _-]*[\p{L}\p{N}])?$/u.test(name)) return "specialCharacter";
7765
7859
  }
7766
- function portsByHandle(ports) {
7767
- return Object.fromEntries(ports.flatMap((port) => "handle" in port ? [[port.handle, port]] : []));
7768
- }
7769
7860
  var workflowToolNamePattern = /^[A-Za-z][A-Za-z0-9_-]{0,63}$/;
7770
7861
  function workflowToolNameIssue(name, otherNames = []) {
7771
7862
  if (!workflowToolNamePattern.test(name)) return "invalid";
@@ -7781,6 +7872,8 @@ function decodeTaskCapabilities(value) {
7781
7872
  if (workflowToolNameIssue(item.name, names)) throw new TypeError("Workflow tool names must be unique provider-compatible names.");
7782
7873
  names.add(item.name);
7783
7874
  }
7875
+ const http = parsed.filter((item) => item.kind == "http");
7876
+ if (http.length > 1 || http.some((item) => new Set(item.hosts).size != item.hosts.length)) throw new TypeError("Code declares HTTP hosts once, without duplicates.");
7784
7877
  let connectorIndex = 0;
7785
7878
  return parsed.map((item) => item.kind == "connector" ? connectors[connectorIndex++] : item);
7786
7879
  }
@@ -7916,10 +8009,10 @@ function upgradeRevisionContent(content) {
7916
8009
  function upgradeDecodedRevisionContent(content) {
7917
8010
  const graph = content.document.graph;
7918
8011
  const hasManual = Object.values(graph.nodes).some((node) => node.kind == "manual");
7919
- if (!hasManual && content.modelVersion == 11) return content;
8012
+ if (!hasManual && content.modelVersion == 13) return content;
7920
8013
  return {
7921
8014
  ...content,
7922
- modelVersion: 11,
8015
+ modelVersion: 13,
7923
8016
  document: {
7924
8017
  ...content.document,
7925
8018
  graph: hasManual ? {
@@ -7966,7 +8059,7 @@ function invalid(message) {
7966
8059
  throw new FlowChangeError(message);
7967
8060
  }
7968
8061
  function applyFlowChanges(content, operations) {
7969
- const source = content.modelVersion != 11 || Object.values(content.document.graph.nodes).some((node) => node.kind == "manual") ? decodeRevisionContent(content) : content;
8062
+ const source = content.modelVersion != 13 || Object.values(content.document.graph.nodes).some((node) => node.kind == "manual") ? decodeRevisionContent(content) : content;
7970
8063
  const document = { ...source.document };
7971
8064
  const modules = { ...source.modules };
7972
8065
  for (const operation of operations) switch (operation.kind) {
@@ -8411,10 +8504,10 @@ function applyFlowChanges(content, operations) {
8411
8504
  break;
8412
8505
  }
8413
8506
  }
8414
- assertHttpAuthBindings(document);
8507
+ assertDocumentHttpAuthBindings(document);
8415
8508
  return upgradeDecodedRevisionContent({
8416
8509
  document,
8417
- modelVersion: 11,
8510
+ modelVersion: 13,
8418
8511
  modules
8419
8512
  });
8420
8513
  }
@@ -9259,10 +9352,11 @@ function DialogOverlay({ className, ...props }) {
9259
9352
  ...props
9260
9353
  });
9261
9354
  }
9262
- function DialogContent({ children, className, closeLabel = "Close", container, showCloseButton = true, ...props }) {
9355
+ var DialogContent = React.forwardRef(function DialogContent({ children, className, closeLabel = "Close", container, showCloseButton = true, ...props }, ref) {
9263
9356
  return /* @__PURE__ */ jsxs(DialogPortal, {
9264
9357
  container,
9265
9358
  children: [/* @__PURE__ */ jsx(DialogOverlay, {}), /* @__PURE__ */ jsxs(DialogPopup, {
9359
+ ref,
9266
9360
  "data-slot": "dialog-content",
9267
9361
  className: cn("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] grid-cols-[minmax(0,1fr)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-lg bg-popover [--ui-control-background:var(--ui-popover)] p-4 text-sm text-popover-foreground shadow-lg ring-1 ring-foreground/10 outline-none sm:max-w-sm transition-opacity duration-150 ease-out data-starting-style:opacity-0 data-ending-style:opacity-0 motion-reduce:transition-none", className),
9268
9362
  ...props,
@@ -9285,7 +9379,7 @@ function DialogContent({ children, className, closeLabel = "Close", container, s
9285
9379
  })] })]
9286
9380
  })]
9287
9381
  });
9288
- }
9382
+ });
9289
9383
  function DialogHeader({ className, ...props }) {
9290
9384
  return /* @__PURE__ */ jsx("div", {
9291
9385
  "data-slot": "dialog-header",
@@ -9315,4 +9409,4 @@ function DialogDescription({ className, ...props }) {
9315
9409
  });
9316
9410
  }
9317
9411
  //#endregion
9318
- export { waitAutoContinueSchema as $, useLabelableId as $t, clearConditionBindings as A, isSchemaKeyword as At, agentToolFields as B, SelectValue as Bt, resourceNameIssue as C, webhookMethods as Ct, nodeErrorSchema as D, portsAssignable as Dt, workflowToolNameIssue as E, matchesSchema as Et, operandHandle as F, SelectContent as Ft, workflowAgentToolSchema as G, stringifyAsValue as Gt, connectorAgentToolSchema as H, hasNullItemLabel as Ht, operatorsForType as I, SelectGroup as It, webhookResponseAllowsBody as J, findItemIndex as Jt, webhookHeaderValuePort as K, compareItemEquality as Kt, otherwiseOutput as L, SelectItem as Lt, conditionInputPorts as M, dequal as Mt, mapConditionSources as N, Select as Nt, nodeSystemOutputPorts as O, schemaObject as Ot, nodeInputMappings as P, SelectChevron as Pt, workflowOutputsPort as Q, Input as Qt, unaryOperator as R, SelectSeparator as Rt, portsByHandle as S, limitDecisionQuestions as St, upgradeRevisionContent as T, comparePorts as Tt, connectorCapabilitySchema as U, isGroupedItems as Ut, authoringDefinitionSchemas as V, resolveAriaLabelledBy as Vt, decodeRevisionContent as W, stringifyAsLabel as Wt, webhookResponseTimeout as X, selectedValueIncludes as Xt, webhookResponseInputs as Y, removeItem as Yt, webhookStatusCodePort as Z, Label as Zt, applyFlowChanges as _, decisionLimits as _t, DialogFooter as a, httpHeaderSchema as at, nodeNameIssue as b, decisionTask as bt, DialogTrigger as c, httpRequestInputs as ct, Field as d, withHttpParameterFields as dt, ChevronDown as en, defaultNodeRetry as et, FieldDescription as f, withHttpParameterSource as ft, FlowChangeError as g, renamedPort as gt, FieldLabel as h, renameOutputMapping as ht, DialogDescription as i, checkJsonDepth as it, comparisonIssue as j, format as jt, supportsNodeErrorHandling as k, variableInputCompatible as kt, Icon as l, httpRequestIssues as lt, FieldGroup as m, remapInputMappings as mt, DialogClose as n, retryConfigurationSchema as nt, DialogHeader as o, httpQuerySchema as ot, FieldError as p, httpHeaderNameIssue as pt, webhookHeadersPort as q, defaultItemEquality as qt, DialogContent as r, supportsNodeRetry as rt, DialogTitle as s, httpRequestConfigSchema as st, Dialog as t, nodeRetryLimits as tt, Spinner as u, httpRequestTask as ut, isTriggerNode as v, decisionModel as vt, upgradeManualTrigger as w, webhookSupportsBody as wt, normalizeNodeName as x, defaultDecisionQuestion as xt, nextNodeName as y, decisionQuestionIssues as yt, valueType as z, SelectTrigger as zt };
9412
+ export { waitAutoContinueSchema as $, removeItem as $t, comparisonIssue as A, variableInputCompatible as At, authoringDefinitionSchemas as B, SelectGroup as Bt, upgradeManualTrigger as C, limitDecisionQuestions as Ct, nodeSystemOutputPorts as D, matchesSchema as Dt, nodeErrorSchema as E, comparePorts as Et, operatorsForType as F, flowStateViewSchema as Ft, workflowAgentToolSchema as G, resolveAriaLabelledBy as Gt, connectorCapabilitySchema as H, SelectSeparator as Ht, otherwiseOutput as I, dequal as It, webhookResponseAllowsBody as J, stringifyAsLabel as Jt, webhookHeaderValuePort as K, hasNullItemLabel as Kt, unaryOperator as L, Select as Lt, mapConditionSources as M, format as Mt, nodeInputMappings as N, dedupeConfigSchema as Nt, supportsNodeErrorHandling as O, portsAssignable as Ot, operandHandle as P, dedupeTask as Pt, workflowOutputsPort as Q, findItemIndex as Qt, valueType as R, SelectChevron as Rt, resourceNameIssue as S, defaultDecisionQuestion as St, workflowToolNameIssue as T, webhookSupportsBody as Tt, decodeRevisionContent as U, SelectTrigger as Ut, connectorAgentToolSchema as V, SelectItem as Vt, httpCapabilitySchema as W, SelectValue as Wt, webhookResponseTimeout as X, compareItemEquality as Xt, webhookResponseInputs as Y, stringifyAsValue as Yt, webhookStatusCodePort as Z, defaultItemEquality as Zt, applyFlowChanges as _, isHttpHost as _t, DialogFooter as a, httpHeaderSchema as at, nodeNameIssue as b, decisionQuestionIssues as bt, DialogTrigger as c, httpRequestInputs as ct, Field as d, withHttpParameterFields as dt, selectedValueIncludes as en, defaultNodeRetry as et, FieldDescription as f, withHttpParameterSource as ft, FlowChangeError as g, renamedPort as gt, FieldLabel as h, renameOutputMapping as ht, DialogDescription as i, ChevronDown as in, checkJsonDepth as it, conditionInputPorts as j, isSchemaKeyword as jt, clearConditionBindings as k, schemaObject as kt, Icon as l, httpRequestIssues as lt, FieldGroup as m, remapInputMappings as mt, DialogClose as n, Input as nn, retryConfigurationSchema as nt, DialogHeader as o, httpQuerySchema as ot, FieldError as p, httpHeaderNameIssue as pt, webhookHeadersPort as q, isGroupedItems as qt, DialogContent as r, useLabelableId as rn, supportsNodeRetry as rt, DialogTitle as s, httpRequestConfigSchema as st, Dialog as t, Label as tn, nodeRetryLimits as tt, Spinner as u, httpRequestTask as ut, isTriggerNode as v, decisionLimits as vt, upgradeRevisionContent as w, webhookMethods as wt, normalizeNodeName as x, decisionTask as xt, nextNodeName as y, decisionModel as yt, agentToolFields as z, SelectContent as zt };
@@ -1,5 +1,5 @@
1
- import { n as IconImageCrossOriginContext, o as IconifyProvider } from "./ContentIcon-FCpKiwjp.js";
2
- import { t as FlowCanvas, v as CanvasStore } from "./FlowCanvas-dzRBnlUT.js";
1
+ import { n as IconImageCrossOriginContext, o as IconifyProvider } from "./ContentIcon-VZQO8VZU.js";
2
+ import { t as FlowCanvas, y as CanvasStore } from "./FlowCanvas-BNGDMaWr.js";
3
3
  import { createElement } from "react";
4
4
  import { createRoot } from "react-dom/client";
5
5
  //#region ../../node_modules/.bun/html-to-image@1.11.11/node_modules/html-to-image/es/util.js