@oomol-lab/open-flow 0.1.0-beta.68 → 0.1.0-beta.69

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 (67) hide show
  1. package/dist/browser/{ContentIcon-Sx9bywU-.js → ContentIcon-CsECY5id.js} +14 -7
  2. package/dist/browser/{FlowCanvas-CXpaeurx.js → FlowCanvas-C5X22xQ7.js} +18 -18
  3. package/dist/browser/{createResourceDialog-BKmimKA_.js → createResourceDialog-Di5BBrQv.js} +2 -2
  4. package/dist/browser/{dialog-ZmfcwuMS.js → dialog-Bjo-r9B0.js} +85 -8
  5. package/dist/browser/event-sources.d.ts +4 -2
  6. package/dist/browser/{exportSvg-D4CqCcx2.js → exportSvg-Cj6Spxx-.js} +2 -2
  7. package/dist/browser/flow-authoring-node.d.ts +3 -1
  8. package/dist/browser/flow-authoring.js +68 -7
  9. package/dist/browser/flow-change-schema.d.ts +3 -1
  10. package/dist/browser/flow-change.d.ts +17 -2
  11. package/dist/browser/flow-change.js +82 -9
  12. package/dist/browser/{flowChanges-B5tZMcGr.js → flowChanges-Dp-rcEJ6.js} +737 -1180
  13. package/dist/browser/{flowWorkspace-zFBFtZPo.js → flowWorkspace-CB1QACku.js} +440 -70
  14. package/dist/browser/preview.css +49 -41
  15. package/dist/browser/preview.js +2229 -2359
  16. package/dist/browser/{typeScriptSession-D0bjYDeg.js → typeScriptSession-B0hC-C8y.js} +1 -1
  17. package/dist/browser/ui.css +8 -0
  18. package/dist/browser/workbench.css +53 -41
  19. package/dist/browser/workbench.js +74 -32
  20. package/dist/browser/{workbenchSelect-CChdgugI.js → workbenchSelect-C3hxUcYm.js} +1 -1
  21. package/dist/command/index.js +55 -51
  22. package/dist/common/authoring.d.ts +20 -0
  23. package/dist/common/authoringSchema.d.ts +243 -0
  24. package/dist/common/connector-proxy.d.ts +4 -0
  25. package/dist/common/control-api-conformance.js +147 -33
  26. package/dist/common/control-api.d.ts +14 -7
  27. package/dist/common/control-api.js +130 -15
  28. package/dist/common/control-requests.d.ts +32 -19
  29. package/dist/common/control-requests.js +2854 -152
  30. package/dist/common/decision.js +27 -3
  31. package/dist/common/engine-contract.d.ts +2 -2
  32. package/dist/common/event-source-definition.d.ts +34 -16
  33. package/dist/common/event-source.d.ts +63 -5
  34. package/dist/common/event-source.js +5744 -261
  35. package/dist/common/event-sources.d.ts +99 -6
  36. package/dist/common/flow-encoding.js +49 -10
  37. package/dist/common/flow-errorHandling.d.ts +36 -0
  38. package/dist/common/flow-graph.d.ts +4 -2
  39. package/dist/common/flow-retry.d.ts +19 -0
  40. package/dist/common/flow-semantics.js +94 -10
  41. package/dist/common/{fr-Du5gv3kM.js → fr-CNTSedYU.js} +259 -18
  42. package/dist/common/integration-trigger.d.ts +1 -1
  43. package/dist/common/integration-trigger.js +27 -3
  44. package/dist/common/{ja-D2wyPdTF.js → ja-CxQBHr2J.js} +259 -18
  45. package/dist/common/{ko-Cuu2AOaC.js → ko-D1Exiv1h.js} +259 -18
  46. package/dist/common/mcp.d.ts +30 -0
  47. package/dist/common/mcp.js +132 -17
  48. package/dist/common/openapi.js +27 -3
  49. package/dist/common/poll-trigger.js +27 -3
  50. package/dist/common/provider-triggers.d.ts +0 -2
  51. package/dist/common/provider-triggers.js +358 -155
  52. package/dist/common/{ru-BjI_JSsx.js → ru-BzLZv0B7.js} +259 -18
  53. package/dist/common/run-events.d.ts +2 -0
  54. package/dist/common/run-events.js +4 -2
  55. package/dist/common/runtime-contract.d.ts +1 -0
  56. package/dist/common/runtime-contract.js +4 -4
  57. package/dist/common/scheduler.d.ts +13 -2
  58. package/dist/common/scheduler.js +288 -98
  59. package/dist/common/webhook-trigger.js +27 -3
  60. package/dist/common/workflow.js +27 -3
  61. package/dist/common/{zh-CN-CnnXkzLh.js → zh-CN-Dg_xSGde.js} +259 -18
  62. package/dist/common/{zh-TW-CJnR2dgF.js → zh-TW-oxuLwsV0.js} +259 -18
  63. package/dist/index.d.ts +1 -0
  64. package/package.json +1 -1
  65. package/dist/common/event-source-feishu.d.ts +0 -3
  66. package/dist/common/feishu-events.d.ts +0 -19
  67. package/dist/common/feishu-subscriptions.d.ts +0 -6
@@ -1,15 +1,15 @@
1
1
  import { i as __require, o as __toESM, r as __exportAll, t as __commonJSMin } from "./rolldown-runtime-CEgmsyvS.js";
2
- import { A as DropdownMenuSub, C as DropdownMenuContent, D as DropdownMenuRadioGroup, E as DropdownMenuLabel, I as useCompositeItem, J as waitBranchDescription, M as DropdownMenuSubTrigger, N as DropdownMenuTrigger, O as DropdownMenuRadioItem, P as isElementDisabled, S as DropdownMenuCheckboxItem, T as DropdownMenuItem, _ as NativeScrollArea, at as Checkbox, b as Z$1, c as useIconifyData, d as PopoverContent, f as PopoverDescription, g as PopoverTrigger, h as PopoverTitle, j as DropdownMenuSubContent, k as DropdownMenuSeparator, m as PopoverPanelContent, o as IconifyProvider, ot as useAriaLabelledBy, p as PopoverHeader, s as useIconifyCollectionLoader, t as ContentIcon, u as Popover, v as ScrollArea, w as DropdownMenuGroup, x as DropdownMenu, y as VirtualScrollArea } from "./ContentIcon-Sx9bywU-.js";
2
+ import { A as DropdownMenuSub, C as DropdownMenuContent, D as DropdownMenuRadioGroup, E as DropdownMenuLabel, I as useCompositeItem, J as waitBranchDescription, M as DropdownMenuSubTrigger, N as DropdownMenuTrigger, O as DropdownMenuRadioItem, P as isElementDisabled, S as DropdownMenuCheckboxItem, T as DropdownMenuItem, _ as NativeScrollArea, at as Checkbox, b as Z$1, c as useIconifyData, d as PopoverContent, f as PopoverDescription, g as PopoverTrigger, h as PopoverTitle, j as DropdownMenuSubContent, k as DropdownMenuSeparator, m as PopoverPanelContent, o as IconifyProvider, ot as useAriaLabelledBy, p as PopoverHeader, s as useIconifyCollectionLoader, t as ContentIcon, u as Popover, v as ScrollArea, w as DropdownMenuGroup, x as DropdownMenu, y as VirtualScrollArea } from "./ContentIcon-CsECY5id.js";
3
3
  import { i as compute, l as val } from "./dist-bO8nvHFH.js";
4
4
  import { c as useLang, l as useTranslate, o as I18nProvider, r as isPlainObject, s as useI18n, u as useVal } from "./dist-BFmpkX4P.js";
5
5
  import { $ as InternalBackdrop, $t as useOnFirstRender, An as useOpenChangeComplete, Ar as useIsoLayoutEffect, At as useClick, Bn as clearPress, Bt as DROPDOWN_COLLISION_AVOIDANCE, Cn as isFirefox, D as string, En as ownerDocument, Er as CompositeRootContext, F as ARROW_KEYS, G as VERTICAL_KEYS_WITH_EXTRA_KEYS, Gn as inputChange, Gt as Store, H as HORIZONTAL_KEYS_WITH_EXTRA_KEYS, Hn as escapeKey, I as ARROW_LEFT, In as useValueChanged, Ir as isElement, Jn as itemPress, K as isNativeInput, Kn as inputClear, Kt as useStore, L as ARROW_RIGHT, Ln as createChangeEventDetails, M as useCompositeListItem, Mn as TransitionStatusDataAttributes, Mr as useStableCallback, N as ALL_KEYS, Nn as transitionStatusMapping, Nr as useRefWithInit, Or as formatErrorMessage, P as ARROW_DOWN, Q as getDisabledMountTransitionStyles, Qt as useValueAsRef, R as ARROW_UP, Rn as createGenericEventDetails, Rt as FloatingPortal, Sn as isAndroid, Sr as NOOP, Tr as useButton, U as MODIFIER_KEYS, V as HORIZONTAL_KEYS, Vn as closePress, W as VERTICAL_KEYS, Xn as none, Xt as require_builtin_esm_external_require_react, Y as useAnchoredPopupScrollLock, Yn as listNavigation, Z as usePositioner, Zt as createSelector, _r as cva, a as createTooltipHandle, ar as useRegisterFieldControl, at as getPseudoElementBounds, bn as contains, br as EMPTY_ARRAY$1, bt as useFloatingRootContext, c as TooltipPositioner, cn as getGridCellIndexOfCorner, ct as pressableTriggerOpenStateMapping, d as TooltipRoot, dn as getMaxListIndex, dr as visuallyHidden, et as useAnchorPositioning, fn as getMinListIndex, fr as visuallyHiddenInput, ft as useTypeahead, gn as stopEvent, gr as cn, hr as buttonVariants, ht as useInteractions, i as TooltipTrigger, ir as useFormContext, it as inertValue, j as IndexGuessBehavior, jt as FloatingFocusManager, kn as useTransitionStatus, kr as mergeProps, kt as useDismiss, l as TooltipPortal, ln as getGridCellIndices, lr as DEFAULT_FIELD_STATE_ATTRIBUTES, lt as triggerOpenStateMapping, mn as isListIndexDisabled, mr as Button$1, mt as useListNavigation, n as TooltipContent, nt as useDirection, o as TooltipArrow, on as createGridCellMap, or as useFieldRootContext, pn as isIndexOutOfListBounds, pr as useControlled, q as scrollIntoViewIfNeeded, qn as inputPress, r as TooltipProvider, rr as useLabelableContext, rt as CompositeList, s as TooltipPopup, sn as findNonDisabledListIndex, sr as useBaseUiId, st as popupStateMapping, t as Tooltip, tn as useTimeout, u as TooltipTrigger$1, un as getGridNavigatedIndex, ur as fieldValidityMapping, ut as useOpenInteractionType, vn as isInteractiveElement, vr as clsx, wr as useMergedRefs, xn as getTarget, xr as EMPTY_OBJECT, yn as activeElement, yr as useRenderElement } from "./tooltip-CJjYs_2I.js";
