diff --git a/packages/convoloai/client.ts b/packages/convoloai/client.ts new file mode 100644 index 000000000..e87282a4c --- /dev/null +++ b/packages/convoloai/client.ts @@ -0,0 +1,61 @@ +import type { ApiRequestOptions } from 'corsair/http'; +import type { OpenAPIConfig } from 'corsair/http'; +import { request } from 'corsair/http'; + +export class ConvoloAiAPIError extends Error { + constructor( + message: string, + public readonly code?: string, + ) { + super(message); + this.name = 'ConvoloAiAPIError'; + } +} + +// TODO: Update with your API base URL +const CONVOLOAI_API_BASE = 'https://api.example.com'; + +export async function makeConvoloAiRequest( + endpoint: string, + apiKey: string, + options: { + method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH'; + body?: Record; + query?: Record; + } = {}, +): Promise { + const { method = 'GET', body, query } = options; + + const config: OpenAPIConfig = { + BASE: CONVOLOAI_API_BASE, + VERSION: '1.0.0', + WITH_CREDENTIALS: false, + CREDENTIALS: 'omit', + TOKEN: apiKey, + HEADERS: { + 'Content-Type': 'application/json', + // TODO: Add authentication headers + // 'Authorization': \`Bearer \${apiKey}\` + }, + }; + + const requestOptions: ApiRequestOptions = { + method, + url: endpoint, + body: + method === 'POST' || method === 'PUT' || method === 'PATCH' + ? body + : undefined, + mediaType: 'application/json; charset=utf-8', + query: method === 'GET' ? query : undefined, + }; + + try { + return await request(config, requestOptions); + } catch (error) { + if (error instanceof Error) { + throw new ConvoloAiAPIError(error.message); + } + throw new ConvoloAiAPIError('Unknown error'); + } +} diff --git a/packages/convoloai/endpoints/example.ts b/packages/convoloai/endpoints/example.ts new file mode 100644 index 000000000..2a753e833 --- /dev/null +++ b/packages/convoloai/endpoints/example.ts @@ -0,0 +1,15 @@ +import { logEventFromContext } from 'corsair/core'; +import type { ConvoloAiEndpoints } from '..'; +import type { ConvoloAiEndpointOutputs } from './types'; +import { makeConvoloAiRequest } from '../client'; + +export const get: ConvoloAiEndpoints['exampleGet'] = async (ctx, input) => { + const response = await makeConvoloAiRequest( + `example/${input.id}`, + ctx.key, + { method: 'GET' }, + ); + + await logEventFromContext(ctx, 'convoloai.example.get', { ...input }, 'completed'); + return response; +}; diff --git a/packages/convoloai/endpoints/index.ts b/packages/convoloai/endpoints/index.ts new file mode 100644 index 000000000..7dc74ef41 --- /dev/null +++ b/packages/convoloai/endpoints/index.ts @@ -0,0 +1,7 @@ +import { get as exampleGet } from './example'; + +export const Example = { + get: exampleGet, +}; + +export * from './types'; diff --git a/packages/convoloai/endpoints/types.ts b/packages/convoloai/endpoints/types.ts new file mode 100644 index 000000000..202754249 --- /dev/null +++ b/packages/convoloai/endpoints/types.ts @@ -0,0 +1,29 @@ +import { z } from 'zod'; + +const ExampleGetInputSchema = z.object({ + id: z.string(), +}); + +export type ExampleGetInput = z.infer; + +const ExampleGetResponseSchema = z.object({ + id: z.string(), +}); + +export type ExampleGetResponse = z.infer; + +export type ConvoloAiEndpointInputs = { + exampleGet: ExampleGetInput; +}; + +export type ConvoloAiEndpointOutputs = { + exampleGet: ExampleGetResponse; +}; + +export const ConvoloAiEndpointInputSchemas = { + exampleGet: ExampleGetInputSchema, +} as const; + +export const ConvoloAiEndpointOutputSchemas = { + exampleGet: ExampleGetResponseSchema, +} as const; diff --git a/packages/convoloai/error-handlers.ts b/packages/convoloai/error-handlers.ts new file mode 100644 index 000000000..c2af29acd --- /dev/null +++ b/packages/convoloai/error-handlers.ts @@ -0,0 +1,31 @@ +import { ApiError } from 'corsair/http'; +import type { CorsairErrorHandler } from 'corsair/core'; + +export const errorHandlers = { + RATE_LIMIT_ERROR: { + match: (error: Error) => { + if (error instanceof ApiError && error.status === 429) return true; + const msg = error.message.toLowerCase(); + return msg.includes('rate_limited') || msg.includes('429'); + }, + handler: async (error: Error) => { + let retryAfterMs: number | undefined; + if (error instanceof ApiError && error.retryAfter !== undefined) { + retryAfterMs = error.retryAfter; + } + return { maxRetries: 5, headersRetryAfterMs: retryAfterMs }; + }, + }, + AUTH_ERROR: { + match: (error: Error) => { + if (error instanceof ApiError && error.status === 401) return true; + const msg = error.message.toLowerCase(); + return msg.includes('unauthorized') || msg.includes('invalid_auth'); + }, + handler: async () => ({ maxRetries: 0 }), + }, + DEFAULT: { + match: () => true, + handler: async () => ({ maxRetries: 0 }), + }, +} satisfies CorsairErrorHandler; diff --git a/packages/convoloai/index.ts b/packages/convoloai/index.ts new file mode 100644 index 000000000..9ee13d172 --- /dev/null +++ b/packages/convoloai/index.ts @@ -0,0 +1,202 @@ +import type { + BindEndpoints, + BindWebhooks, + CorsairEndpoint, + CorsairErrorHandler, + CorsairPlugin, + CorsairPluginContext, + CorsairWebhook, + KeyBuilderContext, + PickAuth, + PluginAuthConfig, + PluginPermissionsConfig, + RequiredPluginEndpointMeta, + RequiredPluginEndpointSchemas, + RequiredPluginWebhookSchemas, +} from 'corsair/core'; +import type { AuthTypes } from 'corsair/core'; +import type { ConvoloAiEndpointInputs, ConvoloAiEndpointOutputs } from './endpoints/types'; +import { ConvoloAiEndpointInputSchemas, ConvoloAiEndpointOutputSchemas } from './endpoints/types'; +import type { + ConvoloAiWebhookOutputs, + ExampleEvent, +} from './webhooks/types'; +import { ExampleEventSchema } from './webhooks/types'; +import { Example } from './endpoints'; +import { ConvoloAiSchema } from './schema'; +import { ExampleWebhooks } from './webhooks'; +import { errorHandlers } from './error-handlers'; +import { matchConvoloAiTenantWebhook } from './webhooks/tenant-matcher'; +import { resolveConvoloAiOAuthWebhookTenantLink } from './webhooks/oauth-tenant-link'; + +export type ConvoloAiPluginOptions = { + authType?: PickAuth<'api_key' | 'oauth_2'>; + key?: string; + webhookSecret?: string; + hooks?: InternalConvoloAiPlugin['hooks']; + webhookHooks?: InternalConvoloAiPlugin['webhookHooks']; + errorHandlers?: CorsairErrorHandler; + permissions?: PluginPermissionsConfig; +}; + +export type ConvoloAiContext = CorsairPluginContext< + typeof ConvoloAiSchema, + ConvoloAiPluginOptions +>; + +export type ConvoloAiKeyBuilderContext = KeyBuilderContext; + +export type ConvoloAiBoundEndpoints = BindEndpoints; + +type ConvoloAiEndpoint< + K extends keyof ConvoloAiEndpointOutputs, +> = CorsairEndpoint< + ConvoloAiContext, + ConvoloAiEndpointInputs[K], + ConvoloAiEndpointOutputs[K] +>; + +export type ConvoloAiEndpoints = { + exampleGet: ConvoloAiEndpoint<'exampleGet'>; +}; + +type ConvoloAiWebhook< + K extends keyof ConvoloAiWebhookOutputs, + TEvent, +> = CorsairWebhook; + +export type ConvoloAiWebhooks = { + example: ConvoloAiWebhook<'example', ExampleEvent>; +}; + +export type ConvoloAiBoundWebhooks = BindWebhooks; + +const convoloAiEndpointsNested = { + example: { + get: Example.get, + }, +} as const; + +const convoloAiWebhooksNested = { + example: { + example: ExampleWebhooks.example, + }, +} as const; + +export const convoloAiEndpointSchemas = { + 'example.get': { + input: ConvoloAiEndpointInputSchemas.exampleGet, + output: ConvoloAiEndpointOutputSchemas.exampleGet, + }, +} as const satisfies RequiredPluginEndpointSchemas; + +const convoloAiWebhookSchemas = { + 'example.example': { + description: 'An example webhook event', + payload: ExampleEventSchema, + response: ExampleEventSchema, + }, +} as const satisfies RequiredPluginWebhookSchemas; + +const defaultAuthType: AuthTypes = 'api_key' as const; + +const convoloAiEndpointMeta = { + 'example.get': { + riskLevel: 'read', + description: 'Get an example resource by ID', + }, +} as const satisfies RequiredPluginEndpointMeta; + +export const convoloAiAuthConfig = { + api_key: { + account: ['tenant_external_id'] as const, + }, + oauth_2: { + account: ['tenant_external_id'] as const, + }, +} as const satisfies PluginAuthConfig; + +export type BaseConvoloAiPlugin = CorsairPlugin< + 'convoloai', + typeof ConvoloAiSchema, + typeof convoloAiEndpointsNested, + typeof convoloAiWebhooksNested, + T, + typeof defaultAuthType +>; + +export type InternalConvoloAiPlugin = BaseConvoloAiPlugin; + +export type ExternalConvoloAiPlugin = + BaseConvoloAiPlugin; + +export function convoloai( + incomingOptions: ConvoloAiPluginOptions & T = {} as ConvoloAiPluginOptions & T, +): ExternalConvoloAiPlugin { + const options = { + ...incomingOptions, + authType: incomingOptions.authType ?? defaultAuthType, + }; + return { + id: 'convoloai', + authConfig: convoloAiAuthConfig, + schema: ConvoloAiSchema, + options: options, + hooks: options.hooks, + webhookHooks: options.webhookHooks, + endpoints: convoloAiEndpointsNested, + webhooks: convoloAiWebhooksNested, + endpointMeta: convoloAiEndpointMeta, + endpointSchemas: convoloAiEndpointSchemas, + webhookSchemas: convoloAiWebhookSchemas, + pluginWebhookMatcher: (request) => { + const headers = request.headers; + // TODO: Update to match your webhook signature headers + return 'x-convoloai-signature' in headers; + }, + pluginTenantWebhookMatcher: matchConvoloAiTenantWebhook, + oauthWebhookTenantLinkResolver: resolveConvoloAiOAuthWebhookTenantLink, + errorHandlers: { + ...errorHandlers, + ...options.errorHandlers, + }, + keyBuilder: async (ctx: ConvoloAiKeyBuilderContext, source) => { + if (source === 'webhook' && options.webhookSecret) { + return options.webhookSecret; + } + + if (source === 'webhook') { + const res = await ctx.keys.get_webhook_signature(); + return res ?? ''; + } + + if (source === 'endpoint' && options.key) { + return options.key; + } + + if (source === 'endpoint' && ctx.authType === 'api_key') { + const res = await ctx.keys.get_api_key(); + return res ?? ''; + } + + if (source === 'endpoint' && ctx.authType === 'oauth_2') { + const res = await ctx.keys.get_access_token(); + return res ?? ''; + } + + return ''; + }, + } satisfies InternalConvoloAiPlugin; +} + +export type { + ExampleEvent, + ConvoloAiWebhookOutputs, +} from './webhooks/types'; + +export type { + ConvoloAiEndpointInputs, + ConvoloAiEndpointOutputs, + ExampleGetInput, + ExampleGetResponse, +} from './endpoints/types'; diff --git a/packages/convoloai/jest.config.cjs b/packages/convoloai/jest.config.cjs new file mode 100644 index 000000000..8c6218f64 --- /dev/null +++ b/packages/convoloai/jest.config.cjs @@ -0,0 +1,55 @@ +module.exports = { + preset: 'ts-jest', + testEnvironment: 'node', + roots: [''], + testMatch: [ + '**/*.test.ts', + '**/tests/**/*.test.ts', + '**/plugins/**/*.test.ts', + '**/setup/**/*.test.ts', + ], + collectCoverageFrom: [ + '**/*.ts', + '!**/*.d.ts', + '!**/node_modules/**', + '!**/dist/**', + '!jest.config.ts', + '!tests/**', + ], + moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'], + transform: { + '^.+\\.yaml$': '/../corsair/jest-yaml-transform.cjs', + '^.+\\.ts$': [ + 'ts-jest', + { + useESM: true, + tsconfig: { + esModuleInterop: true, + allowSyntheticDefaultImports: true, + verbatimModuleSyntax: false, + module: 'ESNext', + moduleResolution: 'Bundler', + }, + }, + ], + '.*\\.js$': [ + 'ts-jest', + { + useESM: true, + tsconfig: { + esModuleInterop: true, + allowSyntheticDefaultImports: true, + }, + }, + ], + }, + moduleNameMapper: { + '^corsair/core$': '/../corsair/core.ts', + '^corsair/http$': '/../corsair/http.ts', + '^(\\.\\.?/.*)\\.js$': '$1', + }, + transformIgnorePatterns: ['node_modules/(?!.*uuid.*)'], + extensionsToTreatAsEsm: ['.ts'], + testTimeout: 30000, + verbose: true, +}; diff --git a/packages/convoloai/package.json b/packages/convoloai/package.json new file mode 100644 index 000000000..b4f50a6d5 --- /dev/null +++ b/packages/convoloai/package.json @@ -0,0 +1,44 @@ +{ + "name": "@corsair-dev/convoloai", + "version": "0.1.0", + "description": "ConvoloAi plugin for Corsair", + "type": "module", + "main": "./dist/index.js", + "module": "./dist/index.js", + "types": "./dist/index.d.ts", + "exports": { + ".": { + "dev-source": "./index.ts", + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + }, + "scripts": { + "build": "rm -rf dist && tsc --build --force && tsup", + "typecheck": "tsc --noEmit", + "test": "jest" + }, + "peerDependencies": { + "corsair": ">=0.1.0", + "zod": "^4.1.13" + }, + "devDependencies": { + "@types/jest": "^29.5.14", + "corsair": "workspace:*", + "jest": "^29.7.0", + "ts-jest": "^29.4.9", + "tsup": "^8.0.1", + "typescript": "catalog:", + "zod": "^4.1.13" + }, + "keywords": [ + "corsair", + "convoloai", + "plugin" + ], + "author": "", + "license": "Apache-2.0", + "files": [ + "dist" + ] +} diff --git a/packages/convoloai/schema.test.ts b/packages/convoloai/schema.test.ts new file mode 100644 index 000000000..c59c48d3f --- /dev/null +++ b/packages/convoloai/schema.test.ts @@ -0,0 +1,20 @@ +import { ConvoloAiSchema } from './schema'; + +describe('ConvoloAi schema', () => { + it('declares a semver version', () => { + expect(ConvoloAiSchema.version).toBeDefined(); + expect(ConvoloAiSchema.version).toMatch(/^\d+\.\d+\.\d+$/); + }); + + it('declares an entities map', () => { + expect(typeof ConvoloAiSchema.entities).toBe('object'); + expect(ConvoloAiSchema.entities).not.toBeNull(); + expect(Array.isArray(Object.keys(ConvoloAiSchema.entities))).toBe(true); + for (const entity of Object.values(ConvoloAiSchema.entities)) { + expect(entity).toBeDefined(); + } + }); +}); + +// Per .github/PLUGIN_PR_RULES.md (R2), every implemented endpoint +// needs a corresponding test. diff --git a/packages/convoloai/schema/database.ts b/packages/convoloai/schema/database.ts new file mode 100644 index 000000000..6e4a645e5 --- /dev/null +++ b/packages/convoloai/schema/database.ts @@ -0,0 +1,9 @@ +import { z } from 'zod'; + +// TODO: Define your database entities here +// export const ConvoloAiExample = z.object({ +// id: z.string(), +// name: z.string(), +// created_at: z.coerce.date().nullable().optional(), +// }); +// export type ConvoloAiExample = z.infer; diff --git a/packages/convoloai/schema/index.ts b/packages/convoloai/schema/index.ts new file mode 100644 index 000000000..816d072fa --- /dev/null +++ b/packages/convoloai/schema/index.ts @@ -0,0 +1,4 @@ +export const ConvoloAiSchema = { + version: '1.0.0', + entities: {}, +} as const; diff --git a/packages/convoloai/tsconfig.json b/packages/convoloai/tsconfig.json new file mode 100644 index 000000000..92fa48e0b --- /dev/null +++ b/packages/convoloai/tsconfig.json @@ -0,0 +1,30 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "lib": [ + "esnext" + ], + "types": [ + "node", + "jest" + ], + "module": "ESNext", + "moduleResolution": "Bundler", + "outDir": "./dist", + "rootDir": "./", + "composite": true, + "incremental": true, + "emitDeclarationOnly": true, + "declaration": true, + "declarationMap": true, + "skipLibCheck": true + }, + "include": [ + "./**/*" + ], + "exclude": [ + "dist", + "node_modules" + ], + "references": [] +} diff --git a/packages/convoloai/tsup.config.ts b/packages/convoloai/tsup.config.ts new file mode 100644 index 000000000..3ec221e23 --- /dev/null +++ b/packages/convoloai/tsup.config.ts @@ -0,0 +1,15 @@ +import { defineConfig } from 'tsup'; + +export default defineConfig({ + clean: false, + dts: false, + format: ['esm'], + target: 'esnext', + platform: 'node', + bundle: true, + splitting: true, + minify: true, + outDir: 'dist', + external: ['corsair', 'zod'], + entry: ['index.ts'], +}); diff --git a/packages/convoloai/webhooks/example.ts b/packages/convoloai/webhooks/example.ts new file mode 100644 index 000000000..a4466c8f6 --- /dev/null +++ b/packages/convoloai/webhooks/example.ts @@ -0,0 +1,27 @@ +import { logEventFromContext } from 'corsair/core'; +import type { ConvoloAiWebhooks } from '..'; +import { createConvoloAiMatch, verifyConvoloAiWebhookSignature } from './types'; + +export const example: ConvoloAiWebhooks['example'] = { + match: createConvoloAiMatch('example'), + + handler: async (ctx, request) => { + const verification = verifyConvoloAiWebhookSignature(request, ctx.key); + if (!verification.valid) { + return { + success: false, + statusCode: 401, + error: verification.error || 'Signature verification failed', + }; + } + + const event = request.payload; + if (event.type !== 'example') { + return { success: true, data: undefined }; + } + + await logEventFromContext(ctx, 'convoloai.webhook.example', { ...event }, 'completed'); + + return { success: true, data: event }; + }, +}; diff --git a/packages/convoloai/webhooks/index.ts b/packages/convoloai/webhooks/index.ts new file mode 100644 index 000000000..c04b25e53 --- /dev/null +++ b/packages/convoloai/webhooks/index.ts @@ -0,0 +1,9 @@ +import { example } from './example'; + +export const ExampleWebhooks = { + example: example, +}; + +export * from './types'; +export * from './tenant-matcher'; +export * from './oauth-tenant-link'; diff --git a/packages/convoloai/webhooks/oauth-tenant-link.ts b/packages/convoloai/webhooks/oauth-tenant-link.ts new file mode 100644 index 000000000..dd0ca0c19 --- /dev/null +++ b/packages/convoloai/webhooks/oauth-tenant-link.ts @@ -0,0 +1,31 @@ +import type { TokenResponse, WebhookTenantMatch } from 'corsair/core'; +import { asRecord, toExternalId } from 'corsair/core'; + +// TODO: Rename linkType 'tenant_external_id' to match pluginTenantWebhookMatcher. +// Called after OAuth to store the routing id on corsair_accounts.config. +export async function resolveConvoloAiOAuthWebhookTenantLink( + tokens: TokenResponse, +): Promise { + // TODO: Read from token response when the provider includes a stable id. + // const externalId = toExternalId(asRecord(tokens.team)?.id); + const externalId = toExternalId(tokens.tenant_external_id); + if (externalId) { + return { linkType: 'tenant_external_id', externalId }; + } + + const accessToken = tokens.access_token; + if (!accessToken) return null; + + // TODO: Fetch from provider API when the token response omits the id. + // const response = await fetch('https://api.example.com/me', { + // headers: { Authorization: `Bearer ${accessToken}` }, + // }); + // if (!response.ok) return null; + // const payload = (await response.json()) as { id?: string }; + // const fetchedId = toExternalId(payload.id); + // return fetchedId + // ? { linkType: 'tenant_external_id', externalId: fetchedId } + // : null; + + return null; +} diff --git a/packages/convoloai/webhooks/tenant-matcher.ts b/packages/convoloai/webhooks/tenant-matcher.ts new file mode 100644 index 000000000..c1bf2f8be --- /dev/null +++ b/packages/convoloai/webhooks/tenant-matcher.ts @@ -0,0 +1,25 @@ +import type { RawWebhookRequest, WebhookTenantMatch } from 'corsair/core'; +import { asRecord, firstString, readBodyRecord } from 'corsair/core'; + +// TODO: Rename linkType 'tenant_external_id' to match the provider field +// (e.g. team_id, installation_id, organization_id). Must match authConfig.account +// and oauthWebhookTenantLinkResolver. +// Return null for URL verification / handshake payloads that have no tenant id. +export function matchConvoloAiTenantWebhook( + request: RawWebhookRequest, +): WebhookTenantMatch | null { + const body = readBodyRecord(request); + if (!body) return null; + + // TODO: Extract the stable external id from the webhook payload. + // Example: + // const externalId = firstString([body.tenant_external_id, asRecord(body.data)?.id]); + const externalId = firstString([ + body.tenant_external_id, + asRecord(body.data)?.tenant_external_id, + ]); + + if (!externalId) return null; + + return { linkType: 'tenant_external_id', externalId }; +} diff --git a/packages/convoloai/webhooks/types.ts b/packages/convoloai/webhooks/types.ts new file mode 100644 index 000000000..a8408ac11 --- /dev/null +++ b/packages/convoloai/webhooks/types.ts @@ -0,0 +1,58 @@ +import type { CorsairWebhookMatcher, RawWebhookRequest, WebhookRequest } from 'corsair/core'; +import { z } from 'zod'; + +export const ConvoloAiWebhookPayloadSchema = z.object({ + type: z.string(), + created_at: z.string(), + data: z.record(z.string(), z.unknown()), +}); + +export type ConvoloAiWebhookPayload = z.infer< + typeof ConvoloAiWebhookPayloadSchema +>; + +export const ExampleEventSchema = ConvoloAiWebhookPayloadSchema.extend({ + type: z.literal('example'), + data: z + .object({ + id: z.string(), + }) + .loose(), +}); + +export type ExampleEvent = z.infer; + +export type ConvoloAiWebhookOutputs = { + example: ExampleEvent; +}; + +function parseBody(body: unknown): Record | null { + if (typeof body === 'string') { + try { + const parsed = JSON.parse(body); + return parsed !== null && typeof parsed === 'object' && !Array.isArray(parsed) + ? (parsed as Record) + : null; + } catch { + return null; + } + } + return body !== null && typeof body === 'object' && !Array.isArray(body) + ? (body as Record) + : null; +} + +export function createConvoloAiMatch(eventType: string): CorsairWebhookMatcher { + return (request: RawWebhookRequest) => { + const parsedBody = parseBody(request.body); + return parsedBody !== null && parsedBody.type === eventType; + }; +} + +export function verifyConvoloAiWebhookSignature( + request: WebhookRequest, + secret: string, +): { valid: boolean; error?: string } { + // TODO: Implement webhook signature verification + return { valid: true }; +} diff --git a/packages/corsair/core/constants.ts b/packages/corsair/core/constants.ts index b5dca6fd6..e7ad810b7 100644 --- a/packages/corsair/core/constants.ts +++ b/packages/corsair/core/constants.ts @@ -85,6 +85,7 @@ export const BaseProviders = [ 'collegefootballdata', 'confluence', 'contentfulgraphql', + 'convoloai', 'crowterminal', 'cursor', 'customgpt', @@ -273,6 +274,7 @@ export const ProviderDisplayNames = { collegefootballdata: 'College Football Data', confluence: 'Confluence', contentfulgraphql: 'Contentful GraphQL', + convoloai: 'ConvoloAi', crowterminal: 'CrowTerminal', cursor: 'Cursor', customgpt: 'CustomGPT', @@ -468,6 +470,7 @@ export type AllProviders = | 'collegefootballdata' | 'confluence' | 'contentfulgraphql' + | 'convoloai' | 'crowterminal' | 'cursor' | 'customgpt'