@getomnico/connector) provides everything you need to build custom connectors that integrate with Omni’s search and AI platform.
Installation
The SDK is not published to npm. Connectors live in the Omni monorepo and depend on the SDK as a local file path. To start a new TypeScript connector, fork or clone omni and create a directory underconnectors/:
package.json, reference the SDK with a file: link — copy from connectors/linear/package.json:
- Node.js >= 20.0.0
express- Web frameworkpino- Structured loggingzod- Schema validation
Quick Start
CONNECTOR_MANAGER_URL, CONNECTOR_HOST_NAME, and PORT. The SDK uses CONNECTOR_HOST_NAME plus PORT to register the connector URL that connector-manager calls for syncs, actions, MCP resources, and prompts.
Core Concepts
Connector Class
TheConnector abstract class defines the interface for all connectors.
Required Properties:
Optional Properties:
Required Methods:
SyncContext
TheSyncContext object is passed to your sync method and provides utilities for the sync operation.
Properties:
Methods:
ContentStorage
TheContentStorage class handles storing document content.
contentId is a ULID that references the stored content.
Document Model
TheDocument interface represents a searchable document.
Actions
Connectors can define custom actions that users can trigger from the Omni UI.RSS Connector Example
Here’s a complete example of an RSS feed connector:Error Handling
The SDK provides custom error classes:Development
Project Setup
TypeScript Configuration
The SDK uses strict TypeScript settings. Yourtsconfig.json should include:
API Reference
Exports
The SDK exports the following: Core Classes:Connector- Abstract base classSyncContext- Sync operation contextContentStorage- Content storage interfaceSdkClient- SDK client for connector-manager
Document,DocumentMetadata,DocumentPermissionsConnectorEvent,EventTypeActionDefinitionActionRequest,ActionResponseConnectorManifest,SyncModeSyncRequest,SyncResponseCancelRequest,CancelResponse
ConnectorError,SdkClientError,SyncCancelledError,ConfigurationError
Zod Schemas
All data models include Zod schemas for runtime validation:What’s Next
SDK Overview
Learn about SDK architecture
Python SDK
Build connectors with Python