griptape-nodes 0.40.0__py3-none-any.whl → 0.42.0__py3-none-any.whl

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. griptape_nodes/app/__init__.py +1 -5
  2. griptape_nodes/app/app.py +12 -9
  3. griptape_nodes/app/app_sessions.py +132 -36
  4. griptape_nodes/app/watch.py +3 -1
  5. griptape_nodes/drivers/storage/local_storage_driver.py +3 -2
  6. griptape_nodes/exe_types/flow.py +68 -368
  7. griptape_nodes/machines/control_flow.py +16 -13
  8. griptape_nodes/machines/node_resolution.py +16 -14
  9. griptape_nodes/node_library/workflow_registry.py +2 -2
  10. griptape_nodes/retained_mode/events/agent_events.py +70 -8
  11. griptape_nodes/retained_mode/events/app_events.py +132 -11
  12. griptape_nodes/retained_mode/events/arbitrary_python_events.py +23 -0
  13. griptape_nodes/retained_mode/events/base_events.py +7 -25
  14. griptape_nodes/retained_mode/events/config_events.py +87 -11
  15. griptape_nodes/retained_mode/events/connection_events.py +56 -5
  16. griptape_nodes/retained_mode/events/context_events.py +27 -4
  17. griptape_nodes/retained_mode/events/execution_events.py +99 -14
  18. griptape_nodes/retained_mode/events/flow_events.py +165 -7
  19. griptape_nodes/retained_mode/events/library_events.py +193 -15
  20. griptape_nodes/retained_mode/events/logger_events.py +11 -0
  21. griptape_nodes/retained_mode/events/node_events.py +243 -22
  22. griptape_nodes/retained_mode/events/object_events.py +40 -4
  23. griptape_nodes/retained_mode/events/os_events.py +13 -2
  24. griptape_nodes/retained_mode/events/parameter_events.py +212 -8
  25. griptape_nodes/retained_mode/events/secrets_events.py +59 -7
  26. griptape_nodes/retained_mode/events/static_file_events.py +57 -4
  27. griptape_nodes/retained_mode/events/validation_events.py +39 -4
  28. griptape_nodes/retained_mode/events/workflow_events.py +188 -17
  29. griptape_nodes/retained_mode/griptape_nodes.py +46 -323
  30. griptape_nodes/retained_mode/managers/agent_manager.py +1 -1
  31. griptape_nodes/retained_mode/managers/engine_identity_manager.py +146 -0
  32. griptape_nodes/retained_mode/managers/event_manager.py +14 -2
  33. griptape_nodes/retained_mode/managers/flow_manager.py +749 -64
  34. griptape_nodes/retained_mode/managers/library_manager.py +112 -2
  35. griptape_nodes/retained_mode/managers/node_manager.py +35 -32
  36. griptape_nodes/retained_mode/managers/object_manager.py +11 -3
  37. griptape_nodes/retained_mode/managers/os_manager.py +70 -1
  38. griptape_nodes/retained_mode/managers/secrets_manager.py +4 -0
  39. griptape_nodes/retained_mode/managers/session_manager.py +328 -0
  40. griptape_nodes/retained_mode/managers/settings.py +7 -0
  41. griptape_nodes/retained_mode/managers/workflow_manager.py +523 -454
  42. griptape_nodes/retained_mode/retained_mode.py +44 -0
  43. griptape_nodes/retained_mode/utils/engine_identity.py +141 -27
  44. {griptape_nodes-0.40.0.dist-info → griptape_nodes-0.42.0.dist-info}/METADATA +2 -2
  45. {griptape_nodes-0.40.0.dist-info → griptape_nodes-0.42.0.dist-info}/RECORD +48 -47
  46. griptape_nodes/retained_mode/utils/session_persistence.py +0 -105
  47. {griptape_nodes-0.40.0.dist-info → griptape_nodes-0.42.0.dist-info}/WHEEL +0 -0
  48. {griptape_nodes-0.40.0.dist-info → griptape_nodes-0.42.0.dist-info}/entry_points.txt +0 -0
  49. {griptape_nodes-0.40.0.dist-info → griptape_nodes-0.42.0.dist-info}/licenses/LICENSE +0 -0
