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

pi-connect-services

v1.2.10

Published

Ensure the local connect endpoints (qoder 39270 / workbuddy 39271 / trae 39272) are running when pi starts, and ask for one more turn when the model closes without giving anything (thinking-only turns, or an announced-but-unexecuted step).

Readme

pi-connect-services

pi 启动时自动拉起本地模型端点(qoder / workbuddy / trae 三家 connect 工具)。

ZCode 侧由各插件的 SessionStart hook 负责同样的事;装上这个扩展后,打开 pi 或 ZCode 任一应用,整套端点栈就绪。

行为

  • pi 启动 → 逐个探测 127.0.0.1:39270/39271/39272 的 /healthz;
  • 已在跑 → 跳过;不在 → detached 静默拉起(node <工具>/bin/cli.mjs serve --port N);
  • 全程 best-effort:拉起失败不影响 pi 会话,失败会体现在对应 provider 的连接错误里。

关掉自动拉起

想手动管端点(start-all.mjs、或只让 ZCode 的 hook 拉起)时,二选一:

# 环境变量
set PI_CONNECT_NO_AUTOSTART=1

# 或运行根放标记文件(删掉即恢复)
type nul > %USERPROFILE%\.zcode-ai-connect\no-autostart

关闭后扩展不探测、不 spawn,只留一条提示;下面的收尾守卫照旧工作。

收尾守卫

同一个扩展还挂在 agent_before_settle 上,模型什么都没给就收工时补一轮:

| 场景 | 是否续跑 | 说明 | |---|---|---| | 空回合(只有 thinking,正文为空、无工具) | 是 | 所有 provider 都管 | | stall:宣布了下一步却没动手 | 是 | 仅限没有自带守卫的 provider | | stall 且 provider=qwenwork | 否 | 交给 pi-provider-qwenwork,不塞两条提示 | | 用户中断 / 出错的回合 | 否 | outcome !== 'completed' | | 本轮已经调过工具 | 否 | 不存在「只说不做」 |

同一条用户输入之后最多续跑 2 次,用户一发新消息预算重置。

为什么放在这个扩展而不是 pi-provider-qwenwork:后者在 startChatShim() 失败时 直接 return,没装/没登录 qwenwork 时守卫会整体消失 —— 而那正是只用 trae / workbuddy / qoder 时的常态。

安装

pi install npm:pi-connect-services

三个 connect 工具(zcode-qoder-connect、zcode-workbuddy-connect、zcode-trae-connect)是本包的依赖,会一并装上,无需额外配置。

也可以装本地副本(例如套件仓库里的开发版):

pi install /path/to/pi-connect-services

工具定位顺序

扩展按顺序找每个工具目录,第一个含 bin/cli.mjs 的胜出:

  1. PI_CONNECT_TOOLS_ROOT —— 显式覆盖,优先级最高;
  2. npm 依赖 —— pi install npm: 时的默认路径,开箱即用;
  3. 兄弟目录布局 —— 本扩展上一级下的 <tool>,即套件仓库 checkout 的形状。

三个都找不到时,启动日志会出现一条 FAILED — <tool> not found 警告(而不是静默失败)。

配置

通常不需要。只有当你想让 npm 安装的扩展去拉起套件仓库里的开发版工具时,才设:

PI_CONNECT_TOOLS_ROOT=D:/your/suite/repo

(其下应存在 zcode-qoder-connect、zcode-workbuddy-connect、zcode-trae-connect 三个目录。)

MIT。