{"_id":"@agentxin-ai/plugin-moonshot","name":"@agentxin-ai/plugin-moonshot","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.2":{"name":"@agentxin-ai/plugin-moonshot","version":"0.0.2","author":{"name":"AgentXinAI","url":"https://agentxinai.cn"},"license":"AGPL-3.0","repository":{"type":"git","url":"git+https://github.com/agentxin-ai/agentxin-plugins.git"},"bugs":{"url":"https://github.com/agentxin-ai/agentxin-plugins/issues"},"type":"module","main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{"./package.json":"./package.json",".":{"@agentxin-plugins-starter/source":"./src/index.ts","types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"scripts":{"prepack":"node ./scripts/copy-assets.mjs"},"dependencies":{"tslib":"^2.3.0"},"peerDependencies":{"@langchain/openai":"0.6.9","@metad/contracts":"^3.6.1","@nestjs/common":"^11.1.6","@nestjs/config":"^4.0.2","@agentxin-ai/plugin-sdk":"^3.6.1","chalk":"4.1.2","zod":"3.25.67"},"_id":"@agentxin-ai/plugin-moonshot@0.0.2","description":"`@agentxin-ai/plugin-moonshot` connects [Moonshot AI (Kimi)](https://platform.moonshot.cn/) models to the [AgentXinAI](https://github.com/agentxin-ai/agentxin) platform. The plugin integrates Moonshot's OpenAI-compatible API so AgentXinAI agents can lever","homepage":"https://github.com/agentxin-ai/agentxin-plugins#readme","_nodeVersion":"22.22.0","_npmVersion":"10.9.4","dist":{"integrity":"sha512-pGql9FfNwpvUXQs99p92hf0VR/kZ8IC89yNhzwE5KVAA3ANz48FnKNrebg4b1uXDpk5ytqPy1YYuYamcf+HFIA==","shasum":"34b472e3248719325a5f3ab0d525873da03fd73d","tarball":"https://registry.npmjs.org/@agentxin-ai/plugin-moonshot/-/plugin-moonshot-0.0.2.tgz","fileCount":16,"unpackedSize":374443,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCHmLI7HVpKwIArRJLJyVsoSjDDAgDGv3jyNS4QFV8w0QIhAPTBLSlGSLqnxP9XQcXiJ46IjsHDLSBTuA7Ht+tVWSbY"}]},"_npmUser":{"name":"agentxin-ai","email":"1304040880@qq.com"},"directories":{},"maintainers":[{"name":"agentxin-ai","email":"1304040880@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/plugin-moonshot_0.0.2_1773917610031_0.06691991970913169"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-19T10:53:29.947Z","0.0.2":"2026-03-19T10:53:30.302Z","modified":"2026-03-19T10:53:30.484Z"},"maintainers":[{"name":"agentxin-ai","email":"1304040880@qq.com"}],"description":"`@agentxin-ai/plugin-moonshot` connects [Moonshot AI (Kimi)](https://platform.moonshot.cn/) models to the [AgentXinAI](https://github.com/agentxin-ai/agentxin) platform. The plugin integrates Moonshot's OpenAI-compatible API so AgentXinAI agents can lever","homepage":"https://github.com/agentxin-ai/agentxin-plugins#readme","repository":{"type":"git","url":"git+https://github.com/agentxin-ai/agentxin-plugins.git"},"author":{"name":"AgentXinAI","url":"https://agentxinai.cn"},"bugs":{"url":"https://github.com/agentxin-ai/agentxin-plugins/issues"},"license":"AGPL-3.0","readme":"# AgentXin Plugin: Moonshot AI\n\n## Overview\n\n`@agentxin-ai/plugin-moonshot` connects [Moonshot AI (Kimi)](https://platform.moonshot.cn/) models to the [AgentXinAI](https://github.com/agentxin-ai/agentxin) platform. The plugin integrates Moonshot's OpenAI-compatible API so AgentXinAI agents can leverage Kimi's powerful long-context language models with context windows up to 128K tokens, including the latest K2 series with advanced reasoning capabilities.\n\n## Core Features\n\n- Ships `MoonshotModule`, which registers the NestJS provider strategy, lifecycle hooks, and configuration schema required by the plugin runtime.\n- Implements `MoonshotLargeLanguageModel`, a LangChain-powered adapter built on `ChatOpenAI` that supports streaming chat completions, function calling, and token accounting callbacks for agent telemetry.\n- Shares a console-ready `moonshot.yaml` that drives the AgentXinAI UI forms (icons, help links, credential prompts) for quick operator onboarding.\n- Supports multiple Moonshot model variants including:\n  - **Moonshot V1 Series**: `moonshot-v1-8k`, `moonshot-v1-32k`, `moonshot-v1-128k` for various context length requirements\n  - **Kimi K2 Series**: `kimi-k2-0711-preview`, `kimi-k2-0905-preview`, `kimi-k2-turbo-preview` for enhanced performance\n  - **Kimi K2 Thinking Series**: `kimi-k2-thinking`, `kimi-k2-thinking-turbo` for advanced reasoning tasks\n\n## Installation\n\n```bash\nnpm install @agentxin-ai/plugin-moonshot\n```\n\n> **Peer Dependencies**: Ensure your host service also provides `@agentxin-ai/plugin-sdk`, `@nestjs/common`, `@nestjs/config`, `@metad/contracts`, `@langchain/openai`, `chalk`, and `zod`. Refer to `package.json` for exact versions.\n\n## Enabling in AgentXinAI\n\n1. Declare the plugin before bootstrapping the AgentXinAI server:\n   ```bash\n   PLUGINS=@agentxin-ai/plugin-moonshot\n   ```\n2. In the AgentXinAI 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.\n\n## Credentials & Model Configuration\n\nThe `moonshot.yaml` schema backs the form fields you see in the console:\n\n| Field      | Description                                                                                                    |\n| ---------- | -------------------------------------------------------------------------------------------------------------- |\n| `api_key`  | Required. Your Moonshot API Key from [platform.moonshot.cn/console/api-keys](https://platform.moonshot.cn/console/api-keys). |\n| `base_url` | Optional. Base URL for API requests (defaults to `https://api.moonshot.cn/v1`). Useful for proxy configurations. |\n\nDuring validation, the plugin instantiates a ChatOpenAI client with your credentials and sends a test message (\"你好\") to ensure connectivity and permissions.\n\n## Model Capabilities\n\n- **Long Context Support**: All Moonshot models excel at handling long-context scenarios, with the V1-128K variant supporting up to 128,000 tokens of context.\n- **Conversational Models**: `MoonshotLargeLanguageModel` merges provider credentials with per-model overrides, enables streaming, and registers token usage callbacks so agent telemetry stays accurate.\n- **Advanced Reasoning**: The K2 Thinking series models provide enhanced reasoning capabilities for complex problem-solving tasks.\n- **OpenAI Compatibility**: Built on LangChain's `ChatOpenAI`, ensuring seamless integration with existing OpenAI-compatible workflows.\n\n## Development & Debugging\n\nFrom the repo root, run Nx commands for this package:\n\n```bash\ncd agentxinai\nnpx nx build @agentxin-ai/plugin-moonshot\nnpx nx test @agentxin-ai/plugin-moonshot\n```\n\nArtifacts land in `agentxinai/models/moonshot/dist`. Jest settings live in `jest.config.ts`, and the asset copier runs via `npm run prepack` before publishing.\n\n## License\n\nThis plugin is distributed under the [AGPL-3.0 License](../../../LICENSE) located at the repository root.\n","readmeFilename":"README.md","_rev":"1-8d75d35bc691507c9f0a565bdb1bccb7"}