griptape-nodes 0.66.0__py3-none-any.whl → 0.66.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.
@@ -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.66.0
3
+ Version: 0.66.1
4
4
  Summary: Add your description here
5
5
  Requires-Dist: griptape>=1.8.12
6
6
  Requires-Dist: pydantic>=2.10.6
@@ -253,7 +253,7 @@ griptape_nodes/utils/__init__.py,sha256=kzDZW_VPyxWJFonM3kYTl7A91_JmtHPK0Io4KPLT
253
253
  griptape_nodes/utils/async_utils.py,sha256=4IrW8Ub8iJ2QB9yguZtfN1EB9B5nXHS7jbDaLOHWso0,4844
254
254
  griptape_nodes/utils/dict_utils.py,sha256=1VP2EoyOP0nswoAgjPehpA0izpkygWRX7L--ArN6LV8,7314
255
255
  griptape_nodes/utils/file_utils.py,sha256=Lj1SQH8XyuJx3WoHmWhyZf2gHPirZ0ZpQtPPcuP-ONQ,3288
256
- griptape_nodes/utils/git_utils.py,sha256=hcrancOlWO1qtq93NA1O7sPc_joaHff41z-7JKH6IdQ,44539
256
+ griptape_nodes/utils/git_utils.py,sha256=J25Z3_Kh567oRd4enjHDF9GbRnpuO1U7irHfrDkqqQs,45388
257
257
  griptape_nodes/utils/huggingface_utils.py,sha256=txR5XS_01W3TvsH4SQ3AJrFy8oS8Ah9M-ePRSs3jHYA,4737
258
258
  griptape_nodes/utils/image_preview.py,sha256=NhYIqohRF9vbFpWIEvZHdPLLPK_JdUBvC4RvNAsSa1w,4480
259
259
  griptape_nodes/utils/library_utils.py,sha256=UwTdOJcPwJljWYD-DbctjExicaw-6isXZ-Js02jrGCw,4224
@@ -272,7 +272,7 @@ griptape_nodes/version_compatibility/versions/v0_65_5/__init__.py,sha256=4UyspOV
272
272
  griptape_nodes/version_compatibility/versions/v0_65_5/flux_2_removed_parameters.py,sha256=jOlmY5kKHXh8HPzAUtvwMJqzD4bP7pkE--yHUb7jTRA,3305
273
273
  griptape_nodes/version_compatibility/versions/v0_7_0/__init__.py,sha256=IzPPmGK86h2swfGGTOHyVcBIlOng6SjgWQzlbf3ngmo,51
274
274
  griptape_nodes/version_compatibility/versions/v0_7_0/local_executor_argument_addition.py,sha256=Thx8acnbw5OychhwEEj9aFxvbPe7Wgn4V9ZmZ7KRZqc,2082
275
- griptape_nodes-0.66.0.dist-info/WHEEL,sha256=ZyFSCYkV2BrxH6-HRVRg3R9Fo7MALzer9KiPYqNxSbo,79
276
- griptape_nodes-0.66.0.dist-info/entry_points.txt,sha256=qvevqd3BVbAV5TcantnAm0ouqaqYKhsRO3pkFymWLWM,82
277
- griptape_nodes-0.66.0.dist-info/METADATA,sha256=CV4bNiOA9DIMnFYmEp3FVBOPdpmmkwarQcH68JaO2qQ,5374
278
- griptape_nodes-0.66.0.dist-info/RECORD,,
275
+ griptape_nodes-0.66.1.dist-info/WHEEL,sha256=ZyFSCYkV2BrxH6-HRVRg3R9Fo7MALzer9KiPYqNxSbo,79
276
+ griptape_nodes-0.66.1.dist-info/entry_points.txt,sha256=qvevqd3BVbAV5TcantnAm0ouqaqYKhsRO3pkFymWLWM,82
277
+ griptape_nodes-0.66.1.dist-info/METADATA,sha256=wf5GdcViPaYyMMpwKRLIExwSWNmDg3hl2UWcuWVNRZc,5374
278
+ griptape_nodes-0.66.1.dist-info/RECORD,,