New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@ai-operations/ops-connectors

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ai-operations/ops-connectors

Connector SDK for AI Operations OS — Gmail, Calendar, X/Twitter, Shopify with resilient fetch and retry

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

@ai-operations/ops-connectors

Connector framework with Gmail, Calendar, X/Twitter, and Shopify integrations for AI Operations OS.

Part of AI Operations OS — autonomous business workflow orchestration with safety enforcement.

Install

npm install @ai-operations/ops-connectors

Quick Start

import { ConnectorRegistry, GmailConnector, resilientFetch, RateLimiter } from '@ai-operations/ops-connectors';

const registry = new ConnectorRegistry();
registry.register(new GmailConnector({ name: 'gmail', enabled: true, credentials: { token: '...' } }));

const gmail = registry.get('gmail');
const result = await gmail.execute('send', { to: 'user@example.com', body: 'Hello!' });

API

BaseConnector (abstract)

Abstract base class for all connectors. Subclasses implement supportedOperations, execute, and healthCheck.

abstract get supportedOperations(): string[]
abstract execute(operation: string, input: Record<string, unknown>): Promise<ConnectorResult>
abstract healthCheck(): Promise<boolean>
supportsOperation(operation: string): boolean
isEnabled(): boolean
  • ConnectorConfig{ name: string; enabled: boolean; credentials?: Record<string, string> }
  • ConnectorResult{ success: boolean; data?: Record<string, unknown>; error?: string }

Connector Implementations

ConnectorClassOperations
GmailGmailConnectorsend, read, list, search
Google CalendarCalendarConnectorcreate_event, update_event, cancel_event, list
X / TwitterXTwitterConnectorpost, delete, search
ShopifyShopifyConnectorfulfill, refund, list, get

ConnectorRegistry

Central registry for managing connector instances with bulk health checks.

register(connector: BaseConnector): void
get(name: string): BaseConnector | undefined
list(): BaseConnector[]
healthCheckAll(): Promise<Map<string, boolean>>

resilientFetch(url, init?, options?): Promise<FetchAttemptResult>

Retry-aware HTTP client with exponential backoff, 429 Retry-After support, request timeouts, and jitter.

const { response, attempts, totalDurationMs } = await resilientFetch(
  'https://api.example.com/data',
  { method: 'GET', headers: { Authorization: 'Bearer token' } },
  { maxRetries: 3, timeoutMs: 10000 },
);
  • ResilientFetchOptions{ maxRetries?, initialDelayMs?, maxDelayMs?, timeoutMs?, retryableStatuses? }

RateLimiter

Sliding-window rate limiter for per-connector request throttling.

const limiter = new RateLimiter({ maxRequests: 100, windowMs: 60000 });
if (limiter.canProceed()) {
  limiter.record();
  await fetch(...);
}
await limiter.waitAndRecord(); // Block until a slot opens

License

MIT

Keywords

ai-ops

FAQs

Package last updated on 10 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts