griptape-nodes 0.65.0__py3-none-any.whl → 0.65.1__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.
@@ -473,6 +473,7 @@ class ControlFlowMachine(FSM[ControlFlowContext]):
473
473
  node.state = NodeResolutionState.UNRESOLVED
474
474
  # Use proxy node if this node is part of a group, otherwise use original node
475
475
  node_to_add = node
476
+ disconnected = True
476
477
  # Only add if not already added (proxy might already be in DAG)
477
478
  if node_to_add.name not in dag_builder.node_to_reference:
478
479
  # Now, we need to create the DAG, but it can't be queued or used until it's dependencies have been resolved.
@@ -482,9 +483,15 @@ class ControlFlowMachine(FSM[ControlFlowContext]):
482
483
  correct_graph = flow_manager.is_node_connected(graph_start_node, node)
483
484
  # This means this node is in the downstream connection of one of this graph.
484
485
  if correct_graph:
486
+ # Is the node connected to a graph?
487
+ disconnected = False
485
488
  if node.name not in dag_builder.start_node_candidates:
486
489
  dag_builder.start_node_candidates[node.name] = set()
487
490
  dag_builder.start_node_candidates[node.name].add(graph_start_node_name)
491
+ if disconnected:
492
+ # If the node is not connected to any graph, we can add it as it's own graph here.
493
+ # It will not cause any overlapping confusion with existing graphs.
494
+ dag_builder.add_node_with_dependencies(node_to_add, node_to_add.name)
488
495
  flow_manager.global_flow_queue.queue.remove(item)
489
496
 
490
497
  return start_nodes
@@ -617,7 +617,11 @@ class LibraryManager:
617
617
  # Get git remote and ref if this library is in a git repository
618
618
  library_dir = json_path.parent.absolute()
619
619
  git_remote = get_git_remote(library_dir)
620
- git_ref = get_current_ref(library_dir)
620
+ try:
621
+ git_ref = get_current_ref(library_dir)
622
+ except GitRefError as e:
623
+ logger.debug("Failed to get git ref for %s: %s", library_dir, e)
624
+ git_ref = None
621
625
 
622
626
  details = f"Successfully loaded library metadata from JSON file at {json_path}"
