From 2f6bd28260bb900aad522be2bebb3e9b8285cd6c Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sat, 28 Feb 2026 11:11:17 -0800 Subject: [PATCH] improvement(ashby): validate ashby integration and update skill files --- .claude/commands/add-tools.md | 2 +- .claude/commands/validate-integration.md | 5 +---- apps/sim/blocks/blocks/ashby.ts | 28 +++++++++++++++++++----- apps/sim/blocks/registry.ts | 2 +- apps/sim/tools/ashby/index.ts | 2 ++ apps/sim/tools/registry.ts | 18 +++++++-------- 6 files changed, 37 insertions(+), 20 deletions(-) diff --git a/.claude/commands/add-tools.md b/.claude/commands/add-tools.md index d5dc9b5afd..fb7bfdc55d 100644 --- a/.claude/commands/add-tools.md +++ b/.claude/commands/add-tools.md @@ -318,4 +318,4 @@ After creating all tools, you MUST validate every tool before finishing: 3. **Verify consistency** across tools: - Shared types in `types.ts` match all tools that use them - Tool IDs in the barrel export match the tool file definitions - - Error handling is consistent (logger imports, error checks) + - Error handling is consistent (error checks, meaningful messages) diff --git a/.claude/commands/validate-integration.md b/.claude/commands/validate-integration.md index 4b6a1158d3..77091b2b9d 100644 --- a/.claude/commands/validate-integration.md +++ b/.claude/commands/validate-integration.md @@ -79,7 +79,6 @@ For **every** tool file, check: - [ ] All nullable fields use `?? null` - [ ] All optional arrays use `?? []` - [ ] Error cases are handled: checks for missing/empty data and returns meaningful error -- [ ] `createLogger` is imported from `@sim/logger` and used for error logging - [ ] Does NOT do raw JSON dumps — extracts meaningful, individual fields ### Outputs @@ -216,8 +215,6 @@ If any tools support pagination: ## Step 7: Validate Error Handling -- [ ] Every tool imports `createLogger` from `@sim/logger` -- [ ] Every tool creates a logger: `const logger = createLogger('{ToolName}')` - [ ] `transformResponse` checks for error conditions before accessing data - [ ] Error responses include meaningful messages (not just generic "failed") - [ ] HTTP error status codes are handled (check `response.ok` or status codes) @@ -278,7 +275,7 @@ After fixing, confirm: - [ ] Validated block outputs match what tools return, with typed JSON where possible - [ ] Validated OAuth scopes alignment across auth.ts, oauth.ts, block, and modal (if OAuth) - [ ] Validated pagination consistency across tools and block -- [ ] Validated error handling (logger, error checks, meaningful messages) +- [ ] Validated error handling (error checks, meaningful messages) - [ ] Validated registry entries (tools and block, alphabetical, correct imports) - [ ] Reported all issues grouped by severity - [ ] Fixed all critical and warning issues diff --git a/apps/sim/blocks/blocks/ashby.ts b/apps/sim/blocks/blocks/ashby.ts index f1edc6e9ba..642ffc866d 100644 --- a/apps/sim/blocks/blocks/ashby.ts +++ b/apps/sim/blocks/blocks/ashby.ts @@ -444,11 +444,29 @@ Output only the ISO 8601 timestamp string, nothing else.`, }, outputs: { - candidates: { type: 'json', description: 'List of candidates' }, - jobs: { type: 'json', description: 'List of jobs' }, - applications: { type: 'json', description: 'List of applications' }, - notes: { type: 'json', description: 'List of notes' }, - offers: { type: 'json', description: 'List of offers' }, + candidates: { + type: 'json', + description: + 'List of candidates (id, name, primaryEmailAddress, primaryPhoneNumber, createdAt, updatedAt)', + }, + jobs: { + type: 'json', + description: + 'List of jobs (id, title, status, employmentType, departmentId, locationId, createdAt, updatedAt)', + }, + applications: { + type: 'json', + description: + 'List of applications (id, status, candidate, job, currentInterviewStage, source, createdAt, updatedAt)', + }, + notes: { + type: 'json', + description: 'List of notes (id, content, author, createdAt)', + }, + offers: { + type: 'json', + description: 'List of offers (id, status, candidate, job, createdAt, updatedAt)', + }, id: { type: 'string', description: 'Resource UUID' }, name: { type: 'string', description: 'Resource name' }, title: { type: 'string', description: 'Job title' }, diff --git a/apps/sim/blocks/registry.ts b/apps/sim/blocks/registry.ts index 3b423aad70..b65005b316 100644 --- a/apps/sim/blocks/registry.ts +++ b/apps/sim/blocks/registry.ts @@ -198,8 +198,8 @@ export const registry: Record = { apify: ApifyBlock, apollo: ApolloBlock, arxiv: ArxivBlock, - ashby: AshbyBlock, asana: AsanaBlock, + ashby: AshbyBlock, attio: AttioBlock, browser_use: BrowserUseBlock, calcom: CalComBlock, diff --git a/apps/sim/tools/ashby/index.ts b/apps/sim/tools/ashby/index.ts index 5a27818923..99a37ac924 100644 --- a/apps/sim/tools/ashby/index.ts +++ b/apps/sim/tools/ashby/index.ts @@ -25,3 +25,5 @@ export const ashbyListNotesTool = listNotesTool export const ashbyListOffersTool = listOffersTool export const ashbySearchCandidatesTool = searchCandidatesTool export const ashbyUpdateCandidateTool = updateCandidateTool + +export * from './types' diff --git a/apps/sim/tools/registry.ts b/apps/sim/tools/registry.ts index a0ac0eda4f..6e05fc08cb 100644 --- a/apps/sim/tools/registry.ts +++ b/apps/sim/tools/registry.ts @@ -2248,6 +2248,15 @@ export const tools: Record = { a2a_send_message: a2aSendMessageTool, a2a_set_push_notification: a2aSetPushNotificationTool, airweave_search: airweaveSearchTool, + arxiv_get_author_papers: arxivGetAuthorPapersTool, + arxiv_get_paper: arxivGetPaperTool, + arxiv_search: arxivSearchTool, + asana_add_comment: asanaAddCommentTool, + asana_create_task: asanaCreateTaskTool, + asana_get_projects: asanaGetProjectsTool, + asana_get_task: asanaGetTaskTool, + asana_search_tasks: asanaSearchTasksTool, + asana_update_task: asanaUpdateTaskTool, ashby_create_application: ashbyCreateApplicationTool, ashby_create_candidate: ashbyCreateCandidateTool, ashby_create_note: ashbyCreateNoteTool, @@ -2261,15 +2270,6 @@ export const tools: Record = { ashby_list_offers: ashbyListOffersTool, ashby_search_candidates: ashbySearchCandidatesTool, ashby_update_candidate: ashbyUpdateCandidateTool, - arxiv_search: arxivSearchTool, - arxiv_get_paper: arxivGetPaperTool, - arxiv_get_author_papers: arxivGetAuthorPapersTool, - asana_get_task: asanaGetTaskTool, - asana_create_task: asanaCreateTaskTool, - asana_update_task: asanaUpdateTaskTool, - asana_get_projects: asanaGetProjectsTool, - asana_search_tasks: asanaSearchTasksTool, - asana_add_comment: asanaAddCommentTool, browser_use_run_task: browserUseRunTaskTool, openai_embeddings: openAIEmbeddingsTool, http_request: httpRequestTool,