PeacebinfLow commited on
Commit
99593f7
·
verified ·
1 Parent(s): e28283a

Update docs/FLOW_STUDIO_SPEC.md

Browse files
Files changed (1) hide show
  1. docs/FLOW_STUDIO_SPEC.md +44 -22
docs/FLOW_STUDIO_SPEC.md CHANGED
@@ -2,21 +2,28 @@
2
 
3
  ## Core Concepts
4
 
5
- - **Node**
6
- - `id` (string, unique)
7
- - `label` (display name)
8
- - `type` (e.g., `event`, `function`, `output`, `subflow`)
9
- - `metadata` (optional dict for extra info later)
10
-
11
- - **Edge**
12
- - `source` (node id)
13
- - `target` (node id)
14
- - `label` (optional edge label)
15
- - `metadata` (optional dict)
16
-
17
- - **FlowGraph**
18
- - `nodes: List[Node]`
19
- - `edges: List[Edge]`
 
 
 
 
 
 
 
20
 
21
  ## Execution
22
 
@@ -27,13 +34,28 @@
27
 
28
  No real code is executed yet — this is an execution **preview** engine.
29
 
 
 
30
  ## UI Mapping
31
 
32
- - Nodes table → Dataframe in Gradio:
33
- - Columns: `id`, `label`, `type`.
34
- - Edges table → Dataframe:
35
- - Columns: `source`, `target`, `label`.
36
- - Diagram:
37
- - Mermaid diagram rendered as Markdown code block.
38
- - Simulation:
 
 
39
  - Markdown log of execution order.
 
 
 
 
 
 
 
 
 
 
 
 
2
 
3
  ## Core Concepts
4
 
5
+ ### Node
6
+
7
+ - `id` (string, unique)
8
+ - `label` (display name)
9
+ - `type` (e.g., `event`, `function`, `output`, `subflow`)
10
+ - `style` (string, optional Mermaid style snippet)
11
+ - `metadata` (internal dict; currently populated from `style`)
12
+
13
+ ### Edge
14
+
15
+ - `source` (node id)
16
+ - `target` (node id)
17
+ - `label` (optional edge label)
18
+ - `style` (optional Mermaid link style snippet)
19
+ - `metadata` (internal dict; currently populated from `style`)
20
+
21
+ ### FlowGraph
22
+
23
+ - `nodes: List[Node]`
24
+ - `edges: List[Edge]`
25
+
26
+ ---
27
 
28
  ## Execution
29
 
 
34
 
35
  No real code is executed yet — this is an execution **preview** engine.
36
 
37
+ ---
38
+
39
  ## UI Mapping
40
 
41
+ - **Nodes table** → Gradio Dataframe:
42
+ - Columns: `id`, `label`, `type`, `style`.
43
+ - **Edges table**Gradio Dataframe:
44
+ - Columns: `source`, `target`, `label`, `style`.
45
+ - **Diagram**:
46
+ - Mermaid diagram rendered as a Markdown code block.
47
+ - Node `style` fields become `style <id> <style>` lines.
48
+ - Edge `style` fields become `linkStyle <index> <style>` lines.
49
+ - **Simulation**:
50
  - Markdown log of execution order.
51
+
52
+ ---
53
+
54
+ ## Flow Command DSL
55
+
56
+ A small SQL-like language is used to manipulate the graph:
57
+
58
+ - Add / upsert a node
59
+
60
+ ```text
61
+ ADD NODE id=event_in label="Incoming Event" type=event