mirror of
https://github.com/basicmachines-co/basic-memory
synced 2026-06-21 13:47:35 +00:00
feat(rclone): Add simplified configure_rclone_remote() function (SPEC-20 Phase 2)
Add new configure_rclone_remote() that uses single remote name: - Single remote: "basic-memory-cloud" (not tenant-specific) - Simplifies from per-tenant remotes to one credential set per user - Maintains backup_rclone_config() for safety - Add comprehensive functional tests for rclone config - Test remote configuration, updates, save/load operations Old add_tenant_to_rclone_config() kept for backward compatibility but will be removed in Phase 5. Part of SPEC-20 Simplified Project-Scoped Rclone Sync. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: phernandez <paul@basicmachines.co>
This commit is contained in:
@@ -47,16 +47,12 @@ class CloudProjectConfig(BaseModel):
|
||||
that is synced with Basic Memory Cloud.
|
||||
"""
|
||||
|
||||
local_path: str = Field(
|
||||
description="Local working directory path for this cloud project"
|
||||
)
|
||||
local_path: str = Field(description="Local working directory path for this cloud project")
|
||||
last_sync: Optional[datetime] = Field(
|
||||
default=None,
|
||||
description="Timestamp of last successful sync operation"
|
||||
default=None, description="Timestamp of last successful sync operation"
|
||||
)
|
||||
bisync_initialized: bool = Field(
|
||||
default=False,
|
||||
description="Whether rclone bisync baseline has been established"
|
||||
default=False, description="Whether rclone bisync baseline has been established"
|
||||
)
|
||||
|
||||
|
||||
@@ -454,7 +450,7 @@ def save_basic_memory_config(file_path: Path, config: BasicMemoryConfig) -> None
|
||||
"""Save configuration to file."""
|
||||
try:
|
||||
# Use model_dump with mode='json' to serialize datetime objects properly
|
||||
config_dict = config.model_dump(mode='json')
|
||||
config_dict = config.model_dump(mode="json")
|
||||
file_path.write_text(json.dumps(config_dict, indent=2))
|
||||
except Exception as e: # pragma: no cover
|
||||
logger.error(f"Failed to save config: {e}")
|
||||
|
||||
Reference in New Issue
Block a user