@oomol-lab/open-flow 0.1.0-beta.65 → 0.1.0-beta.67

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.
Files changed (54) hide show
  1. package/dist/browser/{createResourceDialog-BAJXbzNH.js → createResourceDialog-BQVD8Rqb.js} +2 -2
  2. package/dist/browser/{icons-Db2Jb2iX.js → dialog-CS2Vt2if.js} +5736 -5621
  3. package/dist/browser/event-sources.d.ts +4 -1
  4. package/dist/browser/flow-authoring-node.d.ts +14 -3
  5. package/dist/browser/flow-authoring.js +120 -24
  6. package/dist/browser/flow-change-schema.d.ts +3 -1
  7. package/dist/browser/flow-change.d.ts +15 -3
  8. package/dist/browser/flow-change.js +117 -21
  9. package/dist/browser/{flowChanges-DkvG5uDq.js → flowChanges-VB9Y4iy7.js} +3423 -2380
  10. package/dist/browser/{flowRunInputEditorStore-B2Rw4VsT.js → flowRunInputEditorStore-DJqmR6Qh.js} +3 -2
  11. package/dist/browser/{flowWorkspace-BEp-lxqF.js → flowWorkspace-C1hlTnZq.js} +1410 -799
  12. package/dist/browser/preview.css +273 -119
  13. package/dist/browser/preview.js +17118 -15810
  14. package/dist/browser/theme.css +1 -0
  15. package/dist/browser/ui.css +119 -7
  16. package/dist/browser/ui.js +8 -5
  17. package/dist/browser/workbench-contract.d.ts +1 -1
  18. package/dist/browser/workbench.css +282 -162
  19. package/dist/browser/workbench.d.ts +0 -1
  20. package/dist/browser/workbench.js +503 -173
  21. package/dist/browser/{workbenchSelect-C-jf6NIM.js → workbenchSelect-CpXhjUou.js} +1 -1
  22. package/dist/command/index.js +49 -49
  23. package/dist/common/authoring.d.ts +7 -5
  24. package/dist/common/authoringExamples.d.ts +4 -4
  25. package/dist/common/authoringFields.d.ts +20 -0
  26. package/dist/common/authoringSchema.d.ts +404 -15
  27. package/dist/common/control-api-conformance.js +415 -146
  28. package/dist/common/control-api.d.ts +67 -8
  29. package/dist/common/control-api.js +3587 -3443
  30. package/dist/common/control-requests.d.ts +10 -3
  31. package/dist/common/control-requests.js +425 -49
  32. package/dist/common/decision.js +33 -7
  33. package/dist/common/flow-encoding.d.ts +4 -2
  34. package/dist/common/flow-encoding.js +151 -14
  35. package/dist/common/flow-graph.d.ts +1 -1
  36. package/dist/common/flow-semantics.d.ts +12 -2
  37. package/dist/common/flow-semantics.js +157 -41
  38. package/dist/common/integration-trigger.js +33 -7
  39. package/dist/common/liveDetails.d.ts +26 -11
  40. package/dist/common/mcp.d.ts +6 -3
  41. package/dist/common/mcp.js +219 -90
  42. package/dist/common/openapi.js +33 -7
  43. package/dist/common/poll-trigger.js +33 -7
  44. package/dist/common/run-events.d.ts +2 -0
  45. package/dist/common/run-events.js +9 -3
  46. package/dist/common/scheduler.d.ts +10 -1
  47. package/dist/common/scheduler.js +172 -49
  48. package/dist/common/trigger-contract.d.ts +2 -0
  49. package/dist/common/webhook-trigger.js +33 -7
  50. package/dist/common/workflow.d.ts +93 -0
  51. package/dist/common/workflow.js +10492 -0
  52. package/package.json +5 -1
  53. package/skills/open-flow/SKILL.md +9 -0
  54. package/skills/open-flow/references/flow-authoring.md +28 -16
@@ -5810,6 +5810,7 @@ function webhookSupportsBody(method) {
5810
5810
  return method !== "GET";
5811
5811
  }
5812
5812
  var text = string();
5813
+ var actionConnection = text.describe("Account selection: omit while unconfigured; use an account ID to select it; use \"\" to explicitly defer configuration. Deferred Actions fail if called; deferred Agent tools are excluded from the callable tool set. Not supported by Triggers.");
5813
5814
  var json = json$1();
5814
5815
  var strings = array(text);
