Skip to content

Commit 8746190

Browse files
Sync CLI adapter registry (#739)
1 parent a2541df commit 8746190

2 files changed

Lines changed: 15 additions & 10 deletions

File tree

packages/cli/src/adapter-registry.test.ts

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@ import { readdirSync, statSync } from 'node:fs';
22
import { dirname, join, resolve } from 'node:path';
33
import { fileURLToPath } from 'node:url';
44
import { describe, expect, it } from 'vitest';
5-
import { categoryById } from './adapter-registry.js';
5+
import { CATEGORIES } from './adapter-registry.js';
66

77
const repoRoot = resolve(dirname(fileURLToPath(import.meta.url)), '../../..');
8+
const excludedPackageDirs = new Map<string, Set<string>>([
9+
['bots', new Set(['core'])],
10+
]);
811

912
function packageDirs(path: string): string[] {
1013
return readdirSync(path)
@@ -13,11 +16,13 @@ function packageDirs(path: string): string[] {
1316
}
1417

1518
describe('adapter registry', () => {
16-
it('lists every target package directory', () => {
17-
const targets = categoryById('targets');
19+
for (const category of CATEGORIES) {
20+
it(`lists every ${category.id} package directory`, () => {
21+
const excluded = excludedPackageDirs.get(category.id) ?? new Set<string>();
22+
const dirs = packageDirs(join(repoRoot, 'packages', category.id))
23+
.filter((name) => !excluded.has(name));
1824

19-
expect(targets?.adapters.slice().sort()).toEqual(
20-
packageDirs(join(repoRoot, 'packages', 'targets'))
21-
);
22-
});
25+
expect(category.adapters.slice().sort()).toEqual(dirs);
26+
});
27+
}
2328
});

packages/cli/src/adapter-registry.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export const CATEGORIES: readonly AdapterCategory[] = [
4242
'chutes', 'clarifai', 'claude', 'cloudflare', 'cohere', 'deepinfra',
4343
'deepseek', 'featherless', 'fireworks', 'friendli', 'gemini',
4444
'gmicloud', 'google-vertex', 'groq', 'inception', 'inceptron',
45-
'infermatic', 'inflection', 'ionet', 'kimi', 'liquid', 'mancer',
45+
'infermatic', 'inflection', 'ionet', 'kimi', 'liquid', 'litellm', 'mancer',
4646
'minimax', 'mistral', 'moonshot', 'morph', 'nebius', 'nextbit',
4747
'novita', 'openai', 'openinference', 'parasail', 'perceptron',
4848
'perplexity', 'phala', 'qwen', 'reka', 'relace', 'sambanova',
@@ -126,7 +126,7 @@ export const CATEGORIES: readonly AdapterCategory[] = [
126126
id: 'mcp-servers',
127127
pkgPrefix: '@profullstack/sh1pt-mcp-server',
128128
description: 'MCP server callers - tool calls over configured MCP transports',
129-
adapters: ['penpot'],
129+
adapters: ['penpot', 'specification-website'],
130130
},
131131
{
132132
id: 'outreach',
@@ -144,7 +144,7 @@ export const CATEGORIES: readonly AdapterCategory[] = [
144144
id: 'promo',
145145
pkgPrefix: '@profullstack/sh1pt-promo',
146146
description: 'Ad networks + fundraising rails',
147-
adapters: ['angellist', 'apple-search', 'capitalreach', 'google', 'kickstarter', 'linkedin', 'meta', 'microsoft', 'openvc', 'reddit', 'tiktok', 'wefunder', 'x', 'youtube'],
147+
adapters: ['angellist', 'apple-search', 'capitalreach', 'google', 'kickstarter', 'linkedin', 'meta', 'microsoft', 'openvc', 'posthog', 'reddit', 'tiktok', 'wefunder', 'x', 'youtube'],
148148
},
149149
{
150150
id: 'recipes',

0 commit comments

Comments
 (0)