@@ -348,6 +348,16 @@ enum OciCommand {
348348 /// Optional human-readable name for the layer
349349 name : Option < String > ,
350350 } ,
351+ /// Imports a complete image from a splitfdstream server into the repository.
352+ ImportImageSplitfdstream {
353+ /// Path to the splitfdstream server socket
354+ socket : PathBuf ,
355+ /// The image ID (manifest digest or tag)
356+ image_id : String ,
357+ /// Tag name for imported image
358+ #[ clap( long) ]
359+ tag : Option < String > ,
360+ } ,
351361 /// Dump the rootfs of a stored OCI image as a composefs dumpfile to stdout
352362 ///
353363 /// The image can be specified by ref name or @digest:
@@ -1209,6 +1219,27 @@ where
12091219 . await ?;
12101220 println ! ( "{}" , object_id. to_id( ) ) ;
12111221 }
1222+ OciCommand :: ImportImageSplitfdstream {
1223+ socket,
1224+ image_id,
1225+ tag,
1226+ } => {
1227+ let result = composefs_oci:: import_complete_image_from_splitfdstream (
1228+ & repo,
1229+ & socket,
1230+ & image_id,
1231+ tag. as_deref ( ) ,
1232+ ) ?;
1233+
1234+ println ! ( "Imported complete image:" ) ;
1235+ println ! ( " Manifest: {}" , result. manifest_digest) ;
1236+ println ! ( " Config: {}" , result. config_digest) ;
1237+ println ! ( " Layers: {}" , result. layers_imported) ;
1238+ println ! ( " Size: {} bytes" , result. total_size_bytes) ;
1239+ if let Some ( tag_name) = tag {
1240+ println ! ( " Tagged: {}" , tag_name) ;
1241+ }
1242+ }
12121243 OciCommand :: Dump { config_opts } => {
12131244 let fs = load_filesystem_from_oci_image ( & repo, config_opts) ?;
12141245 fs. print_dumpfile ( ) ?;
0 commit comments