@aimodes/connector-core
v0.1.0
Published
Shared foundation for AI Modes connectors — device-token API client, transcript formatting, the eight-mode typology, parsers, and score renderers.
Maintainers
Readme
@aimodes/connector-core
Shared, zero-dependency foundation for every AI Modes connector: the device-token API client, canonical transcript formatting, the eight-mode engagement typology, conversation parsers, and score renderers.
AI Modes scores AI conversations 0–100 against a research-backed, eight-mode
engagement framework developed at BYU. This package is the single source of
truth used by the @aimodes/mcp-server
hub and, through it, the Claude Desktop, Gemini, VSCode, Cursor, and ChatGPT
clients — so every surface behaves like the AI Modes Chrome extension.
Install
npm install @aimodes/connector-coreNode 18+. ESM only. Zero runtime dependencies.
What's inside
AimodesClient— device-token API client forPOST /api/v1/extension/submitandGET /api/v1/extension/statuson aimodes.ai. Tokens are minted athttps://aimodes.ai/apps/ai-engagement/extension/auth.formatTranscript— the canonicalUser:/Assistant:transcript formatter, byte-for-byte identical to the server's so dedup hashes line up.- The eight modes — the full typology with names, descriptions, and colors.
- Parsers — turn loose pasted conversation text into role-tagged turns.
- Renderers — score breakdowns as markdown, ANSI (terminal), or HTML.
- Feature modules — calibration mirror, verify-before-merge, challenger, problem-setter preflight, weekly letter, friction replay, drift trail, mode mirror, and confusion confirm.
Quick start
import { AimodesClient, parseConversation } from "@aimodes/connector-core";
const client = new AimodesClient({ token: process.env.AIMODES_DEVICE_TOKEN! });
const messages = parseConversation(rawPastedText);
const result = await client.submit({
provider: "claude", // "claude" | "chatgpt" | "gemini"
title: "My conversation",
sourceUrl: null,
messages,
});License
MIT © AI Modes
