@oomol-lab/open-flow 0.1.0-beta.65 → 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.
Files changed (49) hide show
  1. package/dist/browser/{createResourceDialog-BAJXbzNH.js → createResourceDialog-C-Si_cYs.js} +2 -2
  2. package/dist/browser/flow-authoring-node.d.ts +12 -3
  3. package/dist/browser/flow-authoring.js +114 -19
  4. package/dist/browser/flow-change-schema.d.ts +3 -1
  5. package/dist/browser/flow-change.d.ts +15 -3
  6. package/dist/browser/flow-change.js +111 -16
  7. package/dist/browser/{flowChanges-DkvG5uDq.js → flowChanges-T4_R5p1f.js} +2654 -1858
  8. package/dist/browser/{flowRunInputEditorStore-B2Rw4VsT.js → flowRunInputEditorStore-DJqmR6Qh.js} +3 -2
  9. package/dist/browser/{flowWorkspace-BEp-lxqF.js → flowWorkspace-C0J5C0oM.js} +700 -224
  10. package/dist/browser/{icons-Db2Jb2iX.js → icons-BD3m0RQq.js} +4484 -4370
  11. package/dist/browser/preview.css +152 -64
  12. package/dist/browser/preview.js +4460 -3412
  13. package/dist/browser/ui.css +85 -3
  14. package/dist/browser/ui.js +8 -5
  15. package/dist/browser/workbench.css +152 -64
  16. package/dist/browser/workbench.js +146 -57
  17. package/dist/browser/{workbenchSelect-C-jf6NIM.js → workbenchSelect-B-PFpF_Q.js} +1 -1
  18. package/dist/command/index.js +49 -49
  19. package/dist/common/authoring.d.ts +7 -5
  20. package/dist/common/authoringExamples.d.ts +3 -3
  21. package/dist/common/authoringFields.d.ts +20 -0
  22. package/dist/common/authoringSchema.d.ts +404 -15
  23. package/dist/common/control-api-conformance.js +384 -137
  24. package/dist/common/control-api.d.ts +63 -7
  25. package/dist/common/control-api.js +3562 -3428
  26. package/dist/common/control-requests.d.ts +10 -3
  27. package/dist/common/control-requests.js +418 -43
  28. package/dist/common/decision.js +28 -3
  29. package/dist/common/flow-encoding.d.ts +4 -2
  30. package/dist/common/flow-encoding.js +144 -10
  31. package/dist/common/flow-graph.d.ts +1 -1
  32. package/dist/common/flow-semantics.d.ts +12 -2
  33. package/dist/common/flow-semantics.js +146 -33
  34. package/dist/common/integration-trigger.js +28 -3
  35. package/dist/common/liveDetails.d.ts +26 -11
  36. package/dist/common/mcp.d.ts +6 -3
  37. package/dist/common/mcp.js +203 -84
  38. package/dist/common/openapi.js +28 -3
  39. package/dist/common/poll-trigger.js +28 -3
  40. package/dist/common/run-events.d.ts +2 -0
  41. package/dist/common/run-events.js +9 -3
  42. package/dist/common/scheduler.d.ts +10 -1
  43. package/dist/common/scheduler.js +167 -45
  44. package/dist/common/trigger-contract.d.ts +2 -0
  45. package/dist/common/webhook-trigger.js +28 -3
  46. package/dist/common/workflow.d.ts +93 -0
  47. package/dist/common/workflow.js +10491 -0
  48. package/package.json +5 -1
  49. package/skills/open-flow/references/flow-authoring.md +26 -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.66",
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"
@@ -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,16 @@ 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
+ | Capability | Relevant schema and configuration |
293
+ | ------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
294
+ | Provider read or write | `connector`: discovered `action`, optional `connectionId`, named input bindings. |
295
+ | Provider event | `poll` or `integration`: discovered `key`, Connection and any static inputs; polling also has a schedule. |
296
+ | Manual, HTTP or scheduled entry | `start`, `webhook`, `cron`: workflow `inputDefs`, HTTP body fields, or schedule. |
297
+ | Workflow failure handler | `error`: published upstream Flows' automatic Run failures; not a node-level catch or a handler for manual Run failures. |
298
+ | Call another workflow | `workflow`: select an owned published Flow ID; inputs and outputs derive from its saved contract. Use `node.refresh` to update it. |
299
+ | Fixed HTTP operation | `openapi`: an OpenAPI source, path and method; resolved authentication choices and ports appear in node details. |
300
+ | Reusable constants | `value`: named JSON values and optional output constraints. |
301
+ | Durable interaction | `wait`, `approval`: prompt and named inputs; resume through the Run's Wait ID. |
294
302
 
295
303
  Connector and LLM services are configured on the Server. Missing capabilities
296
304
  should be described in terms of the required operation or event, without silently
@@ -311,14 +319,16 @@ and `validation`. A Draft may save with diagnostics. `valid`, `invalid` and
311
319
  Use the edit's validation or request a check of a specific Revision. Structural
312
320
  validity does not demonstrate business behavior, model quality or runtime account
313
321
  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.
322
+ readiness concerns the selected Trigger's path and dependencies. Publishing and
323
+ 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
324
 
317
- A sole Manual Trigger is selected automatically; otherwise specify `--trigger`.
318
- `--outputs` supplies named Trigger outputs. `--input` supplies per-node input
325
+ 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.
326
+ `--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
327
  overrides; command help gives their shape. Live Runs use `--source live` and
320
328
  `--expected-publication` instead of `--expected-revision`.
321
329
 
330
+ 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.
331
+
322
332
  ### Inspect or continue an existing Run
323
333
 
324
334
  ```bash
@@ -384,7 +394,7 @@ commands when relevant.
384
394
  belongs to the host. An open Workbench receives Revision notifications, so a CLI
385
395
  edit does not require a page reload.
386
396
 
387
- `live` includes Manual entry nodes without a runtime binding. `trigger search`
397
+ `live` includes Start and legacy Manual entry nodes without a runtime binding. `trigger search`
388
398
  and `trigger show` discover provider definitions; `live` inspects the Flow's
389
399
  current online entries. The MCP equivalent is `flow_live({ flowId })`.
390
400