Strips adapter module, defaultCommand, listModels, configurationDoc, capabilityMatrix, and notes fields from the ConnectorDefinition type. What remains is the declarative pi-mono shape: id, provider, label, description, defaultModel, auth descriptor, onboardingFeatured, notes. The three data files are imported and spread into the CONNECTORS array. findConnectorDefinition + listFeaturedOnboardingConnectors stay in the lookup module unchanged. Docs builders still provide buildOAuthDoc / buildApiKeyDoc / buildCloudDoc for the Settings panel and are consumed by connectors.ts when synthesising per-row configuration docs. ConnectorAuth now uses `type` as the discriminator (legacy `kind` alias removed — credential-resolver and ipc-credentials-handlers already keyed off `type`).
10 lines
393 B
TypeScript
10 lines
393 B
TypeScript
import { CONNECTORS, type ConnectorDefinition } from "./connector-definitions";
|
|
|
|
export function findConnectorDefinition(id: string): ConnectorDefinition | undefined {
|
|
return CONNECTORS.find((connector) => connector.id === id);
|
|
}
|
|
|
|
export function listFeaturedOnboardingConnectors(): ConnectorDefinition[] {
|
|
return CONNECTORS.filter((connector) => connector.onboardingFeatured === true);
|
|
}
|