Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 3.8k
feat(ashby): add 15 new tools and fix existing tool accuracy#3662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
9df3f91db6856c231786b3ee0ecd0ded698d7034f4File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Uh oh!
There was an error while loading. Please reload this page.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| import type { ToolConfig, ToolResponse } from '@/tools/types' | ||
| interface AshbyAddCandidateTagParams { | ||
| apiKey: string | ||
| candidateId: string | ||
| tagId: string | ||
| } | ||
| interface AshbyAddCandidateTagResponse extends ToolResponse { | ||
| output: { | ||
| success: boolean | ||
| } | ||
| } | ||
| export const addCandidateTagTool: ToolConfig< | ||
| AshbyAddCandidateTagParams, | ||
| AshbyAddCandidateTagResponse | ||
| > = { | ||
| id: 'ashby_add_candidate_tag', | ||
| name: 'Ashby Add Candidate Tag', | ||
| description: 'Adds a tag to a candidate in Ashby.', | ||
| version: '1.0.0', | ||
| params: { | ||
| apiKey: { | ||
| type: 'string', | ||
| required: true, | ||
| visibility: 'user-only', | ||
| description: 'Ashby API Key', | ||
| }, | ||
| candidateId: { | ||
| type: 'string', | ||
| required: true, | ||
| visibility: 'user-or-llm', | ||
| description: 'The UUID of the candidate to add the tag to', | ||
| }, | ||
| tagId: { | ||
| type: 'string', | ||
| required: true, | ||
| visibility: 'user-or-llm', | ||
| description: 'The UUID of the tag to add', | ||
| }, | ||
| }, | ||
| request: { | ||
| url: 'https://api.ashbyhq.com/candidate.addTag', | ||
| method: 'POST', | ||
| headers: (params) => ({ | ||
| 'Content-Type': 'application/json', | ||
| Authorization: `Basic ${btoa(`${params.apiKey}:`)}`, | ||
| }), | ||
| body: (params) => ({ | ||
| candidateId: params.candidateId, | ||
| tagId: params.tagId, | ||
| }), | ||
| }, | ||
| transformResponse: async (response: Response) => { | ||
| const data = await response.json() | ||
| if (!data.success) { | ||
| throw new Error(data.errorInfo?.message || 'Failed to add tag to candidate') | ||
| } | ||
| return { | ||
| success: true, | ||
| output: { | ||
| success: true, | ||
| }, | ||
| } | ||
| }, | ||
| outputs: { | ||
| success: { type: 'boolean', description: 'Whether the tag was successfully added' }, | ||
| }, | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,94 @@ | ||
| import type { ToolConfig, ToolResponse } from '@/tools/types' | ||
| interface AshbyChangeApplicationStageParams { | ||
| apiKey: string | ||
| applicationId: string | ||
| interviewStageId: string | ||
| archiveReasonId?: string | ||
| } | ||
| interface AshbyChangeApplicationStageResponse extends ToolResponse { | ||
| output: { | ||
| applicationId: string | ||
| stageId: string | null | ||
| } | ||
| } | ||
| export const changeApplicationStageTool: ToolConfig< | ||
| AshbyChangeApplicationStageParams, | ||
| AshbyChangeApplicationStageResponse | ||
| > = { | ||
| id: 'ashby_change_application_stage', | ||
| name: 'Ashby Change Application Stage', | ||
| description: | ||
| 'Moves an application to a different interview stage. Requires an archive reason when moving to an Archived stage.', | ||
| version: '1.0.0', | ||
| params: { | ||
| apiKey: { | ||
| type: 'string', | ||
| required: true, | ||
| visibility: 'user-only', | ||
| description: 'Ashby API Key', | ||
| }, | ||
| applicationId: { | ||
| type: 'string', | ||
| required: true, | ||
| visibility: 'user-or-llm', | ||
| description: 'The UUID of the application to update the stage of', | ||
| }, | ||
| interviewStageId: { | ||
| type: 'string', | ||
| required: true, | ||
| visibility: 'user-or-llm', | ||
| description: 'The UUID of the interview stage to move the application to', | ||
| }, | ||
| archiveReasonId: { | ||
| type: 'string', | ||
| required: false, | ||
| visibility: 'user-or-llm', | ||
| description: | ||
| 'Archive reason UUID. Required when moving to an Archived stage, ignored otherwise', | ||
| }, | ||
| }, | ||
| request: { | ||
| url: 'https://api.ashbyhq.com/application.changeStage', | ||
| method: 'POST', | ||
| headers: (params) => ({ | ||
| 'Content-Type': 'application/json', | ||
| Authorization: `Basic ${btoa(`${params.apiKey}:`)}`, | ||
| }), | ||
| body: (params) => { | ||
| const body: Record<string, unknown> = { | ||
| applicationId: params.applicationId, | ||
| interviewStageId: params.interviewStageId, | ||
| } | ||
| if (params.archiveReasonId) body.archiveReasonId = params.archiveReasonId | ||
| return body | ||
| }, | ||
| }, | ||
| transformResponse: async (response: Response) => { | ||
| const data = await response.json() | ||
| if (!data.success) { | ||
| throw new Error(data.errorInfo?.message || 'Failed to change application stage') | ||
| } | ||
| const r = data.results | ||
| return { | ||
| success: true, | ||
| output: { | ||
| applicationId: r.id ?? null, | ||
| stageId: r.currentInterviewStage?.id ?? null, | ||
| }, | ||
| } | ||
| }, | ||
| outputs: { | ||
| applicationId: { type: 'string', description: 'Application UUID' }, | ||
| stageId: { type: 'string', description: 'New interview stage UUID' }, | ||
| }, | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -13,27 +13,7 @@ interface AshbyCreateApplicationParams { | ||
| interface AshbyCreateApplicationResponse extends ToolResponse { | ||
| output: { | ||
| id: string | ||
| status: string | ||
| candidate: { | ||
| id: string | ||
| name: string | ||
| } | ||
| job: { | ||
| id: string | ||
| title: string | ||
| } | ||
| currentInterviewStage: { | ||
| id: string | ||
| title: string | ||
| type: string | ||
| } | null | ||
| source: { | ||
| id: string | ||
| title: string | ||
| } | null | ||
| createdAt: string | ||
| updatedAt: string | ||
| applicationId: string | ||
| } | ||
| } | ||
| @@ -132,74 +112,12 @@ export const createApplicationTool: ToolConfig< | ||
| return { | ||
| success: true, | ||
| output: { | ||
| id: r.id ?? null, | ||
| status: r.status ?? null, | ||
| candidate: { | ||
| id: r.candidate?.id ?? null, | ||
| name: r.candidate?.name ?? null, | ||
| }, | ||
| job: { | ||
| id: r.job?.id ?? null, | ||
| title: r.job?.title ?? null, | ||
| }, | ||
| currentInterviewStage: r.currentInterviewStage | ||
| ? { | ||
| id: r.currentInterviewStage.id ?? null, | ||
| title: r.currentInterviewStage.title ?? null, | ||
| type: r.currentInterviewStage.type ?? null, | ||
| } | ||
| : null, | ||
| source: r.source | ||
| ? { | ||
| id: r.source.id ?? null, | ||
| title: r.source.title ?? null, | ||
| } | ||
| : null, | ||
| createdAt: r.createdAt ?? null, | ||
| updatedAt: r.updatedAt ?? null, | ||
| applicationId: r.applicationId ?? null, | ||
waleedlatif1 marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| }, | ||
greptile-apps[bot] marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| } | ||
| }, | ||
| outputs: { | ||
| id: { type: 'string', description: 'Created application UUID' }, | ||
| status: { type: 'string', description: 'Application status (Active, Hired, Archived, Lead)' }, | ||
| candidate: { | ||
| type: 'object', | ||
| description: 'Associated candidate', | ||
| properties: { | ||
| id: { type: 'string', description: 'Candidate UUID' }, | ||
| name: { type: 'string', description: 'Candidate name' }, | ||
| }, | ||
| }, | ||
| job: { | ||
| type: 'object', | ||
| description: 'Associated job', | ||
| properties: { | ||
| id: { type: 'string', description: 'Job UUID' }, | ||
| title: { type: 'string', description: 'Job title' }, | ||
| }, | ||
| }, | ||
| currentInterviewStage: { | ||
| type: 'object', | ||
| description: 'Current interview stage', | ||
| optional: true, | ||
| properties: { | ||
| id: { type: 'string', description: 'Stage UUID' }, | ||
| title: { type: 'string', description: 'Stage title' }, | ||
| type: { type: 'string', description: 'Stage type' }, | ||
| }, | ||
| }, | ||
| source: { | ||
| type: 'object', | ||
| description: 'Application source', | ||
| optional: true, | ||
| properties: { | ||
| id: { type: 'string', description: 'Source UUID' }, | ||
| title: { type: 'string', description: 'Source title' }, | ||
| }, | ||
| }, | ||
| createdAt: { type: 'string', description: 'ISO 8601 creation timestamp' }, | ||
| updatedAt: { type: 'string', description: 'ISO 8601 last update timestamp' }, | ||
| applicationId: { type: 'string', description: 'Created application UUID' }, | ||
| }, | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -30,7 +30,7 @@ export const getCandidateTool: ToolConfig<AshbyGetCandidateParams, AshbyGetCandi | ||
| Authorization: `Basic ${btoa(`${params.apiKey}:`)}`, | ||
| }), | ||
greptile-apps[bot] marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| body: (params) => ({ | ||
| candidateId: params.candidateId, | ||
| candidateId: params.candidateId.trim(), | ||
| }), | ||
| }, | ||
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.