griptape-nodes 0.41.0__py3-none-any.whl → 0.43.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.
- griptape_nodes/__init__.py +0 -0
- griptape_nodes/app/.python-version +0 -0
- griptape_nodes/app/__init__.py +1 -10
- griptape_nodes/app/api.py +199 -0
- griptape_nodes/app/app.py +140 -222
- griptape_nodes/app/watch.py +4 -2
- griptape_nodes/bootstrap/__init__.py +0 -0
- griptape_nodes/bootstrap/bootstrap_script.py +0 -0
- griptape_nodes/bootstrap/register_libraries_script.py +0 -0
- griptape_nodes/bootstrap/structure_config.yaml +0 -0
- griptape_nodes/bootstrap/workflow_executors/__init__.py +0 -0
- griptape_nodes/bootstrap/workflow_executors/local_workflow_executor.py +0 -0
- griptape_nodes/bootstrap/workflow_executors/workflow_executor.py +0 -0
- griptape_nodes/bootstrap/workflow_runners/__init__.py +0 -0
- griptape_nodes/bootstrap/workflow_runners/bootstrap_workflow_runner.py +0 -0
- griptape_nodes/bootstrap/workflow_runners/local_workflow_runner.py +0 -0
- griptape_nodes/bootstrap/workflow_runners/subprocess_workflow_runner.py +6 -2
- griptape_nodes/bootstrap/workflow_runners/workflow_runner.py +0 -0
- griptape_nodes/drivers/__init__.py +0 -0
- griptape_nodes/drivers/storage/__init__.py +0 -0
- griptape_nodes/drivers/storage/base_storage_driver.py +0 -0
- griptape_nodes/drivers/storage/griptape_cloud_storage_driver.py +0 -0
- griptape_nodes/drivers/storage/local_storage_driver.py +5 -3
- griptape_nodes/drivers/storage/storage_backend.py +0 -0
- griptape_nodes/exe_types/__init__.py +0 -0
- griptape_nodes/exe_types/connections.py +0 -0
- griptape_nodes/exe_types/core_types.py +0 -0
- griptape_nodes/exe_types/flow.py +68 -368
- griptape_nodes/exe_types/node_types.py +17 -1
- griptape_nodes/exe_types/type_validator.py +0 -0
- griptape_nodes/machines/__init__.py +0 -0
- griptape_nodes/machines/control_flow.py +52 -20
- griptape_nodes/machines/fsm.py +16 -2
- griptape_nodes/machines/node_resolution.py +16 -14
- griptape_nodes/mcp_server/__init__.py +1 -0
- griptape_nodes/mcp_server/server.py +126 -0
- griptape_nodes/mcp_server/ws_request_manager.py +268 -0
- griptape_nodes/node_library/__init__.py +0 -0
- griptape_nodes/node_library/advanced_node_library.py +0 -0
- griptape_nodes/node_library/library_registry.py +0 -0
- griptape_nodes/node_library/workflow_registry.py +2 -2
- griptape_nodes/py.typed +0 -0
- griptape_nodes/retained_mode/__init__.py +0 -0
- griptape_nodes/retained_mode/events/__init__.py +0 -0
- griptape_nodes/retained_mode/events/agent_events.py +70 -8
- griptape_nodes/retained_mode/events/app_events.py +137 -12
- griptape_nodes/retained_mode/events/arbitrary_python_events.py +23 -0
- griptape_nodes/retained_mode/events/base_events.py +13 -31
- griptape_nodes/retained_mode/events/config_events.py +87 -11
- griptape_nodes/retained_mode/events/connection_events.py +56 -5
- griptape_nodes/retained_mode/events/context_events.py +27 -4
- griptape_nodes/retained_mode/events/execution_events.py +99 -14
- griptape_nodes/retained_mode/events/flow_events.py +165 -7
- griptape_nodes/retained_mode/events/generate_request_payload_schemas.py +0 -0
- griptape_nodes/retained_mode/events/library_events.py +195 -17
- griptape_nodes/retained_mode/events/logger_events.py +11 -0
- griptape_nodes/retained_mode/events/node_events.py +242 -22
- griptape_nodes/retained_mode/events/object_events.py +40 -4
- griptape_nodes/retained_mode/events/os_events.py +116 -3
- griptape_nodes/retained_mode/events/parameter_events.py +212 -8
- griptape_nodes/retained_mode/events/payload_registry.py +0 -0
- griptape_nodes/retained_mode/events/secrets_events.py +59 -7
- griptape_nodes/retained_mode/events/static_file_events.py +57 -4
- griptape_nodes/retained_mode/events/validation_events.py +39 -4
- griptape_nodes/retained_mode/events/workflow_events.py +188 -17
- griptape_nodes/retained_mode/griptape_nodes.py +89 -363
- griptape_nodes/retained_mode/managers/__init__.py +0 -0
- griptape_nodes/retained_mode/managers/agent_manager.py +49 -23
- griptape_nodes/retained_mode/managers/arbitrary_code_exec_manager.py +0 -0
- griptape_nodes/retained_mode/managers/config_manager.py +0 -0
- griptape_nodes/retained_mode/managers/context_manager.py +0 -0
- griptape_nodes/retained_mode/managers/engine_identity_manager.py +146 -0
- griptape_nodes/retained_mode/managers/event_manager.py +14 -2
- griptape_nodes/retained_mode/managers/flow_manager.py +751 -64
- griptape_nodes/retained_mode/managers/library_lifecycle/__init__.py +45 -0
- griptape_nodes/retained_mode/managers/library_lifecycle/data_models.py +191 -0
- griptape_nodes/retained_mode/managers/library_lifecycle/library_directory.py +346 -0
- griptape_nodes/retained_mode/managers/library_lifecycle/library_fsm.py +439 -0
- griptape_nodes/retained_mode/managers/library_lifecycle/library_provenance/__init__.py +17 -0
- griptape_nodes/retained_mode/managers/library_lifecycle/library_provenance/base.py +82 -0
- griptape_nodes/retained_mode/managers/library_lifecycle/library_provenance/github.py +116 -0
- griptape_nodes/retained_mode/managers/library_lifecycle/library_provenance/local_file.py +352 -0
- griptape_nodes/retained_mode/managers/library_lifecycle/library_provenance/package.py +104 -0
- griptape_nodes/retained_mode/managers/library_lifecycle/library_provenance/sandbox.py +155 -0
- griptape_nodes/retained_mode/managers/library_lifecycle/library_provenance.py +18 -0
- griptape_nodes/retained_mode/managers/library_lifecycle/library_status.py +12 -0
- griptape_nodes/retained_mode/managers/library_manager.py +255 -40
- griptape_nodes/retained_mode/managers/node_manager.py +120 -103
- griptape_nodes/retained_mode/managers/object_manager.py +11 -3
- griptape_nodes/retained_mode/managers/operation_manager.py +0 -0
- griptape_nodes/retained_mode/managers/os_manager.py +582 -8
- griptape_nodes/retained_mode/managers/secrets_manager.py +4 -0
- griptape_nodes/retained_mode/managers/session_manager.py +328 -0
- griptape_nodes/retained_mode/managers/settings.py +7 -0
- griptape_nodes/retained_mode/managers/static_files_manager.py +0 -0
- griptape_nodes/retained_mode/managers/version_compatibility_manager.py +2 -2
- griptape_nodes/retained_mode/managers/workflow_manager.py +722 -456
- griptape_nodes/retained_mode/retained_mode.py +44 -0
- griptape_nodes/retained_mode/utils/__init__.py +0 -0
- griptape_nodes/retained_mode/utils/engine_identity.py +141 -27
- griptape_nodes/retained_mode/utils/name_generator.py +0 -0
- griptape_nodes/traits/__init__.py +0 -0
- griptape_nodes/traits/add_param_button.py +0 -0
- griptape_nodes/traits/button.py +0 -0
- griptape_nodes/traits/clamp.py +0 -0
- griptape_nodes/traits/compare.py +0 -0
- griptape_nodes/traits/compare_images.py +0 -0
- griptape_nodes/traits/file_system_picker.py +127 -0
- griptape_nodes/traits/minmax.py +0 -0
- griptape_nodes/traits/options.py +0 -0
- griptape_nodes/traits/slider.py +0 -0
- griptape_nodes/traits/trait_registry.py +0 -0
- griptape_nodes/traits/traits.json +0 -0
- griptape_nodes/updater/__init__.py +2 -2
- griptape_nodes/updater/__main__.py +0 -0
- griptape_nodes/utils/__init__.py +0 -0
- griptape_nodes/utils/dict_utils.py +0 -0
- griptape_nodes/utils/image_preview.py +128 -0
- griptape_nodes/utils/metaclasses.py +0 -0
- griptape_nodes/version_compatibility/__init__.py +0 -0
- griptape_nodes/version_compatibility/versions/__init__.py +0 -0
- griptape_nodes/version_compatibility/versions/v0_39_0/__init__.py +0 -0
- griptape_nodes/version_compatibility/versions/v0_39_0/modified_parameters_set_removal.py +5 -5
- griptape_nodes-0.43.0.dist-info/METADATA +90 -0
- griptape_nodes-0.43.0.dist-info/RECORD +129 -0
- griptape_nodes-0.43.0.dist-info/WHEEL +4 -0
- {griptape_nodes-0.41.0.dist-info → griptape_nodes-0.43.0.dist-info}/entry_points.txt +1 -0
- griptape_nodes/app/app_sessions.py +0 -458
- griptape_nodes/retained_mode/utils/session_persistence.py +0 -105
- griptape_nodes-0.41.0.dist-info/METADATA +0 -78
- griptape_nodes-0.41.0.dist-info/RECORD +0 -112
- griptape_nodes-0.41.0.dist-info/WHEEL +0 -4
- griptape_nodes-0.41.0.dist-info/licenses/LICENSE +0 -201
|
@@ -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
|
-
|
|
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
|
-
|
|
70
|
+
"""Configuration value set successfully."""
|
|
42
71
|
|
|
43
72
|
|
|
44
73
|
@dataclass
|
|
45
74
|
@PayloadRegistry.register
|
|
46
75
|
class SetConfigValueResultFailure(ResultPayloadFailure):
|
|
47
|
-
|
|
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
|
-
|
|
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
|
-
|
|
136
|
+
"""Configuration category updated successfully."""
|
|
79
137
|
|
|
80
138
|
|
|
81
139
|
@dataclass
|
|
82
140
|
@PayloadRegistry.register
|
|
83
141
|
class SetConfigCategoryResultFailure(ResultPayloadFailure):
|
|
84
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
190
|
+
"""Configuration reset successfully to default values."""
|
|
115
191
|
|
|
116
192
|
|
|
117
193
|
@dataclass
|
|
118
194
|
@PayloadRegistry.register
|
|
119
195
|
class ResetConfigResultFailure(ResultPayloadFailure):
|
|
120
|
-
|
|
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
|
-
|
|
43
|
+
"""Connection created successfully between parameters."""
|
|
29
44
|
|
|
30
45
|
|
|
31
46
|
@dataclass
|
|
32
47
|
@PayloadRegistry.register
|
|
33
48
|
class CreateConnectionResultFailure(ResultPayloadFailure):
|
|
34
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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?
|