-
Notifications
You must be signed in to change notification settings - Fork 178
Cloud upload and API routing don't support workspace selection #703
Copy link
Copy link
Open
Labels
Description
Problem
When using Basic Memory Cloud with multiple workspaces (personal + teams), the bm cloud upload command and several cloud API utility functions don't route requests to the correct workspace. This makes it impossible to upload notes into a teams workspace via the CLI.
Root Cause
Three layers lack workspace support:
get_cloud_control_plane_client()inasync_client.py— creates an HTTP client for WebDAV upload but doesn't accept or pass theX-Workspace-IDheadercloud_utils.pyfunctions (fetch_cloud_projects,create_cloud_project,project_exists) — make API requests without workspace headers, so they always hit the user's personal workspaceget_client()per-project routing inasync_client.py— when routing a cloud-mode project, doesn't resolveworkspace_idfrom the project config entry ordefault_workspace
Impact
bm cloud uploadalways uploads to the personal workspace even whendefault_workspaceor per-projectworkspace_idis configured--create-projectflag creates projects in the wrong workspace- Post-upload database sync doesn't trigger in the correct workspace
Expected Behavior
bm cloud uploadshould resolve workspace from: per-projectworkspace_id→config.default_workspace→ personal (fallback)- All cloud API utility functions should pass
X-Workspace-IDheader when a workspace is resolved get_client()per-project routing should auto-resolve workspace from project config
Steps to Reproduce
- Have multiple workspaces (personal + teams)
bm cloud workspace set-default <teams-tenant-id>bm project set-cloud myproject --workspace <teams-tenant-id>bm cloud upload ~/myproject --project myproject- Files end up in personal workspace, not teams workspace
Environment
- Basic Memory v0.20.3
- Multiple cloud workspaces configured
Reactions are currently unavailable