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

@jaybon24/plugin-moonshot

v0.0.3

Published

`@xpert-ai/plugin-moonshot` connects [Moonshot AI (Kimi)](https://platform.moonshot.cn/) models to the [XpertAI](https://github.com/xpert-ai/xpert) platform. The plugin integrates Moonshot's OpenAI-compatible API so XpertAI agents can leverage Kimi's powe

Readme

Xpert Plugin: Moonshot AI

Overview

@xpert-ai/plugin-moonshot connects Moonshot AI (Kimi) models to the XpertAI platform. The plugin integrates Moonshot's OpenAI-compatible API so XpertAI agents can leverage Kimi's powerful long-context language models with context windows up to 262K tokens, including the latest K2 series with advanced reasoning capabilities.

Core Features

  • Ships MoonshotModule, which registers the NestJS provider strategy, lifecycle hooks, and configuration schema required by the plugin runtime.
  • Implements MoonshotLargeLanguageModel, a LangChain-powered adapter built on ChatOpenAI that supports streaming chat completions, function calling, and token accounting callbacks for agent telemetry.
  • Shares a console-ready moonshot.yaml that drives the XpertAI UI forms (icons, help links, credential prompts) for quick operator onboarding.
  • Supports multiple Moonshot model variants including:
    • Moonshot V1 Series: moonshot-v1-8k, moonshot-v1-32k, moonshot-v1-128k for various context length requirements
    • Kimi K2 Series: kimi-k2-0711-preview, kimi-k2-0905-preview, kimi-k2-turbo-preview for enhanced performance
    • Kimi K2.5: kimi-k2.5 with 262K context window, vision support, and deep thinking mode for complex reasoning tasks
    • Kimi K2 Thinking Series: kimi-k2-thinking, kimi-k2-thinking-turbo for advanced reasoning tasks

Installation

npm install @xpert-ai/plugin-moonshot

Peer Dependencies: Ensure your host service also provides @xpert-ai/plugin-sdk, @nestjs/common, @nestjs/config, @metad/contracts, @langchain/openai, chalk, and zod. Refer to package.json for exact versions.

Enabling in XpertAI

  1. Declare the plugin before bootstrapping the XpertAI server:
    PLUGINS=@xpert-ai/plugin-moonshot
  2. In the XpertAI admin console (or config file), create a model provider pointing to moonshot, then add individual models that map to the specific Moonshot/Kimi versions you want to use.

Credentials & Model Configuration

The moonshot.yaml schema backs the form fields you see in the console:

| Field | Description | | ---------- | -------------------------------------------------------------------------------------------------------------- | | api_key | Required. Your Moonshot API Key from platform.moonshot.cn/console/api-keys. | | base_url | Optional. Base URL for API requests (defaults to https://api.moonshot.cn/v1). Useful for proxy configurations. |

During validation, the plugin instantiates a ChatOpenAI client with your credentials and sends a test message ("你好") to ensure connectivity and permissions.

Model Capabilities

  • Long Context Support: All Moonshot models excel at handling long-context scenarios, with the V1-128K variant supporting up to 128,000 tokens and the latest K2.5 supporting up to 262,000 tokens of context.
  • Conversational Models: MoonshotLargeLanguageModel merges provider credentials with per-model overrides, enables streaming, and registers token usage callbacks so agent telemetry stays accurate.
  • Advanced Reasoning: The K2 Thinking series models provide enhanced reasoning capabilities for complex problem-solving tasks.
  • OpenAI Compatibility: Built on LangChain's ChatOpenAI, ensuring seamless integration with existing OpenAI-compatible workflows.

Development & Debugging

From the repo root, run Nx commands for this package:

cd xpertai
npx nx build @xpert-ai/plugin-moonshot
npx nx test @xpert-ai/plugin-moonshot

Artifacts land in xpertai/models/moonshot/dist. Jest settings live in jest.config.ts, and the asset copier runs via npm run prepack before publishing.

License

This plugin is distributed under the AGPL-3.0 License located at the repository root.