@oomol-lab/open-flow 0.1.0-alpha.6 → 0.1.0-alpha.7

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.
@@ -1,4 +1,4 @@
1
- import { En as e, F as t, Mt as n, Nt as r, O as i, Yn as a, _r as o, ar as s, er as c, k as l, kr as u, mr as d, nt as f, tr as p, vr as m } from "./createLucideIcon-ggJB9CTC.js";
1
+ import { Dt as e, F as t, Gn as n, Kn as r, O as i, Ot as a, Vn as o, Xn as s, ar as c, br as l, cr as u, k as d, lr as f, nt as p, xn as m } from "./createLucideIcon-CqjqCezK.js";
2
2
  import * as h from "react";
3
3
  import { useMemo as g } from "react";
4
4
  import { jsx as _ } from "react/jsx-runtime";
@@ -16,7 +16,7 @@ function v(e, t) {
16
16
  }, [t, e]);
17
17
  }
18
18
  function y(e, t, n, r) {
19
- let i = n.useState("isMountedByTrigger", e), a = v(e, n), s = o((t) => {
19
+ let i = n.useState("isMountedByTrigger", e), a = v(e, n), o = u((t) => {
20
20
  if (a(t), !t || !n.select("open")) return;
21
21
  let i = n.select("activeTriggerId");
22
22
  if (i === e) {
@@ -32,7 +32,7 @@ function y(e, t, n, r) {
32
32
  ...r
33
33
  });
34
34
  });
35
- return d(() => {
35
+ return c(() => {
36
36
  i && n.update({
37
37
  activeTriggerElement: t.current,
38
38
  ...r
@@ -43,13 +43,13 @@ function y(e, t, n, r) {
43
43
  t,
44
44
  ...Object.values(r)
45
45
  ]), {
46
- registerTrigger: s,
46
+ registerTrigger: o,
47
47
  isMountedByThisTrigger: i
48
48
  };
49
49
  }
50
50
  function b(e) {
51
51
  let t = e.useState("open");
52
- d(() => {
52
+ c(() => {
53
53
  if (t && !e.select("activeTriggerId") && e.context.triggerElements.size === 1) {
54
54
  let t = e.context.triggerElements.entries().next();
55
55
  if (!t.done) {
@@ -62,35 +62,35 @@ function b(e) {
62
62
  }
63
63
  }, [t, e]);
64
64
  }
65
- function x(e, t, i) {
66
- let { mounted: a, setMounted: s, transitionStatus: c } = n(e);
67
- t.useSyncedValues({
68
- mounted: a,
69
- transitionStatus: c
65
+ function x(t, n, r) {
66
+ let { mounted: i, setMounted: o, transitionStatus: s } = e(t);
67
+ n.useSyncedValues({
68
+ mounted: i,
69
+ transitionStatus: s
70
70
  });
71
- let l = o(() => {
72
- s(!1), t.update({
71
+ let c = u(() => {
72
+ o(!1), n.update({
73
73
  activeTriggerId: null,
74
74
  activeTriggerElement: null,
75
75
  mounted: !1
76
- }), i?.(), t.context.onOpenChangeComplete?.(!1);
77
- }), u = t.useState("preventUnmountingOnClose");
78
- return r({
79
- enabled: !u,
80
- open: e,
81
- ref: t.context.popupRef,
76
+ }), r?.(), n.context.onOpenChangeComplete?.(!1);
77
+ }), l = n.useState("preventUnmountingOnClose");
78
+ return a({
79
+ enabled: !l,
80
+ open: t,
81
+ ref: n.context.popupRef,
82
82
  onComplete() {
83
- e || l();
83
+ t || c();
84
84
  }
85
85
  }), {
86
- forceUnmount: l,
87
- transitionStatus: c
86
+ forceUnmount: c,
87
+ transitionStatus: s
88
88
  };
89
89
  }
90
90
  //#endregion
91
91
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/floating-ui-react/utils/getEmptyRootContext.js
92
92
  function S() {
93
- return new l({
93
+ return new d({
94
94
  open: !1,
95
95
  transitionStatus: void 0,
96
96
  floatingElement: null,
@@ -123,50 +123,50 @@ function C() {
123
123
  popupProps: s
124
124
  };
125
125
  }
126
- var w = f((e) => e.triggerIdProp ?? e.activeTriggerId), T = {
127
- open: f((e) => e.openProp ?? e.open),
128
- mounted: f((e) => e.mounted),
129
- transitionStatus: f((e) => e.transitionStatus),
130
- floatingRootContext: f((e) => e.floatingRootContext),
131
- preventUnmountingOnClose: f((e) => e.preventUnmountingOnClose),
132
- payload: f((e) => e.payload),
126
+ var w = p((e) => e.triggerIdProp ?? e.activeTriggerId), T = {
127
+ open: p((e) => e.openProp ?? e.open),
128
+ mounted: p((e) => e.mounted),
129
+ transitionStatus: p((e) => e.transitionStatus),
130
+ floatingRootContext: p((e) => e.floatingRootContext),
131
+ preventUnmountingOnClose: p((e) => e.preventUnmountingOnClose),
132
+ payload: p((e) => e.payload),
133
133
  activeTriggerId: w,
134
- activeTriggerElement: f((e) => e.mounted ? e.activeTriggerElement : null),
135
- isTriggerActive: f((e, t) => t !== void 0 && w(e) === t),
136
- isOpenedByTrigger: f((e, t) => t !== void 0 && w(e) === t && e.open),
137
- isMountedByTrigger: f((e, t) => t !== void 0 && w(e) === t && e.mounted),
138
- triggerProps: f((e, t) => t ? e.activeTriggerProps : e.inactiveTriggerProps),
139
- popupProps: f((e) => e.popupProps),
140
- popupElement: f((e) => e.popupElement),
141
- positionerElement: f((e) => e.positionerElement)
134
+ activeTriggerElement: p((e) => e.mounted ? e.activeTriggerElement : null),
135
+ isTriggerActive: p((e, t) => t !== void 0 && w(e) === t),
136
+ isOpenedByTrigger: p((e, t) => t !== void 0 && w(e) === t && e.open),
137
+ isMountedByTrigger: p((e, t) => t !== void 0 && w(e) === t && e.mounted),
138
+ triggerProps: p((e, t) => t ? e.activeTriggerProps : e.inactiveTriggerProps),
139
+ popupProps: p((e) => e.popupProps),
140
+ popupElement: p((e) => e.popupElement),
141
+ positionerElement: p((e) => e.positionerElement)
142
142
  };
143
143
  //#endregion
144
144
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useSyncedFloatingRootContext.js
145
145
  function E(e) {
146
- let { popupStore: n, treatPopupAsFloatingElement: r = !1, onOpenChange: i } = e, o = a(), s = t() != null, c = n.useState("open"), f = n.useState("activeTriggerElement"), p = n.useState(r ? "popupElement" : "positionerElement"), h = n.context.triggerElements, g = m(() => new l({
147
- open: c,
146
+ let { popupStore: n, treatPopupAsFloatingElement: r = !1, onOpenChange: i } = e, a = o(), s = t() != null, u = n.useState("open"), p = n.useState("activeTriggerElement"), m = n.useState(r ? "popupElement" : "positionerElement"), h = n.context.triggerElements, g = f(() => new d({
147
+ open: u,
148
148
  transitionStatus: void 0,
149
- referenceElement: f,
150
- floatingElement: p,
149
+ referenceElement: p,
150
+ floatingElement: m,
151
151
  triggerElements: h,
152
152
  onOpenChange: i,
153
- floatingId: o,
153
+ floatingId: a,
154
154
  syncOnly: !0,
155
155
  nested: s
156
156
  })).current;
157
- return d(() => {
157
+ return c(() => {
158
158
  let e = {
159
- open: c,
160
- floatingId: o,
161
- referenceElement: f,
162
- floatingElement: p
159
+ open: u,
160
+ floatingId: a,
161
+ referenceElement: p,
162
+ floatingElement: m
163
163
  };
164
- u(f) && (e.domReferenceElement = f), g.state.positionReference === g.state.referenceElement && (e.positionReference = f), g.update(e);
164
+ l(p) && (e.domReferenceElement = p), g.state.positionReference === g.state.referenceElement && (e.positionReference = p), g.update(e);
165
165
  }, [
166
- c,
167
- o,
168
- f,
166
+ u,
167
+ a,
169
168
  p,
169
+ m,
170
170
  g
171
171
  ]), g.context.onOpenChange = i, g.context.nested = s, g;
172
172
  }
@@ -177,50 +177,50 @@ var D = /* @__PURE__ */ new Map([
177
177
  ["combobox", "listbox"],
178
178
  ["label", !1]
179
179
  ]);
180
- function O(n, r = {}) {
181
- let i = "rootStore" in n ? n.rootStore : n, o = i.useState("open"), c = i.useState("floatingId"), l = i.useState("domReferenceElement"), u = i.useState("floatingElement"), { role: d = "dialog" } = r, f = a(), p = l?.id || f, m = h.useMemo(() => e(u)?.id || c, [u, c]), g = D.get(d) ?? d, _ = t() != null, v = h.useMemo(() => g === "tooltip" || d === "label" ? s : {
180
+ function O(e, n = {}) {
181
+ let r = "rootStore" in e ? e.rootStore : e, i = r.useState("open"), a = r.useState("floatingId"), c = r.useState("domReferenceElement"), l = r.useState("floatingElement"), { role: u = "dialog" } = n, d = o(), f = c?.id || d, p = h.useMemo(() => m(l)?.id || a, [l, a]), g = D.get(u) ?? u, _ = t() != null, v = h.useMemo(() => g === "tooltip" || u === "label" ? s : {
182
182
  "aria-haspopup": g === "alertdialog" ? "dialog" : g,
183
183
  "aria-expanded": "false",
184
184
  ...g === "listbox" && { role: "combobox" },
185
185
  ...g === "menu" && _ && { role: "menuitem" },
186
- ...d === "select" && { "aria-autocomplete": "none" },
187
- ...d === "combobox" && { "aria-autocomplete": "list" }
186
+ ...u === "select" && { "aria-autocomplete": "none" },
187
+ ...u === "combobox" && { "aria-autocomplete": "list" }
188
188
  }, [
189
189
  g,
190
190
  _,
191
- d
192
- ]), y = h.useMemo(() => g === "tooltip" || d === "label" ? { [`aria-${d === "label" ? "labelledby" : "describedby"}`]: o ? m : void 0 } : {
191
+ u
192
+ ]), y = h.useMemo(() => g === "tooltip" || u === "label" ? { [`aria-${u === "label" ? "labelledby" : "describedby"}`]: i ? p : void 0 } : {
193
193
  ...v,
194
- "aria-expanded": o ? "true" : "false",
195
- "aria-controls": o ? m : void 0,
196
- ...g === "menu" && { id: p }
194
+ "aria-expanded": i ? "true" : "false",
195
+ "aria-controls": i ? p : void 0,
196
+ ...g === "menu" && { id: f }
197
197
  }, [
198
198
  g,
199
- m,
200
- o,
201
199
  p,
202
- d,
200
+ i,
201
+ f,
202
+ u,
203
203
  v
204
204
  ]), b = h.useMemo(() => {
205
205
  let e = {
206
- id: m,
206
+ id: p,
207
207
  ...g && { role: g }
208
208
  };
209
- return g === "tooltip" || d === "label" ? e : {
209
+ return g === "tooltip" || u === "label" ? e : {
210
210
  ...e,
211
- ...g === "menu" && { "aria-labelledby": p }
211
+ ...g === "menu" && { "aria-labelledby": f }
212
212
  };
213
213
  }, [
214
214
  g,
215
- m,
216
215
  p,
217
- d
216
+ f,
217
+ u
218
218
  ]), x = h.useCallback(({ active: e, selected: t }) => {
219
219
  let n = {
220
220
  role: "option",
221
- ...e && { id: `${m}-fui-option` }
221
+ ...e && { id: `${p}-fui-option` }
222
222
  };
223
- switch (d) {
223
+ switch (u) {
224
224
  case "select":
225
225
  case "combobox": return {
226
226
  ...n,
@@ -228,7 +228,7 @@ function O(n, r = {}) {
228
228
  };
229
229
  }
230
230
  return {};
231
- }, [m, d]);
231
+ }, [p, u]);
232
232
  return h.useMemo(() => ({
233
233
  reference: y,
234
234
  floating: b,
@@ -246,7 +246,7 @@ function O(n, r = {}) {
246
246
  function k({ className: e, ...t }) {
247
247
  return /* @__PURE__ */ _("label", {
248
248
  "data-slot": "label",
249
- className: c("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", e),
249
+ className: n("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", e),
250
250
  ...t
251
251
  });
252
252
  }
@@ -255,11 +255,11 @@ function k({ className: e, ...t }) {
255
255
  function A({ className: e, ...t }) {
256
256
  return /* @__PURE__ */ _("div", {
257
257
  "data-slot": "field-group",
258
- className: c("group/field-group @container/field-group flex w-full flex-col gap-5 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4", e),
258
+ className: n("group/field-group @container/field-group flex w-full flex-col gap-5 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4", e),
259
259
  ...t
260
260
  });
261
261
  }
262
- var j = p("group/field flex w-full gap-2 data-[invalid=true]:text-destructive", {
262
+ var j = r("group/field flex w-full gap-2 data-[invalid=true]:text-destructive", {
263
263
  variants: { orientation: {
264
264
  vertical: "flex-col *:w-full [&>.sr-only]:w-auto",
265
265
  horizontal: "flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",
@@ -267,45 +267,45 @@ var j = p("group/field flex w-full gap-2 data-[invalid=true]:text-destructive",
267
267
  } },
268
268
  defaultVariants: { orientation: "vertical" }
269
269
  });
270
- function M({ className: e, orientation: t = "vertical", ...n }) {
270
+ function M({ className: e, orientation: t = "vertical", ...r }) {
271
271
  return /* @__PURE__ */ _("div", {
272
272
  role: "group",
273
273
  "data-slot": "field",
274
274
  "data-orientation": t,
275
- className: c(j({ orientation: t }), e),
276
- ...n
275
+ className: n(j({ orientation: t }), e),
276
+ ...r
277
277
  });
278
278
  }
279
279
  function N({ className: e, ...t }) {
280
280
  return /* @__PURE__ */ _(k, {
281
281
  "data-slot": "field-label",
282
- className: c("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-muted/50 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-3 has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 *:data-[slot=field]:p-2.5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10", "has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col", e),
282
+ className: n("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-muted/50 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-3 has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 *:data-[slot=field]:p-2.5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10", "has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col", e),
283
283
  ...t
284
284
  });
285
285
  }
286
286
  function P({ className: e, ...t }) {
287
287
  return /* @__PURE__ */ _("p", {
288
288
  "data-slot": "field-description",
289
- className: c("text-left text-sm leading-normal font-normal text-muted-foreground group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5", "last:mt-0 nth-last-2:-mt-1", "[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", e),
289
+ className: n("text-left text-sm leading-normal font-normal text-muted-foreground group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5", "last:mt-0 nth-last-2:-mt-1", "[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", e),
290
290
  ...t
291
291
  });
292
292
  }
293
- function F({ className: e, children: t, errors: n, ...r }) {
294
- let i = g(() => {
293
+ function F({ className: e, children: t, errors: r, ...i }) {
294
+ let a = g(() => {
295
295
  if (t) return t;
296
- if (!n?.length) return null;
297
- let e = [...new Map(n.map((e) => [e?.message, e])).values()];
296
+ if (!r?.length) return null;
297
+ let e = [...new Map(r.map((e) => [e?.message, e])).values()];
298
298
  return e?.length == 1 ? e[0]?.message : /* @__PURE__ */ _("ul", {
299
299
  className: "ml-4 flex list-disc flex-col gap-1",
300
300
  children: e.map((e, t) => e?.message && /* @__PURE__ */ _("li", { children: e.message }, t))
301
301
  });
302
- }, [t, n]);
303
- return i ? /* @__PURE__ */ _("div", {
302
+ }, [t, r]);
303
+ return a ? /* @__PURE__ */ _("div", {
304
304
  role: "alert",
305
305
  "data-slot": "field-error",
306
- className: c("text-sm font-normal text-destructive", e),
307
- ...r,
308
- children: i
306
+ className: n("text-sm font-normal text-destructive", e),
307
+ ...i,
308
+ children: a
309
309
  }) : null;
310
310
  }
311
311
  //#endregion
@@ -67,15 +67,17 @@ function o(e, t, n, r = {
67
67
  imports: [],
68
68
  source: "export default function run(input) {\n return { result: input.value }\n}\n"
69
69
  }, i = {
70
- inputs: { value: {
70
+ inputs: [{
71
+ handle: "value",
71
72
  jsonSchema: {},
72
73
  nullable: !0,
73
74
  value: null
74
- } },
75
- outputs: { result: {
75
+ }],
76
+ outputs: [{
77
+ handle: "result",
76
78
  jsonSchema: {},
77
79
  nullable: !0
78
- } }
80
+ }]
79
81
  }) {
80
82
  return [{
81
83
  kind: "module.create",
@@ -127,8 +129,9 @@ function c(e, t, n, r, i, a = {}) {
127
129
  kind: "llm",
128
130
  mode: r
129
131
  },
130
- inputs: {
131
- messages: {
132
+ inputs: [
133
+ {
134
+ handle: "messages",
132
135
  jsonSchema: {
133
136
  items: { type: "object" },
134
137
  type: "array"
@@ -136,12 +139,14 @@ function c(e, t, n, r, i, a = {}) {
136
139
  nullable: !0,
137
140
  value: x(o, "messages", null)
138
141
  },
139
- input: {
142
+ {
143
+ handle: "input",
140
144
  jsonSchema: { type: "string" },
141
145
  nullable: !1,
142
146
  value: x(o, "input", "Alex")
143
147
  },
144
- template: {
148
+ {
149
+ handle: "template",
145
150
  jsonSchema: {
146
151
  items: { type: "object" },
147
152
  minItems: 1,
@@ -153,18 +158,21 @@ function c(e, t, n, r, i, a = {}) {
153
158
  role: "user"
154
159
  }])
155
160
  },
156
- model: {
161
+ {
162
+ handle: "model",
157
163
  jsonSchema: { type: "object" },
158
164
  nullable: !1,
159
165
  value: x(o, "model", { model: "deepseek-v4-flash" })
160
166
  }
161
- },
167
+ ],
162
168
  name: n,
163
- outputs: { output: a.output ?? {
164
- description: i,
165
- jsonSchema: r == "chat" ? { type: "string" } : {},
166
- nullable: !1
167
- } }
169
+ outputs: [{
170
+ ...a.output,
171
+ description: a.output?.description ?? i,
172
+ handle: "output",
173
+ jsonSchema: a.output?.jsonSchema ?? (r == "chat" ? { type: "string" } : {}),
174
+ nullable: a.output?.nullable ?? !1
175
+ }]
168
176
  });
169
177
  }
170
178
  function l(e, t, n) {
@@ -206,11 +214,12 @@ function u(e, t, n) {
206
214
  inputs: {},
207
215
  kind: "value",
208
216
  name: n,
209
- values: { value: {
217
+ values: [{
218
+ handle: "value",
210
219
  jsonSchema: {},
211
220
  nullable: !0,
212
221
  value: null
213
- } }
222
+ }]
214
223
  },
215
224
  nodeId: t,
216
225
  target: e
@@ -323,6 +332,7 @@ function _(e, t, n, r) {
323
332
  if (i == null) return;
324
333
  let a = {
325
334
  ...r.description == null ? {} : { description: r.description },
335
+ icon: i.icon,
326
336
  name: r.name
327
337
  }, o;
328
338
  switch (r.kind) {
@@ -381,9 +391,9 @@ function y(e, t) {
381
391
  return t.kind == "flow" ? e.document.graph : e.document.subflows[t.id]?.graph;
382
392
  }
383
393
  function b(e) {
384
- return Object.fromEntries(Object.entries(e).flatMap(([e, t]) => Object.hasOwn(t, "value") ? [[e, {
394
+ return Object.fromEntries(e.flatMap((e) => Object.hasOwn(e, "value") ? [[e.handle, {
385
395
  kind: "value",
386
- value: t.value
396
+ value: e.value
387
397
  }]] : []));
388
398
  }
389
399
  function x(e, t, n) {
@@ -12,6 +12,13 @@ export interface PortDefinition {
12
12
  export interface InputPortDefinition extends PortDefinition {
13
13
  readonly value?: JsonValue;
14
14
  }
15
+ export interface Port extends PortDefinition {
16
+ readonly handle: string;
17
+ }
18
+ export interface InputPort extends InputPortDefinition {
19
+ readonly handle: string;
20
+ }
21
+ export declare function portsByHandle<Value extends Port>(ports: readonly Value[]): Readonly<Record<string, Value>>;
15
22
  export interface NodeSource {
16
23
  readonly kind: 'node';
17
24
  readonly nodeId: string;
@@ -38,6 +45,7 @@ export interface OutputMapping {
38
45
  interface GraphNodeBase {
39
46
  readonly concurrency: number;
40
47
  readonly description?: string;
48
+ readonly icon?: string;
41
49
  readonly inputs: Readonly<Record<string, InputMapping>>;
42
50
  readonly name?: string;
43
51
  readonly timeoutMs?: number;
@@ -48,7 +56,7 @@ export interface SubflowNode extends GraphNodeBase {
48
56
  }
49
57
  export interface ValueNode extends GraphNodeBase {
50
58
  readonly kind: 'value';
51
- readonly values: Readonly<Record<string, InputPortDefinition>>;
59
+ readonly values: readonly InputPort[];
52
60
  }
53
61
  export type ConditionOperator = '!=' | '<' | '<=' | '==' | '>' | '>=' | 'contains' | 'endsWith' | 'hasKey' | 'hasValue' | 'isEmpty' | 'isFalse' | 'isNotEmpty' | 'isNotNull' | 'isNull' | 'isTrue' | 'notContains' | 'notHasKey' | 'notHasValue' | 'startsWith';
54
62
  export interface ConditionExpression {
@@ -64,9 +72,7 @@ export interface ConditionCase {
64
72
  export interface ConditionNode extends GraphNodeBase {
65
73
  readonly cases: readonly ConditionCase[];
66
74
  readonly defaultOutput?: string;
67
- readonly input: InputPortDefinition & {
68
- readonly handle: string;
69
- };
75
+ readonly input: InputPort;
70
76
  readonly kind: 'condition';
71
77
  }
72
78
  export type ManagedTaskExecutor = {
@@ -83,9 +89,9 @@ export interface ConnectorCapability {
83
89
  readonly kind: 'connector';
84
90
  }
85
91
  interface TaskDefinitionBase {
86
- readonly inputs: Readonly<Record<string, InputPortDefinition>>;
92
+ readonly inputs: readonly InputPort[];
87
93
  readonly name: string;
88
- readonly outputs: Readonly<Record<string, PortDefinition>>;
94
+ readonly outputs: readonly Port[];
89
95
  }
90
96
  export interface InlineTaskDefinition extends TaskDefinitionBase {
91
97
  readonly capabilities?: readonly ConnectorCapability[];
@@ -143,8 +149,7 @@ export type TriggerKeySnapshot = (TriggerKeySnapshotBase & {
143
149
  readonly endpoint: IntegrationEndpointDeclaration;
144
150
  readonly type: 'integration';
145
151
  });
146
- export interface WebhookInputDefinition extends InputPortDefinition {
147
- readonly handle: string;
152
+ export interface WebhookInputDefinition extends InputPort {
148
153
  }
149
154
  export interface WebhookOptions {
150
155
  readonly allowedMethods?: readonly string[];
@@ -156,6 +161,7 @@ export interface WebhookOptions {
156
161
  }
157
162
  interface TriggerNodeBase {
158
163
  readonly description?: string;
164
+ readonly icon?: string;
159
165
  readonly name: string;
160
166
  }
161
167
  export type TriggerNode = (TriggerNodeBase & {
@@ -190,9 +196,9 @@ export interface FlowDocument {
190
196
  readonly graph: Graph;
191
197
  readonly subflows: Readonly<Record<string, {
192
198
  readonly graph: Graph;
193
- readonly inputs: Readonly<Record<string, InputPortDefinition>>;
199
+ readonly inputs: readonly InputPort[];
194
200
  readonly name: string;
195
- readonly outputs: Readonly<Record<string, OutputMapping & PortDefinition>>;
201
+ readonly outputs: readonly (OutputMapping & Port)[];
196
202
  }>>;
197
203
  readonly tasks: Readonly<Record<string, ManagedTaskDefinition>>;
198
204
  }