@oomol-lab/open-flow 0.1.0-beta.23 → 0.1.0-beta.26
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-PKbMMpEk.js → createResourceDialog-BwI2JmPE.js} +7 -7
- package/dist/browser/flow-authoring.js +249 -250
- package/dist/browser/flow-change.d.ts +16 -7
- package/dist/browser/flow-change.js +824 -804
- package/dist/browser/{flowChanges-BUlMz4iC.js → flowChanges-BqPtWEI9.js} +2706 -2906
- package/dist/browser/{flowWorkspace-DLArN17T.js → flowWorkspace-CpMGzmfz.js} +37249 -35916
- package/dist/browser/{inputValues-CcGVt51C.js → inputValues-CeeJw_G8.js} +1 -1
- package/dist/browser/licenses.md +24 -0
- package/dist/browser/{lite-Cy6aeiL6.js → lite-BuKZ8joP.js} +50 -43
- package/dist/browser/{input-group-C2frNYAx.js → switch-CyZ96-UF.js} +1519 -612
- package/dist/browser/theme.css +30 -4
- package/dist/browser/ui-input.d.ts +3 -1
- package/dist/browser/ui.css +1 -1
- package/dist/browser/ui.js +10 -8
- package/dist/browser/warmCodeTheme-DVv4-rDO.js +35 -0
- package/dist/browser/workbench.css +1 -1
- package/dist/browser/workbench.js +753 -714
- package/dist/browser/{workbenchSelect-CPRUXKbf.js → workbenchSelect-BUu7CjUA.js} +504 -490
- package/dist/common/control-api-conformance.js +18 -18
- package/dist/common/control-api.d.ts +43 -15
- package/dist/common/control-api.js +1803 -1755
- package/dist/common/control-requests.js +2 -7
- package/dist/common/engine-contract.d.ts +2 -2
- package/dist/common/flow-encoding.js +587 -589
- package/dist/common/flow-graph.d.ts +31 -1
- package/dist/common/flow-schema.d.ts +11 -1
- package/dist/common/flow-semantics.d.ts +2 -1
- package/dist/common/flow-semantics.js +1542 -1457
- package/dist/common/mcp.d.ts +1 -0
- package/dist/common/mcp.js +308 -260
- package/dist/common/provider-triggers.js +934 -931
- package/dist/common/run-lifecycle.d.ts +1 -1
- package/dist/common/run-lifecycle.js +5 -5
- package/dist/common/runtime-contract.d.ts +2 -0
- package/dist/common/runtime-contract.js +96 -32
- package/dist/common/scheduler.d.ts +39 -21
- package/dist/common/scheduler.js +2358 -2339
- package/package.json +1 -1
|
@@ -3606,28 +3606,28 @@ var L = /*@__PURE__*/ E("ZodType", (e, t) => (yo(), j.init(e, t), e.def = t, e.t
|
|
|
3606
3606
|
return e.add(this, t), this;
|
|
3607
3607
|
},
|
|
3608
3608
|
refine(e, t) {
|
|
3609
|
-
return this.check(
|
|
3609
|
+
return this.check(Ls(e, t));
|
|
3610
3610
|
},
|
|
3611
3611
|
superRefine(e, t) {
|
|
3612
|
-
return this.check(
|
|
3612
|
+
return this.check(Rs(e, t));
|
|
3613
3613
|
},
|
|
3614
3614
|
overwrite(e) {
|
|
3615
3615
|
return this.check(/* @__PURE__ */ ia(e));
|
|
3616
3616
|
},
|
|
3617
3617
|
optional() {
|
|
3618
|
-
return
|
|
3618
|
+
return _s(this);
|
|
3619
3619
|
},
|
|
3620
3620
|
exactOptional() {
|
|
3621
|
-
return
|
|
3621
|
+
return ys(this);
|
|
3622
3622
|
},
|
|
3623
3623
|
nullable() {
|
|
3624
|
-
return
|
|
3624
|
+
return xs(this);
|
|
3625
3625
|
},
|
|
3626
3626
|
nullish() {
|
|
3627
|
-
return
|
|
3627
|
+
return _s(xs(this));
|
|
3628
3628
|
},
|
|
3629
3629
|
nonoptional(e) {
|
|
3630
|
-
return
|
|
3630
|
+
return Ds(this, e);
|
|
3631
3631
|
},
|
|
3632
3632
|
array() {
|
|
3633
3633
|
return V(this);
|
|
@@ -3636,25 +3636,25 @@ var L = /*@__PURE__*/ E("ZodType", (e, t) => (yo(), j.init(e, t), e.def = t, e.t
|
|
|
3636
3636
|
return U([this, e]);
|
|
3637
3637
|
},
|
|
3638
3638
|
and(e) {
|
|
3639
|
-
return
|
|
3639
|
+
return cs(this, e);
|
|
3640
3640
|
},
|
|
3641
3641
|
transform(e) {
|
|
3642
|
-
return
|
|
3642
|
+
return js(this, hs(e));
|
|
3643
3643
|
},
|
|
3644
3644
|
default(e) {
|
|
3645
|
-
return
|
|
3645
|
+
return Cs(this, e);
|
|
3646
3646
|
},
|
|
3647
3647
|
prefault(e) {
|
|
3648
|
-
return
|
|
3648
|
+
return Ts(this, e);
|
|
3649
3649
|
},
|
|
3650
3650
|
catch(e) {
|
|
3651
|
-
return
|
|
3651
|
+
return ks(this, e);
|
|
3652
3652
|
},
|
|
3653
3653
|
pipe(e) {
|
|
3654
|
-
return
|
|
3654
|
+
return js(this, e);
|
|
3655
3655
|
},
|
|
3656
3656
|
readonly() {
|
|
3657
|
-
return
|
|
3657
|
+
return Ns(this);
|
|
3658
3658
|
},
|
|
3659
3659
|
describe(e) {
|
|
3660
3660
|
let t = this.clone();
|
|
@@ -4078,13 +4078,13 @@ var is = /*@__PURE__*/ E("ZodObject", (e, t) => {
|
|
|
4078
4078
|
return ge(this, e);
|
|
4079
4079
|
},
|
|
4080
4080
|
partial(...e) {
|
|
4081
|
-
return be(
|
|
4081
|
+
return be(gs, this, e[0]);
|
|
4082
4082
|
},
|
|
4083
4083
|
exactPartial(...e) {
|
|
4084
|
-
return be(
|
|
4084
|
+
return be(vs, this, e[0], "exactPartial");
|
|
4085
4085
|
},
|
|
4086
4086
|
required(...e) {
|
|
4087
|
-
return xe(
|
|
4087
|
+
return xe(Es, this, e[0]);
|
|
4088
4088
|
}
|
|
4089
4089
|
});
|
|
4090
4090
|
function H(e, t) {
|
|
@@ -4094,27 +4094,35 @@ function H(e, t) {
|
|
|
4094
4094
|
...b(t)
|
|
4095
4095
|
});
|
|
4096
4096
|
}
|
|
4097
|
-
|
|
4097
|
+
function as(e, t) {
|
|
4098
|
+
return new is({
|
|
4099
|
+
type: "object",
|
|
4100
|
+
shape: e,
|
|
4101
|
+
catchall: ns(),
|
|
4102
|
+
...b(t)
|
|
4103
|
+
});
|
|
4104
|
+
}
|
|
4105
|
+
var os = /*@__PURE__*/ E("ZodUnion", (e, t) => {
|
|
4098
4106
|
_r.init(e, t), L.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ba(e, t, n, r), e.options = t.options;
|
|
4099
4107
|
});
|
|
4100
4108
|
function U(e, t) {
|
|
4101
|
-
return new
|
|
4109
|
+
return new os({
|
|
4102
4110
|
type: "union",
|
|
4103
4111
|
options: e,
|
|
4104
4112
|
...b(t)
|
|
4105
4113
|
});
|
|
4106
4114
|
}
|
|
4107
|
-
var
|
|
4115
|
+
var ss = /*@__PURE__*/ E("ZodIntersection", (e, t) => {
|
|
4108
4116
|
vr.init(e, t), L.init(e, t), e._zod.processJSONSchema = (t, n, r) => Va(e, t, n, r);
|
|
4109
4117
|
});
|
|
4110
|
-
function
|
|
4111
|
-
return new
|
|
4118
|
+
function cs(e, t) {
|
|
4119
|
+
return new ss({
|
|
4112
4120
|
type: "intersection",
|
|
4113
4121
|
left: e,
|
|
4114
4122
|
right: t
|
|
4115
4123
|
});
|
|
4116
4124
|
}
|
|
4117
|
-
var
|
|
4125
|
+
var ls = /*@__PURE__*/ E("ZodTuple", (e, t) => {
|
|
4118
4126
|
bo(), xr.init(e, t), L.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ha(e, t, n, r);
|
|
4119
4127
|
}, {
|
|
4120
4128
|
rest(e) {
|
|
@@ -4128,46 +4136,46 @@ var cs = /*@__PURE__*/ E("ZodTuple", (e, t) => {
|
|
|
4128
4136
|
if (e.checks?.length) throw Error(".partial() cannot be used on tuple schemas containing refinements");
|
|
4129
4137
|
return this.clone({
|
|
4130
4138
|
...e,
|
|
4131
|
-
items: e.items.map((e) => new
|
|
4139
|
+
items: e.items.map((e) => new gs({
|
|
4132
4140
|
type: "optional",
|
|
4133
4141
|
innerType: e
|
|
4134
4142
|
}))
|
|
4135
4143
|
});
|
|
4136
4144
|
}
|
|
4137
4145
|
});
|
|
4138
|
-
function
|
|
4146
|
+
function us(e, t, n) {
|
|
4139
4147
|
let r = t instanceof j;
|
|
4140
|
-
return new
|
|
4148
|
+
return new ls({
|
|
4141
4149
|
type: "tuple",
|
|
4142
4150
|
items: e,
|
|
4143
4151
|
rest: r ? t : null,
|
|
4144
4152
|
...b(r ? n : t)
|
|
4145
4153
|
});
|
|
4146
4154
|
}
|
|
4147
|
-
var
|
|
4155
|
+
var ds = /*@__PURE__*/ E("ZodRecord", (e, t) => {
|
|
4148
4156
|
bo(), Tr.init(e, t), L.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ka(e, t, n, r), e.keyType = t.keyType, e.valueType = t.valueType;
|
|
4149
4157
|
});
|
|
4150
4158
|
function W(e, t, n) {
|
|
4151
|
-
return !t || !t._zod ? new
|
|
4159
|
+
return !t || !t._zod ? new ds({
|
|
4152
4160
|
type: "record",
|
|
4153
4161
|
keyType: Co(),
|
|
4154
4162
|
valueType: e,
|
|
4155
4163
|
...b(t)
|
|
4156
|
-
}) : new
|
|
4164
|
+
}) : new ds({
|
|
4157
4165
|
type: "record",
|
|
4158
4166
|
keyType: e,
|
|
4159
4167
|
valueType: t,
|
|
4160
4168
|
...b(n)
|
|
4161
4169
|
});
|
|
4162
4170
|
}
|
|
4163
|
-
var
|
|
4171
|
+
var fs = /*@__PURE__*/ E("ZodEnum", (e, t) => {
|
|
4164
4172
|
Er.init(e, t), L.init(e, t), e._zod.processJSONSchema = (t, n, r) => Na(e, t, n, r), e.enum = t.entries, e.options = Object.values(t.entries);
|
|
4165
4173
|
let n = new Set(Object.keys(t.entries));
|
|
4166
4174
|
e.extract = (e, r) => {
|
|
4167
4175
|
let i = {};
|
|
4168
4176
|
for (let r of e) if (n.has(r)) i[r] = t.entries[r];
|
|
4169
4177
|
else throw Error(`Key ${r} not found in enum`);
|
|
4170
|
-
return new
|
|
4178
|
+
return new fs({
|
|
4171
4179
|
...t,
|
|
4172
4180
|
checks: [],
|
|
4173
4181
|
...b(r),
|
|
@@ -4177,7 +4185,7 @@ var ds = /*@__PURE__*/ E("ZodEnum", (e, t) => {
|
|
|
4177
4185
|
let i = { ...t.entries };
|
|
4178
4186
|
for (let t of e) if (n.has(t)) delete i[t];
|
|
4179
4187
|
else throw Error(`Key ${t} not found in enum`);
|
|
4180
|
-
return new
|
|
4188
|
+
return new fs({
|
|
4181
4189
|
...t,
|
|
4182
4190
|
checks: [],
|
|
4183
4191
|
...b(r),
|
|
@@ -4186,26 +4194,26 @@ var ds = /*@__PURE__*/ E("ZodEnum", (e, t) => {
|
|
|
4186
4194
|
};
|
|
4187
4195
|
});
|
|
4188
4196
|
function G(e, t) {
|
|
4189
|
-
return new
|
|
4197
|
+
return new fs({
|
|
4190
4198
|
type: "enum",
|
|
4191
4199
|
entries: Array.isArray(e) ? Object.fromEntries(e.map((e) => [e, e])) : e,
|
|
4192
4200
|
...b(t)
|
|
4193
4201
|
});
|
|
4194
4202
|
}
|
|
4195
|
-
var
|
|
4203
|
+
var ps = /*@__PURE__*/ E("ZodLiteral", (e, t) => {
|
|
4196
4204
|
Dr.init(e, t), L.init(e, t), e._zod.processJSONSchema = (t, n, r) => Pa(e, t, n, r), e.values = new Set(t.values), Object.defineProperty(e, "value", { get() {
|
|
4197
4205
|
if (t.values.length > 1) throw Error("This schema contains multiple valid literal values. Use `.values` instead.");
|
|
4198
4206
|
return t.values[0];
|
|
4199
4207
|
} });
|
|
4200
4208
|
});
|
|
4201
4209
|
function K(e, t) {
|
|
4202
|
-
return new
|
|
4210
|
+
return new ps({
|
|
4203
4211
|
type: "literal",
|
|
4204
4212
|
values: Array.isArray(e) ? e : [e],
|
|
4205
4213
|
...b(t)
|
|
4206
4214
|
});
|
|
4207
4215
|
}
|
|
4208
|
-
var
|
|
4216
|
+
var ms = /*@__PURE__*/ E("ZodTransform", (e, t) => {
|
|
4209
4217
|
bo(), Or.init(e, t), L.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ia(e, t, n, r), e._zod.parse = (n, r) => {
|
|
4210
4218
|
if (r.direction === "backward") throw new We(e.constructor.name);
|
|
4211
4219
|
n.addIssue = (r) => {
|
|
@@ -4219,44 +4227,44 @@ var ps = /*@__PURE__*/ E("ZodTransform", (e, t) => {
|
|
|
4219
4227
|
return i instanceof Promise ? i.then((e) => (n.value = e, n)) : (n.value = i, n);
|
|
4220
4228
|
};
|
|
4221
4229
|
});
|
|
4222
|
-
function
|
|
4223
|
-
return new
|
|
4230
|
+
function hs(e) {
|
|
4231
|
+
return new ms({
|
|
4224
4232
|
type: "transform",
|
|
4225
4233
|
transform: e
|
|
4226
4234
|
});
|
|
4227
4235
|
}
|
|
4228
|
-
var
|
|
4236
|
+
var gs = /*@__PURE__*/ E("ZodOptional", (e, t) => {
|
|
4229
4237
|
Ar.init(e, t), L.init(e, t), e._zod.processJSONSchema = (t, n, r) => no(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4230
4238
|
});
|
|
4231
|
-
function
|
|
4232
|
-
return new
|
|
4239
|
+
function _s(e) {
|
|
4240
|
+
return new gs({
|
|
4233
4241
|
type: "optional",
|
|
4234
4242
|
innerType: e
|
|
4235
4243
|
});
|
|
4236
4244
|
}
|
|
4237
|
-
var
|
|
4245
|
+
var vs = /*@__PURE__*/ E("ZodExactOptional", (e, t) => {
|
|
4238
4246
|
jr.init(e, t), L.init(e, t), e._zod.processJSONSchema = (t, n, r) => no(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4239
4247
|
});
|
|
4240
|
-
function
|
|
4241
|
-
return new
|
|
4248
|
+
function ys(e) {
|
|
4249
|
+
return new vs({
|
|
4242
4250
|
type: "optional",
|
|
4243
4251
|
innerType: e
|
|
4244
4252
|
});
|
|
4245
4253
|
}
|
|
4246
|
-
var
|
|
4254
|
+
var bs = /*@__PURE__*/ E("ZodNullable", (e, t) => {
|
|
4247
4255
|
Mr.init(e, t), L.init(e, t), e._zod.processJSONSchema = (t, n, r) => qa(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4248
4256
|
});
|
|
4249
|
-
function
|
|
4250
|
-
return new
|
|
4257
|
+
function xs(e) {
|
|
4258
|
+
return new bs({
|
|
4251
4259
|
type: "nullable",
|
|
4252
4260
|
innerType: e
|
|
4253
4261
|
});
|
|
4254
4262
|
}
|
|
4255
|
-
var
|
|
4263
|
+
var Ss = /*@__PURE__*/ E("ZodDefault", (e, t) => {
|
|
4256
4264
|
Nr.init(e, t), L.init(e, t), e._zod.processJSONSchema = (t, n, r) => Za(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
|
|
4257
4265
|
});
|
|
4258
|
-
function
|
|
4259
|
-
return new
|
|
4266
|
+
function Cs(e, t) {
|
|
4267
|
+
return new Ss({
|
|
4260
4268
|
type: "default",
|
|
4261
4269
|
innerType: e,
|
|
4262
4270
|
get defaultValue() {
|
|
@@ -4264,11 +4272,11 @@ function Ss(e, t) {
|
|
|
4264
4272
|
}
|
|
4265
4273
|
});
|
|
4266
4274
|
}
|
|
4267
|
-
var
|
|
4275
|
+
var ws = /*@__PURE__*/ E("ZodPrefault", (e, t) => {
|
|
4268
4276
|
Fr.init(e, t), L.init(e, t), e._zod.processJSONSchema = (t, n, r) => Qa(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4269
4277
|
});
|
|
4270
|
-
function
|
|
4271
|
-
return new
|
|
4278
|
+
function Ts(e, t) {
|
|
4279
|
+
return new ws({
|
|
4272
4280
|
type: "prefault",
|
|
4273
4281
|
innerType: e,
|
|
4274
4282
|
get defaultValue() {
|
|
@@ -4276,65 +4284,65 @@ function ws(e, t) {
|
|
|
4276
4284
|
}
|
|
4277
4285
|
});
|
|
4278
4286
|
}
|
|
4279
|
-
var
|
|
4287
|
+
var Es = /*@__PURE__*/ E("ZodNonOptional", (e, t) => {
|
|
4280
4288
|
Ir.init(e, t), L.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ja(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4281
4289
|
});
|
|
4282
|
-
function
|
|
4283
|
-
return new
|
|
4290
|
+
function Ds(e, t) {
|
|
4291
|
+
return new Es({
|
|
4284
4292
|
type: "nonoptional",
|
|
4285
4293
|
innerType: e,
|
|
4286
4294
|
...b(t)
|
|
4287
4295
|
});
|
|
4288
4296
|
}
|
|
4289
|
-
var
|
|
4297
|
+
var Os = /*@__PURE__*/ E("ZodCatch", (e, t) => {
|
|
4290
4298
|
zr.init(e, t), L.init(e, t), e._zod.processJSONSchema = (t, n, r) => $a(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
|
|
4291
4299
|
});
|
|
4292
|
-
function
|
|
4293
|
-
return new
|
|
4300
|
+
function ks(e, t) {
|
|
4301
|
+
return new Os({
|
|
4294
4302
|
type: "catch",
|
|
4295
4303
|
innerType: e,
|
|
4296
4304
|
catchValue: typeof t == "function" ? t : ze(t)
|
|
4297
4305
|
});
|
|
4298
4306
|
}
|
|
4299
|
-
var
|
|
4307
|
+
var As = /*@__PURE__*/ E("ZodPipe", (e, t) => {
|
|
4300
4308
|
Br.init(e, t), L.init(e, t), e._zod.processJSONSchema = (t, n, r) => eo(e, t, n, r), e.in = t.in, e.out = t.out;
|
|
4301
4309
|
});
|
|
4302
|
-
function
|
|
4303
|
-
return new
|
|
4310
|
+
function js(e, t) {
|
|
4311
|
+
return new As({
|
|
4304
4312
|
type: "pipe",
|
|
4305
4313
|
in: e,
|
|
4306
4314
|
out: t
|
|
4307
4315
|
});
|
|
4308
4316
|
}
|
|
4309
|
-
var
|
|
4317
|
+
var Ms = /*@__PURE__*/ E("ZodReadonly", (e, t) => {
|
|
4310
4318
|
Hr.init(e, t), L.init(e, t), e._zod.processJSONSchema = (t, n, r) => to(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4311
4319
|
});
|
|
4312
|
-
function
|
|
4313
|
-
return new
|
|
4320
|
+
function Ns(e) {
|
|
4321
|
+
return new Ms({
|
|
4314
4322
|
type: "readonly",
|
|
4315
4323
|
innerType: e
|
|
4316
4324
|
});
|
|
4317
4325
|
}
|
|
4318
|
-
var
|
|
4326
|
+
var Ps = /*@__PURE__*/ E("ZodLazy", (e, t) => {
|
|
4319
4327
|
Wr.init(e, t), L.init(e, t), e._zod.processJSONSchema = (t, n, r) => ro(e, t, n, r), e.unwrap = () => e._zod.def.getter();
|
|
4320
4328
|
});
|
|
4321
|
-
function
|
|
4322
|
-
return new
|
|
4329
|
+
function Fs(e) {
|
|
4330
|
+
return new Ps({
|
|
4323
4331
|
type: "lazy",
|
|
4324
4332
|
getter: e
|
|
4325
4333
|
});
|
|
4326
4334
|
}
|
|
4327
|
-
var
|
|
4335
|
+
var Is = /*@__PURE__*/ E("ZodCustom", (e, t) => {
|
|
4328
4336
|
Gr.init(e, t), L.init(e, t), e._zod.processJSONSchema = (t, n, r) => Fa(e, t, n, r);
|
|
4329
4337
|
});
|
|
4330
|
-
function
|
|
4331
|
-
return /* @__PURE__ */ da(
|
|
4338
|
+
function Ls(e, t = {}) {
|
|
4339
|
+
return /* @__PURE__ */ da(Is, e, t);
|
|
4332
4340
|
}
|
|
4333
|
-
function
|
|
4341
|
+
function Rs(e, t) {
|
|
4334
4342
|
return /* @__PURE__ */ fa(e, t);
|
|
4335
4343
|
}
|
|
4336
|
-
function
|
|
4337
|
-
let t =
|
|
4344
|
+
function zs(e) {
|
|
4345
|
+
let t = Fs(() => U([
|
|
4338
4346
|
Co(e),
|
|
4339
4347
|
z(),
|
|
4340
4348
|
B(),
|
|
@@ -4346,38 +4354,38 @@ function Rs(e) {
|
|
|
4346
4354
|
}
|
|
4347
4355
|
//#endregion
|
|
4348
4356
|
//#region src/flow/common/changeSchema.ts
|
|
4349
|
-
var q = Co(), J =
|
|
4357
|
+
var q = Co(), J = zs(), Bs = V(q), Vs = H({
|
|
4350
4358
|
description: q.optional(),
|
|
4351
4359
|
jsonSchema: J,
|
|
4352
4360
|
nullable: B(),
|
|
4353
4361
|
handle: q
|
|
4354
|
-
}), Y =
|
|
4362
|
+
}), Y = Vs.extend({ value: J.optional() }), Hs = H({
|
|
4355
4363
|
collapsed: B().optional(),
|
|
4356
4364
|
group: q
|
|
4357
|
-
}),
|
|
4365
|
+
}), Us = H({
|
|
4358
4366
|
kind: K("node"),
|
|
4359
4367
|
nodeId: q,
|
|
4360
4368
|
output: q
|
|
4361
|
-
}),
|
|
4369
|
+
}), Ws = H({
|
|
4362
4370
|
kind: K("flow"),
|
|
4363
4371
|
input: q
|
|
4364
|
-
}),
|
|
4365
|
-
Hs,
|
|
4372
|
+
}), Gs = U([
|
|
4366
4373
|
Us,
|
|
4374
|
+
Ws,
|
|
4367
4375
|
H({
|
|
4368
4376
|
kind: K("binding"),
|
|
4369
4377
|
bindingId: q
|
|
4370
4378
|
})
|
|
4371
|
-
]),
|
|
4379
|
+
]), Ks = U([H({
|
|
4372
4380
|
kind: K("value"),
|
|
4373
4381
|
value: J
|
|
4374
4382
|
}), H({
|
|
4375
4383
|
kind: K("sources"),
|
|
4376
|
-
sources: V(
|
|
4377
|
-
})]),
|
|
4378
|
-
inputs: V(U([Y,
|
|
4379
|
-
outputs: V(U([
|
|
4380
|
-
},
|
|
4384
|
+
sources: V(Gs)
|
|
4385
|
+
})]), qs = W(q, Ks), Js = {
|
|
4386
|
+
inputs: V(U([Y, Hs])),
|
|
4387
|
+
outputs: V(U([Vs, Hs]))
|
|
4388
|
+
}, Ys = H({
|
|
4381
4389
|
kind: K("connector"),
|
|
4382
4390
|
action: q,
|
|
4383
4391
|
connectionId: q.optional(),
|
|
@@ -4385,19 +4393,19 @@ var q = Co(), J = Rs(), zs = V(q), Bs = H({
|
|
|
4385
4393
|
connectionId: q,
|
|
4386
4394
|
alias: q.optional()
|
|
4387
4395
|
}))
|
|
4388
|
-
}),
|
|
4389
|
-
...
|
|
4396
|
+
}), Xs = H({
|
|
4397
|
+
...Js,
|
|
4390
4398
|
name: q,
|
|
4391
4399
|
moduleId: q,
|
|
4392
|
-
capabilities: V(
|
|
4393
|
-
}),
|
|
4400
|
+
capabilities: V(Ys).optional()
|
|
4401
|
+
}), Zs = U([H({
|
|
4394
4402
|
kind: K("value"),
|
|
4395
4403
|
value: J
|
|
4396
4404
|
}), H({
|
|
4397
4405
|
kind: K("input"),
|
|
4398
4406
|
input: q
|
|
4399
|
-
})]),
|
|
4400
|
-
...
|
|
4407
|
+
})]), Qs = U([Zs, H({ kind: K("model") })]), $s = H({
|
|
4408
|
+
...Js,
|
|
4401
4409
|
name: q,
|
|
4402
4410
|
executor: U([
|
|
4403
4411
|
H({
|
|
@@ -4413,7 +4421,7 @@ var q = Co(), J = Rs(), zs = V(q), Bs = H({
|
|
|
4413
4421
|
kind: K("agent"),
|
|
4414
4422
|
code: B().optional(),
|
|
4415
4423
|
model: q,
|
|
4416
|
-
prompt:
|
|
4424
|
+
prompt: Zs,
|
|
4417
4425
|
system: q,
|
|
4418
4426
|
maxRounds: z(),
|
|
4419
4427
|
tools: V(H({
|
|
@@ -4423,16 +4431,16 @@ var q = Co(), J = Rs(), zs = V(q), Bs = H({
|
|
|
4423
4431
|
action: q,
|
|
4424
4432
|
connectionId: q.optional(),
|
|
4425
4433
|
approval: B(),
|
|
4426
|
-
inputs: V(Y.extend({ source:
|
|
4434
|
+
inputs: V(Y.extend({ source: Qs }))
|
|
4427
4435
|
})),
|
|
4428
4436
|
notification: H({
|
|
4429
4437
|
taskId: q,
|
|
4430
4438
|
messageHandle: q,
|
|
4431
|
-
inputs: W(q,
|
|
4439
|
+
inputs: W(q, Zs)
|
|
4432
4440
|
}).optional()
|
|
4433
4441
|
})
|
|
4434
4442
|
])
|
|
4435
|
-
}),
|
|
4443
|
+
}), ec = {
|
|
4436
4444
|
input: Y,
|
|
4437
4445
|
cases: V(H({
|
|
4438
4446
|
output: q,
|
|
@@ -4465,25 +4473,20 @@ var q = Co(), J = Rs(), zs = V(q), Bs = H({
|
|
|
4465
4473
|
}))
|
|
4466
4474
|
})),
|
|
4467
4475
|
defaultOutput: q.optional()
|
|
4468
|
-
}, ec = {
|
|
4469
|
-
actions: U([ls([K("continue")]), ls([K("approve"), K("reject")])]),
|
|
4470
|
-
prompt: q,
|
|
4471
|
-
notification: H({
|
|
4472
|
-
inputs: Ks,
|
|
4473
|
-
messageHandle: q,
|
|
4474
|
-
taskId: q
|
|
4475
|
-
}).optional()
|
|
4476
4476
|
}, tc = {
|
|
4477
|
+
actions: U([us([K("continue")]), us([K("approve"), K("reject")])]),
|
|
4478
|
+
prompt: q
|
|
4479
|
+
}, nc = {
|
|
4477
4480
|
inputsDef: V(Y),
|
|
4478
4481
|
options: H({
|
|
4479
|
-
allowedMethods:
|
|
4480
|
-
allowedOrigins:
|
|
4482
|
+
allowedMethods: Bs.optional(),
|
|
4483
|
+
allowedOrigins: Bs.optional(),
|
|
4481
4484
|
noResponseBody: B().optional(),
|
|
4482
4485
|
responseData: q.optional(),
|
|
4483
4486
|
responseHeaders: W(q, q).optional(),
|
|
4484
4487
|
responseStatusCode: z().optional()
|
|
4485
4488
|
}).optional()
|
|
4486
|
-
},
|
|
4489
|
+
}, rc = V(U([H({
|
|
4487
4490
|
type: K("cron"),
|
|
4488
4491
|
expression: q,
|
|
4489
4492
|
timezone: q
|
|
@@ -4497,7 +4500,7 @@ var q = Co(), J = Rs(), zs = V(q), Bs = H({
|
|
|
4497
4500
|
"week"
|
|
4498
4501
|
]),
|
|
4499
4502
|
value: z()
|
|
4500
|
-
})])),
|
|
4503
|
+
})])), ic = {
|
|
4501
4504
|
configSchema: J,
|
|
4502
4505
|
definitionVersion: z(),
|
|
4503
4506
|
description: q,
|
|
@@ -4506,7 +4509,7 @@ var q = Co(), J = Rs(), zs = V(q), Bs = H({
|
|
|
4506
4509
|
name: q,
|
|
4507
4510
|
payloadSchema: J,
|
|
4508
4511
|
provider: q
|
|
4509
|
-
},
|
|
4512
|
+
}, ac = H({
|
|
4510
4513
|
body: H({
|
|
4511
4514
|
allowArray: B(),
|
|
4512
4515
|
allowEmpty: B(),
|
|
@@ -4526,129 +4529,129 @@ var q = Co(), J = Rs(), zs = V(q), Bs = H({
|
|
|
4526
4529
|
"PUT"
|
|
4527
4530
|
])),
|
|
4528
4531
|
successStatus: z()
|
|
4529
|
-
}),
|
|
4532
|
+
}), oc = {
|
|
4530
4533
|
name: q,
|
|
4531
4534
|
description: q.optional(),
|
|
4532
4535
|
icon: q.optional()
|
|
4533
|
-
},
|
|
4534
|
-
inputs:
|
|
4536
|
+
}, sc = {
|
|
4537
|
+
inputs: qs,
|
|
4535
4538
|
name: q.optional(),
|
|
4536
4539
|
description: q.optional(),
|
|
4537
4540
|
icon: q.optional(),
|
|
4538
4541
|
timeoutMs: z().optional()
|
|
4539
|
-
},
|
|
4542
|
+
}, cc = U([
|
|
4540
4543
|
H({
|
|
4541
|
-
...
|
|
4544
|
+
...sc,
|
|
4542
4545
|
kind: K("condition"),
|
|
4543
|
-
|
|
4546
|
+
...ec
|
|
4544
4547
|
}),
|
|
4545
4548
|
H({
|
|
4546
|
-
...
|
|
4549
|
+
...sc,
|
|
4547
4550
|
inputs: es().transform(() => ({})).default({}),
|
|
4548
4551
|
kind: K("value"),
|
|
4549
4552
|
values: V(Y)
|
|
4550
4553
|
}),
|
|
4551
4554
|
H({
|
|
4552
|
-
...
|
|
4555
|
+
...sc,
|
|
4553
4556
|
kind: K("subflow"),
|
|
4554
4557
|
subflowId: q
|
|
4555
4558
|
}),
|
|
4556
4559
|
H({
|
|
4557
|
-
...
|
|
4560
|
+
...sc,
|
|
4558
4561
|
kind: K("task"),
|
|
4559
|
-
task:
|
|
4562
|
+
task: Xs,
|
|
4560
4563
|
additionalInputs: V(Y).optional()
|
|
4561
4564
|
}),
|
|
4562
4565
|
H({
|
|
4563
|
-
...
|
|
4566
|
+
...sc,
|
|
4564
4567
|
kind: K("task"),
|
|
4565
4568
|
taskId: q,
|
|
4566
4569
|
additionalInputs: V(Y).optional()
|
|
4567
4570
|
}),
|
|
4568
|
-
|
|
4569
|
-
...
|
|
4571
|
+
as({
|
|
4572
|
+
...sc,
|
|
4570
4573
|
kind: K("wait"),
|
|
4571
4574
|
input: Y,
|
|
4572
|
-
...
|
|
4575
|
+
...tc
|
|
4573
4576
|
}).omit({ timeoutMs: !0 }),
|
|
4574
4577
|
H({
|
|
4575
|
-
...
|
|
4578
|
+
...oc,
|
|
4576
4579
|
kind: K("manual")
|
|
4577
4580
|
}),
|
|
4578
4581
|
H({
|
|
4579
|
-
...
|
|
4582
|
+
...oc,
|
|
4580
4583
|
kind: K("webhook"),
|
|
4581
|
-
...
|
|
4584
|
+
...nc
|
|
4582
4585
|
}),
|
|
4583
4586
|
H({
|
|
4584
|
-
...
|
|
4587
|
+
...oc,
|
|
4585
4588
|
kind: K("cron"),
|
|
4586
|
-
cronTimes:
|
|
4589
|
+
cronTimes: rc
|
|
4587
4590
|
}),
|
|
4588
4591
|
H({
|
|
4589
|
-
...
|
|
4592
|
+
...oc,
|
|
4590
4593
|
kind: K("poll"),
|
|
4591
4594
|
bindingId: q,
|
|
4592
4595
|
config: W(q, J),
|
|
4593
4596
|
definition: H({
|
|
4594
|
-
...
|
|
4597
|
+
...ic,
|
|
4595
4598
|
type: K("poll")
|
|
4596
4599
|
}),
|
|
4597
|
-
pollTimes:
|
|
4600
|
+
pollTimes: rc
|
|
4598
4601
|
}),
|
|
4599
4602
|
H({
|
|
4600
|
-
...
|
|
4603
|
+
...oc,
|
|
4601
4604
|
kind: K("integration"),
|
|
4602
4605
|
bindingId: q,
|
|
4603
4606
|
config: W(q, J),
|
|
4604
4607
|
definition: H({
|
|
4605
|
-
...
|
|
4608
|
+
...ic,
|
|
4606
4609
|
type: K("integration"),
|
|
4607
|
-
endpoint:
|
|
4610
|
+
endpoint: ac
|
|
4608
4611
|
})
|
|
4609
4612
|
})
|
|
4610
|
-
]),
|
|
4613
|
+
]), lc = U([H({ kind: K("flow") }), H({
|
|
4611
4614
|
kind: K("subflow"),
|
|
4612
4615
|
id: q
|
|
4613
|
-
})]),
|
|
4616
|
+
})]), uc = H({
|
|
4614
4617
|
source: q,
|
|
4615
4618
|
target: q,
|
|
4616
4619
|
sourceHandle: q.optional()
|
|
4617
4620
|
}), X = {
|
|
4618
4621
|
nodeId: q,
|
|
4619
|
-
target:
|
|
4620
|
-
},
|
|
4622
|
+
target: lc
|
|
4623
|
+
}, dc = H({
|
|
4621
4624
|
name: q,
|
|
4622
4625
|
inputs: V(Y),
|
|
4623
|
-
outputs: V(
|
|
4624
|
-
}), dc = H({
|
|
4625
|
-
nodes: W(q, sc),
|
|
4626
|
-
edges: V(lc).default([])
|
|
4626
|
+
outputs: V(Vs.extend({ sources: V(U([Us, Ws])) }))
|
|
4627
4627
|
}), fc = H({
|
|
4628
|
+
nodes: W(q, cc),
|
|
4629
|
+
edges: V(uc).default([])
|
|
4630
|
+
}), pc = H({
|
|
4628
4631
|
kind: G(["connection", "variable"]),
|
|
4629
4632
|
target: q
|
|
4630
|
-
}),
|
|
4633
|
+
}), mc = H({
|
|
4631
4634
|
name: q,
|
|
4632
|
-
imports:
|
|
4635
|
+
imports: Bs,
|
|
4633
4636
|
source: q
|
|
4634
|
-
}),
|
|
4635
|
-
bindings: W(q,
|
|
4636
|
-
graph:
|
|
4637
|
-
subflows: W(q,
|
|
4638
|
-
tasks: W(q,
|
|
4637
|
+
}), hc = H({
|
|
4638
|
+
bindings: W(q, pc),
|
|
4639
|
+
graph: fc,
|
|
4640
|
+
subflows: W(q, dc.extend({ graph: fc })),
|
|
4641
|
+
tasks: W(q, $s)
|
|
4639
4642
|
});
|
|
4640
4643
|
H({
|
|
4641
4644
|
modelVersion: K(1),
|
|
4642
|
-
document:
|
|
4643
|
-
modules: W(q,
|
|
4645
|
+
document: hc,
|
|
4646
|
+
modules: W(q, mc)
|
|
4644
4647
|
}).extend({
|
|
4645
4648
|
kind: K("open-flow-flow-revision"),
|
|
4646
4649
|
version: K(1)
|
|
4647
4650
|
});
|
|
4648
|
-
var
|
|
4651
|
+
var gc = {
|
|
4649
4652
|
"binding.create": {
|
|
4650
4653
|
bindingId: q,
|
|
4651
|
-
binding:
|
|
4654
|
+
binding: pc
|
|
4652
4655
|
},
|
|
4653
4656
|
"binding.delete": { bindingId: q },
|
|
4654
4657
|
"binding.target.set": {
|
|
@@ -4657,16 +4660,16 @@ var hc = {
|
|
|
4657
4660
|
value: q
|
|
4658
4661
|
},
|
|
4659
4662
|
"graph.edge.connect": {
|
|
4660
|
-
target:
|
|
4661
|
-
edge:
|
|
4663
|
+
target: lc,
|
|
4664
|
+
edge: uc
|
|
4662
4665
|
},
|
|
4663
4666
|
"graph.edge.disconnect": {
|
|
4664
|
-
target:
|
|
4665
|
-
edge:
|
|
4667
|
+
target: lc,
|
|
4668
|
+
edge: uc
|
|
4666
4669
|
},
|
|
4667
4670
|
"graph.node.create": {
|
|
4668
4671
|
...X,
|
|
4669
|
-
node:
|
|
4672
|
+
node: cc
|
|
4670
4673
|
},
|
|
4671
4674
|
"graph.node.delete": X,
|
|
4672
4675
|
"graph.node.field.set": U([H({
|
|
@@ -4689,8 +4692,8 @@ var hc = {
|
|
|
4689
4692
|
"graph.node.input.set": {
|
|
4690
4693
|
...X,
|
|
4691
4694
|
handle: q,
|
|
4692
|
-
before:
|
|
4693
|
-
value:
|
|
4695
|
+
before: Ks.optional(),
|
|
4696
|
+
value: Ks.optional()
|
|
4694
4697
|
},
|
|
4695
4698
|
"graph.node.additional-inputs.set": {
|
|
4696
4699
|
...X,
|
|
@@ -4699,8 +4702,8 @@ var hc = {
|
|
|
4699
4702
|
},
|
|
4700
4703
|
"graph.node.condition.set": {
|
|
4701
4704
|
...X,
|
|
4702
|
-
before: H(
|
|
4703
|
-
value: H(
|
|
4705
|
+
before: H(ec),
|
|
4706
|
+
value: H(ec)
|
|
4704
4707
|
},
|
|
4705
4708
|
"graph.node.values.set": {
|
|
4706
4709
|
...X,
|
|
@@ -4710,19 +4713,19 @@ var hc = {
|
|
|
4710
4713
|
"graph.node.wait.set": {
|
|
4711
4714
|
...X,
|
|
4712
4715
|
target: H({ kind: K("flow") }),
|
|
4713
|
-
before: H(
|
|
4714
|
-
value: H(
|
|
4716
|
+
before: H(tc),
|
|
4717
|
+
value: H(tc)
|
|
4715
4718
|
},
|
|
4716
4719
|
"graph.node.webhook.set": {
|
|
4717
4720
|
...X,
|
|
4718
4721
|
target: H({ kind: K("flow") }),
|
|
4719
|
-
before: H(
|
|
4720
|
-
value: H(
|
|
4722
|
+
before: H(nc),
|
|
4723
|
+
value: H(nc)
|
|
4721
4724
|
},
|
|
4722
4725
|
"graph.node.task.ports.set": {
|
|
4723
4726
|
...X,
|
|
4724
|
-
before: H(
|
|
4725
|
-
value: H(
|
|
4727
|
+
before: H(Js),
|
|
4728
|
+
value: H(Js)
|
|
4726
4729
|
},
|
|
4727
4730
|
"graph.node.task.name.set": {
|
|
4728
4731
|
...X,
|
|
@@ -4731,8 +4734,8 @@ var hc = {
|
|
|
4731
4734
|
},
|
|
4732
4735
|
"graph.node.task.capabilities.set": {
|
|
4733
4736
|
...X,
|
|
4734
|
-
before: V(
|
|
4735
|
-
value: V(
|
|
4737
|
+
before: V(Ys).optional(),
|
|
4738
|
+
value: V(Ys).optional()
|
|
4736
4739
|
},
|
|
4737
4740
|
"graph.trigger.config.set": {
|
|
4738
4741
|
nodeId: q,
|
|
@@ -4742,12 +4745,12 @@ var hc = {
|
|
|
4742
4745
|
},
|
|
4743
4746
|
"graph.trigger.schedule.set": {
|
|
4744
4747
|
nodeId: q,
|
|
4745
|
-
before:
|
|
4746
|
-
value:
|
|
4748
|
+
before: rc,
|
|
4749
|
+
value: rc
|
|
4747
4750
|
},
|
|
4748
4751
|
"module.create": {
|
|
4749
4752
|
moduleId: q,
|
|
4750
|
-
module:
|
|
4753
|
+
module: mc
|
|
4751
4754
|
},
|
|
4752
4755
|
"module.delete": { moduleId: q },
|
|
4753
4756
|
"module.rename": {
|
|
@@ -4757,24 +4760,24 @@ var hc = {
|
|
|
4757
4760
|
},
|
|
4758
4761
|
"module.source.replace": {
|
|
4759
4762
|
moduleId: q,
|
|
4760
|
-
beforeImports:
|
|
4763
|
+
beforeImports: Bs,
|
|
4761
4764
|
beforeSource: q,
|
|
4762
|
-
imports:
|
|
4765
|
+
imports: Bs,
|
|
4763
4766
|
source: q
|
|
4764
4767
|
},
|
|
4765
4768
|
"subflow.create": {
|
|
4766
4769
|
subflowId: q,
|
|
4767
|
-
subflow:
|
|
4770
|
+
subflow: dc.extend({ graph: fc })
|
|
4768
4771
|
},
|
|
4769
4772
|
"subflow.definition.set": {
|
|
4770
4773
|
subflowId: q,
|
|
4771
|
-
before:
|
|
4772
|
-
definition:
|
|
4774
|
+
before: dc,
|
|
4775
|
+
definition: dc
|
|
4773
4776
|
},
|
|
4774
4777
|
"subflow.delete": { subflowId: q },
|
|
4775
4778
|
"task.create": {
|
|
4776
4779
|
taskId: q,
|
|
4777
|
-
task:
|
|
4780
|
+
task: $s
|
|
4778
4781
|
},
|
|
4779
4782
|
"task.delete": { taskId: q },
|
|
4780
4783
|
"task.connector.connection.set": {
|
|
@@ -4784,8 +4787,8 @@ var hc = {
|
|
|
4784
4787
|
},
|
|
4785
4788
|
"task.agent.set": {
|
|
4786
4789
|
taskId: q,
|
|
4787
|
-
before:
|
|
4788
|
-
value:
|
|
4790
|
+
before: $s,
|
|
4791
|
+
value: $s
|
|
4789
4792
|
},
|
|
4790
4793
|
"task.llm.mode.set": {
|
|
4791
4794
|
taskId: q,
|
|
@@ -4798,13 +4801,13 @@ var hc = {
|
|
|
4798
4801
|
value: q
|
|
4799
4802
|
}
|
|
4800
4803
|
};
|
|
4801
|
-
V(U([...new Map(Object.entries(
|
|
4804
|
+
V(U([...new Map(Object.entries(gc).map(([e, t]) => [e, t instanceof L ? t : H({
|
|
4802
4805
|
kind: K(e),
|
|
4803
4806
|
...t
|
|
4804
4807
|
})])).values()])).min(1);
|
|
4805
4808
|
//#endregion
|
|
4806
4809
|
//#region src/flow/common/change.ts
|
|
4807
|
-
function
|
|
4810
|
+
function _c(e) {
|
|
4808
4811
|
if (!Array.isArray(e)) throw TypeError("Connector capabilities must be an array.");
|
|
4809
4812
|
let t = /* @__PURE__ */ new Set();
|
|
4810
4813
|
return e.map((e) => {
|
|
@@ -4840,20 +4843,20 @@ function gc(e) {
|
|
|
4840
4843
|
};
|
|
4841
4844
|
});
|
|
4842
4845
|
}
|
|
4843
|
-
function
|
|
4846
|
+
function vc(e) {
|
|
4844
4847
|
return e.trim().normalize("NFC");
|
|
4845
4848
|
}
|
|
4846
|
-
function
|
|
4847
|
-
let r =
|
|
4848
|
-
return r.length == 0 ? "empty" : Object.entries(e.nodes).some(([e, n]) => e != t && n.name != null &&
|
|
4849
|
+
function yc(e, t, n) {
|
|
4850
|
+
let r = vc(n);
|
|
4851
|
+
return r.length == 0 ? "empty" : Object.entries(e.nodes).some(([e, n]) => e != t && n.name != null && vc(n.name) == r) ? "duplicate" : void 0;
|
|
4849
4852
|
}
|
|
4850
|
-
var
|
|
4853
|
+
var bc = class extends Error {
|
|
4851
4854
|
constructor(e) {
|
|
4852
4855
|
super(e), this.name = "FlowChangeError";
|
|
4853
4856
|
}
|
|
4854
4857
|
};
|
|
4855
4858
|
function Z(e) {
|
|
4856
|
-
throw new
|
|
4859
|
+
throw new bc(e);
|
|
4857
4860
|
}
|
|
4858
4861
|
function Q(e, t) {
|
|
4859
4862
|
if (t.kind == "flow") return e.graph;
|
|
@@ -4877,7 +4880,7 @@ function $(e, t, n) {
|
|
|
4877
4880
|
}
|
|
4878
4881
|
};
|
|
4879
4882
|
}
|
|
4880
|
-
function
|
|
4883
|
+
function xc(e, t) {
|
|
4881
4884
|
if (!("inputs" in e)) return e;
|
|
4882
4885
|
let n = { ...e.inputs };
|
|
4883
4886
|
for (let [e, r] of Object.entries(n)) {
|
|
@@ -4893,7 +4896,7 @@ function bc(e, t) {
|
|
|
4893
4896
|
inputs: n
|
|
4894
4897
|
};
|
|
4895
4898
|
}
|
|
4896
|
-
function
|
|
4899
|
+
function Sc(e, t) {
|
|
4897
4900
|
let n = { ...e.document }, r = { ...e.modules };
|
|
4898
4901
|
for (let e of t) switch (e.kind) {
|
|
4899
4902
|
case "binding.create":
|
|
@@ -4974,8 +4977,8 @@ function xc(e, t) {
|
|
|
4974
4977
|
}
|
|
4975
4978
|
case "graph.node.create": {
|
|
4976
4979
|
let t = Q(n, e.target);
|
|
4977
|
-
t.nodes[e.nodeId] != null && Z("A Node with this ID already exists in the target graph."), e.target.kind == "subflow" && !("inputs" in e.node) && Z("Trigger Nodes cannot be created inside a Subflow."), e.node.kind == "manual" && Object.values(t.nodes).some((e) => e.kind == "manual") && Z("A graph can contain only one manual Trigger."), e.node.kind == "task" && e.node.task?.capabilities !== void 0 &&
|
|
4978
|
-
let r =
|
|
4980
|
+
t.nodes[e.nodeId] != null && Z("A Node with this ID already exists in the target graph."), e.target.kind == "subflow" && !("inputs" in e.node) && Z("Trigger Nodes cannot be created inside a Subflow."), e.node.kind == "manual" && Object.values(t.nodes).some((e) => e.kind == "manual") && Z("A graph can contain only one manual Trigger."), e.node.kind == "task" && e.node.task?.capabilities !== void 0 && _c(e.node.task.capabilities), e.node.name ?? Z("A Node name cannot be empty.");
|
|
4981
|
+
let r = vc(e.node.name), i = yc(t, e.nodeId, r);
|
|
4979
4982
|
i == "empty" && Z("A Node name cannot be empty."), i == "duplicate" && Z("A Node with this name already exists in the target graph.");
|
|
4980
4983
|
let a = r == e.node.name ? e.node : {
|
|
4981
4984
|
...e.node,
|
|
@@ -4993,7 +4996,7 @@ function xc(e, t) {
|
|
|
4993
4996
|
case "graph.node.delete": {
|
|
4994
4997
|
let t = Q(n, e.target);
|
|
4995
4998
|
t.nodes[e.nodeId] ?? Z("The Node does not exist in the target graph.");
|
|
4996
|
-
let r = /* @__PURE__ */ new Set([e.nodeId]), i = Object.fromEntries(Object.entries(t.nodes).flatMap(([e, t]) => r.has(e) ? [] : [[e,
|
|
4999
|
+
let r = /* @__PURE__ */ new Set([e.nodeId]), i = Object.fromEntries(Object.entries(t.nodes).flatMap(([e, t]) => r.has(e) ? [] : [[e, xc(t, r)]]));
|
|
4997
5000
|
if (Object.assign(n, $(n, e.target, {
|
|
4998
5001
|
...t,
|
|
4999
5002
|
edges: t.edges.filter((e) => !r.has(e.source) && !r.has(e.target)),
|
|
@@ -5019,7 +5022,7 @@ function xc(e, t) {
|
|
|
5019
5022
|
let a = { ...r };
|
|
5020
5023
|
if (e.field == "name") {
|
|
5021
5024
|
typeof e.value != "string" && Z("A Node name cannot be empty.");
|
|
5022
|
-
let n =
|
|
5025
|
+
let n = vc(e.value), r = yc(t, e.nodeId, n);
|
|
5023
5026
|
r == "empty" && Z("A Node name cannot be empty."), r == "duplicate" && Z("A Node with this name already exists in the target graph."), Object.assign(a, { name: n });
|
|
5024
5027
|
} else e.value == null ? Reflect.deleteProperty(a, e.field) : Object.assign(a, { [e.field]: e.value });
|
|
5025
5028
|
Object.assign(n, $(n, e.target, {
|
|
@@ -5051,7 +5054,7 @@ function xc(e, t) {
|
|
|
5051
5054
|
let t = Q(n, e.target), r = t.nodes[e.nodeId];
|
|
5052
5055
|
(r?.kind != "task" || r.task == null) && Z("The inline Task Node does not exist."), i(r.task.capabilities, e.before) || Z("The inline Task capabilities changed before this operation was applied.");
|
|
5053
5056
|
let a = { ...r.task };
|
|
5054
|
-
e.value === void 0 ? delete a.capabilities : a.capabilities =
|
|
5057
|
+
e.value === void 0 ? delete a.capabilities : a.capabilities = _c(e.value), Object.assign(n, $(n, e.target, {
|
|
5055
5058
|
...t,
|
|
5056
5059
|
nodes: {
|
|
5057
5060
|
...t.nodes,
|
|
@@ -5123,13 +5126,9 @@ function xc(e, t) {
|
|
|
5123
5126
|
let t = n.graph, r = t.nodes[e.nodeId];
|
|
5124
5127
|
(r?.kind != "wait" || !i({
|
|
5125
5128
|
actions: r.actions,
|
|
5126
|
-
...r.notification == null ? {} : { notification: r.notification },
|
|
5127
5129
|
prompt: r.prompt
|
|
5128
5130
|
}, e.before)) && Z("The Wait Node changed before this operation was applied.");
|
|
5129
|
-
let
|
|
5130
|
-
...o,
|
|
5131
|
-
...e.value
|
|
5132
|
-
} : {
|
|
5131
|
+
let a = {
|
|
5133
5132
|
...r,
|
|
5134
5133
|
...e.value
|
|
5135
5134
|
};
|
|
@@ -5137,7 +5136,7 @@ function xc(e, t) {
|
|
|
5137
5136
|
...t,
|
|
5138
5137
|
nodes: {
|
|
5139
5138
|
...t.nodes,
|
|
5140
|
-
[e.nodeId]:
|
|
5139
|
+
[e.nodeId]: a
|
|
5141
5140
|
}
|
|
5142
5141
|
};
|
|
5143
5142
|
break;
|
|
@@ -5221,7 +5220,7 @@ function xc(e, t) {
|
|
|
5221
5220
|
}
|
|
5222
5221
|
case "subflow.create":
|
|
5223
5222
|
n.subflows[e.subflowId] != null && Z("A Subflow with this ID already exists.");
|
|
5224
|
-
for (let t of Object.values(e.subflow.graph.nodes)) t.kind == "task" && t.task?.capabilities !== void 0 &&
|
|
5223
|
+
for (let t of Object.values(e.subflow.graph.nodes)) t.kind == "task" && t.task?.capabilities !== void 0 && _c(t.task.capabilities);
|
|
5225
5224
|
n.subflows = {
|
|
5226
5225
|
...n.subflows,
|
|
5227
5226
|
[e.subflowId]: e.subflow
|
|
@@ -5318,8 +5317,8 @@ function xc(e, t) {
|
|
|
5318
5317
|
}
|
|
5319
5318
|
//#endregion
|
|
5320
5319
|
//#region src/flow/common/nodeChanges.ts
|
|
5321
|
-
var
|
|
5322
|
-
function
|
|
5320
|
+
var Cc = "export default async function (inputs, context) {\n return { result: inputs.value }\n}\n";
|
|
5321
|
+
function wc(e, t, n, r = void 0, i = {
|
|
5323
5322
|
inputs: [{
|
|
5324
5323
|
handle: "value",
|
|
5325
5324
|
jsonSchema: {},
|
|
@@ -5337,7 +5336,7 @@ function Cc(e, t, n, r = void 0, i = {
|
|
|
5337
5336
|
module: {
|
|
5338
5337
|
...r ?? {
|
|
5339
5338
|
imports: [],
|
|
5340
|
-
source:
|
|
5339
|
+
source: Cc
|
|
5341
5340
|
},
|
|
5342
5341
|
name: n
|
|
5343
5342
|
},
|
|
@@ -5345,7 +5344,7 @@ function Cc(e, t, n, r = void 0, i = {
|
|
|
5345
5344
|
}, {
|
|
5346
5345
|
kind: "graph.node.create",
|
|
5347
5346
|
node: {
|
|
5348
|
-
inputs:
|
|
5347
|
+
inputs: Wc(i.inputs),
|
|
5349
5348
|
kind: "task",
|
|
5350
5349
|
name: n,
|
|
5351
5350
|
task: {
|
|
@@ -5360,7 +5359,7 @@ function Cc(e, t, n, r = void 0, i = {
|
|
|
5360
5359
|
target: e
|
|
5361
5360
|
}];
|
|
5362
5361
|
}
|
|
5363
|
-
function
|
|
5362
|
+
function Tc(e, t, n) {
|
|
5364
5363
|
return [{
|
|
5365
5364
|
kind: "task.create",
|
|
5366
5365
|
task: n,
|
|
@@ -5368,7 +5367,7 @@ function wc(e, t, n) {
|
|
|
5368
5367
|
}, {
|
|
5369
5368
|
kind: "graph.node.create",
|
|
5370
5369
|
node: {
|
|
5371
|
-
inputs:
|
|
5370
|
+
inputs: Wc(n.inputs),
|
|
5372
5371
|
kind: "task",
|
|
5373
5372
|
name: n.name,
|
|
5374
5373
|
taskId: t.taskId
|
|
@@ -5377,9 +5376,9 @@ function wc(e, t, n) {
|
|
|
5377
5376
|
target: e
|
|
5378
5377
|
}];
|
|
5379
5378
|
}
|
|
5380
|
-
function
|
|
5379
|
+
function Ec(e, t, n) {
|
|
5381
5380
|
if (e.kind != "flow") throw Error("Agent nodes are only supported in the root Flow.");
|
|
5382
|
-
return
|
|
5381
|
+
return Tc(e, t, {
|
|
5383
5382
|
name: n,
|
|
5384
5383
|
inputs: [{
|
|
5385
5384
|
handle: "input",
|
|
@@ -5405,9 +5404,9 @@ function Tc(e, t, n) {
|
|
|
5405
5404
|
}
|
|
5406
5405
|
});
|
|
5407
5406
|
}
|
|
5408
|
-
function
|
|
5407
|
+
function Dc(e, t, n, r, i, a = {}) {
|
|
5409
5408
|
let o = a.inputs ?? {};
|
|
5410
|
-
return
|
|
5409
|
+
return Tc(e, t, {
|
|
5411
5410
|
executor: {
|
|
5412
5411
|
kind: "llm",
|
|
5413
5412
|
mode: r
|
|
@@ -5420,13 +5419,13 @@ function Ec(e, t, n, r, i, a = {}) {
|
|
|
5420
5419
|
type: "array"
|
|
5421
5420
|
},
|
|
5422
5421
|
nullable: !0,
|
|
5423
|
-
value:
|
|
5422
|
+
value: Gc(o, "messages", null)
|
|
5424
5423
|
},
|
|
5425
5424
|
{
|
|
5426
5425
|
handle: "input",
|
|
5427
5426
|
jsonSchema: { type: "string" },
|
|
5428
5427
|
nullable: !1,
|
|
5429
|
-
value:
|
|
5428
|
+
value: Gc(o, "input", "Alex")
|
|
5430
5429
|
},
|
|
5431
5430
|
{
|
|
5432
5431
|
handle: "template",
|
|
@@ -5436,7 +5435,7 @@ function Ec(e, t, n, r, i, a = {}) {
|
|
|
5436
5435
|
type: "array"
|
|
5437
5436
|
},
|
|
5438
5437
|
nullable: !1,
|
|
5439
|
-
value:
|
|
5438
|
+
value: Gc(o, "template", [{
|
|
5440
5439
|
content: "Hello, I'm {{input}}",
|
|
5441
5440
|
role: "user"
|
|
5442
5441
|
}])
|
|
@@ -5445,7 +5444,7 @@ function Ec(e, t, n, r, i, a = {}) {
|
|
|
5445
5444
|
handle: "model",
|
|
5446
5445
|
jsonSchema: { type: "object" },
|
|
5447
5446
|
nullable: !1,
|
|
5448
|
-
value:
|
|
5447
|
+
value: Gc(o, "model", { model: "deepseek-v4-flash" })
|
|
5449
5448
|
}
|
|
5450
5449
|
],
|
|
5451
5450
|
name: n,
|
|
@@ -5458,7 +5457,7 @@ function Ec(e, t, n, r, i, a = {}) {
|
|
|
5458
5457
|
}]
|
|
5459
5458
|
});
|
|
5460
5459
|
}
|
|
5461
|
-
function
|
|
5460
|
+
function Oc(e, t, n) {
|
|
5462
5461
|
return [{
|
|
5463
5462
|
kind: "graph.node.create",
|
|
5464
5463
|
node: {
|
|
@@ -5488,7 +5487,7 @@ function Dc(e, t, n) {
|
|
|
5488
5487
|
target: e
|
|
5489
5488
|
}];
|
|
5490
5489
|
}
|
|
5491
|
-
function
|
|
5490
|
+
function kc(e, t, n) {
|
|
5492
5491
|
return [{
|
|
5493
5492
|
kind: "graph.node.create",
|
|
5494
5493
|
node: {
|
|
@@ -5506,7 +5505,7 @@ function Oc(e, t, n) {
|
|
|
5506
5505
|
target: e
|
|
5507
5506
|
}];
|
|
5508
5507
|
}
|
|
5509
|
-
function
|
|
5508
|
+
function Ac(e, t, n) {
|
|
5510
5509
|
return [{
|
|
5511
5510
|
kind: "graph.node.create",
|
|
5512
5511
|
node: {
|
|
@@ -5529,7 +5528,7 @@ function kc(e, t, n) {
|
|
|
5529
5528
|
target: e
|
|
5530
5529
|
}];
|
|
5531
5530
|
}
|
|
5532
|
-
function
|
|
5531
|
+
function jc(e, t, n) {
|
|
5533
5532
|
return [{
|
|
5534
5533
|
kind: "graph.node.create",
|
|
5535
5534
|
node: n,
|
|
@@ -5537,7 +5536,7 @@ function Ac(e, t, n) {
|
|
|
5537
5536
|
target: e
|
|
5538
5537
|
}];
|
|
5539
5538
|
}
|
|
5540
|
-
function
|
|
5539
|
+
function Mc(e, t, n, r) {
|
|
5541
5540
|
let i = r.name ?? n.displayName, a = n.type == "poll" ? {
|
|
5542
5541
|
bindingId: t.bindingId,
|
|
5543
5542
|
config: r.config,
|
|
@@ -5570,8 +5569,8 @@ function jc(e, t, n, r) {
|
|
|
5570
5569
|
target: e
|
|
5571
5570
|
}];
|
|
5572
5571
|
}
|
|
5573
|
-
function
|
|
5574
|
-
let r =
|
|
5572
|
+
function Nc(e, t, n) {
|
|
5573
|
+
let r = Uc(e, t)?.nodes;
|
|
5575
5574
|
if (r == null) return [];
|
|
5576
5575
|
let i = new Set(n), a = n.flatMap((e) => {
|
|
5577
5576
|
let n = r[e];
|
|
@@ -5584,7 +5583,7 @@ function Mc(e, t, n) {
|
|
|
5584
5583
|
moduleId: n.task.moduleId
|
|
5585
5584
|
}] : []];
|
|
5586
5585
|
});
|
|
5587
|
-
if (t.kind == "subflow") return
|
|
5586
|
+
if (t.kind == "subflow") return Rc(e, a);
|
|
5588
5587
|
let o = new Set(n.flatMap((e) => {
|
|
5589
5588
|
let t = r[e];
|
|
5590
5589
|
return t?.kind == "poll" || t?.kind == "integration" ? [t.bindingId] : [];
|
|
@@ -5593,10 +5592,10 @@ function Mc(e, t, n) {
|
|
|
5593
5592
|
bindingId: t,
|
|
5594
5593
|
kind: "binding.delete"
|
|
5595
5594
|
});
|
|
5596
|
-
return
|
|
5595
|
+
return Rc(e, a);
|
|
5597
5596
|
}
|
|
5598
|
-
function
|
|
5599
|
-
let i =
|
|
5597
|
+
function Pc(e, t, n, r) {
|
|
5598
|
+
let i = Uc(e, t)?.nodes[n];
|
|
5600
5599
|
if (i == null || !("inputs" in i)) return;
|
|
5601
5600
|
let a = [];
|
|
5602
5601
|
return i.name != r.name && a.push({
|
|
@@ -5615,8 +5614,8 @@ function Nc(e, t, n, r) {
|
|
|
5615
5614
|
value: r.timeoutMs
|
|
5616
5615
|
}), a;
|
|
5617
5616
|
}
|
|
5618
|
-
function
|
|
5619
|
-
let a =
|
|
5617
|
+
function Fc(e, t, n, r) {
|
|
5618
|
+
let a = Uc(e, t)?.nodes[n];
|
|
5620
5619
|
if (a == null || !("inputs" in a)) return;
|
|
5621
5620
|
let o = [];
|
|
5622
5621
|
for (let [e, s] of Object.entries(r)) {
|
|
@@ -5633,11 +5632,11 @@ function Pc(e, t, n, r) {
|
|
|
5633
5632
|
value: c
|
|
5634
5633
|
});
|
|
5635
5634
|
}
|
|
5636
|
-
return
|
|
5635
|
+
return Rc(e, o);
|
|
5637
5636
|
}
|
|
5638
|
-
function
|
|
5637
|
+
function Ic(e, t, n, r, i) {
|
|
5639
5638
|
let a = (t.kind == "flow" ? e.document.graph : e.document.subflows[t.id]?.graph)?.nodes[n];
|
|
5640
|
-
return a == null || !("inputs" in a) ? [] :
|
|
5639
|
+
return a == null || !("inputs" in a) ? [] : Rc(e, [{
|
|
5641
5640
|
kind: "graph.node.input.set",
|
|
5642
5641
|
nodeId: n,
|
|
5643
5642
|
handle: r,
|
|
@@ -5649,10 +5648,10 @@ function Fc(e, t, n, r, i) {
|
|
|
5649
5648
|
}
|
|
5650
5649
|
}]);
|
|
5651
5650
|
}
|
|
5652
|
-
function
|
|
5653
|
-
let o =
|
|
5651
|
+
function Lc(e, t, n, r, i, a) {
|
|
5652
|
+
let o = Uc(e, t)?.nodes[n];
|
|
5654
5653
|
if (o == null || !("inputs" in o)) return;
|
|
5655
|
-
let s = o.inputs[r], c = s?.kind == "sources" && s.sources.length == 1 && s.sources[0]?.kind == "binding" ? s.sources[0].bindingId : void 0, l = c == null ? void 0 : e.document.bindings[c], u =
|
|
5654
|
+
let s = o.inputs[r], c = s?.kind == "sources" && s.sources.length == 1 && s.sources[0]?.kind == "binding" ? s.sources[0].bindingId : void 0, l = c == null ? void 0 : e.document.bindings[c], u = zc(e.document);
|
|
5656
5655
|
return c != null && l?.kind == "variable" && (u.get(c) ?? 0) == 1 ? l.target == i ? [] : [{
|
|
5657
5656
|
before: l.target,
|
|
5658
5657
|
bindingId: c,
|
|
@@ -5665,7 +5664,7 @@ function Ic(e, t, n, r, i, a) {
|
|
|
5665
5664
|
},
|
|
5666
5665
|
bindingId: a,
|
|
5667
5666
|
kind: "binding.create"
|
|
5668
|
-
}, ...
|
|
5667
|
+
}, ...Rc(e, [{
|
|
5669
5668
|
before: s,
|
|
5670
5669
|
handle: r,
|
|
5671
5670
|
kind: "graph.node.input.set",
|
|
@@ -5680,25 +5679,25 @@ function Ic(e, t, n, r, i, a) {
|
|
|
5680
5679
|
}
|
|
5681
5680
|
}])];
|
|
5682
5681
|
}
|
|
5683
|
-
function
|
|
5684
|
-
let n =
|
|
5682
|
+
function Rc(e, t) {
|
|
5683
|
+
let n = zc(e.document), r = Sc(e, t), i = zc(r.document);
|
|
5685
5684
|
return [...t, ...[...n.keys()].flatMap((e) => i.has(e) || r.document.bindings[e]?.kind != "variable" ? [] : [{
|
|
5686
5685
|
bindingId: e,
|
|
5687
5686
|
kind: "binding.delete"
|
|
5688
5687
|
}])];
|
|
5689
5688
|
}
|
|
5690
|
-
function
|
|
5689
|
+
function zc(e) {
|
|
5691
5690
|
let t = /* @__PURE__ */ new Map(), n = (e) => {
|
|
5692
5691
|
t.set(e, (t.get(e) ?? 0) + 1);
|
|
5693
5692
|
};
|
|
5694
5693
|
for (let t of [e.graph, ...Object.values(e.subflows).map((e) => e.graph)]) for (let e of Object.values(t.nodes)) {
|
|
5695
5694
|
if ((e.kind == "poll" || e.kind == "integration") && n(e.bindingId), !("inputs" in e)) continue;
|
|
5696
|
-
let t =
|
|
5695
|
+
let t = Object.values(e.inputs);
|
|
5697
5696
|
for (let e of t) if (e.kind == "sources") for (let t of e.sources) t.kind == "binding" && n(t.bindingId);
|
|
5698
5697
|
}
|
|
5699
5698
|
return t;
|
|
5700
5699
|
}
|
|
5701
|
-
function
|
|
5700
|
+
function Bc(e, t, n) {
|
|
5702
5701
|
let r = e.document.tasks[t];
|
|
5703
5702
|
if (!(r == null || !("executor" in r) || r.executor.kind != "connector")) return r.executor.connectionId == n ? [] : [{
|
|
5704
5703
|
before: r.executor.connectionId,
|
|
@@ -5707,7 +5706,7 @@ function zc(e, t, n) {
|
|
|
5707
5706
|
value: n
|
|
5708
5707
|
}];
|
|
5709
5708
|
}
|
|
5710
|
-
function
|
|
5709
|
+
function Vc(e, t, n, r) {
|
|
5711
5710
|
let a = e.document.graph.nodes[n];
|
|
5712
5711
|
if (a == null) return;
|
|
5713
5712
|
let o = [];
|
|
@@ -5784,7 +5783,7 @@ function Bc(e, t, n, r) {
|
|
|
5784
5783
|
}
|
|
5785
5784
|
return o;
|
|
5786
5785
|
}
|
|
5787
|
-
function
|
|
5786
|
+
function Hc(e, t, n, r) {
|
|
5788
5787
|
let i = e.document.graph.nodes[n];
|
|
5789
5788
|
if (i == null || i.kind != "poll" && i.kind != "integration") return;
|
|
5790
5789
|
let a = e.document.bindings[i.bindingId];
|
|
@@ -5803,19 +5802,19 @@ function Vc(e, t, n, r) {
|
|
|
5803
5802
|
value: r
|
|
5804
5803
|
}];
|
|
5805
5804
|
}
|
|
5806
|
-
function
|
|
5805
|
+
function Uc(e, t) {
|
|
5807
5806
|
return t.kind == "flow" ? e.document.graph : e.document.subflows[t.id]?.graph;
|
|
5808
5807
|
}
|
|
5809
|
-
function
|
|
5808
|
+
function Wc(e) {
|
|
5810
5809
|
return Object.fromEntries(e.flatMap((e) => "handle" in e && Object.hasOwn(e, "value") ? [[e.handle, {
|
|
5811
5810
|
kind: "value",
|
|
5812
5811
|
value: e.value
|
|
5813
5812
|
}]] : []));
|
|
5814
5813
|
}
|
|
5815
|
-
function
|
|
5814
|
+
function Gc(e, t, n) {
|
|
5816
5815
|
return e != null && Object.hasOwn(e, t) ? e[t] : n;
|
|
5817
5816
|
}
|
|
5818
|
-
function
|
|
5817
|
+
function Kc(e, t, n, r) {
|
|
5819
5818
|
let a = (t.kind == "flow" ? e.document.graph : e.document.subflows[t.id]?.graph)?.nodes[n];
|
|
5820
5819
|
if (!(a?.kind != "task" || a.task == null || i(a.task.capabilities ?? [], r))) return [{
|
|
5821
5820
|
kind: "graph.node.task.capabilities.set",
|
|
@@ -5825,6 +5824,6 @@ function Gc(e, t, n, r) {
|
|
|
5825
5824
|
value: r
|
|
5826
5825
|
}];
|
|
5827
5826
|
}
|
|
5828
|
-
var
|
|
5827
|
+
var qc = n("23456789abcdefghjkmnpqrstuvwxyz", 10);
|
|
5829
5828
|
//#endregion
|
|
5830
|
-
export {
|
|
5829
|
+
export { Rc as cleanVariableBindings, a as connect, Ec as createAgentTask, qc as createAuthoringId, jc as createBuiltinTrigger, wc as createCodeTask, Oc as createCondition, Dc as createLlmTask, Tc as createManagedTask, Mc as createProviderTrigger, kc as createValue, Ac as createWait, Nc as deleteNodes, o as disconnect, c as moduleImports, u as renameModule, l as replaceModuleSource, Kc as setCodeActions, Bc as setConnectorConnection, Ic as setInputSources, Fc as setInputValues, Lc as setInputVariable, Hc as setTriggerConnection, Pc as updateSettings, Vc as updateTrigger };
|