5815
5816
  var port = object({
@@ -5818,6 +5819,7 @@ var port = object({
5818
5819
  nullable: boolean(),
5819
5820
  handle: text
5820
5821
  });
5822
+ var workflowInputDefs = array(port.strict());
5821
5823
  var input = port.extend({ value: json.optional() });
5822
5824
  var group = object({
5823
5825
  collapsed: boolean().optional(),
@@ -5864,7 +5866,7 @@ var capability = union([
5864
5866
  mode: literal("independent"),
5865
5867
  actions: array(strictObject({
5866
5868
  action: text,
5867
- connectionId: text.optional()
5869
+ connectionId: actionConnection.optional()
5868
5870
  }))
5869
5871
  }),
5870
5872
  strictObject({
@@ -5924,7 +5926,7 @@ var managedFields = object({
5924
5926
  object({
5925
5927
  kind: literal("connector"),
5926
5928
  action: text,
5927
- connectionId: text.optional(),
5929
+ connectionId: actionConnection.optional(),
5928
5930
  outputMode: literal("value").optional()
5929
5931
  }),
5930
5932
  object({
@@ -5964,17 +5966,22 @@ var managedFields = object({
5964
5966
  name: text,
5965
5967
  description: text,
5966
5968
  action: text,
5967
- connectionId: text.optional(),
5969
+ connectionId: actionConnection.optional(),
5968
5970
  approval: boolean(),
5969
5971
  inputs: array(input.extend({ source: agentInput }))
5970
5972
  })),
5971
5973
  notification: object({
5972
5974
  action: text,
5973
- connectionId: text.optional(),
5975
+ connectionId: actionConnection.optional(),
5974
5976
  inputDefinitions: array(input),
5975
5977
  messageHandle: text,
5976
5978
  inputs: record$1(text, agentValue)
5977
5979
  }).optional()
5980
+ }),
5981
+ strictObject({
5982
+ kind: literal("workflow"),
5983
+ flowId: text,
5984
+ revisionId: text
5978
5985
  })
5979
5986
  ])
5980
5987
  });
@@ -6083,6 +6090,12 @@ var base = {
6083
6090
  timeoutMs: number().optional()
6084
6091
  };
6085
6092
  var node = union([
6093
+ strictObject({
6094
+ ...base,
6095
+ kind: literal("outputs"),
6096
+ outputDefs: array(port.strict()),
6097
+ outputMappings: inputs
6098
+ }).omit({ inputs: true }),
6086
6099
  object({
6087
6100
  ...base,
6088
6101
  inputs: record$1(text, never()),
@@ -6115,6 +6128,11 @@ var node = union([
6115
6128
  ...trigger,
6116
6129
  kind: literal("manual")
6117
6130
  }),
6131
+ strictObject({
6132
+ ...trigger,
6133
+ kind: literal("start"),
6134
+ inputDefs: workflowInputDefs
6135
+ }),
6118
6136
  strictObject({
6119
6137
  ...trigger,
6120
6138
  kind: literal("error"),
@@ -6179,7 +6197,7 @@ var module = object({
6179
6197
  imports: strings,
6180
6198
  source: text
6181
6199
  });
6182
- var document = preprocess(rejectRetiredDefinitions, object({
6200
+ var document = preprocess(normalizeDocument, object({
6183
6201
  bindings: record$1(text, binding),
6184
6202
  graph
6185
6203
  }));
@@ -6188,7 +6206,9 @@ object({
6188
6206
  literal(2),
6189
6207
  literal(4),
6190
6208
  literal(5),
6191
- literal(6)
6209
+ literal(6),
6210
+ literal(7),
6211
+ literal(8)
6192
6212
  ]),
6193
6213
  document,
6194
6214
  modules: record$1(text, module)
@@ -6196,13 +6216,19 @@ object({
6196
6216
  kind: literal("open-flow-flow-revision"),
6197
6217
  version: literal(1)
6198
6218
  });
6199
- function rejectRetiredDefinitions(value) {
6219
+ function normalizeDocument(value) {
6200
6220
  const candidate = record(value);
6201
6221
  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
6222
  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
6223
  const subflows = candidate.subflows;
6204
6224
  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
6225
  if (Object.values(record(record(candidate.graph).nodes)).some((candidateNode) => record(candidateNode).kind === "subflow")) throw new TypeError("Subflow nodes are no longer supported.");
6226
+ if ([
6227
+ "inputDefs",
6228
+ "outputDefs",
6229
+ "outputMappings"
6230
+ ].some((field) => Object.hasOwn(candidate, field))) throw new TypeError("Workflow interface configuration must belong to Start and Outputs nodes.");
6231
+ 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
6232
  return value;
6207
6233
  }
6208
6234
  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>;