npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@synai-code/core

v1.1.2

Published

Core Agent Engine, OpenRouter Client and Tool Pipeline for SynAI

Readme

🧠 @synai-code/core

The Supreme Autonomous AI Agent Engine, OpenRouter Client, and Multi-Domain Pipeline for SynAI.

npm version License: MIT TypeScript

@synai-code/core powers SynAI — the autonomous open-source AI coding assistant and supreme software engineering partner. It provides a headless, robust, fully-typed TypeScript engine for building autonomous AI agents with tools, streaming LLM providers, planning, and sandboxed computation.


🌟 Capabilities

  • 🤖 Supreme Autonomous Agent Engine (Agent): Full multi-turn conversational loop with live event emission, token tracking, interrupt/abort mechanics, and self-healing error recovery.
  • 🌐 OpenRouter Frontier & Free Model Integration (OpenRouterClient): Works out of the box with free frontier models (cohere/north-mini-code:free, qwen/qwen-2.5-coder-32b-instruct:free, deepseek/deepseek-r1:free) or any paid OpenRouter model.
  • 🔢 God-Tier Mathematics Engine (math_eval): Sandboxed Node VM execution with BigInt, combinatorics ($nCr$, $nPr$, factorial), number theory (GCD, LCM, modPow, prime factors, isPrime), linear algebra (matrices, determinants, dot, cross), statistics, and numerical calculus.
  • 👥 Multi-Domain Specialized Subagents (SubagentOrchestrator):
    • mathematician (Supreme Mathematical, Algorithmic & Scientific Specialist)
    • coder (Surgical Implementation Specialist)
    • architect (Principal Systems Architect)
    • legal (Supreme Legal Counsel & Contract Analyst)
    • analyst (Business Strategy & Unit Economics Analyst)
    • research (Codebase & Web Researcher)
    • tester (QA & Diagnostics Specialist)
    • conversational (High-IQ Intellectual Conversationalist)
  • 🛠️ Full Suite of Autonomous Tools (ToolRegistry):
    • Surgical file inspection (view_file), creation (write_file), search-and-replace (edit_file), and atomic transactions (batch_edit).
    • AST-aware symbol search (find_symbols), globbing (find_files), and ripgrep search (grep_search).
    • Safe terminal command runner (run_command) with read-only auto-approval heuristic.
    • Automated diagnostics & compiler typechecks (run_diagnostics).
    • Web research (web_search, web_fetch) and browser control (browser).
    • Human collaboration (ask_user_question).
  • ⏪ Atomic Checkpoint & Undo Engine (CheckpointManager): Records pre-modification file states before any write or edit, enabling instant /undo rollbacks.
  • 📋 Autonomous Roadmap Planner (TaskPlanner): Step-by-step milestone planning, task status tracking, and dependency management.
  • 🔌 Full-Duplex WebSocket & HTTP Server (SynAIServer): Powers web interfaces and remote IDE dashboards.

📦 Installation

npm install @synai-code/core

🚀 Quick Usage

import { Agent, ConfigManager } from '@synai-code/core';

// 1. Initialize configuration with workspace root
const configManager = new ConfigManager(process.cwd());
const config = configManager.getConfig();

// 2. Instantiate autonomous agent
const agent = new Agent({
  ...config,
  model: 'cohere/north-mini-code:free',
  mode: 'confirm', // 'confirm' | 'auto' | 'dry-run'
  thinkingLevel: 'medium', // 'low' | 'medium' | 'high' | 'max'
});

// 3. Listen to streaming lifecycle events
agent.on('event', (event) => {
  if (event.type === 'token') {
    process.stdout.write(event.payload.text);
  } else if (event.type === 'tool_start') {
    console.log(`\nExecuting ${event.payload.tool}...`);
  }
});

// 4. Send prompt
await agent.chat('Calculate the 50th Fibonacci number and factorize 2^32 - 1');

📄 License

MIT © SynAI Contributors