Skip to content

Commit 9256559

Browse files
committed
chore(search-experts): sync the Assistant tool contract copy, drop a stray doc line, regenerate after staging
1 parent 3574693 commit 9256559

3 files changed

Lines changed: 39 additions & 2 deletions

File tree

‎apps/sim/lib/api/contracts/mothership-assistant-tools.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,6 @@ export const listMyChatHistoryInputSchema = z
574574
.strict()
575575
export type ListMyChatHistoryInput = z.output<typeof listMyChatHistoryInputSchema>
576576

577-
/** The longest activity window an expert search reads. */
578577
/** Who knows a topic, ranked by what they did on matching items the caller can read. */
579578
export const searchExpertsInputSchema = z
580579
.object({

‎apps/sim/lib/mothership/generated/sim-assistant-tools.generated.ts‎

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -597,6 +597,38 @@ export const listMyChatHistoryInputSchema = z
597597
.strict()
598598
export type ListMyChatHistoryInput = z.output<typeof listMyChatHistoryInputSchema>
599599

600+
/** Who knows a topic, ranked by what they did on matching items the caller can read. */
601+
export const searchExpertsInputSchema = z
602+
.object({
603+
query: z
604+
.string()
605+
.trim()
606+
.min(1)
607+
.max(500)
608+
.describe('The topic, system, customer or project to find people for.'),
609+
source: workspaceSearchFiltersSchema.shape.source.describe(
610+
'Only this source, such as jira, confluence, google_drive, slack, gitlab or github.'
611+
),
612+
startDate: z.iso
613+
.datetime({ offset: true })
614+
.optional()
615+
.describe(
616+
`Inclusive start of the activity window, an ISO datetime with offset. With endDate, at most ${MAX_ACTIVITY_WINDOW_DAYS} days; without either, all time, with recent work weighted higher.`
617+
),
618+
endDate: z.iso
619+
.datetime({ offset: true })
620+
.optional()
621+
.describe('Exclusive end of the activity window, an ISO datetime with offset.'),
622+
department: peopleFieldFilter('Only experts whose directory department contains this text.'),
623+
location: peopleFieldFilter('Only experts whose directory location contains this text.'),
624+
topK: z.number().int().min(1).max(25).default(10).describe('Maximum experts to return.'),
625+
})
626+
.strict()
627+
.superRefine(refineActivityWindow)
628+
629+
export const SEARCH_EXPERTS_DESCRIPTION =
630+
'Find who in this organization knows a topic: people ranked by what they did on matching items you can read (Jira issues assigned or reported, Confluence pages written or edited, Drive files owned or edited, Slack messages, GitLab and GitHub merge and pull requests, Linear issues). Each expert comes with a score, their directory profile when they are in it, what they did by source, and evidence links to the items. Only items your own access returns count. Narrow with source, a date window, department or location.'
631+
600632
/** Connection requests name a provider and optionally an owned account to repair. */
601633
export const oauthGetAuthLinkInputSchema = z.object({
602634
providerName: z
@@ -681,6 +713,12 @@ export const assistantToolContracts = [
681713
'List what you did across your connected sources in a date window, newest first: Slack messages and Gmail mail you sent (replied when the message answers another), Google Calendar meetings you organized or accepted, Jira issues you created or that were assigned to you, Confluence pages you created or edited and comments you wrote. Each item has a documentId for read_document. Follow nextCursor for more; a source that failed and recovers on a later page can return entries older than that page. sources reports each source: not_connected and reconnect carry the provider to connect with oauth_get_auth_link.',
682714
inputSchema: listMyActivityInputSchema,
683715
},
716+
{
717+
id: 'search_experts',
718+
route: 'sim',
719+
description: SEARCH_EXPERTS_DESCRIPTION,
720+
inputSchema: searchExpertsInputSchema,
721+
},
684722
{
685723
id: 'oauth_get_auth_link',
686724
route: 'sim',

‎apps/sim/tools/generated/tool-outputs.ts‎

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)