Skip to content
Pilotoo
v0.1

@pilotoo/connections-server

@pilotoo/connections-server is the NestJS adapter of Connections. It serves the user and admin routes, keeps connections in PostgreSQL, runs the maintenance that refreshes credentials, and registers connections_search and connections_execute in a tool registry. The host supplies its environment, a database pool, identity and the tool registry. A Pilotoo host does not need it directly: PilotooModule.forRoot({ connections }) wires it.

@pilotoo/connections-server 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-server build

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

connectionProviders returns the providers to add to your module and connectionControllers the controllers:

src/app.module.ts
import { githubProvider } from '@pilotoo/connections-core';
import { connectionControllers, connectionProviders } from '@pilotoo/connections-server';
@Module({
controllers: [...connectionControllers],
providers: [
...connectionProviders(
{ providers: [githubProvider()], publicApi: true },
{ env: 'ENV', postgres: DatabaseService, toolRegistry: 'TOOL_REGISTRY' },
),
],
})
export class AppModule {}

Using the library covers the ports and the identity guard.

Import Provides
@pilotoo/connections-server The only entry point.
Role Names
Wiring connectionProviders, connectionControllers, ConnectionsHostOptions, ConnectionsPorts.
Controllers ConnectionController, ConnectionAdminController, ConnectionGatewayController, GatewayWorkerController, ConnectionToolsController.
Storage PostgresConnectionStorage.
Tools createConnectionTools, CONNECTION_TOOL_NAMES, createEmbeddedToolSource.
Identity Anonymous, ANONYMOUS_ROUTE, CallerIdentity, IdentifiedRequest.
Gateways createUrlGatewayClient.
Maintenance ConnectionMaintenance.

@nestjs/common and @nestjs/core (^11.2.3), reflect-metadata (^0.2.2) and rxjs (^7.8.2).

@pilotoo/connections-core, @pilotoo/agent-runtime, @pilotoo/chat-protocol, @langchain/core, @modelcontextprotocol/sdk, pg and zod.