Skip to main content
The TypeScript SDK (@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 under connectors/:
In your package.json, reference the SDK with a file: link — copy from connectors/linear/package.json:
Then install:
Requirements:
  • Node.js >= 20.0.0
Transitive dependencies pulled in by the SDK:
  • express - Web framework
  • pino - Structured logging
  • zod - Schema validation
Run /build-connector <service name> from Claude Code inside the omni repo to scaffold the entire connector structure (sync logic, manifest, Dockerfile, frontend wiring, Terraform, integration tests) following the conventions used by built-in connectors. See the SDK overview for details.

Quick Start

When running under Docker, set 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

The Connector abstract class defines the interface for all connectors. Required Properties: Optional Properties: Required Methods:
Optional Methods:

SyncContext

The SyncContext object is passed to your sync method and provides utilities for the sync operation. Properties: Methods:

ContentStorage

The ContentStorage class handles storing document content.
The returned contentId is a ULID that references the stored content.
Always prefer extractText / extractAndStoreContent over shelling out to your own PDF/Office parser. The connector-manager routes these calls through the centralized Docling service when the admin has enabled it (with the configured quality preset), and falls back to a lightweight built-in extractor otherwise — so your connector automatically honors the instance-wide document-conversion setting.

Document Model

The Document interface represents a searchable document.
Document Fields:

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:
Handling errors in sync:

Development

Project Setup

TypeScript Configuration

The SDK uses strict TypeScript settings. Your tsconfig.json should include:

API Reference

Exports

The SDK exports the following: Core Classes:
  • Connector - Abstract base class
  • SyncContext - Sync operation context
  • ContentStorage - Content storage interface
  • SdkClient - SDK client for connector-manager
Data Models (with Zod schemas):
  • Document, DocumentMetadata, DocumentPermissions
  • ConnectorEvent, EventType
  • ActionDefinition
  • ActionRequest, ActionResponse
  • ConnectorManifest, SyncMode
  • SyncRequest, SyncResponse
  • CancelRequest, CancelResponse
Error Classes:
  • 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