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

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 (49) hide show
  1. package/dist/browser/{ContentIcon-CsECY5id.js → ContentIcon-CUQHjQIw.js} +16 -8
  2. package/dist/browser/{FlowCanvas-C5X22xQ7.js → FlowCanvas-CqtUDPGj.js} +11 -26
  3. package/dist/browser/{createResourceDialog-Di5BBrQv.js → createResourceDialog-BAHYW9yu.js} +3 -3
  4. package/dist/browser/{dialog-Bjo-r9B0.js → dialog-DcGOzUP2.js} +162 -12
  5. package/dist/browser/{exportSvg-Cj6Spxx-.js → exportSvg-Dv5Qgrq7.js} +2 -2
  6. package/dist/browser/flow-authoring.js +95 -12
  7. package/dist/browser/flow-change-schema.d.ts +24 -1
  8. package/dist/browser/flow-change.d.ts +33 -4
  9. package/dist/browser/flow-change.js +96 -13
  10. package/dist/browser/{flowChanges-Dp-rcEJ6.js → flowChanges-CYyehKer.js} +2593 -2254
  11. package/dist/browser/{flowWorkspace-CB1QACku.js → flowWorkspace-qYUZPJHR.js} +1114 -392
  12. package/dist/browser/preview.css +225 -221
  13. package/dist/browser/preview.js +3781 -2655
  14. package/dist/browser/{tooltip-CJjYs_2I.js → tooltip-wZJRB9oP.js} +28 -1
  15. package/dist/browser/ui.css +8 -20
  16. package/dist/browser/workbench.css +225 -221
  17. package/dist/browser/workbench.js +31 -10
  18. package/dist/browser/{workbenchSelect-C3hxUcYm.js → workbenchSelect-D8_vP2p5.js} +2 -2
  19. package/dist/command/index.js +45 -45
  20. package/dist/common/authoring.d.ts +3 -3
  21. package/dist/common/authoringExamples.d.ts +3 -2
  22. package/dist/common/authoringSchema.d.ts +37 -374
  23. package/dist/common/control-api-conformance.js +151 -55
  24. package/dist/common/control-api.d.ts +12 -78
  25. package/dist/common/control-api.js +162 -39
  26. package/dist/common/control-requests.d.ts +3 -3
  27. package/dist/common/control-requests.js +221 -35
  28. package/dist/common/decision.js +85 -7
  29. package/dist/common/engine-contract.d.ts +4 -2
  30. package/dist/common/flow-encoding.js +110 -14
  31. package/dist/common/flow-graph.d.ts +3 -0
  32. package/dist/common/flow-semantics.js +273 -14
  33. package/dist/common/integration-trigger.js +85 -7
  34. package/dist/common/liveDetails.d.ts +15 -0
  35. package/dist/common/mcp.d.ts +3 -3
  36. package/dist/common/mcp.js +134 -38
  37. package/dist/common/openapi.js +85 -7
  38. package/dist/common/poll-trigger.js +85 -7
  39. package/dist/common/run-events.d.ts +2 -0
  40. package/dist/common/run-events.js +59 -2
  41. package/dist/common/runtime-contract.js +14 -4
  42. package/dist/common/scheduler.d.ts +6 -2
  43. package/dist/common/scheduler.js +178 -11
  44. package/dist/common/webhook-response.d.ts +43 -0
  45. package/dist/common/webhook-trigger.d.ts +12 -0
  46. package/dist/common/webhook-trigger.js +236 -9
  47. package/dist/common/workflow.js +85 -7
  48. package/package.json +1 -1
  49. package/skills/open-flow/references/flow-authoring.md +15 -10
@@ -1,9 +1,9 @@
1
- import { C as DropdownMenuContent, N as DropdownMenuTrigger, T as DropdownMenuItem, d as PopoverContent, g as PopoverTrigger, h as PopoverTitle, it as providerIconAppearance, k as DropdownMenuSeparator, st as IconThemeContext, u as Popover, x as DropdownMenu } from "./ContentIcon-CsECY5id.js";
1
+ import { C as DropdownMenuContent, N as DropdownMenuTrigger, T as DropdownMenuItem, d as PopoverContent, g as PopoverTrigger, h as PopoverTitle, it as providerIconAppearance, k as DropdownMenuSeparator, st as IconThemeContext, u as Popover, x as DropdownMenu } from "./ContentIcon-CUQHjQIw.js";
2
2
  import { a as derive, i as compute, l as val } from "./dist-bO8nvHFH.js";
