Skip to content

The open alternative to Salesforce, designed for AI.

feat(skills): split agent-only skills from user skills, rewrite the catalog (#25798)

Félix Malfait8e70bd9cf885
diff --git a/packages/twenty-client-sdk/src/metadata/generated/schema.graphql b/packages/twenty-client-sdk/src/metadata/generated/schema.graphql
index 44b1838bf83..eab134a377b 100644
--- a/packages/twenty-client-sdk/src/metadata/generated/schema.graphql
+++ b/packages/twenty-client-sdk/src/metadata/generated/schema.graphql
@@ -3253,6 +3253,7 @@ type Skill {
description: String
content: String!
isCustom: Boolean!
+ isSystem: Boolean!
isActive: Boolean!
applicationId: UUID
createdAt: DateTime!
diff --git a/packages/twenty-client-sdk/src/metadata/generated/schema.ts b/packages/twenty-client-sdk/src/metadata/generated/schema.ts
index 7ac4ece3b4f..4157bc2ef91 100644
--- a/packages/twenty-client-sdk/src/metadata/generated/schema.ts
+++ b/packages/twenty-client-sdk/src/metadata/generated/schema.ts
@@ -2852,6 +2852,7 @@ export interface Skill {
description?: Scalars['String']
content: Scalars['String']
isCustom: Scalars['Boolean']
+ isSystem: Scalars['Boolean']
isActive: Scalars['Boolean']
applicationId?: Scalars['UUID']
createdAt: Scalars['DateTime']
@@ -6492,6 +6493,7 @@ export interface SkillGenqlSelection{
description?: boolean | number
content?: boolean | number
isCustom?: boolean | number
+ isSystem?: boolean | number
isActive?: boolean | number
applicationId?: boolean | number
createdAt?: boolean | number
diff --git a/packages/twenty-client-sdk/src/metadata/generated/types.ts b/packages/twenty-client-sdk/src/metadata/generated/types.ts
index b91973e84b0..c9ff8411341 100644
--- a/packages/twenty-client-sdk/src/metadata/generated/types.ts
+++ b/packages/twenty-client-sdk/src/metadata/generated/types.ts
@@ -6395,6 +6395,9 @@ export default {
"isCustom": [
8
],
+ "isSystem": [
+ 8
+ ],
"isActive": [
8
],
diff --git a/packages/twenty-front/src/generated-metadata/graphql.ts b/packages/twenty-front/src/generated-metadata/graphql.ts
index 79f724b5d01..2752090c386 100644
--- a/packages/twenty-front/src/generated-metadata/graphql.ts
+++ b/packages/twenty-front/src/generated-metadata/graphql.ts
@@ -5846,6 +5846,7 @@ export type Skill = {
id: Scalars['UUID']['output'];
isActive: Scalars['Boolean']['output'];
isCustom: Scalars['Boolean']['output'];
+ isSystem: Scalars['Boolean']['output'];
label: Scalars['String']['output'];
name: Scalars['String']['output'];
updatedAt: Scalars['DateTime']['output'];
@@ -7379,14 +7380,14 @@ export type FindManyTimelineActivityTypesQuery = { __typename?: 'Query', timelin
export type AgentFieldsFragment = { __typename?: 'Agent', id: string, name: string, label: string, description?: string | null, icon?: string | null, prompt: string, modelId: string, responseFormat?: any | null, roleId?: string | null, isCustom: boolean, modelConfiguration?: any | null, evaluationInputs: Array<string>, applicationId?: string | null, createdAt: string, updatedAt: string };
-export type SkillFieldsFragment = { __typename?: 'Skill', id: string, name: string, label: string, description?: string | null, icon?: string | null, content: string, isCustom: boolean, isActive: boolean, applicationId?: string | null, createdAt: string, updatedAt: string };
+export type SkillFieldsFragment = { __typename?: 'Skill', id: string, name: string, label: string, description?: string | null, icon?: string | null, content: string, isCustom: boolean, isSystem: boolean, isActive: boolean, applicationId?: string | null, createdAt: string, updatedAt: string };
export type ActivateSkillMutationVariables = Exact<{
id: Scalars['UUID']['input'];
}>;
-export type ActivateSkillMutation = { __typename?: 'Mutation', activateSkill: { __typename?: 'Skill', id: string, name: string, label: string, description?: string | null, icon?: string | null, content: string, isCustom: boolean, isActive: boolean, applicationId?: string | null, createdAt: string, updatedAt: string } };
+export type ActivateSkillMutation = { __typename?: 'Mutation', activateSkill: { __typename?: 'Skill', id: string, name: string, label: string, description?: string | null, icon?: string | null, content: string, isCustom: boolean, isSystem: boolean, isActive: boolean, applicationId?: string | null, createdAt: string, updatedAt: string } };
export type AnswerAgentChatQuestionMutationVariables = Exact<{
threadId: Scalars['UUID']['input'];
@@ -7431,14 +7432,14 @@ export type CreateSkillMutationVariables = Exact<{
}>;
-export type CreateSkillMutation = { __typename?: 'Mutation', createSkill: { __typename?: 'Skill', id: string, name: string, label: string, description?: string | null, icon?: string | null, content: string, isCustom: boolean, isActive: boolean, applicationId?: string | null, createdAt: string, updatedAt: string } };
+export type CreateSkillMutation = { __typename?: 'Mutation', createSkill: { __typename?: 'Skill', id: string, name: string, label: string, description?: string | null, icon?: string | null, content: string, isCustom: boolean, isSystem: boolean, isActive: boolean, applicationId?: string | null, createdAt: string, updatedAt: string } };
export type DeactivateSkillMutationVariables = Exact<{
id: Scalars['UUID']['input'];
}>;
-export type DeactivateSkillMutation = { __typename?: 'Mutation', deactivateSkill: { __typename?: 'Skill', id: string, name: string, label: string, description?: string | null, icon?: string | null, content: string, isCustom: boolean, isActive: boolean, applicationId?: string | null, createdAt: string, updatedAt: string } };
+export type DeactivateSkillMutation = { __typename?: 'Mutation', deactivateSkill: { __typename?: 'Skill', id: string, name: string, label: string, description?: string | null, icon?: string | null, content: string, isCustom: boolean, isSystem: boolean, isActive: boolean, applicationId?: string | null, createdAt: string, updatedAt: string } };
export type DeleteChatThreadMutationVariables = Exact<{
id: Scalars['UUID']['input'];
@@ -7466,7 +7467,7 @@ export type DeleteSkillMutationVariables = Exact<{
}>;
-export type DeleteSkillMutation = { __typename?: 'Mutation', deleteSkill: { __typename?: 'Skill', id: string, name: string, label: string, description?: string | null, icon?: string | null, content: string, isCustom: boolean, isActive: boolean, applicationId?: string | null, createdAt: string, updatedAt: string } };
+export type DeleteSkillMutation = { __typename?: 'Mutation', deleteSkill: { __typename?: 'Skill', id: string, name: string, label: string, description?: string | null, icon?: string | null, content: string, isCustom: boolean, isSystem: boolean, isActive: boolean, applicationId?: string | null, createdAt: string, updatedAt: string } };
export type EvaluateAgentTurnMutationVariables = Exact<{
turnId: Scalars['UUID']['input'];
@@ -7544,7 +7545,7 @@ export type UpdateSkillMutationVariables = Exact<{
}>;
-export type UpdateSkillMutation = { __typename?: 'Mutation', updateSkill: { __typename?: 'Skill', id: string, name: string, label: string, description?: string | null, icon?: string | null, content: string, isCustom: boolean, isActive: boolean, applicationId?: string | null, createdAt: string, updatedAt: string } };
+export type UpdateSkillMutation = { __typename?: 'Mutation', updateSkill: { __typename?: 'Skill', id: string, name: string, label: string, description?: string | null, icon?: string | null, content: string, isCustom: boolean, isSystem: boolean, isActive: boolean, applicationId?: string | null, createdAt: string, updatedAt: string } };
export type FindManyAgentsQueryVariables = Exact<{ [key: string]: never; }>;
@@ -7554,12 +7555,12 @@ export type FindManyAgentsQuery = { __typename?: 'Query', findManyAgents: Array<
export type FindManySkillsQueryVariables = Exact<{ [key: string]: never; }>;
-export type FindManySkillsQuery = { __typename?: 'Query', skills: Array<{ __typename?: 'Skill', id: string, name: string, label: string, description?: string | null, icon?: string | null, content: string, isCustom: boolean, isActive: boolean, applicationId?: string | null, createdAt: string, updatedAt: string }> };
+export type FindManySkillsQuery = { __typename?: 'Query', skills: Array<{ __typename?: 'Skill', id: string, name: string, label: string, description?: string | null, icon?: string | null, content: string, isCustom: boolean, isSystem: boolean, isActive: boolean, applicationId?: string | null, createdAt: string, updatedAt: string }> };
export type FindManySkillsForSuggestionQueryVariables = Exact<{ [key: string]: never; }>;
-export type FindManySkillsForSuggestionQuery = { __typename?: 'Query', skills: Array<{ __typename?: 'Skill', id: string, name: string, label: string, description?: string | null, icon?: string | null, isActive: boolean }> };
+export type FindManySkillsForSuggestionQuery = { __typename?: 'Query', skills: Array<{ __typename?: 'Skill', id: string, name: string, label: string, description?: string | null, icon?: string | null, isActive: boolean, isSystem: boolean }> };
export type FindOneAgentQueryVariables = Exact<{
id: Scalars['UUID']['input'];
@@ -7573,7 +7574,7 @@ export type FindOneSkillQueryVariables = Exact<{
}>;
-export type FindOneSkillQuery = { __typename?: 'Query', skill?: { __typename?: 'Skill', id: string, name: string, label: string, description?: string | null, icon?: string | null, content: string, isCustom: boolean, isActive: boolean, applicationId?: string | null, createdAt: string, updatedAt: string } | null };
+export type FindOneSkillQuery = { __typename?: 'Query', skill?: { __typename?: 'Skill', id: string, name: string, label: string, description?: string | null, icon?: string | null, content: string, isCustom: boolean, isSystem: boolean, isActive: boolean, applicationId?: string | null, createdAt: string, updatedAt: string } | null };
export type FindWorkspaceAiStatsQueryVariables = Exact<{ [key: string]: never; }>;
@@ -9822,7 +9823,7 @@ export type FindManyMarketplaceAppsForToolTableQueryVariables = Exact<{ [key: st
export type FindManyMarketplaceAppsForToolTableQuery = { __typename?: 'Query', findManyMarketplaceApps: Array<{ __typename?: 'MarketplaceApp', id: string, logoUrl?: string | null }> };
-export const SkillFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SkillFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Skill"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"content"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]} as unknown as DocumentNode<SkillFieldsFragment, unknown>;
+export const SkillFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SkillFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Skill"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"content"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]} as unknown as DocumentNode<SkillFieldsFragment, unknown>;
export const AgentFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AgentFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Agent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"prompt"}},{"kind":"Field","name":{"kind":"Name","value":"modelId"}},{"kind":"Field","name":{"kind":"Name","value":"responseFormat"}},{"kind":"Field","name":{"kind":"Name","value":"roleId"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"modelConfiguration"}},{"kind":"Field","name":{"kind":"Name","value":"evaluationInputs"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]} as unknown as DocumentNode<AgentFieldsFragment, unknown>;
export const ObjectMetadataFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ObjectMetadataFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Object"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}},{"kind":"Field","name":{"kind":"Name","value":"labelSingular"}},{"kind":"Field","name":{"kind":"Name","value":"labelPlural"}},{"kind":"Field","name":{"kind":"Name","value":"color"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"isRemote"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}},{"kind":"Field","name":{"kind":"Name","value":"isUIEditable"}},{"kind":"Field","name":{"kind":"Name","value":"isUICreatable"}},{"kind":"Field","name":{"kind":"Name","value":"writability"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"labelIdentifierFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"imageIdentifierFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"shortcut"}},{"kind":"Field","name":{"kind":"Name","value":"isLabelSyncedWithName"}},{"kind":"Field","name":{"kind":"Name","value":"isSearchable"}},{"kind":"Field","name":{"kind":"Name","value":"openRecordIn"}},{"kind":"Field","name":{"kind":"Name","value":"duplicateCriteria"}},{"kind":"Field","name":{"kind":"Name","value":"searchFieldMetadataList"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"tsVectorFieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"position"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"indexMetadataList"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"indexWhereClause"}},{"kind":"Field","name":{"kind":"Name","value":"indexType"}},{"kind":"Field","name":{"kind":"Name","value":"isUnique"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"indexFieldMetadataList"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fieldMetadataId"}},{"kind":"Field","name":{"kind":"Name","value":"subFieldName"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"order"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"fieldsList"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}},{"kind":"Field","name":{"kind":"Name","value":"isUIEditable"}},{"kind":"Field","name":{"kind":"Name","value":"writability"}},{"kind":"Field","name":{"kind":"Name","value":"isNullable"}},{"kind":"Field","name":{"kind":"Name","value":"isUnique"}},{"kind":"Field","name":{"kind":"Name","value":"isSearchable"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"defaultValue"}},{"kind":"Field","name":{"kind":"Name","value":"options"}},{"kind":"Field","name":{"kind":"Name","value":"settings"}},{"kind":"Field","name":{"kind":"Name","value":"isLabelSyncedWithName"}},{"kind":"Field","name":{"kind":"Name","value":"morphId"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"relation"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"sourceObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"sourceFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"morphRelations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"sourceObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetObjectMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"nameSingular"}},{"kind":"Field","name":{"kind":"Name","value":"namePlural"}}]}},{"kind":"Field","name":{"kind":"Name","value":"sourceFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"targetFieldMetadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}}]}}]}}]} as unknown as DocumentNode<ObjectMetadataFieldsFragment, unknown>;
export const LogicFunctionFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LogicFunctionFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"LogicFunction"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"runtime"}},{"kind":"Field","name":{"kind":"Name","value":"timeoutSeconds"}},{"kind":"Field","name":{"kind":"Name","value":"executionMode"}},{"kind":"Field","name":{"kind":"Name","value":"sourceHandlerPath"}},{"kind":"Field","name":{"kind":"Name","value":"handlerName"}},{"kind":"Field","name":{"kind":"Name","value":"cronTriggerSettings"}},{"kind":"Field","name":{"kind":"Name","value":"databaseEventTriggerSettings"}},{"kind":"Field","name":{"kind":"Name","value":"httpRouteTriggerSettings"}},{"kind":"Field","name":{"kind":"Name","value":"toolTriggerSettings"}},{"kind":"Field","name":{"kind":"Name","value":"workflowActionTriggerSettings"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]} as unknown as DocumentNode<LogicFunctionFieldsFragment, unknown>;
@@ -9879,18 +9880,18 @@ export const SendMessageCampaignTestDocument = {"kind":"Document","definitions":
export const ResetTimelineActivityTypeDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"ResetTimelineActivityType"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"resetTimelineActivityType"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}}]}}]}}]} as unknown as DocumentNode<ResetTimelineActivityTypeMutation, ResetTimelineActivityTypeMutationVariables>;
export const UpdateTimelineActivityTypeIsActiveDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateTimelineActivityTypeIsActive"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UpdateTimelineActivityTypeInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateTimelineActivityType"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}}]}}]}}]} as unknown as DocumentNode<UpdateTimelineActivityTypeIsActiveMutation, UpdateTimelineActivityTypeIsActiveMutationVariables>;
export const FindManyTimelineActivityTypesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindManyTimelineActivityTypes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"timelineActivityTypes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"universalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"emit"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"on"}},{"kind":"Field","name":{"kind":"Name","value":"objectUniversalIdentifier"}}]}},{"kind":"Field","name":{"kind":"Name","value":"frontComponentUniversalIdentifier"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}}]}}]}}]} as unknown as DocumentNode<FindManyTimelineActivityTypesQuery, FindManyTimelineActivityTypesQueryVariables>;
-export const ActivateSkillDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"ActivateSkill"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"activateSkill"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SkillFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SkillFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Skill"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"content"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]} as unknown as DocumentNode<ActivateSkillMutation, ActivateSkillMutationVariables>;
+export const ActivateSkillDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"ActivateSkill"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"activateSkill"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SkillFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SkillFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Skill"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"content"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]} as unknown as DocumentNode<ActivateSkillMutation, ActivateSkillMutationVariables>;
export const AnswerAgentChatQuestionDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"AnswerAgentChatQuestion"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"threadId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"messageId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"answers"}},"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"AgentChatQuestionAnswerInput"}}}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"modelId"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"fileAttachments"}},"type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"FileAttachmentInput"}}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"answerAgentChatQuestion"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"threadId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"threadId"}}},{"kind":"Argument","name":{"kind":"Name","value":"messageId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"messageId"}}},{"kind":"Argument","name":{"kind":"Name","value":"answers"},"value":{"kind":"Variable","name":{"kind":"Name","value":"answers"}}},{"kind":"Argument","name":{"kind":"Name","value":"modelId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"modelId"}}},{"kind":"Argument","name":{"kind":"Name","value":"fileAttachments"},"value":{"kind":"Variable","name":{"kind":"Name","value":"fileAttachments"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"messageId"}},{"kind":"Field","name":{"kind":"Name","value":"queued"}},{"kind":"Field","name":{"kind":"Name","value":"streamId"}}]}}]}}]} as unknown as DocumentNode<AnswerAgentChatQuestionMutation, AnswerAgentChatQuestionMutationVariables>;
export const ArchiveChatThreadDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"ArchiveChatThread"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"archiveChatThread"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]}}]} as unknown as DocumentNode<ArchiveChatThreadMutation, ArchiveChatThreadMutationVariables>;
export const AssignRoleToAgentDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"AssignRoleToAgent"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"agentId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"roleId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"assignRoleToAgent"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"agentId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"agentId"}}},{"kind":"Argument","name":{"kind":"Name","value":"roleId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"roleId"}}}]}]}}]} as unknown as DocumentNode<AssignRoleToAgentMutation, AssignRoleToAgentMutationVariables>;
export const CreateChatThreadDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateChatThread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createChatThread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]}}]} as unknown as DocumentNode<CreateChatThreadMutation, CreateChatThreadMutationVariables>;
export const CreateOneAgentDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateOneAgent"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CreateAgentInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createOneAgent"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AgentFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AgentFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Agent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"prompt"}},{"kind":"Field","name":{"kind":"Name","value":"modelId"}},{"kind":"Field","name":{"kind":"Name","value":"responseFormat"}},{"kind":"Field","name":{"kind":"Name","value":"roleId"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"modelConfiguration"}},{"kind":"Field","name":{"kind":"Name","value":"evaluationInputs"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]} as unknown as DocumentNode<CreateOneAgentMutation, CreateOneAgentMutationVariables>;
-export const CreateSkillDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateSkill"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CreateSkillInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createSkill"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SkillFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SkillFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Skill"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"content"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]} as unknown as DocumentNode<CreateSkillMutation, CreateSkillMutationVariables>;
-export const DeactivateSkillDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DeactivateSkill"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"deactivateSkill"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SkillFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SkillFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Skill"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"content"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]} as unknown as DocumentNode<DeactivateSkillMutation, DeactivateSkillMutationVariables>;
+export const CreateSkillDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateSkill"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CreateSkillInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createSkill"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SkillFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SkillFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Skill"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"content"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]} as unknown as DocumentNode<CreateSkillMutation, CreateSkillMutationVariables>;
+export const DeactivateSkillDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DeactivateSkill"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"deactivateSkill"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SkillFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SkillFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Skill"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"content"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]} as unknown as DocumentNode<DeactivateSkillMutation, DeactivateSkillMutationVariables>;
export const DeleteChatThreadDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DeleteChatThread"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"deleteChatThread"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}]}]}}]} as unknown as DocumentNode<DeleteChatThreadMutation, DeleteChatThreadMutationVariables>;
export const DeleteOneAgentDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DeleteOneAgent"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"AgentIdInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"deleteOneAgent"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AgentFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AgentFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Agent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"prompt"}},{"kind":"Field","name":{"kind":"Name","value":"modelId"}},{"kind":"Field","name":{"kind":"Name","value":"responseFormat"}},{"kind":"Field","name":{"kind":"Name","value":"roleId"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"modelConfiguration"}},{"kind":"Field","name":{"kind":"Name","value":"evaluationInputs"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]} as unknown as DocumentNode<DeleteOneAgentMutation, DeleteOneAgentMutationVariables>;
export const DeleteQueuedChatMessageDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DeleteQueuedChatMessage"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"messageId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"deleteQueuedChatMessage"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"messageId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"messageId"}}}]}]}}]} as unknown as DocumentNode<DeleteQueuedChatMessageMutation, DeleteQueuedChatMessageMutationVariables>;
-export const DeleteSkillDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DeleteSkill"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"deleteSkill"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SkillFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SkillFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Skill"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"content"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]} as unknown as DocumentNode<DeleteSkillMutation, DeleteSkillMutationVariables>;
+export const DeleteSkillDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DeleteSkill"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"deleteSkill"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SkillFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SkillFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Skill"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"content"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]} as unknown as DocumentNode<DeleteSkillMutation, DeleteSkillMutationVariables>;
export const EvaluateAgentTurnDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"EvaluateAgentTurn"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"turnId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"evaluateAgentTurn"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"turnId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"turnId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"turnId"}},{"kind":"Field","name":{"kind":"Name","value":"score"}},{"kind":"Field","name":{"kind":"Name","value":"comment"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}}]}}]}}]} as unknown as DocumentNode<EvaluateAgentTurnMutation, EvaluateAgentTurnMutationVariables>;
export const RemoveRoleFromAgentDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"RemoveRoleFromAgent"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"agentId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"removeRoleFromAgent"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"agentId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"agentId"}}}]}]}}]} as unknown as DocumentNode<RemoveRoleFromAgentMutation, RemoveRoleFromAgentMutationVariables>;
export const RenameChatThreadDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"RenameChatThread"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"title"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"renameChatThread"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}},{"kind":"Argument","name":{"kind":"Name","value":"title"},"value":{"kind":"Variable","name":{"kind":"Name","value":"title"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]}}]} as unknown as DocumentNode<RenameChatThreadMutation, RenameChatThreadMutationVariables>;
@@ -9900,12 +9901,12 @@ export const SendChatMessageDocument = {"kind":"Document","definitions":[{"kind"
export const StopAgentChatStreamDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"StopAgentChatStream"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"threadId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"stopAgentChatStream"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"threadId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"threadId"}}}]}]}}]} as unknown as DocumentNode<StopAgentChatStreamMutation, StopAgentChatStreamMutationVariables>;
export const UnarchiveChatThreadDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UnarchiveChatThread"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"unarchiveChatThread"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]}}]} as unknown as DocumentNode<UnarchiveChatThreadMutation, UnarchiveChatThreadMutationVariables>;
export const UpdateOneAgentDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateOneAgent"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UpdateAgentInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateOneAgent"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AgentFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AgentFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Agent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"prompt"}},{"kind":"Field","name":{"kind":"Name","value":"modelId"}},{"kind":"Field","name":{"kind":"Name","value":"responseFormat"}},{"kind":"Field","name":{"kind":"Name","value":"roleId"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"modelConfiguration"}},{"kind":"Field","name":{"kind":"Name","value":"evaluationInputs"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]} as unknown as DocumentNode<UpdateOneAgentMutation, UpdateOneAgentMutationVariables>;
-export const UpdateSkillDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateSkill"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UpdateSkillInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateSkill"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SkillFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SkillFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Skill"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"content"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]} as unknown as DocumentNode<UpdateSkillMutation, UpdateSkillMutationVariables>;
+export const UpdateSkillDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateSkill"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UpdateSkillInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateSkill"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SkillFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SkillFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Skill"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"content"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]} as unknown as DocumentNode<UpdateSkillMutation, UpdateSkillMutationVariables>;
export const FindManyAgentsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindManyAgents"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"findManyAgents"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AgentFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AgentFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Agent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"prompt"}},{"kind":"Field","name":{"kind":"Name","value":"modelId"}},{"kind":"Field","name":{"kind":"Name","value":"responseFormat"}},{"kind":"Field","name":{"kind":"Name","value":"roleId"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"modelConfiguration"}},{"kind":"Field","name":{"kind":"Name","value":"evaluationInputs"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]} as unknown as DocumentNode<FindManyAgentsQuery, FindManyAgentsQueryVariables>;
-export const FindManySkillsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindManySkills"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"skills"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SkillFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SkillFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Skill"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"content"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]} as unknown as DocumentNode<FindManySkillsQuery, FindManySkillsQueryVariables>;
-export const FindManySkillsForSuggestionDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindManySkillsForSuggestion"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"skills"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}}]}}]}}]} as unknown as DocumentNode<FindManySkillsForSuggestionQuery, FindManySkillsForSuggestionQueryVariables>;
+export const FindManySkillsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindManySkills"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"skills"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SkillFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SkillFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Skill"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"content"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]} as unknown as DocumentNode<FindManySkillsQuery, FindManySkillsQueryVariables>;
+export const FindManySkillsForSuggestionDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindManySkillsForSuggestion"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"skills"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}}]}}]}}]} as unknown as DocumentNode<FindManySkillsForSuggestionQuery, FindManySkillsForSuggestionQueryVariables>;
export const FindOneAgentDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindOneAgent"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"findOneAgent"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AgentFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AgentFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Agent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"prompt"}},{"kind":"Field","name":{"kind":"Name","value":"modelId"}},{"kind":"Field","name":{"kind":"Name","value":"responseFormat"}},{"kind":"Field","name":{"kind":"Name","value":"roleId"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"modelConfiguration"}},{"kind":"Field","name":{"kind":"Name","value":"evaluationInputs"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]} as unknown as DocumentNode<FindOneAgentQuery, FindOneAgentQueryVariables>;
-export const FindOneSkillDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindOneSkill"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"skill"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SkillFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SkillFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Skill"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"content"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]} as unknown as DocumentNode<FindOneSkillQuery, FindOneSkillQueryVariables>;
+export const FindOneSkillDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindOneSkill"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"skill"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SkillFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SkillFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Skill"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"icon"}},{"kind":"Field","name":{"kind":"Name","value":"content"}},{"kind":"Field","name":{"kind":"Name","value":"isCustom"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"applicationId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]} as unknown as DocumentNode<FindOneSkillQuery, FindOneSkillQueryVariables>;
export const FindWorkspaceAiStatsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FindWorkspaceAiStats"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"findWorkspaceAiStats"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"conversationsCount"}},{"kind":"Field","name":{"kind":"Name","value":"skillsCount"}},{"kind":"Field","name":{"kind":"Name","value":"toolsCount"}}]}}]}}]} as unknown as DocumentNode<FindWorkspaceAiStatsQuery, FindWorkspaceAiStatsQueryVariables>;
export const GetAgentTurnsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetAgentTurns"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"agentId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"agentTurns"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"agentId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"agentId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"agentId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"evaluations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"score"}},{"kind":"Field","name":{"kind":"Name","value":"comment"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"messages"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"parts"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"textContent"}},{"kind":"Field","name":{"kind":"Name","value":"reasoningContent"}},{"kind":"Field","name":{"kind":"Name","value":"toolName"}},{"kind":"Field","name":{"kind":"Name","value":"toolCallId"}},{"kind":"Field","name":{"kind":"Name","value":"toolInput"}},{"kind":"Field","name":{"kind":"Name","value":"toolOutput"}},{"kind":"Field","name":{"kind":"Name","value":"errorMessage"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"providerExecuted"}},{"kind":"Field","name":{"kind":"Name","value":"errorDetails"}},{"kind":"Field","name":{"kind":"Name","value":"sourceUrlSourceId"}},{"kind":"Field","name":{"kind":"Name","value":"sourceUrlUrl"}},{"kind":"Field","name":{"kind":"Name","value":"sourceUrlTitle"}},{"kind":"Field","name":{"kind":"Name","value":"sourceDocumentSourceId"}},{"kind":"Field","name":{"kind":"Name","value":"sourceDocumentMediaType"}},{"kind":"Field","name":{"kind":"Name","value":"sourceDocumentTitle"}},{"kind":"Field","name":{"kind":"Name","value":"sourceDocumentFilename"}},{"kind":"Field","name":{"kind":"Name","value":"fileMediaType"}},{"kind":"Field","name":{"kind":"Name","value":"fileFilename"}},{"kind":"Field","name":{"kind":"Name","value":"fileUrl"}},{"kind":"Field","name":{"kind":"Name","value":"providerMetadata"}}]}}]}}]}}]}}]} as unknown as DocumentNode<GetAgentTurnsQuery, GetAgentTurnsQueryVariables>;
export const GetChatMessagesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetChatMessages"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"threadId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"chatMessages"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"threadId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"threadId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"turnId"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"parts"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"messageId"}},{"kind":"Field","name":{"kind":"Name","value":"orderIndex"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"textContent"}},{"kind":"Field","name":{"kind":"Name","value":"reasoningContent"}},{"kind":"Field","name":{"kind":"Name","value":"toolName"}},{"kind":"Field","name":{"kind":"Name","value":"toolCallId"}},{"kind":"Field","name":{"kind":"Name","value":"toolInput"}},{"kind":"Field","name":{"kind":"Name","value":"toolOutput"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"providerExecuted"}},{"kind":"Field","name":{"kind":"Name","value":"errorMessage"}},{"kind":"Field","name":{"kind":"Name","value":"errorDetails"}},{"kind":"Field","name":{"kind":"Name","value":"sourceUrlSourceId"}},{"kind":"Field","name":{"kind":"Name","value":"sourceUrlUrl"}},{"kind":"Field","name":{"kind":"Name","value":"sourceUrlTitle"}},{"kind":"Field","name":{"kind":"Name","value":"sourceDocumentSourceId"}},{"kind":"Field","name":{"kind":"Name","value":"sourceDocumentMediaType"}},{"kind":"Field","name":{"kind":"Name","value":"sourceDocumentTitle"}},{"kind":"Field","name":{"kind":"Name","value":"sourceDocumentFilename"}},{"kind":"Field","name":{"kind":"Name","value":"fileMediaType"}},{"kind":"Field","name":{"kind":"Name","value":"fileFilename"}},{"kind":"Field","name":{"kind":"Name","value":"fileUrl"}},{"kind":"Field","name":{"kind":"Name","value":"fileId"}},{"kind":"Field","name":{"kind":"Name","value":"providerMetadata"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"chatStreamCatchupChunks"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"threadId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"threadId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"chunks"}},{"kind":"Field","name":{"kind":"Name","value":"maxSeq"}},{"kind":"Field","name":{"kind":"Name","value":"error"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"code"}},{"kind":"Field","name":{"kind":"Name","value":"message"}}]}}]}}]}}]} as unknown as DocumentNode<GetChatMessagesQuery, GetChatMessagesQueryVariables>;
diff --git a/packages/twenty-front/src/modules/ai/components/__tests__/ChatReferenceChip.test.tsx b/packages/twenty-front/src/modules/ai/components/__tests__/ChatReferenceChip.test.tsx
index c2d28fb07f0..f4c08e27060 100644
--- a/packages/twenty-front/src/modules/ai/components/__tests__/ChatReferenceChip.test.tsx
+++ b/packages/twenty-front/src/modules/ai/components/__tests__/ChatReferenceChip.test.tsx
@@ -72,6 +72,7 @@ const skillsApolloMock = {
description: null,
icon: 'IconSettingsAutomation',
isActive: true,
+ isSystem: false,
},
],
},
diff --git a/packages/twenty-front/src/modules/ai/graphql/fragments/skillFragment.ts b/packages/twenty-front/src/modules/ai/graphql/fragments/skillFragment.ts
index db80bc98dd0..74b0ec9eb3b 100644
--- a/packages/twenty-front/src/modules/ai/graphql/fragments/skillFragment.ts
+++ b/packages/twenty-front/src/modules/ai/graphql/fragments/skillFragment.ts
@@ -9,6 +9,7 @@ export const SKILL_FRAGMENT = gql`
icon
content
isCustom
+ isSystem
isActive
applicationId
createdAt
diff --git a/packages/twenty-front/src/modules/ai/graphql/queries/findManySkillsForSuggestion.ts b/packages/twenty-front/src/modules/ai/graphql/queries/findManySkillsForSuggestion.ts
index e115a88d76c..64e9d5f4a8d 100644
--- a/packages/twenty-front/src/modules/ai/graphql/queries/findManySkillsForSuggestion.ts
+++ b/packages/twenty-front/src/modules/ai/graphql/queries/findManySkillsForSuggestion.ts
@@ -9,6 +9,7 @@ export const FIND_MANY_SKILLS_FOR_SUGGESTION = gql`
description
icon
isActive
+ isSystem
}
}
`;
diff --git a/packages/twenty-front/src/modules/skill-suggestion/hooks/__tests__/useSkillSuggestionSearch.test.tsx b/packages/twenty-front/src/modules/skill-suggestion/hooks/__tests__/useSkillSuggestionSearch.test.tsx
new file mode 100644
index 00000000000..ced9b6616dd
--- /dev/null
+++ b/packages/twenty-front/src/modules/skill-suggestion/hooks/__tests__/useSkillSuggestionSearch.test.tsx
@@ -0,0 +1,93 @@
+import { renderHook } from '@testing-library/react';
+import { type ReactNode } from 'react';
+
+import { useSkillSuggestionSearch } from '@/skill-suggestion/hooks/useSkillSuggestionSearch';
+import { FindManySkillsForSuggestionDocument } from '~/generated-metadata/graphql';
+import { getJestMetadataAndApolloMocksWrapper } from '~/testing/jest/getJestMetadataAndApolloMocksWrapper';
+
+const buildSkill = ({
+ id,
+ name,
+ label,
+ isSystem = false,
+ isActive = true,
+}: {
+ id: string;
+ name: string;
+ label: string;
+ isSystem?: boolean;
+ isActive?: boolean;
+}) => ({
+ __typename: 'Skill' as const,
+ id,
+ name,
+ label,
+ description: null,
+ icon: 'IconBook',
+ isActive,
+ isSystem,
+});
+
+const MEETING_PREP_SKILL = buildSkill({
+ id: '20202020-5e21-4b07-9c3a-1d4f6e8a0b52',
+ name: 'meeting-prep',
+ label: 'Meeting Prep',
+});
+
+const VIEW_BUILDING_SKILL = buildSkill({
+ id: '20202020-e4a2-4b3f-9c71-d8f6a2b51e3a',
+ name: 'view-building',
+ label: 'View Building',
+ isSystem: true,
+});
+
+const DEACTIVATED_SKILL = buildSkill({
+ id: '20202020-6c5d-4e3f-9a8b-7d6e5f4c3b21',
+ name: 'quarterly-report',
+ label: 'Quarterly Report',
+ isActive: false,
+});
+
+const renderUseSkillSuggestionSearch = () => {
+ const Wrapper = getJestMetadataAndApolloMocksWrapper({
+ apolloMocks: [
+ {
+ request: { query: FindManySkillsForSuggestionDocument },
+ result: {
+ data: {
+ skills: [
+ MEETING_PREP_SKILL,
+ VIEW_BUILDING_SKILL,
+ DEACTIVATED_SKILL,
+ ],
+ },
+ },
+ maxUsageCount: Number.POSITIVE_INFINITY,
+ },
+ ],
+ });
+
+ return renderHook(() => useSkillSuggestionSearch(), {
+ wrapper: ({ children }: { children: ReactNode }) => (
+ <Wrapper>{children}</Wrapper>
+ ),
+ });
+};
+
+describe('useSkillSuggestionSearch', () => {
+ it('offers the skills a user can pick', async () => {
+ const { result } = renderUseSkillSuggestionSearch();
+
+ const skills = await result.current.searchSkills('');
+
+ expect(skills.map((skill) => skill.name)).toEqual(['meeting-prep']);
+ });
+
+ it('never offers a system skill, even when the query names it', async () => {
+ const { result } = renderUseSkillSuggestionSearch();
+
+ const skills = await result.current.searchSkills('view-building');
+
+ expect(skills).toEqual([]);
+ });
+});
diff --git a/packages/twenty-front/src/modules/skill-suggestion/hooks/useSkillSuggestionSearch.ts b/packages/twenty-front/src/modules/skill-suggestion/hooks/useSkillSuggestionSearch.ts
index 3ff36b25f23..be4b650c77a 100644
--- a/packages/twenty-front/src/modules/skill-suggestion/hooks/useSkillSuggestionSearch.ts
+++ b/packages/twenty-front/src/modules/skill-suggestion/hooks/useSkillSuggestionSearch.ts
@@ -24,6 +24,7 @@ export const useSkillSuggestionSearch = () => {
.filter(
(skill) =>
skill.isActive &&
+ !skill.isSystem &&
(normalizeSearchText(skill.name).includes(normalizedQuery) ||
normalizeSearchText(skill.label).includes(normalizedQuery)),
)
diff --git a/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentSkillsTab.tsx b/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentSkillsTab.tsx
index a15d1072fbb..9795894e8f0 100644
--- a/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentSkillsTab.tsx
+++ b/packages/twenty-front/src/pages/settings/ai/components/SettingsAgentSkillsTab.tsx
@@ -5,11 +5,12 @@ import { Dropdown } from '@/ui/layout/dropdown/components/Dropdown';
import { DropdownContent } from '@/ui/layout/dropdown/components/DropdownContent';
import { DropdownMenuItemsContainer } from '@/ui/layout/dropdown/components/DropdownMenuItemsContainer';
import { useSortedArray } from '@/ui/layout/table/hooks/useSortedArray';
+import { isAdvancedModeEnabledState } from '@/ui/navigation/navigation-drawer/states/isAdvancedModeEnabledState';
import { useAtomStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomStateValue';
import { styled } from '@linaria/react';
import { useLingui } from '@lingui/react/macro';
import { useMemo, useState } from 'react';
-import { IconArchive } from 'twenty-ui/icon';
+import { IconArchive, IconSettings } from 'twenty-ui/icon';
import { H2Title } from 'twenty-ui/typography';
import { SearchInput } from 'twenty-ui/input';
import { MenuItemSwitch } from 'twenty-ui/navigation';
@@ -42,6 +43,10 @@ export const SettingsAgentSkillsTab = () => {
const [searchTerm, setSearchTerm] = useState('');
const [showDeactivated, setShowDeactivated] = useState(true);
+ const [showSystemSkills, setShowSystemSkills] = useState(true);
+
+ const isAdvancedModeEnabled = useAtomStateValue(isAdvancedModeEnabledState);
+ const shouldShowSystemSkills = isAdvancedModeEnabled && showSystemSkills;
const currentWorkspace = useAtomStateValue(currentWorkspaceState);
const installedApplications = currentWorkspace?.installedApplications;
@@ -85,9 +90,13 @@ export const SettingsAgentSkillsTab = () => {
return false;
}
+ if (skill.isSystem && !shouldShowSystemSkills) {
+ return false;
+ }
+
return true;
}),
- [sortedSkills, searchTerm, showDeactivated],
+ [sortedSkills, searchTerm, showDeactivated, shouldShowSystemSkills],
);
const handleActivate = async (skillId: string) => {
@@ -138,6 +147,15 @@ export const SettingsAgentSkillsTab = () => {
text={t`Deactivated`}
size="sm"
/>
+ {isAdvancedModeEnabled && (
+ <MenuItemSwitch
+ LeftIcon={IconSettings}
+ onCheckedChange={setShowSystemSkills}
+ checked={showSystemSkills}
+ text={t`System skills`}
+ size="sm"
+ />
+ )}
</DropdownMenuItemsContainer>
</DropdownContent>
}
diff --git a/packages/twenty-front/src/pages/settings/ai/components/__tests__/SettingsAgentSkillsTab.test.tsx b/packages/twenty-front/src/pages/settings/ai/components/__tests__/SettingsAgentSkillsTab.test.tsx
index be6e00d4087..763fef0213e 100644
--- a/packages/twenty-front/src/pages/settings/ai/components/__tests__/SettingsAgentSkillsTab.test.tsx
+++ b/packages/twenty-front/src/pages/settings/ai/components/__tests__/SettingsAgentSkillsTab.test.tsx
@@ -10,6 +10,7 @@ import {
} from 'twenty-shared/application';
import { currentWorkspaceState } from '@/auth/states/currentWorkspaceState';
+import { isAdvancedModeEnabledState } from '@/ui/navigation/navigation-drawer/states/isAdvancedModeEnabledState';
import { SOURCE_LOCALE } from 'twenty-shared/translations';
import { messages as frMessages } from '~/locales/generated/fr-FR';
import { FindManySkillsDocument } from '~/generated-metadata/graphql';
@@ -43,11 +44,13 @@ const buildSkill = ({
name,
label,
applicationId,
+ isSystem = false,
}: {
id: string;
name: string;
label: string;
applicationId: string;
+ isSystem?: boolean;
}) => ({
__typename: 'Skill' as const,
id,
@@ -57,6 +60,7 @@ const buildSkill = ({
icon: 'IconBook',
content: 'Some skill content',
isCustom: false,
+ isSystem,
isActive: true,
applicationId,
createdAt: '2026-01-01T00:00:00.000Z',
@@ -77,6 +81,14 @@ const RESEARCH_SKILL = buildSkill({
applicationId: ACME_APPLICATION.id,
});
+const VIEW_BUILDING_SKILL = buildSkill({
+ id: '20202020-2e4f-4b8a-9c1d-5a6b7c8d9e10',
+ name: 'view-building',
+ label: 'View Building',
+ applicationId: STANDARD_APPLICATION.id,
+ isSystem: true,
+});
+
const CUSTOM_SKILL = buildSkill({
id: '20202020-6c5d-4e3f-9a8b-7d6e5f4c3b21',
name: 'quarterly-report',
@@ -84,19 +96,27 @@ const CUSTOM_SKILL = buildSkill({
applicationId: WORKSPACE_CUSTOM_APPLICATION.id,
});
-const renderSkillsTab = () => {
+const renderSkillsTab = ({
+ isAdvancedModeEnabled = false,
+}: { isAdvancedModeEnabled?: boolean } = {}) => {
const Wrapper = getJestMetadataAndApolloMocksWrapper({
apolloMocks: [
{
request: { query: FindManySkillsDocument },
result: {
data: {
- skills: [WORD_DOCUMENTS_SKILL, RESEARCH_SKILL, CUSTOM_SKILL],
+ skills: [
+ WORD_DOCUMENTS_SKILL,
+ RESEARCH_SKILL,
+ VIEW_BUILDING_SKILL,
+ CUSTOM_SKILL,
+ ],
},
},
},
],
onInitializeJotaiStore: (store) => {
+ store.set(isAdvancedModeEnabledState.atom, isAdvancedModeEnabled);
store.set(currentWorkspaceState.atom, {
...mockCurrentWorkspace,
workspaceCustomApplication: WORKSPACE_CUSTOM_APPLICATION,
@@ -164,6 +184,26 @@ describe('SettingsAgentSkillsTab', () => {
expect(screen.queryByText('Research')).not.toBeInTheDocument();
});
+ it('hides system skills, which the agent loads on its own', async () => {
+ renderSkillsTab();
+
+ await screen.findByText('Word Documents');
+
+ expect(screen.queryByText('View Building')).not.toBeInTheDocument();
+ });
+
+ it('shows system skills in advanced mode, and hides them again from the filter', async () => {
+ renderSkillsTab({ isAdvancedModeEnabled: true });
+
+ expect(await screen.findByText('View Building')).toBeInTheDocument();
+
+ await userEvent.click(screen.getByRole('button', { name: 'Filter' }));
+ await userEvent.click(screen.getByText('System skills'));
+
+ expect(screen.queryByText('View Building')).not.toBeInTheDocument();
+ expect(screen.getByText('Word Documents')).toBeInTheDocument();
+ });
+
it('filters skills by application name', async () => {
renderSkillsTab();
diff --git a/packages/twenty-front/src/pages/settings/ai/utils/__tests__/getSettingsSkillInitialFormValues.test.ts b/packages/twenty-front/src/pages/settings/ai/utils/__tests__/getSettingsSkillInitialFormValues.test.ts
index 542f6ce1ba8..ade0c61e81e 100644
--- a/packages/twenty-front/src/pages/settings/ai/utils/__tests__/getSettingsSkillInitialFormValues.test.ts
+++ b/packages/twenty-front/src/pages/settings/ai/utils/__tests__/getSettingsSkillInitialFormValues.test.ts
@@ -9,6 +9,7 @@ const skill = {
icon: 'IconSearch',
content: 'Search the web for the company.',
isCustom: true,
+ isSystem: false,
isActive: true,
createdAt: '2026-01-01T00:00:00.000Z',
updatedAt: '2026-01-01T00:00:00.000Z',
diff --git a/packages/twenty-server/src/database/commands/upgrade-version-command/2-40/2-40-instance-command-fast-1789129759228-add-is-system-to-skill.ts b/packages/twenty-server/src/database/commands/upgrade-version-command/2-40/2-40-instance-command-fast-1789129759228-add-is-system-to-skill.ts
new file mode 100644
index 00000000000..a54f5e265ee
--- /dev/null
+++ b/packages/twenty-server/src/database/commands/upgrade-version-command/2-40/2-40-instance-command-fast-1789129759228-add-is-system-to-skill.ts
@@ -0,0 +1,15 @@
+import { QueryRunner } from 'typeorm';
+
+import { RegisteredInstanceCommand } from 'src/engine/core-modules/upgrade/decorators/registered-instance-command.decorator';
+import { FastInstanceCommand } from 'src/engine/core-modules/upgrade/interfaces/fast-instance-command.interface';
+
+@RegisteredInstanceCommand('2.40.0', 1789129759228)
+export class AddIsSystemToSkillFastInstanceCommand implements FastInstanceCommand {
+ public async up(queryRunner: QueryRunner): Promise<void> {
+ await queryRunner.query('ALTER TABLE "core"."skill" ADD "isSystem" boolean NOT NULL DEFAULT false');
+ }
+
+ public async down(queryRunner: QueryRunner): Promise<void> {
+ await queryRunner.query('ALTER TABLE "core"."skill" DROP COLUMN "isSystem"');
+ }
+}
diff --git a/packages/twenty-server/src/database/commands/upgrade-version-command/2-40/2-40-upgrade-version-command.module.ts b/packages/twenty-server/src/database/commands/upgrade-version-command/2-40/2-40-upgrade-version-command.module.ts
index 98641d8c9a3..edd12c3eace 100644
--- a/packages/twenty-server/src/database/commands/upgrade-version-command/2-40/2-40-upgrade-version-command.module.ts
+++ b/packages/twenty-server/src/database/commands/upgrade-version-command/2-40/2-40-upgrade-version-command.module.ts
@@ -4,6 +4,7 @@ import { WorkspaceIteratorModule } from 'src/database/commands/command-runners/w
import { SyncRecordShareObjectCommand } from 'src/database/commands/upgrade-version-command/2-40/2-40-workspace-command-1788794677636-sync-record-share-object.command';
import { AddMessageCampaignScheduledAtCommand } from 'src/database/commands/upgrade-version-command/2-40/2-40-workspace-command-1788957151735-add-message-campaign-scheduled-at.command';
import { BackfillCoreWorkflowIdOnWorkflowVersionsCommand } from 'src/database/commands/upgrade-version-command/2-40/2-40-workspace-command-1788960408162-backfill-core-workflow-id-on-workflow-versions.command';
+import { ReconcileStandardSkillsCommand } from 'src/database/commands/upgrade-version-command/2-40/2-40-workspace-command-1789129759229-reconcile-standard-skills.command';
import { ApplicationModule } from 'src/engine/core-modules/application/application.module';
import { WorkspaceCacheModule } from 'src/engine/workspace-cache/workspace-cache.module';
import { WorkspaceMigrationRunnerModule } from 'src/engine/workspace-manager/workspace-migration/workspace-migration-runner/workspace-migration-runner.module';
@@ -23,6 +24,7 @@ import { WorkspaceSchemaMigrationRunnerActionHandlersModule } from 'src/engine/w
SyncRecordShareObjectCommand,
AddMessageCampaignScheduledAtCommand,
BackfillCoreWorkflowIdOnWorkflowVersionsCommand,
+ ReconcileStandardSkillsCommand,
],
})
export class V2_40_UpgradeVersionCommandModule {}
diff --git a/packages/twenty-server/src/database/commands/upgrade-version-command/2-40/2-40-workspace-command-1789129759229-reconcile-standard-skills.command.ts b/packages/twenty-server/src/database/commands/upgrade-version-command/2-40/2-40-workspace-command-1789129759229-reconcile-standard-skills.command.ts
new file mode 100644
index 00000000000..f6661ccfd08
--- /dev/null
+++ b/packages/twenty-server/src/database/commands/upgrade-version-command/2-40/2-40-workspace-command-1789129759229-reconcile-standard-skills.command.ts
@@ -0,0 +1,200 @@
+import { Command } from 'nest-commander';
+import { isDefined } from 'twenty-shared/utils';
+
+import { ProvisionedWorkspaceCommandRunner } from 'src/database/commands/command-runners/provisioned-workspace.command-runner';
+import { WorkspaceIteratorService } from 'src/database/commands/command-runners/workspace-iterator.service';
+import { type RunOnWorkspaceArgs } from 'src/database/commands/command-runners/workspace.command-runner';
+import { ApplicationService } from 'src/engine/core-modules/application/application.service';
+import { RegisteredWorkspaceCommand } from 'src/engine/core-modules/upgrade/decorators/registered-workspace-command.decorator';
+import { type FlatSkill } from 'src/engine/metadata-modules/flat-skill/types/flat-skill.type';
+import { WorkspaceCacheService } from 'src/engine/workspace-cache/services/workspace-cache.service';
+import { computeTwentyStandardApplicationAllFlatEntityMaps } from 'src/engine/workspace-manager/twenty-standard-application/utils/twenty-standard-application-all-flat-entity-maps.constant';
+import { WorkspaceMigrationValidateBuildAndRunService } from 'src/engine/workspace-manager/workspace-migration/services/workspace-migration-validate-build-and-run-service';
+
+@RegisteredWorkspaceCommand('2.40.0', 1789129759229)
+@Command({
+ name: 'upgrade:2-40:reconcile-standard-skills',
+ description:
+ 'Reconcile the standard skill catalog in existing workspaces: create the new skills, refresh the catalog-owned fields on existing ones, and delete the skills that left the catalog',
+})
+export class ReconcileStandardSkillsCommand extends ProvisionedWorkspaceCommandRunner {
+ constructor(
+ protected readonly workspaceIteratorService: WorkspaceIteratorService,
+ private readonly applicationService: ApplicationService,
+ private readonly workspaceMigrationValidateBuildAndRunService: WorkspaceMigrationValidateBuildAndRunService,
+ private readonly workspaceCacheService: WorkspaceCacheService,
+ ) {
+ super(workspaceIteratorService);
+ }
+
+ override async runOnWorkspace({
+ workspaceId,
+ options,
+ }: RunOnWorkspaceArgs): Promise<void> {
+ const isDryRun = options.dryRun ?? false;
+
+ const { twentyStandardFlatApplication } =
+ await this.applicationService.findWorkspaceTwentyStandardAndCustomApplicationOrThrow(
+ { workspaceId },
+ );
+
+ const { flatSkillMaps: existingFlatSkillMaps } =
+ await this.workspaceCacheService.getOrRecompute(workspaceId, [
+ 'flatSkillMaps',
+ ]);
+
+ const { allFlatEntityMaps: standardAllFlatEntityMaps } =
+ computeTwentyStandardApplicationAllFlatEntityMaps({
+ now: new Date().toISOString(),
+ workspaceId,
+ twentyStandardApplicationId: twentyStandardFlatApplication.id,
+ });
+
+ const standardSkills = Object.values(
+ standardAllFlatEntityMaps.flatSkillMaps.byUniversalIdentifier,
+ ).filter(isDefined);
+
+ const existingSkills = Object.values(
+ existingFlatSkillMaps.byUniversalIdentifier,
+ ).filter(isDefined);
+
+ const standardSkillUniversalIdentifiers = new Set(
+ standardSkills.map((standardSkill) => standardSkill.universalIdentifier),
+ );
+
+ const skillsToDelete = existingSkills.filter(
+ (existingSkill) =>
+ existingSkill.applicationId === twentyStandardFlatApplication.id &&
+ !standardSkillUniversalIdentifiers.has(
+ existingSkill.universalIdentifier,
+ ),
+ );
+
+ const universalIdentifiersToDelete = new Set(
+ skillsToDelete.map((skillToDelete) => skillToDelete.universalIdentifier),
+ );
+
+ // Skill names are unique per workspace whatever their isActive state, and
+ // one rejected create fails the whole migration — which would cost this
+ // workspace the isSystem flip and the deletions too
+ const takenNames = new Set(
+ existingSkills
+ .filter(
+ (existingSkill) =>
+ !universalIdentifiersToDelete.has(existingSkill.universalIdentifier),
+ )
+ .map((existingSkill) => existingSkill.name),
+ );
+
+ const missingSkills = standardSkills.filter(
+ (standardSkill) =>
+ !isDefined(
+ existingFlatSkillMaps.byUniversalIdentifier[
+ standardSkill.universalIdentifier
+ ],
+ ),
+ );
+
+ const skillsToCreate = missingSkills.filter(
+ (missingSkill) => !takenNames.has(missingSkill.name),
+ );
+
+ const skillsSkippedForNameClash = missingSkills.filter((missingSkill) =>
+ takenNames.has(missingSkill.name),
+ );
+
+ if (skillsSkippedForNameClash.length > 0) {
+ this.logger.warn(
+ `Workspace ${workspaceId} already has a skill named ${skillsSkippedForNameClash.map((skill) => skill.name).join(', ')}; skipping ${skillsSkippedForNameClash.length === 1 ? 'that standard skill' : 'those standard skills'}`,
+ );
+ }
+
+ const skillsToUpdate = standardSkills.reduce<FlatSkill[]>(
+ (accumulator, standardSkill) => {
+ const existingSkill =
+ existingFlatSkillMaps.byUniversalIdentifier[
+ standardSkill.universalIdentifier
+ ];
+
+ if (!isDefined(existingSkill)) {
+ return accumulator;
+ }
+
+ const hasCatalogChange =
+ existingSkill.isSystem !== standardSkill.isSystem ||
+ existingSkill.label !== standardSkill.label ||
+ existingSkill.description !== standardSkill.description ||
+ existingSkill.icon !== standardSkill.icon ||
+ existingSkill.content !== standardSkill.content;
+
+ if (!hasCatalogChange) {
+ return accumulator;
+ }
+
+ // isActive is the user's call, so the catalog refresh must not
+ // reactivate a skill someone deliberately turned off
+ accumulator.push({
+ ...existingSkill,
+ isSystem: standardSkill.isSystem,
+ label: standardSkill.label,
+ description: standardSkill.description,
+ icon: standardSkill.icon,
+ content: standardSkill.content,
+ });
+
+ return accumulator;
+ },
+ [],
+ );
+
+ if (
+ skillsToCreate.length === 0 &&
+ skillsToUpdate.length === 0 &&
+ skillsToDelete.length === 0
+ ) {
+ this.logger.log(
+ `Standard skills already up to date for workspace ${workspaceId}, skipping`,
+ );
+
+ return;
+ }
+
+ this.logger.log(
+ `${isDryRun ? '[DRY RUN] ' : ''}Workspace ${workspaceId}: creating ${skillsToCreate.length}, updating ${skillsToUpdate.length}, deleting ${skillsToDelete.length} standard skill(s)`,
+ );
+
+ if (isDryRun) {
+ return;
+ }
+
+ const validateAndBuildResult =
+ await this.workspaceMigrationValidateBuildAndRunService.validateBuildAndRunLegacyWorkspaceMigration(
+ {
+ allFlatEntityOperationByMetadataName: {
+ skill: {
+ flatEntityToCreate: skillsToCreate,
+ flatEntityToDelete: skillsToDelete,
+ flatEntityToUpdate: skillsToUpdate,
+ },
+ },
+ workspaceId,
+ applicationUniversalIdentifier:
+ twentyStandardFlatApplication.universalIdentifier,
+ },
+ );
+
+ if (validateAndBuildResult.status === 'fail') {
+ this.logger.error(
+ `Failed to reconcile standard skills:\n${JSON.stringify(validateAndBuildResult, null, 2)}`,
+ );
+
+ throw new Error(
+ `Failed to reconcile standard skills for workspace ${workspaceId}`,
+ );
+ }
+
+ this.logger.log(
+ `Successfully reconciled standard skills for workspace ${workspaceId}`,
+ );
+ }
+}
diff --git a/packages/twenty-server/src/database/commands/upgrade-version-command/2-40/__tests__/2-40-workspace-command-1789129759229-reconcile-standard-skills.command.spec.ts b/packages/twenty-server/src/database/commands/upgrade-version-command/2-40/__tests__/2-40-workspace-command-1789129759229-reconcile-standard-skills.command.spec.ts
new file mode 100644
index 00000000000..3760cab4f94
--- /dev/null
+++ b/packages/twenty-server/src/database/commands/upgrade-version-command/2-40/__tests__/2-40-workspace-command-1789129759229-reconcile-standard-skills.command.spec.ts
@@ -0,0 +1,257 @@
+import { isDefined } from 'twenty-shared/utils';
+
+import { type WorkspaceIteratorService } from 'src/database/commands/command-runners/workspace-iterator.service';
+import { ReconcileStandardSkillsCommand } from 'src/database/commands/upgrade-version-command/2-40/2-40-workspace-command-1789129759229-reconcile-standard-skills.command';
+import { type ApplicationService } from 'src/engine/core-modules/application/application.service';
+import { type WorkspaceCacheService } from 'src/engine/workspace-cache/services/workspace-cache.service';
+import { computeTwentyStandardApplicationAllFlatEntityMaps } from 'src/engine/workspace-manager/twenty-standard-application/utils/twenty-standard-application-all-flat-entity-maps.constant';
+import { type WorkspaceMigrationValidateBuildAndRunService } from 'src/engine/workspace-manager/workspace-migration/services/workspace-migration-validate-build-and-run-service';
+
+const WORKSPACE_ID = '20202020-0000-0000-0000-000000000001';
+const STANDARD_APPLICATION_ID = '20202020-0000-0000-0000-0000000000a1';
+const OTHER_APPLICATION_ID = '20202020-0000-0000-0000-0000000000b2';
+
+const buildExistingSkill = ({
+ universalIdentifier,
+ applicationId = STANDARD_APPLICATION_ID,
+ isSystem = false,
+ isActive = true,
+ content = 'content',
+ name,
+}: {
+ universalIdentifier: string;
+ applicationId?: string;
+ isSystem?: boolean;
+ isActive?: boolean;
+ content?: string;
+ name?: string;
+}) => ({
+ id: `id-${universalIdentifier}`,
+ universalIdentifier,
+ applicationId,
+ workspaceId: WORKSPACE_ID,
+ name: name ?? `name-${universalIdentifier}`,
+ label: `label-${universalIdentifier}`,
+ description: 'description',
+ icon: 'IconBook',
+ content,
+ isCustom: false,
+ isSystem,
+ isActive,
+});
+
+const setup = ({
+ existingSkills,
+}: {
+ existingSkills: ReturnType<typeof buildExistingSkill>[];
+}) => {
+ const validateBuildAndRunLegacyWorkspaceMigration = jest
+ .fn()
+ .mockResolvedValue({ status: 'success' });
+
+ const command = new ReconcileStandardSkillsCommand(
+ {} as WorkspaceIteratorService,
+ {
+ findWorkspaceTwentyStandardAndCustomApplicationOrThrow: jest
+ .fn()
+ .mockResolvedValue({
+ twentyStandardFlatApplication: {
+ id: STANDARD_APPLICATION_ID,
+ universalIdentifier: 'twenty-standard-universal-identifier',
+ },
+ }),
+ } as unknown as ApplicationService,
+ {
+ validateBuildAndRunLegacyWorkspaceMigration,
+ } as unknown as WorkspaceMigrationValidateBuildAndRunService,
+ {
+ getOrRecompute: jest.fn().mockResolvedValue({
+ flatSkillMaps: {
+ byUniversalIdentifier: Object.fromEntries(
+ existingSkills.map((skill) => [skill.universalIdentifier, skill]),
+ ),
+ },
+ }),
+ } as unknown as WorkspaceCacheService,
+ );
+
+ return { command, validateBuildAndRunLegacyWorkspaceMigration };
+};
+
+const runAndGetSkillOperation = async (
+ existingSkills: ReturnType<typeof buildExistingSkill>[],
+) => {
+ const { command, validateBuildAndRunLegacyWorkspaceMigration } = setup({
+ existingSkills,
+ });
+
+ await command.runOnWorkspace({
+ workspaceId: WORKSPACE_ID,
+ options: {},
+ } as Parameters<typeof command.runOnWorkspace>[0]);
+
+ if (validateBuildAndRunLegacyWorkspaceMigration.mock.calls.length === 0) {
+ return undefined;
+ }
+
+ return validateBuildAndRunLegacyWorkspaceMigration.mock.calls[0][0]
+ .allFlatEntityOperationByMetadataName.skill;
+};
+
+const buildStandardFlatSkills = () =>
+ Object.values(
+ computeTwentyStandardApplicationAllFlatEntityMaps({
+ now: new Date().toISOString(),
+ workspaceId: WORKSPACE_ID,
+ twentyStandardApplicationId: STANDARD_APPLICATION_ID,
+ }).allFlatEntityMaps.flatSkillMaps.byUniversalIdentifier,
+ ).filter(isDefined);
+
+// The catalog these tests reconcile against is the real one, so they stay
+// honest when skills are added to or removed from it.
+const RETIRED_SKILL_UNIVERSAL_IDENTIFIER =
+ '20202020-6b44-417e-a31f-5560b59d300a';
+const VIEW_BUILDING_UNIVERSAL_IDENTIFIER =
+ '20202020-e4a2-4b3f-9c71-d8f6a2b51e3a';
+
+describe('ReconcileStandardSkillsCommand', () => {
+ it('creates the standard skills the workspace does not have yet', async () => {
+ const skillOperation = await runAndGetSkillOperation([]);
+
+ expect(
+ skillOperation?.flatEntityToCreate.map(
+ (skill: { name: string }) => skill.name,
+ ),
+ ).toEqual(
+ expect.arrayContaining([
+ 'enrich',
+ 'meeting-prep',
+ 'deal-review',
+ 'crm-hygiene',
+ ]),
+ );
+ });
+
+ it('deletes a standard skill that left the catalog', async () => {
+ const skillOperation = await runAndGetSkillOperation([
+ buildExistingSkill({
+ universalIdentifier: RETIRED_SKILL_UNIVERSAL_IDENTIFIER,
+ }),
+ ]);
+
+ expect(
+ skillOperation?.flatEntityToDelete.map(
+ (skill: { universalIdentifier: string }) => skill.universalIdentifier,
+ ),
+ ).toEqual([RETIRED_SKILL_UNIVERSAL_IDENTIFIER]);
+ });
+
+ it('leaves skills owned by another application alone', async () => {
+ const skillOperation = await runAndGetSkillOperation([
+ buildExistingSkill({
+ universalIdentifier: RETIRED_SKILL_UNIVERSAL_IDENTIFIER,
+ applicationId: OTHER_APPLICATION_ID,
+ }),
+ ]);
+
+ expect(skillOperation?.flatEntityToDelete).toEqual([]);
+ });
+
+ it('flips isSystem on an existing skill without reactivating it', async () => {
+ const skillOperation = await runAndGetSkillOperation([
+ buildExistingSkill({
+ universalIdentifier: VIEW_BUILDING_UNIVERSAL_IDENTIFIER,
+ isSystem: false,
+ isActive: false,
+ }),
+ ]);
+
+ const updatedSkill = skillOperation?.flatEntityToUpdate.find(
+ (skill: { universalIdentifier: string }) =>
+ skill.universalIdentifier === VIEW_BUILDING_UNIVERSAL_IDENTIFIER,
+ );
+
+ expect(updatedSkill?.isSystem).toBe(true);
+ expect(updatedSkill?.isActive).toBe(false);
+ expect(updatedSkill?.id).toBe(
+ `id-${VIEW_BUILDING_UNIVERSAL_IDENTIFIER}`,
+ );
+ });
+
+ it('queues no migration when the workspace already matches the catalog', async () => {
+ const alreadyMatchingSkills = buildStandardFlatSkills().map((skill) => ({
+ ...skill,
+ applicationId: STANDARD_APPLICATION_ID,
+ }));
+
+ const { command, validateBuildAndRunLegacyWorkspaceMigration } = setup({
+ existingSkills:
+ alreadyMatchingSkills as unknown as ReturnType<
+ typeof buildExistingSkill
+ >[],
+ });
+
+ await command.runOnWorkspace({
+ workspaceId: WORKSPACE_ID,
+ options: {},
+ } as Parameters<typeof command.runOnWorkspace>[0]);
+
+ expect(validateBuildAndRunLegacyWorkspaceMigration).not.toHaveBeenCalled();
+ });
+
+ it('skips a create whose name a custom skill already took, and still flips isSystem', async () => {
+ const skillOperation = await runAndGetSkillOperation([
+ buildExistingSkill({
+ universalIdentifier: '20202020-0000-0000-0000-00000000c0de',
+ applicationId: OTHER_APPLICATION_ID,
+ name: 'enrich',
+ }),
+ buildExistingSkill({
+ universalIdentifier: VIEW_BUILDING_UNIVERSAL_IDENTIFIER,
+ isSystem: false,
+ }),
+ ]);
+
+ const createdNames = skillOperation?.flatEntityToCreate.map(
+ (skill: { name: string }) => skill.name,
+ );
+
+ expect(createdNames).not.toContain('enrich');
+ expect(createdNames).toContain('meeting-prep');
+
+ const updatedSkill = skillOperation?.flatEntityToUpdate.find(
+ (skill: { universalIdentifier: string }) =>
+ skill.universalIdentifier === VIEW_BUILDING_UNIVERSAL_IDENTIFIER,
+ );
+
+ expect(updatedSkill?.isSystem).toBe(true);
+ });
+
+ it('still creates a standard skill whose name is only held by a skill being deleted', async () => {
+ const skillOperation = await runAndGetSkillOperation([
+ buildExistingSkill({
+ universalIdentifier: RETIRED_SKILL_UNIVERSAL_IDENTIFIER,
+ name: 'enrich',
+ }),
+ ]);
+
+ expect(
+ skillOperation?.flatEntityToCreate.map(
+ (skill: { name: string }) => skill.name,
+ ),
+ ).toContain('enrich');
+ });
+
+ it('skips the migration entirely in dry run', async () => {
+ const { command, validateBuildAndRunLegacyWorkspaceMigration } = setup({
+ existingSkills: [],
+ });
+
+ await command.runOnWorkspace({
+ workspaceId: WORKSPACE_ID,
+ options: { dryRun: true },
+ } as Parameters<typeof command.runOnWorkspace>[0]);
+
+ expect(validateBuildAndRunLegacyWorkspaceMigration).not.toHaveBeenCalled();
+ });
+});
diff --git a/packages/twenty-server/src/database/commands/upgrade-version-command/2-40/add-is-system-to-skill-upgrade-command-name.constant.ts b/packages/twenty-server/src/database/commands/upgrade-version-command/2-40/add-is-system-to-skill-upgrade-command-name.constant.ts
new file mode 100644
index 00000000000..e61bc1d2205
--- /dev/null
+++ b/packages/twenty-server/src/database/commands/upgrade-version-command/2-40/add-is-system-to-skill-upgrade-command-name.constant.ts
@@ -0,0 +1,2 @@
+export const ADD_IS_SYSTEM_TO_SKILL_UPGRADE_COMMAND_NAME =
+ '2.40.0_AddIsSystemToSkillFastInstanceCommand_1789129759228';
diff --git a/packages/twenty-server/src/database/commands/upgrade-version-command/instance-commands.constant.ts b/packages/twenty-server/src/database/commands/upgrade-version-command/instance-commands.constant.ts
index 42324609eb8..7f4b045e5c5 100644
--- a/packages/twenty-server/src/database/commands/upgrade-version-command/instance-commands.constant.ts
+++ b/packages/twenty-server/src/database/commands/upgrade-version-command/instance-commands.constant.ts
@@ -186,6 +186,7 @@ import { BackfillIsAuditLoggedOnPositionFieldMetadataSlowInstanceCommand } from
import { AddCoreWorkflowIdToWorkflowVersionFastInstanceCommand } from 'src/database/commands/upgrade-version-command/2-40/2-40-instance-command-fast-1788960408161-add-core-workflow-id-to-workflow-version';
import { AddAiModelTiersToWorkspaceFastInstanceCommand } from 'src/database/commands/upgrade-version-command/2-40/2-40-instance-command-fast-1789000000000-add-ai-model-tiers-to-workspace';
import { MigrateWorkspaceModelsToTiersSlowInstanceCommand } from 'src/database/commands/upgrade-version-command/2-40/2-40-instance-command-slow-1789000000001-migrate-workspace-models-to-tiers';
+import { AddIsSystemToSkillFastInstanceCommand } from 'src/database/commands/upgrade-version-command/2-40/2-40-instance-command-fast-1789129759228-add-is-system-to-skill';
export const INSTANCE_COMMANDS = [
AddViewFieldGroupIdIndexOnViewFieldFastInstanceCommand,
@@ -374,4 +375,5 @@ export const INSTANCE_COMMANDS = [
AddCoreWorkflowIdToWorkflowVersionFastInstanceCommand,
AddAiModelTiersToWorkspaceFastInstanceCommand,
MigrateWorkspaceModelsToTiersSlowInstanceCommand,
+ AddIsSystemToSkillFastInstanceCommand,
];
diff --git a/packages/twenty-server/src/engine/core-modules/application/application-manifest/converters/from-skill-manifest-to-universal-flat-skill.util.ts b/packages/twenty-server/src/engine/core-modules/application/application-manifest/converters/from-skill-manifest-to-universal-flat-skill.util.ts
index 9c757fc12b7..81e32552e75 100644
--- a/packages/twenty-server/src/engine/core-modules/application/application-manifest/converters/from-skill-manifest-to-universal-flat-skill.util.ts
+++ b/packages/twenty-server/src/engine/core-modules/application/application-manifest/converters/from-skill-manifest-to-universal-flat-skill.util.ts
@@ -20,6 +20,7 @@ export const fromSkillManifestToUniversalFlatSkill = ({
description: skillManifest.description ?? null,
content: skillManifest.content,
isCustom: false,
+ isSystem: false,
isActive: true,
createdAt: now,
updatedAt: now,
diff --git a/packages/twenty-server/src/engine/metadata-modules/flat-entity/constant/__tests__/__snapshots__/all-universal-flat-entity-properties-to-compare-and-stringify.constant.spec.ts.snap b/packages/twenty-server/src/engine/metadata-modules/flat-entity/constant/__tests__/__snapshots__/all-universal-flat-entity-properties-to-compare-and-stringify.constant.spec.ts.snap
index 5793b203944..ade73005b1e 100644
--- a/packages/twenty-server/src/engine/metadata-modules/flat-entity/constant/__tests__/__snapshots__/all-universal-flat-entity-properties-to-compare-and-stringify.constant.spec.ts.snap
+++ b/packages/twenty-server/src/engine/metadata-modules/flat-entity/constant/__tests__/__snapshots__/all-universal-flat-entity-properties-to-compare-and-stringify.constant.spec.ts.snap
@@ -337,6 +337,7 @@ exports[`ALL_UNIVERSAL_FLAT_ENTITY_PROPERTIES_TO_COMPARE_AND_STRINGIFY should ma
"description",
"content",
"isActive",
+ "isSystem",
],
"propertiesToStringify": [],
},
diff --git a/packages/twenty-server/src/engine/metadata-modules/flat-entity/constant/all-entity-properties-configuration-by-metadata-name.constant.ts b/packages/twenty-server/src/engine/metadata-modules/flat-entity/constant/all-entity-properties-configuration-by-metadata-name.constant.ts
index a00a1c4d119..72ff984f652 100644
--- a/packages/twenty-server/src/engine/metadata-modules/flat-entity/constant/all-entity-properties-configuration-by-metadata-name.constant.ts
+++ b/packages/twenty-server/src/engine/metadata-modules/flat-entity/constant/all-entity-properties-configuration-by-metadata-name.constant.ts
@@ -1194,6 +1194,11 @@ export const ALL_ENTITY_PROPERTIES_CONFIGURATION_BY_METADATA_NAME = {
toStringify: false,
universalProperty: undefined,
},
+ isSystem: {
+ toCompare: true,
+ toStringify: false,
+ universalProperty: undefined,
+ },
isCustom: {
toCompare: false,
toStringify: false,
diff --git a/packages/twenty-server/src/engine/metadata-modules/flat-skill/utils/from-create-skill-input-to-flat-skill-to-create.util.ts b/packages/twenty-server/src/engine/metadata-modules/flat-skill/utils/from-create-skill-input-to-flat-skill-to-create.util.ts
index 3177c28ab98..a91c449a40b 100644
--- a/packages/twenty-server/src/engine/metadata-modules/flat-skill/utils/from-create-skill-input-to-flat-skill-to-create.util.ts
+++ b/packages/twenty-server/src/engine/metadata-modules/flat-skill/utils/from-create-skill-input-to-flat-skill-to-create.util.ts
@@ -34,6 +34,7 @@ export const fromCreateSkillInputToUniversalFlatSkillToCreate = ({
description: description ?? null,
content,
isCustom: true,
+ isSystem: false,
isActive: true,
createdAt: now,
updatedAt: now,
diff --git a/packages/twenty-server/src/engine/metadata-modules/flat-skill/utils/from-flat-skill-to-skill-dto.util.ts b/packages/twenty-server/src/engine/metadata-modules/flat-skill/utils/from-flat-skill-to-skill-dto.util.ts
index d7fa015d5cc..76d75fdd925 100644
--- a/packages/twenty-server/src/engine/metadata-modules/flat-skill/utils/from-flat-skill-to-skill-dto.util.ts
+++ b/packages/twenty-server/src/engine/metadata-modules/flat-skill/utils/from-flat-skill-to-skill-dto.util.ts
@@ -9,6 +9,7 @@ export const fromFlatSkillToSkillDto = (flatSkill: FlatSkill): SkillDTO => ({
description: flatSkill.description ?? undefined,
content: flatSkill.content,
isCustom: flatSkill.isCustom,
+ isSystem: flatSkill.isSystem,
isActive: flatSkill.isActive,
workspaceId: flatSkill.workspaceId,
applicationId: flatSkill.applicationId ?? undefined,
diff --git a/packages/twenty-server/src/engine/metadata-modules/skill/dtos/skill.dto.ts b/packages/twenty-server/src/engine/metadata-modules/skill/dtos/skill.dto.ts
index 0580d7f5075..75186a3a49b 100644
--- a/packages/twenty-server/src/engine/metadata-modules/skill/dtos/skill.dto.ts
+++ b/packages/twenty-server/src/engine/metadata-modules/skill/dtos/skill.dto.ts
@@ -42,6 +42,10 @@ export class SkillDTO {
@Field()
isCustom: boolean;
+ @IsBoolean()
+ @Field()
+ isSystem: boolean;
+
@IsBoolean()
@Field()
isActive: boolean;
diff --git a/packages/twenty-server/src/engine/metadata-modules/skill/entities/skill.entity.ts b/packages/twenty-server/src/engine/metadata-modules/skill/entities/skill.entity.ts
index dc841fe1e1e..9fca49a9d5f 100644
--- a/packages/twenty-server/src/engine/metadata-modules/skill/entities/skill.entity.ts
+++ b/packages/twenty-server/src/engine/metadata-modules/skill/entities/skill.entity.ts
@@ -7,6 +7,8 @@ import {
UpdateDateColumn,
} from 'typeorm';
+import { ADD_IS_SYSTEM_TO_SKILL_UPGRADE_COMMAND_NAME } from 'src/database/commands/upgrade-version-command/2-40/add-is-system-to-skill-upgrade-command-name.constant';
+import { WasIntroducedInUpgrade } from 'src/engine/core-modules/upgrade/decorators/was-introduced-in-upgrade.decorator';
import { SyncableEntity } from 'src/engine/workspace-manager/types/syncable-entity.interface';
@Entity('skill')
@@ -40,6 +42,12 @@ export class SkillEntity
@Column({ default: false })
isCustom: boolean;
+ @WasIntroducedInUpgrade({
+ upgradeCommandName: ADD_IS_SYSTEM_TO_SKILL_UPGRADE_COMMAND_NAME,
+ })
+ @Column({ default: false })
+ isSystem: boolean;
+
@Column({ default: true })
isActive: boolean;
diff --git a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/constants/standard-skill.constant.ts b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/constants/standard-skill.constant.ts
index 5d341b26a9d..509aaef6f23 100644
--- a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/constants/standard-skill.constant.ts
+++ b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/constants/standard-skill.constant.ts
@@ -11,9 +11,6 @@ export const STANDARD_SKILL = {
'metadata-building': {
universalIdentifier: '20202020-7b80-4a14-8fb9-d1512b89c078',
},
- research: {
- universalIdentifier: '20202020-6b44-417e-a31f-5560b59d300a',
- },
'code-interpreter': {
universalIdentifier: '20202020-a97a-4069-8e44-fc18faea7b97',
},
@@ -35,15 +32,21 @@ export const STANDARD_SKILL = {
'view-building': {
universalIdentifier: '20202020-e4a2-4b3f-9c71-d8f6a2b51e3a',
},
- 'view-filters-and-sorts': {
- universalIdentifier: '20202020-f5b3-4c4e-8d82-e9a7b3c62f4b',
- },
- 'custom-objects-cleanup': {
- universalIdentifier: '20202020-a1d3-4e5f-b6c7-8d9e0f1a2b3c',
- },
roles: {
universalIdentifier: '20202020-3f7c-4d21-9e58-a4b6c8d05e17',
},
+ 'meeting-prep': {
+ universalIdentifier: '20202020-5e21-4b07-9c3a-1d4f6e8a0b52',
+ },
+ 'deal-review': {
+ universalIdentifier: '20202020-7c44-4f19-8a6d-3b9e2c5f7d81',
+ },
+ 'crm-hygiene': {
+ universalIdentifier: '20202020-9a63-4d82-b5e7-6f1c8d3a4e20',
+ },
+ enrich: {
+ universalIdentifier: '20202020-2f85-4a6c-91b3-8e7d0c2b5f49',
+ },
} as const satisfies Record<
string,
{
diff --git a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/skill-metadata/create-standard-flat-skill-metadata.util.ts b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/skill-metadata/create-standard-flat-skill-metadata.util.ts
index dfe59364de7..ef303006f7e 100644
--- a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/skill-metadata/create-standard-flat-skill-metadata.util.ts
+++ b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/skill-metadata/create-standard-flat-skill-metadata.util.ts
@@ -14,7 +14,7 @@ export const STANDARD_FLAT_SKILL_METADATA_BUILDERS_BY_SKILL_NAME = {
name: 'workflow-building',
label: 'Workflow Building',
description:
- 'Creating and managing automation workflows with triggers and steps',
+ 'Use when the user wants something to happen automatically: creating, changing, debugging or deleting a workflow, or phrasing a rule as when X happens do Y',
icon: 'IconSettingsAutomation',
content: `# Workflow Building Skill
@@ -129,6 +129,7 @@ Do NOT call \`validate_workflow\` after every change:
Prioritize user understanding and workflow effectiveness.`,
isCustom: false,
+ isSystem: true,
},
}),
@@ -140,7 +141,7 @@ Prioritize user understanding and workflow effectiveness.`,
name: 'data-manipulation',
label: 'Data Manipulation',
description:
- 'Searching, filtering, creating, and updating records across all objects',
+ 'Use when finding, filtering, creating, updating or importing records, and whenever a request needs sorting or touches more than a handful of rows',
icon: 'IconDatabase',
content: `# Data Manipulation Skill
@@ -258,6 +259,7 @@ Every tool round-trip re-sends the ENTIRE conversation (system prompt, loaded sk
Prioritize data integrity and provide clear feedback on operations performed.`,
isCustom: false,
+ isSystem: true,
},
}),
@@ -269,7 +271,7 @@ Prioritize data integrity and provide clear feedback on operations performed.`,
name: 'workspace-demo-seeding',
label: 'Workspace Demo Seeding',
description:
- 'Seeding demo metadata and data for workspace setup and testing purposes',
+ 'Use only when explicitly asked to fill a workspace with demonstration data for a given industry',
icon: 'IconDatabase',
content: `# Workspace Demo Seeding Skill
You will transform the existing standard workspace into a fully custom demo tailored to the user's business type.
@@ -313,7 +315,7 @@ STEP 0: Present a plan to the user and wait for approval.
- The custom fields you will add to People, Companies, and Opportunities
- A brief description of the key relations between objects
- Present this plan to the user and *wait for their confirmation or adjustments* before proceeding
-- Once approved, call the custom-objects-cleanup skill to archive all existing custom objects without asking for user confirmation
+- Once approved, archive every existing custom object without asking for further confirmation: call get_object_metadata, keep the objects where isCustom is true, then set isActive to false on all of them in a single update_many_object_metadata call
- Wait 3 seconds after deletions for the backend side effects to be completed
STEP 1: Create all the custom objects at once with create_many_object_metadata
@@ -401,6 +403,7 @@ Navigate to each view after creating it. Wait 3 seconds.
Loop STEP 8 for all the custom objects
`,
isCustom: false,
+ isSystem: true,
},
}),
@@ -412,7 +415,7 @@ Loop STEP 8 for all the custom objects
name: 'dashboard-building',
label: 'Dashboard Building',
description:
- 'Creating and managing dashboards with widgets and layouts',
+ 'Use when the user asks for a dashboard, a chart, a metric tile or a report page, or wants to change one that exists',
icon: 'IconLayoutDashboard',
content: `# Dashboard Building Skill
@@ -558,6 +561,7 @@ After creating a tab, use its returned tabId as pageLayoutTabId when calling add
- When modifying a chart, confirm whether the user wants to change settings or change chart type
- Use RECORD_TABLE widgets to give users direct access to filtered record lists without leaving the dashboard`,
isCustom: false,
+ isSystem: true,
},
}),
@@ -569,7 +573,7 @@ After creating a tab, use its returned tabId as pageLayoutTabId when calling add
name: 'metadata-building',
label: 'Metadata Building',
description:
- 'Managing the data model: creating objects, fields, and relations',
+ 'Use when the data model itself changes: adding or editing objects, fields, relations or select options',
icon: 'IconBuildingSkyscraper',
content: `# Metadata Building Skill
@@ -638,46 +642,7 @@ You help users manage their workspace data model by creating, updating, and orga
Prioritize data model integrity and user understanding.`,
isCustom: false,
- },
- }),
-
- research: (args: Omit<CreateStandardSkillArgs, 'context'>) =>
- createStandardSkillFlatMetadata({
- ...args,
- context: {
- skillName: 'research',
- name: 'research',
- label: 'Research',
- description: 'Finding information and gathering facts from the web',
- icon: 'IconSearch',
- content: `# Research Skill
-
-You find information and gather facts from the web.
-
-## Capabilities
-
-- Search for current information and facts
-- Research companies, people, technologies, trends
-- Gather competitive intelligence and market data
-- Find contact details and verify information
-
-## Research Strategy
-
-- Try multiple search queries from different angles
-- If initial searches fail, use alternative search terms
-- Cross-reference information when possible
-- Cite sources and provide context
-
-## Present Findings
-
-- Be thorough but concise
-- Organize information logically
-- Distinguish facts from speculation
-- Note if information might be outdated
-- Include relevant sources
-
-Be persistent in finding accurate information.`,
- isCustom: false,
+ isSystem: true,
},
}),
@@ -689,7 +654,7 @@ Be persistent in finding accurate information.`,
name: 'code-interpreter',
label: 'Code Interpreter',
description:
- 'Python code execution for data analysis, complex multi-step operations, and efficient bulk processing via MCP bridge',
+ 'Use for Python over data the record tools cannot express: statistics, chart images, parsing an uploaded file. Do not use it for ordinary record reads and writes',
icon: 'IconCode',
content: `# Code Interpreter Skill
@@ -843,6 +808,7 @@ company_ids = twenty.lookup_by('companies', 'name', ['Acme', 'Globex'])
For importing CSV/Excel/spreadsheet data, load the \`data-manipulation\` skill for the full recipe.`,
isCustom: false,
+ isSystem: true,
},
}),
@@ -854,7 +820,7 @@ For importing CSV/Excel/spreadsheet data, load the \`data-manipulation\` skill f
name: 'xlsx',
label: 'Excel & Spreadsheets',
description:
- 'Excel/spreadsheet creation, editing, and analysis with formulas, formatting, and visualization',
+ 'Use whenever a spreadsheet is the input or the output, including formulas, formatting, charts and CSV conversion',
icon: 'IconFileSpreadsheet',
content: `# Excel Processing Skill
@@ -980,6 +946,7 @@ If errors found, fix them and recalculate again.
| Add formula | openpyxl | \`sheet['B2'] = '=SUM(A1:A10)'\` |
| Recalculate | script | \`python /home/user/scripts/xlsx/recalc.py file.xlsx\` |`,
isCustom: false,
+ isSystem: true,
},
}),
@@ -991,7 +958,7 @@ If errors found, fix them and recalculate again.
name: 'pdf',
label: 'PDF Processing',
description:
- 'PDF form filling, field extraction, table parsing, and validation',
+ 'Use whenever a PDF is involved: reading text or tables, filling a form, creating, merging or splitting one',
icon: 'IconFileTypePdf',
content: `# PDF Processing Skill
@@ -1117,6 +1084,7 @@ writer.write('/home/user/output/page1.pdf')
| Create PDF | reportlab | \`canvas.Canvas('out.pdf')\` |
| Merge PDFs | PyPDF2 | \`PdfMerger()\` |`,
isCustom: false,
+ isSystem: true,
},
}),
@@ -1128,7 +1096,7 @@ writer.write('/home/user/output/page1.pdf')
name: 'docx',
label: 'Word Documents',
description:
- 'Word document creation, editing, template processing, and OOXML manipulation',
+ 'Use whenever a Word document is the input or the output, including templates, styles and tracked changes',
icon: 'IconFileTypeDocx',
content: `# Word Document Processing Skill
@@ -1275,6 +1243,7 @@ para.paragraph_format.space_after = Pt(12)
| Repack | script | \`python pack.py ./out/ doc.docx\` |
| Validate | script | \`python validate.py doc.docx\` |`,
isCustom: false,
+ isSystem: true,
},
}),
@@ -1286,11 +1255,11 @@ para.paragraph_format.space_after = Pt(12)
name: 'view-building',
label: 'View Building',
description:
- 'Creating and configuring views (table, board/kanban, calendar) for objects to organize and visualize records',
+ 'Use when creating or changing a view of any type, table, kanban or calendar, including the columns, filters, sorts and grouping on it',
icon: 'IconLayoutBoard',
content: `# View Building Skill
-You help users create and configure views to organize how they see their records.
+You help users create and configure views, and the filters and sorts that decide which records those views show.
## View Types
@@ -1361,40 +1330,6 @@ Example: { "objectNameSingular": "opportunity", "type": "KANBAN", "name": "Pipel
- This creates collapsible sections in the table, organized by the grouping field values
- Works with SELECT fields for categorical grouping
-## Approach
-
-- If the user is vague (e.g., "create a board"), ask which object they want to see
-- Suggest the most relevant view type based on the object's fields
-- After creating a view, always configure useful view fields and navigate to it
-- Explain what each view type does so users can make informed choices`,
- isCustom: false,
- },
- }),
-
- 'view-filters-and-sorts': (args: Omit<CreateStandardSkillArgs, 'context'>) =>
- createStandardSkillFlatMetadata({
- ...args,
- context: {
- skillName: 'view-filters-and-sorts',
- name: 'view-filters-and-sorts',
- label: 'View Filters & Sorts',
- description:
- 'Adding filters and sorts to views to focus on relevant records based on user needs',
- icon: 'IconFilter',
- content: `# View Filters & Sorts Skill
-
-You help users add filters and sorts to their views so they see the most relevant records.
-
-## Tools
-
-- get_views - List existing views to find the one to modify
-- get_view_query_parameters - Check existing filters and sorts on a view
-- get_field_metadata - Discover fields and their types to build valid filters
-- **upsert_complete_view** - Replace ALL of a view's filters and/or sorts in one call (pass \`id\` + the desired \`filters\`/\`sorts\` arrays, referencing fields by name). Prefer this when setting the full filter/sort set at once.
-- create_view_filter / create_many_view_filters - Add individual filters to a view (use for surgical single-filter edits)
-- create_view_sort / create_many_view_sorts - Add individual sorts to a view (use for surgical single-sort edits)
-- navigate_app - Navigate to the view to show results
-
## Filter Operators by Field Type
| Field Type | Available Operators |
@@ -1408,139 +1343,45 @@ You help users add filters and sorts to their views so they see the most relevan
| RELATION | IS, IS_NOT, IS_EMPTY, IS_NOT_EMPTY |
| BOOLEAN | IS |
-## Sort Directions
-
-- ASC: Ascending (A→Z, 0→9, oldest→newest)
-- DESC: Descending (Z→A, 9→0, newest→oldest)
-
-## Filter Groups (AND/OR/NOT)
-
-Filters can be grouped with logical operators:
-- **AND**: All filters must match (default)
-- **OR**: At least one filter must match
-- **NOT**: Negate the group
-- Groups can be nested for complex conditions like: name CONTAINS "tech" AND (revenue > 1M OR employees > 100)
-
-## Workflow
-
-1. **Identify the view**: If the user didn't specify a view, ask which view they want to filter/sort. Use get_views to list available views and present them.
-
-2. **Understand the need**: If the user hasn't described what they want to see, ask them. Give guidance with examples:
- - "What records do you want to focus on? For example:"
- - "Show only high-value opportunities (amount > $50K)"
- - "Show companies in a specific city or industry"
- - "Show tasks due this week, sorted by priority"
- - "Show people from a specific company"
- - "Show recent records created in the last 30 days"
-
-3. **Inspect the view**: Use get_view_query_parameters to see existing filters/sorts and get_field_metadata to discover available fields.
-
-4. **Build filters**: Based on the user's need, determine:
- - Which field(s) to filter on
- - Which operator is valid for that field type (see table above)
- - What value to filter by
- - Whether to use AND or OR grouping for multiple filters
+Using an operator the field type does not support will fail, so check the type first.
-5. **Build sorts**: Determine:
- - Which field to sort by (most relevant to the user's goal)
- - Direction: ASC or DESC
- - Multiple sorts can be added (primary, secondary, etc.)
+## Sorts and Filter Groups
-6. **Apply and navigate**: Create the filters/sorts on the view and navigate to it.
+- Directions are ASC (A to Z, oldest first) and DESC (Z to A, newest first).
+- Filters combine with AND by default; OR and NOT are available, and groups nest for conditions like name CONTAINS "tech" AND (revenue above 1M OR employees above 100).
+- \`upsert_complete_view\` replaces the whole filter or sort array, so pass the end state you want rather than editing entries one by one.
## Common Filter Patterns
-### By Time
-- Recent records: DATE_TIME field + IS_AFTER + a date value
-- Upcoming deadlines: DATE field + IS_IN_FUTURE
-- Overdue tasks: DATE field + IS_IN_PAST + status IS_NOT "DONE"
-- This week/month: DATE field + IS_RELATIVE
-
-### By Status/Stage
-- Open opportunities: stage IS "IN_PROGRESS" or IS_NOT "WON"/"LOST"
-- Active tasks: status IS_NOT "DONE"
-
-### By Relationship
-- Records linked to a company: company relation IS [specific company]
-- Unassigned tasks: assignee IS_EMPTY
-- Orphaned records: relation field IS_EMPTY
-
-### By Value
-- High-value deals: amount GREATER_THAN_OR_EQUAL threshold
-- Large companies: employees GREATER_THAN_OR_EQUAL threshold
+- Overdue work: a DATE field IS_IN_PAST combined with status IS_NOT done
+- Upcoming deadlines: a DATE field IS_IN_FUTURE
+- Recent activity: updatedAt or createdAt IS_AFTER a date
+- Open pipeline: stage IS_NOT the won and lost values
+- Unassigned or orphaned records: a relation field IS_EMPTY
+- High value: amount GREATER_THAN_OR_EQUAL a threshold
## Common Sort Patterns
-- Pipeline view: Sort by amount DESC (biggest deals first)
-- Task management: Sort by dueAt ASC (earliest due first)
-- Recent activity: Sort by updatedAt DESC or createdAt DESC
-- Alphabetical: Sort by name ASC
+- Pipeline boards sort by amount DESC, so the biggest deals read first
+- Task lists sort by dueAt ASC, so the most urgent reads first
+- Activity lists sort by updatedAt DESC
## Composite Fields
-Some fields have sub-fields that can be filtered:
-- CURRENCY: Use subFieldName "amountMicros" for the numeric value
-- ADDRESS: Use subFieldName like "addressCity", "addressCountry"
-- FULL_NAME: Use subFieldName like "firstName", "lastName"
-- EMAILS: Use the primary email
-- LINKS: Use the primary link URL
-
-## Approach
-
-- Always check field types before suggesting operators — using an invalid operator for a field type will fail
-- When the user says "show me X", translate that into the appropriate filter logic
-- Suggest sorts that complement the filters (e.g., if filtering overdue tasks, sort by dueAt ASC)
-- Explain what the filters do so users understand the results
-- If complex filtering is needed (AND + OR), explain the logic clearly`,
- isCustom: false,
- },
- }),
-
- 'custom-objects-cleanup': (args: Omit<CreateStandardSkillArgs, 'context'>) =>
- createStandardSkillFlatMetadata({
- ...args,
- context: {
- skillName: 'custom-objects-cleanup',
- name: 'custom-objects-cleanup',
- label: 'Custom Objects Cleanup',
- description:
- 'Archiving custom objects from a workspace (e.g. dev seed objects like pets, rockets)',
- icon: 'IconArchive',
- content: `# Custom Objects Cleanup Skill
-
-You help users archive custom objects from their workspace, such as objects created by the dev seed (pets, rockets, survey results, etc.) or any other custom objects.
-
-## Tools
-
-- get_object_metadata - List all objects in the workspace to identify custom ones
-- update_many_object_metadata - Archive custom objects by setting isActive to false
-
-## Workflow
-
-1. **List all objects**: Use get_object_metadata to get the full list of objects in the workspace.
-
-2. **Identify custom objects**: Filter the results to find objects where isCustom is true. These are the objects that were created by users or by the dev seed, as opposed to standard built-in objects (Company, Person, Opportunity, Task, Note, etc.).
-
-3. **Present findings**: Tell the user which custom objects were found. If none are found, inform the user that the workspace has no custom objects.
-
-4. **Confirm before archiving**: List the custom objects you found and ask the user to confirm which ones they want to archive. Present them clearly with their name, label, and description.
-
-5. **Archive confirmed objects**: Use update_many_object_metadata to set isActive to false on all confirmed objects in a single batch call.
-
-6. **Report results**: After archiving is complete, summarize what was archived.
-
-## Important Notes
-
-- Only objects with isCustom = true can be archived. Standard objects cannot be archived through this skill.
-- Archiving an object hides it from the workspace but does not delete its fields, relations, or records.
-- When called directly by a user, confirm before archiving. When called by another skill (e.g. workspace-demo-seeding), proceed without confirmation.
+Some fields carry sub-fields you filter on directly:
+- CURRENCY uses subFieldName "amountMicros" for the numeric value
+- ADDRESS uses sub-fields such as "addressCity" and "addressCountry"
+- FULL_NAME uses "firstName" and "lastName"
+- EMAILS and LINKS filter on the primary entry
## Approach
-- Be clear about what will be archived and that it is reversible
-- If an object has relations to other objects, mention this before archiving
-- Archive all confirmed objects in a single batch call using update_many_object_metadata`,
+- If the user is vague (e.g., "create a board"), ask which object they want to see
+- Suggest the most relevant view type based on the object's fields
+- After creating a view, always configure useful view fields and navigate to it
+- Explain what each view type does so users can make informed choices`,
isCustom: false,
+ isSystem: true,
},
}),
@@ -1552,7 +1393,7 @@ You help users archive custom objects from their workspace, such as objects crea
name: 'pptx',
label: 'PowerPoint',
description:
- 'PowerPoint creation, editing, templates, thumbnails, and slide manipulation',
+ 'Use whenever a PowerPoint deck is the input or the output, including slides, templates, tables and charts',
icon: 'IconPresentation',
content: `# PowerPoint Processing Skill
@@ -1717,6 +1558,7 @@ python /home/user/scripts/pptx/replace.py input.pptx '{"{{company}}": "Acme Corp
| Reorder slides | script | \`python rearrange.py pres.pptx '[2,1,3]' out.pptx\` |
| Find/replace | script | \`python replace.py pres.pptx '{...}' out.pptx\` |`,
isCustom: false,
+ isSystem: true,
},
}),
@@ -1728,7 +1570,7 @@ python /home/user/scripts/pptx/replace.py input.pptx '{"{{company}}": "Acme Corp
name: 'roles',
label: 'Roles',
description:
- 'Managing roles and permissions: who can read, edit and delete what',
+ 'Use when the user asks who can see or change what: creating a role, editing permissions, or assigning a role to someone',
icon: 'IconLockAccess',
content: `# Roles Skill
@@ -1817,6 +1659,197 @@ When the user names a person, resolve them to a workspace member first and resta
Report what changed in plain terms: which role, what it can now do, and who is affected. If you changed overrides, restate the objects that are still overridden so the user can see nothing was dropped.`,
isCustom: false,
+ isSystem: true,
+ },
+ }),
+
+ 'meeting-prep': (args: Omit<CreateStandardSkillArgs, 'context'>) =>
+ createStandardSkillFlatMetadata({
+ ...args,
+ context: {
+ skillName: 'meeting-prep',
+ name: 'meeting-prep',
+ label: 'Meeting Prep',
+ description:
+ 'Use before a call or a meeting, and whenever the user asks who am I talking to, brief me on this account, or what do I need to know before this conversation',
+ icon: 'IconCalendarEvent',
+ content: `# Meeting Prep Skill
+
+Produce a brief the user can read in under a minute before they talk to someone.
+
+## Gather
+
+Start from the person or company the user named, or the record they are looking at. Then pull what hangs off it, filtering by the relation rather than scanning whole objects:
+
+- Who they are: role, company, and how long the record has existed
+- Open opportunities on that company, with stage, amount and close date
+- The most recent notes, tasks and timeline activities
+- Recent messages and calendar events they took part in
+
+If the person belongs to a company, read the company too. Deals and history usually live there rather than on the individual.
+
+## Produce
+
+Write it in this order, and stop when you run out of real material:
+
+1. One line on who they are and why this conversation matters now
+2. Open deals, with stage and amount, or a line saying there are none
+3. What happened last: the most recent exchange and what was agreed
+4. What changed since then, including anything overdue or unanswered
+5. Three questions worth asking, each drawn from something above
+
+Reference every record you name so the user can click through to it.
+
+## Rules
+
+- Never invent history. If contact has been quiet, say exactly how long.
+- This skill only reads. Do not create or update anything.
+- If the user has not said who the meeting is with, ask before gathering.
+- Keep it short. A brief nobody finishes is a brief nobody uses.`,
+ isCustom: false,
+ isSystem: false,
+ },
+ }),
+
+ 'deal-review': (args: Omit<CreateStandardSkillArgs, 'context'>) =>
+ createStandardSkillFlatMetadata({
+ ...args,
+ context: {
+ skillName: 'deal-review',
+ name: 'deal-review',
+ label: 'Deal Review',
+ description:
+ 'Use when the user asks how a deal is doing, which deals are at risk, what is stuck or going quiet, or asks for a pipeline review',
+ icon: 'IconTargetArrow',
+ content: `# Deal Review Skill
+
+Judge the health of one opportunity or a set of them, and say what to do next.
+
+## Gather
+
+For each opportunity in scope, read the record and what is linked to it: the company, the people involved, notes, tasks, and recent messages and calendar events. Use group_by_opportunities when the question is about the shape of the pipeline rather than about individual deals.
+
+## Signals
+
+Work through these for every deal. Each one you can answer becomes a line in the output:
+
+- **Momentum.** How long has it sat in its current stage, and how does that compare with the rest of the pipeline?
+- **Contact.** When did anyone last exchange a message or meet? Silence against an approaching close date is the strongest warning sign there is.
+- **Threading.** How many distinct people at that company have been in contact? A deal running through one person is a deal that dies when that person leaves.
+- **Hygiene.** Is the close date set, already past, or implausible? Is the amount missing?
+- **Commitments.** Are there open or overdue tasks, and who owns them?
+
+## Produce
+
+For a single deal, write a short verdict, the evidence behind it, and one concrete next step.
+
+For several, lead with the deals that need attention, one line each, then summarise the rest. Sort by risk rather than by size, and reference every opportunity so the user can open it.
+
+Say which signals you could not evaluate and why. A review that hides its gaps is worse than a short one.
+
+## Rules
+
+- This skill only reads. Propose the next step and let the user ask you to create the task.
+- Never call a deal at risk without naming the signal that says so.
+- Never guess at an amount or a date that is missing. Report it as missing.`,
+ isCustom: false,
+ isSystem: false,
+ },
+ }),
+
+ 'crm-hygiene': (args: Omit<CreateStandardSkillArgs, 'context'>) =>
+ createStandardSkillFlatMetadata({
+ ...args,
+ context: {
+ skillName: 'crm-hygiene',
+ name: 'crm-hygiene',
+ label: 'CRM Hygiene',
+ description:
+ 'Use when the user asks to clean up the CRM, find duplicates, fill in missing fields, or asks why the data is messy or which records are stale',
+ icon: 'IconListCheck',
+ content: `# CRM Hygiene Skill
+
+Audit records for problems, show the user what you found, and fix only what they approve.
+
+## Audit
+
+Ask which object to audit if the user has not said. Then look for these, in this order:
+
+- **Duplicates.** Read the object's duplicateCriteria from its metadata and search on those fields. Two companies sharing a domain, or two people sharing an email, are the reliable cases.
+- **Missing fields.** Identify the fields that make a record useful for that object, then count how many records leave them empty.
+- **Stale records.** Records untouched for a long time, especially opportunities whose close date has passed while they are still open.
+- **Broken links.** Records whose expected relation is empty, such as a person with no company or a deal with no contact.
+
+Use group_by_* to count rather than reading every record, then fetch only the rows you intend to show.
+
+## Report
+
+Lead with counts, so the user sees the shape of the problem before the detail. Then list the worst cases, referencing each record. Say which fix you propose for each group and what it would change.
+
+## Fix
+
+Always confirm before writing. Show what you will change and wait.
+
+- You cannot merge records. There is no merge tool; merging happens in the UI, where the user selects the records and uses the Merge action. Report each duplicate pair with both records referenced and leave the merge to them.
+- Fill missing fields only from data already in the workspace, never from a guess.
+- Apply approved changes in one call rather than one record at a time. These tools carry the object's plural name: update_many_people, upsert_many_companies, and so on. Use update_many_* when every matched record gets the same value, upsert_many_* when each record needs its own.
+- Report what changed afterwards, and say what you deliberately left alone.
+
+## Rules
+
+- Never delete a record in this skill, and never fake a merge by copying fields across and deleting the loser.
+- Never confirm on the user's behalf, and never read a general yes as approval for a second batch.
+- If there is nothing wrong, say so. A clean workspace is a valid result.`,
+ isCustom: false,
+ isSystem: false,
+ },
+ }),
+
+ enrich: (args: Omit<CreateStandardSkillArgs, 'context'>) =>
+ createStandardSkillFlatMetadata({
+ ...args,
+ context: {
+ skillName: 'enrich',
+ name: 'enrich',
+ label: 'Enrich',
+ description:
+ 'Use when the user asks to research or enrich a company or a person, fill in what the CRM does not know about them, or find out what a company actually does',
+ icon: 'IconSearch',
+ content: `# Enrich Skill
+
+Find what the workspace does not know about a company or a person, and offer it back as field updates.
+
+## Search
+
+Use app_exa_web_search with its category set deliberately. It is preloaded, so call it directly without looking it up first. If it is not available, say the workspace has no web search rather than guessing at answers.
+
+- Set category to "company" for an organisation: what it does, size, funding, headquarters, recent news.
+- Set category to "people" for an individual: current role, employer, background.
+- Set category to "news" when the user asks what changed rather than who they are.
+
+Start from what the record already holds. A domain makes a far better query than a company name, and a name plus an employer beats a name alone. Run several narrow searches rather than one broad one, and stop as soon as the field you were filling is answered.
+
+## Reconcile
+
+Read the record first and enrich only what is empty or clearly wrong. Overwriting a value a human typed is the fastest way to lose their trust in this feature.
+
+Keep the source for every fact. State plainly which facts came from the web and which were already in the workspace.
+
+## Produce
+
+Show a short table of proposed changes: the field, what it holds now, what you propose, and where it came from. Then ask before writing.
+
+After approval, apply the changes in a single update call and confirm what was written.
+
+Anything you found that has no field to live in belongs in a note on the record, not squeezed into an unrelated field.
+
+## Rules
+
+- Never invent a value to fill a gap. An empty field beats a wrong one.
+- Confidence matters: if the search returned a different person who shares the name, say so and stop.
+- Do not enrich a large set of records unless the user asked for exactly that, and confirm the scope before you start.`,
+ isCustom: false,
+ isSystem: false,
},
}),
} satisfies {
diff --git a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/skill-metadata/create-standard-skill-flat-metadata.util.ts b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/skill-metadata/create-standard-skill-flat-metadata.util.ts
index 65b848cb87e..7f37a96ac83 100644
--- a/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/skill-metadata/create-standard-skill-flat-metadata.util.ts
+++ b/packages/twenty-server/src/engine/workspace-manager/twenty-standard-application/utils/skill-metadata/create-standard-skill-flat-metadata.util.ts
@@ -14,6 +14,7 @@ export type CreateStandardSkillContext = {
description: string | null;
content: string;
isCustom: boolean;
+ isSystem: boolean;
isActive?: boolean;
};
@@ -30,6 +31,7 @@ export const createStandardSkillFlatMetadata = ({
description,
content,
isCustom,
+ isSystem,
isActive = true,
},
workspaceId,
@@ -47,6 +49,7 @@ export const createStandardSkillFlatMetadata = ({
description,
content,
isCustom,
+ isSystem,
isActive,
workspaceId,
applicationId: twentyStandardApplicationId,
diff --git a/packages/twenty-server/test/integration/metadata/suites/application/__snapshots__/successful-sync-application-workspace-migration.integration-spec.ts.snap b/packages/twenty-server/test/integration/metadata/suites/application/__snapshots__/successful-sync-application-workspace-migration.integration-spec.ts.snap
index d3ddd63e9ae..9704875f8c9 100644
--- a/packages/twenty-server/test/integration/metadata/suites/application/__snapshots__/successful-sync-application-workspace-migration.integration-spec.ts.snap
+++ b/packages/twenty-server/test/integration/metadata/suites/application/__snapshots__/successful-sync-application-workspace-migration.integration-spec.ts.snap
@@ -2864,6 +2864,7 @@ This is a test skill.",
"icon": "IconBrain",
"isActive": true,
"isCustom": false,
+ "isSystem": false,
"label": "Test Skill",
"name": "test-skill",
"universalIdentifier": Any<String>,