@oomol-lab/open-flow 0.1.0-beta.64 → 0.1.0-beta.65
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/dist/browser/flow-authoring.js +21 -2
- package/dist/browser/{flowChanges-BAMkSaKF.js → flowChanges-DkvG5uDq.js} +1774 -1663
- package/dist/browser/{flowWorkspace-DxLc1Ybv.js → flowWorkspace-BEp-lxqF.js} +116 -1
- package/dist/browser/preview.css +8 -0
- package/dist/browser/preview.js +1870 -1663
- package/dist/browser/ui.css +8 -0
- package/dist/browser/workbench.css +8 -0
- package/dist/browser/workbench.js +31 -4
- package/dist/command/index.js +22 -22
- package/dist/common/connectorDecoders.d.ts +2 -1
- package/dist/common/control-api-conformance.js +19 -0
- package/dist/common/control-api.d.ts +7 -0
- package/dist/common/control-api.js +25 -0
- package/dist/common/control-requests.js +45 -5
- package/dist/common/flow-semantics.js +6 -0
- package/dist/common/mcp.js +3310 -3291
- package/dist/common/scheduler.d.ts +1 -0
- package/dist/common/scheduler.js +49 -3
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as __require, o as __toESM, r as __exportAll, t as __commonJSMin } from "./rolldown-runtime-CEgmsyvS.js";
|
|
2
|
-
import { $ as useIconifyData, $n as isJsonObject, $t as EmptyTitle, A as datePickerValue, An as createI18n$1, Bn as I18n, Bt as PopoverTrigger, C as valueForEditor, Cn as useContextMenuRootContext, Cr as controlErrorCode, D as calendarChange, E as typeOfSchema, En as Badge, Er as IconThemeContext, F as feishuResourceKind, Fn as ru_default$1, Ft as PopoverContent, G as designerGraph, Gt as InputGroup, H as resourceData, Hn as EventSourceSetup, Ht as ScrollArea, I as supportsFeishuChatFilter, In as ko_default$1, It as PopoverDescription, J as actionSummary, Jt as Empty, K as semanticNodeIcon, Kt as InputGroupAddon, Ln as ja_default$1, Lt as PopoverHeader, Mn as waitBranchDescription, Mt as IdTooltip, Nn as zh_TW_default$1, Nt as followWorkbenchLink, O as calendarDate, On as SourceForm, P as indexAddNodeOptions, Pn as zh_CN_default$1, Pt as Popover, Q as useIconifyCollectionLoader, Qn as triggerOutputDefinitions, Qt as EmptyMedia, R as mapSource, Rn as fr_default$1, Rt as PopoverPanelContent, S as schemaForEditor, Sn as ContextMenuRootContext, T as isUnconstrainedSchema, Tn as useMenuRootContext, Tr as useAriaLabelledBy, U as resourceValue, Un as errorNotice, Ut as VirtualScrollArea, V as observeResource, Vn as FeishuEventPicker, Vt as NativeScrollArea, Wt as Z$2, X as ContentIcon, Xn as sourceOutputLabel, Xt as EmptyDescription, Y as providerIcon, Yn as resolutionOutputPorts, Yt as EmptyContent, Z as IconifyProvider, Zt as EmptyHeader, _n as MenuPositioner, _r as inputValue, an as DropdownMenuLabel, b as editorComponent, bn as MenuItem, cn as DropdownMenuSeparator, dn as DropdownMenuSubTrigger, dr as openApiFieldIssues, dt as schemaMismatchMessage, en as DropdownMenu, et as wrapLayout, fn as DropdownMenuTrigger, fr as openApiTask, gn as MenuRoot, gr as servers, hn as useCompositeItem, hr as serverAddress, in as DropdownMenuItem, it as revisionView, j as isDateFormat, jn as uiLocales, jt as WorkflowExportMenuItem, k as datePickerChange, kn as SourceSelect, ln as DropdownMenuSub, lr as listOperations, lt as diagnosticMessage, mn as findRootOwnerId, mr as selectOperation, n as agentTool, nn as DropdownMenuContent, nt as canCancelRun, on as DropdownMenuRadioGroup, or as triggerConfigValue, pn as isElementDisabled, pr as securityOptions, pt as connectionCatalog, q as triggerNodeIcon, qn as decodeResultList, qt as InputGroupInput, rn as DropdownMenuGroup, rt as hasRunFilter, sn as DropdownMenuRadioItem, sr as triggerConfigValues, tn as DropdownMenuCheckboxItem, un as DropdownMenuSubContent, ur as object, ut as diagnosticNodeId, vn as MenuPortal, w as getDefaultValue, wn as MenuRootContext, wr as Checkbox, x as editorGroups, xn as MenuGroup, y as defaultValueEditorSchema, yn as MenuPopup, zn as en_default$1, zt as PopoverTitle } from "./flowChanges-
|
|
2
|
+
import { $ as useIconifyData, $n as isJsonObject, $t as EmptyTitle, A as datePickerValue, An as createI18n$1, Bn as I18n, Bt as PopoverTrigger, C as valueForEditor, Cn as useContextMenuRootContext, Cr as controlErrorCode, D as calendarChange, E as typeOfSchema, En as Badge, Er as IconThemeContext, F as feishuResourceKind, Fn as ru_default$1, Ft as PopoverContent, G as designerGraph, Gt as InputGroup, H as resourceData, Hn as EventSourceSetup, Ht as ScrollArea, I as supportsFeishuChatFilter, In as ko_default$1, It as PopoverDescription, J as actionSummary, Jt as Empty, K as semanticNodeIcon, Kt as InputGroupAddon, Ln as ja_default$1, Lt as PopoverHeader, Mn as waitBranchDescription, Mt as IdTooltip, Nn as zh_TW_default$1, Nt as followWorkbenchLink, O as calendarDate, On as SourceForm, P as indexAddNodeOptions, Pn as zh_CN_default$1, Pt as Popover, Q as useIconifyCollectionLoader, Qn as triggerOutputDefinitions, Qt as EmptyMedia, R as mapSource, Rn as fr_default$1, Rt as PopoverPanelContent, S as schemaForEditor, Sn as ContextMenuRootContext, T as isUnconstrainedSchema, Tn as useMenuRootContext, Tr as useAriaLabelledBy, U as resourceValue, Un as errorNotice, Ut as VirtualScrollArea, V as observeResource, Vn as FeishuEventPicker, Vt as NativeScrollArea, Wt as Z$2, X as ContentIcon, Xn as sourceOutputLabel, Xt as EmptyDescription, Y as providerIcon, Yn as resolutionOutputPorts, Yt as EmptyContent, Z as IconifyProvider, Zt as EmptyHeader, _n as MenuPositioner, _r as inputValue, an as DropdownMenuLabel, b as editorComponent, bn as MenuItem, cn as DropdownMenuSeparator, dn as DropdownMenuSubTrigger, dr as openApiFieldIssues, dt as schemaMismatchMessage, en as DropdownMenu, et as wrapLayout, fn as DropdownMenuTrigger, fr as openApiTask, gn as MenuRoot, gr as servers, hn as useCompositeItem, hr as serverAddress, in as DropdownMenuItem, it as revisionView, j as isDateFormat, jn as uiLocales, jt as WorkflowExportMenuItem, k as datePickerChange, kn as SourceSelect, ln as DropdownMenuSub, lr as listOperations, lt as diagnosticMessage, mn as findRootOwnerId, mr as selectOperation, n as agentTool, nn as DropdownMenuContent, nt as canCancelRun, on as DropdownMenuRadioGroup, or as triggerConfigValue, pn as isElementDisabled, pr as securityOptions, pt as connectionCatalog, q as triggerNodeIcon, qn as decodeResultList, qt as InputGroupInput, rn as DropdownMenuGroup, rt as hasRunFilter, sn as DropdownMenuRadioItem, sr as triggerConfigValues, tn as DropdownMenuCheckboxItem, un as DropdownMenuSubContent, ur as object, ut as diagnosticNodeId, vn as MenuPortal, w as getDefaultValue, wn as MenuRootContext, wr as Checkbox, x as editorGroups, xn as MenuGroup, y as defaultValueEditorSchema, yn as MenuPopup, zn as en_default$1, zt as PopoverTitle } from "./flowChanges-DkvG5uDq.js";
|
|
3
3
|
import { a as derive, c as strictEqual, i as compute, l as val, n as attachSetter, r as combine, s as readonlyVal } from "./dist-bO8nvHFH.js";
|
|
4
4
|
import { c as useLang, i as isString, l as useTranslate, n as isBoolean, o as I18nProvider, r as isPlainObject, s as useI18n, t as isArray$1, u as useVal } from "./dist-BFmpkX4P.js";
|
|
5
5
|
import { $ as operandHandle, $n as Store, $r as inputChange, $t as InternalBackdrop, A as decisionLimits, Ar as isAndroid, At as SelectValue, Bi as useRefWithInit, C as FieldDescription, Ci as cn$1, Cn as useListNavigation, Cr as isIndexOutOfListBounds, Ct as Select$1, Di as EMPTY_ARRAY$1, Dr as activeElement, Dt as SelectItem, E as FieldLabel, Ei as useRenderElement, Er as isInteractiveElement, Et as SelectGroup, F as limitDecisionQuestions, Fi as formatErrorMessage, Fr as ChevronDown, Ft as ARROW_DOWN, Gr as createChangeEventDetails, Gt as VERTICAL_KEYS, Hi as isElement, Hr as transitionStatusMapping, Ht as HORIZONTAL_KEYS, Ii as mergeProps, It as ARROW_KEYS, Jn as DROPDOWN_COLLISION_AVOIDANCE, Jr as clearPress, Jt as scrollIntoViewIfNeeded, Kn as FloatingPortal, Kr as createGenericEventDetails, Kt as VERTICAL_KEYS_WITH_EXTRA_KEYS, L as matchesSchema, Li as useIsoLayoutEffect, Ln as useDismiss, Lr as createLucideIcon, Lt as ARROW_LEFT, M as decisionQuestionIssues, Mi as useButton, Mt as IndexGuessBehavior, N as decisionTask, Ni as CompositeRootContext, Nr as ownerDocument, Nt as useCompositeListItem, O as decodeRevisionContent, Oi as EMPTY_OBJECT, Or as contains, Ot as SelectSeparator, P as defaultDecisionQuestion, Pr as useLabelableId, Pt as ALL_KEYS, Q as nodeInputMappings, Qt as getDisabledMountTransitionStyles, R as schemaObject, Rn as useClick, Rr as useTransitionStatus, Rt as ARROW_RIGHT, S as Field, Si as buttonVariants, Sr as getMinListIndex, T as FieldGroup, Ti as clsx, Tr as stopEvent$1, Tt as SelectContent, Ut as HORIZONTAL_KEYS_WITH_EXTRA_KEYS, Vr as TransitionStatusDataAttributes, W as nodeNameIssue, Wr as useValueChanged, Wt as MODIFIER_KEYS, Xr as escapeKey, Xt as useAnchoredPopupScrollLock, Y as comparisonIssue, Yr as closePress, Zn as addEventListener, Zt as usePositioner, _ as TooltipPositioner, _i as fieldValidityMapping, _n as findItemIndex, _r as findNonDisabledListIndex, a as DialogDescription, an as getPseudoElementBounds, ar as createSelector, at as dequal, b as TooltipRoot, bi as useControlled, br as getGridNavigatedIndex, bt as string, c as DialogTitle, cn as triggerOpenStateMapping, cr as Label, d as TooltipContent, di as useFormContext, dn as hasNullItemLabel, dr as useTimeout, dt as discriminatedUnion, ei as inputClear, en as useAnchorPositioning, er as useStore$1, et as operatorsForType, f as TooltipProvider, fi as useRegisterFieldControl, fn as isGroupedItems, g as TooltipPopup, gi as DEFAULT_FIELD_STATE_ATTRIBUTES, gn as defaultItemEquality, gr as createGridCellMap, gt as number, h as TooltipArrow, hi as useId$1, hn as compareItemEquality, ht as literal, i as DialogContent, ii as none$1, in as inertValue, ir as require_builtin_esm_external_require_react, ji as useMergedRefs, jr as isFirefox, ki as NOOP, kn as useFloatingRootContext, kr as getTarget, kt as SelectTrigger, l as DialogTrigger, li as triggerPress, ln as resolveAriaLabelledBy, lr as Input$1, m as createTooltipHandle, mi as useBaseUiId, mn as stringifyAsValue, n as Dialog, ni as itemPress, nn as useDirection, nt as unaryOperator, on as popupStateMapping, or as useValueAsRef, ot as webhookMethods, p as TooltipTrigger, pi as useFieldRootContext, pn as stringifyAsLabel, qr as cancelOpen, qt as isNativeInput, ri as listNavigation, rn as CompositeList, rr as require_with_selector, rt as valueType, sn as pressableTriggerOpenStateMapping, sr as useOnFirstRender, st as webhookSupportsBody, t as Icon, ti as inputPress, u as Tooltip, ui as useLabelableContext, un as useOpenInteractionType, v as TooltipPortal, vi as visuallyHidden, vn as removeItem, vr as getGridCellIndexOfCorner, w as FieldError, wi as cva, wn as useInteractions, wr as isListIndexDisabled, wt as SelectChevron, x as Spinner, xi as Button$1, xn as useTypeahead, xr as getMaxListIndex, y as TooltipTrigger$1, yi as visuallyHiddenInput, yn as selectedValueIncludes, yr as getGridCellIndices, yt as strictObject, z as variableInputCompatible, zi as useStableCallback, zn as FloatingFocusManager, zr as useOpenChangeComplete, zt as ARROW_UP } from "./icons-Db2Jb2iX.js";
|
|
@@ -28973,6 +28973,108 @@ function GeneralSettings({ title, children, disabled = false, readOnly = false,
|
|
|
28973
28973
|
}, nodeId);
|
|
28974
28974
|
}
|
|
28975
28975
|
//#endregion
|
|
28976
|
+
//#region src/workbench/browser/runtime/editor/leinaBotSelect.tsx
|
|
28977
|
+
function LeinaBotSelect({ source, flowId, value, disabled, onChange }) {
|
|
28978
|
+
const t = useTranslate();
|
|
28979
|
+
const [attempt, setAttempt] = useState(0);
|
|
28980
|
+
const [state, setState] = useState();
|
|
28981
|
+
useEffect(() => {
|
|
28982
|
+
const controller = new AbortController();
|
|
28983
|
+
setState((previous) => ({
|
|
28984
|
+
flowId,
|
|
28985
|
+
loading: true,
|
|
28986
|
+
bots: previous?.flowId == flowId ? previous.bots : void 0
|
|
28987
|
+
}));
|
|
28988
|
+
source.listLeinaBots(flowId, controller.signal).then((bots) => {
|
|
28989
|
+
if (!controller.signal.aborted) setState({
|
|
28990
|
+
flowId,
|
|
28991
|
+
bots,
|
|
28992
|
+
loading: false
|
|
28993
|
+
});
|
|
28994
|
+
}, (error) => {
|
|
28995
|
+
if (!controller.signal.aborted) setState({
|
|
28996
|
+
flowId,
|
|
28997
|
+
loading: false,
|
|
28998
|
+
error: error instanceof Error ? error.message : t("contextPanel.loadFailed")
|
|
28999
|
+
});
|
|
29000
|
+
});
|
|
29001
|
+
return () => controller.abort();
|
|
29002
|
+
}, [
|
|
29003
|
+
source,
|
|
29004
|
+
flowId,
|
|
29005
|
+
attempt,
|
|
29006
|
+
t
|
|
29007
|
+
]);
|
|
29008
|
+
const current = state?.flowId == flowId ? state : void 0;
|
|
29009
|
+
const bots = current?.bots;
|
|
29010
|
+
const selected = typeof value == "string" ? value : value === void 0 ? void 0 : JSON.stringify(value);
|
|
29011
|
+
const missing = selected != null && bots != null && !bots.some((bot) => bot.leinaId == selected);
|
|
29012
|
+
const items = [...(bots ?? []).map((bot) => ({
|
|
29013
|
+
value: bot.leinaId,
|
|
29014
|
+
label: bot.name
|
|
29015
|
+
})), ...selected != null && !bots?.some((bot) => bot.leinaId == selected) ? [{
|
|
29016
|
+
value: selected,
|
|
29017
|
+
label: missing ? t("leina.unavailable", { id: selected }) : selected
|
|
29018
|
+
}] : []];
|
|
29019
|
+
return /* @__PURE__ */ jsxs(Select$1, {
|
|
29020
|
+
items,
|
|
29021
|
+
value: selected ?? null,
|
|
29022
|
+
disabled,
|
|
29023
|
+
onOpenChange: (open) => {
|
|
29024
|
+
if (open) setAttempt((previous) => previous + 1);
|
|
29025
|
+
},
|
|
29026
|
+
onValueChange: (next) => {
|
|
29027
|
+
if (typeof next == "string" && bots?.some((bot) => bot.leinaId == next)) onChange(next);
|
|
29028
|
+
},
|
|
29029
|
+
children: [/* @__PURE__ */ jsx(SelectTrigger, {
|
|
29030
|
+
size: "field",
|
|
29031
|
+
className: "w-full",
|
|
29032
|
+
"data-field-control": true,
|
|
29033
|
+
"aria-label": t("leina.robot"),
|
|
29034
|
+
"aria-invalid": missing || void 0,
|
|
29035
|
+
children: /* @__PURE__ */ jsx(SelectValue, { placeholder: t("leina.select") })
|
|
29036
|
+
}), /* @__PURE__ */ jsxs(SelectContent, {
|
|
29037
|
+
align: "start",
|
|
29038
|
+
alignItemWithTrigger: false,
|
|
29039
|
+
className: selectionMenuContentClass,
|
|
29040
|
+
children: [
|
|
29041
|
+
(current?.loading ?? true) && /* @__PURE__ */ jsx("span", {
|
|
29042
|
+
role: "status",
|
|
29043
|
+
className: "block px-1.5 py-1 text-xs leading-5 text-muted-foreground",
|
|
29044
|
+
children: t("leina.loading")
|
|
29045
|
+
}),
|
|
29046
|
+
bots?.map((bot) => /* @__PURE__ */ jsx(SelectItem, {
|
|
29047
|
+
value: bot.leinaId,
|
|
29048
|
+
className: selectionMenuItemClass,
|
|
29049
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
29050
|
+
className: "truncate",
|
|
29051
|
+
children: bot.name
|
|
29052
|
+
})
|
|
29053
|
+
}, bot.leinaId)),
|
|
29054
|
+
missing && selected != null && /* @__PURE__ */ jsx(SelectItem, {
|
|
29055
|
+
value: selected,
|
|
29056
|
+
disabled: true,
|
|
29057
|
+
className: `mt-1 first-of-type:mt-0 min-h-7 rounded-[var(--ui-control-radius,var(--ui-radius))] py-1 text-xs leading-5 font-normal text-destructive`,
|
|
29058
|
+
children: t("leina.unavailable", { id: selected })
|
|
29059
|
+
}),
|
|
29060
|
+
current?.error != null && /* @__PURE__ */ jsxs("span", {
|
|
29061
|
+
role: "alert",
|
|
29062
|
+
className: "block px-1.5 py-1 text-xs leading-5 whitespace-normal break-words text-destructive",
|
|
29063
|
+
children: [
|
|
29064
|
+
t("leina.loadFailed"),
|
|
29065
|
+
" ",
|
|
29066
|
+
current.error
|
|
29067
|
+
]
|
|
29068
|
+
}),
|
|
29069
|
+
bots?.length == 0 && !current?.loading && /* @__PURE__ */ jsx("span", {
|
|
29070
|
+
className: "block px-1.5 py-1 text-xs leading-5 whitespace-normal text-muted-foreground",
|
|
29071
|
+
children: t("leina.empty")
|
|
29072
|
+
})
|
|
29073
|
+
]
|
|
29074
|
+
})]
|
|
29075
|
+
});
|
|
29076
|
+
}
|
|
29077
|
+
//#endregion
|
|
28976
29078
|
//#region src/workbench/browser/runtime/editor/linearTriggerConfig.tsx
|
|
28977
29079
|
function useOptions(store, nodeId, field, scope, enabled) {
|
|
28978
29080
|
const [attempt, setAttempt] = useState(0);
|
|
@@ -34719,6 +34821,15 @@ function NodeInspector({ webhookDeployment, variables = {
|
|
|
34719
34821
|
const binding = source?.kind === "binding" ? revision.binding(source.bindingId) : void 0;
|
|
34720
34822
|
return {
|
|
34721
34823
|
definition,
|
|
34824
|
+
editor: !readOnly && connectors != null && connector?.action == "leina.send_notification" && definition.handle == "leinaId" && mapping?.kind != "sources" ? /* @__PURE__ */ jsx(LeinaBotSelect, {
|
|
34825
|
+
source: connectors,
|
|
34826
|
+
flowId: revision.revision.flowId,
|
|
34827
|
+
value: inputValue(mapping, definition.value),
|
|
34828
|
+
disabled,
|
|
34829
|
+
onChange: (value) => {
|
|
34830
|
+
store?.setInputValue(selection.id, definition.handle, value);
|
|
34831
|
+
}
|
|
34832
|
+
}, revision.revision.flowId) : void 0,
|
|
34722
34833
|
value: inputValue(mapping, definition.value),
|
|
34723
34834
|
onReset: definition.value !== void 0 && mapping != null ? () => void store?.resetInputs(selection.id, [definition.handle]) : void 0,
|
|
34724
34835
|
connected: mapping?.kind === "sources" && binding?.kind !== "variable",
|
|
@@ -34730,6 +34841,10 @@ function NodeInspector({ webhookDeployment, variables = {
|
|
|
34730
34841
|
allowAddGroup: selection.kind !== "wait" && selection.kind !== "approval",
|
|
34731
34842
|
title: t("inspector.ports.inputsTitle"),
|
|
34732
34843
|
entries,
|
|
34844
|
+
fieldLabels: connector?.action == "leina.send_notification" ? {
|
|
34845
|
+
leinaId: t("leina.robot"),
|
|
34846
|
+
message: t("leina.message")
|
|
34847
|
+
} : void 0,
|
|
34733
34848
|
onReset: () => {
|
|
34734
34849
|
return store?.resetInputs(selection.id, entries.flatMap((entry) => "group" in entry ? [] : [entry.definition.handle]));
|
|
34735
34850
|
},
|
package/dist/browser/preview.css
CHANGED
|
@@ -1359,6 +1359,10 @@
|
|
|
1359
1359
|
height: 650px;
|
|
1360
1360
|
}
|
|
1361
1361
|
|
|
1362
|
+
:where(.open-flow-theme, .open-flow-workbench, .open-flow-canvas-root) .h-\[700px\] {
|
|
1363
|
+
height: 700px;
|
|
1364
|
+
}
|
|
1365
|
+
|
|
1362
1366
|
:where(.open-flow-theme, .open-flow-workbench, .open-flow-canvas-root) .h-\[calc\(100\%-1px\)\] {
|
|
1363
1367
|
height: calc(100% - 1px);
|
|
1364
1368
|
}
|
|
@@ -1579,6 +1583,10 @@
|
|
|
1579
1583
|
width: 344px;
|
|
1580
1584
|
}
|
|
1581
1585
|
|
|
1586
|
+
:where(.open-flow-theme, .open-flow-workbench, .open-flow-canvas-root) .w-\[420px\] {
|
|
1587
|
+
width: 420px;
|
|
1588
|
+
}
|
|
1589
|
+
|
|
1582
1590
|
:where(.open-flow-theme, .open-flow-workbench, .open-flow-canvas-root) .w-\[440px\] {
|
|
1583
1591
|
width: 440px;
|
|
1584
1592
|
}
|