@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.
- package/dist/browser/{ContentIcon-CsECY5id.js → ContentIcon-CUQHjQIw.js} +16 -8
- package/dist/browser/{FlowCanvas-C5X22xQ7.js → FlowCanvas-CqtUDPGj.js} +11 -26
- package/dist/browser/{createResourceDialog-Di5BBrQv.js → createResourceDialog-BAHYW9yu.js} +3 -3
- package/dist/browser/{dialog-Bjo-r9B0.js → dialog-DcGOzUP2.js} +162 -12
- package/dist/browser/{exportSvg-Cj6Spxx-.js → exportSvg-Dv5Qgrq7.js} +2 -2
- package/dist/browser/flow-authoring.js +95 -12
- package/dist/browser/flow-change-schema.d.ts +24 -1
- package/dist/browser/flow-change.d.ts +33 -4
- package/dist/browser/flow-change.js +96 -13
- package/dist/browser/{flowChanges-Dp-rcEJ6.js → flowChanges-CYyehKer.js} +2593 -2254
- package/dist/browser/{flowWorkspace-CB1QACku.js → flowWorkspace-qYUZPJHR.js} +1114 -392
- package/dist/browser/preview.css +225 -221
- package/dist/browser/preview.js +3781 -2655
- package/dist/browser/{tooltip-CJjYs_2I.js → tooltip-wZJRB9oP.js} +28 -1
- package/dist/browser/ui.css +8 -20
- package/dist/browser/workbench.css +225 -221
- package/dist/browser/workbench.js +31 -10
- package/dist/browser/{workbenchSelect-C3hxUcYm.js → workbenchSelect-D8_vP2p5.js} +2 -2
- package/dist/command/index.js +45 -45
- package/dist/common/authoring.d.ts +3 -3
- package/dist/common/authoringExamples.d.ts +3 -2
- package/dist/common/authoringSchema.d.ts +37 -374
- package/dist/common/control-api-conformance.js +151 -55
- package/dist/common/control-api.d.ts +12 -78
- package/dist/common/control-api.js +162 -39
- package/dist/common/control-requests.d.ts +3 -3
- package/dist/common/control-requests.js +221 -35
- package/dist/common/decision.js +85 -7
- package/dist/common/engine-contract.d.ts +4 -2
- package/dist/common/flow-encoding.js +110 -14
- package/dist/common/flow-graph.d.ts +3 -0
- package/dist/common/flow-semantics.js +273 -14
- package/dist/common/integration-trigger.js +85 -7
- package/dist/common/liveDetails.d.ts +15 -0
- package/dist/common/mcp.d.ts +3 -3
- package/dist/common/mcp.js +134 -38
- package/dist/common/openapi.js +85 -7
- package/dist/common/poll-trigger.js +85 -7
- package/dist/common/run-events.d.ts +2 -0
- package/dist/common/run-events.js +59 -2
- package/dist/common/runtime-contract.js +14 -4
- package/dist/common/scheduler.d.ts +6 -2
- package/dist/common/scheduler.js +178 -11
- package/dist/common/webhook-response.d.ts +43 -0
- package/dist/common/webhook-trigger.d.ts +12 -0
- package/dist/common/webhook-trigger.js +236 -9
- package/dist/common/workflow.js +85 -7
- package/package.json +1 -1
- 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-
|
|
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 {
|
|
5
|
-
import { A as
|
|
6
|
-
import { $ as
|
|
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-
|
|
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
|
|
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-
|
|
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-
|
|
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 {
|
|
2
|
-
import {
|
|
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 }) {
|