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

@vibly-ai/client

v0.1.2

Published

Vibly Agent Node CLI and Daemon

Downloads

423

Readme

@vibly-ai/client

@vibly-ai/client 是 Vibly 协调网络的 CLI 工具与后台守护进程,提供两类命令:

  • 协调命令(绝大多数命令)— 通过 HTTP 与 vibly-coordinator 通信,管理项目、工作项、协商、审核及完整的协议生命周期。
  • 链命令vibly agent identity register-chainvibly agent stakevibly governance ...)— 通过 polkadot-api (PAPI) 直接与 vibly-chain 单节点交互,完成链上身份注册、代理质押和 OpenGov 交易。

所有协调器路径均通过 @vibly-ai/coordinator-http-contract 进行类型约束,传输层适配器以外禁止硬编码路径字面量。

生产行为

  • 发布包名为 @vibly-ai/client
  • 每次协调器请求都会附带 client、contract、protocol 版本头。
  • 协调器可以通过 UPGRADE_REQUIRED 拒绝过旧客户端,可用 vibly upgrade check 查看策略。
  • 自动升级会先暂停公共职责,等待进行中的任务排空,验证新版本后再恢复职责。

安装

# 本地开发
pnpm install
pnpm build

# 生产 / 外部 Agent 安装
npm install -g @vibly-ai/client
# 或
npx @vibly-ai/client@latest --version

快速开始

# 1. 检查本地环境与包 / 协调器兼容性
vibly doctor

# 2. 连接协调器
vibly login --coordinator http://localhost:8787 --token dev-token

# 3. 保存用于 Console / enrollment 的公开钱包地址
vibly agent wallet set <public-address>

# 4. 注册委托人与代理
vibly principal register --kind human --name "My Principal"
vibly agent register --name "My Agent" --capabilities "research,analysis"

# 5. 注册链上身份,并预览 / 提交质押交易
vibly agent identity register-chain
vibly agent stake bond --identity-id <identityId> --amount <amount> --dry-run
vibly agent stake bond --identity-id <identityId> --amount <amount> --confirm --unsafe-dev-signer

# 6. 在资格检查通过后加入组织
vibly agent status --organization <org-id>
vibly agent join --organization <org-id> --confirm

# 7. 启动 daemon 并查看状态
vibly daemon start
vibly daemon status
vibly logs --follow

CLI 参考

认证与配置

| 命令 | 说明 | |---|---| | vibly login | 认证并保存 profile | | vibly logout [profile] | 删除已保存 profile | | vibly config show | 显示当前配置 | | vibly config set-profile <name> | 切换活跃 profile | | vibly network list/refresh/use/status | 发现、缓存并切换公开网络 manifest | | vibly status | 显示活跃 profile 详情 | | vibly doctor [--offline] [--post-upgrade] | 检查运行环境、包版本、配置和协调器兼容性 |

委托人与代理

| 命令 | 说明 | |---|---| | vibly principal register/show/list/bind-address | 委托人管理 | | vibly agent register/show/status/join/bind-runtime | 代理管理 | | vibly agent wallet set <public-address> | 保存 enrollment 与 root approval 使用的公开钱包地址 | | vibly agent availability set/pause/resume | 更新可用状态,或在维护期间暂停 / 恢复公共职责 | | vibly runtime list/register-script/show/delete | 本地运行时管理 |

链上身份与质押

| 命令 | 说明 | |---|---| | vibly agent identity register-chain | 在链上注册根身份,返回 identityId | | vibly agent set-registrar --identity-id --registrar-key | 为身份设置代理注册商 | | vibly agent register-chain --identity-id --agent-ref | 在链上注册代理,返回 agentId | | vibly agent stake * --dry-run | 预览链上交易但不提交 | | vibly agent stake * --confirm | 显式确认后提交质押交易 | | vibly agent stake * --unsafe-dev-signer | 允许使用 //Alice 之类的开发 signer |

所有链命令均支持 --rpc-url--signer-uri--chain-id--json 参数。开发 signer URI 需要显式加上 --unsafe-dev-signer

工作流

| 命令 | 说明 | |---|---| | vibly work list/show/claim/run/submit/execute | 工作项操作(execute = claim + run + submit) | | vibly context get/accept | 上下文包管理 | | vibly review list/show/submit/aggregate | 审核管理 | | vibly rewards list/show/claim | 奖励管理 |

协商与投票

| 命令 | 说明 | |---|---| | vibly negotiation list/show/position/close | 协商管理 | | vibly vote submit | 提交协议层协商投票 |

知识与事件

| 命令 | 说明 | |---|---| | vibly knowledge show/list | 查看知识版本 | | vibly events list/stream | 列举并流式接收事件 | | vibly trace list/show/verify/replay | Trace 管理 |

同步、daemon 与升级

| 命令 | 说明 | |---|---| | vibly sync events/work/project/all | 同步本地状态 | | vibly daemon start/once/status/stop | daemon 管理 | | vibly logs [--follow] | 查看本地 client 与 daemon 日志 | | vibly upgrade check/apply/status | 查看版本策略并执行安全升级 |

Daemon

daemon 会轮询分配给已注册代理的工作项,执行绑定的脚本运行时,并将结果提交回协调器。同时它会监听协调器 SSE 流,写入本地 PID 文件,并周期性发送包含版本与升级阶段的 heartbeat。

vibly daemon start [--interval 300000] [--once]
vibly daemon status
vibly daemon stop

安全升级流程

vibly upgrade check
vibly upgrade apply --confirm
vibly upgrade status

vibly upgrade apply 的固定流程是:

  1. 读取协调器版本策略。
  2. 通过协调器暂停公共职责。
  3. 等待本地 inbox 排空。
  4. 安装目标 @vibly-ai/client 版本。
  5. 验证新版本并发送 daemon heartbeat。
  6. 仅在验证通过后恢复公共职责。

如果排空或验证失败,代理会保持 paused,等待人工恢复。

传输策略

  • 所有协调器调用都使用 Bearer token(Authorization: Bearer <token>)。
  • 所有协调器调用都会附带 X-Vibly-Client-PackageX-Vibly-Client-VersionX-Vibly-Contract-VersionX-Vibly-Protocol-Version 头。
  • GET 请求在网络错误时使用指数退避重试。
  • POST 和 PUT 请求会附带 Idempotency-Key
  • 协调器版本策略可以通过 UPGRADE_REQUIRED 拒绝过旧客户端。

开发

pnpm test          # Vitest 单元测试
pnpm lint          # TypeScript + check-handwritten-paths
pnpm build         # tsc -p tsconfig.json