griptape-nodes 0.62.2__py3-none-any.whl → 0.63.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/cli/commands/libraries.py +6 -21
- griptape_nodes/drivers/thread_storage/__init__.py +15 -0
- griptape_nodes/drivers/thread_storage/base_thread_storage_driver.py +106 -0
- griptape_nodes/drivers/thread_storage/griptape_cloud_thread_storage_driver.py +213 -0
- griptape_nodes/drivers/thread_storage/local_thread_storage_driver.py +137 -0
- griptape_nodes/drivers/thread_storage/thread_storage_backend.py +10 -0
- griptape_nodes/node_library/library_registry.py +16 -9
- griptape_nodes/node_library/workflow_registry.py +1 -1
- griptape_nodes/retained_mode/events/agent_events.py +232 -9
- griptape_nodes/retained_mode/events/app_events.py +38 -0
- griptape_nodes/retained_mode/events/library_events.py +32 -3
- griptape_nodes/retained_mode/events/os_events.py +101 -1
- griptape_nodes/retained_mode/managers/agent_manager.py +335 -135
- griptape_nodes/retained_mode/managers/fitness_problems/__init__.py +1 -0
- griptape_nodes/retained_mode/managers/fitness_problems/libraries/__init__.py +59 -0
- griptape_nodes/retained_mode/managers/fitness_problems/libraries/advanced_library_load_failure_problem.py +33 -0
- griptape_nodes/retained_mode/managers/fitness_problems/libraries/after_library_callback_problem.py +32 -0
- griptape_nodes/retained_mode/managers/fitness_problems/libraries/before_library_callback_problem.py +32 -0
- griptape_nodes/retained_mode/managers/fitness_problems/libraries/create_config_category_problem.py +32 -0
- griptape_nodes/retained_mode/managers/fitness_problems/libraries/dependency_installation_failed_problem.py +32 -0
- griptape_nodes/retained_mode/managers/fitness_problems/libraries/deprecated_node_warning_problem.py +83 -0
- griptape_nodes/retained_mode/managers/fitness_problems/libraries/duplicate_library_problem.py +28 -0
- griptape_nodes/retained_mode/managers/fitness_problems/libraries/duplicate_node_registration_problem.py +44 -0
- griptape_nodes/retained_mode/managers/fitness_problems/libraries/engine_version_error_problem.py +28 -0
- griptape_nodes/retained_mode/managers/fitness_problems/libraries/insufficient_disk_space_problem.py +33 -0
- griptape_nodes/retained_mode/managers/fitness_problems/libraries/invalid_version_string_problem.py +32 -0
- griptape_nodes/retained_mode/managers/fitness_problems/libraries/library_json_decode_problem.py +28 -0
- griptape_nodes/retained_mode/managers/fitness_problems/libraries/library_load_exception_problem.py +32 -0
- griptape_nodes/retained_mode/managers/fitness_problems/libraries/library_not_found_problem.py +30 -0
- griptape_nodes/retained_mode/managers/fitness_problems/libraries/library_problem.py +20 -0
- griptape_nodes/retained_mode/managers/fitness_problems/libraries/library_schema_exception_problem.py +32 -0
- griptape_nodes/retained_mode/managers/fitness_problems/libraries/library_schema_validation_problem.py +38 -0
- griptape_nodes/retained_mode/managers/fitness_problems/libraries/modified_parameters_set_deprecation_warning_problem.py +44 -0
- griptape_nodes/retained_mode/managers/fitness_problems/libraries/modified_parameters_set_removed_problem.py +44 -0
- griptape_nodes/retained_mode/managers/fitness_problems/libraries/node_class_not_base_node_problem.py +40 -0
- griptape_nodes/retained_mode/managers/fitness_problems/libraries/node_class_not_found_problem.py +38 -0
- griptape_nodes/retained_mode/managers/fitness_problems/libraries/node_module_import_problem.py +53 -0
- griptape_nodes/retained_mode/managers/fitness_problems/libraries/sandbox_directory_missing_problem.py +28 -0
- griptape_nodes/retained_mode/managers/fitness_problems/libraries/ui_options_field_modified_incompatible_problem.py +44 -0
- griptape_nodes/retained_mode/managers/fitness_problems/libraries/ui_options_field_modified_warning_problem.py +35 -0
- griptape_nodes/retained_mode/managers/fitness_problems/libraries/update_config_category_problem.py +32 -0
- griptape_nodes/retained_mode/managers/fitness_problems/libraries/venv_creation_failed_problem.py +32 -0
- griptape_nodes/retained_mode/managers/fitness_problems/workflows/__init__.py +75 -0
- griptape_nodes/retained_mode/managers/fitness_problems/workflows/deprecated_node_in_workflow_problem.py +83 -0
- griptape_nodes/retained_mode/managers/fitness_problems/workflows/invalid_dependency_version_string_problem.py +38 -0
- griptape_nodes/retained_mode/managers/fitness_problems/workflows/invalid_library_version_string_problem.py +38 -0
- griptape_nodes/retained_mode/managers/fitness_problems/workflows/invalid_metadata_schema_problem.py +31 -0
- griptape_nodes/retained_mode/managers/fitness_problems/workflows/invalid_metadata_section_count_problem.py +31 -0
- griptape_nodes/retained_mode/managers/fitness_problems/workflows/invalid_toml_format_problem.py +30 -0
- griptape_nodes/retained_mode/managers/fitness_problems/workflows/library_not_registered_problem.py +35 -0
- griptape_nodes/retained_mode/managers/fitness_problems/workflows/library_version_below_required_problem.py +41 -0
- griptape_nodes/retained_mode/managers/fitness_problems/workflows/library_version_large_difference_problem.py +41 -0
- griptape_nodes/retained_mode/managers/fitness_problems/workflows/library_version_major_mismatch_problem.py +41 -0
- griptape_nodes/retained_mode/managers/fitness_problems/workflows/library_version_minor_difference_problem.py +41 -0
- griptape_nodes/retained_mode/managers/fitness_problems/workflows/missing_creation_date_problem.py +30 -0
- griptape_nodes/retained_mode/managers/fitness_problems/workflows/missing_last_modified_date_problem.py +30 -0
- griptape_nodes/retained_mode/managers/fitness_problems/workflows/missing_toml_section_problem.py +30 -0
- griptape_nodes/retained_mode/managers/fitness_problems/workflows/node_type_not_found_problem.py +51 -0
- griptape_nodes/retained_mode/managers/fitness_problems/workflows/workflow_not_found_problem.py +27 -0
- griptape_nodes/retained_mode/managers/fitness_problems/workflows/workflow_problem.py +20 -0
- griptape_nodes/retained_mode/managers/fitness_problems/workflows/workflow_schema_version_problem.py +39 -0
- griptape_nodes/retained_mode/managers/library_lifecycle/library_provenance/local_file.py +17 -3
- griptape_nodes/retained_mode/managers/library_manager.py +226 -77
- griptape_nodes/retained_mode/managers/os_manager.py +172 -1
- griptape_nodes/retained_mode/managers/settings.py +5 -0
- griptape_nodes/retained_mode/managers/version_compatibility_manager.py +76 -51
- griptape_nodes/retained_mode/managers/workflow_manager.py +237 -159
- griptape_nodes/servers/static.py +18 -19
- griptape_nodes/version_compatibility/versions/v0_39_0/modified_parameters_set_removal.py +16 -12
- griptape_nodes/version_compatibility/workflow_versions/v0_7_0/local_executor_argument_addition.py +6 -3
- {griptape_nodes-0.62.2.dist-info → griptape_nodes-0.63.0.dist-info}/METADATA +2 -1
- {griptape_nodes-0.62.2.dist-info → griptape_nodes-0.63.0.dist-info}/RECORD +74 -21
- {griptape_nodes-0.62.2.dist-info → griptape_nodes-0.63.0.dist-info}/WHEEL +0 -0
- {griptape_nodes-0.62.2.dist-info → griptape_nodes-0.63.0.dist-info}/entry_points.txt +0 -0
|
@@ -29,6 +29,7 @@ class RunAgentRequest(RequestPayload):
|
|
|
29
29
|
Args:
|
|
30
30
|
input: Text input to send to the agent
|
|
31
31
|
url_artifacts: List of URL artifacts to include with the request
|
|
32
|
+
thread_id: Thread ID to use for conversation.
|
|
32
33
|
additional_mcp_servers: List of additional MCP server names to include
|
|
33
34
|
|
|
34
35
|
Results: RunAgentResultStarted -> RunAgentResultSuccess (with output) | RunAgentResultFailure (execution error)
|
|
@@ -36,6 +37,7 @@ class RunAgentRequest(RequestPayload):
|
|
|
36
37
|
|
|
37
38
|
input: str
|
|
38
39
|
url_artifacts: list[RunAgentRequestArtifact]
|
|
40
|
+
thread_id: str
|
|
39
41
|
additional_mcp_servers: list[str] = field(default_factory=list)
|
|
40
42
|
|
|
41
43
|
|
|
@@ -52,9 +54,11 @@ class RunAgentResultSuccess(WorkflowNotAlteredMixin, ResultPayloadSuccess):
|
|
|
52
54
|
|
|
53
55
|
Args:
|
|
54
56
|
output: Dictionary containing agent response and execution results
|
|
57
|
+
thread_id: The thread ID used for this conversation
|
|
55
58
|
"""
|
|
56
59
|
|
|
57
60
|
output: dict
|
|
61
|
+
thread_id: str
|
|
58
62
|
|
|
59
63
|
|
|
60
64
|
@dataclass
|
|
@@ -77,9 +81,14 @@ class GetConversationMemoryRequest(RequestPayload):
|
|
|
77
81
|
Use when: Reviewing conversation history, implementing memory inspection,
|
|
78
82
|
debugging agent behavior, displaying conversation context.
|
|
79
83
|
|
|
84
|
+
Args:
|
|
85
|
+
thread_id: Thread ID to retrieve memory from.
|
|
86
|
+
|
|
80
87
|
Results: GetConversationMemoryResultSuccess (with runs) | GetConversationMemoryResultFailure (memory error)
|
|
81
88
|
"""
|
|
82
89
|
|
|
90
|
+
thread_id: str
|
|
91
|
+
|
|
83
92
|
|
|
84
93
|
@dataclass
|
|
85
94
|
@PayloadRegistry.register
|
|
@@ -88,9 +97,11 @@ class GetConversationMemoryResultSuccess(WorkflowNotAlteredMixin, ResultPayloadS
|
|
|
88
97
|
|
|
89
98
|
Args:
|
|
90
99
|
runs: List of conversation runs (exchanges between user and agent)
|
|
100
|
+
thread_id: The thread ID for this conversation memory
|
|
91
101
|
"""
|
|
92
102
|
|
|
93
103
|
runs: list[Run]
|
|
104
|
+
thread_id: str
|
|
94
105
|
|
|
95
106
|
|
|
96
107
|
@dataclass
|
|
@@ -130,26 +141,238 @@ class ConfigureAgentResultFailure(WorkflowNotAlteredMixin, ResultPayloadFailure)
|
|
|
130
141
|
|
|
131
142
|
@dataclass
|
|
132
143
|
@PayloadRegistry.register
|
|
133
|
-
class
|
|
134
|
-
"""
|
|
144
|
+
class CreateThreadRequest(RequestPayload):
|
|
145
|
+
"""Create a new conversation thread.
|
|
146
|
+
|
|
147
|
+
Use when: Starting a new conversation, initializing thread storage,
|
|
148
|
+
creating named conversation contexts.
|
|
149
|
+
|
|
150
|
+
Args:
|
|
151
|
+
title: Optional title for the thread. If not provided, will be auto-generated from first message.
|
|
152
|
+
local_id: Optional local identifier to store in thread metadata.
|
|
153
|
+
|
|
154
|
+
Results: CreateThreadResultSuccess (with thread_id) | CreateThreadResultFailure (creation error)
|
|
155
|
+
"""
|
|
135
156
|
|
|
136
|
-
|
|
137
|
-
|
|
157
|
+
title: str | None = None
|
|
158
|
+
local_id: str | None = None
|
|
138
159
|
|
|
139
|
-
|
|
160
|
+
|
|
161
|
+
@dataclass
|
|
162
|
+
@PayloadRegistry.register
|
|
163
|
+
class CreateThreadResultSuccess(WorkflowNotAlteredMixin, ResultPayloadSuccess):
|
|
164
|
+
"""Thread created successfully.
|
|
165
|
+
|
|
166
|
+
Args:
|
|
167
|
+
thread_id: Unique identifier for the created thread
|
|
168
|
+
title: Thread title (may be None if not provided and no messages yet)
|
|
169
|
+
created_at: ISO timestamp when thread was created
|
|
170
|
+
updated_at: ISO timestamp when thread was last updated
|
|
140
171
|
"""
|
|
141
172
|
|
|
173
|
+
thread_id: str
|
|
174
|
+
title: str | None
|
|
175
|
+
created_at: str
|
|
176
|
+
updated_at: str
|
|
177
|
+
|
|
142
178
|
|
|
143
179
|
@dataclass
|
|
144
180
|
@PayloadRegistry.register
|
|
145
|
-
class
|
|
146
|
-
"""
|
|
181
|
+
class CreateThreadResultFailure(WorkflowNotAlteredMixin, ResultPayloadFailure):
|
|
182
|
+
"""Thread creation failed. Common causes: storage error, invalid parameters."""
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
@dataclass
|
|
186
|
+
@PayloadRegistry.register
|
|
187
|
+
class ListThreadsRequest(RequestPayload):
|
|
188
|
+
"""List all conversation threads.
|
|
189
|
+
|
|
190
|
+
Use when: Displaying thread list, retrieving available conversations,
|
|
191
|
+
implementing thread selection UI.
|
|
192
|
+
|
|
193
|
+
Results: ListThreadsResultSuccess (with threads) | ListThreadsResultFailure (retrieval error)
|
|
194
|
+
"""
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
@dataclass
|
|
198
|
+
class ThreadMetadata:
|
|
199
|
+
"""Metadata for a conversation thread."""
|
|
200
|
+
|
|
201
|
+
thread_id: str
|
|
202
|
+
title: str | None
|
|
203
|
+
created_at: str
|
|
204
|
+
updated_at: str
|
|
205
|
+
message_count: int
|
|
206
|
+
archived: bool
|
|
207
|
+
local_id: str | None = None
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
@dataclass
|
|
211
|
+
@PayloadRegistry.register
|
|
212
|
+
class ListThreadsResultSuccess(WorkflowNotAlteredMixin, ResultPayloadSuccess):
|
|
213
|
+
"""Threads retrieved successfully.
|
|
214
|
+
|
|
215
|
+
Args:
|
|
216
|
+
threads: List of thread metadata objects
|
|
217
|
+
"""
|
|
218
|
+
|
|
219
|
+
threads: list[ThreadMetadata]
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
@dataclass
|
|
223
|
+
@PayloadRegistry.register
|
|
224
|
+
class ListThreadsResultFailure(WorkflowNotAlteredMixin, ResultPayloadFailure):
|
|
225
|
+
"""Thread listing failed. Common causes: storage error, permission error."""
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
@dataclass
|
|
229
|
+
@PayloadRegistry.register
|
|
230
|
+
class DeleteThreadRequest(RequestPayload):
|
|
231
|
+
"""Delete a conversation thread permanently.
|
|
232
|
+
|
|
233
|
+
Use when: Removing unwanted conversations, cleaning up storage,
|
|
234
|
+
implementing thread deletion UI.
|
|
235
|
+
|
|
236
|
+
Args:
|
|
237
|
+
thread_id: ID of the thread to delete
|
|
238
|
+
|
|
239
|
+
Results: DeleteThreadResultSuccess | DeleteThreadResultFailure (deletion error)
|
|
240
|
+
"""
|
|
241
|
+
|
|
242
|
+
thread_id: str
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
@dataclass
|
|
246
|
+
@PayloadRegistry.register
|
|
247
|
+
class DeleteThreadResultSuccess(WorkflowNotAlteredMixin, ResultPayloadSuccess):
|
|
248
|
+
"""Thread deleted successfully.
|
|
249
|
+
|
|
250
|
+
Args:
|
|
251
|
+
thread_id: ID of the deleted thread
|
|
252
|
+
"""
|
|
253
|
+
|
|
254
|
+
thread_id: str
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
@dataclass
|
|
258
|
+
@PayloadRegistry.register
|
|
259
|
+
class DeleteThreadResultFailure(WorkflowNotAlteredMixin, ResultPayloadFailure):
|
|
260
|
+
"""Thread deletion failed. Common causes: thread not found, storage error."""
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
@dataclass
|
|
264
|
+
@PayloadRegistry.register
|
|
265
|
+
class RenameThreadRequest(RequestPayload):
|
|
266
|
+
"""Rename an existing thread.
|
|
267
|
+
|
|
268
|
+
Use when: Updating thread titles, organizing conversations,
|
|
269
|
+
implementing thread editing UI.
|
|
270
|
+
|
|
271
|
+
Args:
|
|
272
|
+
thread_id: ID of the thread to rename
|
|
273
|
+
new_title: New title for the thread
|
|
274
|
+
|
|
275
|
+
Results: RenameThreadResultSuccess | RenameThreadResultFailure (rename error)
|
|
276
|
+
"""
|
|
277
|
+
|
|
278
|
+
thread_id: str
|
|
279
|
+
new_title: str
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
@dataclass
|
|
283
|
+
@PayloadRegistry.register
|
|
284
|
+
class RenameThreadResultSuccess(WorkflowNotAlteredMixin, ResultPayloadSuccess):
|
|
285
|
+
"""Thread renamed successfully.
|
|
286
|
+
|
|
287
|
+
Args:
|
|
288
|
+
thread_id: ID of the renamed thread
|
|
289
|
+
title: New title of the thread
|
|
290
|
+
updated_at: ISO timestamp when thread was updated
|
|
291
|
+
"""
|
|
292
|
+
|
|
293
|
+
thread_id: str
|
|
294
|
+
title: str
|
|
295
|
+
updated_at: str
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
@dataclass
|
|
299
|
+
@PayloadRegistry.register
|
|
300
|
+
class RenameThreadResultFailure(WorkflowNotAlteredMixin, ResultPayloadFailure):
|
|
301
|
+
"""Thread rename failed. Common causes: thread not found, storage error."""
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
@dataclass
|
|
305
|
+
@PayloadRegistry.register
|
|
306
|
+
class ArchiveThreadRequest(RequestPayload):
|
|
307
|
+
"""Archive a conversation thread.
|
|
308
|
+
|
|
309
|
+
Use when: Organizing conversations, hiding inactive threads,
|
|
310
|
+
cleaning up thread list without permanently deleting.
|
|
311
|
+
|
|
312
|
+
Args:
|
|
313
|
+
thread_id: ID of the thread to archive
|
|
314
|
+
|
|
315
|
+
Results: ArchiveThreadResultSuccess | ArchiveThreadResultFailure (archive error)
|
|
316
|
+
"""
|
|
317
|
+
|
|
318
|
+
thread_id: str
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
@dataclass
|
|
322
|
+
@PayloadRegistry.register
|
|
323
|
+
class ArchiveThreadResultSuccess(WorkflowNotAlteredMixin, ResultPayloadSuccess):
|
|
324
|
+
"""Thread archived successfully.
|
|
325
|
+
|
|
326
|
+
Args:
|
|
327
|
+
thread_id: ID of the archived thread
|
|
328
|
+
updated_at: ISO timestamp when thread was updated
|
|
329
|
+
"""
|
|
330
|
+
|
|
331
|
+
thread_id: str
|
|
332
|
+
updated_at: str
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
@dataclass
|
|
336
|
+
@PayloadRegistry.register
|
|
337
|
+
class ArchiveThreadResultFailure(WorkflowNotAlteredMixin, ResultPayloadFailure):
|
|
338
|
+
"""Thread archive failed. Common causes: thread not found, already archived, storage error."""
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
@dataclass
|
|
342
|
+
@PayloadRegistry.register
|
|
343
|
+
class UnarchiveThreadRequest(RequestPayload):
|
|
344
|
+
"""Unarchive a conversation thread.
|
|
345
|
+
|
|
346
|
+
Use when: Restoring archived conversations, resuming old threads,
|
|
347
|
+
making archived threads active again.
|
|
348
|
+
|
|
349
|
+
Args:
|
|
350
|
+
thread_id: ID of the thread to unarchive
|
|
351
|
+
|
|
352
|
+
Results: UnarchiveThreadResultSuccess | UnarchiveThreadResultFailure (unarchive error)
|
|
353
|
+
"""
|
|
354
|
+
|
|
355
|
+
thread_id: str
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
@dataclass
|
|
359
|
+
@PayloadRegistry.register
|
|
360
|
+
class UnarchiveThreadResultSuccess(WorkflowNotAlteredMixin, ResultPayloadSuccess):
|
|
361
|
+
"""Thread unarchived successfully.
|
|
362
|
+
|
|
363
|
+
Args:
|
|
364
|
+
thread_id: ID of the unarchived thread
|
|
365
|
+
updated_at: ISO timestamp when thread was updated
|
|
366
|
+
"""
|
|
367
|
+
|
|
368
|
+
thread_id: str
|
|
369
|
+
updated_at: str
|
|
147
370
|
|
|
148
371
|
|
|
149
372
|
@dataclass
|
|
150
373
|
@PayloadRegistry.register
|
|
151
|
-
class
|
|
152
|
-
"""
|
|
374
|
+
class UnarchiveThreadResultFailure(WorkflowNotAlteredMixin, ResultPayloadFailure):
|
|
375
|
+
"""Thread unarchive failed. Common causes: thread not found, not archived, storage error."""
|
|
153
376
|
|
|
154
377
|
|
|
155
378
|
@dataclass
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
from dataclasses import dataclass, field
|
|
2
|
+
from enum import StrEnum
|
|
2
3
|
|
|
3
4
|
from griptape_nodes.retained_mode.events.base_events import (
|
|
4
5
|
AppPayload,
|
|
@@ -11,6 +12,21 @@ from griptape_nodes.retained_mode.events.base_events import (
|
|
|
11
12
|
from griptape_nodes.retained_mode.events.payload_registry import PayloadRegistry
|
|
12
13
|
|
|
13
14
|
|
|
15
|
+
class InitializationPhase(StrEnum):
|
|
16
|
+
"""Initialization phase types for engine startup."""
|
|
17
|
+
|
|
18
|
+
LIBRARIES = "libraries"
|
|
19
|
+
WORKFLOWS = "workflows"
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class InitializationStatus(StrEnum):
|
|
23
|
+
"""Status types for initialization progress."""
|
|
24
|
+
|
|
25
|
+
LOADING = "loading"
|
|
26
|
+
COMPLETE = "complete"
|
|
27
|
+
FAILED = "failed"
|
|
28
|
+
|
|
29
|
+
|
|
14
30
|
@dataclass
|
|
15
31
|
class OrganizationInfo:
|
|
16
32
|
"""Organization information from Griptape Cloud."""
|
|
@@ -104,6 +120,28 @@ class AppConnectionEstablished(AppPayload):
|
|
|
104
120
|
"""Notification that a connection to the API has been established."""
|
|
105
121
|
|
|
106
122
|
|
|
123
|
+
@dataclass
|
|
124
|
+
@PayloadRegistry.register
|
|
125
|
+
class EngineInitializationProgress(AppPayload):
|
|
126
|
+
"""Real-time progress updates during engine initialization (libraries and workflows loading).
|
|
127
|
+
|
|
128
|
+
Args:
|
|
129
|
+
phase: Current initialization phase (libraries or workflows)
|
|
130
|
+
item_name: Name of the library or workflow being loaded
|
|
131
|
+
status: Current status of the item (loading, complete, or failed)
|
|
132
|
+
current: Number of items completed so far
|
|
133
|
+
total: Total number of items to load
|
|
134
|
+
error: Error message if status is failed, None otherwise
|
|
135
|
+
"""
|
|
136
|
+
|
|
137
|
+
phase: InitializationPhase
|
|
138
|
+
item_name: str
|
|
139
|
+
status: InitializationStatus
|
|
140
|
+
current: int
|
|
141
|
+
total: int
|
|
142
|
+
error: str | None = None
|
|
143
|
+
|
|
144
|
+
|
|
107
145
|
@dataclass
|
|
108
146
|
@PayloadRegistry.register
|
|
109
147
|
class GetEngineVersionRequest(RequestPayload):
|
|
@@ -14,6 +14,7 @@ from griptape_nodes.retained_mode.events.payload_registry import PayloadRegistry
|
|
|
14
14
|
|
|
15
15
|
if TYPE_CHECKING:
|
|
16
16
|
from griptape_nodes.node_library.library_registry import LibraryMetadata, LibrarySchema, NodeMetadata
|
|
17
|
+
from griptape_nodes.retained_mode.managers.fitness_problems.libraries import LibraryProblem
|
|
17
18
|
from griptape_nodes.retained_mode.managers.library_lifecycle.library_status import LibraryStatus
|
|
18
19
|
|
|
19
20
|
|
|
@@ -201,14 +202,14 @@ class LoadLibraryMetadataFromFileResultFailure(WorkflowNotAlteredMixin, ResultPa
|
|
|
201
202
|
None if the name couldn't be determined.
|
|
202
203
|
status: The LibraryStatus enum indicating the type of failure
|
|
203
204
|
(MISSING, UNUSABLE, etc.).
|
|
204
|
-
problems: List of specific
|
|
205
|
-
|
|
205
|
+
problems: List of specific problems encountered during loading
|
|
206
|
+
(file not found, JSON parse errors, validation failures, etc.).
|
|
206
207
|
"""
|
|
207
208
|
|
|
208
209
|
library_path: str
|
|
209
210
|
library_name: str | None
|
|
210
211
|
status: LibraryStatus
|
|
211
|
-
problems: list[
|
|
212
|
+
problems: list[LibraryProblem]
|
|
212
213
|
|
|
213
214
|
|
|
214
215
|
@dataclass
|
|
@@ -510,3 +511,31 @@ class ReloadAllLibrariesResultSuccess(WorkflowAlteredMixin, ResultPayloadSuccess
|
|
|
510
511
|
@PayloadRegistry.register
|
|
511
512
|
class ReloadAllLibrariesResultFailure(ResultPayloadFailure):
|
|
512
513
|
"""Library reload failed. Common causes: library loading errors, system constraints, initialization failures."""
|
|
514
|
+
|
|
515
|
+
|
|
516
|
+
@dataclass
|
|
517
|
+
@PayloadRegistry.register
|
|
518
|
+
class LoadLibrariesRequest(RequestPayload):
|
|
519
|
+
"""Load all libraries from configuration if they are not already loaded.
|
|
520
|
+
|
|
521
|
+
This is a non-destructive operation that checks if libraries are already loaded
|
|
522
|
+
and only performs the initial loading if needed. Unlike ReloadAllLibrariesRequest,
|
|
523
|
+
this does NOT clear any workflow state.
|
|
524
|
+
|
|
525
|
+
Use when: Ensuring libraries are loaded at workflow startup, initializing library
|
|
526
|
+
system on demand, preparing library catalog without disrupting existing workflows.
|
|
527
|
+
|
|
528
|
+
Results: LoadLibrariesResultSuccess | LoadLibrariesResultFailure (loading error)
|
|
529
|
+
"""
|
|
530
|
+
|
|
531
|
+
|
|
532
|
+
@dataclass
|
|
533
|
+
@PayloadRegistry.register
|
|
534
|
+
class LoadLibrariesResultSuccess(WorkflowNotAlteredMixin, ResultPayloadSuccess):
|
|
535
|
+
"""Libraries loaded successfully (or were already loaded)."""
|
|
536
|
+
|
|
537
|
+
|
|
538
|
+
@dataclass
|
|
539
|
+
@PayloadRegistry.register
|
|
540
|
+
class LoadLibrariesResultFailure(WorkflowNotAlteredMixin, ResultPayloadFailure):
|
|
541
|
+
"""Library loading failed. Common causes: library loading errors, configuration issues, initialization failures."""
|
|
@@ -52,10 +52,11 @@ class FileSystemEntry:
|
|
|
52
52
|
"""Represents a file or directory in the file system."""
|
|
53
53
|
|
|
54
54
|
name: str
|
|
55
|
-
path: str
|
|
55
|
+
path: str # Workspace-relative path (for portability)
|
|
56
56
|
is_dir: bool
|
|
57
57
|
size: int
|
|
58
58
|
modified_time: float
|
|
59
|
+
absolute_path: str # Absolute resolved path
|
|
59
60
|
mime_type: str | None = None # None for directories, mimetype for files
|
|
60
61
|
|
|
61
62
|
|
|
@@ -111,6 +112,8 @@ class ListDirectoryRequest(RequestPayload):
|
|
|
111
112
|
show_hidden: Whether to show hidden files/folders
|
|
112
113
|
workspace_only: If True, constrain to workspace directory. If False, allow system-wide browsing.
|
|
113
114
|
If None, workspace constraints don't apply (e.g., cloud environments).
|
|
115
|
+
pattern: Optional glob pattern to filter entries (e.g., "*.txt", "file_*.json").
|
|
116
|
+
Only matches against file/directory names, not full paths.
|
|
114
117
|
|
|
115
118
|
Results: ListDirectoryResultSuccess (with entries) | ListDirectoryResultFailure (access denied, not found)
|
|
116
119
|
"""
|
|
@@ -118,6 +121,7 @@ class ListDirectoryRequest(RequestPayload):
|
|
|
118
121
|
directory_path: str | None = None
|
|
119
122
|
show_hidden: bool = False
|
|
120
123
|
workspace_only: bool | None = True
|
|
124
|
+
pattern: str | None = None
|
|
121
125
|
|
|
122
126
|
|
|
123
127
|
@dataclass
|
|
@@ -474,3 +478,99 @@ class CopyFileResultFailure(WorkflowNotAlteredMixin, ResultPayloadFailure):
|
|
|
474
478
|
"""
|
|
475
479
|
|
|
476
480
|
failure_reason: FileIOFailureReason
|
|
481
|
+
|
|
482
|
+
|
|
483
|
+
@dataclass
|
|
484
|
+
@PayloadRegistry.register
|
|
485
|
+
class DeleteFileRequest(RequestPayload):
|
|
486
|
+
"""Delete a file or directory.
|
|
487
|
+
|
|
488
|
+
Use when: Deleting files/directories through file picker,
|
|
489
|
+
implementing file deletion functionality, cleaning up temporary files.
|
|
490
|
+
|
|
491
|
+
Note: Directories are always deleted with all their contents.
|
|
492
|
+
|
|
493
|
+
Args:
|
|
494
|
+
path: Path to file/directory to delete (mutually exclusive with file_entry)
|
|
495
|
+
file_entry: FileSystemEntry from directory listing (mutually exclusive with path)
|
|
496
|
+
workspace_only: If True, constrain to workspace directory
|
|
497
|
+
|
|
498
|
+
Results: DeleteFileResultSuccess | DeleteFileResultFailure
|
|
499
|
+
"""
|
|
500
|
+
|
|
501
|
+
path: str | None = None
|
|
502
|
+
file_entry: FileSystemEntry | None = None
|
|
503
|
+
workspace_only: bool | None = True
|
|
504
|
+
|
|
505
|
+
|
|
506
|
+
@dataclass
|
|
507
|
+
@PayloadRegistry.register
|
|
508
|
+
class DeleteFileResultSuccess(WorkflowNotAlteredMixin, ResultPayloadSuccess):
|
|
509
|
+
"""File/directory deleted successfully.
|
|
510
|
+
|
|
511
|
+
Attributes:
|
|
512
|
+
deleted_path: The absolute path that was deleted (primary path)
|
|
513
|
+
was_directory: Whether the deleted item was a directory
|
|
514
|
+
deleted_paths: List of all paths that were deleted (for recursive deletes, includes all files/dirs)
|
|
515
|
+
"""
|
|
516
|
+
|
|
517
|
+
deleted_path: str
|
|
518
|
+
was_directory: bool
|
|
519
|
+
deleted_paths: list[str]
|
|
520
|
+
|
|
521
|
+
|
|
522
|
+
@dataclass
|
|
523
|
+
@PayloadRegistry.register
|
|
524
|
+
class DeleteFileResultFailure(WorkflowNotAlteredMixin, ResultPayloadFailure):
|
|
525
|
+
"""File/directory deletion failed.
|
|
526
|
+
|
|
527
|
+
Attributes:
|
|
528
|
+
failure_reason: Classification of why the deletion failed
|
|
529
|
+
result_details: Human-readable error message (inherited from ResultPayloadFailure)
|
|
530
|
+
"""
|
|
531
|
+
|
|
532
|
+
failure_reason: FileIOFailureReason
|
|
533
|
+
|
|
534
|
+
|
|
535
|
+
@dataclass
|
|
536
|
+
@PayloadRegistry.register
|
|
537
|
+
class GetFileInfoRequest(RequestPayload):
|
|
538
|
+
"""Get information about a file or directory.
|
|
539
|
+
|
|
540
|
+
Use when: Checking if a path exists, determining if path is file/directory,
|
|
541
|
+
getting file metadata before operations.
|
|
542
|
+
|
|
543
|
+
Args:
|
|
544
|
+
path: Path to file/directory to get info about
|
|
545
|
+
workspace_only: If True, constrain to workspace directory
|
|
546
|
+
|
|
547
|
+
Results: GetFileInfoResultSuccess | GetFileInfoResultFailure
|
|
548
|
+
"""
|
|
549
|
+
|
|
550
|
+
path: str
|
|
551
|
+
workspace_only: bool | None = True
|
|
552
|
+
|
|
553
|
+
|
|
554
|
+
@dataclass
|
|
555
|
+
@PayloadRegistry.register
|
|
556
|
+
class GetFileInfoResultSuccess(WorkflowNotAlteredMixin, ResultPayloadSuccess):
|
|
557
|
+
"""File/directory either did not exist (we do not treat this as failure), or the info was retrieved successfully.
|
|
558
|
+
|
|
559
|
+
Attributes:
|
|
560
|
+
file_entry: FileSystemEntry with complete metadata, or None if the file/directory doesn't exist
|
|
561
|
+
"""
|
|
562
|
+
|
|
563
|
+
file_entry: FileSystemEntry | None
|
|
564
|
+
|
|
565
|
+
|
|
566
|
+
@dataclass
|
|
567
|
+
@PayloadRegistry.register
|
|
568
|
+
class GetFileInfoResultFailure(WorkflowNotAlteredMixin, ResultPayloadFailure):
|
|
569
|
+
"""File/directory info retrieval failed.
|
|
570
|
+
|
|
571
|
+
Attributes:
|
|
572
|
+
failure_reason: Classification of why retrieval failed
|
|
573
|
+
result_details: Human-readable error message (inherited from ResultPayloadFailure)
|
|
574
|
+
"""
|
|
575
|
+
|
|
576
|
+
failure_reason: FileIOFailureReason
|