3
3
  import { c as useLang, l as useTranslate, o as I18nProvider, u as useVal } from "./dist-BFmpkX4P.js";
4
- import { gr as cn, i as TooltipTrigger, mr as Button, n as TooltipContent, t as Tooltip } from "./tooltip-CJjYs_2I.js";
5
- import { A as upgradeRevisionContent, C as isTriggerNode, Et as Input, L as mapConditionSources, O as resourceNameIssue, R as nodeInputMappings, a as DialogFooter, b as FlowChangeError, d as Field, h as FieldLabel, i as DialogDescription, k as upgradeManualTrigger, l as Icon, m as FieldGroup, o as DialogHeader, ot as dequal$1, p as FieldError, r as DialogContent, s as DialogTitle, t as Dialog, u as Spinner, x as applyFlowChanges } from "./dialog-Bjo-r9B0.js";
6
- import { $ as providerIcon, An as record, At as WorkflowExportMenuItem, Bt as EmptyMedia, Ct as resetInputValues, Dt as setServiceConnections, Et as setInputSources, Ft as InputGroupInput, Ht as Badge, It as Empty, J as connectorActionPorts, K as resourceData, Kt as createI18n, Lt as EmptyContent, Mn as ApiError, Mt as followWorkbenchLink, Nn as controlErrorCode, Nt as InputGroup, On as invalidResponse, Ot as updateStartInputDefs, Pt as InputGroupAddon, Qt as allConnectorConnectionsQuery, R as addNodeIntent, Rt as EmptyDescription, S as updateWebhook, St as repairNodeNames, Tt as setConnectorConnection, U as scopedValue, Ut as EventSourcesPage, V as combineSources, Vt as EmptyTitle, W as CacheResource, Xt as WorkbenchClient, Y as designerGraph, Yt as errorNotice, Zt as randomId, _ as updateTask, _t as restoreCanvasPresentation, a as nameCreatedNodes, an as sampleErrorOutputs, at as Latest, b as updateTriggerConfig, bt as setNodeContentHidden, c as setTriggerConnection, cn as connection, d as updateNodeDescription, dn as parseWorkflowFile, dt as actionWithConnections, en as decodeTriggerCatalog, et as RunStore, f as updateNodeIcon, fn as workflowFileName, ft as connectionCatalog, g as updateResolution, gt as removeComments, h as updateOutputPorts, ht as flowPresentation, i as deleteSelection, in as normalizeTriggerOutputs, it as flowResourceReferences, jn as string, jt as IdTooltip, kn as jsonValue, kt as updateTriggerSchedule, l as setTriggerEventSource, ln as connectorActionMetadata, m as updateNodeSettings, mt as commentIds, o as setInputValue, on as triggerOutputDefinitions, ot as deriveInspectorDiagnostics, p as updateNodeName, pn as workflowNameFromFile, pt as canvasPresentationChange, q as resourceValue, r as applyFlowChanges$1, rt as revisionView, s as setInputVariable, st as diagnosticItems, t as addNode, u as updateCondition, un as encodeWorkflowFile, v as updateTaskAdditionalInputs, vt as setComment, wn as workflowCandidate, wt as setCodeActions, x as updateValue, xt as setNodePositions, y as updateTaskPorts, yt as setFlowViewport, z as deriveAddNodeOptions, zt as EmptyHeader } from "./flowChanges-Dp-rcEJ6.js";
4
+ import { br as cn, i as TooltipTrigger, n as TooltipContent, t as Tooltip, vr as Button } from "./tooltip-wZJRB9oP.js";
5
+ import { A as upgradeManualTrigger, It as Input, R as mapConditionSources, S as applyFlowChanges, a as DialogFooter, d as Field, gt as dequal$1, h as FieldLabel, i as DialogDescription, j as upgradeRevisionContent, k as resourceNameIssue, l as Icon, m as FieldGroup, o as DialogHeader, p as FieldError, r as DialogContent, s as DialogTitle, t as Dialog, u as Spinner, w as isTriggerNode, x as FlowChangeError, z as nodeInputMappings } from "./dialog-DcGOzUP2.js";
6
+ import { $ as designerGraph, $t as errorNotice, An as workflowCandidate, At as setInputSources, Bt as Empty, C as updateWebhook, Ct as setFlowViewport, Dt as resetInputValues, Et as repairNodeNames, Fn as jsonValue, Ft as IdTooltip, G as combineSources, Gt as EmptyTitle, H as addNodeIntent, Ht as EmptyDescription, In as record, It as followWorkbenchLink, J as CacheResource, Kt as Badge, Ln as string, Lt as InputGroup, Mt as updateStartInputDefs, Nt as updateTriggerSchedule, Ot as setCodeActions, Pn as invalidResponse, Pt as WorkflowExportMenuItem, Q as connectorActionPorts, Rn as ApiError, Rt as InputGroupAddon, S as updateValue, St as setComment, Tt as setNodePositions, U as deriveAddNodeOptions, Ut as EmptyHeader, Vt as EmptyContent, Wt as EmptyMedia, X as resourceData, Xt as createI18n, Z as resourceValue, _ as updateResolution, _n as parseWorkflowFile, _t as canvasPresentationChange, a as nameCreatedNodes, b as updateTaskPorts, bt as removeComments, c as setInputVariable, ct as flowResourceReferences, d as updateCondition, dn as sampleErrorOutputs, dt as diagnosticItems, en as WorkbenchClient, f as updateNodeDescription, fn as triggerOutputDefinitions, g as updateOutputPorts, gn as encodeWorkflowFile, gt as connectionCatalog, h as updateNodeSettings, hn as connectorActionMetadata, ht as actionWithConnections, i as deleteSelection, in as decodeTriggerCatalog, it as RunStore, jt as setServiceConnections, kt as setConnectorConnection, l as setTriggerConnection, lt as Latest, m as updateNodeName, mn as connection, nn as allConnectorConnectionsQuery, o as selectWebhookResponse, p as updateNodeIcon, q as scopedValue, qt as EventSourcesPage, r as applyFlowChanges$1, rt as providerIcon, s as setInputValue, st as revisionView, t as addNode, tn as randomId, u as setTriggerEventSource, un as normalizeTriggerOutputs, ut as deriveInspectorDiagnostics, v as updateTask, vn as workflowFileName, vt as commentIds, wt as setNodeContentHidden, x as updateTriggerConfig, xt as restoreCanvasPresentation, y as updateTaskAdditionalInputs, yn as workflowNameFromFile, yt as flowPresentation, zn as controlErrorCode, zt as InputGroupInput } from "./flowChanges-CYyehKer.js";
7
7
  import { a as uiLanguages, i as uiLanguageNames, n as isUiLanguage, r as resolveUiLanguage, t as importedWorkflowName } from "./languages-gYzoQqCi.js";
