Skip to content

feat(paperclip): add user-scoped memory isolation for GDPR compliance#1561

Open
amirhmoradi wants to merge 8 commits into
vectorize-io:mainfrom
odience-network:main
Open

feat(paperclip): add user-scoped memory isolation for GDPR compliance#1561
amirhmoradi wants to merge 8 commits into
vectorize-io:mainfrom
odience-network:main

Conversation

@amirhmoradi
Copy link
Copy Markdown
Contributor

  • Add userId parameter to BankContext for per-user memory isolation
  • Extend bankGranularity to support 'user' option for isolating memories by user
  • Add resolveUserIdFromActiveIssue() to extract user email from active issue
  • Add 'issues.read' capability to permissions for accessing active issue data
  • Update all bank ID derivations to include user ID when granularity includes 'user'
  • Update manifest description to mention GDPR compliance when user option is enabled

This allows agents to maintain user-scoped memory in multi-user scenarios,
ensuring that personal/scoped conversations don't leak between users.

amirhmoradi and others added 2 commits May 9, 2026 23:39
- Add userId parameter to BankContext for per-user memory isolation
- Extend bankGranularity to support 'user' option for isolating memories by user
- Add resolveUserIdFromActiveIssue() to extract user email from active issue
- Add 'issues.read' capability to permissions for accessing active issue data
- Update all bank ID derivations to include user ID when granularity includes 'user'
- Update manifest description to mention GDPR compliance when user option is enabled

This allows agents to maintain user-scoped memory in multi-user scenarios,
ensuring that personal/scoped conversations don't leak between users.
feat(paperclip): add user-scoped memory isolation
@benfrank241
Copy link
Copy Markdown
Contributor

Thanks @amirhmoradi, direction is right, per-user isolation in paperclip is a real gap worth fixing. but i pulled the branch and npm run typecheck fails with 4 errors:
src/worker.ts(89,57): TS2345: Property 'getActive' is missing in type 'PluginIssuesClient'
src/worker.ts(133,57): same
src/worker.ts(172,59): same
src/worker.ts(224,59): same

ctx.issues.getActive() doesn't exist in @paperclipai/plugin-sdk. I checked the pinned ^2026.403.0, the latest stable 2026.428.0, and the latest canary 2026.511.0-canary.8.

Paperclip-Paperclip and others added 6 commits May 12, 2026 00:11
…ve() method

The getActive() method does not exist in the Paperclip plugin SDK. Instead,
use ctx.issues.list() to retrieve the agent's issues, then extract the user
email from the first (most active) issue's originId field.

This fixes the TypeScript compilation errors reported in the PR review.
The previous fix still had the wrong type signature. The actual SDK
PluginIssuesClient.list() requires a {companyId, ...} input object.

Changes:
- Import PluginContext type from @paperclipai/plugin-sdk
- resolveUserIdFromActiveIssue now takes (ctx: PluginContext, companyId, agentId, config)
- Calls ctx.issues.list({ companyId, assigneeAgentId: agentId, status: 'in_progress', limit: 1 })
  to find the agent's currently active issue
- All 4 call sites updated to pass companyId and agentId from their respective contexts

Verified: npm run typecheck passes with zero errors.
@benfrank241
Copy link
Copy Markdown
Contributor

thanks for updating. one quick check: when an agent has more than one in-progress issue, this picks an arbitrary one (whatever list orders first). is that acceptable for paperclip's model, or should the helper pin to a specific id?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants