Extract + Drizzle service_config + label_catalog + agent_type_* aggregates #845

Closed
opened 2026-05-04 20:29:17 +00:00 by claude-desktop · 1 comment
Collaborator

As a maintainer, I want the resolver hot-path tables (service_config, label_catalog, agent_type_config, agent_type_container, agent_type_routing, plugin/MCP/skill scope tables) split out and Drizzled, so that domain/agent-config/resolver.ts calls type-safe queries instead of raw SQL.

Acceptance criteria

Extraction

  • service-config-store.ts + label-catalog.ts + agent-type-config.ts (split by aggregate).
  • Functions moved: getSettings, patchSettingsDb, plus all getServiceConfig, resolveAgentTypeConfig, resolveAgentTypeContainer, resolveAgentTypeRouting, getLabelCatalogForRepo, resolvePlugins, resolveMarketplaces, resolveMcpServers, resolveSkill, getAgentType, getSpeechConfig etc. that currently sit in resolver.ts but talk SQL directly.
  • Callers updated.

Drizzle

  • Schema files per aggregate.
  • Add-only inheritance contract preserved (see docs/inheritance-contract.md).

Tests

  • Resolver tests green.
  • No raw SQL strings remain in domain/agent-config/resolver.ts for these tables (resolver becomes pure logic over typed queries).

Out of scope

  • Resolver business logic (scope ladder rules) — only data access layer rewritten.

References

  • apps/server/src/domain/agent-config/resolver.ts — current SQL hot path.
  • docs/inheritance-contract.md.
  • Foundation story (#839) must merge first.
**As a** maintainer, **I want** the resolver hot-path tables (`service_config`, `label_catalog`, `agent_type_config`, `agent_type_container`, `agent_type_routing`, plugin/MCP/skill scope tables) split out and Drizzled, **so that** `domain/agent-config/resolver.ts` calls type-safe queries instead of raw SQL. ## Acceptance criteria ### Extraction - [ ] `service-config-store.ts` + `label-catalog.ts` + `agent-type-config.ts` (split by aggregate). - [ ] Functions moved: `getSettings`, `patchSettingsDb`, plus all `getServiceConfig`, `resolveAgentTypeConfig`, `resolveAgentTypeContainer`, `resolveAgentTypeRouting`, `getLabelCatalogForRepo`, `resolvePlugins`, `resolveMarketplaces`, `resolveMcpServers`, `resolveSkill`, `getAgentType`, `getSpeechConfig` etc. that currently sit in `resolver.ts` but talk SQL directly. - [ ] Callers updated. ### Drizzle - [ ] Schema files per aggregate. - [ ] Add-only inheritance contract preserved (see `docs/inheritance-contract.md`). ### Tests - [ ] Resolver tests green. - [ ] No raw SQL strings remain in `domain/agent-config/resolver.ts` for these tables (resolver becomes pure logic over typed queries). ## Out of scope - Resolver business logic (scope ladder rules) — only data access layer rewritten. ## References - `apps/server/src/domain/agent-config/resolver.ts` — current SQL hot path. - `docs/inheritance-contract.md`. - Foundation story (#839) must merge first.
Collaborator

🤖 Auto-assigned to code-lead (heuristic: default → code-lead (no specific label match; safer than code)). Reply /unassign to reroute.

🤖 Auto-assigned to **code-lead** (heuristic: default → code-lead (no specific label match; safer than code)). Reply `/unassign` to reroute.
Sign in to join this conversation.
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
charles/claude-hooks#845
No description provided.