6
- import { $ as dequal, B as valueType, H as decodeRevisionContent, I as operandHandle, J as decisionQuestionIssues, K as decisionLimits, L as operatorsForType, M as comparisonIssue, T as nodeNameIssue, U as webhookMethods, W as webhookSupportsBody, X as defaultDecisionQuestion, Y as decisionTask, Z as limitDecisionQuestions, _ as matchesSchema, _t as selectedValueIncludes, at as SelectSeparator, bt as useLabelableId, c as DialogTrigger, ct as resolveAriaLabelledBy, d as Field, dt as stringifyAsLabel, et as Select$1, f as FieldDescription, ft as stringifyAsValue, gt as removeItem, h as FieldLabel, ht as findItemIndex, i as DialogDescription, it as SelectItem, l as Icon, lt as hasNullItemLabel, m as FieldGroup, mt as defaultItemEquality, nt as SelectContent, ot as SelectTrigger, p as FieldError, pt as compareItemEquality, r as DialogContent, rt as SelectGroup, s as DialogTitle, st as SelectValue, t as Dialog, tt as SelectChevron, u as Spinner, ut as isGroupedItems, v as schemaObject, vt as Label, xt as ChevronDown, y as variableInputCompatible, yt as Input, z as unaryOperator } from "./dialog-ZmfcwuMS.js";
7
- import { C as isMac, S as toManifestNodeId, _ as E$1, a as collapseAllNested, b as toViewEdge, c as defaultTriggerIcon, d as selectableTimeZones, f as timeZoneLabel, g as cronDescription, h as timeZoneOffsetMinutes, i as JSONViewer, l as useDebouncedValue, m as timeZoneOffset, n as setAddItemId, o as formatDuration, p as timeZoneLongLabel, r as Textarea, s as CanvasNodeIcon, t as FlowCanvas, u as IconStack, v as CanvasTooltip, w as isSameViewport, x as toManifestHandleName, y as CanvasStore } from "./FlowCanvas-CXpaeurx.js";
8
- import { $ as providerIcon, $t as decodeResultList, A as getDefaultValue, At as WorkflowExportMenuItem, B as indexAddNodeOptions, Bt as EmptyMedia, C as feishuResourceKind, D as editorGroups, E as editorComponent, En as inputValue, F as datePickerChange, Ft as InputGroupInput, G as observeResource, Gt as SourceSelect, H as mapSource, Ht as Badge, I as datePickerValue, It as Empty, Jt as EventSourceSetup, K as resourceData, Kt as createI18n, L as isDateFormat, Lt as EmptyContent, M as typeOfSchema, Mn as controlErrorCode, Mt as followWorkbenchLink, N as calendarChange, Nt as InputGroup, O as schemaForEditor, P as calendarDate, Pt as InputGroupAddon, Q as actionSummary, Rt as EmptyDescription, Sn as servers, T as defaultValueEditorSchema, Tn as workflowSelectionTask, Vt as EmptyTitle, Wt as SourceForm, X as semanticNodeIcon, Y as designerGraph, Yt as errorNotice, Z as triggerNodeIcon, _n as openApiFieldIssues, an as triggerOutputDefinitions, bn as selectOperation, ct as diagnosticMessage, ft as connectionCatalog, gn as object, hn as listOperations, j as isUnconstrainedSchema, jt as IdTooltip, k as valueForEditor, lt as diagnosticNodeId, mn as triggerConfigValues, n as agentTool, nn as sourceOutputLabel, nt as hasRunFilter, on as isJsonObject, pn as triggerConfigValue, q as resourceValue, qt as FeishuEventPicker, rt as revisionView, tn as resolutionOutputPorts, tt as canCancelRun, ut as schemaMismatchMessage, vn as openApiTask, w as supportsFeishuChatFilter, wn as workflowCandidateGroup, xn as serverAddress, yn as securityOptions, zt as EmptyHeader } from "./flowChanges-B5tZMcGr.js";
6
+ import { $ as decisionLimits, B as operatorsForType, Ct as removeItem, Dt as useLabelableId, Et as Input, F as comparisonIssue, G as decodeRevisionContent, H as unaryOperator, J as defaultNodeRetry, K as webhookMethods, M as nodeSystemOutputPorts, N as supportsNodeErrorHandling, Ot as ChevronDown, St as findItemIndex, T as nodeNameIssue, Tt as Label, U as valueType, X as retryConfigurationSchema, Y as nodeRetryLimits, Z as supportsNodeRetry, _ as matchesSchema, _t as isGroupedItems, bt as compareItemEquality, c as DialogTrigger, ct as SelectChevron, d as Field, dt as SelectItem, f as FieldDescription, ft as SelectSeparator, gt as hasNullItemLabel, h as FieldLabel, ht as resolveAriaLabelledBy, i as DialogDescription, it as limitDecisionQuestions, j as nodeErrorSchema, l as Icon, lt as SelectContent, m as FieldGroup, mt as SelectValue, nt as decisionTask, ot as dequal, p as FieldError, pt as SelectTrigger, q as webhookSupportsBody, r as DialogContent, rt as defaultDecisionQuestion, s as DialogTitle, st as Select$1, t as Dialog, tt as decisionQuestionIssues, u as Spinner, ut as SelectGroup, v as schemaObject, vt as stringifyAsLabel, wt as selectedValueIncludes, xt as defaultItemEquality, y as variableInputCompatible, yt as stringifyAsValue, z as operandHandle } from "./dialog-Bjo-r9B0.js";
7
+ import { C as isMac, S as toManifestNodeId, _ as E$1, a as collapseAllNested, b as toViewEdge, c as defaultTriggerIcon, d as selectableTimeZones, f as timeZoneLabel, g as cronDescription, h as timeZoneOffsetMinutes, i as JSONViewer, l as useDebouncedValue, m as timeZoneOffset, n as setAddItemId, o as formatDuration, p as timeZoneLongLabel, r as Textarea, s as CanvasNodeIcon, t as FlowCanvas, u as IconStack, v as CanvasTooltip, w as isSameViewport, x as toManifestHandleName, y as CanvasStore } from "./FlowCanvas-C5X22xQ7.js";
8
+ import { $ as providerIcon, $t as decodeResultList, A as getDefaultValue, At as WorkflowExportMenuItem, B as indexAddNodeOptions, Bt as EmptyMedia, C as feishuResourceKind, Cn as servers, D as editorGroups, Dn as inputValue, E as editorComponent, En as workflowSelectionTask, F as datePickerChange, Ft as InputGroupInput, G as observeResource, Gt as SourceSelect, H as mapSource, Ht as Badge, I as datePickerValue, It as Empty, Jt as EventSourceSetup, K as resourceData, Kt as createI18n, L as isDateFormat, Lt as EmptyContent, M as typeOfSchema, Mt as followWorkbenchLink, N as calendarChange, Nn as controlErrorCode, Nt as InputGroup, O as schemaForEditor, P as calendarDate, Pn as eventSourceKind, Pt as InputGroupAddon, Q as actionSummary, Rt as EmptyDescription, Sn as serverAddress, T as defaultValueEditorSchema, Tn as workflowCandidateGroup, Vt as EmptyTitle, Wt as SourceForm, X as semanticNodeIcon, Y as designerGraph, Yt as errorNotice, Z as triggerNodeIcon, _n as object, bn as securityOptions, ct as diagnosticMessage, ft as connectionCatalog, gn as listOperations, hn as triggerConfigValues, j as isUnconstrainedSchema, jt as IdTooltip, k as valueForEditor, lt as diagnosticNodeId, mn as triggerConfigValue, n as agentTool, nn as sourceOutputLabel, nt as hasRunFilter, on as triggerOutputDefinitions, q as resourceValue, qt as FeishuEventPicker, rn as sourcePort, rt as revisionView, sn as isJsonObject, tn as resolutionOutputPorts, tt as canCancelRun, ut as schemaMismatchMessage, vn as openApiFieldIssues, w as supportsFeishuChatFilter, xn as selectOperation, yn as openApiTask, zt as EmptyHeader } from "./flowChanges-Dp-rcEJ6.js";
9
9
  import { r as resolveUiLanguage } from "./languages-gYzoQqCi.js";
10
10
  import { a as renameObjectField, i as objectValue, n as isJsonValue, o as setObjectField, r as jsonDataTypes, s as valueType$1, t as initialValue } from "./value-BbFQZZ_V.js";
11
11
  import { n as compile, r as validate } from "./flowRunInputEditorStore-ys1-w9GW.js";
