@oomol-lab/open-flow 0.1.0-beta.64 → 0.1.0-beta.66
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/{createResourceDialog-BAJXbzNH.js → createResourceDialog-C-Si_cYs.js} +2 -2
- package/dist/browser/flow-authoring-node.d.ts +12 -3
- package/dist/browser/flow-authoring.js +135 -21
- package/dist/browser/flow-change-schema.d.ts +3 -1
- package/dist/browser/flow-change.d.ts +15 -3
- package/dist/browser/flow-change.js +111 -16
- package/dist/browser/{flowChanges-BAMkSaKF.js → flowChanges-T4_R5p1f.js} +3031 -2124
- package/dist/browser/{flowRunInputEditorStore-B2Rw4VsT.js → flowRunInputEditorStore-DJqmR6Qh.js} +3 -2
- package/dist/browser/{flowWorkspace-DxLc1Ybv.js → flowWorkspace-C0J5C0oM.js} +754 -163
- package/dist/browser/{icons-Db2Jb2iX.js → icons-BD3m0RQq.js} +4484 -4370
- package/dist/browser/preview.css +160 -64
- package/dist/browser/preview.js +6487 -5232
- package/dist/browser/ui.css +93 -3
- package/dist/browser/ui.js +8 -5
- package/dist/browser/workbench.css +160 -64
- package/dist/browser/workbench.js +175 -59
- package/dist/browser/{workbenchSelect-C-jf6NIM.js → workbenchSelect-B-PFpF_Q.js} +1 -1
- package/dist/command/index.js +49 -49
- package/dist/common/authoring.d.ts +7 -5
- package/dist/common/authoringExamples.d.ts +3 -3
- package/dist/common/authoringFields.d.ts +20 -0
- package/dist/common/authoringSchema.d.ts +404 -15
- package/dist/common/connectorDecoders.d.ts +2 -1
- package/dist/common/control-api-conformance.js +403 -137
- package/dist/common/control-api.d.ts +70 -7
- package/dist/common/control-api.js +3587 -3428
- package/dist/common/control-requests.d.ts +10 -3
- package/dist/common/control-requests.js +463 -48
- package/dist/common/decision.js +28 -3
- package/dist/common/flow-encoding.d.ts +4 -2
- package/dist/common/flow-encoding.js +144 -10
- package/dist/common/flow-graph.d.ts +1 -1
- package/dist/common/flow-semantics.d.ts +12 -2
- package/dist/common/flow-semantics.js +152 -33
- package/dist/common/integration-trigger.js +28 -3
- package/dist/common/liveDetails.d.ts +26 -11
- package/dist/common/mcp.d.ts +6 -3
- package/dist/common/mcp.js +3541 -3403
- package/dist/common/openapi.js +28 -3
- package/dist/common/poll-trigger.js +28 -3
- package/dist/common/run-events.d.ts +2 -0
- package/dist/common/run-events.js +9 -3
- package/dist/common/scheduler.d.ts +11 -1
- package/dist/common/scheduler.js +216 -48
- package/dist/common/trigger-contract.d.ts +2 -0
- package/dist/common/webhook-trigger.js +28 -3
- package/dist/common/workflow.d.ts +93 -0
- package/dist/common/workflow.js +10491 -0
- package/package.json +5 -1
- package/skills/open-flow/references/flow-authoring.md +26 -16
package/dist/common/openapi.js
CHANGED
|
@@ -6695,6 +6695,7 @@ var port = object$1({
|
|
|
6695
6695
|
nullable: boolean(),
|
|
6696
6696
|
handle: text
|
|
6697
6697
|
});
|
|
6698
|
+
var workflowInputDefs = array(port.strict());
|
|
6698
6699
|
var input = port.extend({ value: json.optional() });
|
|
6699
6700
|
var group = object$1({
|
|
6700
6701
|
collapsed: boolean().optional(),
|
|
@@ -6852,6 +6853,11 @@ var managedFields = object$1({
|
|
|
6852
6853
|
messageHandle: text,
|
|
6853
6854
|
inputs: record$1(text, agentValue)
|
|
6854
6855
|
}).optional()
|
|
6856
|
+
}),
|
|
6857
|
+
strictObject({
|
|
6858
|
+
kind: literal("workflow"),
|
|
6859
|
+
flowId: text,
|
|
6860
|
+
revisionId: text
|
|
6855
6861
|
})
|
|
6856
6862
|
])
|
|
6857
6863
|
});
|
|
@@ -6960,6 +6966,12 @@ var base = {
|
|
|
6960
6966
|
timeoutMs: number().optional()
|
|
6961
6967
|
};
|
|
6962
6968
|
var node = union([
|
|
6969
|
+
strictObject({
|
|
6970
|
+
...base,
|
|
6971
|
+
kind: literal("outputs"),
|
|
6972
|
+
outputDefs: array(port.strict()),
|
|
6973
|
+
outputMappings: inputs
|
|
6974
|
+
}).omit({ inputs: true }),
|
|
6963
6975
|
object$1({
|
|
6964
6976
|
...base,
|
|
6965
6977
|
inputs: record$1(text, never()),
|
|
@@ -6992,6 +7004,11 @@ var node = union([
|
|
|
6992
7004
|
...trigger,
|
|
6993
7005
|
kind: literal("manual")
|
|
6994
7006
|
}),
|
|
7007
|
+
strictObject({
|
|
7008
|
+
...trigger,
|
|
7009
|
+
kind: literal("start"),
|
|
7010
|
+
inputDefs: workflowInputDefs
|
|
7011
|
+
}),
|
|
6995
7012
|
strictObject({
|
|
6996
7013
|
...trigger,
|
|
6997
7014
|
kind: literal("error"),
|
|
@@ -7056,7 +7073,7 @@ var module = object$1({
|
|
|
7056
7073
|
imports: strings,
|
|
7057
7074
|
source: text
|
|
7058
7075
|
});
|
|
7059
|
-
var document = preprocess(
|
|
7076
|
+
var document = preprocess(normalizeDocument, object$1({
|
|
7060
7077
|
bindings: record$1(text, binding),
|
|
7061
7078
|
graph
|
|
7062
7079
|
}));
|
|
@@ -7065,7 +7082,9 @@ object$1({
|
|
|
7065
7082
|
literal(2),
|
|
7066
7083
|
literal(4),
|
|
7067
7084
|
literal(5),
|
|
7068
|
-
literal(6)
|
|
7085
|
+
literal(6),
|
|
7086
|
+
literal(7),
|
|
7087
|
+
literal(8)
|
|
7069
7088
|
]),
|
|
7070
7089
|
document,
|
|
7071
7090
|
modules: record$1(text, module)
|
|
@@ -7073,13 +7092,19 @@ object$1({
|
|
|
7073
7092
|
kind: literal("open-flow-flow-revision"),
|
|
7074
7093
|
version: literal(1)
|
|
7075
7094
|
});
|
|
7076
|
-
function
|
|
7095
|
+
function normalizeDocument(value) {
|
|
7077
7096
|
const candidate = record(value);
|
|
7078
7097
|
if (candidate.tasks !== void 0 && (candidate.tasks === null || typeof candidate.tasks !== "object" || Array.isArray(candidate.tasks) || Object.keys(candidate.tasks).length > 0)) throw new TypeError("Independent Task definitions are no longer supported.");
|
|
7079
7098
|
if (Object.values(record(record(candidate.graph).nodes)).some((candidateNode) => Object.hasOwn(record(candidateNode), "taskId"))) throw new TypeError("Task references are no longer supported.");
|
|
7080
7099
|
const subflows = candidate.subflows;
|
|
7081
7100
|
if (subflows !== void 0 && (subflows === null || typeof subflows !== "object" || Array.isArray(subflows) || Object.keys(subflows).length > 0)) throw new TypeError("Subflows are no longer supported.");
|
|
7082
7101
|
if (Object.values(record(record(candidate.graph).nodes)).some((candidateNode) => record(candidateNode).kind === "subflow")) throw new TypeError("Subflow nodes are no longer supported.");
|
|
7102
|
+
if ([
|
|
7103
|
+
"inputDefs",
|
|
7104
|
+
"outputDefs",
|
|
7105
|
+
"outputMappings"
|
|
7106
|
+
].some((field) => Object.hasOwn(candidate, field))) throw new TypeError("Workflow interface configuration must belong to Start and Outputs nodes.");
|
|
7107
|
+
if (Object.values(record(record(candidate.graph).nodes)).some((candidateNode) => record(candidateNode).kind == "start" && Object.hasOwn(record(candidateNode), "parameters"))) throw new TypeError("Legacy Start.parameters is unsupported; configure node.inputDefs.");
|
|
7083
7108
|
return value;
|
|
7084
7109
|
}
|
|
7085
7110
|
function record(value) {
|
|
@@ -6702,6 +6702,7 @@ var port = object({
|
|
|
6702
6702
|
nullable: boolean(),
|
|
6703
6703
|
handle: text
|
|
6704
6704
|
});
|
|
6705
|
+
var workflowInputDefs = array(port.strict());
|
|
6705
6706
|
var input = port.extend({ value: json.optional() });
|
|
6706
6707
|
var group = object({
|
|
6707
6708
|
collapsed: boolean().optional(),
|
|
@@ -6859,6 +6860,11 @@ var managedFields = object({
|
|
|
6859
6860
|
messageHandle: text,
|
|
6860
6861
|
inputs: record$1(text, agentValue)
|
|
6861
6862
|
}).optional()
|
|
6863
|
+
}),
|
|
6864
|
+
strictObject({
|
|
6865
|
+
kind: literal("workflow"),
|
|
6866
|
+
flowId: text,
|
|
6867
|
+
revisionId: text
|
|
6862
6868
|
})
|
|
6863
6869
|
])
|
|
6864
6870
|
});
|
|
@@ -6967,6 +6973,12 @@ var base = {
|
|
|
6967
6973
|
timeoutMs: number().optional()
|
|
6968
6974
|
};
|
|
6969
6975
|
var node = union([
|
|
6976
|
+
strictObject({
|
|
6977
|
+
...base,
|
|
6978
|
+
kind: literal("outputs"),
|
|
6979
|
+
outputDefs: array(port.strict()),
|
|
6980
|
+
outputMappings: inputs
|
|
6981
|
+
}).omit({ inputs: true }),
|
|
6970
6982
|
object({
|
|
6971
6983
|
...base,
|
|
6972
6984
|
inputs: record$1(text, never()),
|
|
@@ -6999,6 +7011,11 @@ var node = union([
|
|
|
6999
7011
|
...trigger,
|
|
7000
7012
|
kind: literal("manual")
|
|
7001
7013
|
}),
|
|
7014
|
+
strictObject({
|
|
7015
|
+
...trigger,
|
|
7016
|
+
kind: literal("start"),
|
|
7017
|
+
inputDefs: workflowInputDefs
|
|
7018
|
+
}),
|
|
7002
7019
|
strictObject({
|
|
7003
7020
|
...trigger,
|
|
7004
7021
|
kind: literal("error"),
|
|
@@ -7063,7 +7080,7 @@ var module = object({
|
|
|
7063
7080
|
imports: strings,
|
|
7064
7081
|
source: text
|
|
7065
7082
|
});
|
|
7066
|
-
var document = preprocess(
|
|
7083
|
+
var document = preprocess(normalizeDocument, object({
|
|
7067
7084
|
bindings: record$1(text, binding),
|
|
7068
7085
|
graph
|
|
7069
7086
|
}));
|
|
@@ -7072,7 +7089,9 @@ object({
|
|
|
7072
7089
|
literal(2),
|
|
7073
7090
|
literal(4),
|
|
7074
7091
|
literal(5),
|
|
7075
|
-
literal(6)
|
|
7092
|
+
literal(6),
|
|
7093
|
+
literal(7),
|
|
7094
|
+
literal(8)
|
|
7076
7095
|
]),
|
|
7077
7096
|
document,
|
|
7078
7097
|
modules: record$1(text, module)
|
|
@@ -7080,13 +7099,19 @@ object({
|
|
|
7080
7099
|
kind: literal("open-flow-flow-revision"),
|
|
7081
7100
|
version: literal(1)
|
|
7082
7101
|
});
|
|
7083
|
-
function
|
|
7102
|
+
function normalizeDocument(value) {
|
|
7084
7103
|
const candidate = record(value);
|
|
7085
7104
|
if (candidate.tasks !== void 0 && (candidate.tasks === null || typeof candidate.tasks !== "object" || Array.isArray(candidate.tasks) || Object.keys(candidate.tasks).length > 0)) throw new TypeError("Independent Task definitions are no longer supported.");
|
|
7086
7105
|
if (Object.values(record(record(candidate.graph).nodes)).some((candidateNode) => Object.hasOwn(record(candidateNode), "taskId"))) throw new TypeError("Task references are no longer supported.");
|
|
7087
7106
|
const subflows = candidate.subflows;
|
|
7088
7107
|
if (subflows !== void 0 && (subflows === null || typeof subflows !== "object" || Array.isArray(subflows) || Object.keys(subflows).length > 0)) throw new TypeError("Subflows are no longer supported.");
|
|
7089
7108
|
if (Object.values(record(record(candidate.graph).nodes)).some((candidateNode) => record(candidateNode).kind === "subflow")) throw new TypeError("Subflow nodes are no longer supported.");
|
|
7109
|
+
if ([
|
|
7110
|
+
"inputDefs",
|
|
7111
|
+
"outputDefs",
|
|
7112
|
+
"outputMappings"
|
|
7113
|
+
].some((field) => Object.hasOwn(candidate, field))) throw new TypeError("Workflow interface configuration must belong to Start and Outputs nodes.");
|
|
7114
|
+
if (Object.values(record(record(candidate.graph).nodes)).some((candidateNode) => record(candidateNode).kind == "start" && Object.hasOwn(record(candidateNode), "parameters"))) throw new TypeError("Legacy Start.parameters is unsupported; configure node.inputDefs.");
|
|
7090
7115
|
return value;
|
|
7091
7116
|
}
|
|
7092
7117
|
function record(value) {
|
|
@@ -6,4 +6,6 @@ export type ProjectedRunEvent = {
|
|
|
6
6
|
readonly kind: 'node.artifact' | 'node.failed' | 'node.log' | 'node.progress' | 'node.started' | 'run.progress' | 'run.started';
|
|
7
7
|
readonly payload: Readonly<Record<string, unknown>>;
|
|
8
8
|
};
|
|
9
|
+
/** Stable public identity shared by events and durable workflow-call provenance. */
|
|
10
|
+
export declare function projectExecutionId(platformRunId: string, rawRunId: string, jobId: string): Promise<string>;
|
|
9
11
|
export declare function createEventProjector(platformRunId: string, nodeFailureCodes: ReadonlySet<string>): (event: unknown) => Promise<ProjectedRunEvent | undefined>;
|
|
@@ -10,7 +10,9 @@ var nodeKinds = /* @__PURE__ */ new Set([
|
|
|
10
10
|
"openapi",
|
|
11
11
|
"llm",
|
|
12
12
|
"value",
|
|
13
|
-
"wait"
|
|
13
|
+
"wait",
|
|
14
|
+
"outputs",
|
|
15
|
+
"workflow"
|
|
14
16
|
]);
|
|
15
17
|
function object(value, description) {
|
|
16
18
|
if (value == null || typeof value != "object" || Array.isArray(value)) throw new TypeError(`${description} must be an object.`);
|
|
@@ -36,12 +38,16 @@ function nodeContext(event, flows, platformRunId) {
|
|
|
36
38
|
const flowId = flows.get(rawRunId);
|
|
37
39
|
if (flowId == null) throw new TypeError("Runtime node event preceded its run.started event.");
|
|
38
40
|
return {
|
|
39
|
-
executionId:
|
|
41
|
+
executionId: projectExecutionId(platformRunId, rawRunId, string(event.jobId, "Runtime node event jobId")),
|
|
40
42
|
flowId,
|
|
41
43
|
nodeId: string(event.nodeId, "Runtime node event nodeId"),
|
|
42
44
|
rawRunId
|
|
43
45
|
};
|
|
44
46
|
}
|
|
47
|
+
/** Stable public identity shared by events and durable workflow-call provenance. */
|
|
48
|
+
function projectExecutionId(platformRunId, rawRunId, jobId) {
|
|
49
|
+
return opaqueId("execution", platformRunId, rawRunId, jobId);
|
|
50
|
+
}
|
|
45
51
|
async function opaqueId(prefix, ...parts) {
|
|
46
52
|
const bytes = encoder.encode(JSON.stringify([
|
|
47
53
|
1,
|
|
@@ -227,4 +233,4 @@ function createEventProjector(platformRunId, nodeFailureCodes) {
|
|
|
227
233
|
};
|
|
228
234
|
}
|
|
229
235
|
//#endregion
|
|
230
|
-
export { createEventProjector };
|
|
236
|
+
export { createEventProjector, projectExecutionId };
|
|
@@ -3,6 +3,7 @@ import type { PreparedFlow } from './flow-semantics.js';
|
|
|
3
3
|
import type { PreviousNode } from '../index.js';
|
|
4
4
|
import type { AgentCheckpoint } from './runtime-contract.js';
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
|
+
export declare const withWaitNotificationMessage: (value: JsonValue) => JsonValue;
|
|
6
7
|
export declare const normalizeWaitComment: (value?: string | null) => string | null;
|
|
7
8
|
export interface WaitResolution {
|
|
8
9
|
readonly action: WaitAction;
|
|
@@ -27,7 +28,7 @@ export type SchedulerEvent = {
|
|
|
27
28
|
readonly inputs: Readonly<Record<string, JsonValue>>;
|
|
28
29
|
readonly jobId: string;
|
|
29
30
|
readonly nodeId: string;
|
|
30
|
-
readonly nodeKind: 'agent' | 'approval' | 'condition' | 'connector' | 'decision' | 'javascript' | 'openapi' | 'llm' | 'value' | 'wait';
|
|
31
|
+
readonly nodeKind: 'agent' | 'approval' | 'condition' | 'connector' | 'decision' | 'javascript' | 'openapi' | 'llm' | 'value' | 'wait' | 'outputs' | 'workflow';
|
|
31
32
|
readonly nodeTitle?: string;
|
|
32
33
|
readonly runId: string;
|
|
33
34
|
readonly type: 'node.started';
|
|
@@ -65,6 +66,7 @@ export type SchedulerEvent = {
|
|
|
65
66
|
};
|
|
66
67
|
export interface FlowRunResult {
|
|
67
68
|
readonly kind: 'node-results';
|
|
69
|
+
readonly outputs?: Readonly<Record<string, JsonValue>>;
|
|
68
70
|
readonly nodes: readonly {
|
|
69
71
|
readonly nodeId: string;
|
|
70
72
|
readonly status: 'completed';
|
|
@@ -123,7 +125,14 @@ interface DependencyState {
|
|
|
123
125
|
jobId?: string;
|
|
124
126
|
seeded: boolean;
|
|
125
127
|
}
|
|
128
|
+
export interface PendingWorkflowCall {
|
|
129
|
+
readonly jobId: string;
|
|
130
|
+
readonly nodeId: string;
|
|
131
|
+
readonly childRunId: string;
|
|
132
|
+
readonly input: Readonly<Record<string, JsonValue>>;
|
|
133
|
+
}
|
|
126
134
|
export interface FlowRunCheckpoint {
|
|
135
|
+
readonly calls?: readonly PendingWorkflowCall[];
|
|
127
136
|
readonly bindingValues: Readonly<Record<string, string>>;
|
|
128
137
|
readonly inputs: Readonly<Record<string, Readonly<Record<string, JsonValue>>>>;
|
|
129
138
|
readonly results: Readonly<Record<string, {
|
|
@@ -147,6 +156,7 @@ export type FlowRunOutcome = FlowRunResult | {
|
|
|
147
156
|
readonly remainingMs?: number;
|
|
148
157
|
};
|
|
149
158
|
interface TaskInvocationBase {
|
|
159
|
+
readonly workflowRunId?: string;
|
|
150
160
|
readonly agent?: {
|
|
151
161
|
readonly action: 'approve' | 'reject';
|
|
152
162
|
readonly checkpoint: AgentCheckpoint;
|