Preparing your workspace...

assistant-chat.tsx2.5k
utils.ts850
button.tsx720
Quick Actions
codmir
Docs
Discord
Get started
API
  • Introduction
  • Installation
  • Your First Project
  • Your First Agent

Test your SDK connection by sending a test event and confirming the round-trip.

Verify

Connection verification utility for the Codmir SDK. Sends a test event through the full pipeline (init, send, flush, confirm) and reports the result with step-by-step progress.

npm install @codmir/sdk

Quick Start

import { verify, printVerifyResult } from '@codmir/sdk/verify';

const result = await verify({
  dsn: process.env.CODMIR_DSN,
  onProgress: (step) => console.log(`[${step.status}] ${step.message}`),
});

console.log(printVerifyResult(result));

Output:

Codmir SDK Verification
=======================
[OK]   Initialize SDK ........................... 12ms
[OK]   Send test event ......................... 3ms
[OK]   Flush events ............................ 45ms
[OK]   Connection verified

Event ID: evt_abc123
Total: 60ms

Your Codmir SDK is working! Events will appear in your dashboard shortly.

Quick Verify

One-liner boolean check — pass a client key or DSN:

import { quickVerify } from '@codmir/sdk/verify';

const ok = await quickVerify(process.env.NEXT_PUBLIC_CODMIR_CLIENT_KEY);
console.log(ok ? 'Connected!' : 'Failed to connect');

Accepts both key formats:

  • DSN: https://your-project.codmir.com/api/overseer
  • Client key: osk_... or csk_...

Full Verify

The verify() function runs four steps and provides detailed results:

import { verify } from '@codmir/sdk/verify';

const result = await verify({
  dsn: 'https://your-project.codmir.com/api/overseer',
  timeout: 5000,   // Optional: flush timeout in ms (default: 10000)
  onProgress: (step) => {
    // Called for each step: init → send → flush → confirm
    console.log(`${step.step}: ${step.status} — ${step.message}`);
  },
});

if (result.success) {
  console.log('Event ID:', result.eventId);
  console.log('Total time:', result.totalDuration, 'ms');
} else {
  console.error('Failed:', result.error);
}

Verification Steps

StepDescription
initInitialize the SDK with the provided config
sendSend a test message event
flushFlush all pending events to the server
confirmConfirm the connection was successful

Result Structure

interface VerifyResult {
  success: boolean;
  eventId?: string;      // The test event's ID
  steps: VerifyStep[];   // Detailed step results
  totalDuration: number; // Total time in ms
  error?: string;        // Error message if failed
}

interface VerifyStep {
  step: 'init' | 'send' | 'flush' | 'confirm';
  status: 'running' | 'success' | 'failed';
  message: string;
  duration?: number;     // Step duration in ms
}

Print Result

Format a result for CLI output:

import { printVerifyResult } from '@codmir/sdk/verify';

const result = await verify({ dsn });
console.log(printVerifyResult(result));

TypeScript Support

import type {
  VerifyConfig,
  VerifyStep,
  VerifyResult,
} from '@codmir/sdk/verify';

Related

SDK Overview

Installation and setup guide

Browser

Browser integration setup

Next.js

Next.js integration setup

Open in ChatGPTOpen in ClaudeConnect MCP on CursorConnect MCP on WindsurfEdit on GitHub
codmir
Products
Desktop AppMobile AppIDE ExtensionAI AgentsOverseerVoice ModeCortex ProtocolHive MindGame Dev (Godat)PricingDownload
Solutions
AI Code AgentsCode ReviewError TrackingSelf-HealingDeploy TrackingAI Tracking SDKWorkflow AutomationTesting FrameworkTime TrackingVoice Control
Platform
ProjectsTickets & BoardsAgent MarketplaceIntegrationsTemplatesApp HubAdmin PanelAnalytics
Integrations
GitHubSlackDiscordVercelSentryRailwayLinearAll Integrations
Developers
DocumentationAPI ReferenceSDKCLIDeveloper PortalMarketplaceMCP ConnectorsWebhooksExamplesnpm Packages
Resources
BlogChangelogCommunityTutorialsGet StartedSupportStatusFeedback
Company
AboutCareersContact SalesKickstarterReferral Program
Legal
Terms of UsePrivacy PolicyEULATrademarkSecurity
Download on the App StoreGet it on Google Play

Codmir™ 2026. All rights reserved.

Free & open source SDK — Apache 2.0 License