623
627
  return LoadLibraryMetadataFromFileResultSuccess(
@@ -773,7 +777,11 @@ class LibraryManager:
773
777
 
774
778
  # Get git remote and ref if the sandbox directory is in a git repository
775
779
  git_remote = get_git_remote(sandbox_library_dir)
776
- git_ref = get_current_ref(sandbox_library_dir)
780
+ try:
781
+ git_ref = get_current_ref(sandbox_library_dir)
782
+ except GitRefError as e:
783
+ logger.debug("Failed to get git ref for sandbox library %s: %s", sandbox_library_dir, e)
784
+ git_ref = None
777
785
 
778
786
  details = f"Successfully generated sandbox library metadata with {len(node_definitions)} nodes from {sandbox_library_dir}"
779
787
  return LoadLibraryMetadataFromFileResultSuccess(
@@ -293,6 +293,11 @@ def get_current_ref(library_path: Path) -> str | None:
293
293
 
294
294
  repo = pygit2.Repository(repo_path)
295
295
 
296
+ # Check if HEAD is unborn (no commits yet)
297
+ if repo.head_is_unborn:
298
+ logger.debug("Repository at %s has unborn HEAD (no commits)", library_path)
299
+ return None
300
+
296
301
  # Check if HEAD is detached
297
302
  if repo.head_is_detached:
298
303
  # HEAD is detached - check if it's pointing to a tag
@@ -631,12 +636,17 @@ def update_to_moving_tag(library_path: Path, tag_name: str, *, overwrite_existin
631
636
 
632
637
  # Use pygit2 to fetch tags and checkout
633
638
  try:
634
- # Step 1: Fetch all tags, force update existing ones
639
+ # Step 1: Delete local tag to allow fetch to update it (pygit2 doesn't honor +force)
640
+ tag_ref = f"refs/tags/{tag_name}"
641
+ if tag_ref in repo.references:
642
+ repo.references.delete(tag_ref)
643
+ logger.debug("Deleted local tag %s to allow force-update", tag_name)
644
+
645
+ # Step 2: Fetch all tags (will create the deleted tag with new commit)
635
646
  remote = repo.remotes["origin"]
636
647
  remote.fetch(refspecs=["+refs/tags/*:refs/tags/*"])
637
648
 
638
- # Step 2: Checkout the tag with force to discard local changes
639
- tag_ref = f"refs/tags/{tag_name}"
649
+ # Step 3: Checkout the tag with force to discard local changes
640
650
  if tag_ref not in repo.references:
641
651
  msg = f"Tag {tag_name} not found at {library_path}"
642
652
  raise GitPullError(msg)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: griptape-nodes
3
- Version: 0.65.0
3
+ Version: 0.65.1
4
4
  Summary: Add your description here
5
5
  Requires-Dist: griptape>=1.8.12
6
6
  Requires-Dist: pydantic>=2.10.6
@@ -95,7 +95,7 @@ griptape_nodes/exe_types/param_types/parameter_three_d.py,sha256=AJ8qID5HydYgx1T
95
95
  griptape_nodes/exe_types/param_types/parameter_video.py,sha256=iF74oKhDZ7VUZg8GO1y5dRAuQ8SQfbq0hMY2CkN6CoI,9333
96
96
  griptape_nodes/exe_types/type_validator.py,sha256=RTz1vX09jzQpHhozITMJ0siOZUXvsERDhrApjdaM1WM,1120
97
97
  griptape_nodes/machines/__init__.py,sha256=v0jkwr-CFOLmfEYUQvX8BKQLOdvhSsA6toXkdHcPGUE,30
98
- griptape_nodes/machines/control_flow.py,sha256=4pm3sA05uEr7NfrlZAMJwGb_eDhl7App7KDW1ELnb-A,22383
98
+ griptape_nodes/machines/control_flow.py,sha256=W9i0VqAjXnTQ6Y3VSllfPIN7lL9eUJsvhW_zKSinvbU,22862
99
99
  griptape_nodes/machines/dag_builder.py,sha256=AAA_hH-Mz6GxJMUcVs6wHjKMarEsSyfNVs-PL1A_lOY,15486
100
100
  griptape_nodes/machines/fsm.py,sha256=WNo2w5c9Gbgzo5odcvbRT02EhCMFf3n3WYbZ0GYk1WI,2553
101
101
  griptape_nodes/machines/parallel_resolution.py,sha256=RXYkvHl8X6fKDtCmXkyfgOD-IyMUbecGYv4JyDmzetw,31741
@@ -205,7 +205,7 @@ griptape_nodes/retained_mode/managers/library_lifecycle/library_provenance/packa
205
205
  griptape_nodes/retained_mode/managers/library_lifecycle/library_provenance/sandbox.py,sha256=XgG7whE74zWDxX1pOvhASW0pwjOei1EDLvIH19xdzT0,6117
206
206
  griptape_nodes/retained_mode/managers/library_lifecycle/library_provenance.py,sha256=cCGr-MQ1RlVBiUTZepYEKdVhPgC4ebcYrmpv8rI3VeM,894
207
207
  griptape_nodes/retained_mode/managers/library_lifecycle/library_status.py,sha256=K3UEBzAdCY9wphyBbLxDYP0Q43aYvhLZ_Pz7_SzcPec,443
208
- griptape_nodes/retained_mode/managers/library_manager.py,sha256=093gbgxj0ZvGnVhDPi73rAzUlplKKLs95oxC9U2qhXI,153787
208
+ griptape_nodes/retained_mode/managers/library_manager.py,sha256=aE6dlTL77jdS61D7Ut3wD5QX2wni30oTTm3N1KpFGI8,154119
209
209
  griptape_nodes/retained_mode/managers/mcp_manager.py,sha256=Ezmn5_48r4JWYe-tFGqmw9dXLvvTiO1rw9b4MNCkw0U,15955
210
210
  griptape_nodes/retained_mode/managers/model_manager.py,sha256=3lj2X8vIvDSERPtR2VEXNFEWy_D8H6muxRvD-PEx8U8,44845
211
211
  griptape_nodes/retained_mode/managers/node_manager.py,sha256=r_DdR8ZYRXr_I2z8BdJehfHXZDqIVGumWkiFt0ZUpEk,218317
@@ -259,7 +259,7 @@ griptape_nodes/utils/__init__.py,sha256=kzDZW_VPyxWJFonM3kYTl7A91_JmtHPK0Io4KPLT
259
259
  griptape_nodes/utils/async_utils.py,sha256=4IrW8Ub8iJ2QB9yguZtfN1EB9B5nXHS7jbDaLOHWso0,4844
260
260
  griptape_nodes/utils/dict_utils.py,sha256=1VP2EoyOP0nswoAgjPehpA0izpkygWRX7L--ArN6LV8,7314
261
261
  griptape_nodes/utils/file_utils.py,sha256=Lj1SQH8XyuJx3WoHmWhyZf2gHPirZ0ZpQtPPcuP-ONQ,3288
262
- griptape_nodes/utils/git_utils.py,sha256=I-ceIocmzrp677hJQ8jum4EA9r1g_MyPIRPDGlmb3wI,44067
262
+ griptape_nodes/utils/git_utils.py,sha256=hcrancOlWO1qtq93NA1O7sPc_joaHff41z-7JKH6IdQ,44539
263
263
  griptape_nodes/utils/huggingface_utils.py,sha256=txR5XS_01W3TvsH4SQ3AJrFy8oS8Ah9M-ePRSs3jHYA,4737
264
264
  griptape_nodes/utils/image_preview.py,sha256=NhYIqohRF9vbFpWIEvZHdPLLPK_JdUBvC4RvNAsSa1w,4480
265
265
  griptape_nodes/utils/library_utils.py,sha256=UwTdOJcPwJljWYD-DbctjExicaw-6isXZ-Js02jrGCw,4224
@@ -274,7 +274,7 @@ griptape_nodes/version_compatibility/versions/v0_63_8/__init__.py,sha256=1VJswR2
274
274
  griptape_nodes/version_compatibility/versions/v0_63_8/deprecated_nodegroup_parameters.py,sha256=9NkyGJY4OHglQUUrAyhTHTQ6aGww7dqB1PozzHcNjEQ,4394
275
275
  griptape_nodes/version_compatibility/versions/v0_7_0/__init__.py,sha256=IzPPmGK86h2swfGGTOHyVcBIlOng6SjgWQzlbf3ngmo,51
276
276
  griptape_nodes/version_compatibility/versions/v0_7_0/local_executor_argument_addition.py,sha256=Thx8acnbw5OychhwEEj9aFxvbPe7Wgn4V9ZmZ7KRZqc,2082
277
- griptape_nodes-0.65.0.dist-info/WHEEL,sha256=z-mOpxbJHqy3cq6SvUThBZdaLGFZzdZPtgWLcP2NKjQ,79
278
- griptape_nodes-0.65.0.dist-info/entry_points.txt,sha256=qvevqd3BVbAV5TcantnAm0ouqaqYKhsRO3pkFymWLWM,82
279
- griptape_nodes-0.65.0.dist-info/METADATA,sha256=leJxbsr0DLDm_U3_0PYm-bUpsrCcPOq4wsiYgWnyuzc,5374
280
- griptape_nodes-0.65.0.dist-info/RECORD,,
277
+ griptape_nodes-0.65.1.dist-info/WHEEL,sha256=z-mOpxbJHqy3cq6SvUThBZdaLGFZzdZPtgWLcP2NKjQ,79
278
+ griptape_nodes-0.65.1.dist-info/entry_points.txt,sha256=qvevqd3BVbAV5TcantnAm0ouqaqYKhsRO3pkFymWLWM,82
279
+ griptape_nodes-0.65.1.dist-info/METADATA,sha256=Mfv8sxbcOm8no4uwFMfsnppZig-7RfvX389GyK0z0jk,5374
280
+ griptape_nodes-0.65.1.dist-info/RECORD,,