@@ -199,6 +199,16 @@ enum OciCommand {
199199 /// Optional human-readable name for the layer
200200 name : Option < String > ,
201201 } ,
202+ /// Imports a complete image from a splitfdstream server into the repository.
203+ ImportImageSplitfdstream {
204+ /// Path to the splitfdstream server socket
205+ socket : PathBuf ,
206+ /// The image ID (manifest digest or tag)
207+ image_id : String ,
208+ /// Tag name for imported image
209+ #[ clap( long) ]
210+ tag : Option < String > ,
211+ } ,
202212 /// List the contents of a stored tar layer
203213 LsLayer {
204214 /// Layer content digest, e.g. sha256:a1b2c3...
@@ -810,6 +820,27 @@ where
810820 . await ?;
811821 println ! ( "{}" , object_id. to_id( ) ) ;
812822 }
823+ OciCommand :: ImportImageSplitfdstream {
824+ socket,
825+ image_id,
826+ tag,
827+ } => {
828+ let result = composefs_oci:: import_complete_image_from_splitfdstream (
829+ & Arc :: new ( repo) ,
830+ & socket,
831+ & image_id,
832+ tag. as_deref ( ) ,
833+ ) ?;
834+
835+ println ! ( "Imported complete image:" ) ;
836+ println ! ( " Manifest: {}" , result. manifest_digest) ;
837+ println ! ( " Config: {}" , result. config_digest) ;
838+ println ! ( " Layers: {}" , result. layers_imported) ;
839+ println ! ( " Size: {} bytes" , result. total_size_bytes) ;
840+ if let Some ( tag_name) = tag {
841+ println ! ( " Tagged: {}" , tag_name) ;
842+ }
843+ }
813844 OciCommand :: LsLayer { ref name } => {
814845 composefs_oci:: ls_layer ( & repo, name) ?;
815846 }
0 commit comments