@oomol-lab/open-flow 0.1.0-beta.76 → 0.1.0-beta.77
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 +1 -0
- package/dist/browser/{ContentIcon-Cm1hbVzW.js → ContentIcon-VZQO8VZU.js} +8 -5
- package/dist/browser/{FlowCanvas-NzKtla_c.js → FlowCanvas-BNGDMaWr.js} +15 -3
- package/dist/browser/{createResourceDialog-BgdedQqu.js → createResourceDialog-BmtakfVg.js} +63 -57
- package/dist/browser/{dialog-aSElFFw2.js → dialog-BcFBfRB1.js} +84 -15
- package/dist/browser/{exportSvg-Dcz4HTo_.js → exportSvg-CG8hEUNk.js} +2 -2
- package/dist/browser/{flowChanges-NZyS7HSp.js → flowChanges-BGo_4Ypo.js} +5849 -10882
- package/dist/browser/{flowWorkspace-Bl0SDehy.js → flowWorkspace-BFHGev7s.js} +1025 -2607
- package/dist/browser/preview.css +112 -5
- package/dist/browser/preview.js +1630 -9295
- package/dist/browser/theme.css +4 -2
- package/dist/browser/{tooltip-3XMK9jkr.js → tooltip-BAWSUexx.js} +1 -1
- package/dist/browser/{typeScriptSession-C9sBGOKZ.js → typeScriptSession-CRoezJPN.js} +1 -1
- package/dist/browser/ui.css +111 -4
- package/dist/browser/ui.js +3 -2
- package/dist/browser/workbench.css +9906 -9778
- package/dist/browser/workbench.d.ts +6 -2
- package/dist/browser/workbench.js +838 -499
- package/dist/browser/{workbenchSelect-DBGP7Y4Z.js → workbenchSelect-CjK-xdm3.js} +2 -2
- package/dist/command/index.js +48 -48
- package/dist/common/authoring.d.ts +4 -4
- package/dist/common/authoringExamples.d.ts +3 -2
- package/dist/common/authoringSchema.d.ts +23 -4
- package/dist/common/control-api-conformance.js +162 -15
- package/dist/common/control-api-errors.d.ts +12 -0
- package/dist/common/control-api.d.ts +35 -2
- package/dist/common/control-api.js +187 -37
- package/dist/common/control-requests.d.ts +22 -3
- package/dist/common/control-requests.js +152 -14
- package/dist/common/engine-contract.d.ts +3 -2
- package/dist/common/flow-authoring.js +55 -7
- package/dist/common/flow-change-schema.d.ts +1 -1
- package/dist/common/flow-change.d.ts +2 -2
- package/dist/common/flow-change.js +56 -8
- package/dist/common/flow-encoding.js +55 -7
- package/dist/common/flow-semantics.js +91 -7
- package/dist/common/flow-state.d.ts +123 -0
- package/dist/common/flow-state.js +5852 -0
- package/dist/common/mcp.d.ts +96 -3
- package/dist/common/mcp.js +165 -13
- package/dist/common/run-events.js +1 -0
- package/dist/common/runtime-contract.d.ts +14 -0
- package/dist/common/runtime-contract.js +118 -5
- package/dist/common/scheduler-node-execution.d.ts +1 -0
- package/dist/common/scheduler.d.ts +1 -1
- package/dist/common/scheduler.js +52 -3
- package/dist/common/state-conformance.d.ts +16 -0
- package/dist/common/tags.d.ts +4 -0
- package/dist/index.d.ts +11 -0
- package/package.json +5 -1
- package/src/control/common/api.ts +84 -11
- package/src/control/common/authoring.ts +6 -1
- package/src/control/common/authoringExamples.ts +8 -0
- package/src/control/common/authoringSchema.ts +18 -12
- package/src/control/common/errors.ts +6 -0
- package/src/control/common/flowDecoders.ts +1 -0
- package/src/control/common/mcp.ts +16 -0
- package/src/control/common/requests.ts +10 -2
- package/src/control/common/tags.ts +20 -0
- package/src/execution/common/events.ts +3 -0
- package/src/execution/common/node-execution.ts +3 -0
- package/src/execution/common/scheduler.ts +2 -0
- package/src/flow/common/change.ts +2 -1
- package/src/flow/common/changeSchema.ts +11 -1
- package/src/flow/common/errorHandling.ts +1 -1
- package/src/flow/common/semantics.ts +20 -0
- package/src/runtime/common/engineContract.ts +6 -3
- package/src/runtime/common/runtime.ts +116 -0
- package/src/state/common/conformance.ts +86 -0
- package/src/state/common/state.ts +169 -0
- package/src/types/index.ts +11 -0
|
@@ -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" | "error" | "http-request" | "integration" | "llm" | "openapi" | "outputs" | "poll" | "start" | "value" | "wait" | "webhook" | "webhook-response" | "workflow";
|
|
13
|
+
type: "agent" | "approval" | "code" | "condition" | "connector" | "cron" | "decision" | "dedupe" | "error" | "http-request" | "integration" | "llm" | "openapi" | "outputs" | "poll" | "start" | "value" | "wait" | "webhook" | "webhook-response" | "workflow";
|
|
14
14
|
name: string;
|
|
15
15
|
readOnly: boolean;
|
|
16
16
|
description?: string | undefined;
|
|
@@ -82,7 +82,6 @@ export declare function authoringNode(content: RevisionContent, ref: string): {
|
|
|
82
82
|
})[];
|
|
83
83
|
};
|
|
84
84
|
export declare function readAuthoring(content: RevisionContent, query?: AuthoringRead): {
|
|
85
|
-
nodes?: undefined;
|
|
86
85
|
text: {
|
|
87
86
|
node: string;
|
|
88
87
|
field: "code" | "prompt";
|
|
@@ -93,12 +92,13 @@ export declare function readAuthoring(content: RevisionContent, query?: Authorin
|
|
|
93
92
|
nextStart?: number | undefined;
|
|
94
93
|
truncated: boolean;
|
|
95
94
|
};
|
|
95
|
+
nodes?: undefined;
|
|
96
96
|
edges?: undefined;
|
|
97
97
|
} | {
|
|
98
98
|
text?: undefined;
|
|
99
99
|
nodes: {
|
|
100
100
|
ref: string;
|
|
101
|
-
type: "agent" | "approval" | "code" | "condition" | "connector" | "cron" | "decision" | "error" | "http-request" | "integration" | "llm" | "openapi" | "outputs" | "poll" | "start" | "value" | "wait" | "webhook" | "webhook-response" | "workflow";
|
|
101
|
+
type: "agent" | "approval" | "code" | "condition" | "connector" | "cron" | "decision" | "dedupe" | "error" | "http-request" | "integration" | "llm" | "openapi" | "outputs" | "poll" | "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" | "error" | "http-request" | "integration" | "llm" | "openapi" | "outputs" | "poll" | "start" | "value" | "wait" | "webhook" | "webhook-response" | "workflow";
|
|
177
|
+
type: "agent" | "approval" | "code" | "condition" | "connector" | "cron" | "decision" | "dedupe" | "error" | "http-request" | "integration" | "llm" | "openapi" | "outputs" | "poll" | "start" | "value" | "wait" | "webhook" | "webhook-response" | "workflow";
|
|
178
178
|
name: string;
|
|
179
179
|
readOnly: boolean;
|
|
180
180
|
inputHandles: string[];
|
|
@@ -8,6 +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 dedupe: 'Filter items using persistent history. Records immediately, including when downstream work fails. Empty field uses each scalar item as identity.';
|
|
11
12
|
readonly 'http-request': 'A single HTTP request. Bind url and request inputs; outputs are body, statusCode and headers.';
|
|
12
13
|
readonly openapi: 'A fixed JSON API operation. Replace the example document and URL before running.';
|
|
13
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.';
|
|
@@ -23,8 +24,8 @@ declare const descriptions: {
|
|
|
23
24
|
};
|
|
24
25
|
export declare const authoringExampleNames: (keyof typeof descriptions)[];
|
|
25
26
|
export declare const authoringExamples: {
|
|
26
|
-
name: "agent" | "approval" | "code" | "condition" | "connector" | "cron" | "decision" | "error" | "http-request" | "integration" | "llm-chat" | "llm-json" | "openapi" | "poll" | "poll-notification" | "start" | "value" | "wait" | "webhook" | "webhook-response";
|
|
27
|
-
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." | "Telegram webhook integration by key; replace CONNECTION_ID with an active Telegram connection.";
|
|
27
|
+
name: "agent" | "approval" | "code" | "condition" | "connector" | "cron" | "decision" | "dedupe" | "error" | "http-request" | "integration" | "llm-chat" | "llm-json" | "openapi" | "poll" | "poll-notification" | "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." | "Filter items using persistent history. Records immediately, including when downstream work fails. Empty field uses each scalar item as identity." | "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." | "Telegram webhook integration by key; replace CONNECTION_ID with an active Telegram connection.";
|
|
28
29
|
}[];
|
|
29
30
|
export declare function authoringExample(name: string): {
|
|
30
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', 'condition', 'value', 'wait', 'approval'];
|
|
3
|
+
export declare const authoringTypes: readonly ['start', 'outputs', 'webhook-response', 'workflow', 'webhook', 'cron', 'error', 'poll', 'integration', 'code', 'connector', 'agent', 'llm', 'decision', 'openapi', 'http-request', 'dedupe', 'condition', 'value', 'wait', 'approval'];
|
|
4
4
|
declare const type: z.ZodEnum<{
|
|
5
5
|
agent: "agent";
|
|
6
6
|
approval: "approval";
|
|
@@ -9,6 +9,7 @@ declare const type: z.ZodEnum<{
|
|
|
9
9
|
connector: "connector";
|
|
10
10
|
cron: "cron";
|
|
11
11
|
decision: "decision";
|
|
12
|
+
dedupe: "dedupe";
|
|
12
13
|
error: "error";
|
|
13
14
|
"http-request": "http-request";
|
|
14
15
|
integration: "integration";
|
|
@@ -303,6 +304,17 @@ export declare const authoringConfigurations: {
|
|
|
303
304
|
success: "success";
|
|
304
305
|
}>>;
|
|
305
306
|
}, z.core.$strict>;
|
|
307
|
+
dedupe: z.ZodObject<{
|
|
308
|
+
field: z.ZodDefault<z.ZodString>;
|
|
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
|
+
}>>;
|
|
317
|
+
}, z.core.$strict>;
|
|
306
318
|
agent: z.ZodObject<{
|
|
307
319
|
code: z.ZodOptional<z.ZodBoolean>;
|
|
308
320
|
model: z.ZodString;
|
|
@@ -697,6 +709,7 @@ export declare const authoringEditSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
697
709
|
connector: "connector";
|
|
698
710
|
cron: "cron";
|
|
699
711
|
decision: "decision";
|
|
712
|
+
dedupe: "dedupe";
|
|
700
713
|
error: "error";
|
|
701
714
|
"http-request": "http-request";
|
|
702
715
|
integration: "integration";
|
|
@@ -868,6 +881,7 @@ export declare const authoringRequestSchema: z.ZodObject<{
|
|
|
868
881
|
connector: "connector";
|
|
869
882
|
cron: "cron";
|
|
870
883
|
decision: "decision";
|
|
884
|
+
dedupe: "dedupe";
|
|
871
885
|
error: "error";
|
|
872
886
|
"http-request": "http-request";
|
|
873
887
|
integration: "integration";
|
|
@@ -1053,6 +1067,7 @@ export declare const authoringSearchSchema: z.ZodObject<{
|
|
|
1053
1067
|
connector: "connector";
|
|
1054
1068
|
cron: "cron";
|
|
1055
1069
|
decision: "decision";
|
|
1070
|
+
dedupe: "dedupe";
|
|
1056
1071
|
error: "error";
|
|
1057
1072
|
"http-request": "http-request";
|
|
1058
1073
|
integration: "integration";
|
|
@@ -1084,6 +1099,7 @@ export declare const authoringSchemaQuery: z.ZodObject<{
|
|
|
1084
1099
|
connector: "connector";
|
|
1085
1100
|
cron: "cron";
|
|
1086
1101
|
decision: "decision";
|
|
1102
|
+
dedupe: "dedupe";
|
|
1087
1103
|
error: "error";
|
|
1088
1104
|
"http-request": "http-request";
|
|
1089
1105
|
integration: "integration";
|
|
@@ -1116,6 +1132,7 @@ export declare function authoringRequestContract(name: string): {
|
|
|
1116
1132
|
connector: "connector";
|
|
1117
1133
|
cron: "cron";
|
|
1118
1134
|
decision: "decision";
|
|
1135
|
+
dedupe: "dedupe";
|
|
1119
1136
|
error: "error";
|
|
1120
1137
|
"http-request": "http-request";
|
|
1121
1138
|
integration: "integration";
|
|
@@ -1298,6 +1315,7 @@ export declare function authoringRequestContract(name: string): {
|
|
|
1298
1315
|
connector: "connector";
|
|
1299
1316
|
cron: "cron";
|
|
1300
1317
|
decision: "decision";
|
|
1318
|
+
dedupe: "dedupe";
|
|
1301
1319
|
error: "error";
|
|
1302
1320
|
"http-request": "http-request";
|
|
1303
1321
|
integration: "integration";
|
|
@@ -1398,7 +1416,7 @@ export declare function authoringRequestContract(name: string): {
|
|
|
1398
1416
|
} | undefined;
|
|
1399
1417
|
export declare function authoringSchema(kind?: AuthoringType): {
|
|
1400
1418
|
type?: undefined;
|
|
1401
|
-
types: readonly ["start", "outputs", "webhook-response", "workflow", "webhook", "cron", "error", "poll", "integration", "code", "connector", "agent", "llm", "decision", "openapi", "http-request", "condition", "value", "wait", "approval"];
|
|
1419
|
+
types: readonly ["start", "outputs", "webhook-response", "workflow", "webhook", "cron", "error", "poll", "integration", "code", "connector", "agent", "llm", "decision", "openapi", "http-request", "dedupe", "condition", "value", "wait", "approval"];
|
|
1402
1420
|
request: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
|
|
1403
1421
|
baseRevision: z.ZodString;
|
|
1404
1422
|
requestId: z.ZodString;
|
|
@@ -1413,6 +1431,7 @@ export declare function authoringSchema(kind?: AuthoringType): {
|
|
|
1413
1431
|
connector: "connector";
|
|
1414
1432
|
cron: "cron";
|
|
1415
1433
|
decision: "decision";
|
|
1434
|
+
dedupe: "dedupe";
|
|
1416
1435
|
error: "error";
|
|
1417
1436
|
"http-request": "http-request";
|
|
1418
1437
|
integration: "integration";
|
|
@@ -1582,7 +1601,7 @@ export declare function authoringSchema(kind?: AuthoringType): {
|
|
|
1582
1601
|
} | {
|
|
1583
1602
|
types?: undefined;
|
|
1584
1603
|
request?: undefined;
|
|
1585
|
-
type: "agent" | "approval" | "code" | "condition" | "connector" | "cron" | "decision" | "error" | "http-request" | "integration" | "llm" | "openapi" | "outputs" | "poll" | "start" | "value" | "wait" | "webhook" | "webhook-response" | "workflow";
|
|
1604
|
+
type: "agent" | "approval" | "code" | "condition" | "connector" | "cron" | "decision" | "dedupe" | "error" | "http-request" | "integration" | "llm" | "openapi" | "outputs" | "poll" | "start" | "value" | "wait" | "webhook" | "webhook-response" | "workflow";
|
|
1586
1605
|
onError: boolean | {
|
|
1587
1606
|
enum: string[];
|
|
1588
1607
|
};
|
|
@@ -1596,7 +1615,7 @@ export declare function authoringSchema(kind?: AuthoringType): {
|
|
|
1596
1615
|
example: {
|
|
1597
1616
|
op: string;
|
|
1598
1617
|
as: string;
|
|
1599
|
-
type: "agent" | "approval" | "code" | "condition" | "connector" | "cron" | "decision" | "error" | "http-request" | "integration" | "llm" | "openapi" | "outputs" | "poll" | "start" | "value" | "wait" | "webhook" | "webhook-response" | "workflow";
|
|
1618
|
+
type: "agent" | "approval" | "code" | "condition" | "connector" | "cron" | "decision" | "dedupe" | "error" | "http-request" | "integration" | "llm" | "openapi" | "outputs" | "poll" | "start" | "value" | "wait" | "webhook" | "webhook-response" | "workflow";
|
|
1600
1619
|
name: string;
|
|
1601
1620
|
};
|
|
1602
1621
|
configuration: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{}, z.core.$strict>>;
|
|
@@ -8628,6 +8628,52 @@ var httpRequestConfigSchema = strictObject({
|
|
|
8628
8628
|
statusPolicy: _enum(["success", "all"]).default("success")
|
|
8629
8629
|
});
|
|
8630
8630
|
var httpRequestExecutorSchema = httpRequestConfigSchema.extend({ kind: literal("http-request") });
|
|
8631
|
+
strictObject({
|
|
8632
|
+
scope: _enum(["draft", "live"]),
|
|
8633
|
+
values: boolean().optional()
|
|
8634
|
+
});
|
|
8635
|
+
strictObject({
|
|
8636
|
+
scope: _enum(["draft", "live"]),
|
|
8637
|
+
key: string$1().min(1).refine((key) => new TextEncoder().encode(key).length <= 256).optional()
|
|
8638
|
+
});
|
|
8639
|
+
strictObject({
|
|
8640
|
+
scope: _enum(["draft", "live"]),
|
|
8641
|
+
space: string$1().regex(/^(flow|node:.+)$/)
|
|
8642
|
+
});
|
|
8643
|
+
var dedupeConfigSchema = strictObject({
|
|
8644
|
+
field: string$1().default(""),
|
|
8645
|
+
mode: _enum(["new", "increasing"]).default("new"),
|
|
8646
|
+
space: _enum(["node", "flow"]).default("node")
|
|
8647
|
+
});
|
|
8648
|
+
var dedupeExecutorSchema = dedupeConfigSchema.extend({ kind: literal("dedupe") });
|
|
8649
|
+
var flowStateViewSchema = object({
|
|
8650
|
+
version: literal(1),
|
|
8651
|
+
scope: _enum(["draft", "live"]),
|
|
8652
|
+
limits: object({
|
|
8653
|
+
maxValueBytes: number().positive(),
|
|
8654
|
+
maxValues: number().int().positive(),
|
|
8655
|
+
maxSpaces: number().int().positive(),
|
|
8656
|
+
maxIdentities: number().positive(),
|
|
8657
|
+
maxRunWrites: number().positive()
|
|
8658
|
+
}),
|
|
8659
|
+
values: array(object({
|
|
8660
|
+
key: string$1(),
|
|
8661
|
+
size: number().nonnegative(),
|
|
8662
|
+
updatedAt: number(),
|
|
8663
|
+
value: json$4().optional()
|
|
8664
|
+
})),
|
|
8665
|
+
spaces: array(object({
|
|
8666
|
+
space: string$1(),
|
|
8667
|
+
mode: _enum(["new", "increasing"]),
|
|
8668
|
+
count: number().nonnegative(),
|
|
8669
|
+
watermark: union([
|
|
8670
|
+
string$1(),
|
|
8671
|
+
number(),
|
|
8672
|
+
_null()
|
|
8673
|
+
]),
|
|
8674
|
+
updatedAt: number()
|
|
8675
|
+
}))
|
|
8676
|
+
});
|
|
8631
8677
|
function checkJsonDepth(value, depth = 0) {
|
|
8632
8678
|
if (depth > 64) throw new TypeError("Value exceeds the maximum JSON depth.");
|
|
8633
8679
|
if (value != null && typeof value == "object") for (const child of Object.values(value)) checkJsonDepth(child, depth + 1);
|
|
@@ -8916,7 +8962,8 @@ var managedFields = object({
|
|
|
8916
8962
|
flowId: text,
|
|
8917
8963
|
revisionId: text
|
|
8918
8964
|
}),
|
|
8919
|
-
httpRequestExecutorSchema
|
|
8965
|
+
httpRequestExecutorSchema,
|
|
8966
|
+
dedupeExecutorSchema
|
|
8920
8967
|
])
|
|
8921
8968
|
});
|
|
8922
8969
|
var managed = managedFields.transform(limitDecisionTask);
|
|
@@ -9186,7 +9233,8 @@ var revision = object({
|
|
|
9186
9233
|
literal(9),
|
|
9187
9234
|
literal(10),
|
|
9188
9235
|
literal(11),
|
|
9189
|
-
literal(12)
|
|
9236
|
+
literal(12),
|
|
9237
|
+
literal(13)
|
|
9190
9238
|
]),
|
|
9191
9239
|
document,
|
|
9192
9240
|
modules: record$3(text, module)
|
|
@@ -9387,6 +9435,7 @@ array(union([...new Map(Object.entries(shapes).map(([kind, shape]) => [kind, sha
|
|
|
9387
9435
|
...shape
|
|
9388
9436
|
})])).values()])).min(1);
|
|
9389
9437
|
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 === "dedupe")) throw new Error("Deduplication requires Flow model v13.");
|
|
9390
9439
|
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.");
|
|
9391
9440
|
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.");
|
|
9392
9441
|
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.");
|
|
@@ -9416,10 +9465,10 @@ function upgradeRevisionContent(content) {
|
|
|
9416
9465
|
function upgradeDecodedRevisionContent(content) {
|
|
9417
9466
|
const graph = content.document.graph;
|
|
9418
9467
|
const hasManual = Object.values(graph.nodes).some((node) => node.kind == "manual");
|
|
9419
|
-
if (!hasManual && content.modelVersion ==
|
|
9468
|
+
if (!hasManual && content.modelVersion == 13) return content;
|
|
9420
9469
|
return {
|
|
9421
9470
|
...content,
|
|
9422
|
-
modelVersion:
|
|
9471
|
+
modelVersion: 13,
|
|
9423
9472
|
document: {
|
|
9424
9473
|
...content.document,
|
|
9425
9474
|
graph: hasManual ? {
|
|
@@ -9438,8 +9487,8 @@ function upgradeManualTrigger(node) {
|
|
|
9438
9487
|
}
|
|
9439
9488
|
//#endregion
|
|
9440
9489
|
//#region src/runtime/common/engineContract.ts
|
|
9441
|
-
/**
|
|
9442
|
-
var currentEngineContract = "open-flow-engine/
|
|
9490
|
+
/** v10 adds persistent Flow State to the published v9 Node compatibility and fetch contract. */
|
|
9491
|
+
var currentEngineContract = "open-flow-engine/v10";
|
|
9443
9492
|
/** The published v8 Node compatibility contract, retained for existing Publications and Runs. */
|
|
9444
9493
|
var nodejsEngineContract = "open-flow-engine/v8/nodejs-compat-v1";
|
|
9445
9494
|
var platformSource = (contract) => `export const engineContract = ${JSON.stringify(contract)}
|
|
@@ -9484,13 +9533,19 @@ var nodejsContract = {
|
|
|
9484
9533
|
].flatMap((name) => [name, `node:${name}`])),
|
|
9485
9534
|
platformSource: platformSource(nodejsEngineContract)
|
|
9486
9535
|
};
|
|
9487
|
-
var
|
|
9536
|
+
var v9Contract = {
|
|
9488
9537
|
...nodejsContract,
|
|
9489
9538
|
codeFetch: true,
|
|
9539
|
+
platformSource: platformSource("open-flow-engine/v9")
|
|
9540
|
+
};
|
|
9541
|
+
var currentContract = {
|
|
9542
|
+
...v9Contract,
|
|
9543
|
+
flowState: true,
|
|
9490
9544
|
platformSource: platformSource(currentEngineContract)
|
|
9491
9545
|
};
|
|
9492
9546
|
function findEngineContract(contract) {
|
|
9493
|
-
if (contract == "open-flow-engine/
|
|
9547
|
+
if (contract == "open-flow-engine/v10") return currentContract;
|
|
9548
|
+
if (contract == "open-flow-engine/v9") return v9Contract;
|
|
9494
9549
|
if (contract == "open-flow-engine/v8") return v8Contract;
|
|
9495
9550
|
if (contract == "open-flow-engine/v8/nodejs-compat-v1") return nodejsContract;
|
|
9496
9551
|
if (contract == "open-flow-engine/v7" || contract == "open-flow-engine/v7/nodejs-compat-v1") return {
|
|
@@ -9594,6 +9649,7 @@ var type = _enum([
|
|
|
9594
9649
|
"decision",
|
|
9595
9650
|
"openapi",
|
|
9596
9651
|
"http-request",
|
|
9652
|
+
"dedupe",
|
|
9597
9653
|
"condition",
|
|
9598
9654
|
"value",
|
|
9599
9655
|
"wait",
|
|
@@ -9724,6 +9780,7 @@ var authoringConfigurations = {
|
|
|
9724
9780
|
"connector": authoringDefinitionSchemas.connector.omit({ outputMode: true }).strict(),
|
|
9725
9781
|
"openapi": authoringOpenApiSchema,
|
|
9726
9782
|
"http-request": httpRequestConfigSchema,
|
|
9783
|
+
"dedupe": dedupeConfigSchema,
|
|
9727
9784
|
"agent": authoringDefinitionSchemas.agent.omit({
|
|
9728
9785
|
prompt: true,
|
|
9729
9786
|
tools: true
|
|
@@ -9954,11 +10011,14 @@ var controlErrorCode = {
|
|
|
9954
10011
|
triggerKeyInvalid: "trigger-key.invalid",
|
|
9955
10012
|
triggerKeyNotFound: "trigger-key.not-found",
|
|
9956
10013
|
triggerNotFound: "trigger.not-found",
|
|
10014
|
+
tagInvalid: "tag.invalid",
|
|
10015
|
+
tagConflict: "tag.conflict",
|
|
10016
|
+
tagNotFound: "tag.not-found",
|
|
9957
10017
|
variableInvalid: "variable.invalid",
|
|
9958
10018
|
variableLimitReached: "variable.limit-reached",
|
|
9959
10019
|
variableNotFound: "variable.not-found"
|
|
9960
10020
|
};
|
|
9961
|
-
controlErrorCode.eventSourceInvalid, controlErrorCode.eventSourceIdentityUnavailable, controlErrorCode.eventSourceNotFound, controlErrorCode.eventSourceConflict, controlErrorCode.authenticationRequired, controlErrorCode.authorizationDenied, controlErrorCode.bindingUnresolved, controlErrorCode.connectorActionNotFound, controlErrorCode.connectorAccessConflict, controlErrorCode.connectorAccessInvalid, controlErrorCode.connectorAccessRequired, controlErrorCode.connectorAccessUnsupported, controlErrorCode.connectorUnconfigured, controlErrorCode.connectorUnavailable, controlErrorCode.connectorConsoleUnconfigured, controlErrorCode.engineUnavailable, controlErrorCode.engineUnsupported, controlErrorCode.flowInvalid, controlErrorCode.flowRepairRequired, controlErrorCode.flowUpgradeRequired, controlErrorCode.flowNotFound, controlErrorCode.flowBusy, controlErrorCode.flowConflict, controlErrorCode.flowPresentationConflict, controlErrorCode.flowRevisionConflict, controlErrorCode.liveConflict, controlErrorCode.liveNotFound, controlErrorCode.pageInvalidCursor, controlErrorCode.publicationConflict, controlErrorCode.publicationNotFound, controlErrorCode.publicationUnsupported, controlErrorCode.publishOperationNotFound, controlErrorCode.routeNotFound, controlErrorCode.runConflict, controlErrorCode.runEventsExpired, controlErrorCode.runInvalid, controlErrorCode.runNotFound, controlErrorCode.runNotTerminal, controlErrorCode.runOverloaded, controlErrorCode.runWaitNotFound, controlErrorCode.triggerKeyInvalid, controlErrorCode.triggerKeyNotFound, controlErrorCode.triggerNotFound, controlErrorCode.variableInvalid, controlErrorCode.variableLimitReached, controlErrorCode.variableNotFound;
|
|
10021
|
+
controlErrorCode.eventSourceInvalid, controlErrorCode.eventSourceIdentityUnavailable, controlErrorCode.eventSourceNotFound, controlErrorCode.eventSourceConflict, controlErrorCode.authenticationRequired, controlErrorCode.authorizationDenied, controlErrorCode.bindingUnresolved, controlErrorCode.connectorActionNotFound, controlErrorCode.connectorAccessConflict, controlErrorCode.connectorAccessInvalid, controlErrorCode.connectorAccessRequired, controlErrorCode.connectorAccessUnsupported, controlErrorCode.connectorUnconfigured, controlErrorCode.connectorUnavailable, controlErrorCode.connectorConsoleUnconfigured, controlErrorCode.engineUnavailable, controlErrorCode.engineUnsupported, controlErrorCode.flowInvalid, controlErrorCode.flowRepairRequired, controlErrorCode.flowUpgradeRequired, controlErrorCode.flowNotFound, controlErrorCode.flowBusy, controlErrorCode.flowConflict, controlErrorCode.flowPresentationConflict, controlErrorCode.flowRevisionConflict, controlErrorCode.liveConflict, controlErrorCode.liveNotFound, controlErrorCode.pageInvalidCursor, controlErrorCode.publicationConflict, controlErrorCode.publicationNotFound, controlErrorCode.publicationUnsupported, controlErrorCode.publishOperationNotFound, controlErrorCode.routeNotFound, controlErrorCode.runConflict, controlErrorCode.runEventsExpired, controlErrorCode.runInvalid, controlErrorCode.runNotFound, controlErrorCode.runNotTerminal, controlErrorCode.runOverloaded, controlErrorCode.runWaitNotFound, controlErrorCode.triggerKeyInvalid, controlErrorCode.triggerKeyNotFound, controlErrorCode.triggerNotFound, controlErrorCode.tagInvalid, controlErrorCode.tagConflict, controlErrorCode.tagNotFound, controlErrorCode.variableInvalid, controlErrorCode.variableLimitReached, controlErrorCode.variableNotFound;
|
|
9962
10022
|
var ApiError = class extends Error {
|
|
9963
10023
|
constructor(status, code, message, details) {
|
|
9964
10024
|
super(message);
|
|
@@ -11230,6 +11290,7 @@ function flow(value) {
|
|
|
11230
11290
|
publicationId: string(target.publicationId),
|
|
11231
11291
|
revisionId: string(target.revisionId)
|
|
11232
11292
|
} },
|
|
11293
|
+
tagIds: source.tagIds === void 0 ? [] : strings(source.tagIds),
|
|
11233
11294
|
createdAt: string(source.createdAt),
|
|
11234
11295
|
...source.connectorTeamId == null ? {} : { connectorTeamId: string(source.connectorTeamId) },
|
|
11235
11296
|
draftRevisionId: string(source.draftRevisionId),
|
|
@@ -11675,6 +11736,33 @@ function randomId() {
|
|
|
11675
11736
|
return `${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`;
|
|
11676
11737
|
}
|
|
11677
11738
|
//#endregion
|
|
11739
|
+
//#region src/control/common/tags.ts
|
|
11740
|
+
function normalizeFlowQuery(query = {}) {
|
|
11741
|
+
return {
|
|
11742
|
+
query: query.query?.trim().toLowerCase() ?? "",
|
|
11743
|
+
tagIds: [...new Set(query.tagIds ?? [])].toSorted(),
|
|
11744
|
+
untagged: query.untagged ?? false
|
|
11745
|
+
};
|
|
11746
|
+
}
|
|
11747
|
+
function decodeTag(value) {
|
|
11748
|
+
const source = record$1(value);
|
|
11749
|
+
if (source.version != 1) return invalidResponse();
|
|
11750
|
+
return {
|
|
11751
|
+
tagId: string(source.tagId),
|
|
11752
|
+
name: string(source.name),
|
|
11753
|
+
version: 1
|
|
11754
|
+
};
|
|
11755
|
+
}
|
|
11756
|
+
function decodeTagListItem(value) {
|
|
11757
|
+
const source = record$1(value);
|
|
11758
|
+
const referenceCount = integer(source.referenceCount);
|
|
11759
|
+
if (referenceCount < 0) return invalidResponse();
|
|
11760
|
+
return {
|
|
11761
|
+
...decodeTag(source),
|
|
11762
|
+
referenceCount
|
|
11763
|
+
};
|
|
11764
|
+
}
|
|
11765
|
+
//#endregion
|
|
11678
11766
|
//#region src/control/common/api.ts
|
|
11679
11767
|
function decodeRunEvent(value) {
|
|
11680
11768
|
const source = record$1(value);
|
|
@@ -11778,7 +11866,7 @@ function decodeRunEvent(value) {
|
|
|
11778
11866
|
switch (kind) {
|
|
11779
11867
|
case "node.started": {
|
|
11780
11868
|
const nodeKind = payload.nodeKind;
|
|
11781
|
-
if (nodeKind !== void 0 && nodeKind !== "approval" && nodeKind !== "condition" && nodeKind !== "connector" && nodeKind !== "javascript" && nodeKind !== "decision" && nodeKind !== "openapi" && nodeKind !== "http-request" && nodeKind !== "llm" && nodeKind !== "agent" && nodeKind !== "value" && nodeKind !== "outputs" && nodeKind !== "webhook-response" && nodeKind !== "workflow" && nodeKind !== "wait") return invalidResponse();
|
|
11869
|
+
if (nodeKind !== void 0 && nodeKind !== "approval" && nodeKind !== "condition" && nodeKind !== "connector" && nodeKind !== "javascript" && nodeKind !== "decision" && nodeKind !== "openapi" && nodeKind !== "http-request" && nodeKind !== "dedupe" && nodeKind !== "llm" && nodeKind !== "agent" && nodeKind !== "value" && nodeKind !== "outputs" && nodeKind !== "webhook-response" && nodeKind !== "workflow" && nodeKind !== "wait") return invalidResponse();
|
|
11782
11870
|
return {
|
|
11783
11871
|
...base,
|
|
11784
11872
|
kind,
|
|
@@ -11905,6 +11993,10 @@ var ControlClient = class {
|
|
|
11905
11993
|
}
|
|
11906
11994
|
async listFlows(options = {}) {
|
|
11907
11995
|
const parameters = new URLSearchParams();
|
|
11996
|
+
const filter = normalizeFlowQuery(options);
|
|
11997
|
+
if (filter.query) parameters.set("query", filter.query);
|
|
11998
|
+
if (filter.tagIds.length) parameters.set("tagIds", filter.tagIds.join(","));
|
|
11999
|
+
if (filter.untagged) parameters.set("untagged", "true");
|
|
11908
12000
|
if (options.cursor != null) parameters.set("cursor", options.cursor);
|
|
11909
12001
|
if (options.limit != null) parameters.set("limit", String(options.limit));
|
|
11910
12002
|
if (options.includeTotal != null) parameters.set("includeTotal", String(options.includeTotal));
|
|
@@ -11994,15 +12086,17 @@ var ControlClient = class {
|
|
|
11994
12086
|
file,
|
|
11995
12087
|
name: options.name,
|
|
11996
12088
|
teamId: options.teamId,
|
|
12089
|
+
tagIds: options.tagIds,
|
|
11997
12090
|
version: 1
|
|
11998
12091
|
})
|
|
11999
12092
|
}));
|
|
12000
12093
|
}
|
|
12001
|
-
async createFlow(name, idempotencyKey = `flow-${randomId()}`, teamId) {
|
|
12094
|
+
async createFlow(name, idempotencyKey = `flow-${randomId()}`, teamId, tagIds) {
|
|
12002
12095
|
return flow(await this.request("/v1/flows", {
|
|
12003
12096
|
body: JSON.stringify({
|
|
12004
12097
|
name,
|
|
12005
12098
|
...teamId == null ? {} : { teamId },
|
|
12099
|
+
...tagIds == null ? {} : { tagIds },
|
|
12006
12100
|
version: 1
|
|
12007
12101
|
}),
|
|
12008
12102
|
headers: { "idempotency-key": idempotencyKey },
|
|
@@ -12037,15 +12131,68 @@ var ControlClient = class {
|
|
|
12037
12131
|
if (source.version != 1 || !Array.isArray(source.listeners)) return invalidResponse();
|
|
12038
12132
|
return source.listeners.map(errorListener);
|
|
12039
12133
|
}
|
|
12040
|
-
async
|
|
12041
|
-
|
|
12134
|
+
async listTags(signal) {
|
|
12135
|
+
const source = record$1(await this.request("/v1/tags", { signal }));
|
|
12136
|
+
if (source.version != 1 || !Array.isArray(source.tags)) return invalidResponse();
|
|
12137
|
+
return {
|
|
12138
|
+
tags: source.tags.map(decodeTagListItem),
|
|
12139
|
+
version: 1
|
|
12140
|
+
};
|
|
12141
|
+
}
|
|
12142
|
+
async createTag(name) {
|
|
12143
|
+
return decodeTag(await this.request("/v1/tags", {
|
|
12144
|
+
method: "POST",
|
|
12042
12145
|
body: JSON.stringify({
|
|
12043
12146
|
name,
|
|
12044
12147
|
version: 1
|
|
12045
|
-
})
|
|
12046
|
-
|
|
12148
|
+
})
|
|
12149
|
+
}));
|
|
12150
|
+
}
|
|
12151
|
+
async renameTag(tagId, name) {
|
|
12152
|
+
return decodeTag(await this.request(`/v1/tags/${segment(tagId)}`, {
|
|
12153
|
+
method: "PATCH",
|
|
12154
|
+
body: JSON.stringify({
|
|
12155
|
+
name,
|
|
12156
|
+
version: 1
|
|
12157
|
+
})
|
|
12158
|
+
}));
|
|
12159
|
+
}
|
|
12160
|
+
async deleteTag(tagId) {
|
|
12161
|
+
if (record$1(await this.request(`/v1/tags/${segment(tagId)}`, { method: "DELETE" })).version != 1) invalidResponse();
|
|
12162
|
+
}
|
|
12163
|
+
async setFlowTags(flowId, tagIds) {
|
|
12164
|
+
return flow(await this.request(`/v1/flows/${segment(flowId)}/tags`, {
|
|
12165
|
+
method: "PUT",
|
|
12166
|
+
body: JSON.stringify({
|
|
12167
|
+
tagIds,
|
|
12168
|
+
version: 1
|
|
12169
|
+
})
|
|
12047
12170
|
}));
|
|
12048
12171
|
}
|
|
12172
|
+
async updateFlow(flowId, changes) {
|
|
12173
|
+
return flow(await this.request(`/v1/flows/${segment(flowId)}`, {
|
|
12174
|
+
method: "PATCH",
|
|
12175
|
+
body: JSON.stringify({
|
|
12176
|
+
...changes,
|
|
12177
|
+
version: 1
|
|
12178
|
+
})
|
|
12179
|
+
}));
|
|
12180
|
+
}
|
|
12181
|
+
async getFlowState(flowId, scope, values = false) {
|
|
12182
|
+
const result = flowStateViewSchema.safeParse(await this.request(`/v1/flows/${segment(flowId)}/state?scope=${scope}&values=${values}`));
|
|
12183
|
+
return result.success && result.data.scope === scope ? result.data : invalidResponse();
|
|
12184
|
+
}
|
|
12185
|
+
async clearFlowState(flowId, scope, key) {
|
|
12186
|
+
const source = record$1(await this.request(`/v1/flows/${segment(flowId)}/state?scope=${scope}${key == null ? "" : `&key=${encodeURIComponent(key)}`}`, { method: "DELETE" }));
|
|
12187
|
+
if (source.version !== 1 || source.cleared !== true) invalidResponse();
|
|
12188
|
+
}
|
|
12189
|
+
async clearFlowDedupe(flowId, scope, space) {
|
|
12190
|
+
const source = record$1(await this.request(`/v1/flows/${segment(flowId)}/dedupe?scope=${scope}&space=${encodeURIComponent(space)}`, { method: "DELETE" }));
|
|
12191
|
+
if (source.version !== 1 || source.cleared !== true) invalidResponse();
|
|
12192
|
+
}
|
|
12193
|
+
async renameFlow(flowId, name) {
|
|
12194
|
+
return this.updateFlow(flowId, { name });
|
|
12195
|
+
}
|
|
12049
12196
|
async deleteFlow(flowId) {
|
|
12050
12197
|
return flow(await this.request(`/v1/flows/${segment(flowId)}`, { method: "DELETE" }));
|
|
12051
12198
|
}
|
|
@@ -42,6 +42,9 @@ export declare const controlErrorCode: {
|
|
|
42
42
|
readonly triggerKeyInvalid: 'trigger-key.invalid';
|
|
43
43
|
readonly triggerKeyNotFound: 'trigger-key.not-found';
|
|
44
44
|
readonly triggerNotFound: 'trigger.not-found';
|
|
45
|
+
readonly tagInvalid: 'tag.invalid';
|
|
46
|
+
readonly tagConflict: 'tag.conflict';
|
|
47
|
+
readonly tagNotFound: 'tag.not-found';
|
|
45
48
|
readonly variableInvalid: 'variable.invalid';
|
|
46
49
|
readonly variableLimitReached: 'variable.limit-reached';
|
|
47
50
|
readonly variableNotFound: 'variable.not-found';
|
|
@@ -177,6 +180,15 @@ export declare const controlErrorMetadata: {
|
|
|
177
180
|
readonly "trigger.not-found": {
|
|
178
181
|
readonly status: 404;
|
|
179
182
|
};
|
|
183
|
+
readonly "tag.invalid": {
|
|
184
|
+
readonly status: 400;
|
|
185
|
+
};
|
|
186
|
+
readonly "tag.conflict": {
|
|
187
|
+
readonly status: 409;
|
|
188
|
+
};
|
|
189
|
+
readonly "tag.not-found": {
|
|
190
|
+
readonly status: 404;
|
|
191
|
+
};
|
|
180
192
|
readonly "variable.invalid": {
|
|
181
193
|
readonly status: 400;
|
|
182
194
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { CanvasCommand } from './canvas-commands.js';
|
|
2
|
+
import type { FlowStateView, StateScope } from './flow-state.js';
|
|
2
3
|
export type { CanvasCommand, CanvasCommandSubscriber } from './canvas-commands.js';
|
|
3
4
|
import type { LiveDetails } from './liveDetails.js';
|
|
4
5
|
export { liveEntries } from './liveDetails.js';
|
|
@@ -34,6 +35,7 @@ export type { JsonValue, TriggerKeySnapshot, WaitAction } from './flow-change.js
|
|
|
34
35
|
export type { RunStatus } from './run-lifecycle.js';
|
|
35
36
|
export { ApiError, controlErrorCode, controlErrorMetadata, type ControlErrorCode } from './control-api-errors.js';
|
|
36
37
|
export type { FlowCatalogEvent, FlowChangeEvent } from './flow-notifications.js';
|
|
38
|
+
export { normalizeFlowQuery } from './tags.js';
|
|
37
39
|
export interface CanvasBroadcast {
|
|
38
40
|
readonly version: 1;
|
|
39
41
|
readonly flowId: string;
|
|
@@ -59,7 +61,25 @@ export interface FlowResources {
|
|
|
59
61
|
}[];
|
|
60
62
|
};
|
|
61
63
|
}
|
|
64
|
+
export interface FlowUpdate {
|
|
65
|
+
readonly name?: string;
|
|
66
|
+
readonly tagIds?: readonly string[];
|
|
67
|
+
}
|
|
68
|
+
export interface FlowQuery {
|
|
69
|
+
readonly query?: string;
|
|
70
|
+
readonly tagIds?: readonly string[];
|
|
71
|
+
readonly untagged?: boolean;
|
|
72
|
+
}
|
|
73
|
+
export interface Tag {
|
|
74
|
+
readonly tagId: string;
|
|
75
|
+
readonly name: string;
|
|
76
|
+
readonly version: 1;
|
|
77
|
+
}
|
|
78
|
+
export interface TagListItem extends Tag {
|
|
79
|
+
readonly referenceCount: number;
|
|
80
|
+
}
|
|
62
81
|
export interface Flow {
|
|
82
|
+
readonly tagIds?: readonly string[];
|
|
63
83
|
readonly live?: {
|
|
64
84
|
readonly enabled: boolean;
|
|
65
85
|
readonly hasStart: boolean;
|
|
@@ -740,7 +760,7 @@ export declare class ControlClient {
|
|
|
740
760
|
private readonly channel;
|
|
741
761
|
constructor(requestControl: ControlRequest, channel?: 'workbench' | 'cli' | 'api');
|
|
742
762
|
loadOpenApiDocument(url: string, signal?: AbortSignal): Promise<JsonValue>;
|
|
743
|
-
listFlows(options?: {
|
|
763
|
+
listFlows(options?: FlowQuery & {
|
|
744
764
|
readonly cursor?: string;
|
|
745
765
|
readonly includeTotal?: boolean;
|
|
746
766
|
readonly limit?: number;
|
|
@@ -808,11 +828,24 @@ export declare class ControlClient {
|
|
|
808
828
|
readonly name?: string;
|
|
809
829
|
readonly teamId?: string;
|
|
810
830
|
readonly idempotencyKey?: string;
|
|
831
|
+
readonly tagIds?: readonly string[];
|
|
811
832
|
}): Promise<Flow>;
|
|
812
|
-
createFlow(name: string, idempotencyKey?: string, teamId?: string): Promise<Flow>;
|
|
833
|
+
createFlow(name: string, idempotencyKey?: string, teamId?: string, tagIds?: readonly string[]): Promise<Flow>;
|
|
813
834
|
broadcastCanvas(flowId: string, command: CanvasCommand): Promise<CanvasBroadcast>;
|
|
814
835
|
getFlow(flowId: string): Promise<Flow>;
|
|
815
836
|
getErrorListeners(flowId: string, signal?: AbortSignal): Promise<readonly ErrorListener[]>;
|
|
837
|
+
listTags(signal?: AbortSignal): Promise<{
|
|
838
|
+
readonly tags: readonly TagListItem[];
|
|
839
|
+
readonly version: 1;
|
|
840
|
+
}>;
|
|
841
|
+
createTag(name: string): Promise<Tag>;
|
|
842
|
+
renameTag(tagId: string, name: string): Promise<Tag>;
|
|
843
|
+
deleteTag(tagId: string): Promise<void>;
|
|
844
|
+
setFlowTags(flowId: string, tagIds: readonly string[]): Promise<Flow>;
|
|
845
|
+
updateFlow(flowId: string, changes: FlowUpdate): Promise<Flow>;
|
|
846
|
+
getFlowState(flowId: string, scope: StateScope, values?: boolean): Promise<FlowStateView>;
|
|
847
|
+
clearFlowState(flowId: string, scope: StateScope, key?: string): Promise<void>;
|
|
848
|
+
clearFlowDedupe(flowId: string, scope: StateScope, space: string): Promise<void>;
|
|
816
849
|
renameFlow(flowId: string, name: string): Promise<Flow>;
|
|
817
850
|
deleteFlow(flowId: string): Promise<Flow>;
|
|
818
851
|
listTriggerKeys(signal?: AbortSignal, locale?: string): Promise<readonly TriggerKeySummary[]>;
|