Skip to content

User personal mirrors — isolated per-user memory #16

Description

@servathadi

Each user within a workspace should have their own isolated memory space (personal mirror). Only they can read/write it unless explicitly shared.

Schema:

CREATE TABLE mirror_users (
  id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
  workspace_id uuid REFERENCES mirror_workspaces(id),
  external_id text NOT NULL,   -- from auth system (email, user_id)
  name text,
  token_hash text,             -- hashed personal access token
  created_at timestamptz DEFAULT now(),
  UNIQUE(workspace_id, external_id)
);

Personal mirror token → resolves to workspace_id + owner_type='user' + owner_id=user.id. Search/store automatically scoped to that user's engrams only. No cross-user reads unless owner_type='project'/'squad' shared collections.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    architectureArchitectural decisions and refactorsenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions