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

youling-task

v1.0.10

Published

基于POMDP的研发任务分解工具,支持MCP协议

Readme

youling-task

基于POMDP的研发任务分解工具,支持MCP协议。

安装

npm install youling-task

功能特点

  • 基于POMDP(部分可观察马尔可夫决策过程)的任务分解算法
  • 提供MCP协议服务器实现,可与MCP客户端集成
  • 支持ESM模块系统
  • 提供类型定义,支持TypeScript

基本用法

作为MCP服务器使用

import { startYoulingTaskServer } from 'youling-task';

// 使用默认配置启动服务器
startYoulingTaskServer();

// 或使用自定义配置
startYoulingTaskServer({
  port: 3000,
  secretKey: 'your-secret-key',
  serverName: 'custom-task-decomposer',
  serverVersion: '1.0.0'
});

直接使用任务分解器

import { pomdpTaskDecomposer } from 'youling-task';

async function decomposeTask() {
  const taskDescription = '设计并实现一个在线电子商务平台,包括用户认证、商品展示、购物车和订单管理功能';
  
  try {
    const plan = await pomdpTaskDecomposer(taskDescription);
    console.log(plan); // 输出Markdown格式的研发计划
  } catch (error) {
    console.error('任务分解失败:', error);
  }
}

decomposeTask();

API参考

startYoulingTaskServer(options?: YoulingTaskServerOptions)

启动一个MCP协议服务器,提供任务分解服务。

  • 参数:

    • options: 可选的服务器配置
      • port: 服务器端口号,默认为3000
      • secretKey: 身份验证密钥,默认从环境变量MCP_SECRET_KEY获取,或使用默认值
      • serverName: 服务器名称
      • serverVersion: 服务器版本
  • 返回值: Promise,包含Express应用实例和HTTP服务器实例

pomdpTaskDecomposer(taskDescription: string): Promise<string>

使用POMDP方法分解研发任务。

  • 参数:

    • taskDescription: 任务描述文本
  • 返回值: Promise,解析为Markdown格式的研发计划

在IDE中使用

  1. 安装依赖:

    npm install youling-task
  2. 在TypeScript项目中配置:

    tsconfig.json 示例配置:

    {
      "compilerOptions": {
        "target": "ES2022",
        "module": "NodeNext",
        "moduleResolution": "NodeNext",
        "esModuleInterop": true,
        "skipLibCheck": true,
        "strict": true,
        // ...其他配置
      }
    }
  3. 创建导入并使用:

    // 确保使用.js扩展名导入
    import { pomdpTaskDecomposer } from 'youling-task/lib/pomdp-decomposer.js';
    // 或使用包入口
    import { pomdpTaskDecomposer } from 'youling-task';

环境变量

  • MCP_SECRET_KEY: 用于MCP服务器身份验证的密钥

许可证

MIT