Implements directory synchronization for Information Spaces: - SpaceDirectoryExporter: Export space to directory structure - Multiple variants: flat, hierarchical, by_path - Manifest generation for reimport - Incremental export (skip unchanged files) - Metadata file export - IncrementalExporter for change detection - DirectorySpaceImporter: Import directory content into space - Recursive directory scanning - Multiple file pattern support - Conflict detection with strategies (skip/overwrite/rename) - Manifest-based import for intelligent reimport - Structure preservation in space paths - BidirectionalSyncCoordinator: Two-way sync with conflict detection - Sync directions: space-to-directory, directory-to-space, bidirectional - Conflict resolution strategies: space_wins, directory_wins, newer_wins, manual, skip - Dry-run mode for preview - Orphan cleanup option - Event emission for progress tracking 45 unit tests covering all sync components. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
65 lines
1.4 KiB
Python
65 lines
1.4 KiB
Python
"""
|
|
Directory synchronization for Information Spaces.
|
|
|
|
This package provides filesystem integration:
|
|
- SpaceDirectoryExporter: Export space to directory using variants
|
|
- DirectorySpaceImporter: Import directory content into space
|
|
- BidirectionalSyncCoordinator: Two-way sync with conflict detection
|
|
- Conflict detection and resolution strategies
|
|
"""
|
|
|
|
from .exporter import (
|
|
SpaceDirectoryExporter,
|
|
IncrementalExporter,
|
|
ExportConfig,
|
|
ExportVariant,
|
|
ExportResult,
|
|
ExportedFile,
|
|
)
|
|
from .importer import (
|
|
DirectorySpaceImporter,
|
|
ManifestImporter,
|
|
ImportConfig,
|
|
ImportResult,
|
|
ImportedDocument,
|
|
ImportConflict,
|
|
)
|
|
from .bidirectional import (
|
|
BidirectionalSyncCoordinator,
|
|
SyncConfig,
|
|
SyncDirection,
|
|
ConflictResolution,
|
|
SyncResult,
|
|
SyncAction,
|
|
SyncConflict,
|
|
FileState,
|
|
create_sync_coordinator,
|
|
)
|
|
|
|
__all__ = [
|
|
# Exporter
|
|
"SpaceDirectoryExporter",
|
|
"IncrementalExporter",
|
|
"ExportConfig",
|
|
"ExportVariant",
|
|
"ExportResult",
|
|
"ExportedFile",
|
|
# Importer
|
|
"DirectorySpaceImporter",
|
|
"ManifestImporter",
|
|
"ImportConfig",
|
|
"ImportResult",
|
|
"ImportedDocument",
|
|
"ImportConflict",
|
|
# Bidirectional sync
|
|
"BidirectionalSyncCoordinator",
|
|
"SyncConfig",
|
|
"SyncDirection",
|
|
"ConflictResolution",
|
|
"SyncResult",
|
|
"SyncAction",
|
|
"SyncConflict",
|
|
"FileState",
|
|
"create_sync_coordinator",
|
|
]
|