griptape-nodes 0.60.4__py3-none-any.whl → 0.62.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/bootstrap/workflow_publishers/local_workflow_publisher.py +0 -1
- griptape_nodes/common/macro_parser/__init__.py +16 -1
- griptape_nodes/common/macro_parser/core.py +19 -7
- griptape_nodes/common/macro_parser/exceptions.py +99 -0
- griptape_nodes/common/macro_parser/formats.py +13 -4
- griptape_nodes/common/macro_parser/matching.py +5 -2
- griptape_nodes/common/macro_parser/parsing.py +48 -8
- griptape_nodes/common/macro_parser/resolution.py +23 -5
- griptape_nodes/common/project_templates/__init__.py +49 -0
- griptape_nodes/common/project_templates/default_project_template.py +87 -0
- griptape_nodes/common/project_templates/defaults/README.md +36 -0
- griptape_nodes/common/project_templates/directory.py +67 -0
- griptape_nodes/common/project_templates/loader.py +342 -0
- griptape_nodes/common/project_templates/project.py +252 -0
- griptape_nodes/common/project_templates/situation.py +143 -0
- griptape_nodes/common/project_templates/validation.py +140 -0
- griptape_nodes/exe_types/core_types.py +36 -3
- griptape_nodes/exe_types/node_types.py +4 -2
- griptape_nodes/exe_types/param_components/progress_bar_component.py +57 -0
- griptape_nodes/exe_types/param_types/parameter_audio.py +243 -0
- griptape_nodes/exe_types/param_types/parameter_image.py +243 -0
- griptape_nodes/exe_types/param_types/parameter_three_d.py +215 -0
- griptape_nodes/exe_types/param_types/parameter_video.py +243 -0
- griptape_nodes/node_library/workflow_registry.py +1 -1
- griptape_nodes/retained_mode/events/execution_events.py +41 -0
- griptape_nodes/retained_mode/events/node_events.py +90 -1
- griptape_nodes/retained_mode/events/os_events.py +108 -0
- griptape_nodes/retained_mode/events/parameter_events.py +1 -1
- griptape_nodes/retained_mode/events/project_events.py +528 -0
- griptape_nodes/retained_mode/events/workflow_events.py +19 -1
- griptape_nodes/retained_mode/griptape_nodes.py +9 -1
- griptape_nodes/retained_mode/managers/agent_manager.py +18 -24
- griptape_nodes/retained_mode/managers/event_manager.py +6 -9
- griptape_nodes/retained_mode/managers/flow_manager.py +63 -0
- griptape_nodes/retained_mode/managers/library_manager.py +55 -42
- griptape_nodes/retained_mode/managers/mcp_manager.py +14 -6
- griptape_nodes/retained_mode/managers/node_manager.py +232 -0
- griptape_nodes/retained_mode/managers/os_manager.py +399 -6
- griptape_nodes/retained_mode/managers/project_manager.py +1067 -0
- griptape_nodes/retained_mode/managers/settings.py +6 -0
- griptape_nodes/retained_mode/managers/sync_manager.py +4 -1
- griptape_nodes/retained_mode/managers/workflow_manager.py +8 -79
- griptape_nodes/traits/button.py +19 -0
- {griptape_nodes-0.60.4.dist-info → griptape_nodes-0.62.0.dist-info}/METADATA +5 -3
- {griptape_nodes-0.60.4.dist-info → griptape_nodes-0.62.0.dist-info}/RECORD +47 -32
- {griptape_nodes-0.60.4.dist-info → griptape_nodes-0.62.0.dist-info}/WHEEL +1 -1
- {griptape_nodes-0.60.4.dist-info → griptape_nodes-0.62.0.dist-info}/entry_points.txt +0 -0
|
@@ -95,6 +95,47 @@ class StartFlowResultFailure(ResultPayloadFailure):
|
|
|
95
95
|
validation_exceptions: list[Exception]
|
|
96
96
|
|
|
97
97
|
|
|
98
|
+
@dataclass
|
|
99
|
+
@PayloadRegistry.register
|
|
100
|
+
class StartFlowFromNodeRequest(RequestPayload):
|
|
101
|
+
"""Start executing a flow from a specific node.
|
|
102
|
+
|
|
103
|
+
Use when: Resuming execution from a particular node, debugging specific parts of a flow,
|
|
104
|
+
re-running portions of a workflow, implementing custom execution control.
|
|
105
|
+
|
|
106
|
+
Args:
|
|
107
|
+
flow_name: Name of the flow to start (deprecated)
|
|
108
|
+
node_name: Name of the node to start execution from
|
|
109
|
+
debug_mode: Whether to run in debug mode (default: False)
|
|
110
|
+
pickle_control_flow_result: If this is true, the final ControlFLowResolvedEvent will be pickled to be picked up from inside a subprocess
|
|
111
|
+
|
|
112
|
+
Results: StartFlowFromNodeResultSuccess | StartFlowFromNodeResultFailure (with validation exceptions)
|
|
113
|
+
"""
|
|
114
|
+
|
|
115
|
+
flow_name: str | None = None
|
|
116
|
+
node_name: str | None = None
|
|
117
|
+
debug_mode: bool = False
|
|
118
|
+
pickle_control_flow_result: bool = False
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
@dataclass
|
|
122
|
+
@PayloadRegistry.register
|
|
123
|
+
class StartFlowFromNodeResultSuccess(WorkflowAlteredMixin, ResultPayloadSuccess):
|
|
124
|
+
"""Flow started from node successfully. Execution is now running from the specified node."""
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
@dataclass
|
|
128
|
+
@PayloadRegistry.register
|
|
129
|
+
class StartFlowFromNodeResultFailure(ResultPayloadFailure):
|
|
130
|
+
"""Flow start from node failed. Contains validation errors that prevented execution.
|
|
131
|
+
|
|
132
|
+
Args:
|
|
133
|
+
validation_exceptions: List of validation errors that occurred
|
|
134
|
+
"""
|
|
135
|
+
|
|
136
|
+
validation_exceptions: list[Exception]
|
|
137
|
+
|
|
138
|
+
|
|
98
139
|
@dataclass
|
|
99
140
|
@PayloadRegistry.register
|
|
100
141
|
class CancelFlowRequest(RequestPayload):
|
|
@@ -10,7 +10,11 @@ from griptape_nodes.exe_types.node_types import NodeResolutionState
|
|
|
10
10
|
if TYPE_CHECKING:
|
|
11
11
|
from griptape_nodes.exe_types.core_types import NodeMessagePayload
|
|
12
12
|
from griptape_nodes.exe_types.node_types import NodeDependencies
|
|
13
|
-
from griptape_nodes.retained_mode.events.connection_events import
|
|
13
|
+
from griptape_nodes.retained_mode.events.connection_events import (
|
|
14
|
+
IncomingConnection,
|
|
15
|
+
ListConnectionsForNodeResultSuccess,
|
|
16
|
+
OutgoingConnection,
|
|
17
|
+
)
|
|
14
18
|
from griptape_nodes.retained_mode.events.parameter_events import (
|
|
15
19
|
GetParameterDetailsResultSuccess,
|
|
16
20
|
GetParameterValueResultSuccess,
|
|
@@ -819,3 +823,88 @@ class GetFlowForNodeResultFailure(WorkflowNotAlteredMixin, ResultPayloadFailure)
|
|
|
819
823
|
|
|
820
824
|
Common causes: node not found, node not assigned to any flow.
|
|
821
825
|
"""
|
|
826
|
+
|
|
827
|
+
|
|
828
|
+
@dataclass
|
|
829
|
+
@PayloadRegistry.register
|
|
830
|
+
class CanResetNodeToDefaultsRequest(RequestPayload):
|
|
831
|
+
"""Check if a node can be reset to its default state.
|
|
832
|
+
|
|
833
|
+
Use when: Need to validate whether a node reset operation is allowed before attempting it,
|
|
834
|
+
implementing UI state (enabled/disabled reset button), or providing user feedback.
|
|
835
|
+
Checks for conditions that would prevent reset (locked state, missing metadata, etc.).
|
|
836
|
+
|
|
837
|
+
Args:
|
|
838
|
+
node_name: Name of the node to check (None for current context node)
|
|
839
|
+
|
|
840
|
+
Results: CanResetNodeToDefaultsResultSuccess (with can_reset flag and reason) | CanResetNodeToDefaultsResultFailure (validation failed)
|
|
841
|
+
"""
|
|
842
|
+
|
|
843
|
+
node_name: str | None = None
|
|
844
|
+
|
|
845
|
+
|
|
846
|
+
@dataclass
|
|
847
|
+
@PayloadRegistry.register
|
|
848
|
+
class CanResetNodeToDefaultsResultSuccess(WorkflowNotAlteredMixin, ResultPayloadSuccess):
|
|
849
|
+
"""Node reset check completed successfully.
|
|
850
|
+
|
|
851
|
+
Args:
|
|
852
|
+
can_reset: True if the node can be reset to defaults, False otherwise
|
|
853
|
+
editor_tooltip_reason: Optional explanation if node cannot be reset (e.g., "Cannot reset locked node")
|
|
854
|
+
"""
|
|
855
|
+
|
|
856
|
+
can_reset: bool
|
|
857
|
+
editor_tooltip_reason: str | None = None
|
|
858
|
+
|
|
859
|
+
|
|
860
|
+
@dataclass
|
|
861
|
+
@PayloadRegistry.register
|
|
862
|
+
class CanResetNodeToDefaultsResultFailure(WorkflowNotAlteredMixin, ResultPayloadFailure):
|
|
863
|
+
"""Node reset check failed.
|
|
864
|
+
|
|
865
|
+
Common causes: node not found, no current context, no library metadata.
|
|
866
|
+
"""
|
|
867
|
+
|
|
868
|
+
|
|
869
|
+
@dataclass
|
|
870
|
+
@PayloadRegistry.register
|
|
871
|
+
class ResetNodeToDefaultsRequest(RequestPayload):
|
|
872
|
+
"""Reset a node to its default state while preserving connections where possible.
|
|
873
|
+
|
|
874
|
+
Use when: Need to reset a node's configuration back to defaults, clear customizations,
|
|
875
|
+
fix broken node state, or restore a node to its initial state. Creates a fresh instance
|
|
876
|
+
of the same node type and reconnects it to the workflow.
|
|
877
|
+
|
|
878
|
+
Args:
|
|
879
|
+
node_name: Name of the node to reset (None for current context node)
|
|
880
|
+
|
|
881
|
+
Results: ResetNodeToDefaultsResultSuccess (with reconnection status) | ResetNodeToDefaultsResultFailure (reset failed)
|
|
882
|
+
"""
|
|
883
|
+
|
|
884
|
+
node_name: str | None = None
|
|
885
|
+
|
|
886
|
+
|
|
887
|
+
@dataclass
|
|
888
|
+
@PayloadRegistry.register
|
|
889
|
+
class ResetNodeToDefaultsResultSuccess(WorkflowAlteredMixin, ResultPayloadSuccess):
|
|
890
|
+
"""Node reset to defaults successfully.
|
|
891
|
+
|
|
892
|
+
Args:
|
|
893
|
+
node_name: Name of the reset node
|
|
894
|
+
failed_incoming_connections: List of incoming connections that failed to reconnect
|
|
895
|
+
failed_outgoing_connections: List of outgoing connections that failed to reconnect
|
|
896
|
+
"""
|
|
897
|
+
|
|
898
|
+
node_name: str
|
|
899
|
+
failed_incoming_connections: list[IncomingConnection]
|
|
900
|
+
failed_outgoing_connections: list[OutgoingConnection]
|
|
901
|
+
|
|
902
|
+
|
|
903
|
+
@dataclass
|
|
904
|
+
@PayloadRegistry.register
|
|
905
|
+
class ResetNodeToDefaultsResultFailure(ResultPayloadFailure):
|
|
906
|
+
"""Node reset to defaults failed.
|
|
907
|
+
|
|
908
|
+
Common causes: node not found, no current context, failed to create new node,
|
|
909
|
+
failed to delete old node, failed to rename new node.
|
|
910
|
+
"""
|
|
@@ -366,3 +366,111 @@ class WriteFileResultFailure(WorkflowNotAlteredMixin, ResultPayloadFailure):
|
|
|
366
366
|
"""
|
|
367
367
|
|
|
368
368
|
failure_reason: FileIOFailureReason
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
@dataclass
|
|
372
|
+
@PayloadRegistry.register
|
|
373
|
+
class CopyTreeRequest(RequestPayload):
|
|
374
|
+
"""Copy an entire directory tree from source to destination.
|
|
375
|
+
|
|
376
|
+
Use when: Copying directories recursively, backing up directory structures,
|
|
377
|
+
duplicating folder hierarchies with all contents.
|
|
378
|
+
|
|
379
|
+
Args:
|
|
380
|
+
source_path: Path to the source directory to copy
|
|
381
|
+
destination_path: Path where the directory tree should be copied
|
|
382
|
+
symlinks: If True, copy symbolic links as links (default: False)
|
|
383
|
+
ignore_dangling_symlinks: If True, ignore dangling symlinks (default: False)
|
|
384
|
+
dirs_exist_ok: If True, allow destination to exist (default: False)
|
|
385
|
+
ignore_patterns: List of glob patterns to ignore (e.g., ["__pycache__", "*.pyc", ".git"])
|
|
386
|
+
|
|
387
|
+
Results: CopyTreeResultSuccess | CopyTreeResultFailure
|
|
388
|
+
"""
|
|
389
|
+
|
|
390
|
+
source_path: str
|
|
391
|
+
destination_path: str
|
|
392
|
+
symlinks: bool = False
|
|
393
|
+
ignore_dangling_symlinks: bool = False
|
|
394
|
+
dirs_exist_ok: bool = False
|
|
395
|
+
ignore_patterns: list[str] | None = None
|
|
396
|
+
|
|
397
|
+
|
|
398
|
+
@dataclass
|
|
399
|
+
@PayloadRegistry.register
|
|
400
|
+
class CopyTreeResultSuccess(WorkflowNotAlteredMixin, ResultPayloadSuccess):
|
|
401
|
+
"""Directory tree copied successfully.
|
|
402
|
+
|
|
403
|
+
Attributes:
|
|
404
|
+
source_path: Source path that was copied
|
|
405
|
+
destination_path: Destination path where tree was copied
|
|
406
|
+
files_copied: Number of files copied
|
|
407
|
+
total_bytes_copied: Total bytes copied
|
|
408
|
+
"""
|
|
409
|
+
|
|
410
|
+
source_path: str
|
|
411
|
+
destination_path: str
|
|
412
|
+
files_copied: int
|
|
413
|
+
total_bytes_copied: int
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
@dataclass
|
|
417
|
+
@PayloadRegistry.register
|
|
418
|
+
class CopyTreeResultFailure(WorkflowNotAlteredMixin, ResultPayloadFailure):
|
|
419
|
+
"""Directory tree copy failed.
|
|
420
|
+
|
|
421
|
+
Attributes:
|
|
422
|
+
failure_reason: Classification of why the copy failed
|
|
423
|
+
result_details: Human-readable error message (inherited from ResultPayloadFailure)
|
|
424
|
+
"""
|
|
425
|
+
|
|
426
|
+
failure_reason: FileIOFailureReason
|
|
427
|
+
|
|
428
|
+
|
|
429
|
+
@dataclass
|
|
430
|
+
@PayloadRegistry.register
|
|
431
|
+
class CopyFileRequest(RequestPayload):
|
|
432
|
+
"""Copy a single file from source to destination.
|
|
433
|
+
|
|
434
|
+
Use when: Copying individual files, duplicating files,
|
|
435
|
+
backing up single files.
|
|
436
|
+
|
|
437
|
+
Args:
|
|
438
|
+
source_path: Path to the source file to copy
|
|
439
|
+
destination_path: Path where the file should be copied
|
|
440
|
+
overwrite: If True, overwrite destination if it exists (default: False)
|
|
441
|
+
|
|
442
|
+
Results: CopyFileResultSuccess | CopyFileResultFailure
|
|
443
|
+
"""
|
|
444
|
+
|
|
445
|
+
source_path: str
|
|
446
|
+
destination_path: str
|
|
447
|
+
overwrite: bool = False
|
|
448
|
+
|
|
449
|
+
|
|
450
|
+
@dataclass
|
|
451
|
+
@PayloadRegistry.register
|
|
452
|
+
class CopyFileResultSuccess(WorkflowNotAlteredMixin, ResultPayloadSuccess):
|
|
453
|
+
"""File copied successfully.
|
|
454
|
+
|
|
455
|
+
Attributes:
|
|
456
|
+
source_path: Source path that was copied
|
|
457
|
+
destination_path: Destination path where file was copied
|
|
458
|
+
bytes_copied: Number of bytes copied
|
|
459
|
+
"""
|
|
460
|
+
|
|
461
|
+
source_path: str
|
|
462
|
+
destination_path: str
|
|
463
|
+
bytes_copied: int
|
|
464
|
+
|
|
465
|
+
|
|
466
|
+
@dataclass
|
|
467
|
+
@PayloadRegistry.register
|
|
468
|
+
class CopyFileResultFailure(WorkflowNotAlteredMixin, ResultPayloadFailure):
|
|
469
|
+
"""File copy failed.
|
|
470
|
+
|
|
471
|
+
Attributes:
|
|
472
|
+
failure_reason: Classification of why the copy failed
|
|
473
|
+
result_details: Human-readable error message (inherited from ResultPayloadFailure)
|
|
474
|
+
"""
|
|
475
|
+
|
|
476
|
+
failure_reason: FileIOFailureReason
|
|
@@ -161,7 +161,7 @@ class SetParameterValueRequest(RequestPayload):
|
|
|
161
161
|
"""
|
|
162
162
|
|
|
163
163
|
parameter_name: str
|
|
164
|
-
value:
|
|
164
|
+
value: str | int | float | bool | dict | None
|
|
165
165
|
# If node name is None, use the Current Context
|
|
166
166
|
node_name: str | None = None
|
|
167
167
|
data_type: str | None = None
|