mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-05-01 11:26:23 +02:00
Refactor Composio toolkit management for improved structure and maintainability
- Consolidated toolkit definitions and display names into a single source of truth in shared/composio.ts. - Updated core composio/curated-toolkits.ts to re-export types and constants for backward compatibility. - Enhanced the organization of toolkit data, ensuring clarity and ease of access for future development.
This commit is contained in:
parent
0edc89b4a0
commit
e0e7945bd9
2 changed files with 71 additions and 102 deletions
|
|
@ -1,74 +1,11 @@
|
||||||
/**
|
/**
|
||||||
* Curated list of Composio toolkits available to Rowboat users.
|
* Re-exports from @x/shared/composio — kept for backward compatibility
|
||||||
* Only these toolkits are shown in the UI and discoverable via chat.
|
* so existing core imports don't need to change paths.
|
||||||
* Exact slugs match Composio API naming convention.
|
|
||||||
*
|
|
||||||
* Display names come from @x/shared/composio (single source of truth).
|
|
||||||
*/
|
*/
|
||||||
|
export {
|
||||||
import { COMPOSIO_DISPLAY_NAMES } from "@x/shared/dist/composio.js";
|
type ToolkitCategory,
|
||||||
|
type CuratedToolkit,
|
||||||
export { COMPOSIO_DISPLAY_NAMES } from "@x/shared/dist/composio.js";
|
CURATED_TOOLKITS,
|
||||||
|
CURATED_TOOLKIT_SLUGS,
|
||||||
export type ToolkitCategory = 'communication' | 'productivity' | 'development' | 'crm' | 'social' | 'storage' | 'support';
|
COMPOSIO_DISPLAY_NAMES,
|
||||||
|
} from "@x/shared/dist/composio.js";
|
||||||
export interface CuratedToolkit {
|
|
||||||
slug: string;
|
|
||||||
displayName: string;
|
|
||||||
category: ToolkitCategory;
|
|
||||||
}
|
|
||||||
|
|
||||||
const toolkit = (slug: string, category: ToolkitCategory): CuratedToolkit => ({
|
|
||||||
slug,
|
|
||||||
displayName: COMPOSIO_DISPLAY_NAMES[slug] ?? slug,
|
|
||||||
category,
|
|
||||||
});
|
|
||||||
|
|
||||||
export const CURATED_TOOLKITS: CuratedToolkit[] = [
|
|
||||||
// Communication
|
|
||||||
toolkit('gmail', 'communication'),
|
|
||||||
toolkit('slack', 'communication'),
|
|
||||||
toolkit('microsoft_outlook', 'communication'),
|
|
||||||
toolkit('microsoft_teams', 'communication'),
|
|
||||||
|
|
||||||
// Productivity
|
|
||||||
toolkit('googlecalendar', 'productivity'),
|
|
||||||
toolkit('googledocs', 'productivity'),
|
|
||||||
toolkit('googlesheets', 'productivity'),
|
|
||||||
toolkit('notion', 'productivity'),
|
|
||||||
toolkit('airtable', 'productivity'),
|
|
||||||
toolkit('calendly', 'productivity'),
|
|
||||||
toolkit('cal', 'productivity'),
|
|
||||||
|
|
||||||
// Storage
|
|
||||||
toolkit('googledrive', 'storage'),
|
|
||||||
toolkit('dropbox', 'storage'),
|
|
||||||
toolkit('onedrive', 'storage'),
|
|
||||||
|
|
||||||
// Development
|
|
||||||
toolkit('github', 'development'),
|
|
||||||
toolkit('linear', 'development'),
|
|
||||||
toolkit('jira', 'development'),
|
|
||||||
|
|
||||||
// Project Management
|
|
||||||
toolkit('asana', 'productivity'),
|
|
||||||
toolkit('trello', 'productivity'),
|
|
||||||
|
|
||||||
// CRM & Sales
|
|
||||||
toolkit('hubspot', 'crm'),
|
|
||||||
toolkit('salesforce', 'crm'),
|
|
||||||
|
|
||||||
// Social
|
|
||||||
toolkit('linkedin', 'social'),
|
|
||||||
toolkit('twitter', 'social'),
|
|
||||||
toolkit('reddit', 'social'),
|
|
||||||
|
|
||||||
// Support
|
|
||||||
toolkit('intercom', 'support'),
|
|
||||||
toolkit('zendesk', 'support'),
|
|
||||||
];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set of curated toolkit slugs for fast lookup.
|
|
||||||
*/
|
|
||||||
export const CURATED_TOOLKIT_SLUGS = new Set(CURATED_TOOLKITS.map(t => t.slug));
|
|
||||||
|
|
|
||||||
|
|
@ -1,32 +1,64 @@
|
||||||
/**
|
/**
|
||||||
* Composio display-name map: toolkit slug → human-readable name.
|
* Curated Composio toolkits available to Rowboat users.
|
||||||
* Single source of truth — used by both core and renderer.
|
* Single source of truth for slugs, display names, and categories.
|
||||||
*/
|
*/
|
||||||
export const COMPOSIO_DISPLAY_NAMES: Record<string, string> = {
|
|
||||||
gmail: 'Gmail',
|
export type ToolkitCategory = 'communication' | 'productivity' | 'development' | 'crm' | 'social' | 'storage' | 'support';
|
||||||
slack: 'Slack',
|
|
||||||
microsoft_outlook: 'Microsoft Outlook',
|
export interface CuratedToolkit {
|
||||||
microsoft_teams: 'Microsoft Teams',
|
slug: string;
|
||||||
googlecalendar: 'Google Calendar',
|
displayName: string;
|
||||||
googledocs: 'Google Docs',
|
category: ToolkitCategory;
|
||||||
googlesheets: 'Google Sheets',
|
}
|
||||||
notion: 'Notion',
|
|
||||||
airtable: 'Airtable',
|
export const CURATED_TOOLKITS: CuratedToolkit[] = [
|
||||||
calendly: 'Calendly',
|
// Communication
|
||||||
cal: 'Cal.com',
|
{ slug: 'gmail', displayName: 'Gmail', category: 'communication' },
|
||||||
googledrive: 'Google Drive',
|
{ slug: 'slack', displayName: 'Slack', category: 'communication' },
|
||||||
dropbox: 'Dropbox',
|
{ slug: 'microsoft_outlook', displayName: 'Microsoft Outlook', category: 'communication' },
|
||||||
onedrive: 'OneDrive',
|
{ slug: 'microsoft_teams', displayName: 'Microsoft Teams', category: 'communication' },
|
||||||
github: 'GitHub',
|
|
||||||
linear: 'Linear',
|
// Productivity
|
||||||
jira: 'Jira',
|
{ slug: 'googlecalendar', displayName: 'Google Calendar', category: 'productivity' },
|
||||||
asana: 'Asana',
|
{ slug: 'googledocs', displayName: 'Google Docs', category: 'productivity' },
|
||||||
trello: 'Trello',
|
{ slug: 'googlesheets', displayName: 'Google Sheets', category: 'productivity' },
|
||||||
hubspot: 'HubSpot',
|
{ slug: 'notion', displayName: 'Notion', category: 'productivity' },
|
||||||
salesforce: 'Salesforce',
|
{ slug: 'airtable', displayName: 'Airtable', category: 'productivity' },
|
||||||
linkedin: 'LinkedIn',
|
{ slug: 'calendly', displayName: 'Calendly', category: 'productivity' },
|
||||||
twitter: 'X',
|
{ slug: 'cal', displayName: 'Cal.com', category: 'productivity' },
|
||||||
reddit: 'Reddit',
|
|
||||||
intercom: 'Intercom',
|
// Storage
|
||||||
zendesk: 'Zendesk',
|
{ slug: 'googledrive', displayName: 'Google Drive', category: 'storage' },
|
||||||
};
|
{ slug: 'dropbox', displayName: 'Dropbox', category: 'storage' },
|
||||||
|
{ slug: 'onedrive', displayName: 'OneDrive', category: 'storage' },
|
||||||
|
|
||||||
|
// Development
|
||||||
|
{ slug: 'github', displayName: 'GitHub', category: 'development' },
|
||||||
|
{ slug: 'linear', displayName: 'Linear', category: 'development' },
|
||||||
|
{ slug: 'jira', displayName: 'Jira', category: 'development' },
|
||||||
|
|
||||||
|
// Project Management
|
||||||
|
{ slug: 'asana', displayName: 'Asana', category: 'productivity' },
|
||||||
|
{ slug: 'trello', displayName: 'Trello', category: 'productivity' },
|
||||||
|
|
||||||
|
// CRM & Sales
|
||||||
|
{ slug: 'hubspot', displayName: 'HubSpot', category: 'crm' },
|
||||||
|
{ slug: 'salesforce', displayName: 'Salesforce', category: 'crm' },
|
||||||
|
|
||||||
|
// Social
|
||||||
|
{ slug: 'linkedin', displayName: 'LinkedIn', category: 'social' },
|
||||||
|
{ slug: 'twitter', displayName: 'X', category: 'social' },
|
||||||
|
{ slug: 'reddit', displayName: 'Reddit', category: 'social' },
|
||||||
|
|
||||||
|
// Support
|
||||||
|
{ slug: 'intercom', displayName: 'Intercom', category: 'support' },
|
||||||
|
{ slug: 'zendesk', displayName: 'Zendesk', category: 'support' },
|
||||||
|
];
|
||||||
|
|
||||||
|
/** Slug → display-name lookup. */
|
||||||
|
export const COMPOSIO_DISPLAY_NAMES: Record<string, string> = Object.fromEntries(
|
||||||
|
CURATED_TOOLKITS.map(t => [t.slug, t.displayName])
|
||||||
|
);
|
||||||
|
|
||||||
|
/** Set of curated slugs for fast membership checks. */
|
||||||
|
export const CURATED_TOOLKIT_SLUGS = new Set(CURATED_TOOLKITS.map(t => t.slug));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue