refactor: Move shared Chat contracts into their owning domains

SI
12d ago
+54-52

Summary

Move workspace, connector, organization and catalog-result types out of hooks/components into stable domain modules; update all consumers. No runtime behavior change.

Verification

56 targeted existing tests, typecheck and instructions check pass. All 18 changed runtime modules emit identical JavaScript. Independent review completed.

Scope and review

Part of the user-requested Recoup monorepo untangle-codebase workflow. Audit and decision log preceded implementation. Changes stay in this owning repository; no production deployment or main-branch merge requested. No broad comment/test-pruning sweep. Existing local work and retired checkouts preserved.

Each repository PR is independently reviewable; the Mono report will collect the coordinated audit, retained cases and check limitations.


Summary by cubic

Moves shared API data shapes out of components and hooks into domain modules under lib/, so they no longer depend on UI-layer files.

  • Adds WorkspaceStatus, CatalogSongsResult, ConnectorInfo, and AccountOrganization as the canonical type sources in lib/chat, lib/catalog, lib/composio, and lib/organizations.
  • Updates all hooks, components, providers, and tests to import those types from their new home.
  • Updates AGENTS.md guidance so future work defines shared API contracts in lib/ domains instead of components or hooks.

No runtime behavior change.

Summary by CodeRabbit

  • Refactor
    • No user-facing behavior changes. Type definitions for connectors, organizations, catalog results, and workspace status were consolidated into shared modules.