Skip to content
Pilotoo
v0.1

@pilotoo/connections-core

@pilotoo/connections-core is the framework-free half of Connections. It holds the connection model, the AES-GCM vault cipher, the OAuth 2 client, the credential resolver, the sharing policy, the provider catalog and the ConnectionStorage port a host implements. It also ships the built-in providers. Use it directly when your backend is not NestJS, or take @pilotoo/connections-server for the NestJS adapter.

@pilotoo/connections-core is at version 0.1.0, is marked private and is not published to a registry. It is also not part of the tarballs that pnpm release:check packs, so today it is used from the kit workspace:

Terminal window
pnpm install
pnpm --filter @pilotoo/connections-core build

Inside the workspace, depend on it with "@pilotoo/connections-core": "workspace:^". Its build first builds the kit packages it depends on.

The built-in providers are plain values you pass to the host:

import { githubProvider, gmailProvider, mailProvider } from '@pilotoo/connections-core';
const providers = [githubProvider(), gmailProvider(), mailProvider()];

Build the services yourself over your own ConnectionStorage, or take the Postgres one from @pilotoo/connections-server. Using the library walks through both.

Import Provides
@pilotoo/connections-core The only entry point.

What it exports, by role:

Role Names
Services ConnectionService, ConnectionAdminService, ConnectionGatewayService, ConnectionCredentialResolver and the audit and logger types.
Vault AesGcmCredentialCipher, the CredentialCipher port.
OAuth The OAuth client and its client configuration.
Catalog ProviderCatalog and the provider and credential-type model.
Providers githubProvider, gmailProvider, logicpanelHubProvider, mailProvider, googleOAuth2CredentialType, imapSmtpCredentialType.
Tool sources The ConnectionToolSource port, createRemoteToolSource and createCompositeToolSource.
Ports ConnectionStorage, and the MailTransport port that @pilotoo/connections-mail implements.
Custom gateways The gateway broker and client that connect a tool gateway by URL or by a polling worker.

@pilotoo/chat-protocol, @logicpanel/lphub and zod. It has no peer dependencies, and no Nest or pg.