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

flexbiz-server-flow

v4.0.0

Published

FlexBiz Server — gói WORKFLOW (thương mại): FlowEngine, node đồ hoạ, webhook, lịch chạy, tự động hoá quy trình. Tự nối vào core qua điểm mở rộng khi được cài cùng flexbiz-server-core.

Readme

flexbiz-server-flow

Gói WORKFLOW (MIT) cho FlexBiz Server: FlowEngine, node đồ hoạ, webhook, lịch chạy, tự động hoá quy trình. Là dependency của flexbiz-server-core nên tự cài & tự bật — không cần sửa cấu hình.

Cài đặt

npm i flexbiz-server-core     # đã kéo theo flexbiz-server-flow

Mở rộng: gói khác cấp thêm NODE cho flow

Flow phơi một sổ đăng ký node toàn cục global.__flowNodes để gói bất kỳ đóng góp node mà không cần flow phụ thuộc ngược. Trong register(core) của gói bạn:

module.exports = {
  name: 'my-plugin', license: 'MIT',
  register(core) {
    const flow = global.__flowNodes;                 // flow tạo sẵn khi nó register()
    if (flow) {
      // Đăng ký HANDLER (lazy) + SPEC (schema/metadata do CHÍNH GÓI khai báo, không cố định ở flow/core).
      flow.register(
        'mynode',
        (...args) => require('./src/flowNodes/myNode')(...args),  // handler: nạp khi node CHẠY
        require('./src/flowNodes/myNode.spec'),                    // spec: {type,label,category,description,metadata:[...]}
      );
    }
  },
};
  • Handler node có chữ ký (flowState, node, payload, abortSignal) (như các node built-in).
  • Spec ({ type, label, category, description, inputDescription, metadata:[{name,label,type,required,default,...}] }) do gói khai báo → tự vào endpoint /api/flow/nodes và AI agent tool. registerSpec(type, spec) để đăng ký riêng.
  • register(type, handler[, spec]) ghi đè; registerDefault(type, handler) chỉ đặt nếu chưa có.
  • Nếu flow chưa cài (global.__flowNodes vắng) thì bỏ qua — không có workflow thì node cũng vô nghĩa.
  • Nếu một node được flow khai là của gói khác nhưng gói đó chưa cài, flow seed sẵn stub: chạy node đó sẽ báo lỗi rõ NODE_DEP_MISSING (các flow khác vẫn chạy bình thường).

Ví dụ trong repo: @pvtruong/server-agent cấp node aianalysis (AI); @pvtruong/server-marketing cấp channelsendmessage / adssync / facebookpostinsights khi được cài.

Danh sách node ĐỘNG (theo gói đã cài)

Danh sách node hiển thị cho client/AI tự lọc theo gói đã cài — node của gói chưa cài không xuất hiện:

  • Endpoint client: GET /api/flow/nodes{ ok, count, nodes:[{type,label,category,description,input,output}] }; thêm ?full=1 để kèm metadata (các trường cấu hình) dùng dựng flow editor.
  • AI agent tool (getWorkflowNodeSpecsTool) đọc flowUtils.getAvailableNodes() lúc chạy nên chỉ đề xuất node thực sự dùng được.
  • Hàm dùng chung: require('flexbiz-server-flow/src/flow/utils').getAvailableNodes() / getAvailableNodeTypes().

License

MIT — xem LICENSE.