@@ -13,24 +13,53 @@ from griptape_nodes.retained_mode.events.payload_registry import PayloadRegistry
13
13
  @dataclass
14
14
  @PayloadRegistry.register
15
15
  class GetConfigValueRequest(RequestPayload):
16
+ """Get a specific configuration value.
17
+
18
+ Use when: Reading application settings, checking node configurations, retrieving user preferences,
19
+ accessing environment-specific values. Key format: "category.key" or "category.subcategory.key".
20
+
21
+ Args:
22
+ category_and_key: Configuration key in format "category.key" or "category.subcategory.key"
23
+
24
+ Results: GetConfigValueResultSuccess (with value) | GetConfigValueResultFailure (key not found)
25
+ """
26
+
16
27
  category_and_key: str
17
28
 
18
29
 
19
30
  @dataclass
20
31
  @PayloadRegistry.register
21
32
  class GetConfigValueResultSuccess(WorkflowNotAlteredMixin, ResultPayloadSuccess):
33
+ """Configuration value retrieved successfully.
34
+
35
+ Args:
36
+ value: The configuration value (can be any type)
37
+ """
38
+
22
39
  value: Any
23
40
 
24
41
 
25
42
  @dataclass
26
43
  @PayloadRegistry.register
27
44
  class GetConfigValueResultFailure(WorkflowNotAlteredMixin, ResultPayloadFailure):
28
- pass
45
+ """Configuration value retrieval failed. Common causes: key not found, invalid category format."""
29
46
 
30
47
 
31
48
  @dataclass
32
49
  @PayloadRegistry.register
33
50
  class SetConfigValueRequest(RequestPayload):
51
+ """Set a specific configuration value.
52
+
53
+ Use when: Updating application settings, configuring node behavior, storing user preferences,
54
+ setting environment-specific values. Key format: "category.key" or "category.subcategory.key".
55
+
56
+ Args:
57
+ category_and_key: Configuration key in format "category.key" or "category.subcategory.key"
58
+ value: Value to set for the configuration key
59
+
60
+ Results: SetConfigValueResultSuccess | SetConfigValueResultFailure (invalid key, value error)
61
+ """
62
+
34
63
  category_and_key: str
35
64
  value: Any
36
65
 
@@ -38,36 +67,65 @@ class SetConfigValueRequest(RequestPayload):
38
67
  @dataclass
39
68
  @PayloadRegistry.register
40
69
  class SetConfigValueResultSuccess(ResultPayloadSuccess):
41
- pass
70
+ """Configuration value set successfully."""
42
71
 
43
72
 
44
73
  @dataclass
45
74
  @PayloadRegistry.register
46
75
  class SetConfigValueResultFailure(ResultPayloadFailure):
47
- pass
76
+ """Configuration value setting failed. Common causes: invalid key format, value validation error."""
48
77
 
49
78
 
50
79
  @dataclass
51
80
  @PayloadRegistry.register
52
81
  class GetConfigCategoryRequest(RequestPayload):
82
+ """Get all configuration values within a category.
83
+
84
+ Use when: Retrieving multiple related settings, displaying configuration sections in UIs,
85
+ backing up/restoring configuration groups, bulk configuration operations.
86
+
87
+ Args:
88
+ category: Name of the configuration category (None for all categories)
89
+
90
+ Results: GetConfigCategoryResultSuccess (with contents dict) | GetConfigCategoryResultFailure (category not found)
91
+ """
92
+
53
93
  category: str | None = None
54
94
 
55
95
 
56
96
  @dataclass
57
97
  @PayloadRegistry.register
58
98
  class GetConfigCategoryResultSuccess(WorkflowNotAlteredMixin, ResultPayloadSuccess):
99
+ """Configuration category retrieved successfully.
100
+
101
+ Args:
102
+ contents: Dictionary of key-value pairs within the category
103
+ """
104
+
59
105
  contents: dict[str, Any]
60
106
 
61
107
 
62
108
  @dataclass
63
109
  @PayloadRegistry.register
64
110
  class GetConfigCategoryResultFailure(WorkflowNotAlteredMixin, ResultPayloadFailure):
65
- pass
111
+ """Configuration category retrieval failed. Common causes: category not found, invalid category name."""
66
112
 
67
113
 
68
114
  @dataclass
69
115
  @PayloadRegistry.register
