@oomol-lab/open-flow 0.1.0-beta.56 → 0.1.0-beta.58
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/{createResourceDialog-Btjes3wD.js → createResourceDialog-C23SBjYd.js} +2 -2
- package/dist/browser/flow-authoring-node.d.ts +6 -2
- package/dist/browser/flow-authoring.js +44 -12
- package/dist/browser/flow-change-schema.d.ts +266 -0
- package/dist/browser/flow-change.d.ts +5 -0
- package/dist/browser/flow-change.js +33 -2
- package/dist/browser/{flowChanges-BxutPLYO.js → flowChanges-fBiAeTzR.js} +954 -487
- package/dist/browser/{flowWorkspace-Dg4mqfa6.js → flowWorkspace-MqcEfg7T.js} +3 -3
- package/dist/browser/{icons-p2A9zs8t.js → icons-6oQ8Q9Wm.js} +4298 -4252
- package/dist/browser/preview.js +354 -36
- package/dist/browser/workbench.js +21 -10
- package/dist/browser/{workbenchSelect-LRp_Xjeq.js → workbenchSelect-DpLbIr29.js} +1 -1
- package/dist/common/authoring.d.ts +207 -0
- package/dist/common/authoringSchema.d.ts +1293 -0
- package/dist/common/control-api-conformance.js +975 -505
- package/dist/common/control-api-errors.d.ts +2 -1
- package/dist/common/control-api.d.ts +81 -0
- package/dist/common/control-api.js +973 -586
- package/dist/common/control-requests.d.ts +128 -0
- package/dist/common/control-requests.js +3122 -346
- package/dist/common/decision.js +12 -2
- package/dist/common/flow-encoding.js +12 -2
- package/dist/common/flow-semantics.d.ts +9 -0
- package/dist/common/flow-semantics.js +28 -3
- package/dist/common/integration-trigger.js +12 -2
- package/dist/common/lib-DrKav3HG.js +11403 -0
- package/dist/common/mcp.d.ts +120 -11
- package/dist/common/mcp.js +423 -51
- package/dist/common/openapi.js +12 -2
- package/dist/common/poll-trigger.js +12 -2
- package/dist/common/scheduler.js +12 -2
- package/dist/common/webhook-trigger.js +12 -2
- package/package.json +7 -1
- package/skills/open-flow/SKILL.md +32 -0
- package/skills/open-flow/references/flow-authoring.md +356 -0
- package/skills/open-flow/references/flow-n8n-conversion.md +196 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { $ as RunStore, $t as
|
|
1
|
+
import { $ as RunStore, $t as EventSourcesPage, An as providerIconAppearance, At as followWorkbenchLink, B as CacheResource, Bn as invalidResponse, Cn as sampleErrorOutputs, Ct as setCodeActions, Dt as updateTriggerConfig, Et as setTriggerConnection, F as feishuResourceKind, Gn as controlErrorCode, Gt as InputGroupAddon, H as resourceData, Hn as record, I as supportsFeishuChatFilter, J as providerIcon, Jt as EmptyContent, Kt as InputGroupInput, L as combineSources, Lt as PopoverTitle, M as addNodeIntent, Mt as Popover, N as deriveAddNodeOptions, Nt as PopoverContent, On as connection, Ot as updateTriggerSchedule, Qt as EmptyTitle, Rt as PopoverTrigger, St as resetInputValues, Tn as isJsonObject, Tt as setInputSources, U as resourceValue, Un as string, Vn as jsonValue, W as designerGraph, Wn as ApiError, Wt as InputGroup, Xt as EmptyHeader, Yt as EmptyDescription, Zt as EmptyMedia, _ as updateValue, _n as randomId, _t as setComment, a as nameCreatedNodes, at as deriveInspectorDiagnostics, bn as decodeTriggerCatalog, bt as setNodePositions, c as updateCondition, d as updateNodeName, dt as connectionCatalog, f as updateNodeSettings, ft as canvasPresentationChange, g as updateTaskPorts, gn as WorkbenchClient, gt as restoreCanvasPresentation, h as updateTaskAdditionalInputs, hn as errorNotice, ht as removeComments, i as deleteSelection, it as Latest, jt as Switch, kn as connectorActionMetadata, kt as IdTooltip, l as updateNodeDescription, m as updateTask, mt as flowPresentation, nn as createI18n, nt as revisionView, o as setInputValue, ot as diagnosticItems, p as updateResolution, pt as commentIds, qn as IconThemeContext, qt as Empty, r as applyFlowChanges, rt as flowResourceReferences, s as setInputVariable, t as addNode, u as updateNodeIcon, ut as actionWithConnections, v as updateWebhook, vn as allConnectorConnectionsQuery, vt as setFlowViewport, wn as triggerOutputDefinitions, wt as setConnectorConnection, xt as repairNodeNames, yt as setNodeContentHidden, z as scopedValue, zn as inputValue } from "./flowChanges-fBiAeTzR.js";
|
|
2
2
|
import { a as derive, i as compute, l as val } from "./dist-bO8nvHFH.js";
|
|
3
3
|
import { a as toPlainObject, c as useLang, l as useTranslate, o as I18nProvider, u as useVal } from "./dist-BFmpkX4P.js";
|
|
4
|
-
import {
|
|
4
|
+
import { E as FieldLabel, H as applyFlowChanges$1, J as resourceNameIssue, Q as nodeInputMappings, S as Field, T as FieldGroup, V as FlowChangeError, Z as mapConditionSources, a as DialogDescription, at as dequal$1, bi as cn, c as DialogTitle, d as TooltipContent, i as DialogContent, n as Dialog, o as DialogFooter, or as Input, p as TooltipTrigger, r as DialogClose, s as DialogHeader, t as Icon, u as Tooltip, vi as Button, w as FieldError, x as Spinner } from "./icons-6oQ8Q9Wm.js";
|
|
5
5
|
import { c as isUiLanguage, d as uiLanguages, l as resolveUiLanguage, u as uiLanguageNames } from "./value-DL_poNiC.js";
|
|
6
6
|
import { Suspense, lazy, useEffect, useRef, useState } from "react";
|
|
7
7
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -184,7 +184,7 @@ function Skeleton({ className, ...props }) {
|
|
|
184
184
|
}
|
|
185
185
|
//#endregion
|
|
186
186
|
//#region src/workbench/browser/runtime/shell/resourceBrowser.tsx
|
|
187
|
-
var CreateResourceDialog = lazy(() => import("./createResourceDialog-
|
|
187
|
+
var CreateResourceDialog = lazy(() => import("./createResourceDialog-C23SBjYd.js"));
|
|
188
188
|
var flowIdTooltipAlignOffset = 44;
|
|
189
189
|
var renamePopoverAlignOffset = -12;
|
|
190
190
|
var renamePopoverVerticalShift = 8;
|
|
@@ -4045,6 +4045,13 @@ function inverseFlowChanges(content, operations) {
|
|
|
4045
4045
|
const after = applyFlowChanges$1(current, [operation]);
|
|
4046
4046
|
const restore = [];
|
|
4047
4047
|
switch (operation.kind) {
|
|
4048
|
+
case "graph.node.replace":
|
|
4049
|
+
restore.push({
|
|
4050
|
+
...operation,
|
|
4051
|
+
before: after.document.graph.nodes[operation.nodeId],
|
|
4052
|
+
node: operation.before
|
|
4053
|
+
});
|
|
4054
|
+
break;
|
|
4048
4055
|
case "graph.node.create":
|
|
4049
4056
|
restore.push({
|
|
4050
4057
|
kind: "graph.node.delete",
|
|
@@ -4661,7 +4668,7 @@ var DraftChanges = class {
|
|
|
4661
4668
|
this.#pending = this.#pending.filter((candidate) => candidate !== pending);
|
|
4662
4669
|
this.#committed = committed;
|
|
4663
4670
|
this.#hooks.apply(this.project(committed));
|
|
4664
|
-
this.#hooks.headChanged(pending.flowId, committed.revisionId);
|
|
4671
|
+
this.#hooks.headChanged(pending.flowId, committed.revisionId, committed.content);
|
|
4665
4672
|
return committed;
|
|
4666
4673
|
}
|
|
4667
4674
|
#reject(pending) {
|
|
@@ -4864,10 +4871,14 @@ var FlowCatalog = class {
|
|
|
4864
4871
|
total: this.#state.value.total == null ? void 0 : this.#state.value.total - 1
|
|
4865
4872
|
});
|
|
4866
4873
|
}
|
|
4867
|
-
advanceHead(flowId, revisionId) {
|
|
4874
|
+
advanceHead(flowId, revisionId, content) {
|
|
4868
4875
|
this.#set({ flows: this.#state.value.flows.map((flow) => flow.flowId == flowId ? {
|
|
4869
4876
|
...flow,
|
|
4870
|
-
draftRevisionId: revisionId
|
|
4877
|
+
draftRevisionId: revisionId,
|
|
4878
|
+
resourceReferences: {
|
|
4879
|
+
...flow.resourceReferences,
|
|
4880
|
+
draft: flowResourceReferences(content)
|
|
4881
|
+
}
|
|
4871
4882
|
} : flow) });
|
|
4872
4883
|
}
|
|
4873
4884
|
#set(patch) {
|
|
@@ -5293,7 +5304,7 @@ var WorkspaceStore = class {
|
|
|
5293
5304
|
finishChanges: () => {
|
|
5294
5305
|
if (!this.#disposed && this.#model.value.busy == "designer") this.#set({ busy: void 0 });
|
|
5295
5306
|
},
|
|
5296
|
-
headChanged: (flowId, revisionId) => this.#flows.advanceHead(flowId, revisionId),
|
|
5307
|
+
headChanged: (flowId, revisionId, content) => this.#flows.advanceHead(flowId, revisionId, content),
|
|
5297
5308
|
recover: (context) => {
|
|
5298
5309
|
this.retryHistorySync();
|
|
5299
5310
|
return this.#syncDraftHead(context, true);
|
|
@@ -6151,7 +6162,7 @@ var WorkspaceStore = class {
|
|
|
6151
6162
|
this.#presentationChanges.reset(presentation);
|
|
6152
6163
|
this.#applyDraft(draft, "external");
|
|
6153
6164
|
this.#set({ presentation });
|
|
6154
|
-
this.#flows.advanceHead(flowId, draft.revisionId);
|
|
6165
|
+
this.#flows.advanceHead(flowId, draft.revisionId, draft.content);
|
|
6155
6166
|
this.#history.failed = false;
|
|
6156
6167
|
this.#setNotice({
|
|
6157
6168
|
kind: "error",
|
|
@@ -6241,7 +6252,7 @@ var WorkspaceStore = class {
|
|
|
6241
6252
|
});
|
|
6242
6253
|
const draft = this.#draftChanges.replaceCommitted(committed);
|
|
6243
6254
|
const preserveModuleEditor = this.#applyDraft(draft, "external");
|
|
6244
|
-
this.#flows.advanceHead(context.flowId, committed.revisionId);
|
|
6255
|
+
this.#flows.advanceHead(context.flowId, committed.revisionId, committed.content);
|
|
6245
6256
|
if (notifyUpdate) this.#setNotice({
|
|
6246
6257
|
kind: preserveModuleEditor ? "error" : "success",
|
|
6247
6258
|
message: this.#i18n.t(preserveModuleEditor ? "notice.moduleUpdated" : "notice.draftUpdated")
|
|
@@ -6724,7 +6735,7 @@ var WorkbenchStore = class {
|
|
|
6724
6735
|
};
|
|
6725
6736
|
//#endregion
|
|
6726
6737
|
//#region src/workbench/browser/runtime/openFlowWorkbench.tsx
|
|
6727
|
-
var FlowWorkspace = lazy(() => import("./flowWorkspace-
|
|
6738
|
+
var FlowWorkspace = lazy(() => import("./flowWorkspace-MqcEfg7T.js"));
|
|
6728
6739
|
function OpenFlowSessionGate({ action, description, error, onSubmit, onTokenChange, pending = false, title, token, tokenLabel }) {
|
|
6729
6740
|
const hasToken = token != null && tokenLabel != null && onTokenChange != null;
|
|
6730
6741
|
const tokenValue = token ?? "";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ct as SelectGroup, Dt as SelectValue, Et as SelectTrigger, St as SelectContent, bi as cn, bt as Select, wt as SelectItem } from "./icons-6oQ8Q9Wm.js";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
//#region src/workbench/browser/runtime/shell/workbenchSelect.tsx
|
|
4
4
|
function WorkbenchSelect({ ariaLabel, className, disabled = false, id, onValueChange, options, portalRoot, size, value, variant }) {
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import type { ChangeOperation, JsonValue, RevisionContent, TriggerKeySnapshot } from '../browser/flow-change.js';
|
|
2
|
+
import type { ConnectorAction, Diagnostic } from './control-api.js';
|
|
3
|
+
import type { AuthoringRead, AuthoringRequest, AuthoringSearch } from './authoringSchema.js';
|
|
4
|
+
export * from './authoringSchema.js';
|
|
5
|
+
export declare class AuthoringError extends Error {
|
|
6
|
+
readonly code: string;
|
|
7
|
+
readonly details: Record<string, unknown>;
|
|
8
|
+
constructor(code: string, message: string, details?: Record<string, unknown>);
|
|
9
|
+
}
|
|
10
|
+
export declare function authoringNode(content: RevisionContent, ref: string): {
|
|
11
|
+
ref: string;
|
|
12
|
+
type: "agent" | "approval" | "code" | "condition" | "connector" | "cron" | "decision" | "error" | "integration" | "llm" | "manual" | "openapi" | "poll" | "value" | "wait" | "webhook";
|
|
13
|
+
name: string;
|
|
14
|
+
readOnly: boolean;
|
|
15
|
+
description?: string | undefined;
|
|
16
|
+
icon?: string | undefined;
|
|
17
|
+
timeoutMs?: number | undefined;
|
|
18
|
+
maxExecutions?: number | undefined;
|
|
19
|
+
config: JsonValue;
|
|
20
|
+
texts: {
|
|
21
|
+
[k: string]: {
|
|
22
|
+
lines: number;
|
|
23
|
+
characters: number;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
inputs: unknown;
|
|
27
|
+
inputPorts: {
|
|
28
|
+
[k: string]: {
|
|
29
|
+
schema: JsonValue;
|
|
30
|
+
nullable: boolean;
|
|
31
|
+
description?: string | undefined;
|
|
32
|
+
default?: JsonValue | undefined;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
outputPorts: {
|
|
36
|
+
[k: string]: {
|
|
37
|
+
schema: JsonValue;
|
|
38
|
+
nullable: boolean;
|
|
39
|
+
description?: string | undefined;
|
|
40
|
+
default?: JsonValue | undefined;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
authenticationChoices?: ({
|
|
44
|
+
label: string;
|
|
45
|
+
} & ({
|
|
46
|
+
error: string | undefined;
|
|
47
|
+
authentication?: undefined;
|
|
48
|
+
} | {
|
|
49
|
+
error?: undefined;
|
|
50
|
+
authentication: {
|
|
51
|
+
schemes: string[];
|
|
52
|
+
};
|
|
53
|
+
}))[] | undefined;
|
|
54
|
+
incoming: ({
|
|
55
|
+
source: string;
|
|
56
|
+
target: string;
|
|
57
|
+
branch?: undefined;
|
|
58
|
+
} | {
|
|
59
|
+
source: string;
|
|
60
|
+
target: string;
|
|
61
|
+
branch: string;
|
|
62
|
+
})[];
|
|
63
|
+
outgoing: ({
|
|
64
|
+
source: string;
|
|
65
|
+
target: string;
|
|
66
|
+
branch?: undefined;
|
|
67
|
+
} | {
|
|
68
|
+
source: string;
|
|
69
|
+
target: string;
|
|
70
|
+
branch: string;
|
|
71
|
+
})[];
|
|
72
|
+
};
|
|
73
|
+
export declare function readAuthoring(content: RevisionContent, query?: AuthoringRead): {
|
|
74
|
+
text: {
|
|
75
|
+
node: string;
|
|
76
|
+
field: "code" | "prompt";
|
|
77
|
+
start: number;
|
|
78
|
+
lines: number;
|
|
79
|
+
content: string;
|
|
80
|
+
totalLines: number;
|
|
81
|
+
nextStart?: number | undefined;
|
|
82
|
+
truncated: boolean;
|
|
83
|
+
};
|
|
84
|
+
nodes?: undefined;
|
|
85
|
+
edges?: undefined;
|
|
86
|
+
} | {
|
|
87
|
+
text?: undefined;
|
|
88
|
+
nodes: {
|
|
89
|
+
ref: string;
|
|
90
|
+
type: "agent" | "approval" | "code" | "condition" | "connector" | "cron" | "decision" | "error" | "integration" | "llm" | "manual" | "openapi" | "poll" | "value" | "wait" | "webhook";
|
|
91
|
+
name: string;
|
|
92
|
+
readOnly: boolean;
|
|
93
|
+
description?: string | undefined;
|
|
94
|
+
icon?: string | undefined;
|
|
95
|
+
timeoutMs?: number | undefined;
|
|
96
|
+
maxExecutions?: number | undefined;
|
|
97
|
+
config: JsonValue;
|
|
98
|
+
texts: {
|
|
99
|
+
[k: string]: {
|
|
100
|
+
lines: number;
|
|
101
|
+
characters: number;
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
inputs: unknown;
|
|
105
|
+
inputPorts: {
|
|
106
|
+
[k: string]: {
|
|
107
|
+
schema: JsonValue;
|
|
108
|
+
nullable: boolean;
|
|
109
|
+
description?: string | undefined;
|
|
110
|
+
default?: JsonValue | undefined;
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
outputPorts: {
|
|
114
|
+
[k: string]: {
|
|
115
|
+
schema: JsonValue;
|
|
116
|
+
nullable: boolean;
|
|
117
|
+
description?: string | undefined;
|
|
118
|
+
default?: JsonValue | undefined;
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
authenticationChoices?: ({
|
|
122
|
+
label: string;
|
|
123
|
+
} & ({
|
|
124
|
+
error: string | undefined;
|
|
125
|
+
authentication?: undefined;
|
|
126
|
+
} | {
|
|
127
|
+
error?: undefined;
|
|
128
|
+
authentication: {
|
|
129
|
+
schemes: string[];
|
|
130
|
+
};
|
|
131
|
+
}))[] | undefined;
|
|
132
|
+
incoming: ({
|
|
133
|
+
source: string;
|
|
134
|
+
target: string;
|
|
135
|
+
branch?: undefined;
|
|
136
|
+
} | {
|
|
137
|
+
source: string;
|
|
138
|
+
target: string;
|
|
139
|
+
branch: string;
|
|
140
|
+
})[];
|
|
141
|
+
outgoing: ({
|
|
142
|
+
source: string;
|
|
143
|
+
target: string;
|
|
144
|
+
branch?: undefined;
|
|
145
|
+
} | {
|
|
146
|
+
source: string;
|
|
147
|
+
target: string;
|
|
148
|
+
branch: string;
|
|
149
|
+
})[];
|
|
150
|
+
}[];
|
|
151
|
+
edges?: undefined;
|
|
152
|
+
} | {
|
|
153
|
+
text?: undefined;
|
|
154
|
+
nodes: {
|
|
155
|
+
ref: string;
|
|
156
|
+
type: "agent" | "approval" | "code" | "condition" | "connector" | "cron" | "decision" | "error" | "integration" | "llm" | "manual" | "openapi" | "poll" | "value" | "wait" | "webhook";
|
|
157
|
+
name: string;
|
|
158
|
+
readOnly: boolean;
|
|
159
|
+
inputHandles: string[];
|
|
160
|
+
outputHandles: string[];
|
|
161
|
+
inputs: unknown;
|
|
162
|
+
texts: {
|
|
163
|
+
[k: string]: {
|
|
164
|
+
lines: number;
|
|
165
|
+
characters: number;
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
}[];
|
|
169
|
+
edges: ({
|
|
170
|
+
source: string;
|
|
171
|
+
target: string;
|
|
172
|
+
branch?: undefined;
|
|
173
|
+
} | {
|
|
174
|
+
source: string;
|
|
175
|
+
target: string;
|
|
176
|
+
branch: string;
|
|
177
|
+
})[];
|
|
178
|
+
};
|
|
179
|
+
export declare function searchAuthoring(content: RevisionContent, query: AuthoringSearch): {
|
|
180
|
+
matches: {
|
|
181
|
+
node: string;
|
|
182
|
+
field: string;
|
|
183
|
+
line?: number;
|
|
184
|
+
excerpt: string;
|
|
185
|
+
}[];
|
|
186
|
+
total: number;
|
|
187
|
+
nextOffset?: number | undefined;
|
|
188
|
+
};
|
|
189
|
+
export interface AuthoringHost {
|
|
190
|
+
id(label: string): string;
|
|
191
|
+
action(id: string): Promise<ConnectorAction>;
|
|
192
|
+
trigger(key: string): TriggerKeySnapshot;
|
|
193
|
+
openapi(url: string): Promise<JsonValue>;
|
|
194
|
+
}
|
|
195
|
+
export declare function compileAuthoring(base: RevisionContent, request: AuthoringRequest, host: AuthoringHost): Promise<{
|
|
196
|
+
operations: readonly ChangeOperation[];
|
|
197
|
+
content: RevisionContent;
|
|
198
|
+
nodes: Record<string, string>;
|
|
199
|
+
}>;
|
|
200
|
+
export declare function authoringDiagnostics(content: RevisionContent, diagnostics: readonly Diagnostic[]): {
|
|
201
|
+
code: string;
|
|
202
|
+
message: string;
|
|
203
|
+
nodes: string[];
|
|
204
|
+
field: string;
|
|
205
|
+
line?: number | undefined;
|
|
206
|
+
column?: number | undefined;
|
|
207
|
+
}[];
|