@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
|
@@ -5818,6 +5818,7 @@ var port = object({
|
|
|
5818
5818
|
nullable: boolean(),
|
|
5819
5819
|
handle: text
|
|
5820
5820
|
});
|
|
5821
|
+
var workflowInputDefs = array(port.strict());
|
|
5821
5822
|
var input = port.extend({ value: json.optional() });
|
|
5822
5823
|
var group = object({
|
|
5823
5824
|
collapsed: boolean().optional(),
|
|
@@ -5975,6 +5976,11 @@ var managedFields = object({
|
|
|
5975
5976
|
messageHandle: text,
|
|
5976
5977
|
inputs: record$1(text, agentValue)
|
|
5977
5978
|
}).optional()
|
|
5979
|
+
}),
|
|
5980
|
+
strictObject({
|
|
5981
|
+
kind: literal("workflow"),
|
|
5982
|
+
flowId: text,
|
|
5983
|
+
revisionId: text
|
|
5978
5984
|
})
|
|
5979
5985
|
])
|
|
5980
5986
|
});
|
|
@@ -6083,6 +6089,12 @@ var base = {
|
|
|
6083
6089
|
timeoutMs: number().optional()
|
|
6084
6090
|
};
|
|
6085
6091
|
var node = union([
|
|
6092
|
+
strictObject({
|
|
6093
|
+
...base,
|
|
6094
|
+
kind: literal("outputs"),
|
|
6095
|
+
outputDefs: array(port.strict()),
|
|
6096
|
+
outputMappings: inputs
|
|
6097
|
+
}).omit({ inputs: true }),
|
|
6086
6098
|
object({
|
|
6087
6099
|
...base,
|
|
6088
6100
|
inputs: record$1(text, never()),
|
|
@@ -6115,6 +6127,11 @@ var node = union([
|
|
|
6115
6127
|
...trigger,
|
|
6116
6128
|
kind: literal("manual")
|
|
6117
6129
|
}),
|
|
6130
|
+
strictObject({
|
|
6131
|
+
...trigger,
|
|
6132
|
+
kind: literal("start"),
|
|
6133
|
+
inputDefs: workflowInputDefs
|
|
6134
|
+
}),
|
|
6118
6135
|
strictObject({
|
|
6119
6136
|
...trigger,
|
|
6120
6137
|
kind: literal("error"),
|
|
@@ -6179,7 +6196,7 @@ var module = object({
|
|
|
6179
6196
|
imports: strings,
|
|
6180
6197
|
source: text
|
|
6181
6198
|
});
|
|
6182
|
-
var document = preprocess(
|
|
6199
|
+
var document = preprocess(normalizeDocument, object({
|
|
6183
6200
|
bindings: record$1(text, binding),
|
|
6184
6201
|
graph
|
|
6185
6202
|
}));
|
|
@@ -6188,7 +6205,9 @@ object({
|
|
|
6188
6205
|
literal(2),
|
|
6189
6206
|
literal(4),
|
|
6190
6207
|
literal(5),
|
|
6191
|
-
literal(6)
|
|
6208
|
+
literal(6),
|
|
6209
|
+
literal(7),
|
|
6210
|
+
literal(8)
|
|
6192
6211
|
]),
|
|
6193
6212
|
document,
|
|
6194
6213
|
modules: record$1(text, module)
|
|
@@ -6196,13 +6215,19 @@ object({
|
|
|
6196
6215
|
kind: literal("open-flow-flow-revision"),
|
|
6197
6216
|
version: literal(1)
|
|
6198
6217
|
});
|
|
6199
|
-
function
|
|
6218
|
+
function normalizeDocument(value) {
|
|
6200
6219
|
const candidate = record(value);
|
|
6201
6220
|
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.");
|
|
6202
6221
|
if (Object.values(record(record(candidate.graph).nodes)).some((candidateNode) => Object.hasOwn(record(candidateNode), "taskId"))) throw new TypeError("Task references are no longer supported.");
|
|
6203
6222
|
const subflows = candidate.subflows;
|
|
6204
6223
|
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.");
|
|
6205
6224
|
if (Object.values(record(record(candidate.graph).nodes)).some((candidateNode) => record(candidateNode).kind === "subflow")) throw new TypeError("Subflow nodes are no longer supported.");
|
|
6225
|
+
if ([
|
|
6226
|
+
"inputDefs",
|
|
6227
|
+
"outputDefs",
|
|
6228
|
+
"outputMappings"
|
|
6229
|
+
].some((field) => Object.hasOwn(candidate, field))) throw new TypeError("Workflow interface configuration must belong to Start and Outputs nodes.");
|
|
6230
|
+
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.");
|
|
6206
6231
|
return value;
|
|
6207
6232
|
}
|
|
6208
6233
|
function record(value) {
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import type { TaskNode, ManagedTaskDefinition, Port, JsonValue, RevisionContent } from '../browser/flow-change.js';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export interface WorkflowExecutor {
|
|
4
|
+
readonly kind: 'workflow';
|
|
5
|
+
readonly flowId: string;
|
|
6
|
+
readonly revisionId: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const publishedWorkflowInterfaceSchema: z.ZodObject<{
|
|
9
|
+
inputs: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
10
|
+
handle: z.ZodString;
|
|
11
|
+
jsonSchema: z.ZodType<JsonValue>;
|
|
12
|
+
nullable: z.ZodBoolean;
|
|
13
|
+
description: z.ZodOptional<z.ZodString>;
|
|
14
|
+
}, z.core.$strip>>>;
|
|
15
|
+
outputs: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
16
|
+
handle: z.ZodString;
|
|
17
|
+
jsonSchema: z.ZodType<JsonValue>;
|
|
18
|
+
nullable: z.ZodBoolean;
|
|
19
|
+
description: z.ZodOptional<z.ZodString>;
|
|
20
|
+
}, z.core.$strip>>>;
|
|
21
|
+
}, z.core.$strict>;
|
|
22
|
+
export type PublishedWorkflowInterface = z.infer<typeof publishedWorkflowInterfaceSchema>;
|
|
23
|
+
/** The callable interface of one fixed definition; absence differs from empty ports. */
|
|
24
|
+
export declare function publishedWorkflowInterface(content: Pick<RevisionContent, 'document'>): PublishedWorkflowInterface;
|
|
25
|
+
export declare function sameWorkflowInterface(left: PublishedWorkflowInterface, right: PublishedWorkflowInterface): boolean;
|
|
26
|
+
export declare const workflowContractSchema: z.ZodObject<{
|
|
27
|
+
version: z.ZodLiteral<1>;
|
|
28
|
+
flowId: z.ZodString;
|
|
29
|
+
name: z.ZodString;
|
|
30
|
+
revisionId: z.ZodString;
|
|
31
|
+
publicationId: z.ZodString;
|
|
32
|
+
inputs: z.ZodArray<z.ZodObject<{
|
|
33
|
+
handle: z.ZodString;
|
|
34
|
+
jsonSchema: z.ZodType<JsonValue>;
|
|
35
|
+
nullable: z.ZodBoolean;
|
|
36
|
+
description: z.ZodOptional<z.ZodString>;
|
|
37
|
+
}, z.core.$strip>>;
|
|
38
|
+
outputs: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
39
|
+
handle: z.ZodString;
|
|
40
|
+
jsonSchema: z.ZodType<JsonValue>;
|
|
41
|
+
nullable: z.ZodBoolean;
|
|
42
|
+
description: z.ZodOptional<z.ZodString>;
|
|
43
|
+
}, z.core.$strip>>>;
|
|
44
|
+
}, z.core.$strip>;
|
|
45
|
+
export type WorkflowContract = z.infer<typeof workflowContractSchema>;
|
|
46
|
+
export interface WorkflowCandidate {
|
|
47
|
+
readonly flowId: string;
|
|
48
|
+
readonly name: string;
|
|
49
|
+
readonly problem: 'unpublished' | 'disabled' | 'retiring' | 'recursive' | 'missing-start' | null;
|
|
50
|
+
}
|
|
51
|
+
/** Classify only list metadata; opening the selector does not inspect a Revision. */
|
|
52
|
+
export declare function workflowCandidate(flow: {
|
|
53
|
+
flowId: string;
|
|
54
|
+
name: string;
|
|
55
|
+
status: string;
|
|
56
|
+
live?: {
|
|
57
|
+
enabled: boolean;
|
|
58
|
+
hasStart: boolean;
|
|
59
|
+
} | null;
|
|
60
|
+
}, sourceFlowId?: string): WorkflowCandidate;
|
|
61
|
+
export declare function workflowCandidateGroup(candidate: WorkflowCandidate): 'published' | 'missingStart' | 'other';
|
|
62
|
+
/** A selected target is durable even before its callable interface is available. */
|
|
63
|
+
export declare function workflowSelectionTask(candidate: Pick<WorkflowCandidate, 'flowId' | 'name'>, contract?: WorkflowContract, previous?: ManagedTaskDefinition): ManagedTaskDefinition;
|
|
64
|
+
export declare function workflowTask(contract: WorkflowContract, name?: string): ManagedTaskDefinition;
|
|
65
|
+
export declare function workflowPorts(ports: readonly Port[]): WorkflowContract['inputs'];
|
|
66
|
+
export declare function workflowCompatibility(node: TaskNode, contract: WorkflowContract, previous?: PublishedWorkflowInterface): readonly {
|
|
67
|
+
side: 'revision' | 'input' | 'output';
|
|
68
|
+
field: string;
|
|
69
|
+
message: string;
|
|
70
|
+
reason?: 'snapshot-missing' | 'interface-required' | 'revision-stale';
|
|
71
|
+
}[];
|
|
72
|
+
/** Refresh capability ports by exact name; removed outputs remain unresolved at consumers. */
|
|
73
|
+
export declare function withWorkflowTask(node: TaskNode, task: ManagedTaskDefinition): TaskNode;
|
|
74
|
+
export declare const workflowReferencesSchema: z.ZodObject<{
|
|
75
|
+
version: z.ZodLiteral<1>;
|
|
76
|
+
direction: z.ZodEnum<{
|
|
77
|
+
incoming: "incoming";
|
|
78
|
+
outgoing: "outgoing";
|
|
79
|
+
}>;
|
|
80
|
+
total: z.ZodInt;
|
|
81
|
+
nextOffset: z.ZodOptional<z.ZodInt>;
|
|
82
|
+
references: z.ZodArray<z.ZodObject<{
|
|
83
|
+
flowId: z.ZodString;
|
|
84
|
+
name: z.ZodNullable<z.ZodString>;
|
|
85
|
+
available: z.ZodBoolean;
|
|
86
|
+
draft: z.ZodBoolean;
|
|
87
|
+
live: z.ZodNullable<z.ZodObject<{
|
|
88
|
+
publicationId: z.ZodString;
|
|
89
|
+
enabled: z.ZodBoolean;
|
|
90
|
+
}, z.core.$strip>>;
|
|
91
|
+
}, z.core.$strip>>;
|
|
92
|
+
}, z.core.$strip>;
|
|
93
|
+
export type WorkflowReferences = z.infer<typeof workflowReferencesSchema>;
|