12
- import { t as WorkbenchSelect } from "./workbenchSelect-CChdgugI.js";
12
+ import { t as WorkbenchSelect } from "./workbenchSelect-C3hxUcYm.js";
13
13
  import * as React from "react";
14
14
  import reactExports, { Children, Fragment, Suspense, createContext, forwardRef, isValidElement, lazy, memo, useCallback, useContext, useEffect, useId, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState } from "react";
15
15
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
@@ -1342,6 +1342,20 @@ function AccountName({ name, builtIn, truncate = false }) {
1342
1342
  }
1343
1343
  //#endregion
1344
1344
  //#region src/form/browser/fieldTypeDisplay.tsx
1345
+ /** Schema definitions show constants; local value-editor choices keep their editor identity. */
1346
+ function useFieldTypePresentation(schema, valueOnly = false) {
1347
+ const t = useTranslate();
1348
+ const source = objectValue(schema);
1349
+ if (!valueOnly && source != null && Object.hasOwn(source, "const")) return {
1350
+ component: "literal",
1351
+ label: t("valueEditor.constant", { value: JSON.stringify(source.const) })
1352
+ };
1353
+ const component = editorComponent(schema);
1354
+ return {
1355
+ component,
1356
+ label: t(valueOnly && component === "json" ? "valueEditor.any" : `valueEditor.components.${component}`)
1357
+ };
1358
+ }
1345
1359
  /** Presents a fixed type, optionally using its read-only surface as a disclosure control. */
