Skip to content

feat!: memory rides on @corbits/memory; drop memory-hub and memory-tools (CL-8186) - #781

Merged
TheGreatAxios merged 1 commit into
mainfrom
cl-8186-drop-memory-hub
Sep 17, 2026
Merged

TheGreatAxios merged 1 commit into
mainfrom
cl-8186-drop-memory-hub

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Contributor

Summary

CL-8186: the memory plane was dark — nothing constructed @corbits/memory and memory-hub was never mounted. This cuts over fully onto @corbits/memory (already a pinned git dependency elsewhere in this repo) and deletes the two workbench-built packages it replaces.

  • Deletes packages/memory-hub and packages/memory-tools entirely.
  • apps/hub/src/index.ts constructs @corbits/memory once via loadMemoryConfig() and mounts its stock /api/tenants/:tenantId/memory/* routes next to @corbits/mailbox, guarded by the hub's own requireGrant.
  • Myra (workflows/assistant), Scout (packages/scout-agent), and workflows/diligence-brief now pin @corbits/memory instead of @corbits/memory-tools.
  • scripts/checks/tool-package-pins.ts now also resolves a pin against an installed (non-workspace:*) @corbits/* dependency's own package.json version, since @corbits/memory is a published dependency, not a workspace-built tool package.
  • apps/sidecar's step-env wires memoryBaseUrl/memoryTenantId/memoryAuthToken/memoryFetch for @corbits/memory/tools, reusing the same sidecar-token + run-address bearer scheme every other workflow-run-authenticated tool bundle uses (memoryFetch injects the x-workflow-run-address header @corbits/memory's own HTTP client doesn't send on its own).
  • packages/onboarding's tenant-seed.ts SEED_GRANTS gains {resource: "memory", action: "add"} and {resource: "memory", action: "search"} (list reuses the search grant) for the tenant's shared workflow principal, matching @corbits/memory's own grant vocabulary (its routes/deps.ts grantGuard). Note: the ticket named apps/web/src/needs-converge.ts/needs-list.ts for this, but those files only carry role names resolved server-side — the actual grant-planting site is packages/onboarding/src/tenant-seed.ts's SEED_GRANTS, so that's where this landed.
  • REQUIRED_SEED_TOOL_PACKAGES / CORBITS_TOOL_PACKAGE_DIRS in tool-registry-publish now name @corbits/capability-tools instead of the deleted @corbits/memory-tools, since @corbits/memory is not a workspace package this repo packs into the corbits-tools registry.

Deleted tests

  • packages/memory-hub/src/workflow-routes.test.ts
  • packages/memory-tools/src/client.test.ts
  • packages/memory-tools/src/tool.test.ts

(deleted with their packages — everything else touched was adapted, not deleted, since it tested still-valid generic behavior with memory-tools as an arbitrary fixture name)

Test plan

  • bun run typecheck
  • bun run lint
  • bun run check:structural
  • bun --cwd apps/hub test (DB-gated suites skip locally, no DATABASE_URL)
  • bun --cwd apps/web test

@linear-code

linear-code Bot commented Sep 17, 2026

Copy link
Copy Markdown

CL-8186

CL-8186: the memory plane was dark — nothing constructed @corbits/memory
and memory-hub was never mounted. Cuts over fully:

- Delete packages/memory-hub and packages/memory-tools entirely (they
  duplicated a workflow-run-authenticated HTTP surface @corbits/memory
  now serves directly on the stock /api/tenants/:tenantId/memory/*
  routes).
- apps/hub/src/index.ts constructs @corbits/memory once via
  loadMemoryConfig() and mounts it next to @corbits/mailbox, guarded by
  the hub's own requireGrant.
- Myra (workflows/assistant) and Scout (packages/scout-agent) and
  diligence-brief now pin @corbits/memory instead of
  @corbits/memory-tools. Since @corbits/memory is a published dependency
  rather than a workspace-built tool package, the tool-package-pins
  check now also resolves a pin against an installed (non-workspace:*)
  @corbits dependency's own package.json version.
- apps/sidecar's step-env wires memoryBaseUrl/memoryTenantId/
  memoryAuthToken/memoryFetch for @corbits/memory/tools, reusing the
  same sidecar-token + run-address bearer scheme every other
  workflow-run-authenticated tool bundle uses (memoryFetch injects the
  x-workflow-run-address header @corbits/memory's own HTTP client
  doesn't send).
- packages/onboarding's tenant-seed SEED_GRANTS gains
  {resource: "memory", action: "add"} and
  {resource: "memory", action: "search"} (list reuses the search
  grant) for the tenant's shared workflow principal — @corbits/memory's
  own grant vocabulary (see its routes/deps.ts grantGuard).
- REQUIRED_SEED_TOOL_PACKAGES / CORBITS_TOOL_PACKAGE_DIRS in
  tool-registry-publish now name @corbits/capability-tools instead of
  the deleted @corbits/memory-tools, since @corbits/memory is not a
  workspace package this repo packs into the corbits-tools registry.

Deleted tests: packages/memory-hub/src/workflow-routes.test.ts and
packages/memory-tools/src/{client,tool}.test.ts went with their
packages. Every other touched test file was adapted (fixture rename or
behavior-consistent update), not deleted.
@TheGreatAxios
TheGreatAxios force-pushed the cl-8186-drop-memory-hub branch from 3598604 to cb0fd2b Compare September 17, 2026 18:54
@TheGreatAxios
TheGreatAxios merged commit 29c748d into main Sep 17, 2026
1 of 11 checks 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