@oomol-lab/open-flow 0.1.0-beta.60 → 0.1.0-beta.61
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/README.md +14 -1
- package/dist/browser/{createResourceDialog-B7ThMSeA.js → createResourceDialog-D71fO68i.js} +2 -2
- package/dist/browser/{flowChanges-Cbl6Izr-.js → flowChanges-DSA0FxxN.js} +3389 -3290
- package/dist/browser/{flowWorkspace-BdbsnUDs.js → flowWorkspace-0sUJ5JhQ.js} +41 -49
- package/dist/browser/{icons-D70mz3qW.js → icons-DVJvrj1H.js} +10503 -10503
- package/dist/browser/preview.js +687 -718
- package/dist/browser/ui.css +697 -1
- package/dist/browser/ui.d.ts +45 -0
- package/dist/browser/ui.js +6243 -740
- package/dist/browser/workbench.js +6 -64
- package/dist/browser/{workbenchSelect-gB45mZY7.js → workbenchSelect-cr4-mKq3.js} +1 -1
- package/dist/command/index.d.ts +6 -0
- package/dist/command/index.js +84 -0
- package/dist/command/licenses.md +191 -0
- package/dist/common/authoring.d.ts +1 -1
- package/dist/common/control-api-conformance.js +3675 -3585
- package/dist/common/control-api-errors.d.ts +4 -0
- package/dist/common/control-api.d.ts +30 -9
- package/dist/common/control-api.js +4259 -3789
- package/dist/common/mcp.d.ts +61 -0
- package/dist/common/mcp.js +342 -232
- package/dist/common/publicationResources.d.ts +29 -0
- package/package.json +5 -1
- package/skills/open-flow/SKILL.md +2 -1
- package/skills/open-flow/references/flow-authoring.md +32 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { $ as RunStore, $n as
|
|
1
|
+
import { $ as RunStore, $n as setInputSources, B as CacheResource, Bn as providerIconAppearance, Bt as EmptyHeader, Ct as Popover, F as feishuResourceKind, Fn as allConnectorConnectionsQuery, Ft as InputGroupAddon, Gt as DropdownMenuContent, H as resourceData, Ht as EmptyTitle, I as supportsFeishuChatFilter, It as InputGroupInput, J as providerIcon, L as combineSources, Ln as decodeTriggerCatalog, Lt as Empty, M as addNodeIntent, Mn as errorNotice, N as deriveAddNodeOptions, Nn as WorkbenchClient, Ot as PopoverTitle, Pn as randomId, Pt as InputGroup, Qn as setConnectorConnection, Rn as connection, Rt as EmptyContent, St as followWorkbenchLink, U as resourceValue, Ut as DropdownMenu, Vt as EmptyMedia, W as designerGraph, Xn as resetInputValues, Yn as repairNodeNames, Zn as setCodeActions, Zt as DropdownMenuSeparator, _ as updateValue, _r as ApiError, _t as setComment, a as nameCreatedNodes, at as deriveInspectorDiagnostics, bt as setNodePositions, c as updateCondition, cr as triggerOutputDefinitions, d as updateNodeName, dt as connectionCatalog, er as setTriggerConnection, f as updateNodeSettings, fr as inputValue, ft as canvasPresentationChange, g as updateTaskPorts, gn as EventSourcesPage, gr as string, gt as restoreCanvasPresentation, h as updateTaskAdditionalInputs, hn as Badge, hr as record, ht as removeComments, i as deleteSelection, ir as replaceSource, it as Latest, l as updateNodeDescription, lr as isJsonObject, m as updateTask, mr as jsonValue, mt as flowPresentation, nr as updateTriggerSchedule, nt as revisionView, o as setInputValue, ot as diagnosticItems, p as updateResolution, pr as invalidResponse, pt as commentIds, qt as DropdownMenuItem, r as applyFlowChanges, rr as imports, rt as flowResourceReferences, s as setInputVariable, sr as sampleErrorOutputs, t as addNode, tn as DropdownMenuTrigger, tr as updateTriggerConfig, u as updateNodeIcon, ut as actionWithConnections, v as updateWebhook, vr as controlErrorCode, vt as setFlowViewport, wt as PopoverContent, xr as IconThemeContext, xt as IdTooltip, yn as createI18n, yt as setNodeContentHidden, z as scopedValue, zn as connectorActionMetadata, zt as EmptyDescription } from "./flowChanges-DSA0FxxN.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 { E as FieldLabel,
|
|
4
|
+
import { E as FieldLabel, J as nodeInputMappings, L as FlowChangeError, R as applyFlowChanges$1, S as Field, T as FieldGroup, W as resourceNameIssue, a as DialogDescription, bi as cn, c as DialogTitle, d as TooltipContent, i as DialogContent, n as Dialog, o as DialogFooter, or as Input, p as TooltipTrigger, q as mapConditionSources, r as DialogClose, s as DialogHeader, t as Icon, u as Tooltip, vi as Button, w as FieldError, x as Spinner, yt as dequal$1 } from "./icons-DVJvrj1H.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-D71fO68i.js"));
|
|
188
188
|
var flowIdTooltipAlignOffset = 44;
|
|
189
189
|
var renamePopoverAlignOffset = -12;
|
|
190
190
|
var renamePopoverVerticalShift = 8;
|
|
@@ -925,36 +925,6 @@ function disconnect(content, edge) {
|
|
|
925
925
|
kind: "graph.edge.disconnect"
|
|
926
926
|
}];
|
|
927
927
|
}
|
|
928
|
-
//#endregion
|
|
929
|
-
//#region src/flow/common/moduleChanges.ts
|
|
930
|
-
async function imports(source) {
|
|
931
|
-
try {
|
|
932
|
-
const { parse } = await import("./lib-Dws05GHj.js").then((n) => n.t);
|
|
933
|
-
const program = parse(source, {
|
|
934
|
-
errorRecovery: true,
|
|
935
|
-
sourceType: "module"
|
|
936
|
-
}).program;
|
|
937
|
-
const dependencies = /* @__PURE__ */ new Set();
|
|
938
|
-
for (const statement of program.body) {
|
|
939
|
-
if (statement.type != "ImportDeclaration") continue;
|
|
940
|
-
const match = /^\.\/(.+)\.mjs$/.exec(statement.source.value);
|
|
941
|
-
if (match?.[1] != null) dependencies.add(match[1]);
|
|
942
|
-
}
|
|
943
|
-
return [...dependencies].toSorted();
|
|
944
|
-
} catch {
|
|
945
|
-
return [];
|
|
946
|
-
}
|
|
947
|
-
}
|
|
948
|
-
function replaceSource(moduleId, beforeSource, beforeImports, source, moduleImports) {
|
|
949
|
-
return [{
|
|
950
|
-
beforeImports,
|
|
951
|
-
beforeSource,
|
|
952
|
-
imports: moduleImports,
|
|
953
|
-
kind: "module.source.replace",
|
|
954
|
-
moduleId,
|
|
955
|
-
source
|
|
956
|
-
}];
|
|
957
|
-
}
|
|
958
928
|
var createAuthoringId = customAlphabet("23456789abcdefghjkmnpqrstuvwxyz", 10);
|
|
959
929
|
//#endregion
|
|
960
930
|
//#region src/workbench/browser/runtime/editor/triggerDiagnosticPresentation.ts
|
|
@@ -1025,7 +995,6 @@ var PublicationStore = class {
|
|
|
1025
995
|
activitiesLoadingMore: derive(this.#state, (state) => state.activitiesLoadingMore),
|
|
1026
996
|
activitiesNextCursor: derive(this.#state, (state) => state.activitiesNextCursor),
|
|
1027
997
|
bindings: derive(this.#state, (state) => state.bindings),
|
|
1028
|
-
changingTriggerId: derive(this.#state, (state) => state.changingTriggerId),
|
|
1029
998
|
detail: derive(this.#state, (state) => state.detail),
|
|
1030
999
|
detailLoading: derive(this.#state, (state) => state.detailLoading),
|
|
1031
1000
|
live: derive(this.#state, (state) => state.live),
|
|
@@ -1152,7 +1121,7 @@ var PublicationStore = class {
|
|
|
1152
1121
|
if (!await this.#workspace.saveModuleEditor() || flowId != this.#workspace.$.flowId.value) return false;
|
|
1153
1122
|
const flow = this.#workspace.$.flow.value;
|
|
1154
1123
|
const draft = this.#workspace.$.draft.value;
|
|
1155
|
-
if (flow == null || draft == null || this.#state.value.
|
|
1124
|
+
if (flow == null || draft == null || this.#state.value.publishing || this.#state.value.rollingBackPublicationId != null) return false;
|
|
1156
1125
|
const target = { flowId: flow.flowId };
|
|
1157
1126
|
const expectedLivePublicationId = this.#workspace.$.live.value?.publication?.publicationId ?? null;
|
|
1158
1127
|
const signature = JSON.stringify({
|
|
@@ -1190,7 +1159,7 @@ var PublicationStore = class {
|
|
|
1190
1159
|
async rollback(publication) {
|
|
1191
1160
|
const { live, rollingBackPublicationId, target } = this.#state.value;
|
|
1192
1161
|
const currentPublicationId = live?.publication?.publicationId;
|
|
1193
|
-
if (target == null || currentPublicationId == null ||
|
|
1162
|
+
if (target == null || currentPublicationId == null || rollingBackPublicationId != null || this.#state.value.publishing || publication.flowId != target.flowId) return false;
|
|
1194
1163
|
const signature = JSON.stringify({
|
|
1195
1164
|
currentPublicationId,
|
|
1196
1165
|
flowId: target.flowId,
|
|
@@ -1336,32 +1305,6 @@ var PublicationStore = class {
|
|
|
1336
1305
|
if (current() && this.#state.value.selectedTriggerId == selectedTriggerId) this.#set({ testingTriggerId: void 0 });
|
|
1337
1306
|
}
|
|
1338
1307
|
}
|
|
1339
|
-
async toggleTrigger(binding) {
|
|
1340
|
-
const target = this.#state.value.target;
|
|
1341
|
-
if (target == null || this.#state.value.changingTriggerId != null || this.#state.value.publishing || this.#state.value.rollingBackPublicationId != null) return false;
|
|
1342
|
-
this.#stopObservation();
|
|
1343
|
-
const current = this.#operation.begin();
|
|
1344
|
-
this.#set({ changingTriggerId: binding.triggerNodeId });
|
|
1345
|
-
try {
|
|
1346
|
-
if (binding.operatorState == "active") await this.#client.pauseFlowTrigger(target.flowId, binding.triggerNodeId);
|
|
1347
|
-
else await this.#client.resumeFlowTrigger(target.flowId, binding.triggerNodeId);
|
|
1348
|
-
if (!current()) return false;
|
|
1349
|
-
const bindings = await this.#client.listFlowTriggerBindings(target.flowId);
|
|
1350
|
-
if (!current()) return false;
|
|
1351
|
-
this.#set({ bindings });
|
|
1352
|
-
if (this.#state.value.selectedTriggerId == binding.triggerNodeId) this.openTrigger(binding.triggerNodeId);
|
|
1353
|
-
this.#setNotice({
|
|
1354
|
-
kind: "success",
|
|
1355
|
-
message: this.#i18n.t(binding.operatorState == "active" ? "notice.triggerPaused" : "notice.triggerResumed")
|
|
1356
|
-
});
|
|
1357
|
-
return true;
|
|
1358
|
-
} catch (error) {
|
|
1359
|
-
if (current()) this.#setNotice(errorNotice(error, this.#i18n.t));
|
|
1360
|
-
return false;
|
|
1361
|
-
} finally {
|
|
1362
|
-
if (current()) this.#set({ changingTriggerId: void 0 });
|
|
1363
|
-
}
|
|
1364
|
-
}
|
|
1365
1308
|
async #refresh(target, signal) {
|
|
1366
1309
|
const current = this.#loads.begin();
|
|
1367
1310
|
const [live, page, bindings] = await this.#read(target, signal).catch((error) => {
|
|
@@ -6493,7 +6436,6 @@ var WorkbenchStore = class {
|
|
|
6493
6436
|
if (get(this.runs.$.cancelingRunId) != null) return "cancel";
|
|
6494
6437
|
if (get(this.publications.$.publishing)) return "publish";
|
|
6495
6438
|
if (get(this.publications.$.rollingBackPublicationId) != null) return "rollback";
|
|
6496
|
-
if (get(this.publications.$.changingTriggerId) != null) return "trigger";
|
|
6497
6439
|
}),
|
|
6498
6440
|
diagnosticItems: compute((get) => {
|
|
6499
6441
|
const revision = get(this.workspace.$.revision);
|
|
@@ -6784,7 +6726,7 @@ var WorkbenchStore = class {
|
|
|
6784
6726
|
};
|
|
6785
6727
|
//#endregion
|
|
6786
6728
|
//#region src/workbench/browser/runtime/openFlowWorkbench.tsx
|
|
6787
|
-
var FlowWorkspace = lazy(() => import("./flowWorkspace-
|
|
6729
|
+
var FlowWorkspace = lazy(() => import("./flowWorkspace-0sUJ5JhQ.js"));
|
|
6788
6730
|
function OpenFlowSessionGate({ action, description, error, onSubmit, onTokenChange, pending = false, title, token, tokenLabel }) {
|
|
6789
6731
|
const hasToken = token != null && tokenLabel != null && onTokenChange != null;
|
|
6790
6732
|
const tokenValue = token ?? "";
|
|
@@ -1,4 +1,4 @@
|
|
|
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-
|
|
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-DVJvrj1H.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,6 @@
|
|
|
1
|
+
export interface OpenFlowCommandHost {
|
|
2
|
+
readonly cloudRequest?: (path: string, init?: RequestInit) => Promise<Response>;
|
|
3
|
+
getWorkbenchUrl?(flowId?: string): Promise<string>;
|
|
4
|
+
readonly language?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function runOpenFlowCommand(args: readonly string[], host?: OpenFlowCommandHost): Promise<number>;
|