Description
Adds an optional aliases: string[] field on the toolkits table that flows through Thermos → Apollo → Dashboard purely for search/discovery. Slugs and tool-execution paths are untouched.
Motivation: searching X in the dashboard does not currently surface Twitter (slug twitter, name Twitter) because there is no field tying the rebranded name to the toolkit. Same applies to future rebrands (Meta/Facebook, Block/Square, …). The whitespace fix in composio_dashboard#608 addressed the google cont → Googlecontacts case; this is the structural change for the broader class.
This PR is the storage + read-path plumbing. Mercury sends populated aliases via a follow-up PR on mercury (Twitter → aliases = ["X"]). The dashboard picks the field up by re-running pnpm openapi:generate and adding "aliases" to its match-sorter keys (separate PR).
Changes by layer
Thermos
apps/thermos/ent/registrydb/schema/toolkit.go — new field.JSON("aliases", []string{}).Default([]string{})
- Regenerated Ent code (codegen, not hand-edited)
- New migration
20260518150000_add_toolkit_aliases.sql — single additive ADD COLUMN … DEFAULT '[]'
apps/thermos/ent/registrydb/utils/toolkit.go — ToolkitUpsertInfo.Aliases, threaded through CreateToolkit + RevertToolkit (Revert preserves aliases on version bumps, mirroring Categories' behavior)
apps/thermos/handlers/toolkits/list.go + retrieve.go — surface in response
- Regenerated
openapi.json
apps/thermos/ent/registrydb/utils/trigger_test.go — SQLite schema mirror updated to include aliases JSON NOT NULL DEFAULT '[]'
Apollo
- Regenerated
apps/apollo/src/generated/thermos/types.gen.ts (only the three additive fields kept; reformatted to the existing no-semicolon style)
apps/apollo/src/lib/tools.ts — ToolkitConfigWithDetails.aliases + mapped from Thermos toolkitData.aliases
apps/apollo/src/lib/toolkits/get_toolkits.ts — internal Zod schema + convertThermosAppsToToolkits mapper thread the field through
apps/apollo/src/lib/toolkits/utils/schema.ts — public ToolkitResponseSchema.aliases with OpenAPI example (["X"] for Twitter)
- Test-fixture updates: 3
ToolkitConfigWithDetails literals in pages/api/v3/toolkits/index.test.ts and one ToolkitsRetrieveToolkitResponse literal in tests/utils/trigger_instance.ts
Out of scope (intentional)
- Thermos FTS GIN index expansion to cover aliases — not needed for the immediate dashboard fix (the 1-2 word search path is client-side over the cached toolkit list, not Thermos FTS). Easy follow-up once we want server-side
?search= to honor aliases too.
- Tool-level aliases — the existing
tool.alias_of column already covers tool slug aliasing and is a separate feature.
How did I test this PR
Thermos
go build ./... — clean
go test ./... — all packages pass (28 packages, including cache, ent/registrydb/utils, handlers/toolkits, lib/toolkits, timer-shards replay suite, etc.)
pnpm lint:ent-client-usage — ✓ All Ent client calls go through utility folders
pnpm lint:two-phase-drop — ✓ All column drops follow the two-phase removal process
pnpm build:openapi — regenerated, aliases field visible in apps/thermos/openapi.json under ToolkitsRetrieveToolkitResponse
pnpm lint — pre-existing golangci-lint Go-version mismatch in the local sandbox (1.23 < 1.26.2); CI will run lint.
Apollo
pnpm check-types — clean
pnpm lint — 1 pre-existing warning at composio_actions/utils/schemas.ts:1178 (documented), 0 new findings
pnpm with-env vitest run src/pages/api/v3/toolkits/index.test.ts — 11/11 pass
Cross-service
- Apollo's
convertToolkitDataToToolkitConfigWithDetails now reads toolkitData.aliases ?? [] from the regenerated Thermos client → maps to ToolkitConfigWithDetails.aliases → emitted on /api/v3/toolkits and /api/v3/toolkits/{slug} responses with empty default until Mercury populates per-toolkit values.
Sequencing
- This PR (hermes) lands the column + read-path with empty defaults — no behavior change for callers, just a new optional field on the response.
- Mercury PR (separate) — adds
aliases on the Python Tool base class, plumbs through mercury/registry/push.py, sets aliases = ["X"] on Twitter. Each mercury push repopulates affected toolkits.
- Dashboard PR (separate) —
pnpm openapi:generate to pick up the field, then add "aliases" to the useClientSearch keys arrays in toolkits-listing.tsx and apps-catalog.tsx. After this, typing X in the search bar surfaces Twitter.