@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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oomol-lab/open-flow",
3
- "version": "0.1.0-beta.65",
3
+ "version": "0.1.0-beta.67",
4
4
  "description": "TypeScript contracts and Browser runtime for Open Flow.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -29,6 +29,10 @@
29
29
  "types": "./dist/common/openapi.d.ts",
30
30
  "import": "./dist/common/openapi.js"
31
31
  },
32
+ "./workflow": {
33
+ "types": "./dist/common/workflow.d.ts",
34
+ "import": "./dist/common/workflow.js"
35
+ },
32
36
  "./connector-action": {
33
37
  "types": "./dist/common/connector-action.d.ts",
34
38
  "import": "./dist/common/connector-action.js"
@@ -14,6 +14,15 @@ Consult the references relevant to the task:
14
14
  - [n8n conversion](references/flow-n8n-conversion.md): represent collections,
15
15
  branches, provider operations and state while preserving source behavior.
16
16
 
17
+ Keep generated Flow and node names short enough to scan on the canvas. Aim for
18
+ 2–4 English words or 4–8 Chinese characters, using the user's language unless
19
+ the workflow has an established naming language. Name a Flow by its main purpose
20
+ and a node by its action and object, such as `AI Trend Digest`, `Fetch trends`,
21
+ `Verify sources`, or `发布文章`. Keep only qualifiers needed to distinguish similar
22
+ nodes. Put detailed behavior in descriptions; avoid sentences, repeated workflow
23
+ context, and obscure abbreviations. Preserve names explicitly supplied by the
24
+ user, and do not rename unrelated existing nodes.
25
+
17
26
  <!-- agentic:if localDevelopment -->
18
27
 
19
28
  Run commands from this repository's root. The development CLI connects to the
@@ -106,7 +106,7 @@ Absence, explicit null, an unset binding and an inherited default are distinct.
106
106
 
107
107
  ### Connect execution and data
108
108
 
109
- This complete edit adds a Manual Trigger, a calculation, and a formatter. It
109
+ This complete edit adds a Start node, a calculation, and a formatter. It
110
110
  needs no Connector or model. `total` is a business output; `amount` is a named
111
111
  input whose binding reads it. Both execution edges and data bindings are visible.
112
112
 
@@ -115,7 +115,7 @@ input whose binding reads it. Both execution edges and data bindings are visible
115
115
  "baseRevision": "REVISION",
116
116
  "requestId": "example-code-and-data",
117
117
  "edits": [
118
- { "op": "node.add", "as": "start", "type": "manual", "name": "Start" },
118
+ { "op": "node.add", "as": "start", "type": "start", "name": "Start" },
119
119
  {
120
120
  "op": "node.add",
121
121
  "as": "calculate",
@@ -151,6 +151,13 @@ Common sources are `{"kind":"value","value":...}`,
151
151
  `{"kind":"variable","name":"VARIABLE"}`. An output source may omit `port`
152
152
  when there is one output, or select a nested `field`. Each node schema advertises
153
153
  supported sources. A Trigger cannot read downstream results before the Run starts.
154
+
155
+ For workflow business outputs, add one `outputs` node with `config.outputDefs` as a named schema/nullable/description map. Set sources with `node.add.inputs` or `input.set` and connect execution predecessors. Outputs owns its definitions and mappings; deleting it removes both. Node details expose definitions and inputs. Run results expose business `outputs` separately from node logs. A `workflow` node with `config: { "flowId": "TARGET_FLOW_ID" }` calls the target's current enabled Live with Start. Published interface snapshots supply its ports. A changed Revision with the same interface remains callable; changed interfaces require `node.refresh`. Snapshot comparison ignores descriptions and port ordering, but preserves schema, nullability and node-presence differences.
156
+
157
+ Workflow target selection may retain an owned unpublished or disabled Flow. Without a loaded interface,
158
+ the call stores an empty source revision; checks report the target problem or missing interface.
159
+ After the target becomes available, `node.refresh` loads its current Live contract. Selection and
160
+ workflow-call checks do not validate Start presence. Start remains required at actual Live invocation.
154
161
  Schema `{}` accepts dynamic JSON; it does not convert objects or arrays into text.
155
162
 
156
163
  ### Change one prompt rule
@@ -282,15 +289,18 @@ unavailable action and an action lacking an active Connection are different
282
289
  problems. Actions marked `authenticated: false` need no account. Connection
283
290
  selection rules come from the selected node contract.
284
291
 
285
- | Capability | Relevant schema and configuration |
286
- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
287
- | Provider read or write | `connector`: discovered `action`, optional `connectionId`, named input bindings. |
288
- | Provider event | `poll` or `integration`: discovered `key`, Connection and any static inputs; polling also has a schedule. |
289
- | Manual, HTTP or scheduled entry | `manual`, `webhook`, `cron`: business payload fields or schedule. A Manual Trigger has no output parameters. |
290
- | Workflow failure handler | `error`: published upstream Flows' automatic Run failures; not a node-level catch or a handler for manual Run failures. |
291
- | Fixed HTTP operation | `openapi`: an OpenAPI source, path and method; resolved authentication choices and ports appear in node details. |
292
- | Reusable constants | `value`: named JSON values and optional output constraints. |
293
- | Durable interaction | `wait`, `approval`: prompt and named inputs; resume through the Run's Wait ID. |
292
+ For Connector Tasks, independent Code Actions, Agent tools and notifications, an omitted `connectionId` means unconfigured; `connectionId: ""` explicitly defers account configuration. Deferred selections pass account readiness checks but fail with `connector.connection-required` if invoked. Deferred Agent tools are excluded from the callable tool set. Provider Triggers still require a nonempty account ID. Public edits and portable exports preserve the empty string; clear the field to return to the unconfigured state.
293
+
294
+ | Capability | Relevant schema and configuration |
295
+ | ------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
296
+ | Provider read or write | `connector`: discovered `action`, optional `connectionId`, named input bindings. |
297
+ | Provider event | `poll` or `integration`: discovered `key`, Connection and any static inputs; polling also has a schedule. |
298
+ | Manual, HTTP or scheduled entry | `start`, `webhook`, `cron`: workflow `inputDefs`, HTTP body fields, or schedule. |
299
+ | Workflow failure handler | `error`: published upstream Flows' automatic Run failures; not a node-level catch or a handler for manual Run failures. |
300
+ | Call another workflow | `workflow`: select an owned published Flow ID; inputs and outputs derive from its saved contract. Use `node.refresh` to update it. |
301
+ | Fixed HTTP operation | `openapi`: an OpenAPI source, path and method; resolved authentication choices and ports appear in node details. |
302
+ | Reusable constants | `value`: named JSON values and optional output constraints. |
303
+ | Durable interaction | `wait`, `approval`: prompt and named inputs; resume through the Run's Wait ID. |
294
304
 
295
305
  Connector and LLM services are configured on the Server. Missing capabilities
296
306
  should be described in terms of the required operation or event, without silently
@@ -311,14 +321,16 @@ and `validation`. A Draft may save with diagnostics. `valid`, `invalid` and
311
321
  Use the edit's validation or request a check of a specific Revision. Structural
312
322
  validity does not demonstrate business behavior, model quality or runtime account
313
323
  access. An authorized test Run can exercise meaningful input cases. Draft Run
314
- readiness concerns the selected Trigger's path and dependencies; publishing and
315
- Live Runs require the complete Flow to be ready.
324
+ readiness concerns the selected Trigger's path and dependencies. Publishing and
325
+ Live Runs require the complete Flow to be ready. Explicit Live Runs must select a Start node. Other Triggers can be simulated only in Draft Runs; their Live Runs originate from their event sources.
316
326
 
317
- A sole Manual Trigger is selected automatically; otherwise specify `--trigger`.
318
- `--outputs` supplies named Trigger outputs. `--input` supplies per-node input
327
+ The Start node is selected automatically even when other Triggers exist; use `--trigger` to choose another entry for a Draft test. A sole legacy Manual Trigger remains supported for Draft tests.
328
+ `--outputs` supplies named Start parameters or other Trigger outputs. Required Start parameters must be present, omitted nullable parameters become null, and unknown parameters are rejected. Start parameters have no defaults. `--input` supplies per-node input
319
329
  overrides; command help gives their shape. Live Runs use `--source live` and
320
330
  `--expected-publication` instead of `--expected-revision`.
321
331
 
332
+ Declare parameters on Start: `{"op":"node.add","as":"start","type":"start","name":"Start","config":{"inputDefs":{"message":{"schema":{"type":"string"},"nullable":false},"note":{"schema":{"type":"string"},"nullable":true}}}}`. Read definitions in Start node details at `config.inputDefs`; `flow_live.inputDefs` remains a derived view of the published Start. Update with `node.update set.config.inputDefs`, and clear node-relative paths such as `["config","inputDefs","message","description"]`. Downstream nodes bind `{ "kind": "output", "node": "$start", "port": "message" }` with separate execution edges. Call with `--outputs '{"message":"Hello"}'`; note becomes null. REST and MCP use `trigger.outputs`. Deleting Start removes its configuration; undo restores it, while a new Start has empty definitions.
333
+
322
334
  ### Inspect or continue an existing Run
323
335
 
324
336
  ```bash
@@ -384,7 +396,7 @@ commands when relevant.
384
396
  belongs to the host. An open Workbench receives Revision notifications, so a CLI
385
397
  edit does not require a page reload.
386
398
 
387
- `live` includes Manual entry nodes without a runtime binding. `trigger search`
399
+ `live` includes Start and legacy Manual entry nodes without a runtime binding. `trigger search`
388
400
  and `trigger show` discover provider definitions; `live` inspects the Flow's
389
401
  current online entries. The MCP equivalent is `flow_live({ flowId })`.
390
402