8
8
  import { Suspense, forwardRef, lazy, useEffect, useImperativeHandle, useLayoutEffect, useRef, useState } from "react";
9
9
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
@@ -516,7 +516,7 @@ function FlowDeletionDialog({ flow, workspace, container, busy, finalFocus, onCl
516
516
  }
517
517
  //#endregion
518
518
  //#region src/workbench/browser/runtime/shell/resourceBrowser.tsx
519
- var CreateResourceDialog = lazy(() => import("./createResourceDialog-Di5BBrQv.js"));
519
+ var CreateResourceDialog = lazy(() => import("./createResourceDialog-BAHYW9yu.js"));
520
520
  var flowIdTooltipAlignOffset = 44;
521
521
  var renamePopoverAlignOffset = -12;
522
522
  function compactFlowId(flowId) {
@@ -4653,9 +4653,20 @@ function pasteNodes(revision, clipboard, identity) {
4653
4653
  for (const [sourceId, node] of entries) {
4654
4654
  const nodeId = ids.get(sourceId);
4655
4655
  if (!("inputs" in node) && node.kind != "outputs") {
4656
+ const response = node.kind === "webhook" ? node.options?.responseBody : void 0;
4657
+ const copy = node.kind === "webhook" && response?.kind === "webhook-response" && response.nodeId != null ? {
4658
+ ...node,
4659
+ options: {
4660
+ ...node.options,
4661
+ responseBody: {
4662
+ ...response,
4663
+ nodeId: ids.get(response.nodeId) ?? response.nodeId
4664
+ }
4665
+ }
4666
+ } : node;
4656
4667
  operations.push({
4657
4668
  kind: "graph.node.create",
4658
- node,
4669
+ node: copy,
4659
4670
  nodeId
4660
4671
  });
4661
4672
  continue;
@@ -6280,7 +6291,7 @@ var WorkspaceStore = class {
6280
6291
  this.#set({ busy: void 0 });
6281
6292
  }
6282
6293
  }
6283
- async addNode(option, position, connection) {
6294
+ async addNode(option, position, connection, relatedChanges) {
6284
6295
  if (!await this.saveModuleEditor()) return;
6285
6296
  const draft = this.#model.value.draft;
6286
6297
  if (draft == null) return;
@@ -6290,7 +6301,8 @@ var WorkspaceStore = class {
6290
6301
  const intent = addNodeIntent(option, revision, this.#i18n.t);
6291
6302
  if (intent == null) return;
6292
6303
  const edge = connection?.(nodeId);
6293
- const nodeChanges = addNode(revision, nodeId, intent);
6304
+ const created = addNode(revision, nodeId, intent);
6305
+ const nodeChanges = created == null ? void 0 : [...created, ...relatedChanges?.(nodeId, revision) ?? []];
6294
6306
  if (nodeChanges == null) return;
6295
6307
  const changes = edge == null ? nodeChanges : [...nodeChanges, ...connect(applyFlowChanges$1(draft, nodeChanges).content, {
6296
6308
  source: edge.source,
@@ -6306,6 +6318,15 @@ var WorkspaceStore = class {
6306
6318
  if (intent.kind == "provider-trigger" && intent.connectionId == null) this.#configureAddedTrigger(draft.flowId, nodeId, intent.definition);
6307
6319
  return nodeId;
6308
6320
  }
6321
+ async addWebhookResponseNode(triggerId) {
6322
+ const option = this.$.addNodeOptions.value.find((item) => item.kind === "webhook-response");
6323
+ const position = this.#designer().nodes.find((node) => node.id === triggerId)?.position;
6324
+ if (option == null || position == null) return;
6325
+ return this.addNode(option, {
6326
+ x: position.x + 320,
6327
+ y: position.y
6328
+ }, void 0, (nodeId, revision) => selectWebhookResponse(revision, triggerId, nodeId) ?? []);
6329
+ }
6309
6330
  async #configureAddedTrigger(flowId, nodeId, definition) {
6310
6331
  const current = this.#draftSession.capture();
6311
6332
  const original = this.$.revision.value?.graph().nodes[nodeId];
@@ -7030,7 +7051,7 @@ var WorkbenchStore = class {
7030
7051
  const model = this.$.designer.value;
7031
7052
  const title = this.workspace.$.flow.value?.name ?? this.workspace.$.flowId.value ?? "Workflow";
7032
7053
  try {
7033
- const { downloadFlowSvg } = await import("./exportSvg-Cj6Spxx-.js");
7054
+ const { downloadFlowSvg } = await import("./exportSvg-Dv5Qgrq7.js");
7034
7055
  await downloadFlowSvg(model, title, language, options);
7035
7056
  if (!this.#disposed) this.#notice.set({
7036
7057
  kind: "success",
@@ -7284,7 +7305,7 @@ var WorkbenchStore = class {
7284
7305
  };
7285
7306
  //#endregion
7286
7307
  //#region src/workbench/browser/runtime/openFlowWorkbench.tsx
7287
- var FlowWorkspace = lazy(() => import("./flowWorkspace-CB1QACku.js"));
7308
+ var FlowWorkspace = lazy(() => import("./flowWorkspace-qYUZPJHR.js"));
7288
7309
  function OpenFlowSessionGate({ action, description, error, onSubmit, onTokenChange, pending = false, title, token, tokenLabel }) {
7289
7310
  const hasToken = token != null && tokenLabel != null && onTokenChange != null;
7290
7311
  const tokenValue = token ?? "";
@@ -1,5 +1,5 @@
1
- import { gr as cn } from "./tooltip-CJjYs_2I.js";
2
- import { dt as SelectItem, lt as SelectContent, mt as SelectValue, pt as SelectTrigger, st as Select, ut as SelectGroup } from "./dialog-Bjo-r9B0.js";
1
+ import { br as cn } from "./tooltip-wZJRB9oP.js";
2
+ import { Ct as SelectTrigger, _t as Select, bt as SelectGroup, wt as SelectValue, xt as SelectItem, yt as SelectContent } from "./dialog-DcGOzUP2.js";
3
3
  import { jsx, jsxs } from "react/jsx-runtime";
4
4
  //#region src/workbench/browser/runtime/shell/workbenchSelect.tsx
5
5
  function WorkbenchSelect({ ariaLabel, className, disabled = false, id, onValueChange, options, portalRoot, size, value, variant }) {