70
116
  class SetConfigCategoryRequest(RequestPayload):
117
+ """Set multiple configuration values within a category.
118
+
119
+ Use when: Bulk updating configuration settings, restoring configuration sections,
120
+ applying configuration templates, batch configuration operations.
121
+
122
+ Args:
123
+ contents: Dictionary of key-value pairs to set in the category
124
+ category: Name of the configuration category (None for default)
125
+
126
+ Results: SetConfigCategoryResultSuccess | SetConfigCategoryResultFailure (invalid category, value errors)
127
+ """
128
+
71
129
  contents: dict[str, Any]
72
130
  category: str | None = None
73
131
 
@@ -75,46 +133,64 @@ class SetConfigCategoryRequest(RequestPayload):
75
133
  @dataclass
76
134
  @PayloadRegistry.register
77
135
  class SetConfigCategoryResultSuccess(ResultPayloadSuccess):
78
- pass
136
+ """Configuration category updated successfully."""
79
137
 
80
138
 
81
139
  @dataclass
82
140
  @PayloadRegistry.register
83
141
  class SetConfigCategoryResultFailure(ResultPayloadFailure):
84
- pass
142
+ """Configuration category update failed. Common causes: invalid category name, value validation errors."""
85
143
 
86
144
 
87
145
  @dataclass
88
146
  @PayloadRegistry.register
89
147
  class GetConfigPathRequest(RequestPayload):
90
- pass
148
+ """Get the path to the configuration file.
149
+
150
+ Use when: Locating configuration files, debugging configuration issues,
151
+ implementing configuration backup/restore, displaying configuration info to users.
152
+
153
+ Results: GetConfigPathResultSuccess (with path) | GetConfigPathResultFailure (path not available)
154
+ """
91
155
 
92
156
 
93
157
  @dataclass
94
158
  @PayloadRegistry.register
95
159
  class GetConfigPathResultSuccess(WorkflowNotAlteredMixin, ResultPayloadSuccess):
160
+ """Configuration path retrieved successfully.
161
+
162
+ Args:
163
+ config_path: Path to the configuration file (None if using default/memory config)
164
+ """
165
+
96
166
  config_path: str | None = None
97
167
 
98
168
 
99
169
  @dataclass
100
170
  @PayloadRegistry.register
101
171
  class GetConfigPathResultFailure(WorkflowNotAlteredMixin, ResultPayloadFailure):
102
- pass
172
+ """Configuration path retrieval failed. Common causes: configuration not initialized, access denied."""
103
173
 
104
174
 
105
175
  @dataclass
106
176
  @PayloadRegistry.register
107
177
  class ResetConfigRequest(RequestPayload):
108
- pass
178
+ """Reset configuration to default values.
179
+
180
+ Use when: Recovering from configuration errors, restoring default settings,
181
+ clearing user customizations, troubleshooting configuration issues.
182
+
183
+ Results: ResetConfigResultSuccess | ResetConfigResultFailure (reset error)
184
+ """
109
185
 
110
186
 
111
187
  @dataclass
112
188
  @PayloadRegistry.register
113
189
  class ResetConfigResultSuccess(ResultPayloadSuccess):
114
- pass
190
+ """Configuration reset successfully to default values."""
115
191
 
116
192
 
117
193
  @dataclass
118
194
  @PayloadRegistry.register
119
195
  class ResetConfigResultFailure(ResultPayloadFailure):
120
- pass
196
+ """Configuration reset failed. Common causes: file system errors, permission issues, initialization errors."""
@@ -13,6 +13,21 @@ from griptape_nodes.retained_mode.events.payload_registry import PayloadRegistry
13
13
  @dataclass
14
14
  @PayloadRegistry.register
15
15
  class CreateConnectionRequest(RequestPayload):
16
+ """Create a connection between two node parameters.
17
+
18
+ Use when: Connecting node outputs to inputs, building data flow between nodes,
19
+ loading saved workflows. Validates type compatibility and connection rules.
20
+
21
+ Args:
22
+ source_parameter_name: Name of the parameter providing the data
23
+ target_parameter_name: Name of the parameter receiving the data
24
+ source_node_name: Name of the source node (None for current context)
25
+ target_node_name: Name of the target node (None for current context)
26
+ initial_setup: Skip setup work when loading from file
27
+
28
+ Results: CreateConnectionResultSuccess | CreateConnectionResultFailure (incompatible types, invalid nodes/parameters)
29
+ """
30
+
16
31
  source_parameter_name: str
