@oomol-lab/open-flow 0.1.0-beta.40 → 0.1.0-beta.42

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.
Files changed (51) hide show
  1. package/README.md +9 -0
  2. package/dist/browser/{createResourceDialog-BOrW62JW.js → createResourceDialog-DmJk4LsF.js} +28 -29
  3. package/dist/browser/dist-BhV15xlT.js +300 -0
  4. package/dist/browser/flow-authoring-node.d.ts +4 -1
  5. package/dist/browser/flow-authoring.js +7 -10
  6. package/dist/browser/flow-change.d.ts +3 -15
  7. package/dist/browser/flow-change.js +1 -2
  8. package/dist/browser/{editorComponent-0skblWYk.js → flowChanges-CYcfbZLP.js} +34201 -15646
  9. package/dist/browser/{flowRunInputEditorStore-Bgb5vSeS.js → flowRunInputEditorStore-rVbwoTfN.js} +1 -1
  10. package/dist/browser/{flowWorkspace-DJzQVVtZ.js → flowWorkspace-wckoLtfB.js} +38934 -39306
  11. package/dist/browser/licenses.md +16 -0
  12. package/dist/browser/{markdownContent-D2oHGWc6.js → markdownContent-DP6aYNZN.js} +17 -17
  13. package/dist/browser/markdownContent-DPkwZqaL.js +44588 -0
  14. package/dist/browser/preview.css +2 -0
  15. package/dist/browser/preview.css.d.ts +1 -0
  16. package/dist/browser/preview.d.ts +15 -0
  17. package/dist/browser/preview.js +88034 -0
  18. package/dist/browser/theme.css +7 -1
  19. package/dist/browser/{typeScriptSession-v9Pb3G6d.js → typeScriptSession-By_yez_b.js} +1 -1
  20. package/dist/browser/ui.css +1 -1
  21. package/dist/browser/ui.js +3903 -1421
  22. package/dist/browser/workbench-contract.d.ts +21 -12
  23. package/dist/browser/workbench.css +1 -1
  24. package/dist/browser/workbench.d.ts +3 -1
  25. package/dist/browser/workbench.js +1205 -1848
  26. package/dist/browser/workbenchSelect-Bq6KHpKx.js +16033 -0
  27. package/dist/common/control-api-conformance.js +2606 -2540
  28. package/dist/common/control-api.d.ts +18 -10
  29. package/dist/common/control-api.js +2428 -2381
  30. package/dist/common/control-requests.js +4 -8
  31. package/dist/common/flow-encoding.js +1 -2
  32. package/dist/common/flow-graph.d.ts +1 -1
  33. package/dist/common/flow-promptTemplate.d.ts +4 -0
  34. package/dist/common/flow-schema.d.ts +1 -0
  35. package/dist/common/flow-semantics.d.ts +2 -1
  36. package/dist/common/flow-semantics.js +2780 -2770
  37. package/dist/common/integration-trigger.js +724 -721
  38. package/dist/common/mcp.js +789 -739
  39. package/dist/common/poll-trigger.js +40 -37
  40. package/dist/common/provider-triggers.js +611 -608
  41. package/dist/common/providerIconSprite.d.ts +25 -0
  42. package/dist/common/runtime-contract.js +2 -1
  43. package/dist/common/scheduler.d.ts +2 -0
  44. package/dist/common/scheduler.js +1585 -1549
  45. package/dist/common/webhook-trigger.js +1 -2
  46. package/dist/index.d.ts +19 -0
  47. package/package.json +9 -1
  48. package/dist/browser/flowChanges-3o9Vs_1I.js +0 -10137
  49. package/dist/browser/inputValues-DkDT6u0o.js +0 -43
  50. package/dist/browser/lite-BA96NG4M.js +0 -8549
  51. package/dist/browser/workbenchSelect-B5zXyaaX.js +0 -6423
package/README.md CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  TypeScript contracts and Browser runtime for Open Flow.
4
4
 
5
+ The offline Publications viewer is available as `OpenFlowPreview` from
6
+ `@oomol-lab/open-flow/preview`, with standalone `@oomol-lab/open-flow/preview.css`.
7
+ Supply `draft`, `presentation` (or null), `language` and `theme`; the entry also exports
8
+ `Draft`, `Presentation` and `OpenFlowPreviewProps` types. Give its parent an explicit height.
9
+ It supports temporary node movement, restore layout, read-only properties and subflows without
10
+ fetching or saving a workflow. Use a new React key to reset the session when switching examples.
11
+ A Shadow DOM host must load the stylesheet inside its shadow root before mounting the component;
12
+ Vite hosts can import `@oomol-lab/open-flow/preview.css?url` for the stylesheet URL.
13
+
5
14
  Install the Task contracts as a development dependency:
