@oomol-lab/open-flow 0.1.0-beta.77 → 0.1.0-beta.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/browser/{ContentIcon-VZQO8VZU.js → ContentIcon-CMn0c-kl.js} +93 -3
- package/dist/browser/{FlowCanvas-BNGDMaWr.js → FlowCanvas-BQGBcfoL.js} +1675 -591
- package/dist/browser/{createResourceDialog-BmtakfVg.js → createResourceDialog-DCGxfKFM.js} +3 -3
- package/dist/browser/{dialog-BcFBfRB1.js → dialog-WzR4CRFH.js} +11 -81
- package/dist/browser/{exportSvg-CG8hEUNk.js → exportSvg-CYwyYiuH.js} +2 -2
- package/dist/browser/{flowChanges-BGo_4Ypo.js → flowChanges-Bz4dbDN_.js} +1204 -387
- package/dist/browser/{flowWorkspace-BFHGev7s.js → flowWorkspace-BI6L6a4r.js} +557 -597
- package/dist/browser/licenses.md +1 -1
- package/dist/browser/preview.css +512 -462
- package/dist/browser/preview.js +8457 -6732
- package/dist/browser/{tooltip-BAWSUexx.js → tooltip-BDcVTNpu.js} +65 -2
- package/dist/browser/ui.css +5 -24
- package/dist/browser/workbench.css +512 -462
- package/dist/browser/workbench.d.ts +2 -3
- package/dist/browser/workbench.js +65 -690
- package/dist/browser/{workbenchSelect-CjK-xdm3.js → workbenchSelect-DtAd0zc4.js} +2 -2
- package/dist/command/index.js +25 -25
- package/dist/common/authoring.d.ts +3 -3
- package/dist/common/authoringExamples.d.ts +3 -3
- package/dist/common/authoringSchema.d.ts +14 -22
- package/dist/common/control-api-conformance.js +11 -18
- package/dist/common/control-api.d.ts +5 -1
- package/dist/common/control-api.js +11 -18
- package/dist/common/control-requests.d.ts +4 -3
- package/dist/common/control-requests.js +26 -37
- package/dist/common/flow-authoring.js +6 -14
- package/dist/common/flow-change.d.ts +1 -1
- package/dist/common/flow-change.js +6 -14
- package/dist/common/flow-encoding.js +5 -13
- package/dist/common/flow-semantics.js +15 -21
- package/dist/common/flow-state.d.ts +16 -39
- package/dist/common/flow-state.js +47 -105
- package/dist/common/mcp.d.ts +3 -3
- package/dist/common/mcp.js +11 -18
- package/dist/common/run-events.js +19 -9
- package/dist/common/runtime-contract.js +6 -12
- package/dist/common/runtime-nodejs-compat.js +11 -12
- package/dist/common/scheduler.d.ts +2 -1
- package/dist/common/scheduler.js +56 -50
- package/dist/common/state-conformance.d.ts +3 -3
- package/package.json +1 -1
- package/src/control/common/api.ts +20 -3
- package/src/control/common/authoring.ts +6 -5
- package/src/control/common/authoringExamples.ts +6 -5
- package/src/control/common/authoringSchema.ts +7 -7
- package/src/control/common/requests.ts +7 -1
- package/src/execution/common/events.ts +22 -10
- package/src/execution/common/node-execution.ts +1 -1
- package/src/execution/common/scheduler.ts +28 -14
- package/src/flow/common/change.ts +1 -1
- package/src/flow/common/changeSchema.ts +4 -4
- package/src/flow/common/errorHandling.ts +1 -1
- package/src/flow/common/semantics.ts +12 -6
- package/src/runtime/common/nodejsGuest.generated.json +11 -12
- package/src/runtime/common/runtime.ts +6 -7
- package/src/state/common/conformance.ts +16 -21
- package/src/state/common/state.ts +44 -72
|
@@ -10,7 +10,7 @@ export declare class AuthoringError extends Error {
|
|
|
10
10
|
}
|
|
11
11
|
export declare function authoringNode(content: RevisionContent, ref: string): {
|
|
12
12
|
ref: string;
|
|
13
|
-
type: "agent" | "approval" | "code" | "condition" | "connector" | "cron" | "decision" | "
|
|
13
|
+
type: "agent" | "approval" | "code" | "condition" | "connector" | "cron" | "decision" | "error" | "http-request" | "integration" | "llm" | "openapi" | "outputs" | "poll" | "skip-duplicates" | "start" | "value" | "wait" | "webhook" | "webhook-response" | "workflow";
|
|
14
14
|
name: string;
|
|
15
15
|
readOnly: boolean;
|
|
16
16
|
description?: string | undefined;
|
|
@@ -98,7 +98,7 @@ export declare function readAuthoring(content: RevisionContent, query?: Authorin
|
|
|
98
98
|
text?: undefined;
|
|
99
99
|
nodes: {
|
|
100
100
|
ref: string;
|
|
101
|
-
type: "agent" | "approval" | "code" | "condition" | "connector" | "cron" | "decision" | "
|
|
101
|
+
type: "agent" | "approval" | "code" | "condition" | "connector" | "cron" | "decision" | "error" | "http-request" | "integration" | "llm" | "openapi" | "outputs" | "poll" | "skip-duplicates" | "start" | "value" | "wait" | "webhook" | "webhook-response" | "workflow";
|
|
102
102
|
name: string;
|
|
103
103
|
readOnly: boolean;
|
|
104
104
|
description?: string | undefined;
|
|
@@ -174,7 +174,7 @@ export declare function readAuthoring(content: RevisionContent, query?: Authorin
|
|
|
174
174
|
text?: undefined;
|
|
175
175
|
nodes: {
|
|
176
176
|
ref: string;
|
|
177
|
-
type: "agent" | "approval" | "code" | "condition" | "connector" | "cron" | "decision" | "
|
|
177
|
+
type: "agent" | "approval" | "code" | "condition" | "connector" | "cron" | "decision" | "error" | "http-request" | "integration" | "llm" | "openapi" | "outputs" | "poll" | "skip-duplicates" | "start" | "value" | "wait" | "webhook" | "webhook-response" | "workflow";
|
|
178
178
|
name: string;
|
|
179
179
|
readOnly: boolean;
|
|
180
180
|
inputHandles: string[];
|
|
@@ -8,7 +8,7 @@ declare const descriptions: {
|
|
|
8
8
|
readonly poll: 'Gmail polling by key; replace CONNECTION_ID with an active Gmail connection.';
|
|
9
9
|
readonly integration: 'Telegram webhook integration by key; replace CONNECTION_ID with an active Telegram connection.';
|
|
10
10
|
readonly decision: 'AI Decision evaluates named questions against target and returns a complete answer object per output. Configure target before running.';
|
|
11
|
-
readonly
|
|
11
|
+
readonly 'skip-duplicates': 'Skip items already recorded by successful Runs. Configure identity fields; an empty list uses each string or numeric item. History is private to the node and only commits after Run success.';
|
|
12
12
|
readonly 'http-request': 'A single HTTP request. Bind url and request inputs; outputs are body, statusCode and headers.';
|
|
13
13
|
readonly openapi: 'A fixed JSON API operation. Replace the example document and URL before running.';
|
|
14
14
|
readonly connector: 'A Connector Task and its node. Replace ACTION_ID, CONNECTION_ID and port definitions using connector_get / connector show. Set connectionId to an empty string to defer account configuration; execution will require an account.';
|
|
@@ -24,8 +24,8 @@ declare const descriptions: {
|
|
|
24
24
|
};
|
|
25
25
|
export declare const authoringExampleNames: (keyof typeof descriptions)[];
|
|
26
26
|
export declare const authoringExamples: {
|
|
27
|
-
name: "agent" | "approval" | "code" | "condition" | "connector" | "cron" | "decision" | "
|
|
28
|
-
description: "A Connector Task and its node. Replace ACTION_ID, CONNECTION_ID and port definitions using connector_get / connector show. Set connectionId to an empty string to defer account configuration; execution will require an account." | "A Flow Error node. Select upstream Flows, then publish and enable this Flow to listen for failures in their automatic runs." | "A JavaScript module and its node. Use Code for custom computation; use Connector Tasks for existing actions." | "A Start node with a required message parameter. Supply it through trigger.outputs." | "A Wait with a continue action and a built-in notification output." | "A Webhook start node." | "A condition with true and false execution branches." | "A fixed JSON API operation. Replace the example document and URL before running." | "A fixed value node." | "A single HTTP request. Bind url and request inputs; outputs are body, statusCode and headers." | "AI Decision evaluates named questions against target and returns a complete answer object per output. Configure target before running." | "An Agent with code computation enabled. Configure a model available in the deployment." | "An Approval with approve and reject decision branches and a built-in notification output." | "An HTTP response node with body, statusCode and headers inputs. Select it from a reachable Webhook." | "An LLM JSON Task and its node; configure a model available in the deployment." | "An LLM chat Task and its node; configure a model available in the deployment." | "An hourly scheduled start node." | "
|
|
27
|
+
name: "agent" | "approval" | "code" | "condition" | "connector" | "cron" | "decision" | "error" | "http-request" | "integration" | "llm-chat" | "llm-json" | "openapi" | "poll" | "poll-notification" | "skip-duplicates" | "start" | "value" | "wait" | "webhook" | "webhook-response";
|
|
28
|
+
description: "A Connector Task and its node. Replace ACTION_ID, CONNECTION_ID and port definitions using connector_get / connector show. Set connectionId to an empty string to defer account configuration; execution will require an account." | "A Flow Error node. Select upstream Flows, then publish and enable this Flow to listen for failures in their automatic runs." | "A JavaScript module and its node. Use Code for custom computation; use Connector Tasks for existing actions." | "A Start node with a required message parameter. Supply it through trigger.outputs." | "A Wait with a continue action and a built-in notification output." | "A Webhook start node." | "A condition with true and false execution branches." | "A fixed JSON API operation. Replace the example document and URL before running." | "A fixed value node." | "A single HTTP request. Bind url and request inputs; outputs are body, statusCode and headers." | "AI Decision evaluates named questions against target and returns a complete answer object per output. Configure target before running." | "An Agent with code computation enabled. Configure a model available in the deployment." | "An Approval with approve and reject decision branches and a built-in notification output." | "An HTTP response node with body, statusCode and headers inputs. Select it from a reachable Webhook." | "An LLM JSON Task and its node; configure a model available in the deployment." | "An LLM chat Task and its node; configure a model available in the deployment." | "An hourly scheduled start node." | "Gmail events → JavaScript text formatting → Connector notification. Replace connection/action IDs and match the notification input ports." | "Gmail polling by key; replace CONNECTION_ID with an active Gmail connection." | "Skip items already recorded by successful Runs. Configure identity fields; an empty list uses each string or numeric item. History is private to the node and only commits after Run success." | "Telegram webhook integration by key; replace CONNECTION_ID with an active Telegram connection.";
|
|
29
29
|
}[];
|
|
30
30
|
export declare function authoringExample(name: string): {
|
|
31
31
|
version: 1;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { JsonValue } from '../index.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
export declare const authoringTypes: readonly ['start', 'outputs', 'webhook-response', 'workflow', 'webhook', 'cron', 'error', 'poll', 'integration', 'code', 'connector', 'agent', 'llm', 'decision', 'openapi', 'http-request', '
|
|
3
|
+
export declare const authoringTypes: readonly ['start', 'outputs', 'webhook-response', 'workflow', 'webhook', 'cron', 'error', 'poll', 'integration', 'code', 'connector', 'agent', 'llm', 'decision', 'openapi', 'http-request', 'skip-duplicates', 'condition', 'value', 'wait', 'approval'];
|
|
4
4
|
declare const type: z.ZodEnum<{
|
|
5
5
|
agent: "agent";
|
|
6
6
|
approval: "approval";
|
|
@@ -9,7 +9,6 @@ declare const type: z.ZodEnum<{
|
|
|
9
9
|
connector: "connector";
|
|
10
10
|
cron: "cron";
|
|
11
11
|
decision: "decision";
|
|
12
|
-
dedupe: "dedupe";
|
|
13
12
|
error: "error";
|
|
14
13
|
"http-request": "http-request";
|
|
15
14
|
integration: "integration";
|
|
@@ -17,6 +16,7 @@ declare const type: z.ZodEnum<{
|
|
|
17
16
|
openapi: "openapi";
|
|
18
17
|
outputs: "outputs";
|
|
19
18
|
poll: "poll";
|
|
19
|
+
"skip-duplicates": "skip-duplicates";
|
|
20
20
|
start: "start";
|
|
21
21
|
value: "value";
|
|
22
22
|
wait: "wait";
|
|
@@ -304,16 +304,8 @@ export declare const authoringConfigurations: {
|
|
|
304
304
|
success: "success";
|
|
305
305
|
}>>;
|
|
306
306
|
}, z.core.$strict>;
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
mode: z.ZodDefault<z.ZodEnum<{
|
|
310
|
-
increasing: "increasing";
|
|
311
|
-
new: "new";
|
|
312
|
-
}>>;
|
|
313
|
-
space: z.ZodDefault<z.ZodEnum<{
|
|
314
|
-
flow: "flow";
|
|
315
|
-
node: "node";
|
|
316
|
-
}>>;
|
|
307
|
+
'skip-duplicates': z.ZodObject<{
|
|
308
|
+
fields: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
317
309
|
}, z.core.$strict>;
|
|
318
310
|
agent: z.ZodObject<{
|
|
319
311
|
code: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -709,7 +701,6 @@ export declare const authoringEditSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
709
701
|
connector: "connector";
|
|
710
702
|
cron: "cron";
|
|
711
703
|
decision: "decision";
|
|
712
|
-
dedupe: "dedupe";
|
|
713
704
|
error: "error";
|
|
714
705
|
"http-request": "http-request";
|
|
715
706
|
integration: "integration";
|
|
@@ -717,6 +708,7 @@ export declare const authoringEditSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
717
708
|
openapi: "openapi";
|
|
718
709
|
outputs: "outputs";
|
|
719
710
|
poll: "poll";
|
|
711
|
+
"skip-duplicates": "skip-duplicates";
|
|
720
712
|
start: "start";
|
|
721
713
|
value: "value";
|
|
722
714
|
wait: "wait";
|
|
@@ -881,7 +873,6 @@ export declare const authoringRequestSchema: z.ZodObject<{
|
|
|
881
873
|
connector: "connector";
|
|
882
874
|
cron: "cron";
|
|
883
875
|
decision: "decision";
|
|
884
|
-
dedupe: "dedupe";
|
|
885
876
|
error: "error";
|
|
886
877
|
"http-request": "http-request";
|
|
887
878
|
integration: "integration";
|
|
@@ -889,6 +880,7 @@ export declare const authoringRequestSchema: z.ZodObject<{
|
|
|
889
880
|
openapi: "openapi";
|
|
890
881
|
outputs: "outputs";
|
|
891
882
|
poll: "poll";
|
|
883
|
+
"skip-duplicates": "skip-duplicates";
|
|
892
884
|
start: "start";
|
|
893
885
|
value: "value";
|
|
894
886
|
wait: "wait";
|
|
@@ -1067,7 +1059,6 @@ export declare const authoringSearchSchema: z.ZodObject<{
|
|
|
1067
1059
|
connector: "connector";
|
|
1068
1060
|
cron: "cron";
|
|
1069
1061
|
decision: "decision";
|
|
1070
|
-
dedupe: "dedupe";
|
|
1071
1062
|
error: "error";
|
|
1072
1063
|
"http-request": "http-request";
|
|
1073
1064
|
integration: "integration";
|
|
@@ -1075,6 +1066,7 @@ export declare const authoringSearchSchema: z.ZodObject<{
|
|
|
1075
1066
|
openapi: "openapi";
|
|
1076
1067
|
outputs: "outputs";
|
|
1077
1068
|
poll: "poll";
|
|
1069
|
+
"skip-duplicates": "skip-duplicates";
|
|
1078
1070
|
start: "start";
|
|
1079
1071
|
value: "value";
|
|
1080
1072
|
wait: "wait";
|
|
@@ -1099,7 +1091,6 @@ export declare const authoringSchemaQuery: z.ZodObject<{
|
|
|
1099
1091
|
connector: "connector";
|
|
1100
1092
|
cron: "cron";
|
|
1101
1093
|
decision: "decision";
|
|
1102
|
-
dedupe: "dedupe";
|
|
1103
1094
|
error: "error";
|
|
1104
1095
|
"http-request": "http-request";
|
|
1105
1096
|
integration: "integration";
|
|
@@ -1107,6 +1098,7 @@ export declare const authoringSchemaQuery: z.ZodObject<{
|
|
|
1107
1098
|
openapi: "openapi";
|
|
1108
1099
|
outputs: "outputs";
|
|
1109
1100
|
poll: "poll";
|
|
1101
|
+
"skip-duplicates": "skip-duplicates";
|
|
1110
1102
|
start: "start";
|
|
1111
1103
|
value: "value";
|
|
1112
1104
|
wait: "wait";
|
|
@@ -1132,7 +1124,6 @@ export declare function authoringRequestContract(name: string): {
|
|
|
1132
1124
|
connector: "connector";
|
|
1133
1125
|
cron: "cron";
|
|
1134
1126
|
decision: "decision";
|
|
1135
|
-
dedupe: "dedupe";
|
|
1136
1127
|
error: "error";
|
|
1137
1128
|
"http-request": "http-request";
|
|
1138
1129
|
integration: "integration";
|
|
@@ -1140,6 +1131,7 @@ export declare function authoringRequestContract(name: string): {
|
|
|
1140
1131
|
openapi: "openapi";
|
|
1141
1132
|
outputs: "outputs";
|
|
1142
1133
|
poll: "poll";
|
|
1134
|
+
"skip-duplicates": "skip-duplicates";
|
|
1143
1135
|
start: "start";
|
|
1144
1136
|
value: "value";
|
|
1145
1137
|
wait: "wait";
|
|
@@ -1315,7 +1307,6 @@ export declare function authoringRequestContract(name: string): {
|
|
|
1315
1307
|
connector: "connector";
|
|
1316
1308
|
cron: "cron";
|
|
1317
1309
|
decision: "decision";
|
|
1318
|
-
dedupe: "dedupe";
|
|
1319
1310
|
error: "error";
|
|
1320
1311
|
"http-request": "http-request";
|
|
1321
1312
|
integration: "integration";
|
|
@@ -1323,6 +1314,7 @@ export declare function authoringRequestContract(name: string): {
|
|
|
1323
1314
|
openapi: "openapi";
|
|
1324
1315
|
outputs: "outputs";
|
|
1325
1316
|
poll: "poll";
|
|
1317
|
+
"skip-duplicates": "skip-duplicates";
|
|
1326
1318
|
start: "start";
|
|
1327
1319
|
value: "value";
|
|
1328
1320
|
wait: "wait";
|
|
@@ -1416,7 +1408,7 @@ export declare function authoringRequestContract(name: string): {
|
|
|
1416
1408
|
} | undefined;
|
|
1417
1409
|
export declare function authoringSchema(kind?: AuthoringType): {
|
|
1418
1410
|
type?: undefined;
|
|
1419
|
-
types: readonly ["start", "outputs", "webhook-response", "workflow", "webhook", "cron", "error", "poll", "integration", "code", "connector", "agent", "llm", "decision", "openapi", "http-request", "
|
|
1411
|
+
types: readonly ["start", "outputs", "webhook-response", "workflow", "webhook", "cron", "error", "poll", "integration", "code", "connector", "agent", "llm", "decision", "openapi", "http-request", "skip-duplicates", "condition", "value", "wait", "approval"];
|
|
1420
1412
|
request: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
|
|
1421
1413
|
baseRevision: z.ZodString;
|
|
1422
1414
|
requestId: z.ZodString;
|
|
@@ -1431,7 +1423,6 @@ export declare function authoringSchema(kind?: AuthoringType): {
|
|
|
1431
1423
|
connector: "connector";
|
|
1432
1424
|
cron: "cron";
|
|
1433
1425
|
decision: "decision";
|
|
1434
|
-
dedupe: "dedupe";
|
|
1435
1426
|
error: "error";
|
|
1436
1427
|
"http-request": "http-request";
|
|
1437
1428
|
integration: "integration";
|
|
@@ -1439,6 +1430,7 @@ export declare function authoringSchema(kind?: AuthoringType): {
|
|
|
1439
1430
|
openapi: "openapi";
|
|
1440
1431
|
outputs: "outputs";
|
|
1441
1432
|
poll: "poll";
|
|
1433
|
+
"skip-duplicates": "skip-duplicates";
|
|
1442
1434
|
start: "start";
|
|
1443
1435
|
value: "value";
|
|
1444
1436
|
wait: "wait";
|
|
@@ -1601,7 +1593,7 @@ export declare function authoringSchema(kind?: AuthoringType): {
|
|
|
1601
1593
|
} | {
|
|
1602
1594
|
types?: undefined;
|
|
1603
1595
|
request?: undefined;
|
|
1604
|
-
type: "agent" | "approval" | "code" | "condition" | "connector" | "cron" | "decision" | "
|
|
1596
|
+
type: "agent" | "approval" | "code" | "condition" | "connector" | "cron" | "decision" | "error" | "http-request" | "integration" | "llm" | "openapi" | "outputs" | "poll" | "skip-duplicates" | "start" | "value" | "wait" | "webhook" | "webhook-response" | "workflow";
|
|
1605
1597
|
onError: boolean | {
|
|
1606
1598
|
enum: string[];
|
|
1607
1599
|
};
|
|
@@ -1615,7 +1607,7 @@ export declare function authoringSchema(kind?: AuthoringType): {
|
|
|
1615
1607
|
example: {
|
|
1616
1608
|
op: string;
|
|
1617
1609
|
as: string;
|
|
1618
|
-
type: "agent" | "approval" | "code" | "condition" | "connector" | "cron" | "decision" | "
|
|
1610
|
+
type: "agent" | "approval" | "code" | "condition" | "connector" | "cron" | "decision" | "error" | "http-request" | "integration" | "llm" | "openapi" | "outputs" | "poll" | "skip-duplicates" | "start" | "value" | "wait" | "webhook" | "webhook-response" | "workflow";
|
|
1619
1611
|
name: string;
|
|
1620
1612
|
};
|
|
1621
1613
|
configuration: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{}, z.core.$strict>>;
|
|
@@ -8640,12 +8640,8 @@ strictObject({
|
|
|
8640
8640
|
scope: _enum(["draft", "live"]),
|
|
8641
8641
|
space: string$1().regex(/^(flow|node:.+)$/)
|
|
8642
8642
|
});
|
|
8643
|
-
var
|
|
8644
|
-
|
|
8645
|
-
mode: _enum(["new", "increasing"]).default("new"),
|
|
8646
|
-
space: _enum(["node", "flow"]).default("node")
|
|
8647
|
-
});
|
|
8648
|
-
var dedupeExecutorSchema = dedupeConfigSchema.extend({ kind: literal("dedupe") });
|
|
8643
|
+
var skipDuplicatesConfigSchema = strictObject({ fields: array(string$1().refine((field) => field.length > 0 && field.split(".").every((part) => part.length > 0), "Use a nonempty dot-separated field path.")).refine((fields) => new Set(fields).size === fields.length, "Identity fields must be distinct.").default([]) });
|
|
8644
|
+
var skipDuplicatesExecutorSchema = skipDuplicatesConfigSchema.extend({ kind: literal("skip-duplicates") });
|
|
8649
8645
|
var flowStateViewSchema = object({
|
|
8650
8646
|
version: literal(1),
|
|
8651
8647
|
scope: _enum(["draft", "live"]),
|
|
@@ -8664,13 +8660,9 @@ var flowStateViewSchema = object({
|
|
|
8664
8660
|
})),
|
|
8665
8661
|
spaces: array(object({
|
|
8666
8662
|
space: string$1(),
|
|
8667
|
-
mode: _enum(["new", "increasing"]),
|
|
8668
8663
|
count: number().nonnegative(),
|
|
8669
|
-
|
|
8670
|
-
|
|
8671
|
-
number(),
|
|
8672
|
-
_null()
|
|
8673
|
-
]),
|
|
8664
|
+
pendingCount: number().nonnegative(),
|
|
8665
|
+
reservedCount: number().nonnegative(),
|
|
8674
8666
|
updatedAt: number()
|
|
8675
8667
|
}))
|
|
8676
8668
|
});
|
|
@@ -8963,7 +8955,7 @@ var managedFields = object({
|
|
|
8963
8955
|
revisionId: text
|
|
8964
8956
|
}),
|
|
8965
8957
|
httpRequestExecutorSchema,
|
|
8966
|
-
|
|
8958
|
+
skipDuplicatesExecutorSchema
|
|
8967
8959
|
])
|
|
8968
8960
|
});
|
|
8969
8961
|
var managed = managedFields.transform(limitDecisionTask);
|
|
@@ -9435,7 +9427,7 @@ array(union([...new Map(Object.entries(shapes).map(([kind, shape]) => [kind, sha
|
|
|
9435
9427
|
...shape
|
|
9436
9428
|
})])).values()])).min(1);
|
|
9437
9429
|
function checkModelVersion(content) {
|
|
9438
|
-
if (content.modelVersion < 13 && Object.values(content.document.graph.nodes).some((candidateNode) => candidateNode.kind === "task" && "executor" in candidateNode.task && candidateNode.task.executor.kind === "
|
|
9430
|
+
if (content.modelVersion < 13 && Object.values(content.document.graph.nodes).some((candidateNode) => candidateNode.kind === "task" && "executor" in candidateNode.task && candidateNode.task.executor.kind === "skip-duplicates")) throw new Error("Skip Duplicates requires Flow model v13.");
|
|
9439
9431
|
if (content.modelVersion < 12 && Object.values(content.document.graph.nodes).some((candidateNode) => candidateNode.kind == "task" && "moduleId" in candidateNode.task && candidateNode.task.capabilities?.some((item) => item.kind == "http"))) throw new TypeError("Code HTTP access requires Flow model version 12.");
|
|
9440
9432
|
if (content.modelVersion < 11 && Object.values(content.document.graph.nodes).some((candidateNode) => candidateNode.kind == "task" && "executor" in candidateNode.task && candidateNode.task.executor.kind == "http-request")) throw new TypeError("HTTP Request requires Flow model version 11.");
|
|
9441
9433
|
if (content.modelVersion < 11 && Object.values(content.document.graph.nodes).some((candidateNode) => candidateNode.kind == "task" && ("moduleId" in candidateNode.task ? candidateNode.task.capabilities?.some((item) => item.kind == "workflow") : candidateNode.task.executor.kind == "agent" && candidateNode.task.executor.tools.some((item) => item.kind == "workflow")))) throw new TypeError("Workflow tools require Flow model version 11.");
|
|
@@ -9649,7 +9641,7 @@ var type = _enum([
|
|
|
9649
9641
|
"decision",
|
|
9650
9642
|
"openapi",
|
|
9651
9643
|
"http-request",
|
|
9652
|
-
"
|
|
9644
|
+
"skip-duplicates",
|
|
9653
9645
|
"condition",
|
|
9654
9646
|
"value",
|
|
9655
9647
|
"wait",
|
|
@@ -9780,7 +9772,7 @@ var authoringConfigurations = {
|
|
|
9780
9772
|
"connector": authoringDefinitionSchemas.connector.omit({ outputMode: true }).strict(),
|
|
9781
9773
|
"openapi": authoringOpenApiSchema,
|
|
9782
9774
|
"http-request": httpRequestConfigSchema,
|
|
9783
|
-
"
|
|
9775
|
+
"skip-duplicates": skipDuplicatesConfigSchema,
|
|
9784
9776
|
"agent": authoringDefinitionSchemas.agent.omit({
|
|
9785
9777
|
prompt: true,
|
|
9786
9778
|
tools: true
|
|
@@ -11866,7 +11858,7 @@ function decodeRunEvent(value) {
|
|
|
11866
11858
|
switch (kind) {
|
|
11867
11859
|
case "node.started": {
|
|
11868
11860
|
const nodeKind = payload.nodeKind;
|
|
11869
|
-
if (nodeKind !== void 0 && nodeKind !== "approval" && nodeKind !== "condition" && nodeKind !== "connector" && nodeKind !== "javascript" && nodeKind !== "decision" && nodeKind !== "openapi" && nodeKind !== "http-request" && nodeKind !== "
|
|
11861
|
+
if (nodeKind !== void 0 && nodeKind !== "approval" && nodeKind !== "condition" && nodeKind !== "connector" && nodeKind !== "javascript" && nodeKind !== "decision" && nodeKind !== "openapi" && nodeKind !== "http-request" && nodeKind !== "skip-duplicates" && nodeKind !== "llm" && nodeKind !== "agent" && nodeKind !== "value" && nodeKind !== "outputs" && nodeKind !== "webhook-response" && nodeKind !== "workflow" && nodeKind !== "wait") return invalidResponse();
|
|
11870
11862
|
return {
|
|
11871
11863
|
...base,
|
|
11872
11864
|
kind,
|
|
@@ -12091,12 +12083,13 @@ var ControlClient = class {
|
|
|
12091
12083
|
})
|
|
12092
12084
|
}));
|
|
12093
12085
|
}
|
|
12094
|
-
async createFlow(name, idempotencyKey = `flow-${randomId()}`, teamId, tagIds) {
|
|
12086
|
+
async createFlow(name, idempotencyKey = `flow-${randomId()}`, teamId, tagIds, initialPresentation) {
|
|
12095
12087
|
return flow(await this.request("/v1/flows", {
|
|
12096
12088
|
body: JSON.stringify({
|
|
12097
12089
|
name,
|
|
12098
12090
|
...teamId == null ? {} : { teamId },
|
|
12099
12091
|
...tagIds == null ? {} : { tagIds },
|
|
12092
|
+
...initialPresentation == null ? {} : { presentation: initialPresentation },
|
|
12100
12093
|
version: 1
|
|
12101
12094
|
}),
|
|
12102
12095
|
headers: { "idempotency-key": idempotencyKey },
|
|
@@ -101,6 +101,10 @@ export interface PublicationPresentation {
|
|
|
101
101
|
readonly version: 1;
|
|
102
102
|
readonly presentation: Presentation | null;
|
|
103
103
|
}
|
|
104
|
+
export interface FlowCreationOptions {
|
|
105
|
+
readonly tagIds?: readonly string[];
|
|
106
|
+
readonly presentation?: Readonly<Record<string, JsonValue>>;
|
|
107
|
+
}
|
|
104
108
|
export interface Presentation {
|
|
105
109
|
readonly revision: number;
|
|
106
110
|
readonly updatedAt: string;
|
|
@@ -830,7 +834,7 @@ export declare class ControlClient {
|
|
|
830
834
|
readonly idempotencyKey?: string;
|
|
831
835
|
readonly tagIds?: readonly string[];
|
|
832
836
|
}): Promise<Flow>;
|
|
833
|
-
createFlow(name: string, idempotencyKey?: string, teamId?: string, tagIds?: readonly string[]): Promise<Flow>;
|
|
837
|
+
createFlow(name: string, idempotencyKey?: string, teamId?: string, tagIds?: readonly string[], initialPresentation?: Readonly<Record<string, JsonValue>>): Promise<Flow>;
|
|
834
838
|
broadcastCanvas(flowId: string, command: CanvasCommand): Promise<CanvasBroadcast>;
|
|
835
839
|
getFlow(flowId: string): Promise<Flow>;
|
|
836
840
|
getErrorListeners(flowId: string, signal?: AbortSignal): Promise<readonly ErrorListener[]>;
|
|
@@ -5785,12 +5785,8 @@ strictObject({
|
|
|
5785
5785
|
scope: _enum(["draft", "live"]),
|
|
5786
5786
|
space: string$1().regex(/^(flow|node:.+)$/)
|
|
5787
5787
|
});
|
|
5788
|
-
var
|
|
5789
|
-
|
|
5790
|
-
mode: _enum(["new", "increasing"]).default("new"),
|
|
5791
|
-
space: _enum(["node", "flow"]).default("node")
|
|
5792
|
-
});
|
|
5793
|
-
var dedupeExecutorSchema = dedupeConfigSchema.extend({ kind: literal("dedupe") });
|
|
5788
|
+
var skipDuplicatesConfigSchema = strictObject({ fields: array(string$1().refine((field) => field.length > 0 && field.split(".").every((part) => part.length > 0), "Use a nonempty dot-separated field path.")).refine((fields) => new Set(fields).size === fields.length, "Identity fields must be distinct.").default([]) });
|
|
5789
|
+
var skipDuplicatesExecutorSchema = skipDuplicatesConfigSchema.extend({ kind: literal("skip-duplicates") });
|
|
5794
5790
|
var flowStateViewSchema = object({
|
|
5795
5791
|
version: literal(1),
|
|
5796
5792
|
scope: _enum(["draft", "live"]),
|
|
@@ -5809,13 +5805,9 @@ var flowStateViewSchema = object({
|
|
|
5809
5805
|
})),
|
|
5810
5806
|
spaces: array(object({
|
|
5811
5807
|
space: string$1(),
|
|
5812
|
-
mode: _enum(["new", "increasing"]),
|
|
5813
5808
|
count: number().nonnegative(),
|
|
5814
|
-
|
|
5815
|
-
|
|
5816
|
-
number(),
|
|
5817
|
-
_null()
|
|
5818
|
-
]),
|
|
5809
|
+
pendingCount: number().nonnegative(),
|
|
5810
|
+
reservedCount: number().nonnegative(),
|
|
5819
5811
|
updatedAt: number()
|
|
5820
5812
|
}))
|
|
5821
5813
|
});
|
|
@@ -9098,7 +9090,7 @@ var managedFields = object({
|
|
|
9098
9090
|
revisionId: text
|
|
9099
9091
|
}),
|
|
9100
9092
|
httpRequestExecutorSchema,
|
|
9101
|
-
|
|
9093
|
+
skipDuplicatesExecutorSchema
|
|
9102
9094
|
])
|
|
9103
9095
|
});
|
|
9104
9096
|
var managed = managedFields.transform(limitDecisionTask);
|
|
@@ -9570,7 +9562,7 @@ array(union([...new Map(Object.entries(shapes).map(([kind, shape]) => [kind, sha
|
|
|
9570
9562
|
...shape
|
|
9571
9563
|
})])).values()])).min(1);
|
|
9572
9564
|
function checkModelVersion(content) {
|
|
9573
|
-
if (content.modelVersion < 13 && Object.values(content.document.graph.nodes).some((candidateNode) => candidateNode.kind === "task" && "executor" in candidateNode.task && candidateNode.task.executor.kind === "
|
|
9565
|
+
if (content.modelVersion < 13 && Object.values(content.document.graph.nodes).some((candidateNode) => candidateNode.kind === "task" && "executor" in candidateNode.task && candidateNode.task.executor.kind === "skip-duplicates")) throw new Error("Skip Duplicates requires Flow model v13.");
|
|
9574
9566
|
if (content.modelVersion < 12 && Object.values(content.document.graph.nodes).some((candidateNode) => candidateNode.kind == "task" && "moduleId" in candidateNode.task && candidateNode.task.capabilities?.some((item) => item.kind == "http"))) throw new TypeError("Code HTTP access requires Flow model version 12.");
|
|
9575
9567
|
if (content.modelVersion < 11 && Object.values(content.document.graph.nodes).some((candidateNode) => candidateNode.kind == "task" && "executor" in candidateNode.task && candidateNode.task.executor.kind == "http-request")) throw new TypeError("HTTP Request requires Flow model version 11.");
|
|
9576
9568
|
if (content.modelVersion < 11 && Object.values(content.document.graph.nodes).some((candidateNode) => candidateNode.kind == "task" && ("moduleId" in candidateNode.task ? candidateNode.task.capabilities?.some((item) => item.kind == "workflow") : candidateNode.task.executor.kind == "agent" && candidateNode.task.executor.tools.some((item) => item.kind == "workflow")))) throw new TypeError("Workflow tools require Flow model version 11.");
|
|
@@ -9639,7 +9631,7 @@ var type = _enum([
|
|
|
9639
9631
|
"decision",
|
|
9640
9632
|
"openapi",
|
|
9641
9633
|
"http-request",
|
|
9642
|
-
"
|
|
9634
|
+
"skip-duplicates",
|
|
9643
9635
|
"condition",
|
|
9644
9636
|
"value",
|
|
9645
9637
|
"wait",
|
|
@@ -9770,7 +9762,7 @@ var authoringConfigurations = {
|
|
|
9770
9762
|
"connector": authoringDefinitionSchemas.connector.omit({ outputMode: true }).strict(),
|
|
9771
9763
|
"openapi": authoringOpenApiSchema,
|
|
9772
9764
|
"http-request": httpRequestConfigSchema,
|
|
9773
|
-
"
|
|
9765
|
+
"skip-duplicates": skipDuplicatesConfigSchema,
|
|
9774
9766
|
"agent": authoringDefinitionSchemas.agent.omit({
|
|
9775
9767
|
prompt: true,
|
|
9776
9768
|
tools: true
|
|
@@ -12557,7 +12549,7 @@ function decodeRunEvent(value) {
|
|
|
12557
12549
|
switch (kind) {
|
|
12558
12550
|
case "node.started": {
|
|
12559
12551
|
const nodeKind = payload.nodeKind;
|
|
12560
|
-
if (nodeKind !== void 0 && nodeKind !== "approval" && nodeKind !== "condition" && nodeKind !== "connector" && nodeKind !== "javascript" && nodeKind !== "decision" && nodeKind !== "openapi" && nodeKind !== "http-request" && nodeKind !== "
|
|
12552
|
+
if (nodeKind !== void 0 && nodeKind !== "approval" && nodeKind !== "condition" && nodeKind !== "connector" && nodeKind !== "javascript" && nodeKind !== "decision" && nodeKind !== "openapi" && nodeKind !== "http-request" && nodeKind !== "skip-duplicates" && nodeKind !== "llm" && nodeKind !== "agent" && nodeKind !== "value" && nodeKind !== "outputs" && nodeKind !== "webhook-response" && nodeKind !== "workflow" && nodeKind !== "wait") return invalidResponse();
|
|
12561
12553
|
return {
|
|
12562
12554
|
...base,
|
|
12563
12555
|
kind,
|
|
@@ -12782,12 +12774,13 @@ var ControlClient = class {
|
|
|
12782
12774
|
})
|
|
12783
12775
|
}));
|
|
12784
12776
|
}
|
|
12785
|
-
async createFlow(name, idempotencyKey = `flow-${randomId()}`, teamId, tagIds) {
|
|
12777
|
+
async createFlow(name, idempotencyKey = `flow-${randomId()}`, teamId, tagIds, initialPresentation) {
|
|
12786
12778
|
return flow(await this.request("/v1/flows", {
|
|
12787
12779
|
body: JSON.stringify({
|
|
12788
12780
|
name,
|
|
12789
12781
|
...teamId == null ? {} : { teamId },
|
|
12790
12782
|
...tagIds == null ? {} : { tagIds },
|
|
12783
|
+
...initialPresentation == null ? {} : { presentation: initialPresentation },
|
|
12791
12784
|
version: 1
|
|
12792
12785
|
}),
|
|
12793
12786
|
headers: { "idempotency-key": idempotencyKey },
|
|
@@ -35,7 +35,7 @@ export declare const controlRequests: {
|
|
|
35
35
|
edits: ({
|
|
36
36
|
op: "node.add";
|
|
37
37
|
as: string;
|
|
38
|
-
type: "agent" | "approval" | "code" | "condition" | "connector" | "cron" | "decision" | "
|
|
38
|
+
type: "agent" | "approval" | "code" | "condition" | "connector" | "cron" | "decision" | "error" | "http-request" | "integration" | "llm" | "openapi" | "outputs" | "poll" | "skip-duplicates" | "start" | "value" | "wait" | "webhook" | "webhook-response" | "workflow";
|
|
39
39
|
name: string;
|
|
40
40
|
onError?: "error" | "stop" | undefined;
|
|
41
41
|
retry?: {
|
|
@@ -178,12 +178,12 @@ export declare const controlRequests: {
|
|
|
178
178
|
authoringSearch: (value: unknown) => {
|
|
179
179
|
revision?: string | undefined;
|
|
180
180
|
query: string;
|
|
181
|
-
type?: "agent" | "approval" | "code" | "condition" | "connector" | "cron" | "decision" | "
|
|
181
|
+
type?: "agent" | "approval" | "code" | "condition" | "connector" | "cron" | "decision" | "error" | "http-request" | "integration" | "llm" | "openapi" | "outputs" | "poll" | "skip-duplicates" | "start" | "value" | "wait" | "webhook" | "webhook-response" | "workflow" | undefined;
|
|
182
182
|
offset: number;
|
|
183
183
|
limit: number;
|
|
184
184
|
};
|
|
185
185
|
authoringSchema: (value: unknown) => {
|
|
186
|
-
type?: "agent" | "approval" | "code" | "condition" | "connector" | "cron" | "decision" | "
|
|
186
|
+
type?: "agent" | "approval" | "code" | "condition" | "connector" | "cron" | "decision" | "error" | "http-request" | "integration" | "llm" | "openapi" | "outputs" | "poll" | "skip-duplicates" | "start" | "value" | "wait" | "webhook" | "webhook-response" | "workflow" | undefined;
|
|
187
187
|
action?: string | undefined;
|
|
188
188
|
};
|
|
189
189
|
loadOpenApiDocument: (value: unknown) => {
|
|
@@ -207,6 +207,7 @@ export declare const controlRequests: {
|
|
|
207
207
|
name: string;
|
|
208
208
|
teamId?: string | undefined;
|
|
209
209
|
tagIds?: string[] | undefined;
|
|
210
|
+
presentation?: Record<string, JsonValue> | undefined;
|
|
210
211
|
version: 1;
|
|
211
212
|
};
|
|
212
213
|
saveTag: (value: unknown) => {
|