feat: agent roleUniversalIdentifier for manifest-driven role assignment (#23206)

## Summary
- Adds optional `roleUniversalIdentifier` on `AgentManifest` /
`defineAgent` so apps can declaratively assign a role to an agent (same
config shape as `defaultRoleUniversalIdentifier`).
- Wires `agentUniversalIdentifier` as a sync many-to-one FK on
`roleTarget`, and emits a deterministic `roleTarget` from the agent
during app sync (create / update / delete).
- Enables app agents (e.g. Slack assistant) to get a role on install
without postInstall hooks or manual admin assignment.



<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/twentyhq/twenty/pull/23206?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="Review in cubic"
src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->
This commit is contained in:
Abdul Rahman
2026-07-24 05:57:40 +05:30
committed by GitHub
parent 8b7ac02464
commit 2c79093b74
30 changed files with 507 additions and 42 deletions
@@ -243,14 +243,14 @@ export class WorkspaceMigrationBuildOrchestratorService {
ALL_METADATA_NAME.rolePermissionFlag,
workspaceMigrationRolePermissionFlagActionsBuilderService,
),
createEntityActionsBuilderTask(
ALL_METADATA_NAME.roleTarget,
workspaceMigrationRoleTargetActionsBuilderService,
),
createEntityActionsBuilderTask(
ALL_METADATA_NAME.agent,
workspaceMigrationAgentActionsBuilderService,
),
createEntityActionsBuilderTask(
ALL_METADATA_NAME.roleTarget,
workspaceMigrationRoleTargetActionsBuilderService,
),
createEntityActionsBuilderTask(
ALL_METADATA_NAME.skill,
workspaceMigrationSkillActionsBuilderService,