Skip to content

Mount memory routes under /api/tenants/:tenantId (CL-4506) - #27

Merged
TheGreatAxios merged 1 commit into
mainfrom
cl-4506-memory-tenant-scoped-routes
Aug 5, 2026
Merged

Mount memory routes under /api/tenants/:tenantId (CL-4506)#27
TheGreatAxios merged 1 commit into
mainfrom
cl-4506-memory-tenant-scoped-routes

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Contributor

Summary

  • Register HTTP routes at /api/tenants/:tenantId/memory/{add,search,list} so Interchange createResolveTenant supplies principal + tenant (same tree as workflows/assets)
  • Keep requirePrincipal as a fail-closed 401 when context is missing (avoids requireGrant TypeError → 500)
  • Align tests and product docs with tenant-scoped mount + hub-mount story; delete MIGRATION.md / cutover noise

Closes CL-4506. Follow-up for agent tools: CL-5354.

Test plan

  • bun run typecheck
  • bun test ./src (294 pass)
  • Host smoke: mount on hub with resolveTenant; signed-in user can POST …/memory/search without 500

Register add/search/list at /api/tenants/:tenantId/memory/* so a real
hub createResolveTenant supplies principal + tenant — same tree as
workflows and assets. Keep requirePrincipal as a fail-closed 401 when
context is missing.

Rewrite product docs around hub mount + agent/ingestion callers; drop
MIGRATION.md and cutover noise. Tests use tenant-prefixed paths.
@TheGreatAxios
TheGreatAxios merged commit 2eb0c12 into main Aug 5, 2026
1 check passed
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.

1 participant