feat(spaces): implement Phase 5 Directory Sync Mode
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>
This commit is contained in:
@@ -2,12 +2,63 @@
|
||||
Directory synchronization for Information Spaces.
|
||||
|
||||
This package provides filesystem integration:
|
||||
- SpaceToDirectory exporter using VariantFactory
|
||||
- DirectoryToSpace importer
|
||||
- Bidirectional sync coordinator
|
||||
- Filesystem watcher for external changes
|
||||
- Conflict detection and resolution
|
||||
- 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
|
||||
"""
|
||||
|
||||
# Directory sync will be implemented in Phase 5
|
||||
__all__ = []
|
||||
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",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user