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

foliko

v1.0.7

Published

简约的插件化 Agent 框架

Readme

Foliko

简约的插件化 Agent 框架

特性

  • 插件化架构 - 核心简单,通过插件扩展功能
  • 流式输出 - 支持实时流式输出
  • 多 AI 支持 - 支持 Anthropic、DeepSeek、MiniMax 等
  • 内置工具 - Shell、Python、MCP、文件系统等
  • 技能系统 - 可扩展的 Skill 管理
  • 会话管理 - 支持多会话切换
  • 规则引擎 - 可配置的行为规则

快速开始

# 安装
npm install

# 启动聊天
npm run chat

项目结构

vb-agent/
├── cli/                 # 命令行入口
│   └── bin/foliko.js    # CLI 入口
├── src/                 # 核心框架
│   ├── core/            # 核心组件
│   ├── capabilities/    # 能力插件
│   └── executors/       # 执行器
├── plugins/             # 内置插件
├── skills/              # 技能目录
└── examples/            # 示例

配置

在项目根目录创建 .agent 目录:

.agent/
├── config              # 配置文件
├── ai.json            # AI 配置
├── mcp_config.json    # MCP 服务器配置
├── plugins/           # 用户插件目录
├── skills/            # 用户技能目录
└── data/              # 数据目录

config 文件格式

ai_key: your-api-key
ai_model: MiniMax-M2.7
ai_provider: minimax

ai.json 格式

{
  "provider": "minimax",
  "model": "MiniMax-M2.7",
  "apiKey": "your-api-key",
  "baseURL": "https://api.minimaxi.com/v1"
}

mcp_config.json 格式

{
  "mcpServers": {
    "fetch": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-fetch"]
    }
  }
}

开发插件

用户插件(.agent/plugins/)

// .agent/plugins/my-plugin.js
module.exports = function(Plugin) {
  return class MyPlugin extends Plugin {
    constructor(config = {}) {
      super()
      this.name = 'my-plugin'
      this.version = '1.0.0'
      this.description = '我的工具插件'
      this.priority = 10
    }

    install(framework) {
      const { z } = require('zod')
      framework.registerTool({
        name: 'my_tool',
        description: '我的工具',
        inputSchema: z.object({
          param: z.string().describe('参数描述')
        }),
        execute: async (args, framework) => {
          return { success: true, result: args.param }
        }
      })
      return this
    }
  }
}

注意:如果插件需要第三方库(如 zod),需要先安装:

  1. 创建插件文件
  2. 调用 install 工具安装依赖
  3. 热重载插件

技能开发

.agent/skills/ 下创建技能:

.agent/skills/my-skill/
└── SKILL.md

SKILL.md 格式:

---
name: my-skill
description: 技能描述
allowed-tools: tool1,tool2
---

技能内容...

CLI 命令

# 聊天模式
foliko chat

# 指定模型
foliko chat --model gpt-4

# 指定 API
foliko chat --api-key xxx

内置工具

| 工具 | 说明 | |------|------| | loadSkill | 加载技能 | | mcp_execute | 执行 MCP 工具 | | shell_execute | 执行 Shell 命令 | | python_execute | 执行 Python 代码 | | install | 安装 npm 包 | | mcp_reload | 重载 MCP 服务器 | | audit_query | 查询审计日志 |

工作目录

CLI 工作目录默认使用执行命令的目录。

许可证

MIT