@oomol-lab/open-flow 0.1.0-beta.74 → 0.1.0-beta.76
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 +3 -1
- package/dist/browser/{ContentIcon-CUQHjQIw.js → ContentIcon-Cm1hbVzW.js} +4 -3
- package/dist/browser/{FlowCanvas-Dtf8_cQp.js → FlowCanvas-NzKtla_c.js} +62 -62
- package/dist/browser/{createResourceDialog-DI9pL-Yr.js → createResourceDialog-BgdedQqu.js} +3 -3
- package/dist/browser/{dialog-BYJGvItc.js → dialog-aSElFFw2.js} +322 -26
- package/dist/browser/{exportSvg-BOoy7-Db.js → exportSvg-Dcz4HTo_.js} +2 -2
- package/dist/browser/{flowChanges-RL-H4CjD.js → flowChanges-NZyS7HSp.js} +490 -438
- package/dist/browser/{flowWorkspace-BkDsETj0.js → flowWorkspace-Bl0SDehy.js} +499 -61
- package/dist/browser/preview.css +696 -825
- package/dist/browser/preview.js +1399 -717
- package/dist/browser/theme.css +114 -262
- package/dist/browser/{tooltip-wZJRB9oP.js → tooltip-3XMK9jkr.js} +1 -1
- package/dist/browser/{typeScriptSession-CSRwWmZm.js → typeScriptSession-C9sBGOKZ.js} +1 -1
- package/dist/browser/ui.css +354 -460
- package/dist/browser/ui.js +1 -1
- package/dist/browser/workbench.css +696 -825
- package/dist/browser/workbench.js +13 -7
- package/dist/browser/{workbenchSelect-BcWPWGzw.js → workbenchSelect-DBGP7Y4Z.js} +2 -2
- package/dist/command/index.js +41 -43
- package/dist/common/authoring.d.ts +5 -5
- package/dist/common/authoringExamples.d.ts +3 -2
- package/dist/common/authoringSchema.d.ts +70 -4
- package/dist/common/connector-proxy.d.ts +1 -1
- package/dist/common/control-api-conformance.js +250 -138
- package/dist/common/control-api.d.ts +3 -2
- package/dist/common/control-api.js +246 -134
- package/dist/common/control-requests.d.ts +3 -3
- package/dist/common/control-requests.js +353 -79
- package/dist/common/cron-trigger.d.ts +2 -1
- package/dist/common/decision.d.ts +4 -4
- package/dist/common/decision.js +5 -2
- package/dist/common/engine-contract.d.ts +6 -1
- package/dist/common/event-source-definition.d.ts +1 -1
- package/dist/common/event-source-view.d.ts +22 -0
- package/dist/common/event-source.d.ts +1 -1
- package/dist/common/event-source.js +24 -65
- package/dist/common/event-sources.d.ts +0 -21
- package/dist/common/flow-authoring.js +90 -19
- package/dist/common/flow-change-schema.d.ts +9 -1
- package/dist/common/flow-change.d.ts +7 -201
- package/dist/common/flow-change.js +96 -23
- package/dist/common/flow-encoding.js +89 -21
- package/dist/common/flow-graph.d.ts +2 -1
- package/dist/common/flow-input-value.d.ts +1 -1
- package/dist/common/flow-model.d.ts +121 -0
- package/dist/common/flow-notifications.d.ts +1 -1
- package/dist/common/flow-retry.d.ts +3 -5
- package/dist/common/flow-semantics.js +816 -586
- package/dist/common/flow-workflowReferences.d.ts +8 -0
- package/dist/common/flowInspection.d.ts +1 -1
- package/dist/common/http-hosts.d.ts +6 -0
- package/dist/common/http-request.d.ts +164 -0
- package/dist/common/http-request.js +5272 -0
- package/dist/common/integration-trigger.d.ts +2 -1
- package/dist/common/mcp.d.ts +3 -3
- package/dist/common/mcp.js +248 -136
- package/dist/common/openapi.d.ts +4 -4
- package/dist/common/openapi.js +4 -1
- package/dist/common/poll-trigger.d.ts +2 -1
- package/dist/common/run-events.js +11 -9
- package/dist/common/runtime-contract.d.ts +23 -1
- package/dist/common/runtime-contract.js +607 -72
- package/dist/common/runtime-nodejs-compat.d.ts +44 -0
- package/dist/common/runtime-nodejs-compat.js +5870 -0
- package/dist/common/scheduler-checkpoint.d.ts +1 -1
- package/dist/common/scheduler-node-execution.d.ts +1 -1
- package/dist/common/scheduler.d.ts +2 -2
- package/dist/common/scheduler.js +95 -25
- package/dist/common/trigger-catalog.d.ts +1 -7
- package/dist/common/trigger-config-options.d.ts +1 -1
- package/dist/common/trigger-config.d.ts +1 -1
- package/dist/common/trigger-contract.d.ts +2 -1
- package/dist/common/trigger-localization.d.ts +8 -2
- package/dist/common/trigger-model.d.ts +101 -0
- package/dist/common/webhook-response.d.ts +1 -3
- package/dist/common/webhook-trigger.d.ts +3 -1
- package/dist/common/webhook-trigger.js +12 -11
- package/dist/common/workflow.d.ts +3 -12
- package/dist/common/workflow.js +25 -23
- package/dist/index.d.ts +41 -14
- package/package.json +9 -1
- package/skills/open-flow/references/flow-authoring.md +1 -0
- package/skills/open-flow/references/flow-n8n-conversion.md +19 -15
- package/src/base/common/json.ts +1 -1
- package/src/connector/common/proxy.ts +1 -1
- package/src/control/common/api.ts +7 -5
- package/src/control/common/authoring.ts +14 -3
- package/src/control/common/authoringExamples.ts +8 -0
- package/src/control/common/authoringSchema.ts +38 -25
- package/src/control/common/authoringTools.ts +1 -1
- package/src/control/common/conformance.ts +1 -1
- package/src/control/common/connectorDecoders.ts +1 -1
- package/src/control/common/eventSources.ts +2 -29
- package/src/control/common/triggerCatalog.ts +1 -8
- package/src/decision/common/decision.ts +15 -7
- package/src/event-source/common/definition.ts +1 -1
- package/src/event-source/common/index.ts +1 -1
- package/src/event-source/common/view.ts +20 -0
- package/src/execution/common/checkpoint.ts +1 -1
- package/src/execution/common/events.ts +3 -0
- package/src/execution/common/node-execution.ts +5 -3
- package/src/execution/common/scheduler.ts +2 -1
- package/src/flow/common/change.ts +59 -192
- package/src/flow/common/changeSchema.ts +39 -5
- package/src/flow/common/connectionUsage.ts +1 -1
- package/src/flow/common/graph.ts +10 -4
- package/src/flow/common/inputValue.ts +1 -1
- package/src/flow/common/model.ts +130 -0
- package/src/flow/common/modules.ts +1 -1
- package/src/flow/common/portChanges.ts +1 -1
- package/src/flow/common/retry.ts +3 -5
- package/src/flow/common/semantics.ts +71 -7
- package/src/flow/common/webhookResponse.ts +4 -8
- package/src/flow/common/workflowReferences.ts +31 -0
- package/src/http/common/authBindings.ts +9 -0
- package/src/http/common/headers.ts +5 -0
- package/src/http/common/hosts.ts +13 -0
- package/src/http/common/httpRequest.ts +266 -0
- package/src/openapi/common/openapi.ts +9 -5
- package/src/{execution → runtime}/common/engineContract.ts +24 -15
- package/src/runtime/common/nodejsCompat.ts +275 -0
- package/src/runtime/common/nodejsGuest.generated.json +47 -0
- package/src/runtime/common/runtime.ts +1138 -0
- package/src/trigger/common/config.ts +1 -1
- package/src/trigger/common/configOptions.ts +1 -1
- package/src/trigger/common/contract.ts +2 -1
- package/src/trigger/common/cron.ts +2 -1
- package/src/trigger/common/integration.ts +2 -1
- package/src/trigger/common/model.ts +87 -0
- package/src/trigger/common/poll.ts +2 -1
- package/src/trigger/common/webhook.ts +7 -4
- package/src/trigger/providers/fieldDescriptions.ts +1 -1
- package/src/trigger/providers/localization.ts +9 -2
- package/src/trigger/providers/remote.ts +1 -1
- package/src/types/index.ts +44 -15
- package/src/workflow/common/workflow.ts +3 -44
- package/src/execution/common/runtime.ts +0 -563
- package/src/openapi/common/authBindings.ts +0 -12
- /package/src/{control → connector}/common/providerIconSprite.ts +0 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { GraphNode } from './flow-change.js';
|
|
2
|
+
import type { WorkflowCapability } from './flow-model.js';
|
|
3
|
+
/** Workflow declarations share discovery across authoring, admission and resource indexing. */
|
|
4
|
+
export declare function nodeWorkflowReferences(node: GraphNode): readonly {
|
|
5
|
+
readonly target: Omit<WorkflowCapability, 'kind' | 'name'>;
|
|
6
|
+
readonly path: string;
|
|
7
|
+
readonly tool?: string;
|
|
8
|
+
}[];
|
|
@@ -43,7 +43,7 @@ export declare function flowInspection(inspected: Awaited<ReturnType<typeof insp
|
|
|
43
43
|
nodes: {
|
|
44
44
|
[k: string]: Record<string, unknown>;
|
|
45
45
|
};
|
|
46
|
-
edges: readonly import(
|
|
46
|
+
edges: readonly import("./flow-change.js").GraphEdge[];
|
|
47
47
|
};
|
|
48
48
|
bindings: Readonly<Record<string, {
|
|
49
49
|
readonly kind: 'variable';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Hosts of a Code `http` Capability: lowercase DNS names or IPv4 addresses; `*.example.com` matches subdomains only. */
|
|
2
|
+
export declare const httpHostPattern: RegExp;
|
|
3
|
+
export declare const maxHttpHosts = 20;
|
|
4
|
+
/** Wildcards must name a registrable suffix, so `*.com` is rejected. */
|
|
5
|
+
export declare function isHttpHost(value: string): boolean;
|
|
6
|
+
export declare function httpHostAllowed(hosts: readonly string[], hostname: string): boolean;
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import type { InputMapping, JsonValue, ManagedTaskDefinitionOf, TaskDefinitionBase, TaskExecutor } from './flow-model.js';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export { httpHostAllowed, isHttpHost, maxHttpHosts } from './http-hosts.js';
|
|
4
|
+
export declare const httpRequestConfigSchema: z.ZodObject<{
|
|
5
|
+
method: z.ZodDefault<z.ZodEnum<{
|
|
6
|
+
DELETE: "DELETE";
|
|
7
|
+
GET: "GET";
|
|
8
|
+
HEAD: "HEAD";
|
|
9
|
+
OPTIONS: "OPTIONS";
|
|
10
|
+
PATCH: "PATCH";
|
|
11
|
+
POST: "POST";
|
|
12
|
+
PUT: "PUT";
|
|
13
|
+
}>>;
|
|
14
|
+
query: z.ZodDefault<z.ZodObject<{
|
|
15
|
+
mode: z.ZodDefault<z.ZodEnum<{
|
|
16
|
+
fields: "fields";
|
|
17
|
+
object: "object";
|
|
18
|
+
}>>;
|
|
19
|
+
names: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
20
|
+
}, z.core.$strict>>;
|
|
21
|
+
headers: z.ZodDefault<z.ZodObject<{
|
|
22
|
+
mode: z.ZodDefault<z.ZodEnum<{
|
|
23
|
+
fields: "fields";
|
|
24
|
+
object: "object";
|
|
25
|
+
}>>;
|
|
26
|
+
names: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
27
|
+
}, z.core.$strict>>;
|
|
28
|
+
bodyFormat: z.ZodDefault<z.ZodEnum<{
|
|
29
|
+
form: "form";
|
|
30
|
+
json: "json";
|
|
31
|
+
none: "none";
|
|
32
|
+
text: "text";
|
|
33
|
+
}>>;
|
|
34
|
+
authentication: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
|
|
35
|
+
type: z.ZodLiteral<"none">;
|
|
36
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
37
|
+
type: z.ZodEnum<{
|
|
38
|
+
basic: "basic";
|
|
39
|
+
bearer: "bearer";
|
|
40
|
+
}>;
|
|
41
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
42
|
+
type: z.ZodLiteral<"apiKey">;
|
|
43
|
+
name: z.ZodString;
|
|
44
|
+
in: z.ZodEnum<{
|
|
45
|
+
header: "header";
|
|
46
|
+
query: "query";
|
|
47
|
+
}>;
|
|
48
|
+
}, z.core.$strict>]>>;
|
|
49
|
+
responseFormat: z.ZodDefault<z.ZodEnum<{
|
|
50
|
+
auto: "auto";
|
|
51
|
+
json: "json";
|
|
52
|
+
text: "text";
|
|
53
|
+
}>>;
|
|
54
|
+
statusPolicy: z.ZodDefault<z.ZodEnum<{
|
|
55
|
+
all: "all";
|
|
56
|
+
success: "success";
|
|
57
|
+
}>>;
|
|
58
|
+
}, z.core.$strict>;
|
|
59
|
+
export type HttpRequestConfig = z.infer<typeof httpRequestConfigSchema>;
|
|
60
|
+
export interface HttpRequestExecutor extends HttpRequestConfig {
|
|
61
|
+
readonly kind: 'http-request';
|
|
62
|
+
}
|
|
63
|
+
export declare const httpRequestExecutorSchema: z.ZodObject<{
|
|
64
|
+
method: z.ZodDefault<z.ZodEnum<{
|
|
65
|
+
DELETE: "DELETE";
|
|
66
|
+
GET: "GET";
|
|
67
|
+
HEAD: "HEAD";
|
|
68
|
+
OPTIONS: "OPTIONS";
|
|
69
|
+
PATCH: "PATCH";
|
|
70
|
+
POST: "POST";
|
|
71
|
+
PUT: "PUT";
|
|
72
|
+
}>>;
|
|
73
|
+
query: z.ZodDefault<z.ZodObject<{
|
|
74
|
+
mode: z.ZodDefault<z.ZodEnum<{
|
|
75
|
+
fields: "fields";
|
|
76
|
+
object: "object";
|
|
77
|
+
}>>;
|
|
78
|
+
names: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
79
|
+
}, z.core.$strict>>;
|
|
80
|
+
headers: z.ZodDefault<z.ZodObject<{
|
|
81
|
+
mode: z.ZodDefault<z.ZodEnum<{
|
|
82
|
+
fields: "fields";
|
|
83
|
+
object: "object";
|
|
84
|
+
}>>;
|
|
85
|
+
names: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
86
|
+
}, z.core.$strict>>;
|
|
87
|
+
bodyFormat: z.ZodDefault<z.ZodEnum<{
|
|
88
|
+
form: "form";
|
|
89
|
+
json: "json";
|
|
90
|
+
none: "none";
|
|
91
|
+
text: "text";
|
|
92
|
+
}>>;
|
|
93
|
+
authentication: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
|
|
94
|
+
type: z.ZodLiteral<"none">;
|
|
95
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
96
|
+
type: z.ZodEnum<{
|
|
97
|
+
basic: "basic";
|
|
98
|
+
bearer: "bearer";
|
|
99
|
+
}>;
|
|
100
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
101
|
+
type: z.ZodLiteral<"apiKey">;
|
|
102
|
+
name: z.ZodString;
|
|
103
|
+
in: z.ZodEnum<{
|
|
104
|
+
header: "header";
|
|
105
|
+
query: "query";
|
|
106
|
+
}>;
|
|
107
|
+
}, z.core.$strict>]>>;
|
|
108
|
+
responseFormat: z.ZodDefault<z.ZodEnum<{
|
|
109
|
+
auto: "auto";
|
|
110
|
+
json: "json";
|
|
111
|
+
text: "text";
|
|
112
|
+
}>>;
|
|
113
|
+
statusPolicy: z.ZodDefault<z.ZodEnum<{
|
|
114
|
+
all: "all";
|
|
115
|
+
success: "success";
|
|
116
|
+
}>>;
|
|
117
|
+
kind: z.ZodLiteral<"http-request">;
|
|
118
|
+
}, z.core.$strict>;
|
|
119
|
+
export declare const httpHeaderSchema: {
|
|
120
|
+
type: string;
|
|
121
|
+
additionalProperties: {
|
|
122
|
+
type: string;
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
export declare const httpQuerySchema: {
|
|
126
|
+
type: string;
|
|
127
|
+
additionalProperties: {
|
|
128
|
+
anyOf: ({
|
|
129
|
+
type: string[];
|
|
130
|
+
} | {
|
|
131
|
+
type: string;
|
|
132
|
+
items: {
|
|
133
|
+
type: string[];
|
|
134
|
+
};
|
|
135
|
+
})[];
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
export declare function httpAuthHandles(config: HttpRequestConfig): string[];
|
|
139
|
+
export declare function httpRequestTask(config?: HttpRequestConfig, name?: string, previous?: TaskDefinitionBase): ManagedTaskDefinitionOf<HttpRequestExecutor>;
|
|
140
|
+
export interface HttpRequestIssue {
|
|
141
|
+
field: string;
|
|
142
|
+
index?: number;
|
|
143
|
+
code: 'bodyUnsupported' | 'parameterNamesInvalid' | 'headerNameInvalid' | 'keyNameRequired' | 'authConflict';
|
|
144
|
+
message: string;
|
|
145
|
+
}
|
|
146
|
+
export declare function httpRequestIssues(config: HttpRequestConfig): HttpRequestIssue[];
|
|
147
|
+
export declare function httpRequestUrl(value: unknown): URL;
|
|
148
|
+
export declare function buildHttpRequest(config: HttpRequestConfig, input: Readonly<Record<string, JsonValue>>): {
|
|
149
|
+
url: string;
|
|
150
|
+
init: RequestInit;
|
|
151
|
+
};
|
|
152
|
+
export declare function parseHttpResponse(config: HttpRequestConfig, status: number, headers: Headers, text: string): Record<string, JsonValue>;
|
|
153
|
+
/** Only a named parameter rename carries a value; changing source modes is not a rename. */
|
|
154
|
+
export declare function httpRequestInputs(mappings: Readonly<Record<string, InputMapping>>, previous: TaskDefinitionBase, next: TaskDefinitionBase): Record<string, InputMapping>;
|
|
155
|
+
/** A Task node as HTTP helpers read it; inline Tasks have no executor. */
|
|
156
|
+
interface HttpTaskNode {
|
|
157
|
+
readonly inputs: Readonly<Record<string, InputMapping>>;
|
|
158
|
+
readonly task: TaskDefinitionBase & {
|
|
159
|
+
readonly executor?: TaskExecutor;
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
/** The object editor assembles named inputs without changing unrelated request settings. */
|
|
163
|
+
export declare function withHttpParameterFields<Node extends HttpTaskNode>(node: Node, group: 'query' | 'headers', values: Record<string, JsonValue>): Node;
|
|
164
|
+
export declare function withHttpParameterSource<Node extends HttpTaskNode>(node: Node, group: 'query' | 'headers', mapping?: InputMapping): Node;
|