griptape-nodes 0.65.4__py3-none-any.whl → 0.65.6__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.
@@ -676,7 +676,7 @@ class LibraryManager:
676
676
  result_details=details,
677
677
  )
678
678
 
679
- def _generate_sandbox_library_metadata( # noqa: C901, PLR0915
679
+ def _generate_sandbox_library_metadata(
680
680
  self,
681
681
  ) -> LoadLibraryMetadataFromFileResultSuccess | LoadLibraryMetadataFromFileResultFailure | None:
682
682
  """Generate sandbox library metadata by scanning Python files without importing them.
@@ -782,9 +782,9 @@ class LibraryManager:
782
782
 
783
783
  # Get git remote and ref if the sandbox directory is in a git repository
784
784
  try:
785
- git_remote = get_git_remote(sandbox_directory)
785
+ git_remote = get_git_remote(sandbox_library_dir)
786
786
  except GitRemoteError as e:
787
- logger.debug("Failed to get git remote for sandbox library %s: %s", sandbox_directory, e)
787
+ logger.debug("Failed to get git remote for sandbox library %s: %s", sandbox_library_dir, e)
788
788
  git_remote = None
789
789
 
790
790
  try:
@@ -1171,19 +1171,34 @@ def _shallow_clone_with_pygit2(remote_url: str, ref: str) -> tuple[str, str, dic
1171
1171
  callbacks = _get_ssh_callbacks()
1172
1172
 
1173
1173
  # Shallow clone with depth=1
1174
- checkout_branch = ref if ref != "HEAD" else None
1174
+ # Note: We don't use checkout_branch here because it only works with branches,
1175
+ # not tags or commit SHAs. Instead, we'll fetch and checkout the ref manually.
1175
1176
  repo = pygit2.clone_repository(
1176
1177
  remote_url,
1177
1178
  str(temp_path),
1178
1179
  callbacks=callbacks,
1179
1180
  depth=1,
1180
- checkout_branch=checkout_branch,
1181
1181
  )
1182
1182
 
1183
1183
  if repo is None:
1184
1184
  msg = f"Failed to clone repository from {remote_url}"
1185
1185
  raise GitCloneError(msg)
1186
1186
 
1187
+ # If a specific ref was requested (not HEAD), fetch and checkout that ref
1188
+ if ref != "HEAD":
1189
+ try:
1190
+ # Fetch the specific ref (works for branches, tags, and commits)
1191
+ remote = repo.remotes["origin"]
1192
+ remote.fetch([ref], callbacks=callbacks, depth=1)
1193
+
1194
+ # Now resolve and checkout the ref
1195
+ resolved_ref = repo.revparse_single(ref)
1196
+ repo.checkout_tree(resolved_ref)
1197
+ repo.set_head(resolved_ref.id)
1198
+ except (KeyError, pygit2.GitError) as e:
1199
+ msg = f"Failed to fetch and checkout ref '{ref}' in clone from {remote_url}: {e}"
1200
+ raise GitCloneError(msg) from e
1201
+
1187
1202
  # Find the library JSON file
1188
1203
  library_json_path = find_file_in_directory(temp_path, "griptape[-_]nodes[-_]library.json")
1189
1204
  if library_json_path is None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: griptape-nodes
3
- Version: 0.65.4
3
+ Version: 0.65.6
4
4
  Summary: Add your description here
5
5
  Requires-Dist: griptape>=1.8.12
6
6
  Requires-Dist: pydantic>=2.10.6
@@ -208,7 +208,7 @@ griptape_nodes/retained_mode/managers/library_lifecycle/library_provenance/packa
208
208
  griptape_nodes/retained_mode/managers/library_lifecycle/library_provenance/sandbox.py,sha256=XgG7whE74zWDxX1pOvhASW0pwjOei1EDLvIH19xdzT0,6117
209
209
  griptape_nodes/retained_mode/managers/library_lifecycle/library_provenance.py,sha256=cCGr-MQ1RlVBiUTZepYEKdVhPgC4ebcYrmpv8rI3VeM,894
210
210
  griptape_nodes/retained_mode/managers/library_lifecycle/library_status.py,sha256=K3UEBzAdCY9wphyBbLxDYP0Q43aYvhLZ_Pz7_SzcPec,443
211
- griptape_nodes/retained_mode/managers/library_manager.py,sha256=KcJqn_vVtROVMgpppY2OSq_cRrVC3MjIrt6pjpBbHNE,154490
211
+ griptape_nodes/retained_mode/managers/library_manager.py,sha256=oU_K_rWR_77qJOTtOeKH_fZlsNLyymeSQchoe9QMbxQ,154471
212
212
  griptape_nodes/retained_mode/managers/mcp_manager.py,sha256=Ezmn5_48r4JWYe-tFGqmw9dXLvvTiO1rw9b4MNCkw0U,15955
213
213
  griptape_nodes/retained_mode/managers/model_manager.py,sha256=3lj2X8vIvDSERPtR2VEXNFEWy_D8H6muxRvD-PEx8U8,44845
214
214
  griptape_nodes/retained_mode/managers/node_manager.py,sha256=hLNiGnrzd1W_v3GBzfVrr6SNkKKQk6vbVgLaUIW1heQ,214936
@@ -262,7 +262,7 @@ griptape_nodes/utils/__init__.py,sha256=kzDZW_VPyxWJFonM3kYTl7A91_JmtHPK0Io4KPLT
262
262
  griptape_nodes/utils/async_utils.py,sha256=4IrW8Ub8iJ2QB9yguZtfN1EB9B5nXHS7jbDaLOHWso0,4844
263
263
  griptape_nodes/utils/dict_utils.py,sha256=1VP2EoyOP0nswoAgjPehpA0izpkygWRX7L--ArN6LV8,7314
264
264
  griptape_nodes/utils/file_utils.py,sha256=Lj1SQH8XyuJx3WoHmWhyZf2gHPirZ0ZpQtPPcuP-ONQ,3288
265
- griptape_nodes/utils/git_utils.py,sha256=hcrancOlWO1qtq93NA1O7sPc_joaHff41z-7JKH6IdQ,44539
265
+ griptape_nodes/utils/git_utils.py,sha256=J25Z3_Kh567oRd4enjHDF9GbRnpuO1U7irHfrDkqqQs,45388
266
266
  griptape_nodes/utils/huggingface_utils.py,sha256=txR5XS_01W3TvsH4SQ3AJrFy8oS8Ah9M-ePRSs3jHYA,4737
267
267
  griptape_nodes/utils/image_preview.py,sha256=NhYIqohRF9vbFpWIEvZHdPLLPK_JdUBvC4RvNAsSa1w,4480
268
268
  griptape_nodes/utils/library_utils.py,sha256=UwTdOJcPwJljWYD-DbctjExicaw-6isXZ-Js02jrGCw,4224
@@ -277,7 +277,7 @@ griptape_nodes/version_compatibility/versions/v0_63_8/__init__.py,sha256=1VJswR2
277
277
  griptape_nodes/version_compatibility/versions/v0_63_8/deprecated_nodegroup_parameters.py,sha256=MqrmFszysezVEqsrGXrAK7VKjkVaxUtkpHysg15MDeM,4401
278
278
  griptape_nodes/version_compatibility/versions/v0_7_0/__init__.py,sha256=IzPPmGK86h2swfGGTOHyVcBIlOng6SjgWQzlbf3ngmo,51
279
279
  griptape_nodes/version_compatibility/versions/v0_7_0/local_executor_argument_addition.py,sha256=Thx8acnbw5OychhwEEj9aFxvbPe7Wgn4V9ZmZ7KRZqc,2082
280
- griptape_nodes-0.65.4.dist-info/WHEEL,sha256=xDCZ-UyfvkGuEHPeI7BcJzYKIZzdqN8A8o1M5Om8IyA,79
281
- griptape_nodes-0.65.4.dist-info/entry_points.txt,sha256=qvevqd3BVbAV5TcantnAm0ouqaqYKhsRO3pkFymWLWM,82
282
- griptape_nodes-0.65.4.dist-info/METADATA,sha256=m00ynKxgPkpuOh-Mo4ZcNpzXjNeHelWiaLvDfALBc1s,5374
283
- griptape_nodes-0.65.4.dist-info/RECORD,,
280
+ griptape_nodes-0.65.6.dist-info/WHEEL,sha256=ZyFSCYkV2BrxH6-HRVRg3R9Fo7MALzer9KiPYqNxSbo,79
281
+ griptape_nodes-0.65.6.dist-info/entry_points.txt,sha256=qvevqd3BVbAV5TcantnAm0ouqaqYKhsRO3pkFymWLWM,82
282
+ griptape_nodes-0.65.6.dist-info/METADATA,sha256=F5feLpbXZiK3FXpKvy72L-rAAIGguJs8_NzvRmyWUes,5374
283
+ griptape_nodes-0.65.6.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: uv 0.9.17
2
+ Generator: uv 0.9.18
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any