6
15
 
7
16
  ```bash
@@ -1,47 +1,46 @@
1
1
  import { i as e } from "./main-BDnNHhkU.js";
2
- import { Bn as t, kt as n } from "./lite-BA96NG4M.js";
3
- import { a as r, c as i, d as a, f as o, g as s, h as c, i as l, l as u, m as d, n as f, p, r as m, s as h, t as g } from "./workbenchSelect-B5zXyaaX.js";
4
- import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
5
- import { useEffect as b, useRef as x, useState as S } from "react";
2
+ import { C as t, E as n, Fr as r, Mn as i, S as a, T as o, a as s, c, i as l, l as u, n as d, r as f, s as p, t as m, w as h, x as g } from "./workbenchSelect-Bq6KHpKx.js";
3
+ import { useEffect as _, useRef as v, useState as y } from "react";
4
+ import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
6
5
  //#region src/workbench/browser/runtime/shell/createResourceDialog.tsx
7
6
  function C({ disabled: C, field: w, id: T, issue: E, label: D, name: O, onNameChange: k, onOpenChange: A, onSubmit: j, pending: M, title: N }) {
8
- let P = e(), F = x(null), I = x(null), [L, R] = S(!1), z = O.length > 0 && E != null, B = P(z ? `resource.nameIssue.${E}` : "resource.nameHint", { max: 80 }), V = `${T}-message`, H = `${T}-option`;
9
- return b(() => R(!0), []), /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("div", { ref: I }), /* @__PURE__ */ v(m, {
7
+ let P = e(), F = v(null), I = v(null), [L, R] = y(!1), z = O.length > 0 && E != null, B = P(z ? `resource.nameIssue.${E}` : "resource.nameHint", { max: 80 }), V = `${T}-message`, H = `${T}-option`;
8
+ return _(() => R(!0), []), /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x("div", { ref: I }), /* @__PURE__ */ x(f, {
10
9
  onOpenChange: R,
11
10
  onOpenChangeComplete: (e) => {
12
11
  e || A(!1);
13
12
  },
14
13
  open: L,
15
- children: /* @__PURE__ */ v(r, {
14
+ children: /* @__PURE__ */ x(s, {
16
15
  container: I.current,
17
16
  initialFocus: () => F.current,
18
17
  showCloseButton: !1,
19
- children: /* @__PURE__ */ y("form", {
18
+ children: /* @__PURE__ */ S("form", {
20
19
  className: "flex flex-col gap-4",
21
20
  onSubmit: j,
22
21
  children: [
23
- /* @__PURE__ */ y(i, {
22
+ /* @__PURE__ */ S(c, {
24
23
  className: "flex-row items-center justify-between",
25
- children: [/* @__PURE__ */ v(u, { children: N }), /* @__PURE__ */ v(l, {
24
+ children: [/* @__PURE__ */ x(u, { children: N }), /* @__PURE__ */ x(l, {
26
25
  "aria-label": P("common.cancel"),
27
- render: /* @__PURE__ */ v(t, {
26
+ render: /* @__PURE__ */ x(r, {
28
27
  size: "icon-sm",
29
28
  variant: "ghost"
30
29
  }),
31
30
  type: "button",
32
- children: /* @__PURE__ */ v(f, { name: "close" })
31
+ children: /* @__PURE__ */ x(d, { name: "close" })
33
32
  })]
34
33
  }),
35
- /* @__PURE__ */ y(c, {
34
+ /* @__PURE__ */ S(o, {
36
35
  className: "gap-4",
37
- children: [/* @__PURE__ */ y(o, {
36
+ children: [/* @__PURE__ */ S(a, {
38
37
  "data-invalid": z,
39
38
  children: [
40
- /* @__PURE__ */ v(s, {
39
+ /* @__PURE__ */ x(n, {
41
40
  htmlFor: T,
42
41
  children: D
43
42
  }),
44
- /* @__PURE__ */ v(n, {
43
+ /* @__PURE__ */ x(i, {
45
44
  autoComplete: "off",
46
45
  "aria-describedby": V,
47
46
  "aria-invalid": z,
@@ -52,17 +51,17 @@ function C({ disabled: C, field: w, id: T, issue: E, label: D, name: O, onNameCh
52
51
  required: !0,
53
52
  value: O
54
53
  }),
55
- v(z ? d : p, {
54
+ x(z ? h : t, {
56
55
  id: V,
57
56
  children: B
58
57
  })
59
58
  ]
60
- }), w != null && /* @__PURE__ */ y(o, { children: [
61
- /* @__PURE__ */ v(s, {
59
+ }), w != null && /* @__PURE__ */ S(a, { children: [
60
+ /* @__PURE__ */ x(n, {
62
61
  htmlFor: w.state == "ready" ? H : void 0,
63
62
  children: w.label
64
63
  }),
65
- w.state == "ready" ? /* @__PURE__ */ v(g, {
64
+ w.state == "ready" ? /* @__PURE__ */ x(m, {
66
65
  ariaLabel: w.ariaLabel,
67
66
  className: "w-full",
68
67
  id: H,
@@ -70,13 +69,13 @@ function C({ disabled: C, field: w, id: T, issue: E, label: D, name: O, onNameCh
70
69
  options: w.options,
71
70
  portalRoot: I.current,
72
71
  value: w.value
73
- }) : /* @__PURE__ */ y("div", {
72
+ }) : /* @__PURE__ */ S("div", {
74
73
  className: "flex min-h-9 items-center gap-2 rounded-lg border bg-muted/30 px-3 py-2 text-sm text-muted-foreground",
75
74
  role: w.state == "error" ? "alert" : "status",
76
75
  children: [
77
- w.state == "loading" && /* @__PURE__ */ v(a, { "aria-hidden": "true" }),
78
- /* @__PURE__ */ v("span", { children: w.status }),
79
- w.state == "error" && /* @__PURE__ */ v(t, {
76
+ w.state == "loading" && /* @__PURE__ */ x(g, { "aria-hidden": "true" }),
77
+ /* @__PURE__ */ x("span", { children: w.status }),
78
+ w.state == "error" && /* @__PURE__ */ x(r, {
80
79
  className: "ml-auto bg-background",
81
80
  onClick: w.onRetry,
82
81
  size: "sm",
@@ -86,16 +85,16 @@ function C({ disabled: C, field: w, id: T, issue: E, label: D, name: O, onNameCh
86
85
  })
87
86
  ]
88
87
  }),
89
- /* @__PURE__ */ v(p, { children: w.description })
88
+ /* @__PURE__ */ x(t, { children: w.description })
90
89
  ] })]
91
90
  }),
92
- /* @__PURE__ */ y(h, {
91
+ /* @__PURE__ */ S(p, {
93
92
  className: "mx-0 mb-0 border-0 bg-transparent p-0 pt-1",
94
- children: [/* @__PURE__ */ v(l, {
95
- render: /* @__PURE__ */ v(t, { variant: "outline" }),
93
+ children: [/* @__PURE__ */ x(l, {
94
+ render: /* @__PURE__ */ x(r, { variant: "outline" }),
96
95
  type: "button",
97
96
  children: P("common.cancel")
98
- }), /* @__PURE__ */ v(t, {
97
+ }), /* @__PURE__ */ x(r, {
99
98
  disabled: C || M || E != null,
100
99
  type: "submit",
101
100
  children: P(M ? "common.creating" : "common.create")
@@ -0,0 +1,300 @@
1
+ import e, { createContext as t, createElement as n, useContext as r, useDebugValue as i, useEffect as a, useMemo as o, useState as s } from "react";
2
+ //#region ../../node_modules/.bun/value-enhancer@5.7.2/node_modules/value-enhancer/dist/index.mjs
3
+ var c = {}, l = (e) => e, u = Object.is, d = (e, t) => {
4
+ if (u(e, t)) return !0;
5
+ if (!Array.isArray(e) || !Array.isArray(t)) return !1;
6
+ let n = e.length;
7
+ if (t.length !== n) return !1;
8
+ for (let r = 0; r < n; r++) if (!u(e[r], t[r])) return !1;
9
+ return !0;
10
+ }, f = (e) => e.value, p = (e) => e.map(f), m = (e) => e.$version, h = (e, t) => {
11
+ try {
12
+ e(t);
13
+ } catch (e) {
14
+ console.error(e);
15
+ }
16
+ }, g = (e, t) => (e.set = t, e), _ = (e) => !!e?.$valCompute, ee = (e) => !!e?.set;
17
+ function v() {
18
+ if (typeof window > "u") return;
19
+ let e = { style: "color:#a225c2" }, t = { style: "color:#268bd2" }, n = { style: "color:#e28c5f" }, r = { style: "color:#eb2f96" }, i = {
20
+ header: (t) => _(t) ? [
21
+ "div",
22
+ e,
23
+ `${ee(t) ? "Val" : "ReadonlyVal"}`,
24
+ "<",
25
+ a(t.value),
26
+ ">"
27
+ ] : null,
28
+ hasBody: () => !1
29
+ };
30
+ function a(e) {
31
+ return typeof e == "number" ? [
32
+ "span",
33
+ t,
34
+ e
35
+ ] : typeof e == "string" ? [
36
+ "span",
37
+ n,
38
+ e
39
+ ] : typeof e == "boolean" ? [
40
+ "span",
41
+ r,
42
+ e
43
+ ] : typeof e == "object" && e ? ["object", { object: e }] : [
44
+ "span",
45
+ n,
46
+ String(e)
47
+ ];
48
+ }
49
+ (window.devtoolsFormatters ??= []).push(i);
50
+ }
51
+ function y() {
52
+ v();
53
+ }
54
+ var b = /* @__PURE__ */ Promise.resolve(), x = /* @__PURE__ */ new Set(), S = /* @__PURE__ */ new Set(), C = x, w, T = () => {
55
+ let e = C;
56
+ C = C === x ? S : x, w = !1;
57
+ for (let t of e) t.t();
58
+ e.clear();
59
+ }, E = (e) => {
60
+ C.add(e), w ||= b.then(T);
61
+ }, D = (e) => C.delete(e), O = /* @__PURE__ */ new FinalizationRegistry(h), k = class {
62
+ constructor(e, t, n) {
63
+ if (this.#n = e, this.q = (t?.equal ?? u) || void 0, this.e = t?.eager, this.m = t?.name, this.#t = t?.onDisposeValue, n) {
64
+ let e = new WeakRef(this), t = () => {
65
+ if (r) {
66
+ let e = r;
67
+ r = void 0, e();
68
+ }
69
+ }, r = n(() => {
70
+ let n = e.deref();
71
+ n ? n.n() : t();
72
+ });
73
+ r && O.register(this, this.#e = t);
74
+ }
75
+ }
76
+ g = this;
77
+ b = /* @__PURE__ */ new Map();
78
+ s = 4;
79
+ v;
80
+ c = c;
81
+ q;
82
+ e;
83
+ m;
84
+ u = () => {
85
+ if (this.s & 4) {
86
+ this.s &= -5;
87
+ let e = this.#n();
88
+ this.c === c ? this.w(e) : this.q?.(e, this.c) || (this.w(e), this.s & 1 && (this.s |= 2));
89
+ }
90
+ return this.c;
91
+ };
92
+ n = () => {
93
+ this.#i && (console.error(this.c, /* @__PURE__ */ Error(`${this.m || ""} disposed`)), process.env.NODE_ENV !== "production" && console.error(this.#i)), this.s |= 4, this.b.size && (this.s |= 1, this[3] && this.#r(3), this[2] && (this.u(), this.s & 2 && this.#r(2)), this[1] ? E(this) : this.s &= -4);
94
+ };
95
+ a(e, t) {
96
+ let n = this.b.get(e);
97
+ return n && this[n]--, this.b.set(e, t), this[t]++, () => this.r(e);
98
+ }
99
+ r(e) {
100
+ if (e) {
101
+ let t = this.b.get(e);
102
+ t && (this.b.delete(e), this[t]--);
103
+ } else this.b.clear(), this[1] = this[2] = this[3] = 0, D(this);
104
+ }
105
+ t() {
106
+ this[1] && (this.u(), this.s & 2 && this.#r(1)), this.s &= -4;
107
+ }
108
+ d() {
109
+ let e = this.c;
110
+ this.r(), O.unregister(this), this.#e?.(), this.#i = process.env.NODE_ENV === "production" || /* @__PURE__ */ Error("[val-dev] Val disposed at:"), this.#t && e !== c && this.#t(e);
111
+ }
112
+ w(e) {
113
+ this.w = this.q?.(e, e) ? this.y : this.x, this.w(e);
114
+ }
115
+ x(e) {
116
+ let t = this.c;
117
+ this.c = e, this.v = Symbol(), this.#t && t !== c && t !== e && this.#t(t);
118
+ }
119
+ y(e) {
120
+ let t = this.c;
121
+ this.c = this.v = e, this.#t && t !== c && t !== e && this.#t(t);
122
+ }
123
+ 1 = 0;
124
+ 2 = 0;
125
+ 3 = 0;
126
+ #e;
127
+ #t;
128
+ #n;
129
+ #r(e) {
130
+ for (let [t, n] of this.b) n === e && h(t, this.c);
131
+ }
132
+ #i;
133
+ }, A = class {
134
+ #e = /* @__PURE__ */ new WeakSet();
135
+ constructor(e) {
136
+ this.g = e.g, this.e = e.e, this.u = e.u, this.n = e.n, this.b = e.b;
137
+ }
138
+ get v() {
139
+ return this.g.v;
140
+ }
141
+ g;
142
+ b;
143
+ e;
144
+ u;
145
+ n;
146
+ a(e, t) {
147
+ return this.#e.add(e), this.g.a(e, t);
148
+ }
149
+ r(e) {
150
+ if (e) this.#e.has(e) && (this.#e.delete(e), this.g.r(e));
151
+ else for (let e of this.g.b.keys()) this.r(e);
152
+ }
153
+ d() {
154
+ this.r();
155
+ }
156
+ }, j = class {
157
+ #e;
158
+ constructor(e) {
159
+ this.#e = e, this.get = e.u, e.u();
160
+ }
161
+ get name() {
162
+ return this.#e.m;
163
+ }
164
+ get $version() {
165
+ return this.get(), this.#e.v;
166
+ }
167
+ get value() {
168
+ return this.get();
169
+ }
170
+ set value(e) {
171
+ this.set?.(e);
172
+ }
173
+ set;
174
+ get;
175
+ ref(e) {
176
+ let t = new j(new A(this.#e));
177
+ return e && this.set ? g(t, this.set) : t;
178
+ }
179
+ reaction(e, t = this.#e.e) {
180
+ return this.#e.a(e, t ? 2 : 1);
181
+ }
182
+ subscribe(e, t = this.#e.e) {
183
+ let n = this.reaction(e, t);
184
+ return h(e, this.get()), n;
185
+ }
186
+ $valCompute(e) {
187
+ return this.#e.a(e, 3);
188
+ }
189
+ unsubscribe(e) {
190
+ this.#e.r(e);
191
+ }
192
+ dispose() {
193
+ this.#e.d();
194
+ }
195
+ toString() {
196
+ return String(this.get());
197
+ }
198
+ toJSON(e) {
199
+ let t = this.get();
200
+ return t && t.toJSON ? t.toJSON(e) : t;
201
+ }
202
+ }, M = (e, t) => {
203
+ let n = e, r = new k(() => n, t);
204
+ return [new j(r), (e) => {
205
+ r.q?.(e, n) || (n = e, r.n());
206
+ }];
207
+ }, N = (e, t) => g(...M(e, t)), P = (e, t, n) => new j(new k(e, n, t)), F = (e, t = l, n) => {
208
+ let r, i;
209
+ return P(() => {
210
+ let n = e.map(m);
211
+ return (!i || !d(n, i)) && (i = n, r = t(p(e))), r;
212
+ }, (t) => {
213
+ let n = e.map((e) => e.$valCompute(t));
214
+ return () => n.forEach(h);
215
+ }, n);
216
+ }, I = (e, t) => {
217
+ let n = 0, r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), a = (e) => {
218
+ if (!_(e)) {
219
+ if (!_(e?.$)) return e;
220
+ e = e.$;
221
+ }
222
+ return r.has(e) ? u(e.$version, r.get(e)) || r.set(e, c) : (i.delete(e) || e.$valCompute(s.n), r.set(e, e.$version)), e.value;
223
+ }, o, s = new k(() => {
224
+ if (!n) {
225
+ if (r.size) x: {
226
+ for (let [e, t] of r) if (!u(e.$version, t)) break x;
227
+ return o;
228
+ }
229
+ let e = r;
230
+ r = i, i = e, n++;
231
+ }
232
+ if (o = e(a), !--n && i.size) {
233
+ for (let e of i.keys()) e.unsubscribe(s.n);
234
+ i.clear();
235
+ }
236
+ return o;
237
+ }, t, () => () => {
238
+ if (r.size) {
239
+ for (let e of r.keys()) e.unsubscribe(s.n);
240
+ r.clear();
241
+ }
242
+ });
243
+ return new j(s);
244
+ }, L = (e, t = l, n) => {
245
+ let r, i = c;
246
+ return P(() => {
247
+ let n = e.$version;
248
+ return u(n, i) || (i = n, r = t(e.value)), r;
249
+ }, (t) => e.$valCompute(t), n);
250
+ };
251
+ process.env.NODE_ENV !== "production" && y();
252
+ //#endregion
253
+ //#region ../../node_modules/.bun/use-value-enhancer@5.0.7+5fffd67310d91248/node_modules/use-value-enhancer/dist/use-value-enhancer.mjs
254
+ var R = (e) => _(e) ? e : _(e?.$) ? e.$ : void 0, z = () => {}, B = () => z, V = [B, B], H = e.useSyncExternalStore ? (t, n = !0) => {
255
+ let [r, a, s] = o(() => {
256
+ let e = R(t);
257
+ return e && [
258
+ (t) => e.subscribe(t, n),
259
+ () => e.$version,
260
+ e
261
+ ];
262
+ }, [t, n]) ?? V, c = e.useSyncExternalStore(r, a, a), l = o(() => s ? s.get() : t, [
263
+ c,
264
+ s,
265
+ t
266
+ ]);
267
+ return i(l), l;
268
+ } : (e, t = !0) => {
269
+ let n = o(() => R(e), [e]), [r, c] = s(() => n?.$version);
270
+ a(() => {
271
+ if (n) {
272
+ let e = () => n.$version;
273
+ return n.subscribe(() => c(e), t);
274
+ }
275
+ }, [n, t]);
276
+ let l = o(() => n ? n.get() : e, [
277
+ r,
278
+ n,
279
+ e
280
+ ]);
281
+ return i(l), l;
282
+ }, U = /* @__PURE__ */ t(null), W = ({ i18n: e, children: t }) => {
283
+ let i = H(e.t$), a = r(U)?.t;
284
+ return n(U.Provider, {
285
+ value: o(() => ({
286
+ t: a ? (e, t) => {
287
+ let n = i(e, t);
288
+ return n === e ? a(e, t) : n;
289
+ } : i,
290
+ i18n: e
291
+ }), [i, a]),
292
+ children: t
293
+ });
294
+ }, G = (e) => {
295
+ let t = r(U);
296
+ if (!t && !e) throw Error("I18nProvider not found");
297
+ return t;
298
+ }, K = (e) => G(e)?.t, q = (e) => G(e)?.i18n, J = (e) => H(q(e)?.lang$), Y = (e) => e === !0 || e === !1, X = (e) => typeof e == "string", Z = Array.isArray, Q = (e) => typeof e == "object" && !!e, $ = (e) => Q(e) && !Z(e), te = (e) => $(e) ? e : void 0;
299
+ //#endregion
300
+ export { N as _, te as a, J as c, g as d, F as f, u as g, M as h, X as i, K as l, L as m, Y as n, W as o, I as p, $ as r, q as s, Z as t, H as u };
@@ -52,7 +52,10 @@ export declare function createManagedTask(target: GraphTarget, identity: {
52
52
  export declare function createAgentTask(target: GraphTarget, identity: {
53
53
  readonly nodeId: string;
54
54
  readonly taskId: string;
55
- }, name: string): readonly ChangeOperation[];
55
+ }, name: string, defaults?: {
56
+ readonly prompt?: string;
57
+ readonly outputDescription?: string;
58
+ }): readonly ChangeOperation[];
56
59
  export declare function createLlmTask(target: GraphTarget, identity: {
57
60
  readonly nodeId: string;
58
61
  readonly taskId: string;
@@ -4508,8 +4508,7 @@ var Lc = T(D([E({
4508
4508
  kind: k("agent"),
4509
4509
  code: Js().optional(),
4510
4510
  model: A,
4511
- prompt: $c,
4512
- system: A,
4511
+ prompt: A,
4513
4512
  maxRounds: w(),
4514
4513
  tools: T(E({
4515
4514
  id: A,
@@ -15730,7 +15729,8 @@ function jg(e, t, n, r = void 0, i = {
15730
15729
  task: {
15731
15730
  capabilities: i.capabilities ?? [{
15732
15731
  kind: "connector",
15733
- mode: "shared"
15732
+ mode: "independent",
15733
+ actions: []
15734
15734
  }],
15735
15735
  inputs: i.inputs,
15736
15736
  moduleId: t.moduleId,
@@ -15759,7 +15759,7 @@ function Mg(e, t, n) {
15759
15759
  target: e
15760
15760
  }];
15761
15761
  }
15762
- function Ng(e, t, n) {
15762
+ function Ng(e, t, n, r = {}) {
15763
15763
  if (e.kind != "flow") throw Error("Agent nodes are only supported in the root Flow.");
15764
15764
  return Mg(e, t, {
15765
15765
  name: n,
@@ -15772,16 +15772,13 @@ function Ng(e, t, n) {
15772
15772
  outputs: [{
15773
15773
  handle: "output",
15774
15774
  jsonSchema: { type: "string" },
15775
- nullable: !1
15775
+ nullable: !1,
15776
+ description: r.outputDescription ?? "The final result produced by the Agent."
15776
15777
  }],
15777
15778
  executor: {
15778
15779
  kind: "agent",
15779
15780
  model: "deepseek-v4-flash",
15780
- system: "",
15781
- prompt: {
15782
- kind: "value",
15783
- value: ""
15784
- },
15781
+ prompt: r.prompt ?? "Summarize the following content, highlighting key points and next steps.\n\n{{input}}",
15785
15782
  maxRounds: 10,
15786
15783
  tools: []
15787
15784
  }
@@ -1,11 +1,10 @@
1
+ import type { JsonValue, Port, PortDefinition } from '../index.js';
1
2
  export { fixedInputValue, inputValue, inputValues } from './flow-input-value.js';
2
3
  import type { WebhookMethod } from './webhook-method.js';
3
4
  import { currentFlowModelVersion } from './flow-change-schema.js';
4
5
  export { changeOperationsSchema, currentFlowModelVersion, decodeChangeOperations } from './flow-change-schema.js';
5
6
  export type { WebhookMethod };
6
- export type JsonValue = null | boolean | number | string | readonly JsonValue[] | {
7
- readonly [key: string]: JsonValue;
8
- };
7
+ export type { JsonValue, Port, PortDefinition } from '../index.js';
9
8
  export type SchemaKeyword = 'const' | 'enum' | 'exclusiveMaximum' | 'exclusiveMinimum' | 'maximum' | 'maxItems' | 'maxLength' | 'maxProperties' | 'minimum' | 'minItems' | 'minLength' | 'minProperties' | 'multipleOf' | 'pattern' | 'required' | 'type';
10
9
  export type SchemaMismatch = {
11
10
  readonly kind: 'artifact' | 'binary' | 'nullable';
@@ -24,17 +23,9 @@ export declare const resourceNameMaxLength = 80;
24
23
  export type ResourceNameIssue = 'controlCharacter' | 'empty' | 'specialCharacter' | 'tooLong';
25
24
  export declare function resourceNameIssue(value: string): ResourceNameIssue | undefined;
26
25
  export declare function validVariableName(value: string): boolean;
27
- export interface PortDefinition {
28
- readonly description?: string;
29
- readonly jsonSchema: JsonValue;
30
- readonly nullable: boolean;
31
- }
32
26
  export interface InputPortDefinition extends PortDefinition {
33
27
  readonly value?: JsonValue;
34
28
  }
35
- export interface Port extends PortDefinition {
36
- readonly handle: string;
37
- }
38
29
  export interface InputPort extends InputPortDefinition {
39
30
  readonly handle: string;
40
31
  }
@@ -139,10 +130,7 @@ export type ManagedTaskExecutor = {
139
130
  readonly kind: 'agent';
140
131
  readonly code?: boolean;
141
132
  readonly model: string;
142
- readonly prompt: Exclude<AgentInput, {
143
- readonly kind: 'model';
144
- }>;
145
- readonly system: string;
133
+ readonly prompt: string;
146
134
  readonly maxRounds: number;
147
135
  readonly tools: readonly AgentTool[];
148
136
  readonly notification?: {
@@ -4563,8 +4563,7 @@ var jc = B(U([V({
4563
4563
  kind: K("agent"),
4564
4564
  code: Us().optional(),
4565
4565
  model: q,
4566
- prompt: qc,
4567
- system: q,
4566
+ prompt: q,
4568
4567
  maxRounds: z(),
4569
4568
  tools: B(V({
4570
4569
  id: q,