17
32
  target_parameter_name: str
18
33
  # If node name is None, use the Current Context
@@ -25,18 +40,36 @@ class CreateConnectionRequest(RequestPayload):
25
40
  @dataclass
26
41
  @PayloadRegistry.register
27
42
  class CreateConnectionResultSuccess(WorkflowAlteredMixin, ResultPayloadSuccess):
28
- pass
43
+ """Connection created successfully between parameters."""
29
44
 
30
45
 
31
46
  @dataclass
32
47
  @PayloadRegistry.register
33
48
  class CreateConnectionResultFailure(ResultPayloadFailure):
34
- pass
49
+ """Connection creation failed.
50
+
51
+ Common causes: incompatible types, nodes/parameters not found,
52
+ connection already exists, circular dependency.
53
+ """
35
54
 
36
55
 
37
56
  @dataclass
38
57
  @PayloadRegistry.register
39
58
  class DeleteConnectionRequest(RequestPayload):
59
+ """Delete a connection between two node parameters.
60
+
61
+ Use when: Removing unwanted connections, restructuring workflows, disconnecting nodes,
62
+ updating data flow. Cleans up connection state and updates node resolution.
63
+
64
+ Args:
65
+ source_parameter_name: Name of the parameter providing the data
66
+ target_parameter_name: Name of the parameter receiving the data
67
+ source_node_name: Name of the source node (None for current context)
68
+ target_node_name: Name of the target node (None for current context)
69
+
70
+ Results: DeleteConnectionResultSuccess | DeleteConnectionResultFailure (connection not found, nodes/parameters not found)
71
+ """
72
+
40
73
  source_parameter_name: str
41
74
  target_parameter_name: str
42
75
  # If node name is None, use the Current Context
@@ -47,18 +80,29 @@ class DeleteConnectionRequest(RequestPayload):
47
80
  @dataclass
48
81
  @PayloadRegistry.register
49
82
  class DeleteConnectionResultSuccess(WorkflowAlteredMixin, ResultPayloadSuccess):
50
- pass
83
+ """Connection deleted successfully. Connection state cleaned up."""
51
84
 
52
85
 
53
86
  @dataclass
54
87
  @PayloadRegistry.register
55
88
  class DeleteConnectionResultFailure(ResultPayloadFailure):
56
- pass
89
+ """Connection deletion failed. Common causes: connection not found, nodes/parameters not found."""
57
90
 
58
91
 
59
92
  @dataclass
60
93
  @PayloadRegistry.register
61
94
  class ListConnectionsForNodeRequest(RequestPayload):
95
+ """List all connections for a specific node.
96
+
97
+ Use when: Inspecting node connectivity, building connection visualizations,
98
+ debugging data flow, validating workflow structure.
99
+
100
+ Args:
101
+ node_name: Name of the node to list connections for (None for current context)
102
+
103
+ Results: ListConnectionsForNodeResultSuccess (with connection lists) | ListConnectionsForNodeResultFailure (node not found)
104
+ """
105
+
62
106
  # If node name is None, use the Current Context
63
107
  node_name: str | None = None
64
108
 
@@ -80,6 +124,13 @@ class OutgoingConnection:
80
124
  @dataclass
81
125
  @PayloadRegistry.register
82
126
  class ListConnectionsForNodeResultSuccess(WorkflowNotAlteredMixin, ResultPayloadSuccess):
127
+ """Node connections retrieved successfully.
128
+
129
+ Args:
130
+ incoming_connections: List of connections feeding into this node
131
+ outgoing_connections: List of connections from this node to others
132
+ """
133
+
83
134
  incoming_connections: list[IncomingConnection]
84
135
  outgoing_connections: list[OutgoingConnection]
85
136
 
