@oomol-lab/open-flow 0.1.0-beta.84 → 0.1.0-beta.86
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/{FlowCanvas-B2g7NceZ.js → FlowCanvas-CHIaMaBv.js} +112 -16
- package/dist/browser/{createResourceDialog-Bi4fUnbD.js → createResourceDialog-C0E5yPe6.js} +3 -3
- package/dist/browser/{dialog-BzoSxhXQ.js → dialog-b3hsdu8i.js} +291 -143
- package/dist/browser/{exportPng-DLdtJvg3.js → exportPng-DGHcejgy.js} +2 -2
- package/dist/browser/{flowChanges-C567g-Pc.js → flowChanges-BvSWezEb.js} +375 -83
- package/dist/browser/{flowWorkspace-DBk4A-Ld.js → flowWorkspace-BKnMRClO.js} +1619 -475
- package/dist/browser/fr-CNTSedYU.js +593 -0
- package/dist/browser/ja-CxQBHr2J.js +593 -0
- package/dist/browser/ko-D1Exiv1h.js +593 -0
- package/dist/browser/licenses.md +1 -1
- package/dist/browser/{markdownContent-DIuJThGK.js → markdownContent-BR9-1ikU.js} +1 -1
- package/dist/browser/preview.css +181 -181
- package/dist/browser/preview.js +2103 -636
- package/dist/browser/ru-BzLZv0B7.js +593 -0
- package/dist/browser/{tooltip-DGj5pudg.js → tooltip-DSBF3bRw.js} +55 -23
- package/dist/browser/workbench.css +181 -181
- package/dist/browser/workbench.js +86 -17
- package/dist/browser/{workbenchSelect-BIaEVTx6.js → workbenchSelect-Di1Bm_-d.js} +2 -2
- package/dist/browser/{wrapLayout-C4moMKgb.js → wrapLayout-B0AT8_-i.js} +1 -1
- package/dist/browser/zh-CN-Dg_xSGde.js +593 -0
- package/dist/browser/zh-TW-oxuLwsV0.js +593 -0
- package/dist/command/index.js +61 -57
- package/dist/command/licenses.md +28 -4
- package/dist/common/authoring.d.ts +5 -5
- package/dist/common/authoringExamples.d.ts +3 -2
- package/dist/common/authoringSchema.d.ts +41 -4
- package/dist/common/catalogCache.d.ts +46 -0
- package/dist/common/connector-action.js +13 -10
- package/dist/common/connector-proxy.d.ts +96 -0
- package/dist/common/connector-proxy.js +5209 -0
- package/dist/common/control-api-conformance.js +312 -46
- package/dist/common/control-api.d.ts +12 -1
- package/dist/common/control-api.js +303 -41
- package/dist/common/control-requests.d.ts +4 -3
- package/dist/common/control-requests.js +14111 -171
- package/dist/common/engine-contract.d.ts +3 -2
- package/dist/common/event-source.js +55 -23
- package/dist/common/flow-authoring-node.d.ts +2 -0
- package/dist/common/flow-authoring.js +6936 -6781
- 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 +91 -36
- package/dist/common/flow-connectionUsage.d.ts +1 -1
- package/dist/common/flow-encoding.js +93 -38
- package/dist/common/flow-requestParameters.d.ts +34 -0
- package/dist/common/flow-semantics.js +9429 -9236
- package/dist/common/flow-state.js +55 -23
- package/dist/common/flow-workflowFile.d.ts +3 -1
- package/dist/common/http-request.d.ts +6 -11
- package/dist/common/http-request.js +192 -141
- package/dist/common/licenses.md +1 -1
- package/dist/common/mcp.d.ts +3 -3
- package/dist/common/mcp.js +303 -41
- package/dist/common/run-events.js +1 -0
- package/dist/common/runtime-contract.js +10 -4
- package/dist/common/runtime-nodejs-compat.js +55 -23
- package/dist/common/scheduler-checkpoint.d.ts +3 -3
- package/dist/common/scheduler-dependencies.d.ts +22 -28
- package/dist/common/scheduler-node-execution.d.ts +1 -0
- package/dist/common/scheduler.d.ts +8 -2
- package/dist/common/scheduler.js +274 -95
- package/dist/common/workflow.js +51 -19
- package/dist/common/workflowAuthoring.d.ts +411 -0
- package/dist/render/browser/licenses.md +1 -1
- package/dist/render/browser/runtime.js +289 -61
- package/dist/render/node/index.js +85 -30
- package/dist/render/node/licenses.md +1 -1
- package/package.json +1 -1
- package/skills/open-flow/references/flow-authoring.md +14 -13
- package/src/base/common/jsonSchema.ts +11 -0
- package/src/connector/common/actionSchema.ts +4 -11
- package/src/connector/common/proxy.ts +152 -0
- package/src/control/common/api.ts +99 -3
- package/src/control/common/authoring.ts +23 -9
- package/src/control/common/authoringExamples.ts +9 -0
- package/src/control/common/authoringSchema.ts +21 -12
- package/src/control/common/catalogCache.ts +145 -0
- package/src/control/common/conformance.ts +9 -3
- package/src/control/common/connectorQueries.ts +17 -2
- package/src/control/common/requests.ts +1 -0
- package/src/control/common/workflowAuthoring.ts +120 -0
- package/src/execution/common/checkpoint.ts +18 -12
- package/src/execution/common/dependencies.ts +132 -15
- package/src/execution/common/events.ts +3 -0
- package/src/execution/common/node-execution.ts +22 -15
- package/src/execution/common/scheduler.ts +20 -31
- package/src/flow/common/change.ts +2 -1
- package/src/flow/common/changeSchema.ts +11 -1
- package/src/flow/common/connectionUsage.ts +4 -2
- package/src/flow/common/errorHandling.ts +3 -1
- package/src/flow/common/nodeChanges.ts +35 -18
- package/src/flow/common/requestParameters.ts +120 -0
- package/src/flow/common/semantics.ts +51 -1
- package/src/flow/common/sourceField.ts +3 -2
- package/src/flow/common/workflowFile.ts +2 -2
- package/src/http/common/httpRequest.ts +28 -78
- package/src/runtime/common/engineContract.ts +6 -3
package/dist/command/licenses.md
CHANGED
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
### @babel/parser - 8.0.4 (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (C) 2012-2014 by various contributors (see AUTHORS)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
|
22
|
+
|
|
23
|
+
### @cfworker/json-schema - 4.1.1 (MIT)
|
|
24
|
+
|
|
1
25
|
### @wopjs/cast - 0.1.16 (MIT)
|
|
2
26
|
|
|
3
27
|
MIT License
|
|
@@ -94,7 +118,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
94
118
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
95
119
|
SOFTWARE.
|
|
96
120
|
|
|
97
|
-
### zod - 4.6.
|
|
121
|
+
### zod - 4.6.7 (MIT)
|
|
98
122
|
|
|
99
123
|
MIT License
|
|
100
124
|
|
|
@@ -118,7 +142,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
118
142
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
119
143
|
SOFTWARE.
|
|
120
144
|
|
|
121
|
-
### zod - 4.6.
|
|
145
|
+
### zod - 4.6.7 (MIT)
|
|
122
146
|
|
|
123
147
|
MIT License
|
|
124
148
|
|
|
@@ -142,7 +166,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
142
166
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
143
167
|
SOFTWARE.
|
|
144
168
|
|
|
145
|
-
### zod - 4.6.
|
|
169
|
+
### zod - 4.6.7 (MIT)
|
|
146
170
|
|
|
147
171
|
MIT License
|
|
148
172
|
|
|
@@ -166,7 +190,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
166
190
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
167
191
|
SOFTWARE.
|
|
168
192
|
|
|
169
|
-
### zod - 4.6.
|
|
193
|
+
### zod - 4.6.7 (MIT)
|
|
170
194
|
|
|
171
195
|
MIT License
|
|
172
196
|
|
|
@@ -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" | "skip-duplicates" | "start" | "value" | "wait" | "webhook" | "webhook-response" | "workflow";
|
|
13
|
+
type: "agent" | "approval" | "code" | "condition" | "connector" | "connector-proxy" | "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;
|
|
@@ -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" | "skip-duplicates" | "start" | "value" | "wait" | "webhook" | "webhook-response" | "workflow";
|
|
101
|
+
type: "agent" | "approval" | "code" | "condition" | "connector" | "connector-proxy" | "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" | "error" | "http-request" | "integration" | "llm" | "openapi" | "outputs" | "poll" | "skip-duplicates" | "start" | "value" | "wait" | "webhook" | "webhook-response" | "workflow";
|
|
177
|
+
type: "agent" | "approval" | "code" | "condition" | "connector" | "connector-proxy" | "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[];
|
|
@@ -211,7 +211,7 @@ export interface AuthoringHost {
|
|
|
211
211
|
workflow?(flowId: string): Promise<WorkflowContract | WorkflowCandidate>;
|
|
212
212
|
id(label: string): string;
|
|
213
213
|
action(id: string): Promise<ConnectorAction>;
|
|
214
|
-
trigger(key: string): TriggerKeySnapshot
|
|
214
|
+
trigger(key: string): TriggerKeySnapshot | Promise<TriggerKeySnapshot>;
|
|
215
215
|
openapi(url: string): Promise<JsonValue>;
|
|
216
216
|
}
|
|
217
217
|
export declare function compileAuthoring(base: RevisionContent, request: AuthoringRequest, host: AuthoringHost): Promise<{
|
|
@@ -10,6 +10,7 @@ declare const descriptions: {
|
|
|
10
10
|
readonly decision: 'AI Decision evaluates named questions against target and returns a complete answer object per output. Configure target before running.';
|
|
11
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
|
+
readonly 'connector-proxy': 'A Provider API request through Connector Proxy. Select a Provider and account, then bind endpoint. Outputs preserve body, statusCode, headers and bodyEncoding.';
|
|
13
14
|
readonly openapi: 'A fixed JSON API operation. Replace the example document and URL before running.';
|
|
14
15
|
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.';
|
|
15
16
|
readonly code: 'A JavaScript module and its node. Use Code for custom computation; use Connector Tasks for existing actions.';
|
|
@@ -24,8 +25,8 @@ declare const descriptions: {
|
|
|
24
25
|
};
|
|
25
26
|
export declare const authoringExampleNames: (keyof typeof descriptions)[];
|
|
26
27
|
export declare const authoringExamples: {
|
|
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.";
|
|
28
|
+
name: "agent" | "approval" | "code" | "condition" | "connector" | "connector-proxy" | "cron" | "decision" | "error" | "http-request" | "integration" | "llm-chat" | "llm-json" | "openapi" | "poll" | "poll-notification" | "skip-duplicates" | "start" | "value" | "wait" | "webhook" | "webhook-response";
|
|
29
|
+
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 Provider API request through Connector Proxy. Select a Provider and account, then bind endpoint. Outputs preserve body, statusCode, headers and bodyEncoding." | "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
30
|
}[];
|
|
30
31
|
export declare function authoringExample(name: string): {
|
|
31
32
|
version: 1;
|
|
@@ -1,12 +1,13 @@
|
|
|
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', 'skip-duplicates', 'condition', 'value', 'wait', 'approval'];
|
|
3
|
+
export declare const authoringTypes: readonly ['start', 'outputs', 'webhook-response', 'workflow', 'webhook', 'cron', 'error', 'poll', 'integration', 'code', 'connector', 'connector-proxy', '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";
|
|
7
7
|
code: "code";
|
|
8
8
|
condition: "condition";
|
|
9
9
|
connector: "connector";
|
|
10
|
+
"connector-proxy": "connector-proxy";
|
|
10
11
|
cron: "cron";
|
|
11
12
|
decision: "decision";
|
|
12
13
|
error: "error";
|
|
@@ -228,6 +229,35 @@ export declare const authoringConfigurations: {
|
|
|
228
229
|
action: z.ZodString;
|
|
229
230
|
connectionId: z.ZodOptional<z.ZodString>;
|
|
230
231
|
}, z.core.$strict>;
|
|
232
|
+
'connector-proxy': z.ZodObject<{
|
|
233
|
+
providerId: z.ZodString;
|
|
234
|
+
connectionId: z.ZodOptional<z.ZodString>;
|
|
235
|
+
method: z.ZodDefault<z.ZodEnum<{
|
|
236
|
+
DELETE: "DELETE";
|
|
237
|
+
GET: "GET";
|
|
238
|
+
PATCH: "PATCH";
|
|
239
|
+
POST: "POST";
|
|
240
|
+
PUT: "PUT";
|
|
241
|
+
}>>;
|
|
242
|
+
query: z.ZodDefault<z.ZodObject<{
|
|
243
|
+
mode: z.ZodDefault<z.ZodEnum<{
|
|
244
|
+
fields: "fields";
|
|
245
|
+
object: "object";
|
|
246
|
+
}>>;
|
|
247
|
+
names: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
248
|
+
}, z.core.$strict>>;
|
|
249
|
+
headers: z.ZodDefault<z.ZodObject<{
|
|
250
|
+
mode: z.ZodDefault<z.ZodEnum<{
|
|
251
|
+
fields: "fields";
|
|
252
|
+
object: "object";
|
|
253
|
+
}>>;
|
|
254
|
+
names: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
255
|
+
}, z.core.$strict>>;
|
|
256
|
+
bodyFormat: z.ZodDefault<z.ZodEnum<{
|
|
257
|
+
json: "json";
|
|
258
|
+
none: "none";
|
|
259
|
+
}>>;
|
|
260
|
+
}, z.core.$strict>;
|
|
231
261
|
openapi: z.ZodObject<{
|
|
232
262
|
sourceUrl: z.ZodString;
|
|
233
263
|
path: z.ZodString;
|
|
@@ -699,6 +729,7 @@ export declare const authoringEditSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
699
729
|
code: "code";
|
|
700
730
|
condition: "condition";
|
|
701
731
|
connector: "connector";
|
|
732
|
+
"connector-proxy": "connector-proxy";
|
|
702
733
|
cron: "cron";
|
|
703
734
|
decision: "decision";
|
|
704
735
|
error: "error";
|
|
@@ -871,6 +902,7 @@ export declare const authoringRequestSchema: z.ZodObject<{
|
|
|
871
902
|
code: "code";
|
|
872
903
|
condition: "condition";
|
|
873
904
|
connector: "connector";
|
|
905
|
+
"connector-proxy": "connector-proxy";
|
|
874
906
|
cron: "cron";
|
|
875
907
|
decision: "decision";
|
|
876
908
|
error: "error";
|
|
@@ -1057,6 +1089,7 @@ export declare const authoringSearchSchema: z.ZodObject<{
|
|
|
1057
1089
|
code: "code";
|
|
1058
1090
|
condition: "condition";
|
|
1059
1091
|
connector: "connector";
|
|
1092
|
+
"connector-proxy": "connector-proxy";
|
|
1060
1093
|
cron: "cron";
|
|
1061
1094
|
decision: "decision";
|
|
1062
1095
|
error: "error";
|
|
@@ -1089,6 +1122,7 @@ export declare const authoringSchemaQuery: z.ZodObject<{
|
|
|
1089
1122
|
code: "code";
|
|
1090
1123
|
condition: "condition";
|
|
1091
1124
|
connector: "connector";
|
|
1125
|
+
"connector-proxy": "connector-proxy";
|
|
1092
1126
|
cron: "cron";
|
|
1093
1127
|
decision: "decision";
|
|
1094
1128
|
error: "error";
|
|
@@ -1122,6 +1156,7 @@ export declare function authoringRequestContract(name: string): {
|
|
|
1122
1156
|
code: "code";
|
|
1123
1157
|
condition: "condition";
|
|
1124
1158
|
connector: "connector";
|
|
1159
|
+
"connector-proxy": "connector-proxy";
|
|
1125
1160
|
cron: "cron";
|
|
1126
1161
|
decision: "decision";
|
|
1127
1162
|
error: "error";
|
|
@@ -1305,6 +1340,7 @@ export declare function authoringRequestContract(name: string): {
|
|
|
1305
1340
|
code: "code";
|
|
1306
1341
|
condition: "condition";
|
|
1307
1342
|
connector: "connector";
|
|
1343
|
+
"connector-proxy": "connector-proxy";
|
|
1308
1344
|
cron: "cron";
|
|
1309
1345
|
decision: "decision";
|
|
1310
1346
|
error: "error";
|
|
@@ -1408,7 +1444,7 @@ export declare function authoringRequestContract(name: string): {
|
|
|
1408
1444
|
} | undefined;
|
|
1409
1445
|
export declare function authoringSchema(kind?: AuthoringType): {
|
|
1410
1446
|
type?: undefined;
|
|
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"];
|
|
1447
|
+
types: readonly ["start", "outputs", "webhook-response", "workflow", "webhook", "cron", "error", "poll", "integration", "code", "connector", "connector-proxy", "agent", "llm", "decision", "openapi", "http-request", "skip-duplicates", "condition", "value", "wait", "approval"];
|
|
1412
1448
|
request: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
|
|
1413
1449
|
baseRevision: z.ZodString;
|
|
1414
1450
|
requestId: z.ZodString;
|
|
@@ -1421,6 +1457,7 @@ export declare function authoringSchema(kind?: AuthoringType): {
|
|
|
1421
1457
|
code: "code";
|
|
1422
1458
|
condition: "condition";
|
|
1423
1459
|
connector: "connector";
|
|
1460
|
+
"connector-proxy": "connector-proxy";
|
|
1424
1461
|
cron: "cron";
|
|
1425
1462
|
decision: "decision";
|
|
1426
1463
|
error: "error";
|
|
@@ -1593,7 +1630,7 @@ export declare function authoringSchema(kind?: AuthoringType): {
|
|
|
1593
1630
|
} | {
|
|
1594
1631
|
types?: undefined;
|
|
1595
1632
|
request?: undefined;
|
|
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";
|
|
1633
|
+
type: "agent" | "approval" | "code" | "condition" | "connector" | "connector-proxy" | "cron" | "decision" | "error" | "http-request" | "integration" | "llm" | "openapi" | "outputs" | "poll" | "skip-duplicates" | "start" | "value" | "wait" | "webhook" | "webhook-response" | "workflow";
|
|
1597
1634
|
onError: boolean | {
|
|
1598
1635
|
enum: string[];
|
|
1599
1636
|
};
|
|
@@ -1607,7 +1644,7 @@ export declare function authoringSchema(kind?: AuthoringType): {
|
|
|
1607
1644
|
example: {
|
|
1608
1645
|
op: string;
|
|
1609
1646
|
as: string;
|
|
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";
|
|
1647
|
+
type: "agent" | "approval" | "code" | "condition" | "connector" | "connector-proxy" | "cron" | "decision" | "error" | "http-request" | "integration" | "llm" | "openapi" | "outputs" | "poll" | "skip-duplicates" | "start" | "value" | "wait" | "webhook" | "webhook-response" | "workflow";
|
|
1611
1648
|
name: string;
|
|
1612
1649
|
};
|
|
1613
1650
|
configuration: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{}, z.core.$strict>>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { JsonValue } from './flow-change.js';
|
|
2
|
+
/** Storage is host-owned. Keys and records are opaque to the delegate. */
|
|
3
|
+
export interface ControlCacheDelegate {
|
|
4
|
+
get(key: string): Promise<unknown>;
|
|
5
|
+
set(key: string, value: JsonValue): Promise<void>;
|
|
6
|
+
delete(key: string): Promise<void>;
|
|
7
|
+
}
|
|
8
|
+
export interface ControlCacheRead {
|
|
9
|
+
readonly path: string;
|
|
10
|
+
readonly source: 'cache' | 'network' | 'revalidated';
|
|
11
|
+
readonly body: JsonValue;
|
|
12
|
+
readonly etag: string | null;
|
|
13
|
+
readonly validatedAt: number;
|
|
14
|
+
readonly stale: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface ControlCacheOptions {
|
|
17
|
+
/** Non-secret identity of the deployment and effective caller/resource scope. */
|
|
18
|
+
readonly scope: string;
|
|
19
|
+
readonly delegate: ControlCacheDelegate;
|
|
20
|
+
readonly mode?: 'default' | 'refresh' | 'offline';
|
|
21
|
+
readonly maxAgeMs?: number;
|
|
22
|
+
readonly onRead?: (read: ControlCacheRead) => void;
|
|
23
|
+
}
|
|
24
|
+
interface CatalogQuery<Value> {
|
|
25
|
+
readonly path: string;
|
|
26
|
+
readonly decode: (value: unknown) => Value;
|
|
27
|
+
}
|
|
28
|
+
type CatalogLoad = (etag: string | null) => Promise<{
|
|
29
|
+
readonly modified: true;
|
|
30
|
+
readonly data: JsonValue;
|
|
31
|
+
readonly etag: string | null;
|
|
32
|
+
} | {
|
|
33
|
+
readonly modified: false;
|
|
34
|
+
readonly etag: string | null;
|
|
35
|
+
}>;
|
|
36
|
+
/** Complete Flow API responses, never a merged store of catalog entities. */
|
|
37
|
+
export declare class ControlCatalogCache {
|
|
38
|
+
#private;
|
|
39
|
+
private readonly options;
|
|
40
|
+
constructor(options: ControlCacheOptions);
|
|
41
|
+
read<Value>(query: CatalogQuery<Value>, load: CatalogLoad, maxAgeMs: number, signal?: AbortSignal, fresh?: boolean): Promise<{
|
|
42
|
+
data: Value;
|
|
43
|
+
etag: string | null;
|
|
44
|
+
}>;
|
|
45
|
+
}
|
|
46
|
+
export {};
|
|
@@ -4,6 +4,17 @@ var isObject = (x) => x !== null && typeof x === "object";
|
|
|
4
4
|
var isPlainObject = (x) => isObject(x) && !isArray(x);
|
|
5
5
|
var toPlainObject = (x) => isPlainObject(x) ? x : void 0;
|
|
6
6
|
//#endregion
|
|
7
|
+
//#region src/base/common/jsonSchema.ts
|
|
8
|
+
/** Keep local definition references usable when a property becomes a standalone schema. */
|
|
9
|
+
function propertySchemaWithDefinitions(root, schema) {
|
|
10
|
+
const property = toPlainObject(schema);
|
|
11
|
+
if (property == null) return schema;
|
|
12
|
+
const result = Object.assign({}, property);
|
|
13
|
+
if (result.$defs == null && root.$defs != null) result.$defs = root.$defs;
|
|
14
|
+
if (result.definitions == null && root.definitions != null) result.definitions = root.definitions;
|
|
15
|
+
return result;
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
7
18
|
//#region src/connector/common/actionSchema.ts
|
|
8
19
|
function connectorActionPorts(inputSchema, outputSchema) {
|
|
9
20
|
const inputs = inputPorts(inputSchema);
|
|
@@ -45,8 +56,8 @@ function inputPorts(schema) {
|
|
|
45
56
|
}
|
|
46
57
|
function connectorOutputMode(schema) {
|
|
47
58
|
const root = toPlainObject(schema);
|
|
48
|
-
const
|
|
49
|
-
return
|
|
59
|
+
const patterns = toPlainObject(root?.patternProperties);
|
|
60
|
+
return root?.type == "object" && root.additionalProperties === false && (patterns == null || Object.keys(patterns).length == 0) ? "fields" : "value";
|
|
50
61
|
}
|
|
51
62
|
function outputPorts(schema) {
|
|
52
63
|
const root = toPlainObject(schema);
|
|
@@ -65,14 +76,6 @@ function outputPorts(schema) {
|
|
|
65
76
|
nullable: !required.has(handle) || schemaAllowsNull(propertySchema, root)
|
|
66
77
|
}));
|
|
67
78
|
}
|
|
68
|
-
function propertySchemaWithDefinitions(root, schema) {
|
|
69
|
-
const property = toPlainObject(schema);
|
|
70
|
-
if (property == null) return schema;
|
|
71
|
-
const result = Object.assign({}, property);
|
|
72
|
-
if (result.$defs == null && root.$defs != null) result.$defs = root.$defs;
|
|
73
|
-
if (result.definitions == null && root.definitions != null) result.definitions = root.definitions;
|
|
74
|
-
return result;
|
|
75
|
-
}
|
|
76
79
|
function schemaDescription(root, schema) {
|
|
77
80
|
for (const object of referencedSchemas(root, schema)) if (typeof object.description == "string") return object.description;
|
|
78
81
|
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { SourceOperation, SourceReferenceOperation } from './event-source-definition.js';
|
|
2
|
+
import type { InputMapping, InputPort, ManagedTaskDefinitionOf, TaskDefinitionBase } from './flow-model.js';
|
|
3
|
+
import type { RequestTaskNode } from './flow-requestParameters.js';
|
|
2
4
|
import type { JsonValue } from '../index.js';
|
|
5
|
+
import { z } from 'zod';
|
|
3
6
|
export type TriggerOperationRequest = {
|
|
4
7
|
readonly operation: 'sourceReference';
|
|
5
8
|
readonly request: SourceReferenceOperation;
|
|
@@ -46,8 +49,101 @@ export interface ConnectorProxyRequest {
|
|
|
46
49
|
export interface ConnectorProxyResult {
|
|
47
50
|
readonly data: unknown;
|
|
48
51
|
readonly status: number;
|
|
52
|
+
readonly headers?: Readonly<Record<string, string>>;
|
|
53
|
+
readonly bodyEncoding?: 'base64';
|
|
49
54
|
}
|
|
50
55
|
export interface ConnectorProxy {
|
|
51
56
|
trigger?(request: TriggerOperationRequest, signal?: AbortSignal): Promise<unknown>;
|
|
52
57
|
execute(request: ConnectorProxyRequest, signal?: AbortSignal): Promise<ConnectorProxyResult>;
|
|
53
58
|
}
|
|
59
|
+
export declare const connectorProxyConfigSchema: z.ZodObject<{
|
|
60
|
+
providerId: z.ZodString;
|
|
61
|
+
connectionId: z.ZodOptional<z.ZodString>;
|
|
62
|
+
method: z.ZodDefault<z.ZodEnum<{
|
|
63
|
+
DELETE: "DELETE";
|
|
64
|
+
GET: "GET";
|
|
65
|
+
PATCH: "PATCH";
|
|
66
|
+
POST: "POST";
|
|
67
|
+
PUT: "PUT";
|
|
68
|
+
}>>;
|
|
69
|
+
query: z.ZodDefault<z.ZodObject<{
|
|
70
|
+
mode: z.ZodDefault<z.ZodEnum<{
|
|
71
|
+
fields: "fields";
|
|
72
|
+
object: "object";
|
|
73
|
+
}>>;
|
|
74
|
+
names: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
75
|
+
}, z.core.$strict>>;
|
|
76
|
+
headers: z.ZodDefault<z.ZodObject<{
|
|
77
|
+
mode: z.ZodDefault<z.ZodEnum<{
|
|
78
|
+
fields: "fields";
|
|
79
|
+
object: "object";
|
|
80
|
+
}>>;
|
|
81
|
+
names: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
82
|
+
}, z.core.$strict>>;
|
|
83
|
+
bodyFormat: z.ZodDefault<z.ZodEnum<{
|
|
84
|
+
json: "json";
|
|
85
|
+
none: "none";
|
|
86
|
+
}>>;
|
|
87
|
+
}, z.core.$strict>;
|
|
88
|
+
export type ConnectorProxyConfig = z.infer<typeof connectorProxyConfigSchema>;
|
|
89
|
+
export interface ConnectorProxyExecutor extends ConnectorProxyConfig {
|
|
90
|
+
readonly kind: 'connector-proxy';
|
|
91
|
+
}
|
|
92
|
+
export declare const connectorProxyExecutorSchema: z.ZodObject<{
|
|
93
|
+
providerId: z.ZodString;
|
|
94
|
+
connectionId: z.ZodOptional<z.ZodString>;
|
|
95
|
+
method: z.ZodDefault<z.ZodEnum<{
|
|
96
|
+
DELETE: "DELETE";
|
|
97
|
+
GET: "GET";
|
|
98
|
+
PATCH: "PATCH";
|
|
99
|
+
POST: "POST";
|
|
100
|
+
PUT: "PUT";
|
|
101
|
+
}>>;
|
|
102
|
+
query: z.ZodDefault<z.ZodObject<{
|
|
103
|
+
mode: z.ZodDefault<z.ZodEnum<{
|
|
104
|
+
fields: "fields";
|
|
105
|
+
object: "object";
|
|
106
|
+
}>>;
|
|
107
|
+
names: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
108
|
+
}, z.core.$strict>>;
|
|
109
|
+
headers: z.ZodDefault<z.ZodObject<{
|
|
110
|
+
mode: z.ZodDefault<z.ZodEnum<{
|
|
111
|
+
fields: "fields";
|
|
112
|
+
object: "object";
|
|
113
|
+
}>>;
|
|
114
|
+
names: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
115
|
+
}, z.core.$strict>>;
|
|
116
|
+
bodyFormat: z.ZodDefault<z.ZodEnum<{
|
|
117
|
+
json: "json";
|
|
118
|
+
none: "none";
|
|
119
|
+
}>>;
|
|
120
|
+
kind: z.ZodLiteral<"connector-proxy">;
|
|
121
|
+
}, z.core.$strict>;
|
|
122
|
+
export declare const connectorProxyQueryValueSchema: {
|
|
123
|
+
type: string[];
|
|
124
|
+
};
|
|
125
|
+
export declare const connectorProxyQuerySchema: {
|
|
126
|
+
type: string;
|
|
127
|
+
additionalProperties: {
|
|
128
|
+
type: string[];
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
export declare const connectorProxyHeaderSchema: {
|
|
132
|
+
type: string;
|
|
133
|
+
additionalProperties: {
|
|
134
|
+
type: string;
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
export declare const connectorProxyBodyInput: InputPort;
|
|
138
|
+
export declare function connectorProxySupportsBody(method: ConnectorProxyRequest['method']): boolean;
|
|
139
|
+
export declare function connectorProxyHasBody(mapping: InputMapping | undefined, defaultValue?: JsonValue): boolean;
|
|
140
|
+
export declare function connectorProxyTask(config: ConnectorProxyConfig, name?: string, previous?: TaskDefinitionBase): ManagedTaskDefinitionOf<ConnectorProxyExecutor>;
|
|
141
|
+
export declare function connectorProxyInputs(mappings: Readonly<Record<string, InputMapping>>, previous: RequestTaskNode['task'], next: RequestTaskNode['task']): Record<string, InputMapping>;
|
|
142
|
+
export declare function connectorProxyIssues(config: ConnectorProxyConfig, hasBody?: boolean): (import("./flow-requestParameters.js").RequestParameterIssue | {
|
|
143
|
+
field: 'bodyFormat';
|
|
144
|
+
code: 'bodyUnsupported';
|
|
145
|
+
message: string;
|
|
146
|
+
})[];
|
|
147
|
+
export declare function buildConnectorProxyRequest(config: ConnectorProxyConfig, input: Readonly<Record<string, JsonValue>>, mappings?: Readonly<Record<string, InputMapping>>, bodyDefault?: JsonValue): ConnectorProxyRequest;
|
|
148
|
+
export declare function withConnectorProxyParameterFields<Node extends RequestTaskNode>(node: Node, group: 'query' | 'headers', values: Record<string, JsonValue>): Node;
|
|
149
|
+
export declare function withConnectorProxyParameterSource<Node extends RequestTaskNode>(node: Node, group: 'query' | 'headers', mapping?: InputMapping): Node;
|