@oomol-lab/open-flow 0.1.0-beta.77 → 0.1.0-beta.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/browser/{ContentIcon-VZQO8VZU.js → ContentIcon-CMn0c-kl.js} +93 -3
- package/dist/browser/{FlowCanvas-BNGDMaWr.js → FlowCanvas-BQGBcfoL.js} +1675 -591
- package/dist/browser/{createResourceDialog-BmtakfVg.js → createResourceDialog-DCGxfKFM.js} +3 -3
- package/dist/browser/{dialog-BcFBfRB1.js → dialog-WzR4CRFH.js} +11 -81
- package/dist/browser/{exportSvg-CG8hEUNk.js → exportSvg-CYwyYiuH.js} +2 -2
- package/dist/browser/{flowChanges-BGo_4Ypo.js → flowChanges-Bz4dbDN_.js} +1204 -387
- package/dist/browser/{flowWorkspace-BFHGev7s.js → flowWorkspace-BI6L6a4r.js} +557 -597
- package/dist/browser/licenses.md +1 -1
- package/dist/browser/preview.css +512 -462
- package/dist/browser/preview.js +8457 -6732
- package/dist/browser/{tooltip-BAWSUexx.js → tooltip-BDcVTNpu.js} +65 -2
- package/dist/browser/ui.css +5 -24
- package/dist/browser/workbench.css +512 -462
- package/dist/browser/workbench.d.ts +2 -3
- package/dist/browser/workbench.js +65 -690
- package/dist/browser/{workbenchSelect-CjK-xdm3.js → workbenchSelect-DtAd0zc4.js} +2 -2
- package/dist/command/index.js +25 -25
- package/dist/common/authoring.d.ts +3 -3
- package/dist/common/authoringExamples.d.ts +3 -3
- package/dist/common/authoringSchema.d.ts +14 -22
- package/dist/common/control-api-conformance.js +11 -18
- package/dist/common/control-api.d.ts +5 -1
- package/dist/common/control-api.js +11 -18
- package/dist/common/control-requests.d.ts +4 -3
- package/dist/common/control-requests.js +26 -37
- package/dist/common/flow-authoring.js +6 -14
- package/dist/common/flow-change.d.ts +1 -1
- package/dist/common/flow-change.js +6 -14
- package/dist/common/flow-encoding.js +5 -13
- package/dist/common/flow-semantics.js +15 -21
- package/dist/common/flow-state.d.ts +16 -39
- package/dist/common/flow-state.js +47 -105
- package/dist/common/mcp.d.ts +3 -3
- package/dist/common/mcp.js +11 -18
- package/dist/common/run-events.js +19 -9
- package/dist/common/runtime-contract.js +6 -12
- package/dist/common/runtime-nodejs-compat.js +11 -12
- package/dist/common/scheduler.d.ts +2 -1
- package/dist/common/scheduler.js +56 -50
- package/dist/common/state-conformance.d.ts +3 -3
- package/package.json +1 -1
- package/src/control/common/api.ts +20 -3
- package/src/control/common/authoring.ts +6 -5
- package/src/control/common/authoringExamples.ts +6 -5
- package/src/control/common/authoringSchema.ts +7 -7
- package/src/control/common/requests.ts +7 -1
- package/src/execution/common/events.ts +22 -10
- package/src/execution/common/node-execution.ts +1 -1
- package/src/execution/common/scheduler.ts +28 -14
- package/src/flow/common/change.ts +1 -1
- package/src/flow/common/changeSchema.ts +4 -4
- package/src/flow/common/errorHandling.ts +1 -1
- package/src/flow/common/semantics.ts +12 -6
- package/src/runtime/common/nodejsGuest.generated.json +11 -12
- package/src/runtime/common/runtime.ts +6 -7
- package/src/state/common/conformance.ts +16 -21
- package/src/state/common/state.ts +44 -72
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { l as useTranslate } from "./dist-BFmpkX4P.js";
|
|
2
|
-
import {
|
|
3
|
-
import { a as DialogFooter, d as Field, f as FieldDescription, h as FieldLabel, i as DialogDescription, l as Icon, m as FieldGroup, n as DialogClose, nn as Input, o as DialogHeader, p as FieldError, r as DialogContent, s as DialogTitle, t as Dialog, u as Spinner } from "./dialog-
|
|
4
|
-
import { t as WorkbenchSelect } from "./workbenchSelect-
|
|
2
|
+
import { xr as Button } from "./tooltip-BDcVTNpu.js";
|
|
3
|
+
import { a as DialogFooter, d as Field, f as FieldDescription, h as FieldLabel, i as DialogDescription, l as Icon, m as FieldGroup, n as DialogClose, nn as Input, o as DialogHeader, p as FieldError, r as DialogContent, s as DialogTitle, t as Dialog, u as Spinner } from "./dialog-WzR4CRFH.js";
|
|
4
|
+
import { t as WorkbenchSelect } from "./workbenchSelect-DtAd0zc4.js";
|
|
5
5
|
import { useEffect, useRef, useState } from "react";
|
|
6
6
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
//#region src/workbench/browser/runtime/shell/createResourceDialog.tsx
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as toPlainObject, i as isString } from "./dist-BFmpkX4P.js";
|
|
2
|
-
import { $ as useToolbarRootContext,
|
|
2
|
+
import { $ as useToolbarRootContext, A as string, At as useImplicitActiveTrigger, Bn as transitionStatusMapping, Br as useRefWithInit, C as literal, Cn as getFloatingFocusElement, Cr as cn, D as preprocess, Dn as getTarget, Dr as EMPTY_ARRAY, Dt as createInitialPopupStoreState, E as object, En as contains, Er as useRenderElement, Et as useFloatingRootContext, F as IndexGuessBehavior, Fn as createLucideIcon, Fr as formatErrorMessage, Ft as useDismiss, Gt as CLICK_TRIGGER_IDENTIFIER, Hr as getWindow, I as useCompositeListItem, In as useTransitionStatus, Ir as mergeProps, It as useClick, Jn as closePress, Kn as cancelOpen, Kt as DROPDOWN_COLLISION_AVOIDANCE, Ln as useOpenChangeComplete, Lr as useIsoLayoutEffect, Lt as FloatingFocusManager, M as unknown, Mn as ownerDocument, Mr as useButton, Mt as useTriggerDataForwarding, N as _isoDateTime, Nn as useLabelableId, O as record$1, Or as EMPTY_OBJECT, Ot as popupStoreSelectors, P as Separator, Pn as Check, Pt as platform, Qt as useStore, Sr as buttonVariants, T as number, Tn as activeElement, Tt as useSyncedFloatingRootContext, U as COMPOSITE_KEYS, Un as useValueChanged, Vn as useAnimationFrame, Wn as createChangeEventDetails, Wt as FloatingPortal, Xt as ReactStore, Yt as addEventListener, Zn as imperativeAction, Zt as Store, _ as array, _r as fieldValidityMapping, an as useOnFirstRender, at as useAnchorPositioning, br as useControlled, bt as useListNavigation, ct as CompositeList, dr as useFormContext, dt as CommonPopupDataAttributes, et as useAnchoredPopupScrollLock, f as isTimeZone, fr as useRegisterFieldControl, ft as popupStateMapping, g as _enum, gt as serializeValue, h as ZodType, ht as useOpenInteractionType, i as TooltipTrigger, in as useValueAsRef, it as InternalBackdrop, j as union, jn as isWebKit, jr as useMergedRefs, jt as useOpenStateTransitions, k as strictObject, kt as PopupTriggerMap, lr as windowResize, lt as inertValue, m as ZodISODateTime, mr as useBaseUiId, mt as triggerOpenStateMapping, n as TooltipContent, nt as usePositioner, pr as useFieldRootContext, pt as pressableTriggerOpenStateMapping, rn as createSelector, rr as none, rt as getDisabledMountTransitionStyles, sn as useTimeout, st as useDirection, t as Tooltip, tr as itemPress, tt as useScrollLock, ur as useLabelableContext, ut as getPseudoElementBounds, v as boolean, vr as visuallyHidden, vt as useTypeahead, w as never, wr as cva, x as json$1, xn as rectToClientRect, xr as Button, xt as useInteractions, y as discriminatedUnion, yr as visuallyHiddenInput, yt as useRole, zr as useStableCallback } from "./tooltip-BDcVTNpu.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";
|
|
@@ -221,57 +221,6 @@ var X = createLucideIcon("X", [["path", {
|
|
|
221
221
|
key: "d8bk6v"
|
|
222
222
|
}]]);
|
|
223
223
|
//#endregion
|
|
224
|
-
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+fa6c2f29eeb10566/node_modules/@base-ui/react/esm/internals/labelable-provider/useLabelableId.js
|
|
225
|
-
function useLabelableId(params = {}) {
|
|
226
|
-
const { id, implicit = false, controlRef } = params;
|
|
227
|
-
const { controlId, registerControlId } = useLabelableContext();
|
|
228
|
-
const defaultId = useBaseUiId(id);
|
|
229
|
-
const controlIdForEffect = implicit ? controlId : void 0;
|
|
230
|
-
const controlSourceRef = useRefWithInit(() => Symbol("labelable-control"));
|
|
231
|
-
const hasRegisteredRef = React.useRef(false);
|
|
232
|
-
const hadExplicitIdRef = React.useRef(id != null);
|
|
233
|
-
const unregisterControlId = useStableCallback(() => {
|
|
234
|
-
if (!hasRegisteredRef.current || registerControlId === NOOP) return;
|
|
235
|
-
hasRegisteredRef.current = false;
|
|
236
|
-
registerControlId(controlSourceRef.current, void 0);
|
|
237
|
-
});
|
|
238
|
-
useIsoLayoutEffect(() => {
|
|
239
|
-
if (registerControlId === NOOP) return;
|
|
240
|
-
let nextId;
|
|
241
|
-
if (implicit) {
|
|
242
|
-
const elem = controlRef?.current;
|
|
243
|
-
if (isElement(elem) && elem.closest("label") != null) nextId = id ?? null;
|
|
244
|
-
else nextId = controlIdForEffect ?? defaultId;
|
|
245
|
-
} else if (id != null) {
|
|
246
|
-
hadExplicitIdRef.current = true;
|
|
247
|
-
nextId = id;
|
|
248
|
-
} else if (hadExplicitIdRef.current) nextId = defaultId;
|
|
249
|
-
else {
|
|
250
|
-
unregisterControlId();
|
|
251
|
-
return;
|
|
252
|
-
}
|
|
253
|
-
if (nextId === void 0) {
|
|
254
|
-
unregisterControlId();
|
|
255
|
-
return;
|
|
256
|
-
}
|
|
257
|
-
hasRegisteredRef.current = true;
|
|
258
|
-
registerControlId(controlSourceRef.current, nextId);
|
|
259
|
-
}, [
|
|
260
|
-
id,
|
|
261
|
-
controlRef,
|
|
262
|
-
controlIdForEffect,
|
|
263
|
-
registerControlId,
|
|
264
|
-
implicit,
|
|
265
|
-
defaultId,
|
|
266
|
-
controlSourceRef,
|
|
267
|
-
unregisterControlId
|
|
268
|
-
]);
|
|
269
|
-
React.useEffect(() => {
|
|
270
|
-
return unregisterControlId;
|
|
271
|
-
}, [unregisterControlId]);
|
|
272
|
-
return controlId ?? defaultId;
|
|
273
|
-
}
|
|
274
|
-
//#endregion
|
|
275
224
|
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+fa6c2f29eeb10566/node_modules/@base-ui/react/esm/field/control/FieldControl.js
|
|
276
225
|
/**
|
|
277
226
|
* The form control to label and validate.
|
|
@@ -455,17 +404,6 @@ function removeItem(selectedValues, itemValue, comparer) {
|
|
|
455
404
|
return selectedValues.filter((selectedValue) => !compareItemEquality(itemValue, selectedValue, comparer));
|
|
456
405
|
}
|
|
457
406
|
//#endregion
|
|
458
|
-
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+fa6c2f29eeb10566/node_modules/@base-ui/react/esm/internals/serializeValue.js
|
|
459
|
-
function serializeValue(value) {
|
|
460
|
-
if (value == null) return "";
|
|
461
|
-
if (typeof value === "string") return value;
|
|
462
|
-
try {
|
|
463
|
-
return JSON.stringify(value);
|
|
464
|
-
} catch {
|
|
465
|
-
return String(value);
|
|
466
|
-
}
|
|
467
|
-
}
|
|
468
|
-
//#endregion
|
|
469
407
|
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+fa6c2f29eeb10566/node_modules/@base-ui/react/esm/internals/resolveValueLabel.js
|
|
470
408
|
function isGroupedItems(items) {
|
|
471
409
|
return items != null && items.length > 0 && typeof items[0] === "object" && items[0] != null && "items" in items[0];
|
|
@@ -2350,18 +2288,14 @@ strictObject({
|
|
|
2350
2288
|
scope: _enum(["draft", "live"]),
|
|
2351
2289
|
space: string().regex(/^(flow|node:.+)$/)
|
|
2352
2290
|
});
|
|
2353
|
-
var
|
|
2354
|
-
|
|
2355
|
-
|
|
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") {
|
|
2291
|
+
var skipDuplicatesConfigSchema = strictObject({ fields: array(string().refine((field) => field.length > 0 && field.split(".").every((part) => part.length > 0), "Use a nonempty dot-separated field path.")).refine((fields) => new Set(fields).size === fields.length, "Identity fields must be distinct.").default([]) });
|
|
2292
|
+
var skipDuplicatesExecutorSchema = skipDuplicatesConfigSchema.extend({ kind: literal("skip-duplicates") });
|
|
2293
|
+
function skipDuplicatesTask(config = skipDuplicatesConfigSchema.parse({}), name = "Skip Duplicates") {
|
|
2360
2294
|
return {
|
|
2361
2295
|
name,
|
|
2362
2296
|
executor: {
|
|
2363
2297
|
...config,
|
|
2364
|
-
kind: "
|
|
2298
|
+
kind: "skip-duplicates"
|
|
2365
2299
|
},
|
|
2366
2300
|
inputs: [{
|
|
2367
2301
|
handle: "items",
|
|
@@ -2393,13 +2327,9 @@ var flowStateViewSchema = object({
|
|
|
2393
2327
|
})),
|
|
2394
2328
|
spaces: array(object({
|
|
2395
2329
|
space: string(),
|
|
2396
|
-
mode: _enum(["new", "increasing"]),
|
|
2397
2330
|
count: number().nonnegative(),
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
number(),
|
|
2401
|
-
_null()
|
|
2402
|
-
]),
|
|
2331
|
+
pendingCount: number().nonnegative(),
|
|
2332
|
+
reservedCount: number().nonnegative(),
|
|
2403
2333
|
updatedAt: number()
|
|
2404
2334
|
}))
|
|
2405
2335
|
});
|
|
@@ -7126,7 +7056,7 @@ var managedFields = object({
|
|
|
7126
7056
|
revisionId: text
|
|
7127
7057
|
}),
|
|
7128
7058
|
httpRequestExecutorSchema,
|
|
7129
|
-
|
|
7059
|
+
skipDuplicatesExecutorSchema
|
|
7130
7060
|
])
|
|
7131
7061
|
});
|
|
7132
7062
|
var managed = managedFields.transform(limitDecisionTask);
|
|
@@ -7599,7 +7529,7 @@ var variants = new Map(Object.entries(shapes).map(([kind, shape]) => [kind, shap
|
|
|
7599
7529
|
})]));
|
|
7600
7530
|
array(union([...variants.values()])).min(1);
|
|
7601
7531
|
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 === "
|
|
7532
|
+
if (content.modelVersion < 13 && Object.values(content.document.graph.nodes).some((candidateNode) => candidateNode.kind === "task" && "executor" in candidateNode.task && candidateNode.task.executor.kind === "skip-duplicates")) throw new Error("Skip Duplicates requires Flow model v13.");
|
|
7603
7533
|
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.");
|
|
7604
7534
|
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.");
|
|
7605
7535
|
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.");
|
|
@@ -7839,7 +7769,7 @@ var nodeErrorSchema = {
|
|
|
7839
7769
|
}
|
|
7840
7770
|
};
|
|
7841
7771
|
function supportsNodeErrorHandling(node) {
|
|
7842
|
-
return supportsNodeRetry(node) || node.kind === "task" && "executor" in node.task && node.task.executor.kind === "
|
|
7772
|
+
return supportsNodeRetry(node) || node.kind === "task" && "executor" in node.task && node.task.executor.kind === "skip-duplicates";
|
|
7843
7773
|
}
|
|
7844
7774
|
function nodeSystemOutputPorts(node) {
|
|
7845
7775
|
return supportsNodeErrorHandling(node) && node.onError == "error" ? { error: {
|
|
@@ -9409,4 +9339,4 @@ function DialogDescription({ className, ...props }) {
|
|
|
9409
9339
|
});
|
|
9410
9340
|
}
|
|
9411
9341
|
//#endregion
|
|
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,
|
|
9342
|
+
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, skipDuplicatesTask 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, flowStateViewSchema as Nt, supportsNodeErrorHandling as O, portsAssignable as Ot, operandHandle as P, skipDuplicatesConfigSchema 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, 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, ChevronDown 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-
|
|
2
|
-
import { t as FlowCanvas,
|
|
1
|
+
import { n as IconImageCrossOriginContext, o as IconifyProvider } from "./ContentIcon-CMn0c-kl.js";
|
|
2
|
+
import { t as FlowCanvas, x as CanvasStore } from "./FlowCanvas-BQGBcfoL.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
|