synth_ai.sdk.harbor.packager
HarborPackager - Package build context for Harbor deployments.
This module handles packaging a directory into a tar.gz archive suitable
for uploading to Harbor. It respects include/exclude globs and handles
file filtering.
Example:
Classes
HarborPackager
Package build context into tar.gz for Harbor upload.
Handles file filtering based on include/exclude globs, creates a
compressed tar archive, and returns it as base64.
Attributes:
spec: The HarborBuildSpec to packagemax_size_mb: Maximum allowed package size in MB (default: 100)
package
- Base64-encoded string of the tar.gz archive
FileNotFoundError: If context_dir doesn’t existValueError: If package exceeds max_size_mb
get_file_list
- List of relative paths that will be included
get_package_info
- Dictionary with file count, estimated size, etc.