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

@customize-agent/server

v4.60.35

Published

Customize Agent Web 管理控制台

Readme

Customize Agent Web 控制台(apps/server)

前端 + API 同体的应用本体(Next.js Pages Router,默认端口 17321)。 界面语言:画布(唯一生成视图)+ 管理页;不含 CLI(已拆除)。

页面

| 路由 | 作用 | |---|---| | / → /overview | 数据总览:系统统计、provider、提示词、生成记录、知识库分类、数据体检与清理 | | /canvas | 新建生成:画布 + 底部输入条(提示词选择 / 项目选择 / 一句自然语言指令) | | /canvas/[id] | 主画布:节点树、状态、技能命中、交接气泡、修复浮层、跟随最近;唯一生成视图落点 | | /documents | 重定向到 /canvas(记录列表已并入画布悬浮小球) | | /knowledge、/knowledge/manage、/knowledge/file-detail | 知识库:上传、索引状态、检索、标签/忽略规则相关 API | | /prompt | 提示词库(内置示例 + 项目 CUSTOMIZE.md) | | /skills | 技能编辑器(闭集词表由服务端下发;内置技能只读,编辑即复制) | | /models、/settings、/system/logs、/guide | 模型配置、设置、日志、指引 |

关键 API

  • POST /api/documents/generate —— 启动生成。请求体三字段:promptIds / requirement / projectRoot (可选 materialRoot、title)。章结构由提示词大纲派生(deriveDocumentSpec),没有模板概念。
  • GET /api/documents/canvas/[id] —— 画布聚合视图(一次读盘喂满画布,可降级)。
  • GET /api/documents/generated/[id](lite=1/2 投影裁剪)· .../nodes · .../events(SSE)· .../pause · .../resume-generate · .../instruction(输入框=交互式入口)· .../repair → [rid]/confirm → [rid]/rollback(人工确认修复事务)· .../figure/[name](确定性 SVG)。
  • POST /api/documents/export —— 导出 md/html/docx/pdf;门禁未过需 allowNonDeliverable(加「非交付物」后缀)。
  • GET/POST /api/kb/* —— 文件、树、搜索、上传、索引、标签、忽略规则、重复、评测。
  • GET/PUT /api/config/{models,providers,embedding,web-access} · /api/skills/* · /api/prompt · /api/system/{stats,logs,data-health}。

生成管线与服务分层

  • services/document-workflow/ —— 生成管线本体(六阶段 + 收口期 + 判据/修复器/评分)。 入口:documentGenerator.generateDocumentDraft → 收口 documentPipeline.finalizeGeneration。
  • services/document-core/ —— 生成记录的持久化与任务调度(并发默认 2、按项目互斥、暂停/恢复、中断归档)。
  • services/agent/ —— 节点运行时(emitNode 唯一写入口、nodeLog append-only、writerLoopBlock 写作循环、工具注册表)。
  • services/skills/ —— 技能契约与内置技能;services/knowledge/ —— 知识库单例与索引子进程。

本地数据

见根 README.md。记录本体在 ~/.customize-agent/projects/<id>/generatedDocuments/; 节点日志(*.nodes.jsonl)是唯一真相,executionStages 是它的派生投影。

开发

pnpm --filter @customize-agent/server dev      # :17321(先清 .next)
pnpm --filter @customize-agent/server build    # 构建 + verify-next-static
pnpm typecheck && pnpm lint
npx vitest run                                 # 全仓测试(根目录跑)

改画布/布局类代码后必须跑真浏览器像素用例(jsdom 不做布局): npx vitest run --config vitest.manual.config.ts apps/server/test/pages/canvas/canvasLayoutPixels.manual.ts