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

@justn-hyeok/beautiful-ccg-core

v0.1.0

Published

Registry, router, classifier, pipeline engine, and orchestrator for bccg. This package ties adapters together without depending on any specific adapter implementation.

Downloads

79

Readme

@justn-hyeok/beautiful-ccg-core

Registry, router, classifier, pipeline engine, and orchestrator for bccg. This package ties adapters together without depending on any specific adapter implementation.

Usage

import { Registry, Orchestrator, classifyTask, route, parseSteps, runPipeline } from "@justn-hyeok/beautiful-ccg-core";

// Create a registry and register adapters
const registry = new Registry();
registry.register(copilotAdapter);
registry.register(claudeAdapter);

// Use the orchestrator (recommended high-level API)
const orchestrator = new Orchestrator(registry);
const result = await orchestrator.run("explain this code", { strategy: "balanced" });

Orchestrator

The main entry point for running prompts and pipelines.

const orchestrator = new Orchestrator(registry);

// Single prompt — auto-routed
await orchestrator.run("explain this error");

// Single prompt — specific adapter + model
await orchestrator.run("analyze this", { adapter: "copilot", model: "opus" });

// Single prompt — strategy-based routing with fallback
await orchestrator.run("review code", { strategy: "quality-first" });

// Pipeline — multi-step
await orchestrator.pipeline("gemini:summarize -> claude:review");

// Status — check all adapters
await orchestrator.status();

Registry

Dynamic adapter registration. Core depends only on adapter-base types.

const registry = new Registry();
registry.register(adapter);               // Register an adapter
registry.get("claude");                    // Get by name
registry.getAll();                         // All registered adapters
await registry.getAvailable();             // Only installed + authenticated adapters

getAvailable() also filters out the host CLI (via BCCG_HOST_CLI env) to prevent recursion.

Router

Route a prompt to the best adapter based on strategy.

import { route } from "@justn-hyeok/beautiful-ccg-core";

const available = await registry.getAvailable();
const plan = route("review this code", "balanced", available);
// plan.steps[0] = { adapter: "claude", fallback: "copilot" }

| Strategy | Behavior | |---|---| | cheap-first | Lowest cost tier first | | quality-first | Highest cost tier first | | balanced | Classify prompt → pick best tier for the task type | | parallel | All adapters as separate steps |

Classifier

Simple keyword-based task classification.

import { classifyTask } from "@justn-hyeok/beautiful-ccg-core";

classifyTask("review this code for bugs");
// { type: "reasoning", complexity: "low" }

classifyTask("implement a retry function with exponential backoff");
// { type: "coding", complexity: "medium" }

Task types: reasoning, coding, summarize, general Complexity: low (<20 words), medium (<100), high (100+)

Pipeline

Execute multi-step CLI chains.

import { parseSteps, runPipeline } from "@justn-hyeok/beautiful-ccg-core";

const steps = parseSteps("gemini:summarize -> codex:implement -> claude:review");
const result = await runPipeline(steps, "add error handling", registry);

console.log(result.finalOutput);      // Final step's output
console.log(result.totalLatency);     // Sum of all steps
console.log(result.steps);            // Per-step results

Steps run sequentially. Each step's output feeds into the next. The final step gets a synthesis prompt prefix. Max 10 steps.

Exports

  • Registry — adapter registry
  • Orchestrator — high-level orchestration
  • classifyTask(prompt) — prompt classification
  • route(prompt, strategy, adapters, config?) — routing logic
  • parseSteps(dsl) — pipeline DSL parser
  • runPipeline(steps, prompt, registry, options?) — pipeline executor
  • ParsedStep — parsed step type