1346
1360
  function FieldTypeDisplay({ id, label, accessibleLabel, icon, compact = true, addon = false, surface = false, disclosure }) {
1347
1361
  const [container, setContainer] = useState(null);
@@ -6929,7 +6943,8 @@ var editorComponentIcons = {
6929
6943
  object: "i-lucide-light:braces",
6930
6944
  array: "i-lucide-light:brackets",
6931
6945
  json: "i-lucide-light:file-json",
6932
- null: "i-lucide-light:circle-dashed"
6946
+ null: "i-lucide-light:circle-dashed",
6947
+ literal: "i-lucide-light:equal"
6933
6948
  };
6934
6949
  function EditorComponentIcon({ component }) {
6935
6950
  return /* @__PURE__ */ jsx("i", {
@@ -6955,8 +6970,7 @@ function MenuHeader({ children }) {
6955
6970
  function EditorComponentSelect({ schema, id, name, disabled, invalid, readOnly, compact = true, showIcon = true, readOnlySurface = false, showArrayItemType = false, menuTitle, addon = false, valueOnly = false, disclosure, onChange }) {
6956
6971
  const t = useTranslate();
6957
6972
  const [container, setContainer] = useState(null);
6958
- const selectedComponent = editorComponent(schema);
6959
- const label = t(valueOnly && selectedComponent === "json" ? "valueEditor.any" : `valueEditor.components.${selectedComponent}`);
6973
+ const { component: selectedComponent, label } = useFieldTypePresentation(schema, valueOnly);
6960
6974
  const accessibleLabel = valueOnly ? t("valueEditor.valueDataType", {
6961
6975
  name,
6962
6976
  type: label
@@ -7078,8 +7092,7 @@ function EditorComponentSelect({ schema, id, name, disabled, invalid, readOnly,
7078
7092
  /** Displays a type inside explanatory copy without inheriting field-control height. */
7079
7093
  function InlineEditorComponentDisplay({ schema, name }) {
7080
7094
  const t = useTranslate();
7081
- const selectedComponent = editorComponent(schema);
7082
- const label = t(`valueEditor.components.${selectedComponent}`);
7095
+ const { component, label } = useFieldTypePresentation(schema);
7083
7096
  return /* @__PURE__ */ jsxs("span", {
7084
7097
  role: "img",
7085
7098
  "aria-label": `${t("valueEditor.type", { name })}: ${label}`,
@@ -7087,7 +7100,7 @@ function InlineEditorComponentDisplay({ schema, name }) {
7087
7100
  children: [/* @__PURE__ */ jsx("span", {
7088
7101
  "aria-hidden": "true",
7089
7102
  className: "absolute left-0 top-1/2 flex size-4 -translate-y-1/2 items-center justify-center",
7090
- children: /* @__PURE__ */ jsx(EditorComponentIcon, { component: selectedComponent })
7103
+ children: /* @__PURE__ */ jsx(EditorComponentIcon, { component })
7091
7104
  }), /* @__PURE__ */ jsx("span", {
7092
7105
  className: "min-w-0 truncate",
7093
7106
  children: label
@@ -21053,7 +21066,7 @@ function EditableAgentSettingsProvider({ children, task, nodeId, store, connecto
21053
21066
  return false;
21054
21067
  }
21055
21068
  const decoded = decodeRevisionContent({
21056
- modelVersion: 8,
21069
+ modelVersion: 9,
21057
21070
  modules: {},
21058
21071
  document: {
21059
21072
  bindings: {},
@@ -21337,6 +21350,19 @@ function presentDecisionOutputs(task, t) {
21337
21350
  };
21338
21351
  });
21339
21352
  }
21353
+ /** Localized system help stays in presentation; persisted runtime schemas remain language-neutral. */
21354
+ function presentSystemOutputs(node, t) {
21355
+ return Object.entries(nodeSystemOutputPorts(node)).map(([handle, port]) => Object.assign({ handle }, port, {
21356
+ description: t("inspector.node.errorFields.error"),
21357
+ jsonSchema: {
21358
+ ...nodeErrorSchema,
21359
+ properties: Object.fromEntries(Object.entries(nodeErrorSchema.properties).map(([name, field]) => [name, {
21360
+ ...field,
21361
+ description: t(`inspector.node.errorFields.${name}`)
21362
+ }]))
21363
+ }
21364
+ }));
21365
+ }
21340
21366
  function withDescriptions$1(ports, descriptionFor) {
21341
21367
  return ports.map((port) => {
21342
21368
  const description = descriptionFor(port.handle);
@@ -21378,15 +21404,23 @@ function presentedBuiltInOutputs(node, t) {
21378
21404
  /** Applies localized built-in output copy to source candidates without changing graph-owned data. */
21379
21405
  function presentBuiltInSourceCandidates(node, candidates, t) {
21380
21406
  const outputs = presentedBuiltInOutputs(node, t);
21381
- if (outputs == null) return candidates;
21382
- const descriptions = new Map(outputs.map((port) => [port.handle, port.description]));
21407
+ const systemOutputs = presentSystemOutputs(node, t);
21408
+ if (outputs == null && systemOutputs.length == 0) return candidates;
21383
21409
  return candidates.map((candidate) => {
21384
- const description = descriptions.get(candidate.output);
21385
- return description == null || description == candidate.description ? candidate : Object.assign({}, candidate, { description });
21410
+ const port = (candidate.system ? systemOutputs : outputs)?.find((item) => item.handle == candidate.output);
21411
+ if (port == null) return candidate;
21412
+ const description = port.description ?? candidate.description;
21413
+ const fields = candidate.system ? candidate.fields?.map((field) => Object.assign({}, field, { description: sourcePort(port, field.field)?.description })) : void 0;
21414
+ if (fields == null && description == candidate.description) return candidate;
21415
+ return Object.assign({}, candidate, { description }, fields == null ? {} : { fields });
21386
21416
  });
21387
21417
  }
21388
21418
  /** Returns localized built-in copy when available, otherwise preserving the port-owned description. */
21389
- function presentBuiltInOutputDescription(node, output, description, t) {
21419
+ function presentBuiltInOutputDescription(node, output, description, t, source) {
21420
+ if (source?.system) {
21421
+ const port = presentSystemOutputs(node, t).find((item) => item.handle == output);
21422
+ return port == null ? description : sourcePort(port, source.field)?.description ?? description;
21423
+ }
21390
21424
  return presentedBuiltInOutputs(node, t)?.find((port) => port.handle == output)?.description ?? description;
21391
21425
  }
21392
21426
  //#endregion
@@ -21444,7 +21478,7 @@ function CodeEditor({ ariaDescribedBy, ariaLabel, diagnostics, disabled, errorLa
21444
21478
  darkMode.current = darkMode$;
21445
21479
  setFailed(false);
21446
21480
  setLoading(true);
21447
- const extension = import("./typeScriptSession-D0bjYDeg.js").then(({ loadTypeScriptExtension }) => loadTypeScriptExtension(uri, typingRef.current, () => prepareCompletionRef.current?.())).catch(() => void 0);
21481
+ const extension = import("./typeScriptSession-B0hC-C8y.js").then(({ loadTypeScriptExtension }) => loadTypeScriptExtension(uri, typingRef.current, () => prepareCompletionRef.current?.())).catch(() => void 0);
21448
21482
  claimEditor(uri).then((nextRelease) => {
21449
21483
  release = nextRelease;
21450
21484
  if (disposed) {
@@ -21531,7 +21565,7 @@ function CodeEditor({ ariaDescribedBy, ariaLabel, diagnostics, disabled, errorLa
21531
21565
  editor.current?.updateOptions({ ariaDescribedBy });
21532
21566
  }, [ariaDescribedBy]);
21533
21567
  useEffect(() => {
21534
- import("./typeScriptSession-D0bjYDeg.js").then(({ updateTypeScriptTyping }) => updateTypeScriptTyping(uri, typing)).catch(noop);
21568
+ import("./typeScriptSession-B0hC-C8y.js").then(({ updateTypeScriptTyping }) => updateTypeScriptTyping(uri, typing)).catch(noop);
21535
21569
  }, [typing, uri]);
21536
21570
  useEffect(() => {
21537
21571
  if (location != null) editor.current?.revealPosition?.(location.line, location.column);
@@ -22710,7 +22744,13 @@ function useInputSourceQuery(calculate, enabled) {
22710
22744
  //#region src/workbench/browser/runtime/editor/sourceValueEditor.tsx
22711
22745
  var draftIssue = () => {};
22712
22746
  var variableSource = (name) => JSON.stringify(["variable", name]);
22713
- var upstreamSource = (nodeId, output, field) => JSON.stringify([
22747
+ var upstreamSource = (nodeId, output, field, system) => JSON.stringify(system ? [
22748
+ "upstream",
22749
+ nodeId,
22750
+ output,
22751
+ field,
22752
+ true
22753
+ ] : [
22714
22754
  "upstream",
22715
22755
  nodeId,
22716
22756
  output,
@@ -22833,13 +22873,13 @@ function SourceValueEditor({ fixed = false, sourceOnly = false, editor: customEd
22833
22873
  const variableCompatible = variableInputCompatible(schema);
22834
22874
  const hasVariables = variables.enabled && variables.names.length > 0;
22835
22875
  const literalSource = JSON.stringify(["literal"]);
22836
- const currentSource = bound ? variableSource(variableName) : connected && upstream?.current.length === 1 ? upstreamSource(upstream.current[0].nodeId, upstream.current[0].output, upstream.current[0].field) : connected ? JSON.stringify(["upstream"]) : literalSource;
22876
+ const currentSource = bound ? variableSource(variableName) : connected && upstream?.current.length === 1 ? upstreamSource(upstream.current[0].nodeId, upstream.current[0].output, upstream.current[0].field, upstream.current[0].system) : connected ? JSON.stringify(["upstream"]) : literalSource;
22837
22877
  const sourceKind = bound ? "variable" : connected ? "upstream" : "literal";
22838
22878
  const sourcePortal = sourceContainer?.closest(".editor-context-panel") ?? sourceContainer;
22839
- const sourceOption = (nodeId, { description, output, field, fields, check }, label) => {
22840
- const selected = sourceKind === "upstream" && currentSource === upstreamSource(nodeId, output, field);
22879
+ const sourceOption = (nodeId, { description, output, field, fields, check, system }, label) => {
22880
+ const selected = sourceKind === "upstream" && currentSource === upstreamSource(nodeId, output, field, system);
22841
22881
  const status = check.kind == "schema" ? t("inspector.sources.incompatible") : check.kind == "schema-error" ? t("inspector.sources.unverified") : void 0;
22842
- const itemKey = upstreamSource(nodeId, output, field);
22882
+ const itemKey = upstreamSource(nodeId, output, field, system);
22843
22883
  const sourceDescription = description?.trim();
22844
22884
  const item = /* @__PURE__ */ jsxs(DropdownMenuRadioItem, {
22845
22885
  className: `${sourceItemClass} ${status == null || selected ? "pr-8" : "pr-20"}`,
@@ -22886,10 +22926,11 @@ function SourceValueEditor({ fixed = false, sourceOnly = false, editor: customEd
22886
22926
  })] }, itemKey);
22887
22927
  };
22888
22928
  const selectUpstream = (next) => {
22889
- const [, nodeId, output, field] = JSON.parse(next);
22929
+ const [, nodeId, output, field, system] = JSON.parse(next);
22890
22930
  upstream?.onChange?.({
22891
22931
  nodeId,
22892
22932
  output,
22933
+ ...system ? { system } : {},
22893
22934
  ...field == null ? {} : { field }
22894
22935
  });
22895
22936
  };
@@ -23044,9 +23085,9 @@ function SourceValueEditor({ fixed = false, sourceOnly = false, editor: customEd
23044
23085
  children: /* @__PURE__ */ jsxs(DropdownMenuRadioGroup, {
23045
23086
  value: sourceKind === "upstream" && upstream.current.length === 1 && upstream.current[0]?.nodeId === group.nodeId ? currentSource : "",
23046
23087
  onValueChange: selectUpstream,
23047
- children: [upstream.current.filter((source) => source.nodeId === group.nodeId && source.check != null && source.check.kind != "available" && !group.outputs.some((candidate) => candidate.output === source.output && (source.field === void 0 || candidate.fields?.some((child) => child.field === source.field)))).map((source) => /* @__PURE__ */ jsxs(DropdownMenuRadioItem, {
23088
+ children: [upstream.current.filter((source) => source.nodeId === group.nodeId && source.check != null && source.check.kind != "available" && !group.outputs.some((candidate) => candidate.output === source.output && candidate.system === source.system && (source.field === void 0 || candidate.fields?.some((child) => child.field === source.field)))).map((source) => /* @__PURE__ */ jsxs(DropdownMenuRadioItem, {
23048
23089
  className: sourceItemClass,
23049
- value: upstreamSource(source.nodeId, source.output, source.field),
23090
+ value: upstreamSource(source.nodeId, source.output, source.field, source.system),
23050
23091
  disabled: true,
23051
23092
  children: [/* @__PURE__ */ jsx("i", {
23052
23093
  "aria-hidden": "true",
@@ -23056,15 +23097,15 @@ function SourceValueEditor({ fixed = false, sourceOnly = false, editor: customEd
23056
23097
  title: sourceOutputLabel(source),
23057
23098
  children: sourceOutputLabel(source)
23058
23099
  })]
23059
- }, upstreamSource(source.nodeId, source.output, source.field))), group.outputs.map((candidate) => candidate.fields?.length ? /* @__PURE__ */ jsxs(DropdownMenuSub, { children: [/* @__PURE__ */ jsxs(DropdownMenuSubTrigger, {
23060
- className: `${sourceSubTriggerClass} ${connected && upstream.current.some((source) => source.nodeId === group.nodeId && source.output === candidate.output) ? "bg-accent" : ""}`,
23100
+ }, upstreamSource(source.nodeId, source.output, source.field, source.system))), group.outputs.map((candidate) => /* @__PURE__ */ jsxs(Fragment, { children: [candidate.system && /* @__PURE__ */ jsx(DropdownMenuSeparator, { className: "mx-2 bg-border/50" }), candidate.fields?.length ? /* @__PURE__ */ jsxs(DropdownMenuSub, { children: [/* @__PURE__ */ jsxs(DropdownMenuSubTrigger, {
23101
+ className: `${sourceSubTriggerClass} ${connected && upstream.current.some((source) => source.nodeId === group.nodeId && source.system === candidate.system && source.output === candidate.output) ? "bg-accent" : ""}`,
23061
23102
  children: [/* @__PURE__ */ jsx("i", {
23062
23103
  "aria-hidden": "true",
23063
23104
  className: "i-lucide-light:corner-down-right size-3.5 shrink-0 text-muted-foreground"
23064
23105
  }), /* @__PURE__ */ jsx("span", {
23065
23106
  className: "min-w-0 flex-1 truncate font-mono",
23066
23107
  title: candidate.output,
23067
- children: candidate.output
23108
+ children: candidate.system ? t("inspector.node.systemError") : candidate.output
23068
23109
  })]
23069
23110
  }), /* @__PURE__ */ jsx(DropdownMenuSubContent, {
23070
23111
  className: `w-56 min-w-56 ${selectionMenuContentClass}`,
@@ -23078,7 +23119,7 @@ function SourceValueEditor({ fixed = false, sourceOnly = false, editor: customEd
23078
23119
  candidate.fields.map((child) => sourceOption(group.nodeId, child, child.field === "" ? "\"\"" : child.field))
23079
23120
  ]
23080
23121
  })
23081
- })] }, candidate.output) : sourceOption(group.nodeId, candidate, candidate.output))]
23122
+ })] }, candidate.output) : sourceOption(group.nodeId, candidate, candidate.system ? t("inspector.node.systemError") : candidate.output)] }, JSON.stringify([candidate.system, candidate.output])))]
23082
23123
  })
23083
23124
  })] }, group.nodeId))
23084
23125
  ]
@@ -23734,7 +23775,7 @@ var fieldTable_module_default = {
23734
23775
  //#endregion
23735
23776
  //#region src/form/browser/fieldTable.tsx
23736
23777
  /** Shared field geometry. Callers own definitions, values, actions and persistence. */
23737
- var FieldTable = forwardRef(({ layout = "definition", fixedTypes, typeColumn = true, output, nullable, empty, actionSlots = 1, className, children, ...props }, ref) => {
23778
+ var FieldTable = forwardRef(({ layout = "definition", fixedTypes, typeColumn = true, columnHeadings = true, output, nullable, empty, actionSlots = 1, className, children, ...props }, ref) => {
23738
23779
  const t = useTranslate();
23739
23780
  return /* @__PURE__ */ jsxs("div", {
23740
23781
  ...props,
@@ -23748,7 +23789,7 @@ var FieldTable = forwardRef(({ layout = "definition", fixedTypes, typeColumn = t
23748
23789
  "data-nullable": nullable || void 0,
23749
23790
  "data-empty": empty || void 0,
23750
23791
  "data-action-slots": actionSlots,
23751
- children: [!empty && /* @__PURE__ */ jsxs("div", {
23792
+ children: [columnHeadings && !empty && /* @__PURE__ */ jsxs("div", {
23752
23793
  className: fieldTable_module_default.columns,
23753
23794
  "data-layout": layout,
23754
23795
  "data-output": output || void 0,
@@ -26883,7 +26924,7 @@ function ErrorTriggerSourcesEditor({ store, nodeId, value, disabled }) {
26883
26924
  }
26884
26925
  //#endregion
26885
26926
  //#region src/workbench/browser/runtime/createEventSourceDialog.tsx
26886
- function CreateEventSourceDialog({ client, notify, teamId, existingNames, disabled, defaultOpen = false, className, trigger, onSelect, onCreated }) {
26927
+ function CreateEventSourceDialog({ client, sourceKind, notify, teamId, existingNames, disabled, defaultOpen = false, className, trigger, onSelect, onCreated }) {
26887
26928
  const t = useTranslate();
26888
26929
  const [open, setOpen] = useState(defaultOpen);
26889
26930
  const [root, setRoot] = useState(null);
@@ -26936,6 +26977,7 @@ function CreateEventSourceDialog({ client, notify, teamId, existingNames, disabl
26936
26977
  /* @__PURE__ */ jsxs("div", {
26937
26978
  className: "min-h-0 overflow-y-auto",
26938
26979
  children: [open && created == null && /* @__PURE__ */ jsx(SourceForm, {
26980
+ sourceKind,
26939
26981
  notify,
26940
26982
  client,
26941
26983
  teams: [],
@@ -27929,6 +27971,7 @@ function PortDefinitionEditor(props) {
27929
27971
  className: portList_module_default.list,
27930
27972
  layout: props.layout,
27931
27973
  fixedTypes: disabled,
27974
+ columnHeadings: props.columnHeadings,
27932
27975
  output: props.output,
27933
27976
  nullable: tableLayout,
27934
27977
  empty: !hasFields,
@@ -28126,7 +28169,7 @@ function TriggerConfigEditor({ inputs, fieldLabels, config, disabled, readOnly,
28126
28169
  });
28127
28170
  }
28128
28171
  //#endregion
28129
- //#region src/workbench/browser/runtime/editor/feishuTriggerConfig.tsx
28172
+ //#region src/workbench/browser/runtime/editor/eventSourceTriggerConfig.tsx
28130
28173
  function EventSourceSelect({ label, value, options, disabled, onChange, onOpen }) {
28131
28174
  const [container, setContainer] = useState(null);
28132
28175
  const selected = options.some((option) => option.value == value) ? value : null;
@@ -28162,7 +28205,7 @@ function EventSourceSelect({ label, value, options, disabled, onChange, onOpen }
28162
28205
  })
28163
28206
  });
28164
28207
  }
28165
- function FeishuTriggerConfig({ inputs, fieldLabels, config: assignments, nodeId, connectionId, disabled, store }) {
28208
+ function EventSourceTriggerConfig({ inputs, provider = "feishu_app_bot", fieldLabels, config: assignments, nodeId, connectionId, disabled, store }) {
28166
28209
  const config = triggerConfigValues(inputs, assignments);
28167
28210
  const t = useTranslate();
28168
28211
  const [attempt, setAttempt] = useState(0);
@@ -28204,7 +28247,7 @@ function FeishuTriggerConfig({ inputs, fieldLabels, config: assignments, nodeId,
28204
28247
  attempt
28205
28248
  ]);
28206
28249
  const sources = state?.key == key ? state.sources : void 0;
28207
- const matchingSources = sources?.filter((source) => source.provider == "feishu_app_bot" && source.connectionId == connectionId);
28250
+ const matchingSources = sources?.filter((source) => source.provider == provider && source.connectionId == connectionId);
28208
28251
  const options = matchingSources?.map((source) => ({
28209
28252
  value: source.sourceId,
28210
28253
  label: source.name
@@ -28261,6 +28304,7 @@ function FeishuTriggerConfig({ inputs, fieldLabels, config: assignments, nodeId,
28261
28304
  variant: "ghost",
28262
28305
  className: "h-full w-full justify-start rounded-none border-0 bg-transparent px-2"
28263
28306
  }),
28307
+ sourceKind: eventSourceKind(provider),
28264
28308
  client: store.eventSourceClient,
28265
28309
  teamId: state?.key == key ? state.teamId ?? null : null,
28266
28310
  existingNames: sources?.map((source) => source.name) ?? [],
@@ -28296,7 +28340,7 @@ function FeishuTriggerConfig({ inputs, fieldLabels, config: assignments, nodeId,
28296
28340
  children: t("eventSources.loadFailed")
28297
28341
  })
28298
28342
  ]
28299
- }) : input.handle === "eventTypes" ? sourceId ? /* @__PURE__ */ jsxs("div", {
28343
+ }) : input.handle === "eventTypes" && provider === "feishu_app_bot" ? sourceId ? /* @__PURE__ */ jsxs("div", {
28300
28344
  className: "flex flex-col gap-2",
28301
28345
  children: [/* @__PURE__ */ jsx(FeishuEventPicker, {
28302
28346
  value: selectedEvents,
@@ -28321,6 +28365,127 @@ function FeishuTriggerConfig({ inputs, fieldLabels, config: assignments, nodeId,
28321
28365
  });
28322
28366
  }
28323
28367
  //#endregion
28368
+ //#region src/workbench/browser/runtime/editor/retrySettings.tsx
28369
+ function RetrySettings({ nodeId, retry, disabled, onSave }) {
28370
+ const t = useTranslate();
28371
+ const id = useId();
28372
+ const [draft, setDraft] = useState({
28373
+ count: retry?.maxRetries ?? 0,
28374
+ seconds: String((retry?.intervalMs ?? defaultNodeRetry.intervalMs) / 1e3)
28375
+ });
28376
+ const current = useRef(draft);
28377
+ const request = useRef();
28378
+ const [invalid, setInvalid] = useState(false);
28379
+ const enabled = draft.count > 0;
28380
+ useEffect(() => {
28381
+ request.current?.abort();
28382
+ current.current = {
28383
+ count: retry?.maxRetries ?? 0,
28384
+ seconds: String((retry?.intervalMs ?? defaultNodeRetry.intervalMs) / 1e3)
28385
+ };
28386
+ setDraft(current.current);
28387
+ setInvalid(false);
28388
+ }, [
28389
+ nodeId,
28390
+ retry?.maxRetries,
28391
+ retry?.intervalMs,
28392
+ disabled
28393
+ ]);
28394
+ useEffect(() => () => request.current?.abort(), []);
28395
+ async function validate(candidate, save) {
28396
+ request.current?.abort();
28397
+ const controller = new AbortController();
28398
+ request.current = controller;
28399
+ await Promise.resolve();
28400
+ if (controller.signal.aborted || request.current !== controller || current.current !== candidate) return;
28401
+ const parsed = retryConfigurationSchema.safeParse({
28402
+ maxRetries: candidate.count,
28403
+ intervalMs: Number(candidate.seconds) * 1e3
28404
+ });
28405
+ const valid = parsed.success && parsed.data.maxRetries > 0;
28406
+ setInvalid(!valid);
28407
+ if (valid && save && !disabled && (parsed.data.maxRetries != retry?.maxRetries || parsed.data.intervalMs != retry?.intervalMs)) onSave(parsed.data);
28408
+ }
28409
+ return /* @__PURE__ */ jsxs(FieldGroup, { children: [/* @__PURE__ */ jsxs(Field, {
28410
+ orientation: "horizontal",
28411
+ className: "grid grid-cols-2 gap-3",
28412
+ children: [/* @__PURE__ */ jsxs("div", {
28413
+ className: "flex items-center gap-1",
28414
+ children: [/* @__PURE__ */ jsx(FieldLabel, {
28415
+ htmlFor: `node-${id}-retry`,
28416
+ children: t("inspector.node.retry")
28417
+ }), /* @__PURE__ */ jsx(HelpButton, {
28418
+ label: t("inspector.node.retryHelp"),
28419
+ children: t("inspector.node.retryHint")
28420
+ })]
28421
+ }), /* @__PURE__ */ jsxs(FieldSelect, {
28422
+ id: `node-${id}-retry`,
28423
+ "aria-label": t("inspector.node.retry"),
28424
+ value: draft.count,
28425
+ disabled,
28426
+ onChange: (value) => {
28427
+ if (disabled) return;
28428
+ request.current?.abort();
28429
+ const next = {
28430
+ ...current.current,
28431
+ count: Number(value)
28432
+ };
28433
+ current.current = next;
28434
+ setDraft(next);
28435
+ if (next.count === 0) {
28436
+ setInvalid(false);
28437
+ onSave(void 0);
28438
+ } else validate(next, true);
28439
+ },
28440
+ children: [/* @__PURE__ */ jsx("option", {
28441
+ value: 0,
28442
+ children: t("inspector.node.retryNone")
28443
+ }), Array.from({ length: nodeRetryLimits.maxRetries }, (_, index) => index + 1).map((count) => /* @__PURE__ */ jsx("option", {
28444
+ value: count,
28445
+ children: t(count === 1 ? "inspector.node.retryOnce" : "inspector.node.retryCount", { count })
28446
+ }, count))]
28447
+ })]
28448
+ }), enabled && /* @__PURE__ */ jsxs(Field, {
28449
+ "data-invalid": invalid,
28450
+ children: [/* @__PURE__ */ jsxs("div", {
28451
+ className: "grid grid-cols-2 items-center gap-3",
28452
+ children: [/* @__PURE__ */ jsx(FieldLabel, {
28453
+ htmlFor: `node-${id}-retry-interval`,
28454
+ children: t("inspector.node.retryInterval")
28455
+ }), /* @__PURE__ */ jsxs(InputGroup, { children: [/* @__PURE__ */ jsx(InputGroupInput, {
28456
+ id: `node-${id}-retry-interval`,
28457
+ type: "number",
28458
+ min: nodeRetryLimits.minIntervalMs / 1e3,
28459
+ max: nodeRetryLimits.maxIntervalMs / 1e3,
28460
+ step: nodeRetryLimits.intervalStepMs / 1e3,
28461
+ readOnly: disabled,
28462
+ value: draft.seconds,
28463
+ "aria-invalid": invalid,
28464
+ "aria-describedby": invalid ? `node-${id}-retry-error` : void 0,
28465
+ onChange: (event) => {
28466
+ const next = {
28467
+ ...current.current,
28468
+ seconds: event.currentTarget.value
28469
+ };
28470
+ current.current = next;
28471
+ setDraft(next);
28472
+ validate(next, false);
28473
+ },
28474
+ onBlur: () => void validate(current.current, true),
28475
+ onKeyDown: (event) => {
28476
+ if (event.key == "Enter") validate(current.current, true);
28477
+ }
28478
+ }), /* @__PURE__ */ jsx(InputGroupAddon, {
28479
+ align: "inline-end",
28480
+ children: t("inspector.node.retrySeconds")
28481
+ })] })]
28482
+ }), invalid && /* @__PURE__ */ jsx(FieldError, {
28483
+ id: `node-${id}-retry-error`,
28484
+ children: t("inspector.node.retryError")
28485
+ })]
28486
+ })] });
28487
+ }
28488
+ //#endregion
28324
28489
  //#region src/workbench/browser/runtime/editor/generalSettings.tsx
28325
28490
  function GeneralSettings({ title, children, disabled = false, readOnly = false, node, nodeId, store }) {
28326
28491
  const t = useTranslate();
@@ -28383,6 +28548,53 @@ function GeneralSettings({ title, children, disabled = false, readOnly = false,
28383
28548
  className: "inspector-disclosure-content node-settings",
28384
28549
  children: /* @__PURE__ */ jsxs(FieldGroup, { children: [
28385
28550
  children,
28551
+ supportsNodeRetry(node) && /* @__PURE__ */ jsx(RetrySettings, {
28552
+ nodeId,
28553
+ retry: node.retry,
28554
+ disabled: disabled || readOnly || store == null,
28555
+ onSave: (retry) => {
28556
+ store?.nodes.saveNodeSettings(nodeId, {
28557
+ name: node.name,
28558
+ timeoutMs: node.timeoutMs,
28559
+ maxExecutions: node.maxExecutions,
28560
+ retry
28561
+ });
28562
+ }
28563
+ }),
28564
+ supportsNodeErrorHandling(node) && /* @__PURE__ */ jsxs(Field, {
28565
+ orientation: "horizontal",
28566
+ className: "grid grid-cols-2 gap-3",
28567
+ children: [/* @__PURE__ */ jsxs("div", {
28568
+ className: "flex items-center gap-1",
28569
+ children: [/* @__PURE__ */ jsx(FieldLabel, {
28570
+ htmlFor: `node-${nodeId}-on-error`,
28571
+ children: t("inspector.node.onError")
28572
+ }), /* @__PURE__ */ jsx(HelpButton, {
28573
+ label: t("inspector.node.onErrorHelp"),
28574
+ children: t("inspector.node.onErrorHint")
28575
+ })]
28576
+ }), /* @__PURE__ */ jsxs(FieldSelect, {
28577
+ id: `node-${nodeId}-on-error`,
28578
+ "aria-label": t("inspector.node.onError"),
28579
+ value: node.onError ?? "stop",
28580
+ disabled: disabled || readOnly || store == null,
28581
+ onChange: (value) => {
28582
+ if (!disabled && !readOnly) store?.nodes.saveNodeSettings(nodeId, {
28583
+ name: node.name,
28584
+ timeoutMs: node.timeoutMs,
28585
+ maxExecutions: node.maxExecutions,
28586
+ onError: value == "error" ? "error" : void 0
28587
+ });
28588
+ },
28589
+ children: [/* @__PURE__ */ jsx("option", {
28590
+ value: "stop",
28591
+ children: t("inspector.node.onErrorStop")
28592
+ }), /* @__PURE__ */ jsx("option", {
28593
+ value: "error",
28594
+ children: t("inspector.node.onErrorOutput")
28595
+ })]
28596
+ })]
28597
+ }),
28386
28598
  /* @__PURE__ */ jsxs(Field, {
28387
28599
  "data-invalid": limitError != null,
28388
28600
  children: [
@@ -28546,8 +28758,8 @@ function LeinaBotSelect({ source, flowId, value, disabled, onChange }) {
28546
28758
  });
28547
28759
  }
28548
28760
  //#endregion
28549
- //#region src/workbench/browser/runtime/editor/linearTriggerConfig.tsx
28550
- function useOptions(store, nodeId, field, scope, enabled) {
28761
+ //#region src/workbench/browser/runtime/editor/useTriggerConfigOptions.ts
28762
+ function useTriggerConfigOptions(store, nodeId, field, scope, enabled) {
28551
28763
  const [attempt, setAttempt] = useState(0);
28552
28764
  const key = JSON.stringify([
28553
28765
  nodeId,
@@ -28597,6 +28809,8 @@ function useOptions(store, nodeId, field, scope, enabled) {
28597
28809
  refresh: () => setAttempt((value) => value + 1)
28598
28810
  };
28599
28811
  }
28812
+ //#endregion
28813
+ //#region src/workbench/browser/runtime/editor/linearTriggerConfig.tsx
28600
28814
  var retryTeamValue = "__open_flow_retry_linear_teams__";
28601
28815
  function TeamSelect({ disabled, missing, options, value, onChange }) {
28602
28816
  const t = useTranslate();
@@ -28780,8 +28994,8 @@ function LinearTriggerConfig({ inputs, fieldLabels, config: assignments, nodeId,
28780
28994
  const teamId = typeof config.teamId == "string" ? config.teamId : void 0;
28781
28995
  const selected = Array.isArray(config.stateIds) ? config.stateIds.filter((id) => typeof id == "string") : [];
28782
28996
  const scope = JSON.stringify([store.$.flowId.value, connectionId]);
28783
- const teams = useOptions(store, nodeId, "teamId", scope, connectionId != null);
28784
- const states = useOptions(store, nodeId, "stateIds", JSON.stringify([scope, teamId]), connectionId != null && teamId != null);
28997
+ const teams = useTriggerConfigOptions(store, nodeId, "teamId", scope, connectionId != null);
28998
+ const states = useTriggerConfigOptions(store, nodeId, "stateIds", JSON.stringify([scope, teamId]), connectionId != null && teamId != null);
28785
28999
  const missingTeam = teamId != null && teams.options != null && !teams.options.some((item) => item.value == teamId);
28786
29000
  const missingStates = states.options == null ? [] : selected.filter((id) => !states.options.some((item) => item.value == id));
28787
29001
  return /* @__PURE__ */ jsx(TriggerConfigEditor, {
@@ -29393,9 +29607,15 @@ function withDescriptions(fields, descriptions) {
29393
29607
  return description == null || description == field.description ? field : Object.assign({}, field, { description });
29394
29608
  });
29395
29609
  }
29396
- /** Adds localized Provider configuration copy without changing graph-owned definitions. */
29397
- function presentProviderTriggerConfig(inputs, display) {
29398
- return withDescriptions(inputs, display?.configInputs);
29610
+ /** Localizes Provider configuration copy while preserving its declared layout. */
29611
+ function presentProviderTriggerConfig(inputs, display, groupLabels) {
29612
+ const fields = withDescriptions(inputs, display?.configInputs);
29613
+ if (groupLabels == null) return fields;
29614
+ return fields.map((field) => {
29615
+ if (!("group" in field)) return field;
29616
+ const group = groupLabels[field.group];
29617
+ return group == null || group == field.group ? field : Object.assign({}, field, { group });
29618
+ });
29399
29619
  }
29400
29620
  /** Adds localized Provider output copy without changing graph-owned definitions. */
29401
29621
  function presentProviderTriggerOutputs(trigger, display) {
@@ -29465,6 +29685,92 @@ function ResolutionDefinition({ disabled, selection, store }) {
29465
29685
  }), error != null && /* @__PURE__ */ jsx(FieldError, { children: error })] })
29466
29686
  });
29467
29687
  }
29688
+ //#endregion
29689
+ //#region src/workbench/browser/runtime/editor/tallyTriggerConfig.tsx
29690
+ function TallyTriggerConfig({ inputs, fieldLabels, config, nodeId, connectionId, disabled, store }) {
29691
+ const t = useTranslate();
29692
+ const values = triggerConfigValues(inputs, config);
29693
+ const formId = typeof values.formId == "string" ? values.formId : void 0;
29694
+ const forms = useTriggerConfigOptions(store, nodeId, "formId", JSON.stringify([store.$.flowId.value, connectionId]), connectionId != null);
29695
+ const missing = formId != null && forms.options != null && !forms.options.some((item) => item.value == formId);
29696
+ const items = [...forms.options ?? [], ...formId != null && !forms.options?.some((item) => item.value == formId) ? [{
29697
+ value: formId,
29698
+ label: formId
29699
+ }] : []];
29700
+ return /* @__PURE__ */ jsx(TriggerConfigEditor, {
29701
+ inputs,
29702
+ fieldLabels,
29703
+ config,
29704
+ disabled,
29705
+ onChange: (name, value) => void store.nodes.saveTriggerConfig(nodeId, name, value),
29706
+ onReset: () => store.nodes.resetTriggerConfig(nodeId),
29707
+ onResetValue: (name) => void store.nodes.resetTriggerConfig(nodeId, [name]),
29708
+ renderEditor: (input) => input.handle == "formId" ? /* @__PURE__ */ jsxs("div", {
29709
+ className: "min-w-0",
29710
+ children: [
29711
+ /* @__PURE__ */ jsxs(Select$1, {
29712
+ items,
29713
+ value: formId ?? null,
29714
+ disabled: disabled || connectionId == null,
29715
+ onOpenChange: (open) => {
29716
+ if (open) forms.refresh();
29717
+ },
29718
+ onValueChange: (value) => {
29719
+ if (typeof value == "string") store.nodes.saveTriggerConfig(nodeId, "formId", value);
29720
+ },
29721
+ children: [/* @__PURE__ */ jsx(SelectTrigger, {
29722
+ "aria-label": t("tallyTrigger.form"),
29723
+ "aria-invalid": missing || void 0,
29724
+ className: "w-full",
29725
+ "data-field-control": true,
29726
+ "data-field-prompt": missing || void 0,
29727
+ size: "field",
29728
+ children: /* @__PURE__ */ jsx(SelectValue, { placeholder: t("tallyTrigger.selectForm") })
29729
+ }), /* @__PURE__ */ jsxs(SelectContent, {
29730
+ className: selectionMenuContentClass,
29731
+ children: [
29732
+ forms.loading && /* @__PURE__ */ jsx("span", {
29733
+ className: `block px-2 text-muted-foreground 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`,
29734
+ children: t("tallyTrigger.loading")
29735
+ }),
29736
+ forms.options?.map((item) => /* @__PURE__ */ jsx(SelectItem, {
29737
+ value: item.value,
29738
+ className: selectionMenuItemClass,
29739
+ children: item.label
29740
+ }, item.value)),
29741
+ missing && formId != null && /* @__PURE__ */ jsx(SelectItem, {
29742
+ disabled: true,
29743
+ value: formId,
29744
+ 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",
29745
+ children: formId
29746
+ }),
29747
+ !forms.loading && !forms.failed && forms.options?.length == 0 && /* @__PURE__ */ jsx("span", {
29748
+ className: `block px-2 text-muted-foreground 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`,
29749
+ children: t("tallyTrigger.noForms")
29750
+ })
29751
+ ]
29752
+ })]
29753
+ }),
29754
+ missing && /* @__PURE__ */ jsx("p", {
29755
+ role: "status",
29756
+ className: "text-destructive",
29757
+ children: t("tallyTrigger.unavailable")
29758
+ }),
29759
+ forms.failed && /* @__PURE__ */ jsxs("div", {
29760
+ role: "status",
29761
+ className: "text-destructive",
29762
+ children: [t("tallyTrigger.failed"), /* @__PURE__ */ jsx(Button$1, {
29763
+ disabled,
29764
+ size: "field",
29765
+ variant: "ghost",
29766
+ onClick: forms.refresh,
29767
+ children: t("tallyTrigger.retry")
29768
+ })]
29769
+ })
29770
+ ]
29771
+ }) : void 0
29772
+ });
29773
+ }
29468
29774
  var triggerScheduleEditor_module_default = {
29469
29775
  describedControl: "triggerScheduleEditor_describedControl_49cac",
29470
29776
  describedInput: "triggerScheduleEditor_describedInput_49cac",
@@ -30650,11 +30956,12 @@ function inputUpstreamSources({ revision, sourceNodeIcons, selection, store, han
30650
30956
  current: sources.map((source) => {
30651
30957
  const node = graph.nodes[source.nodeId];
30652
30958
  return {
30653
- description: node == null ? revision.outputDescription(source.nodeId, source.output) : presentProviderOutputDescription(node, source.output, presentBuiltInOutputDescription(node, source.output, revision.outputDescription(source.nodeId, source.output), t), providerDisplay(node)),
30959
+ description: node == null ? revision.outputDescription(source.nodeId, source.output) : presentProviderOutputDescription(node, source.output, presentBuiltInOutputDescription(node, source.output, revision.outputDescription(source.nodeId, source.output), t, source), providerDisplay(node)),
30654
30960
  icon: sourceNodeIcons?.[source.nodeId],
30655
30961
  nodeId: source.nodeId,
30656
30962
  nodeName: node?.name,
30657
30963
  output: source.output,
30964
+ system: source.system,
30658
30965
  field: source.field,
30659
30966
  check: void 0
30660
30967
  };
@@ -30688,6 +30995,9 @@ function NodeInspector({ webhookDeployment, variables = {
30688
30995
  const disabled = readOnly || temporarilyDisabled || store == null;
30689
30996
  const t = useTranslate();
30690
30997
  const content = useRef(null);
30998
+ const providerTrigger = selection?.kind === "trigger" && (selection.trigger.kind === "integration" || selection.trigger.kind === "poll") ? selection.trigger : void 0;
30999
+ const providerDisplay = providerTrigger == null ? void 0 : triggerDisplays?.[providerTrigger.definition.key];
31000
+ const providerConfigInputs = providerTrigger == null ? [] : presentProviderTriggerConfig(providerTrigger.definition.configInputs, providerDisplay, { "Advanced settings": t("valueEditor.advancedSettings") });
30691
31001
  const task = selection?.kind == "task" ? selection.definition : void 0;
30692
31002
  const isAgent = task != null && "executor" in task && task.executor.kind == "agent";
30693
31003
  const isDecision = task != null && "executor" in task && task.executor.kind == "decision";
@@ -30806,17 +31116,35 @@ function NodeInspector({ webhookDeployment, variables = {
30806
31116
  store,
30807
31117
  theme
30808
31118
  }),
30809
- selection?.kind === "trigger" && (selection.trigger.kind === "integration" || selection.trigger.kind === "poll") && (!readOnly && store != null && ["feishu.on_event", "feishu_app_bot.on_event"].includes(selection.trigger.definition.key) ? /* @__PURE__ */ jsx(FeishuTriggerConfig, {
30810
- inputs: presentProviderTriggerConfig(selection.trigger.definition.configInputs, triggerDisplays?.[selection.trigger.definition.key]),
30811
- fieldLabels: triggerDisplays?.[selection.trigger.definition.key]?.configInputLabels,
31119
+ selection?.kind === "trigger" && (selection.trigger.kind === "integration" || selection.trigger.kind === "poll") && (!readOnly && store != null && [
31120
+ "feishu.on_event",
31121
+ "feishu_app_bot.on_event",
31122
+ "slackbot.on_event",
31123
+ "intercom.on_conversation_event",
31124
+ "sentry.on_issue_alert",
31125
+ "zoom.on_recording_ready",
31126
+ "fireflies.on_meeting_ready",
31127
+ "jira.on_issue_event"
31128
+ ].includes(selection.trigger.definition.key) ? /* @__PURE__ */ jsx(EventSourceTriggerConfig, {
31129
+ provider: selection.trigger.definition.provider === "slackbot" ? "slackbot" : selection.trigger.definition.provider === "intercom" ? "intercom" : selection.trigger.definition.provider === "sentry" ? "sentry" : selection.trigger.definition.provider === "zoom" ? "zoom" : selection.trigger.definition.provider === "fireflies" ? "fireflies" : selection.trigger.definition.provider === "jira" ? "jira" : "feishu_app_bot",
31130
+ inputs: providerConfigInputs,
31131
+ fieldLabels: providerDisplay?.configInputLabels,
30812
31132
  config: selection.trigger.config,
30813
31133
  nodeId: selection.id,
30814
31134
  connectionId: selection.trigger.connectionId,
30815
31135
  disabled,
30816
31136
  store
30817
31137
  }) : !readOnly && store != null && selection.trigger.definition.key === "linear.on_issue_changed" ? /* @__PURE__ */ jsx(LinearTriggerConfig, {
30818
- inputs: presentProviderTriggerConfig(selection.trigger.definition.configInputs, triggerDisplays?.[selection.trigger.definition.key]),
30819
- fieldLabels: triggerDisplays?.[selection.trigger.definition.key]?.configInputLabels,
31138
+ inputs: providerConfigInputs,
31139
+ fieldLabels: providerDisplay?.configInputLabels,
31140
+ config: selection.trigger.config,
31141
+ nodeId: selection.id,
31142
+ connectionId: selection.trigger.connectionId,
31143
+ disabled,
31144
+ store
31145
+ }) : !readOnly && store != null && selection.trigger.definition.key === "tally.on_form_response" ? /* @__PURE__ */ jsx(TallyTriggerConfig, {
31146
+ inputs: providerConfigInputs,
31147
+ fieldLabels: providerDisplay?.configInputLabels,
30820
31148
  config: selection.trigger.config,
30821
31149
  nodeId: selection.id,
30822
31150
  connectionId: selection.trigger.connectionId,
@@ -30830,8 +31158,8 @@ function NodeInspector({ webhookDeployment, variables = {
30830
31158
  onResetValue: (name) => {
30831
31159
  store?.nodes.resetTriggerConfig(selection.id, [name]);
30832
31160
  },
30833
- inputs: presentProviderTriggerConfig(selection.trigger.definition.configInputs, triggerDisplays?.[selection.trigger.definition.key]),
30834
- fieldLabels: triggerDisplays?.[selection.trigger.definition.key]?.configInputLabels,
31161
+ inputs: providerConfigInputs,
31162
+ fieldLabels: providerDisplay?.configInputLabels,
30835
31163
  config: selection.trigger.config,
30836
31164
  disabled,
30837
31165
  onChange: (name, value) => {
@@ -31112,9 +31440,9 @@ function NodeInspector({ webhookDeployment, variables = {
31112
31440
  }
31113
31441
  })
31114
31442
  }),
31115
- !unconfiguredOpenApi && !unconfiguredWorkflow && selection?.kind === "task" && selection.definition != null && /* @__PURE__ */ jsx("section", {
31443
+ !unconfiguredOpenApi && !unconfiguredWorkflow && selection?.kind === "task" && selection.definition != null && /* @__PURE__ */ jsxs("section", {
31116
31444
  className: "inspector-port-section",
31117
- children: /* @__PURE__ */ jsx(PortDefinitionEditor, {
31445
+ children: [/* @__PURE__ */ jsx(PortDefinitionEditor, {
31118
31446
  readOnly,
31119
31447
  groups: true,
31120
31448
  layout: "ports",
@@ -31128,7 +31456,14 @@ function NodeInspector({ webhookDeployment, variables = {
31128
31456
  outputs
31129
31457
  }, deletion);
31130
31458
  }
31131
- })
31459
+ }), selection.node.onError == "error" && /* @__PURE__ */ jsx(PortDefinitionEditor, {
31460
+ readOnly: true,
31461
+ groups: true,
31462
+ output: true,
31463
+ layout: "ports",
31464
+ columnHeadings: false,
31465
+ values: [{ group: t("inspector.node.systemOutputs") }, ...presentSystemOutputs(selection.node, t)]
31466
+ })]
31132
31467
  }),
31133
31468
  (selection?.kind === "approval" || selection?.kind === "wait") && /* @__PURE__ */ jsx("section", {
31134
31469
  className: "inspector-port-section",
@@ -31353,10 +31688,14 @@ function useInspectorPanel({ identity, preferences, selectedNodeIds, onSelectNod
31353
31688
  select(ids);
31354
31689
  if (!selecting.current && open) showSelection(ids);
31355
31690
  };
31356
- const openInspector = () => {
31357
- changeOpen(true);
31691
+ const revealInspector = () => {
31692
+ setOpen(true);
31358
31693
  setPage("properties");
31359
31694
  };
31695
+ const openInspector = () => {
31696
+ revealInspector();
31697
+ writeInspectorOpen(preferences, true);
31698
+ };
31360
31699
  return {
31361
31700
  open,
31362
31701
  page: selectedNodeIds.length === 0 ? "outline" : page,
@@ -31366,6 +31705,7 @@ function useInspectorPanel({ identity, preferences, selectedNodeIds, onSelectNod
31366
31705
  activate,
31367
31706
  back: () => setPage("outline"),
31368
31707
  openInspector,
31708
+ revealInspector,
31369
31709
  close: () => changeOpen(false),
31370
31710
  startSelection: () => {
31371
31711
  selecting.current = true;
@@ -33375,9 +33715,12 @@ function RunEventDetail({ event, onConfigureConnector }) {
33375
33715
  case "node.failed": {
33376
33716
  const { code, message: rawMessage } = event.payload.error;
33377
33717
  const message = code == "connector.connection-required" ? t("run.connectionRequired") : code == controlErrorCode.connectorUnconfigured ? t("run.connectorUnconfigured") : code == "connector.unavailable" && rawMessage == "The Connector request could not be completed." ? t("run.connectorUnavailable") : rawMessage;
33378
- return /* @__PURE__ */ jsx(EventDetail, {
33379
- label: t("run.nodeError"),
33380
- children: /* @__PURE__ */ jsx(RunError, {
33718
+ return /* @__PURE__ */ jsxs(EventDetail, {
33719
+ label: t(event.payload.handled ? "run.errorHandled" : "run.nodeError"),
33720
+ children: [event.payload.systemOutputs != null && /* @__PURE__ */ jsx(JsonValueView, {
33721
+ label: t("run.errorHandled"),
33722
+ value: event.payload.systemOutputs
33723
+ }), /* @__PURE__ */ jsx(RunError, {
33381
33724
  code,
33382
33725
  message,
33383
33726
  children: code == controlErrorCode.connectorUnconfigured && onConfigureConnector != null && /* @__PURE__ */ jsx(Button$1, {
@@ -33387,7 +33730,7 @@ function RunEventDetail({ event, onConfigureConnector }) {
33387
33730
  variant: "outline",
33388
33731
  children: t("run.configureConnector")
33389
33732
  })
33390
- })
33733
+ })]
33391
33734
  });
33392
33735
  }
33393
33736
  default: return null;
@@ -33924,6 +34267,7 @@ function eventIcon(event) {
33924
34267
  }
33925
34268
  }
33926
34269
  function eventTone(event) {
34270
+ if (event.kind == "node.failed" && event.payload.handled) return "warning";
33927
34271
  if (event.kind.includes("failed") || event.kind == "run.indeterminate") return "danger";
33928
34272
  if (event.kind == "node.completed" || event.kind == "run.completed") return "success";
33929
34273
  return "neutral";
@@ -33942,7 +34286,7 @@ function eventSummary(event, t) {
33942
34286
  case "node.log": return t("run.nodeLog", { level: event.payload.level });
33943
34287
  case "node.completed":
33944
34288
  case "run.completed": return t("run.eventCompleted");
33945
- case "node.failed":
34289
+ case "node.failed": return t(event.payload.handled ? "run.errorHandled" : "run.statusFailed");
33946
34290
  case "run.failed": return t("run.statusFailed");
33947
34291
  case "run.indeterminate": return t("run.statusIndeterminate");
33948
34292
  case "run.canceled": return t("run.statusCanceled");
@@ -34129,7 +34473,7 @@ function RunLog({ presentation, resultClient, events, eventsExpiresAt, eventNode
34129
34473
  const subject = eventSubject(group.started ?? event, t, nodeTitles);
34130
34474
  const source = sources.get(String(event.payload.scopeId));
34131
34475
  return /* @__PURE__ */ jsxs("div", {
34132
- className: `run-log-event run-execution ${group.status == "failed" ? "danger" : group.status == "completed" ? "success" : "neutral"}`,
34476
+ className: `run-log-event run-execution ${group.terminal?.kind == "node.failed" && group.terminal.payload.handled ? "warning" : group.status == "failed" ? "danger" : group.status == "completed" ? "success" : "neutral"}`,
34133
34477
  children: [/* @__PURE__ */ jsx("span", {
34134
34478
  className: "run-log-icon",
34135
34479
  children: /* @__PURE__ */ jsx("i", {
@@ -34144,7 +34488,7 @@ function RunLog({ presentation, resultClient, events, eventsExpiresAt, eventNode
34144
34488
  children: [
34145
34489
  /* @__PURE__ */ jsx("strong", { children: subject }),
34146
34490
  /* @__PURE__ */ jsx("span", { children: t(observation == null ? "run.executionNumber" : "run.recordedExecutionNumber", { count: group.count }) }),
34147
- /* @__PURE__ */ jsx("span", { children: t(`run.executionStatusLabels.${group.status}`) }),
34491
+ /* @__PURE__ */ jsx("span", { children: group.terminal?.kind == "node.failed" && group.terminal.payload.handled ? t("run.errorHandled") : t(`run.executionStatusLabels.${group.status}`) }),
34148
34492
  /* @__PURE__ */ jsx("span", {
34149
34493
  className: "run-execution-time",
34150
34494
  title: `${group.started?.createdAt ?? "?"} → ${group.terminal?.createdAt ?? "?"}`,
@@ -34545,8 +34889,7 @@ var flowRunInputEditor_module_default = {
34545
34889
  /** A schema-defined field edits values only; its name, type and nullability stay fixed. */
34546
34890
  function ValueField(props) {
34547
34891
  const t = useTranslate();
34548
- const component = editorComponent(props.schema);
34549
- const type = t(`valueEditor.components.${component}`);
34892
+ const { component, label } = useFieldTypePresentation(props.schema);
34550
34893
  return /* @__PURE__ */ jsx(FieldValueEditor, {
34551
34894
  ...props,
34552
34895
  layout: "ports",
@@ -34561,8 +34904,8 @@ function ValueField(props) {
34561
34904
  }), /* @__PURE__ */ jsx("span", {
34562
34905
  "data-field-type": true,
34563
34906
  children: /* @__PURE__ */ jsx(FieldTypeDisplay, {
34564
- label: type,
34565
- accessibleLabel: `${t("valueEditor.type", { name: props.label })}: ${type}`,
34907
+ label,
34908
+ accessibleLabel: `${t("valueEditor.type", { name: props.label })}: ${label}`,
34566
34909
  icon: /* @__PURE__ */ jsx(EditorComponentIcon, { component })
34567
34910
  })
34568
34911
  })] }),
@@ -36093,6 +36436,27 @@ function FlowEditor({ navigationIsland, onRun, onRunStarted, onCloseRuns, onConf
36093
36436
  onSelectNodes: (ids) => store.selectNodes(ids)
36094
36437
  });
36095
36438
  const [diagnosticsOpen, setDiagnosticsOpen] = useState(false);
36439
+ const [addedNode, setAddedNode] = useState();
36440
+ const connectorSetupPending = useVal(store.$.connectorSetupPending);
36441
+ useEffect(() => {
36442
+ if (addedNode == null) return;
36443
+ if (addedNode.flowId != flowId || selectedNodeIds.length != 1 || selectedNodeIds[0] != addedNode.nodeId) {
36444
+ setAddedNode(void 0);
36445
+ return;
36446
+ }
36447
+ if (checkLoading || connectorSetupPending || diagnostics == null || diagnostics.revisionId != draft?.revisionId) return;
36448
+ setAddedNode(void 0);
36449
+ if (diagnosticItems.some((item) => item.location?.nodeId == addedNode.nodeId)) panel.revealInspector();
36450
+ }, [
36451
+ addedNode,
36452
+ flowId,
36453
+ selectedNodeIds,
36454
+ checkLoading,
36455
+ connectorSetupPending,
36456
+ diagnostics,
36457
+ draft?.revisionId,
36458
+ diagnosticItems
36459
+ ]);
36096
36460
  useEffect(() => {
36097
36461
  if (runInputRequest != null || diagnosticItems.length == 0) setDiagnosticsOpen(false);
36098
36462
  }, [runInputRequest, diagnosticItems.length]);
@@ -36303,7 +36667,13 @@ function FlowEditor({ navigationIsland, onRun, onRunStarted, onCloseRuns, onConf
36303
36667
  annotationContext: canvasAnnotations(flowId, draft, workspaceStatus, moduleEditor?.status, history.failed),
36304
36668
  onAddNode: async (option, position, connection) => {
36305
36669
  const nodeId = await store.addNode(option, position, connection);
36306
- if (nodeId != null && panel.open) panel.activate([nodeId]);
36670
+ if (nodeId != null && flowId != null && store.workspace.$.flowId.value == flowId) {
36671
+ setAddedNode({
36672
+ flowId,
36673
+ nodeId
36674
+ });
36675
+ if (panel.open) panel.activate([nodeId]);
36676
+ }
36307
36677
  return nodeId;
36308
36678
  },
36309
36679
  onConnect: (edge) => void store.workspace.connect(edge),