@@ -87,4 +138,4 @@ class ListConnectionsForNodeResultSuccess(WorkflowNotAlteredMixin, ResultPayload
87
138
  @dataclass
88
139
  @PayloadRegistry.register
89
140
  class ListConnectionsForNodeResultFailure(WorkflowNotAlteredMixin, ResultPayloadFailure):
90
- pass
141
+ """Node connections listing failed. Common causes: node not found, no current context."""
@@ -13,34 +13,57 @@ from griptape_nodes.retained_mode.events.payload_registry import PayloadRegistry
13
13
  @dataclass
14
14
  @PayloadRegistry.register
15
15
  class SetWorkflowContextRequest(RequestPayload):
16
+ """Set the current workflow context.
17
+
18
+ Use when: Switching between workflows, initializing workflow sessions,
19
+ setting the active workflow for subsequent operations, workflow navigation.
20
+
21
+ Args:
22
+ workflow_name: Name of the workflow to set as current context
23
+
24
+ Results: SetWorkflowContextSuccess | SetWorkflowContextFailure (workflow not found)
25
+ """
26
+
16
27
  workflow_name: str
17
28
 
18
29
 
19
30
  @dataclass
20
31
  @PayloadRegistry.register
21
32
  class SetWorkflowContextSuccess(WorkflowAlteredMixin, ResultPayloadSuccess):
22
- pass
33
+ """Workflow context set successfully. Subsequent operations will use this workflow."""
23
34
 
24
35
 
25
36
  @dataclass
26
37
  @PayloadRegistry.register
27
38
  class SetWorkflowContextFailure(WorkflowAlteredMixin, ResultPayloadFailure):
28
- pass
39
+ """Workflow context setting failed. Common causes: workflow not found, invalid workflow name."""
29
40
 
30
41
 
31
42
  @dataclass
32
43
  @PayloadRegistry.register
33
44
  class GetWorkflowContextRequest(RequestPayload):
34
- pass
45
+ """Get the current workflow context.
46
+
47
+ Use when: Checking which workflow is active, displaying current workflow info,
48
+ validating workflow state, debugging context issues.
49
+
50
+ Results: GetWorkflowContextSuccess (with workflow name) | GetWorkflowContextFailure (no context set)
51
+ """
35
52
 
36
53
 
37
54
  @dataclass
38
55
  @PayloadRegistry.register
39
56
  class GetWorkflowContextSuccess(WorkflowNotAlteredMixin, ResultPayloadSuccess):
57
+ """Workflow context retrieved successfully.
58
+
59
+ Args:
60
+ workflow_name: Name of the current workflow context (None if no context set)
61
+ """
62
+
40
63
  workflow_name: str | None
41
64
 
42
65
 
43
66
  @dataclass
44
67
  @PayloadRegistry.register
45
68
  class GetWorkflowContextFailure(WorkflowNotAlteredMixin, ResultPayloadFailure):
46
- pass
69
+ """Workflow context retrieval failed. Common causes: context not initialized, system error."""
@@ -17,6 +17,18 @@ from griptape_nodes.retained_mode.events.payload_registry import PayloadRegistry
17
17
  @dataclass
18
18
  @PayloadRegistry.register
19
19
  class ResolveNodeRequest(RequestPayload):
20
+ """Resolve (execute) a specific node.
21
+
22
+ Use when: Running individual nodes, testing node execution, debugging workflows,
23
+ stepping through execution manually. Validates inputs and runs node logic.
24
+
25
+ Args:
26
+ node_name: Name of the node to resolve/execute
27
+ debug_mode: Whether to run in debug mode (default: False)
28
+
29
+ Results: ResolveNodeResultSuccess | ResolveNodeResultFailure (with validation exceptions)
30
+ """
31
+
20
32
  node_name: str
21
33
  debug_mode: bool = False
22
34
 
@@ -24,19 +36,39 @@ class ResolveNodeRequest(RequestPayload):
24
36
  @dataclass
25
37
  @PayloadRegistry.register
26
38
  class ResolveNodeResultSuccess(WorkflowAlteredMixin, ResultPayloadSuccess):
27
- pass
39
+ """Node resolved successfully. Node execution completed and outputs are available."""
28
40
 
29
41
 
30
42
  @dataclass
31
43
  @PayloadRegistry.register
32
44
  class ResolveNodeResultFailure(ResultPayloadFailure):
45
+ """Node resolution failed. Contains validation errors that prevented execution.
46
+
47
+ Args:
48
+ validation_exceptions: List of validation errors that occurred
49
+ """
50
+
33
51
  validation_exceptions: list[Exception]
34
52
 
35
53
 
36
54
  @dataclass
37
55
  @PayloadRegistry.register
38
56
  class StartFlowRequest(RequestPayload):
39
- flow_name: str
57
+ """Start executing a flow.
58
+
59
+ Use when: Running workflows, beginning automated execution, testing complete flows.
60
+ Validates all nodes and begins execution from resolved nodes.
61
+
62
+ Args:
63
+ flow_name: Name of the flow to start (deprecated, use flow_node_name)
64
+ flow_node_name: Name of the flow node to start
65
+ debug_mode: Whether to run in debug mode (default: False)
66
+
67
+ Results: StartFlowResultSuccess | StartFlowResultFailure (with validation exceptions)
68
+ """
69
+
70
+ # Maintaining flow_name for backwards compatibility. Will be removed in https://github.com/griptape-ai/griptape-nodes/issues/1663
71
+ flow_name: str | None = None
40
72
  flow_node_name: str | None = None
41
73
  debug_mode: bool = False
42
74
 
@@ -44,37 +76,56 @@ class StartFlowRequest(RequestPayload):
44
76
  @dataclass
45
77
  @PayloadRegistry.register
46
78
  class StartFlowResultSuccess(WorkflowAlteredMixin, ResultPayloadSuccess):
47
- pass
79
+ """Flow started successfully. Execution is now running."""
48
80
 
49
81
 
50
82
  @dataclass
51
83
  @PayloadRegistry.register
52
84
  class StartFlowResultFailure(ResultPayloadFailure):
85
+ """Flow start failed. Contains validation errors that prevented execution.
86
+
87
+ Args:
88
+ validation_exceptions: List of validation errors that occurred
89
+ """
90
+
53
91
  validation_exceptions: list[Exception]
54
92
 
55
93
 
56
94
  @dataclass
57
95
  @PayloadRegistry.register
58
96
  class CancelFlowRequest(RequestPayload):
59
- flow_name: str
97
+ """Cancel a running flow execution.
98
+
99
+ Use when: Stopping long-running workflows, handling user cancellation,
100
+ stopping execution due to errors or changes. Cleanly terminates execution.
101
+
102
+ Args:
103
+ flow_name: Name of the flow to cancel (deprecated)
104
+
105
+ Results: CancelFlowResultSuccess | CancelFlowResultFailure (cancellation error)
106
+ """
107
+
108
+ # Maintaining flow_name for backwards compatibility. Will be removed in https://github.com/griptape-ai/griptape-nodes/issues/1663
109
+ flow_name: str | None = None
60
110
 
61
111
 
62
112
  @dataclass
63
113
  @PayloadRegistry.register
64
114
  class CancelFlowResultSuccess(WorkflowAlteredMixin, ResultPayloadSuccess):
65
- pass
115
+ """Flow cancelled successfully. Execution has been terminated."""
66
116
 
67
117
 
68
118
  @dataclass
69
119
  @PayloadRegistry.register
70
120
  class CancelFlowResultFailure(ResultPayloadFailure):
71
- pass
121
+ """Flow cancellation failed. Common causes: flow not running, cancellation error."""
72
122
 
73
123
 
74
124
  @dataclass
75
125
  @PayloadRegistry.register
76
126
  class UnresolveFlowRequest(RequestPayload):
77
- flow_name: str
127
+ # Maintaining flow_name for backwards compatibility. Will be removed in https://github.com/griptape-ai/griptape-nodes/issues/1663
128
+ flow_name: str | None = None
78
129
 
79
130
 
80
131
  @dataclass
@@ -96,7 +147,8 @@ class UnresolveFlowResultSuccess(WorkflowAlteredMixin, ResultPayloadSuccess):
96
147
  @dataclass
97
148
  @PayloadRegistry.register
98
149
  class SingleExecutionStepRequest(RequestPayload):
99
- flow_name: str
150
+ # Maintaining flow_name for backwards compatibility. Will be removed in https://github.com/griptape-ai/griptape-nodes/issues/1663
151
+ flow_name: str | None = None
100
152
 
101
153
 
102
154
  @dataclass
@@ -114,7 +166,8 @@ class SingleExecutionStepResultFailure(ResultPayloadFailure):
114
166
  @dataclass
115
167
  @PayloadRegistry.register
116
168
  class SingleNodeStepRequest(RequestPayload):
117
- flow_name: str
169
+ # Maintaining flow_name for backwards compatibility. Will be removed in https://github.com/griptape-ai/griptape-nodes/issues/1663
170
+ flow_name: str | None = None
118
171
 
119
172
 
120
173
  @dataclass
@@ -133,7 +186,8 @@ class SingleNodeStepResultFailure(ResolveNodeResultFailure):
133
186
  @dataclass
134
187
  @PayloadRegistry.register
135
188
  class ContinueExecutionStepRequest(RequestPayload):
136
- flow_name: str
189
+ # Maintaining flow_name for backwards compatibility. Will be removed in https://github.com/griptape-ai/griptape-nodes/issues/1663
190
+ flow_name: str | None = None
137
191
 
138
192
 
139
193
  @dataclass
@@ -151,12 +205,28 @@ class ContinueExecutionStepResultFailure(ResultPayloadFailure):
151
205
  @dataclass
152
206
  @PayloadRegistry.register
153
207
  class GetFlowStateRequest(RequestPayload):
154
- flow_name: str
208
+ """Get the current execution state of a flow.
209
+
210
+ Use when: Monitoring execution progress, debugging workflow state,
211
+ implementing execution UIs, checking which nodes are active.
212
+
213
+ Results: GetFlowStateResultSuccess (with control/resolving nodes) | GetFlowStateResultFailure (flow not found)
214
+ """
215
+
216
+ # Maintaining flow_name for backwards compatibility. Will be removed in https://github.com/griptape-ai/griptape-nodes/issues/1663
217
+ flow_name: str | None = None
155
218
 
156
219
 
157
220
  @dataclass
158
221
  @PayloadRegistry.register
159
222
  class GetFlowStateResultSuccess(WorkflowNotAlteredMixin, ResultPayloadSuccess):
223
+ """Flow execution state retrieved successfully.
224
+
225
+ Args:
226
+ control_node: Name of the current control node (if any)
227
+ resolving_node: Name of the node currently being resolved (if any)
228
+ """
229
+
160
230
  control_node: str | None
161
231
  resolving_node: str | None
162
232
 
@@ -164,25 +234,40 @@ class GetFlowStateResultSuccess(WorkflowNotAlteredMixin, ResultPayloadSuccess):
164
234
  @dataclass
165
235
  @PayloadRegistry.register
166
236
  class GetFlowStateResultFailure(WorkflowNotAlteredMixin, ResultPayloadFailure):
167
- pass
237
+ """Flow state retrieval failed. Common causes: flow not found, no current context."""
168
238
 
169
239
 
170
240
  @dataclass
171
241
  @PayloadRegistry.register
172
242
  class GetIsFlowRunningRequest(RequestPayload):
173
- flow_name: str
243
+ """Check if a flow is currently running.
244
+
245
+ Use when: Monitoring execution status, preventing concurrent execution,
246
+ implementing execution controls, checking if flow can be modified.
247
+
248
+ Results: GetIsFlowRunningResultSuccess (with running status) | GetIsFlowRunningResultFailure (flow not found)
249
+ """
250
+
251
+ # Maintaining flow_name for backwards compatibility. Will be removed in https://github.com/griptape-ai/griptape-nodes/issues/1663
252
+ flow_name: str | None = None
174
253
 
175
254
 
176
255
  @dataclass
177
256
  @PayloadRegistry.register
178
257
  class GetIsFlowRunningResultSuccess(WorkflowNotAlteredMixin, ResultPayloadSuccess):
258
+ """Flow running status retrieved successfully.
259
+
260
+ Args:
261
+ is_running: Whether the flow is currently executing
262
+ """
263
+
179
264
  is_running: bool
180
265
 
181
266
 
182
267
  @dataclass
183
268
  @PayloadRegistry.register
184
269
  class GetIsFlowRunningResultFailure(WorkflowNotAlteredMixin, ResultPayloadFailure):
185
- pass
270
+ """Flow running status retrieval failed. Common causes: flow not found, no current context."""
186
271
 
187
272
 
188
273
  # Execution Events! These are sent FROM the EE to the User/GUI. HOW MANY DO WE NEED?