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

poi-plugin-kancolle-assistant

v0.6.4

Published

kancolle assistant plugin for poi mode

Readme

poi-plugin-kancolle-assistant

KCA 的 poi 模式桥接插件源码。

需要 KCV 2.6.0 或更高版本。

当前状态快照协议

新版 KCV 在既有 port 消息中声明可选能力 stateSnapshotV1。新版插件检测到该能力后,会从 poi 当前 Redux 状态合成:

  • api_get_member/require_info:当前全部装备实例,以及按当前舰娘和陆航占用关系生成的未装备飞机列表。
  • api_port/port:当前全部舰娘、槽位与舰队。

KCV 与插件建立连接时只同步一次上述当前状态快照,并等待 stateSnapshotReady。之后装备与舰娘变化继续通过既有的实时 API 增量维护;自动编成只校验启动快照是否已就绪,不会重复请求全量数据。连接中断并重新建立时会重新同步一次,以补齐断线期间可能漏掉的增量。

该过程只读取 poi 已维护的本地状态,不会刷新游戏,也不会额外请求舰 C 服务器。

通信连接

插件与 KCV 之间的 API 转发使用显式关闭的短连接。每个连接都会消费响应,并设置超时与错误清理;插件停用或重载时还会注销事件监听器并关闭遗留 Socket 和计时器,避免长时间运行后累积连接句柄。

最小化渲染

插件收到 KCV 的鼠标或截图指令时,会临时关闭游戏 WebView 的后台渲染限频,并在首次截图前等待页面恢复绘制。Electron 28 及以上版本会使用隐藏页面截图选项;旧版本保留原截图路径,并尽力保持后台绘制。

KCV 发出的鼠标操作统一通过 Chromium 调试协议直接向游戏渲染进程派发,不再根据 poi 窗口的焦点或最小化状态切换输入通道。如果游戏 WebView 已被其他调试器占用或 CDP 派发失败,插件会记录警告,并保留原有的 Electron 输入接口作为兼容回退。

最后一次助手操作经过 10 秒后,插件会恢复游戏 WebView 原有的后台限频设置。KCV 断开连接、插件停用或重载时也会立即恢复,避免 poi 长期增加 CPU/GPU 占用。

兼容性

  • 新插件 + 新 KCV:使用当前 Redux 全量快照。
  • 新插件 + 旧 KCV:旧 KCV 不声明能力,插件完整保留原来的启动快照和装备增量重放流程。
  • 旧插件 + 新 KCV:其他功能保持原行为;自动换装因无法验证当前全量快照而停止并提示升级插件。