feat(contracts): Ever Works integration enums, ActorTypeEnum.Agent, EmployeeKindEnum (G-P1-1)
What
G-P1-1 (contracts) of the Gauzy ↔ Ever Works integration plan (docs/superpowers/specs/2026-10-15-gauzy-ever-works-integration/06-gauzy-implementation-plan.md in ever-co/homelab). This PR is additive and behaviour-neutral: it only adds enum members. No migration, and no runtime path changes for existing values.
| Contract | Addition |
|---|---|
IntegrationEnum | EVER_WORKS = 'Ever_Works' |
IntegrationEntity | GOAL='Goal', KEY_RESULT='KeyResult', ORGANIZATION_TEAM='OrganizationTeam', STRATEGIC_INITIATIVE='StrategicInitiative', COMMENT='Comment', DOCUMENT='Document', INBOX_ITEM='InboxItem', AGENT='Agent'. The columns are varchar, so no migration is needed. |
ActorTypeEnum | Agent = 'Agent', stored as 2 by ActorTypeTransformer. System 0 and User 1 are unchanged, and unknown or missing values still map to System 0. |
EmployeeKindEnum (new) | HUMAN = 'human', AGENT = 'agent'. The employee.kind column ships in the next PR. |
BaseEntityEnum | Goal, KeyResult, InboxItem, InboxEmail |
Every exhaustive use checked
-
GraphQL
enum IntegrationEntity(integration/schema/integration.type.gql) is a hand-declared closed vocabulary. It gains the same 8 values, and so does the committed snapshotschema.graphql. Adding enum values isENUM_VALUE_ADDED, which the schema gate treats as additive. A new spec,integration-entity.vocabulary.spec.ts, pins the GraphQL enum toObject.values(IntegrationEntity)so the two cannot drift. -
ENTITY_ICONS/ENTITY_LINKS(ui-core/.../favorite/entities-mapping.ts) areRecord<BaseEntityEnum, …>. Each new member gets an entry:- Goal and KeyResult →
/pages/goals; - InboxItem and InboxEmail →
/pages/dashboard, because the Inbox page comes with the Inbox plugin.
favorite-links.routes.spec.tsalready resolves both targets. - Goal and KeyResult →
-
MCP server copies of the actor-type vocabulary (
packages/mcp-server/src/lib/input-schemas.ts,schema.ts; the MCP server does not depend on@gauzy/contracts) now listAgenttoo, andactor-type-transform.spec.tsholds both copies toObject.values(ActorTypeEnum)(review: Greptile). -
ActorTypeEnumhas no other exhaustive map.actorTypeis a nullableintcolumn in all 5 entities (Comment, Mention, Reaction, EntitySubscription, ActivityLog). GraphQL carries it asString, so the schema does not change. -
IntegrationEnum/IntegrationEntityswitches (GitHub, Hubstaff, Upwork, AI UI, integration-tenant delete) all havedefaultbranches. The seeds that pickObject.values(...)at random writevarchar.
Tests
shared/pipes/actor-type-transform.spec.ts(new): values 0, 1 and 2 round-trip, and unknown, null and undefined values map to System as before.integration/integration-entity.vocabulary.spec.ts(new): the GraphQL enum equals the contract enum.- Local: core
tscclean for the changed files; the GraphQL snapshot round-trips throughprintSchemaunchanged; the 30 node-only gates ofstatic-checks.ymlpass.
Plan item: G-P1-1 (contracts slice). The plugin lane (integration-ever-works, G-P1-2) builds on this.
🤖 Generated with Claude Code